diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2017-11-07 13:33:48 +0300 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-11-07 14:26:11 +0100 |
commit | f657454b69c813b90a8b3c1adb2feef1066dbd35 (patch) | |
tree | d1c57e8dc220ae1a5e7d1a2b49025685042318f3 | |
parent | 55d00081d0dc4cfa3361fa9da9389042f98773b5 (diff) |
tdf#31231: properly check for SvXMLImportFlags::ALL
A regression from commit dc28e90d200a839d4017d548217ee5ce8a23f84
Change-Id: I8982522d16d8335b1bb3522076030a023c0c297f
Reviewed-on: https://gerrit.libreoffice.org/44396
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | sc/qa/unit/bugfix-test.cxx | 15 | ||||
-rw-r--r-- | sc/qa/unit/data/ods/tdf31231.ods | bin | 0 -> 12599 bytes | |||
-rw-r--r-- | sc/source/filter/xml/XMLTableShapeResizer.cxx | 2 |
3 files changed, 16 insertions, 1 deletions
diff --git a/sc/qa/unit/bugfix-test.cxx b/sc/qa/unit/bugfix-test.cxx index f776bbf5f8cb..94fa2d188189 100644 --- a/sc/qa/unit/bugfix-test.cxx +++ b/sc/qa/unit/bugfix-test.cxx @@ -10,6 +10,7 @@ #include <validat.hxx> #include <tabvwsh.hxx> #include <com/sun/star/frame/Desktop.hpp> +#include <vcl/scheduler.hxx> #include "helper/qahelper.hxx" using namespace ::com::sun::star; @@ -36,6 +37,7 @@ public: void testTdf103960(); void testRhbz1390776(); void testTdf104310(); + void testTdf31231(); CPPUNIT_TEST_SUITE(ScFiltersTest); CPPUNIT_TEST(testTdf64229); @@ -50,6 +52,7 @@ public: CPPUNIT_TEST(testTdf103960); CPPUNIT_TEST(testRhbz1390776); CPPUNIT_TEST(testTdf104310); + CPPUNIT_TEST(testTdf31231); CPPUNIT_TEST_SUITE_END(); private: uno::Reference<uno::XInterface> m_xCalcComponent; @@ -282,6 +285,18 @@ void ScFiltersTest::testTdf104310() } } +void ScFiltersTest::testTdf31231() +{ + // We must open it read-write to allow setting modified flag + ScDocShellRef xDocSh = loadDoc("tdf31231.", FORMAT_ODS, true); + xDocSh->DoHardRecalc(); + + CPPUNIT_ASSERT_MESSAGE("The spreadsheet must be allowed to set modified state", xDocSh->IsEnableSetModified()); + CPPUNIT_ASSERT_MESSAGE("The spreadsheet must not be modified on open", !xDocSh->IsModified()); + + xDocSh->DoClose(); +} + ScFiltersTest::ScFiltersTest() : ScBootstrapFixture( "sc/qa/unit/data" ) { diff --git a/sc/qa/unit/data/ods/tdf31231.ods b/sc/qa/unit/data/ods/tdf31231.ods Binary files differnew file mode 100644 index 000000000000..2a9916aca0c3 --- /dev/null +++ b/sc/qa/unit/data/ods/tdf31231.ods diff --git a/sc/source/filter/xml/XMLTableShapeResizer.cxx b/sc/source/filter/xml/XMLTableShapeResizer.cxx index 659eba5fd64b..e71445f9a4d9 100644 --- a/sc/source/filter/xml/XMLTableShapeResizer.cxx +++ b/sc/source/filter/xml/XMLTableShapeResizer.cxx @@ -93,7 +93,7 @@ void ScMyOLEFixer::CreateChartListener(ScDocument* pDoc, //for loading binary files e.g. //if we have the flat filter we need to set the dirty flag thus the visible charts get repainted //otherwise the charts keep their first visual representation which was created at a moment where the calc itself was not loaded completely and is therefore incorrect - if( rImport.getImportFlags() & SvXMLImportFlags::ALL ) + if( (rImport.getImportFlags() & SvXMLImportFlags::ALL) == SvXMLImportFlags::ALL ) pCL->SetDirty( true ); else { |