From 8efd33127aff8d62bc2612ddc4bf97c1ef373338 Mon Sep 17 00:00:00 2001 From: Jan Holesovsky Date: Mon, 18 Sep 2017 13:17:39 +0200 Subject: Word 2013 and 2016 does not honor the setting, let's ignore it too. In other words, let's open documents in the non-web view even when saved with . 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 Reviewed-by: Jan Holesovsky Reviewed-on: https://gerrit.libreoffice.org/42412 Reviewed-by: Miklos Vajna Tested-by: Miklos Vajna --- sw/qa/extras/ooxmlexport/ooxmlexport9.cxx | 7 +++++-- writerfilter/source/dmapper/DomainMapper_Impl.cxx | 4 ---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx index 55f74de73635..313a8e3d4e3c 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx @@ -322,8 +322,11 @@ DECLARE_OOXMLEXPORT_TEST(testTdf99074, "tdf99074.docx") xModel->getCurrentController(), uno::UNO_QUERY); uno::Reference const xViewSettings( xController->getViewSettings()); - // This was false, Web Layout was ignored on import. - CPPUNIT_ASSERT(getProperty(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 too. + CPPUNIT_ASSERT(!getProperty(xViewSettings, "ShowOnlineLayout")); } DECLARE_OOXMLEXPORT_TEST(testTdf107104, "tdf107104.docx") diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 25751c12be4e..3e555e650d7f 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -5118,10 +5118,6 @@ void DomainMapper_Impl::ApplySettingsTable() aViewProps.push_back(beans::PropertyValue("VisibleBottom", -1, uno::makeAny(sal_Int32(0)), beans::PropertyState_DIRECT_VALUE)); aViewProps.push_back(beans::PropertyValue("ZoomType", -1, uno::makeAny(sal_Int16(0)), beans::PropertyState_DIRECT_VALUE)); } - if (m_pSettingsTable->GetView()) - { - aViewProps.push_back(beans::PropertyValue("ShowOnlineLayout", -1, uno::makeAny(m_pSettingsTable->GetView() == NS_ooxml::LN_Value_doc_ST_View_web), beans::PropertyState_DIRECT_VALUE)); - } uno::Reference xBox = document::IndexedPropertyValues::create(m_xComponentContext); xBox->insertByIndex(sal_Int32(0), uno::makeAny(comphelper::containerToSequence(aViewProps))); uno::Reference xIndexAccess(xBox, uno::UNO_QUERY); -- cgit