Kaydet (Commit) 2c00f5c8 authored tarafından Justin Luth's avatar Justin Luth Kaydeden (comit) Miklos Vajna

tdf#103961: delay merge of default props until export

Until now, during docx import the pPrDefault properties have been
directly added to the parentless styles. However, things like
table styles are supposed to over-ride these document defaults, but
not style defaults. Since the docDefaults are merged into the style,
table-styles were unable detect if they could override them.

Exporting doesn't export pPrDefaults well, so the
properties still need to be merged into the style when
round-tripping.

Almost every existing unit test document is a proof test.
It effectively ought to act as a non-functional change.
Plus, this basically reverts 7f697ec2
so that unit test still covers bug 103961.

Change-Id: I4948299ddd610c07d828f2bd57c58734f1b94c49
Reviewed-on: https://gerrit.libreoffice.org/58203Reviewed-by: 's avatarJustin Luth <justin_luth@sil.org>
Tested-by: 's avatarJustin Luth <justin_luth@sil.org>
Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
üst 674416a2
......@@ -460,7 +460,8 @@ void MSWordStyles::SetStyleDefaults( const SwFormat& rFormat, bool bPap )
// dynamic defaults
const SfxItemPool& rPool = *rFormat.GetAttrSet().GetPool();
for( n = nStt; n < nEnd; ++n )
aFlags[ n - RES_CHRATR_BEGIN ] = nullptr != rPool.GetPoolDefaultItem( n );
aFlags[ n - RES_CHRATR_BEGIN ] = nullptr != rPool.GetPoolDefaultItem( n )
|| SfxItemState::SET == m_rExport.m_pDoc->GetDfltTextFormatColl()->GetItemState( n, false );
// static defaults, that differs between WinWord and SO
if( bPap )
......
......@@ -1021,9 +1021,6 @@ void StyleSheetTable::ApplyStyleSheets( const FontTablePtr& rFontTable )
}
else if( bParaStyle )
{
// Paragraph styles that don't inherit from some parent need to apply the DocDefaults
pEntry->pProperties->InsertProps( m_pImpl->m_pDefaultParaProps, /*bAllowOverwrite=*/false );
//now it's time to set the default parameters - for paragraph styles
//Fonts: Western first entry in font table
//CJK: second entry
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment