summaryrefslogtreecommitdiff
path: root/sw/source/uibase/app/docshini.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase/app/docshini.cxx')
-rw-r--r--sw/source/uibase/app/docshini.cxx22
1 files changed, 14 insertions, 8 deletions
diff --git a/sw/source/uibase/app/docshini.cxx b/sw/source/uibase/app/docshini.cxx
index 1435276ff9cd..cb9241609f77 100644
--- a/sw/source/uibase/app/docshini.cxx
+++ b/sw/source/uibase/app/docshini.cxx
@@ -88,6 +88,7 @@
#include <globals.hrc>
#include <unochart.hxx>
#include <drawdoc.hxx>
+#include <DocumentSettingManager.hxx>
#include <svx/CommonStyleManager.hxx>
@@ -483,14 +484,6 @@ bool SwDocShell::Load( SfxMedium& rMedium )
{
bool bRet = false;
- // 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 (IsOwnStorageFormat(rMedium))
- {
- if (m_xDoc.get() && m_xDoc->getIDocumentDrawModelAccess().GetDrawModel())
- m_xDoc->getIDocumentDrawModelAccess().GetDrawModel()->SetAnchoredTextOverflowLegacy(true);
- }
-
if (SfxObjectShell::Load(rMedium))
{
comphelper::EmbeddedObjectContainer& rEmbeddedObjectContainer = getEmbeddedObjectContainer();
@@ -502,6 +495,19 @@ bool SwDocShell::Load( SfxMedium& rMedium )
AddLink(); // set Link and update Data!!
+ // Define some settings for legacy ODF files that have different default values now
+ // (if required, they will be overridden later when settings will be read)
+ if (IsOwnStorageFormat(rMedium))
+ {
+ // legacy processing for tdf#99729
+ if (m_xDoc->getIDocumentDrawModelAccess().GetDrawModel())
+ m_xDoc->getIDocumentDrawModelAccess().GetDrawModel()->SetAnchoredTextOverflowLegacy(
+ true);
+ // legacy behaviour (not hiding paragraph) for Database (MailMerge) fields
+ m_xDoc->GetDocumentSettingManager().set(DocumentSettingId::EMPTY_DB_FIELD_HIDES_PARA,
+ false);
+ }
+
// Loading
// for MD
OSL_ENSURE( !m_xBasePool.is(), "who hasn't destroyed their Pool?" );