loplugin:constmethod in sdext..starmath
Change-Id: Ib1b60382c9ec62f35f0f232c3f2c2d5664ea669e Reviewed-on: https://gerrit.libreoffice.org/79779 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
@@ -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; };
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -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; }
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -517,7 +517,7 @@ bool ShapeImporter::isImportDone() const
|
||||
return maShapesStack.empty();
|
||||
}
|
||||
|
||||
const PolyPolygonVector& ShapeImporter::getPolygons()
|
||||
const PolyPolygonVector& ShapeImporter::getPolygons() const
|
||||
{
|
||||
return maPolygons;
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 )
|
||||
{
|
||||
|
||||
@@ -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;}
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user