diff options
author | Kurt Zenker <kz@openoffice.org> | 2011-04-14 15:29:52 +0200 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2011-04-14 15:29:52 +0200 |
commit | 95b24c7e1f6ec1e63f548d78d82ddebe91934b9a (patch) | |
tree | b6bc19d8f0d66c03b60aa3f241affa53c0ff6d7b | |
parent | 1f7acb2d22553013c10f79d53c17fed5196c2b1e (diff) | |
parent | 526cd6b80442bc055139b6e0b516c52d4031f438 (diff) |
CWS-TOOLING: integrate CWS fs34b_OOO340
-rw-r--r-- | svl/inc/svl/undo.hxx | 11 | ||||
-rw-r--r-- | svl/source/undo/undo.cxx | 17 | ||||
-rwxr-xr-x | toolkit/JunitTest_toolkit_complex.mk | 56 | ||||
-rw-r--r-- | toolkit/Module_toolkit.mk | 1 | ||||
-rw-r--r-- | toolkit/prj/build.lst | 1 | ||||
-rwxr-xr-x | toolkit/qa/complex/toolkit/makefile.mk | 97 | ||||
-rw-r--r-- | toolkit/qa/unoapi/makefile.mk | 48 |
7 files changed, 71 insertions, 160 deletions
diff --git a/svl/inc/svl/undo.hxx b/svl/inc/svl/undo.hxx index 57a26c3109ec..6cebbbb4bbb2 100644 --- a/svl/inc/svl/undo.hxx +++ b/svl/inc/svl/undo.hxx @@ -311,9 +311,14 @@ namespace svl /** clears the redo stack and removes the top undo action */ virtual void RemoveLastUndoAction() = 0; - // enables (true) or disables (false) recording of undo actions - // If undo actions are added while undo is disabled, they are deleted. - // Disabling undo does not clear the current undo buffer! + /** enables (true) or disables (false) recording of undo actions + + If undo actions are added while undo is disabled, they are deleted. + Disabling undo does not clear the current undo buffer! + + Multiple calls to <code>EnableUndo</code> are not cumulative. That is, calling <code>EnableUndo( false )</code> + twice, and then calling <code>EnableUndo( true )</code> means that Undo is enable afterwards. + */ virtual void EnableUndo( bool bEnable ) = 0; // returns true if undo is currently enabled diff --git a/svl/source/undo/undo.cxx b/svl/source/undo/undo.cxx index fae0250e9002..5e1e49f397b2 100644 --- a/svl/source/undo/undo.cxx +++ b/svl/source/undo/undo.cxx @@ -186,9 +186,9 @@ struct SVL_DLLPRIVATE SfxUndoManager_Data SfxUndoArray* pActUndoArray; SfxUndoArray* pFatherUndoArray; - sal_Int32 mnLockCount; sal_Int32 mnMarks; sal_Int32 mnEmptyMark; + bool mbUndoEnabled; bool mbDoing; bool mbClearUntilTopLevel; @@ -198,9 +198,9 @@ struct SVL_DLLPRIVATE SfxUndoManager_Data :pUndoArray( new SfxUndoArray( i_nMaxUndoActionCount ) ) ,pActUndoArray( NULL ) ,pFatherUndoArray( NULL ) - ,mnLockCount( 0 ) ,mnMarks( 0 ) ,mnEmptyMark(MARK_INVALID) + ,mbUndoEnabled( true ) ,mbDoing( false ) ,mbClearUntilTopLevel( false ) { @@ -421,14 +421,9 @@ void SfxUndoManager::EnableUndo( bool i_enable ) void SfxUndoManager::ImplEnableUndo_Lock( bool const i_enable ) { - if ( !i_enable ) - ++m_pData->mnLockCount; - else - { - OSL_PRECOND( m_pData->mnLockCount > 0, "SfxUndoManager::ImplEnableUndo_NoNotify: not disabled, so why enabling?" ); - if ( m_pData->mnLockCount > 0 ) - --m_pData->mnLockCount; - } + if ( m_pData->mbUndoEnabled == i_enable ) + return; + m_pData->mbUndoEnabled = i_enable; } //------------------------------------------------------------------------ @@ -443,7 +438,7 @@ bool SfxUndoManager::IsUndoEnabled() const bool SfxUndoManager::ImplIsUndoEnabled_Lock() const { - return m_pData->mnLockCount == 0; + return m_pData->mbUndoEnabled; } //------------------------------------------------------------------------ diff --git a/toolkit/JunitTest_toolkit_complex.mk b/toolkit/JunitTest_toolkit_complex.mk new file mode 100755 index 000000000000..77bf7544afc1 --- /dev/null +++ b/toolkit/JunitTest_toolkit_complex.mk @@ -0,0 +1,56 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2011 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_JunitTest_JunitTest,toolkit_complex)) + +$(eval $(call gb_JunitTest_add_jars,toolkit_complex,\ + $(OUTDIR)/bin/OOoRunner.jar \ + $(OUTDIR)/bin/ridl.jar \ + $(OUTDIR)/bin/test.jar \ + $(OUTDIR)/bin/unoil.jar \ +)) + +$(eval $(call gb_JunitTest_add_sourcefiles,toolkit_complex,\ + toolkit/qa/complex/toolkit/accessibility/_XAccessibleComponent \ + toolkit/qa/complex/toolkit/accessibility/_XAccessibleContext \ + toolkit/qa/complex/toolkit/accessibility/_XAccessibleEventBroadcaster \ + toolkit/qa/complex/toolkit/accessibility/_XAccessibleExtendedComponent \ + toolkit/qa/complex/toolkit/accessibility/_XAccessibleText \ + toolkit/qa/complex/toolkit/Assert \ + toolkit/qa/complex/toolkit/awtgrid/GridDataListener \ + toolkit/qa/complex/toolkit/awtgrid/TMutableGridDataModel \ + toolkit/qa/complex/toolkit/awtgrid/DummyColumn \ + toolkit/qa/complex/toolkit/GridControl \ + toolkit/qa/complex/toolkit/UnitConversion \ +)) + +$(eval $(call gb_JunitTest_add_classes,toolkit_complex,\ + complex.toolkit.GridControl \ + complex.toolkit.UnitConversion \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/toolkit/Module_toolkit.mk b/toolkit/Module_toolkit.mk index 858aecd1c13d..beb7dbc4971f 100644 --- a/toolkit/Module_toolkit.mk +++ b/toolkit/Module_toolkit.mk @@ -36,6 +36,7 @@ $(eval $(call gb_Module_add_targets,toolkit,\ )) $(eval $(call gb_Module_add_subsequentcheck_targets,toolkit,\ + JunitTest_toolkit_complex \ JunitTest_toolkit_unoapi \ )) diff --git a/toolkit/prj/build.lst b/toolkit/prj/build.lst index e11d32c435bf..a0ddbffd8718 100644 --- a/toolkit/prj/build.lst +++ b/toolkit/prj/build.lst @@ -1,3 +1,2 @@ ti toolkit : LIBXSLT:libxslt vcl qadevOOo test NULL ti toolkit\prj nmake - all ti_prj NULL -ti toolkit\qa\complex\toolkit nmake - all ti_complex_toolkit NULL diff --git a/toolkit/qa/complex/toolkit/makefile.mk b/toolkit/qa/complex/toolkit/makefile.mk deleted file mode 100755 index ecb173f9bdac..000000000000 --- a/toolkit/qa/complex/toolkit/makefile.mk +++ /dev/null @@ -1,97 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -.IF "$(OOO_JUNIT_JAR)" == "" -nothing .PHONY: - @echo ----------------------------------------------------- - @echo - JUnit not available, not building anything - @echo ----------------------------------------------------- -.ELSE # IF "$(OOO_JUNIT_JAR)" != "" - -PRJ = ../../.. -PRJNAME = toolkit -TARGET = qa_complex_toolkit -PACKAGE = complex/toolkit - -# --- Settings ----------------------------------------------------- -.INCLUDE: settings.mk - -#----- compile .java files ----------------------------------------- - -JARFILES = OOoRunnerLight.jar ridl.jar test.jar unoil.jar -EXTRAJARFILES = $(OOO_JUNIT_JAR) - -JAVAFILES = \ - $(JAVATESTFILES) \ - accessibility/_XAccessibleComponent.java \ - accessibility/_XAccessibleContext.java \ - accessibility/_XAccessibleEventBroadcaster.java \ - accessibility/_XAccessibleExtendedComponent.java \ - accessibility/_XAccessibleText.java \ - Assert.java \ - awtgrid/GridDataListener.java \ - awtgrid/TMutableGridDataModel.java \ - awtgrid/DummyColumn.java \ - -#----- create a jar from compiled files ---------------------------- - -JARTARGET = $(TARGET).jar - -#----- JUnit tests class ------------------------------------------- - -JAVATESTFILES = \ - GridControl.java \ - UnitConversion.java \ - - -# disabled for now - the tests fail on at least one platform -# no issue, yet (not sure this is worth it. Don't know who to give the issue to, and don't know whether the test really makes sense) -DISABLED_JAVA_TEST_FILES=\ - AccessibleStatusBar.java\ - AccessibleStatusBarItem.java - - -# --- Targets ------------------------------------------------------ - -.INCLUDE: target.mk - -ALL : ALLTAR - -# --- subsequent tests --------------------------------------------- - -.IF "$(OOO_SUBSEQUENT_TESTS)" != "" - -.INCLUDE: installationtest.mk - -ALLTAR : javatest - - # Sample how to debug - # JAVAIFLAGS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=9003,suspend=y - -.END # "$(OOO_SUBSEQUENT_TESTS)" == "" - -.END # ELSE "$(OOO_JUNIT_JAR)" != "" diff --git a/toolkit/qa/unoapi/makefile.mk b/toolkit/qa/unoapi/makefile.mk deleted file mode 100644 index 9517601c3917..000000000000 --- a/toolkit/qa/unoapi/makefile.mk +++ /dev/null @@ -1,48 +0,0 @@ -#************************************************************************* -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -#***********************************************************************/ - -.IF "$(OOO_SUBSEQUENT_TESTS)" == "" -nothing .PHONY: -.ELSE - -PRJ = ../.. -PRJNAME = toolkit -TARGET = qa_unoapi - -.IF "$(OOO_JUNIT_JAR)" != "" -PACKAGE = org/openoffice/toolkit/qa/unoapi -JAVATESTFILES = Test.java -JAVAFILES = $(JAVATESTFILES) -JARFILES = OOoRunner.jar ridl.jar test.jar -EXTRAJARFILES = $(OOO_JUNIT_JAR) -.END - -.INCLUDE: settings.mk -.INCLUDE: target.mk -.INCLUDE: installationtest.mk - -ALLTAR : javatest - -.END |