diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-04-24 15:12:03 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-04-28 22:26:42 +0200 |
commit | 2ccf6f2a203a5a215f7a1e4d097cc08a73d22f2c (patch) | |
tree | 43e53b33d9f23d083a0510a5e2c074acdd0c0fff | |
parent | 7ee095d7e075ebc12183378c65fe64e5c0fc1ba4 (diff) |
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 <noel.grandin@collabora.co.uk>
-rw-r--r-- | sw/inc/unoframe.hxx | 4 | ||||
-rw-r--r-- | sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx | 9 | ||||
-rw-r--r-- | 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<css::dra return; // if this is a textbox there must be a waiting frame - auto xTextBox = m_xPendingTextBoxFrames.front(); + rtl::Reference<SwXTextFrame> xTextBox = m_xPendingTextBoxFrames.front(); if (!xTextBox) return; @@ -5833,7 +5833,7 @@ void DomainMapper_Impl::AttachTextBoxContentToShape(css::uno::Reference<css::dra // Attach the textbox to the shape try { - xProps->setPropertyValue("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<css::dra { // Get the name of the textbox OUString sTextBoxName; - uno::Reference<container::XNamed> 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<beans::PropertyValue> 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<css::text::XTextRange> m_xGlossaryEntryStart; std::stack<BookmarkInsertPosition> m_xSdtStarts; - std::queue< css::uno::Reference< css::text::XTextFrame > > m_xPendingTextBoxFrames; + std::queue< rtl::Reference< SwXTextFrame > > m_xPendingTextBoxFrames; public: css::uno::Reference<css::text::XTextRange> m_xInsertTextRange; |