sw/source/core/unocore/unoportenum.cxx | 8 +++----- sw/source/core/unocore/unostyle.cxx | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-)
New commits: commit 6b3118be28fa6e5906b44c4963b0bb2ca804a863 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Sun Sep 17 19:24:35 2023 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Mon Sep 18 08:09:25 2023 +0200 use more concrete UNO types in sw Change-Id: I6afcc0443081efebdf8b4d291f1a81b2667c4d33 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157001 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index e57beb1a72f7..70fc8b712266 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -3065,7 +3065,7 @@ void SwXPageStyle::setPropertyValues(const uno::Sequence<OUString>& rPropertyNam } } -static uno::Reference<text::XText> lcl_makeHeaderFooter(const sal_uInt16 nRes, const bool bHeader, SwFrameFormat const*const pFrameFormat) +static rtl::Reference<SwXHeadFootText> lcl_makeHeaderFooter(const sal_uInt16 nRes, const bool bHeader, SwFrameFormat const*const pFrameFormat) { if (!pFrameFormat) return nullptr; commit af83536685cf50a564d9c8290bf6ea5982de73b7 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Sun Sep 17 19:19:13 2023 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Mon Sep 18 08:09:16 2023 +0200 use more concrete UNO types in sw Change-Id: I6a1b2cc07928a053e70cf4707ab5d5f3d3bf9407 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157000 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx index 420aa9a8bf95..791622ea875b 100644 --- a/sw/source/core/unocore/unoportenum.cxx +++ b/sw/source/core/unocore/unoportenum.cxx @@ -519,20 +519,18 @@ lcl_CreateMetaPortion( const SwUnoCursor * const pUnoCursor, SwTextAttr & rAttr, std::unique_ptr<TextRangeList_t const> && pPortions) { - const uno::Reference<rdf::XMetadatable> xMeta( SwXMeta::CreateXMeta( + const rtl::Reference<SwXMeta> xMeta( SwXMeta::CreateXMeta( *static_cast<SwFormatMeta &>(rAttr.GetAttr()).GetMeta(), xParent, std::move(pPortions))); rtl::Reference<SwXTextPortion> pPortion; if (RES_TXTATR_META == rAttr.Which()) { - const uno::Reference<text::XTextContent> xContent(xMeta, - uno::UNO_QUERY); pPortion = new SwXTextPortion(pUnoCursor, xParent, PORTION_META); - pPortion->SetMeta(xContent); + pPortion->SetMeta(xMeta); } else { - const uno::Reference<text::XTextField> xField(xMeta, uno::UNO_QUERY); + const uno::Reference<text::XTextField> xField(static_cast<cppu::OWeakObject*>(xMeta.get()), uno::UNO_QUERY); pPortion = new SwXTextPortion(pUnoCursor, xParent, PORTION_FIELD); pPortion->SetTextField(xField); }