writerfilter/source/dmapper/StyleSheetTable.cxx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-)
New commits: commit 04a226b6f536f81a431301eb73985e6c515e21a5 Author: Szabolcs Toth <szabolcs...@gmail.com> AuthorDate: Mon Feb 17 09:51:55 2020 +0100 Commit: László Németh <nem...@numbertext.org> CommitDate: Mon Feb 17 14:28:10 2020 +0100 DOCX clean-up: revert underused lcl_IsOutLineStyle() Reverting a portion of commit 125dd0be473d15681049814c3982f1ae2c66660f (tdf#95495 DOCX import: fix inherited list level of custom styles) Change-Id: I763ed303de2bad52b0c265eaf7ac9be664c4dcdc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88850 Tested-by: László Németh <nem...@numbertext.org> Reviewed-by: László Németh <nem...@numbertext.org> diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx index 918ef8ad6e46..ceeb95a55d24 100644 --- a/writerfilter/source/dmapper/StyleSheetTable.cxx +++ b/writerfilter/source/dmapper/StyleSheetTable.cxx @@ -886,12 +886,6 @@ uno::Sequence< OUString > PropValVector::getNames() return comphelper::containerToSequence(aRet); } -static bool lcl_IsOutLineStyle(const OUString& sPrefix, const OUString& sStyleName) -{ - OUString sSuffix; - return sStyleName.getLength() == (sPrefix.getLength() + 2) && sStyleName.startsWith(sPrefix + " ", &sSuffix) && sSuffix.toInt32() > 0; -} - void StyleSheetTable::ApplyStyleSheets( const FontTablePtr& rFontTable ) { try @@ -1095,7 +1089,15 @@ void StyleSheetTable::ApplyStyleSheets( const FontTablePtr& rFontTable ) } else if ( sConvertedStyleName == "Text body" ) xState->setPropertyToDefault(getPropertyName( PROP_PARA_BOTTOM_MARGIN )); - else if( lcl_IsOutLineStyle("Heading", sConvertedStyleName) ) + else if ( sConvertedStyleName == "Heading 1" || + sConvertedStyleName == "Heading 2" || + sConvertedStyleName == "Heading 3" || + sConvertedStyleName == "Heading 4" || + sConvertedStyleName == "Heading 5" || + sConvertedStyleName == "Heading 6" || + sConvertedStyleName == "Heading 7" || + sConvertedStyleName == "Heading 8" || + sConvertedStyleName == "Heading 9" ) { xState->setPropertyToDefault(getPropertyName( PROP_CHAR_WEIGHT )); xState->setPropertyToDefault(getPropertyName( PROP_CHAR_WEIGHT_ASIAN )); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits