[Libreoffice-commits] core.git: writerfilter/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Sep 12 18:12:24 UTC 2018


 writerfilter/source/dmapper/StyleSheetTable.cxx |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit ca762d7016ac1271a17e2d4371cca71a78455376
Author:     Justin Luth <justin_luth at sil.org>
AuthorDate: Wed Sep 12 08:37:01 2018 +0300
Commit:     Justin Luth <justin_luth at sil.org>
CommitDate: Wed Sep 12 20:11:59 2018 +0200

    ~revert tdf#103961: delay merge of default props until export
    
    partial revert to fix tdf#119589
    
    Although it was working fine for DOC/DOCX formats, ODT doesn't
    save the working document's defaults to the file. Instead it just
    writes the application's built-in docdefaults, and just
    throws away the current working state. Unbelievable.
    But changing this results in invalid ODF syntax, so not trivial.
    
    So, it wasn't working to change the format from DOCX to ODT.
    
    Since this patch was just "future-looking" and didn't immediately
    solve a particular problem, I'm just reverting part of it, so
    that parentless styles once again copy the default settings.
    This means that table-style settings cannot override system defaults
    since it cannot know whether the style specified that value, or
    if it just got a copy of the defaults. (Just becuase the style
    matches the docDefaults doesn't necessarily mean that it
    inherited them - unless it is parentless...)
    
    Change-Id: I61dd7866b42f79d91645ee65ff84b734ed2a53cf
    Reviewed-on: https://gerrit.libreoffice.org/60366
    Tested-by: Jenkins
    Reviewed-by: Justin Luth <justin_luth at sil.org>

diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index a2fb4527b709..813c8772716d 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -1015,6 +1015,9 @@ 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


More information about the Libreoffice-commits mailing list