diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-12-18 13:19:13 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-12-18 14:12:22 +0100 |
commit | b98352996c24a3b21c52c32d62d0a7fdbc8e4246 (patch) | |
tree | 3f4a8c74e2bce383274ae6c0308d0db3c80161ff /framework | |
parent | 564fe23374fa544c34875da0dd695cb8a939f0f2 (diff) |
framework: Use appropriate OUString functions on string constants
Change-Id: I5da5cd3254102c742021b3e7b4e1f907ca897ca5
Diffstat (limited to 'framework')
59 files changed, 204 insertions, 265 deletions
diff --git a/framework/inc/acceleratorconst.h b/framework/inc/acceleratorconst.h index 0888b2e4f8fb..8d7bce53f6a5 100644 --- a/framework/inc/acceleratorconst.h +++ b/framework/inc/acceleratorconst.h @@ -45,19 +45,9 @@ namespace framework{ #define AL_ATTRIBUTE_MOD_MOD3 DECLARE_ASCII("accel:mod3" ) // same items with full qualified name space -#define NS_ELEMENT_ACCELERATORLIST DECLARE_ASCII("http://openoffice.org/2001/accel^acceleratorlist") -#define NS_ELEMENT_ITEM DECLARE_ASCII("http://openoffice.org/2001/accel^item" ) - #define NS_XMLNS_ACCEL DECLARE_ASCII("http://openoffice.org/2001/accel") #define NS_XMLNS_XLINK DECLARE_ASCII("http://www.w3.org/1999/xlink" ) -#define NS_ATTRIBUTE_URL DECLARE_ASCII("http://www.w3.org/1999/xlink^href" ) -#define NS_ATTRIBUTE_KEYCODE DECLARE_ASCII("http://openoffice.org/2001/accel^code" ) -#define NS_ATTRIBUTE_MOD_SHIFT DECLARE_ASCII("http://openoffice.org/2001/accel^shift") -#define NS_ATTRIBUTE_MOD_MOD1 DECLARE_ASCII("http://openoffice.org/2001/accel^mod1" ) -#define NS_ATTRIBUTE_MOD_MOD2 DECLARE_ASCII("http://openoffice.org/2001/accel^mod2" ) -#define NS_ATTRIBUTE_MOD_MOD3 DECLARE_ASCII("http://openoffice.org/2001/accel^mod3" ) - } // namespace framework #endif // INCLUDED_FRAMEWORK_INC_ACCELERATORCONST_H diff --git a/framework/inc/classes/protocolhandlercache.hxx b/framework/inc/classes/protocolhandlercache.hxx index b942566606b0..52d3997c3ad9 100644 --- a/framework/inc/classes/protocolhandlercache.hxx +++ b/framework/inc/classes/protocolhandlercache.hxx @@ -35,7 +35,6 @@ namespace framework{ #define CFG_PATH_SEPARATOR DECLARE_ASCII("/" ) /// separator for configuration paths -#define SETNAME_HANDLER DECLARE_ASCII("HandlerSet" ) /// name of configuration set inside package #define PROPERTY_PROTOCOLS DECLARE_ASCII("Protocols" ) /// properties of a protocol handler /** diff --git a/framework/inc/helper/statusindicatorfactory.hxx b/framework/inc/helper/statusindicatorfactory.hxx index 91e56b95c7d4..142eb8256bd1 100644 --- a/framework/inc/helper/statusindicatorfactory.hxx +++ b/framework/inc/helper/statusindicatorfactory.hxx @@ -211,7 +211,7 @@ class StatusIndicatorFactory : public ::cppu::WeakImplHelper4< throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { css::uno::Sequence< OUString > aSeq(1); - aSeq[0] = OUString("com.sun.star.task.StatusIndicatorFactory"); + aSeq[0] = "com.sun.star.task.StatusIndicatorFactory"; return aSeq; } diff --git a/framework/inc/services.h b/framework/inc/services.h index 673228c710c3..5d93fac75fef 100644 --- a/framework/inc/services.h +++ b/framework/inc/services.h @@ -29,20 +29,20 @@ namespace framework{ #define SERVICENAME_FILTERFACTORY DECLARE_ASCII("com.sun.star.document.FilterFactory" ) #define SERVICENAME_CFGUPDATEACCESS DECLARE_ASCII("com.sun.star.configuration.ConfigurationUpdateAccess") // provides read/write access to the configuration #define SERVICENAME_CFGREADACCESS DECLARE_ASCII("com.sun.star.configuration.ConfigurationAccess" ) // provides readonly access to the configuration -#define SERVICENAME_CONTENTHANDLER DECLARE_ASCII("com.sun.star.frame.ContentHandler" ) -#define SERVICENAME_JOB DECLARE_ASCII("com.sun.star.task.Job" ) -#define SERVICENAME_PROTOCOLHANDLER DECLARE_ASCII("com.sun.star.frame.ProtocolHandler" ) +#define SERVICENAME_CONTENTHANDLER "com.sun.star.frame.ContentHandler" +#define SERVICENAME_JOB "com.sun.star.task.Job" +#define SERVICENAME_PROTOCOLHANDLER "com.sun.star.frame.ProtocolHandler" #define SERVICENAME_POPUPMENUCONTROLLERFACTORY DECLARE_ASCII("com.sun.star.frame.PopupMenuControllerFactory" ) -#define SERVICENAME_POPUPMENUCONTROLLER DECLARE_ASCII("com.sun.star.frame.PopupMenuController" ) +#define SERVICENAME_POPUPMENUCONTROLLER "com.sun.star.frame.PopupMenuController" #define SERVICENAME_MENUBARFACTORY DECLARE_ASCII("com.sun.star.ui.UIElementFactory" ) #define SERVICENAME_TOOLBARFACTORY DECLARE_ASCII("com.sun.star.ui.ToolBarFactory" ) #define SERVICENAME_TOOLBARCONTROLLERFACTORY DECLARE_ASCII("com.sun.star.frame.ToolbarControllerFactory" ) #define SERVICENAME_STATUSBARFACTORY DECLARE_ASCII("com.sun.star.ui.StatusBarFactory" ) #define SERVICENAME_STATUSBARCONTROLLERFACTORY DECLARE_ASCII("com.sun.star.frame.StatusbarControllerFactory" ) #define SERVICENAME_STATUSBARCONTROLLER DECLARE_ASCII("com.sun.star.frame.StatusbarController" ) -#define SERVICENAME_TABWINFACTORY DECLARE_ASCII("com.sun.star.frame.TabWindowFactory" ) -#define SERVICENAME_TABWINDOW DECLARE_ASCII("com.sun.star.frame.TabWindow" ) -#define SERVICENAME_STRINGABBREVIATION DECLARE_ASCII("com.sun.star.util.UriAbbreviation" ) +#define SERVICENAME_TABWINFACTORY "com.sun.star.frame.TabWindowFactory" +#define SERVICENAME_TABWINDOW "com.sun.star.frame.TabWindow" +#define SERVICENAME_STRINGABBREVIATION "com.sun.star.util.UriAbbreviation" #define SERVICENAME_TABWINDOWSERVICE DECLARE_ASCII("com.sun.star.ui.dialogs.TabContainerWindow" ) // used implementationnames by framework diff --git a/framework/inc/services/layoutmanager.hxx b/framework/inc/services/layoutmanager.hxx index 5635c7f45bd9..b0b2a75aba2c 100644 --- a/framework/inc/services/layoutmanager.hxx +++ b/framework/inc/services/layoutmanager.hxx @@ -103,7 +103,7 @@ namespace framework throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { css::uno::Sequence< OUString > aSeq(1); - aSeq[0] = OUString("com.sun.star.frame.LayoutManager"); + aSeq[0] = "com.sun.star.frame.LayoutManager"; return aSeq; } diff --git a/framework/inc/targets.h b/framework/inc/targets.h index a266bc59b9b7..0405d9168009 100644 --- a/framework/inc/targets.h +++ b/framework/inc/targets.h @@ -26,23 +26,14 @@ namespace framework{ // Values for special frame search ... sTargetFrameName of findFrame() or queryDispatch() or loadComponentFromURL() -#define SPECIALTARGET_ASCII_SELF "_self" // The frame himself is searched. -#define SPECIALTARGET_ASCII_PARENT "_parent" // The direct parent frame is searched. -#define SPECIALTARGET_ASCII_TOP "_top" // Search at our parents for the first task (if any exist) or a frame without a parent. -#define SPECIALTARGET_ASCII_BLANK "_blank" // Create a new task. -#define SPECIALTARGET_ASCII_DEFAULT "_default" // Create a new task or recycle an existing one -#define SPECIALTARGET_ASCII_BEAMER "_beamer" // special frame in hierarchy -#define SPECIALTARGET_ASCII_MENUBAR "_menubar" // special target for menubars -#define SPECIALTARGET_ASCII_HELPTASK "OFFICE_HELP_TASK" // special name for our help task - -#define SPECIALTARGET_SELF DECLARE_ASCII(SPECIALTARGET_ASCII_SELF ) -#define SPECIALTARGET_PARENT DECLARE_ASCII(SPECIALTARGET_ASCII_PARENT ) -#define SPECIALTARGET_TOP DECLARE_ASCII(SPECIALTARGET_ASCII_TOP ) -#define SPECIALTARGET_BLANK DECLARE_ASCII(SPECIALTARGET_ASCII_BLANK ) -#define SPECIALTARGET_DEFAULT DECLARE_ASCII(SPECIALTARGET_ASCII_DEFAULT ) -#define SPECIALTARGET_BEAMER DECLARE_ASCII(SPECIALTARGET_ASCII_BEAMER ) -#define SPECIALTARGET_MENUBAR DECLARE_ASCII(SPECIALTARGET_ASCII_MENUBAR ) -#define SPECIALTARGET_HELPTASK DECLARE_ASCII(SPECIALTARGET_ASCII_HELPTASK ) +#define SPECIALTARGET_SELF "_self" // The frame himself is searched. +#define SPECIALTARGET_PARENT "_parent" // The direct parent frame is searched. +#define SPECIALTARGET_TOP "_top" // Search at our parents for the first task (if any exist) or a frame without a parent. +#define SPECIALTARGET_BLANK "_blank" // Create a new task. +#define SPECIALTARGET_DEFAULT "_default" // Create a new task or recycle an existing one +#define SPECIALTARGET_BEAMER "_beamer" // special frame in hierarchy +#define SPECIALTARGET_MENUBAR "_menubar" // special target for menubars +#define SPECIALTARGET_HELPTASK "OFFICE_HELP_TASK" // special name for our help task } // namespace framework diff --git a/framework/inc/uiconfiguration/imagemanager.hxx b/framework/inc/uiconfiguration/imagemanager.hxx index bb0f52495b87..250a50533147 100644 --- a/framework/inc/uiconfiguration/imagemanager.hxx +++ b/framework/inc/uiconfiguration/imagemanager.hxx @@ -71,7 +71,7 @@ namespace framework throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { css::uno::Sequence< OUString > aSeq(1); - aSeq[0] = OUString("com.sun.star.ui.ImageManager"); + aSeq[0] = "com.sun.star.ui.ImageManager"; return aSeq; } diff --git a/framework/inc/uielement/uicommanddescription.hxx b/framework/inc/uielement/uicommanddescription.hxx index 83a8459f7244..112a1e8a3cd0 100644 --- a/framework/inc/uielement/uicommanddescription.hxx +++ b/framework/inc/uielement/uicommanddescription.hxx @@ -62,7 +62,7 @@ class UICommandDescription : private cppu::BaseMutex, throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { css::uno::Sequence< OUString > aSeq(1); - aSeq[0] = OUString("com.sun.star.frame.UICommandDescription"); + aSeq[0] = "com.sun.star.frame.UICommandDescription"; return aSeq; } diff --git a/framework/inc/uifactory/menubarfactory.hxx b/framework/inc/uifactory/menubarfactory.hxx index 250d4df31cc2..da1e73493a09 100644 --- a/framework/inc/uifactory/menubarfactory.hxx +++ b/framework/inc/uifactory/menubarfactory.hxx @@ -58,7 +58,7 @@ typedef ::cppu::WeakImplHelper2< throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { css::uno::Sequence< OUString > aSeq(1); - aSeq[0] = OUString("com.sun.star.ui.UIElementFactory"); + aSeq[0] = "com.sun.star.ui.UIElementFactory"; return aSeq; } 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 <rtl/ustrbuf.hxx> #include <vcl/svapp.hxx> +#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<OUString> 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 ); } |