From a6f1841aedae66915bcc10287bdec21fc2ebe8eb Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 30 Sep 2024 13:27:29 +0200 Subject: [PATCH] loplugin:unusedmethods Change-Id: I3897ccb3349874672b778835b9c15642cb1a14f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174298 Tested-by: Jenkins Reviewed-by: Noel Grandin --- .../source/view/charttypes/HistogramChart.cxx | 41 ------------------- .../source/view/charttypes/HistogramChart.hxx | 6 --- comphelper/source/misc/backupfilehelper.cxx | 5 --- include/comphelper/backupfilehelper.hxx | 1 - include/package/Inflater.hxx | 3 -- sd/inc/sdpage.hxx | 1 - sd/source/core/sdpage.cxx | 5 --- .../ui/annotations/annotationmanagerimpl.hxx | 4 -- sd/source/ui/dlg/navigatr.cxx | 36 ---------------- sd/source/ui/inc/navigatr.hxx | 3 -- 10 files changed, 105 deletions(-) diff --git a/chart2/source/view/charttypes/HistogramChart.cxx b/chart2/source/view/charttypes/HistogramChart.cxx index 5ef3d42838d5..3324d61a3f82 100644 --- a/chart2/source/view/charttypes/HistogramChart.cxx +++ b/chart2/source/view/charttypes/HistogramChart.cxx @@ -81,47 +81,6 @@ PlottingPositionHelper& HistogramChart::getPlottingPositionHelper(sal_Int32 nAxi return rPosHelper; } -awt::Point HistogramChart::getLabelScreenPositionAndAlignment( - LabelAlignment& rAlignment, sal_Int32 nLabelPlacement, double fScaledX, - double fScaledLowerYValue, double fScaledUpperYValue, double fBaseValue, - BarPositionHelper const* pPosHelper) const -{ - double fY = fScaledUpperYValue; - bool bReverse = !pPosHelper->isMathematicalOrientationY(); - bool bNormalOutside = (!bReverse == (fBaseValue < fScaledUpperYValue)); - - switch (nLabelPlacement) - { - case css::chart::DataLabelPlacement::TOP: - fY = bReverse ? fScaledLowerYValue : fScaledUpperYValue; - rAlignment = LABEL_ALIGN_TOP; - break; - case css::chart::DataLabelPlacement::BOTTOM: - fY = bReverse ? fScaledUpperYValue : fScaledLowerYValue; - rAlignment = LABEL_ALIGN_BOTTOM; - break; - case css::chart::DataLabelPlacement::OUTSIDE: - fY = (fBaseValue < fScaledUpperYValue) ? fScaledUpperYValue : fScaledLowerYValue; - rAlignment = bNormalOutside ? LABEL_ALIGN_TOP : LABEL_ALIGN_BOTTOM; - break; - case css::chart::DataLabelPlacement::INSIDE: - fY = (fBaseValue < fScaledUpperYValue) ? fScaledUpperYValue : fScaledLowerYValue; - rAlignment = bNormalOutside ? LABEL_ALIGN_BOTTOM : LABEL_ALIGN_TOP; - break; - case css::chart::DataLabelPlacement::CENTER: - fY -= (fScaledUpperYValue - fScaledLowerYValue) / 2.0; - rAlignment = LABEL_ALIGN_CENTER; - break; - default: - OSL_FAIL("this label alignment is not implemented yet"); - break; - } - - drawing::Position3D aScenePosition3D( - pPosHelper->transformScaledLogicToScene(fScaledX, fY, 0.0, true)); - return LabelPositionHelper(2, m_xLogicTarget).transformSceneToScreenPosition(aScenePosition3D); -} - void HistogramChart::addSeries(std::unique_ptr pSeries, sal_Int32 zSlot, sal_Int32 xSlot, sal_Int32 ySlot) { diff --git a/chart2/source/view/charttypes/HistogramChart.hxx b/chart2/source/view/charttypes/HistogramChart.hxx index 8921be6712f1..907d1e08f45b 100644 --- a/chart2/source/view/charttypes/HistogramChart.hxx +++ b/chart2/source/view/charttypes/HistogramChart.hxx @@ -30,12 +30,6 @@ public: virtual css::drawing::Direction3D getPreferredDiagramAspectRatio() const override; private: - css::awt::Point getLabelScreenPositionAndAlignment(LabelAlignment& rAlignment, - sal_Int32 nLabelPlacement, double fScaledX, - double fScaledLowerYValue, - double fScaledUpperYValue, double fBaseValue, - BarPositionHelper const* pPosHelper) const; - virtual PlottingPositionHelper& getPlottingPositionHelper(sal_Int32 nAxisIndex) const override; void adaptGapWidthForHistogram(); diff --git a/comphelper/source/misc/backupfilehelper.cxx b/comphelper/source/misc/backupfilehelper.cxx index 11fa4239d2e9..2422479ecc07 100644 --- a/comphelper/source/misc/backupfilehelper.cxx +++ b/comphelper/source/misc/backupfilehelper.cxx @@ -1573,11 +1573,6 @@ namespace comphelper mbExitWasCalled = true; } - bool BackupFileHelper::getExitWasCalled() - { - return mbExitWasCalled; - } - void BackupFileHelper::reactOnSafeMode(bool bSafeMode) { // ensure existence of needed paths diff --git a/include/comphelper/backupfilehelper.hxx b/include/comphelper/backupfilehelper.hxx index abf8044a28ca..f77df7829ad4 100644 --- a/include/comphelper/backupfilehelper.hxx +++ b/include/comphelper/backupfilehelper.hxx @@ -107,7 +107,6 @@ namespace comphelper // allow to set static global flag when app had to call _exit() static void setExitWasCalled(); - static bool getExitWasCalled(); // This call initializes the state of the UserDirectory as needed, it may // initialize to SafeMode configuration or return from it by moving files diff --git a/include/package/Inflater.hxx b/include/package/Inflater.hxx index d59d220acfc4..eb28d3a547f2 100644 --- a/include/package/Inflater.hxx +++ b/include/package/Inflater.hxx @@ -65,12 +65,9 @@ public: InflaterBytes(bool bNoWrap); ~InflaterBytes(); void setInput( const sal_Int8* pBuffer, sal_Int32 nLen ); - bool needsDictionary() const { return bNeedDict; } bool finished() const { return bFinished; } sal_Int32 doInflateSegment( sal_Int8* pOutBuffer, sal_Int32 nBufLen, sal_Int32 nNewOffset, sal_Int32 nNewLength ); void end( ); - - sal_Int32 getLastInflateError() const { return nLastInflateError; } }; } diff --git a/sd/inc/sdpage.hxx b/sd/inc/sdpage.hxx index faf7e9157af7..698336a590ca 100644 --- a/sd/inc/sdpage.hxx +++ b/sd/inc/sdpage.hxx @@ -171,7 +171,6 @@ public: OUString GetPresObjText(PresObjKind eObjKind) const; SfxStyleSheet* GetStyleSheetForMasterPageBackground() const; SfxStyleSheet* GetStyleSheetForPresObj(PresObjKind eObjKind) const; - sal_Int64 GetHashCode() const; bool RestoreDefaultText( SdrObject* pObj ); /** @return true if the given SdrObject is inside the presentation object list */ diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index 5bd30a4fbeb9..4c524674b0f4 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -2696,11 +2696,6 @@ SdPage* SdPage::getImplementation( const css::uno::Reference< css::drawing::XDra return nullptr; } -sal_Int64 SdPage::GetHashCode() const -{ - return sal::static_int_cast(reinterpret_cast(this)); -} - void SdPage::SetName (const OUString& rName) { OUString aOldName( GetName() ); diff --git a/sd/source/ui/annotations/annotationmanagerimpl.hxx b/sd/source/ui/annotations/annotationmanagerimpl.hxx index c4cc4a605758..634d2fe3c85e 100644 --- a/sd/source/ui/annotations/annotationmanagerimpl.hxx +++ b/sd/source/ui/annotations/annotationmanagerimpl.hxx @@ -82,8 +82,6 @@ public: void DeleteAnnotationsByAuthor( std::u16string_view sAuthor ); void DeleteAllAnnotations(); - void ExecuteAnnotationTagContextMenu(rtl::Reference const& xAnnotation, weld::Widget* pParent, const ::tools::Rectangle& rContextRect); - static Color GetColorDark(sal_uInt16 aAuthorIndex); static Color GetColorLight(sal_uInt16 aAuthorIndex); static Color GetColor(sal_uInt16 aAuthorIndex); @@ -105,8 +103,6 @@ public: SdPage* GetCurrentPage(); - SdDrawDocument* GetDoc() { return mpDoc; } - void ShowAnnotations(bool bShow); private: diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx index c6eed54865a8..6197825b2811 100644 --- a/sd/source/ui/dlg/navigatr.cxx +++ b/sd/source/ui/dlg/navigatr.cxx @@ -158,42 +158,6 @@ static void lcl_select_marked_objects(sd::ViewShell* pViewShell, SdPageObjsTLV* } } -//when object is marked , fresh the corresponding entry tree . -void SdNavigatorWin::FreshTree( const SdDrawDocument* pDoc ) -{ - SdDrawDocument* pNonConstDoc = const_cast(pDoc); // const as const can... - sd::DrawDocShell* pDocShell = pNonConstDoc->GetDocSh(); - ::sd::ViewShell* pViewShell = pDocShell->GetViewShell(); - - // tdf#160190 - if (!pViewShell) - return; - - // tdf#139944 disable navigator in master mode - if (const sd::DrawViewShell* pDrawViewShell = static_cast<::sd::DrawViewShell*>(pViewShell)) - { - if (pDrawViewShell->GetEditMode() == EditMode::MasterPage) - { - m_xContainer->set_sensitive(false); - mxTlbObjects->clear(); - return; - } - else - m_xContainer->set_sensitive(true); - } - - const OUString& aDocShName( pDocShell->GetName() ); - OUString aDocName = pDocShell->GetMedium()->GetName(); - if (!mxTlbObjects->IsEqualToDoc(pDoc)) - { - mxTlbObjects->Fill( pDoc, false, aDocName ); // Only normal pages - RefreshDocumentLB(); - mxLbDocs->set_active_text(aDocShName); - } - - lcl_select_marked_objects(pViewShell, mxTlbObjects.get()); -} - void SdNavigatorWin::InitTreeLB( const SdDrawDocument* pDoc ) { SdDrawDocument* pNonConstDoc = const_cast(pDoc); // const as const can... diff --git a/sd/source/ui/inc/navigatr.hxx b/sd/source/ui/inc/navigatr.hxx index e3d963121904..9c2b990511c0 100644 --- a/sd/source/ui/inc/navigatr.hxx +++ b/sd/source/ui/inc/navigatr.hxx @@ -170,9 +170,6 @@ private: void ExecuteContextMenuAction(std::u16string_view rSelectedPopupEntry); public: - //when object is marked , fresh the corresponding entry tree . - void FreshTree ( const SdDrawDocument* pDoc ); - virtual weld::Window* GetFrameWeld() const override; };