diff options
Diffstat (limited to 'vcl/source/window')
-rw-r--r-- | vcl/source/window/builder.cxx | 39 | ||||
-rw-r--r-- | vcl/source/window/layout.cxx | 4 | ||||
-rw-r--r-- | vcl/source/window/menu.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/menuwindow.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/printdlg.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/status.cxx | 4 | ||||
-rw-r--r-- | vcl/source/window/toolbox.cxx | 4 | ||||
-rw-r--r-- | vcl/source/window/window.cxx | 17 | ||||
-rw-r--r-- | vcl/source/window/window2.cxx | 10 |
9 files changed, 41 insertions, 43 deletions
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 9431819075b7..71531495ac00 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -833,7 +833,7 @@ namespace if (!rFrame.is()) return; - OUString aCommand(OStringToOUString(extractActionName(rMap), RTL_TEXTENCODING_UTF8)); + OUString aCommand(OUString::fromUtf8(extractActionName(rMap))); 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(OStringToOUString(sUnit, RTL_TEXTENCODING_UTF8)); + pField->SetCustomUnitText(OUString::fromUtf8(sUnit)); 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(OStringToOUString(sUnit, RTL_TEXTENCODING_UTF8)); + pBox->SetCustomUnitText(OUString::fromUtf8(sUnit)); 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(OStringToOUString(*aI, RTL_TEXTENCODING_UTF8)); + pComboBox->InsertEntry(OUString::fromUtf8(*aI)); 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(OStringToOUString(*aI, RTL_TEXTENCODING_UTF8)); + pListBox->InsertEntry(OUString::fromUtf8(*aI)); 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(OStringToOUString(sUnit, RTL_TEXTENCODING_UTF8)); + pBox->SetCustomUnitText(OUString::fromUtf8(sUnit)); 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(OStringToOUString(extractActionName(rMap), RTL_TEXTENCODING_UTF8)); + OUString aCommand(OUString::fromUtf8(extractActionName(rMap))); 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, - OStringToOUString(extractLabel(rMap), RTL_TEXTENCODING_UTF8), nBits); + OUString::fromUtf8(extractLabel(rMap)), nBits); pToolBox->SetItemCommand(nItemId, aCommand); pToolBox->SetHelpId(nItemId, m_sHelpRoot + id); } OString sTooltip(extractTooltipText(rMap)); if (!sTooltip.isEmpty()) - pToolBox->SetQuickHelpText(nItemId, OStringToOUString(sTooltip, RTL_TEXTENCODING_UTF8)); + pToolBox->SetQuickHelpText(nItemId, OUString::fromUtf8(sTooltip)); 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(OStringToOUString(name.copy(0, nDelim), RTL_TEXTENCODING_UTF8)); + sModuleBuf.append(OUString::fromUtf8(name.copy(0, nDelim))); sModuleBuf.append(SAL_DLLEXTENSION); #endif - OUString sFunction(OStringToOUString(OString("make") + name.copy(nDelim+1), RTL_TEXTENCODING_UTF8)); + OUString sFunction(OUString::fromUtf8(OString("make") + name.copy(nDelim+1))); #ifndef DISABLE_DYNLOADING OUString sModule = sModuleBuf.makeStringAndClear(); ModuleMap::iterator aI = m_aModuleMap.find(sModule); @@ -1886,8 +1886,7 @@ void VclBuilder::handleTabChild(vcl::Window *pParent, xmlreader::XmlReader &read if (aFind != aProperties.end()) { sal_uInt16 nPageId = pTabControl->GetCurPageId(); - pTabControl->SetPageText(nPageId, - OStringToOUString(aFind->second, RTL_TEXTENCODING_UTF8)); + pTabControl->SetPageText(nPageId, OUString::fromUtf8(aFind->second)); pTabControl->SetPageName(nPageId, sID); } else @@ -2447,7 +2446,7 @@ std::vector<OString> VclBuilder::handleItems(xmlreader::XmlReader &reader, const if (m_pStringReplace) { - OUString sTmp = (*m_pStringReplace)(OStringToOUString(sValue, RTL_TEXTENCODING_UTF8)); + OUString sTmp = (*m_pStringReplace)(OUString::fromUtf8(sValue)); sValue = OUStringToOString(sTmp, RTL_TEXTENCODING_UTF8); } @@ -2711,7 +2710,7 @@ void VclBuilder::insertMenuObject(PopupMenu *pParent, const OString &rClass, con if (rClass == "GtkMenuItem") { - OUString sLabel(OStringToOUString(convertMnemonicMarkup(extractLabel(rProps)), RTL_TEXTENCODING_UTF8)); + OUString sLabel(OUString::fromUtf8(convertMnemonicMarkup(extractLabel(rProps)))); pParent->InsertItem(nNewId, sLabel, MenuItemBits::TEXT, rID); } else if (rClass == "GtkSeparatorMenuItem") @@ -2731,9 +2730,9 @@ void VclBuilder::insertMenuObject(PopupMenu *pParent, const OString &rClass, con const OString &rValue = aI->second; if (rKey == "tooltip-markup") - pParent->SetTipHelpText(nNewId, OStringToOUString(rValue, RTL_TEXTENCODING_UTF8)); + pParent->SetTipHelpText(nNewId, OUString::fromUtf8(rValue)); else if (rKey == "tooltip-text") - pParent->SetTipHelpText(nNewId, OStringToOUString(rValue, RTL_TEXTENCODING_UTF8)); + pParent->SetTipHelpText(nNewId, OUString::fromUtf8(rValue)); else if (rKey == "visible") pParent->ShowItem(nNewId, toBool(rValue)); else if (rKey == "has-default" && toBool(rValue)) @@ -3063,7 +3062,7 @@ void VclBuilder::collectProperty(xmlreader::XmlReader &reader, const OString &rI sProperty = sProperty.replace('_', '-'); if (m_pStringReplace) { - OUString sTmp = (*m_pStringReplace)(OStringToOUString(sValue, RTL_TEXTENCODING_UTF8)); + OUString sTmp = (*m_pStringReplace)(OUString::fromUtf8(sValue)); rMap[sProperty] = OUStringToOString(sTmp, RTL_TEXTENCODING_UTF8); } else @@ -3291,7 +3290,7 @@ void VclBuilder::mungeModel(ListBox &rTarget, const ListStore &rStore, sal_uInt1 aI != aEnd; ++aI) { const ListStore::row &rRow = *aI; - sal_uInt16 nEntry = rTarget.InsertEntry(OStringToOUString(rRow[0], RTL_TEXTENCODING_UTF8)); + sal_uInt16 nEntry = rTarget.InsertEntry(OUString::fromUtf8(rRow[0])); if (rRow.size() > 1) { sal_IntPtr nValue = rRow[1].toInt32(); @@ -3434,7 +3433,7 @@ void VclBuilder::mungeTextBuffer(VclMultiLineEdit &rTarget, const TextBuffer &rT const OString &rValue = aI->second; if (rKey == "text") - rTarget.SetText(OStringToOUString(rValue, RTL_TEXTENCODING_UTF8)); + rTarget.SetText(OUString::fromUtf8(rValue)); else { SAL_INFO("vcl.layout", "unhandled property :" << rKey.getStr()); diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index 590525fe3b4d..2a56ca99c00a 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(OStringToOUString(rValue, RTL_TEXTENCODING_UTF8)); + set_primary_text(OUString::fromUtf8(rValue)); else if (rKey == "secondary-text") - set_secondary_text(OStringToOUString(rValue, RTL_TEXTENCODING_UTF8)); + set_secondary_text(OUString::fromUtf8(rValue)); 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 546725aed72b..03ca36f214d6 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( OStringToOUString( pData->aHelpId, RTL_TEXTENCODING_UTF8 ), NULL ); + pData->aHelpText = pHelp->GetHelpText( OUString::fromUtf8( pData->aHelpId ), NULL ); } } diff --git a/vcl/source/window/menuwindow.cxx b/vcl/source/window/menuwindow.cxx index ddfe6bffbc97..88b0e8ab159c 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( OStringToOUString( aHelpId, RTL_TEXTENCODING_UTF8 ), NULL ); + pHelp->Start( OUString::fromUtf8( aHelpId ), NULL ); } bDone = true; } diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index 715e75e2909d..4acd97de0e8a 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" ), - OStringToOUString( GetWindowState(), RTL_TEXTENCODING_UTF8 ) + OUString::fromUtf8( GetWindowState() ) ); pItem->Commit(); } diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx index c4ccf055f433..ad9e04dacc8b 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( OStringToOUString( aHelpId, RTL_TEXTENCODING_UTF8 ), this ); + pHelp->Start( OUString::fromUtf8( aHelpId ), 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( OStringToOUString( pItem->maHelpId, RTL_TEXTENCODING_UTF8 ), this ); + pItem->maHelpText = pHelp->GetHelpText( OUString::fromUtf8( pItem->maHelpId ), this ); } } diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index 4fc17254545b..33402393a4ac 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( OStringToOUString( pItem->maHelpId, RTL_TEXTENCODING_UTF8 ), this ); + pItem->maHelpText = pHelp->GetHelpText( OUString::fromUtf8( pItem->maHelpId ), this ); } } @@ -4254,7 +4254,7 @@ void ToolBox::RequestHelp( const HelpEvent& rHEvt ) if ( !aCommand.isEmpty() ) pHelp->Start( aCommand, this ); else if ( !aHelpId.isEmpty() ) - pHelp->Start( OStringToOUString( aHelpId, RTL_TEXTENCODING_UTF8 ), this ); + pHelp->Start( OUString::fromUtf8( aHelpId ), this ); } return; } diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index b4468848ef20..adfde5afb448 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -273,8 +273,7 @@ Window::~Window() aTempStr.append(aErrorStr.toString()); OSL_FAIL(aTempStr.getStr()); // abort in debug builds, must be fixed! - Application::Abort(OStringToOUString( - aTempStr.makeStringAndClear(), RTL_TEXTENCODING_UTF8)); + Application::Abort(OUString::fromUtf8(aTempStr.makeStringAndClear())); } } @@ -296,7 +295,7 @@ Window::~Window() aTempStr.append(") with live SystemWindows destroyed: "); aTempStr.append(aErrorStr.toString()); OSL_FAIL( aTempStr.getStr() ); - Application::Abort(OStringToOUString(aTempStr.makeStringAndClear(), RTL_TEXTENCODING_UTF8)); // abort in debug builds, this must be fixed! + Application::Abort(OUString::fromUtf8(aTempStr.makeStringAndClear())); // abort in debug builds, this must be fixed! } if ( mpWindowImpl->mpFirstChild ) @@ -311,7 +310,7 @@ Window::~Window() pTempWin = pTempWin->mpWindowImpl->mpNext; } OSL_FAIL( aTempStr.getStr() ); - Application::Abort(OStringToOUString(aTempStr.makeStringAndClear(), RTL_TEXTENCODING_UTF8)); // abort in debug builds, this must be fixed! + Application::Abort(OUString::fromUtf8(aTempStr.makeStringAndClear())); // abort in debug builds, this must be fixed! } if ( mpWindowImpl->mpFirstOverlap ) @@ -326,7 +325,7 @@ Window::~Window() pTempWin = pTempWin->mpWindowImpl->mpNext; } OSL_FAIL( aTempStr.getStr() ); - Application::Abort(OStringToOUString(aTempStr.makeStringAndClear(), RTL_TEXTENCODING_UTF8)); // abort in debug builds, this must be fixed! + Application::Abort(OUString::fromUtf8(aTempStr.makeStringAndClear())); // abort in debug builds, this must be fixed! } vcl::Window* pMyParent = GetParent(); @@ -346,7 +345,7 @@ Window::~Window() aTempStr.append(OUStringToOString(GetText(), RTL_TEXTENCODING_UTF8)); aTempStr.append(") still in TaskPanelList!"); OSL_FAIL( aTempStr.getStr() ); - Application::Abort(OStringToOUString(aTempStr.makeStringAndClear(), RTL_TEXTENCODING_UTF8)); // abort in debug builds, this must be fixed! + Application::Abort(OUString::fromUtf8(aTempStr.makeStringAndClear())); // abort in debug builds, this must be fixed! } } #endif @@ -417,7 +416,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(OStringToOUString(aTempStr.makeStringAndClear(), RTL_TEXTENCODING_UTF8 )); // abort in debug build version, this must be fixed! + Application::Abort(OUString::fromUtf8(aTempStr.makeStringAndClear())); // abort in debug build version, this must be fixed! #endif } @@ -1946,7 +1945,7 @@ void Window::RequestHelp( const HelpEvent& rHEvt ) } else { - OUString aStrHelpId( OStringToOUString( GetHelpId(), RTL_TEXTENCODING_UTF8 ) ); + OUString aStrHelpId( OUString::fromUtf8( GetHelpId() ) ); if ( aStrHelpId.isEmpty() && ImplGetParent() ) ImplGetParent()->RequestHelp( rHEvt ); else @@ -3209,7 +3208,7 @@ const Wallpaper& Window::GetDisplayBackground() const const OUString& Window::GetHelpText() const { - OUString aStrHelpId( OStringToOUString( GetHelpId(), RTL_TEXTENCODING_UTF8 ) ); + OUString aStrHelpId( OUString::fromUtf8( GetHelpId() ) ); bool bStrHelpId = !aStrHelpId.isEmpty(); if ( !mpWindowImpl->maHelpText.getLength() && bStrHelpId ) diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index 5f6c8a66e32b..8db9d7f81b98 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(OStringToOUString(VclBuilder::convertMnemonicMarkup(rValue), RTL_TEXTENCODING_UTF8)); + SetText(OUString::fromUtf8(VclBuilder::convertMnemonicMarkup(rValue))); } 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(OStringToOUString(rValue, RTL_TEXTENCODING_UTF8)); + SetQuickHelpText(OUString::fromUtf8(rValue)); else if (rKey == "tooltip-text") - SetQuickHelpText(OStringToOUString(rValue, RTL_TEXTENCODING_UTF8)); + SetQuickHelpText(OUString::fromUtf8(rValue)); 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(OStringToOUString(rValue, RTL_TEXTENCODING_UTF8)); + SetAccessibleName(OUString::fromUtf8(rValue)); } else if (rKey == "accessible-description") { - SetAccessibleDescription(OStringToOUString(rValue, RTL_TEXTENCODING_UTF8)); + SetAccessibleDescription(OUString::fromUtf8(rValue)); } else if (rKey == "use-markup") { |