summaryrefslogtreecommitdiff
path: root/sfx2/source
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source')
-rw-r--r--sfx2/source/appl/newhelp.cxx2
-rw-r--r--sfx2/source/appl/newhelp.hxx2
-rw-r--r--sfx2/source/bastyp/fltfnc.cxx2
-rw-r--r--sfx2/source/control/templatedlglocalview.cxx2
-rw-r--r--sfx2/source/control/templatelocalview.cxx8
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx4
-rw-r--r--sfx2/source/dialog/filedlgimpl.hxx4
-rw-r--r--sfx2/source/dialog/infobar.cxx4
-rw-r--r--sfx2/source/dialog/templdlg.cxx2
-rw-r--r--sfx2/source/doc/autoredactdialog.cxx4
-rw-r--r--sfx2/source/doc/docfac.cxx2
-rw-r--r--sfx2/source/doc/doctempl.cxx8
-rw-r--r--sfx2/source/doc/doctemplates.cxx8
-rw-r--r--sfx2/source/doc/objcont.cxx4
-rw-r--r--sfx2/source/doc/objmisc.cxx4
-rw-r--r--sfx2/source/doc/objserv.cxx10
-rw-r--r--sfx2/source/doc/templatedlg.cxx2
-rw-r--r--sfx2/source/sidebar/Deck.cxx2
-rw-r--r--sfx2/source/sidebar/Panel.cxx2
-rw-r--r--sfx2/source/sidebar/ResourceManager.cxx14
-rw-r--r--sfx2/source/sidebar/Sidebar.cxx8
-rw-r--r--sfx2/source/sidebar/SidebarController.cxx20
-rw-r--r--sfx2/source/sidebar/SidebarDockingWindow.cxx2
-rw-r--r--sfx2/source/sidebar/TabBar.cxx2
-rw-r--r--sfx2/source/styles/StyleManager.cxx2
-rw-r--r--sfx2/source/view/classificationhelper.cxx8
-rw-r--r--sfx2/source/view/viewfrm.cxx10
27 files changed, 71 insertions, 71 deletions
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 10e53fa6c435..ecca2f806228 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -1505,7 +1505,7 @@ void SfxHelpIndexWindow_Impl::AddBookmarks( const OUString& rTitle, const OUStri
GetBookmarksPage()->AddBookmarks( rTitle, rURL );
}
-bool SfxHelpIndexWindow_Impl::IsValidFactory( const OUString& _rFactory )
+bool SfxHelpIndexWindow_Impl::IsValidFactory( std::u16string_view _rFactory )
{
bool bValid = false;
for (sal_Int32 i = 0, nEntryCount = m_xActiveLB->get_count(); i < nEntryCount; ++i)
diff --git a/sfx2/source/appl/newhelp.hxx b/sfx2/source/appl/newhelp.hxx
index 25be4e6e3e12..d12f38e29ccf 100644
--- a/sfx2/source/appl/newhelp.hxx
+++ b/sfx2/source/appl/newhelp.hxx
@@ -267,7 +267,7 @@ public:
OUString const & GetFactory() const { return xIPage->GetFactory(); }
OUString GetSelectedEntry() const;
void AddBookmarks( const OUString& rTitle, const OUString& rURL );
- bool IsValidFactory( const OUString& _rFactory );
+ bool IsValidFactory( std::u16string_view _rFactory );
OUString GetActiveFactoryTitle() const { return m_xActiveLB->get_active_text(); }
void ClearSearchPage();
void GrabFocusBack();
diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx
index f1d3ac399f27..39a4d8ff48a6 100644
--- a/sfx2/source/bastyp/fltfnc.cxx
+++ b/sfx2/source/bastyp/fltfnc.cxx
@@ -712,7 +712,7 @@ std::shared_ptr<const SfxFilter> SfxFilterMatcher::GetFilter4ClipBoardId( SotCli
return GetFilterForProps( aSeq, nMust, nDont );
}
-std::shared_ptr<const SfxFilter> SfxFilterMatcher::GetFilter4UIName( const OUString& rName, SfxFilterFlags nMust, SfxFilterFlags nDont ) const
+std::shared_ptr<const SfxFilter> SfxFilterMatcher::GetFilter4UIName( std::u16string_view rName, SfxFilterFlags nMust, SfxFilterFlags nDont ) const
{
m_rImpl.InitForIterating();
std::shared_ptr<const SfxFilter> pFirstFilter;
diff --git a/sfx2/source/control/templatedlglocalview.cxx b/sfx2/source/control/templatedlglocalview.cxx
index 84aa6cdca363..1a50f09e2816 100644
--- a/sfx2/source/control/templatedlglocalview.cxx
+++ b/sfx2/source/control/templatedlglocalview.cxx
@@ -52,7 +52,7 @@ void TemplateDlgLocalView::showRegion(TemplateContainerItem const* pItem)
maOpenRegionHdl.Call(nullptr);
}
-void TemplateDlgLocalView::showRegion(const OUString& rName)
+void TemplateDlgLocalView::showRegion(std::u16string_view rName)
{
for (auto const& pRegion : maRegions)
{
diff --git a/sfx2/source/control/templatelocalview.cxx b/sfx2/source/control/templatelocalview.cxx
index 4063e3453aaf..67481d7600e9 100644
--- a/sfx2/source/control/templatelocalview.cxx
+++ b/sfx2/source/control/templatelocalview.cxx
@@ -178,7 +178,7 @@ void TemplateLocalView::showRegion(TemplateContainerItem const *pItem)
maOpenRegionHdl.Call(nullptr);
}
-void TemplateLocalView::showRegion(const OUString &rName)
+void TemplateLocalView::showRegion(std::u16string_view rName)
{
for (auto const & pRegion : maRegions)
{
@@ -190,7 +190,7 @@ void TemplateLocalView::showRegion(const OUString &rName)
}
}
-TemplateContainerItem* TemplateLocalView::getRegion(OUString const & rName)
+TemplateContainerItem* TemplateLocalView::getRegion(std::u16string_view rName)
{
for (auto const & pRegion : maRegions)
if (pRegion->maTitle == rName)
@@ -263,7 +263,7 @@ sal_uInt16 TemplateLocalView::getRegionId(size_t pos) const
return maRegions[pos]->mnId;
}
-sal_uInt16 TemplateLocalView::getRegionId(OUString const & sRegion) const
+sal_uInt16 TemplateLocalView::getRegionId(std::u16string_view sRegion) const
{
for (auto const & pRegion : maRegions)
{
@@ -349,7 +349,7 @@ sal_uInt16 TemplateLocalView::createRegion(const OUString &rName)
return nItemId;
}
-bool TemplateLocalView::renameRegion(const OUString &rTitle, const OUString &rNewTitle)
+bool TemplateLocalView::renameRegion(std::u16string_view rTitle, const OUString &rNewTitle)
{
TemplateContainerItem *pRegion = getRegion(rTitle);
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index bfc4c893b739..7c86ca18b98d 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -2218,7 +2218,7 @@ void FileDialogHelper_Impl::addFilterPair( const OUString& rFilter,
}
-OUString FileDialogHelper_Impl::getFilterName( const OUString& rFilterWithExtension ) const
+OUString FileDialogHelper_Impl::getFilterName( std::u16string_view rFilterWithExtension ) const
{
OUString sRet;
for (auto const& filter : maFilters)
@@ -2232,7 +2232,7 @@ OUString FileDialogHelper_Impl::getFilterName( const OUString& rFilterWithExtens
return sRet;
}
-OUString FileDialogHelper_Impl::getFilterWithExtension( const OUString& rFilter ) const
+OUString FileDialogHelper_Impl::getFilterWithExtension( std::u16string_view rFilter ) const
{
OUString sRet;
for (auto const& filter : maFilters)
diff --git a/sfx2/source/dialog/filedlgimpl.hxx b/sfx2/source/dialog/filedlgimpl.hxx
index c755bcc9f26f..e5e02e209748 100644
--- a/sfx2/source/dialog/filedlgimpl.hxx
+++ b/sfx2/source/dialog/filedlgimpl.hxx
@@ -200,8 +200,8 @@ namespace sfx2
bool isShowFilterExtensionEnabled() const;
void addFilterPair( const OUString& rFilter,
const OUString& rFilterWithExtension );
- OUString getFilterName( const OUString& rFilterWithExtension ) const;
- OUString getFilterWithExtension( const OUString& rFilter ) const;
+ OUString getFilterName( std::u16string_view rFilterWithExtension ) const;
+ OUString getFilterWithExtension( std::u16string_view rFilter ) const;
void SetContext( FileDialogHelper::Context _eNewContext );
diff --git a/sfx2/source/dialog/infobar.cxx b/sfx2/source/dialog/infobar.cxx
index e8b176763c56..d46eb8f01440 100644
--- a/sfx2/source/dialog/infobar.cxx
+++ b/sfx2/source/dialog/infobar.cxx
@@ -399,7 +399,7 @@ VclPtr<SfxInfoBarWindow> SfxInfoBarContainerWindow::appendInfoBar(const OUString
return pInfoBar;
}
-VclPtr<SfxInfoBarWindow> SfxInfoBarContainerWindow::getInfoBar(const OUString& sId)
+VclPtr<SfxInfoBarWindow> SfxInfoBarContainerWindow::getInfoBar(std::u16string_view sId)
{
for (auto const& infoBar : m_pInfoBars)
{
@@ -409,7 +409,7 @@ VclPtr<SfxInfoBarWindow> SfxInfoBarContainerWindow::getInfoBar(const OUString& s
return nullptr;
}
-bool SfxInfoBarContainerWindow::hasInfoBarWithID(const OUString& sId)
+bool SfxInfoBarContainerWindow::hasInfoBarWithID(std::u16string_view sId)
{
return (getInfoBar(sId) != nullptr);
}
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index d9577bc852e3..182c20296d9e 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -475,7 +475,7 @@ static void MakeTree_Impl(StyleTreeArr_Impl& rArr, const OUString& aUIName)
}
static bool IsExpanded_Impl( const std::vector<OUString>& rEntries,
- const OUString &rStr)
+ std::u16string_view rStr)
{
for (const auto & rEntry : rEntries)
{
diff --git a/sfx2/source/doc/autoredactdialog.cxx b/sfx2/source/doc/autoredactdialog.cxx
index 2fea27f6975b..1466077e1dbd 100644
--- a/sfx2/source/doc/autoredactdialog.cxx
+++ b/sfx2/source/doc/autoredactdialog.cxx
@@ -25,7 +25,7 @@
#define FILEDIALOG_FILTER_JSON "*.json"
-int TargetsTable::GetRowByTargetName(const OUString& sName)
+int TargetsTable::GetRowByTargetName(std::u16string_view sName)
{
for (int i = 0, nCount = m_xControl->n_children(); i < nCount; ++i)
{
@@ -137,7 +137,7 @@ void TargetsTable::InsertTarget(RedactionTarget* pTarget)
nRow, pTarget->bWholeWords ? SfxResId(STR_REDACTION_YES) : SfxResId(STR_REDACTION_NO), 4);
}
-RedactionTarget* TargetsTable::GetTargetByName(const OUString& sName)
+RedactionTarget* TargetsTable::GetTargetByName(std::u16string_view sName)
{
int nEntry = GetRowByTargetName(sName);
if (nEntry == -1)
diff --git a/sfx2/source/doc/docfac.cxx b/sfx2/source/doc/docfac.cxx
index 55dfdf46b850..27d5134075ed 100644
--- a/sfx2/source/doc/docfac.cxx
+++ b/sfx2/source/doc/docfac.cxx
@@ -334,7 +334,7 @@ sal_uInt16 SfxObjectFactory::GetViewNo_Impl( const SfxInterfaceId i_nViewId, con
return i_nFallback;
}
-SfxViewFactory* SfxObjectFactory::GetViewFactoryByViewName( const OUString& i_rViewName ) const
+SfxViewFactory* SfxObjectFactory::GetViewFactoryByViewName( std::u16string_view i_rViewName ) const
{
for ( sal_uInt16 nViewNo = 0;
nViewNo < GetViewFactoryCount();
diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx
index 726122c9f1cb..b57c11d98847 100644
--- a/sfx2/source/doc/doctempl.cxx
+++ b/sfx2/source/doc/doctempl.cxx
@@ -206,7 +206,7 @@ public:
size_t GetRegionCount() const
{ return maRegions.size(); }
- RegionData_Impl* GetRegion( const OUString& rName ) const;
+ RegionData_Impl* GetRegion( std::u16string_view rName ) const;
RegionData_Impl* GetRegion( size_t nIndex ) const;
bool GetTitleFromURL( const OUString& rURL, OUString& aTitle );
@@ -1089,7 +1089,7 @@ bool SfxDocumentTemplates::SetName( const OUString& rName, sal_uInt16 nRegion, s
bool SfxDocumentTemplates::GetFull
(
- const OUString &rRegion, // Region Name
+ std::u16string_view rRegion, // Region Name
const OUString &rName, // Template Name
OUString &rPath // Out: Path + File name
)
@@ -1126,7 +1126,7 @@ bool SfxDocumentTemplates::GetFull
RegionData_Impl *pRegion = pImp->GetRegion( i );
if( pRegion &&
- ( rRegion.isEmpty() || ( rRegion == pRegion->GetTitle() ) ) )
+ ( rRegion.empty() || ( rRegion == pRegion->GetTitle() ) ) )
{
pEntry = pRegion->GetEntry( rName );
@@ -1450,7 +1450,7 @@ RegionData_Impl* SfxDocTemplate_Impl::GetRegion( size_t nIndex ) const
}
-RegionData_Impl* SfxDocTemplate_Impl::GetRegion( const OUString& rName )
+RegionData_Impl* SfxDocTemplate_Impl::GetRegion( std::u16string_view rName )
const
{
for (auto& pData : maRegions)
diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index 1d17dc828f84..7c06fc7ac34c 100644
--- a/sfx2/source/doc/doctemplates.cxx
+++ b/sfx2/source/doc/doctemplates.cxx
@@ -226,10 +226,10 @@ class SfxDocTplService_Impl
const OUString& aNewFolderName );
bool ReplaceUINamesForTemplateDir_Impl( const OUString& aUserPath,
const OUString& aFsysGroupName,
- const OUString& aOldGroupName,
+ std::u16string_view aOldGroupName,
const OUString& aNewGroupName );
void RemoveUINamesForTemplateDir_Impl( const OUString& aUserPath,
- const OUString& aGroupName );
+ std::u16string_view aGroupName );
bool WriteUINamesForTemplateDir_Impl( const OUString& aUserPath,
const std::vector< beans::StringPair >& aUINames );
@@ -1242,7 +1242,7 @@ bool SfxDocTplService_Impl::UpdateUINamesForTemplateDir_Impl( const OUString& aU
bool SfxDocTplService_Impl::ReplaceUINamesForTemplateDir_Impl( const OUString& aUserPath,
const OUString& aDefaultFsysGroupName,
- const OUString& aOldGroupName,
+ std::u16string_view aOldGroupName,
const OUString& aNewGroupName )
{
std::vector< beans::StringPair > aUINames = ReadUINamesForTemplateDir_Impl( aUserPath );
@@ -1267,7 +1267,7 @@ bool SfxDocTplService_Impl::ReplaceUINamesForTemplateDir_Impl( const OUString& a
void SfxDocTplService_Impl::RemoveUINamesForTemplateDir_Impl( const OUString& aUserPath,
- const OUString& aGroupName )
+ std::u16string_view aGroupName )
{
std::vector< beans::StringPair > aUINames = ReadUINamesForTemplateDir_Impl( aUserPath );
sal_Int32 nLen = aUINames.size();
diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx
index 8d3faa98a8a0..04255063fd3f 100644
--- a/sfx2/source/doc/objcont.cxx
+++ b/sfx2/source/doc/objcont.cxx
@@ -476,7 +476,7 @@ void SfxObjectShell::UpdateFromTemplate_Impl( )
if( aFoundName.isEmpty() && !aTemplName.isEmpty() )
// if the template filename did not lead to success,
// try to get a file name for the logical template name
- aTempl.GetFull( OUString(), aTemplName, aFoundName );
+ aTempl.GetFull( u"", aTemplName, aFoundName );
}
if ( aFoundName.isEmpty() )
@@ -588,7 +588,7 @@ void SfxObjectShell::ResetFromTemplate( const OUString& rTemplateName, const OUS
return;
OUString aFoundName;
- if( SfxGetpApp()->Get_Impl()->GetDocumentTemplates()->GetFull( OUString(), rTemplateName, aFoundName ) )
+ if( SfxGetpApp()->Get_Impl()->GetDocumentTemplates()->GetFull( u"", rTemplateName, aFoundName ) )
{
INetURLObject aObj( rFileName );
xDocProps->setTemplateURL( aObj.GetMainURL(INetURLObject::DecodeMechanism::ToIUri) );
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index 10be78bfe98d..0733ccc72752 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -1309,8 +1309,8 @@ SfxModule* SfxObjectShell::GetModule() const
return GetFactory().GetModule();
}
-ErrCode SfxObjectShell::CallBasic( const OUString& rMacro,
- const OUString& rBasic, SbxArray* pArgs,
+ErrCode SfxObjectShell::CallBasic( std::u16string_view rMacro,
+ std::u16string_view rBasic, SbxArray* pArgs,
SbxValue* pRet )
{
SfxApplication* pApp = SfxGetpApp();
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 5a4354b92717..404b7422017c 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -328,7 +328,7 @@ void SfxObjectShell::CheckOut( )
// Remove the info bar
SfxViewFrame* pViewFrame = GetFrame();
- pViewFrame->RemoveInfoBar( "checkout" );
+ pViewFrame->RemoveInfoBar( u"checkout" );
}
catch ( const uno::RuntimeException& e )
{
@@ -1079,7 +1079,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
{
SfxViewFrame *pFrame = GetFrame();
if (pFrame)
- pFrame->RemoveInfoBar("readonly");
+ pFrame->RemoveInfoBar(u"readonly");
SetReadOnlyUI(false);
}
}
@@ -1426,7 +1426,7 @@ void SfxObjectShell::GetState_Impl(SfxItemSet &rSet)
}
// new info bar
- if ( !pFrame->HasInfoBarWithID("signature") )
+ if ( !pFrame->HasInfoBarWithID(u"signature") )
{
if ( !sMessage.isEmpty() )
{
@@ -1441,9 +1441,9 @@ void SfxObjectShell::GetState_Impl(SfxItemSet &rSet)
else // info bar exists already
{
if ( eState == SignatureState::NOSIGNATURES )
- pFrame->RemoveInfoBar("signature");
+ pFrame->RemoveInfoBar(u"signature");
else
- pFrame->UpdateInfoBar("signature", "", sMessage, aInfobarType);
+ pFrame->UpdateInfoBar(u"signature", "", sMessage, aInfobarType);
}
}
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 29751ac97d87..dcacebb95446 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -950,7 +950,7 @@ void SfxTemplateManagerDlg::OnTemplateState (const ThumbnailViewItem *pItem)
}
}
-void SfxTemplateManagerDlg::OnTemplateImportCategory(const OUString& sCategory)
+void SfxTemplateManagerDlg::OnTemplateImportCategory(std::u16string_view sCategory)
{
sfx2::FileDialogHelper aFileDlg(css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
FileDialogFlags::MultiSelection, m_xDialog.get());
diff --git a/sfx2/source/sidebar/Deck.cxx b/sfx2/source/sidebar/Deck.cxx
index 1cc11cafc37e..c1d5974179a4 100644
--- a/sfx2/source/sidebar/Deck.cxx
+++ b/sfx2/source/sidebar/Deck.cxx
@@ -323,7 +323,7 @@ vcl::Window* Deck::GetPanelParentWindow()
return mpScrollContainer.get();
}
-Panel* Deck::GetPanel(const OUString & panelId)
+Panel* Deck::GetPanel(std::u16string_view panelId)
{
for (const VclPtr<Panel> & pPanel : maPanels)
{
diff --git a/sfx2/source/sidebar/Panel.cxx b/sfx2/source/sidebar/Panel.cxx
index c45a1e5efd42..793ee94ab85b 100644
--- a/sfx2/source/sidebar/Panel.cxx
+++ b/sfx2/source/sidebar/Panel.cxx
@@ -146,7 +146,7 @@ void Panel::SetExpanded (const bool bIsExpanded)
}
}
-bool Panel::HasIdPredicate (const OUString& rsId) const
+bool Panel::HasIdPredicate (std::u16string_view rsId) const
{
return msPanelId == rsId;
}
diff --git a/sfx2/source/sidebar/ResourceManager.cxx b/sfx2/source/sidebar/ResourceManager.cxx
index a1ff9752e1e0..b64b64e2c9ea 100644
--- a/sfx2/source/sidebar/ResourceManager.cxx
+++ b/sfx2/source/sidebar/ResourceManager.cxx
@@ -127,7 +127,7 @@ void ResourceManager::InitDeckContext(const Context& rContext)
}
}
-std::shared_ptr<DeckDescriptor> ResourceManager::ImplGetDeckDescriptor(const OUString& rsDeckId) const
+std::shared_ptr<DeckDescriptor> ResourceManager::ImplGetDeckDescriptor(std::u16string_view rsDeckId) const
{
for (auto const& deck : maDecks)
{
@@ -139,12 +139,12 @@ std::shared_ptr<DeckDescriptor> ResourceManager::ImplGetDeckDescriptor(const OUS
return nullptr;
}
-std::shared_ptr<DeckDescriptor> ResourceManager::GetDeckDescriptor(const OUString& rsDeckId) const
+std::shared_ptr<DeckDescriptor> ResourceManager::GetDeckDescriptor(std::u16string_view rsDeckId) const
{
return ImplGetDeckDescriptor( rsDeckId );
}
-std::shared_ptr<PanelDescriptor> ResourceManager::ImplGetPanelDescriptor(const OUString& rsPanelId) const
+std::shared_ptr<PanelDescriptor> ResourceManager::ImplGetPanelDescriptor(std::u16string_view rsPanelId) const
{
for (auto const& panel : maPanels)
{
@@ -154,7 +154,7 @@ std::shared_ptr<PanelDescriptor> ResourceManager::ImplGetPanelDescriptor(const O
return nullptr;
}
-std::shared_ptr<PanelDescriptor> ResourceManager::GetPanelDescriptor(const OUString& rsPanelId) const
+std::shared_ptr<PanelDescriptor> ResourceManager::GetPanelDescriptor(std::u16string_view rsPanelId) const
{
return ImplGetPanelDescriptor( rsPanelId );
}
@@ -198,7 +198,7 @@ const ResourceManager::DeckContextDescriptorContainer& ResourceManager::GetMatch
const ResourceManager::PanelContextDescriptorContainer& ResourceManager::GetMatchingPanels (
PanelContextDescriptorContainer& rPanelIds,
const Context& rContext,
- const OUString& sDeckId,
+ std::u16string_view sDeckId,
const Reference<frame::XController>& rxController)
{
ReadLegacyAddons(rxController);
@@ -697,7 +697,7 @@ void ResourceManager::ReadLegacyAddons (const Reference<frame::XController>& rxC
}
void ResourceManager::StorePanelExpansionState (
- const OUString& rsPanelId,
+ std::u16string_view rsPanelId,
const bool bExpansionState,
const Context& rContext)
{
@@ -746,7 +746,7 @@ void ResourceManager::GetToolPanelNodeNames (
}
bool ResourceManager::IsDeckEnabled (
- const OUString& rsDeckId,
+ std::u16string_view rsDeckId,
const Context& rContext,
const Reference<frame::XController>& rxController)
{
diff --git a/sfx2/source/sidebar/Sidebar.cxx b/sfx2/source/sidebar/Sidebar.cxx
index ccd2fbc589d2..2a59ad7ef163 100644
--- a/sfx2/source/sidebar/Sidebar.cxx
+++ b/sfx2/source/sidebar/Sidebar.cxx
@@ -31,7 +31,7 @@ using namespace css;
namespace sfx2::sidebar {
-void Sidebar::ToggleDeck(const OUString& rsDeckId, SfxViewFrame* pViewFrame)
+void Sidebar::ToggleDeck(std::u16string_view rsDeckId, SfxViewFrame* pViewFrame)
{
if (!pViewFrame)
return;
@@ -61,7 +61,7 @@ void Sidebar::ToggleDeck(const OUString& rsDeckId, SfxViewFrame* pViewFrame)
}
void Sidebar::ShowPanel (
- const OUString& rsPanelId,
+ std::u16string_view rsPanelId,
const css::uno::Reference<frame::XFrame>& rxFrame, bool bFocus)
{
SidebarController* pController = SidebarController::GetSidebarControllerForFrame(rxFrame);
@@ -86,7 +86,7 @@ void Sidebar::ShowPanel (
}
void Sidebar::TogglePanel (
- const OUString& rsPanelId,
+ std::u16string_view rsPanelId,
const css::uno::Reference<frame::XFrame>& rxFrame)
{
SidebarController* pController = SidebarController::GetSidebarControllerForFrame(rxFrame);
@@ -108,7 +108,7 @@ void Sidebar::TogglePanel (
}
bool Sidebar::IsPanelVisible(
- const OUString& rsPanelId,
+ std::u16string_view rsPanelId,
const css::uno::Reference<frame::XFrame>& rxFrame)
{
SidebarController* pController = SidebarController::GetSidebarControllerForFrame(rxFrame);
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index f359e768665e..5367292a8615 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -114,7 +114,7 @@ namespace {
/** When in doubt, show this deck.
*/
- const char gsDefaultDeckId[] = "PropertyDeck";
+ constexpr OUStringLiteral gsDefaultDeckId(u"PropertyDeck");
}
SidebarController::SidebarController (
@@ -639,7 +639,7 @@ void SidebarController::OpenThenToggleDeck (
}
void SidebarController::OpenThenSwitchToDeck (
- const OUString& rsDeckId)
+ std::u16string_view rsDeckId)
{
RequestOpenDeck();
SwitchToDeck(rsDeckId);
@@ -652,7 +652,7 @@ void SidebarController::SwitchToDefaultDeck()
}
void SidebarController::SwitchToDeck (
- const OUString& rsDeckId)
+ std::u16string_view rsDeckId)
{
if ( msCurrentDeckId != rsDeckId
|| ! mbIsDeckOpen
@@ -665,11 +665,11 @@ void SidebarController::SwitchToDeck (
}
}
-void SidebarController::CreateDeck(const OUString& rDeckId) {
+void SidebarController::CreateDeck(std::u16string_view rDeckId) {
CreateDeck(rDeckId, maCurrentContext);
}
-void SidebarController::CreateDeck(const OUString& rDeckId, const Context& rContext, bool bForceCreate)
+void SidebarController::CreateDeck(std::u16string_view rDeckId, const Context& rContext, bool bForceCreate)
{
std::shared_ptr<DeckDescriptor> xDeckDescriptor = mpResourceManager->GetDeckDescriptor(rDeckId);
@@ -691,7 +691,7 @@ void SidebarController::CreateDeck(const OUString& rDeckId, const Context& rCont
CreatePanels(rDeckId, rContext);
}
-void SidebarController::CreatePanels(const OUString& rDeckId, const Context& rContext)
+void SidebarController::CreatePanels(std::u16string_view rDeckId, const Context& rContext)
{
std::shared_ptr<DeckDescriptor> xDeckDescriptor = mpResourceManager->GetDeckDescriptor(rDeckId);
@@ -892,7 +892,7 @@ void SidebarController::SwitchToDeck (
UpdateTitleBarIcons();
}
-void SidebarController::notifyDeckTitle(const OUString& targetDeckId)
+void SidebarController::notifyDeckTitle(std::u16string_view targetDeckId)
{
if (msCurrentDeckId == targetDeckId)
{
@@ -903,7 +903,7 @@ void SidebarController::notifyDeckTitle(const OUString& targetDeckId)
}
VclPtr<Panel> SidebarController::CreatePanel (
- const OUString& rsPanelId,
+ std::u16string_view rsPanelId,
vcl::Window* pParentWindow,
const bool bIsInitiallyExpanded,
const Context& rContext,
@@ -1247,7 +1247,7 @@ bool SidebarController::IsDeckOpen(const sal_Int32 nIndex)
return mbIsDeckOpen && *mbIsDeckOpen;
}
-bool SidebarController::IsDeckVisible(const OUString& rsDeckId)
+bool SidebarController::IsDeckVisible(std::u16string_view rsDeckId)
{
return mbIsDeckOpen && *mbIsDeckOpen && msCurrentDeckId == rsDeckId;
}
@@ -1523,7 +1523,7 @@ ResourceManager::DeckContextDescriptorContainer SidebarController::GetMatchingDe
return aDecks;
}
-ResourceManager::PanelContextDescriptorContainer SidebarController::GetMatchingPanels(const OUString& rDeckId)
+ResourceManager::PanelContextDescriptorContainer SidebarController::GetMatchingPanels(std::u16string_view rDeckId)
{
ResourceManager::PanelContextDescriptorContainer aPanels;
diff --git a/sfx2/source/sidebar/SidebarDockingWindow.cxx b/sfx2/source/sidebar/SidebarDockingWindow.cxx
index c3bbe327fab7..3c187f117ba4 100644
--- a/sfx2/source/sidebar/SidebarDockingWindow.cxx
+++ b/sfx2/source/sidebar/SidebarDockingWindow.cxx
@@ -273,7 +273,7 @@ bool SidebarDockingWindow::EventNotify(NotifyEvent& rEvent)
if (".uno:DesignerDialog" == aCommand)
{
std::shared_ptr<PanelDescriptor> xPanelDescriptor =
- mpSidebarController->GetResourceManager()->GetPanelDescriptor( "StyleListPanel" );
+ mpSidebarController->GetResourceManager()->GetPanelDescriptor( u"StyleListPanel" );
if ( xPanelDescriptor && mpSidebarController->IsDeckVisible( xPanelDescriptor->msDeckId ) )
Close();
return true;
diff --git a/sfx2/source/sidebar/TabBar.cxx b/sfx2/source/sidebar/TabBar.cxx
index ee6b901c65de..6efe1133bda9 100644
--- a/sfx2/source/sidebar/TabBar.cxx
+++ b/sfx2/source/sidebar/TabBar.cxx
@@ -155,7 +155,7 @@ void TabBar::UpdateButtonIcons()
}
}
-void TabBar::HighlightDeck(const OUString& rsDeckId)
+void TabBar::HighlightDeck(std::u16string_view rsDeckId)
{
for (auto const& item : maItems)
item->mxButton->set_item_active("toggle", item->msDeckId == rsDeckId);
diff --git a/sfx2/source/styles/StyleManager.cxx b/sfx2/source/styles/StyleManager.cxx
index 95bdeac80122..4504be9db6ff 100644
--- a/sfx2/source/styles/StyleManager.cxx
+++ b/sfx2/source/styles/StyleManager.cxx
@@ -12,7 +12,7 @@
namespace sfx2
{
-SfxStyleSheetBase* StyleManager::Search(const OUString& rStyleName, SfxStyleFamily eFamily)
+SfxStyleSheetBase* StyleManager::Search(std::u16string_view rStyleName, SfxStyleFamily eFamily)
{
SfxStyleSheetBasePool* pPool = mrShell.GetStyleSheetPool();
if (!pPool)
diff --git a/sfx2/source/view/classificationhelper.cxx b/sfx2/source/view/classificationhelper.cxx
index 95126d996288..523fe75571bb 100644
--- a/sfx2/source/view/classificationhelper.cxx
+++ b/sfx2/source/view/classificationhelper.cxx
@@ -415,7 +415,7 @@ void SfxClassificationHelper::Impl::parsePolicy()
m_aIPPartNumbers = xClassificationParser->m_aIPPartNumbers;
}
-static bool lcl_containsProperty(const uno::Sequence<beans::Property>& rProperties, const OUString& rName)
+static bool lcl_containsProperty(const uno::Sequence<beans::Property>& rProperties, std::u16string_view rName)
{
return std::any_of(rProperties.begin(), rProperties.end(), [&](const beans::Property& rProperty)
{
@@ -622,9 +622,9 @@ const OUString& SfxClassificationHelper::GetAbbreviatedBACName(const OUString& s
return sFullName;
}
-OUString SfxClassificationHelper::GetBACNameForIdentifier(const OUString& sIdentifier)
+OUString SfxClassificationHelper::GetBACNameForIdentifier(std::u16string_view sIdentifier)
{
- if (sIdentifier.isEmpty())
+ if (sIdentifier.empty())
return "";
for (const auto& category : m_pImpl->m_aCategories)
@@ -884,7 +884,7 @@ void SfxClassificationHelper::UpdateInfobar(SfxViewFrame& rViewFrame)
OUString aMessage = SfxResId(STR_CLASSIFIED_DOCUMENT);
aMessage = aMessage.replaceFirst("%1", aBACName);
- rViewFrame.RemoveInfoBar("classification");
+ rViewFrame.RemoveInfoBar(u"classification");
rViewFrame.AppendInfoBar("classification", "", aMessage, GetImpactLevelType());
}
}
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 46a7c4d9dc42..8beeeab61f17 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -296,7 +296,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
{
m_pSh->SetReadOnlyUI(m_bSetRO);
if (!m_bSetRO)
- m_pFrame->RemoveInfoBar("readonly");
+ m_pFrame->RemoveInfoBar(u"readonly");
if (m_pMed)
{
// tdf#116066: DoSaveCompleted should be called after SetReadOnlyUI
@@ -3157,7 +3157,7 @@ void SfxViewFrame::ChildWindowExecute( SfxRequest &rReq )
// First make sure that the sidebar is visible
ShowChildWindow(SID_SIDEBAR);
- ::sfx2::sidebar::Sidebar::ShowPanel("StyleListPanel",
+ ::sfx2::sidebar::Sidebar::ShowPanel(u"StyleListPanel",
GetFrame().GetFrameInterface(), true);
rReq.Done();
return;
@@ -3330,7 +3330,7 @@ VclPtr<SfxInfoBarWindow> SfxViewFrame::AppendInfoBar(const OUString& sId,
return pInfoBar;
}
-void SfxViewFrame::UpdateInfoBar(const OUString& sId, const OUString& sPrimaryMessage,
+void SfxViewFrame::UpdateInfoBar(std::u16string_view sId, const OUString& sPrimaryMessage,
const OUString& sSecondaryMessage, InfobarType eType)
{
const sal_uInt16 nId = SfxInfoBarContainerChild::GetChildWindowId();
@@ -3350,7 +3350,7 @@ void SfxViewFrame::UpdateInfoBar(const OUString& sId, const OUString& sPrimaryMe
}
}
-void SfxViewFrame::RemoveInfoBar( const OUString& sId )
+void SfxViewFrame::RemoveInfoBar( std::u16string_view sId )
{
const sal_uInt16 nId = SfxInfoBarContainerChild::GetChildWindowId();
@@ -3368,7 +3368,7 @@ void SfxViewFrame::RemoveInfoBar( const OUString& sId )
}
}
-bool SfxViewFrame::HasInfoBarWithID( const OUString& sId )
+bool SfxViewFrame::HasInfoBarWithID( std::u16string_view sId )
{
const sal_uInt16 nId = SfxInfoBarContainerChild::GetChildWindowId();