diff options
author | Justin Luth <justin.luth@collabora.com> | 2020-04-10 15:25:43 +0300 |
---|---|---|
committer | Justin Luth <justin_luth@sil.org> | 2020-04-10 19:45:26 +0200 |
commit | 25468bba15a149edc1e53a7518070c64d4c967e9 (patch) | |
tree | 69f0d7e6b88fc5e6444ee0127d588dba2ec22ccc /writerfilter | |
parent | 6455fe41d67788a1857824ec0070405155304b3f (diff) |
writerfilter: simplify ListDef::GetStyleName
A simple lookup of the list's stylename has no need
for a styleId. That is only used during the naming of
the style, in which case both id and styletable are needed.
Let's not be confusing and just create a
separate function to simply return m_StyleName.
Change-Id: Ib0303a45d6154988f27c37d2c1470b0529d6c762
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92035
Tested-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.cxx | 6 | ||||
-rw-r--r-- | writerfilter/source/dmapper/NumberingManager.hxx | 5 |
2 files changed, 5 insertions, 6 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 4a7c8f7e4995..01eba34e62fa 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -1378,7 +1378,7 @@ void DomainMapper_Impl::finishParagraph( const PropertyMapPtr& pPropertyMap, con auto const pList(GetListTable()->GetList(nListId)); if (pList && nListId >= 0 && !pParaContext->isSet(PROP_NUMBERING_STYLE_NAME)) { - pParaContext->Insert( PROP_NUMBERING_STYLE_NAME, uno::makeAny( pList->GetStyleName(nListId) ), false); + pParaContext->Insert( PROP_NUMBERING_STYLE_NAME, uno::makeAny( pList->GetStyleName() ), false); isNumberingViaStyle = true; // Indent properties from the paragraph style have priority @@ -6686,7 +6686,7 @@ uno::Reference<container::XIndexAccess> DomainMapper_Impl::GetCurrentNumberingRu OUString aListName; if (pList) { - aListName = pList->GetStyleName(nListId); + aListName = pList->GetStyleName(); } uno::Reference< style::XStyleFamiliesSupplier > xStylesSupplier(GetTextDocument(), uno::UNO_QUERY_THROW); uno::Reference< container::XNameAccess > xStyleFamilies = xStylesSupplier->getStyleFamilies(); @@ -6807,7 +6807,7 @@ sal_Int32 DomainMapper_Impl::getNumberingProperty(const sal_Int32 nListId, sal_I auto const pList(GetListTable()->GetList(nListId)); assert(pList); - const OUString aListName = pList->GetStyleName(nListId); + const OUString aListName = pList->GetStyleName(); const uno::Reference< style::XStyleFamiliesSupplier > xStylesSupplier(GetTextDocument(), uno::UNO_QUERY_THROW); const uno::Reference< container::XNameAccess > xStyleFamilies = xStylesSupplier->getStyleFamilies(); uno::Reference<container::XNameAccess> xNumberingStyles; diff --git a/writerfilter/source/dmapper/NumberingManager.hxx b/writerfilter/source/dmapper/NumberingManager.hxx index 40ff314d5145..9dc034eff2b6 100644 --- a/writerfilter/source/dmapper/NumberingManager.hxx +++ b/writerfilter/source/dmapper/NumberingManager.hxx @@ -187,9 +187,8 @@ public: const AbstractListDef::Pointer& GetAbstractDefinition( ) const { return m_pAbstractDef; }; // Mapping functions - OUString GetStyleName(sal_Int32 nId, - css::uno::Reference<css::container::XNameContainer> const& xStyles - = css::uno::Reference<css::container::XNameContainer>()); + OUString GetStyleName() const { return m_StyleName; }; + OUString GetStyleName(sal_Int32 nId, css::uno::Reference<css::container::XNameContainer> const& xStyles); css::uno::Sequence< css::uno::Sequence<css::beans::PropertyValue> > GetMergedPropertyValues(); |