summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-10-06 11:17:13 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-10-06 12:57:25 +0200
commit22d94ce0abef7cdd5e344a28e1b1ee4caf6cd8f8 (patch)
tree0e54d0721723336daf26493f85e7be8f07431286 /include
parentd34e969c888219bd3739fc4a8ef330c77f7e7adf (diff)
loplugin:const* make some params and methods const
Change-Id: If7fbb25037343e18081a8ee7064840d75e9a45a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104010 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r--include/registry/registry.hxx2
-rw-r--r--include/svl/zformat.hxx2
-rw-r--r--include/vcl/GraphicObject.hxx2
-rw-r--r--include/vcl/WeldedTabbedNotebookbar.hxx3
-rw-r--r--include/vcl/animate/Animation.hxx2
-rw-r--r--include/vcl/filter/PDFiumLibrary.hxx10
-rw-r--r--include/vcl/graph.hxx2
-rw-r--r--include/vcl/layout.hxx4
-rw-r--r--include/vcl/notebookbar.hxx4
-rw-r--r--include/vcl/toolkit/treelistbox.hxx8
-rw-r--r--include/vcl/weld.hxx2
-rw-r--r--include/vcl/weldutils.hxx2
12 files changed, 22 insertions, 21 deletions
diff --git a/include/registry/registry.hxx b/include/registry/registry.hxx
index 76eb45e2648e..3c81c41e077f 100644
--- a/include/registry/registry.hxx
+++ b/include/registry/registry.hxx
@@ -316,7 +316,7 @@ private:
@param pValueList points to a value list.
@param length specifies the length of the list.
*/
- void setValueList(Registry& registry, RegValueType valueType,
+ void setValueList(const Registry& registry, RegValueType valueType,
ValueType* pValueList, sal_uInt32 length)
{
m_length = length;
diff --git a/include/svl/zformat.hxx b/include/svl/zformat.hxx
index 3309c7bbc0f4..c1a6f7388ec9 100644
--- a/include/svl/zformat.hxx
+++ b/include/svl/zformat.hxx
@@ -106,7 +106,7 @@ public:
void Enlarge(sal_uInt16 nCount); // Init of arrays to the right size
// if pSc is set, it is used to get the Color pointer
- void Copy( const ImpSvNumFor& rNumFor, ImpSvNumberformatScan* pSc );
+ void Copy( const ImpSvNumFor& rNumFor, const ImpSvNumberformatScan* pSc );
// Access to Info; call Enlarge before!
ImpSvNumberformatInfo& Info() { return aI;}
diff --git a/include/vcl/GraphicObject.hxx b/include/vcl/GraphicObject.hxx
index 7997fabcec67..c900bb02cbf7 100644
--- a/include/vcl/GraphicObject.hxx
+++ b/include/vcl/GraphicObject.hxx
@@ -269,7 +269,7 @@ public:
OutputDevice* pFirstFrameOutDev = nullptr
);
- void StopAnimation( OutputDevice* pOut = nullptr, long nExtraData = 0 );
+ void StopAnimation( const OutputDevice* pOut = nullptr, long nExtraData = 0 );
static bool isGraphicObjectUniqueIdURL(OUString const & rURL);
diff --git a/include/vcl/WeldedTabbedNotebookbar.hxx b/include/vcl/WeldedTabbedNotebookbar.hxx
index d0549d25d019..59190425ecfe 100644
--- a/include/vcl/WeldedTabbedNotebookbar.hxx
+++ b/include/vcl/WeldedTabbedNotebookbar.hxx
@@ -25,7 +25,8 @@ class VCL_DLLPUBLIC WeldedTabbedNotebookbar
std::unique_ptr<weld::Notebook> m_xNotebook;
public:
- WeldedTabbedNotebookbar(VclPtr<vcl::Window>& pContainerWindow, const OUString& rUIFilePath,
+ WeldedTabbedNotebookbar(const VclPtr<vcl::Window>& pContainerWindow,
+ const OUString& rUIFilePath,
const css::uno::Reference<css::frame::XFrame>& rFrame,
sal_uInt64 nWindowId);
};
diff --git a/include/vcl/animate/Animation.hxx b/include/vcl/animate/Animation.hxx
index c606fb7a85fe..e355d7d1e2a1 100644
--- a/include/vcl/animate/Animation.hxx
+++ b/include/vcl/animate/Animation.hxx
@@ -44,7 +44,7 @@ public:
bool Start(OutputDevice* pOutDev, const Point& rDestPt, const Size& rDestSz, long nExtraData,
OutputDevice* pFirstFrameOutDev);
- void Stop(OutputDevice* pOutDev = nullptr, long nExtraData = 0);
+ void Stop(const OutputDevice* pOutDev = nullptr, long nExtraData = 0);
void Draw(OutputDevice* pOutDev, const Point& rDestPt) const;
void Draw(OutputDevice* pOutDev, const Point& rDestPt, const Size& rDestSz) const;
diff --git a/include/vcl/filter/PDFiumLibrary.hxx b/include/vcl/filter/PDFiumLibrary.hxx
index 205f8cc62ca6..6f3d94925122 100644
--- a/include/vcl/filter/PDFiumLibrary.hxx
+++ b/include/vcl/filter/PDFiumLibrary.hxx
@@ -51,7 +51,7 @@ public:
PDFium();
~PDFium();
- OUString getLastError() { return maLastError; }
+ OUString getLastError() const { return maLastError; }
std::unique_ptr<PDFiumDocument> openDocument(const void* pData, int nSize);
};
@@ -95,10 +95,10 @@ public:
PDFiumPathSegment(FPDF_PATHSEGMENT pPathSegment);
~PDFiumPathSegment();
- FPDF_PATHSEGMENT getPointer() { return mpPathSegment; }
- basegfx::B2DPoint getPoint();
- bool isClosed();
- int getType();
+ FPDF_PATHSEGMENT getPointer() const { return mpPathSegment; }
+ basegfx::B2DPoint getPoint() const;
+ bool isClosed() const;
+ int getType() const;
};
class VCL_DLLPUBLIC PDFiumPageObject final
diff --git a/include/vcl/graph.hxx b/include/vcl/graph.hxx
index 1880041b4ba5..0a8ddaf0173d 100644
--- a/include/vcl/graph.hxx
+++ b/include/vcl/graph.hxx
@@ -160,7 +160,7 @@ public:
const Size& rDestSize,
long nExtraData = 0,
OutputDevice* pFirstFrameOutDev = nullptr );
- void StopAnimation( OutputDevice* pOutputDevice,
+ void StopAnimation( const OutputDevice* pOutputDevice,
long nExtraData );
void SetAnimationNotifyHdl( const Link<Animation*,void>& rLink );
diff --git a/include/vcl/layout.hxx b/include/vcl/layout.hxx
index f69acab4b1b1..e15f49b96d58 100644
--- a/include/vcl/layout.hxx
+++ b/include/vcl/layout.hxx
@@ -805,7 +805,7 @@ public:
{
m_aStartDragHdl = rLink;
}
- void SetDragHelper(rtl::Reference<TransferDataContainer>& rHelper, sal_uInt8 eDNDConstants)
+ void SetDragHelper(const rtl::Reference<TransferDataContainer>& rHelper, sal_uInt8 eDNDConstants)
{
m_xTransferHelper = rHelper;
m_nDragAction = eDNDConstants;
@@ -866,7 +866,7 @@ Size getLegacyBestSizeForChildren(const vcl::Window &rWindow);
vcl::Window* getNonLayoutParent(vcl::Window *pParent);
//Sort ok/cancel etc buttons in platform order
-void sort_native_button_order(VclBox& rContainer);
+void sort_native_button_order(const VclBox& rContainer);
#endif
diff --git a/include/vcl/notebookbar.hxx b/include/vcl/notebookbar.hxx
index 75383b9d2d7c..fa58dda4bbbf 100644
--- a/include/vcl/notebookbar.hxx
+++ b/include/vcl/notebookbar.hxx
@@ -48,9 +48,9 @@ public:
void ControlListenerForCurrentController(bool bListen);
void StopListeningAllControllers();
- bool IsWelded() { return m_bIsWelded; }
+ bool IsWelded() const { return m_bIsWelded; }
VclPtr<vcl::Window>& GetMainContainer() { return m_xVclContentArea; }
- OUString GetUIFilePath() { return m_sUIXMLDescription; }
+ OUString GetUIFilePath() const { return m_sUIXMLDescription; }
void SetDisposeCallback(const Link<const SfxViewShell*, void> rDisposeCallback, const SfxViewShell* pViewShell);
private:
diff --git a/include/vcl/toolkit/treelistbox.hxx b/include/vcl/toolkit/treelistbox.hxx
index ea1038edeb09..3ef56b39d67c 100644
--- a/include/vcl/toolkit/treelistbox.hxx
+++ b/include/vcl/toolkit/treelistbox.hxx
@@ -435,14 +435,14 @@ public:
// Return value: TRISTATE_TRUE == Ok, TRISTATE_FALSE == Cancel, TRISTATE_INDET == Ok and Make visible moved entry
TriState NotifyMoving(
SvTreeListEntry* pTarget, // D'n'D DropPosition in GetModel()
- SvTreeListEntry* pEntry, // Entry to be moved from GetSourceListBox()->GetModel()
+ const SvTreeListEntry* pEntry, // Entry to be moved from GetSourceListBox()->GetModel()
SvTreeListEntry*& rpNewParent, // New TargetParent
sal_uLong& rNewChildPos); // The TargetParent's position in Childlist
// Return value: TRISTATE_TRUE == Ok, TRISTATE_FALSE == Cancel, TRISTATE_INDET == Ok and Make visible moved entry
TriState NotifyCopying(
SvTreeListEntry* pTarget, // D'n'D DropPosition in GetModel()
- SvTreeListEntry* pEntry, // Entry to be copied from GetSourceListBox()->GetModel()
+ const SvTreeListEntry* pEntry, // Entry to be copied from GetSourceListBox()->GetModel()
SvTreeListEntry*& rpNewParent, // New TargetParent
sal_uLong& rNewChildPos); // The TargetParent's position in Childlist
@@ -631,7 +631,7 @@ public:
virtual tools::Rectangle GetFocusRect(const SvTreeListEntry*, long nLine );
// Respects indentation
- sal_IntPtr GetTabPos(const SvTreeListEntry*, SvLBoxTab*);
+ sal_IntPtr GetTabPos(const SvTreeListEntry*, const SvLBoxTab*);
void InvalidateEntry( SvTreeListEntry* );
SvLBoxItem* GetItem( SvTreeListEntry*, long nX, SvLBoxTab** ppTab);
SvLBoxItem* GetItem( SvTreeListEntry*, long nX );
@@ -684,7 +684,7 @@ public:
virtual FactoryFunction GetUITestFactory() const override;
- void SetDragHelper(rtl::Reference<TransferDataContainer>& rHelper, sal_uInt8 eDNDConstants);
+ void SetDragHelper(const rtl::Reference<TransferDataContainer>& rHelper, sal_uInt8 eDNDConstants);
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index e12ef94eb71f..6f227c7cbb6a 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -1903,7 +1903,7 @@ public:
{
m_xSpinButton->connect_focus_out(rLink);
}
- OString get_buildable_name() { return m_xSpinButton->get_buildable_name(); }
+ OString get_buildable_name() const { return m_xSpinButton->get_buildable_name(); }
void set_help_id(const OString& rName) { m_xSpinButton->set_help_id(rName); }
void set_position(int nCursorPos) { m_xSpinButton->set_position(nCursorPos); }
// set the width of the underlying widget in characters, this setting is
diff --git a/include/vcl/weldutils.hxx b/include/vcl/weldutils.hxx
index 0c892427f45d..9a29e89d7b5f 100644
--- a/include/vcl/weldutils.hxx
+++ b/include/vcl/weldutils.hxx
@@ -183,7 +183,7 @@ public:
void SAL_CALL disposing(const css::lang::EventObject& /*Source*/) override;
- const css::uno::Reference<css::frame::XFrame>& getFrame() { return mxFrame; }
+ const css::uno::Reference<css::frame::XFrame>& getFrame() const { return mxFrame; }
void startListening();