From b98352996c24a3b21c52c32d62d0a7fdbc8e4246 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 18 Dec 2014 13:19:13 +0100 Subject: framework: Use appropriate OUString functions on string constants Change-Id: I5da5cd3254102c742021b3e7b4e1f907ca897ca5 --- .../accelerators/acceleratorconfiguration.cxx | 2 +- .../documentacceleratorconfiguration.cxx | 2 +- .../globalacceleratorconfiguration.cxx | 2 +- .../moduleacceleratorconfiguration.cxx | 2 +- framework/source/accelerators/presethandler.cxx | 4 +- framework/source/classes/taskcreator.cxx | 10 +- framework/source/dispatch/closedispatcher.cxx | 4 +- .../source/fwe/classes/actiontriggercontainer.cxx | 8 +- .../fwe/classes/actiontriggerpropertyset.cxx | 2 +- .../classes/actiontriggerseparatorpropertyset.cxx | 2 +- framework/source/fwe/classes/addonmenu.cxx | 12 +- framework/source/fwe/classes/addonsoptions.cxx | 126 +++++++-------------- framework/source/fwe/classes/framelistanalyzer.cxx | 4 +- .../fwe/classes/rootactiontriggercontainer.cxx | 8 +- framework/source/fwe/xml/menudocumenthandler.cxx | 4 +- .../source/fwe/xml/statusbardocumenthandler.cxx | 36 +++--- .../source/fwe/xml/toolboxdocumenthandler.cxx | 20 ++-- .../source/fwi/classes/protocolhandlercache.cxx | 2 + framework/source/jobs/jobdata.cxx | 8 +- framework/source/jobs/jobdispatch.cxx | 2 +- framework/source/jobs/jobexecutor.cxx | 2 +- framework/source/loadenv/loadenv.cxx | 4 +- framework/source/loadenv/targethelper.cxx | 16 +-- framework/source/recording/dispatchrecorder.cxx | 8 +- framework/source/services/autorecovery.cxx | 18 +-- framework/source/services/desktop.cxx | 2 +- framework/source/services/frame.cxx | 2 +- framework/source/services/pathsettings.cxx | 2 +- framework/source/services/sessionlistener.cxx | 2 +- framework/source/services/substitutepathvars.cxx | 4 +- framework/source/services/tabwindowservice.cxx | 2 +- framework/source/services/taskcreatorsrv.cxx | 2 +- .../source/uiconfiguration/moduleuicfgsupplier.cxx | 2 +- .../moduleuiconfigurationmanager.cxx | 2 +- .../uiconfiguration/uicategorydescription.cxx | 2 +- .../uiconfiguration/uiconfigurationmanager.cxx | 2 +- .../uiconfiguration/windowstateconfiguration.cxx | 2 +- .../source/uielement/controlmenucontroller.cxx | 2 +- .../uielement/langselectionstatusbarcontroller.cxx | 2 +- .../source/uielement/objectmenucontroller.cxx | 2 +- .../source/uielement/recentfilesmenucontroller.cxx | 2 +- framework/source/uielement/toolbarmanager.cxx | 3 +- .../source/uifactory/addonstoolbarfactory.cxx | 2 +- framework/source/uifactory/statusbarfactory.cxx | 2 +- framework/source/uifactory/toolbarfactory.cxx | 2 +- framework/source/uifactory/uicontrollerfactory.cxx | 6 +- .../source/uifactory/uielementfactorymanager.cxx | 2 +- .../uifactory/windowcontentfactorymanager.cxx | 2 +- .../source/xml/acceleratorconfigurationreader.cxx | 16 +-- framework/source/xml/imagesdocumenthandler.cxx | 32 +++--- 50 files changed, 184 insertions(+), 225 deletions(-) (limited to 'framework/source') diff --git a/framework/source/accelerators/acceleratorconfiguration.cxx b/framework/source/accelerators/acceleratorconfiguration.cxx index a36cec094c7e..1643bf1e7e7d 100644 --- a/framework/source/accelerators/acceleratorconfiguration.cxx +++ b/framework/source/accelerators/acceleratorconfiguration.cxx @@ -1353,7 +1353,7 @@ void XCUBasedAcceleratorConfiguration::reloadChanged( const OUString& sPrimarySe sal_Int32 nIndex = 0; sKeyIdentifier = sKey.getToken(0, '_', nIndex); - aKeyEvent.KeyCode = m_rKeyMapping->mapIdentifierToCode(OUString("KEY_")+sKeyIdentifier); + aKeyEvent.KeyCode = m_rKeyMapping->mapIdentifierToCode("KEY_"+sKeyIdentifier); css::uno::Sequence< OUString > sToken(3); const sal_Int32 nToken = 3; diff --git a/framework/source/accelerators/documentacceleratorconfiguration.cxx b/framework/source/accelerators/documentacceleratorconfiguration.cxx index e99c20baa4ef..19884ddb1ee7 100644 --- a/framework/source/accelerators/documentacceleratorconfiguration.cxx +++ b/framework/source/accelerators/documentacceleratorconfiguration.cxx @@ -89,7 +89,7 @@ public: throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { css::uno::Sequence< OUString > aSeq(1); - aSeq[0] = OUString("com.sun.star.ui.DocumentAcceleratorConfiguration"); + aSeq[0] = "com.sun.star.ui.DocumentAcceleratorConfiguration"; return aSeq; } diff --git a/framework/source/accelerators/globalacceleratorconfiguration.cxx b/framework/source/accelerators/globalacceleratorconfiguration.cxx index cdf60571d132..a20b20a4f511 100644 --- a/framework/source/accelerators/globalacceleratorconfiguration.cxx +++ b/framework/source/accelerators/globalacceleratorconfiguration.cxx @@ -72,7 +72,7 @@ public: throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { css::uno::Sequence< OUString > aSeq(1); - aSeq[0] = OUString("com.sun.star.ui.GlobalAcceleratorConfiguration"); + aSeq[0] = "com.sun.star.ui.GlobalAcceleratorConfiguration"; return aSeq; } diff --git a/framework/source/accelerators/moduleacceleratorconfiguration.cxx b/framework/source/accelerators/moduleacceleratorconfiguration.cxx index 882070991e51..9a37b9b5f33e 100644 --- a/framework/source/accelerators/moduleacceleratorconfiguration.cxx +++ b/framework/source/accelerators/moduleacceleratorconfiguration.cxx @@ -88,7 +88,7 @@ public: throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { css::uno::Sequence< OUString > aSeq(1); - aSeq[0] = OUString("com.sun.star.ui.ModuleAcceleratorConfiguration"); + aSeq[0] = "com.sun.star.ui.ModuleAcceleratorConfiguration"; return aSeq; } diff --git a/framework/source/accelerators/presethandler.cxx b/framework/source/accelerators/presethandler.cxx index feed98870065..e5ec774c75af 100644 --- a/framework/source/accelerators/presethandler.cxx +++ b/framework/source/accelerators/presethandler.cxx @@ -148,9 +148,7 @@ void lcl_throwCorruptedUIConfigurationException( throw css::configuration::CorruptedUIConfigurationException( lcl_getLocalizedMessage(id), css::uno::Reference< css::uno::XInterface >(), - (exception.getValueTypeName() + - OUString(": \"") + e.Message + - OUString("\""))); + exception.getValueTypeName() + ": \"" + e.Message + "\""); } } diff --git a/framework/source/classes/taskcreator.cxx b/framework/source/classes/taskcreator.cxx index b474366e650e..62d75a72d2f2 100644 --- a/framework/source/classes/taskcreator.cxx +++ b/framework/source/classes/taskcreator.cxx @@ -91,23 +91,23 @@ css::uno::Reference< css::frame::XFrame > TaskCreator::createTask( const OUStrin css::uno::Sequence< css::uno::Any > lArgs(5); css::beans::NamedValue aArg; - aArg.Name = OUString(ARGUMENT_PARENTFRAME); + aArg.Name = ARGUMENT_PARENTFRAME; aArg.Value <<= css::uno::Reference< css::frame::XFrame >( css::frame::Desktop::create( m_xContext ), css::uno::UNO_QUERY_THROW); lArgs[0] <<= aArg; - aArg.Name = OUString(ARGUMENT_CREATETOPWINDOW); + aArg.Name = ARGUMENT_CREATETOPWINDOW; aArg.Value <<= sal_True; lArgs[1] <<= aArg; - aArg.Name = OUString(ARGUMENT_MAKEVISIBLE); + aArg.Name = ARGUMENT_MAKEVISIBLE; aArg.Value <<= bVisible; lArgs[2] <<= aArg; - aArg.Name = OUString(ARGUMENT_SUPPORTPERSISTENTWINDOWSTATE); + aArg.Name = ARGUMENT_SUPPORTPERSISTENTWINDOWSTATE; aArg.Value <<= sal_True; lArgs[3] <<= aArg; - aArg.Name = OUString(ARGUMENT_FRAMENAME); + aArg.Name = ARGUMENT_FRAMENAME; aArg.Value <<= sName; lArgs[4] <<= aArg; diff --git a/framework/source/dispatch/closedispatcher.cxx b/framework/source/dispatch/closedispatcher.cxx index 86e42f1182f5..fd32da6a671f 100644 --- a/framework/source/dispatch/closedispatcher.cxx +++ b/framework/source/dispatch/closedispatcher.cxx @@ -107,14 +107,14 @@ css::uno::Sequence< css::frame::DispatchInformation > SAL_CALL CloseDispatcher:: a configurable feature ... and further it does not have a valid UIName entry inside the GenericCommands.xcu ... */ css::uno::Sequence< css::frame::DispatchInformation > lViewInfos(1); - lViewInfos[0].Command = OUString(URL_CLOSEWIN); + lViewInfos[0].Command = URL_CLOSEWIN; lViewInfos[0].GroupId = css::frame::CommandGroup::VIEW; return lViewInfos; } else if (nCommandGroup == css::frame::CommandGroup::DOCUMENT) { css::uno::Sequence< css::frame::DispatchInformation > lDocInfos(1); - lDocInfos[0].Command = OUString(URL_CLOSEDOC); + lDocInfos[0].Command = URL_CLOSEDOC; lDocInfos[0].GroupId = css::frame::CommandGroup::DOCUMENT; return lDocInfos; } diff --git a/framework/source/fwe/classes/actiontriggercontainer.cxx b/framework/source/fwe/classes/actiontriggercontainer.cxx index 1ba4a54f1099..187bf24ab620 100644 --- a/framework/source/fwe/classes/actiontriggercontainer.cxx +++ b/framework/source/fwe/classes/actiontriggercontainer.cxx @@ -94,9 +94,9 @@ throw ( RuntimeException, std::exception ) { Sequence< OUString > aSeq( 3 ); - aSeq[0] = OUString( SERVICENAME_ACTIONTRIGGER ); - aSeq[1] = OUString( SERVICENAME_ACTIONTRIGGERCONTAINER ); - aSeq[2] = OUString( SERVICENAME_ACTIONTRIGGERSEPARATOR ); + aSeq[0] = SERVICENAME_ACTIONTRIGGER; + aSeq[1] = SERVICENAME_ACTIONTRIGGERCONTAINER; + aSeq[2] = SERVICENAME_ACTIONTRIGGERSEPARATOR; return aSeq; } @@ -119,7 +119,7 @@ throw ( RuntimeException, std::exception ) { Sequence< OUString > seqServiceNames( 1 ); - seqServiceNames[0] = OUString( SERVICENAME_ACTIONTRIGGERCONTAINER ); + seqServiceNames[0] = SERVICENAME_ACTIONTRIGGERCONTAINER; return seqServiceNames; } diff --git a/framework/source/fwe/classes/actiontriggerpropertyset.cxx b/framework/source/fwe/classes/actiontriggerpropertyset.cxx index 6cafe9375028..ae27ab137b95 100644 --- a/framework/source/fwe/classes/actiontriggerpropertyset.cxx +++ b/framework/source/fwe/classes/actiontriggerpropertyset.cxx @@ -113,7 +113,7 @@ Sequence< OUString > SAL_CALL ActionTriggerPropertySet::getSupportedServiceNames throw ( RuntimeException, std::exception ) { Sequence< OUString > seqServiceNames( 1 ); - seqServiceNames[0] = OUString( SERVICENAME_ACTIONTRIGGER ); + seqServiceNames[0] = SERVICENAME_ACTIONTRIGGER; return seqServiceNames; } diff --git a/framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx b/framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx index e9198e54272c..ae3726cd2402 100644 --- a/framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx +++ b/framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx @@ -106,7 +106,7 @@ Sequence< OUString > SAL_CALL ActionTriggerSeparatorPropertySet::getSupportedSer throw ( RuntimeException, std::exception ) { Sequence< OUString > seqServiceNames( 1 ); - seqServiceNames[0] = OUString( SERVICENAME_ACTIONTRIGGERSEPARATOR ); + seqServiceNames[0] = SERVICENAME_ACTIONTRIGGERSEPARATOR; return seqServiceNames; } diff --git a/framework/source/fwe/classes/addonmenu.cxx b/framework/source/fwe/classes/addonmenu.cxx index 4638d0aa444e..460104a9d119 100644 --- a/framework/source/fwe/classes/addonmenu.cxx +++ b/framework/source/fwe/classes/addonmenu.cxx @@ -357,17 +357,17 @@ void AddonMenuManager::GetMenuEntry( const Sequence< PropertyValue >& rAddonMenu for ( int i = 0; i < rAddonMenuEntry.getLength(); i++ ) { OUString aMenuEntryPropName = rAddonMenuEntry[i].Name; - if ( aMenuEntryPropName == ADDONSMENUITEM_PROPERTYNAME_URL ) + if ( aMenuEntryPropName == ADDONSMENUITEM_STRING_URL ) rAddonMenuEntry[i].Value >>= rURL; - else if ( aMenuEntryPropName == ADDONSMENUITEM_PROPERTYNAME_TITLE ) + else if ( aMenuEntryPropName == ADDONSMENUITEM_STRING_TITLE ) rAddonMenuEntry[i].Value >>= rTitle; - else if ( aMenuEntryPropName == ADDONSMENUITEM_PROPERTYNAME_TARGET ) + else if ( aMenuEntryPropName == ADDONSMENUITEM_STRING_TARGET ) rAddonMenuEntry[i].Value >>= rTarget; - else if ( aMenuEntryPropName == ADDONSMENUITEM_PROPERTYNAME_IMAGEIDENTIFIER ) + else if ( aMenuEntryPropName == ADDONSMENUITEM_STRING_IMAGEIDENTIFIER ) rAddonMenuEntry[i].Value >>= rImageId; - else if ( aMenuEntryPropName == ADDONSMENUITEM_PROPERTYNAME_SUBMENU ) + else if ( aMenuEntryPropName == ADDONSMENUITEM_STRING_SUBMENU ) rAddonMenuEntry[i].Value >>= rAddonSubMenu; - else if ( aMenuEntryPropName == ADDONSMENUITEM_PROPERTYNAME_CONTEXT ) + else if ( aMenuEntryPropName == ADDONSMENUITEM_STRING_CONTEXT ) rAddonMenuEntry[i].Value >>= rContext; } } diff --git a/framework/source/fwe/classes/addonsoptions.cxx b/framework/source/fwe/classes/addonsoptions.cxx index a3e57c7f7608..0fd7091a6d87 100644 --- a/framework/source/fwe/classes/addonsoptions.cxx +++ b/framework/source/fwe/classes/addonsoptions.cxx @@ -48,54 +48,16 @@ using namespace ::com::sun::star; #define ROOTNODE_ADDONMENU OUString("Office.Addons" ) #define PATHDELIMITER OUString("/" ) -#define SEPARATOR_URL_STR "private:separator" -#define SEPARATOR_URL OUString( SEPARATOR_URL_STR ) - -#define PROPERTYNAME_URL ADDONSMENUITEM_PROPERTYNAME_URL -#define PROPERTYNAME_TITLE ADDONSMENUITEM_PROPERTYNAME_TITLE -#define PROPERTYNAME_TARGET ADDONSMENUITEM_PROPERTYNAME_TARGET -#define PROPERTYNAME_IMAGEIDENTIFIER ADDONSMENUITEM_PROPERTYNAME_IMAGEIDENTIFIER -#define PROPERTYNAME_CONTEXT ADDONSMENUITEM_PROPERTYNAME_CONTEXT -#define PROPERTYNAME_SUBMENU ADDONSMENUITEM_PROPERTYNAME_SUBMENU -#define PROPERTYNAME_CONTROLTYPE ADDONSMENUITEM_PROPERTYNAME_CONTROLTYPE -#define PROPERTYNAME_WIDTH ADDONSMENUITEM_PROPERTYNAME_WIDTH - -#define PROPERTYNAME_ALIGN STATUSBARITEM_PROPERTYNAME_ALIGN -#define PROPERTYNAME_AUTOSIZE STATUSBARITEM_PROPERTYNAME_AUTOSIZE -#define PROPERTYNAME_OWNERDRAW STATUSBARITEM_PROPERTYNAME_OWNERDRAW - -#define PROPERTYNAME_IMAGESMALL OUString("ImageSmall" ) -#define PROPERTYNAME_IMAGEBIG OUString("ImageBig" ) -#define PROPERTYNAME_IMAGESMALLHC OUString("ImageSmallHC" ) -#define PROPERTYNAME_IMAGEBIGHC OUString("ImageBigHC" ) -#define PROPERTYNAME_IMAGESMALL_URL OUString("ImageSmallURL" ) -#define PROPERTYNAME_IMAGEBIG_URL OUString("ImageBigURL" ) -#define PROPERTYNAME_IMAGESMALLHC_URL OUString("ImageSmallHCURL" ) -#define PROPERTYNAME_IMAGEBIGHC_URL OUString("ImageBigHCURL" ) +#define SEPARATOR_URL "private:separator" -#define IMAGES_NODENAME OUString("UserDefinedImages" ) +#define PROPERTYNAME_URL ADDONSMENUITEM_STRING_URL +#define PROPERTYNAME_TITLE ADDONSMENUITEM_STRING_TITLE +#define PROPERTYNAME_TARGET ADDONSMENUITEM_STRING_TARGET +#define PROPERTYNAME_IMAGEIDENTIFIER ADDONSMENUITEM_STRING_IMAGEIDENTIFIER +#define PROPERTYNAME_CONTEXT ADDONSMENUITEM_STRING_CONTEXT +#define PROPERTYNAME_SUBMENU ADDONSMENUITEM_STRING_SUBMENU -#define PROPERTYNAME_MERGEMENU_MERGEPOINT OUString("MergePoint" ) -#define PROPERTYNAME_MERGEMENU_MERGECOMMAND OUString("MergeCommand" ) -#define PROPERTYNAME_MERGEMENU_MERGECOMMANDPARAMETER OUString("MergeCommandParameter" ) -#define PROPERTYNAME_MERGEMENU_MERGEFALLBACK OUString("MergeFallback" ) -#define PROPERTYNAME_MERGEMENU_MERGECONTEXT OUString("MergeContext" ) -#define PROPERTYNAME_MERGEMENU_MENUITEMS OUString("MenuItems" ) - -#define PROPERTYNAME_MERGETOOLBAR_TOOLBAR OUString("MergeToolBar" ) -#define PROPERTYNAME_MERGETOOLBAR_MERGEPOINT OUString("MergePoint" ) -#define PROPERTYNAME_MERGETOOLBAR_MERGECOMMAND OUString("MergeCommand" ) -#define PROPERTYNAME_MERGETOOLBAR_MERGECOMMANDPARAMETER OUString("MergeCommandParameter" ) -#define PROPERTYNAME_MERGETOOLBAR_MERGEFALLBACK OUString("MergeFallback" ) -#define PROPERTYNAME_MERGETOOLBAR_MERGECONTEXT OUString("MergeContext" ) -#define PROPERTYNAME_MERGETOOLBAR_TOOLBARITEMS OUString("ToolBarItems" ) - -#define PROPERTYNAME_MERGESTATUSBAR_MERGEPOINT OUString("MergePoint") -#define PROPERTYNAME_MERGESTATUSBAR_MERGECOMMAND OUString("MergeCommand") -#define PROPERTYNAME_MERGESTATUSBAR_MERGECOMMANDPARAMETER OUString("MergeCommandParameter") -#define PROPERTYNAME_MERGESTATUSBAR_MERGEFALLBACK OUString("MergeFallback") -#define PROPERTYNAME_MERGESTATUSBAR_MERGECONTEXT OUString("MergeContext") -#define PROPERTYNAME_MERGESTATUSBAR_STATUSBARITEMS OUString("StatusBarItems") +#define IMAGES_NODENAME OUString("UserDefinedImages" ) // The following order is mandatory. Please add properties at the end! #define INDEX_URL 0 @@ -367,44 +329,44 @@ AddonsOptions_Impl::AddonsOptions_Impl() m_aPropNames[ INDEX_IMAGEIDENTIFIER ] = PROPERTYNAME_IMAGEIDENTIFIER; m_aPropNames[ INDEX_CONTEXT ] = PROPERTYNAME_CONTEXT; m_aPropNames[ INDEX_SUBMENU ] = PROPERTYNAME_SUBMENU; // Submenu set! - m_aPropNames[ INDEX_CONTROLTYPE ] = PROPERTYNAME_CONTROLTYPE; - m_aPropNames[ INDEX_WIDTH ] = PROPERTYNAME_WIDTH; - m_aPropNames[ INDEX_ALIGN ] = PROPERTYNAME_ALIGN; - m_aPropNames[ INDEX_AUTOSIZE ] = PROPERTYNAME_AUTOSIZE; - m_aPropNames[ INDEX_OWNERDRAW ] = PROPERTYNAME_OWNERDRAW; + m_aPropNames[ INDEX_CONTROLTYPE ] = "ControlType"; + m_aPropNames[ INDEX_WIDTH ] = "Width"; + m_aPropNames[ INDEX_ALIGN ] = "Alignment"; + m_aPropNames[ INDEX_AUTOSIZE ] = "AutoSize"; + m_aPropNames[ INDEX_OWNERDRAW ] = "OwnerDraw"; // initialize array with fixed images property names - m_aPropImagesNames[ OFFSET_IMAGES_SMALL ] = PROPERTYNAME_IMAGESMALL; - m_aPropImagesNames[ OFFSET_IMAGES_BIG ] = PROPERTYNAME_IMAGEBIG; - m_aPropImagesNames[ OFFSET_IMAGES_SMALLHC ] = PROPERTYNAME_IMAGESMALLHC; - m_aPropImagesNames[ OFFSET_IMAGES_BIGHC ] = PROPERTYNAME_IMAGEBIGHC; - m_aPropImagesNames[ OFFSET_IMAGES_SMALL_URL ] = PROPERTYNAME_IMAGESMALL_URL; - m_aPropImagesNames[ OFFSET_IMAGES_BIG_URL ] = PROPERTYNAME_IMAGEBIG_URL; - m_aPropImagesNames[ OFFSET_IMAGES_SMALLHC_URL ] = PROPERTYNAME_IMAGESMALLHC_URL; - m_aPropImagesNames[ OFFSET_IMAGES_BIGHC_URL ] = PROPERTYNAME_IMAGEBIGHC_URL; + m_aPropImagesNames[ OFFSET_IMAGES_SMALL ] = "ImageSmall"; + m_aPropImagesNames[ OFFSET_IMAGES_BIG ] = "ImageBig"; + m_aPropImagesNames[ OFFSET_IMAGES_SMALLHC ] = "ImageSmallHC"; + m_aPropImagesNames[ OFFSET_IMAGES_BIGHC ] = "ImageBigHC"; + m_aPropImagesNames[ OFFSET_IMAGES_SMALL_URL ] = "ImageSmallURL"; + m_aPropImagesNames[ OFFSET_IMAGES_BIG_URL ] = "ImageBigURL"; + m_aPropImagesNames[ OFFSET_IMAGES_SMALLHC_URL ] = "ImageSmallHCURL"; + m_aPropImagesNames[ OFFSET_IMAGES_BIGHC_URL ] = "ImageBigHCURL"; // initialize array with fixed merge menu property names - m_aPropMergeMenuNames[ OFFSET_MERGEMENU_MERGEPOINT ] = PROPERTYNAME_MERGEMENU_MERGEPOINT; - m_aPropMergeMenuNames[ OFFSET_MERGEMENU_MERGECOMMAND ] = PROPERTYNAME_MERGEMENU_MERGECOMMAND; - m_aPropMergeMenuNames[ OFFSET_MERGEMENU_MERGECOMMANDPARAMETER ] = PROPERTYNAME_MERGEMENU_MERGECOMMANDPARAMETER; - m_aPropMergeMenuNames[ OFFSET_MERGEMENU_MERGEFALLBACK ] = PROPERTYNAME_MERGEMENU_MERGEFALLBACK; - m_aPropMergeMenuNames[ OFFSET_MERGEMENU_MERGECONTEXT ] = PROPERTYNAME_MERGEMENU_MERGECONTEXT; - m_aPropMergeMenuNames[ OFFSET_MERGEMENU_MENUITEMS ] = PROPERTYNAME_MERGEMENU_MENUITEMS; - - m_aPropMergeToolbarNames[ OFFSET_MERGETOOLBAR_TOOLBAR ] = PROPERTYNAME_MERGETOOLBAR_TOOLBAR; - m_aPropMergeToolbarNames[ OFFSET_MERGETOOLBAR_MERGEPOINT ] = PROPERTYNAME_MERGETOOLBAR_MERGEPOINT; - m_aPropMergeToolbarNames[ OFFSET_MERGETOOLBAR_MERGECOMMAND ] = PROPERTYNAME_MERGETOOLBAR_MERGECOMMAND; - m_aPropMergeToolbarNames[ OFFSET_MERGETOOLBAR_MERGECOMMANDPARAMETER ] = PROPERTYNAME_MERGETOOLBAR_MERGECOMMANDPARAMETER; - m_aPropMergeToolbarNames[ OFFSET_MERGETOOLBAR_MERGEFALLBACK ] = PROPERTYNAME_MERGETOOLBAR_MERGEFALLBACK; - m_aPropMergeToolbarNames[ OFFSET_MERGETOOLBAR_MERGECONTEXT ] = PROPERTYNAME_MERGETOOLBAR_MERGECONTEXT; - m_aPropMergeToolbarNames[ OFFSET_MERGETOOLBAR_TOOLBARITEMS ] = PROPERTYNAME_MERGETOOLBAR_TOOLBARITEMS; - - m_aPropMergeStatusbarNames[ OFFSET_MERGESTATUSBAR_MERGEPOINT ] = PROPERTYNAME_MERGESTATUSBAR_MERGEPOINT; - m_aPropMergeStatusbarNames[ OFFSET_MERGESTATUSBAR_MERGECOMMAND ] = PROPERTYNAME_MERGESTATUSBAR_MERGECOMMAND; - m_aPropMergeStatusbarNames[ OFFSET_MERGESTATUSBAR_MERGECOMMANDPARAMETER ] = PROPERTYNAME_MERGESTATUSBAR_MERGECOMMANDPARAMETER; - m_aPropMergeStatusbarNames[ OFFSET_MERGESTATUSBAR_MERGEFALLBACK ] = PROPERTYNAME_MERGESTATUSBAR_MERGEFALLBACK; - m_aPropMergeStatusbarNames[ OFFSET_MERGESTATUSBAR_MERGECONTEXT ] = PROPERTYNAME_MERGESTATUSBAR_MERGECONTEXT; - m_aPropMergeStatusbarNames[ OFFSET_MERGESTATUSBAR_STATUSBARITEMS ] = PROPERTYNAME_MERGESTATUSBAR_STATUSBARITEMS; + m_aPropMergeMenuNames[ OFFSET_MERGEMENU_MERGEPOINT ] = "MergePoint"; + m_aPropMergeMenuNames[ OFFSET_MERGEMENU_MERGECOMMAND ] = "MergeCommand"; + m_aPropMergeMenuNames[ OFFSET_MERGEMENU_MERGECOMMANDPARAMETER ] = "MergeCommandParameter"; + m_aPropMergeMenuNames[ OFFSET_MERGEMENU_MERGEFALLBACK ] = "MergeFallback"; + m_aPropMergeMenuNames[ OFFSET_MERGEMENU_MERGECONTEXT ] = "MergeContext"; + m_aPropMergeMenuNames[ OFFSET_MERGEMENU_MENUITEMS ] = "MenuItems"; + + m_aPropMergeToolbarNames[ OFFSET_MERGETOOLBAR_TOOLBAR ] = "MergeToolBar"; + m_aPropMergeToolbarNames[ OFFSET_MERGETOOLBAR_MERGEPOINT ] = "MergePoint"; + m_aPropMergeToolbarNames[ OFFSET_MERGETOOLBAR_MERGECOMMAND ] = "MergeCommand"; + m_aPropMergeToolbarNames[ OFFSET_MERGETOOLBAR_MERGECOMMANDPARAMETER ] = "MergeCommandParameter"; + m_aPropMergeToolbarNames[ OFFSET_MERGETOOLBAR_MERGEFALLBACK ] = "MergeFallback"; + m_aPropMergeToolbarNames[ OFFSET_MERGETOOLBAR_MERGECONTEXT ] = "MergeContext"; + m_aPropMergeToolbarNames[ OFFSET_MERGETOOLBAR_TOOLBARITEMS ] = "ToolBarItems"; + + m_aPropMergeStatusbarNames[ OFFSET_MERGESTATUSBAR_MERGEPOINT ] = "MergePoint"; + m_aPropMergeStatusbarNames[ OFFSET_MERGESTATUSBAR_MERGECOMMAND ] = "MergeCommand"; + m_aPropMergeStatusbarNames[ OFFSET_MERGESTATUSBAR_MERGECOMMANDPARAMETER ] = "MergeCommandParameter"; + m_aPropMergeStatusbarNames[ OFFSET_MERGESTATUSBAR_MERGEFALLBACK ] = "MergeFallback"; + m_aPropMergeStatusbarNames[ OFFSET_MERGESTATUSBAR_MERGECONTEXT ] = "MergeContext"; + m_aPropMergeStatusbarNames[ OFFSET_MERGESTATUSBAR_STATUSBARITEMS ] = "StatusBarItems"; ReadConfigurationData(); @@ -1171,7 +1133,7 @@ bool AddonsOptions_Impl::ReadMenuItem( const OUString& aMenuNodeName, Sequence< } } else if (( aMenuItemNodePropValues[ OFFSET_MENUITEM_URL ] >>= aStrValue ) && - aStrValue == SEPARATOR_URL_STR ) + aStrValue == SEPARATOR_URL ) { // Separator aMenuItem[ OFFSET_MENUITEM_URL ].Value <<= aStrValue; @@ -1254,7 +1216,7 @@ bool AddonsOptions_Impl::ReadToolBarItem( const OUString& aToolBarItemNodeName, // A toolbar item must have a command URL if (( aToolBarItemNodePropValues[ OFFSET_TOOLBARITEM_URL ] >>= aURL ) && !aURL.isEmpty() ) { - if ( aURL.equals( SEPARATOR_URL )) + if ( aURL == SEPARATOR_URL ) { // A speparator toolbar item only needs a URL aToolBarItem[ OFFSET_TOOLBARITEM_URL ].Value <<= aURL; diff --git a/framework/source/fwe/classes/framelistanalyzer.cxx b/framework/source/fwe/classes/framelistanalyzer.cxx index 8af75759f96c..00599b82b258 100644 --- a/framework/source/fwe/classes/framelistanalyzer.cxx +++ b/framework/source/fwe/classes/framelistanalyzer.cxx @@ -124,7 +124,7 @@ void FrameListAnalyzer::impl_analyze() css::uno::Reference< css::uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext(); css::uno::Reference< css::frame::XModuleManager2 > xModuleMgr = css::frame::ModuleManager::create(xContext); OUString sModule = xModuleMgr->identify(m_xReferenceFrame); - m_bReferenceIsBacking = sModule.equals("com.sun.star.frame.StartModule"); + m_bReferenceIsBacking = sModule == "com.sun.star.frame.StartModule"; } catch(const css::frame::UnknownModuleException&) { @@ -195,7 +195,7 @@ void FrameListAnalyzer::impl_analyze() css::uno::Reference< css::uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext(); css::uno::Reference< css::frame::XModuleManager2 > xModuleMgr = css::frame::ModuleManager::create(xContext); OUString sModule = xModuleMgr->identify(xFrame); - if (sModule.equals("com.sun.star.frame.StartModule")) + if (sModule == "com.sun.star.frame.StartModule") { m_xBackingComponent = xFrame; continue; diff --git a/framework/source/fwe/classes/rootactiontriggercontainer.cxx b/framework/source/fwe/classes/rootactiontriggercontainer.cxx index 152699c81f22..65889207f885 100644 --- a/framework/source/fwe/classes/rootactiontriggercontainer.cxx +++ b/framework/source/fwe/classes/rootactiontriggercontainer.cxx @@ -113,9 +113,9 @@ throw ( RuntimeException, std::exception ) { Sequence< OUString > aSeq( 3 ); - aSeq[0] = OUString( SERVICENAME_ACTIONTRIGGER ); - aSeq[1] = OUString( SERVICENAME_ACTIONTRIGGERCONTAINER ); - aSeq[2] = OUString( SERVICENAME_ACTIONTRIGGERSEPARATOR ); + aSeq[0] = SERVICENAME_ACTIONTRIGGER; + aSeq[1] = SERVICENAME_ACTIONTRIGGERCONTAINER; + aSeq[2] = SERVICENAME_ACTIONTRIGGERSEPARATOR; return aSeq; } @@ -231,7 +231,7 @@ throw ( RuntimeException, std::exception ) { Sequence< OUString > seqServiceNames( 1 ); - seqServiceNames[0] = OUString( SERVICENAME_ACTIONTRIGGERCONTAINER ); + seqServiceNames[0] = SERVICENAME_ACTIONTRIGGERCONTAINER; return seqServiceNames; } diff --git a/framework/source/fwe/xml/menudocumenthandler.cxx b/framework/source/fwe/xml/menudocumenthandler.cxx index 58e03897d26c..8d6e3d3cbd7a 100644 --- a/framework/source/fwe/xml/menudocumenthandler.cxx +++ b/framework/source/fwe/xml/menudocumenthandler.cxx @@ -658,7 +658,7 @@ throw( SAXException, RuntimeException, std::exception ) else if ( rName == ELEMENT_MENUSEPARATOR ) { Sequence< PropertyValue > aMenuSeparator( 1 ); - aMenuSeparator[0].Name = OUString( ITEM_DESCRIPTOR_TYPE ); + aMenuSeparator[0].Name = ITEM_DESCRIPTOR_TYPE; aMenuSeparator[0].Value <<= ::com::sun::star::ui::ItemType::SEPARATOR_LINE; m_xMenuContainer->insertByIndex( m_xMenuContainer->getCount(), makeAny( aMenuSeparator ) ); @@ -734,7 +734,7 @@ OWriteMenuDocumentHandler::OWriteMenuDocumentHandler( { ::comphelper::AttributeList* pList = new ::comphelper::AttributeList; m_xEmptyList = Reference< XAttributeList >( (XAttributeList *) pList, UNO_QUERY ); - m_aAttributeType = OUString( ATTRIBUTE_TYPE_CDATA ); + m_aAttributeType = ATTRIBUTE_TYPE_CDATA; } OWriteMenuDocumentHandler::~OWriteMenuDocumentHandler() diff --git a/framework/source/fwe/xml/statusbardocumenthandler.cxx b/framework/source/fwe/xml/statusbardocumenthandler.cxx index ddc360c95009..bde842ddd65d 100644 --- a/framework/source/fwe/xml/statusbardocumenthandler.cxx +++ b/framework/source/fwe/xml/statusbardocumenthandler.cxx @@ -373,12 +373,12 @@ throw( SAXException, RuntimeException, std::exception ) else { Sequence< PropertyValue > aStatusbarItemProp( 6 ); - aStatusbarItemProp[0].Name = OUString( ITEM_DESCRIPTOR_COMMANDURL ); - aStatusbarItemProp[1].Name = OUString( ITEM_DESCRIPTOR_HELPURL ); - aStatusbarItemProp[2].Name = OUString( ITEM_DESCRIPTOR_OFFSET ); - aStatusbarItemProp[3].Name = OUString( ITEM_DESCRIPTOR_STYLE ); - aStatusbarItemProp[4].Name = OUString( ITEM_DESCRIPTOR_WIDTH ); - aStatusbarItemProp[5].Name = OUString( ITEM_DESCRIPTOR_TYPE ); + aStatusbarItemProp[0].Name = ITEM_DESCRIPTOR_COMMANDURL; + aStatusbarItemProp[1].Name = ITEM_DESCRIPTOR_HELPURL; + aStatusbarItemProp[2].Name = ITEM_DESCRIPTOR_OFFSET; + aStatusbarItemProp[3].Name = ITEM_DESCRIPTOR_STYLE; + aStatusbarItemProp[4].Name = ITEM_DESCRIPTOR_WIDTH; + aStatusbarItemProp[5].Name = ITEM_DESCRIPTOR_TYPE; aStatusbarItemProp[0].Value <<= aCommandURL; aStatusbarItemProp[1].Value <<= aHelpURL; @@ -489,9 +489,9 @@ OWriteStatusBarDocumentHandler::OWriteStatusBarDocumentHandler( { ::comphelper::AttributeList* pList = new ::comphelper::AttributeList; m_xEmptyList = Reference< XAttributeList >( (XAttributeList *) pList, UNO_QUERY ); - m_aAttributeType = OUString( ATTRIBUTE_TYPE_CDATA ); - m_aXMLXlinkNS = OUString( XMLNS_XLINK_PREFIX ); - m_aXMLStatusBarNS = OUString( XMLNS_STATUSBAR_PREFIX ); + m_aAttributeType = ATTRIBUTE_TYPE_CDATA; + m_aXMLXlinkNS = XMLNS_XLINK_PREFIX; + m_aXMLStatusBarNS = XMLNS_STATUSBAR_PREFIX; } OWriteStatusBarDocumentHandler::~OWriteStatusBarDocumentHandler() @@ -586,19 +586,19 @@ throw ( SAXException, RuntimeException ) // alignment if ( nStyle & ItemStyle::ALIGN_RIGHT ) { - pList->AddAttribute( m_aXMLStatusBarNS + OUString( ATTRIBUTE_ALIGN ), + pList->AddAttribute( m_aXMLStatusBarNS + ATTRIBUTE_ALIGN, m_aAttributeType, OUString( ATTRIBUTE_ALIGN_RIGHT ) ); } else if ( nStyle & ItemStyle::ALIGN_CENTER ) { - pList->AddAttribute( m_aXMLStatusBarNS + OUString( ATTRIBUTE_ALIGN ), + pList->AddAttribute( m_aXMLStatusBarNS + ATTRIBUTE_ALIGN, m_aAttributeType, OUString( ATTRIBUTE_ALIGN_CENTER ) ); } else { - pList->AddAttribute( m_aXMLStatusBarNS + OUString( ATTRIBUTE_ALIGN ), + pList->AddAttribute( m_aXMLStatusBarNS + ATTRIBUTE_ALIGN, m_aAttributeType, OUString( ATTRIBUTE_ALIGN_LEFT ) ); } @@ -606,13 +606,13 @@ throw ( SAXException, RuntimeException ) // style ( SIB_IN is default ) if ( nStyle & ItemStyle::DRAW_FLAT ) { - pList->AddAttribute( m_aXMLStatusBarNS + OUString( ATTRIBUTE_STYLE ), + pList->AddAttribute( m_aXMLStatusBarNS + ATTRIBUTE_STYLE, m_aAttributeType, OUString( ATTRIBUTE_STYLE_FLAT ) ); } else if ( nStyle & ItemStyle::DRAW_OUT3D ) { - pList->AddAttribute( m_aXMLStatusBarNS + OUString( ATTRIBUTE_STYLE ), + pList->AddAttribute( m_aXMLStatusBarNS + ATTRIBUTE_STYLE, m_aAttributeType, OUString( ATTRIBUTE_STYLE_OUT ) ); } @@ -620,7 +620,7 @@ throw ( SAXException, RuntimeException ) // autosize (default sal_False) if ( nStyle & ItemStyle::AUTO_SIZE ) { - pList->AddAttribute( m_aXMLStatusBarNS + OUString( ATTRIBUTE_AUTOSIZE ), + pList->AddAttribute( m_aXMLStatusBarNS + ATTRIBUTE_AUTOSIZE, m_aAttributeType, OUString( ATTRIBUTE_BOOLEAN_TRUE ) ); } @@ -628,7 +628,7 @@ throw ( SAXException, RuntimeException ) // ownerdraw (default sal_False) if ( nStyle & ItemStyle::OWNER_DRAW ) { - pList->AddAttribute( m_aXMLStatusBarNS + OUString( ATTRIBUTE_OWNERDRAW ), + pList->AddAttribute( m_aXMLStatusBarNS + ATTRIBUTE_OWNERDRAW, m_aAttributeType, OUString( ATTRIBUTE_BOOLEAN_TRUE ) ); } @@ -636,7 +636,7 @@ throw ( SAXException, RuntimeException ) // width (default 0) if ( nWidth > 0 ) { - pList->AddAttribute( m_aXMLStatusBarNS + OUString( ATTRIBUTE_WIDTH ), + pList->AddAttribute( m_aXMLStatusBarNS + ATTRIBUTE_WIDTH, m_aAttributeType, OUString::number( nWidth ) ); } @@ -644,7 +644,7 @@ throw ( SAXException, RuntimeException ) // offset (default STATUSBAR_OFFSET) if ( nOffset != STATUSBAR_OFFSET ) { - pList->AddAttribute( m_aXMLStatusBarNS + OUString( ATTRIBUTE_OFFSET ), + pList->AddAttribute( m_aXMLStatusBarNS + ATTRIBUTE_OFFSET, m_aAttributeType, OUString::number( nOffset ) ); } diff --git a/framework/source/fwe/xml/toolboxdocumenthandler.cxx b/framework/source/fwe/xml/toolboxdocumenthandler.cxx index 15c0ad3af8b6..a8baf528ada2 100644 --- a/framework/source/fwe/xml/toolboxdocumenthandler.cxx +++ b/framework/source/fwe/xml/toolboxdocumenthandler.cxx @@ -659,9 +659,9 @@ OWriteToolBoxDocumentHandler::OWriteToolBoxDocumentHandler( { ::comphelper::AttributeList* pList = new ::comphelper::AttributeList; m_xEmptyList = Reference< XAttributeList >( (XAttributeList *) pList, UNO_QUERY ); - m_aAttributeType = OUString( ATTRIBUTE_TYPE_CDATA ); - m_aXMLXlinkNS = OUString( XMLNS_XLINK_PREFIX ); - m_aXMLToolbarNS = OUString( XMLNS_TOOLBAR_PREFIX ); + m_aAttributeType = ATTRIBUTE_TYPE_CDATA; + m_aXMLXlinkNS = XMLNS_XLINK_PREFIX; + m_aXMLToolbarNS = XMLNS_TOOLBAR_PREFIX; } OWriteToolBoxDocumentHandler::~OWriteToolBoxDocumentHandler() @@ -708,7 +708,7 @@ void OWriteToolBoxDocumentHandler::WriteToolBoxDocument() throw OUString( XMLNS_XLINK ) ); if ( !aUIName.isEmpty() ) - pList->AddAttribute( m_aXMLToolbarNS + OUString( ATTRIBUTE_UINAME ), + pList->AddAttribute( m_aXMLToolbarNS + ATTRIBUTE_UINAME, m_aAttributeType, aUIName ); @@ -777,28 +777,28 @@ throw ( SAXException, RuntimeException ) if ( !rLabel.isEmpty() ) { - pList->AddAttribute( m_aXMLToolbarNS + OUString( ATTRIBUTE_TEXT ), + pList->AddAttribute( m_aXMLToolbarNS + ATTRIBUTE_TEXT, m_aAttributeType, rLabel ); } if ( !bVisible ) { - pList->AddAttribute( m_aXMLToolbarNS + OUString( ATTRIBUTE_VISIBLE ), + pList->AddAttribute( m_aXMLToolbarNS + ATTRIBUTE_VISIBLE, m_aAttributeType, OUString( ATTRIBUTE_BOOLEAN_FALSE ) ); } if ( !rHelpURL.isEmpty() ) { - pList->AddAttribute( m_aXMLToolbarNS + OUString( ATTRIBUTE_HELPID ), + pList->AddAttribute( m_aXMLToolbarNS + ATTRIBUTE_HELPID, m_aAttributeType, rHelpURL ); } if ( !rTooltip.isEmpty() ) { - pList->AddAttribute( m_aXMLToolbarNS + OUString( ATTRIBUTE_TOOLTIP ), + pList->AddAttribute( m_aXMLToolbarNS + ATTRIBUTE_TOOLTIP, m_aAttributeType, rTooltip ); } @@ -817,14 +817,14 @@ throw ( SAXException, RuntimeException ) aValue += OUString::createFromAscii( pStyle->attrName ); } } - pList->AddAttribute( m_aXMLToolbarNS + OUString( ATTRIBUTE_ITEMSTYLE ), + pList->AddAttribute( m_aXMLToolbarNS + ATTRIBUTE_ITEMSTYLE, m_aAttributeType, aValue ); } if ( nWidth > 0 ) { - pList->AddAttribute( m_aXMLToolbarNS + OUString( ATTRIBUTE_WIDTH ), + pList->AddAttribute( m_aXMLToolbarNS + ATTRIBUTE_WIDTH, m_aAttributeType, OUString::number( nWidth) ); } diff --git a/framework/source/fwi/classes/protocolhandlercache.cxx b/framework/source/fwi/classes/protocolhandlercache.cxx index 80e825f5f763..18abfdbbe508 100644 --- a/framework/source/fwi/classes/protocolhandlercache.cxx +++ b/framework/source/fwi/classes/protocolhandlercache.cxx @@ -31,6 +31,8 @@ #include #include +#define SETNAME_HANDLER "HandlerSet" // name of configuration set inside package + namespace framework{ /** diff --git a/framework/source/jobs/jobdata.cxx b/framework/source/jobs/jobdata.cxx index 3e85ed351e7c..91f96caa6837 100644 --- a/framework/source/jobs/jobdata.cxx +++ b/framework/source/jobs/jobdata.cxx @@ -591,10 +591,10 @@ void JobData::impl_reset() SolarMutexGuard g; m_eMode = E_UNKNOWN_MODE; m_eEnvironment = E_UNKNOWN_ENVIRONMENT; - m_sAlias = ""; - m_sService = ""; - m_sContext = ""; - m_sEvent = ""; + m_sAlias.clear(); + m_sService.clear(); + m_sContext.clear(); + m_sEvent.clear(); m_lArguments = css::uno::Sequence< css::beans::NamedValue >(); } diff --git a/framework/source/jobs/jobdispatch.cxx b/framework/source/jobs/jobdispatch.cxx index 53c2c0a945c3..06819092b748 100644 --- a/framework/source/jobs/jobdispatch.cxx +++ b/framework/source/jobs/jobdispatch.cxx @@ -106,7 +106,7 @@ public: throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { css::uno::Sequence< OUString > aSeq(1); - aSeq[0] = OUString("com.sun.star.frame.ProtocolHandler"); + aSeq[0] = "com.sun.star.frame.ProtocolHandler"; return aSeq; } diff --git a/framework/source/jobs/jobexecutor.cxx b/framework/source/jobs/jobexecutor.cxx index 8f6243f6c396..601309076c33 100644 --- a/framework/source/jobs/jobexecutor.cxx +++ b/framework/source/jobs/jobexecutor.cxx @@ -101,7 +101,7 @@ public: throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { css::uno::Sequence< OUString > aSeq(1); - aSeq[0] = OUString("com.sun.star.task.JobExecutor"); + aSeq[0] = "com.sun.star.task.JobExecutor"; return aSeq; } diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx index cfb474af78ec..f73754d70ebb 100644 --- a/framework/source/loadenv/loadenv.cxx +++ b/framework/source/loadenv/loadenv.cxx @@ -879,7 +879,7 @@ bool LoadEnv::impl_handleContent() lTypeReg[0] = sType; css::uno::Sequence< css::beans::NamedValue > lQuery(1); - lQuery[0].Name = OUString(PROP_TYPES); + lQuery[0].Name = PROP_TYPES; lQuery[0].Value <<= lTypeReg; OUString sPROP_NAME(PROP_NAME); @@ -1172,7 +1172,7 @@ css::uno::Reference< css::uno::XInterface > LoadEnv::impl_searchLoader() lTypesReg[0] = sType; css::uno::Sequence< css::beans::NamedValue > lQuery(1); - lQuery[0].Name = OUString(PROP_TYPES); + lQuery[0].Name = PROP_TYPES; lQuery[0].Value <<= lTypesReg; OUString sPROP_NAME(PROP_NAME); diff --git a/framework/source/loadenv/targethelper.cxx b/framework/source/loadenv/targethelper.cxx index 944c5be13d37..797da8071885 100644 --- a/framework/source/loadenv/targethelper.cxx +++ b/framework/source/loadenv/targethelper.cxx @@ -29,29 +29,29 @@ bool TargetHelper::matchSpecialTarget(const OUString& sCheckTarget , case E_SELF : return ( (sCheckTarget.isEmpty() ) || - (sCheckTarget.equals(SPECIALTARGET_SELF)) + sCheckTarget == SPECIALTARGET_SELF ); case E_PARENT : - return (sCheckTarget.equals(SPECIALTARGET_PARENT)); + return sCheckTarget == SPECIALTARGET_PARENT; case E_TOP : - return (sCheckTarget.equals(SPECIALTARGET_TOP)); + return sCheckTarget == SPECIALTARGET_TOP; case E_BLANK : - return (sCheckTarget.equals(SPECIALTARGET_BLANK)); + return sCheckTarget == SPECIALTARGET_BLANK; case E_DEFAULT : - return (sCheckTarget.equals(SPECIALTARGET_DEFAULT)); + return sCheckTarget == SPECIALTARGET_DEFAULT; case E_BEAMER : - return (sCheckTarget.equals(SPECIALTARGET_BEAMER)); + return sCheckTarget == SPECIALTARGET_BEAMER; case E_MENUBAR : - return (sCheckTarget.equals(SPECIALTARGET_MENUBAR)); + return sCheckTarget == SPECIALTARGET_MENUBAR; case E_HELPTASK : - return (sCheckTarget.equals(SPECIALTARGET_HELPTASK)); + return sCheckTarget == SPECIALTARGET_HELPTASK; default: return false; } diff --git a/framework/source/recording/dispatchrecorder.cxx b/framework/source/recording/dispatchrecorder.cxx index 482aa7883a4d..ea28b7decfe0 100644 --- a/framework/source/recording/dispatchrecorder.cxx +++ b/framework/source/recording/dispatchrecorder.cxx @@ -36,7 +36,7 @@ namespace framework{ DEFINE_XSERVICEINFO_MULTISERVICE_2( DispatchRecorder, ::cppu::OWeakObject, - OUString("com.sun.star.frame.DispatchRecorder"), + "com.sun.star.frame.DispatchRecorder", OUString("com.sun.star.comp.framework.DispatchRecorder")) DEFINE_INIT_SERVICE( @@ -70,8 +70,7 @@ Sequence< Any > make_seq_out_of_struct( if (TypeClass_STRUCT != eTypeClass && TypeClass_EXCEPTION != eTypeClass) { throw RuntimeException( - type.getTypeName() + - OUString( "is no struct or exception!" ) ); + type.getTypeName() + "is no struct or exception!" ); } typelib_TypeDescription * pTD = 0; TYPELIB_DANGER_GET( &pTD, type.getTypeLibType() ); @@ -79,8 +78,7 @@ Sequence< Any > make_seq_out_of_struct( if (! pTD) { throw RuntimeException( - OUString( "cannot get type descr of type " ) + - type.getTypeName() ); + "cannot get type descr of type " + type.getTypeName() ); } ::std::vector< Any > vec; diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx index 1bf2f1098b64..206adedf57d9 100644 --- a/framework/source/services/autorecovery.cxx +++ b/framework/source/services/autorecovery.cxx @@ -469,7 +469,7 @@ public: throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { css::uno::Sequence< OUString > aSeq(1); - aSeq[0] = OUString("com.sun.star.frame.AutoRecovery"); + aSeq[0] = "com.sun.star.frame.AutoRecovery"; return aSeq; } @@ -1247,7 +1247,7 @@ DispatchParams& DispatchParams::operator=(const DispatchParams& rCopy) void DispatchParams::forget() { - m_sSavePath = ""; + m_sSavePath.clear(); m_nWorkingEntryID = -1; m_xProgress.clear(); m_xHoldRefForAsyncOpAlive.clear(); @@ -1892,7 +1892,7 @@ void AutoRecovery::implts_readConfig() continue; AutoRecovery::TDocumentInfo aInfo; - aInfo.NewTempURL = ""; + aInfo.NewTempURL.clear(); aInfo.Document = css::uno::Reference< css::frame::XModel >(); xItem->getPropertyValue(OUString(CFG_ENTRY_PROP_ORIGINALURL)) >>= aInfo.OrgURL; xItem->getPropertyValue(OUString(CFG_ENTRY_PROP_TEMPURL)) >>= aInfo.OldTempURL; @@ -1991,8 +1991,8 @@ void AutoRecovery::implts_specifyDefaultFilterAndExtension(AutoRecovery::TDocume } catch(const css::uno::Exception&) { - rInfo.DefaultFilter = ""; - rInfo.Extension = ""; + rInfo.DefaultFilter.clear(); + rInfo.Extension.clear(); } } @@ -2701,8 +2701,8 @@ void AutoRecovery::implts_markDocumentAsSaved(const css::uno::Reference< css::fr sRemoveURL1 = aInfo.OldTempURL; sRemoveURL2 = aInfo.NewTempURL; - aInfo.OldTempURL = ""; - aInfo.NewTempURL = ""; + aInfo.OldTempURL.clear(); + aInfo.NewTempURL.clear(); utl::MediaDescriptor lDescriptor(aInfo.Document->getArgs()); aInfo.RealFilter = lDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_FILTERNAME(), OUString()); @@ -3184,7 +3184,7 @@ void AutoRecovery::implts_saveOneDoc(const OUString& else { // safe the state about error ... - rInfo.NewTempURL = ""; + rInfo.NewTempURL.clear(); rInfo.DocumentState &= ~AutoRecovery::E_TRY_SAVE; rInfo.DocumentState |= AutoRecovery::E_HANDLED; rInfo.DocumentState |= AutoRecovery::E_INCOMPLETE; @@ -3198,7 +3198,7 @@ void AutoRecovery::implts_saveOneDoc(const OUString& // The only thing is: we fill the disk with temp files, if we can't remove old ones :-) OUString sRemoveFile = rInfo.OldTempURL; rInfo.OldTempURL = rInfo.NewTempURL; - rInfo.NewTempURL = ""; + rInfo.NewTempURL.clear(); implts_flushConfigItem(rInfo); diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx index 43f73fb0177a..b08b9f815444 100644 --- a/framework/source/services/desktop.cxx +++ b/framework/source/services/desktop.cxx @@ -83,7 +83,7 @@ css::uno::Sequence SAL_CALL Desktop::getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) { css::uno::Sequence< OUString > aSeq(1); - aSeq[0] = OUString("com.sun.star.frame.Desktop"); + aSeq[0] = "com.sun.star.frame.Desktop"; return aSeq; } diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx index 2890392abcc8..519bf109b66b 100644 --- a/framework/source/services/frame.cxx +++ b/framework/source/services/frame.cxx @@ -169,7 +169,7 @@ public: throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { css::uno::Sequence< OUString > aSeq(1); - aSeq[0] = OUString("com.sun.star.frame.Frame"); + aSeq[0] = "com.sun.star.frame.Frame"; return aSeq; } diff --git a/framework/source/services/pathsettings.cxx b/framework/source/services/pathsettings.cxx index 55cfc7a180a7..6b53a47c6765 100644 --- a/framework/source/services/pathsettings.cxx +++ b/framework/source/services/pathsettings.cxx @@ -201,7 +201,7 @@ public: throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { css::uno::Sequence< OUString > aSeq(1); - aSeq[0] = OUString("com.sun.star.util.PathSettings"); + aSeq[0] = "com.sun.star.util.PathSettings"; return aSeq; } diff --git a/framework/source/services/sessionlistener.cxx b/framework/source/services/sessionlistener.cxx index ecf0e49b7657..fa131d417b3b 100644 --- a/framework/source/services/sessionlistener.cxx +++ b/framework/source/services/sessionlistener.cxx @@ -127,7 +127,7 @@ public: throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { css::uno::Sequence< OUString > aSeq(1); - aSeq[0] = OUString("com.sun.star.frame.SessionListener"); + aSeq[0] = "com.sun.star.frame.SessionListener"; return aSeq; } diff --git a/framework/source/services/substitutepathvars.cxx b/framework/source/services/substitutepathvars.cxx index be0b8a2bee3d..5057959fdc64 100644 --- a/framework/source/services/substitutepathvars.cxx +++ b/framework/source/services/substitutepathvars.cxx @@ -247,7 +247,7 @@ public: throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { css::uno::Sequence< OUString > aSeq(1); - aSeq[0] = OUString("com.sun.star.util.PathSubstitution"); + aSeq[0] = "com.sun.star.util.PathSubstitution"; return aSeq; } @@ -505,7 +505,7 @@ const OUString& SubstitutePathVariables_Impl::GetDNSDomainName() if ( nIndex >= 0 && aTemp.getLength() > nIndex+1 ) m_aDNSDomain = aTemp.copy( nIndex+1 ).toAsciiLowerCase(); else - m_aDNSDomain = ""; + m_aDNSDomain.clear(); m_bDNSDomainRetrieved = true; } diff --git a/framework/source/services/tabwindowservice.cxx b/framework/source/services/tabwindowservice.cxx index 0fed8118b013..3fc7c9c4b7ee 100644 --- a/framework/source/services/tabwindowservice.cxx +++ b/framework/source/services/tabwindowservice.cxx @@ -117,7 +117,7 @@ public: throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { css::uno::Sequence< OUString > aSeq(1); - aSeq[0] = OUString("com.sun.star.ui.dialogs.TabContainerWindow"); + aSeq[0] = "com.sun.star.ui.dialogs.TabContainerWindow"; return aSeq; } diff --git a/framework/source/services/taskcreatorsrv.cxx b/framework/source/services/taskcreatorsrv.cxx index 2b04c81d2d92..b5b03997d83b 100644 --- a/framework/source/services/taskcreatorsrv.cxx +++ b/framework/source/services/taskcreatorsrv.cxx @@ -82,7 +82,7 @@ public: throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { css::uno::Sequence< OUString > aSeq(1); - aSeq[0] = OUString("com.sun.star.frame.TaskCreator"); + aSeq[0] = "com.sun.star.frame.TaskCreator"; return aSeq; } diff --git a/framework/source/uiconfiguration/moduleuicfgsupplier.cxx b/framework/source/uiconfiguration/moduleuicfgsupplier.cxx index 4ef0f208b356..658297fb8e84 100644 --- a/framework/source/uiconfiguration/moduleuicfgsupplier.cxx +++ b/framework/source/uiconfiguration/moduleuicfgsupplier.cxx @@ -81,7 +81,7 @@ public: throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { css::uno::Sequence< OUString > aSeq(1); - aSeq[0] = OUString("com.sun.star.ui.ModuleUIConfigurationManagerSupplier"); + aSeq[0] = "com.sun.star.ui.ModuleUIConfigurationManagerSupplier"; return aSeq; } diff --git a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx index fb7f85867133..63e25a30dfaf 100644 --- a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx +++ b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx @@ -95,7 +95,7 @@ public: throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { css::uno::Sequence< OUString > aSeq(1); - aSeq[0] = OUString("com.sun.star.ui.ModuleUIConfigurationManager"); + aSeq[0] = "com.sun.star.ui.ModuleUIConfigurationManager"; return aSeq; } diff --git a/framework/source/uiconfiguration/uicategorydescription.cxx b/framework/source/uiconfiguration/uicategorydescription.cxx index f7dd8196d4a4..bc25adf131f2 100644 --- a/framework/source/uiconfiguration/uicategorydescription.cxx +++ b/framework/source/uiconfiguration/uicategorydescription.cxx @@ -404,7 +404,7 @@ public: throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { css::uno::Sequence< OUString > aSeq(1); - aSeq[0] = OUString("com.sun.star.ui.UICategoryDescription"); + aSeq[0] = "com.sun.star.ui.UICategoryDescription"; return aSeq; } diff --git a/framework/source/uiconfiguration/uiconfigurationmanager.cxx b/framework/source/uiconfiguration/uiconfigurationmanager.cxx index df7d2bc06436..3bb30e4ca45b 100644 --- a/framework/source/uiconfiguration/uiconfigurationmanager.cxx +++ b/framework/source/uiconfiguration/uiconfigurationmanager.cxx @@ -80,7 +80,7 @@ public: throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { css::uno::Sequence< OUString > aSeq(1); - aSeq[0] = OUString("com.sun.star.ui.UIConfigurationManager"); + aSeq[0] = "com.sun.star.ui.UIConfigurationManager"; return aSeq; } diff --git a/framework/source/uiconfiguration/windowstateconfiguration.cxx b/framework/source/uiconfiguration/windowstateconfiguration.cxx index 94b31ec236c8..50d958646202 100644 --- a/framework/source/uiconfiguration/windowstateconfiguration.cxx +++ b/framework/source/uiconfiguration/windowstateconfiguration.cxx @@ -1300,7 +1300,7 @@ public: throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { css::uno::Sequence< OUString > aSeq(1); - aSeq[0] = OUString("com.sun.star.ui.WindowStateConfiguration"); + aSeq[0] = "com.sun.star.ui.WindowStateConfiguration"; return aSeq; } diff --git a/framework/source/uielement/controlmenucontroller.cxx b/framework/source/uielement/controlmenucontroller.cxx index 848e60d225fa..514e3737e93e 100644 --- a/framework/source/uielement/controlmenucontroller.cxx +++ b/framework/source/uielement/controlmenucontroller.cxx @@ -198,7 +198,7 @@ public: throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { css::uno::Sequence< OUString > aSeq(1); - aSeq[0] = OUString("com.sun.star.frame.PopupMenuController"); + aSeq[0] = "com.sun.star.frame.PopupMenuController"; return aSeq; } diff --git a/framework/source/uielement/langselectionstatusbarcontroller.cxx b/framework/source/uielement/langselectionstatusbarcontroller.cxx index 004e43cce43b..4558cc7175f2 100644 --- a/framework/source/uielement/langselectionstatusbarcontroller.cxx +++ b/framework/source/uielement/langselectionstatusbarcontroller.cxx @@ -98,7 +98,7 @@ public: throw (css::uno::RuntimeException) { css::uno::Sequence< OUString > aSeq(1); - aSeq[0] = OUString("com.sun.star.frame.StatusbarController"); + aSeq[0] = "com.sun.star.frame.StatusbarController"; return aSeq; } diff --git a/framework/source/uielement/objectmenucontroller.cxx b/framework/source/uielement/objectmenucontroller.cxx index f2a18f07b8f1..c2254a9d4e82 100644 --- a/framework/source/uielement/objectmenucontroller.cxx +++ b/framework/source/uielement/objectmenucontroller.cxx @@ -76,7 +76,7 @@ public: throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { css::uno::Sequence< OUString > aSeq(1); - aSeq[0] = OUString("com.sun.star.frame.PopupMenuController"); + aSeq[0] = "com.sun.star.frame.PopupMenuController"; return aSeq; } diff --git a/framework/source/uielement/recentfilesmenucontroller.cxx b/framework/source/uielement/recentfilesmenucontroller.cxx index 18ebbe997193..ed23595c9d05 100644 --- a/framework/source/uielement/recentfilesmenucontroller.cxx +++ b/framework/source/uielement/recentfilesmenucontroller.cxx @@ -79,7 +79,7 @@ public: throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { css::uno::Sequence< OUString > aSeq(1); - aSeq[0] = OUString("com.sun.star.frame.PopupMenuController"); + aSeq[0] = "com.sun.star.frame.PopupMenuController"; return aSeq; } diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index ca8309b60366..22ab0b10a373 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -1862,8 +1862,7 @@ IMPL_LINK( ToolBarManager, MenuSelect, Menu*, pMenu ) { Sequence< PropertyValue > aPropSeq( 1 ); - aPropSeq[ 0 ].Name = - OUString( "ResourceURL"); + aPropSeq[ 0 ].Name = "ResourceURL"; aPropSeq[ 0 ].Value <<= m_aResourceName; xDisp->dispatch( aURL, aPropSeq ); diff --git a/framework/source/uifactory/addonstoolbarfactory.cxx b/framework/source/uifactory/addonstoolbarfactory.cxx index fc61ca299836..a7bac9f9f562 100644 --- a/framework/source/uifactory/addonstoolbarfactory.cxx +++ b/framework/source/uifactory/addonstoolbarfactory.cxx @@ -74,7 +74,7 @@ public: throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { css::uno::Sequence< OUString > aSeq(1); - aSeq[0] = OUString("com.sun.star.ui.ToolBarFactory"); + aSeq[0] = "com.sun.star.ui.ToolBarFactory"; return aSeq; } diff --git a/framework/source/uifactory/statusbarfactory.cxx b/framework/source/uifactory/statusbarfactory.cxx index 420cddb5509f..f15a58ff7318 100644 --- a/framework/source/uifactory/statusbarfactory.cxx +++ b/framework/source/uifactory/statusbarfactory.cxx @@ -58,7 +58,7 @@ public: throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { css::uno::Sequence< OUString > aSeq(1); - aSeq[0] = OUString("com.sun.star.ui.StatusBarFactory"); + aSeq[0] = "com.sun.star.ui.StatusBarFactory"; return aSeq; } diff --git a/framework/source/uifactory/toolbarfactory.cxx b/framework/source/uifactory/toolbarfactory.cxx index c069e175714b..c6801e50a143 100644 --- a/framework/source/uifactory/toolbarfactory.cxx +++ b/framework/source/uifactory/toolbarfactory.cxx @@ -56,7 +56,7 @@ public: throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { css::uno::Sequence< OUString > aSeq(1); - aSeq[0] = OUString("com.sun.star.ui.ToolBarFactory"); + aSeq[0] = "com.sun.star.ui.ToolBarFactory"; return aSeq; } diff --git a/framework/source/uifactory/uicontrollerfactory.cxx b/framework/source/uifactory/uicontrollerfactory.cxx index 50b19fe57c82..7ff63a55e24a 100644 --- a/framework/source/uifactory/uicontrollerfactory.cxx +++ b/framework/source/uifactory/uicontrollerfactory.cxx @@ -268,7 +268,7 @@ public: throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { css::uno::Sequence< OUString > aSeq(1); - aSeq[0] = OUString("com.sun.star.frame.PopupMenuControllerFactory"); + aSeq[0] = "com.sun.star.frame.PopupMenuControllerFactory"; return aSeq; } @@ -320,7 +320,7 @@ public: throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { css::uno::Sequence< OUString > aSeq(1); - aSeq[0] = OUString("com.sun.star.frame.ToolbarControllerFactory"); + aSeq[0] = "com.sun.star.frame.ToolbarControllerFactory"; return aSeq; } @@ -372,7 +372,7 @@ public: throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { css::uno::Sequence< OUString > aSeq(1); - aSeq[0] = OUString("com.sun.star.frame.StatusbarControllerFactory"); + aSeq[0] = "com.sun.star.frame.StatusbarControllerFactory"; return aSeq; } diff --git a/framework/source/uifactory/uielementfactorymanager.cxx b/framework/source/uifactory/uielementfactorymanager.cxx index 932b90b55f1d..9e47837dbd45 100644 --- a/framework/source/uifactory/uielementfactorymanager.cxx +++ b/framework/source/uifactory/uielementfactorymanager.cxx @@ -375,7 +375,7 @@ public: throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { css::uno::Sequence< OUString > aSeq(1); - aSeq[0] = OUString("com.sun.star.ui.UIElementFactoryManager"); + aSeq[0] = "com.sun.star.ui.UIElementFactoryManager"; return aSeq; } diff --git a/framework/source/uifactory/windowcontentfactorymanager.cxx b/framework/source/uifactory/windowcontentfactorymanager.cxx index 778cea8ac087..a72fae45bf6e 100644 --- a/framework/source/uifactory/windowcontentfactorymanager.cxx +++ b/framework/source/uifactory/windowcontentfactorymanager.cxx @@ -67,7 +67,7 @@ public: throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { css::uno::Sequence< OUString > aSeq(1); - aSeq[0] = OUString("com.sun.star.ui.WindowContentFactoryManager"); + aSeq[0] = "com.sun.star.ui.WindowContentFactoryManager"; return aSeq; } diff --git a/framework/source/xml/acceleratorconfigurationreader.cxx b/framework/source/xml/acceleratorconfigurationreader.cxx index a098cd4975ff..346d84a074ff 100644 --- a/framework/source/xml/acceleratorconfigurationreader.cxx +++ b/framework/source/xml/acceleratorconfigurationreader.cxx @@ -231,9 +231,9 @@ AcceleratorConfigurationReader::EXMLElement AcceleratorConfigurationReader::impl { AcceleratorConfigurationReader::EXMLElement eElement; - if (sElement.equals(NS_ELEMENT_ACCELERATORLIST)) + if (sElement == "http://openoffice.org/2001/accel^acceleratorlist") eElement = E_ELEMENT_ACCELERATORLIST; - else if (sElement.equals(NS_ELEMENT_ITEM)) + else if (sElement == "http://openoffice.org/2001/accel^item") eElement = E_ELEMENT_ITEM; else throw css::uno::RuntimeException( @@ -247,17 +247,17 @@ AcceleratorConfigurationReader::EXMLAttribute AcceleratorConfigurationReader::im { AcceleratorConfigurationReader::EXMLAttribute eAttribute; - if (sAttribute.equals(NS_ATTRIBUTE_KEYCODE)) + if (sAttribute == "http://openoffice.org/2001/accel^code") eAttribute = E_ATTRIBUTE_KEYCODE; - else if (sAttribute.equals(NS_ATTRIBUTE_MOD_SHIFT)) + else if (sAttribute == "http://openoffice.org/2001/accel^shift") eAttribute = E_ATTRIBUTE_MOD_SHIFT; - else if (sAttribute.equals(NS_ATTRIBUTE_MOD_MOD1)) + else if (sAttribute == "http://openoffice.org/2001/accel^mod1") eAttribute = E_ATTRIBUTE_MOD_MOD1; - else if (sAttribute.equals(NS_ATTRIBUTE_MOD_MOD2)) + else if (sAttribute == "http://openoffice.org/2001/accel^mod2") eAttribute = E_ATTRIBUTE_MOD_MOD2; - else if (sAttribute.equals(NS_ATTRIBUTE_MOD_MOD3)) + else if (sAttribute == "http://openoffice.org/2001/accel^mod3") eAttribute = E_ATTRIBUTE_MOD_MOD3; - else if (sAttribute.equals(NS_ATTRIBUTE_URL)) + else if (sAttribute == "http://www.w3.org/1999/xlink^href") eAttribute = E_ATTRIBUTE_URL; else throw css::uno::RuntimeException( diff --git a/framework/source/xml/imagesdocumenthandler.cxx b/framework/source/xml/imagesdocumenthandler.cxx index ac52c558783a..6ca2a9d4f7ff 100644 --- a/framework/source/xml/imagesdocumenthandler.cxx +++ b/framework/source/xml/imagesdocumenthandler.cxx @@ -602,11 +602,11 @@ OWriteImagesDocumentHandler::OWriteImagesDocumentHandler( { ::comphelper::AttributeList* pList = new ::comphelper::AttributeList; m_xEmptyList = Reference< XAttributeList >( (XAttributeList *) pList, UNO_QUERY ); - m_aAttributeType = OUString( ATTRIBUTE_TYPE_CDATA ); - m_aXMLImageNS = OUString( XMLNS_IMAGE_PREFIX ); - m_aXMLXlinkNS = OUString( XMLNS_XLINK_PREFIX ); - m_aAttributeXlinkType = OUString( ATTRIBUTE_XLINK_TYPE ); - m_aAttributeValueSimple = OUString( ATTRIBUTE_XLINK_TYPE_VALUE ); + m_aAttributeType = ATTRIBUTE_TYPE_CDATA; + m_aXMLImageNS = XMLNS_IMAGE_PREFIX; + m_aXMLXlinkNS = XMLNS_XLINK_PREFIX; + m_aAttributeXlinkType = ATTRIBUTE_XLINK_TYPE; + m_aAttributeValueSimple = ATTRIBUTE_XLINK_TYPE_VALUE; } OWriteImagesDocumentHandler::~OWriteImagesDocumentHandler() @@ -677,23 +677,23 @@ void OWriteImagesDocumentHandler::WriteImageList( const ImageListItemDescriptor* m_aAttributeType, m_aAttributeValueSimple ); - pList->AddAttribute( m_aXMLXlinkNS + OUString( ATTRIBUTE_HREF ), + pList->AddAttribute( m_aXMLXlinkNS + ATTRIBUTE_HREF, m_aAttributeType, pImageList->aURL ); if ( pImageList->nMaskMode == ImageMaskMode_Bitmap ) { - pList->AddAttribute( m_aXMLImageNS + OUString( ATTRIBUTE_MASKMODE ), + pList->AddAttribute( m_aXMLImageNS + ATTRIBUTE_MASKMODE, m_aAttributeType, OUString( ATTRIBUTE_MASKMODE_BITMAP ) ); - pList->AddAttribute( m_aXMLImageNS + OUString( ATTRIBUTE_MASKURL ), + pList->AddAttribute( m_aXMLImageNS + ATTRIBUTE_MASKURL, m_aAttributeType, pImageList->aMaskURL ); if ( !pImageList->aHighContrastMaskURL.isEmpty() ) { - pList->AddAttribute( m_aXMLImageNS + OUString( ATTRIBUTE_HIGHCONTRASTMASKURL ), + pList->AddAttribute( m_aXMLImageNS + ATTRIBUTE_HIGHCONTRASTMASKURL, m_aAttributeType, pImageList->aHighContrastMaskURL ); } @@ -706,18 +706,18 @@ void OWriteImagesDocumentHandler::WriteImageList( const ImageListItemDescriptor* aColorStrBuffer.appendAscii( "#" ); aColorStrBuffer.append( OUString::number( nValue, 16 )); - pList->AddAttribute( m_aXMLImageNS + OUString( ATTRIBUTE_MASKCOLOR ), + pList->AddAttribute( m_aXMLImageNS + ATTRIBUTE_MASKCOLOR, m_aAttributeType, aColorStrBuffer.makeStringAndClear() ); - pList->AddAttribute( m_aXMLImageNS + OUString( ATTRIBUTE_MASKMODE ), + pList->AddAttribute( m_aXMLImageNS + ATTRIBUTE_MASKMODE, m_aAttributeType, OUString( ATTRIBUTE_MASKMODE_COLOR ) ); } if ( !pImageList->aHighContrastURL.isEmpty() ) { - pList->AddAttribute( m_aXMLImageNS + OUString( ATTRIBUTE_HIGHCONTRASTURL ), + pList->AddAttribute( m_aXMLImageNS + ATTRIBUTE_HIGHCONTRASTURL, m_aAttributeType, pImageList->aHighContrastURL ); } @@ -742,11 +742,11 @@ void OWriteImagesDocumentHandler::WriteImage( const ImageItemDescriptor* pImage ::comphelper::AttributeList* pList = new ::comphelper::AttributeList; Reference< XAttributeList > xList( (XAttributeList *) pList , UNO_QUERY ); - pList->AddAttribute( m_aXMLImageNS + OUString( ATTRIBUTE_BITMAPINDEX ), + pList->AddAttribute( m_aXMLImageNS + ATTRIBUTE_BITMAPINDEX, m_aAttributeType, OUString::number( pImage->nIndex ) ); - pList->AddAttribute( m_aXMLImageNS + OUString( ATTRIBUTE_COMMAND ), + pList->AddAttribute( m_aXMLImageNS + ATTRIBUTE_COMMAND, m_aAttributeType, pImage->aCommandURL ); @@ -787,14 +787,14 @@ void OWriteImagesDocumentHandler::WriteExternalImage( const ExternalImageItemDes if ( !pExternalImage->aURL.isEmpty() ) { - pList->AddAttribute( m_aXMLXlinkNS + OUString( ATTRIBUTE_HREF ), + pList->AddAttribute( m_aXMLXlinkNS + ATTRIBUTE_HREF, m_aAttributeType, pExternalImage->aURL ); } if ( !pExternalImage->aCommandURL.isEmpty() ) { - pList->AddAttribute( m_aXMLImageNS + OUString( ATTRIBUTE_COMMAND ), + pList->AddAttribute( m_aXMLImageNS + ATTRIBUTE_COMMAND, m_aAttributeType, pExternalImage->aCommandURL ); } -- cgit