diff options
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.cxx | 5 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtw8num.cxx | 65 |
2 files changed, 31 insertions, 39 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 22cad9dff565..7c576e26538e 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -6988,7 +6988,10 @@ void DocxAttributeOutput::NumberingLevel( sal_uInt8 nLevel, FSNS( XML_w, XML_cs ), aFamilyName, FSNS( XML_w, XML_hint ), "default" ); } - m_rExport.OutputItemSet( *pOutSet, false, true, i18n::ScriptType::LATIN, m_rExport.m_bExportModeRTF ); + else + { + m_rExport.OutputItemSet(*pOutSet, false, true, i18n::ScriptType::LATIN, m_rExport.m_bExportModeRTF); + } WriteCollectedRunProperties(); diff --git a/sw/source/filter/ww8/wrtw8num.cxx b/sw/source/filter/ww8/wrtw8num.cxx index cc6795aeb3b2..ca3a026f2323 100644 --- a/sw/source/filter/ww8/wrtw8num.cxx +++ b/sw/source/filter/ww8/wrtw8num.cxx @@ -452,7 +452,11 @@ void MSWordExportBase::NumberingLevel( // #i86652# if (rFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION) { - nFollow = 2; // ixchFollow: 0 - tab, 1 - blank, 2 - nothing + // <nFollow = 2>, if minimum label width equals 0 and + // minimum distance between label and text equals 0 + nFollow = (rFormat.GetFirstLineOffset() == 0 && + rFormat.GetCharTextDistance() == 0) + ? 2 : 0; // ixchFollow: 0 - tab, 1 - blank, 2 - nothing } else if (rFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT) { @@ -490,44 +494,20 @@ void MSWordExportBase::NumberingLevel( const vcl::Font* pBulletFont=nullptr; rtl_TextEncoding eChrSet=0; FontFamily eFamily=FAMILY_DECORATIVE; - if (!rRule.Get(nLvl).GetListFormat().isEmpty()) { - // We have stored list format, use it + // Nothing to construct: we have it already sNumStr = rRule.Get(nLvl).GetListFormat(); } else if (SVX_NUM_CHAR_SPECIAL == rFormat.GetNumberingType() || SVX_NUM_BITMAP == rFormat.GetNumberingType()) { + // Use bullet sNumStr = OUString(rFormat.GetBulletChar()); - bWriteBullet = true; - - pBulletFont = rFormat.GetBulletFont(); - if (!pBulletFont) - { - pBulletFont = &numfunc::GetDefBulletFont(); - } - - eChrSet = pBulletFont->GetCharSet(); - sFontName = pBulletFont->GetFamilyName(); - eFamily = pBulletFont->GetFamilyType(); - - if (IsStarSymbol(sFontName)) - SubstituteBullet( sNumStr, eChrSet, sFontName ); - - // #i86652# - if (rFormat.GetPositionAndSpaceMode() == - SvxNumberFormat::LABEL_WIDTH_AND_POSITION) - { - // <nFollow = 2>, if minimum label width equals 0 and - // minimum distance between label and text equals 0 - nFollow = (rFormat.GetFirstLineOffset() == 0 && - rFormat.GetCharTextDistance() == 0) - ? 2 : 0; // ixchFollow: 0 - tab, 1 - blank, 2 - nothing - } } else { + // Construct list format string from prefix, level numbers and suffix if (SVX_NUM_NUMBER_NONE != rFormat.GetNumberingType()) { sal_uInt8* pLvlPos = aNumLvlPos; @@ -547,16 +527,6 @@ void MSWordExportBase::NumberingLevel( sNumStr = sNumStr.replaceAt( nFnd, 1, OUString(static_cast<char>(i)) ); } } - // #i86652# - if (rFormat.GetPositionAndSpaceMode() == - SvxNumberFormat::LABEL_WIDTH_AND_POSITION) - { - // <nFollow = 2>, if minimum label width equals 0 and - // minimum distance between label and text equals 0 - nFollow = (rFormat.GetFirstLineOffset() == 0 && - rFormat.GetCharTextDistance() == 0) - ? 2 : 0; // ixchFollow: 0 - tab, 1 - blank, 2 - nothing - } } if (!rFormat.GetPrefix().isEmpty()) @@ -564,6 +534,25 @@ void MSWordExportBase::NumberingLevel( sNumStr += rFormat.GetSuffix(); } + if (SVX_NUM_CHAR_SPECIAL == rFormat.GetNumberingType() || + SVX_NUM_BITMAP == rFormat.GetNumberingType()) + { + bWriteBullet = true; + + pBulletFont = rFormat.GetBulletFont(); + if (!pBulletFont) + { + pBulletFont = &numfunc::GetDefBulletFont(); + } + + eChrSet = pBulletFont->GetCharSet(); + sFontName = pBulletFont->GetFamilyName(); + eFamily = pBulletFont->GetFamilyType(); + + if (IsStarSymbol(sFontName)) + SubstituteBullet(sNumStr, eChrSet, sFontName); + } + // Attributes of the numbering std::unique_ptr<wwFont> pPseudoFont; const SfxItemSet* pOutSet = nullptr; |