summaryrefslogtreecommitdiff
path: root/sw/source/uibase
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-06-06 09:26:17 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-06-06 19:14:55 +0200
commite7a7df094ebe8c1a1205c64a410df893c3acf652 (patch)
tree215908a5900c022cefa3b7cfb08e6363eea77f7c /sw/source/uibase
parent9aac754d39e9018ff70185956f488402ecac064c (diff)
loplugin:ostr in sw/../utlui
Change-Id: I542c3ab519f1b154e606943e867794127ec279c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168488 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
Diffstat (limited to 'sw/source/uibase')
-rw-r--r--sw/source/uibase/utlui/bookctrl.cxx4
-rw-r--r--sw/source/uibase/utlui/content.cxx122
-rw-r--r--sw/source/uibase/utlui/glbltree.cxx50
-rw-r--r--sw/source/uibase/utlui/gloslst.cxx6
-rw-r--r--sw/source/uibase/utlui/navicfg.cxx48
-rw-r--r--sw/source/uibase/utlui/navipi.cxx78
-rw-r--r--sw/source/uibase/utlui/numfmtlb.cxx4
-rw-r--r--sw/source/uibase/utlui/tmplctrl.cxx4
-rw-r--r--sw/source/uibase/utlui/uitool.cxx18
-rw-r--r--sw/source/uibase/utlui/unotools.cxx16
-rw-r--r--sw/source/uibase/utlui/viewlayoutctrl.cxx2
11 files changed, 176 insertions, 176 deletions
diff --git a/sw/source/uibase/utlui/bookctrl.cxx b/sw/source/uibase/utlui/bookctrl.cxx
index e79821022abc..04c16b105f24 100644
--- a/sw/source/uibase/utlui/bookctrl.cxx
+++ b/sw/source/uibase/utlui/bookctrl.cxx
@@ -79,8 +79,8 @@ void SwBookmarkControl::Command( const CommandEvent& rCEvt )
if (!pViewFrm)
return;
- std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(nullptr, "modules/swriter/ui/bookmarkmenu.ui"));
- std::unique_ptr<weld::Menu> xPopup(xBuilder->weld_menu("menu"));
+ std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(nullptr, u"modules/swriter/ui/bookmarkmenu.ui"_ustr));
+ std::unique_ptr<weld::Menu> xPopup(xBuilder->weld_menu(u"menu"_ustr));
IDocumentMarkAccess* const pMarkAccess = pWrtShell->getIDocumentMarkAccess();
IDocumentMarkAccess::const_iterator_t ppBookmarkStart = pMarkAccess->getBookmarksBegin();
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index 5be9e50e753b..a43b75de6477 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -1105,7 +1105,7 @@ SwContentTree::SwContentTree(std::unique_ptr<weld::TreeView> xTreeView, SwNaviga
: m_xTreeView(std::move(xTreeView))
, m_aDropTargetHelper(*this)
, m_pDialog(pDialog)
- , m_sSpace(OUString(" "))
+ , m_sSpace(u" "_ustr)
, m_aUpdTimer("SwContentTree m_aUpdTimer")
, m_aOverlayObjectDelayTimer("SwContentTree m_aOverlayObjectDelayTimer")
, m_sInvisible(SwResId(STR_INVISIBLE))
@@ -1600,16 +1600,16 @@ IMPL_LINK(SwContentTree, CommandHdl, const CommandEvent&, rCEvt, bool)
m_xTreeView->set_cursor(0);
}
- std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(m_xTreeView.get(), "modules/swriter/ui/navigatorcontextmenu.ui"));
- std::unique_ptr<weld::Menu> xPop = xBuilder->weld_menu("navmenu");
+ std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(m_xTreeView.get(), u"modules/swriter/ui/navigatorcontextmenu.ui"_ustr));
+ std::unique_ptr<weld::Menu> xPop = xBuilder->weld_menu(u"navmenu"_ustr);
bool bOutline(false);
- std::unique_ptr<weld::Menu> xSubPop1 = xBuilder->weld_menu("outlinelevel");
- std::unique_ptr<weld::Menu> xSubPop2 = xBuilder->weld_menu("dragmodemenu");
- std::unique_ptr<weld::Menu> xSubPop3 = xBuilder->weld_menu("displaymenu");
- std::unique_ptr<weld::Menu> xSubPopOutlineTracking = xBuilder->weld_menu("outlinetracking");
+ std::unique_ptr<weld::Menu> xSubPop1 = xBuilder->weld_menu(u"outlinelevel"_ustr);
+ std::unique_ptr<weld::Menu> xSubPop2 = xBuilder->weld_menu(u"dragmodemenu"_ustr);
+ std::unique_ptr<weld::Menu> xSubPop3 = xBuilder->weld_menu(u"displaymenu"_ustr);
+ std::unique_ptr<weld::Menu> xSubPopOutlineTracking = xBuilder->weld_menu(u"outlinetracking"_ustr);
- std::unique_ptr<weld::Menu> xSubPopOutlineContent = xBuilder->weld_menu("outlinecontent");
+ std::unique_ptr<weld::Menu> xSubPopOutlineContent = xBuilder->weld_menu(u"outlinecontent"_ustr);
xSubPopOutlineContent->append(OUString::number(TOGGLE_OUTLINE_CONTENT_VISIBILITY),
SwResId(STR_OUTLINE_CONTENT_VISIBILITY_TOGGLE));
@@ -1753,7 +1753,7 @@ IMPL_LINK(SwContentTree, CommandHdl, const CommandEvent&, rCEvt, bool)
&& nContentType != ContentTypeId::POSTIT && nContentType != ContentTypeId::UNKNOWN)
{
bRemoveSortEntry = false;
- xPop->set_active("sort", pType->IsAlphabeticSort());
+ xPop->set_active(u"sort"_ustr, pType->IsAlphabeticSort());
}
OUString aIdent;
@@ -1950,8 +1950,8 @@ IMPL_LINK(SwContentTree, CommandHdl, const CommandEvent&, rCEvt, bool)
= static_cast<SwRegionContent*>(pCnt)->GetSectionFormat();
bool bHidden = pSectionFormat->GetSection()->IsHidden();
bRemoveSelectEntry = bHidden || !bVisible;
- xPop->set_active("protectsection", bProtected);
- xPop->set_active("hidesection", bHidden);
+ xPop->set_active(u"protectsection"_ustr, bProtected);
+ xPop->set_active(u"hidesection"_ustr, bHidden);
}
else
bRemoveEditEntry = false;
@@ -2015,39 +2015,39 @@ IMPL_LINK(SwContentTree, CommandHdl, const CommandEvent&, rCEvt, bool)
}
if (bRemoveDeleteChapterEntry)
- xPop->remove("deletechapter");
+ xPop->remove(u"deletechapter"_ustr);
if (bRemoveDeleteTableEntry)
- xPop->remove("deletetable");
+ xPop->remove(u"deletetable"_ustr);
if (bRemoveDeleteFrameEntry)
- xPop->remove("deleteframe");
+ xPop->remove(u"deleteframe"_ustr);
if (bRemoveDeleteImageEntry)
- xPop->remove("deleteimage");
+ xPop->remove(u"deleteimage"_ustr);
if (bRemoveDeleteOLEObjectEntry)
- xPop->remove("deleteoleobject");
+ xPop->remove(u"deleteoleobject"_ustr);
if (bRemoveDeleteBookmarkEntry)
- xPop->remove("deletebookmark");
+ xPop->remove(u"deletebookmark"_ustr);
if (bRemoveDeleteRegionEntry)
- xPop->remove("deleteregion");
+ xPop->remove(u"deleteregion"_ustr);
if (bRemoveDeleteHyperlinkEntry)
- xPop->remove("deletehyperlink");
+ xPop->remove(u"deletehyperlink"_ustr);
if (bRemoveDeleteReferenceEntry)
- xPop->remove("deletereference");
+ xPop->remove(u"deletereference"_ustr);
if (bRemoveDeleteIndexEntry)
- xPop->remove("deleteindex");
+ xPop->remove(u"deleteindex"_ustr);
if (bRemoveDeleteCommentEntry)
- xPop->remove("deletecomment");
+ xPop->remove(u"deletecomment"_ustr);
if (bRemoveDeleteDrawingObjectEntry)
- xPop->remove("deletedrawingobject");
+ xPop->remove(u"deletedrawingobject"_ustr);
if (bRemoveDeleteFieldEntry)
- xPop->remove("deletefield");
+ xPop->remove(u"deletefield"_ustr);
if (bRemoveDeleteAllFootnotesEntry)
- xPop->remove("deleteallfootnotes");
+ xPop->remove(u"deleteallfootnotes"_ustr);
if (bRemoveDeleteAllEndnotesEntry)
- xPop->remove("deleteallendnotes");
+ xPop->remove(u"deleteallendnotes"_ustr);
if (bRemoveDeleteFootnoteEntry)
- xPop->remove("deletefootnote");
+ xPop->remove(u"deletefootnote"_ustr);
if (bRemoveDeleteEndnoteEntry)
- xPop->remove("deleteendnote");
+ xPop->remove(u"deleteendnote"_ustr);
// bRemoveDeleteEntry is used in determining separator 2
bool bRemoveDeleteEntry =
@@ -2086,10 +2086,10 @@ IMPL_LINK(SwContentTree, CommandHdl, const CommandEvent&, rCEvt, bool)
if (bRemoveToggleExpandEntry &&
bRemoveSendOutlineEntry)
- xPop->remove("separator1");
+ xPop->remove(u"separator1"_ustr);
if (bRemoveCopyEntry)
- xPop->remove("copy");
+ xPop->remove(u"copy"_ustr);
if (bRemoveGotoEntry &&
bRemoveCopyEntry &&
@@ -2101,7 +2101,7 @@ IMPL_LINK(SwContentTree, CommandHdl, const CommandEvent&, rCEvt, bool)
bRemoveReadonlyIndexEntry &&
bRemoveUnprotectEntry &&
bRemoveEditEntry)
- xPop->remove("separator2");
+ xPop->remove(u"separator2"_ustr);
if (!bOutline)
{
@@ -2119,43 +2119,43 @@ IMPL_LINK(SwContentTree, CommandHdl, const CommandEvent&, rCEvt, bool)
{
xSubPopOutlineContent.reset();
xPop->remove(OUString::number(5)); // outline folding menu
- xPop->remove("separator3");
+ xPop->remove(u"separator3"_ustr);
}
if (bRemoveTableTracking)
- xPop->remove("tabletracking");
+ xPop->remove(u"tabletracking"_ustr);
if (bRemoveSectionTracking)
- xPop->remove("sectiontracking");
+ xPop->remove(u"sectiontracking"_ustr);
if (bRemoveFrameTracking)
- xPop->remove("frametracking");
+ xPop->remove(u"frametracking"_ustr);
if (bRemoveImageTracking)
- xPop->remove("imagetracking");
+ xPop->remove(u"imagetracking"_ustr);
if (bRemoveOLEobjectTracking)
- xPop->remove("oleobjecttracking");
+ xPop->remove(u"oleobjecttracking"_ustr);
if (bRemoveBookmarkTracking)
- xPop->remove("bookmarktracking");
+ xPop->remove(u"bookmarktracking"_ustr);
if (bRemoveHyperlinkTracking)
- xPop->remove("hyperlinktracking");
+ xPop->remove(u"hyperlinktracking"_ustr);
if (bRemoveReferenceTracking)
- xPop->remove("referencetracking");
+ xPop->remove(u"referencetracking"_ustr);
if (bRemoveIndexTracking)
- xPop->remove("indextracking");
+ xPop->remove(u"indextracking"_ustr);
if (bRemoveCommentTracking)
- xPop->remove("commenttracking");
+ xPop->remove(u"commenttracking"_ustr);
if (bRemoveDrawingObjectTracking)
- xPop->remove("drawingobjecttracking");
+ xPop->remove(u"drawingobjecttracking"_ustr);
if (bRemoveFieldTracking)
- xPop->remove("fieldtracking");
+ xPop->remove(u"fieldtracking"_ustr);
if (bRemoveFootnoteTracking)
- xPop->remove("footnotetracking");
+ xPop->remove(u"footnotetracking"_ustr);
if (bRemoveEndnoteTracking)
- xPop->remove("endnotetracking");
+ xPop->remove(u"endnotetracking"_ustr);
if (bRemoveSortEntry)
- xPop->remove("sort");
+ xPop->remove(u"sort"_ustr);
if (bRemoveProtectSection)
- xPop->remove("protectsection");
+ xPop->remove(u"protectsection"_ustr);
if (bRemoveHideSection)
- xPop->remove("hidesection");
+ xPop->remove(u"hidesection"_ustr);
bool bSetSensitiveCollapseAllCategories = false;
if (!m_bIsRoot && xEntry)
@@ -2171,7 +2171,7 @@ IMPL_LINK(SwContentTree, CommandHdl, const CommandEvent&, rCEvt, bool)
bEntry = m_xTreeView->iter_next_sibling(*xEntry);
}
}
- xPop->set_sensitive("collapseallcategories", bSetSensitiveCollapseAllCategories);
+ xPop->set_sensitive(u"collapseallcategories"_ustr, bSetSensitiveCollapseAllCategories);
OUString sCommand = xPop->popup_at_rect(m_xTreeView.get(), tools::Rectangle(rCEvt.GetMousePosPixel(), Size(1,1)));
if (!sCommand.isEmpty())
@@ -3315,7 +3315,7 @@ void SwContentTree::ToggleToRoot()
}
m_pConfig->SetRootType( m_nRootType );
weld::Toolbar* pBox = GetParentWindow()->m_xContent5ToolBox.get();
- pBox->set_item_active("root", m_bIsRoot);
+ pBox->set_item_active(u"root"_ustr, m_bIsRoot);
}
bool SwContentTree::HasContentChanged()
@@ -3587,7 +3587,7 @@ void SwContentTree::FindActiveTypeAndRemoveUserData()
// If clear is called by TimerUpdate:
// Only for root can the validity of the UserData be guaranteed.
m_xTreeView->all_foreach([this](weld::TreeIter& rEntry){
- m_xTreeView->set_id(rEntry, "");
+ m_xTreeView->set_id(rEntry, u""_ustr);
return false;
});
}
@@ -4793,7 +4793,7 @@ IMPL_LINK(SwContentTree, KeyInputHdl, const KeyEvent&, rEvent, bool)
&& (pContentType->GetType() == ContentTypeId::FOOTNOTE
|| pContentType->GetType() == ContentTypeId::ENDNOTE))
{
- ExecuteContextMenuAction("deleteallfootnotes");
+ ExecuteContextMenuAction(u"deleteallfootnotes"_ustr);
}
}
}
@@ -5543,10 +5543,10 @@ void SwContentTree::Select()
}
}
- pNavi->m_xContent6ToolBox->set_item_sensitive("chapterup", bEnable);
- pNavi->m_xContent6ToolBox->set_item_sensitive("chapterdown", bEnable);
- pNavi->m_xContent6ToolBox->set_item_sensitive("promote", bEnable);
- pNavi->m_xContent6ToolBox->set_item_sensitive("demote", bEnable);
+ pNavi->m_xContent6ToolBox->set_item_sensitive(u"chapterup"_ustr, bEnable);
+ pNavi->m_xContent6ToolBox->set_item_sensitive(u"chapterdown"_ustr, bEnable);
+ pNavi->m_xContent6ToolBox->set_item_sensitive(u"promote"_ustr, bEnable);
+ pNavi->m_xContent6ToolBox->set_item_sensitive(u"demote"_ustr, bEnable);
}
void SwContentTree::SetRootType(ContentTypeId nType)
@@ -5974,10 +5974,10 @@ void SwContentTree::GotoContent(const SwContent* pCnt)
if ( !xDecks.is() )
break;
- if (!xDecks->hasByName("NavigatorDeck"))
+ if (!xDecks->hasByName(u"NavigatorDeck"_ustr))
break;
- Reference<ui::XDeck> xDeck ( xDecks->getByName("NavigatorDeck"), uno::UNO_QUERY);
+ Reference<ui::XDeck> xDeck ( xDecks->getByName(u"NavigatorDeck"_ustr), uno::UNO_QUERY);
if ( !xDeck.is() )
break;
@@ -5985,9 +5985,9 @@ void SwContentTree::GotoContent(const SwContent* pCnt)
if ( !xPanels.is() )
break;
- if (xPanels->hasByName("SwNavigatorPanel"))
+ if (xPanels->hasByName(u"SwNavigatorPanel"_ustr))
{
- Reference<ui::XPanel> xPanel ( xPanels->getByName("SwNavigatorPanel"), uno::UNO_QUERY);
+ Reference<ui::XPanel> xPanel ( xPanels->getByName(u"SwNavigatorPanel"_ustr), uno::UNO_QUERY);
if ( !xPanel.is() || !xPanel->getTitle().isEmpty() )
break;
diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx
index 7d7d0104fc7b..6ae53ad36c6c 100644
--- a/sw/source/uibase/utlui/glbltree.cxx
+++ b/sw/source/uibase/utlui/glbltree.cxx
@@ -270,26 +270,26 @@ IMPL_LINK(SwGlobalTree, CommandHdl, const CommandEvent&, rCEvt, bool)
bool bPop = false;
if (m_pActiveShell && !m_pActiveShell->GetView().GetDocShell()->IsReadOnly())
{
- std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(m_xTreeView.get(), "modules/swriter/ui/mastercontextmenu.ui"));
- std::unique_ptr<weld::Menu> xPopup = xBuilder->weld_menu("navmenu");
- std::unique_ptr<weld::Menu> xSubPopup = xBuilder->weld_menu("insertmenu");
+ std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(m_xTreeView.get(), u"modules/swriter/ui/mastercontextmenu.ui"_ustr));
+ std::unique_ptr<weld::Menu> xPopup = xBuilder->weld_menu(u"navmenu"_ustr);
+ std::unique_ptr<weld::Menu> xSubPopup = xBuilder->weld_menu(u"insertmenu"_ustr);
const MenuEnableFlags nEnableFlags = GetEnableFlags();
- xPopup->set_sensitive("updatesel", bool(nEnableFlags & MenuEnableFlags::UpdateSel));
+ xPopup->set_sensitive(u"updatesel"_ustr, bool(nEnableFlags & MenuEnableFlags::UpdateSel));
- xPopup->set_sensitive("editlink", bool(nEnableFlags & MenuEnableFlags::EditLink));
+ xPopup->set_sensitive(u"editlink"_ustr, bool(nEnableFlags & MenuEnableFlags::EditLink));
//disabling if applicable
- xSubPopup->set_sensitive("insertindex", bool(nEnableFlags & MenuEnableFlags::InsertIdx ));
- xSubPopup->set_sensitive("insertfile", bool(nEnableFlags & MenuEnableFlags::InsertFile));
- xSubPopup->set_sensitive("insertnewfile", bool(nEnableFlags & MenuEnableFlags::InsertFile));
- xSubPopup->set_sensitive("inserttext", bool(nEnableFlags & MenuEnableFlags::InsertText));
+ xSubPopup->set_sensitive(u"insertindex"_ustr, bool(nEnableFlags & MenuEnableFlags::InsertIdx ));
+ xSubPopup->set_sensitive(u"insertfile"_ustr, bool(nEnableFlags & MenuEnableFlags::InsertFile));
+ xSubPopup->set_sensitive(u"insertnewfile"_ustr, bool(nEnableFlags & MenuEnableFlags::InsertFile));
+ xSubPopup->set_sensitive(u"inserttext"_ustr, bool(nEnableFlags & MenuEnableFlags::InsertText));
- xPopup->set_sensitive("update", bool(nEnableFlags & MenuEnableFlags::Update));
- xPopup->set_sensitive("insert", bool(nEnableFlags & MenuEnableFlags::InsertIdx));
- xPopup->set_sensitive("editcontent", bool(nEnableFlags & MenuEnableFlags::Edit));
- xPopup->set_sensitive("deleteentry", bool(nEnableFlags & MenuEnableFlags::Delete));
+ xPopup->set_sensitive(u"update"_ustr, bool(nEnableFlags & MenuEnableFlags::Update));
+ xPopup->set_sensitive(u"insert"_ustr, bool(nEnableFlags & MenuEnableFlags::InsertIdx));
+ xPopup->set_sensitive(u"editcontent"_ustr, bool(nEnableFlags & MenuEnableFlags::Edit));
+ xPopup->set_sensitive(u"deleteentry"_ustr, bool(nEnableFlags & MenuEnableFlags::Delete));
OUString sCommand = xPopup->popup_at_rect(m_xTreeView.get(), tools::Rectangle(rCEvt.GetMousePosPixel(), Size(1,1)));
if (!sCommand.isEmpty())
@@ -305,14 +305,14 @@ void SwGlobalTree::TbxMenuHdl(std::u16string_view rCommand, weld::Menu& rMenu)
const MenuEnableFlags nEnableFlags = GetEnableFlags();
if (rCommand == u"insert")
{
- rMenu.set_sensitive("insertindex", bool(nEnableFlags & MenuEnableFlags::InsertIdx));
- rMenu.set_sensitive("insertfile", bool(nEnableFlags & MenuEnableFlags::InsertFile));
- rMenu.set_sensitive("insertnewfile", bool(nEnableFlags & MenuEnableFlags::InsertFile));
- rMenu.set_sensitive("inserttext", bool(nEnableFlags & MenuEnableFlags::InsertText));
+ rMenu.set_sensitive(u"insertindex"_ustr, bool(nEnableFlags & MenuEnableFlags::InsertIdx));
+ rMenu.set_sensitive(u"insertfile"_ustr, bool(nEnableFlags & MenuEnableFlags::InsertFile));
+ rMenu.set_sensitive(u"insertnewfile"_ustr, bool(nEnableFlags & MenuEnableFlags::InsertFile));
+ rMenu.set_sensitive(u"inserttext"_ustr, bool(nEnableFlags & MenuEnableFlags::InsertText));
}
else if (rCommand == u"update")
{
- rMenu.set_sensitive("updatesel", bool(nEnableFlags & MenuEnableFlags::UpdateSel));
+ rMenu.set_sensitive(u"updatesel"_ustr, bool(nEnableFlags & MenuEnableFlags::UpdateSel));
}
}
@@ -383,12 +383,12 @@ void SwGlobalTree::Select()
SwNavigationPI* pNavi = GetParentWindow();
bool bReadonly = !m_pActiveShell ||
m_pActiveShell->GetView().GetDocShell()->IsReadOnly();
- pNavi->m_xGlobalToolBox->set_item_sensitive("edit", nSelCount == 1 && !bReadonly);
- pNavi->m_xGlobalToolBox->set_item_sensitive("insert", nSelCount <= 1 && !bReadonly);
- pNavi->m_xGlobalToolBox->set_item_sensitive("update", m_xTreeView->n_children() > 0 && !bReadonly);
- pNavi->m_xGlobalToolBox->set_item_sensitive("moveup",
+ pNavi->m_xGlobalToolBox->set_item_sensitive(u"edit"_ustr, nSelCount == 1 && !bReadonly);
+ pNavi->m_xGlobalToolBox->set_item_sensitive(u"insert"_ustr, nSelCount <= 1 && !bReadonly);
+ pNavi->m_xGlobalToolBox->set_item_sensitive(u"update"_ustr, m_xTreeView->n_children() > 0 && !bReadonly);
+ pNavi->m_xGlobalToolBox->set_item_sensitive(u"moveup"_ustr,
nSelCount == 1 && nAbsPos && !bReadonly);
- pNavi->m_xGlobalToolBox->set_item_sensitive("movedown",
+ pNavi->m_xGlobalToolBox->set_item_sensitive(u"movedown"_ustr,
nSelCount == 1 && nAbsPos < m_xTreeView->n_children() - 1 && !bReadonly);
}
@@ -520,7 +520,7 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* pCont, const OUString*
if ( !pFileName )
{
SwNavigationPI* pNavi = GetParentWindow();
- m_pDocInserter.reset(new ::sfx2::DocumentInserter(pNavi->GetFrameWeld(), "swriter", sfx2::DocumentInserter::Mode::InsertMulti));
+ m_pDocInserter.reset(new ::sfx2::DocumentInserter(pNavi->GetFrameWeld(), u"swriter"_ustr, sfx2::DocumentInserter::Mode::InsertMulti));
m_pDocInserter->StartExecuteModal( LINK( this, SwGlobalTree, DialogClosedHdl ) );
}
else if ( !pFileName->isEmpty() )
@@ -1015,7 +1015,7 @@ void SwGlobalTree::OpenDoc(const SwGlblDocContent* pCont)
{
SfxStringItem aURL(SID_FILE_NAME, sFileName);
SfxBoolItem aReadOnly(SID_DOC_READONLY, false);
- SfxStringItem aTargetFrameName( SID_TARGETNAME, "_blank" );
+ SfxStringItem aTargetFrameName( SID_TARGETNAME, u"_blank"_ustr );
SfxStringItem aReferer(SID_REFERER, m_pActiveShell->GetView().GetDocShell()->GetTitle());
m_pActiveShell->GetView().GetViewFrame().GetDispatcher()->
ExecuteList(SID_OPENDOC, SfxCallMode::ASYNCHRON,
diff --git a/sw/source/uibase/utlui/gloslst.cxx b/sw/source/uibase/utlui/gloslst.cxx
index 9878d0aa6716..08a9c23b431c 100644
--- a/sw/source/uibase/utlui/gloslst.cxx
+++ b/sw/source/uibase/utlui/gloslst.cxx
@@ -64,9 +64,9 @@ public:
}
SwGlossDecideDlg::SwGlossDecideDlg(weld::Window* pParent)
- : GenericDialogController(pParent, "modules/swriter/ui/selectautotextdialog.ui", "SelectAutoTextDialog")
- , m_xOk(m_xBuilder->weld_button("ok"))
- , m_xListLB(m_xBuilder->weld_tree_view("treeview"))
+ : GenericDialogController(pParent, u"modules/swriter/ui/selectautotextdialog.ui"_ustr, u"SelectAutoTextDialog"_ustr)
+ , m_xOk(m_xBuilder->weld_button(u"ok"_ustr))
+ , m_xListLB(m_xBuilder->weld_tree_view(u"treeview"_ustr))
{
m_xListLB->set_size_request(m_xListLB->get_approximate_digit_width() * 32,
m_xListLB->get_height_rows(8));
diff --git a/sw/source/uibase/utlui/navicfg.cxx b/sw/source/uibase/utlui/navicfg.cxx
index 7f913946c34c..a1b90f78e18d 100644
--- a/sw/source/uibase/utlui/navicfg.cxx
+++ b/sw/source/uibase/utlui/navicfg.cxx
@@ -52,33 +52,33 @@ namespace {
Sequence<OUString> SwNavigationConfig::GetPropertyNames()
{
return css::uno::Sequence<OUString>{
- OUString("RootType"),
- OUString("SelectedPosition"),
- OUString("OutlineLevel"),
- OUString("ActiveBlock"),
- OUString("ShowListBox"),
- OUString("GlobalDocMode"),
- OUString("OutlineTracking"),
- OUString("TableTracking"),
- OUString("SectionTracking"),
- OUString("FrameTracking"),
- OUString("ImageTracking"),
- OUString("OLEobjectTracking"),
- OUString("BookmarkTracking"),
- OUString("HyperlinkTracking"),
- OUString("ReferenceTracking"),
- OUString("IndexTracking"),
- OUString("CommentTracking"),
- OUString("DrawingObjectTracking"),
- OUString("FieldTracking"),
- OUString("FootnoteTracking"),
- OUString("EndnoteTracking"),
- OUString("NavigateOnSelect"),
- OUString("SortAlphabeticallyBlock")};
+ u"RootType"_ustr,
+ u"SelectedPosition"_ustr,
+ u"OutlineLevel"_ustr,
+ u"ActiveBlock"_ustr,
+ u"ShowListBox"_ustr,
+ u"GlobalDocMode"_ustr,
+ u"OutlineTracking"_ustr,
+ u"TableTracking"_ustr,
+ u"SectionTracking"_ustr,
+ u"FrameTracking"_ustr,
+ u"ImageTracking"_ustr,
+ u"OLEobjectTracking"_ustr,
+ u"BookmarkTracking"_ustr,
+ u"HyperlinkTracking"_ustr,
+ u"ReferenceTracking"_ustr,
+ u"IndexTracking"_ustr,
+ u"CommentTracking"_ustr,
+ u"DrawingObjectTracking"_ustr,
+ u"FieldTracking"_ustr,
+ u"FootnoteTracking"_ustr,
+ u"EndnoteTracking"_ustr,
+ u"NavigateOnSelect"_ustr,
+ u"SortAlphabeticallyBlock"_ustr};
}
SwNavigationConfig::SwNavigationConfig() :
- utl::ConfigItem("Office.Writer/Navigator"),
+ utl::ConfigItem(u"Office.Writer/Navigator"_ustr),
m_nRootType(ContentTypeId::UNKNOWN),
m_nSelectedPos(0),
m_nOutlineLevel(MAXLEVEL),
diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx
index e86e51c30d11..7db3f3d8c2df 100644
--- a/sw/source/uibase/utlui/navipi.cxx
+++ b/sw/source/uibase/utlui/navipi.cxx
@@ -296,7 +296,7 @@ IMPL_LINK(SwNavigationPI, ToolBoxSelectHdl, const OUString&, rCommand, void)
ToggleTree();
bool bGlobalMode = IsGlobalMode();
m_pConfig->SetGlobalActive(bGlobalMode);
- m_xGlobalToolBox->set_item_active("globaltoggle", bGlobalMode);
+ m_xGlobalToolBox->set_item_active(u"globaltoggle"_ustr, bGlobalMode);
}
else if (rCommand == "save")
{
@@ -305,11 +305,11 @@ IMPL_LINK(SwNavigationPI, ToolBoxSelectHdl, const OUString&, rCommand, void)
m_xGlobalToolBox->set_item_active(rCommand, !bSave);
}
else if (rCommand == "headings")
- m_xContent5ToolBox->set_menu_item_active("headings", !m_xContent5ToolBox->get_menu_item_active("headings"));
+ m_xContent5ToolBox->set_menu_item_active(u"headings"_ustr, !m_xContent5ToolBox->get_menu_item_active(u"headings"_ustr));
else if (rCommand == "update")
- m_xGlobalToolBox->set_menu_item_active("update", !m_xGlobalToolBox->get_menu_item_active("update"));
+ m_xGlobalToolBox->set_menu_item_active(u"update"_ustr, !m_xGlobalToolBox->get_menu_item_active(u"update"_ustr));
else if (rCommand == "insert")
- m_xGlobalToolBox->set_menu_item_active("insert", !m_xGlobalToolBox->get_menu_item_active("insert"));
+ m_xGlobalToolBox->set_menu_item_active(u"insert"_ustr, !m_xGlobalToolBox->get_menu_item_active(u"insert"_ustr));
if (nFuncId)
lcl_UnSelectFrame(&rSh);
@@ -373,7 +373,7 @@ void SwNavigationPI::ZoomOut()
m_xContentTree->Select(); // Enable toolbox
m_pConfig->SetSmall(false);
- m_xContent6ToolBox->set_item_active("listbox", true);
+ m_xContent6ToolBox->set_item_active(u"listbox"_ustr, true);
}
void SwNavigationPI::ZoomIn()
@@ -403,7 +403,7 @@ void SwNavigationPI::ZoomIn()
m_xContentTree->Select(); // Enable toolbox
m_pConfig->SetSmall(true);
- m_xContent6ToolBox->set_item_active("listbox", false);
+ m_xContent6ToolBox->set_item_active(u"listbox"_ustr, false);
}
std::unique_ptr<PanelLayout> SwNavigationPI::Create(weld::Widget* pParent,
@@ -411,39 +411,39 @@ std::unique_ptr<PanelLayout> SwNavigationPI::Create(weld::Widget* pParent,
SfxBindings* pBindings)
{
if( pParent == nullptr )
- throw css::lang::IllegalArgumentException("no parent window given to SwNavigationPI::Create", nullptr, 0);
+ throw css::lang::IllegalArgumentException(u"no parent window given to SwNavigationPI::Create"_ustr, nullptr, 0);
if( !rxFrame.is() )
- throw css::lang::IllegalArgumentException("no XFrame given to SwNavigationPI::Create", nullptr, 0);
+ throw css::lang::IllegalArgumentException(u"no XFrame given to SwNavigationPI::Create"_ustr, nullptr, 0);
if( pBindings == nullptr )
- throw css::lang::IllegalArgumentException("no SfxBindings given to SwNavigationPI::Create", nullptr, 0);
+ throw css::lang::IllegalArgumentException(u"no SfxBindings given to SwNavigationPI::Create"_ustr, nullptr, 0);
return std::make_unique<SwNavigationPI>(pParent, rxFrame, pBindings, nullptr);
}
SwNavigationPI::SwNavigationPI(weld::Widget* pParent,
const css::uno::Reference<css::frame::XFrame>& rxFrame,
SfxBindings* _pBindings, SfxNavigator* pNavigatorDlg)
- : PanelLayout(pParent, "NavigatorPanel", "modules/swriter/ui/navigatorpanel.ui")
+ : PanelLayout(pParent, u"NavigatorPanel"_ustr, u"modules/swriter/ui/navigatorpanel.ui"_ustr)
, m_aDocFullName(SID_DOCFULLNAME, *_pBindings, *this)
, m_aPageStats(FN_STAT_PAGE, *_pBindings, *this)
, m_aNavElement(FN_NAV_ELEMENT, *_pBindings, *this)
- , m_xContent1ToolBox(m_xBuilder->weld_toolbar("content1"))
- , m_xContent2ToolBox(m_xBuilder->weld_toolbar("content2"))
- , m_xContent3ToolBox(m_xBuilder->weld_toolbar("content3"))
- , m_xContent4ToolBox(m_xBuilder->weld_toolbar("content4"))
- , m_xContent5ToolBox(m_xBuilder->weld_toolbar("content5"))
- , m_xContent6ToolBox(m_xBuilder->weld_toolbar("content6"))
+ , m_xContent1ToolBox(m_xBuilder->weld_toolbar(u"content1"_ustr))
+ , m_xContent2ToolBox(m_xBuilder->weld_toolbar(u"content2"_ustr))
+ , m_xContent3ToolBox(m_xBuilder->weld_toolbar(u"content3"_ustr))
+ , m_xContent4ToolBox(m_xBuilder->weld_toolbar(u"content4"_ustr))
+ , m_xContent5ToolBox(m_xBuilder->weld_toolbar(u"content5"_ustr))
+ , m_xContent6ToolBox(m_xBuilder->weld_toolbar(u"content6"_ustr))
, m_xContent2Dispatch(new ToolbarUnoDispatcher(*m_xContent2ToolBox, *m_xBuilder, rxFrame))
, m_xContent3Dispatch(new ToolbarUnoDispatcher(*m_xContent3ToolBox, *m_xBuilder, rxFrame))
- , m_xHeadingsMenu(m_xBuilder->weld_menu("headingsmenu"))
- , m_xUpdateMenu(m_xBuilder->weld_menu("updatemenu"))
- , m_xInsertMenu(m_xBuilder->weld_menu("insertmenu"))
- , m_xGlobalToolBox(m_xBuilder->weld_toolbar("global"))
- , m_xGotoPageSpinButton(m_xBuilder->weld_spin_button("gotopage"))
- , m_xContentBox(m_xBuilder->weld_widget("contentbox"))
- , m_xContentTree(new SwContentTree(m_xBuilder->weld_tree_view("contenttree"), this))
- , m_xGlobalBox(m_xBuilder->weld_widget("globalbox"))
- , m_xGlobalTree(new SwGlobalTree(m_xBuilder->weld_tree_view("globaltree"), this))
- , m_xDocListBox(m_xBuilder->weld_combo_box("documents"))
+ , m_xHeadingsMenu(m_xBuilder->weld_menu(u"headingsmenu"_ustr))
+ , m_xUpdateMenu(m_xBuilder->weld_menu(u"updatemenu"_ustr))
+ , m_xInsertMenu(m_xBuilder->weld_menu(u"insertmenu"_ustr))
+ , m_xGlobalToolBox(m_xBuilder->weld_toolbar(u"global"_ustr))
+ , m_xGotoPageSpinButton(m_xBuilder->weld_spin_button(u"gotopage"_ustr))
+ , m_xContentBox(m_xBuilder->weld_widget(u"contentbox"_ustr))
+ , m_xContentTree(new SwContentTree(m_xBuilder->weld_tree_view(u"contenttree"_ustr), this))
+ , m_xGlobalBox(m_xBuilder->weld_widget(u"globalbox"_ustr))
+ , m_xGlobalTree(new SwGlobalTree(m_xBuilder->weld_tree_view(u"globaltree"_ustr), this))
+ , m_xDocListBox(m_xBuilder->weld_combo_box(u"documents"_ustr))
, m_xNavigatorDlg(pNavigatorDlg)
, m_pContentView(nullptr)
, m_pContentWrtShell(nullptr)
@@ -457,7 +457,7 @@ SwNavigationPI::SwNavigationPI(weld::Widget* pParent,
m_xContainer->connect_container_focus_changed(LINK(this, SwNavigationPI, SetFocusChildHdl));
Reference<XToolbarController> xController =
- m_xContent2Dispatch->GetControllerForCommand(".uno:NavElement");
+ m_xContent2Dispatch->GetControllerForCommand(u".uno:NavElement"_ustr);
NavElementToolBoxControl* pToolBoxControl =
dynamic_cast<NavElementToolBoxControl*>(xController.get());
@@ -489,7 +489,7 @@ SwNavigationPI::SwNavigationPI(weld::Widget* pParent,
nRootType != ContentTypeId::UNKNOWN)
{
m_xContentTree->SetRootType(nRootType);
- m_xContent5ToolBox->set_item_active("root", true);
+ m_xContent5ToolBox->set_item_active(u"root"_ustr, true);
if (nRootType == ContentTypeId::OUTLINE || nRootType == ContentTypeId::DRAWOBJECT)
m_xContentTree->set_selection_mode(SelectionMode::Multiple);
else
@@ -515,8 +515,8 @@ SwNavigationPI::SwNavigationPI(weld::Widget* pParent,
bool bFloatingNavigator = ParentIsFloatingWindow(m_xNavigatorDlg);
m_xContentTree->ShowTree();
- m_xContent6ToolBox->set_item_active("listbox", true);
- m_xContent6ToolBox->set_item_sensitive("listbox", bFloatingNavigator);
+ m_xContent6ToolBox->set_item_active(u"listbox"_ustr, true);
+ m_xContent6ToolBox->set_item_sensitive(u"listbox"_ustr, bFloatingNavigator);
// TreeListBox for global document
m_xGlobalTree->set_selection_mode(SelectionMode::Multiple);
@@ -528,15 +528,15 @@ SwNavigationPI::SwNavigationPI(weld::Widget* pParent,
m_xContent6ToolBox->connect_clicked(aLk);
m_xGlobalToolBox->connect_clicked(aLk);
m_xDocListBox->connect_changed(LINK(this, SwNavigationPI, DocListBoxSelectHdl));
- m_xContent5ToolBox->set_item_menu("headings", m_xHeadingsMenu.get());
+ m_xContent5ToolBox->set_item_menu(u"headings"_ustr, m_xHeadingsMenu.get());
m_xHeadingsMenu->connect_activate(LINK(this, SwNavigationPI, HeadingsMenuSelectHdl));
m_xContent5ToolBox->connect_menu_toggled(LINK(this, SwNavigationPI, ToolBox5DropdownClickHdl));
- m_xGlobalToolBox->set_item_menu("update", m_xUpdateMenu.get());
+ m_xGlobalToolBox->set_item_menu(u"update"_ustr, m_xUpdateMenu.get());
m_xUpdateMenu->connect_activate(LINK(this, SwNavigationPI, GlobalMenuSelectHdl));
- m_xGlobalToolBox->set_item_menu("insert", m_xInsertMenu.get());
+ m_xGlobalToolBox->set_item_menu(u"insert"_ustr, m_xInsertMenu.get());
m_xInsertMenu->connect_activate(LINK(this, SwNavigationPI, GlobalMenuSelectHdl));
m_xGlobalToolBox->connect_menu_toggled(LINK(this, SwNavigationPI, ToolBoxClickHdl));
- m_xGlobalToolBox->set_item_active("globaltoggle", true);
+ m_xGlobalToolBox->set_item_active(u"globaltoggle"_ustr, true);
if (m_pNavigateByComboBox)
m_pNavigateByComboBox->connect_changed(
LINK(this, SwNavigationPI, NavigateByComboBoxSelectHdl));
@@ -549,7 +549,7 @@ SwNavigationPI::SwNavigationPI(weld::Widget* pParent,
{
SwView *pActView = GetCreateView();
if (pActView && pActView->GetWrtShellPtr())
- m_xGlobalToolBox->set_item_active("save",
+ m_xGlobalToolBox->set_item_active(u"save"_ustr,
pActView->GetWrtShellPtr()->IsGlblDocSaveLinks());
if (m_pConfig->IsGlobalActive())
ToggleTree();
@@ -569,7 +569,7 @@ SwNavigationPI::SwNavigationPI(weld::Widget* pParent,
if(comphelper::LibreOfficeKit::isActive())
{
- m_xBuilder->weld_container("gridcontent16")->hide();
+ m_xBuilder->weld_container(u"gridcontent16"_ustr)->hide();
m_xDocListBox->hide();
m_xGlobalBox->hide();
m_xGlobalToolBox->hide();
@@ -668,7 +668,7 @@ void SwNavigationPI::NotifyItemUpdate(sal_uInt16 nSID, SfxItemState /*eState*/,
m_xContentTree->SetActiveShell(pWrtShell);
if (IsGlobalDoc())
{
- m_xGlobalToolBox->set_item_active("save", pWrtShell->IsGlblDocSaveLinks());
+ m_xGlobalToolBox->set_item_active(u"save"_ustr, pWrtShell->IsGlblDocSaveLinks());
}
}
else
@@ -708,7 +708,7 @@ void SwNavigationPI::UpdateInitShow()
// its size, the sidebar can not, and the navigator would just waste
// space. Therefore disable this button.
bool bParentIsFloatingWindow(ParentIsFloatingWindow(m_xNavigatorDlg));
- m_xContent6ToolBox->set_item_sensitive("listbox", bParentIsFloatingWindow);
+ m_xContent6ToolBox->set_item_sensitive(u"listbox"_ustr, bParentIsFloatingWindow);
// show content if docked
if (!bParentIsFloatingWindow && IsZoomedIn())
ZoomOut();
@@ -934,7 +934,7 @@ sal_Int8 SwNavigationPI::ExecuteDrop( const ExecuteDropEvent& rEvt )
m_oObjectShell.reset();
}
SfxStringItem aFileItem(SID_FILE_NAME, sFileName );
- SfxStringItem aOptionsItem( SID_OPTIONS, "HRC" );
+ SfxStringItem aOptionsItem( SID_OPTIONS, u"HRC"_ustr );
SfxLinkItem aLink( SID_DONELINK,
LINK( this, SwNavigationPI, DoneLink ) );
if (SwView* pView = GetActiveView())
diff --git a/sw/source/uibase/utlui/numfmtlb.cxx b/sw/source/uibase/utlui/numfmtlb.cxx
index 8a1895f47212..9d42a5bb9efe 100644
--- a/sw/source/uibase/utlui/numfmtlb.cxx
+++ b/sw/source/uibase/utlui/numfmtlb.cxx
@@ -267,7 +267,7 @@ void SwNumFormatBase::SetFormatType(const SvNumFormatType nFormatType)
}
else if( nFormatType == SvNumFormatType::TEXT )
{
- pFormatter->GetOutputString( "\"ABC\"", nFormat, sValue, &pCol);
+ pFormatter->GetOutputString( u"\"ABC\""_ustr, nFormat, sValue, &pCol);
}
if (nFormat != nSysNumFormat &&
@@ -329,7 +329,7 @@ void SwNumFormatBase::SetDefFormat(const sal_uInt32 nDefaultFormat)
if (nType == SvNumFormatType::TEXT)
{
- pFormatter->GetOutputString("\"ABC\"", nDefaultFormat, sValue, &pCol);
+ pFormatter->GetOutputString(u"\"ABC\""_ustr, nDefaultFormat, sValue, &pCol);
}
else
{
diff --git a/sw/source/uibase/utlui/tmplctrl.cxx b/sw/source/uibase/utlui/tmplctrl.cxx
index 2b68905cf41d..a1bd3b824ac7 100644
--- a/sw/source/uibase/utlui/tmplctrl.cxx
+++ b/sw/source/uibase/utlui/tmplctrl.cxx
@@ -88,8 +88,8 @@ void SwTemplateControl::Command( const CommandEvent& rCEvt )
auto xIter = pPool->CreateIterator(SfxStyleFamily::Page);
if (xIter->Count() > 1)
{
- std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(nullptr, "modules/swriter/ui/pagestylemenu.ui"));
- std::unique_ptr<weld::Menu> xPopup(xBuilder->weld_menu("menu"));
+ std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(nullptr, u"modules/swriter/ui/pagestylemenu.ui"_ustr));
+ std::unique_ptr<weld::Menu> xPopup(xBuilder->weld_menu(u"menu"_ustr));
sal_uInt32 nCount = 0;
SfxStyleSheetBase* pStyle = xIter->First();
diff --git a/sw/source/uibase/utlui/uitool.cxx b/sw/source/uibase/utlui/uitool.cxx
index 9f9a18c61664..12ed53513cf2 100644
--- a/sw/source/uibase/utlui/uitool.cxx
+++ b/sw/source/uibase/utlui/uitool.cxx
@@ -128,7 +128,7 @@ void ConvertAttrCharToGen(SfxItemSet& rSet, bool bIsPara)
// SwDocStyleSheet::GetItemSet when applying attributes from char format
assert(SfxItemState::SET != rSet.GetItemState(RES_PARATR_GRABBAG, false));
SfxGrabBagItem aGrabBag(RES_PARATR_GRABBAG);
- aGrabBag.GetGrabBag()["DialogUseCharAttr"] <<= true;
+ aGrabBag.GetGrabBag()[u"DialogUseCharAttr"_ustr] <<= true;
// Store initial ranges to allow restoring later
uno::Sequence<sal_uInt16> aOrigRanges(rSet.GetRanges().size() * 2 + 1);
int i = 0;
@@ -138,7 +138,7 @@ void ConvertAttrCharToGen(SfxItemSet& rSet, bool bIsPara)
aOrigRanges.getArray()[i++] = rPair.second;
}
aOrigRanges.getArray()[i++] = 0;
- aGrabBag.GetGrabBag()["OrigItemSetRanges"] <<= aOrigRanges;
+ aGrabBag.GetGrabBag()[u"OrigItemSetRanges"_ustr] <<= aOrigRanges;
rSet.MergeRange(RES_PARATR_GRABBAG, RES_PARATR_GRABBAG);
rSet.Put(aGrabBag);
}
@@ -157,7 +157,7 @@ void ConvertAttrGenToChar(SfxItemSet& rSet, const SfxItemSet& rOrigSet, bool bIs
{
SfxGrabBagItem aGrabBag(*pGrabBagItem);
std::map<OUString, css::uno::Any>& rMap = aGrabBag.GetGrabBag();
- auto aIterator = rMap.find("CharShadingMarker");
+ auto aIterator = rMap.find(u"CharShadingMarker"_ustr);
if( aIterator != rMap.end() )
{
aIterator->second <<= false;
@@ -175,7 +175,7 @@ void ConvertAttrGenToChar(SfxItemSet& rSet, const SfxItemSet& rOrigSet, bool bIs
{
SfxGrabBagItem aGrabBag(*pGrabBagItem);
std::map<OUString, css::uno::Any>& rMap = aGrabBag.GetGrabBag();
- auto aIterator = rMap.find("OrigItemSetRanges");
+ auto aIterator = rMap.find(u"OrigItemSetRanges"_ustr);
if (aIterator != rMap.end())
{
uno::Sequence<sal_uInt16> aOrigRanges;
@@ -215,7 +215,7 @@ void ApplyCharBackground(Color const& rBackgroundColor, model::ComplexColor cons
{
SfxGrabBagItem aGrabBag(*pGrabBagItem);
std::map<OUString, css::uno::Any>& rMap = aGrabBag.GetGrabBag();
- auto aIterator = rMap.find("CharShadingMarker");
+ auto aIterator = rMap.find(u"CharShadingMarker"_ustr);
if (aIterator != rMap.end())
{
aIterator->second <<= false;
@@ -287,13 +287,13 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
{
bool bValue;
const auto pGrabBagInner = pGrabBag->GetGrabBag();
- const auto iter = pGrabBagInner.find("BackgroundFullSize");
+ const auto iter = pGrabBagInner.find(u"BackgroundFullSize"_ustr);
assert(iter != pGrabBagInner.end());
if (iter->second >>= bValue)
{
rMaster.SetFormatAttr(SfxBoolItem(RES_BACKGROUND_FULL_SIZE, bValue));
}
- auto it = pGrabBagInner.find("RtlGutter");
+ auto it = pGrabBagInner.find(u"RtlGutter"_ustr);
if (it != pGrabBagInner.end() && (it->second >>= bValue))
{
rMaster.SetFormatAttr(SfxBoolItem(RES_RTL_GUTTER, bValue));
@@ -626,12 +626,12 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet)
{
oGrabBag.emplace(SID_ATTR_CHAR_GRABBAG);
}
- oGrabBag->GetGrabBag()["BackgroundFullSize"] <<=
+ oGrabBag->GetGrabBag()[u"BackgroundFullSize"_ustr] <<=
rMaster.GetAttrSet().GetItem<SfxBoolItem>(RES_BACKGROUND_FULL_SIZE)->GetValue();
if (IsOwnFormat(*rMaster.GetDoc()))
{
- oGrabBag->GetGrabBag()["RtlGutter"]
+ oGrabBag->GetGrabBag()[u"RtlGutter"_ustr]
<<= rMaster.GetAttrSet().GetItem<SfxBoolItem>(RES_RTL_GUTTER)->GetValue();
}
diff --git a/sw/source/uibase/utlui/unotools.cxx b/sw/source/uibase/utlui/unotools.cxx
index 3105fa9607be..680f4f22c61e 100644
--- a/sw/source/uibase/utlui/unotools.cxx
+++ b/sw/source/uibase/utlui/unotools.cxx
@@ -182,14 +182,14 @@ void SwOneExampleFrame::CreateControl()
uno::Reference<frame::XDesktop2> xDesktop = frame::Desktop::create(::comphelper::getProcessComponentContext());
uno::Sequence<beans::PropertyValue> args( comphelper::InitPropertySequence({
- { "DocumentService", uno::Any(OUString("com.sun.star.text.TextDocument")) },
- { "OpenFlags", uno::Any(OUString("-RB")) },
- { "Referer", uno::Any(OUString("private:user")) },
+ { "DocumentService", uno::Any(u"com.sun.star.text.TextDocument"_ustr) },
+ { "OpenFlags", uno::Any(u"-RB"_ustr) },
+ { "Referer", uno::Any(u"private:user"_ustr) },
{ "ReadOnly", uno::Any(true) },
{ "Hidden", uno::Any(true) }
}));
- m_xModel.set(xDesktop->loadComponentFromURL(sTempURL, "_blank", 0, args), uno::UNO_QUERY);
+ m_xModel.set(xDesktop->loadComponentFromURL(sTempURL, u"_blank"_ustr, 0, args), uno::UNO_QUERY);
m_aLoadedIdle.Start();
}
@@ -222,7 +222,7 @@ IMPL_LINK( SwOneExampleFrame, TimeoutHdl, Timer*, pTimer, void )
try
{
uno::Reference< frame::XLayoutManager > xLayoutManager;
- uno::Any aValue = xPropSet->getPropertyValue("LayoutManager");
+ uno::Any aValue = xPropSet->getPropertyValue(u"LayoutManager"_ustr);
aValue >>= xLayoutManager;
if ( xLayoutManager.is() )
xLayoutManager->setVisible( false );
@@ -368,7 +368,7 @@ IMPL_LINK( SwOneExampleFrame, TimeoutHdl, Timer*, pTimer, void )
uno::Reference< style::XStyleFamiliesSupplier > xSSupp( xDoc, uno::UNO_QUERY);
uno::Reference< container::XNameAccess > xStyles = xSSupp->getStyleFamilies();
- uno::Any aPFamily = xStyles->getByName( "PageStyles" );
+ uno::Any aPFamily = xStyles->getByName( u"PageStyles"_ustr );
uno::Reference< container::XNameContainer > xPFamily;
if( EX_SHOW_DEFAULT_PAGE != m_nStyleFlags
@@ -450,8 +450,8 @@ bool SwOneExampleFrame::CreatePopup(const Point& rPt)
if (EX_SHOW_ONLINE_LAYOUT != m_nStyleFlags)
return false;
- std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(nullptr, "modules/swriter/ui/previewmenu.ui"));
- std::unique_ptr<weld::Menu> xPop(xBuilder->weld_menu("previewmenu"));
+ std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(nullptr, u"modules/swriter/ui/previewmenu.ui"_ustr));
+ std::unique_ptr<weld::Menu> xPop(xBuilder->weld_menu(u"previewmenu"_ustr));
uno::Reference< view::XViewSettingsSupplier > xSettings(m_xController, uno::UNO_QUERY);
uno::Reference< beans::XPropertySet > xViewProps = xSettings->getViewSettings();
diff --git a/sw/source/uibase/utlui/viewlayoutctrl.cxx b/sw/source/uibase/utlui/viewlayoutctrl.cxx
index 89dcc30175c2..0d04fc432d43 100644
--- a/sw/source/uibase/utlui/viewlayoutctrl.cxx
+++ b/sw/source/uibase/utlui/viewlayoutctrl.cxx
@@ -172,7 +172,7 @@ bool SwViewLayoutControl::MouseButtonDown( const MouseEvent & rEvt )
css::uno::Any a;
aViewLayout.QueryValue( a );
- css::uno::Sequence< css::beans::PropertyValue > aArgs{ comphelper::makePropertyValue("ViewLayout",
+ css::uno::Sequence< css::beans::PropertyValue > aArgs{ comphelper::makePropertyValue(u"ViewLayout"_ustr,
a) };
execute( aArgs );
}