diff options
author | Varun Dhall <varun.dhall@studentpartner.com> | 2015-11-10 14:05:24 +0530 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-11-13 17:47:31 +0000 |
commit | dc3959ce844c78470fededfe94449775049facfc (patch) | |
tree | fa39ad2905ae872f36a15eb663eda03767c11096 /sw/qa/extras/uiwriter/uiwriter.cxx | |
parent | f115b0cf1b23baf18aa56866aa7f15d5a5991c37 (diff) |
Added Test for checking new Writer document modified state
Change-Id: I2dfc80c05a982038bf374eae975fac8294bf4dc8
Reviewed-on: https://gerrit.libreoffice.org/19879
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sw/qa/extras/uiwriter/uiwriter.cxx')
-rw-r--r-- | sw/qa/extras/uiwriter/uiwriter.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index 0560a1494b94..825c804e4b95 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -56,6 +56,7 @@ #include <ftnidx.hxx> #include <txtftn.hxx> #include <IDocumentFieldsAccess.hxx> +#include <IDocumentState.hxx> #include <unofldmid.h> #include "UndoManager.hxx" #include <textsh.hxx> @@ -141,6 +142,7 @@ public: void testUnoParagraph(); void testTdf60967(); void testSearchWithTransliterate(); + void testNewDocModifiedState(); void testTdf77342(); void testTdf74230(); void testTdf74363(); @@ -219,6 +221,7 @@ public: CPPUNIT_TEST(testUnoParagraph); CPPUNIT_TEST(testTdf60967); CPPUNIT_TEST(testSearchWithTransliterate); + CPPUNIT_TEST(testNewDocModifiedState); CPPUNIT_TEST(testTdf77342); CPPUNIT_TEST(testTdf74230); CPPUNIT_TEST(testTdf74363); @@ -1726,6 +1729,16 @@ void SwUiWriterTest::testSearchWithTransliterate() CPPUNIT_ASSERT_EQUAL(1,(int)case2); } +void SwUiWriterTest::testNewDocModifiedState() +{ + //creating a new doc + SwDoc* pDoc = new SwDoc(); + //getting the state of the document via IDocumentState + IDocumentState& rState(pDoc->getIDocumentState()); + //the state should not be modified, no modifications yet + CPPUNIT_ASSERT(!(rState.IsModified())); +} + void SwUiWriterTest::testTdf77342() { SwDoc* pDoc = createDoc(); |