summaryrefslogtreecommitdiff
path: root/vcl
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 /vcl
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 'vcl')
-rw-r--r--vcl/generic/fontmanager/fontconfig.cxx8
-rw-r--r--vcl/generic/fontmanager/helper.cxx2
-rw-r--r--vcl/source/control/edit.cxx2
-rw-r--r--vcl/source/control/fixed.cxx2
-rw-r--r--vcl/source/control/fixedhyper.cxx2
-rw-r--r--vcl/source/control/tabctrl.cxx4
-rw-r--r--vcl/source/filter/graphicfilter.cxx4
-rw-r--r--vcl/source/gdi/impimagetree.cxx4
-rw-r--r--vcl/source/window/builder.cxx39
-rw-r--r--vcl/source/window/layout.cxx4
-rw-r--r--vcl/source/window/menu.cxx2
-rw-r--r--vcl/source/window/menuwindow.cxx2
-rw-r--r--vcl/source/window/printdlg.cxx2
-rw-r--r--vcl/source/window/status.cxx4
-rw-r--r--vcl/source/window/toolbox.cxx4
-rw-r--r--vcl/source/window/window.cxx17
-rw-r--r--vcl/source/window/window2.cxx10
-rw-r--r--vcl/unx/generic/app/i18n_cb.cxx2
-rw-r--r--vcl/unx/generic/printer/jobdata.cxx2
-rw-r--r--vcl/unx/generic/printer/printerinfomanager.cxx20
-rw-r--r--vcl/unx/gtk/a11y/atktextattributes.cxx2
-rw-r--r--vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx4
-rw-r--r--vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx2
-rw-r--r--vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx2
24 files changed, 75 insertions, 71 deletions
diff --git a/vcl/generic/fontmanager/fontconfig.cxx b/vcl/generic/fontmanager/fontconfig.cxx
index 73fb00e5d44f..1a9dd396fe4c 100644
--- a/vcl/generic/fontmanager/fontconfig.cxx
+++ b/vcl/generic/fontmanager/fontconfig.cxx
@@ -577,7 +577,7 @@ void PrintFontManager::countFontconfigFonts( boost::unordered_map<OString, int,
continue;
}
- int nFamilyName = m_pAtoms->getAtom( ATOM_FAMILYNAME, OUString::fromUtf8( OString( (sal_Char*)family ) ), true );
+ int nFamilyName = m_pAtoms->getAtom( ATOM_FAMILYNAME, OStringToOUString( OString( (sal_Char*)family ), RTL_TEXTENCODING_UTF8 ), true );
PrintFont* pUpdate = aFonts.front();
std::list<PrintFont*>::const_iterator second_font = aFonts.begin();
++second_font;
@@ -630,7 +630,7 @@ void PrintFontManager::countFontconfigFonts( boost::unordered_map<OString, int,
pUpdate->m_eItalic = convertSlant(slant);
if( eStyleRes == FcResultMatch )
{
- pUpdate->m_aStyleName = OUString::fromUtf8( OString( (sal_Char*)style ) );
+ pUpdate->m_aStyleName = OStringToOUString( OString( (sal_Char*)style ), RTL_TEXTENCODING_UTF8 );
}
// update font cache
@@ -877,7 +877,7 @@ namespace
const char* pScriptCode = uscript_getShortName(eScript);
if (pScriptCode)
aBuf.append('-').append(pScriptCode);
- return LanguageTag(OUString::fromUtf8(aBuf.makeStringAndClear()));
+ return LanguageTag(OStringToOUString(aBuf.makeStringAndClear(), RTL_TEXTENCODING_UTF8));
}
#if defined(ENABLE_DBUS) && defined(ENABLE_PACKAGEKIT)
@@ -1056,7 +1056,7 @@ bool PrintFontManager::Substitute( FontSelectPattern &rPattern, OUString& rMissi
rWrapper.m_aFontNameToLocalized.find(sFamily);
if (aI != rWrapper.m_aFontNameToLocalized.end())
sFamily = aI->second;
- rPattern.maSearchName = OUString::fromUtf8( sFamily );
+ rPattern.maSearchName = OStringToOUString( sFamily, RTL_TEXTENCODING_UTF8 );
bRet = true;
}
}
diff --git a/vcl/generic/fontmanager/helper.cxx b/vcl/generic/fontmanager/helper.cxx
index da8e2a55a477..3a313190ea80 100644
--- a/vcl/generic/fontmanager/helper.cxx
+++ b/vcl/generic/fontmanager/helper.cxx
@@ -163,7 +163,7 @@ void psp::getPrinterPathList( std::list< OUString >& rPathList, const char* pSub
#ifdef SYSTEM_PPD_DIR
if( pSubDir && rtl_str_compare( pSubDir, PRINTER_PPDDIR ) == 0 )
{
- rPathList.push_back( OUString::fromUtf8( OString( SYSTEM_PPD_DIR ) ) );
+ rPathList.push_back( OStringToOUString( OString( SYSTEM_PPD_DIR ), RTL_TEXTENCODING_UTF8 ) );
}
#endif
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index cfc2ca735d90..ffe94bfd11c2 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -231,7 +231,7 @@ bool Edit::set_property(const OString &rKey, const OString &rValue)
SetStyle(nBits);
}
else if (rKey == "placeholder-text")
- SetPlaceholderText(OUString::fromUtf8(rValue));
+ SetPlaceholderText(OStringToOUString(rValue, RTL_TEXTENCODING_UTF8));
else
return Control::set_property(rKey, rValue);
return true;
diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx
index d86356e056ff..a0d3da11eccd 100644
--- a/vcl/source/control/fixed.cxx
+++ b/vcl/source/control/fixed.cxx
@@ -1049,7 +1049,7 @@ Image FixedImage::loadThemeImage(const OString &rFileName)
static ImplImageTreeSingletonRef aImageTree;
OUString sIconTheme =
Application::GetSettings().GetStyleSettings().DetermineIconTheme();
- const OUString sFileName(OUString::fromUtf8(rFileName));
+ const OUString sFileName(OStringToOUString(rFileName, RTL_TEXTENCODING_UTF8));
BitmapEx aBitmap;
bool bSuccess = aImageTree->loadImage(sFileName, sIconTheme, aBitmap, true);
SAL_WARN_IF(!bSuccess, "vcl.layout", "Unable to load " << sFileName
diff --git a/vcl/source/control/fixedhyper.cxx b/vcl/source/control/fixedhyper.cxx
index 701c529985cf..6926a0c843c6 100644
--- a/vcl/source/control/fixedhyper.cxx
+++ b/vcl/source/control/fixedhyper.cxx
@@ -134,7 +134,7 @@ void FixedHyperlink::SetText(const OUString& rNewDescription)
bool FixedHyperlink::set_property(const OString &rKey, const OString &rValue)
{
if (rKey == "uri")
- SetURL(OUString::fromUtf8(rValue));
+ SetURL(OStringToOUString(rValue, RTL_TEXTENCODING_UTF8));
else
return FixedText::set_property(rKey, rValue);
return true;
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index 11d2b9f2e156..8c58442ba063 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -1366,7 +1366,7 @@ void TabControl::RequestHelp( const HelpEvent& rHEvt )
}
else if ( rHEvt.GetMode() & HELPMODE_EXTENDED )
{
- OUString aHelpId( OUString::fromUtf8( GetHelpId( nItemId ) ) );
+ OUString aHelpId( OStringToOUString( GetHelpId( nItemId ), RTL_TEXTENCODING_UTF8 ) );
if ( !aHelpId.isEmpty() )
{
// call Help if existing
@@ -1962,7 +1962,7 @@ const OUString& TabControl::GetHelpText( sal_uInt16 nPageId ) const
{
Help* pHelp = Application::GetHelp();
if ( pHelp )
- pItem->maHelpText = pHelp->GetHelpText( OUString::fromUtf8( pItem->maHelpId ), this );
+ pItem->maHelpText = pHelp->GetHelpText( OStringToOUString( pItem->maHelpId, RTL_TEXTENCODING_UTF8 ), this );
}
return pItem->maHelpText;
}
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index 243668edbcf0..b7d046686b5d 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -2199,14 +2199,14 @@ IMPL_LINK( GraphicFilter, FilterCallback, ConvertData*, pData )
if( GRAPHIC_NONE == pData->maGraphic.GetType() || pData->maGraphic.GetContext() ) // Import
{
// Import
- nFormat = GetImportFormatNumberForShortName( OUString::fromUtf8( aShortName) );
+ nFormat = GetImportFormatNumberForShortName( OStringToOUString( aShortName, RTL_TEXTENCODING_UTF8) );
nRet = ImportGraphic( pData->maGraphic, OUString(), pData->mrStm, nFormat ) == 0;
}
#ifndef DISABLE_EXPORT
else if( !aShortName.isEmpty() )
{
// Export
- nFormat = GetExportFormatNumberForShortName( OUString::fromUtf8(aShortName) );
+ nFormat = GetExportFormatNumberForShortName( OStringToOUString(aShortName, RTL_TEXTENCODING_UTF8) );
nRet = ExportGraphic( pData->maGraphic, OUString(), pData->mrStm, nFormat ) == 0;
}
#endif
diff --git a/vcl/source/gdi/impimagetree.cxx b/vcl/source/gdi/impimagetree.cxx
index e803b00d54da..e81bafe54269 100644
--- a/vcl/source/gdi/impimagetree.cxx
+++ b/vcl/source/gdi/impimagetree.cxx
@@ -326,8 +326,8 @@ void ImplImageTree::parseLinkFile(boost::shared_ptr< SvStream > pStream)
continue;
sal_Int32 nIndex = 0;
- aLink = OUString::fromUtf8( aLine.getToken(0, ' ', nIndex) );
- aOriginal = OUString::fromUtf8( aLine.getToken(0, ' ', nIndex) );
+ aLink = OStringToOUString( aLine.getToken(0, ' ', nIndex), RTL_TEXTENCODING_UTF8 );
+ aOriginal = OStringToOUString( aLine.getToken(0, ' ', nIndex), RTL_TEXTENCODING_UTF8 );
// skip comments, or incomplete entries
if (aLink.isEmpty() || aLink[0] == '#' || aOriginal.isEmpty())
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 71531495ac00..9431819075b7 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -833,7 +833,7 @@ namespace
if (!rFrame.is())
return;
- OUString aCommand(OUString::fromUtf8(extractActionName(rMap)));
+ OUString aCommand(OStringToOUString(extractActionName(rMap), RTL_TEXTENCODING_UTF8));
if (aCommand.isEmpty())
return;
@@ -1393,7 +1393,7 @@ vcl::Window *VclBuilder::makeObject(vcl::Window *pParent, const OString &name, c
MetricField *pField = new MetricField(pParent, nBits);
pField->SetUnit(eUnit);
if (eUnit == FUNIT_CUSTOM)
- pField->SetCustomUnitText(OUString::fromUtf8(sUnit));
+ pField->SetCustomUnitText(OStringToOUString(sUnit, RTL_TEXTENCODING_UTF8));
pWindow = pField;
}
}
@@ -1427,7 +1427,7 @@ vcl::Window *VclBuilder::makeObject(vcl::Window *pParent, const OString &name, c
pBox->SetUnit(eUnit);
pBox->SetDecimalDigits(extractDecimalDigits(sPattern));
if (eUnit == FUNIT_CUSTOM)
- pBox->SetCustomUnitText(OUString::fromUtf8(sUnit));
+ pBox->SetCustomUnitText(OStringToOUString(sUnit, RTL_TEXTENCODING_UTF8));
pWindow = pBox;
}
else if (extractEntry(rMap))
@@ -1438,7 +1438,7 @@ vcl::Window *VclBuilder::makeObject(vcl::Window *pParent, const OString &name, c
{
sal_uInt16 nActiveId = extractActive(rMap);
for (std::vector<OString>::const_iterator aI = rItems.begin(), aEnd = rItems.end(); aI != aEnd; ++aI)
- pComboBox->InsertEntry(OUString::fromUtf8(*aI));
+ pComboBox->InsertEntry(OStringToOUString(*aI, RTL_TEXTENCODING_UTF8));
if (nActiveId < rItems.size())
pComboBox->SelectEntryPos(nActiveId);
}
@@ -1452,7 +1452,7 @@ vcl::Window *VclBuilder::makeObject(vcl::Window *pParent, const OString &name, c
{
sal_uInt16 nActiveId = extractActive(rMap);
for (std::vector<OString>::const_iterator aI = rItems.begin(), aEnd = rItems.end(); aI != aEnd; ++aI)
- pListBox->InsertEntry(OUString::fromUtf8(*aI));
+ pListBox->InsertEntry(OStringToOUString(*aI, RTL_TEXTENCODING_UTF8));
if (nActiveId < rItems.size())
pListBox->SelectEntryPos(nActiveId);
}
@@ -1483,7 +1483,7 @@ vcl::Window *VclBuilder::makeObject(vcl::Window *pParent, const OString &name, c
pBox->SetUnit(eUnit);
pBox->SetDecimalDigits(extractDecimalDigits(sPattern));
if (eUnit == FUNIT_CUSTOM)
- pBox->SetCustomUnitText(OUString::fromUtf8(sUnit));
+ pBox->SetCustomUnitText(OStringToOUString(sUnit, RTL_TEXTENCODING_UTF8));
pWindow = pBox;
}
else
@@ -1617,7 +1617,7 @@ vcl::Window *VclBuilder::makeObject(vcl::Window *pParent, const OString &name, c
ToolBox *pToolBox = dynamic_cast<ToolBox*>(pParent);
if (pToolBox)
{
- OUString aCommand(OUString::fromUtf8(extractActionName(rMap)));
+ OUString aCommand(OStringToOUString(extractActionName(rMap), RTL_TEXTENCODING_UTF8));
sal_uInt16 nItemId = 0;
ToolBoxItemBits nBits = ToolBoxItemBits::NONE;
@@ -1634,14 +1634,14 @@ vcl::Window *VclBuilder::makeObject(vcl::Window *pParent, const OString &name, c
const sal_uInt16 COMMAND_ITEMID_START = 30000;
nItemId = COMMAND_ITEMID_START + pToolBox->GetItemCount();
pToolBox->InsertItem(nItemId,
- OUString::fromUtf8(extractLabel(rMap)), nBits);
+ OStringToOUString(extractLabel(rMap), RTL_TEXTENCODING_UTF8), nBits);
pToolBox->SetItemCommand(nItemId, aCommand);
pToolBox->SetHelpId(nItemId, m_sHelpRoot + id);
}
OString sTooltip(extractTooltipText(rMap));
if (!sTooltip.isEmpty())
- pToolBox->SetQuickHelpText(nItemId, OUString::fromUtf8(sTooltip));
+ pToolBox->SetQuickHelpText(nItemId, OStringToOUString(sTooltip, RTL_TEXTENCODING_UTF8));
OString sIconName(extractIconName(rMap));
if (!sIconName.isEmpty())
@@ -1679,10 +1679,10 @@ vcl::Window *VclBuilder::makeObject(vcl::Window *pParent, const OString &name, c
#ifdef SAL_DLLPREFIX
sModuleBuf.append(SAL_DLLPREFIX);
#endif
- sModuleBuf.append(OUString::fromUtf8(name.copy(0, nDelim)));
+ sModuleBuf.append(OStringToOUString(name.copy(0, nDelim), RTL_TEXTENCODING_UTF8));
sModuleBuf.append(SAL_DLLEXTENSION);
#endif
- OUString sFunction(OUString::fromUtf8(OString("make") + name.copy(nDelim+1)));
+ OUString sFunction(OStringToOUString(OString("make") + name.copy(nDelim+1), RTL_TEXTENCODING_UTF8));
#ifndef DISABLE_DYNLOADING
OUString sModule = sModuleBuf.makeStringAndClear();
ModuleMap::iterator aI = m_aModuleMap.find(sModule);
@@ -1886,7 +1886,8 @@ void VclBuilder::handleTabChild(vcl::Window *pParent, xmlreader::XmlReader &read
if (aFind != aProperties.end())
{
sal_uInt16 nPageId = pTabControl->GetCurPageId();
- pTabControl->SetPageText(nPageId, OUString::fromUtf8(aFind->second));
+ pTabControl->SetPageText(nPageId,
+ OStringToOUString(aFind->second, RTL_TEXTENCODING_UTF8));
pTabControl->SetPageName(nPageId, sID);
}
else
@@ -2446,7 +2447,7 @@ std::vector<OString> VclBuilder::handleItems(xmlreader::XmlReader &reader, const
if (m_pStringReplace)
{
- OUString sTmp = (*m_pStringReplace)(OUString::fromUtf8(sValue));
+ OUString sTmp = (*m_pStringReplace)(OStringToOUString(sValue, RTL_TEXTENCODING_UTF8));
sValue = OUStringToOString(sTmp, RTL_TEXTENCODING_UTF8);
}
@@ -2710,7 +2711,7 @@ void VclBuilder::insertMenuObject(PopupMenu *pParent, const OString &rClass, con
if (rClass == "GtkMenuItem")
{
- OUString sLabel(OUString::fromUtf8(convertMnemonicMarkup(extractLabel(rProps))));
+ OUString sLabel(OStringToOUString(convertMnemonicMarkup(extractLabel(rProps)), RTL_TEXTENCODING_UTF8));
pParent->InsertItem(nNewId, sLabel, MenuItemBits::TEXT, rID);
}
else if (rClass == "GtkSeparatorMenuItem")
@@ -2730,9 +2731,9 @@ void VclBuilder::insertMenuObject(PopupMenu *pParent, const OString &rClass, con
const OString &rValue = aI->second;
if (rKey == "tooltip-markup")
- pParent->SetTipHelpText(nNewId, OUString::fromUtf8(rValue));
+ pParent->SetTipHelpText(nNewId, OStringToOUString(rValue, RTL_TEXTENCODING_UTF8));
else if (rKey == "tooltip-text")
- pParent->SetTipHelpText(nNewId, OUString::fromUtf8(rValue));
+ pParent->SetTipHelpText(nNewId, OStringToOUString(rValue, RTL_TEXTENCODING_UTF8));
else if (rKey == "visible")
pParent->ShowItem(nNewId, toBool(rValue));
else if (rKey == "has-default" && toBool(rValue))
@@ -3062,7 +3063,7 @@ void VclBuilder::collectProperty(xmlreader::XmlReader &reader, const OString &rI
sProperty = sProperty.replace('_', '-');
if (m_pStringReplace)
{
- OUString sTmp = (*m_pStringReplace)(OUString::fromUtf8(sValue));
+ OUString sTmp = (*m_pStringReplace)(OStringToOUString(sValue, RTL_TEXTENCODING_UTF8));
rMap[sProperty] = OUStringToOString(sTmp, RTL_TEXTENCODING_UTF8);
}
else
@@ -3290,7 +3291,7 @@ void VclBuilder::mungeModel(ListBox &rTarget, const ListStore &rStore, sal_uInt1
aI != aEnd; ++aI)
{
const ListStore::row &rRow = *aI;
- sal_uInt16 nEntry = rTarget.InsertEntry(OUString::fromUtf8(rRow[0]));
+ sal_uInt16 nEntry = rTarget.InsertEntry(OStringToOUString(rRow[0], RTL_TEXTENCODING_UTF8));
if (rRow.size() > 1)
{
sal_IntPtr nValue = rRow[1].toInt32();
@@ -3433,7 +3434,7 @@ void VclBuilder::mungeTextBuffer(VclMultiLineEdit &rTarget, const TextBuffer &rT
const OString &rValue = aI->second;
if (rKey == "text")
- rTarget.SetText(OUString::fromUtf8(rValue));
+ rTarget.SetText(OStringToOUString(rValue, RTL_TEXTENCODING_UTF8));
else
{
SAL_INFO("vcl.layout", "unhandled property :" << rKey.getStr());
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 2a56ca99c00a..590525fe3b4d 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -2220,9 +2220,9 @@ OUString MessageDialog::get_secondary_text() const
bool MessageDialog::set_property(const OString &rKey, const OString &rValue)
{
if (rKey == "text")
- set_primary_text(OUString::fromUtf8(rValue));
+ set_primary_text(OStringToOUString(rValue, RTL_TEXTENCODING_UTF8));
else if (rKey == "secondary-text")
- set_secondary_text(OUString::fromUtf8(rValue));
+ set_secondary_text(OStringToOUString(rValue, RTL_TEXTENCODING_UTF8));
else if (rKey == "message-type")
{
VclMessageType eMode = VCL_MESSAGE_INFO;
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 03ca36f214d6..546725aed72b 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -1182,7 +1182,7 @@ OUString Menu::ImplGetHelpText( sal_uInt16 nItemId ) const
if (!pData->aCommandStr.isEmpty())
pData->aHelpText = pHelp->GetHelpText( pData->aCommandStr, NULL );
if (pData->aHelpText.isEmpty() && !pData->aHelpId.isEmpty())
- pData->aHelpText = pHelp->GetHelpText( OUString::fromUtf8( pData->aHelpId ), NULL );
+ pData->aHelpText = pHelp->GetHelpText( OStringToOUString( pData->aHelpId, RTL_TEXTENCODING_UTF8 ), NULL );
}
}
diff --git a/vcl/source/window/menuwindow.cxx b/vcl/source/window/menuwindow.cxx
index 88b0e8ab159c..ddfe6bffbc97 100644
--- a/vcl/source/window/menuwindow.cxx
+++ b/vcl/source/window/menuwindow.cxx
@@ -151,7 +151,7 @@ bool MenuWindow::ImplHandleHelpEvent(vcl::Window* pMenuWindow, Menu* pMenu, sal_
if ( !aCommand.isEmpty() )
pHelp->Start( aCommand, NULL );
else
- pHelp->Start( OUString::fromUtf8( aHelpId ), NULL );
+ pHelp->Start( OStringToOUString( aHelpId, RTL_TEXTENCODING_UTF8 ), NULL );
}
bDone = true;
}
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 4acd97de0e8a..715e75e2909d 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -775,7 +775,7 @@ void PrintDialog::storeToSettings()
mpTabCtrl->GetPageText( mpTabCtrl->GetCurPageId() ) );
pItem->setValue( OUString( "PrintDialog" ),
OUString( "WindowState" ),
- OUString::fromUtf8( GetWindowState() )
+ OStringToOUString( GetWindowState(), RTL_TEXTENCODING_UTF8 )
);
pItem->Commit();
}
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index ad9e04dacc8b..c4ccf055f433 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -800,7 +800,7 @@ void StatusBar::RequestHelp( const HelpEvent& rHEvt )
if ( !aCommand.isEmpty() )
pHelp->Start( aCommand, this );
else if ( !aHelpId.isEmpty() )
- pHelp->Start( OUString::fromUtf8( aHelpId ), this );
+ pHelp->Start( OStringToOUString( aHelpId, RTL_TEXTENCODING_UTF8 ), this );
}
return;
}
@@ -1263,7 +1263,7 @@ const OUString& StatusBar::GetHelpText( sal_uInt16 nItemId ) const
if ( !pItem->maCommand.isEmpty() )
pItem->maHelpText = pHelp->GetHelpText( pItem->maCommand, this );
if ( pItem->maHelpText.isEmpty() && !pItem->maHelpId.isEmpty() )
- pItem->maHelpText = pHelp->GetHelpText( OUString::fromUtf8( pItem->maHelpId ), this );
+ pItem->maHelpText = pHelp->GetHelpText( OStringToOUString( pItem->maHelpId, RTL_TEXTENCODING_UTF8 ), this );
}
}
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 33402393a4ac..4fc17254545b 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -4182,7 +4182,7 @@ const OUString& ToolBox::ImplGetHelpText( sal_uInt16 nItemId ) const
if ( pItem->maCommandStr.getLength() )
pItem->maHelpText = pHelp->GetHelpText( pItem->maCommandStr, this );
if ( pItem->maHelpText.isEmpty() && !pItem->maHelpId.isEmpty() )
- pItem->maHelpText = pHelp->GetHelpText( OUString::fromUtf8( pItem->maHelpId ), this );
+ pItem->maHelpText = pHelp->GetHelpText( OStringToOUString( pItem->maHelpId, RTL_TEXTENCODING_UTF8 ), this );
}
}
@@ -4254,7 +4254,7 @@ void ToolBox::RequestHelp( const HelpEvent& rHEvt )
if ( !aCommand.isEmpty() )
pHelp->Start( aCommand, this );
else if ( !aHelpId.isEmpty() )
- pHelp->Start( OUString::fromUtf8( aHelpId ), this );
+ pHelp->Start( OStringToOUString( aHelpId, RTL_TEXTENCODING_UTF8 ), this );
}
return;
}
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index adfde5afb448..b4468848ef20 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -273,7 +273,8 @@ Window::~Window()
aTempStr.append(aErrorStr.toString());
OSL_FAIL(aTempStr.getStr());
// abort in debug builds, must be fixed!
- Application::Abort(OUString::fromUtf8(aTempStr.makeStringAndClear()));
+ Application::Abort(OStringToOUString(
+ aTempStr.makeStringAndClear(), RTL_TEXTENCODING_UTF8));
}
}
@@ -295,7 +296,7 @@ Window::~Window()
aTempStr.append(") with live SystemWindows destroyed: ");
aTempStr.append(aErrorStr.toString());
OSL_FAIL( aTempStr.getStr() );
- Application::Abort(OUString::fromUtf8(aTempStr.makeStringAndClear())); // abort in debug builds, this must be fixed!
+ Application::Abort(OStringToOUString(aTempStr.makeStringAndClear(), RTL_TEXTENCODING_UTF8)); // abort in debug builds, this must be fixed!
}
if ( mpWindowImpl->mpFirstChild )
@@ -310,7 +311,7 @@ Window::~Window()
pTempWin = pTempWin->mpWindowImpl->mpNext;
}
OSL_FAIL( aTempStr.getStr() );
- Application::Abort(OUString::fromUtf8(aTempStr.makeStringAndClear())); // abort in debug builds, this must be fixed!
+ Application::Abort(OStringToOUString(aTempStr.makeStringAndClear(), RTL_TEXTENCODING_UTF8)); // abort in debug builds, this must be fixed!
}
if ( mpWindowImpl->mpFirstOverlap )
@@ -325,7 +326,7 @@ Window::~Window()
pTempWin = pTempWin->mpWindowImpl->mpNext;
}
OSL_FAIL( aTempStr.getStr() );
- Application::Abort(OUString::fromUtf8(aTempStr.makeStringAndClear())); // abort in debug builds, this must be fixed!
+ Application::Abort(OStringToOUString(aTempStr.makeStringAndClear(), RTL_TEXTENCODING_UTF8)); // abort in debug builds, this must be fixed!
}
vcl::Window* pMyParent = GetParent();
@@ -345,7 +346,7 @@ Window::~Window()
aTempStr.append(OUStringToOString(GetText(), RTL_TEXTENCODING_UTF8));
aTempStr.append(") still in TaskPanelList!");
OSL_FAIL( aTempStr.getStr() );
- Application::Abort(OUString::fromUtf8(aTempStr.makeStringAndClear())); // abort in debug builds, this must be fixed!
+ Application::Abort(OStringToOUString(aTempStr.makeStringAndClear(), RTL_TEXTENCODING_UTF8)); // abort in debug builds, this must be fixed!
}
}
#endif
@@ -416,7 +417,7 @@ Window::~Window()
RTL_TEXTENCODING_UTF8)).
append(") with focussed child window destroyed ! THIS WILL LEAD TO CRASHES AND MUST BE FIXED !");
OSL_FAIL( aTempStr.getStr() );
- Application::Abort(OUString::fromUtf8(aTempStr.makeStringAndClear())); // abort in debug build version, this must be fixed!
+ Application::Abort(OStringToOUString(aTempStr.makeStringAndClear(), RTL_TEXTENCODING_UTF8 )); // abort in debug build version, this must be fixed!
#endif
}
@@ -1945,7 +1946,7 @@ void Window::RequestHelp( const HelpEvent& rHEvt )
}
else
{
- OUString aStrHelpId( OUString::fromUtf8( GetHelpId() ) );
+ OUString aStrHelpId( OStringToOUString( GetHelpId(), RTL_TEXTENCODING_UTF8 ) );
if ( aStrHelpId.isEmpty() && ImplGetParent() )
ImplGetParent()->RequestHelp( rHEvt );
else
@@ -3208,7 +3209,7 @@ const Wallpaper& Window::GetDisplayBackground() const
const OUString& Window::GetHelpText() const
{
- OUString aStrHelpId( OUString::fromUtf8( GetHelpId() ) );
+ OUString aStrHelpId( OStringToOUString( GetHelpId(), RTL_TEXTENCODING_UTF8 ) );
bool bStrHelpId = !aStrHelpId.isEmpty();
if ( !mpWindowImpl->maHelpText.getLength() && bStrHelpId )
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index 8db9d7f81b98..5f6c8a66e32b 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -1539,7 +1539,7 @@ bool Window::set_property(const OString &rKey, const OString &rValue)
{
if ((rKey == "label") || (rKey == "title") || (rKey == "text") )
{
- SetText(OUString::fromUtf8(VclBuilder::convertMnemonicMarkup(rValue)));
+ SetText(OStringToOUString(VclBuilder::convertMnemonicMarkup(rValue), RTL_TEXTENCODING_UTF8));
}
else if (rKey == "visible")
Show(toBool(rValue));
@@ -1618,9 +1618,9 @@ bool Window::set_property(const OString &rKey, const OString &rValue)
else if (rKey == "valign")
set_valign(toAlign(rValue));
else if (rKey == "tooltip-markup")
- SetQuickHelpText(OUString::fromUtf8(rValue));
+ SetQuickHelpText(OStringToOUString(rValue, RTL_TEXTENCODING_UTF8));
else if (rKey == "tooltip-text")
- SetQuickHelpText(OUString::fromUtf8(rValue));
+ SetQuickHelpText(OStringToOUString(rValue, RTL_TEXTENCODING_UTF8));
else if (rKey == "border-width")
set_border_width(rValue.toInt32());
else if (rKey == "margin-left")
@@ -1653,11 +1653,11 @@ bool Window::set_property(const OString &rKey, const OString &rValue)
}
else if (rKey == "accessible-name")
{
- SetAccessibleName(OUString::fromUtf8(rValue));
+ SetAccessibleName(OStringToOUString(rValue, RTL_TEXTENCODING_UTF8));
}
else if (rKey == "accessible-description")
{
- SetAccessibleDescription(OUString::fromUtf8(rValue));
+ SetAccessibleDescription(OStringToOUString(rValue, RTL_TEXTENCODING_UTF8));
}
else if (rKey == "use-markup")
{
diff --git a/vcl/unx/generic/app/i18n_cb.cxx b/vcl/unx/generic/app/i18n_cb.cxx
index 5732ac20571c..015f226ed8fb 100644
--- a/vcl/unx/generic/app/i18n_cb.cxx
+++ b/vcl/unx/generic/app/i18n_cb.cxx
@@ -523,7 +523,7 @@ void
SwitchIMCallback (XIC, XPointer, XPointer call_data)
{
XIMSwitchIMNotifyCallbackStruct* pCallData = (XIMSwitchIMNotifyCallbackStruct*)call_data;
- ::vcl::I18NStatus::get().changeIM( OUString::fromUtf8(pCallData->to->name) );
+ ::vcl::I18NStatus::get().changeIM( OStringToOUString(pCallData->to->name, RTL_TEXTENCODING_UTF8) );
}
// vii. destroy callbacks: internally disable all IC/IM calls
diff --git a/vcl/unx/generic/printer/jobdata.cxx b/vcl/unx/generic/printer/jobdata.cxx
index ea7bb0de3735..389f74dc8be8 100644
--- a/vcl/unx/generic/printer/jobdata.cxx
+++ b/vcl/unx/generic/printer/jobdata.cxx
@@ -219,7 +219,7 @@ bool JobData::constructFromStreamBuffer( void* pData, int bytes, JobData& rJobDa
else if (aLine.startsWith(printerEquals))
{
bPrinter = true;
- rJobData.m_aPrinterName = OUString::fromUtf8(aLine.copy(RTL_CONSTASCII_LENGTH(printerEquals)));
+ rJobData.m_aPrinterName = OStringToOUString(aLine.copy(RTL_CONSTASCII_LENGTH(printerEquals)), RTL_TEXTENCODING_UTF8);
}
else if (aLine.startsWith(orientatationEquals))
{
diff --git a/vcl/unx/generic/printer/printerinfomanager.cxx b/vcl/unx/generic/printer/printerinfomanager.cxx
index 97c3668f1542..fecc6ada9054 100644
--- a/vcl/unx/generic/printer/printerinfomanager.cxx
+++ b/vcl/unx/generic/printer/printerinfomanager.cxx
@@ -128,8 +128,9 @@ PrinterInfoManager::~PrinterInfoManager()
void PrinterInfoManager::initSystemDefaultPaper()
{
- m_aSystemDefaultPaper = OUString::fromUtf8(
- PaperInfo::toPSName(PaperInfo::getSystemDefaultPaper().getPaper()));
+ m_aSystemDefaultPaper = OStringToOUString(
+ PaperInfo::toPSName(PaperInfo::getSystemDefaultPaper().getPaper()),
+ RTL_TEXTENCODING_UTF8);
}
bool PrinterInfoManager::checkPrintersChanged( bool bWait )
@@ -329,9 +330,10 @@ void PrinterInfoManager::initialize()
// initialize to global defaults
aPrinter.m_aInfo = m_aGlobalDefaults;
- aPrinterName = OUString::fromUtf8(aValue.copy(nNamePos+1));
+ aPrinterName = OStringToOUString(aValue.copy(nNamePos+1),
+ RTL_TEXTENCODING_UTF8);
aPrinter.m_aInfo.m_aPrinterName = aPrinterName;
- aPrinter.m_aInfo.m_aDriverName = OUString::fromUtf8(aValue.copy(0, nNamePos));
+ aPrinter.m_aInfo.m_aDriverName = OStringToOUString(aValue.copy(0, nNamePos), RTL_TEXTENCODING_UTF8);
// set parser, merge settings
// don't do this for CUPS printers as this is done
@@ -385,14 +387,14 @@ void PrinterInfoManager::initialize()
aValue = "lpr";
#endif
}
- aPrinter.m_aInfo.m_aCommand = OUString::fromUtf8(aValue);
+ aPrinter.m_aInfo.m_aCommand = OStringToOUString(aValue, RTL_TEXTENCODING_UTF8);
}
aValue = aConfig.ReadKey( "QuickCommand" );
- aPrinter.m_aInfo.m_aQuickCommand = OUString::fromUtf8(aValue);
+ aPrinter.m_aInfo.m_aQuickCommand = OStringToOUString(aValue, RTL_TEXTENCODING_UTF8);
aValue = aConfig.ReadKey( "Features" );
- aPrinter.m_aInfo.m_aFeatures = OUString::fromUtf8(aValue);
+ aPrinter.m_aInfo.m_aFeatures = OStringToOUString(aValue, RTL_TEXTENCODING_UTF8);
// override the settings in m_aGlobalDefaults if keys exist
aValue = aConfig.ReadKey( "DefaultPrinter" );
@@ -400,10 +402,10 @@ void PrinterInfoManager::initialize()
aDefaultPrinter = aPrinterName;
aValue = aConfig.ReadKey( "Location" );
- aPrinter.m_aInfo.m_aLocation = OUString::fromUtf8(aValue);
+ aPrinter.m_aInfo.m_aLocation = OStringToOUString(aValue, RTL_TEXTENCODING_UTF8);
aValue = aConfig.ReadKey( "Comment" );
- aPrinter.m_aInfo.m_aComment = OUString::fromUtf8(aValue);
+ aPrinter.m_aInfo.m_aComment = OStringToOUString(aValue, RTL_TEXTENCODING_UTF8);
aValue = aConfig.ReadKey( "Copies" );
if (!aValue.isEmpty())
diff --git a/vcl/unx/gtk/a11y/atktextattributes.cxx b/vcl/unx/gtk/a11y/atktextattributes.cxx
index 081542e5af45..fe2f0d5e2f52 100644
--- a/vcl/unx/gtk/a11y/atktextattributes.cxx
+++ b/vcl/unx/gtk/a11y/atktextattributes.cxx
@@ -542,7 +542,7 @@ SetString( uno::Any& rAny, const gchar * value )
if( !aFontName.isEmpty() )
{
- rAny = uno::makeAny( OUString::fromUtf8( aFontName ) );
+ rAny = uno::makeAny( OStringToOUString( aFontName, RTL_TEXTENCODING_UTF8 ) );
return true;
}
diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
index 405c4719f10f..4eeafb1aeff7 100644
--- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
+++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
@@ -938,7 +938,7 @@ sal_Int16 SAL_CALL SalGtkFilePicker::execute() throw( uno::RuntimeException, std
gchar *gFileName = g_filename_from_uri ( sFileName.getStr(), NULL, NULL );
if( g_file_test( gFileName, G_FILE_TEST_IS_REGULAR ) )
{
- INetURLObject aFileObj( OUString::fromUtf8(sFileName) );
+ INetURLObject aFileObj( OStringToOUString(sFileName, RTL_TEXTENCODING_UTF8) );
OString baseName(
OUStringToOString(
@@ -1382,7 +1382,7 @@ OUString SAL_CALL SalGtkFilePicker::getLabel( sal_Int16 nControlId )
else
OSL_TRACE("Can't get label on list");
- return OUString::fromUtf8( aTxt );
+ return OStringToOUString( aTxt, RTL_TEXTENCODING_UTF8 );
}
// XFilePreview functions
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 6d669e88fcd7..bab4f5c6f888 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -3898,7 +3898,7 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
psp::FastPrintFontInfo aInfo;
// set family name
- aInfo.m_aFamilyName = OUString::fromUtf8( aFamily );
+ aInfo.m_aFamilyName = OStringToOUString( aFamily, RTL_TEXTENCODING_UTF8 );
// set italic
switch( eStyle )
{
diff --git a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
index 96b73c7c218d..66d0dddba5d7 100644
--- a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
@@ -1283,7 +1283,7 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
psp::FastPrintFontInfo aInfo;
// set family name
- aInfo.m_aFamilyName = OUString::fromUtf8( aFamily );
+ aInfo.m_aFamilyName = OStringToOUString( aFamily, RTL_TEXTENCODING_UTF8 );
// set italic
switch( eStyle )
{