[Libreoffice-commits] core.git: sw/qa sw/source

Oleg Shchelykalnov (via logerrit) logerrit at kemper.freedesktop.org
Wed Jun 9 09:10:52 UTC 2021


 sw/qa/extras/txtencexport/txtencexport.cxx |    2 +-
 sw/source/filter/ascii/wrtasc.cxx          |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit b5e07b1339f73841664b28c65639f1638bd7edf4
Author:     Oleg Shchelykalnov <olegshtch at yandex.ru>
AuthorDate: Wed May 26 22:11:49 2021 +0300
Commit:     Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Wed Jun 9 11:10:01 2021 +0200

    tdf#137469 Implement and test excluding hidden text in text filter
    
    Uses filter options to manage whether hidden text output to file.
    Fixes filter options usage in test.
    
    Change-Id: I12a234438730795df6dd11bd6707dfa1fbfa4740
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105631
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.stahl at allotropia.de>

diff --git a/sw/qa/extras/txtencexport/txtencexport.cxx b/sw/qa/extras/txtencexport/txtencexport.cxx
index ec9fa697e9d1..bce9b81b4564 100644
--- a/sw/qa/extras/txtencexport/txtencexport.cxx
+++ b/sw/qa/extras/txtencexport/txtencexport.cxx
@@ -86,7 +86,7 @@ DECLARE_TXTENCEXPORT_TEST(testBulletsHidden, "bullets.odt", "UTF8,,,,,false", Tx
         "    2. Second" SAL_NEWLINE_STRING "        1. Second-first" SAL_NEWLINE_STRING
         "       Third, but deleted" SAL_NEWLINE_STRING "    3. Actual third" SAL_NEWLINE_STRING
         "" SAL_NEWLINE_STRING "Paragraph after numbering" SAL_NEWLINE_STRING
-        "Next paragraph" SAL_NEWLINE_STRING "Hidden paragraph" SAL_NEWLINE_STRING
+        "Next paragraph" SAL_NEWLINE_STRING
         "Final paragraph" SAL_NEWLINE_STRING,
         RTL_TEXTENCODING_UTF8);
 
diff --git a/sw/source/filter/ascii/wrtasc.cxx b/sw/source/filter/ascii/wrtasc.cxx
index f122e51f6d5c..1bba438e87e8 100644
--- a/sw/source/filter/ascii/wrtasc.cxx
+++ b/sw/source/filter/ascii/wrtasc.cxx
@@ -87,6 +87,7 @@ SwASCWriter::~SwASCWriter() {}
 ErrCode SwASCWriter::WriteStream()
 {
     bool bIncludeBOM = GetAsciiOptions().GetIncludeBOM();
+    bool bIncludeHidden = GetAsciiOptions().GetIncludeHidden();
 
     if( m_bASCII_ParaAsCR )           // If predefined
         m_sLineEnd = "\015";
@@ -149,7 +150,7 @@ ErrCode SwASCWriter::WriteStream()
                         continue;       // reset while loop!
                     }
                 }
-                else
+                else if (!pNd->IsHidden() || bIncludeHidden)
                 {
                     if (bWriteSttTag)
                     {


More information about the Libreoffice-commits mailing list