sw/qa/extras/ooxmlexport/ooxmlexport.cxx     |    4 ++++
 vcl/win/gdi/salfont.cxx                      |    6 +++---
 writerfilter/source/dmapper/DomainMapper.cxx |    3 +++
 3 files changed, 10 insertions(+), 3 deletions(-)

New commits:
commit adce43a12a9e9b3834e188ea0deb4af8d28a2d06
Author: Justin Luth <[email protected]>
Date:   Thu Aug 24 22:17:18 2017 -0400

    tdf#108765 DOCX: after import, allow default styles again
    
    During import, we don't want LO's style defaults to intermingle
    with those of MSO [1]. However, if any styles are NOT defined by
    the document itself, then we want to use that new style with
    appropriate defaults.
    
    For example, if footnotes were never used, that style might not be
    defined in the .docx file. Later, if a user inserts a footnote
    for the first time, we certainly don't want the "default paragraph"
    settings. Instead, we want the default "Footnote" settings.
    
    [1]: see commit b95d203bc17c83ec0fe5139f519d53ed1d842d3a
    
    Change-Id: Ia71490e795885d3c16f764d0f716f6499765cb67
    Reviewed-on: https://gerrit.libreoffice.org/41546
    Tested-by: Jenkins <[email protected]>
    Reviewed-by: Justin Luth <[email protected]>
    (cherry picked from commit c071e5f6858661881065cbb4e644c37c8e94ccc6)
    Reviewed-on: https://gerrit.libreoffice.org/41769
    Reviewed-by: Miklos Vajna <[email protected]>

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index ebec4c6174c8..e9d76b3da301 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -359,6 +359,10 @@ DECLARE_OOXMLEXPORT_TEST(testTdf104713_undefinedStyles, 
"tdf104713_undefinedStyl
     // Normal paragraph style was not defined, so don't replace conflicting 
styles
     uno::Reference<beans::XPropertySet> 
xStyle(getStyles("ParagraphStyles")->getByName("Heading 1"), uno::UNO_QUERY);
     CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(212), 
getProperty<sal_Int32>(xStyle, "ParaBottomMargin"));
+
+    // tdf108765: once importing is finished, use default values for any 
styles not yet defined.
+    xStyle.set( getStyles("ParagraphStyles")->getByName("Footnote"), 
uno::UNO_QUERY );
+    CPPUNIT_ASSERT_EQUAL_MESSAGE("Font size", 10.f, getProperty<float>(xStyle, 
"CharHeight"));
 }
 
 DECLARE_OOXMLEXPORT_TEST(testDrawingmlFlipv, "drawingml-flipv.docx")
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx 
b/writerfilter/source/dmapper/DomainMapper.cxx
index 7fd0975bf6e3..44460d7e8fac 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -206,6 +206,9 @@ DomainMapper::~DomainMapper()
         // Apply the document settings after everything else
         m_pImpl->GetSettingsTable()->ApplyProperties( 
m_pImpl->GetTextDocument( ) );
 
+        // now that importing is finished, re-enable default styles for any 
that were never defined/imported.
+        m_pImpl->SetDocumentSettingsProperty("StylesNoDefault", 
uno::makeAny(false));
+
         // Grab-bag handling
         comphelper::SequenceAsHashMap aProperties;
         // Add the saved w:themeFontLang setting
commit 45bc0b931eb2569bf267d226b67e58b7b8390529
Author: Caolán McNamara <[email protected]>
Date:   Tue Sep 5 13:06:20 2017 +0100

    Resolves: tdf#112180: avoid crash with specific ttf
    
    Change-Id: I8cde147279173bffec0c991eb7676f5d4641138d
    Reviewed-on: https://gerrit.libreoffice.org/41939
    Reviewed-by: Michael Stahl <[email protected]>
    Tested-by: Jenkins <[email protected]>

diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx
index 942898364291..e51e44ab6032 100644
--- a/vcl/win/gdi/salfont.cxx
+++ b/vcl/win/gdi/salfont.cxx
@@ -87,9 +87,9 @@ RawFontData::RawFontData( HDC hDC, DWORD nTableTag )
 {
     // get required size in bytes
     mnByteCount = ::GetFontData( hDC, nTableTag, 0, nullptr, 0 );
-    if( mnByteCount == GDI_ERROR )
-        return;
-    else if( !mnByteCount )
+    if (mnByteCount == GDI_ERROR)
+        mnByteCount = 0;
+    if (!mnByteCount)
         return;
 
     // allocate the array
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to