summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-12-15 10:21:19 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-12-15 10:21:19 +0100
commit857742d60f579826cbd0ca5a5336348484714b2c (patch)
tree48b5a4e3f880caa878125c60f634bc0008bb5efa /writerfilter
parent14c1ffe5bd1186589a987135207877ef3214db8d (diff)
writerfilter: Use appropriate OUString functions on string constants
Change-Id: I113dba36c8c6a15f93fb4f15cd85ddb07ce5eecf
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/StyleSheetTable.cxx7
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx2
2 files changed, 4 insertions, 5 deletions
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index 89e00d9a8476..dcdad731d92a 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -1576,9 +1576,9 @@ OUString StyleSheetTable::getOrCreateCharStyle( PropertyValueVector_t& rCharProp
const OUString* pStyleNames = aStyleNames.getConstArray();
for( sal_Int32 nStyle = 0; nStyle < aStyleNames.getLength(); ++nStyle )
{
- if( pStyleNames[nStyle].matchAsciiL( cListLabel, sizeof( cListLabel ) - 1 ))
+ OUString sSuffix;
+ if( pStyleNames[nStyle].startsWith( cListLabel, &sSuffix ) )
{
- OUString sSuffix = pStyleNames[nStyle].copy( sizeof( cListLabel ) - 1 );
sal_Int32 nSuffix = sSuffix.toInt32();
if( nSuffix > 0 )
{
@@ -1587,8 +1587,7 @@ OUString StyleSheetTable::getOrCreateCharStyle( PropertyValueVector_t& rCharProp
}
}
}
- sListLabel = OUString::createFromAscii( cListLabel );
- sListLabel += OUString::number( ++nStyleFound );
+ sListLabel = cListLabel + OUString::number( ++nStyleFound );
//create a new one otherwise
uno::Reference< lang::XMultiServiceFactory > xDocFactory( m_pImpl->m_xTextDocument, uno::UNO_QUERY_THROW );
PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 8793529e10f1..fd5d02bb6818 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -1153,7 +1153,7 @@ void RTFDocumentImpl::text(OUString& rString)
{
// ; is the end of the entry
bool bEnd = false;
- if (rString.endsWithAsciiL(";", 1))
+ if (rString.endsWith(";"))
{
rString = rString.copy(0, rString.getLength() - 1);
bEnd = true;