chart2/source/view/charttypes/HistogramChart.cxx | 41 --------------------- chart2/source/view/charttypes/HistogramChart.hxx | 6 --- comphelper/source/misc/backupfilehelper.cxx | 5 -- include/comphelper/backupfilehelper.hxx | 1 include/package/Inflater.hxx | 3 - include/vcl/toolkit/ivctrl.hxx | 8 ---- sd/inc/sdpage.hxx | 1 sd/source/core/sdpage.cxx | 5 -- sd/source/ui/annotations/annotationmanagerimpl.hxx | 4 -- sd/source/ui/dlg/navigatr.cxx | 36 ------------------ sd/source/ui/inc/navigatr.hxx | 3 - vcl/source/control/imivctl1.cxx | 5 -- vcl/source/control/ivctrl.cxx | 1 13 files changed, 1 insertion(+), 118 deletions(-)
New commits: commit c8734eddf4cce6c2c54556fee383f2764dbb981d Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Mon Sep 30 13:33:33 2024 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Tue Oct 1 11:16:47 2024 +0200 loplugin:singlevalfields Change-Id: I8f844c40dcb48737d95a3004cd7e8c730656d955 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174299 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/include/vcl/toolkit/ivctrl.hxx b/include/vcl/toolkit/ivctrl.hxx index 0340eacf164e..95b29933349e 100644 --- a/include/vcl/toolkit/ivctrl.hxx +++ b/include/vcl/toolkit/ivctrl.hxx @@ -45,12 +45,6 @@ namespace o3tl template<> struct typed_flags<SvxIconViewFlags> : is_typed_flags<SvxIconViewFlags, 0x000f> {}; } -enum class SvxIconChoiceCtrlTextMode -{ - Full = 1, // Enlarge BoundRect southwards - Short // Shorten with "..." -}; - class SvxIconChoiceCtrlEntry { Image aImage; @@ -65,7 +59,6 @@ class SvxIconChoiceCtrlEntry tools::Rectangle aRect; // Bounding-Rectangle of the entry - SvxIconChoiceCtrlTextMode eTextMode; sal_uInt16 nX,nY; // for keyboard control SvxIconViewFlags nFlags; @@ -83,7 +76,6 @@ public: void SetQuickHelpText( const OUString& rText ) { aQuickHelpText = rText; } const OUString& GetQuickHelpText() const { return aQuickHelpText; } - SvxIconChoiceCtrlTextMode GetTextMode() const { return eTextMode; } SvxIconViewFlags GetFlags() const { return nFlags; } bool IsSelected() const { return bool(nFlags & SvxIconViewFlags::SELECTED); } bool IsFocused() const { return bool(nFlags & SvxIconViewFlags::FOCUSED); } diff --git a/vcl/source/control/imivctl1.cxx b/vcl/source/control/imivctl1.cxx index c264f1481306..2fb00f963a40 100644 --- a/vcl/source/control/imivctl1.cxx +++ b/vcl/source/control/imivctl1.cxx @@ -1560,8 +1560,7 @@ void SvxIconChoiceCtrl_Impl::SetGrid( const Size& rSize ) } // Calculates the maximum size that the text rectangle may use within its -// bounding rectangle. In WB_ICON mode with SvxIconChoiceCtrlTextMode::Full, Bottom is set to -// LONG_MAX. +// bounding rectangle. tools::Rectangle SvxIconChoiceCtrl_Impl::CalcMaxTextRect( const SvxIconChoiceCtrlEntry* pEntry ) const { @@ -1582,8 +1581,6 @@ tools::Rectangle SvxIconChoiceCtrl_Impl::CalcMaxTextRect( const SvxIconChoiceCtr aBoundRect.AdjustRight( -1 ); if( aBoundRect.Left() > aBoundRect.Right()) aBoundRect.SetLeft( aBoundRect.Right() ); - if( pEntry->GetTextMode() == SvxIconChoiceCtrlTextMode::Full ) - aBoundRect.SetBottom( LONG_MAX ); } else if (nWinBits & WB_SMALLICON) { diff --git a/vcl/source/control/ivctrl.cxx b/vcl/source/control/ivctrl.cxx index 4566ad1310b9..05fdf8d41864 100644 --- a/vcl/source/control/ivctrl.cxx +++ b/vcl/source/control/ivctrl.cxx @@ -58,7 +58,6 @@ SvxIconChoiceCtrlEntry::SvxIconChoiceCtrlEntry( OUString _aText, Image _aImage ) : aImage(std::move(_aImage)) , aText(std::move(_aText)) - , eTextMode(SvxIconChoiceCtrlTextMode::Short) , nX(0) , nY(0) , nFlags(SvxIconViewFlags::NONE) commit a6f1841aedae66915bcc10287bdec21fc2ebe8eb Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Mon Sep 30 13:27:29 2024 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Tue Oct 1 11:16:39 2024 +0200 loplugin:unusedmethods Change-Id: I3897ccb3349874672b778835b9c15642cb1a14f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174298 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> 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<VDataSeries> 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<sal_Int64>(reinterpret_cast<sal_IntPtr>(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<sdr::annotation::Annotation> 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<SdDrawDocument*>(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<SdDrawDocument*>(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; };