[Libreoffice-commits] core.git: include/sfx2 sfx2/source sw/inc sw/source writerfilter/source
Samuel Mehrbrodt (via logerrit)
logerrit at kemper.freedesktop.org
Fri Apr 17 15:36:53 UTC 2020
include/sfx2/objsh.hxx | 2 --
sfx2/source/doc/objmisc.cxx | 6 ------
sw/inc/docsh.hxx | 1 -
sw/source/filter/ww8/ww8par.cxx | 2 ++
sw/source/uibase/app/docsh.cxx | 16 ----------------
writerfilter/source/dmapper/DomainMapper.cxx | 1 +
6 files changed, 3 insertions(+), 25 deletions(-)
New commits:
commit 9152aed7804b65f6241cf35d85afcb50486a27ef
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Thu Apr 16 12:56:12 2020 +0200
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Fri Apr 17 17:36:17 2020 +0200
Move Word compat option where it belongs
Change-Id: I6b28c6782f22190b7b22b11361c200d68d672aea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92347
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index da28df348996..6f3f1098a479 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -460,8 +460,6 @@ public:
bool IsAbortingImport() const;
void FinishedLoading( SfxLoadedFlags nWhich = SfxLoadedFlags::ALL );
- virtual void SetFormatSpecificCompatibilityOptions( const OUString& /*rFilterTypeName*/ ) { /* Do not do anything here; Derived classes must overload to do actual work */ };
-
void TemplateDisconnectionAfterLoad();
void SetLoading(SfxLoadedFlags nFlags);
bool IsLoading() const;
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index 81f9f9ce4573..86764e760ebe 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -1058,12 +1058,6 @@ void SfxObjectShell::InitOwnModel_Impl()
void SfxObjectShell::FinishedLoading( SfxLoadedFlags nFlags )
{
- std::shared_ptr<const SfxFilter> pFlt = pMedium->GetFilter();
- if( pFlt )
- {
- SetFormatSpecificCompatibilityOptions( pFlt->GetTypeName() );
- }
-
bool bSetModifiedTRUE = false;
const SfxStringItem* pSalvageItem = SfxItemSet::GetItem<SfxStringItem>(pMedium->GetItemSet(), SID_DOC_SALVAGE, false);
if( ( nFlags & SfxLoadedFlags::MAINDOCUMENT ) && !(pImpl->nLoadedFlags & SfxLoadedFlags::MAINDOCUMENT )
diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx
index a182cf8e8d60..db674673f126 100644
--- a/sw/inc/docsh.hxx
+++ b/sw/inc/docsh.hxx
@@ -273,7 +273,6 @@ public:
the load of document being finished. */
void LoadingFinished();
- virtual void SetFormatSpecificCompatibilityOptions( const OUString& rFilterTypeName ) override;
/// Cancel transfer (called from SFX).
virtual void CancelTransfers() override;
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 6183cac5fb94..df66b5db33f2 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -1841,6 +1841,8 @@ void SwWW8ImplReader::ImportDop()
// tdf#117923
m_rDoc.getIDocumentSettingAccess().set(
DocumentSettingId::APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING, true);
+ m_rDoc.getIDocumentSettingAccess().set(
+ DocumentSettingId::MS_WORD_COMP_TRAILING_BLANKS, true);
// Import Default Tabs
long nDefTabSiz = m_xWDop->dxaTab;
diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx
index d6d4dd480b64..e86630a86ece 100644
--- a/sw/source/uibase/app/docsh.cxx
+++ b/sw/source/uibase/app/docsh.cxx
@@ -1197,22 +1197,6 @@ void SwDocShell::LoadingFinished()
}
}
-void SwDocShell::SetFormatSpecificCompatibilityOptions( const OUString& rFilterTypeName )
-{
- //Enable MS Word-compatibility trailing blanks option for MS Word files
- if ( rFilterTypeName == "writer_MS_Word_95" ||
- rFilterTypeName == "writer_MS_Word_97" ||
- rFilterTypeName == "writer_MS_Word_2003_XML" ||
- rFilterTypeName == "writer_MS_Word_2007" ||
- rFilterTypeName == "writer_MS_Word_2007_Template" ||
- rFilterTypeName == "writer_OOXML" ||
- rFilterTypeName == "writer_OOXML_Text_Template" ||
- rFilterTypeName == "writer_Rich_Text_Format" )
- {
- GetDoc()->getIDocumentSettingAccess().set( DocumentSettingId::MS_WORD_COMP_TRAILING_BLANKS, true );
- }
-}
-
// a Transfer is cancelled (is called from SFX)
void SwDocShell::CancelTransfers()
{
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 12fa4f26090a..4b9c1d13aa88 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -124,6 +124,7 @@ DomainMapper::DomainMapper( const uno::Reference< uno::XComponentContext >& xCon
// Don't load the default style definitions to avoid weird mix
m_pImpl->SetDocumentSettingsProperty("StylesNoDefault", uno::makeAny(true));
+ m_pImpl->SetDocumentSettingsProperty("MsWordCompTrailingBlanks", uno::makeAny(true));
// Initialize RDF metadata, to be able to add statements during the import.
try
More information about the Libreoffice-commits
mailing list