[Libreoffice-commits] .: 3 commits - embeddedobj/test linguistic/source sfx2/source

Olivier Hallot ohallot at kemper.freedesktop.org
Sun Jun 3 17:02:53 PDT 2012


 embeddedobj/test/MainThreadExecutor/xexecutor.cxx  |    2 
 embeddedobj/test/mtexecutor/bitmapcreator.cxx      |    4 -
 embeddedobj/test/mtexecutor/mainthreadexecutor.cxx |    4 -
 linguistic/source/convdic.cxx                      |   14 +---
 linguistic/source/convdiclist.cxx                  |   11 +--
 linguistic/source/gciterator.cxx                   |   16 ++---
 linguistic/source/lngsvcmgr.cxx                    |   63 ++++++++++-----------
 sfx2/source/appl/helpinterceptor.cxx               |    2 
 sfx2/source/bastyp/helper.cxx                      |   18 +++---
 sfx2/source/doc/graphhelp.cxx                      |    8 +-
 sfx2/source/doc/iframe.cxx                         |   13 ++--
 sfx2/source/view/ipclient.cxx                      |   20 +++---
 12 files changed, 82 insertions(+), 93 deletions(-)

New commits:
commit 793f2404409a5c3a707fa5d0731e034b12f0b431
Author: Olivier Hallot <olivier.hallot at alta.org.br>
Date:   Sun Jun 3 21:00:18 2012 -0300

    targeted string re-work (ii)
    
    Further simplification of d8e3eb234b729e9b3d9b8d81abd27f228fd06687
    
    Change-Id: I2fa695e236cb6dc3be66fc57e7fae167cc368904

diff --git a/linguistic/source/convdic.cxx b/linguistic/source/convdic.cxx
index d5599b0..5827d1f 100644
--- a/linguistic/source/convdic.cxx
+++ b/linguistic/source/convdic.cxx
@@ -95,8 +95,7 @@ void ReadThroughDic( const String &rMainURL, ConvDicXMLImport &rImport )
     uno::Reference< io::XInputStream > xIn;
     try
     {
-        uno::Reference< ucb::XSimpleFileAccess > xAccess( xServiceFactory->createInstance(
-                A2OU( "com.sun.star.ucb.SimpleFileAccess" ) ), uno::UNO_QUERY_THROW );
+        uno::Reference< ucb::XSimpleFileAccess > xAccess( xServiceFactory->createInstance( "com.sun.star.ucb.SimpleFileAccess" ), uno::UNO_QUERY_THROW );
         xIn = xAccess->openFileRead( rMainURL );
     }
     catch (const uno::Exception &)
@@ -116,8 +115,7 @@ void ReadThroughDic( const String &rMainURL, ConvDicXMLImport &rImport )
     uno::Reference< xml::sax::XParser > xParser;
     try
     {
-        xParser = uno::Reference< xml::sax::XParser >( xServiceFactory->createInstance(
-            A2OU( "com.sun.star.xml.sax.Parser" ) ), UNO_QUERY );
+        xParser = uno::Reference< xml::sax::XParser >( xServiceFactory->createInstance( "com.sun.star.xml.sax.Parser" ), UNO_QUERY );
     }
     catch (uno::Exception &)
     {
@@ -269,8 +267,7 @@ void ConvDic::Save()
     uno::Reference< io::XStream > xStream;
     try
     {
-        uno::Reference< ucb::XSimpleFileAccess > xAccess( xServiceFactory->createInstance(
-                A2OU( "com.sun.star.ucb.SimpleFileAccess" ) ), uno::UNO_QUERY_THROW );
+        uno::Reference< ucb::XSimpleFileAccess > xAccess( xServiceFactory->createInstance( "com.sun.star.ucb.SimpleFileAccess" ), uno::UNO_QUERY_THROW );
         xStream = xAccess->openFileReadWrite( aMainURL );
     }
     catch (const uno::Exception &)
@@ -289,8 +286,7 @@ void ConvDic::Save()
         try
         {
             xSaxWriter = uno::Reference< io::XActiveDataSource >(
-                    xServiceFactory->createInstance(
-                    OUString("com.sun.star.xml.sax.Writer") ), UNO_QUERY );
+                    xServiceFactory->createInstance( "com.sun.star.xml.sax.Writer" ), UNO_QUERY );
         }
         catch (uno::Exception &)
         {
@@ -721,7 +717,7 @@ uno::Sequence< OUString > ConvDic::getSupportedServiceNames_Static()
     throw()
 {
     uno::Sequence< OUString > aSNS( 1 );
-    aSNS.getArray()[0] = A2OU( SN_CONV_DICTIONARY );
+    aSNS.getArray()[0] = SN_CONV_DICTIONARY ;
     return aSNS;
 }
 
diff --git a/linguistic/source/convdiclist.cxx b/linguistic/source/convdiclist.cxx
index 39cc442..101d583 100644
--- a/linguistic/source/convdiclist.cxx
+++ b/linguistic/source/convdiclist.cxx
@@ -315,7 +315,7 @@ void SAL_CALL ConvDicNameContainer::removeByName( const OUString& rName )
         {
             ::ucbhelper::Content    aCnt( aObj.GetMainURL( INetURLObject::NO_DECODE ),
                                     uno::Reference< ::com::sun::star::ucb::XCommandEnvironment > () );
-            aCnt.executeCommand( OUString("delete"), makeAny( sal_Bool( sal_True ) ) );
+            aCnt.executeCommand( "delete", makeAny( sal_Bool( sal_True ) ) );
         }
         catch( ::com::sun::star::ucb::CommandAbortedException& )
         {
@@ -442,8 +442,7 @@ ConvDicNameContainer & ConvDicList::GetNameContainer()
     if (!pNameContainer)
     {
         pNameContainer = new ConvDicNameContainer( *this );
-        pNameContainer->AddConvDics( GetDictionaryWriteablePath(),
-                                     A2OU( CONV_DIC_EXT ) );
+        pNameContainer->AddConvDics( GetDictionaryWriteablePath(), ::rtl::OUString(CONV_DIC_EXT)  );
         xNameContainer = pNameContainer;
 
         // access list of text conversion dictionaries to activate
@@ -462,9 +461,9 @@ ConvDicNameContainer & ConvDicList::GetNameContainer()
         // since there is no UI to active/deactivate the dictionaries
         // for chinese text conversion they should be activated by default
         uno::Reference< XConversionDictionary > xS2TDic(
-                    pNameContainer->GetByName( A2OU("ChineseS2T") ), UNO_QUERY );
+                    pNameContainer->GetByName( "ChineseS2T" ), UNO_QUERY );
         uno::Reference< XConversionDictionary > xT2SDic(
-                    pNameContainer->GetByName( A2OU("ChineseT2S") ), UNO_QUERY );
+                    pNameContainer->GetByName( "ChineseT2S" ), UNO_QUERY );
             if (xS2TDic.is())
                 xS2TDic->setActive( sal_True );
             if (xT2SDic.is())
@@ -666,7 +665,7 @@ uno::Sequence< OUString > ConvDicList::getSupportedServiceNames_Static()
     throw()
 {
     uno::Sequence< OUString > aSNS( 1 );
-    aSNS.getArray()[0] = A2OU( SN_CONV_DICTIONARY_LIST );
+    aSNS.getArray()[0] = SN_CONV_DICTIONARY_LIST;
     return aSNS;
 }
 
diff --git a/linguistic/source/gciterator.cxx b/linguistic/source/gciterator.cxx
index 9e4e3dc..d2c9608 100644
--- a/linguistic/source/gciterator.cxx
+++ b/linguistic/source/gciterator.cxx
@@ -764,7 +764,7 @@ sal_Int32 GrammarCheckingIterator::GetSuggestedEndOfSentence(
         uno::Reference< lang::XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
         if ( xMSF.is() )
             xBreakIterator = uno::Reference < i18n::XBreakIterator >( xMSF->createInstance(
-                ::rtl::OUString("com.sun.star.i18n.BreakIterator") ), uno::UNO_QUERY );
+                "com.sun.star.i18n.BreakIterator" ), uno::UNO_QUERY );
     }
     sal_Int32 nTextLen = rText.getLength();
     sal_Int32 nEndPosition = nTextLen;
@@ -987,19 +987,19 @@ uno::Reference< util::XChangesBatch > GrammarCheckingIterator::GetUpdateAccess()
             if (xMgr.is())
             {
                 xConfigurationProvider = uno::Reference< lang::XMultiServiceFactory > (
-                        xMgr->createInstance( OUString( "com.sun.star.configuration.ConfigurationProvider"  ) ),
+                        xMgr->createInstance( "com.sun.star.configuration.ConfigurationProvider" ),
                         uno::UNO_QUERY_THROW ) ;
             }
 
             // get configuration update access
             beans::PropertyValue aValue;
-            aValue.Name  = A2OU( "nodepath" );
-            aValue.Value = uno::makeAny( A2OU("org.openoffice.Office.Linguistic/ServiceManager") );
+            aValue.Name  = "nodepath";
+            aValue.Value = uno::makeAny( ::rtl::OUString("org.openoffice.Office.Linguistic/ServiceManager") );
             uno::Sequence< uno::Any > aProps(1);
             aProps[0] <<= aValue;
             m_xUpdateAccess = uno::Reference< util::XChangesBatch >(
                     xConfigurationProvider->createInstanceWithArguments(
-                        A2OU( "com.sun.star.configuration.ConfigurationUpdateAccess" ), aProps ),
+                        "com.sun.star.configuration.ConfigurationUpdateAccess", aProps ),
                         uno::UNO_QUERY_THROW );
         }
         catch (uno::Exception &)
@@ -1019,7 +1019,7 @@ void GrammarCheckingIterator::GetConfiguredGCSvcs_Impl()
     {
         // get node names (locale iso strings) for configured grammar checkers
         uno::Reference< container::XNameAccess > xNA( GetUpdateAccess(), uno::UNO_QUERY_THROW );
-        xNA.set( xNA->getByName( A2OU("GrammarCheckerList") ), uno::UNO_QUERY_THROW );
+        xNA.set( xNA->getByName( "GrammarCheckerList" ), uno::UNO_QUERY_THROW );
         const uno::Sequence< OUString > aElementNames( xNA->getElementNames() );
         const OUString *pElementNames = aElementNames.getConstArray();
 
@@ -1138,14 +1138,14 @@ LinguDispatcher::DspType GrammarCheckingIterator::GetDspType() const
 
 static OUString GrammarCheckingIterator_getImplementationName() throw()
 {
-    return A2OU( "com.sun.star.lingu2.ProofreadingIterator" );
+    return ::rtl::OUString( "com.sun.star.lingu2.ProofreadingIterator" );
 }
 
 
 static uno::Sequence< OUString > GrammarCheckingIterator_getSupportedServiceNames() throw()
 {
     uno::Sequence< OUString > aSNS( 1 );
-    aSNS.getArray()[0] = A2OU( SN_GRAMMARCHECKINGITERATOR );
+    aSNS.getArray()[0] = SN_GRAMMARCHECKINGITERATOR ;
     return aSNS;
 }
 
diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx
index b41dc22..b1c8055 100644
--- a/linguistic/source/lngsvcmgr.cxx
+++ b/linguistic/source/lngsvcmgr.cxx
@@ -459,7 +459,7 @@ sal_Bool LngSvcMgrListenerHelper::RemoveLngSvcEvtBroadcaster(
 
 
 LngSvcMgr::LngSvcMgr()
-    : utl::ConfigItem(OUString("Office.Linguistic"))
+    : utl::ConfigItem("Office.Linguistic")
     , aEvtListeners(GetLinguMutex())
 {
     bDisposing = sal_False;
@@ -478,10 +478,10 @@ LngSvcMgr::LngSvcMgr()
     // request notify events when properties (i.e. something in the subtree) changes
     uno::Sequence< OUString > aNames(4);
     OUString *pNames = aNames.getArray();
-    pNames[0] = A2OU( "ServiceManager/SpellCheckerList" );
-    pNames[1] = A2OU( "ServiceManager/GrammarCheckerList" );
-    pNames[2] = A2OU( "ServiceManager/HyphenatorList" );
-    pNames[3] = A2OU( "ServiceManager/ThesaurusList" );
+    pNames[0] = "ServiceManager/SpellCheckerList";
+    pNames[1] = "ServiceManager/GrammarCheckerList";
+    pNames[2] = "ServiceManager/HyphenatorList";
+    pNames[3] = "ServiceManager/ThesaurusList";
     EnableNotification( aNames );
 }
 
@@ -501,10 +501,10 @@ LngSvcMgr::~LngSvcMgr()
 
 void LngSvcMgr::Notify( const uno::Sequence< OUString > &rPropertyNames )
 {
-    const OUString aSpellCheckerList( A2OU("ServiceManager/SpellCheckerList") );
-    const OUString aGrammarCheckerList( A2OU("ServiceManager/GrammarCheckerList") );
-    const OUString aHyphenatorList( A2OU("ServiceManager/HyphenatorList") );
-    const OUString aThesaurusList( A2OU("ServiceManager/ThesaurusList") );
+    const OUString aSpellCheckerList( "ServiceManager/SpellCheckerList" );
+    const OUString aGrammarCheckerList( "ServiceManager/GrammarCheckerList" );
+    const OUString aHyphenatorList( "ServiceManager/HyphenatorList" );
+    const OUString aThesaurusList( "ServiceManager/ThesaurusList" );
 
     const uno::Sequence< OUString > aSpellCheckerListEntries( GetNodeNames( aSpellCheckerList ) );
     const uno::Sequence< OUString > aGrammarCheckerListEntries( GetNodeNames( aGrammarCheckerList ) );
@@ -682,7 +682,7 @@ void LngSvcMgr::GetGrammarCheckerDsp_Impl( sal_Bool bSetSvcList  )
             uno::Reference< lang::XMultiServiceFactory > xMgr(
                     comphelper::getProcessServiceFactory(), uno::UNO_QUERY_THROW );
             xGCI = uno::Reference< linguistic2::XProofreadingIterator >(
-                    xMgr->createInstance( A2OU( SN_GRAMMARCHECKINGITERATOR ) ), uno::UNO_QUERY_THROW );
+                    xMgr->createInstance( SN_GRAMMARCHECKINGITERATOR ), uno::UNO_QUERY_THROW );
         }
         catch (uno::Exception &)
         {
@@ -737,8 +737,7 @@ void LngSvcMgr::GetAvailableSpellSvcs_Impl()
             uno::Reference< container::XContentEnumerationAccess > xEnumAccess( xFac, uno::UNO_QUERY );
             uno::Reference< container::XEnumeration > xEnum;
             if (xEnumAccess.is())
-                xEnum = xEnumAccess->createContentEnumeration(
-                        A2OU( SN_SPELLCHECKER ) );
+                xEnum = xEnumAccess->createContentEnumeration( SN_SPELLCHECKER );
 
             if (xEnum.is())
             {
@@ -756,7 +755,7 @@ void LngSvcMgr::GetAvailableSpellSvcs_Impl()
                             uno::Reference < uno::XComponentContext > xContext;
                             uno::Reference< beans::XPropertySet > xProps( xFac, uno::UNO_QUERY );
 
-                            xProps->getPropertyValue( OUString( "DefaultContext" )) >>= xContext;
+                            xProps->getPropertyValue( "DefaultContext" ) >>= xContext;
                             xSvc = uno::Reference< linguistic2::XSpellChecker >( ( xCompFactory.is() ? xCompFactory->createInstanceWithContext( xContext ) : xFactory->createInstance() ), uno::UNO_QUERY );
                         }
                         catch (const uno::Exception &)
@@ -802,8 +801,7 @@ void LngSvcMgr::GetAvailableGrammarSvcs_Impl()
             uno::Reference< container::XContentEnumerationAccess > xEnumAccess( xFac, uno::UNO_QUERY );
             uno::Reference< container::XEnumeration > xEnum;
             if (xEnumAccess.is())
-                xEnum = xEnumAccess->createContentEnumeration(
-                        A2OU( SN_GRAMMARCHECKER ) );
+                xEnum = xEnumAccess->createContentEnumeration( SN_GRAMMARCHECKER );
 
             if (xEnum.is())
             {
@@ -821,7 +819,7 @@ void LngSvcMgr::GetAvailableGrammarSvcs_Impl()
                             uno::Reference < uno::XComponentContext > xContext;
                             uno::Reference< beans::XPropertySet > xProps( xFac, uno::UNO_QUERY );
 
-                            xProps->getPropertyValue( OUString( "DefaultContext" )) >>= xContext;
+                            xProps->getPropertyValue( "DefaultContext" ) >>= xContext;
                             xSvc = uno::Reference< linguistic2::XProofreader >( ( xCompFactory.is() ? xCompFactory->createInstanceWithContext( xContext ) : xFactory->createInstance() ), uno::UNO_QUERY );
                         }
                         catch (const uno::Exception &)
@@ -866,7 +864,7 @@ void LngSvcMgr::GetAvailableHyphSvcs_Impl()
             uno::Reference< container::XContentEnumerationAccess > xEnumAccess( xFac, uno::UNO_QUERY );
             uno::Reference< container::XEnumeration > xEnum;
             if (xEnumAccess.is())
-                xEnum = xEnumAccess->createContentEnumeration( A2OU( SN_HYPHENATOR ) );
+                xEnum = xEnumAccess->createContentEnumeration( SN_HYPHENATOR );
 
             if (xEnum.is())
             {
@@ -884,7 +882,7 @@ void LngSvcMgr::GetAvailableHyphSvcs_Impl()
                             uno::Reference < uno::XComponentContext > xContext;
                             uno::Reference< beans::XPropertySet > xProps( xFac, uno::UNO_QUERY );
 
-                            xProps->getPropertyValue( OUString( "DefaultContext" )) >>= xContext;
+                            xProps->getPropertyValue( "DefaultContext" ) >>= xContext;
                             xSvc = uno::Reference< linguistic2::XHyphenator >( ( xCompFactory.is() ? xCompFactory->createInstanceWithContext( xContext ) : xFactory->createInstance() ), uno::UNO_QUERY );
 
                         }
@@ -931,8 +929,7 @@ void LngSvcMgr::GetAvailableThesSvcs_Impl()
             uno::Reference< container::XContentEnumerationAccess > xEnumAccess( xFac, uno::UNO_QUERY );
             uno::Reference< container::XEnumeration > xEnum;
             if (xEnumAccess.is())
-                xEnum = xEnumAccess->createContentEnumeration(
-                        A2OU( SN_THESAURUS ) );
+                xEnum = xEnumAccess->createContentEnumeration( SN_THESAURUS );
 
             if (xEnum.is())
             {
@@ -951,7 +948,7 @@ void LngSvcMgr::GetAvailableThesSvcs_Impl()
                             uno::Reference < uno::XComponentContext > xContext;
                             uno::Reference< beans::XPropertySet > xProps( xFac, uno::UNO_QUERY );
 
-                            xProps->getPropertyValue( OUString( "DefaultContext" )) >>= xContext;
+                            xProps->getPropertyValue( "DefaultContext" ) >>= xContext;
                             xSvc = uno::Reference< linguistic2::XThesaurus >( ( xCompFactory.is() ? xCompFactory->createInstanceWithContext( xContext ) : xFactory->createInstance() ), uno::UNO_QUERY );
                         }
                         catch (const uno::Exception &)
@@ -1155,7 +1152,7 @@ uno::Reference< linguistic2::XSpellChecker > SAL_CALL
 {
     osl::MutexGuard aGuard( GetLinguMutex() );
 #if OSL_DEBUG_LEVEL > 1
-    getAvailableLocales( A2OU( SN_SPELLCHECKER ));
+    getAvailableLocales( SN_SPELLCHECKER );
 #endif
 
     uno::Reference< linguistic2::XSpellChecker > xRes;
@@ -1175,7 +1172,7 @@ uno::Reference< linguistic2::XHyphenator > SAL_CALL
 {
     osl::MutexGuard aGuard( GetLinguMutex() );
 #if OSL_DEBUG_LEVEL > 1
-    getAvailableLocales( A2OU( SN_HYPHENATOR ));
+    getAvailableLocales( SN_HYPHENATOR );
 #endif
 
     uno::Reference< linguistic2::XHyphenator >   xRes;
@@ -1195,7 +1192,7 @@ uno::Reference< linguistic2::XThesaurus > SAL_CALL
 {
     osl::MutexGuard aGuard( GetLinguMutex() );
 #if OSL_DEBUG_LEVEL > 1
-    getAvailableLocales( A2OU( SN_THESAURUS ));
+    getAvailableLocales( SN_THESAURUS );
 #endif
 
     uno::Reference< linguistic2::XThesaurus >    xRes;
@@ -1396,7 +1393,7 @@ void SAL_CALL
             if (bChanged)
             {
                 pSpellDsp->SetServiceList( rLocale, rServiceImplNames );
-                SaveCfgSvcs( A2OU( SN_SPELLCHECKER ) );
+                SaveCfgSvcs( rtl::OUString(SN_SPELLCHECKER) );
 
                 if (pListenerHelper  &&  bChanged)
                     pListenerHelper->AddLngSvcEvt(
@@ -1413,7 +1410,7 @@ void SAL_CALL
             if (bChanged)
             {
                 pGrammarDsp->SetServiceList( rLocale, rServiceImplNames );
-                SaveCfgSvcs( A2OU( SN_GRAMMARCHECKER ) );
+                SaveCfgSvcs( rtl::OUString(SN_GRAMMARCHECKER) );
 
                 if (pListenerHelper  &&  bChanged)
                     pListenerHelper->AddLngSvcEvt(
@@ -1429,7 +1426,7 @@ void SAL_CALL
             if (bChanged)
             {
                 pHyphDsp->SetServiceList( rLocale, rServiceImplNames );
-                SaveCfgSvcs( A2OU( SN_HYPHENATOR ) );
+                SaveCfgSvcs( rtl::OUString(SN_HYPHENATOR) );
 
                 if (pListenerHelper  &&  bChanged)
                     pListenerHelper->AddLngSvcEvt(
@@ -1445,7 +1442,7 @@ void SAL_CALL
             if (bChanged)
             {
                 pThesDsp->SetServiceList( rLocale, rServiceImplNames );
-                SaveCfgSvcs( A2OU( SN_THESAURUS ) );
+                SaveCfgSvcs( rtl::OUString(SN_THESAURUS) );
             }
         }
     }
@@ -1466,28 +1463,28 @@ sal_Bool LngSvcMgr::SaveCfgSvcs( const String &rServiceName )
         if (!pSpellDsp)
             GetSpellCheckerDsp_Impl();
         pDsp = pSpellDsp;
-        aLocales = getAvailableLocales( A2OU( SN_SPELLCHECKER ) );
+        aLocales = getAvailableLocales( SN_SPELLCHECKER );
     }
     else if (0 == rServiceName.CompareToAscii( SN_GRAMMARCHECKER ))
     {
         if (!pGrammarDsp)
             GetGrammarCheckerDsp_Impl();
         pDsp = pGrammarDsp;
-        aLocales = getAvailableLocales( A2OU( SN_GRAMMARCHECKER ) );
+        aLocales = getAvailableLocales( SN_GRAMMARCHECKER );
     }
     else if (0 == rServiceName.CompareToAscii( SN_HYPHENATOR ))
     {
         if (!pHyphDsp)
             GetHyphenatorDsp_Impl();
         pDsp = pHyphDsp;
-        aLocales = getAvailableLocales( A2OU( SN_HYPHENATOR ) );
+        aLocales = getAvailableLocales( SN_HYPHENATOR );
     }
     else if (0 == rServiceName.CompareToAscii( SN_THESAURUS ))
     {
         if (!pThesDsp)
             GetThesaurusDsp_Impl();
         pDsp = pThesDsp;
-        aLocales = getAvailableLocales( A2OU( SN_THESAURUS ) );
+        aLocales = getAvailableLocales( SN_THESAURUS );
     }
 
     if (pDsp  &&  aLocales.getLength())
@@ -1800,7 +1797,7 @@ uno::Sequence< OUString > LngSvcMgr::getSupportedServiceNames_Static()
     osl::MutexGuard aGuard( GetLinguMutex() );
 
     uno::Sequence< OUString > aSNS( 1 );    // more than 1 service possible
-    aSNS.getArray()[0] = A2OU( SN_LINGU_SERVCICE_MANAGER );
+    aSNS.getArray()[0] = SN_LINGU_SERVCICE_MANAGER;
     return aSNS;
 }
 
commit 590140e61d159bdc392670cbc303f1ac1a67e8a4
Author: Olivier Hallot <olivier.hallot at alta.org.br>
Date:   Sun Jun 3 20:24:46 2012 -0300

    targeted string re-work (ii)
    
    further cleanup of 	aa062d1b735f3ebef00fe64c74240240d3912722
    
    Change-Id: Ibadaa736b3e8919b1ca1b21fe2ac7acedb7a673b

diff --git a/embeddedobj/test/MainThreadExecutor/xexecutor.cxx b/embeddedobj/test/MainThreadExecutor/xexecutor.cxx
index 65e699b..58c2118 100644
--- a/embeddedobj/test/MainThreadExecutor/xexecutor.cxx
+++ b/embeddedobj/test/MainThreadExecutor/xexecutor.cxx
@@ -94,7 +94,7 @@ uno::Any SAL_CALL UNOMainThreadExecutor::execute( const uno::Sequence< beans::Na
 uno::Sequence< ::rtl::OUString > SAL_CALL UNOMainThreadExecutor::impl_staticGetSupportedServiceNames()
 {
     uno::Sequence< ::rtl::OUString > aRet(1);
-    aRet[0] = ::rtl::OUString("com.sun.star.comp.thread.MainThreadExecutor");
+    aRet[0] = "com.sun.star.comp.thread.MainThreadExecutor";
     return aRet;
 }
 
diff --git a/embeddedobj/test/mtexecutor/bitmapcreator.cxx b/embeddedobj/test/mtexecutor/bitmapcreator.cxx
index 4012f28..4fe0052 100644
--- a/embeddedobj/test/mtexecutor/bitmapcreator.cxx
+++ b/embeddedobj/test/mtexecutor/bitmapcreator.cxx
@@ -38,8 +38,8 @@ using namespace ::com::sun::star;
 uno::Sequence< ::rtl::OUString > SAL_CALL VCLBitmapCreator::impl_staticGetSupportedServiceNames()
 {
     uno::Sequence< ::rtl::OUString > aRet(2);
-    aRet[0] = ::rtl::OUString("com.sun.star.embed.BitmapCreator");
-    aRet[1] = ::rtl::OUString("com.sun.star.comp.embed.BitmapCreator");
+    aRet[0] = "com.sun.star.embed.BitmapCreator";
+    aRet[1] = "com.sun.star.comp.embed.BitmapCreator";
     return aRet;
 }
 
diff --git a/embeddedobj/test/mtexecutor/mainthreadexecutor.cxx b/embeddedobj/test/mtexecutor/mainthreadexecutor.cxx
index c1b7a89..7612156 100644
--- a/embeddedobj/test/mtexecutor/mainthreadexecutor.cxx
+++ b/embeddedobj/test/mtexecutor/mainthreadexecutor.cxx
@@ -36,8 +36,8 @@ using namespace ::com::sun::star;
 uno::Sequence< ::rtl::OUString > SAL_CALL MainThreadExecutor::impl_staticGetSupportedServiceNames()
 {
     uno::Sequence< ::rtl::OUString > aRet(2);
-    aRet[0] = ::rtl::OUString("com.sun.star.thread.MainThreadExecutor");
-    aRet[1] = ::rtl::OUString("com.sun.star.comp.thread.MainThreadExecutor");
+    aRet[0] = "com.sun.star.thread.MainThreadExecutor";
+    aRet[1] = "com.sun.star.comp.thread.MainThreadExecutor";
     return aRet;
 }
 
commit 4c0d50eac4d89d2717d9e6787932a10abbb6e264
Author: Olivier Hallot <olivier.hallot at alta.org.br>
Date:   Sun Jun 3 20:08:46 2012 -0300

    Targeted string rework (ii)
    
    Further cleanup on top of 2f1a1c529694c1fec6d3b02930f8226c7b2bccd9
    
    Change-Id: If348a0985ea92e4dafc450402053d43f77a0f58f

diff --git a/sfx2/source/appl/helpinterceptor.cxx b/sfx2/source/appl/helpinterceptor.cxx
index 601c315..85fd84c 100644
--- a/sfx2/source/appl/helpinterceptor.cxx
+++ b/sfx2/source/appl/helpinterceptor.cxx
@@ -152,7 +152,7 @@ Reference< XDispatch > SAL_CALL HelpInterceptor_Impl::queryDispatch(
     if ( m_xSlaveDispatcher.is() )
         xResult = m_xSlaveDispatcher->queryDispatch( aURL, aTargetFrameName, nSearchFlags );
 
-    sal_Bool bHelpURL = aURL.Complete.toAsciiLowerCase().match(rtl::OUString("vnd.sun.star.help"),0);
+    sal_Bool bHelpURL = aURL.Complete.toAsciiLowerCase().match("vnd.sun.star.help",0);
 
     if ( bHelpURL )
     {
diff --git a/sfx2/source/bastyp/helper.cxx b/sfx2/source/bastyp/helper.cxx
index 5739aa6..50b9196 100644
--- a/sfx2/source/bastyp/helper.cxx
+++ b/sfx2/source/bastyp/helper.cxx
@@ -96,9 +96,9 @@ uno::Sequence < OUString > SfxContentHelper::GetResultSet( const String& rURL )
         uno::Reference< ucb::XDynamicResultSet > xDynResultSet;
         uno::Sequence< OUString > aProps(3);
         OUString* pProps = aProps.getArray();
-        pProps[0] = OUString("Title");
-        pProps[1] = OUString("ContentType");
-        pProps[2] = OUString("IsFolder");
+        pProps[0] = "Title";
+        pProps[1] = "ContentType";
+        pProps[2] = "IsFolder";
 
         try
         {
@@ -180,14 +180,14 @@ uno::Sequence< OUString > SfxContentHelper::GetHelpTreeViewContents( const Strin
     {
         uno::Reference< lang::XMultiServiceFactory > xFactory = ::comphelper::getProcessServiceFactory();
         uno::Reference< task::XInteractionHandler > xInteractionHandler = uno::Reference< task::XInteractionHandler > (
-                    xFactory->createInstance( ::rtl::OUString( "com.sun.star.task.InteractionHandler" ) ), uno::UNO_QUERY );
+                    xFactory->createInstance( "com.sun.star.task.InteractionHandler" ), uno::UNO_QUERY );
 
         ::ucbhelper::Content aCnt( rURL, new ::ucbhelper::CommandEnvironment( xInteractionHandler, uno::Reference< ucb::XProgressHandler >() ) );
         uno::Reference< sdbc::XResultSet > xResultSet;
         uno::Sequence< OUString > aProps(2);
         OUString* pProps = aProps.getArray();
-        pProps[0] = OUString("Title");
-        pProps[1] = OUString("IsFolder");
+        pProps[0] = "Title";
+        pProps[1] = "IsFolder";
 
         try
         {
@@ -264,7 +264,7 @@ String SfxContentHelper::GetActiveHelpString( const String& rURL )
     {
         uno::Reference< lang::XMultiServiceFactory > xFactory = ::comphelper::getProcessServiceFactory();
         uno::Reference< task::XInteractionHandler > xInteractionHandler = uno::Reference< task::XInteractionHandler > (
-                    xFactory->createInstance( ::rtl::OUString( "com.sun.star.task.InteractionHandler" ) ), uno::UNO_QUERY );
+                    xFactory->createInstance( "com.sun.star.task.InteractionHandler" ), uno::UNO_QUERY );
         ::ucbhelper::Content aCnt( rURL, new ::ucbhelper::CommandEnvironment( xInteractionHandler, uno::Reference< ucb::XProgressHandler >() ) );
         // open the "active help" stream
         uno::Reference< io::XInputStream > xStream = aCnt.openStream();
@@ -298,7 +298,7 @@ sal_Bool SfxContentHelper::IsHelpErrorDocument( const String& rURL )
     {
         ::ucbhelper::Content aCnt( INetURLObject( rURL ).GetMainURL( INetURLObject::NO_DECODE ),
                       uno::Reference< ucb::XCommandEnvironment > () );
-        if ( !( aCnt.getPropertyValue( OUString("IsErrorDocument") ) >>= bRet ) )
+        if ( !( aCnt.getPropertyValue( "IsErrorDocument" ) >>= bRet ) )
         {
             SAL_WARN( "sfx2.bastyp", "Property 'IsErrorDocument' is missing" );
         }
@@ -321,7 +321,7 @@ sal_uIntPtr SfxContentHelper::GetSize( const String& rContent )
     try
     {
         ::ucbhelper::Content aCnt( aObj.GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment > () );
-        aCnt.getPropertyValue( OUString("Size") ) >>= nTemp;
+        aCnt.getPropertyValue( "Size" ) >>= nTemp;
     }
     catch( const ucb::CommandAbortedException& )
     {
diff --git a/sfx2/source/doc/graphhelp.cxx b/sfx2/source/doc/graphhelp.cxx
index 8ed8bd8..11acd56 100644
--- a/sfx2/source/doc/graphhelp.cxx
+++ b/sfx2/source/doc/graphhelp.cxx
@@ -462,7 +462,7 @@ sal_Bool GraphicHelper::getThumbnailReplacement_Impl( sal_Int32 nResID, const un
             {
                 uno::Reference< graphic::XGraphicProvider > xGraphProvider(
                     xServiceManager->createInstance(
-                        ::rtl::OUString("com.sun.star.graphic.GraphicProvider") ),
+                        "com.sun.star.graphic.GraphicProvider") ,
                     uno::UNO_QUERY );
                 if ( xGraphProvider.is() )
                 {
@@ -470,16 +470,16 @@ sal_Bool GraphicHelper::getThumbnailReplacement_Impl( sal_Int32 nResID, const un
                     aURL += ::rtl::OUString::valueOf( nResID );
 
                     uno::Sequence< beans::PropertyValue > aMediaProps( 1 );
-                    aMediaProps[0].Name = ::rtl::OUString("URL");
+                    aMediaProps[0].Name = "URL";
                     aMediaProps[0].Value <<= aURL;
 
                     uno::Reference< graphic::XGraphic > xGraphic = xGraphProvider->queryGraphic( aMediaProps );
                     if ( xGraphic.is() )
                     {
                         uno::Sequence< beans::PropertyValue > aStoreProps( 2 );
-                        aStoreProps[0].Name = ::rtl::OUString("OutputStream");
+                        aStoreProps[0].Name = "OutputStream";
                         aStoreProps[0].Value <<= xStream;
-                        aStoreProps[1].Name = ::rtl::OUString("MimeType");
+                        aStoreProps[1].Name = "MimeType";
                         aStoreProps[1].Value <<= ::rtl::OUString("image/png");
 
                         xGraphProvider->storeGraphic( xGraphic, aStoreProps );
diff --git a/sfx2/source/doc/iframe.cxx b/sfx2/source/doc/iframe.cxx
index 096902d..9d60fb6 100644
--- a/sfx2/source/doc/iframe.cxx
+++ b/sfx2/source/doc/iframe.cxx
@@ -141,8 +141,7 @@ throw( uno::RuntimeException )
         // we must destroy the IFrame before the parent is destroyed
         xWindow->addEventListener( this );
 
-        mxFrame = uno::Reference< frame::XFrame >( mxFact->createInstance( ::rtl::OUString("com.sun.star.frame.Frame") ),
-                    uno::UNO_QUERY );
+        mxFrame = uno::Reference< frame::XFrame >( mxFact->createInstance( "com.sun.star.frame.Frame" ),uno::UNO_QUERY );
         uno::Reference < awt::XWindow > xWin( pWin->GetComponentInterface(), uno::UNO_QUERY );
         mxFrame->initialize( xWin );
         mxFrame->setName( maFrmDescr.GetName() );
@@ -155,15 +154,15 @@ throw( uno::RuntimeException )
 
         util::URL aTargetURL;
         aTargetURL.Complete = ::rtl::OUString( maFrmDescr.GetURL().GetMainURL( INetURLObject::NO_DECODE ) );
-        uno::Reference < util::XURLTransformer > xTrans( mxFact->createInstance( rtl::OUString("com.sun.star.util.URLTransformer")), uno::UNO_QUERY );
+        uno::Reference < util::XURLTransformer > xTrans( mxFact->createInstance( "com.sun.star.util.URLTransformer"), uno::UNO_QUERY );
         xTrans->parseStrict( aTargetURL );
 
         uno::Sequence < beans::PropertyValue > aProps(2);
-        aProps[0].Name = ::rtl::OUString("PluginMode");
+        aProps[0].Name = "PluginMode";
         aProps[0].Value <<= (sal_Int16) 2;
-        aProps[1].Name = ::rtl::OUString("ReadOnly");
+        aProps[1].Name = "ReadOnly";
         aProps[1].Value <<= (sal_Bool) sal_True;
-        uno::Reference < frame::XDispatch > xDisp = xProv->queryDispatch( aTargetURL, ::rtl::OUString("_self"), 0 );
+        uno::Reference < frame::XDispatch > xDisp = xProv->queryDispatch( aTargetURL, "_self", 0 );
         if ( xDisp.is() )
             xDisp->dispatch( aTargetURL, aProps );
 
@@ -367,7 +366,7 @@ void SAL_CALL IFrameObject::removeVetoableChangeListener(const ::rtl::OUString&,
 ::sal_Int16 SAL_CALL IFrameObject::execute() throw (::com::sun::star::uno::RuntimeException)
 {
     SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
-    VclAbstractDialog* pDlg = pFact->CreateEditObjectDialog( NULL, rtl::OUString(".uno:InsertObjectFloatingFrame"), mxObj );
+    VclAbstractDialog* pDlg = pFact->CreateEditObjectDialog( NULL, ".uno:InsertObjectFloatingFrame", mxObj );
     if ( pDlg )
         pDlg->Execute();
     return 0;
diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx
index 2892be7..3bdae69 100644
--- a/sfx2/source/view/ipclient.cxx
+++ b/sfx2/source/view/ipclient.cxx
@@ -255,15 +255,13 @@ void SAL_CALL SfxInPlaceClient_Impl::saveObject()
         // set non-reschedule progress to prevent problems when asynchronous calls are made
         // during storing of the embedded object
         uno::Reference< lang::XInitialization > xInit(
-            xSrvMgr->createInstance(
-                rtl::OUString( "com.sun.star.comp.framework.StatusIndicatorFactory" )),
-            uno::UNO_QUERY_THROW );
+            xSrvMgr->createInstance( "com.sun.star.comp.framework.StatusIndicatorFactory" ), uno::UNO_QUERY_THROW );
         beans::PropertyValue aProperty;
         uno::Sequence< uno::Any > aArgs( 2 );
-        aProperty.Name  = rtl::OUString( "DisableReschedule" );
+        aProperty.Name  = "DisableReschedule";
         aProperty.Value = uno::makeAny( sal_True );
         aArgs[0] = uno::makeAny( aProperty );
-        aProperty.Name  = rtl::OUString( "Frame" );
+        aProperty.Name  = "Frame";
         aProperty.Value = uno::makeAny( xFrame );
         aArgs[1] = uno::makeAny( aProperty );
 
@@ -276,7 +274,7 @@ void SAL_CALL SfxInPlaceClient_Impl::saveObject()
             {
                 uno::Reference< task::XStatusIndicatorFactory > xStatusIndicatorFactory( xInit, uno::UNO_QUERY_THROW );
                 xStatusIndicator = xStatusIndicatorFactory->createStatusIndicator();
-                xPropSet->setPropertyValue( rtl::OUString( "IndicatorInterception" ), uno::makeAny( xStatusIndicator ));
+                xPropSet->setPropertyValue( "IndicatorInterception" , uno::makeAny( xStatusIndicator ));
             }
             catch ( const uno::RuntimeException& )
             {
@@ -305,7 +303,7 @@ void SAL_CALL SfxInPlaceClient_Impl::saveObject()
         if ( xPropSet.is() )
         {
             xStatusIndicator.clear();
-            xPropSet->setPropertyValue( rtl::OUString( "IndicatorInterception" ), uno::makeAny( xStatusIndicator ));
+            xPropSet->setPropertyValue( "IndicatorInterception" , uno::makeAny( xStatusIndicator ));
         }
     }
     catch ( const uno::RuntimeException& )
@@ -420,7 +418,7 @@ uno::Reference< ::com::sun::star::frame::XLayoutManager > SAL_CALL SfxInPlaceCli
     uno::Reference< ::com::sun::star::frame::XLayoutManager > xMan;
     try
     {
-        uno::Any aAny = xFrame->getPropertyValue( ::rtl::OUString("LayoutManager") );
+        uno::Any aAny = xFrame->getPropertyValue( "LayoutManager" );
         aAny >>= xMan;
     }
     catch ( uno::Exception& )
@@ -917,14 +915,14 @@ ErrCode SfxInPlaceClient::DoVerb( long nVerb )
                     uno::Reference< lang::XMultiServiceFactory > xEmptyFactory;
                     SfxStoringHelper aHelper( xEmptyFactory );
                     uno::Sequence< beans::PropertyValue > aDispatchArgs( 1 );
-                    aDispatchArgs[0].Name = ::rtl::OUString( "SaveTo"  );
+                    aDispatchArgs[0].Name = "SaveTo";
                     aDispatchArgs[0].Value <<= (sal_Bool)sal_True;
 
                     aHelper.GUIStoreModel( xEmbModel,
-                                            ::rtl::OUString( "SaveAs"  ),
+                                            "SaveAs",
                                             aDispatchArgs,
                                             sal_False,
-                                            ::rtl::OUString() );
+                                            "" );
                 }
                 catch( const task::ErrorCodeIOException& aErrorEx )
                 {


More information about the Libreoffice-commits mailing list