summaryrefslogtreecommitdiff
path: root/sfx2/qa
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@oracle.com>2010-11-16 12:22:48 +0100
committerFrank Schoenheit [fs] <frank.schoenheit@oracle.com>2010-11-16 12:22:48 +0100
commitde807d3e80b3aab50395688741cac57a1f2e11c8 (patch)
tree399fbd712b027877a169e42bf03c806d85b972e1 /sfx2/qa
parentafe888269b8e5b3520d2017760cbbe237e96df32 (diff)
undoapi: derive XUndoManager from XChild, to allow convenient access to the document it belongs to
Diffstat (limited to 'sfx2/qa')
-rwxr-xr-xsfx2/qa/complex/sfx2/UndoManager.java16
1 files changed, 9 insertions, 7 deletions
diff --git a/sfx2/qa/complex/sfx2/UndoManager.java b/sfx2/qa/complex/sfx2/UndoManager.java
index 545e3d6fd6b6..90522fae029c 100755
--- a/sfx2/qa/complex/sfx2/UndoManager.java
+++ b/sfx2/qa/complex/sfx2/UndoManager.java
@@ -127,7 +127,7 @@ public class UndoManager
}
// -----------------------------------------------------------------------------------------------------------------
-// @Test
+ @Test
public void checkCalcUndo() throws Exception
{
m_currentTestCase = new CalcDocumentTest( getORB() );
@@ -135,7 +135,7 @@ public class UndoManager
}
// -----------------------------------------------------------------------------------------------------------------
-// @Test
+ @Test
public void checkDrawUndo() throws Exception
{
m_currentTestCase = new DrawDocumentTest( getORB() );
@@ -143,7 +143,7 @@ public class UndoManager
}
// -----------------------------------------------------------------------------------------------------------------
-// @Test
+ @Test
public void checkImpressUndo() throws Exception
{
m_currentTestCase = new ImpressDocumentTest( getORB() );
@@ -151,7 +151,7 @@ public class UndoManager
}
// -----------------------------------------------------------------------------------------------------------------
- @Test
+// @Test
public void checkChartUndo() throws Exception
{
m_currentTestCase = new ChartDocumentTest( getORB() );
@@ -159,7 +159,7 @@ public class UndoManager
}
// -----------------------------------------------------------------------------------------------------------------
-// @Test
+ @Test
public void checkBrokenScripts() throws com.sun.star.uno.Exception, InterruptedException
{
System.out.println( "testing: broken scripts" );
@@ -309,8 +309,10 @@ public class UndoManager
*/
private XUndoManager getUndoManager()
{
- XUndoManagerSupplier suppUndo = UnoRuntime.queryInterface( XUndoManagerSupplier.class, m_currentDocument.getDocument() );
- return suppUndo.getUndoManager();
+ final XUndoManagerSupplier suppUndo = UnoRuntime.queryInterface( XUndoManagerSupplier.class, m_currentDocument.getDocument() );
+ final XUndoManager undoManager = suppUndo.getUndoManager();
+ assertTrue( UnoRuntime.areSame( undoManager.getParent(), m_currentDocument.getDocument() ) );
+ return undoManager;
}
// -----------------------------------------------------------------------------------------------------------------