diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-08-18 18:31:05 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-08-18 21:18:29 +0200 |
commit | 18f202011661397d10ca4c2fa28fcf57b62221b0 (patch) | |
tree | 5a867f5bee6205e13172bb5c61315552d5dc9870 /sfx2/source | |
parent | 2e74c1107bc8422ee7a819722f3f0a366127330f (diff) |
loplugin:constparams
Change-Id: Ic7410f836e584df45101e78e345c8b3c8d355e09
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120680
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/appl/childwin.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/commandpopup/CommandPopup.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/devtools/DocumentModelTreeHandler.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/devtools/ObjectInspectorTreeHandler.cxx | 16 | ||||
-rw-r--r-- | sfx2/source/dialog/templdlg.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/inc/templdgi.hxx | 2 | ||||
-rw-r--r-- | sfx2/source/sidebar/DeckLayouter.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/sidebar/SidebarController.cxx | 2 |
8 files changed, 24 insertions, 22 deletions
diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx index eaf7f960a8bb..a608c919638b 100644 --- a/sfx2/source/appl/childwin.cxx +++ b/sfx2/source/appl/childwin.cxx @@ -427,12 +427,12 @@ void SfxChildWindow::InitializeChildWinFactory_Impl(sal_uInt16 nId, SfxChildWinI rInfo.nFlags = static_cast<SfxChildWindowFlags>(static_cast<sal_uInt16>(aWinData.copy( nPos+1 ).toInt32())); } -bool ParentIsFloatingWindow(vcl::Window *pParent) +bool ParentIsFloatingWindow(const vcl::Window *pParent) { if (!pParent) return false; if (pParent->GetType() == WindowType::DOCKINGWINDOW || pParent->GetType() == WindowType::TOOLBOX) - return static_cast<DockingWindow*>(pParent)->GetFloatingWindow() != nullptr; + return static_cast<const DockingWindow*>(pParent)->GetFloatingWindow() != nullptr; if (pParent->GetType() == WindowType::FLOATINGWINDOW) return true; return false; diff --git a/sfx2/source/commandpopup/CommandPopup.cxx b/sfx2/source/commandpopup/CommandPopup.cxx index 152e5b9959b4..b13d474b975b 100644 --- a/sfx2/source/commandpopup/CommandPopup.cxx +++ b/sfx2/source/commandpopup/CommandPopup.cxx @@ -141,9 +141,9 @@ void MenuContentHandler::findInMenuRecursive( } } -void MenuContentHandler::addCommandIfPossible(MenuContent const& rMenuContent, - std::unique_ptr<weld::TreeView>& rpCommandTreeView, - std::vector<CurrentEntry>& rCommandList) +void MenuContentHandler::addCommandIfPossible( + MenuContent const& rMenuContent, const std::unique_ptr<weld::TreeView>& rpCommandTreeView, + std::vector<CurrentEntry>& rCommandList) { if (m_aAdded.find(rMenuContent.m_aFullLabelWithPath) != m_aAdded.end()) return; diff --git a/sfx2/source/devtools/DocumentModelTreeHandler.cxx b/sfx2/source/devtools/DocumentModelTreeHandler.cxx index 9b3dbb917812..2165efbf9c38 100644 --- a/sfx2/source/devtools/DocumentModelTreeHandler.cxx +++ b/sfx2/source/devtools/DocumentModelTreeHandler.cxx @@ -90,8 +90,8 @@ public: }; // append an entry to a input TreeView to a parent -void lclAppendToParentEntry(std::unique_ptr<weld::TreeView>& rTree, weld::TreeIter const& rParent, - DocumentModelTreeEntry* pEntry) +void lclAppendToParentEntry(const std::unique_ptr<weld::TreeView>& rTree, + weld::TreeIter const& rParent, DocumentModelTreeEntry* pEntry) { OUString sId(OUString::number(reinterpret_cast<sal_Int64>(pEntry))); OUString const& rString = pEntry->getString(); @@ -100,7 +100,7 @@ void lclAppendToParentEntry(std::unique_ptr<weld::TreeView>& rTree, weld::TreeIt } // append a root entry to a input TreeView -OUString lclAppend(std::unique_ptr<weld::TreeView>& rTree, DocumentModelTreeEntry* pEntry) +OUString lclAppend(const std::unique_ptr<weld::TreeView>& rTree, DocumentModelTreeEntry* pEntry) { OUString sId(OUString::number(reinterpret_cast<sal_Int64>(pEntry))); OUString const& rString = pEntry->getString(); diff --git a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx index 362907e92a4b..53f622554d62 100644 --- a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx +++ b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx @@ -347,7 +347,8 @@ public: }; // appends the node to the root of the tree view -OUString lclAppendNode(std::unique_ptr<weld::TreeView>& pTree, ObjectInspectorNodeInterface* pEntry) +OUString lclAppendNode(const std::unique_ptr<weld::TreeView>& pTree, + ObjectInspectorNodeInterface* pEntry) { OUString sName = pEntry->getObjectName(); OUString sId(OUString::number(reinterpret_cast<sal_Int64>(pEntry))); @@ -365,7 +366,7 @@ OUString lclAppendNode(std::unique_ptr<weld::TreeView>& pTree, ObjectInspectorNo } // appends the node to the parent -OUString lclAppendNodeToParent(std::unique_ptr<weld::TreeView>& pTree, +OUString lclAppendNodeToParent(const std::unique_ptr<weld::TreeView>& pTree, const weld::TreeIter* pParent, ObjectInspectorNodeInterface* pEntry) { OUString sName = pEntry->getObjectName(); @@ -536,8 +537,8 @@ protected: OUString mrInfo; uno::Reference<uno::XComponentContext> mxContext; - ObjectInspectorNodeInterface* createNodeObjectForAny(OUString const& rName, uno::Any& rAny, - OUString const& mrInfo); + ObjectInspectorNodeInterface* + createNodeObjectForAny(OUString const& rName, const uno::Any& rAny, OUString const& mrInfo); public: BasicValueNode(OUString const& rName, uno::Any const& rAny, OUString const& rInfo, @@ -869,8 +870,9 @@ void StructNode::fillChildren(std::unique_ptr<weld::TreeView>& pTree, const weld } } -ObjectInspectorNodeInterface* -BasicValueNode::createNodeObjectForAny(OUString const& rName, uno::Any& rAny, OUString const& rInfo) +ObjectInspectorNodeInterface* BasicValueNode::createNodeObjectForAny(OUString const& rName, + const uno::Any& rAny, + OUString const& rInfo) { switch (rAny.getValueType().getTypeClass()) { @@ -1049,7 +1051,7 @@ IMPL_LINK(ObjectInspectorTreeHandler, SelectionChanged, weld::TreeView&, rTreeVi mpObjectInspectorWidgets->mpToolbar->set_item_sensitive("inspect", bHaveNodeWithObject); } -static void updateOrder(std::unique_ptr<weld::TreeView>& pTreeView, sal_Int32 nColumn) +static void updateOrder(const std::unique_ptr<weld::TreeView>& pTreeView, sal_Int32 nColumn) { pTreeView->set_sort_column(nColumn); diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index cd2ab4840310..0d17a7cbd4e4 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -393,7 +393,7 @@ static OUString lcl_GetStyleFamilyName( SfxStyleFamily nFamily ) return OUString(); } -OUString SfxCommonTemplateDialog_Impl::getDefaultStyleName( const SfxStyleFamily eFam, StyleList& rStyleList ) +OUString SfxCommonTemplateDialog_Impl::getDefaultStyleName( const SfxStyleFamily eFam, const StyleList& rStyleList ) { OUString sDefaultStyle; OUString aFamilyName = lcl_GetStyleFamilyName(eFam); diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx index d555f7404277..7b1ff1b5d736 100644 --- a/sfx2/source/inc/templdgi.hxx +++ b/sfx2/source/inc/templdgi.hxx @@ -63,7 +63,7 @@ private: friend class DeletionWatcher; DeletionWatcher* impl_setDeletionWatcher(DeletionWatcher* pNewWatcher); - static OUString getDefaultStyleName( const SfxStyleFamily eFam, StyleList& rStyleList ); + static OUString getDefaultStyleName( const SfxStyleFamily eFam, const StyleList& rStyleList ); protected: #define MAX_FAMILIES 6 diff --git a/sfx2/source/sidebar/DeckLayouter.cxx b/sfx2/source/sidebar/DeckLayouter.cxx index 54f100cd71a8..0fc874c2e367 100644 --- a/sfx2/source/sidebar/DeckLayouter.cxx +++ b/sfx2/source/sidebar/DeckLayouter.cxx @@ -61,7 +61,7 @@ namespace { sal_Int32 mnWeight; bool mbShowTitleBar; - LayoutItem(std::shared_ptr<Panel>& pPanel) + LayoutItem(const std::shared_ptr<Panel>& pPanel) : mpPanel(pPanel) , maLayoutSize(0, 0, 0) , mnDistributedHeight(0) @@ -91,7 +91,7 @@ namespace { ::std::vector<LayoutItem>& rLayoutItems, const LayoutMode eMode_); tools::Rectangle PlaceDeckTitle ( - SidebarDockingWindow* pDockingWindow, + const SidebarDockingWindow* pDockingWindow, DeckTitleBar& rTitleBar, const tools::Rectangle& rAvailableSpace); tools::Rectangle PlaceVerticalScrollBar ( @@ -105,7 +105,7 @@ namespace { } void DeckLayouter::LayoutDeck ( - SidebarDockingWindow* pDockingWindow, + const SidebarDockingWindow* pDockingWindow, const tools::Rectangle& rContentArea, sal_Int32& rMinimalWidth, sal_Int32& rMinimalHeight, @@ -490,7 +490,7 @@ void DistributeHeights ( } tools::Rectangle PlaceDeckTitle( - SidebarDockingWindow* pDockingWindow, + const SidebarDockingWindow* pDockingWindow, DeckTitleBar& rDeckTitleBar, const tools::Rectangle& rAvailableSpace) { diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index c03b2a96acdb..b399a1a415d1 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -1621,7 +1621,7 @@ bool SidebarController::hasChartContextCurrently() const return GetCurrentContext().msApplication == "com.sun.star.chart2.ChartDocument"; } -sfx2::sidebar::SidebarController* SidebarController::GetSidebarControllerForView(SfxViewShell* pViewShell) +sfx2::sidebar::SidebarController* SidebarController::GetSidebarControllerForView(const SfxViewShell* pViewShell) { if (!pViewShell) return nullptr; |