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>
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 4a7c8f7..01eba34e 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 40ff314..9dc034e 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();