diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-12-17 09:12:00 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-12-17 08:59:30 +0100 |
commit | 20ff62d319d9a8195a59d5b27ccc52d9000992c0 (patch) | |
tree | f32c6393778d7718e1cdda7f2281f8dfbf4dd591 | |
parent | 8eb2d2972583b909a249f5b0f22a9b1fbf533d24 (diff) |
loplugin:expandablemethods
Change-Id: Ifc269d9996928085a3ab78033788465b4f029368
Reviewed-on: https://gerrit.libreoffice.org/85255
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
21 files changed, 20 insertions, 61 deletions
diff --git a/basegfx/source/color/bcolormodifier.cxx b/basegfx/source/color/bcolormodifier.cxx index 182083f6fbdb..9758767ed39b 100644 --- a/basegfx/source/color/bcolormodifier.cxx +++ b/basegfx/source/color/bcolormodifier.cxx @@ -124,7 +124,7 @@ namespace basegfx return false; } - return getBColor() == pCompare->getBColor() && getValue() == pCompare->getValue(); + return maBColor == pCompare->maBColor && mfValue == pCompare->mfValue; } ::basegfx::BColor BColorModifier_interpolate::getModifiedColor(const ::basegfx::BColor& aSourceColor) const @@ -148,7 +148,7 @@ namespace basegfx return false; } - return getValue() == pCompare->getValue(); + return mfValue == pCompare->mfValue; } ::basegfx::BColor BColorModifier_black_and_white::getModifiedColor(const ::basegfx::BColor& aSourceColor) const @@ -194,7 +194,7 @@ namespace basegfx } // getValue is sufficient, mfInvValue and mbUseIt are only helper values - return getValue() == pCompare->getValue(); + return mfValue == pCompare->mfValue; } ::basegfx::BColor BColorModifier_gamma::getModifiedColor(const ::basegfx::BColor& aSourceColor) const @@ -274,11 +274,11 @@ namespace basegfx } // no need to compare other values, these are just helpers - return getRed() == pCompare->getRed() - && getGreen() == pCompare->getGreen() - && getBlue() == pCompare->getBlue() - && getLuminance() == pCompare->getLuminance() - && getContrast() == pCompare->getContrast(); + return mfRed == pCompare->mfRed + && mfGreen == pCompare->mfGreen + && mfBlue == pCompare->mfBlue + && mfLuminance == pCompare->mfLuminance + && mfContrast == pCompare->mfContrast; } ::basegfx::BColor BColorModifier_RGBLuminanceContrast::getModifiedColor(const ::basegfx::BColor& aSourceColor) const diff --git a/drawinglayer/source/primitive2d/texthierarchyprimitive2d.cxx b/drawinglayer/source/primitive2d/texthierarchyprimitive2d.cxx index cbacb022759c..08fb17bf603c 100644 --- a/drawinglayer/source/primitive2d/texthierarchyprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/texthierarchyprimitive2d.cxx @@ -141,7 +141,7 @@ namespace drawinglayer const TextHierarchyFieldPrimitive2D& rCompare = static_cast<const TextHierarchyFieldPrimitive2D&>(rPrimitive); return (getType() == rCompare.getType() - && getNameValue() == rCompare.getNameValue()); + && meNameValue == rCompare.meNameValue); } return false; diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index ff67a560d56d..bbd95fb50b61 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -5161,7 +5161,7 @@ void SvxMSDffImportData::NotifyFreeObj(SdrObject* pObj) { if (SvxMSDffImportRec* pRecord = find(pObj)) { - unmap(pObj); + m_ObjToRecMap.erase(pObj); pRecord->pObj = nullptr; } } diff --git a/include/basegfx/color/bcolormodifier.hxx b/include/basegfx/color/bcolormodifier.hxx index 503581d31500..41c47bd54edc 100644 --- a/include/basegfx/color/bcolormodifier.hxx +++ b/include/basegfx/color/bcolormodifier.hxx @@ -200,10 +200,6 @@ namespace basegfx virtual ~BColorModifier_interpolate() override; - // data access - const ::basegfx::BColor& getBColor() const { return maBColor; } - double getValue() const { return mfValue; } - // compare operator virtual bool operator==(const BColorModifier& rCompare) const override; @@ -230,9 +226,6 @@ namespace basegfx virtual ~BColorModifier_black_and_white() override; - // data access - double getValue() const { return mfValue; } - // compare operator virtual bool operator==(const BColorModifier& rCompare) const override; @@ -260,9 +253,6 @@ namespace basegfx virtual ~BColorModifier_gamma() override; - // data access - double getValue() const { return mfValue; } - // compare operator virtual bool operator==(const BColorModifier& rCompare) const override; @@ -299,13 +289,6 @@ namespace basegfx virtual ~BColorModifier_RGBLuminanceContrast() override; - // data access - double getRed() const { return mfRed; } - double getGreen() const { return mfGreen; } - double getBlue() const { return mfBlue; } - double getLuminance() const { return mfLuminance; } - double getContrast() const { return mfContrast; } - // compare operator virtual bool operator==(const BColorModifier& rCompare) const override; diff --git a/include/drawinglayer/primitive2d/texthierarchyprimitive2d.hxx b/include/drawinglayer/primitive2d/texthierarchyprimitive2d.hxx index 086c28e93078..98322308e6db 100644 --- a/include/drawinglayer/primitive2d/texthierarchyprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/texthierarchyprimitive2d.hxx @@ -175,7 +175,6 @@ namespace drawinglayer /// data read access FieldType getType() const { return meType; } - const std::vector< std::pair< OUString, OUString>>& getNameValue() const { return meNameValue; } OUString getValue(const OUString& rName) const; /// compare operator diff --git a/include/filter/msfilter/msdffimp.hxx b/include/filter/msfilter/msdffimp.hxx index efb71e6737ee..593a79b145f6 100644 --- a/include/filter/msfilter/msdffimp.hxx +++ b/include/filter/msfilter/msdffimp.hxx @@ -289,7 +289,6 @@ public: virtual ~SvxMSDffImportData() override; bool empty() const { return m_Records.empty(); } void insert(std::unique_ptr<SvxMSDffImportRec> pImpRec); - void unmap(const SdrObject* pObj) { m_ObjToRecMap.erase(pObj); } size_t size() const { return m_Records.size(); } SvxMSDffImportRec* find(const SdrObject* pObj); MSDffImportRecords::const_iterator begin() const { return m_Records.begin(); } diff --git a/include/unotools/confignode.hxx b/include/unotools/confignode.hxx index 368d020910b7..156c5a05381b 100644 --- a/include/unotools/confignode.hxx +++ b/include/unotools/confignode.hxx @@ -134,11 +134,6 @@ namespace utl css::uno::Sequence< OUString > getNodeNames() const throw(); - /** get the flag specifying the current escape behaviour - @see setEscape - */ - bool getEscape() const { return m_bEscapeNames; } - /// invalidate the object virtual void clear() throw(); diff --git a/include/vcl/menu.hxx b/include/vcl/menu.hxx index 76a39c813eef..1e8542c0206c 100644 --- a/include/vcl/menu.hxx +++ b/include/vcl/menu.hxx @@ -183,7 +183,6 @@ protected: SAL_DLLPRIVATE void ImplFillLayoutData() const; SAL_DLLPRIVATE SalMenu* ImplGetSalMenu() { return mpSalMenu.get(); } - SAL_DLLPRIVATE void ImplClearSalMenu(); SAL_DLLPRIVATE OUString ImplGetHelpText( sal_uInt16 nItemId ) const; // returns native check and option menu symbol height in rCheckHeight and rRadioHeight diff --git a/include/vcl/textview.hxx b/include/vcl/textview.hxx index 3de25b5acb0d..d49d1e960141 100644 --- a/include/vcl/textview.hxx +++ b/include/vcl/textview.hxx @@ -59,7 +59,6 @@ private: public: explicit TETextDataObject( const OUString& rText ); - OUString& GetText() { return maText; } SvMemoryStream& GetHTMLStream() { return maHTMLStream; } // css::uno::XInterface diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx index 2020cb99f614..9f9bf53d4e46 100644 --- a/svx/source/form/filtnav.cxx +++ b/svx/source/form/filtnav.cxx @@ -1441,7 +1441,7 @@ SvTreeListEntry* FmFilterNavigator::FindEntry(const FmFilterData* pItem) const void FmFilterNavigator::Insert(FmFilterData* pItem, sal_uLong nPos) { - const FmParentData* pParent = pItem->GetParent() ? pItem->GetParent() : GetFilterModel(); + const FmParentData* pParent = pItem->GetParent() ? pItem->GetParent() : m_pModel.get(); // insert the item SvTreeListEntry* pParentEntry = FindEntry( pParent ); diff --git a/svx/source/inc/filtnav.hxx b/svx/source/inc/filtnav.hxx index 6011ace3eb17..eb857b1a5e78 100644 --- a/svx/source/inc/filtnav.hxx +++ b/svx/source/inc/filtnav.hxx @@ -247,7 +247,6 @@ public: const css::uno::Reference< css::container::XIndexAccess > & xControllers, const css::uno::Reference< css::form::runtime::XFormController > & xCurrent ); - const FmFilterModel* GetFilterModel() const {return m_pModel.get();} private: diff --git a/svx/source/sdr/contact/viewobjectcontact.cxx b/svx/source/sdr/contact/viewobjectcontact.cxx index d15ba27dd9f9..9d52001d9bde 100644 --- a/svx/source/sdr/contact/viewobjectcontact.cxx +++ b/svx/source/sdr/contact/viewobjectcontact.cxx @@ -76,8 +76,6 @@ public: // data access const drawinglayer::primitive2d::Primitive2DContainer& getPrimitive2DSequence() const { return maPrimitive2DSequence; } - bool isTextAnimationAllowed() const { return mbTextAnimationAllowed; } - bool isGraphicAnimationAllowed() const { return mbGraphicAnimationAllowed; } }; AnimatedExtractingProcessor2D::AnimatedExtractingProcessor2D( @@ -103,8 +101,8 @@ void AnimatedExtractingProcessor2D::processBasePrimitive2D(const drawinglayer::p { const drawinglayer::primitive2d::AnimatedSwitchPrimitive2D& rSwitchPrimitive = static_cast< const drawinglayer::primitive2d::AnimatedSwitchPrimitive2D& >(rCandidate); - if((rSwitchPrimitive.isTextAnimation() && isTextAnimationAllowed()) - || (rSwitchPrimitive.isGraphicAnimation() && isGraphicAnimationAllowed())) + if((rSwitchPrimitive.isTextAnimation() && mbTextAnimationAllowed) + || (rSwitchPrimitive.isGraphicAnimation() && mbGraphicAnimationAllowed)) { const drawinglayer::primitive2d::Primitive2DReference xReference(const_cast< drawinglayer::primitive2d::BasePrimitive2D* >(&rCandidate)); maPrimitive2DSequence.push_back(xReference); diff --git a/svx/source/sidebar/text/TextCharacterSpacingControl.cxx b/svx/source/sidebar/text/TextCharacterSpacingControl.cxx index e4a75085bce8..3084b4527686 100644 --- a/svx/source/sidebar/text/TextCharacterSpacingControl.cxx +++ b/svx/source/sidebar/text/TextCharacterSpacingControl.cxx @@ -81,7 +81,7 @@ void TextCharacterSpacingControl::dispose() { SvtViewOptions aWinOpt(EViewType::Window, SIDEBAR_SPACING_GLOBAL_VALUE); css::uno::Sequence<css::beans::NamedValue> aSeq - { { "Spacing", css::uno::makeAny(OUString::number(GetLastCustomValue())) } }; + { { "Spacing", css::uno::makeAny(OUString::number(mnCustomKern)) } }; aWinOpt.SetUserData(aSeq); } diff --git a/svx/source/sidebar/text/TextCharacterSpacingControl.hxx b/svx/source/sidebar/text/TextCharacterSpacingControl.hxx index d246cae073b1..6c3a649edf12 100644 --- a/svx/source/sidebar/text/TextCharacterSpacingControl.hxx +++ b/svx/source/sidebar/text/TextCharacterSpacingControl.hxx @@ -38,8 +38,6 @@ public: virtual ~TextCharacterSpacingControl() override; virtual void dispose() override; - long GetLastCustomValue() const { return mnCustomKern;} - private: VclPtr<MetricField> maEditKerning; diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index 2deae4c913cb..d5ed29862e3d 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -435,7 +435,6 @@ public: // data read access const sdr::overlay::OverlaySelection* getOverlaySelection() const { return mpOverlaySelection; } const OutlinerView& getOutlinerView() const { return mrOutlinerView; } - bool getVisualizeSurroundingFrame() const { return mbVisualizeSurroundingFrame; } /// override to check conditions for last createOverlayObjectPrimitive2DSequence virtual drawinglayer::primitive2d::Primitive2DContainer @@ -453,7 +452,7 @@ TextEditOverlayObject::createOverlayObjectPrimitive2DSequence() drawinglayer::primitive2d::Primitive2DContainer aRetval; /// outer frame visualization - if (getVisualizeSurroundingFrame()) + if (mbVisualizeSurroundingFrame) { const SvtOptionsDrawinglayer aSvtOptionsDrawinglayer; const double fTransparence(aSvtOptionsDrawinglayer.GetTransparentSelectionPercent() * 0.01); diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index 7e14a6d3bdd9..135b934be8b4 100644 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -88,8 +88,6 @@ public: const OUString& rMimeType, const css::uno::Any & rValue ) override; void Connect() { GetRealObject(); } - - const OUString& getReferer() const { return rGrafObj.aReferer; } }; SdrGraphicLink::SdrGraphicLink(SdrGrafObj& rObj) @@ -110,7 +108,7 @@ SdrGraphicLink::SdrGraphicLink(SdrGrafObj& rObj) sfx2::LinkManager::GetDisplayNames( this, nullptr, &rGrafObj.aFileName, nullptr, &rGrafObj.aFilterName ); Graphic aGraphic; - if (sfx2::LinkManager::GetGraphicFromAny(rMimeType, rValue, getReferer(), aGraphic, nullptr)) + if (sfx2::LinkManager::GetGraphicFromAny(rMimeType, rValue, rGrafObj.aReferer, aGraphic, nullptr)) { rGrafObj.ImpSetLinkedGraphic(aGraphic); } diff --git a/svx/source/table/tablehandles.cxx b/svx/source/table/tablehandles.cxx index abf7c55f85ba..ea7fd2e3306f 100644 --- a/svx/source/table/tablehandles.cxx +++ b/svx/source/table/tablehandles.cxx @@ -290,7 +290,6 @@ void TableBorderHdl::CreateB2dIAObject() // this handle is also used when text edit *is* active for it. This // interferes too much concerning repaint stuff (at least as long as // text edit is not yet on the overlay) - const bool bAnimate = getAnimate(); OutputDevice& rOutDev = rPageWindow.GetPaintWindow().GetOutputDevice(); float fScaleFactor = rOutDev.GetDPIScaleFactor(); @@ -299,7 +298,7 @@ void TableBorderHdl::CreateB2dIAObject() std::unique_ptr<sdr::overlay::OverlayObject> pOverlayObject( new sdr::overlay::OverlayRectangle(aRange.getMinimum(), aRange.getMaximum(), aHilightColor, fTransparence, - fWidth, 0.0, 0.0, bAnimate)); + fWidth, 0.0, 0.0, mbAnimate)); // OVERLAYMANAGER insertNewlyCreatedOverlayObjectForSdrHdl( diff --git a/svx/source/table/tablehandles.hxx b/svx/source/table/tablehandles.hxx index c436fed56abd..1e651bc47533 100644 --- a/svx/source/table/tablehandles.hxx +++ b/svx/source/table/tablehandles.hxx @@ -74,7 +74,6 @@ public: bool bAnimate); virtual PointerStyle GetPointer() const override; - bool getAnimate() const { return mbAnimate; } protected: // create marker for this kind diff --git a/unotools/source/config/confignode.cxx b/unotools/source/config/confignode.cxx index 286cbb671215..59c5fbba8224 100644 --- a/unotools/source/config/confignode.cxx +++ b/unotools/source/config/confignode.cxx @@ -161,7 +161,7 @@ namespace utl OUString OConfigurationNode::normalizeName(const OUString& _rName, NAMEORIGIN _eOrigin) const { OUString sName(_rName); - if (getEscape()) + if (m_bEscapeNames) { Reference< XStringEscape > xEscaper(m_xDirectAccess, UNO_QUERY); if (xEscaper.is() && !sName.isEmpty()) diff --git a/vcl/source/edit/textview.cxx b/vcl/source/edit/textview.cxx index 2eaa1b2f598c..6d5921662598 100644 --- a/vcl/source/edit/textview.cxx +++ b/vcl/source/edit/textview.cxx @@ -80,7 +80,7 @@ css::uno::Any TETextDataObject::getTransferData( const css::datatransfer::DataFl SotClipboardFormatId nT = SotExchange::GetFormat( rFlavor ); if ( nT == SotClipboardFormatId::STRING ) { - aAny <<= GetText(); + aAny <<= maText; } else if ( nT == SotClipboardFormatId::HTML ) { diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index 1d25c089e976..38ac1bf7f1fa 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -216,7 +216,7 @@ void Menu::dispose() mpLayoutData.reset(); // Native-support: destroy SalMenu - ImplClearSalMenu(); + mpSalMenu.reset(); pStartedFrom.clear(); pWindow.clear(); @@ -2298,11 +2298,6 @@ OUString Menu::GetAccessibleName( sal_uInt16 nItemId ) const return OUString(); } -void Menu::ImplClearSalMenu() -{ - mpSalMenu.reset(); -} - void Menu::GetSystemMenuData( SystemMenuData* pData ) const { Menu* pMenu = const_cast<Menu*>(this); |