diff options
author | Sarper Akdemir <sarper.akdemir@collabora.com> | 2023-02-21 02:33:01 +0300 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2023-02-23 12:19:23 +0000 |
commit | 9da4a2518eea880a2c80515d1346effa7c8c8c11 (patch) | |
tree | 8bd758cc4954b909bfc861f88c41138893f74585 /sc/source/ui/docshell | |
parent | 37751d878b87765a4d2cfb50d0a39280c585ece1 (diff) |
related tdf#148966: rework sdr compatibility flags
Rework access/set methods for sdr compatibility flags so it
is possible to address a compatibility flag without directly
interfacing with SdrModel.
(preliminary work for exposing compatibility flags to
editeng)
Change-Id: I2fab219f9e125151916228300be2d9d88156d8a6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147407
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sc/source/ui/docshell')
-rw-r--r-- | sc/source/ui/docshell/docsh.cxx | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index 4bf9343734a7..f5fad1fd1f3b 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -77,6 +77,7 @@ #include <scabstdlg.hxx> #include <sot/formats.hxx> +#include <svx/compatflags.hxx> #include <svx/dialogs.hrc> #include <formulacell.hxx> @@ -584,13 +585,16 @@ bool ScDocShell::Load( SfxMedium& rMedium ) InitOptions(true); // If this is an ODF file being loaded, then by default, use legacy processing - // for tdf#99729 (if required, it will be overridden in *::ReadUserDataSequence()) + // (if required, it will be overridden in *::ReadUserDataSequence()) if (IsOwnStorageFormat(rMedium)) { - if (m_pDocument->GetDrawLayer()) - m_pDocument->GetDrawLayer()->SetAnchoredTextOverflowLegacy(true); - if (m_pDocument->GetDrawLayer()) - m_pDocument->GetDrawLayer()->SetLegacySingleLineFontwork(true); //for tdf#148000 + if (ScDrawLayer* pDrawLayer = m_pDocument->GetDrawLayer()) + { + pDrawLayer->SetCompatibilityFlag(SdrCompatibilityFlag::AnchoredTextOverflowLegacy, + true); // for tdf#99729 + pDrawLayer->SetCompatibilityFlag(SdrCompatibilityFlag::LegacySingleLineFontwork, + true); // for tdf#148000 + } } GetUndoManager()->Clear(); |