summaryrefslogtreecommitdiffstats
path: root/oox
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-12-17 15:47:01 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-12-17 16:39:33 +0100
commit0f5e9170248df98ef7c7c6d475ff7d2bb9fa2214 (patch)
tree484d55e20e414c16202163b766fdd87777ebb46d /oox
parentGarbage in, garbage out? (diff)
downloadcore-0f5e9170248df98ef7c7c6d475ff7d2bb9fa2214.tar.gz
core-0f5e9170248df98ef7c7c6d475ff7d2bb9fa2214.zip
Introduce rtl::OUStringLiteral1
...to use single ASCII character literals "more directly" in the OUString API (instead of having to go via an intermediary OUString ctor call). Especially useful for character literals that are defined as const variables or via macros ("direct" uses of character literals in the OUString API can often simply be replaced with single-character string literals, for improved readability). (The functions overloaded for OUStringLiteral1 are those that are actually used by the existing LO code; more could potentially be added. The asymmetry in the operator ==/!= parameter types is by design, though---writing code like 'x' == s is an abomination that shall not be abetted.) Change-Id: Ic5264714be7439eed56b5dfca6ccaee277306f1f
Diffstat (limited to 'oox')
-rw-r--r--oox/source/drawingml/chart/titleconverter.cxx2
-rw-r--r--oox/source/dump/dumperbase.cxx2
-rw-r--r--oox/source/ole/axcontrol.cxx4
3 files changed, 4 insertions, 4 deletions
diff --git a/oox/source/drawingml/chart/titleconverter.cxx b/oox/source/drawingml/chart/titleconverter.cxx
index 0aeba99d7ca0..79863f56d1c4 100644
--- a/oox/source/drawingml/chart/titleconverter.cxx
+++ b/oox/source/drawingml/chart/titleconverter.cxx
@@ -122,7 +122,7 @@ Reference< XFormattedString > TextConverter::appendFormattedString(
try
{
xFmtStr = FormattedString::create( ConverterRoot::getComponentContext() );
- xFmtStr->setString( bAddNewLine ? (rString + OUString( '\n' )) : rString );
+ xFmtStr->setString( bAddNewLine ? (rString + "\n") : rString );
orStringVec.push_back( xFmtStr );
}
catch( Exception& )
diff --git a/oox/source/dump/dumperbase.cxx b/oox/source/dump/dumperbase.cxx
index 556b685ab5c4..404bd9f5d07c 100644
--- a/oox/source/dump/dumperbase.cxx
+++ b/oox/source/dump/dumperbase.cxx
@@ -1877,7 +1877,7 @@ OUString StorageObjectBase::getSysFileName( const OUString& rStrmName, const OUS
aFileName = aFileName.replace( *pcChar, '_' );
// build full path
- return rSysOutPath + OUString( '/' ) + aFileName;
+ return rSysOutPath + "/" + aFileName;
}
void StorageObjectBase::extractStream( StorageBase& rStrg, const OUString& rStrgPath, const OUString& rStrmName, const OUString& rSysFileName )
diff --git a/oox/source/ole/axcontrol.cxx b/oox/source/ole/axcontrol.cxx
index 8efc05bf952c..08eab4cb15e7 100644
--- a/oox/source/ole/axcontrol.cxx
+++ b/oox/source/ole/axcontrol.cxx
@@ -536,9 +536,9 @@ void ControlConverter::convertToAxState( PropertySet& rPropSet,
rValue.clear(); // empty e.g. 'don't know'
if ( nState == API_STATE_UNCHECKED )
- rValue = OUString('0');
+ rValue = "0";
else if ( nState == API_STATE_CHECKED )
- rValue = OUString('1');
+ rValue = "1";
// tristate
if( bSupportsTriState && rPropSet.getProperty( bTmp, PROP_TriState ) )