From 6c8c2ce7c3d6ecb57fa0736447c8aeff287c92f4 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 16 Jan 2025 13:32:04 +0200 Subject: [PATCH] loplugin:unusedmethods Change-Id: I8041b975ee8e1cb0a75c43c6332f315627847033 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180343 Reviewed-by: Noel Grandin Tested-by: Jenkins --- chart2/source/inc/CharacterProperties.hxx | 3 -- chart2/source/tools/CharacterProperties.cxx | 39 ------------------- include/svx/annotation/AnnotationObject.hxx | 1 - include/vcl/window.hxx | 1 - sd/source/ui/inc/SlideshowLayerRenderer.hxx | 15 ------- sd/source/ui/inc/ViewShellManager.hxx | 5 --- sd/source/ui/sidebar/MasterPageContainer.cxx | 14 ------- sd/source/ui/sidebar/MasterPageContainer.hxx | 4 -- sd/source/ui/sidebar/MasterPagesSelector.hxx | 2 - sd/source/ui/view/ViewShellManager.cxx | 18 --------- .../source/engine/slide/layermanager.cxx | 8 ---- .../source/engine/slide/layermanager.hxx | 6 --- svx/source/annotation/AnnotationObject.cxx | 6 --- sw/source/core/access/accpara.hxx | 7 ---- .../ooxml/OOXMLFastContextHandler.hxx | 2 - vcl/inc/DropdownBox.hxx | 1 - vcl/inc/IPrioritable.hxx | 1 - vcl/inc/OptionalBox.hxx | 1 - vcl/source/control/DropdownBox.cxx | 2 - vcl/source/window/OptionalBox.cxx | 2 - vcl/source/window/window2.cxx | 5 --- 21 files changed, 143 deletions(-) diff --git a/chart2/source/inc/CharacterProperties.hxx b/chart2/source/inc/CharacterProperties.hxx index 40367f9b943d..cbc77c3859c0 100644 --- a/chart2/source/inc/CharacterProperties.hxx +++ b/chart2/source/inc/CharacterProperties.hxx @@ -126,9 +126,6 @@ namespace CharacterProperties UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) void AddDefaultsToMap( ::chart::tPropertyValueMap & rOutMap ); UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) bool IsCharacterPropertyHandle( sal_Int32 nHandle ); - - UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) css::awt::FontDescriptor createFontDescriptorFromPropertySet( - const css::uno::Reference< css::beans::XMultiPropertySet > & xMultiPropSet ); } } // namespace chart diff --git a/chart2/source/tools/CharacterProperties.cxx b/chart2/source/tools/CharacterProperties.cxx index e407b7efeecb..1d042ae30f7c 100644 --- a/chart2/source/tools/CharacterProperties.cxx +++ b/chart2/source/tools/CharacterProperties.cxx @@ -418,45 +418,6 @@ bool CharacterProperties::IsCharacterPropertyHandle( sal_Int32 nHandle ) nHandle < CharacterProperties::FAST_PROPERTY_ID_END_CHAR_PROP ); } -awt::FontDescriptor CharacterProperties::createFontDescriptorFromPropertySet( - const uno::Reference< beans::XMultiPropertySet > & xMultiPropSet ) -{ - awt::FontDescriptor aResult; - // Note: keep this sorted! - uno::Sequence< OUString > aPropNameSeq{ - u"CharFontCharSet"_ustr, // CharSet - u"CharFontFamily"_ustr, // Family - u"CharFontName"_ustr, // Name - u"CharFontPitch"_ustr, // Pitch - u"CharFontStyleName"_ustr, // StyleName - u"CharHeight"_ustr, // Height - u"CharPosture"_ustr, // Slant - u"CharStrikeout"_ustr, // Strikeout - u"CharUnderline"_ustr, // Underline - u"CharWeight"_ustr, // Weight - u"CharWordMode"_ustr}; // WordLineMode - uno::Sequence< uno::Any > aValues( xMultiPropSet->getPropertyValues( aPropNameSeq )); - - sal_Int32 i=0; - // Note keep this sorted according to the list above (comments are the fieldnames) - aValues[ i++ ] >>= aResult.CharSet; - aValues[ i++ ] >>= aResult.Family; - aValues[ i++ ] >>= aResult.Name; - aValues[ i++ ] >>= aResult.Pitch; - aValues[ i++ ] >>= aResult.StyleName; - float fCharHeight = 0; - aValues[ i++ ] >>= fCharHeight; - aResult.Height = static_cast< sal_Int16 >( fCharHeight ); - aValues[ i++ ] >>= aResult.Slant; - aValues[ i++ ] >>= aResult.Strikeout; - aValues[ i++ ] >>= aResult.Underline; - aValues[ i++ ] >>= aResult.Weight; - aValues[ i++ ] >>= aResult.WordLineMode; - OSL_ASSERT( i == aValues.getLength()); - - return aResult; -} - } // namespace chart /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/svx/annotation/AnnotationObject.hxx b/include/svx/annotation/AnnotationObject.hxx index 674d1290b9af..79732042465f 100644 --- a/include/svx/annotation/AnnotationObject.hxx +++ b/include/svx/annotation/AnnotationObject.hxx @@ -32,7 +32,6 @@ private: sdr::annotation::AnnotationViewData maViewData; public: - AnnotationObject(SdrModel& rSdrModel); AnnotationObject(SdrModel& rSdrModel, AnnotationObject const& rSource); AnnotationObject(SdrModel& rSdrModel, tools::Rectangle const& rRectangle, sdr::annotation::AnnotationViewData const& aAnnotationViewData); diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx index 31d0cdfde720..9ea6cd449bb2 100644 --- a/include/vcl/window.hxx +++ b/include/vcl/window.hxx @@ -768,7 +768,6 @@ public: SAL_DLLPRIVATE bool IsDockingWindow() const; bool IsDialog() const; bool IsMenuFloatingWindow() const; - bool IsToolbarFloatingWindow() const; bool IsNativeFrame() const; bool IsTopWindow() const; SystemWindow* GetSystemWindow() const; diff --git a/sd/source/ui/inc/SlideshowLayerRenderer.hxx b/sd/source/ui/inc/SlideshowLayerRenderer.hxx index 48490c981512..858ab08178b8 100644 --- a/sd/source/ui/inc/SlideshowLayerRenderer.hxx +++ b/sd/source/ui/inc/SlideshowLayerRenderer.hxx @@ -135,21 +135,6 @@ struct RenderState { return maObjectsDone.find(pObject) != maObjectsDone.end(); } - - static std::string getObjectHash(SdrObject* pObject) - { - css::uno::Reference xShape = GetXShapeForSdrObject(pObject); - if (xShape.is()) - { - css::uno::Reference xRef; - css::uno::Any(xShape) >>= xRef; - if (xRef.is()) - return GetInterfaceHash(xRef); - } - - SAL_WARN("sd", "RenderState::getObjectHash: failed"); - return std::string(); - } }; /** Renders a slide */ diff --git a/sd/source/ui/inc/ViewShellManager.hxx b/sd/source/ui/inc/ViewShellManager.hxx index 929877ad1484..68672781761b 100644 --- a/sd/source/ui/inc/ViewShellManager.hxx +++ b/sd/source/ui/inc/ViewShellManager.hxx @@ -83,11 +83,6 @@ public: void SetOverridingMainShell(const std::shared_ptr& pViewShell); std::shared_ptr GetOverridingMainShell(); - /** Activate the given shell which is not a view shell. For view shells - use the ActivateViewShell() method. - */ - void ActivateShell(SfxShell* pShell); - /** Activate the given shell, putting it at the bottom of the stack instead of the top. */ diff --git a/sd/source/ui/sidebar/MasterPageContainer.cxx b/sd/source/ui/sidebar/MasterPageContainer.cxx index e34d979b243d..ed3445824153 100644 --- a/sd/source/ui/sidebar/MasterPageContainer.cxx +++ b/sd/source/ui/sidebar/MasterPageContainer.cxx @@ -77,7 +77,6 @@ public: void AddChangeListener (const Link& rLink); void RemoveChangeListener (const Link& rLink); void UpdatePreviewSizePixel(); - const Size& GetPreviewSizePixel (PreviewSize eSize) const; bool HasToken (Token aToken) const; SharedMasterPageDescriptor GetDescriptor (MasterPageContainer::Token aToken) const; @@ -230,11 +229,6 @@ void MasterPageContainer::SetPreviewSize (PreviewSize eSize) NIL_TOKEN); } -Size const & MasterPageContainer::GetPreviewSizePixel() const -{ - return mpImpl->GetPreviewSizePixel(mePreviewSize); -} - MasterPageContainer::Token MasterPageContainer::PutMasterPage ( const std::shared_ptr& rDescriptor) { @@ -580,14 +574,6 @@ void MasterPageContainer::Implementation::UpdatePreviewSizePixel() } } -const Size& MasterPageContainer::Implementation::GetPreviewSizePixel (PreviewSize eSize) const -{ - if (eSize == SMALL) - return maSmallPreviewSizePixel; - else - return maLargePreviewSizePixel; -} - MasterPageContainer::Token MasterPageContainer::Implementation::PutMasterPage ( const SharedMasterPageDescriptor& rpDescriptor) { diff --git a/sd/source/ui/sidebar/MasterPageContainer.hxx b/sd/source/ui/sidebar/MasterPageContainer.hxx index d9d3cc2311a7..18e476c0303d 100644 --- a/sd/source/ui/sidebar/MasterPageContainer.hxx +++ b/sd/source/ui/sidebar/MasterPageContainer.hxx @@ -76,10 +76,6 @@ public: */ PreviewSize GetPreviewSize() const { return mePreviewSize; } - /** Return the preview size in pixels. - */ - Size const& GetPreviewSizePixel() const; - enum PreviewState { PS_AVAILABLE, diff --git a/sd/source/ui/sidebar/MasterPagesSelector.hxx b/sd/source/ui/sidebar/MasterPagesSelector.hxx index 9407bf6c2f87..28c1761ccbf2 100644 --- a/sd/source/ui/sidebar/MasterPagesSelector.hxx +++ b/sd/source/ui/sidebar/MasterPagesSelector.hxx @@ -57,8 +57,6 @@ public: virtual void LateInit(); - sal_Int32 GetPreferredHeight (sal_Int32 nWidth); - /** Make the selector empty. This method clear the value set from any entries. Override this method to add functionality, especially to destroy objects set as data items at the value set. diff --git a/sd/source/ui/view/ViewShellManager.cxx b/sd/source/ui/view/ViewShellManager.cxx index 0e6076efb1ce..ecd8687d4fb6 100644 --- a/sd/source/ui/view/ViewShellManager.cxx +++ b/sd/source/ui/view/ViewShellManager.cxx @@ -107,7 +107,6 @@ public: void ActivateViewShell ( ViewShell* pViewShell); void DeactivateViewShell (const ViewShell& rShell); - void ActivateShell (SfxShell& rShell); void ActivateLowPriorityShell (SfxShell& rShell); void DeactivateShell (const SfxShell& rShell); void ActivateShell (const ShellDescriptor& rDescriptor); @@ -313,12 +312,6 @@ void ViewShellManager::InvalidateAllSubShells (ViewShell const * pViewShell) mpImpl->InvalidateAllSubShells(pViewShell); } -void ViewShellManager::ActivateShell (SfxShell* pShell) -{ - if (mbValid && pShell!=nullptr) - mpImpl->ActivateShell(*pShell); -} - void ViewShellManager::ActivateLowPriorityShell (SfxShell* pShell) { if (mbValid && pShell!=nullptr) @@ -495,17 +488,6 @@ void ViewShellManager::Implementation::DeactivateViewShell (const ViewShell& rSh DestroyViewShell(aDescriptor); } -void ViewShellManager::Implementation::ActivateShell (SfxShell& rShell) -{ - ::osl::MutexGuard aGuard (maMutex); - - // Create a new shell or recycle on in the cache. - ShellDescriptor aDescriptor; - aDescriptor.mpShell = &rShell; - - ActivateShell(aDescriptor); -} - void ViewShellManager::Implementation::ActivateLowPriorityShell (SfxShell& rShell) { ::osl::MutexGuard aGuard (maMutex); diff --git a/slideshow/source/engine/slide/layermanager.cxx b/slideshow/source/engine/slide/layermanager.cxx index 5857de99997d..947b4f2580b6 100644 --- a/slideshow/source/engine/slide/layermanager.cxx +++ b/slideshow/source/engine/slide/layermanager.cxx @@ -299,14 +299,6 @@ namespace slideshow::internal mbLayerAssociationDirty = true; } - void LayerManager::removeAllShapes() - { - while( !maAllShapes.empty() ) - { - removeShape(maAllShapes.begin()->first); - } - } - ShapeSharedPtr LayerManager::lookupShape( const uno::Reference< drawing::XShape >& xShape ) const { ENSURE_OR_THROW( xShape.is(), "LayerManager::lookupShape(): invalid Shape" ); diff --git a/slideshow/source/engine/slide/layermanager.hxx b/slideshow/source/engine/slide/layermanager.hxx index df6f02baa381..1969f0cccbb0 100644 --- a/slideshow/source/engine/slide/layermanager.hxx +++ b/slideshow/source/engine/slide/layermanager.hxx @@ -120,12 +120,6 @@ namespace slideshow::internal */ bool removeShape( const ShapeSharedPtr& rShape ); - /** Remove all shapes from this object - - This method removes all shapes from the page. - */ - void removeAllShapes(); - /** Lookup a Shape from an XShape model object This method looks up the internal shape map for one diff --git a/svx/source/annotation/AnnotationObject.cxx b/svx/source/annotation/AnnotationObject.cxx index 88e63d5565ad..75de32522e92 100644 --- a/svx/source/annotation/AnnotationObject.cxx +++ b/svx/source/annotation/AnnotationObject.cxx @@ -109,12 +109,6 @@ Color getColorLight(sal_uInt16 aAuthorIndex) } } -AnnotationObject::AnnotationObject(SdrModel& rSdrModel) - : SdrRectObj(rSdrModel) -{ - setup(); -} - AnnotationObject::AnnotationObject(SdrModel& rSdrModel, AnnotationObject const& rSource) : SdrRectObj(rSdrModel, rSource) { diff --git a/sw/source/core/access/accpara.hxx b/sw/source/core/access/accpara.hxx index 6cef4039e915..260b6236db50 100644 --- a/sw/source/core/access/accpara.hxx +++ b/sw/source/core/access/accpara.hxx @@ -235,8 +235,6 @@ public: SwAccessibleParagraph( std::shared_ptr const& pInitMap, const SwTextFrame& rTextFrame ); - inline operator css::accessibility::XAccessibleText *(); - virtual bool HasCursor() override; // required by map to remember that object css::uno::Sequence< css::style::TabStop > GetCurrentTabStop( sal_Int32 nIndex ); @@ -374,11 +372,6 @@ public: virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getRunAttributes( sal_Int32 nIndex, const css::uno::Sequence< OUString >& aRequestedAttributes ) override; }; -inline SwAccessibleParagraph::operator css::accessibility::XAccessibleText *() -{ - return static_cast< css::accessibility::XAccessibleEditableText * >( this ); -} - #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/writerfilter/ooxml/OOXMLFastContextHandler.hxx b/sw/source/writerfilter/ooxml/OOXMLFastContextHandler.hxx index 49abfde529ce..0e91ff15e5a0 100644 --- a/sw/source/writerfilter/ooxml/OOXMLFastContextHandler.hxx +++ b/sw/source/writerfilter/ooxml/OOXMLFastContextHandler.hxx @@ -538,8 +538,6 @@ protected: virtual void setToken(Token_t nToken) override; virtual Token_t getToken() const override; - bool isWriterFrameDetected() const { return mbIsWriterFrameDetected;} - private: css::uno::Reference mxWrappedContext; rtl::Reference mxShapeHandler; diff --git a/vcl/inc/DropdownBox.hxx b/vcl/inc/DropdownBox.hxx index 0e3c3e315561..a66a841100eb 100644 --- a/vcl/inc/DropdownBox.hxx +++ b/vcl/inc/DropdownBox.hxx @@ -39,7 +39,6 @@ public: void HideContent() override; void ShowContent() override; - bool IsHidden() override; private: DECL_LINK(PBClickHdl, Button*, void); diff --git a/vcl/inc/IPrioritable.hxx b/vcl/inc/IPrioritable.hxx index 0b8dec9ec095..0ad53dd9c076 100644 --- a/vcl/inc/IPrioritable.hxx +++ b/vcl/inc/IPrioritable.hxx @@ -40,7 +40,6 @@ public: virtual void HideContent() = 0; virtual void ShowContent() = 0; - virtual bool IsHidden() = 0; private: int m_nPriority; diff --git a/vcl/inc/OptionalBox.hxx b/vcl/inc/OptionalBox.hxx index 05ab1cbf0cff..6ba0a4f4ce77 100644 --- a/vcl/inc/OptionalBox.hxx +++ b/vcl/inc/OptionalBox.hxx @@ -33,7 +33,6 @@ public: void HideContent() override; void ShowContent() override; - bool IsHidden() override; }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/control/DropdownBox.cxx b/vcl/source/control/DropdownBox.cxx index 6aaf2e553ace..b1895ecbdf9d 100644 --- a/vcl/source/control/DropdownBox.cxx +++ b/vcl/source/control/DropdownBox.cxx @@ -65,8 +65,6 @@ void DropdownBox::HideContent() } } -bool DropdownBox::IsHidden() { return !m_bInFullView; } - void DropdownBox::ShowContent() { if (!m_bInFullView) diff --git a/vcl/source/window/OptionalBox.cxx b/vcl/source/window/OptionalBox.cxx index 28055f7e210e..53ffe41afe39 100644 --- a/vcl/source/window/OptionalBox.cxx +++ b/vcl/source/window/OptionalBox.cxx @@ -57,6 +57,4 @@ void OptionalBox::ShowContent() } } -bool OptionalBox::IsHidden() { return !m_bInFullView; } - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index 173edb8932e0..616ff93da13c 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -1075,11 +1075,6 @@ bool Window::IsMenuFloatingWindow() const return mpWindowImpl && mpWindowImpl->mbMenuFloatingWindow; } -bool Window::IsToolbarFloatingWindow() const -{ - return mpWindowImpl && mpWindowImpl->mbToolbarFloatingWindow; -} - bool Window::IsNativeFrame() const { if( mpWindowImpl->mbFrame )