summaryrefslogtreecommitdiff
path: root/sfx2/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 /sfx2/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 'sfx2/source')
-rw-r--r--sfx2/source/appl/appinit.cxx3
-rw-r--r--sfx2/source/appl/appserv.cxx5
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx6
-rw-r--r--sfx2/source/dialog/filtergrouping.cxx16
-rw-r--r--sfx2/source/doc/docfac.cxx14
5 files changed, 20 insertions, 24 deletions
diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx
index 2fa68ad8cd9a..a2d5d487fd96 100644
--- a/sfx2/source/appl/appinit.cxx
+++ b/sfx2/source/appl/appinit.cxx
@@ -143,9 +143,8 @@ Sequence< OUString > SAL_CALL SfxTerminateListener_Impl::getSupportedServiceName
// The desktop must know, which listener will terminate the SfxApplication in real !
// It must call this special listener as last one ... otherwise we shutdown the SfxApplication BEFORE other listener
// can react ...
- static const OUString SERVICENAME("com.sun.star.frame.TerminateListener");
Sequence< OUString > lNames(1);
- lNames[0] = SERVICENAME;
+ lNames[0] = "com.sun.star.frame.TerminateListener";
return lNames;
}
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index e2477009b557..29a47a0609d0 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -906,10 +906,9 @@ namespace
return _pFallback;
}
- const OUString& lcl_getBasicIDEServiceName()
+ static OUString lcl_getBasicIDEServiceName()
{
- static const OUString s_sBasicName( "com.sun.star.script.BasicIDE" );
- return s_sBasicName;
+ return OUString( "com.sun.star.script.BasicIDE");
}
SfxViewFrame* lcl_getBasicIDEViewFrame( SfxObjectShell* i_pBasicIDE )
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index c95842da425b..18da893e5823 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -132,9 +132,9 @@ namespace
const OUString* GetLastFilterConfigId( FileDialogHelper::Context _eContext )
{
- static const OUString aSD_EXPORT_IDENTIFIER( "SdExportLastFilter" );
- static const OUString aSI_EXPORT_IDENTIFIER( "SiExportLastFilter" );
- static const OUString aSW_EXPORT_IDENTIFIER( "SwExportLastFilter" );
+ static const OUString aSD_EXPORT_IDENTIFIER("SdExportLastFilter");
+ static const OUString aSI_EXPORT_IDENTIFIER("SiExportLastFilter");
+ static const OUString aSW_EXPORT_IDENTIFIER("SwExportLastFilter");
const OUString* pRet = NULL;
diff --git a/sfx2/source/dialog/filtergrouping.cxx b/sfx2/source/dialog/filtergrouping.cxx
index b9af92d7c0f3..634d323f5e79 100644
--- a/sfx2/source/dialog/filtergrouping.cxx
+++ b/sfx2/source/dialog/filtergrouping.cxx
@@ -152,8 +152,8 @@ namespace sfx2
void lcl_ReadFilterClass( const OConfigurationNode& _rClassesNode, const OUString& _rLogicalClassName,
FilterClass& /* [out] */ _rClass )
{
- static const OUString sDisplaNameNodeName( "DisplayName" );
- static const OUString sSubFiltersNodeName( "Filters" );
+ static const char sDisplaNameNodeName[] = "DisplayName";
+ static const char sSubFiltersNodeName[] = "Filters";
// the description node for the current class
OConfigurationNode aClassDesc = _rClassesNode.openNode( _rLogicalClassName );
@@ -403,11 +403,9 @@ namespace sfx2
static const sal_Unicode s_cWildcardSeparator( ';' );
-
- const OUString& getSeparatorString()
+ static OUString getSeparatorString()
{
- static OUString s_sSeparatorString( &s_cWildcardSeparator, 1 );
- return s_sSeparatorString;
+ return OUString(";");
}
@@ -1177,9 +1175,9 @@ namespace sfx2
const OUString& _rExtension,
bool _bForOpen, FileDialogHelper_Impl& _rFileDlgImpl )
{
- static OUString sAllFilter( "(*.*)" );
- static OUString sOpenBracket( " (" );
- static OUString sCloseBracket( ")" );
+ static const char sAllFilter[] = "(*.*)";
+ static const char sOpenBracket[] = " (";
+ static const char sCloseBracket[] = ")";
OUString sRet = _rDisplayText;
if ( sRet.indexOf( sAllFilter ) == -1 )
diff --git a/sfx2/source/doc/docfac.cxx b/sfx2/source/doc/docfac.cxx
index fc3d48bdf7f4..55dd58283252 100644
--- a/sfx2/source/doc/docfac.cxx
+++ b/sfx2/source/doc/docfac.cxx
@@ -188,15 +188,15 @@ void SfxObjectFactory::SetModule_Impl( SfxModule *pMod )
void SfxObjectFactory::SetSystemTemplate( const OUString& rServiceName, const OUString& rTemplateName )
{
static const int nMaxPathSize = 16000;
- static OUString SERVICE_FILTER_FACTORY("com.sun.star.document.FilterFactory");
- static OUString SERVICE_TYPE_DECTECTION("com.sun.star.document.TypeDetection");
+ static const char SERVICE_FILTER_FACTORY[] = "com.sun.star.document.FilterFactory";
+ static const char SERVICE_TYPE_DECTECTION[] = "com.sun.star.document.TypeDetection";
- static OUString CONF_ROOT("/org.openoffice.Setup");
- static OUString CONF_PATH = "Office/Factories/" + rServiceName;
- static OUString PROP_DEF_TEMPL_CHANGED("ooSetupFactorySystemDefaultTemplateChanged");
- static OUString PROP_ACTUAL_FILTER("ooSetupFactoryActualFilter");
+ static const char CONF_ROOT[] = "/org.openoffice.Setup";
+ OUString CONF_PATH = "Office/Factories/" + rServiceName;
+ static const char PROP_DEF_TEMPL_CHANGED[] = "ooSetupFactorySystemDefaultTemplateChanged";
+ static const char PROP_ACTUAL_FILTER[] = "ooSetupFactoryActualFilter";
- static OUString DEF_TPL_STR("/soffice.");
+ static const char DEF_TPL_STR[] = "/soffice.";
OUString sURL;
OUString sPath;