summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2023-04-18 21:25:30 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-04-19 09:03:20 +0200
commit7f3df1a07dd55ebff1c9c572d3ec93e06dfe854b (patch)
treebb49f76b97f50de81178687f3e55a3ce5cf1d10a /sw
parentecb76e447891fb35c599abf36415952ea700561f (diff)
use more concrete UNO type in SwXTextTableStyle
Change-Id: I19b556a5fc2ee9f475478b16e228aa3670146551 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150587 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/unostyle.hxx3
-rw-r--r--sw/source/core/unocore/unostyle.cxx3
2 files changed, 4 insertions, 2 deletions
diff --git a/sw/inc/unostyle.hxx b/sw/inc/unostyle.hxx
index 2c936486032e..bcd2c96aba6a 100644
--- a/sw/inc/unostyle.hxx
+++ b/sw/inc/unostyle.hxx
@@ -18,6 +18,7 @@
*/
#pragma once
+#include <rtl/ref.hxx>
#include <svl/listener.hxx>
#include <svl/style.hxx>
#include "unocoll.hxx"
@@ -267,7 +268,7 @@ class SwXTextTableStyle final : public cppu::WeakImplHelper
/// Fills m_aCellStyles with SwXTextCellStyles pointing to children of this style.
void UpdateCellStylesMapping();
static const CellStyleNameMap& GetCellStyleNameMap();
- css::uno::Reference<css::style::XStyle> m_aCellStyles[STYLE_COUNT];
+ rtl::Reference<SwXTextCellStyle> m_aCellStyles[STYLE_COUNT];
public:
SwXTextTableStyle(SwDocShell* pDocShell, SwTableAutoFormat* pTableAutoFormat);
/// Create non physical style
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index d6272e3a5f59..dfe82b61d858 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -4518,7 +4518,8 @@ uno::Any SAL_CALL SwXTextTableStyle::getByName(const OUString& rName)
if(iter == rMap.end())
throw css::container::NoSuchElementException();
- return css::uno::Any(m_aCellStyles[(*iter).second]);
+ auto nIdx = (*iter).second;
+ return css::uno::Any(uno::Reference<XInterface>(static_cast<cppu::OWeakObject*>(m_aCellStyles[nIdx].get())));
}
css::uno::Sequence<OUString> SAL_CALL SwXTextTableStyle::getElementNames()