summaryrefslogtreecommitdiff
path: root/cui/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-11-03 14:03:54 +0200
committerNoel Grandin <noel@peralex.com>2014-11-05 08:44:19 +0200
commit705c48d32eec0aa5180e60ca157daca4b154e4a3 (patch)
tree97f43496f4b429a2b8d03b1e71cb2a1c33142a15 /cui/source
parentb7d8a58ff2698ffc6e22943f64aa97c5ea253bd9 (diff)
fdo#38835 strip out OUString globals
they are largely unnecessary these days, since our OUString infrastructure gained optimised handling for static char constants. Change-Id: I07f73484f82d0582252cb4324d4107c998432c37
Diffstat (limited to 'cui/source')
-rw-r--r--cui/source/customize/acccfg.cxx14
-rw-r--r--cui/source/customize/cfgutil.cxx20
-rw-r--r--cui/source/customize/macropg.cxx13
-rw-r--r--cui/source/dialogs/cuigaldlg.cxx2
-rw-r--r--cui/source/options/connpoolconfig.cxx30
-rw-r--r--cui/source/options/optgdlg.cxx17
6 files changed, 43 insertions, 53 deletions
diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx
index bb7dd750e78d..d324dfebad23 100644
--- a/cui/source/customize/acccfg.cxx
+++ b/cui/source/customize/acccfg.cxx
@@ -78,14 +78,14 @@ using namespace com::sun::star;
-static OUString MODULEPROP_SHORTNAME ("ooSetupFactoryShortName" );
-static OUString MODULEPROP_UINAME ("ooSetupFactoryUIName" );
-static OUString CMDPROP_UINAME ("Name" );
+static const char MODULEPROP_SHORTNAME [] = "ooSetupFactoryShortName";
+static const char MODULEPROP_UINAME [] = "ooSetupFactoryUIName";
+static const char CMDPROP_UINAME [] = "Name";
-static OUString FOLDERNAME_UICONFIG ("Configurations2" );
+static const char FOLDERNAME_UICONFIG [] = "Configurations2";
-static OUString MEDIATYPE_PROPNAME ("MediaType" );
-static OUString MEDIATYPE_UICONFIG ("application/vnd.sun.xml.ui.configuration");
+static const char MEDIATYPE_PROPNAME [] = "MediaType";
+static const char MEDIATYPE_UICONFIG [] = "application/vnd.sun.xml.ui.configuration";
static const sal_uInt16 KEYCODE_ARRAY[] =
@@ -1354,7 +1354,7 @@ IMPL_LINK_NOARG(SfxAcceleratorConfigPage, SaveHdl)
OUString sMediaType;
xUIConfigProps->getPropertyValue(MEDIATYPE_PROPNAME) >>= sMediaType;
if (sMediaType.isEmpty())
- xUIConfigProps->setPropertyValue(MEDIATYPE_PROPNAME, css::uno::makeAny(MEDIATYPE_UICONFIG));
+ xUIConfigProps->setPropertyValue(MEDIATYPE_PROPNAME, css::uno::makeAny(OUString(MEDIATYPE_UICONFIG)));
css::uno::Reference< css::ui::XUIConfigurationManager2 > xCfgMgr2 = css::ui::UIConfigurationManager::create( m_xContext );
xCfgMgr2->setStorage(xUIConfig);
diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index 641f3b46496f..9f63afd4e447 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -75,14 +75,14 @@ void SfxStylesInfo_Impl::setModel(const ::com::sun::star::uno::Reference< ::com:
m_xDoc = xModel;
}
-static OUString CMDURL_SPART (".uno:StyleApply?Style:string=");
-static OUString CMDURL_FPART2 ("&FamilyName:string=");
+static const char CMDURL_SPART [] = ".uno:StyleApply?Style:string=";
+static const char CMDURL_FPART2[] = "&FamilyName:string=";
-static OUString CMDURL_STYLEPROT_ONLY (".uno:StyleApply?");
-static OUString CMDURL_SPART_ONLY ("Style:string=");
-static OUString CMDURL_FPART_ONLY ("FamilyName:string=");
+static const char CMDURL_STYLEPROT_ONLY[] = ".uno:StyleApply?";
+static const char CMDURL_SPART_ONLY [] = "Style:string=";
+static const char CMDURL_FPART_ONLY [] = "FamilyName:string=";
-static OUString STYLEPROP_UINAME ("DisplayName");
+static const char STYLEPROP_UINAME[] = "DisplayName";
OUString SfxStylesInfo_Impl::generateCommand(const OUString& sFamily, const OUString& sStyle)
{
@@ -96,9 +96,9 @@ OUString SfxStylesInfo_Impl::generateCommand(const OUString& sFamily, const OUSt
bool SfxStylesInfo_Impl::parseStyleCommand(SfxStyleInfo_Impl& aStyle)
{
- static sal_Int32 LEN_STYLEPROT = CMDURL_STYLEPROT_ONLY.getLength();
- static sal_Int32 LEN_SPART = CMDURL_SPART_ONLY.getLength();
- static sal_Int32 LEN_FPART = CMDURL_FPART_ONLY.getLength();
+ static const sal_Int32 LEN_STYLEPROT = strlen(CMDURL_STYLEPROT_ONLY);
+ static const sal_Int32 LEN_SPART = strlen(CMDURL_SPART_ONLY);
+ static const sal_Int32 LEN_FPART = strlen(CMDURL_FPART_ONLY);
if (!aStyle.sCommand.startsWith(CMDURL_STYLEPROT_ONLY))
return false;
@@ -205,7 +205,7 @@ void SfxStylesInfo_Impl::getLabel4Style(SfxStyleInfo_Impl& aStyle)
::std::vector< SfxStyleInfo_Impl > SfxStylesInfo_Impl::getStyles(const OUString& sFamily)
{
- static OUString PROP_UINAME ("DisplayName");
+ static const char PROP_UINAME[] = "DisplayName";
css::uno::Sequence< OUString > lStyleNames;
css::uno::Reference< css::style::XStyleFamiliesSupplier > xModel(m_xDoc, css::uno::UNO_QUERY_THROW);
diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx
index 1ac54fe04dcc..c2d44516ca7b 100644
--- a/cui/source/customize/macropg.cxx
+++ b/cui/source/customize/macropg.cxx
@@ -49,8 +49,8 @@
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
-static OUString aVndSunStarUNO( "vnd.sun.star.UNO:" );
-static OUString aVndSunStarScript( "vnd.sun.star.script:" );
+static const char aVndSunStarUNO[] = "vnd.sun.star.UNO:";
+static const char aVndSunStarScript[] = "vnd.sun.star.script:";
_SvxMacroTabPage_Impl::_SvxMacroTabPage_Impl( const SfxItemSet& rAttrSet )
: pAssignPB(NULL)
@@ -464,13 +464,11 @@ void IconLBoxString::Paint(
OUString aPureMethod;
if( bUNO )
{
- sal_Int32 nBegin = aVndSunStarUNO.getLength();
- aPureMethod = aURL.copy( nBegin );
+ aPureMethod = aURL.copy( strlen(aVndSunStarUNO) );
}
else
{
- sal_Int32 nBegin = aVndSunStarScript.getLength();
- aPureMethod = aURL.copy( nBegin );
+ aPureMethod = aURL.copy( strlen(aVndSunStarScript) );
aPureMethod = aPureMethod.copy( 0, aPureMethod.indexOf( '?' ) );
}
@@ -868,8 +866,7 @@ AssignComponentDialog::AssignComponentDialog( vcl::Window * pParent, const OUStr
OUString aMethodName;
if( maURL.startsWith( aVndSunStarUNO ) )
{
- sal_Int32 nBegin = aVndSunStarUNO.getLength();
- aMethodName = maURL.copy( nBegin );
+ aMethodName = maURL.copy( strlen(aVndSunStarUNO) );
}
mpMethodEdit->SetText( aMethodName, Selection( 0, SELECTION_MAX ) );
}
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index 2a90a96a71be..e06c973e3cbf 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -856,7 +856,7 @@ void TPGalleryThemeProperties::FillFilterList()
}
// media filters
- static const OUString aWildcard( "*." );
+ static const char aWildcard[] = "*.";
::avmedia::FilterNameVector aFilters;
::avmedia::MediaWindow::getMediaFilters( aFilters );
diff --git a/cui/source/options/connpoolconfig.cxx b/cui/source/options/connpoolconfig.cxx
index 621f699379a3..b021d6346941 100644
--- a/cui/source/options/connpoolconfig.cxx
+++ b/cui/source/options/connpoolconfig.cxx
@@ -37,45 +37,39 @@ namespace offapp
using namespace ::com::sun::star::uno;
- static const OUString& getConnectionPoolNodeName()
+ static OUString getConnectionPoolNodeName()
{
- static OUString s_sNodeName("org.openoffice.Office.DataAccess/ConnectionPool" );
- return s_sNodeName;
+ return OUString("org.openoffice.Office.DataAccess/ConnectionPool" );
}
- static const OUString& getEnablePoolingNodeName()
+ static OUString getEnablePoolingNodeName()
{
- static OUString s_sNodeName("EnablePooling");
- return s_sNodeName;
+ return OUString("EnablePooling");
}
- static const OUString& getDriverSettingsNodeName()
+ static OUString getDriverSettingsNodeName()
{
- static OUString s_sNodeName("DriverSettings");
- return s_sNodeName;
+ return OUString("DriverSettings");
}
- static const OUString& getDriverNameNodeName()
+ static OUString getDriverNameNodeName()
{
- static OUString s_sNodeName("DriverName");
- return s_sNodeName;
+ return OUString("DriverName");
}
- static const OUString& getEnableNodeName()
+ static OUString getEnableNodeName()
{
- static OUString s_sNodeName("Enable");
- return s_sNodeName;
+ return OUString("Enable");
}
- static const OUString& getTimeoutNodeName()
+ static OUString getTimeoutNodeName()
{
- static OUString s_sNodeName("Timeout");
- return s_sNodeName;
+ return OUString("Timeout");
}
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 5d0a32eef05f..29e1387354c6 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -987,12 +987,11 @@ struct LanguageConfig_Impl
static bool bLanguageCurrentDoc_Impl = false;
// some things we'll need...
-static const OUString sAccessSrvc("com.sun.star.configuration.ConfigurationAccess");
-static const OUString sAccessUpdSrvc("com.sun.star.configuration.ConfigurationUpdateAccess");
-static const OUString sInstalledLocalesPath("org.openoffice.Setup/Office/InstalledLocales");
-static OUString sUserLocalePath("org.openoffice.Office.Linguistic/General");
-//static const OUString sUserLocalePath("org.openoffice.Office/Linguistic");
-static const OUString sUserLocaleKey("UILocale");
+static const char sAccessSrvc[] = "com.sun.star.configuration.ConfigurationAccess";
+static const char sAccessUpdSrvc[] = "com.sun.star.configuration.ConfigurationUpdateAccess";
+static const char sInstalledLocalesPath[] = "org.openoffice.Setup/Office/InstalledLocales";
+static const char sUserLocalePath[] = "org.openoffice.Office.Linguistic/General";
+static const char sUserLocaleKey[] = "UILocale";
static Sequence< OUString > seqInstalledLanguages;
static OUString lcl_getDatePatternsConfigString( const LocaleDataWrapper& rLocaleWrapper )
@@ -1059,7 +1058,7 @@ OfaLanguagesTabPage::OfaLanguagesTabPage(vcl::Window* pParent, const SfxItemSet&
Reference< XNameAccess > theNameAccess;
// find out which locales are currently installed and add them to the listbox
- theArgs[0] = makeAny(NamedValue(OUString("nodepath"), makeAny(sInstalledLocalesPath)));
+ theArgs[0] = makeAny(NamedValue(OUString("nodepath"), makeAny(OUString(sInstalledLocalesPath))));
theNameAccess = Reference< XNameAccess > (
theConfigProvider->createInstanceWithArguments(sAccessSrvc, theArgs ), UNO_QUERY_THROW );
seqInstalledLanguages = theNameAccess->getElementNames();
@@ -1078,7 +1077,7 @@ OfaLanguagesTabPage::OfaLanguagesTabPage(vcl::Window* pParent, const SfxItemSet&
// find out whether the user has a specific locale specified
Sequence< Any > theArgs2(1);
- theArgs2[0] = makeAny(NamedValue(OUString("nodepath"), makeAny(sUserLocalePath)));
+ theArgs2[0] = makeAny(NamedValue(OUString("nodepath"), makeAny(OUString(sUserLocalePath))));
theNameAccess = Reference< XNameAccess > (
theConfigProvider->createInstanceWithArguments(sAccessSrvc, theArgs2 ), UNO_QUERY_THROW );
if (theNameAccess->hasByName(sUserLocaleKey))
@@ -1236,7 +1235,7 @@ bool OfaLanguagesTabPage::FillItemSet( SfxItemSet* rSet )
com::sun::star::configuration::theDefaultProvider::get(
comphelper::getProcessComponentContext()));
Sequence< Any > theArgs(1);
- theArgs[0] = makeAny(NamedValue(OUString("nodepath"), makeAny(sUserLocalePath)));
+ theArgs[0] = makeAny(NamedValue(OUString("nodepath"), makeAny(OUString(sUserLocalePath))));
Reference< XPropertySet >xProp(
theConfigProvider->createInstanceWithArguments(sAccessUpdSrvc, theArgs ), UNO_QUERY_THROW );
if ( !m_sUserLocaleValue.equals(aLangString))