compilerplugins/clang/unusedfields.untouched.results | 2 -- sfx2/source/inc/templdgi.hxx | 1 - sw/source/ui/vba/vbaparagraph.cxx | 12 +++++++++--- sw/source/ui/vba/vbaparagraph.hxx | 16 ++++++++++++---- 4 files changed, 21 insertions(+), 10 deletions(-)
New commits: commit 1a077b777590966ac89b39e0f9159c5df933a6eb Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Mon Apr 14 14:39:38 2025 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Tue Apr 15 08:10:21 2025 +0200 use more concrete UNO classes in SwVbaParagraphs Change-Id: Ib2ddac276e89cc362216bc837e0daefce7b4f135 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184159 Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> Tested-by: Jenkins diff --git a/sw/source/ui/vba/vbaparagraph.cxx b/sw/source/ui/vba/vbaparagraph.cxx index c5e6a0e5e00e..2d38389e1e8c 100644 --- a/sw/source/ui/vba/vbaparagraph.cxx +++ b/sw/source/ui/vba/vbaparagraph.cxx @@ -26,7 +26,10 @@ using namespace ::ooo::vba; using namespace ::com::sun::star; -SwVbaParagraph::SwVbaParagraph( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, uno::Reference< text::XTextDocument > xDocument, uno::Reference< text::XTextRange > xTextRange ) : +SwVbaParagraph::SwVbaParagraph( const uno::Reference< ooo::vba::XHelperInterface >& rParent, + const uno::Reference< uno::XComponentContext >& rContext, + rtl::Reference< SwXTextDocument > xDocument, + uno::Reference< text::XTextRange > xTextRange ) : SwVbaParagraph_BASE( rParent, rContext ), mxTextDocument(std::move( xDocument )), mxTextRange(std::move( xTextRange )) { } @@ -38,7 +41,7 @@ SwVbaParagraph::~SwVbaParagraph() uno::Reference< word::XRange > SAL_CALL SwVbaParagraph::getRange( ) { - return uno::Reference< word::XRange >( new SwVbaRange( this, mxContext, dynamic_cast<SwXTextDocument*>(mxTextDocument.get()), mxTextRange->getStart(), mxTextRange->getEnd(), mxTextRange->getText() ) ); + return uno::Reference< word::XRange >( new SwVbaRange( this, mxContext, mxTextDocument, mxTextRange->getStart(), mxTextRange->getEnd(), mxTextRange->getText() ) ); } uno::Any SAL_CALL @@ -137,7 +140,10 @@ public: } -SwVbaParagraphs::SwVbaParagraphs( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< css::uno::XComponentContext > & xContext, const uno::Reference< text::XTextDocument >& xDocument ) : SwVbaParagraphs_BASE( xParent, xContext, new ParagraphCollectionHelper( xDocument ) ), mxTextDocument( xDocument ) +SwVbaParagraphs::SwVbaParagraphs( const uno::Reference< XHelperInterface >& xParent, + const uno::Reference< css::uno::XComponentContext > & xContext, + const rtl::Reference< SwXTextDocument >& xDocument ) +: SwVbaParagraphs_BASE( xParent, xContext, new ParagraphCollectionHelper( xDocument ) ), mxTextDocument( xDocument ) { } diff --git a/sw/source/ui/vba/vbaparagraph.hxx b/sw/source/ui/vba/vbaparagraph.hxx index 96f96fcb8ae6..1df01d0ba80c 100644 --- a/sw/source/ui/vba/vbaparagraph.hxx +++ b/sw/source/ui/vba/vbaparagraph.hxx @@ -25,18 +25,24 @@ #include <vbahelper/vbahelperinterface.hxx> #include <com/sun/star/text/XTextRange.hpp> #include <com/sun/star/text/XTextDocument.hpp> +#include <rtl/ref.hxx> + +class SwXTextDocument; typedef InheritedHelperInterfaceWeakImpl< ooo::vba::word::XParagraph > SwVbaParagraph_BASE; class SwVbaParagraph : public SwVbaParagraph_BASE { private: - css::uno::Reference< css::text::XTextDocument > mxTextDocument; + rtl::Reference< SwXTextDocument > mxTextDocument; css::uno::Reference< css::text::XTextRange > mxTextRange; public: /// @throws css::uno::RuntimeException - SwVbaParagraph( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, css::uno::Reference< css::text::XTextDocument > xDocument, css::uno::Reference< css::text::XTextRange > xTextRange ); + SwVbaParagraph( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, + const css::uno::Reference< css::uno::XComponentContext >& rContext, + rtl::Reference< SwXTextDocument > xDocument, + css::uno::Reference< css::text::XTextRange > xTextRange ); virtual ~SwVbaParagraph() override; // XParagraph @@ -56,10 +62,12 @@ typedef CollTestImplHelper< ooo::vba::word::XParagraphs > SwVbaParagraphs_BASE; class SwVbaParagraphs : public SwVbaParagraphs_BASE { private: - css::uno::Reference< css::text::XTextDocument > mxTextDocument; + rtl::Reference< SwXTextDocument > mxTextDocument; public: /// @throws css::uno::RuntimeException - SwVbaParagraphs( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::text::XTextDocument >& xDocument ); + SwVbaParagraphs( const css::uno::Reference< ov::XHelperInterface >& xParent, + const css::uno::Reference< css::uno::XComponentContext > & xContext, + const rtl::Reference< SwXTextDocument >& xDocument ); // XEnumerationAccess virtual css::uno::Type SAL_CALL getElementType() override; commit 4f8b700867a2d51e8c6325491828610d0823a86e Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Mon Apr 14 14:18:33 2025 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Tue Apr 15 08:10:13 2025 +0200 remove unused field Change-Id: If81b8c1a21006b49b8025defd2ebd652bdeb8e5b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184158 Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> Tested-by: Jenkins diff --git a/compilerplugins/clang/unusedfields.untouched.results b/compilerplugins/clang/unusedfields.untouched.results index 1707c8b583c4..b7457a33c8db 100644 --- a/compilerplugins/clang/unusedfields.untouched.results +++ b/compilerplugins/clang/unusedfields.untouched.results @@ -374,8 +374,6 @@ sfx2/source/doc/doctempl.cxx:103 DocTempl::(anonymous namespace)::DocTempl_EntryData_Impl mxObjShell SfxObjectShellLock sfx2/source/inc/sfxpicklist.hxx:33 SfxPickList mxImpl std::unique_ptr<SfxPickListImpl> -sfx2/source/inc/templdgi.hxx:92 - SfxCommonTemplateDialog_Impl m_aStyleListUpdateFamily Link<void *, void> slideshow/source/engine/opengl/TransitionImpl.cxx:1991 (anonymous namespace)::ThreeFloats x GLfloat slideshow/source/engine/opengl/TransitionImpl.cxx:1991 diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx index 45fd1a04e540..7d80352e08e8 100644 --- a/sfx2/source/inc/templdgi.hxx +++ b/sfx2/source/inc/templdgi.hxx @@ -89,7 +89,6 @@ protected: Link<void*, void> m_aStyleListNewMenu; Link<void*, bool> m_aStyleListWaterCan; Link<void*, bool> m_aStyleListHasSelectedStyle; - Link<void*, void> m_aStyleListUpdateFamily; Link<void*, void> m_aStyleListUpdateStyleDependents; Link<bool, void> m_aStyleListEnableTreeDrag; Link<void*, void> m_aStyleListEnableDelete;