[Libreoffice-commits] .: sd/source

Olivier Hallot ohallot at kemper.freedesktop.org
Fri Apr 6 04:33:55 PDT 2012


 sd/source/ui/view/Outliner.cxx                  |    3 -
 sd/source/ui/view/PresentationViewShellBase.cxx |    8 +----
 sd/source/ui/view/ToolBarManager.cxx            |   38 ++++++++++--------------
 sd/source/ui/view/ViewShellBase.cxx             |    8 +----
 sd/source/ui/view/drviews7.cxx                  |    3 -
 sd/source/ui/view/drviewsa.cxx                  |    5 +--
 sd/source/ui/view/drviewsb.cxx                  |    2 -
 sd/source/ui/view/drviewse.cxx                  |   20 ++++++------
 8 files changed, 37 insertions(+), 50 deletions(-)

New commits:
commit 7d82fb18fe6ae68f6eb6a33c6030105f9e2fe232
Author: Olivier Hallot <olivier.hallot at alta.org.br>
Date:   Fri Apr 6 08:27:05 2012 -0300

    Review of some RTL_CONSTASCII_USTRINGPARAM removal
    
    Remove OUString constructor where not needed.

diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index d9858b1..e7100e7 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -211,8 +211,7 @@ Outliner::Outliner( SdDrawDocument* pDoc, sal_uInt16 nMode )
             const SvtLinguConfig    aLinguConfig;
             Any                     aAny;
 
-            aAny = aLinguConfig.GetProperty(
-                rtl::OUString( UPN_IS_SPELL_AUTO ) );
+            aAny = aLinguConfig.GetProperty( UPN_IS_SPELL_AUTO );
             aAny >>= bOnlineSpell;
         }
         catch( ... )
diff --git a/sd/source/ui/view/PresentationViewShellBase.cxx b/sd/source/ui/view/PresentationViewShellBase.cxx
index 8c7315f..bd43160 100644
--- a/sd/source/ui/view/PresentationViewShellBase.cxx
+++ b/sd/source/ui/view/PresentationViewShellBase.cxx
@@ -85,14 +85,10 @@ PresentationViewShellBase::PresentationViewShellBase (
             UNO_QUERY);
         if (xFrameSet.is())
         {
-            Reference<beans::XPropertySet> xLayouterSet (
-                xFrameSet->getPropertyValue(::rtl::OUString("LayoutManager")),
-                UNO_QUERY);
+            Reference<beans::XPropertySet> xLayouterSet(xFrameSet->getPropertyValue("LayoutManager"), UNO_QUERY);
             if (xLayouterSet.is())
             {
-                xLayouterSet->setPropertyValue(
-                    ::rtl::OUString("AutomaticToolbars"),
-                    makeAny(sal_False));
+                xLayouterSet->setPropertyValue("AutomaticToolbars", makeAny(sal_False));
             }
         }
     }
diff --git a/sd/source/ui/view/ToolBarManager.cxx b/sd/source/ui/view/ToolBarManager.cxx
index 4d1ef89..7b89cf5 100644
--- a/sd/source/ui/view/ToolBarManager.cxx
+++ b/sd/source/ui/view/ToolBarManager.cxx
@@ -58,9 +58,6 @@
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 
-#undef OUSTRING // Remove definition made in the SFX
-#define OUSTRING(s) (::rtl::OUString(s))
-
 namespace {
 
 using namespace sd;
@@ -359,21 +356,21 @@ private:
 
 //===== ToolBarManager ========================================================
 
-const ::rtl::OUString ToolBarManager::msToolBar(OUSTRING("toolbar"));
-const ::rtl::OUString ToolBarManager::msOptionsToolBar(OUSTRING("optionsbar"));
-const ::rtl::OUString ToolBarManager::msCommonTaskToolBar(OUSTRING("commontaskbar"));
-const ::rtl::OUString ToolBarManager::msViewerToolBar(OUSTRING("viewerbar"));
-const ::rtl::OUString ToolBarManager::msSlideSorterToolBar(OUSTRING("slideviewtoolbar"));
-const ::rtl::OUString ToolBarManager::msSlideSorterObjectBar(OUSTRING("slideviewobjectbar"));
-const ::rtl::OUString ToolBarManager::msOutlineToolBar(OUSTRING("outlinetoolbar"));
-const ::rtl::OUString ToolBarManager::msMasterViewToolBar(OUSTRING("masterviewtoolbar"));
-const ::rtl::OUString ToolBarManager::msDrawingObjectToolBar(OUSTRING("drawingobjectbar"));
-const ::rtl::OUString ToolBarManager::msGluePointsToolBar(OUSTRING("gluepointsobjectbar"));
-const ::rtl::OUString ToolBarManager::msTextObjectBar(OUSTRING("textobjectbar"));
-const ::rtl::OUString ToolBarManager::msBezierObjectBar(OUSTRING("bezierobjectbar"));
-const ::rtl::OUString ToolBarManager::msGraphicObjectBar(OUSTRING("graphicobjectbar"));
-const ::rtl::OUString ToolBarManager::msMediaObjectBar(OUSTRING("mediaobjectbar"));
-const ::rtl::OUString ToolBarManager::msTableObjectBar(OUSTRING("tableobjectbar"));
+const ::rtl::OUString ToolBarManager::msToolBar("toolbar");
+const ::rtl::OUString ToolBarManager::msOptionsToolBar("optionsbar");
+const ::rtl::OUString ToolBarManager::msCommonTaskToolBar("commontaskbar");
+const ::rtl::OUString ToolBarManager::msViewerToolBar("viewerbar");
+const ::rtl::OUString ToolBarManager::msSlideSorterToolBar("slideviewtoolbar");
+const ::rtl::OUString ToolBarManager::msSlideSorterObjectBar("slideviewobjectbar");
+const ::rtl::OUString ToolBarManager::msOutlineToolBar("outlinetoolbar");
+const ::rtl::OUString ToolBarManager::msMasterViewToolBar("masterviewtoolbar");
+const ::rtl::OUString ToolBarManager::msDrawingObjectToolBar("drawingobjectbar");
+const ::rtl::OUString ToolBarManager::msGluePointsToolBar("gluepointsobjectbar");
+const ::rtl::OUString ToolBarManager::msTextObjectBar("textobjectbar");
+const ::rtl::OUString ToolBarManager::msBezierObjectBar("bezierobjectbar");
+const ::rtl::OUString ToolBarManager::msGraphicObjectBar("graphicobjectbar");
+const ::rtl::OUString ToolBarManager::msMediaObjectBar("mediaobjectbar");
+const ::rtl::OUString ToolBarManager::msTableObjectBar("tableobjectbar");
 
 
 ::boost::shared_ptr<ToolBarManager> ToolBarManager::Create (
@@ -597,8 +594,7 @@ void ToolBarManager::ToolBarsDestroyed(void)
 
 //===== ToolBarManager::Implementation =======================================
 
-const ::rtl::OUString ToolBarManager::Implementation::msToolBarResourcePrefix(
-    OUSTRING("private:resource/toolbar/"));
+const ::rtl::OUString ToolBarManager::Implementation::msToolBarResourcePrefix("private:resource/toolbar/");
 
 ToolBarManager::Implementation::Implementation (
     ViewShellBase& rBase,
@@ -673,7 +669,7 @@ void ToolBarManager::Implementation::SetValid (bool bValid)
             try
             {
                 Reference<beans::XPropertySet> xFrameProperties (xFrame, UNO_QUERY_THROW);
-                Any aValue (xFrameProperties->getPropertyValue(OUSTRING("LayoutManager")));
+                Any aValue (xFrameProperties->getPropertyValue("LayoutManager"));
                 aValue >>= mxLayouter;
             }
             catch (const RuntimeException&)
diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx
index 340881b..4a8107a 100644
--- a/sd/source/ui/view/ViewShellBase.cxx
+++ b/sd/source/ui/view/ViewShellBase.cxx
@@ -1142,14 +1142,14 @@ void ViewShellBase::SetViewTabBar (const ::rtl::Reference<ViewTabBar>& rViewTabB
     {
         Reference< XMultiServiceFactory > xServiceManager( ::comphelper::getProcessServiceFactory(), UNO_QUERY_THROW );
 
-        Reference< XModuleManager > xModuleManager( xServiceManager->createInstance( OUString( "com.sun.star.frame.ModuleManager") ), UNO_QUERY_THROW );
+        Reference< XModuleManager > xModuleManager( xServiceManager->createInstance( "com.sun.star.frame.ModuleManager" ), UNO_QUERY_THROW );
         Reference< XInterface > xIfac( xFrame, UNO_QUERY_THROW );
 
         ::rtl::OUString aModuleIdentifier( xModuleManager->identify( xIfac ) );
 
         if( !aModuleIdentifier.isEmpty() )
         {
-            Reference< XNameAccess > xNameAccess( xServiceManager->createInstance( rtl::OUString( "com.sun.star.frame.UICommandDescription" ) ), UNO_QUERY );
+            Reference< XNameAccess > xNameAccess( xServiceManager->createInstance( "com.sun.star.frame.UICommandDescription" ), UNO_QUERY );
             if( xNameAccess.is() )
             {
                 Reference< ::com::sun::star::container::XNameAccess > m_xUICommandLabels( xNameAccess->getByName( aModuleIdentifier ), UNO_QUERY_THROW );
@@ -1240,9 +1240,7 @@ void ViewShellBase::Implementation::ProcessRestoreEditingViewSlot (void)
             pHelper->RequestView(
                 pHelper->GetViewURL(pFrameView->GetViewShellTypeOnLoad()),
                 FrameworkHelper::msCenterPaneURL);
-            pHelper->RunOnConfigurationEvent(
-                ::rtl::OUString("ConfigurationUpdateEnd"),
-                CurrentPageSetter(mrBase));
+            pHelper->RunOnConfigurationEvent("ConfigurationUpdateEnd", CurrentPageSetter(mrBase));
         }
     }
 }
diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx
index 574895e..36c0aae 100644
--- a/sd/source/ui/view/drviews7.cxx
+++ b/sd/source/ui/view/drviews7.cxx
@@ -1503,8 +1503,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
                     if( xPropSet.is() )
                     {
                         uno::Reference< beans::XPropertySetInfo > xPropInfo( xPropSet->getPropertySetInfo() );
-                        if( xPropInfo.is() && xPropInfo->hasPropertyByName(
-                            rtl::OUString( "TargetURL")))
+                        if( xPropInfo.is() && xPropInfo->hasPropertyByName( "TargetURL") )
                         {
                             bDisableEditHyperlink = sal_False;
                         }
diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx
index 3d63a09..6dd99c1 100644
--- a/sd/source/ui/view/drviewsa.cxx
+++ b/sd/source/ui/view/drviewsa.cxx
@@ -83,8 +83,7 @@ using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 
 namespace {
-static const ::rtl::OUString MASTER_VIEW_TOOL_BAR_NAME(
-    ::rtl::OUString("masterviewtoolbar"));
+static const ::rtl::OUString MASTER_VIEW_TOOL_BAR_NAME("masterviewtoolbar");
 }
 
 namespace sd {
@@ -389,7 +388,7 @@ void DrawViewShell::Construct(DrawDocShell* pDocSh, PageKind eInitialPageKind)
     if( xMgr.is() )
     {
         mxScannerManager = ::com::sun::star::uno::Reference< ::com::sun::star::scanner::XScannerManager2 >(
-                           xMgr->createInstance( ::rtl::OUString("com.sun.star.scanner.ScannerManager" ) ),
+                           xMgr->createInstance( "com.sun.star.scanner.ScannerManager" ),
                            ::com::sun::star::uno::UNO_QUERY );
 
         if( mxScannerManager.is() )
diff --git a/sd/source/ui/view/drviewsb.cxx b/sd/source/ui/view/drviewsb.cxx
index a2741a4..30768af 100644
--- a/sd/source/ui/view/drviewsb.cxx
+++ b/sd/source/ui/view/drviewsb.cxx
@@ -692,7 +692,7 @@ void DrawViewShell::FuTemp02(SfxRequest& rReq)
         {
             try
             {
-                com::sun::star::uno::Reference < ::com::sun::star::ui::dialogs::XExecutableDialog > xDialog(::comphelper::getProcessServiceFactory()->createInstance(rtl::OUString("com.sun.star.comp.ui.XSLTFilterDialog")), com::sun::star::uno::UNO_QUERY);
+                com::sun::star::uno::Reference < ::com::sun::star::ui::dialogs::XExecutableDialog > xDialog(::comphelper::getProcessServiceFactory()->createInstance("com.sun.star.comp.ui.XSLTFilterDialog"), com::sun::star::uno::UNO_QUERY);
                 if( xDialog.is() )
                 {
                     xDialog->execute();
diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx
index 749d3c7..6cb95c8 100644
--- a/sd/source/ui/view/drviewse.cxx
+++ b/sd/source/ui/view/drviewse.cxx
@@ -1593,16 +1593,16 @@ void DrawViewShell::InsertURLButton(const String& rURL, const String& rText,
                 Reference< awt::XControlModel > xControlModel( pUnoCtrl->GetUnoControlModel(), UNO_QUERY_THROW );
                 Reference< beans::XPropertySet > xPropSet( xControlModel, UNO_QUERY_THROW );
 
-                xPropSet->setPropertyValue( OUString( "Label" ), Any( OUString( rText ) ) );
-                xPropSet->setPropertyValue( OUString( "TargetURL" ), Any( sTargetURL ) );
+                xPropSet->setPropertyValue("Label" , Any( OUString( rText ) ) );
+                xPropSet->setPropertyValue("TargetURL" , Any( sTargetURL ) );
 
                 if( rTarget.Len() )
-                    xPropSet->setPropertyValue( OUString( "TargetFrame" ), Any( OUString( rTarget ) ) );
+                    xPropSet->setPropertyValue("TargetFrame" , Any( OUString( rTarget ) ) );
 
-                xPropSet->setPropertyValue( OUString( "ButtonType" ), Any( form::FormButtonType_URL ) );
+                xPropSet->setPropertyValue( "ButtonType" , Any( form::FormButtonType_URL ) );
                 if ( ::avmedia::MediaWindow::isMediaURL( rURL ) )
                 {
-                    xPropSet->setPropertyValue( OUString( "DispatchURLInternal" ), Any( sal_True ) );
+                    xPropSet->setPropertyValue( "DispatchURLInternal" , Any( sal_True ) );
                 }
             }
             else
@@ -1628,15 +1628,15 @@ void DrawViewShell::InsertURLButton(const String& rURL, const String& rText,
         Reference< awt::XControlModel > xControlModel( pUnoCtrl->GetUnoControlModel(), uno::UNO_QUERY_THROW );
         Reference< beans::XPropertySet > xPropSet( xControlModel, uno::UNO_QUERY_THROW );
 
-        xPropSet->setPropertyValue( OUString( "Label" ), Any( OUString( rText ) ) );
-        xPropSet->setPropertyValue( OUString( "TargetURL" ), Any( sTargetURL ) );
+        xPropSet->setPropertyValue( "Label" , Any( OUString( rText ) ) );
+        xPropSet->setPropertyValue( "TargetURL" , Any( sTargetURL ) );
 
         if( rTarget.Len() )
-            xPropSet->setPropertyValue( OUString( "TargetFrame" ), Any( OUString( rTarget ) ) );
+            xPropSet->setPropertyValue( "TargetFrame" , Any( OUString( rTarget ) ) );
 
-        xPropSet->setPropertyValue( OUString( "ButtonType" ), Any(  form::FormButtonType_URL ) );
+        xPropSet->setPropertyValue( "ButtonType" , Any(  form::FormButtonType_URL ) );
         if ( ::avmedia::MediaWindow::isMediaURL( rURL ) )
-            xPropSet->setPropertyValue( OUString( "DispatchURLInternal" ), Any( sal_True ) );
+            xPropSet->setPropertyValue( "DispatchURLInternal" , Any( sal_True ) );
 
         Point aPos;
 


More information about the Libreoffice-commits mailing list