diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-01-30 16:38:54 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-01-31 08:56:20 +0000 |
commit | 1c3e84d8192218befebcddae2ed9842d081dc6c7 (patch) | |
tree | f4fc5cddd181d6d49bf55f74e6d3d107b8ae8d18 /unotools | |
parent | e1e6cdbb1e9ff37f0bb740a70045c66953bec50c (diff) |
teach lolugin:stringconstant about calling constructors
so we can remove unnecessary calls to the OUString(literal) constructor
when calling constructors like this:
Foo(OUString("xxx"), 1)
Change-Id: I1de60ef561437c86b27dc9cb095a5deb2e103b36
Reviewed-on: https://gerrit.libreoffice.org/33698
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'unotools')
-rw-r--r-- | unotools/source/config/cmdoptions.cxx | 2 | ||||
-rw-r--r-- | unotools/source/config/compatibility.cxx | 2 | ||||
-rw-r--r-- | unotools/source/config/configmgr.cxx | 6 | ||||
-rw-r--r-- | unotools/source/config/dynamicmenuoptions.cxx | 2 | ||||
-rw-r--r-- | unotools/source/config/extendedsecurityoptions.cxx | 2 | ||||
-rw-r--r-- | unotools/source/config/fontoptions.cxx | 2 | ||||
-rw-r--r-- | unotools/source/config/lingucfg.cxx | 2 | ||||
-rw-r--r-- | unotools/source/config/misccfg.cxx | 2 | ||||
-rw-r--r-- | unotools/source/config/moduleoptions.cxx | 2 | ||||
-rw-r--r-- | unotools/source/config/printwarningoptions.cxx | 2 | ||||
-rw-r--r-- | unotools/source/config/saveopt.cxx | 4 | ||||
-rw-r--r-- | unotools/source/config/searchopt.cxx | 2 | ||||
-rw-r--r-- | unotools/source/config/securityoptions.cxx | 2 | ||||
-rw-r--r-- | unotools/source/config/syslocaleoptions.cxx | 2 |
14 files changed, 17 insertions, 17 deletions
diff --git a/unotools/source/config/cmdoptions.cxx b/unotools/source/config/cmdoptions.cxx index fe99ca33557b..d6a37d041a0f 100644 --- a/unotools/source/config/cmdoptions.cxx +++ b/unotools/source/config/cmdoptions.cxx @@ -42,7 +42,7 @@ using namespace ::osl; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; -#define ROOTNODE_CMDOPTIONS OUString("Office.Commands/Execute") +#define ROOTNODE_CMDOPTIONS "Office.Commands/Execute" #define PATHDELIMITER "/" #define SETNODE_DISABLED "Disabled" diff --git a/unotools/source/config/compatibility.cxx b/unotools/source/config/compatibility.cxx index b1d713e16347..b13972b683b5 100644 --- a/unotools/source/config/compatibility.cxx +++ b/unotools/source/config/compatibility.cxx @@ -36,7 +36,7 @@ using namespace ::osl; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; -#define ROOTNODE_OPTIONS OUString( "Office.Compatibility/" ) +#define ROOTNODE_OPTIONS "Office.Compatibility/" #define PATHDELIMITER "/" #define SETNODE_ALLFILEFORMATS "AllFileFormats" diff --git a/unotools/source/config/configmgr.cxx b/unotools/source/config/configmgr.cxx index c58fbcda72ce..959fc772684d 100644 --- a/unotools/source/config/configmgr.cxx +++ b/unotools/source/config/configmgr.cxx @@ -71,7 +71,7 @@ OUString getConfigurationString(OUString const & module, OUString const & path) { css::uno::Sequence< css::uno::Any > args(1); args[0] <<= css::beans::NamedValue( - OUString("nodepath"), + "nodepath", css::uno::makeAny(module)); return css::uno::Reference< css::container::XHierarchicalNameAccess >( @@ -148,11 +148,11 @@ css::uno::Reference< css::container::XHierarchicalNameAccess > utl::ConfigManager::acquireTree(utl::ConfigItem & item) { css::uno::Sequence< css::uno::Any > args(1); args[0] <<= css::beans::NamedValue( - OUString("nodepath"), + "nodepath", css::uno::makeAny("/org.openoffice." + item.GetSubTreeName())); if (item.GetMode() & ConfigItemMode::AllLocales) { args.realloc(2); - args[1] <<= css::beans::NamedValue(OUString("locale"), css::uno::makeAny(OUString("*"))); + args[1] <<= css::beans::NamedValue("locale", css::uno::makeAny(OUString("*"))); } return css::uno::Reference< css::container::XHierarchicalNameAccess >( getConfigurationProvider()->createInstanceWithArguments( diff --git a/unotools/source/config/dynamicmenuoptions.cxx b/unotools/source/config/dynamicmenuoptions.cxx index 5cb168baff63..9b88fdf56ead 100644 --- a/unotools/source/config/dynamicmenuoptions.cxx +++ b/unotools/source/config/dynamicmenuoptions.cxx @@ -40,7 +40,7 @@ using namespace ::osl; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; -#define ROOTNODE_MENUS OUString("Office.Common/Menus/") +#define ROOTNODE_MENUS "Office.Common/Menus/" #define PATHDELIMITER "/" #define SETNODE_NEWMENU "New" diff --git a/unotools/source/config/extendedsecurityoptions.cxx b/unotools/source/config/extendedsecurityoptions.cxx index a67aa9570b30..3c8911e3e32b 100644 --- a/unotools/source/config/extendedsecurityoptions.cxx +++ b/unotools/source/config/extendedsecurityoptions.cxx @@ -39,7 +39,7 @@ using namespace ::utl; using namespace ::osl; using namespace ::com::sun::star::uno; -#define ROOTNODE_SECURITY OUString("Office.Security") +#define ROOTNODE_SECURITY "Office.Security" #define SECURE_EXTENSIONS_SET OUString("SecureExtensions") #define EXTENSION_PROPNAME OUString("/Extension") diff --git a/unotools/source/config/fontoptions.cxx b/unotools/source/config/fontoptions.cxx index b51d4468e832..e373d733ab97 100644 --- a/unotools/source/config/fontoptions.cxx +++ b/unotools/source/config/fontoptions.cxx @@ -31,7 +31,7 @@ using namespace ::utl; using namespace ::osl; using namespace ::com::sun::star::uno; -#define ROOTNODE_FONT OUString("Office.Common/Font") +#define ROOTNODE_FONT "Office.Common/Font" #define PROPERTYNAME_REPLACEMENTTABLE "Substitution/Replacement" #define PROPERTYNAME_FONTHISTORY "View/History" diff --git a/unotools/source/config/lingucfg.cxx b/unotools/source/config/lingucfg.cxx index 14f4898e1f41..f89ae28b26b9 100644 --- a/unotools/source/config/lingucfg.cxx +++ b/unotools/source/config/lingucfg.cxx @@ -187,7 +187,7 @@ public: }; SvtLinguConfigItem::SvtLinguConfigItem() : - utl::ConfigItem( OUString("Office.Linguistic") ) + utl::ConfigItem( "Office.Linguistic" ) { const uno::Sequence< OUString > &rPropertyNames = GetPropertyNames(); LoadOptions( rPropertyNames ); diff --git a/unotools/source/config/misccfg.cxx b/unotools/source/config/misccfg.cxx index 64c195cb5b0d..c36630c02349 100644 --- a/unotools/source/config/misccfg.cxx +++ b/unotools/source/config/misccfg.cxx @@ -73,7 +73,7 @@ public: }; SfxMiscCfg::SfxMiscCfg() : - ConfigItem(OUString("Office.Common") ), + ConfigItem( "Office.Common" ), bPaperSize(false), bPaperOrientation (false), bNotFound (false), diff --git a/unotools/source/config/moduleoptions.cxx b/unotools/source/config/moduleoptions.cxx index 00f162ed6e8d..026c2528df8a 100644 --- a/unotools/source/config/moduleoptions.cxx +++ b/unotools/source/config/moduleoptions.cxx @@ -50,7 +50,7 @@ e.g.: NAMELIST[ PROPERTYHANDLE_xxx ] => VALUELIST[ PROPERTYHANDLE_xxx ] *//*-*************************************************************************************************************/ -#define ROOTNODE_FACTORIES OUString("Setup/Office/Factories") +#define ROOTNODE_FACTORIES "Setup/Office/Factories" #define PATHSEPARATOR "/" // Attention: The property "ooSetupFactoryEmptyDocumentURL" is read from configuration but not used! There is diff --git a/unotools/source/config/printwarningoptions.cxx b/unotools/source/config/printwarningoptions.cxx index 4634d7e4698d..49363aab3322 100644 --- a/unotools/source/config/printwarningoptions.cxx +++ b/unotools/source/config/printwarningoptions.cxx @@ -32,7 +32,7 @@ using namespace ::utl; using namespace ::osl; using namespace ::com::sun::star::uno; -#define ROOTNODE_START OUString("Office.Common/Print") +#define ROOTNODE_START "Office.Common/Print" #define PROPERTYNAME_PAPERSIZE OUString("Warning/PaperSize") #define PROPERTYNAME_PAPERORIENTATION OUString("Warning/PaperOrientation") diff --git a/unotools/source/config/saveopt.cxx b/unotools/source/config/saveopt.cxx index 8999d211b66d..18e3e3922f8b 100644 --- a/unotools/source/config/saveopt.cxx +++ b/unotools/source/config/saveopt.cxx @@ -394,7 +394,7 @@ Sequence< OUString > GetPropertyNames() } SvtSaveOptions_Impl::SvtSaveOptions_Impl() - : ConfigItem( OUString("Office.Common/Save") ) + : ConfigItem( "Office.Common/Save" ) , nAutoSaveTime( 0 ) , bUseUserData( false ) , bBackup( false ) @@ -776,7 +776,7 @@ public: const sal_Char cUserDefinedSettings[] = "UserDefinedSettings"; SvtLoadOptions_Impl::SvtLoadOptions_Impl() - : ConfigItem( OUString("Office.Common/Load") ) + : ConfigItem( "Office.Common/Load" ) , bLoadUserDefinedSettings( false ) { Sequence< OUString > aNames { cUserDefinedSettings }; diff --git a/unotools/source/config/searchopt.cxx b/unotools/source/config/searchopt.cxx index 9e799138fb04..f6a0fbffe575 100644 --- a/unotools/source/config/searchopt.cxx +++ b/unotools/source/config/searchopt.cxx @@ -67,7 +67,7 @@ public: }; SvtSearchOptions_Impl::SvtSearchOptions_Impl() : - ConfigItem( OUString("Office.Common/SearchOptions") ) + ConfigItem( "Office.Common/SearchOptions" ) { nFlags = 0x0003FFFF; // set all options values to 'true' Load(); diff --git a/unotools/source/config/securityoptions.cxx b/unotools/source/config/securityoptions.cxx index 72e103feb031..aa204f11eafa 100644 --- a/unotools/source/config/securityoptions.cxx +++ b/unotools/source/config/securityoptions.cxx @@ -39,7 +39,7 @@ using namespace ::utl; using namespace ::osl; using namespace ::com::sun::star::uno; -#define ROOTNODE_SECURITY OUString("Office.Common/Security/Scripting") +#define ROOTNODE_SECURITY "Office.Common/Security/Scripting" #define DEFAULT_SECUREURL Sequence< OUString >() #define DEFAULT_TRUSTEDAUTHORS Sequence< SvtSecurityOptions::Certificate >() diff --git a/unotools/source/config/syslocaleoptions.cxx b/unotools/source/config/syslocaleoptions.cxx index a5eaae528a0a..eb3cccdae5ea 100644 --- a/unotools/source/config/syslocaleoptions.cxx +++ b/unotools/source/config/syslocaleoptions.cxx @@ -100,7 +100,7 @@ public: const LanguageTag& GetRealUILocale() { return m_aRealUILocale; } }; -#define ROOTNODE_SYSLOCALE OUString("Setup/L10N") +#define ROOTNODE_SYSLOCALE "Setup/L10N" #define PROPERTYNAME_LOCALE "ooSetupSystemLocale" #define PROPERTYNAME_UILOCALE "ooLocale" |