diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-11-06 17:24:13 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-11-06 17:24:13 +0100 |
commit | fc0d57b7aff84f4bdca0a1f201527c265d5f0cf5 (patch) | |
tree | 49a72b76d2d2a92af6371748c19277778159b86d /desktop | |
parent | e36dae401fc8963c9a92cb2c11d9b650b943c6d3 (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 'desktop')
4 files changed, 7 insertions, 4 deletions
diff --git a/desktop/source/deployment/manager/dp_activepackages.cxx b/desktop/source/deployment/manager/dp_activepackages.cxx index 9768a2a5a358..42f6b4122bc7 100644 --- a/desktop/source/deployment/manager/dp_activepackages.cxx +++ b/desktop/source/deployment/manager/dp_activepackages.cxx @@ -176,7 +176,8 @@ ActivePackages::Entries ActivePackages::getEntries() const { RTL_TEXTENCODING_UTF8), decodeNewData(i->second))); } else { - OUString fn(OUString::fromUtf8(i->first)); + OUString fn( + OStringToOUString(i->first, RTL_TEXTENCODING_UTF8)); es.push_back( ::std::make_pair( ::dp_misc::generateLegacyIdentifier(fn), diff --git a/desktop/source/deployment/manager/dp_manager.cxx b/desktop/source/deployment/manager/dp_manager.cxx index e60f36b8311a..1529fb407ae5 100644 --- a/desktop/source/deployment/manager/dp_manager.cxx +++ b/desktop/source/deployment/manager/dp_manager.cxx @@ -253,7 +253,8 @@ void PackageManagerImpl::initActivationLayer( ::rtl::ByteSequence data = dp_misc::readFile(remFileContent); OString osData(reinterpret_cast<const sal_Char*>(data.getConstArray()), data.getLength()); - OUString sData = OUString::fromUtf8(osData); + OUString sData = OStringToOUString( + osData, RTL_TEXTENCODING_UTF8); if (!sData.equals(aUserName)) continue; } diff --git a/desktop/source/deployment/registry/configuration/dp_configuration.cxx b/desktop/source/deployment/registry/configuration/dp_configuration.cxx index e5fed36980d0..4af0fe373d02 100644 --- a/desktop/source/deployment/registry/configuration/dp_configuration.cxx +++ b/desktop/source/deployment/registry/configuration/dp_configuration.cxx @@ -755,7 +755,7 @@ void BackendImpl::PackageImpl::processPackage_( //we just add all other xcu/xcs files to the configmgr.ini instead of //rebuilding the directory structure. OUString url2( - OUString::fromUtf8(i->first)); + OStringToOUString(i->first, RTL_TEXTENCODING_UTF8)); if (url2 != url) { bool schema = i->second.equalsIgnoreAsciiCase( "vnd.sun.star.configuration-schema"); diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index d23adc16ae64..60c53fb16bf6 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -158,7 +158,8 @@ static OUString getUString(const char* pString) if (pString == NULL) return OUString(); - return OUString::fromUtf8(OString(pString, strlen(pString))); + OString sString(pString, strlen(pString)); + return OStringToOUString(sString, RTL_TEXTENCODING_UTF8); } // Try to convert a relative URL to an absolute one |