[Libreoffice-commits] core.git: sw/qa
Varun Dhall
varun.dhall at studentpartner.com
Fri Nov 13 09:47:55 PST 2015
sw/qa/extras/uiwriter/uiwriter.cxx | 13 +++++++++++++
1 file changed, 13 insertions(+)
New commits:
commit dc3959ce844c78470fededfe94449775049facfc
Author: Varun Dhall <varun.dhall at studentpartner.com>
Date: Tue Nov 10 14:05:24 2015 +0530
Added Test for checking new Writer document modified state
Change-Id: I2dfc80c05a982038bf374eae975fac8294bf4dc8
Reviewed-on: https://gerrit.libreoffice.org/19879
Reviewed-by: Michael Stahl <mstahl at redhat.com>
Tested-by: Jenkins <ci at libreoffice.org>
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index 0560a14..825c804 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();
More information about the Libreoffice-commits
mailing list