basctl/source/accessibility/accessibledialogcontrolshape.cxx | 4 basctl/source/basicide/BasicColorConfig.cxx | 4 basctl/source/basicide/ColorSchemeDialog.cxx | 11 - basctl/source/basicide/IDEComboBox.cxx | 4 basctl/source/basicide/ObjectCatalog.cxx | 9 basctl/source/basicide/basdoc.cxx | 2 basctl/source/basicide/basicrenderable.cxx | 26 +- basctl/source/basicide/baside2.cxx | 10 basctl/source/basicide/baside2b.cxx | 56 ++--- basctl/source/basicide/baside3.cxx | 10 basctl/source/basicide/basides1.cxx | 6 basctl/source/basicide/basides3.cxx | 2 basctl/source/basicide/basidesh.cxx | 8 basctl/source/basicide/bastype2.cxx | 6 basctl/source/basicide/bastypes.cxx | 2 basctl/source/basicide/brkdlg.cxx | 17 - basctl/source/basicide/iderdll.cxx | 2 basctl/source/basicide/linenumberwindow.cxx | 4 basctl/source/basicide/localizationmgr.cxx | 4 basctl/source/basicide/macrodlg.cxx | 44 ++-- basctl/source/basicide/moduldl2.cxx | 54 ++--- basctl/source/basicide/moduldlg.cxx | 32 +-- basctl/source/basicide/scriptdocument.cxx | 8 basctl/source/basicide/uiobject.cxx | 4 basctl/source/basicide/unomodel.cxx | 6 basctl/source/dlged/dlged.cxx | 16 - basctl/source/dlged/dlgedfac.cxx | 66 +++--- basctl/source/dlged/dlgedobj.cxx | 114 +++++------ basctl/source/dlged/dlgedview.cxx | 2 basctl/source/dlged/managelang.cxx | 32 +-- basctl/source/dlged/propbrw.cxx | 54 ++--- basctl/source/inc/BasicColorConfig.hxx | 6 32 files changed, 314 insertions(+), 311 deletions(-)
New commits: commit 740353bc31583d9e8ad77a2b2289a204466ccf9e Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Fri May 3 14:55:25 2024 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Fri May 3 18:38:56 2024 +0200 loplugin:ostr in basctl Change-Id: I59c25d52d8f59ff1b7ab498041c2888b8e718f64 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167056 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/basctl/source/accessibility/accessibledialogcontrolshape.cxx b/basctl/source/accessibility/accessibledialogcontrolshape.cxx index c19741c95afa..4abd4076d26a 100644 --- a/basctl/source/accessibility/accessibledialogcontrolshape.cxx +++ b/basctl/source/accessibility/accessibledialogcontrolshape.cxx @@ -372,7 +372,7 @@ OUString AccessibleDialogControlShape::getAccessibleDescription( ) { OExternalLockGuard aGuard( this ); - return GetModelStringProperty( "HelpText" ); + return GetModelStringProperty( u"HelpText"_ustr ); } @@ -380,7 +380,7 @@ OUString AccessibleDialogControlShape::getAccessibleName( ) { OExternalLockGuard aGuard( this ); - return GetModelStringProperty( "Name" ); + return GetModelStringProperty( u"Name"_ustr ); } diff --git a/basctl/source/basicide/BasicColorConfig.cxx b/basctl/source/basicide/BasicColorConfig.cxx index 433c55b531ac..9a5e483bc248 100644 --- a/basctl/source/basicide/BasicColorConfig.cxx +++ b/basctl/source/basicide/BasicColorConfig.cxx @@ -26,13 +26,13 @@ namespace basctl { BasicColorConfig::BasicColorConfig() - : ConfigItem("Office.BasicIDE/IDEColorSchemes") + : ConfigItem(u"Office.BasicIDE/IDEColorSchemes"_ustr) { // Initially the active color scheme is the one defined in the registry m_sCurrentColorScheme = officecfg::Office::BasicIDE::EditorSettings::ColorScheme::get(); // Initialize all available scheme names - m_aSchemeNames = GetNodeNames(""); + m_aSchemeNames = GetNodeNames(u""_ustr); } BasicColorConfig::~BasicColorConfig() {} diff --git a/basctl/source/basicide/ColorSchemeDialog.cxx b/basctl/source/basicide/ColorSchemeDialog.cxx index 4351624e4298..ca3eeca9cbef 100644 --- a/basctl/source/basicide/ColorSchemeDialog.cxx +++ b/basctl/source/basicide/ColorSchemeDialog.cxx @@ -33,12 +33,13 @@ namespace basctl { ColorSchemeDialog::ColorSchemeDialog(weld::Window* pParent, VclPtr<ModulWindowLayout> pModulWinLayout) - : GenericDialogController(pParent, "modules/BasicIDE/ui/colorscheme.ui", "ColorSchemeDialog") + : GenericDialogController(pParent, u"modules/BasicIDE/ui/colorscheme.ui"_ustr, + u"ColorSchemeDialog"_ustr) , m_pModulWinLayout(std::move(pModulWinLayout)) - , m_xSchemeList(m_xBuilder->weld_tree_view("schemelist")) - , m_xUseAppCollors(m_xBuilder->weld_radio_button("opt_appcolors")) - , m_xUseScheme(m_xBuilder->weld_radio_button("opt_usescheme")) - , m_xOk(m_xBuilder->weld_button("btn_ok")) + , m_xSchemeList(m_xBuilder->weld_tree_view(u"schemelist"_ustr)) + , m_xUseAppCollors(m_xBuilder->weld_radio_button(u"opt_appcolors"_ustr)) + , m_xUseScheme(m_xBuilder->weld_radio_button(u"opt_usescheme"_ustr)) + , m_xOk(m_xBuilder->weld_button(u"btn_ok"_ustr)) { m_pColorConfig = GetShell()->GetColorConfig(); m_sSelectedSchemeId = m_pColorConfig->GetCurrentColorSchemeName(); diff --git a/basctl/source/basicide/IDEComboBox.cxx b/basctl/source/basicide/IDEComboBox.cxx index a4ad6c8ada95..01df53eef6ba 100644 --- a/basctl/source/basicide/IDEComboBox.cxx +++ b/basctl/source/basicide/IDEComboBox.cxx @@ -89,8 +89,8 @@ VclPtr<InterimItemWindow> LibBoxControl::CreateItemWindow(vcl::Window* pParent) } DocListenerBox::DocListenerBox(vcl::Window* pParent) - : InterimItemWindow(pParent, "modules/BasicIDE/ui/combobox.ui", "ComboBox") - , m_xWidget(m_xBuilder->weld_combo_box("combobox")) + : InterimItemWindow(pParent, u"modules/BasicIDE/ui/combobox.ui"_ustr, u"ComboBox"_ustr) + , m_xWidget(m_xBuilder->weld_combo_box(u"combobox"_ustr)) , maNotifier(*this) { InitControlBase(m_xWidget.get()); diff --git a/basctl/source/basicide/ObjectCatalog.cxx b/basctl/source/basicide/ObjectCatalog.cxx index 13069ed46621..170ee4f74791 100644 --- a/basctl/source/basicide/ObjectCatalog.cxx +++ b/basctl/source/basicide/ObjectCatalog.cxx @@ -28,12 +28,13 @@ namespace basctl { ObjectCatalog::ObjectCatalog(vcl::Window* pParent) - : DockingWindow(pParent, "modules/BasicIDE/ui/dockingorganizer.ui", "DockingOrganizer") + : DockingWindow(pParent, u"modules/BasicIDE/ui/dockingorganizer.ui"_ustr, + u"DockingOrganizer"_ustr) { - m_xTitle = m_xBuilder->weld_label("title"); - m_xTree.reset(new SbTreeListBox(m_xBuilder->weld_tree_view("libraries"), GetFrameWeld())); + m_xTitle = m_xBuilder->weld_label(u"title"_ustr); + m_xTree.reset(new SbTreeListBox(m_xBuilder->weld_tree_view(u"libraries"_ustr), GetFrameWeld())); - SetHelpId("basctl:FloatingWindow:RID_BASICIDE_OBJCAT"); + SetHelpId(u"basctl:FloatingWindow:RID_BASICIDE_OBJCAT"_ustr); SetText(IDEResId(RID_BASICIDE_OBJCAT)); // title diff --git a/basctl/source/basicide/basdoc.cxx b/basctl/source/basicide/basdoc.cxx index ffd22b9063c7..89e2b33c010f 100644 --- a/basctl/source/basicide/basdoc.cxx +++ b/basctl/source/basicide/basdoc.cxx @@ -38,7 +38,7 @@ namespace basctl { -SFX_IMPL_OBJECTFACTORY( DocShell, SvGlobalName(), "sbasic" ) +SFX_IMPL_OBJECTFACTORY( DocShell, SvGlobalName(), u"sbasic"_ustr ) SFX_IMPL_SUPERCLASS_INTERFACE(basctl_DocShell, SfxObjectShell) diff --git a/basctl/source/basicide/basicrenderable.cxx b/basctl/source/basicide/basicrenderable.cxx index 648f234cbdb0..de46a766f970 100644 --- a/basctl/source/basicide/basicrenderable.cxx +++ b/basctl/source/basicide/basicrenderable.cxx @@ -44,32 +44,32 @@ Renderable::Renderable (BaseWindow* pWin) aPrintRangeOpt.maGroupHint = "PrintRange" ; aPrintRangeOpt.mbInternalOnly = true; - m_aUIProperties[0].Value = setSubgroupControlOpt("printrange", + m_aUIProperties[0].Value = setSubgroupControlOpt(u"printrange"_ustr, IDEResId( RID_STR_PRINTDLG_PAGES ), OUString(), aPrintRangeOpt); // create a choice for the range to print - OUString aPrintContentName( "PrintContent" ); + OUString aPrintContentName( u"PrintContent"_ustr ); const Sequence<OUString> aChoices{IDEResId(RID_STR_PRINTDLG_PRINTALLPAGES), IDEResId(RID_STR_PRINTDLG_PRINTPAGES)}; - const Sequence<OUString> aHelpIds{".HelpID:vcl:PrintDialog:PrintContent:RadioButton:0", - ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:1"}; - const Sequence<OUString> aWidgetIds{"rbAllPages", - "rbRangePages"}; + const Sequence<OUString> aHelpIds{u".HelpID:vcl:PrintDialog:PrintContent:RadioButton:0"_ustr, + u".HelpID:vcl:PrintDialog:PrintContent:RadioButton:1"_ustr}; + const Sequence<OUString> aWidgetIds{u"rbAllPages"_ustr, + u"rbRangePages"_ustr}; m_aUIProperties[1].Value = setChoiceRadiosControlOpt(aWidgetIds, OUString(), aHelpIds, aPrintContentName, aChoices, 0); // create an Edit dependent on "Pages" selected vcl::PrinterOptionsHelper::UIControlOptions aPageRangeOpt(aPrintContentName, 1, true); - m_aUIProperties[2].Value = setEditControlOpt("pagerange", OUString(), - OUString(), "PageRange", + m_aUIProperties[2].Value = setEditControlOpt(u"pagerange"_ustr, OUString(), + OUString(), u"PageRange"_ustr, OUString(), aPageRangeOpt); vcl::PrinterOptionsHelper::UIControlOptions aEvenOddOpt(aPrintContentName, 0, true); - m_aUIProperties[3].Value = setChoiceListControlOpt("evenoddbox", + m_aUIProperties[3].Value = setChoiceListControlOpt(u"evenoddbox"_ustr, OUString(), uno::Sequence<OUString>(), - "EvenOdd", + u"EvenOdd"_ustr, uno::Sequence<OUString>(), 0, uno::Sequence< sal_Bool >(), @@ -83,7 +83,7 @@ Renderable::~Renderable() VclPtr< Printer > Renderable::getPrinter() const { VclPtr< Printer > pPrinter; - Any aValue( getValue( "RenderDevice" ) ); + Any aValue( getValue( u"RenderDevice"_ustr ) ); Reference<awt::XDevice> xRenderDevice; if( aValue >>= xRenderDevice ) @@ -120,7 +120,7 @@ sal_Int32 SAL_CALL Renderable::getRendererCount ( { VclPtr<Printer> pPrinter = getPrinter(); if (!pPrinter) - throw lang::IllegalArgumentException("no printer", static_cast<cppu::OWeakObject*>(this), -1); + throw lang::IllegalArgumentException(u"no printer"_ustr, static_cast<cppu::OWeakObject*>(this), -1); nCount = mpWindow->countPages( pPrinter ); @@ -192,7 +192,7 @@ void SAL_CALL Renderable::render ( VclPtr<Printer> pPrinter = getPrinter(); if (!pPrinter) - throw lang::IllegalArgumentException("no printer", static_cast<cppu::OWeakObject*>(this), -1); + throw lang::IllegalArgumentException(u"no printer"_ustr, static_cast<cppu::OWeakObject*>(this), -1); sal_Int64 nContent = getIntValue( "PrintContent", -1 ); if( nContent == 1 ) diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx index 62bbaa799815..ca4424604594 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -297,7 +297,7 @@ void ModulWindow::CheckCompileBasic() { // tdf#106529: only use strict compilation mode when compiling from the IDE - css::uno::ContextLayer layer(comphelper::NewFlagContext("BasicStrict")); + css::uno::ContextLayer layer(comphelper::NewFlagContext(u"BasicStrict"_ustr)); bDone = m_xModule->Compile(); } if ( !bWasModified ) @@ -422,9 +422,9 @@ void ModulWindow::LoadBasic() aDlg.SetContext(sfx2::FileDialogHelper::BasicImportSource); Reference<XFilePicker3> xFP = aDlg.GetFilePicker(); - xFP->appendFilter( "BASIC" , "*.bas" ); + xFP->appendFilter( u"BASIC"_ustr , u"*.bas"_ustr ); xFP->appendFilter( IDEResId(RID_STR_FILTER_ALLFILES), FilterMask_All ); - xFP->setCurrentFilter( "BASIC" ); + xFP->setCurrentFilter( u"BASIC"_ustr ); if( aDlg.Execute() != ERRCODE_NONE ) return; @@ -470,9 +470,9 @@ void ModulWindow::SaveBasicSource() xFP.queryThrow<XFilePickerControlAccess>()->setValue(ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION, 0, Any(true)); - xFP->appendFilter( "BASIC", "*.bas" ); + xFP->appendFilter( u"BASIC"_ustr, u"*.bas"_ustr ); xFP->appendFilter( IDEResId(RID_STR_FILTER_ALLFILES), FilterMask_All ); - xFP->setCurrentFilter( "BASIC" ); + xFP->setCurrentFilter( u"BASIC"_ustr ); if( aDlg.Execute() != ERRCODE_NONE ) return; diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index e5fd31d22a21..8bf97a6c09a6 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -252,7 +252,7 @@ EditorWindow::EditorWindow (vcl::Window* pParent, ModulWindow* pModulWindow) : m_nLastHighlightPara(0), pCodeCompleteWnd(VclPtr<CodeCompleteWindow>::Create(this)) { - set_id("EditorWindow"); + set_id(u"EditorWindow"_ustr); const Wallpaper aBackground(rModulWindow.GetLayout().GetSyntaxBackgroundColor()); SetBackground(aBackground); GetWindow(GetWindowType::Border)->SetBackground(aBackground); @@ -272,7 +272,7 @@ EditorWindow::EditorWindow (vcl::Window* pParent, ModulWindow* pModulWindow) : // The zoom level applied to the editor window is the zoom slider value in the shell nCurrentZoomLevel = GetShell()->GetCurrentZoomSliderValue(); - const Sequence<OUString> aPropertyNames{"FontHeight", "FontName"}; + const Sequence<OUString> aPropertyNames{u"FontHeight"_ustr, u"FontName"_ustr}; n->addPropertiesChangeListener(aPropertyNames, listener_); } @@ -776,7 +776,7 @@ void EditorWindow::HandleAutoCloseParen() if( aLine.getLength() > 0 && aLine[aSel.GetEnd().GetIndex()-1] != '(' ) { - GetEditView()->InsertText(")"); + GetEditView()->InsertText(u")"_ustr); //leave the cursor on its place: inside the parenthesis TextPaM aEnd(nLine, aSel.GetEnd().GetIndex()); GetEditView()->SetSelection( TextSelection( aEnd, aEnd ) ); @@ -797,7 +797,7 @@ void EditorWindow::HandleAutoCloseDoubleQuotes() if( aLine.getLength() > 0 && !aLine.endsWith("\"") && (aPortions.back().tokenType != TokenType::String) ) { - GetEditView()->InsertText("\""); + GetEditView()->InsertText(u"\""_ustr); //leave the cursor on its place: inside the two double quotes TextPaM aEnd(nLine, aSel.GetEnd().GetIndex()); GetEditView()->SetSelection( TextSelection( aEnd, aEnd ) ); @@ -817,7 +817,7 @@ void EditorWindow::HandleProcedureCompletion() if (!bFoundName) return; - OUString sText(" End "); + OUString sText(u" End "_ustr); aSel = GetEditView()->GetSelection(); if( sProcType.equalsIgnoreAsciiCase("function") ) sText += "Function "; @@ -1266,7 +1266,7 @@ void EditorWindow::InitScrollBars() rModulWindow.GetEditHScrollBar().SetVisibleSize(aOutSz.Width()); rModulWindow.GetEditHScrollBar().SetPageSize(aOutSz.Width() * 8 / 10); - rModulWindow.GetEditHScrollBar().SetLineSize(GetTextWidth( "x" )); + rModulWindow.GetEditHScrollBar().SetLineSize(GetTextWidth( u"x"_ustr )); rModulWindow.GetEditHScrollBar().SetThumbPos(pEditView->GetStartDocPos().X()); rModulWindow.GetEditHScrollBar().Show(); } @@ -1603,15 +1603,15 @@ void BreakPointWindow::Command( const CommandEvent& rCEvt ) tools::Rectangle aRect(aPos, Size(1, 1)); weld::Window* pPopupParent = weld::GetPopupParent(*this, aRect); - std::unique_ptr<weld::Builder> xUIBuilder(Application::CreateBuilder(pPopupParent, "modules/BasicIDE/ui/breakpointmenus.ui")); + std::unique_ptr<weld::Builder> xUIBuilder(Application::CreateBuilder(pPopupParent, u"modules/BasicIDE/ui/breakpointmenus.ui"_ustr)); Point aEventPos( PixelToLogic( aPos ) ); BreakPoint* pBrk = rCEvt.IsMouseEvent() ? FindBreakPoint( aEventPos ) : nullptr; if ( pBrk ) { // test if break point is enabled... - std::unique_ptr<weld::Menu> xBrkPropMenu = xUIBuilder->weld_menu("breakmenu"); - xBrkPropMenu->set_active("active", pBrk->bEnabled); + std::unique_ptr<weld::Menu> xBrkPropMenu = xUIBuilder->weld_menu(u"breakmenu"_ustr); + xBrkPropMenu->set_active(u"active"_ustr, pBrk->bEnabled); OUString sCommand = xBrkPropMenu->popup_at_rect(pPopupParent, aRect); if (sCommand == "active") { @@ -1629,7 +1629,7 @@ void BreakPointWindow::Command( const CommandEvent& rCEvt ) } else { - std::unique_ptr<weld::Menu> xBrkListMenu = xUIBuilder->weld_menu("breaklistmenu"); + std::unique_ptr<weld::Menu> xBrkListMenu = xUIBuilder->weld_menu(u"breaklistmenu"_ustr); OUString sCommand = xBrkListMenu->popup_at_rect(pPopupParent, aRect); if (sCommand == "manage") { @@ -1713,19 +1713,19 @@ struct WatchItem } WatchWindow::WatchWindow(Layout* pParent) - : DockingWindow(pParent, "modules/BasicIDE/ui/dockingwatch.ui", "DockingWatch") + : DockingWindow(pParent, u"modules/BasicIDE/ui/dockingwatch.ui"_ustr, u"DockingWatch"_ustr) , m_nUpdateWatchesId(nullptr) { - m_xTitleArea = m_xBuilder->weld_container("titlearea"); + m_xTitleArea = m_xBuilder->weld_container(u"titlearea"_ustr); nVirtToolBoxHeight = m_xTitleArea->get_preferred_size().Height(); - m_xTitle = m_xBuilder->weld_label("title"); + m_xTitle = m_xBuilder->weld_label(u"title"_ustr); m_xTitle->set_label(IDEResId(RID_STR_REMOVEWATCH)); - m_xEdit = m_xBuilder->weld_entry("edit"); - m_xRemoveWatchButton = m_xBuilder->weld_button("remove"); - m_xTreeListBox = m_xBuilder->weld_tree_view("treeview"); + m_xEdit = m_xBuilder->weld_entry(u"edit"_ustr); + m_xRemoveWatchButton = m_xBuilder->weld_button(u"remove"_ustr); + m_xTreeListBox = m_xBuilder->weld_tree_view(u"treeview"_ustr); m_xEdit->set_accessible_name(IDEResId(RID_STR_WATCHNAME)); m_xEdit->set_help_id(HID_BASICIDE_WATCHWINDOW_EDIT); @@ -1838,8 +1838,8 @@ void WatchWindow::AddWatch( const OUString& rVName ) OUString sId(weld::toId(pWatchItem)); std::unique_ptr<weld::TreeIter> xRet = m_xTreeListBox->make_iterator(); m_xTreeListBox->insert(nullptr, -1, &aVar, &sId, nullptr, nullptr, false, xRet.get()); - m_xTreeListBox->set_text(*xRet, "", 1); - m_xTreeListBox->set_text(*xRet, "", 2); + m_xTreeListBox->set_text(*xRet, u""_ustr, 1); + m_xTreeListBox->set_text(*xRet, u""_ustr, 2); m_xTreeListBox->set_cursor(*xRet); m_xTreeListBox->select(*xRet); @@ -1911,14 +1911,14 @@ IMPL_LINK(WatchWindow, KeyInputHdl, const KeyEvent&, rKEvt, bool) // StackWindow StackWindow::StackWindow(Layout* pParent) - : DockingWindow(pParent, "modules/BasicIDE/ui/dockingstack.ui", "DockingStack") + : DockingWindow(pParent, u"modules/BasicIDE/ui/dockingstack.ui"_ustr, u"DockingStack"_ustr) { - m_xTitle = m_xBuilder->weld_label("title"); + m_xTitle = m_xBuilder->weld_label(u"title"_ustr); m_xTitle->set_label(IDEResId(RID_STR_STACK)); m_xTitle->set_size_request(-1, nVirtToolBoxHeight); // so the two title areas are the same height - m_xTreeListBox = m_xBuilder->weld_tree_view("stack"); + m_xTreeListBox = m_xBuilder->weld_tree_view(u"stack"_ustr); m_xTreeListBox->set_help_id(HID_BASICIDE_STACKWINDOW_LIST); m_xTreeListBox->set_accessible_name(IDEResId(RID_STR_STACKNAME)); @@ -2220,8 +2220,8 @@ IMPL_LINK(WatchWindow, RequestingChildrenHdl, const weld::TreeIter&, rParent, bo OUString sId(weld::toId(pWatchItem)); m_xTreeListBox->insert(&rParent, -1, &rName, &sId, nullptr, nullptr, false, xRet.get()); - m_xTreeListBox->set_text(*xRet, "", 1); - m_xTreeListBox->set_text(*xRet, "", 2); + m_xTreeListBox->set_text(*xRet, u""_ustr, 1); + m_xTreeListBox->set_text(*xRet, u""_ustr, 2); } if (nPropCount > 0 && !m_nUpdateWatchesId) @@ -2272,8 +2272,8 @@ IMPL_LINK(WatchWindow, RequestingChildrenHdl, const weld::TreeIter&, rParent, bo m_xTreeListBox->insert(&rParent, -1, &aDisplayName, &sId, nullptr, nullptr, false, xRet.get()); - m_xTreeListBox->set_text(*xRet, "", 1); - m_xTreeListBox->set_text(*xRet, "", 2); + m_xTreeListBox->set_text(*xRet, u""_ustr, 1); + m_xTreeListBox->set_text(*xRet, u""_ustr, 2); nElementCount++; } @@ -2601,7 +2601,7 @@ void WatchWindow::UpdateWatches(bool bBasicStopped) } bool bString = (static_cast<sal_uInt8>(eType) == sal_uInt8(SbxSTRING)); - OUString aStrStr( "\"" ); + OUString aStrStr( u"\""_ustr ); if( bString ) { aWatchStr += aStrStr; @@ -2854,9 +2854,9 @@ void CodeCompleteWindow::HideAndRestoreFocus() } CodeCompleteWindow::CodeCompleteWindow(EditorWindow* pPar) - : InterimItemWindow(pPar, "modules/BasicIDE/ui/codecomplete.ui", "CodeComplete") + : InterimItemWindow(pPar, u"modules/BasicIDE/ui/codecomplete.ui"_ustr, u"CodeComplete"_ustr) , pParent(pPar) - , m_xListBox(m_xBuilder->weld_tree_view("treeview")) + , m_xListBox(m_xBuilder->weld_tree_view(u"treeview"_ustr)) { m_xListBox->connect_row_activated(LINK(this, CodeCompleteWindow, ImplDoubleClickHdl)); m_xListBox->connect_changed(LINK(this, CodeCompleteWindow, ImplSelectHdl)); diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx index 4a6b1dfbfb5c..ea4fcb4c33de 100644 --- a/basctl/source/basicide/baside3.cxx +++ b/basctl/source/basicide/baside3.cxx @@ -250,7 +250,7 @@ void DialogWindow::GetState( SfxItemSet& rSet ) if ( xModel.is() ) { Reference< lang::XServiceInfo > xServiceInfo ( xModel, UNO_QUERY ); - if ( xServiceInfo.is() && xServiceInfo->supportsService( "com.sun.star.sheet.SpreadsheetDocument" ) ) + if ( xServiceInfo.is() && xServiceInfo->supportsService( u"com.sun.star.sheet.SpreadsheetDocument"_ustr ) ) bIsCalc = true; } } @@ -610,7 +610,7 @@ void DialogWindow::SaveDialog() xFP->setDefaultName( GetName() ); OUString aDialogStr(IDEResId(RID_STR_STDDIALOGNAME)); - xFP->appendFilter( aDialogStr, "*.xdl" ); + xFP->appendFilter( aDialogStr, u"*.xdl"_ustr ); xFP->appendFilter( IDEResId(RID_STR_FILTER_ALLFILES), FilterMask_All ); xFP->setCurrentFilter( aDialogStr ); @@ -652,7 +652,7 @@ void DialogWindow::SaveDialog() { try { - Any aResourceResolver = xDialogModelPropSet->getPropertyValue( "ResourceResolver" ); + Any aResourceResolver = xDialogModelPropSet->getPropertyValue( u"ResourceResolver"_ustr ); aResourceResolver >>= xStringResourceResolver; } catch(const beans::UnknownPropertyException& ) @@ -792,7 +792,7 @@ bool implImportDialog(weld::Window* pWin, const ScriptDocument& rDocument, const Reference<XFilePicker3> xFP = aDlg.GetFilePicker(); OUString aDialogStr(IDEResId(RID_STR_STDDIALOGNAME)); - xFP->appendFilter( aDialogStr, "*.xdl" ); + xFP->appendFilter( aDialogStr, u"*.xdl"_ustr ); xFP->appendFilter( IDEResId(RID_STR_FILTER_ALLFILES), FilterMask_All ); xFP->setCurrentFilter( aDialogStr ); @@ -810,7 +810,7 @@ bool implImportDialog(weld::Window* pWin, const ScriptDocument& rDocument, const { // create dialog model Reference< container::XNameContainer > xDialogModel( - xContext->getServiceManager()->createInstanceWithContext("com.sun.star.awt.UnoControlDialogModel", xContext), + xContext->getServiceManager()->createInstanceWithContext(u"com.sun.star.awt.UnoControlDialogModel"_ustr, xContext), UNO_QUERY_THROW ); Reference< XSimpleFileAccess3 > xSFI( SimpleFileAccess::create(xContext) ); diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx index b5ac6852986f..3c302709db86 100644 --- a/basctl/source/basicide/basides1.cxx +++ b/basctl/source/basicide/basides1.cxx @@ -724,7 +724,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq ) if ( pNameItem ) { const OUString& aName( pNameItem->GetValue() ); - OUString aModType( "Module" ); + OUString aModType( u"Module"_ustr ); OUString aType( aModType ); const SfxStringItem* pTypeItem = rReq.GetArg<SfxStringItem>(SID_BASICIDE_ARG_TYPE); if ( pTypeItem ) @@ -1137,7 +1137,7 @@ void Shell::GetState(SfxItemSet &rSet) break; case SID_BASICIDE_STAT_DATE: { - SfxStringItem aItem( SID_BASICIDE_STAT_DATE, "Datum?!" ); + SfxStringItem aItem( SID_BASICIDE_STAT_DATE, u"Datum?!"_ustr ); rSet.Put( aItem ); } break; @@ -1434,7 +1434,7 @@ void Shell::ManageToolbars() return; Reference< css::frame::XLayoutManager > xLayoutManager; - uno::Any a = xFrameProps->getPropertyValue( "LayoutManager" ); + uno::Any a = xFrameProps->getPropertyValue( u"LayoutManager"_ustr ); a >>= xLayoutManager; if ( !xLayoutManager.is() ) return; diff --git a/basctl/source/basicide/basides3.cxx b/basctl/source/basicide/basides3.cxx index 44bc54ba624f..6cb0484c5497 100644 --- a/basctl/source/basicide/basides3.cxx +++ b/basctl/source/basicide/basides3.cxx @@ -74,7 +74,7 @@ VclPtr<DialogWindow> Shell::CreateDlgWin( const ScriptDocument& rDocument, const // create dialog model Reference< XComponentContext > xContext = comphelper::getProcessComponentContext(); Reference< container::XNameContainer > xDialogModel( xContext->getServiceManager()->createInstanceWithContext - ( "com.sun.star.awt.UnoControlDialogModel", xContext ), UNO_QUERY ); + ( u"com.sun.star.awt.UnoControlDialogModel"_ustr, xContext ), UNO_QUERY ); Reference< XInputStream > xInput( xISP->createInputStream() ); ::xmlscript::importDialogModel( xInput, xDialogModel, xContext, rDocument.isDocument() ? rDocument.getDocument() : Reference< frame::XModel >() ); LocalizationMgr::setStringResourceAtDialog( rDocument, rLibName, aDlgName, xDialogModel ); diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx index 9f08b9b00a8b..6e072c5f77f8 100644 --- a/basctl/source/basicide/basidesh.cxx +++ b/basctl/source/basicide/basidesh.cxx @@ -159,7 +159,7 @@ void basctl_Shell::InitInterface_Impl() GetStaticInterface()->RegisterChildWindow(SID_SHOW_PROPERTYBROWSER, false, SfxShellFeature::BasicShowBrowser); GetStaticInterface()->RegisterChildWindow(SfxInfoBarContainerChild::GetChildWindowId()); - GetStaticInterface()->RegisterPopupMenu("dialog"); + GetStaticInterface()->RegisterPopupMenu(u"dialog"_ustr); } unsigned Shell::nShellCount = 0; @@ -189,7 +189,7 @@ void Shell::Init() GetExtraData()->ShellInCriticalSection() = true; - SetName( "BasicIDE" ); + SetName( u"BasicIDE"_ustr ); LibBoxControl::RegisterControl( SID_BASICIDE_LIBSELECTOR ); LanguageBoxControl::RegisterControl( SID_BASICIDE_CURRENT_LANG ); @@ -219,7 +219,7 @@ void Shell::Init() if (!bObjCatVisible) aObjectCatalog->Show(bObjCatVisible); - SetCurLib( ScriptDocument::getApplicationScriptDocument(), "Standard", false, false ); + SetCurLib( ScriptDocument::getApplicationScriptDocument(), u"Standard"_ustr, false, false ); ShellCreated(this); @@ -356,7 +356,7 @@ void Shell::onDocumentClosed( const ScriptDocument& _rDocument ) pData->GetLibInfo().RemoveInfoFor( _rDocument ); if ( bSetCurLib ) - SetCurLib( ScriptDocument::getApplicationScriptDocument(), "Standard", true, false ); + SetCurLib( ScriptDocument::getApplicationScriptDocument(), u"Standard"_ustr, true, false ); else if ( bSetCurWindow ) SetCurWindow( FindApplicationWindow(), true ); } diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx index 352742be8a4e..e8148394e755 100644 --- a/basctl/source/basicide/bastype2.cxx +++ b/basctl/source/basicide/bastype2.cxx @@ -60,7 +60,7 @@ void ModuleInfoHelper::getObjectName( const uno::Reference< container::XNameCont script::ModuleInfo aModuleInfo = xVBAModuleInfo->getModuleInfo( rModName ); uno::Any aObject( aModuleInfo.ModuleObject ); uno::Reference< lang::XServiceInfo > xServiceInfo( aObject, uno::UNO_QUERY ); - if( xServiceInfo.is() && xServiceInfo->supportsService( "ooo.vba.excel.Worksheet" ) ) + if( xServiceInfo.is() && xServiceInfo->supportsService( u"ooo.vba.excel.Worksheet"_ustr ) ) { uno::Reference< container::XNamed > xNamed( aObject, uno::UNO_QUERY ); if( xNamed.is() ) @@ -702,8 +702,8 @@ void SbTreeListBox::SetCurrentEntry (EntryDescriptor const & rDesc) { aDesc = EntryDescriptor( ScriptDocument::getApplicationScriptDocument(), - LIBRARY_LOCATION_USER, "Standard", - OUString(), ".", OBJ_TYPE_UNKNOWN + LIBRARY_LOCATION_USER, u"Standard"_ustr, + OUString(), u"."_ustr, OBJ_TYPE_UNKNOWN ); } ScriptDocument aDocument = aDesc.GetDocument(); diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx index e436bc9f7e0a..01cf214d1045 100644 --- a/basctl/source/basicide/bastypes.cxx +++ b/basctl/source/basicide/bastypes.cxx @@ -509,7 +509,7 @@ void TabBar::Command( const CommandEvent& rCEvt ) ::TabBar::MouseButtonDown( aMouseEvent ); // base class } if (SfxDispatcher* pDispatcher = GetDispatcher()) - pDispatcher->ExecutePopup("tabbar", this, &aPos); + pDispatcher->ExecutePopup(u"tabbar"_ustr, this, &aPos); } } diff --git a/basctl/source/basicide/brkdlg.cxx b/basctl/source/basicide/brkdlg.cxx index f39255371b19..aafe50aafcc8 100644 --- a/basctl/source/basicide/brkdlg.cxx +++ b/basctl/source/basicide/brkdlg.cxx @@ -55,16 +55,17 @@ bool lcl_ParseText(OUString const& rText, size_t& rLineNr) } // namespace BreakPointDialog::BreakPointDialog(weld::Window* pParent, BreakPointList& rBrkPntList) - : GenericDialogController(pParent, "modules/BasicIDE/ui/managebreakpoints.ui", - "ManageBreakpointsDialog") + : GenericDialogController(pParent, u"modules/BasicIDE/ui/managebreakpoints.ui"_ustr, + u"ManageBreakpointsDialog"_ustr) , m_rOriginalBreakPointList(rBrkPntList) , m_aModifiedBreakPointList(rBrkPntList) - , m_xComboBox(m_xBuilder->weld_entry_tree_view("entriesgrid", "entries", "entrieslist")) - , m_xOKButton(m_xBuilder->weld_button("ok")) - , m_xNewButton(m_xBuilder->weld_button("new")) - , m_xDelButton(m_xBuilder->weld_button("delete")) - , m_xCheckBox(m_xBuilder->weld_check_button("active")) - , m_xNumericField(m_xBuilder->weld_spin_button("pass")) + , m_xComboBox(m_xBuilder->weld_entry_tree_view(u"entriesgrid"_ustr, u"entries"_ustr, + u"entrieslist"_ustr)) + , m_xOKButton(m_xBuilder->weld_button(u"ok"_ustr)) + , m_xNewButton(m_xBuilder->weld_button(u"new"_ustr)) + , m_xDelButton(m_xBuilder->weld_button(u"delete"_ustr)) + , m_xCheckBox(m_xBuilder->weld_check_button(u"active"_ustr)) + , m_xNumericField(m_xBuilder->weld_spin_button(u"pass"_ustr)) { m_xComboBox->set_size_request(m_xComboBox->get_approximate_digit_width() * 20, -1); m_xComboBox->set_height_request_by_rows(12); diff --git a/basctl/source/basicide/iderdll.cxx b/basctl/source/basicide/iderdll.cxx index 022045050e9a..2a3328475c84 100644 --- a/basctl/source/basicide/iderdll.cxx +++ b/basctl/source/basicide/iderdll.cxx @@ -124,7 +124,7 @@ Dll::Dll () : GetExtraData(); // to cause GlobalErrorHdl to be set - rFactory.SetDocumentServiceName( "com.sun.star.script.BasicIDE" ); + rFactory.SetDocumentServiceName( u"com.sun.star.script.BasicIDE"_ustr ); DocShell::RegisterInterface( pMod ); Shell::RegisterFactory( SVX_INTERFACE_BASIDE_VIEWSH ); diff --git a/basctl/source/basicide/linenumberwindow.cxx b/basctl/source/basicide/linenumberwindow.cxx index 80fff0872f10..3f9f97d0e173 100644 --- a/basctl/source/basicide/linenumberwindow.cxx +++ b/basctl/source/basicide/linenumberwindow.cxx @@ -29,7 +29,7 @@ LineNumberWindow::LineNumberWindow(vcl::Window* pParent, ModulWindow* pModulWind GetWindow(GetWindowType::Border)->SetBackground(aBackground); m_FontColor = GetSettings().GetStyleSettings().GetWindowTextColor(); m_HighlightColor = GetSettings().GetStyleSettings().GetFaceColor(); - m_nBaseWidth = GetTextWidth("8"); + m_nBaseWidth = GetTextWidth(u"8"_ustr); m_nWidth = m_nBaseWidth * 3 + m_nBaseWidth / 2; } @@ -71,7 +71,7 @@ void LineNumberWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Re // FIXME: it would be best if we could get notified of a font change // rather than doing that re-calculation at each Paint event - m_nBaseWidth = GetTextWidth("8"); + m_nBaseWidth = GetTextWidth(u"8"_ustr); // reserve enough for 3 digit minimum, with a bit to spare for comfort m_nWidth = m_nBaseWidth * 3 + m_nBaseWidth / 2; diff --git a/basctl/source/basicide/localizationmgr.cxx b/basctl/source/basicide/localizationmgr.cxx index e978e1ca130f..937e4bd511b2 100644 --- a/basctl/source/basicide/localizationmgr.cxx +++ b/basctl/source/basicide/localizationmgr.cxx @@ -88,7 +88,7 @@ void LocalizationMgr::handleTranslationbar () return; Reference< css::frame::XLayoutManager > xLayoutManager; - uno::Any a = xFrameProps->getPropertyValue( "LayoutManager" ); + uno::Any a = xFrameProps->getPropertyValue( u"LayoutManager"_ustr ); a >>= xLayoutManager; if ( xLayoutManager.is() ) { @@ -845,7 +845,7 @@ void LocalizationMgr::setStringResourceAtDialog( const ScriptDocument& rDocument } Reference< beans::XPropertySet > xDlgPSet( xDialogModel, UNO_QUERY ); - xDlgPSet->setPropertyValue( "ResourceResolver", Any(xStringResourceManager) ); + xDlgPSet->setPropertyValue( u"ResourceResolver"_ustr, Any(xStringResourceManager) ); } void LocalizationMgr::renameStringResourceIDs( const ScriptDocument& rDocument, const OUString& aLibName, diff --git a/basctl/source/basicide/macrodlg.cxx b/basctl/source/basicide/macrodlg.cxx index 6b4afb79f772..18ab8e2290f9 100644 --- a/basctl/source/basicide/macrodlg.cxx +++ b/basctl/source/basicide/macrodlg.cxx @@ -51,29 +51,29 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::uno; MacroChooser::MacroChooser(weld::Window* pParnt, const Reference< frame::XFrame >& xDocFrame) - : SfxDialogController(pParnt, "modules/BasicIDE/ui/basicmacrodialog.ui", "BasicMacroDialog") + : SfxDialogController(pParnt, u"modules/BasicIDE/ui/basicmacrodialog.ui"_ustr, u"BasicMacroDialog"_ustr) , m_xDocumentFrame(xDocFrame) // the Sfx doesn't ask the BasicManager whether modified or not // => start saving in case of a change without a into the BasicIDE. , bForceStoreBasic(false) , nMode(All) - , m_xMacroNameEdit(m_xBuilder->weld_entry("macronameedit")) - , m_xMacroFromTxT(m_xBuilder->weld_label("macrofromft")) - , m_xMacrosSaveInTxt(m_xBuilder->weld_label("macrotoft")) - , m_xBasicBox(new SbTreeListBox(m_xBuilder->weld_tree_view("libraries"), m_xDialog.get())) + , m_xMacroNameEdit(m_xBuilder->weld_entry(u"macronameedit"_ustr)) + , m_xMacroFromTxT(m_xBuilder->weld_label(u"macrofromft"_ustr)) + , m_xMacrosSaveInTxt(m_xBuilder->weld_label(u"macrotoft"_ustr)) + , m_xBasicBox(new SbTreeListBox(m_xBuilder->weld_tree_view(u"libraries"_ustr), m_xDialog.get())) , m_xBasicBoxIter(m_xBasicBox->make_iterator()) - , m_xMacrosInTxt(m_xBuilder->weld_label("existingmacrosft")) - , m_xMacroBox(m_xBuilder->weld_tree_view("macros")) + , m_xMacrosInTxt(m_xBuilder->weld_label(u"existingmacrosft"_ustr)) + , m_xMacroBox(m_xBuilder->weld_tree_view(u"macros"_ustr)) , m_xMacroBoxIter(m_xMacroBox->make_iterator()) - , m_xRunButton(m_xBuilder->weld_button("ok")) - , m_xCloseButton(m_xBuilder->weld_button("close")) - , m_xAssignButton(m_xBuilder->weld_button("assign")) - , m_xEditButton(m_xBuilder->weld_button("edit")) - , m_xDelButton(m_xBuilder->weld_button("delete")) - , m_xNewButton(m_xBuilder->weld_button("new")) - , m_xOrganizeButton(m_xBuilder->weld_button("organize")) - , m_xNewLibButton(m_xBuilder->weld_button("newlibrary")) - , m_xNewModButton(m_xBuilder->weld_button("newmodule")) + , m_xRunButton(m_xBuilder->weld_button(u"ok"_ustr)) + , m_xCloseButton(m_xBuilder->weld_button(u"close"_ustr)) + , m_xAssignButton(m_xBuilder->weld_button(u"assign"_ustr)) + , m_xEditButton(m_xBuilder->weld_button(u"edit"_ustr)) + , m_xDelButton(m_xBuilder->weld_button(u"delete"_ustr)) + , m_xNewButton(m_xBuilder->weld_button(u"new"_ustr)) + , m_xOrganizeButton(m_xBuilder->weld_button(u"organize"_ustr)) + , m_xNewLibButton(m_xBuilder->weld_button(u"newlibrary"_ustr)) + , m_xNewModButton(m_xBuilder->weld_button(u"newmodule"_ustr)) { m_xBasicBox->set_size_request(m_xBasicBox->get_approximate_digit_width() * 30, m_xBasicBox->get_height_rows(18)); m_xMacroBox->set_size_request(m_xMacroBox->get_approximate_digit_width() * 30, m_xMacroBox->get_height_rows(18)); @@ -785,11 +785,11 @@ IMPL_LINK(MacroChooser, ContextMenuHdl, const CommandEvent&, rCEvt, bool) if (rCEvt.GetCommand() != CommandEventId::ContextMenu || !m_xMacroBox->n_children()) return false; - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(m_xMacroBox.get(), "modules/BasicIDE/ui/sortmenu.ui")); - std::unique_ptr<weld::Menu> xPopup(xBuilder->weld_menu("sortmenu")); - std::unique_ptr<weld::Menu> xDropMenu(xBuilder->weld_menu("sortsubmenu")); - xDropMenu->set_active("alphabetically", m_xMacroBox->get_sort_order()); - xDropMenu->set_active("properorder", !m_xMacroBox->get_sort_order()); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(m_xMacroBox.get(), u"modules/BasicIDE/ui/sortmenu.ui"_ustr)); + std::unique_ptr<weld::Menu> xPopup(xBuilder->weld_menu(u"sortmenu"_ustr)); + std::unique_ptr<weld::Menu> xDropMenu(xBuilder->weld_menu(u"sortsubmenu"_ustr)); + xDropMenu->set_active(u"alphabetically"_ustr, m_xMacroBox->get_sort_order()); + xDropMenu->set_active(u"properorder"_ustr, !m_xMacroBox->get_sort_order()); OUString sCommand(xPopup->popup_at_rect(m_xMacroBox.get(), tools::Rectangle(rCEvt.GetMousePosPixel(), Size(1,1)))); if (sCommand == "alphabetically") @@ -812,7 +812,7 @@ IMPL_LINK(MacroChooser, ContextMenuHdl, const CommandEvent&, rCEvt, bool) void MacroChooser::UpdateFields() { auto nMacroEntry = m_xMacroBox->get_selected_index(); - m_xMacroNameEdit->set_text(""); + m_xMacroNameEdit->set_text(u""_ustr); if (nMacroEntry != -1) m_xMacroNameEdit->set_text(m_xMacroBox->get_text(nMacroEntry)); } diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx index 49b8927f11c5..b2a8a5e691ea 100644 --- a/basctl/source/basicide/moduldl2.cxx +++ b/basctl/source/basicide/moduldl2.cxx @@ -130,9 +130,9 @@ IMPL_LINK_NOARG(NewObjectDialog, OkButtonHandler, weld::Button&, void) } NewObjectDialog::NewObjectDialog(weld::Window * pParent, ObjectMode eMode, bool bCheckName) - : GenericDialogController(pParent, "modules/BasicIDE/ui/newlibdialog.ui", "NewLibDialog") - , m_xEdit(m_xBuilder->weld_entry("entry")) - , m_xOKButton(m_xBuilder->weld_button("ok")) + : GenericDialogController(pParent, u"modules/BasicIDE/ui/newlibdialog.ui"_ustr, u"NewLibDialog"_ustr) + , m_xEdit(m_xBuilder->weld_entry(u"entry"_ustr)) + , m_xOKButton(m_xBuilder->weld_button(u"ok"_ustr)) , m_bCheckName(bCheckName) { switch (eMode) @@ -154,10 +154,10 @@ NewObjectDialog::NewObjectDialog(weld::Window * pParent, ObjectMode eMode, bool // GotoLineDialog GotoLineDialog::GotoLineDialog(weld::Window* pParent, sal_uInt32 nCurLine, sal_uInt32 nLineCount) - : GenericDialogController(pParent, "modules/BasicIDE/ui/gotolinedialog.ui", "GotoLineDialog") - , m_xSpinButton(m_xBuilder->weld_spin_button("spin")) - , m_xLineCount(m_xBuilder->weld_label("line_count")) - , m_xOKButton(m_xBuilder->weld_button("ok")) + : GenericDialogController(pParent, u"modules/BasicIDE/ui/gotolinedialog.ui"_ustr, u"GotoLineDialog"_ustr) + , m_xSpinButton(m_xBuilder->weld_spin_button(u"spin"_ustr)) + , m_xLineCount(m_xBuilder->weld_label(u"line_count"_ustr)) + , m_xOKButton(m_xBuilder->weld_button(u"ok"_ustr)) , m_nCurLine(nCurLine) , m_nLineCount(nLineCount) { @@ -206,10 +206,10 @@ IMPL_LINK_NOARG(ExportDialog, OkButtonHandler, weld::Button&, void) } ExportDialog::ExportDialog(weld::Window * pParent) - : GenericDialogController(pParent, "modules/BasicIDE/ui/exportdialog.ui", "ExportDialog") + : GenericDialogController(pParent, u"modules/BasicIDE/ui/exportdialog.ui"_ustr, u"ExportDialog"_ustr) , m_bExportAsPackage(false) - , m_xExportAsPackageButton(m_xBuilder->weld_radio_button("extension")) - , m_xOKButton(m_xBuilder->weld_button("ok")) + , m_xExportAsPackageButton(m_xBuilder->weld_radio_button(u"extension"_ustr)) + , m_xOKButton(m_xBuilder->weld_button(u"ok"_ustr)) { m_xExportAsPackageButton->set_active(true); m_xOKButton->connect_clicked(LINK(this, ExportDialog, OkButtonHandler)); @@ -221,15 +221,15 @@ ExportDialog::~ExportDialog() // LibPage LibPage::LibPage(weld::Container* pParent, OrganizeDialog* pDialog) - : OrganizePage(pParent, "modules/BasicIDE/ui/libpage.ui", "LibPage", pDialog) - , m_xBasicsBox(m_xBuilder->weld_combo_box("location")) - , m_xLibBox(m_xBuilder->weld_tree_view("library")) - , m_xEditButton(m_xBuilder->weld_button("edit")) - , m_xPasswordButton(m_xBuilder->weld_button("password")) - , m_xNewLibButton(m_xBuilder->weld_button("new")) - , m_xInsertLibButton(m_xBuilder->weld_button("import")) - , m_xExportButton(m_xBuilder->weld_button("export")) - , m_xDelButton(m_xBuilder->weld_button("delete")) + : OrganizePage(pParent, u"modules/BasicIDE/ui/libpage.ui"_ustr, u"LibPage"_ustr, pDialog) + , m_xBasicsBox(m_xBuilder->weld_combo_box(u"location"_ustr)) + , m_xLibBox(m_xBuilder->weld_tree_view(u"library"_ustr)) + , m_xEditButton(m_xBuilder->weld_button(u"edit"_ustr)) + , m_xPasswordButton(m_xBuilder->weld_button(u"password"_ustr)) + , m_xNewLibButton(m_xBuilder->weld_button(u"new"_ustr)) + , m_xInsertLibButton(m_xBuilder->weld_button(u"import"_ustr)) + , m_xExportButton(m_xBuilder->weld_button(u"export"_ustr)) + , m_xDelButton(m_xBuilder->weld_button(u"delete"_ustr)) , m_aCurDocument(ScriptDocument::getApplicationScriptDocument()) , m_eCurLocation(LIBRARY_LOCATION_UNKNOWN) { @@ -575,7 +575,7 @@ void LibPage::InsertLib() // filter OUString aTitle(IDEResId(RID_STR_BASIC)); - xFP->appendFilter( aTitle, "*.sbl;*.xlc;*.xlb" // library files + xFP->appendFilter( aTitle, u"*.sbl;*.xlc;*.xlb" // library files ";*.sdw;*.sxw;*.odt" // text ";*.vor;*.stw;*.ott" // text template ";*.sgl;*.sxg;*.odm" // master document @@ -586,7 +586,7 @@ void LibPage::InsertLib() ";*.std;*.otg" // drawing template ";*.sdd;*.sxi;*.odp" // presentation ";*.sti;*.otp" // presentation template - ";*.sxm;*.odf" ); // formula + ";*.sxm;*.odf"_ustr ); // formula OUString aLastFilter(GetExtraData()->GetAddLibFilter()); if ( !aLastFilter.isEmpty() ) @@ -611,8 +611,8 @@ void LibPage::InsertLib() auto xDlgURLObj = std::make_shared<INetURLObject>(aURLObj); OUString aBase = aURLObj.getBase(); - OUString aModBase( "script" ); - OUString aDlgBase( "dialog" ); + OUString aModBase( u"script"_ustr ); + OUString aDlgBase( u"dialog"_ustr ); if ( aBase == aModBase || aBase == aDlgBase ) { @@ -678,8 +678,8 @@ void LibPage::InsertLib() } OUString aExtension( aURLObj.getExtension() ); - OUString aLibExtension( "xlb" ); - OUString aContExtension( "xlc" ); + OUString aLibExtension( u"xlb"_ustr ); + OUString aContExtension( u"xlc"_ustr ); // disable reference checkbox for documents and sbls if ( aExtension != aLibExtension && aExtension != aContExtension ) @@ -1022,7 +1022,7 @@ void LibPage::ExportAsPackage( const OUString& aLibName ) // filter OUString aTitle(IDEResId(RID_STR_PACKAGE_BUNDLE)); - xFP->appendFilter( aTitle, "*.oxt" ); // library files + xFP->appendFilter( aTitle, u"*.oxt"_ustr ); // library files xFP->setCurrentFilter( aTitle ); @@ -1080,7 +1080,7 @@ void LibPage::ExportAsPackage( const OUString& aLibName ) + "/" ; auto attribs(::comphelper::InitPropertySequence({ { "FullPath", Any(fullPath) }, - { "MediaType", Any(OUString("application/vnd.sun.star.basic-library")) } + { "MediaType", Any(u"application/vnd.sun.star.basic-library"_ustr) } })); manifest.push_back( attribs ); diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx index dcdac9fbd645..988ee57fe0ad 100644 --- a/basctl/source/basicide/moduldlg.cxx +++ b/basctl/source/basicide/moduldlg.cxx @@ -161,7 +161,7 @@ void Shell::CopyDialogResources( // create dialog model Reference< XComponentContext > xContext = comphelper::getProcessComponentContext(); Reference< container::XNameContainer > xDialogModel( xContext->getServiceManager()->createInstanceWithContext - ( "com.sun.star.awt.UnoControlDialogModel", xContext ), UNO_QUERY ); + ( u"com.sun.star.awt.UnoControlDialogModel"_ustr, xContext ), UNO_QUERY ); Reference< io::XInputStream > xInput( io_xISP->createInputStream() ); ::xmlscript::importDialogModel( xInput, xDialogModel, xContext, rSourceDoc.isDocument() ? rSourceDoc.getDocument() : Reference< frame::XModel >() ); @@ -200,11 +200,11 @@ void OrganizeDialog::SetCurrentEntry(const css::uno::Reference<css::frame::XFram // OrganizeDialog OrganizeDialog::OrganizeDialog(weld::Window* pParent, const css::uno::Reference<css::frame::XFrame>& xDocFrame, sal_Int16 tabId) - : GenericDialogController(pParent, "modules/BasicIDE/ui/organizedialog.ui", "OrganizeDialog") - , m_xTabCtrl(m_xBuilder->weld_notebook("tabcontrol")) - , m_xModulePage(new ObjectPage(m_xTabCtrl->get_page("modules"), "ModulePage", BrowseMode::Modules, this)) - , m_xDialogPage(new ObjectPage(m_xTabCtrl->get_page("dialogs"), "DialogPage", BrowseMode::Dialogs, this)) - , m_xLibPage(new LibPage(m_xTabCtrl->get_page("libraries"), this)) + : GenericDialogController(pParent, u"modules/BasicIDE/ui/organizedialog.ui"_ustr, u"OrganizeDialog"_ustr) + , m_xTabCtrl(m_xBuilder->weld_notebook(u"tabcontrol"_ustr)) + , m_xModulePage(new ObjectPage(m_xTabCtrl->get_page(u"modules"_ustr), u"ModulePage"_ustr, BrowseMode::Modules, this)) + , m_xDialogPage(new ObjectPage(m_xTabCtrl->get_page(u"dialogs"_ustr), u"DialogPage"_ustr, BrowseMode::Dialogs, this)) + , m_xLibPage(new LibPage(m_xTabCtrl->get_page(u"libraries"_ustr), this)) { m_xTabCtrl->connect_enter_page(LINK(this, OrganizeDialog, ActivatePageHdl)); @@ -565,11 +565,11 @@ public: ObjectPage::ObjectPage(weld::Container* pParent, const OUString &rName, BrowseMode nMode, OrganizeDialog* pDialog) : OrganizePage(pParent, "modules/BasicIDE/ui/" + rName.toAsciiLowerCase() + ".ui", rName, pDialog) - , m_xBasicBox(new SbTreeListBox(m_xBuilder->weld_tree_view("library"), pDialog->getDialog())) - , m_xEditButton(m_xBuilder->weld_button("edit")) - , m_xNewModButton(m_xBuilder->weld_button("newmodule")) - , m_xNewDlgButton(m_xBuilder->weld_button("newdialog")) - , m_xDelButton(m_xBuilder->weld_button("delete")) + , m_xBasicBox(new SbTreeListBox(m_xBuilder->weld_tree_view(u"library"_ustr), pDialog->getDialog())) + , m_xEditButton(m_xBuilder->weld_button(u"edit"_ustr)) + , m_xNewModButton(m_xBuilder->weld_button(u"newmodule"_ustr)) + , m_xNewDlgButton(m_xBuilder->weld_button(u"newdialog"_ustr)) + , m_xDelButton(m_xBuilder->weld_button(u"delete"_ustr)) { Size aSize(m_xBasicBox->get_approximate_digit_width() * 40, m_xBasicBox->get_height_rows(14)); @@ -926,11 +926,11 @@ void ObjectPage::EndTabDialog() } LibDialog::LibDialog(weld::Window* pParent) - : GenericDialogController(pParent, "modules/BasicIDE/ui/importlibdialog.ui", "ImportLibDialog") - , m_xStorageFrame(m_xBuilder->weld_frame("storageframe")) - , m_xLibBox(m_xBuilder->weld_tree_view("entries")) - , m_xReferenceBox(m_xBuilder->weld_check_button("ref")) - , m_xReplaceBox(m_xBuilder->weld_check_button("replace")) + : GenericDialogController(pParent, u"modules/BasicIDE/ui/importlibdialog.ui"_ustr, u"ImportLibDialog"_ustr) + , m_xStorageFrame(m_xBuilder->weld_frame(u"storageframe"_ustr)) + , m_xLibBox(m_xBuilder->weld_tree_view(u"entries"_ustr)) + , m_xReferenceBox(m_xBuilder->weld_check_button(u"ref"_ustr)) + , m_xReplaceBox(m_xBuilder->weld_check_button(u"replace"_ustr)) { m_xLibBox->set_size_request(m_xLibBox->get_approximate_digit_width() * 28, m_xLibBox->get_height_rows(8)); diff --git a/basctl/source/basicide/scriptdocument.cxx b/basctl/source/basicide/scriptdocument.cxx index c435d7a57da7..5d2dc915c6df 100644 --- a/basctl/source/basicide/scriptdocument.cxx +++ b/basctl/source/basicide/scriptdocument.cxx @@ -606,7 +606,7 @@ namespace basctl xDialogModel.set( ( aContext->getServiceManager()-> createInstanceWithContext( - "com.sun.star.awt.UnoControlDialogModel", + u"com.sun.star.awt.UnoControlDialogModel"_ustr, aContext ) ), UNO_QUERY_THROW ); @@ -737,7 +737,7 @@ namespace basctl comphelper::getProcessComponentContext() ); Reference< XNameContainer > xDialogModel( aContext->getServiceManager()->createInstanceWithContext( - "com.sun.star.awt.UnoControlDialogModel", aContext ), + u"com.sun.star.awt.UnoControlDialogModel"_ustr, aContext ), UNO_QUERY_THROW ); // set name property @@ -819,7 +819,7 @@ namespace basctl Reference< XDispatchProvider > xDispProv( xFrame, UNO_QUERY_THROW ); Reference< XDispatch > xDispatch( - xDispProv->queryDispatch( aURL, "_self", FrameSearchFlag::AUTO ), + xDispProv->queryDispatch( aURL, u"_self"_ustr, FrameSearchFlag::AUTO ), UNO_SET_THROW ); xDispatch->dispatch( aURL, aArgs ); @@ -1225,7 +1225,7 @@ namespace basctl { OUString aObjectName; - OUString aBaseName = _eType == E_SCRIPTS ? OUString("Module") : OUString("Dialog"); + OUString aBaseName = _eType == E_SCRIPTS ? u"Module"_ustr : u"Dialog"_ustr; const Sequence< OUString > aUsedNames( getObjectNames( _eType, _rLibName ) ); std::set< OUString > aUsedNamesCheck( aUsedNames.begin(), aUsedNames.end() ); diff --git a/basctl/source/basicide/uiobject.cxx b/basctl/source/basicide/uiobject.cxx index b875b1eceda7..833b258b529f 100644 --- a/basctl/source/basicide/uiobject.cxx +++ b/basctl/source/basicide/uiobject.cxx @@ -31,7 +31,7 @@ StringMap EditorWindowUIObject::get_state() aRes.append(pEditEngine->GetText(i) + " "); } - aMap["Text"] = aRes.makeStringAndClear(); + aMap[u"Text"_ustr] = aRes.makeStringAndClear(); return aMap; } @@ -43,7 +43,7 @@ std::unique_ptr<UIObject> EditorWindowUIObject::create(vcl::Window* pWindow) return std::unique_ptr<UIObject>(new EditorWindowUIObject(pEditorWindow)); } -OUString EditorWindowUIObject::get_name() const { return "EditorWindowUIObject"; } +OUString EditorWindowUIObject::get_name() const { return u"EditorWindowUIObject"_ustr; } } // namespace basctl diff --git a/basctl/source/basicide/unomodel.cxx b/basctl/source/basicide/unomodel.cxx index 64938be7754b..c626134a96c4 100644 --- a/basctl/source/basicide/unomodel.cxx +++ b/basctl/source/basicide/unomodel.cxx @@ -115,7 +115,7 @@ uno::Sequence< uno::Type > SAL_CALL SIDEModel::getTypes( ) OUString SIDEModel::getImplementationName() { - return "com.sun.star.comp.basic.BasicIDE"; + return u"com.sun.star.comp.basic.BasicIDE"_ustr; } sal_Bool SIDEModel::supportsService(const OUString& rServiceName) @@ -125,7 +125,7 @@ sal_Bool SIDEModel::supportsService(const OUString& rServiceName) uno::Sequence< OUString > SIDEModel::getSupportedServiceNames() { - return { "com.sun.star.script.BasicIDE" }; + return { u"com.sun.star.script.BasicIDE"_ustr }; } // XStorable @@ -147,7 +147,7 @@ void SAL_CALL SIDEModel::storeToURL( const OUString&, void SIDEModel::notImplemented() { - throw io::IOException("Can't store IDE model" ); + throw io::IOException(u"Can't store IDE model"_ustr ); } // XModel diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx index b8f3901eb34b..abdc662802d8 100644 --- a/basctl/source/dlged/dlged.cxx +++ b/basctl/source/dlged/dlged.cxx @@ -124,7 +124,7 @@ void DlgEditor::ShowDialog() if( !bDecoration ) { xNewDlgModPropSet->setPropertyValue( aDecorationPropName, Any( true ) ); - xNewDlgModPropSet->setPropertyValue( "Title", Any( OUString() ) ); + xNewDlgModPropSet->setPropertyValue( u"Title"_ustr, Any( OUString() ) ); } } catch(const UnknownPropertyException& ) @@ -183,12 +183,12 @@ DlgEditor::DlgEditor ( ,pDlgEdModel(new DlgEdModel()) ,pDlgEdPage(new DlgEdPage(*pDlgEdModel)) // set clipboard data flavors - ,m_ClipboardDataFlavors{ { /* MimeType */ "application/vnd.sun.xml.dialog", - /* HumanPresentableName */ "Dialog 6.0", + ,m_ClipboardDataFlavors{ { /* MimeType */ u"application/vnd.sun.xml.dialog"_ustr, + /* HumanPresentableName */ u"Dialog 6.0"_ustr, /* DataType */ cppu::UnoType<Sequence< sal_Int8 >>::get() } } ,m_ClipboardDataFlavorsResource{ m_ClipboardDataFlavors[0], - { /* MimeType */ "application/vnd.sun.xml.dialogwithresource", - /* HumanPresentableName */ "Dialog 8.0", + { /* MimeType */ u"application/vnd.sun.xml.dialogwithresource"_ustr, + /* HumanPresentableName */ u"Dialog 8.0"_ustr, /* DataType */ cppu::UnoType<Sequence< sal_Int8 >>::get() } } ,pObjFac(new DlgEdFactory(xModel)) ,rWindow(rWindow_) @@ -208,7 +208,7 @@ DlgEditor::DlgEditor ( SdrLayerAdmin& rAdmin = pDlgEdModel->GetLayerAdmin(); rAdmin.NewLayer( rAdmin.GetControlLayerName() ); - rAdmin.NewLayer( "HiddenLayer" ); + rAdmin.NewLayer( u"HiddenLayer"_ustr ); pDlgEdModel->InsertPage(pDlgEdPage); @@ -218,7 +218,7 @@ DlgEditor::DlgEditor ( pDlgEdPage->SetSize( rWindow.PixelToLogic( Size(DLGED_PAGE_WIDTH_MIN, DLGED_PAGE_HEIGHT_MIN) ) ); pDlgEdView->ShowSdrPage(pDlgEdView->GetModel().GetPage(0)); - pDlgEdView->SetLayerVisible( "HiddenLayer", false ); + pDlgEdView->SetLayerVisible( u"HiddenLayer"_ustr, false ); pDlgEdView->SetMoveSnapOnlyTopLeft(true); pDlgEdView->SetWorkArea( tools::Rectangle( Point( 0, 0 ), pDlgEdPage->GetSize() ) ); @@ -825,7 +825,7 @@ void DlgEditor::Paste() // create clipboard dialog model from xml Reference< XComponentContext > xContext = comphelper::getProcessComponentContext(); Reference< container::XNameContainer > xClipDialogModel( xContext->getServiceManager()->createInstanceWithContext( - "com.sun.star.awt.UnoControlDialogModel", xContext ), uno::UNO_QUERY ); + u"com.sun.star.awt.UnoControlDialogModel"_ustr, xContext ), uno::UNO_QUERY ); bool bSourceIsLocalized = false; Sequence< sal_Int8 > DialogModelBytes; diff --git a/basctl/source/dlged/dlgedfac.cxx b/basctl/source/dlged/dlgedfac.cxx index 65e29654914d..3fc4ef3a2966 100644 --- a/basctl/source/dlged/dlgedfac.cxx +++ b/basctl/source/dlged/dlgedfac.cxx @@ -50,7 +50,7 @@ IMPL_LINK( DlgEdFactory, MakeObject, SdrObjCreatorParams, aParams, rtl::Referenc static const uno::Reference<lang::XMultiServiceFactory> xDialogSFact = [] { uno::Reference<lang::XMultiServiceFactory> xFact; uno::Reference< uno::XComponentContext> xContext = ::comphelper::getProcessComponentContext(); - uno::Reference< container::XNameContainer > xC( xContext->getServiceManager()->createInstanceWithContext( "com.sun.star.awt.UnoControlDialogModel", xContext ), uno::UNO_QUERY ); + uno::Reference< container::XNameContainer > xC( xContext->getServiceManager()->createInstanceWithContext( u"com.sun.star.awt.UnoControlDialogModel"_ustr, xContext ), uno::UNO_QUERY ); if (xC.is()) xFact.set(xC, uno::UNO_QUERY); return xFact; @@ -64,27 +64,27 @@ IMPL_LINK( DlgEdFactory, MakeObject, SdrObjCreatorParams, aParams, rtl::Referenc switch( aParams.nObjIdentifier ) { case SdrObjKind::BasicDialogPushButton: - pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.awt.UnoControlButtonModel", xDialogSFact ); + pNewObj = new DlgEdObj(aParams.rSdrModel, u"com.sun.star.awt.UnoControlButtonModel"_ustr, xDialogSFact ); break; case SdrObjKind::BasicDialogRadioButton: - pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.awt.UnoControlRadioButtonModel", xDialogSFact ); + pNewObj = new DlgEdObj(aParams.rSdrModel, u"com.sun.star.awt.UnoControlRadioButtonModel"_ustr, xDialogSFact ); break; case SdrObjKind::BasicDialogFormRadio: - pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.form.component.RadioButton", xDialogSFact ); + pNewObj = new DlgEdObj(aParams.rSdrModel, u"com.sun.star.form.component.RadioButton"_ustr, xDialogSFact ); static_cast< DlgEdObj* >( pNewObj.get() )->MakeDataAware( mxModel ); break; case SdrObjKind::BasicDialogCheckbox: - pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.awt.UnoControlCheckBoxModel", xDialogSFact ); + pNewObj = new DlgEdObj(aParams.rSdrModel, u"com.sun.star.awt.UnoControlCheckBoxModel"_ustr, xDialogSFact ); break; case SdrObjKind::BasicDialogFormCheck: - pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.form.component.CheckBox", xDialogSFact ); + pNewObj = new DlgEdObj(aParams.rSdrModel, u"com.sun.star.form.component.CheckBox"_ustr, xDialogSFact ); static_cast< DlgEdObj* >( pNewObj.get() )->MakeDataAware( mxModel ); break; case SdrObjKind::BasicDialogListbox: - pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.awt.UnoControlListBoxModel", xDialogSFact ); + pNewObj = new DlgEdObj(aParams.rSdrModel, u"com.sun.star.awt.UnoControlListBoxModel"_ustr, xDialogSFact ); break; case SdrObjKind::BasicDialogFormList: - pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.form.component.ListBox", xDialogSFact ); + pNewObj = new DlgEdObj(aParams.rSdrModel, u"com.sun.star.form.component.ListBox"_ustr, xDialogSFact ); static_cast< DlgEdObj* >( pNewObj.get() )->MakeDataAware( mxModel ); break; case SdrObjKind::BasicDialogFormCombo: @@ -92,10 +92,10 @@ IMPL_LINK( DlgEdFactory, MakeObject, SdrObjCreatorParams, aParams, rtl::Referenc { rtl::Reference<DlgEdObj> pNew; if ( aParams.nObjIdentifier == SdrObjKind::BasicDialogCombobox ) - pNew = new DlgEdObj(aParams.rSdrModel, "com.sun.star.awt.UnoControlComboBoxModel", xDialogSFact ); + pNew = new DlgEdObj(aParams.rSdrModel, u"com.sun.star.awt.UnoControlComboBoxModel"_ustr, xDialogSFact ); else { - pNew = new DlgEdObj(aParams.rSdrModel, "com.sun.star.form.component.ComboBox", xDialogSFact ); + pNew = new DlgEdObj(aParams.rSdrModel, u"com.sun.star.form.component.ComboBox"_ustr, xDialogSFact ); pNew->MakeDataAware( mxModel ); } pNewObj = pNew; @@ -113,25 +113,25 @@ IMPL_LINK( DlgEdFactory, MakeObject, SdrObjCreatorParams, aParams, rtl::Referenc } break; case SdrObjKind::BasicDialogGroupBox: - pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.awt.UnoControlGroupBoxModel", xDialogSFact ); + pNewObj = new DlgEdObj(aParams.rSdrModel, u"com.sun.star.awt.UnoControlGroupBoxModel"_ustr, xDialogSFact ); break; case SdrObjKind::BasicDialogEdit: - pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.awt.UnoControlEditModel", xDialogSFact ); + pNewObj = new DlgEdObj(aParams.rSdrModel, u"com.sun.star.awt.UnoControlEditModel"_ustr, xDialogSFact ); break; case SdrObjKind::BasicDialogFixedText: - pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.awt.UnoControlFixedTextModel", xDialogSFact ); + pNewObj = new DlgEdObj(aParams.rSdrModel, u"com.sun.star.awt.UnoControlFixedTextModel"_ustr, xDialogSFact ); break; case SdrObjKind::BasicDialogImageControl: - pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.awt.UnoControlImageControlModel", xDialogSFact ); + pNewObj = new DlgEdObj(aParams.rSdrModel, u"com.sun.star.awt.UnoControlImageControlModel"_ustr, xDialogSFact ); break; case SdrObjKind::BasicDialogProgressbar: - pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.awt.UnoControlProgressBarModel", xDialogSFact ); + pNewObj = new DlgEdObj(aParams.rSdrModel, u"com.sun.star.awt.UnoControlProgressBarModel"_ustr, xDialogSFact ); break; case SdrObjKind::BasicDialogHorizontalScrollbar: - pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.awt.UnoControlScrollBarModel", xDialogSFact ); + pNewObj = new DlgEdObj(aParams.rSdrModel, u"com.sun.star.awt.UnoControlScrollBarModel"_ustr, xDialogSFact ); break; case SdrObjKind::BasicDialogFormHorizontalScroll: - pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.form.component.ScrollBar", xDialogSFact ); + pNewObj = new DlgEdObj(aParams.rSdrModel, u"com.sun.star.form.component.ScrollBar"_ustr, xDialogSFact ); static_cast< DlgEdObj* >( pNewObj.get() )->MakeDataAware( mxModel ); break; case SdrObjKind::BasicDialogFormVerticalScroll: @@ -139,10 +139,10 @@ IMPL_LINK( DlgEdFactory, MakeObject, SdrObjCreatorParams, aParams, rtl::Referenc { rtl::Reference<DlgEdObj> pNew; if ( aParams.nObjIdentifier == SdrObjKind::BasicDialogVerticalScrollbar ) - pNew = new DlgEdObj(aParams.rSdrModel, "com.sun.star.awt.UnoControlScrollBarModel", xDialogSFact ); + pNew = new DlgEdObj(aParams.rSdrModel, u"com.sun.star.awt.UnoControlScrollBarModel"_ustr, xDialogSFact ); else { - pNew = new DlgEdObj(aParams.rSdrModel, "com.sun.star.form.component.ScrollBar", xDialogSFact ); + pNew = new DlgEdObj(aParams.rSdrModel, u"com.sun.star.form.component.ScrollBar"_ustr, xDialogSFact ); pNew->MakeDataAware( mxModel ); } pNewObj = pNew; @@ -160,11 +160,11 @@ IMPL_LINK( DlgEdFactory, MakeObject, SdrObjCreatorParams, aParams, rtl::Referenc } } break; case SdrObjKind::BasicDialogHorizontalFixedLine: - pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.awt.UnoControlFixedLineModel", xDialogSFact ); + pNewObj = new DlgEdObj(aParams.rSdrModel, u"com.sun.star.awt.UnoControlFixedLineModel"_ustr, xDialogSFact ); break; case SdrObjKind::BasicDialogVerticalFixedLine: { - rtl::Reference<DlgEdObj> pNew = new DlgEdObj(aParams.rSdrModel, "com.sun.star.awt.UnoControlFixedLineModel", xDialogSFact ); + rtl::Reference<DlgEdObj> pNew = new DlgEdObj(aParams.rSdrModel, u"com.sun.star.awt.UnoControlFixedLineModel"_ustr, xDialogSFact ); pNewObj = pNew; // set vertical orientation try @@ -180,41 +180,41 @@ IMPL_LINK( DlgEdFactory, MakeObject, SdrObjCreatorParams, aParams, rtl::Referenc } } break; case SdrObjKind::BasicDialogDateField: - pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.awt.UnoControlDateFieldModel", xDialogSFact ); + pNewObj = new DlgEdObj(aParams.rSdrModel, u"com.sun.star.awt.UnoControlDateFieldModel"_ustr, xDialogSFact ); break; case SdrObjKind::BasicDialogTimeField: - pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.awt.UnoControlTimeFieldModel", xDialogSFact ); + pNewObj = new DlgEdObj(aParams.rSdrModel, u"com.sun.star.awt.UnoControlTimeFieldModel"_ustr, xDialogSFact ); break; case SdrObjKind::BasicDialogNumericField: - pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.awt.UnoControlNumericFieldModel", xDialogSFact ); + pNewObj = new DlgEdObj(aParams.rSdrModel, u"com.sun.star.awt.UnoControlNumericFieldModel"_ustr, xDialogSFact ); break; case SdrObjKind::BasicDialogCurencyField: - pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.awt.UnoControlCurrencyFieldModel", xDialogSFact ); + pNewObj = new DlgEdObj(aParams.rSdrModel, u"com.sun.star.awt.UnoControlCurrencyFieldModel"_ustr, xDialogSFact ); break; case SdrObjKind::BasicDialogFormattedField: - pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.awt.UnoControlFormattedFieldModel", xDialogSFact ); + pNewObj = new DlgEdObj(aParams.rSdrModel, u"com.sun.star.awt.UnoControlFormattedFieldModel"_ustr, xDialogSFact ); break; case SdrObjKind::BasicDialogPatternField: - pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.awt.UnoControlPatternFieldModel", xDialogSFact ); + pNewObj = new DlgEdObj(aParams.rSdrModel, u"com.sun.star.awt.UnoControlPatternFieldModel"_ustr, xDialogSFact ); break; case SdrObjKind::BasicDialogFileControl: - pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.awt.UnoControlFileControlModel", xDialogSFact ); + pNewObj = new DlgEdObj(aParams.rSdrModel, u"com.sun.star.awt.UnoControlFileControlModel"_ustr, xDialogSFact ); break; case SdrObjKind::BasicDialogSpinButton: - pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.awt.UnoControlSpinButtonModel", xDialogSFact ); + pNewObj = new DlgEdObj(aParams.rSdrModel, u"com.sun.star.awt.UnoControlSpinButtonModel"_ustr, xDialogSFact ); break; case SdrObjKind::BasicDialogFormSpin: - pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.form.component.SpinButton", xDialogSFact ); + pNewObj = new DlgEdObj(aParams.rSdrModel, u"com.sun.star.form.component.SpinButton"_ustr, xDialogSFact ); static_cast< DlgEdObj* >( pNewObj.get() )->MakeDataAware( mxModel ); break; case SdrObjKind::BasicDialogTreeControl: - pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.awt.tree.TreeControlModel", xDialogSFact ); + pNewObj = new DlgEdObj(aParams.rSdrModel, u"com.sun.star.awt.tree.TreeControlModel"_ustr, xDialogSFact ); break; case SdrObjKind::BasicDialogGridControl: - pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.awt.grid.UnoControlGridModel", xDialogSFact ); + pNewObj = new DlgEdObj(aParams.rSdrModel, u"com.sun.star.awt.grid.UnoControlGridModel"_ustr, xDialogSFact ); break; case SdrObjKind::BasicDialogHyperlinkControl: - pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.awt.UnoControlFixedHyperlinkModel", xDialogSFact ); + pNewObj = new DlgEdObj(aParams.rSdrModel, u"com.sun.star.awt.UnoControlFixedHyperlinkModel"_ustr, xDialogSFact ); break; default: break; diff --git a/basctl/source/dlged/dlgedobj.cxx b/basctl/source/dlged/dlgedobj.cxx index 505c570b7f05..bc714d51c768 100644 --- a/basctl/source/dlged/dlgedobj.cxx +++ b/basctl/source/dlged/dlgedobj.cxx @@ -542,7 +542,7 @@ void DlgEdObj::UpdateStep() sal_Int32 nStep = GetStep(); SdrLayerAdmin& rLayerAdmin(getSdrModelFromSdrObject().GetLayerAdmin()); - SdrLayerID nHiddenLayerId = rLayerAdmin.GetLayerID( "HiddenLayer" ); + SdrLayerID nHiddenLayerId = rLayerAdmin.GetLayerID( u"HiddenLayer"_ustr ); SdrLayerID nControlLayerId = rLayerAdmin.GetLayerID( rLayerAdmin.GetControlLayerName() ); if( nCurStep ) @@ -670,99 +670,99 @@ OUString DlgEdObj::GetDefaultName() const { OUString sResId; OUString aDefaultName; - if ( supportsService( "com.sun.star.awt.UnoControlDialogModel" ) ) + if ( supportsService( u"com.sun.star.awt.UnoControlDialogModel"_ustr ) ) { sResId = RID_STR_CLASS_DIALOG; } - else if ( supportsService( "com.sun.star.awt.UnoControlButtonModel" ) ) + else if ( supportsService( u"com.sun.star.awt.UnoControlButtonModel"_ustr ) ) { sResId = RID_STR_CLASS_BUTTON; } - else if ( supportsService( "com.sun.star.awt.UnoControlRadioButtonModel" ) ) + else if ( supportsService( u"com.sun.star.awt.UnoControlRadioButtonModel"_ustr ) ) { sResId = RID_STR_CLASS_RADIOBUTTON; } - else if ( supportsService( "com.sun.star.awt.UnoControlCheckBoxModel" ) ) + else if ( supportsService( u"com.sun.star.awt.UnoControlCheckBoxModel"_ustr ) ) { sResId = RID_STR_CLASS_CHECKBOX; } - else if ( supportsService( "com.sun.star.awt.UnoControlListBoxModel" ) ) + else if ( supportsService( u"com.sun.star.awt.UnoControlListBoxModel"_ustr ) ) { sResId = RID_STR_CLASS_LISTBOX; } - else if ( supportsService( "com.sun.star.awt.UnoControlComboBoxModel" ) ) + else if ( supportsService( u"com.sun.star.awt.UnoControlComboBoxModel"_ustr ) ) { sResId = RID_STR_CLASS_COMBOBOX; } - else if ( supportsService( "com.sun.star.awt.UnoControlGroupBoxModel" ) ) + else if ( supportsService( u"com.sun.star.awt.UnoControlGroupBoxModel"_ustr ) ) { sResId = RID_STR_CLASS_GROUPBOX; } - else if ( supportsService( "com.sun.star.awt.UnoControlEditModel" ) ) + else if ( supportsService( u"com.sun.star.awt.UnoControlEditModel"_ustr ) ) { sResId = RID_STR_CLASS_EDIT; } - else if ( supportsService( "com.sun.star.awt.UnoControlFixedTextModel" ) ) + else if ( supportsService( u"com.sun.star.awt.UnoControlFixedTextModel"_ustr ) ) { sResId = RID_STR_CLASS_FIXEDTEXT; } - else if ( supportsService( "com.sun.star.awt.UnoControlImageControlModel" ) ) + else if ( supportsService( u"com.sun.star.awt.UnoControlImageControlModel"_ustr ) ) { sResId = RID_STR_CLASS_IMAGECONTROL; } - else if ( supportsService( "com.sun.star.awt.UnoControlProgressBarModel" ) ) + else if ( supportsService( u"com.sun.star.awt.UnoControlProgressBarModel"_ustr ) ) { sResId = RID_STR_CLASS_PROGRESSBAR; } - else if ( supportsService( "com.sun.star.awt.UnoControlScrollBarModel" ) ) + else if ( supportsService( u"com.sun.star.awt.UnoControlScrollBarModel"_ustr ) ) { sResId = RID_STR_CLASS_SCROLLBAR; } - else if ( supportsService( "com.sun.star.awt.UnoControlFixedLineModel" ) ) + else if ( supportsService( u"com.sun.star.awt.UnoControlFixedLineModel"_ustr ) ) { sResId = RID_STR_CLASS_FIXEDLINE; } - else if ( supportsService( "com.sun.star.awt.UnoControlDateFieldModel" ) ) + else if ( supportsService( u"com.sun.star.awt.UnoControlDateFieldModel"_ustr ) ) { sResId = RID_STR_CLASS_DATEFIELD; } - else if ( supportsService( "com.sun.star.awt.UnoControlTimeFieldModel" ) ) + else if ( supportsService( u"com.sun.star.awt.UnoControlTimeFieldModel"_ustr ) ) { sResId = RID_STR_CLASS_TIMEFIELD; } - else if ( supportsService( "com.sun.star.awt.UnoControlNumericFieldModel" ) ) + else if ( supportsService( u"com.sun.star.awt.UnoControlNumericFieldModel"_ustr ) ) { sResId = RID_STR_CLASS_NUMERICFIELD; } - else if ( supportsService( "com.sun.star.awt.UnoControlCurrencyFieldModel" ) ) + else if ( supportsService( u"com.sun.star.awt.UnoControlCurrencyFieldModel"_ustr ) ) { sResId = RID_STR_CLASS_CURRENCYFIELD; } - else if ( supportsService( "com.sun.star.awt.UnoControlFormattedFieldModel" ) ) + else if ( supportsService( u"com.sun.star.awt.UnoControlFormattedFieldModel"_ustr ) ) { sResId = RID_STR_CLASS_FORMATTEDFIELD; } - else if ( supportsService( "com.sun.star.awt.UnoControlPatternFieldModel" ) ) + else if ( supportsService( u"com.sun.star.awt.UnoControlPatternFieldModel"_ustr ) ) { sResId = RID_STR_CLASS_PATTERNFIELD; } - else if ( supportsService( "com.sun.star.awt.UnoControlFileControlModel" ) ) + else if ( supportsService( u"com.sun.star.awt.UnoControlFileControlModel"_ustr ) ) { sResId = RID_STR_CLASS_FILECONTROL; } - else if ( supportsService( "com.sun.star.awt.tree.TreeControlModel" ) ) + else if ( supportsService( u"com.sun.star.awt.tree.TreeControlModel"_ustr ) ) { sResId = RID_STR_CLASS_TREECONTROL; } - else if ( supportsService( "com.sun.star.awt.grid.UnoControlGridModel" ) ) + else if ( supportsService( u"com.sun.star.awt.grid.UnoControlGridModel"_ustr ) ) { sResId = RID_STR_CLASS_GRIDCONTROL; } - else if ( supportsService( "com.sun.star.awt.UnoControlFixedHyperlinkModel" ) ) + else if ( supportsService( u"com.sun.star.awt.UnoControlFixedHyperlinkModel"_ustr ) ) { sResId = RID_STR_CLASS_HYPERLINKCONTROL; } - else if ( supportsService( "com.sun.star.awt.UnoControlSpinButtonModel" ) ) + else if ( supportsService( u"com.sun.star.awt.UnoControlSpinButtonModel"_ustr ) ) { sResId = RID_STR_CLASS_SPINCONTROL; } @@ -803,95 +803,95 @@ SdrInventor DlgEdObj::GetObjInventor() const SdrObjKind DlgEdObj::GetObjIdentifier() const { - if ( supportsService( "com.sun.star.awt.UnoControlDialogModel" )) + if ( supportsService( u"com.sun.star.awt.UnoControlDialogModel"_ustr )) { return SdrObjKind::BasicDialogDialog; } - else if ( supportsService( "com.sun.star.awt.UnoControlButtonModel" )) + else if ( supportsService( u"com.sun.star.awt.UnoControlButtonModel"_ustr )) { return SdrObjKind::BasicDialogPushButton; } - else if ( supportsService( "com.sun.star.awt.UnoControlRadioButtonModel" )) + else if ( supportsService( u"com.sun.star.awt.UnoControlRadioButtonModel"_ustr )) { return SdrObjKind::BasicDialogRadioButton; } - else if ( supportsService( "com.sun.star.awt.UnoControlCheckBoxModel" )) + else if ( supportsService( u"com.sun.star.awt.UnoControlCheckBoxModel"_ustr )) { return SdrObjKind::BasicDialogCheckbox; } - else if ( supportsService( "com.sun.star.awt.UnoControlListBoxModel" )) + else if ( supportsService( u"com.sun.star.awt.UnoControlListBoxModel"_ustr )) { return SdrObjKind::BasicDialogListbox; } - else if ( supportsService( "com.sun.star.awt.UnoControlComboBoxModel" )) + else if ( supportsService( u"com.sun.star.awt.UnoControlComboBoxModel"_ustr )) { return SdrObjKind::BasicDialogCombobox; } - else if ( supportsService( "com.sun.star.awt.UnoControlGroupBoxModel" )) + else if ( supportsService( u"com.sun.star.awt.UnoControlGroupBoxModel"_ustr )) { return SdrObjKind::BasicDialogGroupBox; } - else if ( supportsService( "com.sun.star.awt.UnoControlEditModel" )) + else if ( supportsService( u"com.sun.star.awt.UnoControlEditModel"_ustr )) { return SdrObjKind::BasicDialogEdit; } - else if ( supportsService( "com.sun.star.awt.UnoControlFixedTextModel" )) + else if ( supportsService( u"com.sun.star.awt.UnoControlFixedTextModel"_ustr )) { return SdrObjKind::BasicDialogFixedText; } - else if ( supportsService( "com.sun.star.awt.UnoControlImageControlModel" )) + else if ( supportsService( u"com.sun.star.awt.UnoControlImageControlModel"_ustr )) { return SdrObjKind::BasicDialogImageControl; } - else if ( supportsService( "com.sun.star.awt.UnoControlProgressBarModel" )) + else if ( supportsService( u"com.sun.star.awt.UnoControlProgressBarModel"_ustr )) { return SdrObjKind::BasicDialogProgressbar; } - else if ( supportsService( "com.sun.star.awt.UnoControlScrollBarModel" )) + else if ( supportsService( u"com.sun.star.awt.UnoControlScrollBarModel"_ustr )) { return SdrObjKind::BasicDialogHorizontalScrollbar; } - else if ( supportsService( "com.sun.star.awt.UnoControlFixedLineModel" )) + else if ( supportsService( u"com.sun.star.awt.UnoControlFixedLineModel"_ustr )) { return SdrObjKind::BasicDialogHorizontalFixedLine; } - else if ( supportsService( "com.sun.star.awt.UnoControlDateFieldModel" )) + else if ( supportsService( u"com.sun.star.awt.UnoControlDateFieldModel"_ustr )) { return SdrObjKind::BasicDialogDateField; } - else if ( supportsService( "com.sun.star.awt.UnoControlTimeFieldModel" )) + else if ( supportsService( u"com.sun.star.awt.UnoControlTimeFieldModel"_ustr )) { return SdrObjKind::BasicDialogTimeField; } - else if ( supportsService( "com.sun.star.awt.UnoControlNumericFieldModel" )) + else if ( supportsService( u"com.sun.star.awt.UnoControlNumericFieldModel"_ustr )) { return SdrObjKind::BasicDialogNumericField; } - else if ( supportsService( "com.sun.star.awt.UnoControlCurrencyFieldModel" )) + else if ( supportsService( u"com.sun.star.awt.UnoControlCurrencyFieldModel"_ustr )) { return SdrObjKind::BasicDialogCurencyField; } - else if ( supportsService( "com.sun.star.awt.UnoControlFormattedFieldModel" )) + else if ( supportsService( u"com.sun.star.awt.UnoControlFormattedFieldModel"_ustr )) { return SdrObjKind::BasicDialogFormattedField; } - else if ( supportsService( "com.sun.star.awt.UnoControlPatternFieldModel" )) + else if ( supportsService( u"com.sun.star.awt.UnoControlPatternFieldModel"_ustr )) { return SdrObjKind::BasicDialogPatternField; } - else if ( supportsService( "com.sun.star.awt.UnoControlFileControlModel" )) + else if ( supportsService( u"com.sun.star.awt.UnoControlFileControlModel"_ustr )) { return SdrObjKind::BasicDialogFileControl; } - else if ( supportsService( "com.sun.star.awt.tree.TreeControlModel" )) + else if ( supportsService( u"com.sun.star.awt.tree.TreeControlModel"_ustr )) { return SdrObjKind::BasicDialogTreeControl; } - else if ( supportsService( "com.sun.star.awt.grid.UnoControlGridModel" )) + else if ( supportsService( u"com.sun.star.awt.grid.UnoControlGridModel"_ustr )) { return SdrObjKind::BasicDialogGridControl; } - else if ( supportsService( "com.sun.star.awt.UnoControlFixedHyperlinkModel" )) + else if ( supportsService( u"com.sun.star.awt.UnoControlFixedHyperlinkModel"_ustr )) { return SdrObjKind::BasicDialogHyperlinkControl; } @@ -991,17 +991,17 @@ void DlgEdObj::SetDefaults() xPSet->setPropertyValue( DLGED_PROP_NAME, Any(aOUniqueName) ); // set labels - if ( supportsService( "com.sun.star.awt.UnoControlButtonModel" ) || - supportsService( "com.sun.star.awt.UnoControlRadioButtonModel" ) || - supportsService( "com.sun.star.awt.UnoControlCheckBoxModel" ) || - supportsService( "com.sun.star.awt.UnoControlGroupBoxModel" ) || - supportsService( "com.sun.star.awt.UnoControlFixedTextModel" ) ) + if ( supportsService( u"com.sun.star.awt.UnoControlButtonModel"_ustr ) || + supportsService( u"com.sun.star.awt.UnoControlRadioButtonModel"_ustr ) || + supportsService( u"com.sun.star.awt.UnoControlCheckBoxModel"_ustr ) || + supportsService( u"com.sun.star.awt.UnoControlGroupBoxModel"_ustr ) || + supportsService( u"com.sun.star.awt.UnoControlFixedTextModel"_ustr ) ) { xPSet->setPropertyValue( DLGED_PROP_LABEL, Any(aOUniqueName) ); } // set number formats supplier for formatted field - if ( supportsService( "com.sun.star.awt.UnoControlFormattedFieldModel" ) ) + if ( supportsService( u"com.sun.star.awt.UnoControlFormattedFieldModel"_ustr ) ) { Reference< util::XNumberFormatsSupplier > xSupplier = GetDlgEdForm()->GetDlgEditor().GetNumberFormatsSupplier(); if ( xSupplier.is() ) @@ -1158,7 +1158,7 @@ void DlgEdObj::_propertyChange( const css::beans::PropertyChangeEvent& evt ) catch (container::NoSuchElementException const&) { css::uno::Any anyEx = cppu::getCaughtException(); - throw lang::WrappedTargetRuntimeException("", nullptr, + throw lang::WrappedTargetRuntimeException(u""_ustr, nullptr, anyEx); } } @@ -1675,12 +1675,12 @@ void DlgEdObj::MakeDataAware( const Reference< frame::XModel >& xModel ) if ( xBindable.is() ) { - Reference< form::binding::XValueBinding > xBinding( xFac->createInstanceWithArguments( "com.sun.star.table.CellValueBinding", aArgs ), UNO_QUERY ); + Reference< form::binding::XValueBinding > xBinding( xFac->createInstanceWithArguments( u"com.sun.star.table.CellValueBinding"_ustr, aArgs ), UNO_QUERY ); xBindable->setValueBinding( xBinding ); } if ( xListEntrySink.is() ) { - Reference< form::binding::XListEntrySource > xSource( xFac->createInstanceWithArguments( "com.sun.star.table.CellRangeListSource", aArgs ), UNO_QUERY ); + Reference< form::binding::XListEntrySource > xSource( xFac->createInstanceWithArguments( u"com.sun.star.table.CellRangeListSource"_ustr, aArgs ), UNO_QUERY ); xListEntrySink->setListEntrySource( xSource ); } } diff --git a/basctl/source/dlged/dlgedview.cxx b/basctl/source/dlged/dlgedview.cxx index 81271d38f8bd..5ffe5185a2fb 100644 --- a/basctl/source/dlged/dlgedview.cxx +++ b/basctl/source/dlged/dlgedview.cxx @@ -133,7 +133,7 @@ static SdrObject* impLocalHitCorrection(SdrObject* pRetval, const Point& rPnt, s // from DlgEdForm::CheckHit; exclude inner for DlgEdForm bExcludeInner = true; } - else if(pDlgEdObj->supportsService("com.sun.star.awt.UnoControlGroupBoxModel")) + else if(pDlgEdObj->supportsService(u"com.sun.star.awt.UnoControlGroupBoxModel"_ustr)) { // from DlgEdObj::CheckHit; exclude inner for group shapes bExcludeInner = true; diff --git a/basctl/source/dlged/managelang.cxx b/basctl/source/dlged/managelang.cxx index ba6ca0a01442..c014ca05f1de 100644 --- a/basctl/source/dlged/managelang.cxx +++ b/basctl/source/dlged/managelang.cxx @@ -53,14 +53,14 @@ bool localesAreEqual( const Locale& rLocaleLeft, const Locale& rLocaleRight ) } ManageLanguageDialog::ManageLanguageDialog(weld::Window* pParent, std::shared_ptr<LocalizationMgr> xLMgr) - : GenericDialogController(pParent, "modules/BasicIDE/ui/managelanguages.ui", "ManageLanguagesDialog") + : GenericDialogController(pParent, u"modules/BasicIDE/ui/managelanguages.ui"_ustr, u"ManageLanguagesDialog"_ustr) , m_xLocalizationMgr(std::move(xLMgr)) , m_sDefLangStr(IDEResId(RID_STR_DEF_LANG)) , m_sCreateLangStr(IDEResId(RID_STR_CREATE_LANG)) - , m_xLanguageLB(m_xBuilder->weld_tree_view("treeview")) - , m_xAddPB(m_xBuilder->weld_button("add")) - , m_xDeletePB(m_xBuilder->weld_button("delete")) - , m_xMakeDefPB(m_xBuilder->weld_button("default")) + , m_xLanguageLB(m_xBuilder->weld_tree_view(u"treeview"_ustr)) + , m_xAddPB(m_xBuilder->weld_button(u"add"_ustr)) + , m_xDeletePB(m_xBuilder->weld_button(u"delete"_ustr)) + , m_xMakeDefPB(m_xBuilder->weld_button(u"default"_ustr)) { m_xLanguageLB->set_size_request(m_xLanguageLB->get_approximate_digit_width() * 42, m_xLanguageLB->get_height_rows(10)); @@ -149,8 +149,8 @@ IMPL_LINK_NOARG(ManageLanguageDialog, AddHdl, weld::Button&, void) IMPL_LINK_NOARG(ManageLanguageDialog, DeleteHdl, weld::Button&, void) { - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(m_xDialog.get(), "modules/BasicIDE/ui/deletelangdialog.ui")); - std::unique_ptr<weld::MessageDialog> xQBox(xBuilder->weld_message_dialog("DeleteLangDialog")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(m_xDialog.get(), u"modules/BasicIDE/ui/deletelangdialog.ui"_ustr)); + std::unique_ptr<weld::MessageDialog> xQBox(xBuilder->weld_message_dialog(u"DeleteLangDialog"_ustr)); if (xQBox->run() != RET_OK) return; @@ -211,16 +211,16 @@ IMPL_LINK_NOARG(ManageLanguageDialog, SelectHdl, weld::TreeView&, void) // class SetDefaultLanguageDialog ----------------------------------------------- SetDefaultLanguageDialog::SetDefaultLanguageDialog(weld::Window* pParent, std::shared_ptr<LocalizationMgr> xLMgr) - : GenericDialogController(pParent, "modules/BasicIDE/ui/defaultlanguage.ui", "DefaultLanguageDialog") + : GenericDialogController(pParent, u"modules/BasicIDE/ui/defaultlanguage.ui"_ustr, u"DefaultLanguageDialog"_ustr) , m_xLocalizationMgr(std::move(xLMgr)) - , m_xLanguageFT(m_xBuilder->weld_label("defaultlabel")) - , m_xLanguageLB(m_xBuilder->weld_tree_view("entries")) - , m_xCheckLangFT(m_xBuilder->weld_label("checkedlabel")) - , m_xCheckLangLB(m_xBuilder->weld_tree_view("checkedentries")) - , m_xDefinedFT(m_xBuilder->weld_label("defined")) - , m_xAddedFT(m_xBuilder->weld_label("added")) - , m_xAltTitle(m_xBuilder->weld_label("alttitle")) - , m_xLanguageCB(new SvxLanguageBox(m_xBuilder->weld_combo_box("hidden"))) + , m_xLanguageFT(m_xBuilder->weld_label(u"defaultlabel"_ustr)) + , m_xLanguageLB(m_xBuilder->weld_tree_view(u"entries"_ustr)) + , m_xCheckLangFT(m_xBuilder->weld_label(u"checkedlabel"_ustr)) + , m_xCheckLangLB(m_xBuilder->weld_tree_view(u"checkedentries"_ustr)) + , m_xDefinedFT(m_xBuilder->weld_label(u"defined"_ustr)) + , m_xAddedFT(m_xBuilder->weld_label(u"added"_ustr)) + , m_xAltTitle(m_xBuilder->weld_label(u"alttitle"_ustr)) + , m_xLanguageCB(new SvxLanguageBox(m_xBuilder->weld_combo_box(u"hidden"_ustr))) { m_xLanguageLB->set_size_request(-1, m_xLanguageLB->get_height_rows(10)); m_xCheckLangLB->set_size_request(-1, m_xCheckLangLB->get_height_rows(10)); diff --git a/basctl/source/dlged/propbrw.cxx b/basctl/source/dlged/propbrw.cxx index 04fa2b3d3b86..12a0e671863a 100644 --- a/basctl/source/dlged/propbrw.cxx +++ b/basctl/source/dlged/propbrw.cxx @@ -112,7 +112,7 @@ PropBrw::PropBrw (DialogWindowLayout& rLayout_): // create a frame wrapper for myself m_xMeAsFrame = frame::Frame::create( comphelper::getProcessComponentContext() ); m_xMeAsFrame->initialize(VCLUnoHelper::GetInterface(m_xContentArea)); - m_xMeAsFrame->setName( "form property browser" ); // change name! + m_xMeAsFrame->setName( u"form property browser"_ustr ); // change name! } catch (const Exception&) { @@ -140,8 +140,8 @@ void PropBrw::ImplReCreateController() // a ComponentContext for the ::cppu::ContextEntry_Init aHandlerContextInfo[] = { - ::cppu::ContextEntry_Init( "DialogParentWindow", Any(VCLUnoHelper::GetInterface(this))), - ::cppu::ContextEntry_Init( "ContextDocument", Any( m_xContextDocument ) ) + ::cppu::ContextEntry_Init( u"DialogParentWindow"_ustr, Any(VCLUnoHelper::GetInterface(this))), + ::cppu::ContextEntry_Init( u"ContextDocument"_ustr, Any( m_xContextDocument ) ) }; Reference< XComponentContext > xInspectorContext( ::cppu::createComponentContext( aHandlerContextInfo, std::size( aHandlerContextInfo ), xOwnContext ) ); @@ -300,7 +300,7 @@ void PropBrw::implSetNewObject( const Reference< XPropertySet >& _rxObject ) { if ( m_xBrowserController.is() ) { - m_xBrowserController->setPropertyValue( "IntrospectedObject", + m_xBrowserController->setPropertyValue( u"IntrospectedObject"_ustr, Any( _rxObject ) ); @@ -320,95 +320,95 @@ OUString PropBrw::GetHeadlineName( const Reference< XPropertySet >& _rxObject ) OUString sResId; aName = IDEResId(RID_STR_BRWTITLE_PROPERTIES); - if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlDialogModel" ) ) + if ( xServiceInfo->supportsService( u"com.sun.star.awt.UnoControlDialogModel"_ustr ) ) { sResId = RID_STR_CLASS_DIALOG; } - else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlButtonModel" ) ) + else if ( xServiceInfo->supportsService( u"com.sun.star.awt.UnoControlButtonModel"_ustr ) ) { sResId = RID_STR_CLASS_BUTTON; } - else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlRadioButtonModel" ) ) + else if ( xServiceInfo->supportsService( u"com.sun.star.awt.UnoControlRadioButtonModel"_ustr ) ) { sResId = RID_STR_CLASS_RADIOBUTTON; } - else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlCheckBoxModel" ) ) + else if ( xServiceInfo->supportsService( u"com.sun.star.awt.UnoControlCheckBoxModel"_ustr ) ) { sResId = RID_STR_CLASS_CHECKBOX; } - else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlListBoxModel" ) ) + else if ( xServiceInfo->supportsService( u"com.sun.star.awt.UnoControlListBoxModel"_ustr ) ) { sResId = RID_STR_CLASS_LISTBOX; } - else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlComboBoxModel" ) ) + else if ( xServiceInfo->supportsService( u"com.sun.star.awt.UnoControlComboBoxModel"_ustr ) ) { sResId = RID_STR_CLASS_COMBOBOX; } - else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlGroupBoxModel" ) ) + else if ( xServiceInfo->supportsService( u"com.sun.star.awt.UnoControlGroupBoxModel"_ustr ) ) { sResId = RID_STR_CLASS_GROUPBOX; } - else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlEditModel" ) ) + else if ( xServiceInfo->supportsService( u"com.sun.star.awt.UnoControlEditModel"_ustr ) ) { sResId = RID_STR_CLASS_EDIT; } - else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlFixedTextModel" ) ) + else if ( xServiceInfo->supportsService( u"com.sun.star.awt.UnoControlFixedTextModel"_ustr ) ) { sResId = RID_STR_CLASS_FIXEDTEXT; } - else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlImageControlModel" ) ) + else if ( xServiceInfo->supportsService( u"com.sun.star.awt.UnoControlImageControlModel"_ustr ) ) { sResId = RID_STR_CLASS_IMAGECONTROL; } - else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlProgressBarModel" ) ) + else if ( xServiceInfo->supportsService( u"com.sun.star.awt.UnoControlProgressBarModel"_ustr ) ) { sResId = RID_STR_CLASS_PROGRESSBAR; } - else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlScrollBarModel" ) ) + else if ( xServiceInfo->supportsService( u"com.sun.star.awt.UnoControlScrollBarModel"_ustr ) ) { sResId = RID_STR_CLASS_SCROLLBAR; } - else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlFixedLineModel" ) ) + else if ( xServiceInfo->supportsService( u"com.sun.star.awt.UnoControlFixedLineModel"_ustr ) ) { sResId = RID_STR_CLASS_FIXEDLINE; } - else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlDateFieldModel" ) ) + else if ( xServiceInfo->supportsService( u"com.sun.star.awt.UnoControlDateFieldModel"_ustr ) ) { sResId = RID_STR_CLASS_DATEFIELD; } - else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlTimeFieldModel" ) ) + else if ( xServiceInfo->supportsService( u"com.sun.star.awt.UnoControlTimeFieldModel"_ustr ) ) { sResId = RID_STR_CLASS_TIMEFIELD; } - else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlNumericFieldModel" ) ) + else if ( xServiceInfo->supportsService( u"com.sun.star.awt.UnoControlNumericFieldModel"_ustr ) ) { sResId = RID_STR_CLASS_NUMERICFIELD; } - else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlCurrencyFieldModel" ) ) + else if ( xServiceInfo->supportsService( u"com.sun.star.awt.UnoControlCurrencyFieldModel"_ustr ) ) { sResId = RID_STR_CLASS_CURRENCYFIELD; } - else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlFormattedFieldModel" ) ) + else if ( xServiceInfo->supportsService( u"com.sun.star.awt.UnoControlFormattedFieldModel"_ustr ) ) { sResId = RID_STR_CLASS_FORMATTEDFIELD; } - else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlPatternFieldModel" ) ) + else if ( xServiceInfo->supportsService( u"com.sun.star.awt.UnoControlPatternFieldModel"_ustr ) ) { sResId = RID_STR_CLASS_PATTERNFIELD; } - else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlFileControlModel" ) ) + else if ( xServiceInfo->supportsService( u"com.sun.star.awt.UnoControlFileControlModel"_ustr ) ) { sResId = RID_STR_CLASS_FILECONTROL; } - else if ( xServiceInfo->supportsService( "com.sun.star.awt.tree.TreeControlModel" ) ) + else if ( xServiceInfo->supportsService( u"com.sun.star.awt.tree.TreeControlModel"_ustr ) ) { sResId = RID_STR_CLASS_TREECONTROL; } - else if ( xServiceInfo->supportsService( "com.sun.star.awt.grid.UnoControlGridModel" ) ) + else if ( xServiceInfo->supportsService( u"com.sun.star.awt.grid.UnoControlGridModel"_ustr ) ) { sResId = RID_STR_CLASS_GRIDCONTROL; } - else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlFixedHyperlinkModel" ) ) + else if ( xServiceInfo->supportsService( u"com.sun.star.awt.UnoControlFixedHyperlinkModel"_ustr ) ) { sResId = RID_STR_CLASS_HYPERLINKCONTROL; } diff --git a/basctl/source/inc/BasicColorConfig.hxx b/basctl/source/inc/BasicColorConfig.hxx index a393f5aedb6a..15b2f3faf78f 100644 --- a/basctl/source/inc/BasicColorConfig.hxx +++ b/basctl/source/inc/BasicColorConfig.hxx @@ -47,9 +47,9 @@ private: // Names of default color schemes shipped with LibreOffice css::uno::Sequence<OUString> m_aDefaultSchemes - = { "COLORSCHEME_LIBREOFFICE_LIGHT", "COLORSCHEME_LIBREOFFICE_DARK", - "COLORSCHEME_BREEZE_LIGHT", "COLORSCHEME_BREEZE_DARK", - "COLORSCHEME_SOLARIZED_LIGHT", "COLORSCHEME_SOLARIZED_DARK" }; + = { u"COLORSCHEME_LIBREOFFICE_LIGHT"_ustr, u"COLORSCHEME_LIBREOFFICE_DARK"_ustr, + u"COLORSCHEME_BREEZE_LIGHT"_ustr, u"COLORSCHEME_BREEZE_DARK"_ustr, + u"COLORSCHEME_SOLARIZED_LIGHT"_ustr, u"COLORSCHEME_SOLARIZED_DARK"_ustr }; // Maps the scheme names to their TranslateId SchemeTranslateIdMap m_aTranslateIdsMap = {