[Libreoffice-commits] core.git: sw/qa writerfilter/source
Jan Holesovsky
kendy at collabora.com
Tue Sep 19 08:26:41 UTC 2017
sw/qa/extras/ooxmlexport/ooxmlexport9.cxx | 7 +++++--
writerfilter/source/dmapper/DomainMapper_Impl.cxx | 4 ----
2 files changed, 5 insertions(+), 6 deletions(-)
New commits:
commit ffb4d7b16b386ba13f27722cd78406d5b5c5baca
Author: Jan Holesovsky <kendy at collabora.com>
Date: Mon Sep 18 13:17:39 2017 +0200
Word 2013 and 2016 does not honor the <w:view> setting, let's ignore it too.
In other words, let's open documents in the non-web view even when saved with
<w:view w:val="web"/>.
The behavior I see in Word 2013 (and it's documented that his happens in 2016
too) is that the setting is not a document setting any more, but user's
setting. Ie. regardless of what is written in the file, the .docx document
opens in the Print Layout if the Word was in the Print Layout until now, and
in the Web Layout if it was that mode.
We handle the non-web layout much better than the web layout, so let's just
default to the normal layout on load.
Change-Id: Ieba7ddc280b9b79501a6b89ff21b03a86356583c
Reviewed-on: https://gerrit.libreoffice.org/42414
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
index 24016d38c43c..99edeb2b8dcd 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
@@ -735,8 +735,11 @@ DECLARE_OOXMLEXPORT_TEST(testTdf99074, "tdf99074.docx")
xModel->getCurrentController(), uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> const xViewSettings(
xController->getViewSettings());
- // This was false, Web Layout was ignored on import.
- CPPUNIT_ASSERT(getProperty<bool>(xViewSettings, "ShowOnlineLayout"));
+
+ // The behavior changed - Word 2013 and 2016 ignore this setting on
+ // import, and instead honor the user's setting.
+ // Let's ignore the <w:view w:val="web"/> too.
+ CPPUNIT_ASSERT(!getProperty<bool>(xViewSettings, "ShowOnlineLayout"));
}
DECLARE_OOXMLEXPORT_TEST(testDefaultSectBreakCols, "default-sect-break-cols.docx")
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 86bc36629fa7..3f07f324a461 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -5231,10 +5231,6 @@ void DomainMapper_Impl::ApplySettingsTable()
aViewProps.emplace_back("VisibleBottom", -1, uno::makeAny(sal_Int32(0)), beans::PropertyState_DIRECT_VALUE);
aViewProps.emplace_back("ZoomType", -1, uno::makeAny(sal_Int16(0)), beans::PropertyState_DIRECT_VALUE);
}
- if (m_pSettingsTable->GetView())
- {
- aViewProps.emplace_back("ShowOnlineLayout", -1, uno::makeAny(m_pSettingsTable->GetView() == NS_ooxml::LN_Value_doc_ST_View_web), beans::PropertyState_DIRECT_VALUE);
- }
uno::Reference<container::XIndexContainer> xBox = document::IndexedPropertyValues::create(m_xComponentContext);
xBox->insertByIndex(sal_Int32(0), uno::makeAny(comphelper::containerToSequence(aViewProps)));
uno::Reference<container::XIndexAccess> xIndexAccess(xBox, uno::UNO_QUERY);
More information about the Libreoffice-commits
mailing list