[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - 2 commits - sw/qa sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Jan 8 21:54:32 UTC 2019


 sw/qa/extras/ww8export/data/tdf122429_header.doc |binary
 sw/qa/extras/ww8export/ww8export3.cxx            |    9 +++++++++
 sw/source/filter/ww8/wrtw8sty.cxx                |    2 +-
 sw/source/uibase/wrtsh/wrtundo.cxx               |    3 ++-
 4 files changed, 12 insertions(+), 2 deletions(-)

New commits:
commit 6b2f6e5062ee4320ab952fd11684c389432bb568
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Jan 8 13:46:53 2019 +0000
Commit:     Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
CommitDate: Tue Jan 8 22:54:17 2019 +0100

    Resolves: tdf#121940 mnemonic ends up in tooltip text
    
    Change-Id: Ic698f23e71dbc613db2acf884fdefdeab06fde0f
    Reviewed-on: https://gerrit.libreoffice.org/65969
    Tested-by: Jenkins
    Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>

diff --git a/sw/source/uibase/wrtsh/wrtundo.cxx b/sw/source/uibase/wrtsh/wrtundo.cxx
index 2cc9e54ba232..ee9c315c96f0 100644
--- a/sw/source/uibase/wrtsh/wrtundo.cxx
+++ b/sw/source/uibase/wrtsh/wrtundo.cxx
@@ -25,6 +25,7 @@
 #include <swdtflvr.hxx>
 #include <svtools/svtresid.hxx>
 #include <svtools/strings.hrc>
+#include <vcl/mnemonic.hxx>
 
 // Undo ends all modes. If a selection is emerged by the Undo,
 // this must be considered for further action.
@@ -108,7 +109,7 @@ OUString SwWrtShell::GetDoString( DoType eDoType ) const
     default:;//prevent warning
     }
 
-    return SvtResId(pResStr) + aUndoStr;
+    return MnemonicGenerator::EraseAllMnemonicChars(SvtResId(pResStr)) + aUndoStr;
 }
 
 void SwWrtShell::GetDoStrings( DoType eDoType, SfxStringListItem& rStrs ) const
commit 73c7b0414679c002cd925ead8018837dd39eaf86
Author:     Justin Luth <justin_luth at sil.org>
AuthorDate: Thu Jan 3 20:23:54 2019 +0300
Commit:     Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
CommitDate: Tue Jan 8 22:54:09 2019 +0100

    tdf#122429/tdf#122431 ww8export: export H/F to default section
    
    Just like bug 121374 for DOCX, which was just fixed in LO62,
    DOC apparently also sometimes can miss out on headers and footers.
    
    It wouldn't be terrible to duplicate headers/footers
    unnecessarily, but it is terrible to have them disappear.
    If the last SectPr has no idea about the section start,
    it can't know whether it is continuous or started with
    a page break. In that case, just ensure that the
    header and footer are explicitly written out.
    
    RTF continues to work without this in all known cases.
    
    Change-Id: I93f2b08535a3548c0a9e9bcdb6ee2cd965dc8367
    Reviewed-on: https://gerrit.libreoffice.org/65840
    Tested-by: Jenkins
    Reviewed-by: Justin Luth <justin_luth at sil.org>
    (cherry picked from commit 0a6c609bdc89dd0317d3f5013c13d85d50d30669)
    Reviewed-on: https://gerrit.libreoffice.org/65943
    Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>
    Tested-by: Xisco Faulí <xiscofauli at libreoffice.org>
    Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>

diff --git a/sw/qa/extras/ww8export/data/tdf122429_header.doc b/sw/qa/extras/ww8export/data/tdf122429_header.doc
new file mode 100644
index 000000000000..37afc067b02a
Binary files /dev/null and b/sw/qa/extras/ww8export/data/tdf122429_header.doc differ
diff --git a/sw/qa/extras/ww8export/ww8export3.cxx b/sw/qa/extras/ww8export/ww8export3.cxx
index e85ec0efa18f..ccf79c83e300 100644
--- a/sw/qa/extras/ww8export/ww8export3.cxx
+++ b/sw/qa/extras/ww8export/ww8export3.cxx
@@ -46,6 +46,15 @@ DECLARE_WW8EXPORT_TEST(testTdf37778_readonlySection, "tdf37778_readonlySection.d
     CPPUNIT_ASSERT_EQUAL_MESSAGE("Number of Sections", sal_Int32(0), xSections->getCount());
     }
 
+DECLARE_WW8EXPORT_TEST(testTdf122429_header, "tdf122429_header.doc")
+{
+    uno::Reference<container::XNameAccess> pageStyles = getStyles("PageStyles");
+    uno::Reference<style::XStyle> pageStyle(pageStyles->getByName("Default Style"), uno::UNO_QUERY);
+    bool headerIsOn = getProperty<bool>(pageStyle, "HeaderIsOn");
+    CPPUNIT_ASSERT(headerIsOn);
+}
+
+
 DECLARE_WW8EXPORT_TEST(testFdo53985, "fdo53985.doc")
 {
     uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx
index 286a613e8e62..b5ee75531701 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -1555,7 +1555,7 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt
         }
 
         if ( reinterpret_cast<SwSectionFormat*>(sal_IntPtr(-1)) == rSepInfo.pSectionFormat )
-            bEnsureHeaderFooterWritten |= !rSepInfo.pPDNd && GetExportFormat() == ExportFormat::DOCX;
+            bEnsureHeaderFooterWritten |= !rSepInfo.pPDNd && GetExportFormat() != ExportFormat::RTF;
         else
         {
             if ( nBreakCode == 0 )


More information about the Libreoffice-commits mailing list