basic/source/basmgr/basmgr.cxx | 2 - basic/source/inc/scanner.hxx | 2 - canvas/source/vcl/canvashelper_texturefill.cxx | 2 - compilerplugins/clang/constparams.cxx | 5 ++ connectivity/source/commontools/sqlerror.cxx | 9 ++-- connectivity/source/resource/sharedresources.cxx | 4 +- drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx | 2 - drawinglayer/source/processor2d/vclmetafileprocessor2d.hxx | 2 - editeng/inc/editdoc.hxx | 2 - editeng/source/editeng/editeng.cxx | 4 +- editeng/source/editeng/impedit.hxx | 8 ++-- editeng/source/outliner/outliner.cxx | 8 ++-- editeng/source/uno/unoedprx.cxx | 2 - i18npool/inc/cclass_unicode.hxx | 2 - i18npool/inc/characterclassificationImpl.hxx | 8 ++-- i18npool/inc/indexentrysupplier_common.hxx | 2 - i18npool/inc/transliteration_Numeric.hxx | 2 - i18npool/inc/xdictionary.hxx | 6 +-- i18npool/source/breakiterator/xdictionary.cxx | 6 +-- i18npool/source/characterclassification/cclass_unicode_parser.cxx | 2 - i18npool/source/indexentry/indexentrysupplier_common.cxx | 2 - i18npool/source/localedata/localedata.cxx | 2 - i18npool/source/search/levdis.hxx | 2 - i18npool/source/transliteration/transliteration_Numeric.cxx | 2 - include/editeng/editeng.hxx | 6 +-- include/editeng/outliner.hxx | 8 ++-- include/editeng/unoedprx.hxx | 2 - include/package/Inflater.hxx | 4 +- include/sfx2/listview.hxx | 8 ++-- include/sfx2/thumbnailview.hxx | 4 +- include/svtools/brwbox.hxx | 6 +-- include/svtools/ctrlbox.hxx | 14 +++---- include/svtools/miscopt.hxx | 2 - include/svtools/valueset.hxx | 2 - include/svx/gallerybinaryengineentry.hxx | 2 - include/svx/obj3d.hxx | 2 - include/svx/svditer.hxx | 2 - include/svx/svdpntv.hxx | 2 - include/toolkit/awt/vclxwindows.hxx | 2 - include/xmloff/xmlnumfi.hxx | 2 - include/xmloff/xmluconv.hxx | 6 +-- package/source/xstor/owriteablestream.hxx | 2 - sc/source/ui/inc/anyrefdg.hxx | 2 - sc/source/ui/inc/gridwin.hxx | 2 - scripting/source/provider/ProviderCache.cxx | 2 - scripting/source/provider/ProviderCache.hxx | 2 - sd/source/ui/inc/View.hxx | 2 - sd/source/ui/view/sdview3.cxx | 2 - sfx2/source/control/listview.cxx | 2 - sfx2/source/control/thumbnailview.cxx | 4 +- svtools/source/brwbox/brwbox1.cxx | 2 - svtools/source/brwbox/brwbox2.cxx | 2 - svtools/source/brwbox/datwin.cxx | 2 - svtools/source/brwbox/datwin.hxx | 2 - svtools/source/config/colorcfg.cxx | 2 - svtools/source/config/miscopt.cxx | 4 +- svtools/source/control/ctrlbox.cxx | 2 - svtools/source/control/valueset.cxx | 2 - svtools/source/table/tablecontrol_impl.cxx | 4 +- svtools/source/table/tablecontrol_impl.hxx | 4 +- svx/source/engine3d/obj3d.cxx | 2 - svx/source/gallery2/galini.cxx | 2 - sw/source/uibase/dochdl/swdtflvr.cxx | 20 +++++----- sw/source/uibase/inc/navicont.hxx | 2 - sw/source/uibase/inc/navipi.hxx | 2 - sw/source/uibase/inc/swdtflvr.hxx | 20 +++++----- sw/source/uibase/utlui/content.cxx | 2 - sw/source/uibase/utlui/navipi.cxx | 2 - toolkit/source/awt/stylesettings.cxx | 4 +- toolkit/source/awt/stylesettings.hxx | 4 +- toolkit/source/awt/vclxwindows.cxx | 2 - ucb/source/cacher/cachedcontentresultset.cxx | 8 ++-- ucb/source/cacher/cachedcontentresultset.hxx | 8 ++-- ucb/source/sorter/sortresult.hxx | 2 - ucb/source/ucp/cmis/cmis_url.cxx | 2 - ucb/source/ucp/cmis/cmis_url.hxx | 2 - ucb/source/ucp/file/filinpstr.hxx | 2 - ucb/source/ucp/file/filrow.cxx | 2 - ucb/source/ucp/file/filrow.hxx | 2 - ucb/source/ucp/file/filrset.hxx | 2 - ucb/source/ucp/file/filstr.hxx | 2 - ucb/source/ucp/tdoc/tdoc_content.hxx | 2 - ucb/source/ucp/webdav-neon/NeonSession.cxx | 2 - ucb/source/ucp/webdav-neon/NeonSession.hxx | 2 - vcl/inc/unx/gtk/gtksalmenu.hxx | 2 - vcl/source/bitmap/impvect.cxx | 4 +- vcl/unx/gtk3/fpicker/SalGtkPicker.cxx | 4 +- vcl/unx/gtk3/fpicker/SalGtkPicker.hxx | 4 +- vcl/unx/gtk3/gtksalmenu.cxx | 2 - xmloff/source/core/xmluconv.cxx | 6 +-- xmloff/source/style/xmlnumfi.cxx | 2 - 91 files changed, 167 insertions(+), 165 deletions(-)
New commits: commit 581efdec36787dc5e378e54d13e7328fddcf3a50 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Fri Oct 1 13:01:58 2021 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Fri Oct 1 20:58:11 2021 +0200 loplugin:constmethod Change-Id: I3ed657c5c5e6840e38e3c8505505b4b372125df0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122910 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx index 03fe6ef6597c..c254fb7470ad 100644 --- a/basic/source/basmgr/basmgr.cxx +++ b/basic/source/basmgr/basmgr.cxx @@ -352,7 +352,7 @@ public: void SetLibName( const OUString& rName ) { aLibName = rName; } // Only temporary for Load/Save - bool DoLoad() { return bDoLoad; } + bool DoLoad() const { return bDoLoad; } bool HasPassword() const { return !aPassword.isEmpty(); } const OUString& GetPassword() const { return aPassword; } diff --git a/basic/source/inc/scanner.hxx b/basic/source/inc/scanner.hxx index 339b4421b829..19ee31947120 100644 --- a/basic/source/inc/scanner.hxx +++ b/basic/source/inc/scanner.hxx @@ -72,7 +72,7 @@ public: bool IsCompatible() const { return bCompatible; } void SetCompatible( bool b ) { bCompatible = b; } // #118206 bool IsVBASupportOn() const { return bVBASupportOn; } - bool WhiteSpace() { return bSpaces; } + bool WhiteSpace() const { return bSpaces; } sal_Int32 GetErrors() const { return nErrors; } sal_Int32 GetLine() const { return nLine; } sal_Int32 GetCol1() const { return nCol1; } diff --git a/connectivity/source/commontools/sqlerror.cxx b/connectivity/source/commontools/sqlerror.cxx index 383743906520..82525dc44f4a 100644 --- a/connectivity/source/commontools/sqlerror.cxx +++ b/connectivity/source/commontools/sqlerror.cxx @@ -50,7 +50,7 @@ namespace connectivity // versions of the public SQLError methods which are just delegated to this impl-class static const OUString& getMessagePrefix(); - OUString getErrorMessage( const ErrorCondition _eCondition, const std::optional<OUString>& _rParamValue1, const std::optional<OUString>& _rParamValue2, const std::optional<OUString>& _rParamValue3 ); + OUString getErrorMessage( const ErrorCondition _eCondition, const std::optional<OUString>& _rParamValue1, const std::optional<OUString>& _rParamValue2, const std::optional<OUString>& _rParamValue3 ) const; static ErrorCode getErrorCode( const ErrorCondition _eCondition ); void raiseException( const ErrorCondition _eCondition, const Reference< XInterface >& _rxContext, const std::optional<OUString>& _rParamValue1, const std::optional<OUString>& _rParamValue2, const std::optional<OUString>& _rParamValue3 ); void raiseException( const ErrorCondition _eCondition, const std::optional<OUString>& _rParamValue1, const std::optional<OUString>& _rParamValue2, const std::optional<OUString>& _rParamValue3 ); @@ -59,8 +59,7 @@ namespace connectivity private: /// returns the basic error message associated with the given error condition, without any parameter replacements - OUString - impl_getErrorMessage( ErrorCondition _eCondition ); + OUString impl_getErrorMessage( ErrorCondition _eCondition ) const; /// returns the SQLState associated with the given error condition static OUString @@ -142,7 +141,7 @@ namespace connectivity } } - OUString SQLError_Impl::getErrorMessage( const ErrorCondition _eCondition, const std::optional<OUString>& _rParamValue1, const std::optional<OUString>& _rParamValue2, const std::optional<OUString>& _rParamValue3 ) + OUString SQLError_Impl::getErrorMessage( const ErrorCondition _eCondition, const std::optional<OUString>& _rParamValue1, const std::optional<OUString>& _rParamValue2, const std::optional<OUString>& _rParamValue3 ) const { OUString sErrorMessage( impl_getErrorMessage( _eCondition ) ); @@ -220,7 +219,7 @@ namespace connectivity ); } - OUString SQLError_Impl::impl_getErrorMessage( ErrorCondition _eCondition ) + OUString SQLError_Impl::impl_getErrorMessage( ErrorCondition _eCondition ) const { OUString sResMessage(Translate::get(lcl_getResourceErrorID(_eCondition), m_aResources)); OSL_ENSURE( !sResMessage.isEmpty(), "SQLError_Impl::impl_getErrorMessage: illegal error condition, or invalid resource!" ); diff --git a/connectivity/source/resource/sharedresources.cxx b/connectivity/source/resource/sharedresources.cxx index b7c204c9f1cc..a6f218147e71 100644 --- a/connectivity/source/resource/sharedresources.cxx +++ b/connectivity/source/resource/sharedresources.cxx @@ -44,7 +44,7 @@ namespace connectivity static SharedResources_Impl& getInstance(); - OUString getResourceString(TranslateId pId); + OUString getResourceString(TranslateId pId) const; private: SharedResources_Impl(); @@ -66,7 +66,7 @@ namespace connectivity { } - OUString SharedResources_Impl::getResourceString(TranslateId pId) + OUString SharedResources_Impl::getResourceString(TranslateId pId) const { return Translate::get(pId, m_aLocale); } diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx index 52013c1e8850..c850ff32e900 100644 --- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx @@ -2368,7 +2368,7 @@ void VclMetafileProcessor2D::processStructureTagPrimitive2D( VclPtr<VirtualDevice> VclMetafileProcessor2D::CreateBufferDevice(const basegfx::B2DRange& rCandidateRange, geometry::ViewInformation2D& rViewInfo, - tools::Rectangle& rRectLogic, Size& rSizePixel) + tools::Rectangle& rRectLogic, Size& rSizePixel) const { constexpr double fMaxSquarePixels = 500000; basegfx::B2DRange aViewRange(rCandidateRange); diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.hxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.hxx index 67a79ca307cc..06fd61e18309 100644 --- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.hxx +++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.hxx @@ -147,7 +147,7 @@ private: void processPrimitive2DOnPixelProcessor(const primitive2d::BasePrimitive2D& rCandidate); VclPtr<VirtualDevice> CreateBufferDevice(const basegfx::B2DRange& rCandidateRange, geometry::ViewInformation2D& rViewInfo, - tools::Rectangle& rRectLogic, Size& rSizePixel); + tools::Rectangle& rRectLogic, Size& rSizePixel) const; /// Convert the fWidth to the same space as its coordinates. double getTransformedLineWidth(double fWidth) const; diff --git a/editeng/inc/editdoc.hxx b/editeng/inc/editdoc.hxx index b18b22195973..3fb103532f38 100644 --- a/editeng/inc/editdoc.hxx +++ b/editeng/inc/editdoc.hxx @@ -143,7 +143,7 @@ public: ItemList(); const SfxPoolItem* First(); const SfxPoolItem* Next(); - sal_Int32 Count() { return aItemPool.size(); }; + sal_Int32 Count() const { return aItemPool.size(); }; void Insert( const SfxPoolItem* pItem ); void Clear() { aItemPool.clear(); }; }; diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index d22c74ade973..c2a1537c6bbe 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -936,7 +936,7 @@ EditPaM EditEngine::DeleteSelection(const EditSelection& rSel) return pImpEditEngine->ImpDeleteSelection(rSel); } -ESelection EditEngine::CreateESelection(const EditSelection& rSel) +ESelection EditEngine::CreateESelection(const EditSelection& rSel) const { return pImpEditEngine->CreateESel(rSel); } @@ -1766,7 +1766,7 @@ bool EditEngine::HasParaAttrib( sal_Int32 nPara, sal_uInt16 nWhich ) const return pImpEditEngine->HasParaAttrib( nPara, nWhich ); } -const SfxPoolItem& EditEngine::GetParaAttrib( sal_Int32 nPara, sal_uInt16 nWhich ) +const SfxPoolItem& EditEngine::GetParaAttrib( sal_Int32 nPara, sal_uInt16 nWhich ) const { return pImpEditEngine->GetParaAttrib( nPara, nWhich ); } diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx index a8f07741cc41..48bec8498033 100644 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -962,9 +962,9 @@ public: bool DoVisualCursorTraveling(); EditSelection ConvertSelection( sal_Int32 nStartPara, sal_Int32 nStartPos, sal_Int32 nEndPara, sal_Int32 nEndPos ); - inline EPaM CreateEPaM( const EditPaM& rPaM ); + inline EPaM CreateEPaM( const EditPaM& rPaM ) const; inline EditPaM CreateEditPaM( const EPaM& rEPaM ); - inline ESelection CreateESel( const EditSelection& rSel ); + inline ESelection CreateESel( const EditSelection& rSel ) const; inline EditSelection CreateSel( const ESelection& rSel ); void SetStyleSheetPool( SfxStyleSheetPool* pSPool ); @@ -1174,7 +1174,7 @@ public: Size getTopLeftDocOffset(const tools::Rectangle& rect) const; }; -inline EPaM ImpEditEngine::CreateEPaM( const EditPaM& rPaM ) +inline EPaM ImpEditEngine::CreateEPaM( const EditPaM& rPaM ) const { const ContentNode* pNode = rPaM.GetNode(); return EPaM( aEditDoc.GetPos( pNode ), rPaM.GetIndex() ); @@ -1187,7 +1187,7 @@ inline EditPaM ImpEditEngine::CreateEditPaM( const EPaM& rEPaM ) return EditPaM( aEditDoc[ rEPaM.nPara], rEPaM.nIndex ); } -inline ESelection ImpEditEngine::CreateESel( const EditSelection& rSel ) +inline ESelection ImpEditEngine::CreateESel( const EditSelection& rSel ) const { const ContentNode* pStartNode = rSel.Min().GetNode(); const ContentNode* pEndNode = rSel.Max().GetNode(); diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx index 73e831b93ec9..4eacd5d76d82 100644 --- a/editeng/source/outliner/outliner.cxx +++ b/editeng/source/outliner/outliner.cxx @@ -253,7 +253,7 @@ void Outliner::SetDepth( Paragraph* pPara, sal_Int16 nNewDepth ) DepthChangedHdl(pPara, nPrevFlags); } -sal_Int16 Outliner::GetNumberingStartValue( sal_Int32 nPara ) +sal_Int16 Outliner::GetNumberingStartValue( sal_Int32 nPara ) const { Paragraph* pPara = pParaList->GetParagraph( nPara ); DBG_ASSERT( pPara, "Outliner::GetNumberingStartValue - Paragraph not found!" ); @@ -277,7 +277,7 @@ void Outliner::SetNumberingStartValue( sal_Int32 nPara, sal_Int16 nNumberingStar } } -bool Outliner::IsParaIsNumberingRestart( sal_Int32 nPara ) +bool Outliner::IsParaIsNumberingRestart( sal_Int32 nPara ) const { Paragraph* pPara = pParaList->GetParagraph( nPara ); DBG_ASSERT( pPara, "Outliner::IsParaIsNumberingRestart - Paragraph not found!" ); @@ -1335,7 +1335,7 @@ void Outliner::DepthChangedHdl(Paragraph* pPara, ParaFlag nPrevFlags) } -sal_Int32 Outliner::GetAbsPos( Paragraph const * pPara ) +sal_Int32 Outliner::GetAbsPos( Paragraph const * pPara ) const { DBG_ASSERT(pPara,"GetAbsPos:No Para"); return pParaList->GetAbsPos( pPara ); @@ -1699,7 +1699,7 @@ bool Outliner::ImpCanDeleteSelectedPages( OutlinerView* pCurView, sal_Int32 _nFi return RemovingPagesHdl( pCurView ); } -SfxItemSet const & Outliner::GetParaAttribs( sal_Int32 nPara ) +SfxItemSet const & Outliner::GetParaAttribs( sal_Int32 nPara ) const { return pEditEngine->GetParaAttribs( nPara ); } diff --git a/editeng/source/uno/unoedprx.cxx b/editeng/source/uno/unoedprx.cxx index 0eeaa796c0bb..a0eb64a93224 100644 --- a/editeng/source/uno/unoedprx.cxx +++ b/editeng/source/uno/unoedprx.cxx @@ -1055,7 +1055,7 @@ bool SvxAccessibleTextAdapter::HaveTextBullet( sal_Int32 nPara ) const aBulletInfo.nType != SVX_NUM_BITMAP ); } -bool SvxAccessibleTextAdapter::IsEditable( const ESelection& rSel ) +bool SvxAccessibleTextAdapter::IsEditable( const ESelection& rSel ) const { SvxAccessibleTextIndex aStartIndex; SvxAccessibleTextIndex aEndIndex; diff --git a/i18npool/inc/cclass_unicode.hxx b/i18npool/inc/cclass_unicode.hxx index 704deabc46b5..b08170638de8 100644 --- a/i18npool/inc/cclass_unicode.hxx +++ b/i18npool/inc/cclass_unicode.hxx @@ -147,7 +147,7 @@ private: ParserFlags getFlags(sal_uInt32 c); /// Access parser flags via International and special definitions. - ParserFlags getFlagsExtended(sal_uInt32 c); + ParserFlags getFlagsExtended(sal_uInt32 c) const; /// Access parser table flags for user defined start characters. ParserFlags getStartCharsFlags( sal_uInt32 c ); diff --git a/i18npool/inc/characterclassificationImpl.hxx b/i18npool/inc/characterclassificationImpl.hxx index 4e03a54fd3be..9fc342d3949b 100644 --- a/i18npool/inc/characterclassificationImpl.hxx +++ b/i18npool/inc/characterclassificationImpl.hxx @@ -76,10 +76,10 @@ private: css::lang::Locale aLocale; OUString aName; css::uno::Reference < XCharacterClassification > xCI; - bool equals(const css::lang::Locale& rLocale) { - return aLocale.Language == rLocale.Language && - aLocale.Country == rLocale.Country && - aLocale.Variant == rLocale.Variant; + bool equals(const css::lang::Locale& rLocale) const { + return aLocale.Language == rLocale.Language && + aLocale.Country == rLocale.Country && + aLocale.Variant == rLocale.Variant; }; }; std::vector<lookupTableItem> lookupTable; diff --git a/i18npool/inc/indexentrysupplier_common.hxx b/i18npool/inc/indexentrysupplier_common.hxx index 72685fda9aa2..f728e4230500 100644 --- a/i18npool/inc/indexentrysupplier_common.hxx +++ b/i18npool/inc/indexentrysupplier_common.hxx @@ -87,7 +87,7 @@ protected: /// @throws css::uno::RuntimeException const OUString& getEntry( const OUString& IndexEntry, - const OUString& PhoneticEntry, const css::lang::Locale& rLocale ); + const OUString& PhoneticEntry, const css::lang::Locale& rLocale ) const; }; } diff --git a/i18npool/inc/transliteration_Numeric.hxx b/i18npool/inc/transliteration_Numeric.hxx index 1e50e4a5d69c..10dc5f662afb 100644 --- a/i18npool/inc/transliteration_Numeric.hxx +++ b/i18npool/inc/transliteration_Numeric.hxx @@ -51,7 +51,7 @@ private: /// @throws css::uno::RuntimeException OUString transliterateBullet( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, - css::uno::Sequence< sal_Int32 >* pOffset ); + css::uno::Sequence< sal_Int32 >* pOffset ) const; }; } diff --git a/i18npool/inc/xdictionary.hxx b/i18npool/inc/xdictionary.hxx index 6d6e20f10240..664e88a4fa48 100644 --- a/i18npool/inc/xdictionary.hxx +++ b/i18npool/inc/xdictionary.hxx @@ -36,7 +36,7 @@ struct WordBreakCache { sal_Int32 size; // size of wordboundary WordBreakCache(); - bool equals(const sal_Unicode *str, css::i18n::Boundary const & boundary); // checking cached string + bool equals(const sal_Unicode *str, css::i18n::Boundary const & boundary) const; // checking cached string }; struct xdictionarydata @@ -80,8 +80,8 @@ private: bool seekSegment(const OUString& rText, sal_Int32 pos, css::i18n::Boundary& boundary); WordBreakCache& getCache(const sal_Unicode *text, css::i18n::Boundary const & boundary); - bool exists(const sal_uInt32 u); - sal_Int32 getLongestMatch(const sal_Unicode *text, sal_Int32 len); + bool exists(const sal_uInt32 u) const; + sal_Int32 getLongestMatch(const sal_Unicode *text, sal_Int32 len) const; }; } diff --git a/i18npool/source/breakiterator/xdictionary.cxx b/i18npool/source/breakiterator/xdictionary.cxx index 86a703db0440..9134fbc4be13 100644 --- a/i18npool/source/breakiterator/xdictionary.cxx +++ b/i18npool/source/breakiterator/xdictionary.cxx @@ -195,7 +195,7 @@ void xdictionary::setJapaneseWordBreak() japaneseWordBreak = true; } -bool xdictionary::exists(const sal_uInt32 c) +bool xdictionary::exists(const sal_uInt32 c) const { // 0x1FFF is the hardcoded limit in gendict for data.existMarks bool exist = data.existMark && (c>>3) < 0x1FFF && (data.existMark[c>>3] & (1<<(c&0x07))) != 0; @@ -205,7 +205,7 @@ bool xdictionary::exists(const sal_uInt32 c) return exist; } -sal_Int32 xdictionary::getLongestMatch(const sal_Unicode* str, sal_Int32 sLen) +sal_Int32 xdictionary::getLongestMatch(const sal_Unicode* str, sal_Int32 sLen) const { if ( !data.index1 ) return 0; @@ -252,7 +252,7 @@ WordBreakCache::WordBreakCache() : * Compare two unicode string, */ -bool WordBreakCache::equals(const sal_Unicode* str, Boundary const & boundary) +bool WordBreakCache::equals(const sal_Unicode* str, Boundary const & boundary) const { // Different length, different string. if (length != boundary.endPos - boundary.startPos) return false; diff --git a/i18npool/source/characterclassification/cclass_unicode_parser.cxx b/i18npool/source/characterclassification/cclass_unicode_parser.cxx index 5b7fb25fe47d..c5637e8ae876 100644 --- a/i18npool/source/characterclassification/cclass_unicode_parser.cxx +++ b/i18npool/source/characterclassification/cclass_unicode_parser.cxx @@ -593,7 +593,7 @@ ParserFlags cclass_Unicode::getFlags(sal_uInt32 const c) } -ParserFlags cclass_Unicode::getFlagsExtended(sal_uInt32 const c) +ParserFlags cclass_Unicode::getFlagsExtended(sal_uInt32 const c) const { if ( c == cGroupSep ) return ParserFlags::VALUE; diff --git a/i18npool/source/indexentry/indexentrysupplier_common.cxx b/i18npool/source/indexentry/indexentrysupplier_common.cxx index b7c08a0ed82a..0a078f01d323 100644 --- a/i18npool/source/indexentry/indexentrysupplier_common.cxx +++ b/i18npool/source/indexentry/indexentrysupplier_common.cxx @@ -100,7 +100,7 @@ OUString SAL_CALL IndexEntrySupplier_Common::getIndexFollowPageWord( sal_Bool, const OUString& IndexEntrySupplier_Common::getEntry( const OUString& IndexEntry, - const OUString& PhoneticEntry, const lang::Locale& rLocale ) + const OUString& PhoneticEntry, const lang::Locale& rLocale ) const { // The condition for using phonetic entry is: // usePhonetic is set for the algorithm; diff --git a/i18npool/source/localedata/localedata.cxx b/i18npool/source/localedata/localedata.cxx index 33da5647adc3..3dc113fe7eed 100644 --- a/i18npool/source/localedata/localedata.cxx +++ b/i18npool/source/localedata/localedata.cxx @@ -357,7 +357,7 @@ struct LocaleDataLookupTableItem LocaleDataLookupTableItem(const char *name, osl::Module* m, const char* lname) : dllName(name), module(m), localeName(lname) { } - bool equals(const css::lang::Locale& rLocale) + bool equals(const css::lang::Locale& rLocale) const { return (rLocale == aLocale); } diff --git a/i18npool/source/search/levdis.hxx b/i18npool/source/search/levdis.hxx index 1dc570d39c21..c58fba842ef0 100644 --- a/i18npool/source/search/levdis.hxx +++ b/i18npool/source/search/levdis.hxx @@ -178,7 +178,7 @@ public: // c == cpPattern[jj] == cString[ii] // First seek up to found place, if the balance is still equal there then // also compare after the found place. - int levdisbalance(sal_Int32 jj, sal_Int32 ii, sal_Unicode c, const sal_Unicode* cString, sal_Int32 nStringLen) + int levdisbalance(sal_Int32 jj, sal_Int32 ii, sal_Unicode c, const sal_Unicode* cString, sal_Int32 nStringLen) const { int nBalance = 0; diff --git a/i18npool/source/transliteration/transliteration_Numeric.cxx b/i18npool/source/transliteration/transliteration_Numeric.cxx index 35b2b2549b34..22b3769068f5 100644 --- a/i18npool/source/transliteration/transliteration_Numeric.cxx +++ b/i18npool/source/transliteration/transliteration_Numeric.cxx @@ -59,7 +59,7 @@ Sequence< OUString > SAL_CALL OUString transliteration_Numeric::transliterateBullet( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, - Sequence< sal_Int32 >* pOffset ) + Sequence< sal_Int32 >* pOffset ) const { sal_Int32 number = -1, j = 0, endPos = startPos + nCount; diff --git a/include/editeng/editeng.hxx b/include/editeng/editeng.hxx index 9f078cc5f0ab..97b1437f3b5d 100644 --- a/include/editeng/editeng.hxx +++ b/include/editeng/editeng.hxx @@ -330,9 +330,9 @@ public: SfxItemSet GetAttribs( const ESelection& rSel, EditEngineAttribs nOnlyHardAttrib = EditEngineAttribs::All ); bool HasParaAttrib( sal_Int32 nPara, sal_uInt16 nWhich ) const; - const SfxPoolItem& GetParaAttrib( sal_Int32 nPara, sal_uInt16 nWhich ); + const SfxPoolItem& GetParaAttrib( sal_Int32 nPara, sal_uInt16 nWhich ) const; template<class T> - const T& GetParaAttrib( sal_Int32 nPara, TypedWhichId<T> nWhich ) + const T& GetParaAttrib( sal_Int32 nPara, TypedWhichId<T> nWhich ) const { return static_cast<const T&>(GetParaAttrib(nPara, sal_uInt16(nWhich))); } @@ -585,7 +585,7 @@ public: EditPaM DeleteSelection(const EditSelection& rSel); - ESelection CreateESelection(const EditSelection& rSel); + ESelection CreateESelection(const EditSelection& rSel) const; EditSelection CreateSelection(const ESelection& rSel); const SfxItemSet& GetBaseParaAttribs(sal_Int32 nPara) const; diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx index 999981c69af0..fc0f75d89c62 100644 --- a/include/editeng/outliner.hxx +++ b/include/editeng/outliner.hxx @@ -712,7 +712,7 @@ public: sal_Int32 GetChildCount( Paragraph const * pParent ) const; bool IsExpanded( Paragraph const * pPara ) const; Paragraph* GetParent( Paragraph const * pParagraph ) const; - sal_Int32 GetAbsPos( Paragraph const * pPara ); + sal_Int32 GetAbsPos( Paragraph const * pPara ) const; sal_Int16 GetDepth( sal_Int32 nPara ) const; void SetDepth( Paragraph* pParagraph, sal_Int16 nNewDepth ); @@ -839,7 +839,7 @@ public: SfxStyleSheet* GetStyleSheet( sal_Int32 nPara ); void SetParaAttribs( sal_Int32 nPara, const SfxItemSet& ); - SfxItemSet const & GetParaAttribs( sal_Int32 nPara ); + SfxItemSet const & GetParaAttribs( sal_Int32 nPara ) const; void Remove( Paragraph const * pPara, sal_Int32 nParaCount ); bool Expand( Paragraph const * ); @@ -947,10 +947,10 @@ public: /** sets a link that is called after a drop or paste operation. */ void SetEndPasteOrDropHdl( const Link<PasteOrDropInfos*,void>& rLink ); - sal_Int16 GetNumberingStartValue( sal_Int32 nPara ); + sal_Int16 GetNumberingStartValue( sal_Int32 nPara ) const; void SetNumberingStartValue( sal_Int32 nPara, sal_Int16 nNumberingStartValue ); - bool IsParaIsNumberingRestart( sal_Int32 nPara ); + bool IsParaIsNumberingRestart( sal_Int32 nPara ) const; void SetParaIsNumberingRestart( sal_Int32 nPara, bool bParaIsNumberingRestart ); /** determine the bullets/numbering status of the given paragraphs diff --git a/include/editeng/unoedprx.hxx b/include/editeng/unoedprx.hxx index 9786b2399ce3..f1db61fe9b63 100644 --- a/include/editeng/unoedprx.hxx +++ b/include/editeng/unoedprx.hxx @@ -102,7 +102,7 @@ public: be changed, and sal_False if e.g. a field or a bullet is contained therein. */ - bool IsEditable( const ESelection& rSelection ); + bool IsEditable( const ESelection& rSelection ) const; private: SvxTextForwarder* mpTextForwarder; diff --git a/include/package/Inflater.hxx b/include/package/Inflater.hxx index 1b9b134a4ff7..d8b36e175a6b 100644 --- a/include/package/Inflater.hxx +++ b/include/package/Inflater.hxx @@ -42,8 +42,8 @@ public: Inflater(bool bNoWrap); ~Inflater(); void setInput( const css::uno::Sequence< sal_Int8 >& rBuffer ); - bool needsDictionary( ) { return bNeedDict;} - bool finished( ) { return bFinished;} + bool needsDictionary() const { return bNeedDict; } + bool finished() const { return bFinished; } sal_Int32 doInflateSegment( css::uno::Sequence< sal_Int8 >& rBuffer, sal_Int32 nNewOffset, sal_Int32 nNewLength ); void end( ); diff --git a/include/sfx2/listview.hxx b/include/sfx2/listview.hxx index 4343d2519afd..fbcdd0cbdb61 100644 --- a/include/sfx2/listview.hxx +++ b/include/sfx2/listview.hxx @@ -60,7 +60,7 @@ public: void refreshDefaultColumn(); protected: - sal_uInt16 get_nId(int pos); + sal_uInt16 get_nId(int pos) const; void select_id(const OUString& sId) { mxTreeView->select_id(sId); } @@ -70,17 +70,17 @@ protected: bool IsListViewVisible() const { return mxTreeView->is_visible(); } - OUString get_id(int pos) { return mxTreeView->get_id(pos); } + OUString get_id(int pos) const { return mxTreeView->get_id(pos); } void set_cursor(int pos) { mxTreeView->set_cursor(pos); } int get_cursor_index() const { return mxTreeView->get_cursor_index(); } - sal_uInt16 get_cursor_nId() { return get_nId(mxTreeView->get_cursor_index()); } + sal_uInt16 get_cursor_nId() const { return get_nId(mxTreeView->get_cursor_index()); } void select(int pos) { mxTreeView->select(pos); } - int get_index(sal_uInt16 nId) { return mxTreeView->find_id(OUString::number(nId)); } + int get_index(sal_uInt16 nId) const { return mxTreeView->find_id(OUString::number(nId)); } DECL_LINK(ColumnClickedHdl, const int, void); diff --git a/include/sfx2/thumbnailview.hxx b/include/sfx2/thumbnailview.hxx index c485fc0274cf..392d93cf5fba 100644 --- a/include/sfx2/thumbnailview.hxx +++ b/include/sfx2/thumbnailview.hxx @@ -256,7 +256,7 @@ protected: virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override; - css::uno::Reference<css::accessibility::XAccessible> getAccessible(); + css::uno::Reference<css::accessibility::XAccessible> getAccessible() const; protected: @@ -285,7 +285,7 @@ protected: sal_uInt16 ImplGetVisibleItemCount() const; ThumbnailViewItem* ImplGetVisibleItem(sal_uInt16 nVisiblePos); void ImplFireAccessibleEvent( short nEventId, const css::uno::Any& rOldValue, const css::uno::Any& rNewValue ); - bool ImplHasAccessibleListeners(); + bool ImplHasAccessibleListeners() const; DECL_LINK( ImplScrollHdl, weld::ScrolledWindow&, void ); protected: diff --git a/include/svtools/brwbox.hxx b/include/svtools/brwbox.hxx index 60e37de7d432..035334f5f77f 100644 --- a/include/svtools/brwbox.hxx +++ b/include/svtools/brwbox.hxx @@ -216,7 +216,7 @@ public: private: void StartRowDividerDrag( const Point& _rStartPos ); - bool ImplRowDividerHitTest( const BrowserMouseEvent& _rEvent ); + bool ImplRowDividerHitTest( const BrowserMouseEvent& _rEvent ) const; }; class BrowserMouseEvent: public MouseEvent, public BrowseEvent @@ -442,12 +442,12 @@ protected: // HACK(virtual create is not called in Ctor) void SetHeaderBar( BrowserHeader* ); - tools::Long CalcReverseZoom(tools::Long nVal); + tools::Long CalcReverseZoom(tools::Long nVal) const; const DataFlavorExVector& GetDataFlavors() const; - bool IsDropFormatSupported( SotClipboardFormatId nFormat ); // need this because the base class' IsDropFormatSupported is not const ... + bool IsDropFormatSupported( SotClipboardFormatId nFormat ) const; // need this because the base class' IsDropFormatSupported is not const ... void DisposeAccessible(); diff --git a/include/svtools/ctrlbox.hxx b/include/svtools/ctrlbox.hxx index 58a4b8c420af..a9ffc014bf2a 100644 --- a/include/svtools/ctrlbox.hxx +++ b/include/svtools/ctrlbox.hxx @@ -64,25 +64,25 @@ public: } /** Returns the computed width of the line 1 in twips. */ - tools::Long GetLine1ForWidth( tools::Long nWidth ) { return m_aWidthImpl.GetLine1( nWidth ); } + tools::Long GetLine1ForWidth( tools::Long nWidth ) const { return m_aWidthImpl.GetLine1( nWidth ); } /** Returns the computed width of the line 2 in twips. */ - tools::Long GetLine2ForWidth( tools::Long nWidth ) { return m_aWidthImpl.GetLine2( nWidth ); } + tools::Long GetLine2ForWidth( tools::Long nWidth ) const { return m_aWidthImpl.GetLine2( nWidth ); } /** Returns the computed width of the gap in twips. */ - tools::Long GetDistForWidth( tools::Long nWidth ) { return m_aWidthImpl.GetGap( nWidth ); } + tools::Long GetDistForWidth( tools::Long nWidth ) const { return m_aWidthImpl.GetGap( nWidth ); } - Color GetColorLine1( const Color& rMain ) + Color GetColorLine1( const Color& rMain ) const { return ( *m_pColor1Fn )( rMain ); } - Color GetColorLine2( const Color& rMain ) + Color GetColorLine2( const Color& rMain ) const { return ( *m_pColor2Fn )( rMain ); } - Color GetColorDist( const Color& rMain, const Color& rDefault ) + Color GetColorDist( const Color& rMain, const Color& rDefault ) const { return ( *m_pColorDistFn )( rMain, rDefault ); } @@ -257,7 +257,7 @@ private: DECL_LINK(NoneHdl, weld::Button&, void); void UpdateEntries(); - sal_Int32 GetStylePos(sal_Int32 nListPos); + sal_Int32 GetStylePos(sal_Int32 nListPos) const; const Color& GetPaintColor() const { diff --git a/include/svtools/miscopt.hxx b/include/svtools/miscopt.hxx index 1b04df72195d..82b15340dc63 100644 --- a/include/svtools/miscopt.hxx +++ b/include/svtools/miscopt.hxx @@ -61,7 +61,7 @@ class SVT_DLLPUBLIC SvtMiscOptions final : public utl::detail::Options OUString GetIconTheme() const; void SetIconTheme(const OUString&); - bool IconThemeWasSetAutomatically(); + bool IconThemeWasSetAutomatically() const; private: diff --git a/include/svtools/valueset.hxx b/include/svtools/valueset.hxx index 084008c79e2e..95caa8fffa9f 100644 --- a/include/svtools/valueset.hxx +++ b/include/svtools/valueset.hxx @@ -249,7 +249,7 @@ private: SVT_DLLPRIVATE void ImplInsertItem( std::unique_ptr<ValueSetItem> pItem, const size_t nPos ); SVT_DLLPRIVATE tools::Rectangle ImplGetItemRect( size_t nPos ) const; SVT_DLLPRIVATE void ImplFireAccessibleEvent( short nEventId, const css::uno::Any& rOldValue, const css::uno::Any& rNewValue ); - SVT_DLLPRIVATE bool ImplHasAccessibleListeners(); + SVT_DLLPRIVATE bool ImplHasAccessibleListeners() const; SVT_DLLPRIVATE void ImplTracking(const Point& rPos); SVT_DLLPRIVATE void QueueReformat(); SVT_DLLPRIVATE void SetFirstLine(sal_uInt16 nNewFirstLine); // set mnFirstLine and update scrollbar to match diff --git a/include/svx/gallerybinaryengineentry.hxx b/include/svx/gallerybinaryengineentry.hxx index 48a27113ace1..f624e9177bd5 100644 --- a/include/svx/gallerybinaryengineentry.hxx +++ b/include/svx/gallerybinaryengineentry.hxx @@ -38,7 +38,7 @@ public: GalleryBinaryEngineEntry(); static void CreateUniqueURL(const INetURLObject& rBaseURL, INetURLObject& aURL); - OUString ReadStrFromIni(std::u16string_view aKeyName); + OUString ReadStrFromIni(std::u16string_view aKeyName) const; const INetURLObject& GetThmURL() const { return mpGalleryStorageLocations->GetThmURL(); } const INetURLObject& GetSdgURL() const { return mpGalleryStorageLocations->GetSdgURL(); } diff --git a/include/svx/obj3d.hxx b/include/svx/obj3d.hxx index 0cbaa62ef3ee..29feec983475 100644 --- a/include/svx/obj3d.hxx +++ b/include/svx/obj3d.hxx @@ -164,7 +164,7 @@ protected: protected: // convert given basegfx::B3DPolyPolygon to screen coor - basegfx::B2DPolyPolygon TransformToScreenCoor(const basegfx::B3DPolyPolygon& rCandidate); + basegfx::B2DPolyPolygon TransformToScreenCoor(const basegfx::B3DPolyPolygon& rCandidate) const; // protected destructor virtual ~E3dCompoundObject() override; diff --git a/include/svx/svditer.hxx b/include/svx/svditer.hxx index 8f1b022db894..9b43b5637855 100644 --- a/include/svx/svditer.hxx +++ b/include/svx/svditer.hxx @@ -66,7 +66,7 @@ public: return (idx < maObjList.size()) ? const_cast< SdrObject* >(maObjList[idx]) : nullptr; } - size_t Count() { return maObjList.size(); } + size_t Count() const { return maObjList.size(); } }; #endif // INCLUDED_SVX_SVDITER_HXX diff --git a/include/svx/svdpntv.hxx b/include/svx/svdpntv.hxx index 66c1e33e378b..b8212b1fcae4 100644 --- a/include/svx/svdpntv.hxx +++ b/include/svx/svdpntv.hxx @@ -236,7 +236,7 @@ protected: void ImpSetGlueVisible4(bool bOn) { if (mbGlueVisible4!=bOn) { mbGlueVisible4=bOn; if (!mbGlueVisible && !mbGlueVisible2 && !mbGlueVisible3) GlueInvalidate(); } } public: - bool ImpIsGlueVisible() { return mbGlueVisible || mbGlueVisible2 || mbGlueVisible3 || mbGlueVisible4; } + bool ImpIsGlueVisible() const { return mbGlueVisible || mbGlueVisible2 || mbGlueVisible3 || mbGlueVisible4; } protected: virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override; diff --git a/include/toolkit/awt/vclxwindows.hxx b/include/toolkit/awt/vclxwindows.hxx index 9e365eeb6d3f..e67f6b619a15 100644 --- a/include/toolkit/awt/vclxwindows.hxx +++ b/include/toolkit/awt/vclxwindows.hxx @@ -534,7 +534,7 @@ protected: css::uno::Any GetMaxValue() const; void NotifyTextListeners(); - css::uno::Any convertEffectiveValue(const css::uno::Any& rValue); + css::uno::Any convertEffectiveValue(const css::uno::Any& rValue) const; virtual void SetWindow( const VclPtr< vcl::Window > &_pWindow) override; diff --git a/include/xmloff/xmlnumfi.hxx b/include/xmloff/xmlnumfi.hxx index 8026b4e1846b..d45a1aaa83e2 100644 --- a/include/xmloff/xmlnumfi.hxx +++ b/include/xmloff/xmlnumfi.hxx @@ -89,7 +89,7 @@ public: SvXMLNumImpData* getData() { return pData.get(); } - LanguageType GetLanguageForKey(sal_Int32 nKey); + LanguageType GetLanguageForKey(sal_Int32 nKey) const; // sal_uInt32 GetKeyForName( const OUString& rName ); }; diff --git a/include/xmloff/xmluconv.hxx b/include/xmloff/xmluconv.hxx index 0a5619153917..38c84270635d 100644 --- a/include/xmloff/xmluconv.hxx +++ b/include/xmloff/xmluconv.hxx @@ -233,11 +233,11 @@ public: /** convert ISO Date Time String to double */ bool convertDateTime(double& fDateTime, - std::u16string_view rString); + std::u16string_view rString) const; /** convert ISO Date Time String to double */ bool convertDateTime(double& fDateTime, - std::string_view rString); + std::string_view rString) const; /// these 2 functions use tools Date, so they're not yet moved to sax @@ -270,7 +270,7 @@ public: /** convert string to Position3D */ bool convertPosition3D( css::drawing::Position3D& rPosition, - std::string_view rValue ); + std::string_view rValue ) const; /** convert Position3D to string */ void convertPosition3D( OUStringBuffer &rBuffer, diff --git a/package/source/xstor/owriteablestream.hxx b/package/source/xstor/owriteablestream.hxx index 0d71619a8562..f902bebd6749 100644 --- a/package/source/xstor/owriteablestream.hxx +++ b/package/source/xstor/owriteablestream.hxx @@ -149,7 +149,7 @@ public: void CleanCacheStream(); - bool UsesCommonEncryption_Impl() { return m_bUseCommonEncryption; } + bool UsesCommonEncryption_Impl() const { return m_bUseCommonEncryption; } bool HasTempFile_Impl() const { return ( m_aTempURL.getLength() != 0 ); } bool IsTransacted(); diff --git a/sc/source/ui/inc/anyrefdg.hxx b/sc/source/ui/inc/anyrefdg.hxx index 0c0e8978a2a7..55f3a2b2929f 100644 --- a/sc/source/ui/inc/anyrefdg.hxx +++ b/sc/source/ui/inc/anyrefdg.hxx @@ -75,7 +75,7 @@ public: public: static bool CanInputStart( const formula::RefEdit *pEdit ){ return !!pEdit; } - bool CanInputDone(bool bForced) { return m_pRefEdit && (bForced || !m_pRefBtn); } + bool CanInputDone(bool bForced) const { return m_pRefEdit && (bForced || !m_pRefBtn); } }; class ScRefHandler : public IAnyRefDialog diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx index e5de1d02100c..3af70e4f6448 100644 --- a/sc/source/ui/inc/gridwin.hxx +++ b/sc/source/ui/inc/gridwin.hxx @@ -440,7 +440,7 @@ public: void StopMarking(); void UpdateInputContext(); - bool NeedsRepaint() { return bNeedsRepaint; } + bool NeedsRepaint() const { return bNeedsRepaint; } void DoInvertRect( const tools::Rectangle& rPixel ); diff --git a/scripting/source/provider/ProviderCache.cxx b/scripting/source/provider/ProviderCache.cxx index 4fb6c0ba230c..f5bdfe1ac11b 100644 --- a/scripting/source/provider/ProviderCache.cxx +++ b/scripting/source/provider/ProviderCache.cxx @@ -193,7 +193,7 @@ ProviderCache::createProvider( ProviderDetails& details ) } bool -ProviderCache::isInDenyList( const OUString& serviceName ) +ProviderCache::isInDenyList( const OUString& serviceName ) const { return comphelper::findValue(m_sDenyList, serviceName) != -1; } diff --git a/scripting/source/provider/ProviderCache.hxx b/scripting/source/provider/ProviderCache.hxx index 6b5059370c05..b565d1d082b0 100644 --- a/scripting/source/provider/ProviderCache.hxx +++ b/scripting/source/provider/ProviderCache.hxx @@ -65,7 +65,7 @@ private: /// @throws css::uno::RuntimeException css::uno::Reference< css::script::provider::XScriptProvider > createProvider( ProviderDetails& details ); - bool isInDenyList( const OUString& serviceName ); + bool isInDenyList( const OUString& serviceName ) const; css::uno::Sequence< OUString > m_sDenyList; ProviderDetails_hash m_hProviderDetailsCache; std::mutex m_mutex; diff --git a/sfx2/source/control/listview.cxx b/sfx2/source/control/listview.cxx index 725d7564bbe8..5b53ee5b67f9 100644 --- a/sfx2/source/control/listview.cxx +++ b/sfx2/source/control/listview.cxx @@ -293,7 +293,7 @@ IMPL_LINK(ListView, QueryTooltipHdl, const weld::TreeIter&, rIter, OUString) return OUString(); } -sal_uInt16 ListView::get_nId(int pos) +sal_uInt16 ListView::get_nId(int pos) const { return static_cast<sal_uInt16>(mxTreeView->get_id(pos).toInt32()); } diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx index 7d48b674f4c5..284376d974fd 100644 --- a/sfx2/source/control/thumbnailview.cxx +++ b/sfx2/source/control/thumbnailview.cxx @@ -329,7 +329,7 @@ css::uno::Reference< css::accessibility::XAccessible > ThumbnailView::CreateAcce return mxAccessible; } -css::uno::Reference< css::accessibility::XAccessible > ThumbnailView::getAccessible() +css::uno::Reference< css::accessibility::XAccessible > ThumbnailView::getAccessible() const { return mxAccessible; } @@ -543,7 +543,7 @@ void ThumbnailView::ImplFireAccessibleEvent( short nEventId, const css::uno::Any pAcc->FireAccessibleEvent( nEventId, rOldValue, rNewValue ); } -bool ThumbnailView::ImplHasAccessibleListeners() +bool ThumbnailView::ImplHasAccessibleListeners() const { ThumbnailViewAcc* pAcc = ThumbnailViewAcc::getImplementation(mxAccessible); return( pAcc && pAcc->HasAccessibleListeners() ); diff --git a/svtools/source/brwbox/brwbox1.cxx b/svtools/source/brwbox/brwbox1.cxx index 9dee11a5d549..593536615c15 100644 --- a/svtools/source/brwbox/brwbox1.cxx +++ b/svtools/source/brwbox/brwbox1.cxx @@ -2315,7 +2315,7 @@ tools::Long BrowseBox::GetTitleHeight() const return nTitleLines ? nTitleLines * nHeight + 4 : 0; } -tools::Long BrowseBox::CalcReverseZoom(tools::Long nVal) +tools::Long BrowseBox::CalcReverseZoom(tools::Long nVal) const { if (IsZoom()) { diff --git a/svtools/source/brwbox/brwbox2.cxx b/svtools/source/brwbox/brwbox2.cxx index 7c0f81c9e662..f91752c53c08 100644 --- a/svtools/source/brwbox/brwbox2.cxx +++ b/svtools/source/brwbox/brwbox2.cxx @@ -82,7 +82,7 @@ const DataFlavorExVector& BrowseBox::GetDataFlavors() const } -bool BrowseBox::IsDropFormatSupported( SotClipboardFormatId _nFormat ) +bool BrowseBox::IsDropFormatSupported( SotClipboardFormatId _nFormat ) const { if ( pDataWin->bCallingDropCallback ) return pDataWin->IsDropFormatSupported( _nFormat ); diff --git a/svtools/source/brwbox/datwin.cxx b/svtools/source/brwbox/datwin.cxx index 5a34a39fe3c5..47541b623bfe 100644 --- a/svtools/source/brwbox/datwin.cxx +++ b/svtools/source/brwbox/datwin.cxx @@ -406,7 +406,7 @@ void BrowserDataWin::Command( const CommandEvent& rEvt ) } -bool BrowserDataWin::ImplRowDividerHitTest( const BrowserMouseEvent& _rEvent ) +bool BrowserDataWin::ImplRowDividerHitTest( const BrowserMouseEvent& _rEvent ) const { if ( ! ( GetParent()->IsInteractiveRowHeightEnabled() && ( _rEvent.GetRow() >= 0 ) diff --git a/svtools/source/brwbox/datwin.hxx b/svtools/source/brwbox/datwin.hxx index 8ff37a137324..789d96548a2c 100644 --- a/svtools/source/brwbox/datwin.hxx +++ b/svtools/source/brwbox/datwin.hxx @@ -65,7 +65,7 @@ public: sal_uInt16 GetId() const { return _nId; } - sal_uLong Width() { return _nWidth; } + sal_uLong Width() const { return _nWidth; } OUString& Title() { return _aTitle; } bool IsFrozen() const { return _bFrozen; } diff --git a/svtools/source/config/colorcfg.cxx b/svtools/source/config/colorcfg.cxx index 6a17045de74a..ec918014e98f 100644 --- a/svtools/source/config/colorcfg.cxx +++ b/svtools/source/config/colorcfg.cxx @@ -78,7 +78,7 @@ public: void SetCurrentSchemeName(const OUString& rSchemeName) {m_sLoadedScheme = rSchemeName;} virtual void Notify( const uno::Sequence<OUString>& aPropertyNames) override; - const ColorConfigValue& GetColorConfigValue(ColorConfigEntry eValue) + const ColorConfigValue& GetColorConfigValue(ColorConfigEntry eValue) const {return m_aConfigValues[eValue];} void SetColorConfigValue(ColorConfigEntry eValue, const ColorConfigValue& rValue ); diff --git a/svtools/source/config/miscopt.cxx b/svtools/source/config/miscopt.cxx index 46c0e75841c8..7e05cc030e73 100644 --- a/svtools/source/config/miscopt.cxx +++ b/svtools/source/config/miscopt.cxx @@ -109,7 +109,7 @@ public: void SetIconTheme(const OUString &theme, SetModifiedFlag setModified ); - bool IconThemeWasSetAutomatically() + bool IconThemeWasSetAutomatically() const {return m_bIconThemeWasSetAutomatically;} void AddListenerLink( const Link<LinkParamNone*,void>& rLink ); @@ -450,7 +450,7 @@ void SvtMiscOptions::RemoveListenerLink( const Link<LinkParamNone*,void>& rLink } bool -SvtMiscOptions::IconThemeWasSetAutomatically() +SvtMiscOptions::IconThemeWasSetAutomatically() const { return m_pImpl->IconThemeWasSetAutomatically(); } diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index ac00e4a377a3..72b995d5ad83 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -1477,7 +1477,7 @@ OUString SvtLineListBox::GetLineStyleName(SvxBorderLineStyle eStyle) return sRet; } -sal_Int32 SvtLineListBox::GetStylePos( sal_Int32 nListPos ) +sal_Int32 SvtLineListBox::GetStylePos( sal_Int32 nListPos ) const { sal_Int32 nPos = -1; --nListPos; diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx index 8f7b87a03af3..ef3978715ef3 100644 --- a/svtools/source/control/valueset.cxx +++ b/svtools/source/control/valueset.cxx @@ -236,7 +236,7 @@ void ValueSet::ImplFireAccessibleEvent( short nEventId, const Any& rOldValue, co pAcc->FireAccessibleEvent( nEventId, rOldValue, rNewValue ); } -bool ValueSet::ImplHasAccessibleListeners() +bool ValueSet::ImplHasAccessibleListeners() const { ValueSetAcc* pAcc = ValueSetAcc::getImplementation(mxAccessible); return( pAcc && pAcc->HasAccessibleListeners() ); diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index fbfa551d2c87..fbba96e6c840 100644 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -2336,13 +2336,13 @@ namespace svt::table } - tools::Rectangle TableControl_Impl::calcTableRect() + tools::Rectangle TableControl_Impl::calcTableRect() const { return impl_getAllVisibleDataCellArea(); } - tools::Rectangle TableControl_Impl::calcCellRect( sal_Int32 nRow, sal_Int32 nCol ) + tools::Rectangle TableControl_Impl::calcCellRect( sal_Int32 nRow, sal_Int32 nCol ) const { tools::Rectangle aCellRect; impl_getCellRect( nRow, nCol, aCellRect ); diff --git a/svtools/source/table/tablecontrol_impl.hxx b/svtools/source/table/tablecontrol_impl.hxx index c435013606bb..727dea92ba94 100644 --- a/svtools/source/table/tablecontrol_impl.hxx +++ b/svtools/source/table/tablecontrol_impl.hxx @@ -275,8 +275,8 @@ namespace svt::table tools::Rectangle calcHeaderRect( bool bColHeader ); tools::Rectangle calcHeaderCellRect( bool bColHeader, sal_Int32 nPos ); - tools::Rectangle calcTableRect(); - tools::Rectangle calcCellRect( sal_Int32 nRow, sal_Int32 nCol ); + tools::Rectangle calcTableRect() const; + tools::Rectangle calcCellRect( sal_Int32 nRow, sal_Int32 nCol ) const; // A11Y css::uno::Reference< css::accessibility::XAccessible > diff --git a/svx/source/engine3d/obj3d.cxx b/svx/source/engine3d/obj3d.cxx index 4fa24809ae30..eed5b878033c 100644 --- a/svx/source/engine3d/obj3d.cxx +++ b/svx/source/engine3d/obj3d.cxx @@ -597,7 +597,7 @@ E3dCompoundObject* E3dCompoundObject::CloneSdrObject(SdrModel& rTargetModel) con } // convert given basegfx::B3DPolyPolygon to screen coor -basegfx::B2DPolyPolygon E3dCompoundObject::TransformToScreenCoor(const basegfx::B3DPolyPolygon& rCandidate) +basegfx::B2DPolyPolygon E3dCompoundObject::TransformToScreenCoor(const basegfx::B3DPolyPolygon& rCandidate) const { const uno::Sequence< beans::PropertyValue > aEmptyParameters; drawinglayer::geometry::ViewInformation3D aViewInfo3D(aEmptyParameters); diff --git a/svx/source/gallery2/galini.cxx b/svx/source/gallery2/galini.cxx index 87f6abfb28a1..0d11f5c89577 100644 --- a/svx/source/gallery2/galini.cxx +++ b/svx/source/gallery2/galini.cxx @@ -23,7 +23,7 @@ #include <vcl/settings.hxx> #include <memory> -OUString GalleryBinaryEngineEntry::ReadStrFromIni(std::u16string_view aKeyName ) +OUString GalleryBinaryEngineEntry::ReadStrFromIni(std::u16string_view aKeyName ) const { std::unique_ptr<SvStream> pStrm(::utl::UcbStreamHelper::CreateStream( GetStrURL().GetMainURL( INetURLObject::DecodeMechanism::NONE ), diff --git a/toolkit/source/awt/stylesettings.cxx b/toolkit/source/awt/stylesettings.cxx index d978fe2799e7..75c2b687d2d6 100644 --- a/toolkit/source/awt/stylesettings.cxx +++ b/toolkit/source/awt/stylesettings.cxx @@ -111,7 +111,7 @@ namespace toolkit } - sal_Int32 WindowStyleSettings::ImplGetStyleColor( Color const & (StyleSettings::*i_pGetter)() const ) + sal_Int32 WindowStyleSettings::ImplGetStyleColor( Color const & (StyleSettings::*i_pGetter)() const ) const { const VclPtr<vcl::Window>& pWindow = pOwningWindow->GetWindow(); const AllSettings aAllSettings = pWindow->GetSettings(); @@ -129,7 +129,7 @@ namespace toolkit pWindow->SetSettings( aAllSettings ); } - FontDescriptor WindowStyleSettings::ImplGetStyleFont( vcl::Font const & (StyleSettings::*i_pGetter)() const ) + FontDescriptor WindowStyleSettings::ImplGetStyleFont( vcl::Font const & (StyleSettings::*i_pGetter)() const ) const { const VclPtr<vcl::Window>& pWindow = pOwningWindow->GetWindow(); const AllSettings aAllSettings = pWindow->GetSettings(); diff --git a/toolkit/source/awt/stylesettings.hxx b/toolkit/source/awt/stylesettings.hxx index 560e30866194..ebd9bd2c6ee3 100644 --- a/toolkit/source/awt/stylesettings.hxx +++ b/toolkit/source/awt/stylesettings.hxx @@ -166,8 +166,8 @@ namespace toolkit void ImplSetStyleFont( void (StyleSettings::*i_pSetter)( vcl::Font const &), vcl::Font const & (StyleSettings::*i_pGetter)() const, const css::awt::FontDescriptor& i_rFont ); void ImplSetStyleColor( void (StyleSettings::*i_pSetter)( Color const & ), sal_Int32 i_nColor ); - sal_Int32 ImplGetStyleColor( Color const & (StyleSettings::*i_pGetter)() const ); - css::awt::FontDescriptor ImplGetStyleFont( vcl::Font const & (StyleSettings::*i_pGetter)() const ); + sal_Int32 ImplGetStyleColor( Color const & (StyleSettings::*i_pGetter)() const ) const; + css::awt::FontDescriptor ImplGetStyleFont( vcl::Font const & (StyleSettings::*i_pGetter)() const ) const; DECL_LINK( OnWindowEvent, VclWindowEvent&, void ); VCLXWindow* pOwningWindow; diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx index fc9dd90095ac..f84e836de29c 100644 --- a/toolkit/source/awt/vclxwindows.cxx +++ b/toolkit/source/awt/vclxwindows.cxx @@ -7008,7 +7008,7 @@ css::uno::Any SVTXFormattedField::getProperty( const OUString& PropertyName ) return aReturn; } -css::uno::Any SVTXFormattedField::convertEffectiveValue(const css::uno::Any& rValue) +css::uno::Any SVTXFormattedField::convertEffectiveValue(const css::uno::Any& rValue) const { css::uno::Any aReturn; diff --git a/ucb/source/cacher/cachedcontentresultset.cxx b/ucb/source/cacher/cachedcontentresultset.cxx index f5563c9310d6..bece903b57b3 100644 --- a/ucb/source/cacher/cachedcontentresultset.cxx +++ b/ucb/source/cacher/cachedcontentresultset.cxx @@ -146,7 +146,7 @@ void CachedContentResultSet::CCRS_Cache } bool CachedContentResultSet::CCRS_Cache - ::hasRow( sal_Int32 row ) + ::hasRow( sal_Int32 row ) const { if( !m_pResult ) return false; @@ -184,7 +184,7 @@ bool CachedContentResultSet::CCRS_Cache } bool CachedContentResultSet::CCRS_Cache - ::hasCausedException( sal_Int32 nRow ) + ::hasCausedException( sal_Int32 nRow ) const { if( !m_pResult ) return false; @@ -840,14 +840,14 @@ void CachedContentResultSet } bool CachedContentResultSet - ::impl_isKnownValidPosition( sal_Int32 nRow ) + ::impl_isKnownValidPosition( sal_Int32 nRow ) const { return m_nKnownCount && nRow && nRow <= m_nKnownCount; } bool CachedContentResultSet - ::impl_isKnownInvalidPosition( sal_Int32 nRow ) + ::impl_isKnownInvalidPosition( sal_Int32 nRow ) const { if( !nRow ) return true; diff --git a/ucb/source/cacher/cachedcontentresultset.hxx b/ucb/source/cacher/cachedcontentresultset.hxx index ee3b737d6f6f..efc4966f3046 100644 --- a/ucb/source/cacher/cachedcontentresultset.hxx +++ b/ucb/source/cacher/cachedcontentresultset.hxx @@ -78,10 +78,10 @@ class CachedContentResultSet const css::ucb::FetchResult& rResult ); bool - hasRow( sal_Int32 nRow ); + hasRow( sal_Int32 nRow ) const; bool - hasCausedException( sal_Int32 nRow ); + hasCausedException( sal_Int32 nRow ) const; sal_Int32 getMaxRow() const; @@ -165,10 +165,10 @@ private: , sal_Int32 nFetchDirection ); bool - impl_isKnownValidPosition( sal_Int32 nRow ); + impl_isKnownValidPosition( sal_Int32 nRow ) const; bool - impl_isKnownInvalidPosition( sal_Int32 nRow ); + impl_isKnownInvalidPosition( sal_Int32 nRow ) const; void impl_changeRowCount( sal_Int32 nOld, sal_Int32 nNew ); diff --git a/ucb/source/sorter/sortresult.hxx b/ucb/source/sorter/sortresult.hxx index bbef157df5d0..9593e7699b7c 100644 --- a/ucb/source/sorter/sortresult.hxx +++ b/ucb/source/sorter/sortresult.hxx @@ -74,7 +74,7 @@ class EventList public: EventList(){} - sal_uInt32 Count() { return static_cast<sal_uInt32>(maData.size()); } + sal_uInt32 Count() const { return static_cast<sal_uInt32>(maData.size()); } void AddEvent( sal_IntPtr nType, sal_Int32 nPos ); void Insert( const css::ucb::ListAction& rAction ) { maData.push_back( rAction ); } diff --git a/ucb/source/ucp/cmis/cmis_url.cxx b/ucb/source/ucp/cmis/cmis_url.cxx index 38c63df8bf9f..5a253757d180 100644 --- a/ucb/source/ucp/cmis/cmis_url.cxx +++ b/ucb/source/ucp/cmis/cmis_url.cxx @@ -55,7 +55,7 @@ namespace cmis m_sUser = sUser; } - OUString URL::asString( ) + OUString URL::asString( ) const { OUString sUrl; // Related tdf#96174, can no longer save on Google Drive diff --git a/ucb/source/ucp/cmis/cmis_url.hxx b/ucb/source/ucp/cmis/cmis_url.hxx index 4d7ac99f77d0..5c5240ee5d1e 100644 --- a/ucb/source/ucp/cmis/cmis_url.hxx +++ b/ucb/source/ucp/cmis/cmis_url.hxx @@ -35,7 +35,7 @@ namespace cmis void setObjectId( const OUString& sId ); void setUsername( const OUString& sUser ); - OUString asString( ); + OUString asString( ) const; }; } diff --git a/ucb/source/ucp/file/filinpstr.hxx b/ucb/source/ucp/file/filinpstr.hxx index 98ec32b755d0..971872fdbb7f 100644 --- a/ucb/source/ucp/file/filinpstr.hxx +++ b/ucb/source/ucp/file/filinpstr.hxx @@ -42,7 +42,7 @@ namespace fileaccess { * Returns an error code as given by filerror.hxx */ - sal_Int32 CtorSuccess() { return m_nErrorCode;} + sal_Int32 CtorSuccess() const { return m_nErrorCode;} sal_Int32 getMinorError() const { return m_nMinorErrorCode;} virtual sal_Int32 SAL_CALL diff --git a/ucb/source/ucp/file/filrow.cxx b/ucb/source/ucp/file/filrow.cxx index e5957d5afee3..8da0b4d52b94 100644 --- a/ucb/source/ucp/file/filrow.cxx +++ b/ucb/source/ucp/file/filrow.cxx @@ -276,7 +276,7 @@ XRow_impl::getArray( } bool -XRow_impl::isIndexOutOfBounds(sal_Int32 nIndex) +XRow_impl::isIndexOutOfBounds(sal_Int32 nIndex) const { return nIndex < 1 || m_aValueMap.getLength() < nIndex; } diff --git a/ucb/source/ucp/file/filrow.hxx b/ucb/source/ucp/file/filrow.hxx index dbaf7c837787..1a33565a6aa1 100644 --- a/ucb/source/ucp/file/filrow.hxx +++ b/ucb/source/ucp/file/filrow.hxx @@ -104,7 +104,7 @@ namespace fileaccess { TaskManager* m_pMyShell; css::uno::Reference< css::script::XTypeConverter > m_xTypeConverter; - bool isIndexOutOfBounds( sal_Int32 nIndex ); + bool isIndexOutOfBounds( sal_Int32 nIndex ) const; template<typename T> T getValue(sal_Int32 columnIndex); }; diff --git a/ucb/source/ucp/file/filrset.hxx b/ucb/source/ucp/file/filrset.hxx index 4961ce7250bf..07fa1343faf7 100644 --- a/ucb/source/ucp/file/filrset.hxx +++ b/ucb/source/ucp/file/filrset.hxx @@ -56,7 +56,7 @@ class XResultSet_impl : virtual ~XResultSet_impl() override; - sal_Int32 CtorSuccess() { return m_nErrorCode;} + sal_Int32 CtorSuccess() const { return m_nErrorCode;} sal_Int32 getMinorError() const { return m_nMinorErrorCode;} // XEventListener diff --git a/ucb/source/ucp/file/filstr.hxx b/ucb/source/ucp/file/filstr.hxx index e448f17052ab..ad6c39964448 100644 --- a/ucb/source/ucp/file/filstr.hxx +++ b/ucb/source/ucp/file/filstr.hxx @@ -52,7 +52,7 @@ class XStream_impl : public cppu::WeakImplHelper< * Returns an error code as given by filerror.hxx */ - sal_Int32 CtorSuccess() { return m_nErrorCode;} + sal_Int32 CtorSuccess() const { return m_nErrorCode;} sal_Int32 getMinorError() const { return m_nMinorErrorCode;} virtual ~XStream_impl() override; diff --git a/ucb/source/ucp/tdoc/tdoc_content.hxx b/ucb/source/ucp/tdoc/tdoc_content.hxx index 9a920c1bb376..1412ebd9a846 100644 --- a/ucb/source/ucp/tdoc/tdoc_content.hxx +++ b/ucb/source/ucp/tdoc/tdoc_content.hxx @@ -114,7 +114,7 @@ private: virtual OUString getParentURL() override; static bool hasData( ContentProvider const * pProvider, const Uri & rUri ); - bool hasData( const Uri & rUri ) { return hasData( m_pProvider, rUri ); } + bool hasData( const Uri & rUri ) const { return hasData( m_pProvider, rUri ); } static bool loadData( ContentProvider const * pProvider, const Uri & rUri, diff --git a/ucb/source/ucp/webdav-neon/NeonSession.cxx b/ucb/source/ucp/webdav-neon/NeonSession.cxx index 3c5dbf0398ca..979537a52e28 100644 --- a/ucb/source/ucp/webdav-neon/NeonSession.cxx +++ b/ucb/source/ucp/webdav-neon/NeonSession.cxx @@ -2310,7 +2310,7 @@ NeonSession::getDataFromInputStream( } bool -NeonSession::isDomainMatch( const OUString& certHostName ) +NeonSession::isDomainMatch( const OUString& certHostName ) const { OUString hostName = getHostName(); diff --git a/ucb/source/ucp/webdav-neon/NeonSession.hxx b/ucb/source/ucp/webdav-neon/NeonSession.hxx index 816bae09b8e0..615f750a11aa 100644 --- a/ucb/source/ucp/webdav-neon/NeonSession.hxx +++ b/ucb/source/ucp/webdav-neon/NeonSession.hxx @@ -202,7 +202,7 @@ public: const void * getRequestData() const { return m_pRequestData; } - bool isDomainMatch( const OUString& certHostName ); + bool isDomainMatch( const OUString& certHostName ) const; int CertificationNotify(const ne_ssl_certificate *cert); diff --git a/vcl/inc/unx/gtk/gtksalmenu.hxx b/vcl/inc/unx/gtk/gtksalmenu.hxx index fa8038048271..36b695a2ccc9 100644 --- a/vcl/inc/unx/gtk/gtksalmenu.hxx +++ b/vcl/inc/unx/gtk/gtksalmenu.hxx @@ -112,7 +112,7 @@ public: static void Deactivate(const gchar* pMenuCommand); void EnableUnity(bool bEnable); virtual void ShowMenuBar( bool bVisible ) override; - bool PrepUpdate(); + bool PrepUpdate() const; virtual void Update() override; // Update this menu only. // Update full menu hierarchy from this menu. void UpdateFull () { ActivateAllSubmenus(mpVCLMenu); } diff --git a/vcl/unx/gtk3/fpicker/SalGtkPicker.cxx b/vcl/unx/gtk3/fpicker/SalGtkPicker.cxx index 6f7a927c3e84..68172ad10f94 100644 --- a/vcl/unx/gtk3/fpicker/SalGtkPicker.cxx +++ b/vcl/unx/gtk3/fpicker/SalGtkPicker.cxx @@ -44,7 +44,7 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::uno; -OUString SalGtkPicker::uritounicode(const gchar* pIn) +OUString SalGtkPicker::uritounicode(const gchar* pIn) const { if (!pIn) return OUString(); @@ -64,7 +64,7 @@ OUString SalGtkPicker::uritounicode(const gchar* pIn) return sURL; } -OString SalGtkPicker::unicodetouri(const OUString &rURL) +OString SalGtkPicker::unicodetouri(const OUString &rURL) const { // all the URLs are handled by office in UTF-8 ( and encoded with "%xx" codes based on UTF-8 ) // so the Gnome FP related URLs should be converted accordingly diff --git a/vcl/unx/gtk3/fpicker/SalGtkPicker.hxx b/vcl/unx/gtk3/fpicker/SalGtkPicker.hxx index 8ebdcfdd4630..7da0ba04e31c 100644 --- a/vcl/unx/gtk3/fpicker/SalGtkPicker.hxx +++ b/vcl/unx/gtk3/fpicker/SalGtkPicker.hxx @@ -67,8 +67,8 @@ class SalGtkPicker /// @throws css::uno::RuntimeException OUString implgetDisplayDirectory( ); - OUString uritounicode(const gchar *pIn); - OString unicodetouri(const OUString &rURL); + OUString uritounicode(const gchar *pIn) const; + OString unicodetouri(const OUString &rURL) const; // to instantiate own services css::uno::Reference< css::uno::XComponentContext > m_xContext; diff --git a/vcl/unx/gtk3/gtksalmenu.cxx b/vcl/unx/gtk3/gtksalmenu.cxx index 5a3bc688a0a1..ed67e7d30d88 100644 --- a/vcl/unx/gtk3/gtksalmenu.cxx +++ b/vcl/unx/gtk3/gtksalmenu.cxx @@ -41,7 +41,7 @@ static gchar* GetCommandForItem(GtkSalMenuItem* pSalMenuItem) pSalMenuItem->mnId); } -bool GtkSalMenu::PrepUpdate() +bool GtkSalMenu::PrepUpdate() const { return mpMenuModel && mpActionGroup; } diff --git a/xmloff/source/core/xmluconv.cxx b/xmloff/source/core/xmluconv.cxx index 0791532897f0..e1fe1796488c 100644 --- a/xmloff/source/core/xmluconv.cxx +++ b/xmloff/source/core/xmluconv.cxx @@ -369,14 +369,14 @@ void SvXMLUnitConverter::convertDateTime(OUStringBuffer& rBuffer, /** convert ISO Date Time String to double */ bool SvXMLUnitConverter::convertDateTime(double& fDateTime, - std::u16string_view rString) + std::u16string_view rString) const { return convertDateTime(fDateTime, rString, m_pImpl->m_aNullDate); } /** convert ISO Date Time String to double */ bool SvXMLUnitConverter::convertDateTime(double& fDateTime, - std::string_view rString) + std::string_view rString) const { return convertDateTime(fDateTime, rString, m_pImpl->m_aNullDate); } @@ -672,7 +672,7 @@ void SvXMLUnitConverter::convertB3DVector( OUStringBuffer &rBuffer, const ::base /** convert string to Position3D */ bool SvXMLUnitConverter::convertPosition3D( drawing::Position3D& rPosition, - std::string_view rValue ) + std::string_view rValue ) const { OUString aContentX,aContentY,aContentZ; if ( !lcl_getPositions(rValue,aContentX,aContentY,aContentZ) ) diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx index 4563efa9173d..39d6c2763c6a 100644 --- a/xmloff/source/style/xmlnumfi.cxx +++ b/xmloff/source/style/xmlnumfi.cxx @@ -2210,7 +2210,7 @@ SvXMLStyleContext* SvXMLNumFmtHelper::CreateChildContext( SvXMLImport& rImport, pData.get(), nStyleToken, xAttrList, rStyles ); } -LanguageType SvXMLNumFmtHelper::GetLanguageForKey(sal_Int32 nKey) +LanguageType SvXMLNumFmtHelper::GetLanguageForKey(sal_Int32 nKey) const { if (pData->GetNumberFormatter()) { commit e512b53ef8ae7945131876d32121fdbbdeb1de35 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Thu Sep 30 20:44:27 2021 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Fri Oct 1 20:57:56 2021 +0200 loplugin:constparams Change-Id: I0d1ad95a9944c9077a1b9db11f2ae05f993c2b36 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122900 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/canvas/source/vcl/canvashelper_texturefill.cxx b/canvas/source/vcl/canvashelper_texturefill.cxx index f181fe30669b..5cbf9ad3bc28 100644 --- a/canvas/source/vcl/canvashelper_texturefill.cxx +++ b/canvas/source/vcl/canvashelper_texturefill.cxx @@ -55,7 +55,7 @@ namespace vclcanvas namespace { bool textureFill( OutputDevice& rOutDev, - GraphicObject& rGraphic, + const GraphicObject& rGraphic, const ::Point& rPosPixel, const ::Size& rNextTileX, const ::Size& rNextTileY, diff --git a/compilerplugins/clang/constparams.cxx b/compilerplugins/clang/constparams.cxx index 17cd941f8f22..b7c13750eb5b 100644 --- a/compilerplugins/clang/constparams.cxx +++ b/compilerplugins/clang/constparams.cxx @@ -60,8 +60,11 @@ public: || loplugin::hasPathnamePrefix(fn, SRCDIR "/pyuno/source/module/pyuno_struct.cxx") || loplugin::hasPathnamePrefix(fn, SRCDIR "/pyuno/source/module/pyuno.cxx") || loplugin::hasPathnamePrefix(fn, SRCDIR "/sw/source/filter/ascii/ascatr.cxx") - // TODO this plugin doesn't handle it well when we take the address of a poiner + // TODO this plugin doesn't handle it well when we take the address of a pointer || loplugin::hasPathnamePrefix(fn, SRCDIR "/svl/source/misc/sharedstringpool.cxx") + || loplugin::hasPathnamePrefix(fn, SRCDIR "/registry/source/regkey.cxx") + || loplugin::hasPathnamePrefix(fn, SRCDIR "/cppu/source/uno/lbenv.cxx") + || loplugin::hasPathnamePrefix(fn, SRCDIR "/cppuhelper/source/implbase_ex.cxx") ) return; diff --git a/sd/source/ui/inc/View.hxx b/sd/source/ui/inc/View.hxx index 693e596d1084..744023acb573 100644 --- a/sd/source/ui/inc/View.hxx +++ b/sd/source/ui/inc/View.hxx @@ -158,7 +158,7 @@ public: @param bOptimize if set to true, the metafile is analyzed and if only one bitmap action is present, then is inserted as a single graphic. */ - bool InsertMetaFile( TransferableDataHelper& rDataHelper, + bool InsertMetaFile( const TransferableDataHelper& rDataHelper, const Point& rInsertPos, ImageMap const * pImageMap, bool bOptimize ); SdrGrafObj* InsertGraphic( const Graphic& rGraphic, diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx index 008dbc8eeb51..5008c8d8ddd4 100644 --- a/sd/source/ui/view/sdview3.cxx +++ b/sd/source/ui/view/sdview3.cxx @@ -138,7 +138,7 @@ static void ImpCheckInsertPos(Point& rPos, const Size& rSize, const ::tools::Rec } } -bool View::InsertMetaFile( TransferableDataHelper& rDataHelper, const Point& rPos, ImageMap const * pImageMap, bool bOptimize ) +bool View::InsertMetaFile( const TransferableDataHelper& rDataHelper, const Point& rPos, ImageMap const * pImageMap, bool bOptimize ) { GDIMetaFile aMtf; diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index 913c94135acd..17b7e37df224 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -2099,7 +2099,7 @@ SotExchangeDest SwTransferable::GetSotDestination( const SwWrtShell& rSh ) return nRet; } -bool SwTransferable::PasteFileContent( TransferableDataHelper& rData, +bool SwTransferable::PasteFileContent( const TransferableDataHelper& rData, SwWrtShell& rSh, SotClipboardFormatId nFormat, bool bMsg, bool bIgnoreComments ) { TranslateId pResId = STR_CLPBRD_FORMAT_ERROR; @@ -2441,7 +2441,7 @@ bool SwTransferable::PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh, return bRet; } -bool SwTransferable::PasteTargetURL( TransferableDataHelper& rData, +bool SwTransferable::PasteTargetURL( const TransferableDataHelper& rData, SwWrtShell& rSh, SwPasteSdr nAction, const Point* pPt, bool bInsertGRF ) { @@ -2558,7 +2558,7 @@ void SwTransferable::SetSelInShell( SwWrtShell& rSh, bool bSelectFrame, } } -bool SwTransferable::PasteDDE( TransferableDataHelper& rData, +bool SwTransferable::PasteDDE( const TransferableDataHelper& rData, SwWrtShell& rWrtShell, bool bReReadGrf, bool bMsg ) { @@ -2729,7 +2729,7 @@ bool SwTransferable::PasteDDE( TransferableDataHelper& rData, return true; } -bool SwTransferable::PasteSdrFormat( TransferableDataHelper& rData, +bool SwTransferable::PasteSdrFormat( const TransferableDataHelper& rData, SwWrtShell& rSh, SwPasteSdr nAction, const Point* pPt, SotExchangeActionFlags nActionFlags, bool bNeedToSelectBeforePaste) { @@ -2755,7 +2755,7 @@ bool SwTransferable::PasteSdrFormat( TransferableDataHelper& rData, return bRet; } -bool SwTransferable::PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh, +bool SwTransferable::PasteGrf( const TransferableDataHelper& rData, SwWrtShell& rSh, SotClipboardFormatId nFormat, SwPasteSdr nAction, const Point* pPt, SotExchangeActionFlags nActionFlags, sal_Int8 nDropAction, bool bNeedToSelectBeforePaste, RndStdIds nAnchorType ) { @@ -2994,7 +2994,7 @@ bool SwTransferable::PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh, return bRet; } -bool SwTransferable::PasteImageMap( TransferableDataHelper& rData, +bool SwTransferable::PasteImageMap( const TransferableDataHelper& rData, SwWrtShell& rSh ) { bool bRet = false; @@ -3019,7 +3019,7 @@ bool SwTransferable::PasteImageMap( TransferableDataHelper& rData, return bRet; } -bool SwTransferable::PasteAsHyperlink( TransferableDataHelper& rData, +bool SwTransferable::PasteAsHyperlink( const TransferableDataHelper& rData, SwWrtShell& rSh, SotClipboardFormatId nFormat ) { bool bRet = false; @@ -3164,7 +3164,7 @@ bool SwTransferable::PasteFileName( TransferableDataHelper& rData, return bRet; } -bool SwTransferable::PasteDBData( TransferableDataHelper& rData, +bool SwTransferable::PasteDBData( const TransferableDataHelper& rData, SwWrtShell& rSh, SotClipboardFormatId nFormat, bool bLink, const Point* pDragPt, bool bMsg ) { @@ -3264,7 +3264,7 @@ bool SwTransferable::PasteDBData( TransferableDataHelper& rData, return bRet; } -bool SwTransferable::PasteFileList( TransferableDataHelper& rData, +bool SwTransferable::PasteFileList( const TransferableDataHelper& rData, SwWrtShell& rSh, bool bLink, const Point* pPt, bool bMsg ) { @@ -3306,7 +3306,7 @@ bool SwTransferable::PasteFileList( TransferableDataHelper& rData, return bRet; } -bool SwTransferable::CheckForURLOrLNKFile( TransferableDataHelper& rData, +bool SwTransferable::CheckForURLOrLNKFile( const TransferableDataHelper& rData, OUString& rFileName, OUString* pTitle ) { bool bIsURLFile = false; diff --git a/sw/source/uibase/inc/navicont.hxx b/sw/source/uibase/inc/navicont.hxx index df831f872915..79ff0ceb4888 100644 --- a/sw/source/uibase/inc/navicont.hxx +++ b/sw/source/uibase/inc/navicont.hxx @@ -48,7 +48,7 @@ public: const OUString& GetDescription() const { return aDescr; } RegionMode GetDefaultDragType() const { return nDefDrag; } void Copy( TransferDataContainer& rData ) const; - bool Paste( TransferableDataHelper& rData ); + bool Paste( const TransferableDataHelper& rData ); }; #endif diff --git a/sw/source/uibase/inc/navipi.hxx b/sw/source/uibase/inc/navipi.hxx index 85eacaf826e5..670ac5fff068 100644 --- a/sw/source/uibase/inc/navipi.hxx +++ b/sw/source/uibase/inc/navipi.hxx @@ -141,7 +141,7 @@ public: virtual void GetControlState(const sal_uInt16 /*nSId*/, boost::property_tree::ptree& /*rState*/) override {}; - static OUString CreateDropFileName( TransferableDataHelper& rData ); + static OUString CreateDropFileName( const TransferableDataHelper& rData ); static OUString CleanEntry(const OUString& rEntry); RegionMode GetRegionDropMode() const {return m_nRegionMode;} diff --git a/sw/source/uibase/inc/swdtflvr.hxx b/sw/source/uibase/inc/swdtflvr.hxx index 5c58acf2a572..ce3cfa271253 100644 --- a/sw/source/uibase/inc/swdtflvr.hxx +++ b/sw/source/uibase/inc/swdtflvr.hxx @@ -104,44 +104,44 @@ class SW_DLLPUBLIC SwTransferable final : public TransferableHelper // helper methods for the paste static SwTransferable* GetSwTransferable( const TransferableDataHelper& rData ); static void SetSelInShell( SwWrtShell& , bool , const Point* ); - static bool CheckForURLOrLNKFile( TransferableDataHelper& rData, + static bool CheckForURLOrLNKFile( const TransferableDataHelper& rData, OUString& rFileName, OUString* pTitle = nullptr ); static bool TestAllowedFormat( const TransferableDataHelper& rData, SotClipboardFormatId nFormat, SotExchangeDest nDestination ); - static bool PasteFileContent( TransferableDataHelper&, + static bool PasteFileContent( const TransferableDataHelper&, SwWrtShell& rSh, SotClipboardFormatId nFormat, bool bMsg, bool bIgnoreComments = false ); static bool PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh, SotClipboardFormatId nFormat, SotExchangeActionFlags nActionFlags, bool bMsg ); - static bool PasteTargetURL( TransferableDataHelper& rData, SwWrtShell& rSh, + static bool PasteTargetURL( const TransferableDataHelper& rData, SwWrtShell& rSh, SwPasteSdr nAction, const Point* pPt, bool bInsertGRF ); - static bool PasteDDE( TransferableDataHelper& rData, SwWrtShell& rWrtShell, + static bool PasteDDE( const TransferableDataHelper& rData, SwWrtShell& rWrtShell, bool bReReadGrf, bool bMsg ); - static bool PasteSdrFormat( TransferableDataHelper& rData, + static bool PasteSdrFormat( const TransferableDataHelper& rData, SwWrtShell& rSh, SwPasteSdr nAction, const Point* pPt, SotExchangeActionFlags nActionFlags, bool bNeedToSelectBeforePaste); - static bool PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh, + static bool PasteGrf( const TransferableDataHelper& rData, SwWrtShell& rSh, SotClipboardFormatId nFormat, SwPasteSdr nAction, const Point* pPt, SotExchangeActionFlags nActionFlags, sal_Int8 nDropAction, bool bNeedToSelectBeforePaste, RndStdIds nAnchorType = RndStdIds::FLY_AT_PARA ); - static bool PasteImageMap( TransferableDataHelper& rData, + static bool PasteImageMap( const TransferableDataHelper& rData, SwWrtShell& rSh ); - static bool PasteAsHyperlink( TransferableDataHelper& rData, + static bool PasteAsHyperlink( const TransferableDataHelper& rData, SwWrtShell& rSh, SotClipboardFormatId nFormat ); static bool PasteFileName( TransferableDataHelper& rData, SwWrtShell& rSh, SotClipboardFormatId nFormat, SwPasteSdr nAction, const Point* pPt, SotExchangeActionFlags nActionFlags, bool * graphicInserted ); - static bool PasteDBData( TransferableDataHelper& rData, SwWrtShell& rSh, + static bool PasteDBData( const TransferableDataHelper& rData, SwWrtShell& rSh, SotClipboardFormatId nFormat, bool bLink, const Point* pDragPt, bool bMsg ); - static bool PasteFileList( TransferableDataHelper& rData, + static bool PasteFileList( const TransferableDataHelper& rData, SwWrtShell& rSh, bool bLink, const Point* pPt, bool bMsg ); diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index 6e944bb11669..49bfdafe0219 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -4841,7 +4841,7 @@ void NaviContentBookmark::Copy( TransferDataContainer& rData ) const rData.CopyByteString(SotClipboardFormatId::SONLK, sStrBuf); } -bool NaviContentBookmark::Paste( TransferableDataHelper& rData ) +bool NaviContentBookmark::Paste( const TransferableDataHelper& rData ) { OUString sStr; bool bRet = rData.GetString( SotClipboardFormatId::SONLK, sStr ); diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx index 7124c3a6b7d9..7510e7bb65d8 100644 --- a/sw/source/uibase/utlui/navipi.cxx +++ b/sw/source/uibase/utlui/navipi.cxx @@ -879,7 +879,7 @@ IMPL_LINK(SwNavigationPI, DoneLink, SfxPoolItem const *, pItem, void) } } -OUString SwNavigationPI::CreateDropFileName( TransferableDataHelper& rData ) +OUString SwNavigationPI::CreateDropFileName( const TransferableDataHelper& rData ) { OUString sFileName; SotClipboardFormatId nFormat; diff --git a/vcl/source/bitmap/impvect.cxx b/vcl/source/bitmap/impvect.cxx index 1d320a2648c2..75d96aa79fc0 100644 --- a/vcl/source/bitmap/impvect.cxx +++ b/vcl/source/bitmap/impvect.cxx @@ -64,7 +64,7 @@ class ImplChain; namespace ImplVectorizer { - static void ImplExpand( std::optional<ImplVectMap>& rMap, BitmapReadAccess* pRAcc, const Color& rColor ); + static void ImplExpand( std::optional<ImplVectMap>& rMap, const BitmapReadAccess* pRAcc, const Color& rColor ); static void ImplCalculate( ImplVectMap& rMap, tools::PolyPolygon& rPolyPoly, sal_uInt8 cReduce ); static bool ImplGetChain( ImplVectMap& rMap, const Point& rStartPt, ImplChain& rChain ); static bool ImplIsUp( ImplVectMap const & rMap, tools::Long nY, tools::Long nX ); @@ -778,7 +778,7 @@ void ImplLimitPolyPoly( tools::PolyPolygon& rPolyPoly ) rPolyPoly = aNewPolyPoly; } -void ImplExpand( std::optional<ImplVectMap>& oMap, BitmapReadAccess* pRAcc, const Color& rColor ) +void ImplExpand( std::optional<ImplVectMap>& oMap, const BitmapReadAccess* pRAcc, const Color& rColor ) { if( pRAcc && pRAcc->Width() && pRAcc->Height() ) {