[Libreoffice-commits] .: writerfilter/qa writerfilter/source writerfilter/unocomponent

Gert Faller gfaller at kemper.freedesktop.org
Sat Nov 27 08:37:53 PST 2010


 writerfilter/qa/cppunittests/odiapi/testProperty.cxx                    |   16 +++++-----
 writerfilter/qa/cppunittests/sl/testOD_SL.cxx                           |    6 +--
 writerfilter/source/dmapper/ConversionHelper.cxx                        |   14 ++++----
 writerfilter/source/dmapper/DomainMapper.cxx                            |    2 -
 writerfilter/source/dmapper/DomainMapper_Impl.cxx                       |    6 +--
 writerfilter/source/dmapper/GraphicImport.cxx                           |    8 ++---
 writerfilter/source/dmapper/NumberingManager.cxx                        |    6 +--
 writerfilter/source/dmapper/SettingsTable.cxx                           |    2 -
 writerfilter/source/dmapper/StyleSheetTable.cxx                         |    2 -
 writerfilter/source/filter/WriterFilterDetection.cxx                    |    4 +-
 writerfilter/source/ooxml/OOXMLStreamImpl.cxx                           |    2 -
 writerfilter/unocomponent/debugservices/doctok/DocTokAnalyzeService.cxx |    4 +-
 writerfilter/unocomponent/debugservices/ooxml/OOXMLAnalyzeService.cxx   |    4 +-
 writerfilter/unocomponent/debugservices/rtftok/ScannerTestService.cxx   |   16 +++++-----
 writerfilter/unocomponent/debugservices/rtftok/XMLScanner.cxx           |    6 +--
 15 files changed, 49 insertions(+), 49 deletions(-)

New commits:
commit 0af31702c9728c1d101c2ddc5d035d66aa8cd8f3
Author: Gert Faller <gertfaller at aliceadsl.fr>
Date:   Sat Nov 27 17:37:28 2010 +0100

    RTL_CONSTASCII_USTRINGPARAM in filters 9 (build problem in sal ?)

diff --git a/writerfilter/qa/cppunittests/odiapi/testProperty.cxx b/writerfilter/qa/cppunittests/odiapi/testProperty.cxx
index 943097e..3eb3f2b 100644
--- a/writerfilter/qa/cppunittests/odiapi/testProperty.cxx
+++ b/writerfilter/qa/cppunittests/odiapi/testProperty.cxx
@@ -49,7 +49,7 @@ OString getTempFileName(const OUString& fileName)
   OUString ousTmpUrl;
   FileBase::getTempDirURL(ousTmpUrl);
   if (!ousTmpUrl.endsWithIgnoreAsciiCaseAsciiL("/", 1))
-    ousTmpUrl += OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
+    ousTmpUrl += OUString::createFromAscii("/");
   ousTmpUrl += fileName;
 
   OUString sysTmpPath;
@@ -273,12 +273,12 @@ public:
 
         pool->insert(ps4);
 
-        OString tmpFileName = getTempFileName(OUString(RTL_CONSTASCII_USTRINGPARAM("testPropertyPool_int.dot")));
+        OString tmpFileName = getTempFileName(OUString::createFromAscii("testPropertyPool_int.dot"));
         printf("Pool dump: %s\n", tmpFileName.getStr());
         FileLoggerImpl fl(tmpFileName.getStr());
         pool->dump(&fl);
 
-        OString tmpFileName2 = getTempFileName(OUString(RTL_CONSTASCII_USTRINGPARAM("testPropertyPool_ext.dot")));
+        OString tmpFileName2 = getTempFileName(OUString::createFromAscii("testPropertyPool_ext.dot"));
         printf("Pool dump: %s\n", tmpFileName2.getStr());
         ExternalViewLoggerImpl evl(tmpFileName2.getStr());
         pool->dump(&evl);
@@ -373,12 +373,12 @@ public:
 
         CPPUNIT_ASSERT_MESSAGE("paraProps == failed failed", paraProps == paragraphProps);
 
-        OString tmpFileName = getTempFileName(OUString(RTL_CONSTASCII_USTRINGPARAM("testComplexParaProps_int.dot")));
+        OString tmpFileName = getTempFileName(OUString::createFromAscii("testComplexParaProps_int.dot"));
         printf("Pool dump: %s\n", tmpFileName.getStr());
         FileLoggerImpl fl(tmpFileName.getStr());
         pool->dump(&fl);
 
-        OString tmpFileName2 = getTempFileName(OUString(RTL_CONSTASCII_USTRINGPARAM("testComplexParaProps_ext.dot")));
+        OString tmpFileName2 = getTempFileName(OUString::createFromAscii("testComplexParaProps_ext.dot"));
         printf("Pool dump: %s\n", tmpFileName2.getStr());
         ExternalViewLoggerImpl evl(tmpFileName2.getStr());
         pool->dump(&evl);
@@ -505,21 +505,21 @@ public:
             pb2->insert(createStringProperty(NS_style::LN_font_face, "Roman"));
             PropertyPoolHandle_Pointer_t ph2 = pool->insert(pb2);
 
-            OString tmpFileName = getTempFileName(OUString(RTL_CONSTASCII_USTRINGPARAM("testPropPoolGarbageColl_1.dot")));
+            OString tmpFileName = getTempFileName(OUString::createFromAscii("testPropPoolGarbageColl_1.dot"));
             printf("Pool dump: %s\n", tmpFileName.getStr());
             FileLoggerImpl fl(tmpFileName.getStr());
             pool->dump(&fl);
 
         }
 
-        OString tmpFileName = getTempFileName(OUString(RTL_CONSTASCII_USTRINGPARAM("testPropPoolGarbageColl_2.dot")));
+        OString tmpFileName = getTempFileName(OUString::createFromAscii("testPropPoolGarbageColl_2.dot"));
         printf("Pool dump: %s\n", tmpFileName.getStr());
         FileLoggerImpl fl(tmpFileName.getStr());
         pool->dump(&fl);
 
         pool->garbageCollection();
 
-        OString tmpFileName2 = getTempFileName(OUString(RTL_CONSTASCII_USTRINGPARAM("testPropPoolGarbageColl_after.dot")));
+        OString tmpFileName2 = getTempFileName(OUString::createFromAscii("testPropPoolGarbageColl_after.dot"));
         printf("Pool dump: %s\n", tmpFileName2.getStr());
         FileLoggerImpl fl2(tmpFileName2.getStr());
         pool->dump(&fl2);
diff --git a/writerfilter/qa/cppunittests/sl/testOD_SL.cxx b/writerfilter/qa/cppunittests/sl/testOD_SL.cxx
index 6d28974..9dded73 100644
--- a/writerfilter/qa/cppunittests/sl/testOD_SL.cxx
+++ b/writerfilter/qa/cppunittests/sl/testOD_SL.cxx
@@ -75,7 +75,7 @@ OString getTempFileName(const OUString& fileName)
   OUString ousTmpUrl;
   FileBase::getTempDirURL(ousTmpUrl);
   if (!ousTmpUrl.endsWithIgnoreAsciiCaseAsciiL("/", 1))
-    ousTmpUrl += OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
+    ousTmpUrl += OUString::createFromAscii("/");
   ousTmpUrl += fileName;
 
   OUString sysTmpPath;
@@ -94,12 +94,12 @@ public:
         std::auto_ptr<xxml::XXmlReader> reader=xxml::XXmlReader::createXXmlReader(*handler);
         reader->read("helloworld.odt.flat.xml");
 
-        OString tmpFileName = getTempFileName(OUString(RTL_CONSTASCII_USTRINGPARAM("dumpSlPool_int.dot")));
+        OString tmpFileName = getTempFileName(OUString::createFromAscii("dumpSlPool_int.dot"));
         printf("Pool dump: %s\n", tmpFileName.getStr());
         FileLoggerImpl fl(tmpFileName.getStr());
         propertyPool->dump(&fl);
 
-        OString tmpFileName2 = getTempFileName(OUString(RTL_CONSTASCII_USTRINGPARAM("dumpSlPool_ext.dot")));
+        OString tmpFileName2 = getTempFileName(OUString::createFromAscii("dumpSlPool_ext.dot"));
         printf("Pool dump: %s\n", tmpFileName2.getStr());
         ExternalViewLoggerImpl evl(tmpFileName2.getStr());
         propertyPool->dump(&evl);
diff --git a/writerfilter/source/dmapper/ConversionHelper.cxx b/writerfilter/source/dmapper/ConversionHelper.cxx
index 17414aa..3211636 100644
--- a/writerfilter/source/dmapper/ConversionHelper.cxx
+++ b/writerfilter/source/dmapper/ConversionHelper.cxx
@@ -418,7 +418,7 @@ bool lcl_IsNotAM(::rtl::OUString& rFmt, sal_Int32 nPos)
                     //todo: this cannot be the right way to replace a part of the string!
                     aNewFormat.setCharAt( nI, 'Y' );
                     aNewFormat.setCharAt( nI + 1, 'Y' );
-                    aNewFormat.insert(nI + 2, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("YY")));
+                    aNewFormat.insert(nI + 2, ::rtl::OUString::createFromAscii("YY"));
                     nLen+=2;
                     nI+=3;
                 }
@@ -431,7 +431,7 @@ bool lcl_IsNotAM(::rtl::OUString& rFmt, sal_Int32 nPos)
                     //todo: this cannot be the right way to replace a part of the string!
                     aNewFormat.setCharAt( nI, 'y' );
                     aNewFormat.setCharAt( nI + 1, 'y' );
-                    aNewFormat.insert(nI + 2, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("yy")));
+                    aNewFormat.insert(nI + 2, ::rtl::OUString::createFromAscii("yy"));
                     nLen+=2;
                     nI+=3;
                 }
@@ -442,7 +442,7 @@ bool lcl_IsNotAM(::rtl::OUString& rFmt, sal_Int32 nPos)
                 // MM We have to escape '/' in case it's used as a char
                 //todo: this cannot be the right way to replace a part of the string!
                 aNewFormat.setCharAt( nI, '\\' );
-                aNewFormat.insert(nI + 1, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")));
+                aNewFormat.insert(nI + 1, ::rtl::OUString::createFromAscii("/"));
                 nI++;
                 nLen++;
             }
@@ -455,18 +455,18 @@ bool lcl_IsNotAM(::rtl::OUString& rFmt, sal_Int32 nPos)
 
     if (bForceJapanese)
     {
-        rLocale.Language =  ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ja"));
-        rLocale.Country = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JP"));
+        rLocale.Language =  ::rtl::OUString::createFromAscii("ja");
+        rLocale.Country = ::rtl::OUString::createFromAscii("JP");
     }
 
     if (bForceNatNum)
     {
-        aNewFormat.insert( 0, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("[NatNum1][$-411]")));
+        aNewFormat.insert( 0, ::rtl::OUString::createFromAscii("[NatNum1][$-411]"));
     }
 
     if (bHijri)
     {
-        aNewFormat.insert( 0, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("[~hijri]")));
+        aNewFormat.insert( 0, ::rtl::OUString::createFromAscii("[~hijri]"));
     }
     return aNewFormat.makeStringAndClear();
 
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 659a97c..239f89a 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -4314,7 +4314,7 @@ void DomainMapper::startParagraphGroup()
 
     m_pImpl->getTableManager().startParagraphGroup();
     m_pImpl->PushProperties(CONTEXT_PARAGRAPH);
-    static ::rtl::OUString sDefault(RTL_CONSTASCII_USTRINGPARAM("Standard") );
+    static ::rtl::OUString sDefault( ::rtl::OUString::createFromAscii("Standard") );
     if (m_pImpl->GetTopContext())
     {
         m_pImpl->GetTopContext()->Insert( PROP_PARA_STYLE_NAME, true, uno::makeAny( sDefault ) );
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 54ca809..59a897f 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -184,7 +184,7 @@ uno::Reference< container::XNameContainer >    DomainMapper_Impl::GetPageStyles(
     if(!m_xPageStyles.is())
     {
         uno::Reference< style::XStyleFamiliesSupplier > xSupplier( m_xTextDocument, uno::UNO_QUERY );
-        xSupplier->getStyleFamilies()->getByName(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PageStyles"))) >>= m_xPageStyles;
+        xSupplier->getStyleFamilies()->getByName(::rtl::OUString::createFromAscii("PageStyles")) >>= m_xPageStyles;
     }
     return m_xPageStyles;
 }
@@ -1469,7 +1469,7 @@ extract a parameter (with or without quotes) between the command and the followi
     }
     else
     {
-        nEndIndex = rCommand.indexOf( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" \\")), nStartIndex);
+        nEndIndex = rCommand.indexOf( ::rtl::OUString::createFromAscii(" \\"), nStartIndex);
     }
     ::rtl::OUString sRet;
     if( nEndIndex > nStartIndex + 1 )
@@ -2640,7 +2640,7 @@ void DomainMapper_Impl::handleAuthor
         {
             //create a custom property field
             sServiceName += 
-                ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DocInfo.Custom"));
+                ::rtl::OUString::createFromAscii("DocInfo.Custom");
             bIsCustomField = true;
         }
         else
diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx
index 439972c..8dcd6b9 100644
--- a/writerfilter/source/dmapper/GraphicImport.cxx
+++ b/writerfilter/source/dmapper/GraphicImport.cxx
@@ -1055,10 +1055,10 @@ void GraphicImport::attribute(Id nName, Value & val)
                             ( xShape, uno::UNO_QUERY_THROW );
     
                         rtl::OUString sUrl;
-                        xShapeProps->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("GraphicURL")) ) >>= sUrl;
+                        xShapeProps->getPropertyValue( rtl::OUString::createFromAscii( "GraphicURL" ) ) >>= sUrl;
     
                         ::com::sun::star::beans::PropertyValues aMediaProperties( 1 );
-                        aMediaProperties[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("URL"));
+                        aMediaProperties[0].Name = rtl::OUString::createFromAscii( "URL" );
                         aMediaProperties[0].Value <<= sUrl;
     
                         m_xGraphicObject = createGraphicObject( aMediaProperties );
@@ -1071,9 +1071,9 @@ void GraphicImport::attribute(Id nName, Value & val)
                             uno::Reference< beans::XPropertySet > xGraphProps( m_xGraphicObject, 
                                     uno::UNO_QUERY );
                             awt::Size aSize = xShape->getSize( );
-                            xGraphProps->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Height")),
+                            xGraphProps->setPropertyValue( rtl::OUString::createFromAscii( "Height" ),
                                    uno::makeAny( aSize.Height ) );
-                            xGraphProps->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Width")),
+                            xGraphProps->setPropertyValue( rtl::OUString::createFromAscii( "Width" ),
                                    uno::makeAny( aSize.Width ) );
                         }
                     }
diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx
index 2489a37..4ce39b1 100644
--- a/writerfilter/source/dmapper/NumberingManager.cxx
+++ b/writerfilter/source/dmapper/NumberingManager.cxx
@@ -439,7 +439,7 @@ ListDef::~ListDef( )
 
 OUString ListDef::GetStyleName( sal_Int32 nId )
 {
-    OUString sStyleName( RTL_CONSTASCII_USTRINGPARAM("WWNum") );
+    OUString sStyleName( OUString::createFromAscii( "WWNum" ) );
     sStyleName += OUString::valueOf( nId );
 
     return sStyleName;
@@ -476,7 +476,7 @@ uno::Reference< container::XNameContainer > lcl_getUnoNumberingStyles(
     try
     {
         uno::Reference< style::XStyleFamiliesSupplier > xFamilies( xFactory, uno::UNO_QUERY_THROW );
-        uno::Any oFamily = xFamilies->getStyleFamilies( )->getByName( OUString(RTL_CONSTASCII_USTRINGPARAM("NumberingStyles")) );
+        uno::Any oFamily = xFamilies->getStyleFamilies( )->getByName( OUString::createFromAscii( "NumberingStyles" ) );
 
         oFamily >>= xStyles;
     }
@@ -501,7 +501,7 @@ void ListDef::CreateNumberingRules( DomainMapper& rDMapper,
             // Create the numbering style
             uno::Reference< beans::XPropertySet > xStyle (
                 xFactory->createInstance( 
-                    OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.style.NumberingStyle"))),
+                    OUString::createFromAscii("com.sun.star.style.NumberingStyle")),
                 uno::UNO_QUERY_THROW );
 
             rtl::OUString sStyleName = GetStyleName( GetId( ) );
diff --git a/writerfilter/source/dmapper/SettingsTable.cxx b/writerfilter/source/dmapper/SettingsTable.cxx
index 6e125f5..386d46f 100644
--- a/writerfilter/source/dmapper/SettingsTable.cxx
+++ b/writerfilter/source/dmapper/SettingsTable.cxx
@@ -267,7 +267,7 @@ void SettingsTable::ApplyProperties( uno::Reference< text::XTextDocument > xDoc
     uno::Reference< beans::XPropertySet> xDocProps( xDoc, uno::UNO_QUERY );
             
     // Record changes value
-    xDocProps->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RecordChanges")), uno::makeAny( m_pImpl->m_bRecordChanges ) );
+    xDocProps->setPropertyValue( ::rtl::OUString::createFromAscii( "RecordChanges" ), uno::makeAny( m_pImpl->m_bRecordChanges ) );
 }
         
         
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index e1c3e7c..6df8e0e 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -926,7 +926,7 @@ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable )
                             {
                                 aPropValues.realloc( aPropValues.getLength( ) + 1 );
                                 beans::PropertyValue aStyleVal( rPropNameSupplier.GetName( PROP_NUMBERING_STYLE_NAME ), 0,
-                                        uno::makeAny( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")) ),
+                                        uno::makeAny( rtl::OUString::createFromAscii( "" ) ),
                                         beans::PropertyState_DIRECT_VALUE );
                                 aPropValues[ aPropValues.getLength( ) - 1 ] = aStyleVal;
                             }
diff --git a/writerfilter/source/filter/WriterFilterDetection.cxx b/writerfilter/source/filter/WriterFilterDetection.cxx
index 94afe39..562b0cb 100644
--- a/writerfilter/source/filter/WriterFilterDetection.cxx
+++ b/writerfilter/source/filter/WriterFilterDetection.cxx
@@ -97,10 +97,10 @@ OUString WriterFilterDetection::detect( uno::Sequence< beans::PropertyValue >& r
             {
                 SotStorageRef xStg = new SotStorage( pStream, FALSE );
 
-                bool bTable2 = xStg->IsContained( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("1Table")));
+                bool bTable2 = xStg->IsContained( rtl::OUString::createFromAscii("1Table" ));
                 SotStorageStreamRef xRef =
 
-                    xStg->OpenSotStream(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("WordDocument")),
+                    xStg->OpenSotStream(rtl::OUString::createFromAscii("WordDocument"),
 
                             STREAM_STD_READ | STREAM_NOCREATE );
 
diff --git a/writerfilter/source/ooxml/OOXMLStreamImpl.cxx b/writerfilter/source/ooxml/OOXMLStreamImpl.cxx
index 843381a..a0d6a9d 100644
--- a/writerfilter/source/ooxml/OOXMLStreamImpl.cxx
+++ b/writerfilter/source/ooxml/OOXMLStreamImpl.cxx
@@ -262,7 +262,7 @@ uno::Reference<xml::sax::XParser> OOXMLStreamImpl::getParser()
     
     uno::Reference<xml::sax::XParser> xParser
         (xFactory->createInstanceWithContext
-        ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Parser")),
+        ( rtl::OUString::createFromAscii( "com.sun.star.xml.sax.Parser" ),
           mxContext ), 
         uno::UNO_QUERY );
 
diff --git a/writerfilter/unocomponent/debugservices/doctok/DocTokAnalyzeService.cxx b/writerfilter/unocomponent/debugservices/doctok/DocTokAnalyzeService.cxx
index 48421d3..de4f147 100644
--- a/writerfilter/unocomponent/debugservices/doctok/DocTokAnalyzeService.cxx
+++ b/writerfilter/unocomponent/debugservices/doctok/DocTokAnalyzeService.cxx
@@ -100,8 +100,8 @@ public:
               xContext), uno::UNO_QUERY_THROW);
         xInputStream = xFileAccess->openFileRead(absFileUrl) ;
 
-        mLF = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n"));
-        mCRLF = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\r\n"));
+        mLF = rtl::OUString::createFromAscii("\n");
+        mCRLF = rtl::OUString::createFromAscii("\r\n");
     }
 
     rtl::OUString getURL()
diff --git a/writerfilter/unocomponent/debugservices/ooxml/OOXMLAnalyzeService.cxx b/writerfilter/unocomponent/debugservices/ooxml/OOXMLAnalyzeService.cxx
index f2499fc..89cd8e8 100644
--- a/writerfilter/unocomponent/debugservices/ooxml/OOXMLAnalyzeService.cxx
+++ b/writerfilter/unocomponent/debugservices/ooxml/OOXMLAnalyzeService.cxx
@@ -101,8 +101,8 @@ public:
               xContext), uno::UNO_QUERY_THROW);
         xInputStream = xFileAccess->openFileRead(absFileUrl) ;
 
-        mLF = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n"));
-        mCRLF = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\r\n"));
+        mLF = rtl::OUString::createFromAscii("\n");
+        mCRLF = rtl::OUString::createFromAscii("\r\n");
     }
 
     rtl::OUString getURL()
diff --git a/writerfilter/unocomponent/debugservices/rtftok/ScannerTestService.cxx b/writerfilter/unocomponent/debugservices/rtftok/ScannerTestService.cxx
index 1386733..a8de336 100644
--- a/writerfilter/unocomponent/debugservices/rtftok/ScannerTestService.cxx
+++ b/writerfilter/unocomponent/debugservices/rtftok/ScannerTestService.cxx
@@ -154,7 +154,7 @@ class MyRtfScannerHandler : public writerfilter::rtftok::RTFScannerHandler
             aArgs0[0] <<= myStream;
             uno::Reference< container::XNameContainer > xNameContainer(
             xServiceFactory->createInstanceWithArguments(
-                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.embed.OLESimpleStorage")),
+                    ::rtl::OUString::createFromAscii("com.sun.star.embed.OLESimpleStorage" ),
                     aArgs0 ),
             uno::UNO_QUERY_THROW );
             try {
@@ -171,7 +171,7 @@ class MyRtfScannerHandler : public writerfilter::rtftok::RTFScannerHandler
                 uno::Reference< io::XStream > xContentStream = xStorage->openStreamElement(
                     rtl::OUString::createFromAscii(buf), embed::ElementModes::READWRITE | embed::ElementModes::TRUNCATE );
                 uno::Reference<beans::XPropertySet> xContentStreamPropSet(xContentStream, uno::UNO_QUERY_THROW);
-                xContentStreamPropSet->setPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")), uno::makeAny(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("application/vnd.sun.star.oleobject"))));
+                xContentStreamPropSet->setPropertyValue(rtl::OUString::createFromAscii("MediaType"), uno::makeAny(rtl::OUString::createFromAscii("application/vnd.sun.star.oleobject")));
                 uno::Reference<io::XOutputStream> myOutStream=xContentStream->getOutputStream();
                 uno::Sequence< ::sal_Int8 > seq1(binLen);
                 unsigned char *data1=binBufferStr;
@@ -197,21 +197,21 @@ class MyRtfScannerHandler : public writerfilter::rtftok::RTFScannerHandler
                 uno::Reference< io::XStream > xContentStream = xStorage->openStreamElement(
                     rtl::OUString::createFromAscii(buf), embed::ElementModes::READWRITE | embed::ElementModes::TRUNCATE );
                 uno::Reference<beans::XPropertySet> xContentStreamPropSet(xContentStream, uno::UNO_QUERY_THROW);
-                xContentStreamPropSet->setPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")), uno::makeAny(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("application/vnd.sun.star.oleobject"))));
+                xContentStreamPropSet->setPropertyValue(rtl::OUString::createFromAscii("MediaType"), uno::makeAny(rtl::OUString::createFromAscii("application/vnd.sun.star.oleobject")));
                 printf("CONTENT STREAM OK\n");
 
                 uno::Sequence< uno::Any > aArgs1( 1 );
                 aArgs1[0] <<= xContentStream;
                 uno::Reference< container::XNameContainer > xNameContainer2(
                     xServiceFactory->createInstanceWithArguments(
-                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.embed.OLESimpleStorage")),
+                    ::rtl::OUString::createFromAscii("com.sun.star.embed.OLESimpleStorage" ),
                     aArgs1 ),
                     uno::UNO_QUERY_THROW );
                 printf("OLE STORAGE OK\n");
 
                 uno::Any anyStream;
                 anyStream <<= myInStream;
-                xNameContainer2->insertByName(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\1Ole10Native")), anyStream);
+                xNameContainer2->insertByName(rtl::OUString::createFromAscii("\1Ole10Native"), anyStream);
                 printf("INSERT OK\n");
 
                 uno::Reference<embed::XTransactedObject> xTransact(xNameContainer2, uno::UNO_QUERY);
@@ -311,7 +311,7 @@ public:
             bytesTotal=xSeekable->getLength();
         if (xStatusIndicator.is() && xSeekable.is())
         {
-            xStatusIndicator->start(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Converting")), 100);
+            xStatusIndicator->start(::rtl::OUString::createFromAscii("Converting"), 100);
         }
     }
 
@@ -386,7 +386,7 @@ sal_Int32 SAL_CALL ScannerTestService::run( const uno::Sequence< rtl::OUString >
             rtl_uString_release(dir);
 
             uno::Reference <lang::XSingleServiceFactory> xStorageFactory(
-                xServiceFactory->createInstance (rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.embed.StorageFactory"))), uno::UNO_QUERY_THROW);
+                xServiceFactory->createInstance (rtl::OUString::createFromAscii("com.sun.star.embed.StorageFactory")), uno::UNO_QUERY_THROW);
 
             rtl::OUString outFileUrl;
             {
@@ -401,7 +401,7 @@ sal_Int32 SAL_CALL ScannerTestService::run( const uno::Sequence< rtl::OUString >
             aArgs2[1] <<= embed::ElementModes::READWRITE | embed::ElementModes::TRUNCATE;
             uno::Reference<embed::XStorage> xStorage(xStorageFactory->createInstanceWithArguments(aArgs2), uno::UNO_QUERY_THROW);
             uno::Reference<beans::XPropertySet> xPropSet(xStorage, uno::UNO_QUERY_THROW);
-            xPropSet->setPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")), uno::makeAny(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("application/vnd.oasis.opendocument.text"))));
+            xPropSet->setPropertyValue(rtl::OUString::createFromAscii("MediaType"), uno::makeAny(rtl::OUString::createFromAscii("application/vnd.oasis.opendocument.text")));
             uno::Reference<io::XInputStream> xInputStream = xFileAccess->openFileRead(absFileUrl);
             uno::Reference< task::XStatusIndicator > xStatusIndicator;
 
diff --git a/writerfilter/unocomponent/debugservices/rtftok/XMLScanner.cxx b/writerfilter/unocomponent/debugservices/rtftok/XMLScanner.cxx
index d279426..9b61773 100644
--- a/writerfilter/unocomponent/debugservices/rtftok/XMLScanner.cxx
+++ b/writerfilter/unocomponent/debugservices/rtftok/XMLScanner.cxx
@@ -201,7 +201,7 @@ public:
             bytesTotal=xSeekable->getLength();
         if (xStatusIndicator.is() && xSeekable.is())
         {
-            xStatusIndicator->start(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Converting")), 100);
+            xStatusIndicator->start(::rtl::OUString::createFromAscii("Converting"), 100);
         }
     }
 
@@ -270,7 +270,7 @@ sal_Int32 SAL_CALL XMLScanner::run( const uno::Sequence< rtl::OUString >& aArgum
             rtl_uString_release(dir);
 
             uno::Reference <lang::XSingleServiceFactory> xStorageFactory(
-                xServiceFactory->createInstance (rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.embed.StorageFactory"))), uno::UNO_QUERY_THROW);
+                xServiceFactory->createInstance (rtl::OUString::createFromAscii("com.sun.star.embed.StorageFactory")), uno::UNO_QUERY_THROW);
 
 #if 0
             rtl::OUString outFileUrl;
@@ -286,7 +286,7 @@ sal_Int32 SAL_CALL XMLScanner::run( const uno::Sequence< rtl::OUString >& aArgum
             aArgs[1] <<= embed::ElementModes::READWRITE | embed::ElementModes::TRUNCATE;
             uno::Reference<embed::XStorage> xStorage(xStorageFactory->createInstanceWithArguments(aArgs), uno::UNO_QUERY_THROW);
             uno::Reference<beans::XPropertySet> xPropSet(xStorage, uno::UNO_QUERY_THROW);
-            xPropSet->setPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")), uno::makeAny(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("application/vnd.oasis.opendocument.text"))));
+            xPropSet->setPropertyValue(rtl::OUString::createFromAscii("MediaType"), uno::makeAny(rtl::OUString::createFromAscii("application/vnd.oasis.opendocument.text")));
 #endif
             uno::Reference<io::XInputStream> xInputStream = xFileAccess->openFileRead(absFileUrl);
             uno::Reference< task::XStatusIndicator > xStatusIndicator;


More information about the Libreoffice-commits mailing list