summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-10-06 13:09:02 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-10-06 18:35:45 +0200
commit2ac309188820036b1b99f983e8b793445e9b2ab2 (patch)
tree80db2a9f7f7726cb015f48f57e1cac8a77b01c58 /svx
parent698e5d54182d96a1fd0c3b864ba0e618f82dd1f1 (diff)
loplugin:const* make some params and methods const
Change-Id: Idec482c21c270912f9bcaeb980077c1616f67c8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104022 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r--svx/inc/tbxcolorupdate.hxx2
-rw-r--r--svx/source/dialog/_bmpmask.cxx2
-rw-r--r--svx/source/dialog/signaturelinehelper.cxx2
-rw-r--r--svx/source/form/datanavi.cxx2
-rw-r--r--svx/source/form/filtnav.cxx2
-rw-r--r--svx/source/form/fmPropBrw.cxx2
-rw-r--r--svx/source/form/fmexch.cxx4
-rw-r--r--svx/source/form/navigatortree.cxx6
-rw-r--r--svx/source/inc/StylesPreviewWindow.hxx24
-rw-r--r--svx/source/inc/datanavi.hxx2
-rw-r--r--svx/source/inc/fmPropBrw.hxx2
-rw-r--r--svx/source/inc/fmexch.hxx4
-rw-r--r--svx/source/inc/fmexpl.hxx6
-rw-r--r--svx/source/sidebar/inspector/InspectorTextPanel.cxx2
-rw-r--r--svx/source/sidebar/line/LinePropertyPanelBase.cxx2
-rw-r--r--svx/source/svdraw/svdmrkv.cxx2
-rw-r--r--svx/source/tbxctrls/StylesPreviewWindow.cxx11
-rw-r--r--svx/source/tbxctrls/tbxcolorupdate.cxx2
18 files changed, 41 insertions, 38 deletions
diff --git a/svx/inc/tbxcolorupdate.hxx b/svx/inc/tbxcolorupdate.hxx
index fac1f9a0af36..391639cd3df8 100644
--- a/svx/inc/tbxcolorupdate.hxx
+++ b/svx/inc/tbxcolorupdate.hxx
@@ -59,7 +59,7 @@ namespace svx
void Update( const NamedColor& rNamedColor );
void Update( const Color& rColor, bool bForceUpdate = false );
Color const & GetCurrentColor() const { return maCurColor; }
- OUString GetCurrentColorName();
+ OUString GetCurrentColorName() const;
private:
ToolboxButtonColorUpdaterBase(ToolboxButtonColorUpdaterBase const &) = delete;
diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx
index 79bdce07e800..c31e10543f37 100644
--- a/svx/source/dialog/_bmpmask.cxx
+++ b/svx/source/dialog/_bmpmask.cxx
@@ -483,7 +483,7 @@ void SvxBmpMask::dispose()
}
/** is called by a MaskSet when it is selected */
-void SvxBmpMask::onSelect( MaskSet* pSet )
+void SvxBmpMask::onSelect( const MaskSet* pSet )
{
// now deselect all other value sets
if( pSet != m_xQSet1.get() )
diff --git a/svx/source/dialog/signaturelinehelper.cxx b/svx/source/dialog/signaturelinehelper.cxx
index 91de79aa9478..8890e142f35d 100644
--- a/svx/source/dialog/signaturelinehelper.cxx
+++ b/svx/source/dialog/signaturelinehelper.cxx
@@ -124,7 +124,7 @@ uno::Reference<graphic::XGraphic> importSVG(const OUString& rSVG)
return xGraphic;
}
-void setShapeCertificate(SdrView* pView,
+void setShapeCertificate(const SdrView* pView,
const css::uno::Reference<css::security::XCertificate>& xCertificate)
{
const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx
index 5b24bbc85e72..37927fed7431 100644
--- a/svx/source/form/datanavi.cxx
+++ b/svx/source/form/datanavi.cxx
@@ -302,7 +302,7 @@ namespace svxform
m_xItemList->enable_drag_source(xTransferable, DND_ACTION_COPY);
}
- void XFormsPage::AddChildren(weld::TreeIter* _pParent,
+ void XFormsPage::AddChildren(const weld::TreeIter* _pParent,
const Reference< css::xml::dom::XNode >& _xNode)
{
DBG_ASSERT( m_xUIHelper.is(), "XFormsPage::AddChildren(): invalid UIHelper" );
diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx
index 9cb6051ee7a0..7e9e53c62d7f 100644
--- a/svx/source/form/filtnav.cxx
+++ b/svx/source/form/filtnav.cxx
@@ -1212,7 +1212,7 @@ sal_Int8 FmFilterNavigator::AcceptDrop( const AcceptDropEvent& rEvt )
namespace
{
- FmFilterItems* getTargetItems(weld::TreeView& rTreeView, weld::TreeIter& rTarget)
+ FmFilterItems* getTargetItems(const weld::TreeView& rTreeView, const weld::TreeIter& rTarget)
{
FmFilterData* pData = reinterpret_cast<FmFilterData*>(rTreeView.get_id(rTarget).toUInt64());
FmFilterItems* pTargetItems = dynamic_cast<FmFilterItems*>(pData);
diff --git a/svx/source/form/fmPropBrw.cxx b/svx/source/form/fmPropBrw.cxx
index e42e414be757..2d1700f65f4e 100644
--- a/svx/source/form/fmPropBrw.cxx
+++ b/svx/source/form/fmPropBrw.cxx
@@ -81,7 +81,7 @@ using ::com::sun::star::awt::XWindow;
SFX_IMPL_MODELESSDIALOGCONTOLLER(FmPropBrwMgr, SID_FM_SHOW_PROPERTIES)
FmPropBrwMgr::FmPropBrwMgr( vcl::Window* _pParent, sal_uInt16 _nId,
- SfxBindings* _pBindings, SfxChildWinInfo* _pInfo)
+ SfxBindings* _pBindings, const SfxChildWinInfo* _pInfo)
:SfxChildWindow(_pParent, _nId)
{
std::shared_ptr<FmPropBrw> xControl(new FmPropBrw(::comphelper::getProcessComponentContext(), _pBindings,
diff --git a/svx/source/form/fmexch.cxx b/svx/source/form/fmexch.cxx
index c512c445d950..fe875b9e5cfc 100644
--- a/svx/source/form/fmexch.cxx
+++ b/svx/source/form/fmexch.cxx
@@ -163,7 +163,7 @@ namespace svxform
}
}
- size_t OControlTransferData::onEntryRemoved(weld::TreeView* pView, weld::TreeIter* _pEntry)
+ size_t OControlTransferData::onEntryRemoved(const weld::TreeView* pView, const weld::TreeIter* _pEntry)
{
auto aIter = std::find_if(m_aSelectedEntries.begin(), m_aSelectedEntries.end(),
[pView, _pEntry](const auto& rElem) {
@@ -226,7 +226,7 @@ namespace svxform
}
}
- void OControlTransferData::buildListFromPath(const weld::TreeView* pTreeBox, weld::TreeIter* pRoot)
+ void OControlTransferData::buildListFromPath(const weld::TreeView* pTreeBox, const weld::TreeIter* pRoot)
{
ListBoxEntrySet aEmpty;
m_aSelectedEntries.swap( aEmpty );
diff --git a/svx/source/form/navigatortree.cxx b/svx/source/form/navigatortree.cxx
index de01cc9763a6..ef4bc95a68a3 100644
--- a/svx/source/form/navigatortree.cxx
+++ b/svx/source/form/navigatortree.cxx
@@ -716,7 +716,7 @@ namespace svxform
return nAction == implAcceptDataTransfer(aClipboardContent.GetDataFlavorExVector(), nAction, xSelected.get(), false);
}
- sal_Int8 NavigatorTree::implAcceptDataTransfer( const DataFlavorExVector& _rFlavors, sal_Int8 _nAction, weld::TreeIter* _pTargetEntry, bool _bDnD )
+ sal_Int8 NavigatorTree::implAcceptDataTransfer( const DataFlavorExVector& _rFlavors, sal_Int8 _nAction, const weld::TreeIter* _pTargetEntry, bool _bDnD )
{
// no target -> no drop
if (!_pTargetEntry)
@@ -872,7 +872,7 @@ namespace svxform
return implExecuteDataTransfer( _rData, _nAction, xDrop.get(), _bDnD );
}
- sal_Int8 NavigatorTree::implExecuteDataTransfer( const OControlTransferData& _rData, sal_Int8 _nAction, weld::TreeIter* _pTargetEntry, bool _bDnD )
+ sal_Int8 NavigatorTree::implExecuteDataTransfer( const OControlTransferData& _rData, sal_Int8 _nAction, const weld::TreeIter* _pTargetEntry, bool _bDnD )
{
const DataFlavorExVector& rDataFlavors = _rData.GetDataFlavorExVector();
@@ -1188,7 +1188,7 @@ namespace svxform
}
}
- void NavigatorTree::ModelHasRemoved(weld::TreeIter* pTypedEntry)
+ void NavigatorTree::ModelHasRemoved(const weld::TreeIter* pTypedEntry)
{
if (doingKeyboardCut())
{
diff --git a/svx/source/inc/StylesPreviewWindow.hxx b/svx/source/inc/StylesPreviewWindow.hxx
index 26ba93d7be79..2b930672d23f 100644
--- a/svx/source/inc/StylesPreviewWindow.hxx
+++ b/svx/source/inc/StylesPreviewWindow.hxx
@@ -33,8 +33,9 @@ class StyleStatusListener : public SfxStatusListener
StylesPreviewWindow_Base* m_pPreviewControl;
public:
- StyleStatusListener(StylesPreviewWindow_Base* pPreviewControl,
- css::uno::Reference<css::frame::XDispatchProvider>& xDispatchProvider);
+ StyleStatusListener(
+ StylesPreviewWindow_Base* pPreviewControl,
+ const css::uno::Reference<css::frame::XDispatchProvider>& xDispatchProvider);
void StateChanged(SfxItemState eState, const SfxPoolItem* pState) override;
};
@@ -49,8 +50,9 @@ class StyleItemController : public weld::CustomWidgetController
css::uno::Reference<css::frame::XDispatchProvider> m_xDispatchProvider;
public:
- StyleItemController(const std::pair<OUString, OUString>& aStyleName,
- css::uno::Reference<css::frame::XDispatchProvider>& xDispatchProvider);
+ StyleItemController(
+ const std::pair<OUString, OUString>& aStyleName,
+ const css::uno::Reference<css::frame::XDispatchProvider>& xDispatchProvider);
void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override;
@@ -66,7 +68,7 @@ private:
void DrawHighlight(vcl::RenderContext& rRenderContext, Color aFontBack);
static void DrawSelection(vcl::RenderContext& rRenderContext);
static void DrawContentBackground(vcl::RenderContext& rRenderContext,
- tools::Rectangle& aContentRect, Color& aColor);
+ const tools::Rectangle& aContentRect, const Color& aColor);
};
class StylesPreviewWindow_Base
@@ -93,9 +95,9 @@ protected:
DECL_LINK(GoDown, const OString&, void);
public:
- StylesPreviewWindow_Base(weld::Builder& xBuilder,
- std::vector<std::pair<OUString, OUString>>& aDefaultStyles,
- css::uno::Reference<css::frame::XDispatchProvider>& xDispatchProvider);
+ StylesPreviewWindow_Base(
+ weld::Builder& xBuilder, std::vector<std::pair<OUString, OUString>>& aDefaultStyles,
+ const css::uno::Reference<css::frame::XDispatchProvider>& xDispatchProvider);
~StylesPreviewWindow_Base();
void Select(const OUString& rStyleName);
@@ -110,9 +112,9 @@ private:
class StylesPreviewWindow_Impl : public InterimItemWindow, public StylesPreviewWindow_Base
{
public:
- StylesPreviewWindow_Impl(vcl::Window* pParent,
- std::vector<std::pair<OUString, OUString>>& aDefaultStyles,
- css::uno::Reference<css::frame::XDispatchProvider>& xDispatchProvider);
+ StylesPreviewWindow_Impl(
+ vcl::Window* pParent, std::vector<std::pair<OUString, OUString>>& aDefaultStyles,
+ const css::uno::Reference<css::frame::XDispatchProvider>& xDispatchProvider);
~StylesPreviewWindow_Impl();
void dispose();
diff --git a/svx/source/inc/datanavi.hxx b/svx/source/inc/datanavi.hxx
index 652ce21fa876..30f140f2aad1 100644
--- a/svx/source/inc/datanavi.hxx
+++ b/svx/source/inc/datanavi.hxx
@@ -207,7 +207,7 @@ namespace svxform
DECL_LINK(KeyInputHdl, const KeyEvent&, bool);
DECL_LINK(PopupMenuHdl, const CommandEvent&, bool);
- void AddChildren(weld::TreeIter* _pParent,
+ void AddChildren(const weld::TreeIter* _pParent,
const css::uno::Reference< css::xml::dom::XNode >& _xNode);
bool DoToolBoxAction(const OString& rToolBoxID);
void AddEntry(std::unique_ptr<ItemNode> _pNewNode, bool _bIsElement, weld::TreeIter* pRet = nullptr);
diff --git a/svx/source/inc/fmPropBrw.hxx b/svx/source/inc/fmPropBrw.hxx
index 4fb36fc595ce..86408e46fd5a 100644
--- a/svx/source/inc/fmPropBrw.hxx
+++ b/svx/source/inc/fmPropBrw.hxx
@@ -32,7 +32,7 @@
class FmPropBrwMgr : public SfxChildWindow
{
public:
- FmPropBrwMgr(vcl::Window *pParent, sal_uInt16 nId, SfxBindings *pBindings, SfxChildWinInfo *pInfo);
+ FmPropBrwMgr(vcl::Window *pParent, sal_uInt16 nId, SfxBindings *pBindings, const SfxChildWinInfo *pInfo);
SFX_DECL_CHILDWINDOW(FmPropBrwMgr);
};
diff --git a/svx/source/inc/fmexch.hxx b/svx/source/inc/fmexch.hxx
index deed78fc5d6c..039a185e2a1b 100644
--- a/svx/source/inc/fmexch.hxx
+++ b/svx/source/inc/fmexch.hxx
@@ -154,7 +154,7 @@ namespace svxform
@param _pEntry
@return the number of entries remaining in the selection.
*/
- size_t onEntryRemoved(weld::TreeView* pView, weld::TreeIter* _pEntry);
+ size_t onEntryRemoved(const weld::TreeView* pView, const weld::TreeIter* _pEntry);
void setFormsRoot(
const css::uno::Reference< css::form::XForms >& _rxFormsRoot
@@ -165,7 +165,7 @@ namespace svxform
// (it is assumed that the entries are sorted in m_aSelectedEntries with respect to the neighbor relationship)
- void buildListFromPath(const weld::TreeView* pTreeBox, weld::TreeIter* pRoot);
+ void buildListFromPath(const weld::TreeView* pTreeBox, const weld::TreeIter* pRoot);
// The reverse way: throws everything out of m_aSelectedEntries and rebuilds it using m_aControlPaths
void addHiddenControlsFormat(const css::uno::Sequence< css::uno::Reference< css::uno::XInterface > >& seqInterfaces);
diff --git a/svx/source/inc/fmexpl.hxx b/svx/source/inc/fmexpl.hxx
index 50e16fdccc0f..8f0d99f5676a 100644
--- a/svx/source/inc/fmexpl.hxx
+++ b/svx/source/inc/fmexpl.hxx
@@ -493,10 +493,10 @@ namespace svxform
sal_Int8 ExecuteDrop(const ExecuteDropEvent& rEvt);
private:
- sal_Int8 implAcceptDataTransfer( const DataFlavorExVector& _rFlavors, sal_Int8 _nAction, weld::TreeIter* _pTargetEntry, bool _bDnD );
+ sal_Int8 implAcceptDataTransfer( const DataFlavorExVector& _rFlavors, sal_Int8 _nAction, const weld::TreeIter* _pTargetEntry, bool _bDnD );
sal_Int8 implExecuteDataTransfer( const OControlTransferData& _rData, sal_Int8 _nAction, const Point& _rDropPos, bool _bDnD );
- sal_Int8 implExecuteDataTransfer( const OControlTransferData& _rData, sal_Int8 _nAction, weld::TreeIter* _pTargetEntry, bool _bDnD );
+ sal_Int8 implExecuteDataTransfer( const OControlTransferData& _rData, sal_Int8 _nAction, const weld::TreeIter* _pTargetEntry, bool _bDnD );
// check if a cut, copy, or drag operation can be started in the current situation
bool implAllowExchange( sal_Int8 _nAction, bool* _pHasNonHidden = nullptr );
@@ -506,7 +506,7 @@ namespace svxform
// fills m_aControlExchange in preparation of a DnD or clipboard operation
bool implPrepareExchange( sal_Int8 _nAction );
- void ModelHasRemoved(weld::TreeIter* _pEntry);
+ void ModelHasRemoved(const weld::TreeIter* _pEntry);
void doPaste();
void doCopy();
diff --git a/svx/source/sidebar/inspector/InspectorTextPanel.cxx b/svx/source/sidebar/inspector/InspectorTextPanel.cxx
index 6c99bec7f324..d9f397a07470 100644
--- a/svx/source/sidebar/inspector/InspectorTextPanel.cxx
+++ b/svx/source/sidebar/inspector/InspectorTextPanel.cxx
@@ -106,7 +106,7 @@ static bool GetPropertyValues(const OUString& rPropName, const uno::Any& rAny, O
}
static void FillBox_Impl(weld::TreeView& rListBoxStyles, const TreeNode& rCurrent,
- weld::TreeIter* pParent)
+ const weld::TreeIter* pParent)
{
std::unique_ptr<weld::TreeIter> pResult = rListBoxStyles.make_iterator();
const OUString& rName = rCurrent.sNodeName;
diff --git a/svx/source/sidebar/line/LinePropertyPanelBase.cxx b/svx/source/sidebar/line/LinePropertyPanelBase.cxx
index 1038be5c5351..35836d47cf73 100644
--- a/svx/source/sidebar/line/LinePropertyPanelBase.cxx
+++ b/svx/source/sidebar/line/LinePropertyPanelBase.cxx
@@ -61,7 +61,7 @@ public:
namespace
{
- SvxLineStyleToolBoxControl* getLineStyleToolBoxControl(ToolbarUnoDispatcher& rToolBoxColor)
+ SvxLineStyleToolBoxControl* getLineStyleToolBoxControl(const ToolbarUnoDispatcher& rToolBoxColor)
{
css::uno::Reference<css::frame::XToolbarController> xController = rToolBoxColor.GetControllerForCommand(".uno:XLineStyle");
SvxLineStyleToolBoxControl* pToolBoxLineStyleControl = dynamic_cast<SvxLineStyleToolBoxControl*>(xController.get());
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index 2ef9c7a3fe30..c3e6bd81f42a 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -681,7 +681,7 @@ OUString lcl_getDragParameterString( const OUString& rCID )
}
} // anonymous namespace
-void SdrMarkView::SetMarkHandlesForLOKit(tools::Rectangle const & rRect, SfxViewShell* pOtherShell)
+void SdrMarkView::SetMarkHandlesForLOKit(tools::Rectangle const & rRect, const SfxViewShell* pOtherShell)
{
SfxViewShell* pViewShell = GetSfxViewShell();
diff --git a/svx/source/tbxctrls/StylesPreviewWindow.cxx b/svx/source/tbxctrls/StylesPreviewWindow.cxx
index a36cd5203263..7448592f2162 100644
--- a/svx/source/tbxctrls/StylesPreviewWindow.cxx
+++ b/svx/source/tbxctrls/StylesPreviewWindow.cxx
@@ -56,7 +56,7 @@
StyleStatusListener::StyleStatusListener(
StylesPreviewWindow_Base* pPreviewControl,
- css::uno::Reference<css::frame::XDispatchProvider>& xDispatchProvider)
+ const css::uno::Reference<css::frame::XDispatchProvider>& xDispatchProvider)
: SfxStatusListener(xDispatchProvider, SID_STYLE_FAMILY2, ".uno:ParaStyle")
, m_pPreviewControl(pPreviewControl)
{
@@ -72,7 +72,7 @@ void StyleStatusListener::StateChanged(SfxItemState /*eState*/, const SfxPoolIte
StyleItemController::StyleItemController(
const std::pair<OUString, OUString>& aStyleName,
- css::uno::Reference<css::frame::XDispatchProvider>& xDispatchProvider)
+ const css::uno::Reference<css::frame::XDispatchProvider>& xDispatchProvider)
: m_eStyleFamily(SfxStyleFamily::Para)
, m_aStyleName(aStyleName)
, m_bSelected(false)
@@ -297,7 +297,8 @@ void StyleItemController::DrawEntry(vcl::RenderContext& rRenderContext)
}
void StyleItemController::DrawContentBackground(vcl::RenderContext& rRenderContext,
- tools::Rectangle& aContentRect, Color& aColor)
+ const tools::Rectangle& aContentRect,
+ const Color& aColor)
{
rRenderContext.SetLineColor(aColor);
rRenderContext.SetFillColor(aColor);
@@ -351,7 +352,7 @@ void StyleItemController::DrawText(vcl::RenderContext& rRenderContext)
StylesPreviewWindow_Base::StylesPreviewWindow_Base(
weld::Builder& xBuilder, std::vector<std::pair<OUString, OUString>>& aDefaultStyles,
- css::uno::Reference<css::frame::XDispatchProvider>& xDispatchProvider)
+ const css::uno::Reference<css::frame::XDispatchProvider>& xDispatchProvider)
: m_xUp(xBuilder.weld_toolbar("uptoolbar"))
, m_xDown(xBuilder.weld_toolbar("downtoolbar"))
, m_aDefaultStyles(aDefaultStyles)
@@ -489,7 +490,7 @@ IMPL_LINK(StylesPreviewWindow_Base, GoDown, const OString&, /*rItem*/, void)
StylesPreviewWindow_Impl::StylesPreviewWindow_Impl(
vcl::Window* pParent, std::vector<std::pair<OUString, OUString>>& aDefaultStyles,
- css::uno::Reference<css::frame::XDispatchProvider>& xDispatchProvider)
+ const css::uno::Reference<css::frame::XDispatchProvider>& xDispatchProvider)
: InterimItemWindow(pParent, "svx/ui/stylespreview.ui", "ApplyStyleBox",
reinterpret_cast<sal_uInt64>(SfxViewShell::Current()))
, StylesPreviewWindow_Base(*m_xBuilder, aDefaultStyles, xDispatchProvider)
diff --git a/svx/source/tbxctrls/tbxcolorupdate.cxx b/svx/source/tbxctrls/tbxcolorupdate.cxx
index 9d400ff3046d..6bf96c7da461 100644
--- a/svx/source/tbxctrls/tbxcolorupdate.cxx
+++ b/svx/source/tbxctrls/tbxcolorupdate.cxx
@@ -217,7 +217,7 @@ namespace svx
SetImage(pVirDev.get());
}
- OUString ToolboxButtonColorUpdaterBase::GetCurrentColorName()
+ OUString ToolboxButtonColorUpdaterBase::GetCurrentColorName() const
{
OUString sColorName = GetQuickHelpText();
// The obtained string is of format: color context (color name)