diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-04-06 14:52:02 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-04-06 16:13:43 +0200 |
commit | 7fc2cafbba36db25e7d0083cea162d2df08611b5 (patch) | |
tree | 4211c8afe1725ad00f236c98db0969297645fcbe /writerfilter | |
parent | 6fcabbd6199869753fd6a266f23901962a77f556 (diff) |
tdf#136740: reimplement the fix using existing m_bIsNewDoc
This reimplements the fix from commit d7c4d0d4ea83481693af3645a03b03b53e456f60.
The unit test from commit a90a324aa590a94a4091fbfadea67e0b0203767c still passes.
Change-Id: I84c61fa68b9bee679a8e82ef7b8f164297bacb5a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113665
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 2e5b33f97d2b..cf057bcaf6b1 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -22,7 +22,6 @@ #include <com/sun/star/drawing/XDrawPageSupplier.hpp> #include <filter/msfilter/util.hxx> #include <filter/msfilter/rtfutil.hxx> -#include <comphelper/SetFlagContextHelper.hxx> #include <comphelper/string.hxx> #include <tools/diagnose_ex.h> #include <tools/globname.hxx> @@ -267,7 +266,7 @@ RTFDocumentImpl::RTFDocumentImpl(uno::Reference<uno::XComponentContext> const& x , m_pMapperStream(nullptr) , m_aDefaultState(this) , m_bSkipUnknown(false) - , m_bFirstRun(!comphelper::IsContextFlagActive("InPasteFromClipboard")) + , m_bFirstRun(true) , m_bFirstRunException(false) , m_bNeedPap(true) , m_bNeedCr(false) @@ -372,6 +371,9 @@ void RTFDocumentImpl::resolveSubstream(std::size_t nPos, Id nId, OUString const& void RTFDocumentImpl::outputSettingsTable() { + // tdf#136740: do not change trarget document settings when pasting + if (!m_bIsNewDoc) + return; writerfilter::Reference<Properties>::Pointer_t pProp = new RTFReferenceProperties(m_aSettingsTableAttributes, m_aSettingsTableSprms); RTFReferenceTable::Entries_t aSettingsTableEntries; |