summaryrefslogtreecommitdiff
path: root/xmlscript/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-03-28 12:30:11 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-03-28 13:08:59 +0100
commit38814653ba6b76a6d6b4603c037cb52e0be300e8 (patch)
tree474d8e7e432a0428737bac9647347c126ff53fe5 /xmlscript/source
parentd2ed905c85301e2124125ad7701ab85ced7e2bee (diff)
remove static OUStrings from static_initialization_and_destruction chain
Diffstat (limited to 'xmlscript/source')
-rw-r--r--xmlscript/source/xmllib_imexp/xmllib_export.cxx20
1 files changed, 13 insertions, 7 deletions
diff --git a/xmlscript/source/xmllib_imexp/xmllib_export.cxx b/xmlscript/source/xmllib_imexp/xmllib_export.cxx
index 97f42c95b7a0..e20f335e17fa 100644
--- a/xmlscript/source/xmllib_imexp/xmllib_export.cxx
+++ b/xmlscript/source/xmllib_imexp/xmllib_export.cxx
@@ -38,8 +38,8 @@ using ::rtl::OUString;
namespace xmlscript
{
-static OUString aTrueStr ( RTL_CONSTASCII_USTRINGPARAM("true") );
-static OUString aFalseStr( RTL_CONSTASCII_USTRINGPARAM("false") );
+const char aTrueStr[] = "true";
+const char aFalseStr[] = "false";
//##################################################################################################
@@ -74,6 +74,9 @@ SAL_CALL exportLibraryContainer(
xOut->ignorableWhitespace( OUString() );
xOut->startElement( aLibrariesName, xAttributes );
+ rtl::OUString sTrueStr(aTrueStr);
+ rtl::OUString sFalseStr(aFalseStr);
+
int nLibCount = pLibArray->mnLibCount;
for( sal_Int32 i = 0 ; i < nLibCount ; i++ )
{
@@ -97,12 +100,12 @@ SAL_CALL exportLibraryContainer(
}
pLibElement->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_LIBRARY_PREFIX ":link") ),
- rLib.bLink ? aTrueStr : aFalseStr );
+ rLib.bLink ? sTrueStr : sFalseStr );
if( rLib.bLink )
{
pLibElement->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_LIBRARY_PREFIX ":readonly") ),
- rLib.bReadOnly ? aTrueStr : aFalseStr );
+ rLib.bReadOnly ? sTrueStr : sFalseStr );
}
pLibElement->dump( xOut.get() );
@@ -141,14 +144,17 @@ SAL_CALL exportLibrary(
pLibElement->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_LIBRARY_PREFIX ":name") ),
rLib.aName );
+ rtl::OUString sTrueStr(aTrueStr);
+ rtl::OUString sFalseStr(aFalseStr);
+
pLibElement->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_LIBRARY_PREFIX ":readonly") ),
- rLib.bReadOnly ? aTrueStr : aFalseStr );
+ rLib.bReadOnly ? sTrueStr : sFalseStr );
pLibElement->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_LIBRARY_PREFIX ":passwordprotected") ),
- rLib.bPasswordProtected ? aTrueStr : aFalseStr );
+ rLib.bPasswordProtected ? sTrueStr : sFalseStr );
if( rLib.bPreload )
- pLibElement->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_LIBRARY_PREFIX ":preload") ), aTrueStr );
+ pLibElement->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_LIBRARY_PREFIX ":preload") ), sTrueStr );
sal_Int32 nElementCount = rLib.aElementNames.getLength();
if( nElementCount )