summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2017-08-24 22:17:18 -0400
committerJustin Luth <justin_luth@sil.org>2017-08-31 20:13:00 +0200
commitc071e5f6858661881065cbb4e644c37c8e94ccc6 (patch)
tree9768682d2a73fd317ebe3caae3e0d3ac67bf00fc /writerfilter
parentb55d86610128d0b6f8d0fea7c9a3e9d5acd4c878 (diff)
tdf#108765 DOCX: after import, allow default styles again
During import, we don't want LO's style defaults to intermingle with those of MSO [1]. However, if any styles are NOT defined by the document itself, then we want to use that new style with appropriate defaults. For example, if footnotes were never used, that style might not be defined in the .docx file. Later, if a user inserts a footnote for the first time, we certainly don't want the "default paragraph" settings. Instead, we want the default "Footnote" settings. [1]: see commit b95d203bc17c83ec0fe5139f519d53ed1d842d3a Change-Id: Ia71490e795885d3c16f764d0f716f6499765cb67 Reviewed-on: https://gerrit.libreoffice.org/41546 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapper.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 5b52d1c5348f..41decae20717 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -201,6 +201,9 @@ DomainMapper::~DomainMapper()
// Apply the document settings after everything else
m_pImpl->GetSettingsTable()->ApplyProperties( m_pImpl->GetTextDocument( ) );
+ // now that importing is finished, re-enable default styles for any that were never defined/imported.
+ m_pImpl->SetDocumentSettingsProperty("StylesNoDefault", uno::makeAny(false));
+
// Grab-bag handling
comphelper::SequenceAsHashMap aProperties;
// Add the saved w:themeFontLang setting