NFC writerfilter numbering: remove redundant code

Remove duplicated StyleSheetImport section,
and redundant valid pointer check.

Change-Id: I468733fc627fbdbebb2daf7087ce9e65158751df
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92065
Tested-by: Jenkins
Reviewed-by: Justin Luth <justin_luth@sil.org>
This commit is contained in:
Justin Luth
2020-04-13 08:21:07 +02:00
committed by Justin Luth
parent 634a20dfda
commit dbd98ebe9f
2 changed files with 2 additions and 9 deletions
+1 -8
View File
@@ -1329,14 +1329,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, const PropertyMapPtr& rContext )
}
else
{
if( IsStyleSheetImport() )
{
// set the number id for AbstractNum references
StyleSheetPropertyMap* pStyleSheetPropertyMap = dynamic_cast< StyleSheetPropertyMap* >( rContext.get() );
if (pStyleSheetPropertyMap)
pStyleSheetPropertyMap->SetNumId( nIntValue );
}
else
if( !IsStyleSheetImport() )
{
// eg. disabled numbering using non-existent numId "0"
rContext->Insert( PROP_NUMBERING_STYLE_NAME, uno::makeAny( OUString() ) );
@@ -464,7 +464,7 @@ OUString ListDef::GetStyleName(sal_Int32 const nId,
{
OUString sStyleName = "WWNum" + OUString::number( nId );
while (xStyles.is() && xStyles->hasByName(sStyleName)) // unique
while (xStyles->hasByName(sStyleName)) // unique
{
sStyleName += "a";
}