summaryrefslogtreecommitdiff
path: root/sfx2/source/control
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-05-10 13:18:37 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-05-10 18:42:35 +0200
commitca5c9591ba38ad83415a2d4ced98bfc74d30b032 (patch)
treedcccbec3d99727cffe7debd21d3c40521383857b /sfx2/source/control
parente888503ee0aecbce8f3075b106243cf68b8dddc7 (diff)
loplugin:ostr in sfx2
Change-Id: I6306260d03c1208ec250c2f9a3860fa569f6d9c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167448 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2/source/control')
-rw-r--r--sfx2/source/control/bindings.cxx2
-rw-r--r--sfx2/source/control/charmapcontrol.cxx16
-rw-r--r--sfx2/source/control/charwin.cxx13
-rw-r--r--sfx2/source/control/dispatch.cxx18
-rw-r--r--sfx2/source/control/listview.cxx8
-rw-r--r--sfx2/source/control/recentdocsviewitem.cxx10
-rw-r--r--sfx2/source/control/request.cxx2
-rw-r--r--sfx2/source/control/statcach.cxx2
-rw-r--r--sfx2/source/control/templatedefaultview.cxx4
-rw-r--r--sfx2/source/control/templatedlglocalview.cxx46
-rw-r--r--sfx2/source/control/templatelocalview.cxx2
-rw-r--r--sfx2/source/control/thumbnailview.cxx8
-rw-r--r--sfx2/source/control/thumbnailviewacc.cxx8
-rw-r--r--sfx2/source/control/thumbnailviewitem.cxx2
-rw-r--r--sfx2/source/control/unoctitm.cxx2
15 files changed, 72 insertions, 71 deletions
diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx
index a56174b96d94..63c8e56080d6 100644
--- a/sfx2/source/control/bindings.cxx
+++ b/sfx2/source/control/bindings.cxx
@@ -1517,7 +1517,7 @@ SfxItemState SfxBindings::QueryState( sal_uInt16 nSlot, std::unique_ptr<SfxPoolI
return SfxItemState::DISABLED;
css::util::URL aURL;
- OUString aCmd( ".uno:" );
+ OUString aCmd( u".uno:"_ustr );
aURL.Protocol = aCmd;
aURL.Path = pSlot->GetUnoName();
aCmd += aURL.Path;
diff --git a/sfx2/source/control/charmapcontrol.cxx b/sfx2/source/control/charmapcontrol.cxx
index 76e37174fd49..a3208a65a372 100644
--- a/sfx2/source/control/charmapcontrol.cxx
+++ b/sfx2/source/control/charmapcontrol.cxx
@@ -92,8 +92,8 @@ SfxCharmapContainer::SfxCharmapContainer(weld::Builder& rBuilder, const VclPtr<V
std::make_unique<weld::CustomWeld>(rBuilder, "favchar14", m_aFavCharView[13]),
std::make_unique<weld::CustomWeld>(rBuilder, "favchar15", m_aFavCharView[14]),
std::make_unique<weld::CustomWeld>(rBuilder, "favchar16", m_aFavCharView[15])}
- , m_xRecentGrid(rBuilder.weld_widget("viewgrid"))
- , m_xFavGrid(rBuilder.weld_widget("favgrid"))
+ , m_xRecentGrid(rBuilder.weld_widget(u"viewgrid"_ustr))
+ , m_xFavGrid(rBuilder.weld_widget(u"favgrid"_ustr))
{
if (bLockGridSizes)
{
@@ -132,13 +132,13 @@ void SfxCharmapContainer::init(bool bHasInsert, const Link<SvxCharView*,void> &r
}
SfxCharmapCtrl::SfxCharmapCtrl(CharmapPopup* pControl, weld::Widget* pParent)
- : WeldToolbarPopup(pControl->getFrameInterface(), pParent, "sfx/ui/charmapcontrol.ui", "charmapctrl")
+ : WeldToolbarPopup(pControl->getFrameInterface(), pParent, u"sfx/ui/charmapcontrol.ui"_ustr, u"charmapctrl"_ustr)
, m_xControl(pControl)
, m_xVirDev(VclPtr<VirtualDevice>::Create())
, m_aCharmapContents(*m_xBuilder, m_xVirDev, false)
- , m_xRecentLabel(m_xBuilder->weld_label("label2"))
- , m_xDlgBtn(m_xBuilder->weld_button("specialchardlg"))
- , m_xCharInfoLabel(m_xBuilder->weld_label("charinfolabel"))
+ , m_xRecentLabel(m_xBuilder->weld_label(u"label2"_ustr))
+ , m_xDlgBtn(m_xBuilder->weld_button(u"specialchardlg"_ustr))
+ , m_xCharInfoLabel(m_xBuilder->weld_label(u"charinfolabel"_ustr))
{
m_xCharInfoLabel->set_size_request(-1, m_xCharInfoLabel->get_text_height() * 2);
@@ -236,13 +236,13 @@ IMPL_LINK_NOARG(SfxCharmapCtrl, OpenDlgHdl, weld::Button&, void)
if (SfxViewFrame* pViewFrm = SfxViewFrame::Current())
{
uno::Reference<frame::XFrame> xFrame = pViewFrm->GetFrame().GetFrameInterface();
- comphelper::dispatchCommand(".uno:InsertSymbol", xFrame, {});
+ comphelper::dispatchCommand(u".uno:InsertSymbol"_ustr, xFrame, {});
}
}
IMPL_LINK_NOARG(SfxCharmapCtrl, DlgBtnFocusInHdl, weld::Widget&, void)
{
- m_xCharInfoLabel->set_label("");
+ m_xCharInfoLabel->set_label(u""_ustr);
}
void SfxCharmapCtrl::GrabFocus()
diff --git a/sfx2/source/control/charwin.cxx b/sfx2/source/control/charwin.cxx
index 3967598ca6d3..7dcde6e7f973 100644
--- a/sfx2/source/control/charwin.cxx
+++ b/sfx2/source/control/charwin.cxx
@@ -158,19 +158,20 @@ void SvxCharView::InsertCharToDoc()
if (GetText().isEmpty())
return;
- uno::Sequence<beans::PropertyValue> aArgs{ comphelper::makePropertyValue("Symbols", GetText()),
- comphelper::makePropertyValue(
- "FontName", maFont.GetFamilyName()) };
+ uno::Sequence<beans::PropertyValue> aArgs{
+ comphelper::makePropertyValue(u"Symbols"_ustr, GetText()),
+ comphelper::makePropertyValue(u"FontName"_ustr, maFont.GetFamilyName())
+ };
- comphelper::dispatchCommand(".uno:InsertSymbol", aArgs);
+ comphelper::dispatchCommand(u".uno:InsertSymbol"_ustr, aArgs);
}
void SvxCharView::createContextMenu(const Point& rPosition)
{
weld::DrawingArea* pDrawingArea = GetDrawingArea();
std::unique_ptr<weld::Builder> xBuilder(
- Application::CreateBuilder(pDrawingArea, "sfx/ui/charviewmenu.ui"));
- std::unique_ptr<weld::Menu> xItemMenu(xBuilder->weld_menu("charviewmenu"));
+ Application::CreateBuilder(pDrawingArea, u"sfx/ui/charviewmenu.ui"_ustr));
+ std::unique_ptr<weld::Menu> xItemMenu(xBuilder->weld_menu(u"charviewmenu"_ustr));
ContextMenuSelect(
xItemMenu->popup_at_rect(pDrawingArea, tools::Rectangle(rPosition, Size(1, 1))));
Invalidate();
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index c761cb17830e..d16a099b9578 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -228,7 +228,7 @@ void SfxDispatcher::Call_Impl(SfxShell& rShell, const SfxSlot &rSlot, SfxRequest
if ( xSet.is() )
{
- css::uno::Any aProp = xSet->getPropertyValue("DispatchRecorderSupplier");
+ css::uno::Any aProp = xSet->getPropertyValue(u"DispatchRecorderSupplier"_ustr);
css::uno::Reference< css::frame::XDispatchRecorderSupplier > xSupplier;
css::uno::Reference< css::frame::XDispatchRecorder > xRecorder;
aProp >>= xSupplier;
@@ -1024,11 +1024,11 @@ void SfxDispatcher::SetMenu_Impl()
if ( xPropSet.is() )
{
css::uno::Reference< css::frame::XLayoutManager > xLayoutManager;
- css::uno::Any aValue = xPropSet->getPropertyValue("LayoutManager");
+ css::uno::Any aValue = xPropSet->getPropertyValue(u"LayoutManager"_ustr);
aValue >>= xLayoutManager;
if ( xLayoutManager.is() )
{
- OUString aMenuBarURL( "private:resource/menubar/menubar" );
+ OUString aMenuBarURL( u"private:resource/menubar/menubar"_ustr );
if ( !xLayoutManager->isElementVisible( aMenuBarURL ) )
xLayoutManager->createElement( aMenuBarURL );
}
@@ -1081,7 +1081,7 @@ void SfxDispatcher::Update_Impl( bool bForce )
{
try
{
- css::uno::Any aValue = xPropSet->getPropertyValue("LayoutManager");
+ css::uno::Any aValue = xPropSet->getPropertyValue(u"LayoutManager"_ustr);
aValue >>= xLayoutManager;
}
catch (const css::uno::Exception&)
@@ -1875,15 +1875,15 @@ boost::property_tree::ptree SfxDispatcher::fillPopupMenu(const rtl::Reference<VC
void SfxDispatcher::ExecutePopup( const OUString& rResName, vcl::Window* pWin, const Point* pPos )
{
css::uno::Sequence< css::uno::Any > aArgs{
- css::uno::Any(comphelper::makePropertyValue( "Value", rResName )),
- css::uno::Any(comphelper::makePropertyValue( "Frame", GetFrame()->GetFrame().GetFrameInterface() )),
- css::uno::Any(comphelper::makePropertyValue( "IsContextMenu", true ))
+ css::uno::Any(comphelper::makePropertyValue( u"Value"_ustr, rResName )),
+ css::uno::Any(comphelper::makePropertyValue( u"Frame"_ustr, GetFrame()->GetFrame().GetFrameInterface() )),
+ css::uno::Any(comphelper::makePropertyValue( u"IsContextMenu"_ustr, true ))
};
css::uno::Reference< css::uno::XComponentContext > xContext = comphelper::getProcessComponentContext();
css::uno::Reference< css::frame::XPopupMenuController > xPopupController(
xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
- "com.sun.star.comp.framework.ResourceMenuController", aArgs, xContext ), css::uno::UNO_QUERY );
+ u"com.sun.star.comp.framework.ResourceMenuController"_ustr, aArgs, xContext ), css::uno::UNO_QUERY );
rtl::Reference< VCLXPopupMenu > xPopupMenu = new VCLXPopupMenu();
@@ -1970,7 +1970,7 @@ void SfxDispatcher::HideUI( bool bHide )
if ( xPropSet.is() )
{
css::uno::Reference< css::frame::XLayoutManager > xLayoutManager;
- css::uno::Any aValue = xPropSet->getPropertyValue("LayoutManager");
+ css::uno::Any aValue = xPropSet->getPropertyValue(u"LayoutManager"_ustr);
aValue >>= xLayoutManager;
if ( xLayoutManager.is() )
xLayoutManager->setVisible( !bHide );
diff --git a/sfx2/source/control/listview.cxx b/sfx2/source/control/listview.cxx
index b0bb29c509bf..4a41eb6a060f 100644
--- a/sfx2/source/control/listview.cxx
+++ b/sfx2/source/control/listview.cxx
@@ -84,7 +84,7 @@ void ListView::AppendItem(const OUString& rId, const OUString& rTitle, const OUS
pItem->maDisplaySize = getDisplayFileSize(rPath);
pItem->maDisplayPath = aUrl.getFSysPath(FSysStyle::Detect);
- OUString sImage("");
+ OUString sImage(u""_ustr);
if (pItem->mbDefault)
sImage = BMP_DEFAULT;
@@ -128,7 +128,7 @@ void ListView::ReloadRows()
mxTreeView->clear();
for (const auto& pItem : mListViewItems)
{
- OUString sImage("");
+ OUString sImage(u""_ustr);
if (pItem->mbDefault)
sImage = BMP_DEFAULT;
AppendRow(sImage, pItem->maTitle, pItem->maSubtitle, pItem->maApplication,
@@ -150,7 +150,7 @@ bool ListView::UpdateRows()
int nIndex = 0;
for (const auto& pItem : mListViewItems)
{
- OUString sImage("");
+ OUString sImage(u""_ustr);
if (pItem->mbDefault)
sImage = BMP_DEFAULT;
UpdateRow(nIndex, sImage, pItem->maTitle, pItem->maSubtitle, pItem->maApplication,
@@ -260,7 +260,7 @@ void ListView::refreshDefaultColumn()
if (pItem->mbDefault != bDefault)
{
pItem->mbDefault = bDefault;
- OUString sImage("");
+ OUString sImage(u""_ustr);
if (bDefault)
sImage = BMP_DEFAULT;
mxTreeView->set_image(mxTreeView->find_id(pItem->maId), sImage, COLUMN_IMG_ISDEFAULT);
diff --git a/sfx2/source/control/recentdocsviewitem.cxx b/sfx2/source/control/recentdocsviewitem.cxx
index 2c6a87c7b125..b1fcdccb69dd 100644
--- a/sfx2/source/control/recentdocsviewitem.cxx
+++ b/sfx2/source/control/recentdocsviewitem.cxx
@@ -56,7 +56,7 @@ bool IsDocEncrypted(const OUString& rURL)
{
try
{
- xStorageProps->getPropertyValue("HasEncryptedEntries") >>= bIsEncrypted;
+ xStorageProps->getPropertyValue(u"HasEncryptedEntries"_ustr) >>= bIsEncrypted;
}
catch (uno::Exception&)
{
@@ -367,16 +367,16 @@ void RecentDocsViewItem::OpenDocument()
Reference<util::XURLTransformer> xTrans(util::URLTransformer::create(::comphelper::getProcessComponentContext()));
xTrans->parseStrict(aTargetURL);
- aArgsList = { comphelper::makePropertyValue("Referer", OUString("private:user")),
+ aArgsList = { comphelper::makePropertyValue(u"Referer"_ustr, u"private:user"_ustr),
// documents will never be opened as templates
- comphelper::makePropertyValue("AsTemplate", false) };
+ comphelper::makePropertyValue(u"AsTemplate"_ustr, false) };
if (m_isReadOnly) // tdf#149170 only add if true
{
aArgsList.realloc(aArgsList.size()+1);
- aArgsList.getArray()[aArgsList.size()-1] = comphelper::makePropertyValue("ReadOnly", true);
+ aArgsList.getArray()[aArgsList.size()-1] = comphelper::makePropertyValue(u"ReadOnly"_ustr, true);
}
- xDispatch = xDesktop->queryDispatch(aTargetURL, "_default", 0);
+ xDispatch = xDesktop->queryDispatch(aTargetURL, u"_default"_ustr, 0);
if (!xDispatch.is())
return;
diff --git a/sfx2/source/control/request.cxx b/sfx2/source/control/request.cxx
index edb17a3f8bb3..58dabbbaa536 100644
--- a/sfx2/source/control/request.cxx
+++ b/sfx2/source/control/request.cxx
@@ -690,7 +690,7 @@ css::uno::Reference< css::frame::XDispatchRecorder > SfxRequest::GetMacroRecorde
if(xSet.is())
{
- css::uno::Any aProp = xSet->getPropertyValue("DispatchRecorderSupplier");
+ css::uno::Any aProp = xSet->getPropertyValue(u"DispatchRecorderSupplier"_ustr);
css::uno::Reference< css::frame::XDispatchRecorderSupplier > xSupplier;
aProp >>= xSupplier;
if(xSupplier.is())
diff --git a/sfx2/source/control/statcach.cxx b/sfx2/source/control/statcach.cxx
index daf1f37a56c3..037a38253a31 100644
--- a/sfx2/source/control/statcach.cxx
+++ b/sfx2/source/control/statcach.cxx
@@ -254,7 +254,7 @@ const SfxSlotServer* SfxStateCache::GetSlotServer( SfxDispatcher &rDispat , cons
// create the dispatch URL from the slot data
css::util::URL aURL;
- OUString aCmd = ".uno:";
+ OUString aCmd = u".uno:"_ustr;
aURL.Protocol = aCmd;
aURL.Path = pSlot->GetUnoName();
aCmd += aURL.Path;
diff --git a/sfx2/source/control/templatedefaultview.cxx b/sfx2/source/control/templatedefaultview.cxx
index eef46f1817fd..ad7a935e72a0 100644
--- a/sfx2/source/control/templatedefaultview.cxx
+++ b/sfx2/source/control/templatedefaultview.cxx
@@ -74,8 +74,8 @@ bool TemplateDefaultView::MouseButtonDown( const MouseEvent& rMEvt )
void TemplateDefaultView::createContextMenu()
{
mxContextMenu->clear();
- mxContextMenu->append("open",SfxResId(STR_OPEN));
- mxContextMenu->append("edit",SfxResId(STR_EDIT_TEMPLATE));
+ mxContextMenu->append(u"open"_ustr,SfxResId(STR_OPEN));
+ mxContextMenu->append(u"edit"_ustr,SfxResId(STR_EDIT_TEMPLATE));
deselectItems();
maSelectedItem->setSelection(true);
maItemStateHdl.Call(maSelectedItem);
diff --git a/sfx2/source/control/templatedlglocalview.cxx b/sfx2/source/control/templatedlglocalview.cxx
index 52a12b4ef965..f6e18feca816 100644
--- a/sfx2/source/control/templatedlglocalview.cxx
+++ b/sfx2/source/control/templatedlglocalview.cxx
@@ -99,41 +99,41 @@ void TemplateDlgLocalView::createContextMenu(const bool bIsDefault, const bool b
const bool bIsSingleSel, const OUString& rDefaultImg)
{
mxContextMenu->clear();
- mxContextMenu->append("open", SfxResId(STR_OPEN), BMP_MENU_OPEN);
- mxContextMenu->append("edit", SfxResId(STR_EDIT_TEMPLATE), BMP_MENU_EDIT);
+ mxContextMenu->append(u"open"_ustr, SfxResId(STR_OPEN), BMP_MENU_OPEN);
+ mxContextMenu->append(u"edit"_ustr, SfxResId(STR_EDIT_TEMPLATE), BMP_MENU_EDIT);
if (!bIsDefault)
- mxContextMenu->append("default", SfxResId(STR_DEFAULT_TEMPLATE), rDefaultImg);
+ mxContextMenu->append(u"default"_ustr, SfxResId(STR_DEFAULT_TEMPLATE), rDefaultImg);
else
- mxContextMenu->append("default", SfxResId(STR_RESET_DEFAULT), rDefaultImg);
+ mxContextMenu->append(u"default"_ustr, SfxResId(STR_RESET_DEFAULT), rDefaultImg);
- mxContextMenu->append_separator("separator1");
- mxContextMenu->append("rename", SfxResId(STR_SFX_RENAME), BMP_MENU_RENAME);
- mxContextMenu->append("delete", SfxResId(STR_DELETE_TEMPLATE), BMP_MENU_DELETE);
- mxContextMenu->append_separator("separator2");
- mxContextMenu->append("move", SfxResId(STR_MOVE), BMP_MENU_MOVE);
- mxContextMenu->append("export", SfxResId(STR_EXPORT), BMP_MENU_EXPORT);
+ mxContextMenu->append_separator(u"separator1"_ustr);
+ mxContextMenu->append(u"rename"_ustr, SfxResId(STR_SFX_RENAME), BMP_MENU_RENAME);
+ mxContextMenu->append(u"delete"_ustr, SfxResId(STR_DELETE_TEMPLATE), BMP_MENU_DELETE);
+ mxContextMenu->append_separator(u"separator2"_ustr);
+ mxContextMenu->append(u"move"_ustr, SfxResId(STR_MOVE), BMP_MENU_MOVE);
+ mxContextMenu->append(u"export"_ustr, SfxResId(STR_EXPORT), BMP_MENU_EXPORT);
// Set the help IDs of all context menu entries
- mxContextMenu->set_item_help_id("open", HID_TEMPLATEDLG_OPEN);
- mxContextMenu->set_item_help_id("edit", HID_TEMPLATEDLG_EDIT);
- mxContextMenu->set_item_help_id("default", HID_TEMPLATEDLG_DEFAULT);
- mxContextMenu->set_item_help_id("rename", HID_TEMPLATEDLG_RENAME);
- mxContextMenu->set_item_help_id("delete", HID_TEMPLATEDLG_DELETE);
- mxContextMenu->set_item_help_id("move", HID_TEMPLATEDLG_MOVE);
- mxContextMenu->set_item_help_id("export", HID_TEMPLATEDLG_EXPORT);
+ mxContextMenu->set_item_help_id(u"open"_ustr, HID_TEMPLATEDLG_OPEN);
+ mxContextMenu->set_item_help_id(u"edit"_ustr, HID_TEMPLATEDLG_EDIT);
+ mxContextMenu->set_item_help_id(u"default"_ustr, HID_TEMPLATEDLG_DEFAULT);
+ mxContextMenu->set_item_help_id(u"rename"_ustr, HID_TEMPLATEDLG_RENAME);
+ mxContextMenu->set_item_help_id(u"delete"_ustr, HID_TEMPLATEDLG_DELETE);
+ mxContextMenu->set_item_help_id(u"move"_ustr, HID_TEMPLATEDLG_MOVE);
+ mxContextMenu->set_item_help_id(u"export"_ustr, HID_TEMPLATEDLG_EXPORT);
if (!bIsSingleSel)
{
- mxContextMenu->set_sensitive("open", false);
- mxContextMenu->set_sensitive("edit", false);
- mxContextMenu->set_sensitive("default", false);
- mxContextMenu->set_sensitive("rename", false);
+ mxContextMenu->set_sensitive(u"open"_ustr, false);
+ mxContextMenu->set_sensitive(u"edit"_ustr, false);
+ mxContextMenu->set_sensitive(u"default"_ustr, false);
+ mxContextMenu->set_sensitive(u"rename"_ustr, false);
}
if (bIsBuiltIn)
{
- mxContextMenu->set_sensitive("rename", false);
- mxContextMenu->set_sensitive("delete", false);
+ mxContextMenu->set_sensitive(u"rename"_ustr, false);
+ mxContextMenu->set_sensitive(u"delete"_ustr, false);
}
if (mViewMode == TemplateViewMode::eThumbnailView)
{
diff --git a/sfx2/source/control/templatelocalview.cxx b/sfx2/source/control/templatelocalview.cxx
index 11a870e39d2f..ca165c99e9c6 100644
--- a/sfx2/source/control/templatelocalview.cxx
+++ b/sfx2/source/control/templatelocalview.cxx
@@ -901,7 +901,7 @@ bool TemplateLocalView::IsInternalTemplate(const OUString& rPath)
uno::Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
css::uno::Reference< css::util::XPathSettings > xPathSettings = css::util::thePathSettings::get(xContext);
uno::Sequence<OUString> aInternalTemplateDirs;
- uno::Any aAny = xPathSettings->getPropertyValue("Template_internal");
+ uno::Any aAny = xPathSettings->getPropertyValue(u"Template_internal"_ustr);
aAny >>= aInternalTemplateDirs;
SfxURLRelocator_Impl aRelocator(xContext);
for (OUString& rInternalTemplateDir : asNonConstRange(aInternalTemplateDirs))
diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx
index f1c01188de69..a54fb990e91a 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -82,12 +82,12 @@ BitmapEx ThumbnailView::readThumbnail(const OUString &msURL)
{
uno::Reference<embed::XStorage> xStorage (
xDocStorage->openStorageElement(
- "Thumbnails",
+ u"Thumbnails"_ustr,
embed::ElementModes::READ));
if (xStorage.is())
{
uno::Reference<io::XStream> xThumbnailCopy (
- xStorage->cloneStreamElement("thumbnail.png"));
+ xStorage->cloneStreamElement(u"thumbnail.png"_ustr));
if (xThumbnailCopy.is())
xIStream = xThumbnailCopy->getInputStream();
}
@@ -108,12 +108,12 @@ BitmapEx ThumbnailView::readThumbnail(const OUString &msURL)
if ( ! xIStream.is())
{
uno::Reference<embed::XStorage> xStorage (
- xDocStorage->openStorageElement( "Thumbnail",
+ xDocStorage->openStorageElement( u"Thumbnail"_ustr,
embed::ElementModes::READ));
if (xStorage.is())
{
uno::Reference<io::XStream> xThumbnailCopy (
- xStorage->cloneStreamElement("thumbnail.png"));
+ xStorage->cloneStreamElement(u"thumbnail.png"_ustr));
if (xThumbnailCopy.is())
xIStream = xThumbnailCopy->getInputStream();
}
diff --git a/sfx2/source/control/thumbnailviewacc.cxx b/sfx2/source/control/thumbnailviewacc.cxx
index 0a0f843a52d2..0e9f68b38cad 100644
--- a/sfx2/source/control/thumbnailviewacc.cxx
+++ b/sfx2/source/control/thumbnailviewacc.cxx
@@ -129,7 +129,7 @@ sal_Int16 SAL_CALL ThumbnailViewAcc::getAccessibleRole()
OUString SAL_CALL ThumbnailViewAcc::getAccessibleDescription()
{
ThrowIfDisposed();
- return "ThumbnailView";
+ return u"ThumbnailView"_ustr;
}
OUString SAL_CALL ThumbnailViewAcc::getAccessibleName()
@@ -173,7 +173,7 @@ lang::Locale SAL_CALL ThumbnailViewAcc::getLocale()
ThrowIfDisposed();
const SolarMutexGuard aSolarGuard;
uno::Reference< accessibility::XAccessible > xParent( getAccessibleParent() );
- lang::Locale aRet( "", "", "" );
+ lang::Locale aRet( u""_ustr, u""_ustr, u""_ustr );
if( xParent.is() )
{
@@ -483,7 +483,7 @@ void ThumbnailViewAcc::ThrowIfDisposed()
{
SAL_WARN("sfx", "Calling disposed object. Throwing exception:");
throw lang::DisposedException (
- "object has been already disposed",
+ u"object has been already disposed"_ustr,
getXWeak());
}
else
@@ -684,7 +684,7 @@ lang::Locale SAL_CALL ThumbnailViewItemAcc::getLocale()
{
const SolarMutexGuard aSolarGuard;
uno::Reference< accessibility::XAccessible > xParent( getAccessibleParent() );
- lang::Locale aRet( "", "", "" );
+ lang::Locale aRet( u""_ustr, u""_ustr, u""_ustr );
if( xParent.is() )
{
diff --git a/sfx2/source/control/thumbnailviewitem.cxx b/sfx2/source/control/thumbnailviewitem.cxx
index 4aa7d13f1107..609e35dd1c59 100644
--- a/sfx2/source/control/thumbnailviewitem.cxx
+++ b/sfx2/source/control/thumbnailviewitem.cxx
@@ -246,7 +246,7 @@ void ThumbnailViewItem::addTextPrimitives (const OUString& rText, const Thumbnai
if (bTooLong && (nLineLength + nLineStart) < aOrigText.getLength())
{
// Add the '...' to the last line to show, even though it may require to shorten the line
- double nDotsWidth = aTextDev.getTextWidth("...",0,3);
+ double nDotsWidth = aTextDev.getTextWidth(u"..."_ustr,0,3);
sal_Int32 nLength = nLineLength - 1;
while ( nDotsWidth + aTextDev.getTextWidth(aText, nLineStart, nLength) > maDrawArea.getOpenWidth() && nLength > 0)
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 6fb25977796e..be86988ce9fd 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -233,7 +233,7 @@ void SAL_CALL SfxOfficeDispatch::dispatch( const css::util::URL& aURL, const css
std::unique_ptr< css::uno::ContextLayer > layer(EnsureJavaContext());
#endif
utl::MediaDescriptor aDescriptor(aArgs);
- bool bOnMainThread = aDescriptor.getUnpackedValueOrDefault("OnMainThread", false);
+ bool bOnMainThread = aDescriptor.getUnpackedValueOrDefault(u"OnMainThread"_ustr, false);
if (bOnMainThread)
{
// Make sure that we own the solar mutex, otherwise later