From 2ccf6f2a203a5a215f7a1e4d097cc08a73d22f2c Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 24 Apr 2024 15:12:03 +0200 Subject: use more explicit UNO types in writerfilter Change-Id: Icf26a78679398746a6c51453ae2de64615de088e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166803 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sw/inc/unoframe.hxx | 4 ++-- sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx | 9 ++++----- sw/source/writerfilter/dmapper/DomainMapper_Impl.hxx | 3 ++- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sw/inc/unoframe.hxx b/sw/inc/unoframe.hxx index 33648faf7bde..4ddb08e92baf 100644 --- a/sw/inc/unoframe.hxx +++ b/sw/inc/unoframe.hxx @@ -99,7 +99,7 @@ protected: public: //XNamed - virtual OUString SAL_CALL getName() override; + SW_DLLPUBLIC virtual OUString SAL_CALL getName() override; SW_DLLPUBLIC virtual void SAL_CALL setName(const OUString& Name_) override; //XPropertySet @@ -188,7 +188,7 @@ public: using SwXText::SetDoc; virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) override; - virtual void SAL_CALL acquire( ) noexcept override; + virtual SW_DLLPUBLIC void SAL_CALL acquire( ) noexcept override; virtual SW_DLLPUBLIC void SAL_CALL release( ) noexcept override; //XTypeProvider diff --git a/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx b/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx index 879e9a38f8ce..ff6bcf342b35 100644 --- a/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx +++ b/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx @@ -5823,7 +5823,7 @@ void DomainMapper_Impl::AttachTextBoxContentToShape(css::uno::Reference xTextBox = m_xPendingTextBoxFrames.front(); if (!xTextBox) return; @@ -5833,7 +5833,7 @@ void DomainMapper_Impl::AttachTextBoxContentToShape(css::uno::ReferencesetPropertyValue("TextBoxContent", uno::Any(xTextBox)); + xProps->setPropertyValue("TextBoxContent", uno::Any(uno::Reference< text::XTextFrame >(xTextBox))); } catch (...) { @@ -5846,9 +5846,8 @@ void DomainMapper_Impl::AttachTextBoxContentToShape(css::uno::Reference xName(xTextBox, uno::UNO_QUERY); - if (xName && !xName->getName().isEmpty()) - sTextBoxName = xName->getName(); + if (!xTextBox->getName().isEmpty()) + sTextBoxName = xTextBox->getName(); // Try to get the grabbag uno::Sequence aOldGrabBagSeq; diff --git a/sw/source/writerfilter/dmapper/DomainMapper_Impl.hxx b/sw/source/writerfilter/dmapper/DomainMapper_Impl.hxx index 7cd24bf51821..8623c28e55d9 100644 --- a/sw/source/writerfilter/dmapper/DomainMapper_Impl.hxx +++ b/sw/source/writerfilter/dmapper/DomainMapper_Impl.hxx @@ -59,6 +59,7 @@ class SwXTextDocument; class SwXDocumentSettings; class SwXTextSection; class SwXTextField; +class SwXTextFrame; namespace com::sun::star{ namespace awt{ struct Size; @@ -679,7 +680,7 @@ private: css::uno::Reference m_xGlossaryEntryStart; std::stack m_xSdtStarts; - std::queue< css::uno::Reference< css::text::XTextFrame > > m_xPendingTextBoxFrames; + std::queue< rtl::Reference< SwXTextFrame > > m_xPendingTextBoxFrames; public: css::uno::Reference m_xInsertTextRange; -- cgit v1.2.3