diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2012-07-02 22:11:10 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-07-02 22:11:34 +0200 |
commit | 6d93a746955d01e6339a1ebc1382c2f0b98b6840 (patch) | |
tree | 74e4e466a8bc3cc590cf4054182e33a7f5b91de0 | |
parent | 02a72b30259923eece476abb4aa5c41965d454e7 (diff) |
writerfilter is now RTL_CONSTASCII..PARAM-free
Change-Id: I04ef6ffefa7e27a1f9cac6d7d46cb6022223b9ff
-rw-r--r-- | writerfilter/qa/cppunittests/doctok/testdoctok.cxx | 3 | ||||
-rw-r--r-- | writerfilter/source/doctok/WW8DocumentImpl.cxx | 18 | ||||
-rw-r--r-- | writerfilter/source/doctok/WW8StreamImpl.cxx | 3 | ||||
-rw-r--r-- | writerfilter/source/ooxml/Handler.cxx | 16 | ||||
-rw-r--r-- | writerfilter/source/ooxml/OOXMLFastContextHandler.cxx | 4 | ||||
-rw-r--r-- | writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx | 19 |
6 files changed, 22 insertions, 41 deletions
diff --git a/writerfilter/qa/cppunittests/doctok/testdoctok.cxx b/writerfilter/qa/cppunittests/doctok/testdoctok.cxx index 5d8e633152dc..2fc9e1d720a2 100644 --- a/writerfilter/qa/cppunittests/doctok/testdoctok.cxx +++ b/writerfilter/qa/cppunittests/doctok/testdoctok.cxx @@ -92,8 +92,7 @@ public: { uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess > xNameContainer(xFactory->createInstanceWithContext - (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM - ("com.sun.star.ucb.SimpleFileAccess" )), + ("com.sun.star.ucb.SimpleFileAccess", xComponentContext), uno::UNO_QUERY ); if (xNameContainer.is()) diff --git a/writerfilter/source/doctok/WW8DocumentImpl.cxx b/writerfilter/source/doctok/WW8DocumentImpl.cxx index b0ba4ea8d1e1..f7f67a88abeb 100644 --- a/writerfilter/source/doctok/WW8DocumentImpl.cxx +++ b/writerfilter/source/doctok/WW8DocumentImpl.cxx @@ -171,16 +171,13 @@ WW8DocumentImpl::WW8DocumentImpl(WW8Stream::Pointer_t rpStream) : bSubDocument(false), mfcPicLoc(0), mbPicIsData(false), mpStream(rpStream), mbInSection(false), mbInParagraphGroup(false), mbInCharacterGroup(false) { - mpDocStream = getSubStream(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM - ("WordDocument"))); + mpDocStream = getSubStream("WordDocument"); - mpSummaryInformationStream = getSubStream(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM - ("\5SummaryInformation"))); + mpSummaryInformationStream = getSubStream("\5SummaryInformation"); try { - mpDataStream = getSubStream(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM - ("Data"))); + mpDataStream = getSubStream("Data"); } catch (const ExceptionNotFound &) { @@ -188,8 +185,7 @@ mbInSection(false), mbInParagraphGroup(false), mbInCharacterGroup(false) try { - mpCompObjStream = getSubStream(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM - ("\1CompObj"))); + mpCompObjStream = getSubStream("\1CompObj"); } catch (const ExceptionNotFound &) { @@ -205,14 +201,12 @@ mbInSection(false), mbInParagraphGroup(false), mbInCharacterGroup(false) switch (mpFib->get_fWhichTblStm()) { case 0: - mpTableStream = getSubStream(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM - ("0Table"))); + mpTableStream = getSubStream("0Table"); break; case 1: - mpTableStream = getSubStream(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM - ("1Table"))); + mpTableStream = getSubStream("1Table"); break; diff --git a/writerfilter/source/doctok/WW8StreamImpl.cxx b/writerfilter/source/doctok/WW8StreamImpl.cxx index 50bc0038601c..2a9c7a70bb93 100644 --- a/writerfilter/source/doctok/WW8StreamImpl.cxx +++ b/writerfilter/source/doctok/WW8StreamImpl.cxx @@ -51,8 +51,7 @@ WW8StreamImpl::WW8StreamImpl(uno::Reference<uno::XComponentContext> rContext, xOLESimpleStorage = uno::Reference<container::XNameContainer> (xFactory->createInstanceWithArgumentsAndContext - (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM - ("com.sun.star.embed.OLESimpleStorage")), + ("com.sun.star.embed.OLESimpleStorage", aArgs, mrComponentContext ), uno::UNO_QUERY ); diff --git a/writerfilter/source/ooxml/Handler.cxx b/writerfilter/source/ooxml/Handler.cxx index 7b14d2c51356..2c42224dc4d0 100644 --- a/writerfilter/source/ooxml/Handler.cxx +++ b/writerfilter/source/ooxml/Handler.cxx @@ -294,10 +294,10 @@ OOXMLHyperlinkHandler::OOXMLHyperlinkHandler(OOXMLFastContextHandler * pContext) OOXMLHyperlinkHandler::~OOXMLHyperlinkHandler() { - ::rtl::OUString sReturn(RTL_CONSTASCII_USTRINGPARAM(" HYPERLINK \"")); + ::rtl::OUString sReturn(" HYPERLINK \""); sReturn += mURL; - sReturn += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\"")); + sReturn += "\""; sReturn += mFieldCode; mpFastContext->text(sReturn); @@ -308,23 +308,23 @@ void OOXMLHyperlinkHandler::attribute(Id name, Value & val) switch (name) { case NS_ooxml::LN_CT_Hyperlink_tgtFrame: - mFieldCode += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" \\t \"")); + mFieldCode += " \\t \""; mFieldCode += val.getString(); - mFieldCode += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\"")); + mFieldCode += "\""; break; case NS_ooxml::LN_CT_Hyperlink_tooltip: - mFieldCode += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" \\o \"")); + mFieldCode += " \\o \""; mFieldCode += val.getString(); - mFieldCode += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\"")); + mFieldCode += "\""; break; case NS_ooxml::LN_CT_Hyperlink_docLocation: break; case NS_ooxml::LN_CT_Hyperlink_history: break; case NS_ooxml::LN_CT_Hyperlink_anchor: - mFieldCode += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" \\l \"")); + mFieldCode += " \\l \""; mFieldCode += val.getString(); - mFieldCode += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\"")); + mFieldCode += "\""; break; case NS_ooxml::LN_CT_Hyperlink_r_id: mURL = mpFastContext->getTargetForId(val.getString()); diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx index 738fac5087d4..87bd54a542d8 100644 --- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx +++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx @@ -1916,9 +1916,7 @@ OOXMLFastContextHandlerShape::OOXMLFastContextHandlerShape mrShapeContext.set (rServiceManager-> createInstanceWithContext - (::rtl::OUString - (RTL_CONSTASCII_USTRINGPARAM - ("com.sun.star.xml.sax.FastShapeContextHandler")), xContext), + ("com.sun.star.xml.sax.FastShapeContextHandler", xContext), uno::UNO_QUERY); getDocument()->setShapeContext( mrShapeContext ); } diff --git a/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx b/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx index c99b690b3bae..7d3c769274d3 100644 --- a/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx +++ b/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx @@ -31,12 +31,6 @@ namespace ooxml { using namespace ::std; -static ::rtl::OUString strue(RTL_CONSTASCII_USTRINGPARAM("true")); -static ::rtl::OUString sTrue(RTL_CONSTASCII_USTRINGPARAM("True")); -static ::rtl::OUString s1(RTL_CONSTASCII_USTRINGPARAM("1")); -static ::rtl::OUString sOn(RTL_CONSTASCII_USTRINGPARAM("On")); -static ::rtl::OUString son(RTL_CONSTASCII_USTRINGPARAM("on")); - OOXMLProperty::~OOXMLProperty() { } @@ -278,14 +272,11 @@ OOXMLBooleanValue::OOXMLBooleanValue(bool bValue) OOXMLBooleanValue::OOXMLBooleanValue(const rtl::OUString & rValue) : mbValue(false) { - if (strue.compareTo(rValue) == 0 - || sTrue.compareTo(rValue) == 0 - || s1.compareTo(rValue) == 0 - || son.compareTo(rValue) == 0 - || sOn.compareTo(rValue) == 0) - mbValue = true; - else - mbValue = false; + mbValue = (rValue == "true" + || rValue == "True" + || rValue == "1" + || rValue == "on" + || rValue == "On"); } OOXMLBooleanValue::~OOXMLBooleanValue() |