summaryrefslogtreecommitdiffstats
path: root/lotuswordpro/source/filter/lwpdocdata.cxx
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2014-03-08 00:05:32 -0600
committerNorbert Thiebaud <nthiebaud@gmail.com>2014-03-08 01:21:25 -0600
commitd634ce9edb6f1df409547715a391ad2eeca99f0c (patch)
tree62a7327a3346bf4a9b70d465315b7a466b03449e /lotuswordpro/source/filter/lwpdocdata.cxx
parentcoverity#735759 Unchecked dynamic_cast (diff)
downloadcore-d634ce9edb6f1df409547715a391ad2eeca99f0c.tar.gz
core-d634ce9edb6f1df409547715a391ad2eeca99f0c.zip
use 'native' OUString api in lotuswordpro instead of macro and wrappers
Change-Id: Iccb78b59c3de9f29975d10fa4e34232cd3bf2cc3
Diffstat (limited to 'lotuswordpro/source/filter/lwpdocdata.cxx')
-rw-r--r--lotuswordpro/source/filter/lwpdocdata.cxx29
1 files changed, 5 insertions, 24 deletions
diff --git a/lotuswordpro/source/filter/lwpdocdata.cxx b/lotuswordpro/source/filter/lwpdocdata.cxx
index 27ad616c2acc..bf3c26d9ca8b 100644
--- a/lotuswordpro/source/filter/lwpdocdata.cxx
+++ b/lotuswordpro/source/filter/lwpdocdata.cxx
@@ -293,36 +293,17 @@ void LwpDocData::Read()
}
OUString LwpDocData::DateTimeToOUString(LtTm& dt)
{
- OUStringBuffer buf;
- buf.append((sal_Int32)dt.tm_year);
- buf.append( A2OUSTR("-") );
- buf.append((sal_Int32)dt.tm_mon);
- buf.append( A2OUSTR("-") );
- buf.append((sal_Int32)dt.tm_mday);
- buf.append( A2OUSTR("T") );
- buf.append((sal_Int32)dt.tm_hour);
- buf.append( A2OUSTR(":") );
- buf.append((sal_Int32)dt.tm_min);
- buf.append( A2OUSTR(":") );
- buf.append((sal_Int32)dt.tm_sec);
- buf.append( A2OUSTR(".") );
- buf.append((sal_Int32)0);
+ OUString aResult = OUString::number(dt.tm_year) + "-" + OUString::number(dt.tm_mon) + "-" + OUString::number(dt.tm_mday) +
+ "T" + OUString::number(dt.tm_hour) + ":" + OUString::number(dt.tm_min) + ":" + OUString::number(dt.tm_sec) + ".0";
- return buf.makeStringAndClear();
+ return aResult;
}
OUString LwpDocData::TimeToOUString(LtTm& dt)
{
//PT3H43M44S
- OUStringBuffer buf;
- buf.append( A2OUSTR("PT") );
- buf.append((sal_Int32)dt.tm_hour);
- buf.append( A2OUSTR("H") );
- buf.append((sal_Int32)dt.tm_min);
- buf.append( A2OUSTR("M") );
- buf.append((sal_Int32)dt.tm_sec);
- buf.append( A2OUSTR("S") );
+ OUString aResult = "PT" + OUString::number(dt.tm_hour) + "H" + OUString::number(dt.tm_min) + "M" + OUString::number(dt.tm_sec) + "S";
- return buf.makeStringAndClear();
+ return aResult;
}
void LwpDocData::Parse(IXFStream *pOutputStream)
{