summaryrefslogtreecommitdiff
path: root/sdext
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-11-06 17:24:13 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-11-06 17:24:13 +0100
commitfc0d57b7aff84f4bdca0a1f201527c265d5f0cf5 (patch)
tree49a72b76d2d2a92af6371748c19277778159b86d /sdext
parente36dae401fc8963c9a92cb2c11d9b650b943c6d3 (diff)
Revert "use the new OUString::fromUtf8 method"
This reverts commit 05050cdb23de586870bf479a9df5ced06828d498, not all places that use e.g. OStringToOUString to convert potential UTF-8 are guaranteed to fulfil the prerequisites necessary to use fromUtf8 (and some places like e.g. in codemaker are happy with the best-effort effect of OStringToOUString's OSTRING_TO_OUSTRING_CVTFLAGS).
Diffstat (limited to 'sdext')
-rw-r--r--sdext/source/pdfimport/pdfparse/pdfentries.cxx2
-rw-r--r--sdext/source/pdfimport/sax/emitcontext.cxx2
-rw-r--r--sdext/source/pdfimport/tree/style.cxx2
-rw-r--r--sdext/source/pdfimport/wrapper/wrapper.cxx10
4 files changed, 9 insertions, 7 deletions
diff --git a/sdext/source/pdfimport/pdfparse/pdfentries.cxx b/sdext/source/pdfimport/pdfparse/pdfentries.cxx
index 5fef51293c14..7607058ddd9a 100644
--- a/sdext/source/pdfimport/pdfparse/pdfentries.cxx
+++ b/sdext/source/pdfimport/pdfparse/pdfentries.cxx
@@ -185,7 +185,7 @@ OUString PDFName::getFilteredName() const
else
aFilter.append( pStr[i] );
}
- return OUString::fromUtf8( aFilter.makeStringAndClear() );
+ return OStringToOUString( aFilter.makeStringAndClear(), RTL_TEXTENCODING_UTF8 );
}
PDFString::~PDFString()
diff --git a/sdext/source/pdfimport/sax/emitcontext.cxx b/sdext/source/pdfimport/sax/emitcontext.cxx
index c4b91a83a88b..0a856ea29de1 100644
--- a/sdext/source/pdfimport/sax/emitcontext.cxx
+++ b/sdext/source/pdfimport/sax/emitcontext.cxx
@@ -52,7 +52,7 @@ SaxEmitter::SaxEmitter( const uno::Reference< xml::sax::XDocumentHandler >& xDoc
static const char* pDir = getenv( "DBG_PDFIMPORT_DIR" );
if( pDir )
{
- OUString aStr( OUString::fromUtf8( pDir ) );
+ OUString aStr( OStringToOUString( pDir, RTL_TEXTENCODING_UTF8 ) );
OUString aFileURL;
osl_getFileURLFromSystemPath( aStr.pData, &aFileURL.pData );
OUStringBuffer aBuf( 256 );
diff --git a/sdext/source/pdfimport/tree/style.cxx b/sdext/source/pdfimport/tree/style.cxx
index e5fdf4501c2d..4e91dcf26a8c 100644
--- a/sdext/source/pdfimport/tree/style.cxx
+++ b/sdext/source/pdfimport/tree/style.cxx
@@ -76,7 +76,7 @@ sal_Int32 StyleContainer::impl_getStyleId( const Style& rStyle, bool bSubStyle )
sal_Int32 StyleContainer::getStandardStyleId( const OString& rName )
{
PropertyMap aProps;
- aProps[ "style:family" ] = OUString::fromUtf8( rName );
+ aProps[ "style:family" ] = OStringToOUString( rName, RTL_TEXTENCODING_UTF8 );
aProps[ "style:name" ] = "standard";
Style aStyle( "style:style", aProps );
diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx b/sdext/source/pdfimport/wrapper/wrapper.cxx
index c6e09609f6ee..79d64fdf1bbf 100644
--- a/sdext/source/pdfimport/wrapper/wrapper.cxx
+++ b/sdext/source/pdfimport/wrapper/wrapper.cxx
@@ -382,7 +382,7 @@ void Parser::readChar()
// chars gobble up rest of line
m_nCharIndex = -1;
- m_pSink->drawGlyphs(OUString::fromUtf8(aChars),
+ m_pSink->drawGlyphs(OStringToOUString(aChars, RTL_TEXTENCODING_UTF8),
aRect, aUnoMatrix, fontSize);
}
@@ -600,7 +600,8 @@ void Parser::readFont()
}
// yet unknown font - get info and add to map
- FontAttributes aResult( OUString::fromUtf8( aFontName ),
+ FontAttributes aResult( OStringToOUString( aFontName,
+ RTL_TEXTENCODING_UTF8 ),
nIsBold != 0,
nIsItalic != 0,
nIsUnderline != 0,
@@ -782,8 +783,9 @@ void Parser::readLink()
readDouble(aBounds.Y2);
m_pSink->hyperLink( aBounds,
- OUString::fromUtf8( lcl_unescapeLineFeeds(
- m_aLine.copy(m_nCharIndex) ) ) );
+ OStringToOUString( lcl_unescapeLineFeeds(
+ m_aLine.copy(m_nCharIndex) ),
+ RTL_TEXTENCODING_UTF8 ) );
// name gobbles up rest of line
m_nCharIndex = -1;
}