diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-12-17 15:47:01 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-12-17 16:39:33 +0100 |
commit | 0f5e9170248df98ef7c7c6d475ff7d2bb9fa2214 (patch) | |
tree | 484d55e20e414c16202163b766fdd87777ebb46d /xmloff | |
parent | 0ba6360363fb73b5b200bbc486ed8eeac5f3d337 (diff) |
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 'xmloff')
-rw-r--r-- | xmloff/source/style/XMLFontAutoStylePool.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/style/impastpl.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/xmloff/source/style/XMLFontAutoStylePool.cxx b/xmloff/source/style/XMLFontAutoStylePool.cxx index 4800c0506675..c121842cbed9 100644 --- a/xmloff/source/style/XMLFontAutoStylePool.cxx +++ b/xmloff/source/style/XMLFontAutoStylePool.cxx @@ -174,7 +174,7 @@ OUString XMLFontAutoStylePool::Add( } if( sName.isEmpty() ) - sName = OUString( 'F' ); + sName = "F"; if( m_aNames.find(sName) != m_aNames.end() ) { diff --git a/xmloff/source/style/impastpl.cxx b/xmloff/source/style/impastpl.cxx index 365fd5e2c5c9..fc4cbb455271 100644 --- a/xmloff/source/style/impastpl.cxx +++ b/xmloff/source/style/impastpl.cxx @@ -415,7 +415,7 @@ void SvXMLAutoStylePoolP_Impl::AddFamily( OUString aPrefix( rStrPrefix ); if( bStylesOnly ) { - aPrefix = OUString( 'M' ); + aPrefix = "M"; aPrefix += rStrPrefix; } |