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:
@@ -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";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user