summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2022-10-20 11:03:13 +0200
committerSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2022-11-14 09:26:52 +0100
commit31c5b3f10b3e1d1d86d9fc3553c6f55599b080ce (patch)
tree726b051a33b1cfcac2531f43c732af8a32c5d918 /sw
parent6064b3382102bcbc153156f5874fbc8dfde97b98 (diff)
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.mehrbrodt@allotropia.de>
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/shellio.hxx11
-rw-r--r--sw/source/filter/basflt/shellio.cxx11
2 files changed, 13 insertions, 9 deletions
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