[Libreoffice-commits] core.git: writerfilter/source
Justin Luth (via logerrit)
logerrit at kemper.freedesktop.org
Fri Apr 10 17:46:01 UTC 2020
writerfilter/source/dmapper/DomainMapper_Impl.cxx | 6 +++---
writerfilter/source/dmapper/NumberingManager.hxx | 5 ++---
2 files changed, 5 insertions(+), 6 deletions(-)
New commits:
commit 25468bba15a149edc1e53a7518070c64d4c967e9
Author: Justin Luth <justin.luth at collabora.com>
AuthorDate: Fri Apr 10 15:25:43 2020 +0300
Commit: Justin Luth <justin_luth at sil.org>
CommitDate: Fri Apr 10 19:45:26 2020 +0200
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 at sil.org>
Reviewed-by: Justin Luth <justin_luth at sil.org>
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();
More information about the Libreoffice-commits
mailing list