[Libreoffice-commits] core.git: comphelper/source compilerplugins/clang cpputools/source dbaccess/source editeng/source include/basegfx include/svl include/tools include/vcl sfx2/source svl/source svx/source tools/source vcl/inc vcl/source vcl/unx
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Thu Sep 30 17:01:34 UTC 2021
comphelper/source/property/propagg.cxx | 4 +-
compilerplugins/clang/constmethod.cxx | 42 +++++++++++++++++++++-----
cpputools/source/unoexe/unoexe.cxx | 4 +-
dbaccess/source/ui/misc/TableCopyHelper.cxx | 8 ++---
editeng/source/outliner/outliner.cxx | 3 -
include/basegfx/matrix/b2dhommatrix.hxx | 12 +++----
include/svl/inethist.hxx | 6 +--
include/tools/XmlWalker.hxx | 2 -
include/vcl/BinaryDataContainer.hxx | 4 +-
include/vcl/BitmapInfoAccess.hxx | 2 -
include/vcl/GraphicObject.hxx | 4 +-
include/vcl/RawBitmap.hxx | 4 +-
include/vcl/builder.hxx | 2 -
include/vcl/gfxlink.hxx | 2 -
include/vcl/imapcirc.hxx | 2 -
include/vcl/imapobj.hxx | 2 -
include/vcl/imaprect.hxx | 2 -
include/vcl/outdev.hxx | 4 +-
include/vcl/print.hxx | 2 -
include/vcl/scrbar.hxx | 4 +-
include/vcl/status.hxx | 2 -
include/vcl/texteng.hxx | 2 -
include/vcl/textview.hxx | 8 ++---
include/vcl/toolbox.hxx | 4 +-
include/vcl/toolkit/button.hxx | 4 +-
include/vcl/toolkit/edit.hxx | 2 -
include/vcl/toolkit/fixedhyper.hxx | 2 -
include/vcl/toolkit/svtabbx.hxx | 2 -
include/vcl/toolkit/treelistbox.hxx | 6 +--
include/vcl/transfer.hxx | 44 ++++++++++++++--------------
include/vcl/txtattr.hxx | 8 ++---
include/vcl/xtextedt.hxx | 2 -
sfx2/source/doc/SfxRedactionHelper.cxx | 6 +--
svl/source/misc/inethist.cxx | 2 -
svx/source/fmcomp/dbaexchange.cxx | 2 -
tools/source/xml/XmlWalker.cxx | 2 -
vcl/inc/bitmap/impoctree.hxx | 4 +-
vcl/inc/impfontmetricdata.hxx | 2 -
vcl/inc/listbox.hxx | 4 +-
vcl/inc/salvtables.hxx | 2 -
vcl/inc/scrwnd.hxx | 2 -
vcl/inc/slider.hxx | 10 +++---
vcl/inc/svimpbox.hxx | 2 -
vcl/inc/unx/i18n_ic.hxx | 4 +-
vcl/inc/unx/i18n_im.hxx | 4 +-
vcl/inc/unx/printerjob.hxx | 4 +-
vcl/inc/verticaltabctrl.hxx | 2 -
vcl/inc/wizdlg.hxx | 2 -
vcl/source/app/salvtables.cxx | 2 -
vcl/source/control/button.cxx | 4 +-
vcl/source/control/edit.cxx | 2 -
vcl/source/control/fixedhyper.cxx | 2 -
vcl/source/control/imp_listbox.cxx | 4 +-
vcl/source/control/ivctrl.cxx | 2 -
vcl/source/control/scrbar.cxx | 4 +-
vcl/source/control/slider.cxx | 10 +++---
vcl/source/control/wizardmachine.cxx | 3 +
vcl/source/edit/texteng.cxx | 2 -
vcl/source/edit/textview.cxx | 8 ++---
vcl/source/edit/xtextedt.cxx | 2 -
vcl/source/filter/idxf/dxf2mtf.cxx | 6 +--
vcl/source/filter/idxf/dxf2mtf.hxx | 6 +--
vcl/source/filter/imet/ios2met.cxx | 8 ++---
vcl/source/filter/itiff/itiff.cxx | 4 +-
vcl/source/font/fontmetric.cxx | 2 -
vcl/source/gdi/gfxlink.cxx | 2 -
vcl/source/gdi/print.cxx | 2 -
vcl/source/graphic/GraphicObject.cxx | 2 -
vcl/source/graphic/GraphicObject2.cxx | 2 -
vcl/source/outdev/font.cxx | 2 -
vcl/source/outdev/text.cxx | 2 -
vcl/source/outdev/transparent.cxx | 4 +-
vcl/source/treelist/imap.cxx | 6 +--
vcl/source/treelist/svimpbox.cxx | 2 -
vcl/source/treelist/svtabbx.cxx | 2 -
vcl/source/treelist/transfer.cxx | 44 ++++++++++++++--------------
vcl/source/treelist/treelistbox.cxx | 6 +--
vcl/source/window/builder.cxx | 2 -
vcl/source/window/menubarwindow.cxx | 4 +-
vcl/source/window/menubarwindow.hxx | 4 +-
vcl/source/window/menufloatingwindow.cxx | 2 -
vcl/source/window/menufloatingwindow.hxx | 2 -
vcl/source/window/menuitemlist.hxx | 2 -
vcl/source/window/scrwnd.cxx | 2 -
vcl/source/window/status.cxx | 2 -
vcl/source/window/toolbox.cxx | 2 -
vcl/source/window/toolbox2.cxx | 2 -
vcl/unx/generic/dtrans/bmp.cxx | 2 -
vcl/unx/generic/dtrans/bmp.hxx | 2 -
vcl/unx/generic/print/printerjob.cxx | 4 +-
90 files changed, 228 insertions(+), 206 deletions(-)
New commits:
commit 7183b3ba237dc7718501acb512d5ae1c5d0d5f6b
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Sep 30 15:28:38 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Sep 30 19:00:57 2021 +0200
loplugin:constmethod handle more cases
remove some of the naming limitations, and handle pointer parameters
better.
I only let the plugin run up till vcl/
Change-Id: Ice916e0157031ab531c47f10778f406b07966251
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122892
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/comphelper/source/property/propagg.cxx b/comphelper/source/property/propagg.cxx
index 576621246207..a93c82c98fae 100644
--- a/comphelper/source/property/propagg.cxx
+++ b/comphelper/source/property/propagg.cxx
@@ -264,7 +264,7 @@ namespace internal
/** checks whether the forwarder is responsible for the given property
*/
- bool isResponsibleFor( sal_Int32 _nHandle );
+ bool isResponsibleFor( sal_Int32 _nHandle ) const;
/// actually forwards a property value to the aggregate
///
@@ -288,7 +288,7 @@ namespace internal
}
- bool PropertyForwarder::isResponsibleFor( sal_Int32 _nHandle )
+ bool PropertyForwarder::isResponsibleFor( sal_Int32 _nHandle ) const
{
return m_aProperties.find( _nHandle ) != m_aProperties.end();
}
diff --git a/compilerplugins/clang/constmethod.cxx b/compilerplugins/clang/constmethod.cxx
index 45451152dc99..fc3e92bf709c 100644
--- a/compilerplugins/clang/constmethod.cxx
+++ b/compilerplugins/clang/constmethod.cxx
@@ -43,6 +43,17 @@ public:
explicit ConstMethod(loplugin::InstantiationData const & data): FunctionAddress(data) {}
virtual void run() override {
+ std::string fn(handler.getMainFileName());
+ loplugin::normalizeDotDotInFilePath(fn);
+ // things I'm not sure about
+ if (loplugin::hasPathnamePrefix(fn, SRCDIR "/svl/unx/source/svdde/ddedummy.cxx")
+ || loplugin::hasPathnamePrefix(fn, SRCDIR "/svl/source/numbers/zformat.cxx")
+ || loplugin::hasPathnamePrefix(fn, SRCDIR "/svl/source/numbers/zforscan.cxx")
+ || loplugin::hasPathnamePrefix(fn, SRCDIR "/svl/source/numbers/zforlist.cxx")
+ || loplugin::hasPathnamePrefix(fn, SRCDIR "/vcl/source/gdi/impgraph.cxx")
+ || loplugin::hasPathnamePrefix(fn, SRCDIR "/vcl/source/image/ImplImage.cxx"))
+ return;
+
TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
for (const CXXMethodDecl *pMethodDecl : interestingMethodSet) {
@@ -52,9 +63,22 @@ public:
if (getFunctionsWithAddressTaken().find((FunctionDecl const *)canonicalDecl)
!= getFunctionsWithAddressTaken().end())
continue;
+ // things that I don't think should be logically const
+ std::string fqn = pMethodDecl->getQualifiedNameAsString();
+ if (fqn == "comphelper::EmbeddedObjectContainer::CommitImageSubStorage"
+ || fqn == "SvtLinguConfig::SetProperty"
+ || fqn == "SvtLinguConfig::ReplaceSetProperties"
+ || fqn == "SystemWindow::UpdatePositionData"
+ || fqn == "OutputDevice::SelectClipRegion"
+ || fqn == "OutputDevice::BlendBitmap")
+ continue;
StringRef aFileName = getFilenameOfLocation(compiler.getSourceManager().getSpellingLoc(compat::getBeginLoc(canonicalDecl)));
+ // leave the kit API alone
if (loplugin::isSamePathname(aFileName, SRCDIR "/include/LibreOfficeKit/LibreOfficeKit.hxx"))
continue;
+ // don't feel like touching this right now
+ if (loplugin::isSamePathname(aFileName, SRCDIR "/include/vcl/weld.hxx"))
+ continue;
report(
DiagnosticsEngine::Warning,
"this method can be const",
@@ -140,8 +164,8 @@ bool ConstMethod::VisitCXXMethodDecl(const CXXMethodDecl * cxxMethodDecl)
if (!cxxMethodDecl->getIdentifier())
return true;
- if (cxxMethodDecl->getNumParams() > 0)
- return true;
+// if (cxxMethodDecl->getNumParams() > 0)
+// return true;
// returning pointers or refs to non-const stuff, and then having the whole method
// be const doesn't seem like a good idea
auto tc = loplugin::TypeCheck(cxxMethodDecl->getReturnType());
@@ -153,11 +177,11 @@ bool ConstMethod::VisitCXXMethodDecl(const CXXMethodDecl * cxxMethodDecl)
if (tc.Void())
return true;
- StringRef name = cxxMethodDecl->getName();
- if (!name.startswith("get") && !name.startswith("Get")
- && !name.startswith("is") && !name.startswith("Is")
- && !name.startswith("has") && !name.startswith("Has"))
- return true;
+// StringRef name = cxxMethodDecl->getName();
+// if (!name.startswith("get") && !name.startswith("Get")
+// && !name.startswith("is") && !name.startswith("Is")
+// && !name.startswith("has") && !name.startswith("Has"))
+// return true;
// something lacking in my analysis here
if (loplugin::DeclCheck(cxxMethodDecl).Function("GetDescr").Class("SwRangeRedline").GlobalNamespace())
@@ -214,11 +238,11 @@ bool ConstMethod::checkIfCanBeConst(const Stmt* stmt, const CXXMethodDecl* cxxMe
if (auto unaryOperator = dyn_cast<UnaryOperator>(parent)) {
UnaryOperator::Opcode op = unaryOperator->getOpcode();
- if (op == UO_AddrOf || op == UO_PreInc || op == UO_PostInc
+ if (op == UO_PreInc || op == UO_PostInc
|| op == UO_PreDec || op == UO_PostDec) {
return false;
}
- if (op == UO_Deref) {
+ if (op == UO_Deref || op == UO_AddrOf) {
return checkIfCanBeConst(parent, cxxMethodDecl);
}
return true;
diff --git a/cpputools/source/unoexe/unoexe.cxx b/cpputools/source/unoexe/unoexe.cxx
index 34be8e964ca8..46d43e344757 100644
--- a/cpputools/source/unoexe/unoexe.cxx
+++ b/cpputools/source/unoexe/unoexe.cxx
@@ -245,7 +245,7 @@ class OInstanceProvider
OUString _aInstanceName;
/// @throws Exception
- inline Reference< XInterface > createInstance();
+ inline Reference< XInterface > createInstance() const;
public:
OInstanceProvider( const Reference< XComponentContext > & xContext,
@@ -267,7 +267,7 @@ public:
}
-inline Reference< XInterface > OInstanceProvider::createInstance()
+inline Reference< XInterface > OInstanceProvider::createInstance() const
{
Reference< XInterface > xRet;
if (!_aImplName.isEmpty()) // manually via loader
diff --git a/dbaccess/source/ui/misc/TableCopyHelper.cxx b/dbaccess/source/ui/misc/TableCopyHelper.cxx
index b61718f3da71..a51e1a124f51 100644
--- a/dbaccess/source/ui/misc/TableCopyHelper.cxx
+++ b/dbaccess/source/ui/misc/TableCopyHelper.cxx
@@ -184,9 +184,9 @@ void OTableCopyHelper::pasteTable( SotClipboardFormatId _nFormatId
DropDescriptor aTrans;
bool bOk;
if ( _nFormatId != SotClipboardFormatId::RTF )
- bOk = const_cast<TransferableDataHelper&>(_rTransData).GetSotStorageStream(SotClipboardFormatId::HTML ,aTrans.aHtmlRtfStorage);
+ bOk = _rTransData.GetSotStorageStream(SotClipboardFormatId::HTML ,aTrans.aHtmlRtfStorage);
else
- bOk = const_cast<TransferableDataHelper&>(_rTransData).GetSotStorageStream(SotClipboardFormatId::RTF,aTrans.aHtmlRtfStorage);
+ bOk = _rTransData.GetSotStorageStream(SotClipboardFormatId::RTF,aTrans.aHtmlRtfStorage);
aTrans.nType = E_TABLE;
aTrans.bHtml = SotClipboardFormatId::HTML == _nFormatId;
@@ -258,9 +258,9 @@ bool OTableCopyHelper::copyTagTable(const TransferableDataHelper& _aDroppedData
{
bool bOk;
if ( bHtml )
- bOk = const_cast<TransferableDataHelper&>(_aDroppedData).GetSotStorageStream(SotClipboardFormatId::HTML ,_rAsyncDrop.aHtmlRtfStorage);
+ bOk = _aDroppedData.GetSotStorageStream(SotClipboardFormatId::HTML ,_rAsyncDrop.aHtmlRtfStorage);
else
- bOk = const_cast<TransferableDataHelper&>(_aDroppedData).GetSotStorageStream(SotClipboardFormatId::RTF,_rAsyncDrop.aHtmlRtfStorage);
+ bOk = _aDroppedData.GetSotStorageStream(SotClipboardFormatId::RTF,_rAsyncDrop.aHtmlRtfStorage);
_rAsyncDrop.bHtml = bHtml;
_rAsyncDrop.bError = !copyTagTable(_rAsyncDrop,true,_xConnection);
diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index 7f6313e5c13c..73e831b93ec9 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -1032,8 +1032,7 @@ void Outliner::PaintBullet(sal_Int32 nPara, const Point& rStartPos, const Point&
}
else
{
- // Remove CAST when KA made the Draw-Method const
- const_cast<GraphicObject*>(pFmt->GetBrush()->GetGraphicObject())->Draw(rOutDev, aBulletPos, pPara->aBulSize);
+ pFmt->GetBrush()->GetGraphicObject()->Draw(rOutDev, aBulletPos, pPara->aBulSize);
}
}
}
diff --git a/include/basegfx/matrix/b2dhommatrix.hxx b/include/basegfx/matrix/b2dhommatrix.hxx
index 60b32fb09f00..d7fa5b4421ef 100644
--- a/include/basegfx/matrix/b2dhommatrix.hxx
+++ b/include/basegfx/matrix/b2dhommatrix.hxx
@@ -61,17 +61,17 @@ namespace basegfx
}
// Convenience accessor for value at 0,0 position in the matrix
- double a() { return get(0,0); }
+ double a() const { return get(0,0); }
// Convenience accessor for value at 1,0 position in the matrix
- double b() { return get(1,0); }
+ double b() const { return get(1,0); }
// Convenience accessor for value at 0,1 position in the matrix
- double c() { return get(0,1); }
+ double c() const { return get(0,1); }
// Convenience accessor for value at 1,1 position in the matrix
- double d() { return get(1,1); }
+ double d() const { return get(1,1); }
// Convenience accessor for value at 0,2 position in the matrix
- double e() { return get(0,2); }
+ double e() const { return get(0,2); }
// Convenience accessor for value at 1,2 position in the matrix
- double f() { return get(1,2); }
+ double f() const { return get(1,2); }
/** constructor to allow setting all needed values for a 3x2 matrix at once. The
parameter f_0x1 e.g. is the same as using set(0, 1, f)
diff --git a/include/svl/inethist.hxx b/include/svl/inethist.hxx
index 21f7b6e2f940..92bbca72b09f 100644
--- a/include/svl/inethist.hxx
+++ b/include/svl/inethist.hxx
@@ -42,7 +42,7 @@ class SVL_DLLPUBLIC INetURLHistory final : public SfxBroadcaster
SAL_DLLPRIVATE static void NormalizeUrl_Impl (INetURLObject &rUrl);
void PutUrl_Impl (const INetURLObject &rUrl);
- bool QueryUrl_Impl (const INetURLObject &rUrl);
+ bool QueryUrl_Impl (const INetURLObject &rUrl) const;
/** Not implemented.
*/
@@ -66,7 +66,7 @@ public:
/** QueryUrl.
*/
- bool QueryUrl (const INetURLObject &rUrl)
+ bool QueryUrl (const INetURLObject &rUrl) const
{
if (QueryProtocol (rUrl.GetProtocol()))
return QueryUrl_Impl (rUrl);
@@ -74,7 +74,7 @@ public:
return false;
}
- bool QueryUrl (const OUString &rUrl)
+ bool QueryUrl (const OUString &rUrl) const
{
INetProtocol eProto =
INetURLObject::CompareProtocolScheme (rUrl);
diff --git a/include/tools/XmlWalker.hxx b/include/tools/XmlWalker.hxx
index 65beb4531003..ba9d18e856a6 100644
--- a/include/tools/XmlWalker.hxx
+++ b/include/tools/XmlWalker.hxx
@@ -49,7 +49,7 @@ public:
void parent();
void next();
bool isValid() const;
- OString attribute(const OString& sName);
+ OString attribute(const OString& sName) const;
};
} // end tools namespace
diff --git a/include/vcl/BinaryDataContainer.hxx b/include/vcl/BinaryDataContainer.hxx
index d6c6848c48f6..b7421e9874c0 100644
--- a/include/vcl/BinaryDataContainer.hxx
+++ b/include/vcl/BinaryDataContainer.hxx
@@ -58,9 +58,9 @@ public:
size_t calculateHash() const;
- auto cbegin() { return mpData->cbegin(); }
+ auto cbegin() const { return mpData->cbegin(); }
- auto cend() { return mpData->cend(); }
+ auto cend() const { return mpData->cend(); }
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/BitmapInfoAccess.hxx b/include/vcl/BitmapInfoAccess.hxx
index a6bca5627aa2..c0ef7fb5be1e 100644
--- a/include/vcl/BitmapInfoAccess.hxx
+++ b/include/vcl/BitmapInfoAccess.hxx
@@ -77,7 +77,7 @@ public:
return mpBuffer ? mpBuffer->mnBitCount : 0;
}
- BitmapColor GetBestMatchingColor(const BitmapColor& rBitmapColor)
+ BitmapColor GetBestMatchingColor(const BitmapColor& rBitmapColor) const
{
if (HasPalette())
return BitmapColor(static_cast<sal_uInt8>(GetBestPaletteIndex(rBitmapColor)));
diff --git a/include/vcl/GraphicObject.hxx b/include/vcl/GraphicObject.hxx
index 980f686f6ba9..7ebaa274e047 100644
--- a/include/vcl/GraphicObject.hxx
+++ b/include/vcl/GraphicObject.hxx
@@ -144,7 +144,7 @@ private:
int nNumTilesY,
const Size& rTileSize,
const GraphicAttr* pAttr
- );
+ ) const;
void VCL_DLLPRIVATE ImplTransformBitmap(
BitmapEx& rBmpEx,
@@ -221,7 +221,7 @@ public:
bool Draw(OutputDevice& rOut,
const Point& rPt,
const Size& rSz,
- const GraphicAttr* pAttr = nullptr);
+ const GraphicAttr* pAttr = nullptr) const;
/** Draw the graphic repeatedly into the given output rectangle
diff --git a/include/vcl/RawBitmap.hxx b/include/vcl/RawBitmap.hxx
index 19fe94cd2c59..12c924dbb8ba 100644
--- a/include/vcl/RawBitmap.hxx
+++ b/include/vcl/RawBitmap.hxx
@@ -69,8 +69,8 @@ public:
}
// so we don't accidentally leave any code in that uses palette color indexes
void SetPixel(tools::Long nY, tools::Long nX, BitmapColor nColor) = delete;
- tools::Long Height() { return maSize.Height(); }
- tools::Long Width() { return maSize.Width(); }
+ tools::Long Height() const { return maSize.Height(); }
+ tools::Long Width() const { return maSize.Width(); }
sal_uInt8 GetBitCount() const { return mnBitCount; }
};
diff --git a/include/vcl/builder.hxx b/include/vcl/builder.hxx
index 8c276e40e32a..504438bdab40 100644
--- a/include/vcl/builder.hxx
+++ b/include/vcl/builder.hxx
@@ -374,7 +374,7 @@ private:
void handleSizeGroup(xmlreader::XmlReader &reader);
- stringmap handleAtkObject(xmlreader::XmlReader &reader);
+ stringmap handleAtkObject(xmlreader::XmlReader &reader) const;
static void applyAtkProperties(vcl::Window *pWindow, const stringmap& rProperties);
diff --git a/include/vcl/gfxlink.hxx b/include/vcl/gfxlink.hxx
index 790589e68225..ad4caebc7b86 100644
--- a/include/vcl/gfxlink.hxx
+++ b/include/vcl/gfxlink.hxx
@@ -101,7 +101,7 @@ public:
bool IsNative() const;
- bool LoadNative( Graphic& rGraphic );
+ bool LoadNative( Graphic& rGraphic ) const;
bool ExportNative( SvStream& rOStream ) const;
diff --git a/include/vcl/imapcirc.hxx b/include/vcl/imapcirc.hxx
index e7dac3b32b3c..4fc5808afe63 100644
--- a/include/vcl/imapcirc.hxx
+++ b/include/vcl/imapcirc.hxx
@@ -57,7 +57,7 @@ public:
void Scale( const Fraction& rFractX, const Fraction& rFracY );
using IMapObject::IsEqual;
- bool IsEqual( const IMapCircleObject& rEqObj );
+ bool IsEqual( const IMapCircleObject& rEqObj ) const;
// import/export
void WriteCERN( SvStream& rOStm ) const;
diff --git a/include/vcl/imapobj.hxx b/include/vcl/imapobj.hxx
index 14a7a647e884..54498a65cc34 100644
--- a/include/vcl/imapobj.hxx
+++ b/include/vcl/imapobj.hxx
@@ -117,7 +117,7 @@ public:
bool IsActive() const { return bActive; }
void SetActive( bool bSetActive ) { bActive = bSetActive; }
- bool IsEqual( const IMapObject& rEqObj );
+ bool IsEqual( const IMapObject& rEqObj ) const;
// IMap-Events
const SvxMacroTableDtor& GetMacroTable() const { return aEventList;}
diff --git a/include/vcl/imaprect.hxx b/include/vcl/imaprect.hxx
index 5870779f4912..6637bb771935 100644
--- a/include/vcl/imaprect.hxx
+++ b/include/vcl/imaprect.hxx
@@ -55,7 +55,7 @@ public:
void Scale( const Fraction& rFractX, const Fraction& rFracY );
using IMapObject::IsEqual;
- bool IsEqual( const IMapRectangleObject& rEqObj );
+ bool IsEqual( const IMapRectangleObject& rEqObj ) const;
// import/export
void WriteCERN( SvStream& rOStm ) const;
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 286a64b48bda..eb74ae2f248e 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -967,7 +967,7 @@ public:
sal_uLong nLayoutWidth = 0, const tools::Long* pDXArray = nullptr,
const SalLayoutGlyphs* pGlyphs = nullptr ) const;
- tools::Rectangle ImplGetTextBoundRect( const SalLayout& );
+ tools::Rectangle ImplGetTextBoundRect( const SalLayout& ) const;
bool GetTextOutline( tools::PolyPolygon&,
const OUString& rStr ) const;
@@ -1132,7 +1132,7 @@ public:
ImplGetEmphasisMarkStyle( const vcl::Font& rFont );
bool GetGlyphBoundRects( const Point& rOrigin, const OUString& rStr, int nIndex,
- int nLen, std::vector< tools::Rectangle >& rVector );
+ int nLen, std::vector< tools::Rectangle >& rVector ) const;
sal_Int32 HasGlyphs( const vcl::Font& rFont, const OUString& rStr,
sal_Int32 nIndex = 0, sal_Int32 nLen = -1 ) const;
diff --git a/include/vcl/print.hxx b/include/vcl/print.hxx
index b6ea7000436c..f67145335357 100644
--- a/include/vcl/print.hxx
+++ b/include/vcl/print.hxx
@@ -246,7 +246,7 @@ public:
const Size& GetPaperSizePixel() const { return maPaperSize; }
Size GetPaperSize() const { return PixelToLogic( maPaperSize ); }
- Size GetPaperSize( int nPaper );
+ Size GetPaperSize( int nPaper ) const;
const Point& GetPageOffsetPixel() const { return maPageOffset; }
Point GetPageOffset() const { return PixelToLogic( maPageOffset ); }
diff --git a/include/vcl/scrbar.hxx b/include/vcl/scrbar.hxx
index a85df6665f2c..77cbbb657b5a 100644
--- a/include/vcl/scrbar.hxx
+++ b/include/vcl/scrbar.hxx
@@ -70,8 +70,8 @@ private:
SAL_DLLPRIVATE void ImplInit( vcl::Window* pParent, WinBits nStyle );
SAL_DLLPRIVATE void ImplInitStyle( WinBits nStyle );
SAL_DLLPRIVATE void ImplUpdateRects( bool bUpdate = true );
- SAL_DLLPRIVATE tools::Long ImplCalcThumbPos( tools::Long nPixPos );
- SAL_DLLPRIVATE tools::Long ImplCalcThumbPosPix( tools::Long nPos );
+ SAL_DLLPRIVATE tools::Long ImplCalcThumbPos( tools::Long nPixPos ) const;
+ SAL_DLLPRIVATE tools::Long ImplCalcThumbPosPix( tools::Long nPos ) const;
SAL_DLLPRIVATE void ImplCalc( bool bUpdate = true );
SAL_DLLPRIVATE void ImplDraw(vcl::RenderContext& rRenderContext);
using Window::ImplScroll;
diff --git a/include/vcl/status.hxx b/include/vcl/status.hxx
index 834fbe4bd7ba..91a6ed64374f 100644
--- a/include/vcl/status.hxx
+++ b/include/vcl/status.hxx
@@ -91,7 +91,7 @@ private:
SAL_DLLPRIVATE void ImplInit( vcl::Window* pParent, WinBits nStyle );
SAL_DLLPRIVATE void ImplInitSettings();
SAL_DLLPRIVATE void ImplFormat();
- SAL_DLLPRIVATE bool ImplIsItemUpdate();
+ SAL_DLLPRIVATE bool ImplIsItemUpdate() const;
SAL_DLLPRIVATE void ImplDrawText(vcl::RenderContext& rRenderContext);
SAL_DLLPRIVATE void ImplDrawItem(vcl::RenderContext& rRenderContext, bool bOffScreen,
diff --git a/include/vcl/texteng.hxx b/include/vcl/texteng.hxx
index 7ad2a7e85b91..0a532afb2891 100644
--- a/include/vcl/texteng.hxx
+++ b/include/vcl/texteng.hxx
@@ -185,7 +185,7 @@ class VCL_DLLPUBLIC TextEngine : public SfxBroadcaster
static void ImpInitLayoutMode( OutputDevice* pOutDev );
TxtAlign ImpGetAlign() const;
- tools::Long CalcTextHeight();
+ tools::Long CalcTextHeight() const;
tools::Long CalcParaHeight( sal_uInt32 nParagraph ) const;
tools::Long CalcTextWidth( sal_uInt32 nPara );
tools::Long CalcTextWidth( sal_uInt32 nPara, sal_Int32 nPortionStart, sal_Int32 nPortionLen);
diff --git a/include/vcl/textview.hxx b/include/vcl/textview.hxx
index 116d4d59e1e5..0983fa8eb660 100644
--- a/include/vcl/textview.hxx
+++ b/include/vcl/textview.hxx
@@ -93,7 +93,7 @@ class VCL_DLLPUBLIC TextView final : public vcl::unohelper::DragAndDropClient
TextSelection const & ImpMoveCursor( const KeyEvent& rKeyEvent );
TextPaM ImpDelete( sal_uInt8 nMode, sal_uInt8 nDelMode );
- bool IsInSelection( const TextPaM& rPaM );
+ bool IsInSelection( const TextPaM& rPaM ) const;
void ImpPaint(vcl::RenderContext& rRenderContext, const Point& rStartPos, tools::Rectangle const* pPaintArea, TextSelection const* pSelection);
void ImpPaint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect);
@@ -105,7 +105,7 @@ class VCL_DLLPUBLIC TextView final : public vcl::unohelper::DragAndDropClient
void ImpShowDDCursor();
bool ImplTruncateNewText( OUString& rNewText ) const;
- bool ImplCheckTextLen( const OUString& rNewText );
+ bool ImplCheckTextLen( const OUString& rNewText ) const;
// DragAndDropClient
virtual void dragGestureRecognized( const css::datatransfer::dnd::DragGestureEvent& dge ) override;
@@ -141,8 +141,8 @@ public:
void SetSelection( const TextSelection& rNewSel, bool bGotoCursor );
bool HasSelection() const;
- OUString GetSelected();
- OUString GetSelected( LineEnd aSeparator );
+ OUString GetSelected() const;
+ OUString GetSelected( LineEnd aSeparator ) const;
void DeleteSelected();
void InsertText( const OUString& rNew );
diff --git a/include/vcl/toolbox.hxx b/include/vcl/toolbox.hxx
index 68a57930b2e0..cdbc032ea509 100644
--- a/include/vcl/toolbox.hxx
+++ b/include/vcl/toolbox.hxx
@@ -211,7 +211,7 @@ private:
SAL_DLLPRIVATE bool ImplIsInPopupMode() const;
SAL_DLLPRIVATE const OUString& ImplGetHelpText( ToolBoxItemId nItemId ) const;
SAL_DLLPRIVATE Size ImplGetOptimalFloatingSize();
- SAL_DLLPRIVATE bool ImplHasExternalMenubutton();
+ SAL_DLLPRIVATE bool ImplHasExternalMenubutton() const;
SAL_DLLPRIVATE void ImplDrawFloatwinBorder(vcl::RenderContext& rRenderContext, ImplToolItem const * pItem );
DECL_DLLPRIVATE_LINK( ImplUpdateHdl, Timer*, void );
@@ -239,7 +239,7 @@ public:
SAL_DLLPRIVATE void ImplDrawGrip(vcl::RenderContext& rRenderContext);
SAL_DLLPRIVATE void ImplDrawGradientBackground(vcl::RenderContext& rRenderContext);
- SAL_DLLPRIVATE bool ImplDrawNativeBackground(vcl::RenderContext& rRenderContext);
+ SAL_DLLPRIVATE bool ImplDrawNativeBackground(vcl::RenderContext& rRenderContext) const;
SAL_DLLPRIVATE void ImplDrawTransparentBackground(const vcl::Region &rRegion);
SAL_DLLPRIVATE static void ImplDrawConstantBackground(vcl::RenderContext& rRenderContext, const vcl::Region &rRegion, bool bIsInPopupMode);
SAL_DLLPRIVATE void ImplDrawBackground(vcl::RenderContext& rRenderContext, const tools::Rectangle &rRect);
diff --git a/include/vcl/toolkit/button.hxx b/include/vcl/toolkit/button.hxx
index b2799f573fee..e68818ab62de 100644
--- a/include/vcl/toolkit/button.hxx
+++ b/include/vcl/toolkit/button.hxx
@@ -49,7 +49,7 @@ private:
Button (const Button &) = delete;
Button & operator= (const Button &) = delete;
public:
- SAL_DLLPRIVATE DrawTextFlags ImplGetTextStyle( WinBits nWinStyle, SystemTextColorFlags nSystemTextColorFlags );
+ SAL_DLLPRIVATE DrawTextFlags ImplGetTextStyle( WinBits nWinStyle, SystemTextColorFlags nSystemTextColorFlags ) const;
SAL_DLLPRIVATE void ImplDrawAlignedImage(OutputDevice* pDev, Point& rPos, Size& rSize,
sal_Int32 nImageSep,
DrawTextFlags nTextStyle, tools::Rectangle *pSymbolRect=nullptr, bool bAddImageSep = false );
@@ -384,7 +384,7 @@ private:
bool mbUsesExplicitGroup;
Link<RadioButton&,void> maToggleHdl;
SAL_DLLPRIVATE void ImplInitRadioButtonData();
- SAL_DLLPRIVATE WinBits ImplInitStyle( const vcl::Window* pPrevWindow, WinBits nStyle );
+ SAL_DLLPRIVATE WinBits ImplInitStyle( const vcl::Window* pPrevWindow, WinBits nStyle ) const;
SAL_DLLPRIVATE void ImplInitSettings( bool bBackground );
SAL_DLLPRIVATE void ImplDrawRadioButtonState(vcl::RenderContext& rRenderContext);
SAL_DLLPRIVATE void ImplDraw( OutputDevice* pDev, SystemTextColorFlags nSystemTextColorFlags,
diff --git a/include/vcl/toolkit/edit.hxx b/include/vcl/toolkit/edit.hxx
index f59d12f9d9fd..6cba936040eb 100644
--- a/include/vcl/toolkit/edit.hxx
+++ b/include/vcl/toolkit/edit.hxx
@@ -143,7 +143,7 @@ protected:
virtual void ApplySettings(vcl::RenderContext& rRenderContext) override;
public:
// public because needed in button.cxx
- SAL_DLLPRIVATE bool ImplUseNativeBorder(vcl::RenderContext const & rRenderContext, WinBits nStyle);
+ SAL_DLLPRIVATE bool ImplUseNativeBorder(vcl::RenderContext const & rRenderContext, WinBits nStyle) const;
Edit( vcl::Window* pParent, WinBits nStyle = WB_BORDER );
virtual ~Edit() override;
diff --git a/include/vcl/toolkit/fixedhyper.hxx b/include/vcl/toolkit/fixedhyper.hxx
index 084a508a427b..ebfbd558644f 100644
--- a/include/vcl/toolkit/fixedhyper.hxx
+++ b/include/vcl/toolkit/fixedhyper.hxx
@@ -42,7 +42,7 @@ private:
void Initialize();
/** is position X position hitting text */
- SAL_DLLPRIVATE bool ImplIsOverText(Point rPosition);
+ SAL_DLLPRIVATE bool ImplIsOverText(Point rPosition) const;
DECL_LINK(HandleClick, FixedHyperlink&, void);
diff --git a/include/vcl/toolkit/svtabbx.hxx b/include/vcl/toolkit/svtabbx.hxx
index 4f2909d9477e..b4b8fd2715a5 100644
--- a/include/vcl/toolkit/svtabbx.hxx
+++ b/include/vcl/toolkit/svtabbx.hxx
@@ -123,7 +123,7 @@ public:
// Accessible -------------------------------------------------------------
- bool IsCellCheckBox( sal_Int32 _nRow, sal_uInt16 _nColumn, TriState& _rState );
+ bool IsCellCheckBox( sal_Int32 _nRow, sal_uInt16 _nColumn, TriState& _rState ) const;
/** @return The count of the rows. */
virtual sal_Int32 GetRowCount() const override;
diff --git a/include/vcl/toolkit/treelistbox.hxx b/include/vcl/toolkit/treelistbox.hxx
index ae3ad91f09b6..478cf2f05145 100644
--- a/include/vcl/toolkit/treelistbox.hxx
+++ b/include/vcl/toolkit/treelistbox.hxx
@@ -128,7 +128,7 @@ public:
virtual SvLBoxItemType GetType() const = 0;
virtual int CalcWidth(const SvTreeListBox* pView) const;
int GetWidth(const SvTreeListBox* pView, const SvTreeListEntry* pEntry) const;
- int GetWidth(const SvTreeListBox* pView, const SvViewDataEntry* pData, sal_uInt16 nItemPos);
+ int GetWidth(const SvTreeListBox* pView, const SvViewDataEntry* pData, sal_uInt16 nItemPos) const;
int GetHeight(const SvTreeListBox* pView, const SvTreeListEntry* pEntry) const;
static int GetHeight(const SvViewDataEntry* pData, sal_uInt16 nItemPos);
void Enable(bool bEnabled) { mbDisabled = !bEnabled; }
@@ -275,7 +275,7 @@ private:
VCL_DLLPRIVATE void CheckBoxInserted(SvTreeListEntry* pEntry);
VCL_DLLPRIVATE void DrawCustomEntry(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect, const SvTreeListEntry& rEntry);
- VCL_DLLPRIVATE Size MeasureCustomEntry(vcl::RenderContext& rRenderContext, const SvTreeListEntry& rEntry);
+ VCL_DLLPRIVATE Size MeasureCustomEntry(vcl::RenderContext& rRenderContext, const SvTreeListEntry& rEntry) const;
/** Handles the given key event.
@@ -626,7 +626,7 @@ public:
virtual tools::Rectangle GetFocusRect(const SvTreeListEntry*, tools::Long nLine );
// Respects indentation
- sal_IntPtr GetTabPos(const SvTreeListEntry*, const SvLBoxTab*);
+ sal_IntPtr GetTabPos(const SvTreeListEntry*, const SvLBoxTab*) const;
void InvalidateEntry( SvTreeListEntry* );
SvLBoxItem* GetItem( SvTreeListEntry*, tools::Long nX, SvLBoxTab** ppTab);
SvLBoxItem* GetItem( SvTreeListEntry*, tools::Long nX );
diff --git a/include/vcl/transfer.hxx b/include/vcl/transfer.hxx
index 45fa55176e3a..6e546cc38a2a 100644
--- a/include/vcl/transfer.hxx
+++ b/include/vcl/transfer.hxx
@@ -321,11 +321,11 @@ public:
css::uno::Any GetAny( SotClipboardFormatId nFormat, const OUString& rDestDoc ) const;
css::uno::Any GetAny( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) const;
- bool GetString( SotClipboardFormatId nFormat, OUString& rStr );
- bool GetString( const css::datatransfer::DataFlavor& rFlavor, OUString& rStr );
+ bool GetString( SotClipboardFormatId nFormat, OUString& rStr ) const;
+ bool GetString( const css::datatransfer::DataFlavor& rFlavor, OUString& rStr ) const;
- bool GetBitmapEx( SotClipboardFormatId nFormat, BitmapEx& rBmp );
- bool GetBitmapEx( const css::datatransfer::DataFlavor& rFlavor, BitmapEx& rBmp );
+ bool GetBitmapEx( SotClipboardFormatId nFormat, BitmapEx& rBmp ) const;
+ bool GetBitmapEx( const css::datatransfer::DataFlavor& rFlavor, BitmapEx& rBmp ) const;
/** Return as GDI metafile.
@@ -335,35 +335,35 @@ public:
metafile, with over 3 million (!) actions; which is just too large for
any reasonable handling - and you need to set a limit.
*/
- bool GetGDIMetaFile( SotClipboardFormatId nFormat, GDIMetaFile& rMtf, size_t nMaxActions = 0 );
- bool GetGDIMetaFile( const css::datatransfer::DataFlavor& rFlavor, GDIMetaFile& rMtf );
+ bool GetGDIMetaFile( SotClipboardFormatId nFormat, GDIMetaFile& rMtf, size_t nMaxActions = 0 ) const;
+ bool GetGDIMetaFile( const css::datatransfer::DataFlavor& rFlavor, GDIMetaFile& rMtf ) const;
- bool GetGraphic( SotClipboardFormatId nFormat, Graphic& rGraphic );
- bool GetGraphic( const css::datatransfer::DataFlavor& rFlavor, Graphic& rGraphic );
+ bool GetGraphic( SotClipboardFormatId nFormat, Graphic& rGraphic ) const;
+ bool GetGraphic( const css::datatransfer::DataFlavor& rFlavor, Graphic& rGraphic ) const;
- bool GetImageMap( SotClipboardFormatId nFormat, ImageMap& rIMap );
- bool GetImageMap( const css::datatransfer::DataFlavor& rFlavor, ImageMap& rImap );
+ bool GetImageMap( SotClipboardFormatId nFormat, ImageMap& rIMap ) const;
+ bool GetImageMap( const css::datatransfer::DataFlavor& rFlavor, ImageMap& rImap ) const;
bool GetTransferableObjectDescriptor( SotClipboardFormatId nFormat, TransferableObjectDescriptor& rDesc );
bool GetTransferableObjectDescriptor( TransferableObjectDescriptor& rDesc );
- bool GetINetBookmark( SotClipboardFormatId nFormat, INetBookmark& rBmk );
- bool GetINetBookmark( const css::datatransfer::DataFlavor& rFlavor, INetBookmark& rBmk );
+ bool GetINetBookmark( SotClipboardFormatId nFormat, INetBookmark& rBmk ) const;
+ bool GetINetBookmark( const css::datatransfer::DataFlavor& rFlavor, INetBookmark& rBmk ) const;
- bool GetINetImage( SotClipboardFormatId nFormat, INetImage& rINtImg );
- bool GetINetImage( const css::datatransfer::DataFlavor& rFlavor, INetImage& rINtImg );
+ bool GetINetImage( SotClipboardFormatId nFormat, INetImage& rINtImg ) const;
+ bool GetINetImage( const css::datatransfer::DataFlavor& rFlavor, INetImage& rINtImg ) const;
- bool GetFileList( SotClipboardFormatId nFormat, FileList& rFileList );
- bool GetFileList( FileList& rFileList );
+ bool GetFileList( SotClipboardFormatId nFormat, FileList& rFileList ) const;
+ bool GetFileList( FileList& rFileList ) const;
- css::uno::Sequence<sal_Int8> GetSequence( SotClipboardFormatId nFormat, const OUString& rDestDoc );
- css::uno::Sequence<sal_Int8> GetSequence( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc );
+ css::uno::Sequence<sal_Int8> GetSequence( SotClipboardFormatId nFormat, const OUString& rDestDoc ) const;
+ css::uno::Sequence<sal_Int8> GetSequence( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) const;
- bool GetSotStorageStream( SotClipboardFormatId nFormat, tools::SvRef<SotTempStream>& rStreamRef );
- bool GetSotStorageStream( const css::datatransfer::DataFlavor& rFlavor, tools::SvRef<SotTempStream>& rStreamRef );
+ bool GetSotStorageStream( SotClipboardFormatId nFormat, tools::SvRef<SotTempStream>& rStreamRef ) const;
+ bool GetSotStorageStream( const css::datatransfer::DataFlavor& rFlavor, tools::SvRef<SotTempStream>& rStreamRef ) const;
- css::uno::Reference<css::io::XInputStream> GetInputStream( SotClipboardFormatId nFormat, const OUString& rDestDoc );
- css::uno::Reference<css::io::XInputStream> GetInputStream( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc );
+ css::uno::Reference<css::io::XInputStream> GetInputStream( SotClipboardFormatId nFormat, const OUString& rDestDoc ) const;
+ css::uno::Reference<css::io::XInputStream> GetInputStream( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) const;
static TransferableDataHelper CreateFromClipboard(const css::uno::Reference<css::datatransfer::clipboard::XClipboard>& rClipboard);
static TransferableDataHelper CreateFromSystemClipboard( vcl::Window * pWindow );
diff --git a/include/vcl/txtattr.hxx b/include/vcl/txtattr.hxx
index 479cfbe8dccd..186fbe1ad611 100644
--- a/include/vcl/txtattr.hxx
+++ b/include/vcl/txtattr.hxx
@@ -131,8 +131,8 @@ public:
inline void Expand( sal_Int32 nDiff );
inline void Collaps( sal_Int32 nDiff );
- inline bool IsIn( sal_Int32 nIndex );
- inline bool IsInside( sal_Int32 nIndex );
+ inline bool IsIn( sal_Int32 nIndex ) const;
+ inline bool IsInside( sal_Int32 nIndex ) const;
inline bool IsEmpty() const;
};
@@ -169,12 +169,12 @@ inline void TextCharAttrib::Collaps( sal_Int32 nDiff )
mnEnd = mnEnd - nDiff;
}
-inline bool TextCharAttrib::IsIn( sal_Int32 nIndex )
+inline bool TextCharAttrib::IsIn( sal_Int32 nIndex ) const
{
return ( ( mnStart <= nIndex ) && ( mnEnd >= nIndex ) );
}
-inline bool TextCharAttrib::IsInside( sal_Int32 nIndex )
+inline bool TextCharAttrib::IsInside( sal_Int32 nIndex ) const
{
return ( ( mnStart < nIndex ) && ( mnEnd > nIndex ) );
}
diff --git a/include/vcl/xtextedt.hxx b/include/vcl/xtextedt.hxx
index 765c972df21a..d9e06ddd8055 100644
--- a/include/vcl/xtextedt.hxx
+++ b/include/vcl/xtextedt.hxx
@@ -31,7 +31,7 @@ public:
virtual ~ExtTextEngine() override;
TextSelection MatchGroup( const TextPaM& rCursor ) const;
- bool Search( TextSelection& rSel, const i18nutil::SearchOptions& rSearchOptions, bool bForward = true );
+ bool Search( TextSelection& rSel, const i18nutil::SearchOptions& rSearchOptions, bool bForward = true ) const;
};
#endif // INCLUDED_VCL_XTEXTEDT_HXX
diff --git a/sfx2/source/doc/SfxRedactionHelper.cxx b/sfx2/source/doc/SfxRedactionHelper.cxx
index ca2006534207..28cf18d94ebf 100644
--- a/sfx2/source/doc/SfxRedactionHelper.cxx
+++ b/sfx2/source/doc/SfxRedactionHelper.cxx
@@ -146,14 +146,12 @@ tools::Rectangle ImplCalcActionBounds(const MetaAction& rAct, const OutputDevice
aString, 0, nStrEndPos, rTextAct.GetPoint(), 0, rTextAct.GetDXArray());
if (pSalLayout2)
{
- tools::Rectangle aBoundRect2(
- const_cast<OutputDevice&>(rOut).ImplGetTextBoundRect(*pSalLayout2));
+ tools::Rectangle aBoundRect2(rOut.ImplGetTextBoundRect(*pSalLayout2));
aActionBounds = rOut.PixelToLogic(aBoundRect2);
}
if (pSalLayout1 && nStrStartPos > 0)
{
- tools::Rectangle aBoundRect1(
- const_cast<OutputDevice&>(rOut).ImplGetTextBoundRect(*pSalLayout1));
+ tools::Rectangle aBoundRect1(rOut.ImplGetTextBoundRect(*pSalLayout1));
aActionBounds.SetLeft(rOut.PixelToLogic(aBoundRect1).Right());
}
}
diff --git a/svl/source/misc/inethist.cxx b/svl/source/misc/inethist.cxx
index 59f54ee80268..b7bb0aaa191e 100644
--- a/svl/source/misc/inethist.cxx
+++ b/svl/source/misc/inethist.cxx
@@ -346,7 +346,7 @@ void INetURLHistory::PutUrl_Impl (const INetURLObject &rUrl)
}
}
-bool INetURLHistory::QueryUrl_Impl (const INetURLObject &rUrl)
+bool INetURLHistory::QueryUrl_Impl (const INetURLObject &rUrl) const
{
DBG_ASSERT (m_pImpl, "QueryUrl_Impl(): no Implementation");
if (m_pImpl)
diff --git a/svx/source/fmcomp/dbaexchange.cxx b/svx/source/fmcomp/dbaexchange.cxx
index 23e53d83bc10..4fecfac95696 100644
--- a/svx/source/fmcomp/dbaexchange.cxx
+++ b/svx/source/fmcomp/dbaexchange.cxx
@@ -323,7 +323,7 @@ namespace svx
return false;
OUString sFieldDescription;
- (void)const_cast<TransferableDataHelper&>(_rData).GetString(nRecognizedFormat, sFieldDescription);
+ (void)_rData.GetString(nRecognizedFormat, sFieldDescription);
const sal_Unicode cSeparator = u'\x000B';
sal_Int32 nIdx{ 0 };
diff --git a/tools/source/xml/XmlWalker.cxx b/tools/source/xml/XmlWalker.cxx
index 73199b4b665d..c0e8a2abef48 100644
--- a/tools/source/xml/XmlWalker.cxx
+++ b/tools/source/xml/XmlWalker.cxx
@@ -96,7 +96,7 @@ void XmlWalker::parent()
mpImpl->mpStack.pop_back();
}
-OString XmlWalker::attribute(const OString& sName)
+OString XmlWalker::attribute(const OString& sName) const
{
xmlChar* xmlAttribute
= xmlGetProp(mpImpl->mpCurrent, reinterpret_cast<const xmlChar*>(sName.getStr()));
diff --git a/vcl/inc/bitmap/impoctree.hxx b/vcl/inc/bitmap/impoctree.hxx
index b77e964f4f79..3691e5c21289 100644
--- a/vcl/inc/bitmap/impoctree.hxx
+++ b/vcl/inc/bitmap/impoctree.hxx
@@ -51,7 +51,7 @@ public:
inline void ImplAddColorError5(const ImpErrorQuad& rErrQuad);
inline void ImplAddColorError7(const ImpErrorQuad& rErrQuad);
- inline BitmapColor ImplGetColor();
+ inline BitmapColor ImplGetColor() const;
};
inline void ImpErrorQuad::operator=(const BitmapColor& rColor)
@@ -98,7 +98,7 @@ inline void ImpErrorQuad::ImplAddColorError7(const ImpErrorQuad& rErrQuad)
nBlue += rErrQuad.nBlue * 7L >> 4;
}
-inline BitmapColor ImpErrorQuad::ImplGetColor()
+inline BitmapColor ImpErrorQuad::ImplGetColor() const
{
return BitmapColor(std::clamp(nRed, sal_Int16(0), sal_Int16(8160)) >> 5,
std::clamp(nGreen, sal_Int16(0), sal_Int16(8160)) >> 5,
diff --git a/vcl/inc/impfontmetricdata.hxx b/vcl/inc/impfontmetricdata.hxx
index bbba9330bd3b..aca6da417367 100644
--- a/vcl/inc/impfontmetricdata.hxx
+++ b/vcl/inc/impfontmetricdata.hxx
@@ -101,7 +101,7 @@ public:
void ImplCalcLineSpacing(LogicalFontInstance *pFontInstance);
private:
- bool ShouldUseWinMetrics(const vcl::TTGlobalFontInfo& rInfo);
+ bool ShouldUseWinMetrics(const vcl::TTGlobalFontInfo& rInfo) const;
// font instance attributes from the font request
tools::Long mnHeight; // Font size
diff --git a/vcl/inc/listbox.hxx b/vcl/inc/listbox.hxx
index a949baf973ff..afd64da26503 100644
--- a/vcl/inc/listbox.hxx
+++ b/vcl/inc/listbox.hxx
@@ -169,7 +169,7 @@ public:
it returns the first selectable entry after nPos if bForward is true and the
first selectable entry after nPos is bForward is false.
*/
- sal_Int32 FindFirstSelectable( sal_Int32 nPos, bool bForward = true );
+ sal_Int32 FindFirstSelectable( sal_Int32 nPos, bool bForward = true ) const;
};
class ImplListBoxWindow final : public Control, public vcl::ISearchableStringList
@@ -516,7 +516,7 @@ public:
void SetAutoWidth( bool b ) { mbAutoWidth = b; }
- Size CalcFloatSize();
+ Size CalcFloatSize() const;
void StartFloat( bool bStartTracking );
virtual void setPosSizePixel( tools::Long nX, tools::Long nY,
diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx
index 804250b40e95..2bd066180965 100644
--- a/vcl/inc/salvtables.hxx
+++ b/vcl/inc/salvtables.hxx
@@ -352,7 +352,7 @@ public:
void disable_notify_events();
- bool notify_events_disabled();
+ bool notify_events_disabled() const;
void enable_notify_events();
diff --git a/vcl/inc/scrwnd.hxx b/vcl/inc/scrwnd.hxx
index a8c897bc95e2..f92ebe556cfb 100644
--- a/vcl/inc/scrwnd.hxx
+++ b/vcl/inc/scrwnd.hxx
@@ -57,7 +57,7 @@ private:
void ImplCreateImageList();
void ImplSetRegion(const Bitmap& rRegionBmp);
using Window::ImplGetMousePointer;
- PointerStyle ImplGetMousePointer( tools::Long nDistX, tools::Long nDistY );
+ PointerStyle ImplGetMousePointer( tools::Long nDistX, tools::Long nDistY ) const;
void ImplDrawWheel(vcl::RenderContext& rRenderContext);
void ImplRecalcScrollValues();
diff --git a/vcl/inc/slider.hxx b/vcl/inc/slider.hxx
index d0bac8419830..3c92adfc38bf 100644
--- a/vcl/inc/slider.hxx
+++ b/vcl/inc/slider.hxx
@@ -55,12 +55,12 @@ private:
void ImplInit( vcl::Window* pParent, WinBits nStyle );
void ImplInitSettings();
void ImplUpdateRects( bool bUpdate = true );
- tools::Long ImplCalcThumbPos( tools::Long nPixPos );
- tools::Long ImplCalcThumbPosPix( tools::Long nPos );
+ tools::Long ImplCalcThumbPos( tools::Long nPixPos ) const;
+ tools::Long ImplCalcThumbPosPix( tools::Long nPos ) const;
void ImplCalc( bool bUpdate = true );
void ImplDraw(vcl::RenderContext& rRenderContext);
- bool ImplIsPageUp( const Point& rPos );
- bool ImplIsPageDown( const Point& rPos );
+ bool ImplIsPageUp( const Point& rPos ) const;
+ bool ImplIsPageDown( const Point& rPos ) const;
tools::Long ImplSlide( tools::Long nNewPos );
tools::Long ImplDoAction( );
void ImplDoMouseAction( const Point& rPos, bool bCallAction );
@@ -93,7 +93,7 @@ public:
void SetPageSize( tools::Long nNewSize ) { mnPageSize = nNewSize; }
tools::Long GetPageSize() const { return mnPageSize; }
- Size CalcWindowSizePixel();
+ Size CalcWindowSizePixel() const;
void SetSlideHdl( const Link<Slider*,void>& rLink ) { maSlideHdl = rLink; }
};
diff --git a/vcl/inc/svimpbox.hxx b/vcl/inc/svimpbox.hxx
index c46003c35dd4..9649708ddbfc 100644
--- a/vcl/inc/svimpbox.hxx
+++ b/vcl/inc/svimpbox.hxx
@@ -308,7 +308,7 @@ public:
bool HasHorScrollBar() const { return m_aHorSBar->IsVisible(); }
void CallEventListeners( VclEventId nEvent, void* pData = nullptr );
- bool IsSelectable( const SvTreeListEntry* pEntry );
+ bool IsSelectable( const SvTreeListEntry* pEntry ) const;
void SetForceMakeVisible(bool bEnable) { mbForceMakeVisible = bEnable; }
// tdf#143114 allow to ask if CaptureOnButton is active
diff --git a/vcl/inc/unx/i18n_ic.hxx b/vcl/inc/unx/i18n_ic.hxx
index c9302c5eb97b..b556b8205e27 100644
--- a/vcl/inc/unx/i18n_ic.hxx
+++ b/vcl/inc/unx/i18n_ic.hxx
@@ -55,9 +55,9 @@ private:
public:
- Bool UseContext() { return mbUseable; }
+ Bool UseContext() const { return mbUseable; }
bool IsPreeditMode() const { return maClientData.eState == PreeditStatus::Active; }
- XIC GetContext() { return maContext; }
+ XIC GetContext() const { return maContext; }
void ExtendEventMask( ::Window aFocusWindow );
void SetICFocus( SalFrame* pFocusFrame );
diff --git a/vcl/inc/unx/i18n_im.hxx b/vcl/inc/unx/i18n_im.hxx
index 2539ab2da77b..95f3a58db5fb 100644
--- a/vcl/inc/unx/i18n_im.hxx
+++ b/vcl/inc/unx/i18n_im.hxx
@@ -37,8 +37,8 @@ class SalI18N_InputMethod
public:
Bool PosixLocale();
- bool UseMethod() { return mbUseable; }
- XIM GetMethod() { return maMethod; }
+ bool UseMethod() const { return mbUseable; }
+ XIM GetMethod() const { return maMethod; }
void HandleDestroyIM();
void CreateMethod( Display *pDisplay );
XIMStyles *GetSupportedStyles() { return mpStyles; }
diff --git a/vcl/inc/unx/printerjob.hxx b/vcl/inc/unx/printerjob.hxx
index c39bb1e3d2d2..4fd99b17b638 100644
--- a/vcl/inc/unx/printerjob.hxx
+++ b/vcl/inc/unx/printerjob.hxx
@@ -70,10 +70,10 @@ private:
private:
std::unique_ptr<osl::File> CreateSpoolFile (std::u16string_view rName,
- std::u16string_view rExtension);
+ std::u16string_view rExtension) const;
void InitPaperSize (const JobData& rJobSetup);
- bool writeFeatureList( osl::File* pFile, const JobData&, bool bDocumentSetup );
+ bool writeFeatureList( osl::File* pFile, const JobData&, bool bDocumentSetup ) const;
bool writeSetup( osl::File* pFile, const JobData& );
bool writePageSetup( osl::File* pFile, const JobData&, bool bWriteFeatures );
static void writeJobPatch( osl::File* File, const JobData& );
diff --git a/vcl/inc/verticaltabctrl.hxx b/vcl/inc/verticaltabctrl.hxx
index f3522c2fe697..2575fc4ebe9b 100644
--- a/vcl/inc/verticaltabctrl.hxx
+++ b/vcl/inc/verticaltabctrl.hxx
@@ -59,7 +59,7 @@ public:
sal_uInt16 GetPagePos(std::string_view rPageId) const;
const OString& GetPageId(sal_uInt16 nIndex) const;
- VclPtr<vcl::Window> GetPage(std::string_view rPageId);
+ VclPtr<vcl::Window> GetPage(std::string_view rPageId) const;
void RemovePage(std::string_view rPageId);
void InsertPage(const OString& rPageId, const OUString& rLabel, const Image& rImage,
diff --git a/vcl/inc/wizdlg.hxx b/vcl/inc/wizdlg.hxx
index bfae0641a5ce..da3ff4d1af3a 100644
--- a/vcl/inc/wizdlg.hxx
+++ b/vcl/inc/wizdlg.hxx
@@ -84,7 +84,7 @@ namespace vcl
// here (e.g. committing page data) depend on having full control over page traveling.
// So use the travelXXX methods if you need to travel
- tools::Long LogicalCoordinateToPixel(int iCoordinate);
+ tools::Long LogicalCoordinateToPixel(int iCoordinate) const;
/**sets the number of buttons which should be left-aligned. Normally, buttons are right-aligned.
only to be used during construction, before any layouting happened
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 9b56472a4241..9d565b40f1eb 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -536,7 +536,7 @@ vcl::Window* SalInstanceWidget::getWidget() const { return m_xWidget; }
void SalInstanceWidget::disable_notify_events() { ++m_nBlockNotify; }
-bool SalInstanceWidget::notify_events_disabled() { return m_nBlockNotify != 0; }
+bool SalInstanceWidget::notify_events_disabled() const { return m_nBlockNotify != 0; }
void SalInstanceWidget::enable_notify_events() { --m_nBlockNotify; }
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 07b06bb86dcd..2eae233d5c7c 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -188,7 +188,7 @@ void Button::ImplSetSeparatorX( tools::Long nX )
mpButtonData->mnSeparatorX = nX;
}
-DrawTextFlags Button::ImplGetTextStyle( WinBits nWinStyle, SystemTextColorFlags nSystemTextColorFlags )
+DrawTextFlags Button::ImplGetTextStyle( WinBits nWinStyle, SystemTextColorFlags nSystemTextColorFlags ) const
{
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
DrawTextFlags nTextStyle = FixedText::ImplGetTextStyle(nWinStyle & ~WB_DEFBUTTON);
@@ -1868,7 +1868,7 @@ void RadioButton::ImplInit( vcl::Window* pParent, WinBits nStyle )
ImplInitSettings( true );
}
-WinBits RadioButton::ImplInitStyle( const vcl::Window* pPrevWindow, WinBits nStyle )
+WinBits RadioButton::ImplInitStyle( const vcl::Window* pPrevWindow, WinBits nStyle ) const
{
if ( !(nStyle & WB_NOGROUP) &&
(!pPrevWindow || (pPrevWindow->GetType() != WindowType::RADIOBUTTON)) )
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 8bb8e15f0834..ece46f6ae3a2 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -285,7 +285,7 @@ void Edit::ImplInitEditData()
mxDnDListener = new vcl::unohelper::DragAndDropWrapper( this );
}
-bool Edit::ImplUseNativeBorder(vcl::RenderContext const & rRenderContext, WinBits nStyle)
+bool Edit::ImplUseNativeBorder(vcl::RenderContext const & rRenderContext, WinBits nStyle) const
{
bool bRet = rRenderContext.IsNativeControlSupported(ImplGetNativeControlType(),
ControlPart::HasBackgroundTexture)
diff --git a/vcl/source/control/fixedhyper.cxx b/vcl/source/control/fixedhyper.cxx
index 01baaf575b16..f5d49057228d 100644
--- a/vcl/source/control/fixedhyper.cxx
+++ b/vcl/source/control/fixedhyper.cxx
@@ -58,7 +58,7 @@ void FixedHyperlink::Initialize()
SetClickHdl(LINK(this, FixedHyperlink, HandleClick));
}
-bool FixedHyperlink::ImplIsOverText(Point aPosition)
+bool FixedHyperlink::ImplIsOverText(Point aPosition) const
{
Size aSize = GetOutputSizePixel();
diff --git a/vcl/source/control/imp_listbox.cxx b/vcl/source/control/imp_listbox.cxx
index a1bcceaf26cb..b613a533fb44 100644
--- a/vcl/source/control/imp_listbox.cxx
+++ b/vcl/source/control/imp_listbox.cxx
@@ -416,7 +416,7 @@ bool ImplEntryList::IsEntrySelectable( sal_Int32 nPos ) const
return pImplEntry == nullptr || ((pImplEntry->mnFlags & ListBoxEntryFlags::DisableSelection) == ListBoxEntryFlags::NONE);
}
-sal_Int32 ImplEntryList::FindFirstSelectable( sal_Int32 nPos, bool bForward /* = true */ )
+sal_Int32 ImplEntryList::FindFirstSelectable( sal_Int32 nPos, bool bForward /* = true */ ) const
{
if( IsEntrySelectable( nPos ) )
return nPos;
@@ -2877,7 +2877,7 @@ void ImplListBoxFloatingWindow::Resize()
FloatingWindow::Resize();
}
-Size ImplListBoxFloatingWindow::CalcFloatSize()
+Size ImplListBoxFloatingWindow::CalcFloatSize() const
{
Size aFloatSz( maPrefSz );
diff --git a/vcl/source/control/ivctrl.cxx b/vcl/source/control/ivctrl.cxx
index 3091d62fe9ab..dc55deed29d4 100644
--- a/vcl/source/control/ivctrl.cxx
+++ b/vcl/source/control/ivctrl.cxx
@@ -603,7 +603,7 @@ sal_uInt16 VerticalTabControl::GetPagePos(std::string_view rPageId) const
return m_xChooser->GetEntryListPos(pData->pEntry);
}
-VclPtr<vcl::Window> VerticalTabControl::GetPage(std::string_view rPageId)
+VclPtr<vcl::Window> VerticalTabControl::GetPage(std::string_view rPageId) const
{
VerticalTabPageData* pData = GetPageData(rPageId);
if (!pData)
diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx
index 87385872c0de..844f80b02d56 100644
--- a/vcl/source/control/scrbar.cxx
+++ b/vcl/source/control/scrbar.cxx
@@ -200,7 +200,7 @@ void ScrollBar::ImplUpdateRects( bool bUpdate )
}
}
-tools::Long ScrollBar::ImplCalcThumbPos( tools::Long nPixPos )
+tools::Long ScrollBar::ImplCalcThumbPos( tools::Long nPixPos ) const
{
// Calculate position
tools::Long nCalcThumbPos;
@@ -210,7 +210,7 @@ tools::Long ScrollBar::ImplCalcThumbPos( tools::Long nPixPos )
return nCalcThumbPos;
}
-tools::Long ScrollBar::ImplCalcThumbPosPix( tools::Long nPos )
+tools::Long ScrollBar::ImplCalcThumbPosPix( tools::Long nPos ) const
{
tools::Long nCalcThumbPos;
diff --git a/vcl/source/control/slider.cxx b/vcl/source/control/slider.cxx
index 3ec5bdb949ae..819b833e7fa2 100644
--- a/vcl/source/control/slider.cxx
+++ b/vcl/source/control/slider.cxx
@@ -202,7 +202,7 @@ void Slider::ImplUpdateRects( bool bUpdate )
}
}
-tools::Long Slider::ImplCalcThumbPos( tools::Long nPixPos )
+tools::Long Slider::ImplCalcThumbPos( tools::Long nPixPos ) const
{
// calculate position
tools::Long nCalcThumbPos;
@@ -211,7 +211,7 @@ tools::Long Slider::ImplCalcThumbPos( tools::Long nPixPos )
return nCalcThumbPos;
}
-tools::Long Slider::ImplCalcThumbPosPix( tools::Long nPos )
+tools::Long Slider::ImplCalcThumbPosPix( tools::Long nPos ) const
{
// calculate position
tools::Long nCalcThumbPos;
@@ -461,7 +461,7 @@ void Slider::ImplDraw(vcl::RenderContext& rRenderContext)
}
}
-bool Slider::ImplIsPageUp( const Point& rPos )
+bool Slider::ImplIsPageUp( const Point& rPos ) const
{
Size aSize = GetOutputSizePixel();
tools::Rectangle aRect = maChannel1Rect;
@@ -478,7 +478,7 @@ bool Slider::ImplIsPageUp( const Point& rPos )
return aRect.Contains( rPos );
}
-bool Slider::ImplIsPageDown( const Point& rPos )
+bool Slider::ImplIsPageDown( const Point& rPos ) const
{
Size aSize = GetOutputSizePixel();
tools::Rectangle aRect = maChannel2Rect;
@@ -884,7 +884,7 @@ void Slider::SetThumbPos( tools::Long nNewThumbPos )
}
}
-Size Slider::CalcWindowSizePixel()
+Size Slider::CalcWindowSizePixel() const
{
tools::Long nWidth = mnMaxRange - mnMinRange + mnThumbSize + 1;
tools::Long nHeight = SLIDER_HEIGHT;
diff --git a/vcl/source/control/wizardmachine.cxx b/vcl/source/control/wizardmachine.cxx
index 040bf5476489..b68d876b5abb 100644
--- a/vcl/source/control/wizardmachine.cxx
+++ b/vcl/source/control/wizardmachine.cxx
@@ -217,7 +217,8 @@ namespace vcl
nViewPosFlags );
}
- tools::Long RoadmapWizard::LogicalCoordinateToPixel(int iCoordinate){
+ tools::Long RoadmapWizard::LogicalCoordinateToPixel(int iCoordinate) const
+ {
Size aLocSize = LogicToPixel(Size(iCoordinate, 0), MapMode(MapUnit::MapAppFont));
int iPixelCoordinate = aLocSize.Width();
return iPixelCoordinate;
diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx
index 594439666238..028ca5a897b0 100644
--- a/vcl/source/edit/texteng.cxx
+++ b/vcl/source/edit/texteng.cxx
@@ -1156,7 +1156,7 @@ tools::Long TextEngine::CalcTextWidth()
return mnCurTextWidth+1;// wider by 1, as CreateLines breaks at >=
}
-tools::Long TextEngine::CalcTextHeight()
+tools::Long TextEngine::CalcTextHeight() const
{
SAL_WARN_IF( !GetUpdateMode(), "vcl", "CalcTextHeight: GetUpdateMode()" );
diff --git a/vcl/source/edit/textview.cxx b/vcl/source/edit/textview.cxx
index e816be4537fd..3c94e6fa6e1e 100644
--- a/vcl/source/edit/textview.cxx
+++ b/vcl/source/edit/textview.cxx
@@ -959,12 +959,12 @@ void TextView::Paste()
Paste( aClipboard );
}
-OUString TextView::GetSelected()
+OUString TextView::GetSelected() const
{
return GetSelected( GetSystemLineEnd() );
}
-OUString TextView::GetSelected( LineEnd aSeparator )
+OUString TextView::GetSelected( LineEnd aSeparator ) const
{
return mpImpl->mpTextEngine->GetText( mpImpl->maSelection, aSeparator );
}
@@ -1607,7 +1607,7 @@ bool TextView::IsSelectionAtPoint( const Point& rPosPixel )
return IsInSelection( aPaM );
}
-bool TextView::IsInSelection( const TextPaM& rPaM )
+bool TextView::IsInSelection( const TextPaM& rPaM ) const
{
TextSelection aSel = mpImpl->maSelection;
aSel.Justify();
@@ -1699,7 +1699,7 @@ bool TextView::ImplTruncateNewText( OUString& rNewText ) const
return bTruncated;
}
-bool TextView::ImplCheckTextLen( const OUString& rNewText )
+bool TextView::ImplCheckTextLen( const OUString& rNewText ) const
{
bool bOK = true;
if ( mpImpl->mpTextEngine->GetMaxTextLen() )
diff --git a/vcl/source/edit/xtextedt.cxx b/vcl/source/edit/xtextedt.cxx
index ae9335232679..106ad69bf425 100644
--- a/vcl/source/edit/xtextedt.cxx
+++ b/vcl/source/edit/xtextedt.cxx
@@ -137,7 +137,7 @@ TextSelection ExtTextEngine::MatchGroup( const TextPaM& rCursor ) const
return aSel;
}
-bool ExtTextEngine::Search( TextSelection& rSel, const i18nutil::SearchOptions& rSearchOptions, bool bForward )
+bool ExtTextEngine::Search( TextSelection& rSel, const i18nutil::SearchOptions& rSearchOptions, bool bForward ) const
{
TextSelection aSel( rSel );
aSel.Justify();
diff --git a/vcl/source/filter/idxf/dxf2mtf.cxx b/vcl/source/filter/idxf/dxf2mtf.cxx
index 06aebc3da16b..a8504c0d4c53 100644
--- a/vcl/source/filter/idxf/dxf2mtf.cxx
+++ b/vcl/source/filter/idxf/dxf2mtf.cxx
@@ -38,7 +38,7 @@ sal_uInt64 DXF2GDIMetaFile::CountEntities(const DXFEntities & rEntities)
return nRes;
}
-Color DXF2GDIMetaFile::ConvertColor(sal_uInt8 nColor)
+Color DXF2GDIMetaFile::ConvertColor(sal_uInt8 nColor) const
{
return Color(
pDXF->aPalette.GetRed( nColor ),
@@ -46,7 +46,7 @@ Color DXF2GDIMetaFile::ConvertColor(sal_uInt8 nColor)
pDXF->aPalette.GetBlue( nColor ) );
}
-tools::Long DXF2GDIMetaFile::GetEntityColor(const DXFBasicEntity & rE)
+tools::Long DXF2GDIMetaFile::GetEntityColor(const DXFBasicEntity & rE) const
{
tools::Long nColor;
@@ -64,7 +64,7 @@ tools::Long DXF2GDIMetaFile::GetEntityColor(const DXFBasicEntity & rE)
return nColor;
}
-DXFLineInfo DXF2GDIMetaFile::LTypeToDXFLineInfo(std::string_view rLineType)
+DXFLineInfo DXF2GDIMetaFile::LTypeToDXFLineInfo(std::string_view rLineType) const
{
const DXFLType * pLT;
DXFLineInfo aDXFLineInfo;
diff --git a/vcl/source/filter/idxf/dxf2mtf.hxx b/vcl/source/filter/idxf/dxf2mtf.hxx
index 6d383dae1005..d8a935b51bdf 100644
--- a/vcl/source/filter/idxf/dxf2mtf.hxx
+++ b/vcl/source/filter/idxf/dxf2mtf.hxx
@@ -55,11 +55,11 @@ private:
static sal_uInt64 CountEntities(const DXFEntities & rEntities);
- Color ConvertColor(sal_uInt8 nColor);
+ Color ConvertColor(sal_uInt8 nColor) const;
- tools::Long GetEntityColor(const DXFBasicEntity & rE);
+ tools::Long GetEntityColor(const DXFBasicEntity & rE) const;
- DXFLineInfo LTypeToDXFLineInfo(std::string_view rLineType);
+ DXFLineInfo LTypeToDXFLineInfo(std::string_view rLineType) const;
DXFLineInfo GetEntityDXFLineInfo(const DXFBasicEntity & rE);
diff --git a/vcl/source/filter/imet/ios2met.cxx b/vcl/source/filter/imet/ios2met.cxx
index 39d48deecfaa..e762785f4d4c 100644
--- a/vcl/source/filter/imet/ios2met.cxx
+++ b/vcl/source/filter/imet/ios2met.cxx
@@ -401,10 +401,10 @@ private:
void SetRasterOp(RasterOp eROP);
void SetPalette0RGB(sal_uInt16 nIndex, sal_uInt32 nCol);
- sal_uInt32 GetPalette0RGB(sal_uInt32 nIndex);
+ sal_uInt32 GetPalette0RGB(sal_uInt32 nIndex) const;
// gets color from palette, or, if it doesn't exist,
// interprets nIndex as immediate RGB value.
- Color GetPaletteColor(sal_uInt32 nIndex);
+ Color GetPaletteColor(sal_uInt32 nIndex) const;
bool IsLineInfo() const;
@@ -806,14 +806,14 @@ void OS2METReader::SetPalette0RGB(sal_uInt16 nIndex, sal_uInt32 nCol)
pPaletteStack->p0RGB[nIndex]=nCol;
}
-sal_uInt32 OS2METReader::GetPalette0RGB(sal_uInt32 nIndex)
+sal_uInt32 OS2METReader::GetPalette0RGB(sal_uInt32 nIndex) const
{
if (pPaletteStack!=nullptr && pPaletteStack->p0RGB!=nullptr &&
pPaletteStack->nSize>nIndex) nIndex=pPaletteStack->p0RGB[nIndex];
return nIndex;
}
-Color OS2METReader::GetPaletteColor(sal_uInt32 nIndex)
+Color OS2METReader::GetPaletteColor(sal_uInt32 nIndex) const
{
nIndex=GetPalette0RGB(nIndex);
return Color(sal::static_int_cast< sal_uInt8 >((nIndex>>16)&0xff),
diff --git a/vcl/source/filter/itiff/itiff.cxx b/vcl/source/filter/itiff/itiff.cxx
index 906826ae9e55..ae797aa978a5 100644
--- a/vcl/source/filter/itiff/itiff.cxx
+++ b/vcl/source/filter/itiff/itiff.cxx
@@ -114,7 +114,7 @@ private:
bool ReadMap();
// reads/decompress the bitmap data and fills aMap
- sal_uInt32 GetBits(const sal_uInt8 * pSrc, sal_uInt32 nBitsPos, sal_uInt32 nBitsCount);
+ sal_uInt32 GetBits(const sal_uInt8 * pSrc, sal_uInt32 nBitsPos, sal_uInt32 nBitsCount) const;
// fetches BitsCount bits from pSrc[..] at the position nBitsPos
void MakePalCol();
@@ -771,7 +771,7 @@ bool TIFFReader::ReadMap()
return true;
}
-sal_uInt32 TIFFReader::GetBits( const sal_uInt8 * pSrc, sal_uInt32 nBitsPos, sal_uInt32 nBitsCount)
+sal_uInt32 TIFFReader::GetBits( const sal_uInt8 * pSrc, sal_uInt32 nBitsPos, sal_uInt32 nBitsCount) const
{
sal_uInt32 nRes;
if ( bByteSwap )
diff --git a/vcl/source/font/fontmetric.cxx b/vcl/source/font/fontmetric.cxx
index b0904eea6b3a..2e3859b1f941 100644
--- a/vcl/source/font/fontmetric.cxx
+++ b/vcl/source/font/fontmetric.cxx
@@ -298,7 +298,7 @@ void ImplFontMetricData::ImplInitFlags( const OutputDevice* pDev )
SetFullstopCenteredFlag( bCentered );
}
-bool ImplFontMetricData::ShouldUseWinMetrics(const vcl::TTGlobalFontInfo& rInfo)
+bool ImplFontMetricData::ShouldUseWinMetrics(const vcl::TTGlobalFontInfo& rInfo) const
{
if (utl::ConfigManager::IsFuzzing())
return false;
diff --git a/vcl/source/gdi/gfxlink.cxx b/vcl/source/gdi/gfxlink.cxx
index cc5386039e3a..147f89febc85 100644
--- a/vcl/source/gdi/gfxlink.cxx
+++ b/vcl/source/gdi/gfxlink.cxx
@@ -110,7 +110,7 @@ void GfxLink::SetPrefMapMode( const MapMode& rPrefMapMode )
mbPrefMapModeValid = true;
}
-bool GfxLink::LoadNative( Graphic& rGraphic )
+bool GfxLink::LoadNative( Graphic& rGraphic ) const
{
bool bRet = false;
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 9c6df8648276..a4d020008f30 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -1425,7 +1425,7 @@ const PaperInfo& Printer::GetPaperInfo( int nPaper ) const
return mpInfoPrinter->m_aPaperFormats[nPaper];
}
-Size Printer::GetPaperSize( int nPaper )
+Size Printer::GetPaperSize( int nPaper ) const
{
PaperInfo aInfo = GetPaperInfo( nPaper );
return PixelToLogic( Size( aInfo.getWidth(), aInfo.getHeight() ) );
diff --git a/vcl/source/graphic/GraphicObject.cxx b/vcl/source/graphic/GraphicObject.cxx
index 9d79fcc6c5cc..86b49077804a 100644
--- a/vcl/source/graphic/GraphicObject.cxx
+++ b/vcl/source/graphic/GraphicObject.cxx
@@ -458,7 +458,7 @@ void GraphicObject::SetUserData( const OUString& rUserData )
}
bool GraphicObject::Draw(OutputDevice& rOut, const Point& rPt, const Size& rSz,
- const GraphicAttr* pAttr)
+ const GraphicAttr* pAttr) const
{
GraphicAttr aAttr( pAttr ? *pAttr : GetAttr() );
Point aPt( rPt );
diff --git a/vcl/source/graphic/GraphicObject2.cxx b/vcl/source/graphic/GraphicObject2.cxx
index cfd343346b84..89af907e2b9d 100644
--- a/vcl/source/graphic/GraphicObject2.cxx
+++ b/vcl/source/graphic/GraphicObject2.cxx
@@ -379,7 +379,7 @@ bool GraphicObject::ImplDrawTiled(OutputDevice& rOut, const tools::Rectangle& rA
bool GraphicObject::ImplDrawTiled( OutputDevice& rOut, const Point& rPosPixel,
int nNumTilesX, int nNumTilesY,
- const Size& rTileSizePixel, const GraphicAttr* pAttr )
+ const Size& rTileSizePixel, const GraphicAttr* pAttr ) const
{
Point aCurrPos( rPosPixel );
Size aTileSizeLogic( rOut.PixelToLogic( rTileSizePixel ) );
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index dd73cfb4007d..ce10f5520e28 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -1356,7 +1356,7 @@ sal_Int32 OutputDevice::ValidateKashidas ( const OUString& rTxt,
}
bool OutputDevice::GetGlyphBoundRects( const Point& rOrigin, const OUString& rStr,
- int nIndex, int nLen, std::vector< tools::Rectangle >& rVector )
+ int nIndex, int nLen, std::vector< tools::Rectangle >& rVector ) const
{
rVector.clear();
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index bab6b14cf53c..50ee3ce917f0 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -184,7 +184,7 @@ void OutputDevice::ImplDrawTextBackground( const SalLayout& rSalLayout )
mpFontInstance->mnLineHeight+mnEmphasisAscent+mnEmphasisDescent );
}
-tools::Rectangle OutputDevice::ImplGetTextBoundRect( const SalLayout& rSalLayout )
+tools::Rectangle OutputDevice::ImplGetTextBoundRect( const SalLayout& rSalLayout ) const
{
Point aPoint = rSalLayout.GetDrawPosition();
tools::Long nX = aPoint.X();
diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx
index 7bec7d5fe4ec..fd0410f0e9e6 100644
--- a/vcl/source/outdev/transparent.cxx
+++ b/vcl/source/outdev/transparent.cxx
@@ -1214,7 +1214,7 @@ tools::Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevic
0, rTextAct.GetDXArray() );
if( pSalLayout )
{
- tools::Rectangle aBoundRect( const_cast<OutputDevice&>(rOut).ImplGetTextBoundRect( *pSalLayout ) );
+ tools::Rectangle aBoundRect( rOut.ImplGetTextBoundRect( *pSalLayout ) );
aActionBounds = rOut.PixelToLogic( aBoundRect );
}
}
@@ -1243,7 +1243,7 @@ tools::Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevic
rTextAct.GetWidth() );
if( pSalLayout )
{
- tools::Rectangle aBoundRect( const_cast<OutputDevice&>(rOut).ImplGetTextBoundRect( *pSalLayout ) );
+ tools::Rectangle aBoundRect( rOut.ImplGetTextBoundRect( *pSalLayout ) );
aActionBounds = rOut.PixelToLogic( aBoundRect );
}
}
diff --git a/vcl/source/treelist/imap.cxx b/vcl/source/treelist/imap.cxx
index 175fcbb8ff33..c0dd97770a27 100644
--- a/vcl/source/treelist/imap.cxx
+++ b/vcl/source/treelist/imap.cxx
@@ -123,7 +123,7 @@ void IMapObject::Read( SvStream& rIStm )
}
}
-bool IMapObject::IsEqual( const IMapObject& rEqObj )
+bool IMapObject::IsEqual( const IMapObject& rEqObj ) const
{
return ( ( aURL == rEqObj.aURL ) &&
( aAltText == rEqObj.aAltText ) &&
@@ -230,7 +230,7 @@ void IMapRectangleObject::Scale( const Fraction& rFracX, const Fraction& rFracY
aRect = tools::Rectangle( aTL, aBR );
}
-bool IMapRectangleObject::IsEqual( const IMapRectangleObject& rEqObj )
+bool IMapRectangleObject::IsEqual( const IMapRectangleObject& rEqObj ) const
{
return ( IMapObject::IsEqual( rEqObj ) && ( aRect == rEqObj.aRect ) );
}
@@ -372,7 +372,7 @@ void IMapCircleObject::Scale( const Fraction& rFracX, const Fraction& rFracY )
nRadius = double(nRadius * aAverage);
}
-bool IMapCircleObject::IsEqual( const IMapCircleObject& rEqObj )
+bool IMapCircleObject::IsEqual( const IMapCircleObject& rEqObj ) const
{
return ( IMapObject::IsEqual( rEqObj ) &&
( aCenter == rEqObj.aCenter ) &&
diff --git a/vcl/source/treelist/svimpbox.cxx b/vcl/source/treelist/svimpbox.cxx
index cdbc4b98578e..e0fd310139fc 100644
--- a/vcl/source/treelist/svimpbox.cxx
+++ b/vcl/source/treelist/svimpbox.cxx
@@ -3120,7 +3120,7 @@ void SvImpLBox::CallEventListeners( VclEventId nEvent, void* pData )
}
-bool SvImpLBox::IsSelectable( const SvTreeListEntry* pEntry )
+bool SvImpLBox::IsSelectable( const SvTreeListEntry* pEntry ) const
{
if( pEntry )
{
diff --git a/vcl/source/treelist/svtabbx.cxx b/vcl/source/treelist/svtabbx.cxx
index 57f1ce2f36df..b116c95d2e37 100644
--- a/vcl/source/treelist/svtabbx.cxx
+++ b/vcl/source/treelist/svtabbx.cxx
@@ -580,7 +580,7 @@ void SvHeaderTabListBox::RecalculateAccessibleChildren()
}
}
-bool SvHeaderTabListBox::IsCellCheckBox( sal_Int32 _nRow, sal_uInt16 _nColumn, TriState& _rState )
+bool SvHeaderTabListBox::IsCellCheckBox( sal_Int32 _nRow, sal_uInt16 _nColumn, TriState& _rState ) const
{
bool bRet = false;
SvTreeListEntry* pEntry = GetEntry( _nRow );
diff --git a/vcl/source/treelist/transfer.cxx b/vcl/source/treelist/transfer.cxx
index 5483fb32a4a2..4c2ce3195169 100644
--- a/vcl/source/treelist/transfer.cxx
+++ b/vcl/source/treelist/transfer.cxx
@@ -1476,14 +1476,14 @@ Any TransferableDataHelper::GetAny( const DataFlavor& rFlavor, const OUString& r
}
-bool TransferableDataHelper::GetString( SotClipboardFormatId nFormat, OUString& rStr )
+bool TransferableDataHelper::GetString( SotClipboardFormatId nFormat, OUString& rStr ) const
{
DataFlavor aFlavor;
return( SotExchange::GetFormatDataFlavor( nFormat, aFlavor ) && GetString( aFlavor, rStr ) );
}
-bool TransferableDataHelper::GetString( const DataFlavor& rFlavor, OUString& rStr )
+bool TransferableDataHelper::GetString( const DataFlavor& rFlavor, OUString& rStr ) const
{
Any aAny = GetAny(rFlavor, OUString());
bool bRet = false;
@@ -1518,7 +1518,7 @@ bool TransferableDataHelper::GetString( const DataFlavor& rFlavor, OUString& rSt
}
-bool TransferableDataHelper::GetBitmapEx( SotClipboardFormatId nFormat, BitmapEx& rBmpEx )
+bool TransferableDataHelper::GetBitmapEx( SotClipboardFormatId nFormat, BitmapEx& rBmpEx ) const
{
if(SotClipboardFormatId::BITMAP == nFormat)
{
@@ -1548,7 +1548,7 @@ bool TransferableDataHelper::GetBitmapEx( SotClipboardFormatId nFormat, BitmapEx
}
-bool TransferableDataHelper::GetBitmapEx( const DataFlavor& rFlavor, BitmapEx& rBmpEx )
+bool TransferableDataHelper::GetBitmapEx( const DataFlavor& rFlavor, BitmapEx& rBmpEx ) const
{
tools::SvRef<SotTempStream> xStm;
DataFlavor aSubstFlavor;
@@ -1650,7 +1650,7 @@ bool TransferableDataHelper::GetBitmapEx( const DataFlavor& rFlavor, BitmapEx& r
}
-bool TransferableDataHelper::GetGDIMetaFile(SotClipboardFormatId nFormat, GDIMetaFile& rMtf, size_t nMaxActions)
+bool TransferableDataHelper::GetGDIMetaFile(SotClipboardFormatId nFormat, GDIMetaFile& rMtf, size_t nMaxActions) const
{
DataFlavor aFlavor;
return SotExchange::GetFormatDataFlavor(nFormat, aFlavor) &&
@@ -1659,7 +1659,7 @@ bool TransferableDataHelper::GetGDIMetaFile(SotClipboardFormatId nFormat, GDIMet
}
-bool TransferableDataHelper::GetGDIMetaFile( const DataFlavor& rFlavor, GDIMetaFile& rMtf )
+bool TransferableDataHelper::GetGDIMetaFile( const DataFlavor& rFlavor, GDIMetaFile& rMtf ) const
{
tools::SvRef<SotTempStream> xStm;
DataFlavor aSubstFlavor;
@@ -1704,7 +1704,7 @@ bool TransferableDataHelper::GetGDIMetaFile( const DataFlavor& rFlavor, GDIMetaF
}
-bool TransferableDataHelper::GetGraphic( SotClipboardFormatId nFormat, Graphic& rGraphic )
+bool TransferableDataHelper::GetGraphic( SotClipboardFormatId nFormat, Graphic& rGraphic ) const
{
if(SotClipboardFormatId::BITMAP == nFormat)
{
@@ -1725,7 +1725,7 @@ bool TransferableDataHelper::GetGraphic( SotClipboardFormatId nFormat, Graphic&
}
-bool TransferableDataHelper::GetGraphic( const css::datatransfer::DataFlavor& rFlavor, Graphic& rGraphic )
+bool TransferableDataHelper::GetGraphic( const css::datatransfer::DataFlavor& rFlavor, Graphic& rGraphic ) const
{
DataFlavor aFlavor;
bool bRet = false;
@@ -1796,14 +1796,14 @@ bool TransferableDataHelper::GetGraphic( const css::datatransfer::DataFlavor& rF
}
-bool TransferableDataHelper::GetImageMap( SotClipboardFormatId nFormat, ImageMap& rIMap )
+bool TransferableDataHelper::GetImageMap( SotClipboardFormatId nFormat, ImageMap& rIMap ) const
{
DataFlavor aFlavor;
return( SotExchange::GetFormatDataFlavor( nFormat, aFlavor ) && GetImageMap( aFlavor, rIMap ) );
}
-bool TransferableDataHelper::GetImageMap( const css::datatransfer::DataFlavor& rFlavor, ImageMap& rIMap )
+bool TransferableDataHelper::GetImageMap( const css::datatransfer::DataFlavor& rFlavor, ImageMap& rIMap ) const
{
tools::SvRef<SotTempStream> xStm;
bool bRet = GetSotStorageStream( rFlavor, xStm );
@@ -1832,14 +1832,14 @@ bool TransferableDataHelper::GetTransferableObjectDescriptor( TransferableObject
}
-bool TransferableDataHelper::GetINetBookmark( SotClipboardFormatId nFormat, INetBookmark& rBmk )
+bool TransferableDataHelper::GetINetBookmark( SotClipboardFormatId nFormat, INetBookmark& rBmk ) const
{
DataFlavor aFlavor;
return( SotExchange::GetFormatDataFlavor( nFormat, aFlavor ) && GetINetBookmark( aFlavor, rBmk ) );
}
-bool TransferableDataHelper::GetINetBookmark( const css::datatransfer::DataFlavor& rFlavor, INetBookmark& rBmk )
+bool TransferableDataHelper::GetINetBookmark( const css::datatransfer::DataFlavor& rFlavor, INetBookmark& rBmk ) const
{
bool bRet = false;
if( HasFormat( rFlavor ))
@@ -1975,7 +1975,7 @@ bool TransferableDataHelper::GetINetBookmark( const css::datatransfer::DataFlavo
bool TransferableDataHelper::GetINetImage( SotClipboardFormatId nFormat,
- INetImage& rINtImg )
+ INetImage& rINtImg ) const
{
DataFlavor aFlavor;
return( SotExchange::GetFormatDataFlavor( nFormat, aFlavor ) && GetINetImage( aFlavor, rINtImg ) );
@@ -1984,7 +1984,7 @@ bool TransferableDataHelper::GetINetImage( SotClipboardFormatId nFormat,
bool TransferableDataHelper::GetINetImage(
const css::datatransfer::DataFlavor& rFlavor,
- INetImage& rINtImg )
+ INetImage& rINtImg ) const
{
tools::SvRef<SotTempStream> xStm;
bool bRet = GetSotStorageStream( rFlavor, xStm );
@@ -1996,14 +1996,14 @@ bool TransferableDataHelper::GetINetImage(
bool TransferableDataHelper::GetFileList( SotClipboardFormatId nFormat,
- FileList& rFileList )
+ FileList& rFileList ) const
{
DataFlavor aFlavor;
return( SotExchange::GetFormatDataFlavor( nFormat, aFlavor ) && GetFileList( rFileList ) );
}
-bool TransferableDataHelper::GetFileList( FileList& rFileList )
+bool TransferableDataHelper::GetFileList( FileList& rFileList ) const
{
tools::SvRef<SotTempStream> xStm;
bool bRet = false;
@@ -2036,7 +2036,7 @@ bool TransferableDataHelper::GetFileList( FileList& rFileList )
}
-Sequence<sal_Int8> TransferableDataHelper::GetSequence( SotClipboardFormatId nFormat, const OUString& rDestDoc )
+Sequence<sal_Int8> TransferableDataHelper::GetSequence( SotClipboardFormatId nFormat, const OUString& rDestDoc ) const
{
DataFlavor aFlavor;
if (!SotExchange::GetFormatDataFlavor(nFormat, aFlavor))
@@ -2045,7 +2045,7 @@ Sequence<sal_Int8> TransferableDataHelper::GetSequence( SotClipboardFormatId nFo
return GetSequence(aFlavor, rDestDoc);
}
-Sequence<sal_Int8> TransferableDataHelper::GetSequence( const DataFlavor& rFlavor, const OUString& rDestDoc )
+Sequence<sal_Int8> TransferableDataHelper::GetSequence( const DataFlavor& rFlavor, const OUString& rDestDoc ) const
{
const Any aAny = GetAny(rFlavor, rDestDoc);
Sequence<sal_Int8> aSeq;
@@ -2056,14 +2056,14 @@ Sequence<sal_Int8> TransferableDataHelper::GetSequence( const DataFlavor& rFlavo
}
-bool TransferableDataHelper::GetSotStorageStream( SotClipboardFormatId nFormat, tools::SvRef<SotTempStream>& rxStream )
+bool TransferableDataHelper::GetSotStorageStream( SotClipboardFormatId nFormat, tools::SvRef<SotTempStream>& rxStream ) const
{
DataFlavor aFlavor;
return( SotExchange::GetFormatDataFlavor( nFormat, aFlavor ) && GetSotStorageStream( aFlavor, rxStream ) );
}
-bool TransferableDataHelper::GetSotStorageStream( const DataFlavor& rFlavor, tools::SvRef<SotTempStream>& rxStream )
+bool TransferableDataHelper::GetSotStorageStream( const DataFlavor& rFlavor, tools::SvRef<SotTempStream>& rxStream ) const
{
Sequence<sal_Int8> aSeq = GetSequence(rFlavor, OUString());
@@ -2077,7 +2077,7 @@ bool TransferableDataHelper::GetSotStorageStream( const DataFlavor& rFlavor, too
return aSeq.hasElements();
}
-Reference<XInputStream> TransferableDataHelper::GetInputStream( SotClipboardFormatId nFormat, const OUString& rDestDoc )
+Reference<XInputStream> TransferableDataHelper::GetInputStream( SotClipboardFormatId nFormat, const OUString& rDestDoc ) const
{
DataFlavor aFlavor;
if (!SotExchange::GetFormatDataFlavor(nFormat, aFlavor))
@@ -2086,7 +2086,7 @@ Reference<XInputStream> TransferableDataHelper::GetInputStream( SotClipboardForm
return GetInputStream(aFlavor, rDestDoc);
}
-Reference<XInputStream> TransferableDataHelper::GetInputStream( const DataFlavor& rFlavor, const OUString& rDestDoc )
+Reference<XInputStream> TransferableDataHelper::GetInputStream( const DataFlavor& rFlavor, const OUString& rDestDoc ) const
{
Sequence<sal_Int8> aSeq = GetSequence(rFlavor, rDestDoc);
diff --git a/vcl/source/treelist/treelistbox.cxx b/vcl/source/treelist/treelistbox.cxx
index 35eb3271f403..8782547f4c92 100644
--- a/vcl/source/treelist/treelistbox.cxx
+++ b/vcl/source/treelist/treelistbox.cxx
@@ -353,7 +353,7 @@ int SvLBoxItem::GetHeight(const SvTreeListBox* pView, const SvTreeListEntry* pEn
return pViewData->mnHeight;
}
-int SvLBoxItem::GetWidth(const SvTreeListBox* pView, const SvViewDataEntry* pData, sal_uInt16 nItemPos)
+int SvLBoxItem::GetWidth(const SvTreeListBox* pView, const SvViewDataEntry* pData, sal_uInt16 nItemPos) const
{
const SvViewDataItem& rIData = pData->GetItem(nItemPos);
int nWidth = rIData.mnWidth;
@@ -2846,7 +2846,7 @@ void SvTreeListBox::DrawCustomEntry(vcl::RenderContext& rRenderContext, const to
aCustomRenderHdl.Call(std::tuple<vcl::RenderContext&, const tools::Rectangle&, const SvTreeListEntry&>(rRenderContext, rRect, rEntry));
}
-Size SvTreeListBox::MeasureCustomEntry(vcl::RenderContext& rRenderContext, const SvTreeListEntry& rEntry)
+Size SvTreeListBox::MeasureCustomEntry(vcl::RenderContext& rRenderContext, const SvTreeListEntry& rEntry) const
{
return aCustomMeasureHdl.Call(std::pair<vcl::RenderContext&, const SvTreeListEntry&>(rRenderContext, rEntry));
}
@@ -2947,7 +2947,7 @@ tools::Rectangle SvTreeListBox::GetFocusRect(const SvTreeListEntry* pEntry, tool
return aRect;
}
-sal_IntPtr SvTreeListBox::GetTabPos(const SvTreeListEntry* pEntry, const SvLBoxTab* pTab)
+sal_IntPtr SvTreeListBox::GetTabPos(const SvTreeListEntry* pEntry, const SvLBoxTab* pTab) const
{
assert(pTab);
sal_IntPtr nPos = pTab->GetPos();
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 0feb6e1689bf..b29d58455f5f 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -3025,7 +3025,7 @@ void VclBuilder::handleListStore(xmlreader::XmlReader &reader, const OString &rI
}
}
-VclBuilder::stringmap VclBuilder::handleAtkObject(xmlreader::XmlReader &reader)
+VclBuilder::stringmap VclBuilder::handleAtkObject(xmlreader::XmlReader &reader) const
{
int nLevel = 1;
diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx
index 4ac2211b8864..f63c0b4127f4 100644
--- a/vcl/source/window/menubarwindow.cxx
+++ b/vcl/source/window/menubarwindow.cxx
@@ -207,7 +207,7 @@ void MenuBarWindow::ShowButtons( bool bClose, bool bFloat, bool bHide )
Resize();
}
-Size const & MenuBarWindow::MinCloseButtonSize()
+Size const & MenuBarWindow::MinCloseButtonSize() const
{
return m_aCloseBtn->getMinSize();
}
@@ -670,7 +670,7 @@ void MenuBarWindow::HighlightItem(vcl::RenderContext& rRenderContext, sal_uInt16
}
}
-tools::Rectangle MenuBarWindow::ImplGetItemRect( sal_uInt16 nPos )
+tools::Rectangle MenuBarWindow::ImplGetItemRect( sal_uInt16 nPos ) const
{
tools::Rectangle aRect;
if( m_pMenu )
diff --git a/vcl/source/window/menubarwindow.hxx b/vcl/source/window/menubarwindow.hxx
index 469c141cae92..144607cce2d6 100644
--- a/vcl/source/window/menubarwindow.hxx
+++ b/vcl/source/window/menubarwindow.hxx
@@ -89,7 +89,7 @@ private:
sal_uInt16 ImplFindEntry( const Point& rMousePos ) const;
void ImplCreatePopup( bool bPreSelectFirst );
bool HandleKeyEvent(const KeyEvent& rKEvent, bool bFromMenu = true);
- tools::Rectangle ImplGetItemRect( sal_uInt16 nPos );
+ tools::Rectangle ImplGetItemRect( sal_uInt16 nPos ) const;
void ImplInitStyleSettings();
@@ -128,7 +128,7 @@ public:
void SetAutoPopup(bool bAuto) { mbAutoPopup = bAuto; }
void LayoutChanged();
- Size const & MinCloseButtonSize();
+ Size const & MinCloseButtonSize() const;
/// Add an arbitrary button to the menubar that will appear next to the close button.
sal_uInt16 AddMenuBarButton(const Image&, const Link<MenuBar::MenuBarButtonCallbackArg&,bool>&, const OUString&);
diff --git a/vcl/source/window/menufloatingwindow.cxx b/vcl/source/window/menufloatingwindow.cxx
index 85478ac64764..cfd6a6ae190e 100644
--- a/vcl/source/window/menufloatingwindow.cxx
+++ b/vcl/source/window/menufloatingwindow.cxx
@@ -910,7 +910,7 @@ void MenuFloatingWindow::RenderHighlightItem(vcl::RenderContext& rRenderContext,
}
}
-tools::Rectangle MenuFloatingWindow::ImplGetItemRect( sal_uInt16 nPos )
+tools::Rectangle MenuFloatingWindow::ImplGetItemRect( sal_uInt16 nPos ) const
{
if( ! pMenu )
return tools::Rectangle();
diff --git a/vcl/source/window/menufloatingwindow.hxx b/vcl/source/window/menufloatingwindow.hxx
index 2fbc19f2d4d3..f26fb50373ca 100644
--- a/vcl/source/window/menufloatingwindow.hxx
+++ b/vcl/source/window/menufloatingwindow.hxx
@@ -77,7 +77,7 @@ protected:
void ImplCursorUpDown( bool bUp, bool bHomeEnd = false );
void ImplHighlightItem( const MouseEvent& rMEvt, bool bMBDown );
tools::Long ImplGetStartY() const;
- tools::Rectangle ImplGetItemRect( sal_uInt16 nPos );
+ tools::Rectangle ImplGetItemRect( sal_uInt16 nPos ) const;
void RenderHighlightItem( vcl::RenderContext& rRenderContext, sal_uInt16 nPos );
tools::Long GetInitialItemY( tools::Long *pOptStartY = nullptr ) const;
void InvalidateItem( sal_uInt16 nPos );
diff --git a/vcl/source/window/menuitemlist.hxx b/vcl/source/window/menuitemlist.hxx
index b2f4ca62a488..25af6fc6db8e 100644
--- a/vcl/source/window/menuitemlist.hxx
+++ b/vcl/source/window/menuitemlist.hxx
@@ -141,7 +141,7 @@ public:
) const;
size_t GetItemCount( sal_Unicode cSelectChar ) const;
size_t GetItemCount( vcl::KeyCode aKeyCode ) const;
- size_t size()
+ size_t size() const
{
return maItemList.size();
}
diff --git a/vcl/source/window/scrwnd.cxx b/vcl/source/window/scrwnd.cxx
index 21bbb7f787de..6376ea0bebb9 100644
--- a/vcl/source/window/scrwnd.cxx
+++ b/vcl/source/window/scrwnd.cxx
@@ -223,7 +223,7 @@ void ImplWheelWindow::ImplRecalcScrollValues()
}
}
-PointerStyle ImplWheelWindow::ImplGetMousePointer( tools::Long nDistX, tools::Long nDistY )
+PointerStyle ImplWheelWindow::ImplGetMousePointer( tools::Long nDistX, tools::Long nDistY ) const
{
PointerStyle eStyle;
const StartAutoScrollFlags nFlags = ImplGetSVData()->mpWinData->mnAutoScrollFlags;
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index 58e6dda127b4..755bf9643585 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -96,7 +96,7 @@ static Point ImplGetItemTextPos( const Size& rRectSize, const Size& rTextSize,
return Point( nX, nY );
}
-bool StatusBar::ImplIsItemUpdate()
+bool StatusBar::ImplIsItemUpdate() const
{
return !mbProgressMode && IsReallyVisible() && IsUpdateMode();
}
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 82d301840e9a..37f9595561cd 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -434,7 +434,7 @@ void ToolBox::ImplDrawGradientBackground(vcl::RenderContext& rRenderContext)
}
-bool ToolBox::ImplDrawNativeBackground(vcl::RenderContext& rRenderContext)
+bool ToolBox::ImplDrawNativeBackground(vcl::RenderContext& rRenderContext) const
{
// use NWF
tools::Rectangle aCtrlRegion(Point(), GetOutputSizePixel());
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index ad4668e6ce86..ba9fce890110 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -857,7 +857,7 @@ tools::Rectangle const & ToolBox::GetOverflowRect() const
return mpData->maMenubuttonItem.maRect;
}
-bool ToolBox::ImplHasExternalMenubutton()
+bool ToolBox::ImplHasExternalMenubutton() const
{
// check if the borderwindow (i.e. the decoration) provides the menu button
bool bRet = false;
diff --git a/vcl/unx/generic/dtrans/bmp.cxx b/vcl/unx/generic/dtrans/bmp.cxx
index 87328c8712f0..ac8e50cc2e29 100644
--- a/vcl/unx/generic/dtrans/bmp.cxx
+++ b/vcl/unx/generic/dtrans/bmp.cxx
@@ -619,7 +619,7 @@ void PixmapHolder::setBitmapDataTC( const sal_uInt8* pData, XImage* pImage )
}
}
-bool PixmapHolder::needsConversion( const sal_uInt8* pData )
+bool PixmapHolder::needsConversion( const sal_uInt8* pData ) const
{
if( pData[0] != 'B' || pData[1] != 'M' )
return true;
diff --git a/vcl/unx/generic/dtrans/bmp.hxx b/vcl/unx/generic/dtrans/bmp.hxx
index 0f7de01fe7ef..3a37158db36f 100644
--- a/vcl/unx/generic/dtrans/bmp.hxx
+++ b/vcl/unx/generic/dtrans/bmp.hxx
@@ -58,7 +58,7 @@ public:
// accepts bitmap file (including bitmap file header)
Pixmap setBitmapData( const sal_uInt8* pData );
- bool needsConversion( const sal_uInt8* pData );
+ bool needsConversion( const sal_uInt8* pData ) const;
Colormap getColormap() const { return m_aColormap; }
Pixmap getPixmap() const { return m_aPixmap; }
diff --git a/vcl/unx/generic/print/printerjob.cxx b/vcl/unx/generic/print/printerjob.cxx
index 1ce42b6e0d40..f0ca4ebb002a 100644
--- a/vcl/unx/generic/print/printerjob.cxx
+++ b/vcl/unx/generic/print/printerjob.cxx
@@ -79,7 +79,7 @@ AppendPS (FILE* pDst, osl::File* pSrc, unsigned char* pBuffer)
*/
std::unique_ptr<osl::File>
-PrinterJob::CreateSpoolFile (std::u16string_view rName, std::u16string_view rExtension)
+PrinterJob::CreateSpoolFile (std::u16string_view rName, std::u16string_view rExtension) const
{
OUString aFile = OUString::Concat(rName) + rExtension;
OUString aFileURL;
@@ -670,7 +670,7 @@ static bool writeFeature( osl::File* pFile, const PPDKey* pKey, const PPDValue*
|| nWritten != static_cast<sal_uInt64>(aFeature.getLength()));
}
-bool PrinterJob::writeFeatureList( osl::File* pFile, const JobData& rJob, bool bDocumentSetup )
+bool PrinterJob::writeFeatureList( osl::File* pFile, const JobData& rJob, bool bDocumentSetup ) const
{
bool bSuccess = true;
More information about the Libreoffice-commits
mailing list