summaryrefslogtreecommitdiff
path: root/xmlscript
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 /xmlscript
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 'xmlscript')
-rw-r--r--xmlscript/source/xmlflat_imexp/xmlbas_export.cxx54
-rw-r--r--xmlscript/source/xmlflat_imexp/xmlbas_import.cxx54
2 files changed, 16 insertions, 92 deletions
diff --git a/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx b/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx
index f2b0ca28cf0d..dd77b3333c6b 100644
--- a/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx
+++ b/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx
@@ -42,64 +42,26 @@ namespace xmlscript
OUString getImplementationName_XMLBasicExporter()
{
- static OUString* pImplName = 0;
- if ( !pImplName )
- {
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if ( !pImplName )
- {
- static OUString aImplName( "com.sun.star.comp.xmlscript.XMLBasicExporter" );
- pImplName = &aImplName;
- }
- }
- return *pImplName;
+ return OUString( "com.sun.star.comp.xmlscript.XMLBasicExporter" );
}
Sequence< OUString > getSupportedServiceNames_XMLBasicExporter()
{
- static Sequence< OUString >* pNames = 0;
- if ( !pNames )
- {
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if ( !pNames )
- {
- static Sequence< OUString > aNames(1);
- aNames.getArray()[0] = "com.sun.star.document.XMLBasicExporter";
- pNames = &aNames;
- }
- }
- return *pNames;
+ Sequence< OUString > aNames(1);
+ aNames.getArray()[0] = "com.sun.star.document.XMLBasicExporter";
+ return aNames;
}
OUString getImplementationName_XMLOasisBasicExporter()
{
- static OUString* pImplName = 0;
- if ( !pImplName )
- {
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if ( !pImplName )
- {
- static OUString aImplName( "com.sun.star.comp.xmlscript.XMLOasisBasicExporter" );
- pImplName = &aImplName;
- }
- }
- return *pImplName;
+ return OUString( "com.sun.star.comp.xmlscript.XMLOasisBasicExporter" );
}
Sequence< OUString > getSupportedServiceNames_XMLOasisBasicExporter()
{
- static Sequence< OUString >* pNames = 0;
- if ( !pNames )
- {
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if ( !pNames )
- {
- static Sequence< OUString > aNames(1);
- aNames.getArray()[0] = "com.sun.star.document.XMLOasisBasicExporter";
- pNames = &aNames;
- }
- }
- return *pNames;
+ Sequence< OUString > aNames(1);
+ aNames.getArray()[0] = "com.sun.star.document.XMLOasisBasicExporter";
+ return aNames;
}
// XMLBasicExporterBase
diff --git a/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx b/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx
index 74263054c7a1..5359bde79941 100644
--- a/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx
+++ b/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx
@@ -500,64 +500,26 @@ void BasicImport::setDocumentLocator( const Reference< xml::sax::XLocator >& /*x
OUString getImplementationName_XMLBasicImporter()
{
- static OUString* pImplName = 0;
- if ( !pImplName )
- {
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if ( !pImplName )
- {
- static OUString aImplName( "com.sun.star.comp.xmlscript.XMLBasicImporter" );
- pImplName = &aImplName;
- }
- }
- return *pImplName;
+ return OUString( "com.sun.star.comp.xmlscript.XMLBasicImporter" );
}
Sequence< OUString > getSupportedServiceNames_XMLBasicImporter()
{
- static Sequence< OUString >* pNames = 0;
- if ( !pNames )
- {
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if ( !pNames )
- {
- static Sequence< OUString > aNames(1);
- aNames.getArray()[0] = "com.sun.star.document.XMLBasicImporter";
- pNames = &aNames;
- }
- }
- return *pNames;
+ Sequence< OUString > aNames(1);
+ aNames.getArray()[0] = "com.sun.star.document.XMLBasicImporter";
+ return aNames;
}
OUString getImplementationName_XMLOasisBasicImporter()
{
- static OUString* pImplName = 0;
- if ( !pImplName )
- {
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if ( !pImplName )
- {
- static OUString aImplName( "com.sun.star.comp.xmlscript.XMLOasisBasicImporter" );
- pImplName = &aImplName;
- }
- }
- return *pImplName;
+ return OUString( "com.sun.star.comp.xmlscript.XMLOasisBasicImporter" );
}
Sequence< OUString > getSupportedServiceNames_XMLOasisBasicImporter()
{
- static Sequence< OUString >* pNames = 0;
- if ( !pNames )
- {
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if ( !pNames )
- {
- static Sequence< OUString > aNames(1);
- aNames.getArray()[0] = "com.sun.star.document.XMLOasisBasicImporter";
- pNames = &aNames;
- }
- }
- return *pNames;
+ Sequence< OUString > aNames(1);
+ aNames.getArray()[0] = "com.sun.star.document.XMLOasisBasicImporter";
+ return aNames;
}
// XMLBasicImporterBase