officecfg/registry/schema/org/openoffice/Office/Writer.xcs |   21 +++++++++----
 sw/inc/shellio.hxx                                         |   11 +-----
 sw/source/filter/basflt/shellio.cxx                        |   11 ++++++
 3 files changed, 29 insertions(+), 14 deletions(-)

New commits:
commit 31c5b3f10b3e1d1d86d9fc3553c6f55599b080ce
Author:     Samuel Mehrbrodt <samuel.mehrbr...@allotropia.de>
AuthorDate: Thu Oct 20 11:03:13 2022 +0200
Commit:     Samuel Mehrbrodt <samuel.mehrbr...@allotropia.de>
CommitDate: Mon Nov 14 09:26:52 2022 +0100

    tdf#151605 Add option to not include hidden text in ASCII filter
    
    When setting this option, hidden text will not get exported/copied to 
clipboard.
    
    Change-Id: Id31aafc28ffb61a81bdc1412892f9e7997512f58
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141551
    Tested-by: Jenkins
    Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@allotropia.de>

diff --git a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
index 012ca4073fe3..3d8d753f5dfd 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
@@ -6497,11 +6497,22 @@
           <desc>Contains settings for the HTML filter.</desc>
         </info>
         <prop oor:name="IncludeHiddenText" oor:type="xs:boolean" 
oor:nillable="false">
-            <info>
-              <desc>Whether hidden text (sections, etc) is included in the 
output.</desc>
-            </info>
-            <value>false</value>
-          </prop>
+          <info>
+            <desc>Whether hidden text (sections, etc) is included in the 
output.</desc>
+          </info>
+          <value>false</value>
+        </prop>
+      </group>
+      <group oor:name="ASCII">
+        <info>
+          <desc>Contains settings for the ASCII filter.</desc>
+        </info>
+        <prop oor:name="IncludeHiddenText" oor:type="xs:boolean" 
oor:nillable="false">
+          <info>
+            <desc>Whether hidden text (sections, etc) is included in the 
output.</desc>
+          </info>
+          <value>true</value>
+        </prop>
       </group>
     </group>
     <group oor:name="Wizards">
diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx
index 1a1f45ce46fc..e476b530fd8a 100644
--- a/sw/inc/shellio.hxx
+++ b/sw/inc/shellio.hxx
@@ -84,15 +84,8 @@ public:
     bool GetIncludeHidden() const { return m_bIncludeHidden; }
     void SetIncludeHidden( bool bVal ) { m_bIncludeHidden = bVal; }
 
-    void Reset()
-    {
-        m_sFont.clear();
-        m_eCRLF_Flag = GetSystemLineEnd();
-        m_eCharSet = ::osl_getThreadTextEncoding();
-        m_nLanguage = LANGUAGE_SYSTEM;
-        m_bIncludeBOM = true;
-        m_bIncludeHidden = true;
-    }
+    void Reset();
+
     // for the automatic conversion (mail/news/...)
     void ReadUserData( std::u16string_view );
     void WriteUserData( OUString& ) const;
diff --git a/sw/source/filter/basflt/shellio.cxx 
b/sw/source/filter/basflt/shellio.cxx
index 9ffb0f253886..1027ea9c4210 100644
--- a/sw/source/filter/basflt/shellio.cxx
+++ b/sw/source/filter/basflt/shellio.cxx
@@ -30,6 +30,7 @@
 #include <editeng/boxitem.hxx>
 #include <editeng/paperinf.hxx>
 #include <o3tl/deleter.hxx>
+#include <officecfg/Office/Writer.hxx>
 #include <node.hxx>
 #include <docary.hxx>
 #include <fmtanchr.hxx>
@@ -76,6 +77,16 @@ static bool sw_MergePortions(SwNode* pNode, void *)
     return true;
 }
 
+void SwAsciiOptions::Reset()
+{
+    m_sFont.clear();
+    m_eCRLF_Flag = GetSystemLineEnd();
+    m_eCharSet = ::osl_getThreadTextEncoding();
+    m_nLanguage = LANGUAGE_SYSTEM;
+    m_bIncludeBOM = true;
+    m_bIncludeHidden = 
officecfg::Office::Writer::FilterFlags::ASCII::IncludeHiddenText::get();
+}
+
 ErrCode SwReader::Read( const Reader& rOptions )
 {
     // copy variables

Reply via email to