[Libreoffice-commits] core.git: 2 commits - include/vcl sdext/source slideshow/source starmath/inc starmath/source vcl/inc vcl/qt5 vcl/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Sat Sep 28 11:48:13 UTC 2019
include/vcl/wizardmachine.hxx | 2 +-
sdext/source/minimizer/optimizerdialog.hxx | 2 +-
sdext/source/pdfimport/inc/pdfiprocessor.hxx | 4 ++--
sdext/source/pdfimport/tree/pdfiprocessor.cxx | 2 +-
sdext/source/presenter/PresenterScrollBar.hxx | 2 +-
sdext/source/presenter/PresenterTextView.cxx | 4 ++--
sdext/source/presenter/PresenterTextView.hxx | 4 ++--
slideshow/source/engine/shapes/shapeimporter.cxx | 2 +-
slideshow/source/engine/slide/userpaintoverlay.cxx | 4 ++--
slideshow/source/engine/slide/userpaintoverlay.hxx | 2 +-
slideshow/source/engine/slidebitmap.cxx | 2 +-
slideshow/source/inc/shapeimporter.hxx | 4 ++--
slideshow/source/inc/slidebitmap.hxx | 2 +-
starmath/inc/cursor.hxx | 2 +-
starmath/inc/document.hxx | 8 ++++----
starmath/inc/visitors.hxx | 2 +-
starmath/source/cursor.cxx | 4 ++--
starmath/source/document.cxx | 2 +-
starmath/source/mathmlexport.hxx | 2 +-
starmath/source/mathmlimport.hxx | 4 ++--
vcl/inc/TypeSerializer.hxx | 2 +-
vcl/inc/bitmap/Octree.hxx | 2 +-
vcl/inc/qt5/Qt5FilePicker.hxx | 2 +-
vcl/inc/qt5/Qt5Menu.hxx | 4 ++--
vcl/inc/qt5/Qt5Widget.hxx | 10 +++++-----
vcl/qt5/Qt5FilePicker.cxx | 2 +-
vcl/qt5/Qt5Menu.cxx | 2 +-
vcl/qt5/Qt5Widget.cxx | 2 +-
vcl/source/bitmap/Octree.cxx | 2 +-
vcl/source/control/wizardmachine.cxx | 2 +-
vcl/source/gdi/TypeSerializer.cxx | 2 +-
31 files changed, 46 insertions(+), 46 deletions(-)
New commits:
commit 1141b6b0ce6581b587e174c9bbdddb88d36ea8c2
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Sat Sep 28 10:32:30 2019 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat Sep 28 13:47:35 2019 +0200
loplugin:constmethod in vcl
Change-Id: I6a456979a6cfcd7920dc468baf9b23013cb701a4
Reviewed-on: https://gerrit.libreoffice.org/79783
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/include/vcl/wizardmachine.hxx b/include/vcl/wizardmachine.hxx
index 8b37a5d10ac2..cbe4b40b4202 100644
--- a/include/vcl/wizardmachine.hxx
+++ b/include/vcl/wizardmachine.hxx
@@ -147,7 +147,7 @@ namespace vcl
bool ShowPrevPage();
void AddPage( std::unique_ptr<BuilderPage> xPage );
- void RemovePage( BuilderPage* pPage );
+ void RemovePage( const BuilderPage* pPage );
void SetPage( WizardTypes::WizardState nLevel, std::unique_ptr<BuilderPage> xPage );
BuilderPage* GetPage( WizardTypes::WizardState eState ) const;
diff --git a/vcl/inc/TypeSerializer.hxx b/vcl/inc/TypeSerializer.hxx
index 99d4609d5d2a..45f7219300d6 100644
--- a/vcl/inc/TypeSerializer.hxx
+++ b/vcl/inc/TypeSerializer.hxx
@@ -30,7 +30,7 @@ public:
TypeSerializer(SvStream& rStream);
void readGradient(Gradient& rGradient);
- void writeGradient(Gradient& rGradient);
+ void writeGradient(const Gradient& rGradient);
};
#endif
diff --git a/vcl/inc/bitmap/Octree.hxx b/vcl/inc/bitmap/Octree.hxx
index 0bc060d450d9..86a911fa4adf 100644
--- a/vcl/inc/bitmap/Octree.hxx
+++ b/vcl/inc/bitmap/Octree.hxx
@@ -41,7 +41,7 @@ class VCL_PLUGIN_PUBLIC Octree
{
private:
void CreatePalette(OctreeNode* pNode);
- void GetPalIndex(OctreeNode* pNode);
+ void GetPalIndex(const OctreeNode* pNode);
SAL_DLLPRIVATE void add(std::unique_ptr<OctreeNode>& rpNode);
SAL_DLLPRIVATE void reduce();
diff --git a/vcl/inc/qt5/Qt5FilePicker.hxx b/vcl/inc/qt5/Qt5FilePicker.hxx
index d4e74b92ba15..35ca687f8dcb 100644
--- a/vcl/inc/qt5/Qt5FilePicker.hxx
+++ b/vcl/inc/qt5/Qt5FilePicker.hxx
@@ -155,7 +155,7 @@ public:
virtual void SAL_CALL setDescription(const OUString& rDescription) override;
protected:
- static css::uno::Any handleGetListValue(QComboBox* pWidget, sal_Int16 nControlAction);
+ static css::uno::Any handleGetListValue(const QComboBox* pWidget, sal_Int16 nControlAction);
static void handleSetListValue(QComboBox* pQComboBox, sal_Int16 nAction,
const css::uno::Any& rValue);
virtual void addCustomControl(sal_Int16 controlId);
diff --git a/vcl/inc/qt5/Qt5Menu.hxx b/vcl/inc/qt5/Qt5Menu.hxx
index cf60ee2c0bb7..efcfb8eeb81c 100644
--- a/vcl/inc/qt5/Qt5Menu.hxx
+++ b/vcl/inc/qt5/Qt5Menu.hxx
@@ -45,7 +45,7 @@ private:
void ReinitializeActionGroup(unsigned nPos);
void ResetAllActionGroups();
- void UpdateActionGroupItem(Qt5MenuItem* pSalMenuItem);
+ void UpdateActionGroupItem(const Qt5MenuItem* pSalMenuItem);
public:
Qt5Menu(bool bMenuBar);
@@ -74,7 +74,7 @@ public:
void SetMenu(Menu* pMenu) { mpVCLMenu = pMenu; }
Menu* GetMenu() { return mpVCLMenu; }
- unsigned GetItemCount() { return maItems.size(); }
+ unsigned GetItemCount() const { return maItems.size(); }
Qt5MenuItem* GetItemAtPos(unsigned nPos) { return maItems[nPos]; }
private slots:
diff --git a/vcl/inc/qt5/Qt5Widget.hxx b/vcl/inc/qt5/Qt5Widget.hxx
index 457fc8b78612..159794b2d2a3 100644
--- a/vcl/inc/qt5/Qt5Widget.hxx
+++ b/vcl/inc/qt5/Qt5Widget.hxx
@@ -45,7 +45,7 @@ class Qt5Widget : public QWidget
static void commitText(Qt5Frame&, const QString& aText);
static bool handleKeyEvent(Qt5Frame&, const QWidget&, QKeyEvent*, const ButtonKeyState);
- static void handleMouseButtonEvent(const Qt5Frame&, QMouseEvent*, const ButtonKeyState);
+ static void handleMouseButtonEvent(const Qt5Frame&, const QMouseEvent*, const ButtonKeyState);
virtual bool event(QEvent*) override;
@@ -81,8 +81,8 @@ public:
// key events might be propagated further down => call base on false
static inline bool handleKeyReleaseEvent(Qt5Frame&, const QWidget&, QKeyEvent*);
// mouse events are always accepted
- static inline void handleMousePressEvent(const Qt5Frame&, QMouseEvent*);
- static inline void handleMouseReleaseEvent(const Qt5Frame&, QMouseEvent*);
+ static inline void handleMousePressEvent(const Qt5Frame&, const QMouseEvent*);
+ static inline void handleMouseReleaseEvent(const Qt5Frame&, const QMouseEvent*);
};
bool Qt5Widget::handleKeyReleaseEvent(Qt5Frame& rFrame, const QWidget& rWidget, QKeyEvent* pEvent)
@@ -90,12 +90,12 @@ bool Qt5Widget::handleKeyReleaseEvent(Qt5Frame& rFrame, const QWidget& rWidget,
return handleKeyEvent(rFrame, rWidget, pEvent, ButtonKeyState::Released);
}
-void Qt5Widget::handleMousePressEvent(const Qt5Frame& rFrame, QMouseEvent* pEvent)
+void Qt5Widget::handleMousePressEvent(const Qt5Frame& rFrame, const QMouseEvent* pEvent)
{
handleMouseButtonEvent(rFrame, pEvent, ButtonKeyState::Pressed);
}
-void Qt5Widget::handleMouseReleaseEvent(const Qt5Frame& rFrame, QMouseEvent* pEvent)
+void Qt5Widget::handleMouseReleaseEvent(const Qt5Frame& rFrame, const QMouseEvent* pEvent)
{
handleMouseButtonEvent(rFrame, pEvent, ButtonKeyState::Released);
}
diff --git a/vcl/qt5/Qt5FilePicker.cxx b/vcl/qt5/Qt5FilePicker.cxx
index 1573f95dd6b5..730d7f142df0 100644
--- a/vcl/qt5/Qt5FilePicker.cxx
+++ b/vcl/qt5/Qt5FilePicker.cxx
@@ -363,7 +363,7 @@ void SAL_CALL Qt5FilePicker::appendFilterGroup(const OUString& rGroupTitle,
}
}
-uno::Any Qt5FilePicker::handleGetListValue(QComboBox* pWidget, sal_Int16 nControlAction)
+uno::Any Qt5FilePicker::handleGetListValue(const QComboBox* pWidget, sal_Int16 nControlAction)
{
uno::Any aAny;
switch (nControlAction)
diff --git a/vcl/qt5/Qt5Menu.cxx b/vcl/qt5/Qt5Menu.cxx
index 418bda56281f..dd5c9895273e 100644
--- a/vcl/qt5/Qt5Menu.cxx
+++ b/vcl/qt5/Qt5Menu.cxx
@@ -287,7 +287,7 @@ void Qt5Menu::ResetAllActionGroups()
}
}
-void Qt5Menu::UpdateActionGroupItem(Qt5MenuItem* pSalMenuItem)
+void Qt5Menu::UpdateActionGroupItem(const Qt5MenuItem* pSalMenuItem)
{
QAction* pAction = pSalMenuItem->getAction();
if (!pAction)
diff --git a/vcl/qt5/Qt5Widget.cxx b/vcl/qt5/Qt5Widget.cxx
index 3450f433a808..8ae77b1a7ed5 100644
--- a/vcl/qt5/Qt5Widget.cxx
+++ b/vcl/qt5/Qt5Widget.cxx
@@ -120,7 +120,7 @@ void Qt5Widget::resizeEvent(QResizeEvent* pEvent)
m_rFrame.CallCallback(SalEvent::Resize, nullptr);
}
-void Qt5Widget::handleMouseButtonEvent(const Qt5Frame& rFrame, QMouseEvent* pEvent,
+void Qt5Widget::handleMouseButtonEvent(const Qt5Frame& rFrame, const QMouseEvent* pEvent,
const ButtonKeyState eState)
{
SalMouseEvent aEvent;
diff --git a/vcl/source/bitmap/Octree.cxx b/vcl/source/bitmap/Octree.cxx
index 42da9dd2ae7a..e89b1d8c9404 100644
--- a/vcl/source/bitmap/Octree.cxx
+++ b/vcl/source/bitmap/Octree.cxx
@@ -184,7 +184,7 @@ void Octree::CreatePalette(OctreeNode* pNode)
}
}
-void Octree::GetPalIndex(OctreeNode* pNode)
+void Octree::GetPalIndex(const OctreeNode* pNode)
{
if (pNode->bLeaf)
mnPalIndex = pNode->nPalIndex;
diff --git a/vcl/source/control/wizardmachine.cxx b/vcl/source/control/wizardmachine.cxx
index 5936b0b52bf4..8944725b996b 100644
--- a/vcl/source/control/wizardmachine.cxx
+++ b/vcl/source/control/wizardmachine.cxx
@@ -1606,7 +1606,7 @@ namespace vcl
}
}
- void WizardMachine::RemovePage(BuilderPage* pPage)
+ void WizardMachine::RemovePage(const BuilderPage* pPage)
{
WizPageData* pPrevPageData = nullptr;
WizPageData* pPageData = m_pFirstPage;
diff --git a/vcl/source/gdi/TypeSerializer.cxx b/vcl/source/gdi/TypeSerializer.cxx
index 264a25096756..a54f3558c7ef 100644
--- a/vcl/source/gdi/TypeSerializer.cxx
+++ b/vcl/source/gdi/TypeSerializer.cxx
@@ -63,7 +63,7 @@ void TypeSerializer::readGradient(Gradient& rGradient)
rGradient.SetSteps(nStepCount);
}
-void TypeSerializer::writeGradient(Gradient& rGradient)
+void TypeSerializer::writeGradient(const Gradient& rGradient)
{
VersionCompat aCompat(mrStream, StreamMode::WRITE, 1);
commit e75a545f2869a4406bb434c356d481745f000271
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Sat Sep 28 10:01:04 2019 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat Sep 28 13:47:28 2019 +0200
loplugin:constmethod in sdext..starmath
Change-Id: Ib1b60382c9ec62f35f0f232c3f2c2d5664ea669e
Reviewed-on: https://gerrit.libreoffice.org/79779
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/sdext/source/minimizer/optimizerdialog.hxx b/sdext/source/minimizer/optimizerdialog.hxx
index 9d421488046a..c40a7b9b99c0 100644
--- a/sdext/source/minimizer/optimizerdialog.hxx
+++ b/sdext/source/minimizer/optimizerdialog.hxx
@@ -122,7 +122,7 @@ public:
OUString GetSelectedString( OUString const & token );
css::uno::Reference< css::frame::XDispatch >& GetStatusDispatcher() { return mxStatusDispatcher; };
css::uno::Reference< css::frame::XFrame>& GetFrame() { return mxFrame; };
- const css::uno::Reference< css::uno::XComponentContext >& GetComponentContext() { return UnoDialog::mxContext; };
+ const css::uno::Reference< css::uno::XComponentContext >& GetComponentContext() const { return UnoDialog::mxContext; };
};
diff --git a/sdext/source/pdfimport/inc/pdfiprocessor.hxx b/sdext/source/pdfimport/inc/pdfiprocessor.hxx
index 196a59ba3a8b..a4c16407a39d 100644
--- a/sdext/source/pdfimport/inc/pdfiprocessor.hxx
+++ b/sdext/source/pdfimport/inc/pdfiprocessor.hxx
@@ -205,8 +205,8 @@ namespace pdfi
m_Width(width), m_PrevSpaceWidth(prevSpaceWidth), m_rGlyphs(rGlyphs) {};
OUString& getGlyph(){ return m_rGlyphs; }
- double getWidth(){ return m_Width; }
- double getPrevSpaceWidth(){ return m_PrevSpaceWidth; }
+ double getWidth() const { return m_Width; }
+ double getPrevSpaceWidth() const { return m_PrevSpaceWidth; }
GraphicsContext& getGC(){ return m_rCurrentContext; }
Element* getCurElement(){ return m_pCurElement; }
diff --git a/sdext/source/pdfimport/tree/pdfiprocessor.cxx b/sdext/source/pdfimport/tree/pdfiprocessor.cxx
index 509e4a72d9e8..15b77b8627b8 100644
--- a/sdext/source/pdfimport/tree/pdfiprocessor.cxx
+++ b/sdext/source/pdfimport/tree/pdfiprocessor.cxx
@@ -217,7 +217,7 @@ void PDFIProcessor::processGlyphLine()
if (spaceDetectBoundary == 0.0)
{
double avgGlyphWidth = 0.0;
- for (CharGlyph & i : m_GlyphsList)
+ for (const CharGlyph & i : m_GlyphsList)
avgGlyphWidth += i.getWidth();
avgGlyphWidth /= m_GlyphsList.size();
spaceDetectBoundary = avgGlyphWidth * 0.2;
diff --git a/sdext/source/presenter/PresenterScrollBar.hxx b/sdext/source/presenter/PresenterScrollBar.hxx
index a181753ee2f7..cf46420b186c 100644
--- a/sdext/source/presenter/PresenterScrollBar.hxx
+++ b/sdext/source/presenter/PresenterScrollBar.hxx
@@ -58,7 +58,7 @@ public:
virtual void SAL_CALL disposing() override;
css::uno::Reference<css::uno::XComponentContext> const&
- GetComponentContext() { return mxComponentContext; }
+ GetComponentContext() const { return mxComponentContext; }
void SetVisible (const bool bIsVisible);
diff --git a/sdext/source/presenter/PresenterTextView.cxx b/sdext/source/presenter/PresenterTextView.cxx
index 10eec2e4b630..166d56cf5123 100644
--- a/sdext/source/presenter/PresenterTextView.cxx
+++ b/sdext/source/presenter/PresenterTextView.cxx
@@ -657,7 +657,7 @@ awt::Point PresenterTextParagraph::GetRelativeLocation() const
sal_Int32(mnYOrigin + mnVerticalOffset));
}
-awt::Size PresenterTextParagraph::GetSize()
+awt::Size PresenterTextParagraph::GetSize() const
{
return awt::Size(
sal_Int32(mnWidth),
@@ -725,7 +725,7 @@ void PresenterTextParagraph::AddLine (
rCurrentLine.startPos = rCurrentLine.endPos;
}
-double PresenterTextParagraph::GetTotalTextHeight()
+double PresenterTextParagraph::GetTotalTextHeight() const
{
return maLines.size() * mnLineHeight;
}
diff --git a/sdext/source/presenter/PresenterTextView.hxx b/sdext/source/presenter/PresenterTextView.hxx
index 86bc04652f91..edd818cc385c 100644
--- a/sdext/source/presenter/PresenterTextView.hxx
+++ b/sdext/source/presenter/PresenterTextView.hxx
@@ -106,7 +106,7 @@ public:
const double nClipTop,
const double nClipBottom);
- double GetTotalTextHeight();
+ double GetTotalTextHeight() const;
void SetCharacterOffset (const sal_Int32 nCharacterOffset);
sal_Int32 GetCharacterCount() const;
@@ -138,7 +138,7 @@ public:
void SetCaretPosition (const sal_Int32 nPosition) const;
void SetOrigin (const double nXOrigin, const double nYOrigin);
css::awt::Point GetRelativeLocation() const;
- css::awt::Size GetSize();
+ css::awt::Size GetSize() const;
private:
OUString msParagraphText;
diff --git a/slideshow/source/engine/shapes/shapeimporter.cxx b/slideshow/source/engine/shapes/shapeimporter.cxx
index 65b0414d2645..542308813d36 100644
--- a/slideshow/source/engine/shapes/shapeimporter.cxx
+++ b/slideshow/source/engine/shapes/shapeimporter.cxx
@@ -517,7 +517,7 @@ bool ShapeImporter::isImportDone() const
return maShapesStack.empty();
}
-const PolyPolygonVector& ShapeImporter::getPolygons()
+const PolyPolygonVector& ShapeImporter::getPolygons() const
{
return maPolygons;
}
diff --git a/slideshow/source/engine/slide/userpaintoverlay.cxx b/slideshow/source/engine/slide/userpaintoverlay.cxx
index 2382a50875c2..3ad95c1a6cdb 100644
--- a/slideshow/source/engine/slide/userpaintoverlay.cxx
+++ b/slideshow/source/engine/slide/userpaintoverlay.cxx
@@ -222,7 +222,7 @@ namespace slideshow
}
//Retrieve all registered polygons.
- const PolyPolygonVector& getPolygons()
+ const PolyPolygonVector& getPolygons() const
{
return maPolygons;
}
@@ -462,7 +462,7 @@ namespace slideshow
mrMultiplexer.addUserPaintHandler(mpHandler);
}
- PolyPolygonVector const & UserPaintOverlay::getPolygons()
+ PolyPolygonVector const & UserPaintOverlay::getPolygons() const
{
return mpHandler->getPolygons();
}
diff --git a/slideshow/source/engine/slide/userpaintoverlay.hxx b/slideshow/source/engine/slide/userpaintoverlay.hxx
index 3dc6fa976a7f..449b34174fa9 100644
--- a/slideshow/source/engine/slide/userpaintoverlay.hxx
+++ b/slideshow/source/engine/slide/userpaintoverlay.hxx
@@ -65,7 +65,7 @@ namespace slideshow
~UserPaintOverlay();
UserPaintOverlay(const UserPaintOverlay&) = delete;
UserPaintOverlay& operator=(const UserPaintOverlay&) = delete;
- PolyPolygonVector const & getPolygons();
+ PolyPolygonVector const & getPolygons() const;
void drawPolygons();
private:
diff --git a/slideshow/source/engine/slidebitmap.cxx b/slideshow/source/engine/slidebitmap.cxx
index 7acd82207748..9c52fccd2359 100644
--- a/slideshow/source/engine/slidebitmap.cxx
+++ b/slideshow/source/engine/slidebitmap.cxx
@@ -107,7 +107,7 @@ namespace slideshow
maClipPoly = rClipPoly;
}
- const css::uno::Reference< css::rendering::XBitmap >& SlideBitmap::getXBitmap()
+ const css::uno::Reference< css::rendering::XBitmap >& SlideBitmap::getXBitmap() const
{
return mxBitmap;
}
diff --git a/slideshow/source/inc/shapeimporter.hxx b/slideshow/source/inc/shapeimporter.hxx
index 584b40941f37..b29c0b079d0c 100644
--- a/slideshow/source/inc/shapeimporter.hxx
+++ b/slideshow/source/inc/shapeimporter.hxx
@@ -90,9 +90,9 @@ public:
importShape() call.
*/
bool isImportDone() const;
- const PolyPolygonVector& getPolygons();
+ const PolyPolygonVector& getPolygons() const;
- double getImportedShapesCount() { return mnAscendingPrio; }
+ double getImportedShapesCount() const{ return mnAscendingPrio; }
private:
bool isSkip( css::uno::Reference<css::beans::XPropertySet> const& xPropSet,
OUString const& shapeType,
diff --git a/slideshow/source/inc/slidebitmap.hxx b/slideshow/source/inc/slidebitmap.hxx
index d311a6d1470c..f149138c4a7c 100644
--- a/slideshow/source/inc/slidebitmap.hxx
+++ b/slideshow/source/inc/slidebitmap.hxx
@@ -68,7 +68,7 @@ namespace slideshow
void move( const ::basegfx::B2DPoint& rNewPos );
void clip( const ::basegfx::B2DPolyPolygon& rClipPoly );
- const css::uno::Reference< css::rendering::XBitmap >& getXBitmap();
+ const css::uno::Reference< css::rendering::XBitmap >& getXBitmap() const;
private:
::basegfx::B2DPoint maOutputPos;
diff --git a/starmath/inc/cursor.hxx b/starmath/inc/cursor.hxx
index 2ba17fb0a46c..14897656c0a3 100644
--- a/starmath/inc/cursor.hxx
+++ b/starmath/inc/cursor.hxx
@@ -83,7 +83,7 @@ public:
const SmCaretPos& GetPosition() const { return mpPosition->CaretPos; }
/** True, if the cursor has a selection */
- bool HasSelection() { return mpAnchor != mpPosition; }
+ bool HasSelection() const { return mpAnchor != mpPosition; }
/** Move the position of this cursor */
void Move(OutputDevice* pDev, SmMovementDirection direction, bool bMoveAnchor = true);
diff --git a/starmath/inc/document.hxx b/starmath/inc/document.hxx
index c192ef2fc655..dd1f540a3fe3 100644
--- a/starmath/inc/document.hxx
+++ b/starmath/inc/document.hxx
@@ -157,7 +157,7 @@ public:
//Access for the View. This access is not for the OLE-case!
//and for the communication with the SFX!
//All internal printer uses should work with the SmPrinterAccess only
- bool HasPrinter() { return mpPrinter != nullptr; }
+ bool HasPrinter() const { return mpPrinter != nullptr; }
SfxPrinter *GetPrinter() { GetPrt(); return mpPrinter; }
void SetPrinter( SfxPrinter * );
@@ -168,9 +168,9 @@ public:
void UpdateText();
void SetText(const OUString& rBuffer);
- const OUString& GetText() { return maText; }
+ const OUString& GetText() const { return maText; }
void SetFormat(SmFormat const & rFormat);
- const SmFormat& GetFormat() { return maFormat; }
+ const SmFormat& GetFormat() const { return maFormat; }
void Parse();
SmParser & GetParser() { return maParser; }
@@ -205,7 +205,7 @@ public:
/** True, if cursor have previously been requested and thus
* has some sort of position.
*/
- bool HasCursor();
+ bool HasCursor() const;
void writeFormulaOoxml(const ::sax_fastparser::FSHelperPtr& pSerializer,
oox::core::OoxmlVersion version,
diff --git a/starmath/inc/visitors.hxx b/starmath/inc/visitors.hxx
index 39f5c6323064..e90e3e187a40 100644
--- a/starmath/inc/visitors.hxx
+++ b/starmath/inc/visitors.hxx
@@ -141,7 +141,7 @@ public:
virtual ~SmCaretPos2LineVisitor() {}
void Visit( SmTextNode* pNode ) override;
using SmDefaultingVisitor::Visit;
- const SmCaretLine& GetResult( ) {
+ const SmCaretLine& GetResult( ) const {
return maLine;
}
private:
diff --git a/starmath/source/cursor.cxx b/starmath/source/cursor.cxx
index b6575b8655b3..c7a1ba31e90e 100644
--- a/starmath/source/cursor.cxx
+++ b/starmath/source/cursor.cxx
@@ -40,7 +40,7 @@ void SmCursor::Move(OutputDevice* pDev, SmMovementDirection direction, bool bMov
best_line, //Best approximated line found so far
curr_line; //Current line
long dbp_sq = 0; //Distance squared to best line
- for(auto &pEntry : *mpGraph)
+ for(const auto &pEntry : *mpGraph)
{
//Reject it if it's the current position
if(pEntry->CaretPos == mpPosition->CaretPos) continue;
@@ -84,7 +84,7 @@ void SmCursor::MoveTo(OutputDevice* pDev, const Point& pos, bool bMoveAnchor)
SmCaretPosGraphEntry* NewPos = nullptr;
long dp_sq = 0, //Distance to current line squared
dbp_sq = 1; //Distance to best line squared
- for(auto &pEntry : *mpGraph)
+ for(const auto &pEntry : *mpGraph)
{
OSL_ENSURE(pEntry->CaretPos.IsValid(), "The caret position graph may not have invalid positions!");
//Compute current line
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index b3c7c512e3b0..62f0e0fc04fd 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -468,7 +468,7 @@ SmCursor& SmDocShell::GetCursor(){
return *mpCursor;
}
-bool SmDocShell::HasCursor() { return mpCursor != nullptr; }
+bool SmDocShell::HasCursor() const { return mpCursor != nullptr; }
SmPrinterAccess::SmPrinterAccess( SmDocShell &rDocShell )
{
diff --git a/starmath/source/mathmlexport.hxx b/starmath/source/mathmlexport.hxx
index ba7abf51d0ce..72ce800ad3af 100644
--- a/starmath/source/mathmlexport.hxx
+++ b/starmath/source/mathmlexport.hxx
@@ -107,7 +107,7 @@ public:
virtual void GetViewSettings(css::uno::Sequence<css::beans::PropertyValue>& aProps) override;
virtual void GetConfigurationSettings(css::uno::Sequence<css::beans::PropertyValue>& aProps) override;
- bool GetSuccess() {return bSuccess;}
+ bool GetSuccess() const {return bSuccess;}
};
diff --git a/starmath/source/mathmlimport.hxx b/starmath/source/mathmlimport.hxx
index c9a2f9d1f17c..2357c9f09bf9 100644
--- a/starmath/source/mathmlimport.hxx
+++ b/starmath/source/mathmlimport.hxx
@@ -180,8 +180,8 @@ public:
SmNodeStack & GetNodeStack() { return aNodeStack; }
- bool GetSuccess() { return bSuccess; }
- [[nodiscard]] const OUString& GetText() { return aText; }
+ bool GetSuccess() const { return bSuccess; }
+ [[nodiscard]] const OUString& GetText() const { return aText; }
void SetText(const OUString &rStr) { aText = rStr; }
virtual void SetViewSettings(const css::uno::Sequence<css::beans::PropertyValue>& aViewProps) override;
More information about the Libreoffice-commits
mailing list