Lines Matching refs:i_undoManager

650 …private void impl_testSingleModification( final XUndoManager i_undoManager ) throws com.sun.star.u…  in impl_testSingleModification()  argument
657 i_undoManager.undo(); in impl_testSingleModification()
666 i_undoManager.redo(); in impl_testSingleModification()
679 …private void impl_testMultipleModifications( final XUndoManager i_undoManager ) throws com.sun.sta… in impl_testMultipleModifications() argument
683 i_undoManager.enterUndoContext( "Batch Changes" ); in impl_testMultipleModifications()
695 i_undoManager.leaveUndoContext(); in impl_testMultipleModifications()
701 i_undoManager.undo(); in impl_testMultipleModifications()
707 …private void impl_testCustomUndoActions( final XUndoManager i_undoManager ) throws com.sun.star.un… in impl_testCustomUndoActions() argument
709 i_undoManager.clear(); in impl_testCustomUndoActions()
711 …assertFalse( "undo stack not empty after clearing the undo manager", i_undoManager.isUndoPossible(… in impl_testCustomUndoActions()
712 …assertFalse( "redo stack not empty after clearing the undo manager", i_undoManager.isRedoPossible(… in impl_testCustomUndoActions()
714 new String[0], i_undoManager.getAllUndoActionTitles() ); in impl_testCustomUndoActions()
716 new String[0], i_undoManager.getAllRedoActionTitles() ); in impl_testCustomUndoActions()
720 i_undoManager.addUndoAction( action1 ); in impl_testCustomUndoActions()
725 i_undoManager.enterUndoContext( contextTitle ); in impl_testCustomUndoActions()
727 i_undoManager.addUndoAction( action2 ); in impl_testCustomUndoActions()
732 i_undoManager.leaveUndoContext(); in impl_testCustomUndoActions()
736 new String[0], i_undoManager.getAllRedoActionTitles() ); in impl_testCustomUndoActions()
738 … new String[]{contextTitle, action1.getTitle()}, i_undoManager.getAllUndoActionTitles() ); in impl_testCustomUndoActions()
741 i_undoManager.undo(); in impl_testCustomUndoActions()
747 new String[]{contextTitle}, i_undoManager.getAllRedoActionTitles() ); in impl_testCustomUndoActions()
749 new String[]{action1.getTitle()}, i_undoManager.getAllUndoActionTitles() ); in impl_testCustomUndoActions()
756 … new String[]{action1.getTitle(), contextTitle}, i_undoManager.getAllRedoActionTitles() ); in impl_testCustomUndoActions()
758 new String[0], i_undoManager.getAllUndoActionTitles() ); in impl_testCustomUndoActions()
761 i_undoManager.clear(); in impl_testCustomUndoActions()
766 …private void impl_testLocking( final XUndoManager i_undoManager ) throws com.sun.star.uno.Exception in impl_testLocking() argument
768 i_undoManager.reset(); in impl_testLocking()
772 assertFalse( "unexpected initial locking state", i_undoManager.isLocked() ); in impl_testLocking()
773 i_undoManager.lock(); in impl_testLocking()
774 assertTrue( "just locked the manager, why does it lie?", i_undoManager.isLocked() ); in impl_testLocking()
778 i_undoManager.unlock(); in impl_testLocking()
781 assertFalse( "just unlocked the manager, why does it lie?", i_undoManager.isLocked() ); in impl_testLocking()
784 i_undoManager.lock(); in impl_testLocking()
785 i_undoManager.addUndoAction( new CustomUndoAction() ); in impl_testLocking()
786 i_undoManager.unlock(); in impl_testLocking()
791 i_undoManager.lock(); in impl_testLocking()
792 i_undoManager.enterUndoContext( "Dummy Context" ); in impl_testLocking()
793 i_undoManager.enterHiddenUndoContext(); in impl_testLocking()
795 i_undoManager.leaveUndoContext(); in impl_testLocking()
796 i_undoManager.leaveUndoContext(); in impl_testLocking()
797 i_undoManager.unlock(); in impl_testLocking()
800 …( "internal error: manager should not be locked at this point in time", i_undoManager.isLocked() ); in impl_testLocking()
802 … try { i_undoManager.unlock(); } catch ( final NotLockedException e ) { caughtExpected = true; } in impl_testLocking()
807 …private void impl_testContextHandling( final XUndoManager i_undoManager ) throws com.sun.star.uno.… in impl_testContextHandling() argument
811 i_undoManager.reset(); in impl_testContextHandling()
816 i_undoManager.addUndoAction( undoAction1 ); in impl_testContextHandling()
818 i_undoManager.addUndoAction( undoAction2 ); in impl_testContextHandling()
819 i_undoManager.undo(); in impl_testContextHandling()
820 …assertTrue( "precondition for context handling tests not met (1)", i_undoManager.isUndoPossible() … in impl_testContextHandling()
821 …assertTrue( "precondition for context handling tests not met (2)", i_undoManager.isRedoPossible() … in impl_testContextHandling()
822 …assertArrayEquals( new String[] { undoAction1.getTitle() }, i_undoManager.getAllUndoActionTitles()… in impl_testContextHandling()
823 …assertArrayEquals( new String[] { undoAction2.getTitle() }, i_undoManager.getAllRedoActionTitles()… in impl_testContextHandling()
826 assertArrayEquals( expectedRedoActionComments, i_undoManager.getAllRedoActionTitles() ); in impl_testContextHandling()
829 i_undoManager.enterUndoContext( "Undo Context" ); in impl_testContextHandling()
831 assertArrayEquals( expectedRedoActionComments, i_undoManager.getAllRedoActionTitles() ); in impl_testContextHandling()
835 i_undoManager.addUndoAction( undoAction3 ); in impl_testContextHandling()
837 assertArrayEquals( expectedRedoActionComments, i_undoManager.getAllRedoActionTitles() ); in impl_testContextHandling()
840 assertEquals( "Undo Context", i_undoManager.getCurrentUndoActionTitle() ); in impl_testContextHandling()
844 i_undoManager.getAllUndoActionTitles() ); in impl_testContextHandling()
846 assertFalse( i_undoManager.isUndoPossible() ); in impl_testContextHandling()
847 assertFalse( i_undoManager.isRedoPossible() ); in impl_testContextHandling()
850 i_undoManager.leaveUndoContext(); in impl_testContextHandling()
856 assertArrayEquals( new String[0], i_undoManager.getAllRedoActionTitles() ); in impl_testContextHandling()
861 i_undoManager.reset(); in impl_testContextHandling()
865 i_undoManager.enterUndoContext( "Undo Context" ); in impl_testContextHandling()
866 i_undoManager.leaveUndoContext(); in impl_testContextHandling()
871 i_undoManager.isUndoPossible() ); in impl_testContextHandling()
875 …private void impl_testNestedContexts( final XUndoManager i_undoManager ) throws com.sun.star.uno.E… in impl_testNestedContexts() argument
877 i_undoManager.reset(); in impl_testNestedContexts()
879 i_undoManager.enterUndoContext( "context 1" ); in impl_testNestedContexts()
880 i_undoManager.enterUndoContext( "context 1.1" ); in impl_testNestedContexts()
882 i_undoManager.addUndoAction( action1 ); in impl_testNestedContexts()
883 i_undoManager.enterUndoContext( "context 1.1.2" ); in impl_testNestedContexts()
885 i_undoManager.addUndoAction( action2 ); in impl_testNestedContexts()
886 i_undoManager.leaveUndoContext(); in impl_testNestedContexts()
888 i_undoManager.addUndoAction( action3 ); in impl_testNestedContexts()
889 i_undoManager.leaveUndoContext(); in impl_testNestedContexts()
890 i_undoManager.leaveUndoContext(); in impl_testNestedContexts()
892 i_undoManager.addUndoAction( action4 ); in impl_testNestedContexts()
894 i_undoManager.undo(); in impl_testNestedContexts()
898 i_undoManager.undo(); in impl_testNestedContexts()
903 …private void impl_testErrorHandling( final XUndoManager i_undoManager ) throws com.sun.star.uno.Ex… in impl_testErrorHandling() argument
905 i_undoManager.reset(); in impl_testErrorHandling()
910 try { i_undoManager.getCurrentUndoActionTitle(); } in impl_testErrorHandling()
915 try { i_undoManager.getCurrentRedoActionTitle(); } in impl_testErrorHandling()
920 … try { i_undoManager.undo(); } catch ( final EmptyUndoStackException e ) { caughtExpected = true; } in impl_testErrorHandling()
924 … try { i_undoManager.redo(); } catch ( final EmptyUndoStackException e ) { caughtExpected = true; } in impl_testErrorHandling()
928 …try { i_undoManager.leaveUndoContext(); } catch ( final InvalidStateException e ) { caughtExpected… in impl_testErrorHandling()
932 …try { i_undoManager.addUndoAction( null ); } catch ( com.sun.star.lang.IllegalArgumentException e … in impl_testErrorHandling()
935 i_undoManager.reset(); in impl_testErrorHandling()
936 i_undoManager.addUndoAction( new CustomUndoAction() ); in impl_testErrorHandling()
937 i_undoManager.addUndoAction( new CustomUndoAction() ); in impl_testErrorHandling()
938 i_undoManager.undo(); in impl_testErrorHandling()
939 i_undoManager.enterUndoContext( "Undo Context" ); in impl_testErrorHandling()
947 Method method = i_undoManager.getClass().getMethod( methodNames[i], new Class[0] ); in impl_testErrorHandling()
948 method.invoke( i_undoManager, new Object[0] ); in impl_testErrorHandling()
962 i_undoManager.leaveUndoContext(); in impl_testErrorHandling()
970 i_undoManager.reset(); in impl_testErrorHandling()
971 i_undoManager.addUndoAction( new CustomUndoAction() ); in impl_testErrorHandling()
972 i_undoManager.addUndoAction( new FailingUndoAction( undo ? FAIL_UNDO : FAIL_REDO ) ); in impl_testErrorHandling()
973 i_undoManager.addUndoAction( new CustomUndoAction() ); in impl_testErrorHandling()
974 i_undoManager.undo(); in impl_testErrorHandling()
976 i_undoManager.undo(); in impl_testErrorHandling()
978 assertTrue( i_undoManager.isUndoPossible() ); in impl_testErrorHandling()
979 assertTrue( i_undoManager.isRedoPossible() ); in impl_testErrorHandling()
986 i_undoManager.undo(); in impl_testErrorHandling()
991 i_undoManager.redo(); in impl_testErrorHandling()
1005 … assertFalse( "a failing Undo should clear the Undo stack", i_undoManager.isUndoPossible() ); in impl_testErrorHandling()
1006 … assertTrue( "a failing Undo should /not/ clear the Redo stack", i_undoManager.isRedoPossible() ); in impl_testErrorHandling()
1010 … assertTrue( "a failing Redo should /not/ clear the Undo stack", i_undoManager.isUndoPossible() ); in impl_testErrorHandling()
1011 … assertFalse( "a failing Redo should clear the Redo stack", i_undoManager.isRedoPossible() ); in impl_testErrorHandling()
1017 …private void impl_testStackHandling( final XUndoManager i_undoManager ) throws com.sun.star.uno.Ex… in impl_testStackHandling() argument
1019 i_undoManager.reset(); in impl_testStackHandling()
1022 assertFalse( i_undoManager.isUndoPossible() ); in impl_testStackHandling()
1023 assertFalse( i_undoManager.isRedoPossible() ); in impl_testStackHandling()
1025 i_undoManager.addUndoAction( new CustomUndoAction() ); in impl_testStackHandling()
1026 assertTrue( i_undoManager.isUndoPossible() ); in impl_testStackHandling()
1027 assertFalse( i_undoManager.isRedoPossible() ); in impl_testStackHandling()
1028 i_undoManager.addUndoAction( new CustomUndoAction() ); in impl_testStackHandling()
1029 assertTrue( i_undoManager.isUndoPossible() ); in impl_testStackHandling()
1030 assertFalse( i_undoManager.isRedoPossible() ); in impl_testStackHandling()
1031 i_undoManager.undo(); in impl_testStackHandling()
1032 assertTrue( i_undoManager.isUndoPossible() ); in impl_testStackHandling()
1033 assertTrue( i_undoManager.isRedoPossible() ); in impl_testStackHandling()
1034 i_undoManager.undo(); in impl_testStackHandling()
1035 assertFalse( i_undoManager.isUndoPossible() ); in impl_testStackHandling()
1036 assertTrue( i_undoManager.isRedoPossible() ); in impl_testStackHandling()
1037 i_undoManager.addUndoAction( new CustomUndoAction() ); in impl_testStackHandling()
1038 assertTrue( i_undoManager.isUndoPossible() ); in impl_testStackHandling()
1039 …assertFalse( "adding a new action should have cleared the Redo stack", i_undoManager.isRedoPossibl… in impl_testStackHandling()
1043 …private void impl_testClearance( final XUndoManager i_undoManager ) throws com.sun.star.uno.Except… in impl_testClearance() argument
1045 i_undoManager.reset(); in impl_testClearance()
1049 i_undoManager.addUndoAction( new CustomUndoAction() ); in impl_testClearance()
1052 i_undoManager.clear(); in impl_testClearance()
1058 assertFalse( i_undoManager.isUndoPossible() ); in impl_testClearance()
1059 i_undoManager.clear(); in impl_testClearance()
1064 i_undoManager.clearRedo(); in impl_testClearance()
1070 i_undoManager.addUndoAction( new CustomUndoAction() ); in impl_testClearance()
1071 i_undoManager.addUndoAction( new CustomUndoAction() ); in impl_testClearance()
1072 i_undoManager.undo(); in impl_testClearance()
1073 assertTrue( i_undoManager.isUndoPossible() ); in impl_testClearance()
1074 assertTrue( i_undoManager.isRedoPossible() ); in impl_testClearance()
1075 i_undoManager.addUndoAction( new CustomUndoAction() ); in impl_testClearance()
1076 assertFalse( i_undoManager.isRedoPossible() ); in impl_testClearance()
1081 i_undoManager.addUndoAction( new CustomUndoAction() ); in impl_testClearance()
1082 i_undoManager.addUndoAction( new CustomUndoAction() ); in impl_testClearance()
1083 i_undoManager.undo(); in impl_testClearance()
1084 assertTrue( i_undoManager.isUndoPossible() ); in impl_testClearance()
1085 assertTrue( i_undoManager.isRedoPossible() ); in impl_testClearance()
1086 i_undoManager.reset(); in impl_testClearance()
1087 assertFalse( i_undoManager.isUndoPossible() ); in impl_testClearance()
1088 assertFalse( i_undoManager.isRedoPossible() ); in impl_testClearance()
1093 i_undoManager.addUndoAction( new CustomUndoAction() ); in impl_testClearance()
1094 i_undoManager.enterUndoContext( "Undo Context" ); in impl_testClearance()
1095 i_undoManager.addUndoAction( new CustomUndoAction() ); in impl_testClearance()
1096 i_undoManager.enterHiddenUndoContext(); in impl_testClearance()
1097 i_undoManager.reset(); in impl_testClearance()
1100 i_undoManager.enterUndoContext( "Undo Context" ); in impl_testClearance()
1105 …private void impl_testHiddenContexts( final XUndoManager i_undoManager ) throws com.sun.star.uno.E… in impl_testHiddenContexts() argument
1107 i_undoManager.reset(); in impl_testHiddenContexts()
1109 …assertFalse( "precondition for testing hidden undo contexts not met", i_undoManager.isUndoPossible… in impl_testHiddenContexts()
1113 try { i_undoManager.enterHiddenUndoContext(); } in impl_testHiddenContexts()
1119 i_undoManager.addUndoAction( undoAction0 ); in impl_testHiddenContexts()
1121 i_undoManager.addUndoAction( undoAction1 ); in impl_testHiddenContexts()
1122 i_undoManager.enterHiddenUndoContext(); in impl_testHiddenContexts()
1124 i_undoManager.addUndoAction( hiddenUndoAction ); in impl_testHiddenContexts()
1125 i_undoManager.leaveUndoContext(); in impl_testHiddenContexts()
1132 i_undoManager.getAllUndoActionTitles() ); in impl_testHiddenContexts()
1136 i_undoManager.undo(); in impl_testHiddenContexts()
1146 i_undoManager.enterHiddenUndoContext(); in impl_testHiddenContexts()
1147 i_undoManager.leaveUndoContext(); in impl_testHiddenContexts()
1154 i_undoManager.reset(); in impl_testHiddenContexts()
1156 i_undoManager.addUndoAction( action0 ); in impl_testHiddenContexts()
1157 i_undoManager.enterUndoContext( "context 1" ); in impl_testHiddenContexts()
1159 i_undoManager.addUndoAction( action1 ); in impl_testHiddenContexts()
1160 i_undoManager.enterHiddenUndoContext(); in impl_testHiddenContexts()
1162 i_undoManager.addUndoAction( action2 ); in impl_testHiddenContexts()
1163 i_undoManager.enterUndoContext( "context 2" ); in impl_testHiddenContexts()
1166 try { i_undoManager.enterHiddenUndoContext(); } in impl_testHiddenContexts()
1170 i_undoManager.addUndoAction( action3 ); in impl_testHiddenContexts()
1171 i_undoManager.enterHiddenUndoContext(); in impl_testHiddenContexts()
1173 i_undoManager.leaveUndoContext(); in impl_testHiddenContexts()
1177 i_undoManager.leaveUndoContext(); in impl_testHiddenContexts()
1178 i_undoManager.leaveUndoContext(); in impl_testHiddenContexts()
1179 i_undoManager.leaveUndoContext(); in impl_testHiddenContexts()
1180 i_undoManager.undo(); in impl_testHiddenContexts()