summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzabolcs Toth <szabolcs450@gmail.com>2020-02-17 09:51:55 +0100
committerLászló Németh <nemeth@numbertext.org>2020-02-17 14:28:10 +0100
commit04a226b6f536f81a431301eb73985e6c515e21a5 (patch)
treeca04658043d8fe0eb81cc0e3b98cb054fcfe1899
parentcd0afe8ff1d39ed3f9ccaa318f2fd3b0da4da747 (diff)
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 <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
-rw-r--r--writerfilter/source/dmapper/StyleSheetTable.cxx16
1 files changed, 9 insertions, 7 deletions
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 ));