summaryrefslogtreecommitdiff
path: root/include/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-08-22 10:02:35 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-08-22 11:04:05 +0200
commit3be72fe233b3e6d7aeb267f6c82d8bf9759b39ef (patch)
treea8304c473bac0da12a6b5d35f7841cd61a13b01c /include/vcl
parentb5c5cccabe68dc2de84cee4ef041f52268e5b8b4 (diff)
loplugin:constmethod in vcl
Change-Id: I20545527b117c9562b91076b748fb3e2659d2497 Reviewed-on: https://gerrit.libreoffice.org/77944 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/vcl')
-rw-r--r--include/vcl/BitmapTools.hxx2
-rw-r--r--include/vcl/GraphicNativeMetadata.hxx2
-rw-r--r--include/vcl/button.hxx2
-rw-r--r--include/vcl/cursor.hxx2
-rw-r--r--include/vcl/dialog.hxx2
-rw-r--r--include/vcl/filter/pdfdocument.hxx8
-rw-r--r--include/vcl/graph.hxx2
-rw-r--r--include/vcl/graphicfilter.hxx6
-rw-r--r--include/vcl/metaact.hxx2
-rw-r--r--include/vcl/opengl/OpenGLContext.hxx4
-rw-r--r--include/vcl/pdfextoutdevdata.hxx4
-rw-r--r--include/vcl/pdfwriter.hxx2
-rw-r--r--include/vcl/print.hxx2
-rw-r--r--include/vcl/roadmap.hxx2
-rw-r--r--include/vcl/svlbitm.hxx2
-rw-r--r--include/vcl/syschild.hxx2
-rw-r--r--include/vcl/texteng.hxx4
-rw-r--r--include/vcl/uitest/logger.hxx2
-rw-r--r--include/vcl/vectorgraphicdata.hxx2
-rw-r--r--include/vcl/window.hxx4
20 files changed, 29 insertions, 29 deletions
diff --git a/include/vcl/BitmapTools.hxx b/include/vcl/BitmapTools.hxx
index c15fdf9e16b8..1cf13d4c7de8 100644
--- a/include/vcl/BitmapTools.hxx
+++ b/include/vcl/BitmapTools.hxx
@@ -80,7 +80,7 @@ public:
void SetPixel(long nY, long nX, BitmapColor nColor) = delete;
long Height() { return maSize.Height(); }
long Width() { return maSize.Width(); }
- sal_uInt8 GetBitCount() { return mnBitCount; }
+ sal_uInt8 GetBitCount() const { return mnBitCount; }
};
BitmapEx VCL_DLLPUBLIC loadFromName(const OUString& rFileName, const ImageLoadFlags eFlags = ImageLoadFlags::NONE);
diff --git a/include/vcl/GraphicNativeMetadata.hxx b/include/vcl/GraphicNativeMetadata.hxx
index 4ae29276205a..b6b162556e76 100644
--- a/include/vcl/GraphicNativeMetadata.hxx
+++ b/include/vcl/GraphicNativeMetadata.hxx
@@ -31,7 +31,7 @@ public:
~GraphicNativeMetadata();
bool read(Graphic const & rGraphic);
- sal_uInt16 getRotation() { return mRotation;}
+ sal_uInt16 getRotation() const { return mRotation;}
};
#endif // INCLUDED_VCL_GRAPHICNATIVEMETADATA_HXX
diff --git a/include/vcl/button.hxx b/include/vcl/button.hxx
index d6f39bb6f8f2..53192fc211c1 100644
--- a/include/vcl/button.hxx
+++ b/include/vcl/button.hxx
@@ -161,7 +161,7 @@ public:
mbIsAction = bIsAction;
}
- bool isAction()
+ bool isAction() const
{
return mbIsAction;
}
diff --git a/include/vcl/cursor.hxx b/include/vcl/cursor.hxx
index 714d6f569e80..c8e46da8082c 100644
--- a/include/vcl/cursor.hxx
+++ b/include/vcl/cursor.hxx
@@ -100,7 +100,7 @@ public:
private:
void LOKNotify( vcl::Window* pWindow, const OUString& rAction );
- bool ImplPrepForDraw(OutputDevice* pDevice, ImplCursorData& rData);
+ bool ImplPrepForDraw(const OutputDevice* pDevice, ImplCursorData& rData);
void ImplRestore();
void ImplDoShow( bool bDrawDirect, bool bRestore );
bool ImplDoHide( bool bStop );
diff --git a/include/vcl/dialog.hxx b/include/vcl/dialog.hxx
index 056c448ce251..e2ddea74be78 100644
--- a/include/vcl/dialog.hxx
+++ b/include/vcl/dialog.hxx
@@ -179,7 +179,7 @@ public:
void add_button(PushButton* pButton, int nResponse, bool bTransferOwnership);
void set_default_response(int nResponse);
- int get_default_response();
+ int get_default_response() const;
vcl::Window* get_widget_for_response(int nResponse);
};
diff --git a/include/vcl/filter/pdfdocument.hxx b/include/vcl/filter/pdfdocument.hxx
index f78eab2b5985..023882b8e8a2 100644
--- a/include/vcl/filter/pdfdocument.hxx
+++ b/include/vcl/filter/pdfdocument.hxx
@@ -131,9 +131,9 @@ public:
/// Access to the stream of the object, if it has any.
PDFStreamElement* GetStream() const;
void SetArrayOffset(sal_uInt64 nArrayOffset);
- sal_uInt64 GetArrayOffset();
+ sal_uInt64 GetArrayOffset() const;
void SetArrayLength(sal_uInt64 nArrayLength);
- sal_uInt64 GetArrayLength();
+ sal_uInt64 GetArrayLength() const;
PDFArrayElement* GetArray() const;
/// Parse objects stored in this object stream.
void ParseStoredObjects();
@@ -154,7 +154,7 @@ public:
PDFArrayElement(PDFObjectElement* pObject);
bool Read(SvStream& rStream) override;
void PushBack(PDFElement* pElement);
- const std::vector<PDFElement*>& GetElements();
+ const std::vector<PDFElement*>& GetElements() const;
};
/// Reference object: something with a unique ID.
@@ -397,7 +397,7 @@ public:
/// Instead of all whitespace, just skip CR and NL characters.
static void SkipLineBreaks(SvStream& rStream);
size_t GetObjectOffset(size_t nIndex) const;
- const std::vector<std::unique_ptr<PDFElement>>& GetElements();
+ const std::vector<std::unique_ptr<PDFElement>>& GetElements() const;
std::vector<PDFObjectElement*> GetPages();
/// Remember the end location of an EOF token.
void PushBackEOF(size_t nOffset);
diff --git a/include/vcl/graph.hxx b/include/vcl/graph.hxx
index d49a8a2ce512..4adac78b48c4 100644
--- a/include/vcl/graph.hxx
+++ b/include/vcl/graph.hxx
@@ -205,7 +205,7 @@ public:
std::shared_ptr<GraphicReader>& GetContext();
void SetContext( const std::shared_ptr<GraphicReader> &pReader );
void SetDummyContext(bool value);
- bool IsDummyContext();
+ bool IsDummyContext() const;
private:
friend class GraphicObject;
diff --git a/include/vcl/graphicfilter.hxx b/include/vcl/graphicfilter.hxx
index 2e8dda3c0d2d..14373039b684 100644
--- a/include/vcl/graphicfilter.hxx
+++ b/include/vcl/graphicfilter.hxx
@@ -233,7 +233,7 @@ public:
GraphicFilter( bool bUseConfig = true );
~GraphicFilter();
- sal_uInt16 GetImportFormatCount();
+ sal_uInt16 GetImportFormatCount() const;
sal_uInt16 GetImportFormatNumber( const OUString& rFormatName );
sal_uInt16 GetImportFormatNumberForShortName( const OUString& rShortName );
sal_uInt16 GetImportFormatNumberForTypeName( const OUString& rType );
@@ -245,7 +245,7 @@ public:
OUString GetImportFormatShortName( sal_uInt16 nFormat );
OUString GetImportWildcard( sal_uInt16 nFormat, sal_Int32 nEntry );
- sal_uInt16 GetExportFormatCount();
+ sal_uInt16 GetExportFormatCount() const;
sal_uInt16 GetExportFormatNumber( const OUString& rFormatName );
sal_uInt16 GetExportFormatNumberForMediaType( const OUString& rShortName );
sal_uInt16 GetExportFormatNumberForShortName( const OUString& rShortName );
@@ -295,7 +295,7 @@ public:
WmfExternal const *pExtHeader = nullptr );
// Setting sizeLimit limits how much will be read from the stream.
- Graphic ImportUnloadedGraphic(SvStream& rIStream, sal_uInt64 sizeLimit = 0, Size* pSizeHint = nullptr);
+ Graphic ImportUnloadedGraphic(SvStream& rIStream, sal_uInt64 sizeLimit = 0, const Size* pSizeHint = nullptr);
const FilterErrorEx& GetLastError() const { return *pErrorEx;}
void ResetLastError();
diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx
index ae77e39520b8..7dea93dce676 100644
--- a/include/vcl/metaact.hxx
+++ b/include/vcl/metaact.hxx
@@ -76,7 +76,7 @@ public:
virtual void Execute( OutputDevice* pOut );
- oslInterlockedCount GetRefCount() { return m_nCount; }
+ oslInterlockedCount GetRefCount() const { return m_nCount; }
virtual rtl::Reference<MetaAction> Clone();
diff --git a/include/vcl/opengl/OpenGLContext.hxx b/include/vcl/opengl/OpenGLContext.hxx
index 7e7842041dd6..c6807a6fe863 100644
--- a/include/vcl/opengl/OpenGLContext.hxx
+++ b/include/vcl/opengl/OpenGLContext.hxx
@@ -129,14 +129,14 @@ public:
SystemChildWindow* getChildWindow();
const SystemChildWindow* getChildWindow() const;
- bool isInitialized()
+ bool isInitialized() const
{
return mbInitialized;
}
/// VCL promiscuously re-uses its own contexts:
void setVCLOnly() { mbVCLOnly = true; }
- bool isVCLOnly() { return mbVCLOnly; }
+ bool isVCLOnly() const { return mbVCLOnly; }
virtual SystemWindowData generateWinData(vcl::Window* pParent, bool bRequestLegacyContext);
diff --git a/include/vcl/pdfextoutdevdata.hxx b/include/vcl/pdfextoutdevdata.hxx
index 4c14283b03a8..5a932570af6a 100644
--- a/include/vcl/pdfextoutdevdata.hxx
+++ b/include/vcl/pdfextoutdevdata.hxx
@@ -141,7 +141,7 @@ public:
void SetDocumentLocale( const css::lang::Locale& rLoc );
std::vector< PDFExtOutDevBookmarkEntry >& GetBookmarks() { return maBookmarks;}
- const std::vector<OUString>& GetChapterNames() { return maChapterNames; }
+ const std::vector<OUString>& GetChapterNames() const { return maChapterNames; }
const Graphic& GetCurrentGraphic() const;
@@ -387,7 +387,7 @@ public:
@returns
the id of the current structure element
*/
- sal_Int32 GetCurrentStructureElement();
+ sal_Int32 GetCurrentStructureElement() const;
/** set a structure attribute on the current structural element
diff --git a/include/vcl/pdfwriter.hxx b/include/vcl/pdfwriter.hxx
index adf19cd1272c..fe24e50ad11f 100644
--- a/include/vcl/pdfwriter.hxx
+++ b/include/vcl/pdfwriter.hxx
@@ -689,7 +689,7 @@ The following structure describes the permissions used in PDF security
* this should enable the producer to give feedback about
* any anomalies that might have occurred
*/
- std::set< ErrorCode > const & GetErrors();
+ std::set< ErrorCode > const & GetErrors() const;
// uses 128bit encryption
static css::uno::Reference< css::beans::XMaterialHolder >
diff --git a/include/vcl/print.hxx b/include/vcl/print.hxx
index 854c08d96660..d25af2b42bd2 100644
--- a/include/vcl/print.hxx
+++ b/include/vcl/print.hxx
@@ -526,7 +526,7 @@ public:
// don't use outside vcl. Some of these are exported for
// the benefit of vcl's plugins.
// Still: DO NOT USE OUTSIDE VCL
- int getFilteredPageCount();
+ int getFilteredPageCount() const;
VCL_DLLPRIVATE PageSize getPageFile( int i_inUnfilteredPage, GDIMetaFile& rMtf,
bool i_bMayUseCache = false );
PageSize getFilteredPageFile( int i_nFilteredPage, GDIMetaFile& o_rMtf,
diff --git a/include/vcl/roadmap.hxx b/include/vcl/roadmap.hxx
index 1b58a194c0fb..f3811ba56812 100644
--- a/include/vcl/roadmap.hxx
+++ b/include/vcl/roadmap.hxx
@@ -55,7 +55,7 @@ public:
void ChangeRoadmapItemID( ItemId _nID, ItemId NewID );
void SetRoadmapInteractive( bool _bInteractive );
- bool IsRoadmapInteractive();
+ bool IsRoadmapInteractive() const;
void SetRoadmapComplete( bool _bComplete );
bool IsRoadmapComplete() const;
diff --git a/include/vcl/svlbitm.hxx b/include/vcl/svlbitm.hxx
index c28bed22f460..9484535ce81f 100644
--- a/include/vcl/svlbitm.hxx
+++ b/include/vcl/svlbitm.hxx
@@ -80,7 +80,7 @@ public:
long Width();
long Height();
void SetLink( const Link<SvLBoxButtonData*,void>& rLink) { aLink=rLink; }
- bool IsRadio();
+ bool IsRadio() const;
// as buttons are not derived from LinkHdl
void CallLink();
diff --git a/include/vcl/syschild.hxx b/include/vcl/syschild.hxx
index e15295e79a78..bdfd913fe929 100644
--- a/include/vcl/syschild.hxx
+++ b/include/vcl/syschild.hxx
@@ -56,7 +56,7 @@ public:
//no visible flash
void SetLeaveEnterBackgrounds(const css::uno::Sequence<css::uno::Any>& rLeaveArgs, const css::uno::Sequence<css::uno::Any>& rEnterArgs);
// return the platform specific handle/id of this window;
- sal_IntPtr GetParentWindowHandle();
+ sal_IntPtr GetParentWindowHandle() const;
void* CreateGStreamerSink();
};
diff --git a/include/vcl/texteng.hxx b/include/vcl/texteng.hxx
index 1df2b87c702b..916a27d01c08 100644
--- a/include/vcl/texteng.hxx
+++ b/include/vcl/texteng.hxx
@@ -263,12 +263,12 @@ public:
void UndoActionStart( sal_uInt16 nId = 0 );
void UndoActionEnd();
void InsertUndo( std::unique_ptr<TextUndo> pUndo, bool bTryMerge = false );
- bool IsInUndo() { return mbIsInUndo; }
+ bool IsInUndo() const { return mbIsInUndo; }
void SetIsInUndo( bool bInUndo ) { mbIsInUndo = bInUndo; }
void ResetUndo();
void EnableUndo( bool bEnable );
- bool IsUndoEnabled() { return mbUndoEnabled; }
+ bool IsUndoEnabled() const { return mbUndoEnabled; }
void SetModified( bool bModified ) { mbModified = bModified; }
bool IsModified() const { return mbModified; }
diff --git a/include/vcl/uitest/logger.hxx b/include/vcl/uitest/logger.hxx
index 450285c5c247..8bda3548875d 100644
--- a/include/vcl/uitest/logger.hxx
+++ b/include/vcl/uitest/logger.hxx
@@ -73,7 +73,7 @@ public:
void setAppName(OUString name) { app_name = name; }
- OUString getAppName() { return app_name; }
+ OUString getAppName() const { return app_name; }
};
#endif
diff --git a/include/vcl/vectorgraphicdata.hxx b/include/vcl/vectorgraphicdata.hxx
index 7a45533b8f6b..b64e79d8d936 100644
--- a/include/vcl/vectorgraphicdata.hxx
+++ b/include/vcl/vectorgraphicdata.hxx
@@ -96,7 +96,7 @@ public:
const VectorGraphicDataArray& getVectorGraphicDataArray() const { return maVectorGraphicDataArray; }
sal_uInt32 getVectorGraphicDataArrayLength() const { return maVectorGraphicDataArray.getLength(); }
enum class State { UNPARSED, PARSED };
- std::pair<State, size_t> getSizeBytes();
+ std::pair<State, size_t> getSizeBytes() const;
const OUString& getPath() const { return maPath; }
const VectorGraphicDataType& getVectorGraphicDataType() const { return meVectorGraphicDataType; }
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index a93b1da700a8..823456ff077e 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -865,7 +865,7 @@ public:
Point maPos; // mouse position in output coordinates
};
PointerState GetPointerState();
- bool IsMouseOver();
+ bool IsMouseOver() const;
void SetInputContext( const InputContext& rInputContext );
const InputContext& GetInputContext() const;
@@ -1083,7 +1083,7 @@ public:
bool HasFocus() const;
bool HasChildPathFocus( bool bSystemWindow = false ) const;
bool IsActive() const;
- bool HasActiveChildFrame();
+ bool HasActiveChildFrame() const;
GetFocusFlags GetGetFocusFlags() const;
void GrabFocusToDocument();