[Libreoffice-commits] core.git: include/oox include/sfx2 include/toolkit include/vcl oox/source sfx2/inc sfx2/source starmath/inc stoc/source sw/source toolkit/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Thu Aug 19 13:29:08 UTC 2021
include/oox/core/contexthandler2.hxx | 2 +-
include/oox/export/DMLPresetShapeExport.hxx | 13 +++++++------
include/oox/shape/ShapeContextHandler.hxx | 4 ++--
include/sfx2/viewsh.hxx | 2 +-
include/toolkit/awt/vclxwindow.hxx | 2 +-
include/vcl/test/GraphicsRenderTests.hxx | 6 +++---
oox/source/export/DMLPresetShapeExport.cxx | 8 ++++----
oox/source/shape/ShapeContextHandler.cxx | 2 +-
sfx2/inc/sidebar/PanelTitleBar.hxx | 2 +-
sfx2/source/inc/StyleList.hxx | 2 +-
sfx2/source/inc/templdgi.hxx | 2 +-
starmath/inc/mathml/import.hxx | 2 +-
stoc/source/uriproc/UriReference.cxx | 14 +++++++-------
stoc/source/uriproc/UriReference.hxx | 14 +++++++-------
sw/source/filter/ascii/parasc.cxx | 2 +-
toolkit/source/awt/vclxwindow.cxx | 2 +-
16 files changed, 40 insertions(+), 39 deletions(-)
New commits:
commit 0f44815ce7b2925189cd603853ce55d8363549dd
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Aug 19 14:20:26 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Aug 19 15:28:33 2021 +0200
loplugin:constmethods
Change-Id: I786096b989daa6004a6527aafbe825b6f0a22d90
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120710
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/include/oox/core/contexthandler2.hxx b/include/oox/core/contexthandler2.hxx
index 3a75aff5706a..9843a40e95d6 100644
--- a/include/oox/core/contexthandler2.hxx
+++ b/include/oox/core/contexthandler2.hxx
@@ -214,7 +214,7 @@ protected:
void setMCEState( MCE_STATE aState ) { aMceState.back() = aState; }
void addMCEState( MCE_STATE aState ) { aMceState.push_back( aState ); }
void removeMCEState() { aMceState.pop_back(); }
- bool isMCEStateEmpty() { return aMceState.empty(); }
+ bool isMCEStateEmpty() const { return aMceState.empty(); }
private:
ContextHandler2Helper& operator=( const ContextHandler2Helper& ) = delete;
diff --git a/include/oox/export/DMLPresetShapeExport.hxx b/include/oox/export/DMLPresetShapeExport.hxx
index 37cd1c3743b2..1f650f558379 100644
--- a/include/oox/export/DMLPresetShapeExport.hxx
+++ b/include/oox/export/DMLPresetShapeExport.hxx
@@ -97,19 +97,20 @@ private:
typedef AdjustmentPointValueBase YAdjustmentValue;
// Returns true, if the shape has adjusting points
- bool HasHandleValue();
+ bool HasHandleValue() const;
// Returns true if the shape flipped.
- bool IsXFlipped() { return m_bIsFlipped.first; };
- bool IsYFlipped() { return m_bIsFlipped.second; };
+ bool IsXFlipped() const { return m_bIsFlipped.first; };
+ bool IsYFlipped() const { return m_bIsFlipped.second; };
// Returns with the shape type, like triangle for example
- const OUString& GetShapeType();
+ const OUString& GetShapeType() const;
// Returns with the handle points
- const css::uno::Sequence<css::uno::Sequence<css::beans::PropertyValue>>& GetHandleValues();
+ const css::uno::Sequence<css::uno::Sequence<css::beans::PropertyValue>>&
+ GetHandleValues() const;
// Returns with the adjustment values
const css::uno::Sequence<css::drawing::EnhancedCustomShapeAdjustmentValue>&
- GetAdjustmentValues();
+ GetAdjustmentValues() const;
// Returns with the raw value of the given property of the shape geometry.
css::uno::Any GetHandleValueOfModificationPoint(sal_Int32 nPoint, std::u16string_view sType);
// Returns with the appropriate value of the handle point.
diff --git a/include/oox/shape/ShapeContextHandler.hxx b/include/oox/shape/ShapeContextHandler.hxx
index ba500dd48f76..3b5e50955ceb 100644
--- a/include/oox/shape/ShapeContextHandler.hxx
+++ b/include/oox/shape/ShapeContextHandler.hxx
@@ -91,7 +91,7 @@ public:
void setRelationFragmentPath(const OUString & the_value);
- sal_Int32 getStartToken();
+ sal_Int32 getStartToken() const;
void setStartToken( sal_Int32 _starttoken );
void setPosition(const css::awt::Point& rPosition);
@@ -102,7 +102,7 @@ public:
void setGraphicMapper(css::uno::Reference<css::graphic::XGraphicMapper> const & rGraphicMapper);
void setTheme(const oox::drawingml::ThemePtr& pTheme) { mpThemePtr = pTheme; }
- const oox::drawingml::ThemePtr& getTheme() { return mpThemePtr; }
+ const oox::drawingml::ThemePtr& getTheme() const { return mpThemePtr; }
private:
ShapeContextHandler(ShapeContextHandler const &) = delete;
diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx
index 9649b80cc34e..f0d3938fe677 100644
--- a/include/sfx2/viewsh.hxx
+++ b/include/sfx2/viewsh.hxx
@@ -389,7 +389,7 @@ public:
// Freemium view settings
void setFreemiumView(bool isFreemium) { mbLOKIsFreemiumView = isFreemium; }
- bool isFreemiumView() { return mbLOKIsFreemiumView; }
+ bool isFreemiumView() const { return mbLOKIsFreemiumView; }
};
diff --git a/include/toolkit/awt/vclxwindow.hxx b/include/toolkit/awt/vclxwindow.hxx
index 24cefd4e5a6a..12783b5512ef 100644
--- a/include/toolkit/awt/vclxwindow.hxx
+++ b/include/toolkit/awt/vclxwindow.hxx
@@ -137,7 +137,7 @@ public:
void notifyWindowRemoved( vcl::Window const & _rWindow );
- bool IsDisposed();
+ bool IsDisposed() const;
// css::lang::XUnoTunnel
UNO3_GETIMPLEMENTATION_DECL(VCLXWindow)
diff --git a/include/vcl/test/GraphicsRenderTests.hxx b/include/vcl/test/GraphicsRenderTests.hxx
index b311aeecebae..974c47135271 100644
--- a/include/vcl/test/GraphicsRenderTests.hxx
+++ b/include/vcl/test/GraphicsRenderTests.hxx
@@ -32,9 +32,9 @@ public:
, m_aResultantBitmap(atestBitmap)
{
}
- const OUString& getTestName() { return m_aTestName; }
- const OUString& getStatus() { return m_aTestStatus; }
- const Bitmap& getBitmap() { return m_aResultantBitmap; }
+ const OUString& getTestName() const { return m_aTestName; }
+ const OUString& getStatus() const { return m_aTestStatus; }
+ const Bitmap& getBitmap() const { return m_aResultantBitmap; }
};
class VCL_PLUGIN_PUBLIC GraphicsRenderTests
diff --git a/oox/source/export/DMLPresetShapeExport.cxx b/oox/source/export/DMLPresetShapeExport.cxx
index b3c405f2f31e..318ce11207d9 100644
--- a/oox/source/export/DMLPresetShapeExport.cxx
+++ b/oox/source/export/DMLPresetShapeExport.cxx
@@ -93,18 +93,18 @@ DMLPresetShapeExporter::~DMLPresetShapeExporter(){
// Do nothing
};
-bool DMLPresetShapeExporter::HasHandleValue() { return m_bHasHandleValues; }
+bool DMLPresetShapeExporter::HasHandleValue() const { return m_bHasHandleValues; }
-const OUString& DMLPresetShapeExporter::GetShapeType() { return m_sPresetShapeType; }
+const OUString& DMLPresetShapeExporter::GetShapeType() const { return m_sPresetShapeType; }
const css::uno::Sequence<css::uno::Sequence<css::beans::PropertyValue>>&
-DMLPresetShapeExporter::GetHandleValues()
+DMLPresetShapeExporter::GetHandleValues() const
{
return m_HandleValues;
};
const css::uno::Sequence<css::drawing::EnhancedCustomShapeAdjustmentValue>&
-DMLPresetShapeExporter::GetAdjustmentValues()
+DMLPresetShapeExporter::GetAdjustmentValues() const
{
return m_AdjustmentValues;
};
diff --git a/oox/source/shape/ShapeContextHandler.cxx b/oox/source/shape/ShapeContextHandler.cxx
index 066d49d00f60..5404cc82fe81 100644
--- a/oox/source/shape/ShapeContextHandler.cxx
+++ b/oox/source/shape/ShapeContextHandler.cxx
@@ -531,7 +531,7 @@ void ShapeContextHandler::setRelationFragmentPath(const OUString & the_value)
msRelationFragmentPath = the_value;
}
-sal_Int32 ShapeContextHandler::getStartToken()
+sal_Int32 ShapeContextHandler::getStartToken() const
{
return mnStartToken;
}
diff --git a/sfx2/inc/sidebar/PanelTitleBar.hxx b/sfx2/inc/sidebar/PanelTitleBar.hxx
index 8ebd1af1800c..308a0c8f999a 100644
--- a/sfx2/inc/sidebar/PanelTitleBar.hxx
+++ b/sfx2/inc/sidebar/PanelTitleBar.hxx
@@ -48,7 +48,7 @@ public:
return *mxExpander;
}
- OUString GetMoreOptionsCommand() { return msMoreOptionsCommand; }
+ const OUString& GetMoreOptionsCommand() const { return msMoreOptionsCommand; }
private:
virtual void HandleToolBoxItemClick() override;
diff --git a/sfx2/source/inc/StyleList.hxx b/sfx2/source/inc/StyleList.hxx
index 72efc8981fbc..99889b15534b 100644
--- a/sfx2/source/inc/StyleList.hxx
+++ b/sfx2/source/inc/StyleList.hxx
@@ -86,7 +86,7 @@ public:
// Return whether treeview is visible
// It is used in StyleList's UpdateStyles_Hdl
// It is used to defaultly set the hierarchical view
- bool IsTreeView() { return m_xTreeBox->get_visible(); }
+ bool IsTreeView() const { return m_xTreeBox->get_visible(); }
// Helper function: Access to the current family item
// Used in Dialog's updateStyleHandler, Execute_Impl etc...
diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx
index 7b1ff1b5d736..83192cbd6356 100644
--- a/sfx2/source/inc/templdgi.hxx
+++ b/sfx2/source/inc/templdgi.hxx
@@ -194,7 +194,7 @@ public:
// This function return the value of bUpdate in Stylelist
// This value is used in StyleList's Notify
- bool GetNotifyUpdate() { return bUpdate; }
+ bool GetNotifyUpdate() const { return bUpdate; }
// This function sets the value of bUpdate in Dialog
// This function is used in StyleList's Notify to update the value of bUpdate when required
void SetNotifyupdate(bool b) { bUpdate = b; }
diff --git a/starmath/inc/mathml/import.hxx b/starmath/inc/mathml/import.hxx
index 658d62360c4a..4b9b1a8790f2 100644
--- a/starmath/inc/mathml/import.hxx
+++ b/starmath/inc/mathml/import.hxx
@@ -94,7 +94,7 @@ public:
/** Checks out if parse was a success
*/
- bool getSuccess() { return m_bSuccess; }
+ bool getSuccess() const { return m_bSuccess; }
public:
/** Handles an error on the mathml structure
diff --git a/stoc/source/uriproc/UriReference.cxx b/stoc/source/uriproc/UriReference.cxx
index de39330579e2..a47198ac2241 100644
--- a/stoc/source/uriproc/UriReference.cxx
+++ b/stoc/source/uriproc/UriReference.cxx
@@ -69,26 +69,26 @@ bool UriReference::isAbsolute() const {
}
-OUString UriReference::getSchemeSpecificPart()
+OUString UriReference::getSchemeSpecificPart() const
{
OUStringBuffer buf;
appendSchemeSpecificPart(buf);
return buf.makeStringAndClear();
}
-bool UriReference::isHierarchical() {
+bool UriReference::isHierarchical() const {
return m_scheme.isEmpty() || m_hasAuthority || m_path.startsWith("/");
}
-bool UriReference::hasAuthority() {
+bool UriReference::hasAuthority() const {
return m_hasAuthority;
}
-const OUString& UriReference::getAuthority() {
+const OUString& UriReference::getAuthority() const {
return m_authority;
}
-const OUString& UriReference::getPath() {
+const OUString& UriReference::getPath() const {
return m_path;
}
@@ -131,11 +131,11 @@ OUString UriReference::getPathSegment(sal_Int32 index)
return OUString();
}
-bool UriReference::hasQuery() {
+bool UriReference::hasQuery() const {
return m_hasQuery;
}
-const OUString& UriReference::getQuery() {
+const OUString& UriReference::getQuery() const {
return m_query;
}
diff --git a/stoc/source/uriproc/UriReference.hxx b/stoc/source/uriproc/UriReference.hxx
index 9c137e9daa42..715819789e66 100644
--- a/stoc/source/uriproc/UriReference.hxx
+++ b/stoc/source/uriproc/UriReference.hxx
@@ -46,19 +46,19 @@ public:
const OUString& getScheme() const { return m_scheme;}
/// @throws css::uno::RuntimeException
- OUString getSchemeSpecificPart();
+ OUString getSchemeSpecificPart() const;
/// @throws css::uno::RuntimeException
- bool isHierarchical();
+ bool isHierarchical() const;
/// @throws css::uno::RuntimeException
- bool hasAuthority();
+ bool hasAuthority() const;
/// @throws css::uno::RuntimeException
- const OUString& getAuthority();
+ const OUString& getAuthority() const;
/// @throws css::uno::RuntimeException
- const OUString& getPath();
+ const OUString& getPath() const;
/// @throws css::uno::RuntimeException
bool hasRelativePath();
@@ -70,10 +70,10 @@ public:
OUString getPathSegment(sal_Int32 index);
/// @throws css::uno::RuntimeException
- bool hasQuery();
+ bool hasQuery() const;
/// @throws css::uno::RuntimeException
- const OUString& getQuery();
+ const OUString& getQuery() const;
/// @throws css::uno::RuntimeException
bool hasFragment();
diff --git a/sw/source/filter/ascii/parasc.cxx b/sw/source/filter/ascii/parasc.cxx
index 7d3d347bc648..23bc58230f62 100644
--- a/sw/source/filter/ascii/parasc.cxx
+++ b/sw/source/filter/ascii/parasc.cxx
@@ -72,7 +72,7 @@ public:
bool bReadNewDoc, const SwAsciiOptions& rOpts );
ErrCode CallParser();
- const SwAsciiOptions& GetUsedAsciiOptions() {return m_usedAsciiOptions;};
+ const SwAsciiOptions& GetUsedAsciiOptions() const { return m_usedAsciiOptions; }
};
}
diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx
index 80e9db718500..28eb6942fe6c 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -2550,7 +2550,7 @@ Reference< XStyleSettings > SAL_CALL VCLXWindow::getStyleSettings()
return mpImpl->getStyleSettings();
}
-bool VCLXWindow::IsDisposed()
+bool VCLXWindow::IsDisposed() const
{
return mpImpl->mbDisposing;
}
More information about the Libreoffice-commits
mailing list