diff options
author | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2011-01-25 09:21:17 +0100 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2011-01-25 09:21:17 +0100 |
commit | ea2edeee012d7d0cd9d07b7f988d83be0f946904 (patch) | |
tree | 54644f527268c8a4b0a9cd069cb114b73bd72c19 /toolkit | |
parent | 38cec087c0a584ad6cbf02ff4f4b3ca3d444e494 (diff) | |
parent | 3dc20e5afd346992dab451a7eeab921cb6e1aef1 (diff) |
gridsort: pulled CWS dba34b
Diffstat (limited to 'toolkit')
51 files changed, 2019 insertions, 1649 deletions
diff --git a/toolkit/inc/makefile.mk b/toolkit/AllLangResTarget_tk.mk index 41100071a4d8..571d5dfbff70 100644 --- a/toolkit/inc/makefile.mk +++ b/toolkit/AllLangResTarget_tk.mk @@ -2,7 +2,7 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2000, 2010 Oracle and/or its affiliates. +# Copyright 2009 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite # @@ -14,35 +14,32 @@ # # 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 +# 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 +# version 3 along with OpenOffice.org. If not, see # <http://www.openoffice.org/license.html> # for a copy of the LGPLv3 License. # #************************************************************************* -PRJ=.. -PRJNAME=toolkit -TARGET=inc +$(eval $(call gb_AllLangResTarget_AllLangResTarget,tk)) -# --- Settings ----------------------------------------------------- +$(eval $(call gb_AllLangResTarget_set_reslocation,tk,toolkit/source/awt)) -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk +$(eval $(call gb_AllLangResTarget_add_srs,tk,\ + toolkit/awt \ +)) -# --- Files -------------------------------------------------------- -# --- Targets ------------------------------------------------------- +$(eval $(call gb_SrsTarget_SrsTarget,toolkit/awt)) -.INCLUDE : target.mk - -.IF "$(ENABLE_PCH)"!="" -ALLTAR : \ - $(SLO)$/precompiled.pch \ - $(SLO)$/precompiled_ex.pch - -.ENDIF # "$(ENABLE_PCH)"!="" +$(eval $(call gb_SrsTarget_set_include,toolkit/awt,\ + $$(INCLUDE) \ + -I$(SRCDIR)/toolkit/source/awt \ +)) +$(eval $(call gb_SrsTarget_add_files,toolkit/awt,\ + toolkit/source/awt/xthrobber.src \ +)) diff --git a/toolkit/Library_tk.mk b/toolkit/Library_tk.mk new file mode 100644 index 000000000000..b54bee4e231d --- /dev/null +++ b/toolkit/Library_tk.mk @@ -0,0 +1,177 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# 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_Library_Library,tk)) + +$(eval $(call gb_Library_set_componentfile,tk,toolkit/util/tk)) + +$(eval $(call gb_Library_add_package_headers,tk,toolkit_inc)) + +#$(eval $(call gb_Library_add_precompiled_header,tk,$(SRCDIR)/toolkit/inc/pch/precompiled_toolkit)) + +$(eval $(call gb_Library_set_include,tk,\ + $$(INCLUDE) \ + -I$(WORKDIR)/inc/toolkit/ \ + -I$(SRCDIR)/toolkit/inc \ + -I$(SRCDIR)/toolkit/inc/pch \ + -I$(SRCDIR)/toolkit/source \ + -I$(OUTDIR)/inc/toolkit \ + -I$(OUTDIR)/inc/offuh \ +)) + +$(eval $(call gb_Library_set_defs,tk,\ + $$(DEFS) \ + -DTOOLKIT_DLLIMPLEMENTATION \ +)) + +$(eval $(call gb_Library_add_linked_libs,tk,\ + comphelper \ + cppu \ + cppuhelper \ + sal \ + stl \ + tl \ + utl \ + vcl \ +)) + +$(eval $(call gb_Library_add_exception_objects,tk,\ + toolkit/source/awt/asynccallback \ + toolkit/source/awt/stylesettings \ + toolkit/source/awt/vclxaccessiblecomponent \ + toolkit/source/awt/vclxbitmap \ + toolkit/source/awt/vclxbutton \ + toolkit/source/awt/vclxcontainer \ + toolkit/source/awt/vclxdevice \ + toolkit/source/awt/vclxdialog \ + toolkit/source/awt/vclxfixedline \ + toolkit/source/awt/vclxfont \ + toolkit/source/awt/vclxgraphics \ + toolkit/source/awt/vclxmenu \ + toolkit/source/awt/vclxplugin \ + toolkit/source/awt/vclxpointer \ + toolkit/source/awt/vclxprinter \ + toolkit/source/awt/vclxregion \ + toolkit/source/awt/vclxscroller \ + toolkit/source/awt/vclxspinbutton \ + toolkit/source/awt/vclxsplitter \ + toolkit/source/awt/vclxsystemdependentwindow \ + toolkit/source/awt/vclxtabcontrol \ + toolkit/source/awt/vclxtabpage \ + toolkit/source/awt/animatedimagespeer \ + toolkit/source/awt/vclxtoolkit \ + toolkit/source/awt/vclxtopwindow \ + toolkit/source/awt/vclxwindow \ + toolkit/source/awt/vclxwindow1 \ + toolkit/source/awt/vclxwindows \ + toolkit/source/awt/xsimpleanimation \ + toolkit/source/awt/xthrobber \ + toolkit/source/controls/accessiblecontrolcontext \ + toolkit/source/controls/dialogcontrol \ + toolkit/source/controls/eventcontainer \ + toolkit/source/controls/formattedcontrol \ + toolkit/source/controls/geometrycontrolmodel \ + toolkit/source/controls/grid/defaultgridcolumnmodel \ + toolkit/source/controls/grid/defaultgriddatamodel \ + toolkit/source/controls/grid/gridcolumn \ + toolkit/source/controls/grid/gridcontrol \ + toolkit/source/controls/roadmapcontrol \ + toolkit/source/controls/roadmapentry \ + toolkit/source/controls/stdtabcontroller \ + toolkit/source/controls/stdtabcontrollermodel \ + toolkit/source/controls/tkscrollbar \ + toolkit/source/controls/tksimpleanimation \ + toolkit/source/controls/tkspinbutton \ + toolkit/source/controls/tkthrobber \ + toolkit/source/controls/animatedimages \ + toolkit/source/controls/spinningprogress \ + toolkit/source/controls/tree/treecontrol \ + toolkit/source/controls/tree/treedatamodel \ + toolkit/source/controls/unocontrol \ + toolkit/source/controls/unocontrolbase \ + toolkit/source/controls/unocontrolcontainer \ + toolkit/source/controls/unocontrolcontainermodel \ + toolkit/source/controls/unocontrolmodel \ + toolkit/source/controls/unocontrols \ + toolkit/source/helper/accessibilityclient \ + toolkit/source/helper/externallock \ + toolkit/source/helper/fixedhyperbase \ + toolkit/source/helper/formpdfexport \ + toolkit/source/helper/imagealign \ + toolkit/source/helper/listenermultiplexer \ + toolkit/source/helper/property \ + toolkit/source/helper/registerservices \ + toolkit/source/helper/servicenames \ + toolkit/source/helper/tkresmgr \ + toolkit/source/helper/unomemorystream \ + toolkit/source/helper/unopropertyarrayhelper \ + toolkit/source/helper/unowrapper \ + toolkit/source/helper/vclunohelper \ + toolkit/source/layout/core/bin \ + toolkit/source/layout/core/box \ + toolkit/source/layout/core/box-base \ + toolkit/source/layout/core/byteseq \ + toolkit/source/layout/core/container \ + toolkit/source/layout/core/dialogbuttonhbox \ + toolkit/source/layout/core/factory \ + toolkit/source/layout/core/flow \ + toolkit/source/layout/core/helper \ + toolkit/source/layout/core/import \ + toolkit/source/layout/core/localized-string \ + toolkit/source/layout/core/proplist \ + toolkit/source/layout/core/root \ + toolkit/source/layout/core/table \ + toolkit/source/layout/core/timer \ + toolkit/source/layout/core/translate \ + toolkit/source/layout/core/vcl \ + toolkit/source/layout/vcl/wbutton \ + toolkit/source/layout/vcl/wcontainer \ + toolkit/source/layout/vcl/wfield \ + toolkit/source/layout/vcl/wrapper \ +)) + +ifeq ($(GUIBASE),aqua) +$(eval $(call gb_Library_set_cxxflags,tk,\ + $$(CXXFLAGS) $(gb_OBJCXXFLAGS))) +endif + +ifeq ($(OS),LINUX) +$(eval $(call gb_Library_add_linked_libs,tk,\ + X11 \ + dl \ + m \ + pthread \ +)) +endif +ifeq ($(OS),WNT) +$(eval $(call gb_Library_add_linked_libs,tk,\ + kernel32 \ + msvcrt \ + uwinapi \ +)) +endif +# vim: set noet sw=4 ts=4: diff --git a/toolkit/qa/unoapi/makefile.mk b/toolkit/Makefile index 9517601c3917..a79aff831024 100644 --- a/toolkit/qa/unoapi/makefile.mk +++ b/toolkit/Makefile @@ -1,6 +1,7 @@ #************************************************************************* -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # +# 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 @@ -21,28 +22,17 @@ # 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 +ifeq ($(strip $(SOLARENV)),) +$(error No environment set!) +endif -.INCLUDE: settings.mk -.INCLUDE: target.mk -.INCLUDE: installationtest.mk +gb_PARTIALBUILD := T +GBUILDDIR := $(SOLARENV)/gbuild +include $(GBUILDDIR)/gbuild.mk -ALLTAR : javatest +$(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk))) -.END +# vim: set noet sw=4 ts=4: diff --git a/toolkit/source/controls/tree/makefile.mk b/toolkit/Module_toolkit.mk index 4e72b62b416b..666fd44a6db3 100644 --- a/toolkit/source/controls/tree/makefile.mk +++ b/toolkit/Module_toolkit.mk @@ -2,7 +2,7 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2000, 2010 Oracle and/or its affiliates. +# Copyright 2009 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite # @@ -14,35 +14,25 @@ # # 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 +# 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 +# version 3 along with OpenOffice.org. If not, see # <http://www.openoffice.org/license.html> # for a copy of the LGPLv3 License. # #************************************************************************* -PRJ=..$/..$/.. +$(eval $(call gb_Module_Module,toolkit)) -PRJNAME=toolkit -TARGET=tree +$(eval $(call gb_Module_add_targets,toolkit,\ + AllLangResTarget_tk \ + Library_tk \ + Package_inc \ + Package_source \ + Package_util \ +)) -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES= \ - $(SLO)$/treecontrol.obj\ - $(SLO)$/treedatamodel.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk +# vim: set noet sw=4 ts=4: diff --git a/toolkit/Package_inc.mk b/toolkit/Package_inc.mk new file mode 100644 index 000000000000..4079a3d53383 --- /dev/null +++ b/toolkit/Package_inc.mk @@ -0,0 +1,67 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# 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_Package_Package,toolkit_inc,$(SRCDIR)/toolkit/inc)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/layout/layout-post.hxx,layout/layout-post.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/layout/layout-pre.hxx,layout/layout-pre.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/layout/layout.hxx,layout/layout.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/awt/vclxaccessiblecomponent.hxx,toolkit/awt/vclxaccessiblecomponent.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/awt/vclxcontainer.hxx,toolkit/awt/vclxcontainer.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/awt/vclxdevice.hxx,toolkit/awt/vclxdevice.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/awt/vclxfont.hxx,toolkit/awt/vclxfont.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/awt/vclxmenu.hxx,toolkit/awt/vclxmenu.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/awt/vclxsystemdependentwindow.hxx,toolkit/awt/vclxsystemdependentwindow.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/awt/vclxtoolkit.hxx,toolkit/awt/vclxtoolkit.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/awt/vclxtopwindow.hxx,toolkit/awt/vclxtopwindow.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/awt/vclxwindow.hxx,toolkit/awt/vclxwindow.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/awt/vclxwindows.hxx,toolkit/awt/vclxwindows.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/controls/unocontrol.hxx,toolkit/controls/unocontrol.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/controls/unocontrolbase.hxx,toolkit/controls/unocontrolbase.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/controls/unocontrolmodel.hxx,toolkit/controls/unocontrolmodel.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/controls/unocontrols.hxx,toolkit/controls/unocontrols.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/dllapi.h,toolkit/dllapi.h)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/accessibilityclient.hxx,toolkit/helper/accessibilityclient.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/accessiblefactory.hxx,toolkit/helper/accessiblefactory.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/convert.hxx,toolkit/helper/convert.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/emptyfontdescriptor.hxx,toolkit/helper/emptyfontdescriptor.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/externallock.hxx,toolkit/helper/externallock.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/fixedhyperbase.hxx,toolkit/helper/fixedhyperbase.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/formpdfexport.hxx,toolkit/helper/formpdfexport.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/imagealign.hxx,toolkit/helper/imagealign.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/listenermultiplexer.hxx,toolkit/helper/listenermultiplexer.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/macros.hxx,toolkit/helper/macros.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/mutexandbroadcasthelper.hxx,toolkit/helper/mutexandbroadcasthelper.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/mutexhelper.hxx,toolkit/helper/mutexhelper.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/property.hxx,toolkit/helper/property.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/servicenames.hxx,toolkit/helper/servicenames.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/solarrelease.hxx,toolkit/helper/solarrelease.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/tkresmgr.hxx,toolkit/helper/tkresmgr.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/unomemorystream.hxx,toolkit/helper/unomemorystream.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/unopropertyarrayhelper.hxx,toolkit/helper/unopropertyarrayhelper.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/unowrapper.hxx,toolkit/helper/unowrapper.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/vclunohelper.hxx,toolkit/helper/vclunohelper.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/unohlp.hxx,toolkit/helper/vclunohelper.hxx)) diff --git a/toolkit/Package_source.mk b/toolkit/Package_source.mk new file mode 100644 index 000000000000..41f46138df2b --- /dev/null +++ b/toolkit/Package_source.mk @@ -0,0 +1,47 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# 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_Package_Package,toolkit_source,$(SRCDIR)/toolkit/source)) +$(eval $(call gb_Package_add_file,toolkit_source,inc/layout/core/bin.hxx,layout/core/bin.hxx)) +$(eval $(call gb_Package_add_file,toolkit_source,inc/layout/core/box-base.hxx,layout/core/box-base.hxx)) +$(eval $(call gb_Package_add_file,toolkit_source,inc/layout/core/box.hxx,layout/core/box.hxx)) +$(eval $(call gb_Package_add_file,toolkit_source,inc/layout/core/container.hxx,layout/core/container.hxx)) +$(eval $(call gb_Package_add_file,toolkit_source,inc/layout/core/dialogbuttonhbox.hxx,layout/core/dialogbuttonhbox.hxx)) +$(eval $(call gb_Package_add_file,toolkit_source,inc/layout/core/factory.hxx,layout/core/factory.hxx)) +$(eval $(call gb_Package_add_file,toolkit_source,inc/layout/core/flow.hxx,layout/core/flow.hxx)) +$(eval $(call gb_Package_add_file,toolkit_source,inc/layout/core/helper.hxx,layout/core/helper.hxx)) +$(eval $(call gb_Package_add_file,toolkit_source,inc/layout/core/import.hxx,layout/core/import.hxx)) +$(eval $(call gb_Package_add_file,toolkit_source,inc/layout/core/localized-string.hxx,layout/core/localized-string.hxx)) +$(eval $(call gb_Package_add_file,toolkit_source,inc/layout/core/precompiled_xmlscript.hxx,layout/core/precompiled_xmlscript.hxx)) +$(eval $(call gb_Package_add_file,toolkit_source,inc/layout/core/proplist.hxx,layout/core/proplist.hxx)) +$(eval $(call gb_Package_add_file,toolkit_source,inc/layout/core/root.hxx,layout/core/root.hxx)) +$(eval $(call gb_Package_add_file,toolkit_source,inc/layout/core/table.hxx,layout/core/table.hxx)) +$(eval $(call gb_Package_add_file,toolkit_source,inc/layout/core/timer.hxx,layout/core/timer.hxx)) +$(eval $(call gb_Package_add_file,toolkit_source,inc/layout/core/translate.hxx,layout/core/translate.hxx)) +$(eval $(call gb_Package_add_file,toolkit_source,inc/layout/core/vcl.hxx,layout/core/vcl.hxx)) +$(eval $(call gb_Package_add_file,toolkit_source,inc/layout/vcl/wrapper.hxx,layout/vcl/wrapper.hxx)) +$(eval $(call gb_Package_add_file,toolkit_source,inc/toolkit/awt/vclxdialog.hxx,awt/vclxdialog.hxx)) diff --git a/toolkit/Package_util.mk b/toolkit/Package_util.mk new file mode 100644 index 000000000000..990248eb142d --- /dev/null +++ b/toolkit/Package_util.mk @@ -0,0 +1,29 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# 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_Package_Package,toolkit_util,$(SRCDIR)/toolkit/util)) +$(eval $(call gb_Package_add_file,toolkit_util,xml/toolkit.xml,toolkit.xml)) diff --git a/toolkit/inc/toolkit/awt/animatedimagespeer.hxx b/toolkit/inc/toolkit/awt/animatedimagespeer.hxx new file mode 100755 index 000000000000..b9bdecdf0e47 --- /dev/null +++ b/toolkit/inc/toolkit/awt/animatedimagespeer.hxx @@ -0,0 +1,106 @@ +/************************************************************************* + * 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. + * + ************************************************************************/ + +#ifndef TOOLKIT_ANIMATEDIMAGEPEER_HXX +#define TOOLKIT_ANIMATEDIMAGEPEER_HXX + +#include "toolkit/awt/vclxwindow.hxx" + +/** === begin UNO includes === **/ +#include <com/sun/star/awt/XAnimation.hpp> +#include <com/sun/star/util/XModifyListener.hpp> +/** === end UNO includes === **/ + +#include <cppuhelper/implbase3.hxx> + +#include <boost/scoped_ptr.hpp> +#include <boost/noncopyable.hpp> + +//...................................................................................................................... +namespace toolkit +{ +//...................................................................................................................... + + //================================================================================================================== + //= AnimatedImagesPeer + //================================================================================================================== + struct AnimatedImagesPeer_Data; + typedef ::cppu::ImplInheritanceHelper3 < VCLXWindow + , ::com::sun::star::awt::XAnimation + , ::com::sun::star::container::XContainerListener + , ::com::sun::star::util::XModifyListener + > AnimatedImagesPeer_Base; + + class AnimatedImagesPeer :public AnimatedImagesPeer_Base + ,public ::boost::noncopyable + { + public: + AnimatedImagesPeer(); + + protected: + ~AnimatedImagesPeer(); + + public: + // XAnimation + virtual void SAL_CALL startAnimation( ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL stopAnimation( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Bool SAL_CALL isAnimationRunning( ) throw (::com::sun::star::uno::RuntimeException); + + // VclWindowPeer + virtual void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException); + + // XContainerListener + virtual void SAL_CALL elementInserted( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL elementRemoved( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL elementReplaced( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + + // XEventListener + virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& i_event ) throw (::com::sun::star::uno::RuntimeException); + + // XModifyListener + virtual void SAL_CALL modified( const ::com::sun::star::lang::EventObject& i_event ) throw (::com::sun::star::uno::RuntimeException); + + // XComponent + void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException); + + protected: + void ProcessWindowEvent( const VclWindowEvent& i_windowEvent ); + + private: + /** updates our images with the ones from the givem XAnimatedImages component + */ + void impl_updateImages_nolck( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& i_animatedImages ); + + private: + ::boost::scoped_ptr< AnimatedImagesPeer_Data > m_pData; + }; + +//...................................................................................................................... +} // namespace toolkit +//...................................................................................................................... + +#endif // TOOLKIT_ANIMATEDIMAGEPEER_HXX diff --git a/toolkit/inc/toolkit/awt/vclxwindows.hxx b/toolkit/inc/toolkit/awt/vclxwindows.hxx index 36ac2fa51337..1d3b10120e0c 100644 --- a/toolkit/inc/toolkit/awt/vclxwindows.hxx +++ b/toolkit/inc/toolkit/awt/vclxwindows.hxx @@ -121,7 +121,7 @@ private: Image maImage; protected: - BitmapEx GetBitmap() const { return maImage.GetBitmapEx(); } + const Image& GetImage() const { return maImage; } protected: // ::com::sun::star::awt::XWindow diff --git a/toolkit/inc/toolkit/awt/xsimpleanimation.hxx b/toolkit/inc/toolkit/awt/xsimpleanimation.hxx index dc8fbe4506ed..9e6043b7d9ef 100644 --- a/toolkit/inc/toolkit/awt/xsimpleanimation.hxx +++ b/toolkit/inc/toolkit/awt/xsimpleanimation.hxx @@ -33,40 +33,28 @@ #include <comphelper/uno3.hxx> #include <com/sun/star/awt/XSimpleAnimation.hpp> +#include <boost/scoped_ptr.hpp> + //........................................................................ namespace toolkit { - class Throbber_Impl; //........................................................................ //==================================================================== //= XSimpleAnimation //==================================================================== - typedef ::cppu::ImplHelper1 < ::com::sun::star::awt::XSimpleAnimation - > XSimpleAnimation_Base; + typedef ::cppu::ImplInheritanceHelper1 < VCLXWindow + , ::com::sun::star::awt::XSimpleAnimation + > XSimpleAnimation_Base; - class XSimpleAnimation :public VCLXWindow - ,public XSimpleAnimation_Base + class XSimpleAnimation : public XSimpleAnimation_Base { - private: - //::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > > maImageList; - sal_Bool mbRepeat; - sal_Int32 mnStepTime; - - Throbber_Impl *mpThrobber; - public: XSimpleAnimation(); protected: ~XSimpleAnimation(); - // XInterface - DECLARE_XINTERFACE() - - // XTypeProvider - DECLARE_XTYPEPROVIDER() - // XSimpleAnimation virtual void SAL_CALL start() throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL stop() throw (::com::sun::star::uno::RuntimeException); @@ -76,9 +64,6 @@ namespace toolkit virtual void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException); - // VCLXWindow - void ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent ); - private: XSimpleAnimation( const XSimpleAnimation& ); // never implemented XSimpleAnimation& operator=( const XSimpleAnimation& ); // never implemented diff --git a/toolkit/inc/toolkit/awt/xthrobber.hxx b/toolkit/inc/toolkit/awt/xthrobber.hxx index 511f3f76ecf6..67015e049a48 100644 --- a/toolkit/inc/toolkit/awt/xthrobber.hxx +++ b/toolkit/inc/toolkit/awt/xthrobber.hxx @@ -33,23 +33,25 @@ #include <comphelper/uno3.hxx> #include <com/sun/star/awt/XThrobber.hpp> +#include <boost/scoped_ptr.hpp> +#include <boost/noncopyable.hpp> + //........................................................................ namespace toolkit { //........................................................................ - class Throbber_Impl; //==================================================================== //= XThrobber //==================================================================== - typedef ::cppu::ImplHelper1 < ::com::sun::star::awt::XThrobber - > XThrobber_Base; + typedef ::cppu::ImplInheritanceHelper1 < VCLXWindow + , ::com::sun::star::awt::XThrobber + > XThrobber_Base; - class XThrobber :public VCLXWindow - ,public XThrobber_Base + class XThrobber :public XThrobber_Base + ,public ::boost::noncopyable { private: - Throbber_Impl *mpThrobber; void SAL_CALL InitImageList() throw(::com::sun::star::uno::RuntimeException); public: @@ -58,22 +60,12 @@ namespace toolkit protected: ~XThrobber(); - // XInterface - DECLARE_XINTERFACE() - - // XTypeProvider - DECLARE_XTYPEPROVIDER() - // XThrobber virtual void SAL_CALL start() throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL stop() throw (::com::sun::star::uno::RuntimeException); - // VclWindowPeer - virtual void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException); - // VCLXWindow - void ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent ); + virtual void SetWindow( Window* pWindow ); private: XThrobber( const XThrobber& ); // never implemented diff --git a/toolkit/inc/toolkit/controls/animatedimages.hxx b/toolkit/inc/toolkit/controls/animatedimages.hxx new file mode 100755 index 000000000000..96791c252b0b --- /dev/null +++ b/toolkit/inc/toolkit/controls/animatedimages.hxx @@ -0,0 +1,144 @@ +/************************************************************************* + * 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. + * + ************************************************************************/ + +#ifndef TOOLKIT_ANIMATEDIMAGES_HXX +#define TOOLKIT_ANIMATEDIMAGES_HXX + +#include "toolkit/controls/unocontrolbase.hxx" +#include "toolkit/controls/unocontrolmodel.hxx" + +/** === begin UNO includes === **/ +#include <com/sun/star/awt/XAnimation.hpp> +#include <com/sun/star/awt/XAnimatedImages.hpp> +#include <com/sun/star/container/XContainerListener.hpp> +/** === end UNO includes === **/ + +#include <cppuhelper/implbase1.hxx> +#include <cppuhelper/implbase2.hxx> + +#include <boost/scoped_ptr.hpp> + +//...................................................................................................................... +namespace toolkit +{ +//...................................................................................................................... + + //================================================================================================================== + //= + //================================================================================================================== + typedef ::cppu::AggImplInheritanceHelper2 < UnoControlBase + , ::com::sun::star::awt::XAnimation + , ::com::sun::star::container::XContainerListener + > AnimatedImagesControl_Base; + + class AnimatedImagesControl : public AnimatedImagesControl_Base + { + public: + AnimatedImagesControl(); + ::rtl::OUString GetComponentServiceName(); + + // XAnimation + virtual void SAL_CALL startAnimation( ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL stopAnimation( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Bool SAL_CALL isAnimationRunning( ) throw (::com::sun::star::uno::RuntimeException); + + // XServiceInfo + ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException); + ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException); + + // XControl + sal_Bool SAL_CALL setModel( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& i_rModel ) throw ( ::com::sun::star::uno::RuntimeException ); + void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& i_toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& i_parentPeer ) throw(::com::sun::star::uno::RuntimeException); + + + // XContainerListener + virtual void SAL_CALL elementInserted( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL elementRemoved( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL elementReplaced( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + + // XEventListener + virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& i_event ) throw (::com::sun::star::uno::RuntimeException); + }; + + //================================================================================================================== + //= AnimatedImagesControlModel + //================================================================================================================== + struct AnimatedImagesControlModel_Data; + typedef ::cppu::AggImplInheritanceHelper1 < UnoControlModel + , ::com::sun::star::awt::XAnimatedImages + > AnimatedImagesControlModel_Base; + class AnimatedImagesControlModel : public AnimatedImagesControlModel_Base + { + public: + AnimatedImagesControlModel(); + AnimatedImagesControlModel( const AnimatedImagesControlModel& i_copySource ); + + virtual UnoControlModel* Clone() const; + + // XPropertySet + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); + + // XPersistObject + ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException); + + // XServiceInfo + ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException); + ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException); + + // XAnimatedImages + virtual ::sal_Int32 SAL_CALL getStepTime() throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setStepTime( ::sal_Int32 _steptime ) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Bool SAL_CALL getAutoRepeat() throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setAutoRepeat( ::sal_Bool _autorepeat ) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Int16 SAL_CALL getScaleMode() throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setScaleMode( ::sal_Int16 _scalemode ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + virtual ::sal_Int32 SAL_CALL getImageSetCount( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getImageSet( ::sal_Int32 i_index ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL insertImageSet( ::sal_Int32 i_index, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& i_imageURLs ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL replaceImageSet( ::sal_Int32 i_index, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& i_imageURLs ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeImageSet( ::sal_Int32 i_index ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + + // XAnimatedImages::XContainer + virtual void SAL_CALL addContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& i_listener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& i_listener ) throw (::com::sun::star::uno::RuntimeException); + + protected: + ~AnimatedImagesControlModel(); + + ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const; + ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); + void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::uno::Exception); + + private: + ::boost::scoped_ptr< AnimatedImagesControlModel_Data > + m_pData; + }; + +//...................................................................................................................... +} // namespace toolkit +//...................................................................................................................... + +#endif // TOOLKIT_ANIMATEDIMAGES_HXX diff --git a/toolkit/inc/toolkit/controls/spinningprogress.hxx b/toolkit/inc/toolkit/controls/spinningprogress.hxx new file mode 100755 index 000000000000..b2e8204ca999 --- /dev/null +++ b/toolkit/inc/toolkit/controls/spinningprogress.hxx @@ -0,0 +1,70 @@ +/************************************************************************* + * 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. + * + ************************************************************************/ + +#ifndef TOOLKIT_SPINNINGPROGRESS_HXX +#define TOOLKIT_SPINNINGPROGRESS_HXX + +#include "toolkit/controls/animatedimages.hxx" + +/** === begin UNO includes === **/ +/** === end UNO includes === **/ + +//...................................................................................................................... +namespace toolkit +{ +//...................................................................................................................... + + //================================================================================================================== + //= SpinningProgressControlModel + //================================================================================================================== + typedef AnimatedImagesControlModel SpinningProgressControlModel_Base; + class SpinningProgressControlModel : public SpinningProgressControlModel_Base + { + public: + SpinningProgressControlModel(); + SpinningProgressControlModel( const SpinningProgressControlModel& i_copySource ); + + virtual UnoControlModel* Clone() const; + + // XPropertySet + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); + + // XPersistObject + ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException); + + // XServiceInfo + ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException); + ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException); + + protected: + ~SpinningProgressControlModel(); + }; + +//...................................................................................................................... +} // namespace toolkit +//...................................................................................................................... + +#endif // TOOLKIT_SPINNINGPROGRESS_HXX diff --git a/toolkit/inc/toolkit/controls/tksimpleanimation.hxx b/toolkit/inc/toolkit/controls/tksimpleanimation.hxx index e947a7921457..a0ddfc0dbf8d 100644 --- a/toolkit/inc/toolkit/controls/tksimpleanimation.hxx +++ b/toolkit/inc/toolkit/controls/tksimpleanimation.hxx @@ -71,11 +71,11 @@ namespace toolkit //= UnoSimpleAnimationControl //==================================================================== - typedef ::cppu::ImplHelper1 < ::com::sun::star::awt::XSimpleAnimation - > UnoSimpleAnimationControl_Base; + typedef ::cppu::AggImplInheritanceHelper1 < UnoControlBase + , ::com::sun::star::awt::XSimpleAnimation + > UnoSimpleAnimationControl_Base; - class UnoSimpleAnimationControl :public UnoControlBase - ,public UnoSimpleAnimationControl_Base + class UnoSimpleAnimationControl : public UnoSimpleAnimationControl_Base { private: @@ -83,16 +83,6 @@ namespace toolkit UnoSimpleAnimationControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::rtl::OUString GetComponentServiceName(); - DECLARE_UNO3_AGG_DEFAULTS( UnoSimpleAnimationControl, UnoControlBase ); - ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); - - void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& Toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent ) throw(::com::sun::star::uno::RuntimeException); - void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException) { UnoControlBase::disposing( Source ); } - void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException); - - // XTypeProvider - DECLARE_XTYPEPROVIDER() - // XSimpleAnimation virtual void SAL_CALL start() throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL stop() throw (::com::sun::star::uno::RuntimeException); diff --git a/toolkit/inc/toolkit/helper/mutexandbroadcasthelper.hxx b/toolkit/inc/toolkit/helper/mutexandbroadcasthelper.hxx index 611d90427609..4ae1dd17c62f 100644 --- a/toolkit/inc/toolkit/helper/mutexandbroadcasthelper.hxx +++ b/toolkit/inc/toolkit/helper/mutexandbroadcasthelper.hxx @@ -43,7 +43,7 @@ public: ::cppu::OBroadcastHelper BrdcstHelper; ::osl::Mutex& GetMutex() { return Mutex; } - + ::cppu::OBroadcastHelper& GetBroadcastHelper() { return BrdcstHelper; } }; #endif // _TOOLKIT_HELPER_MUTEXANDBROADCASTHELPER_HXX diff --git a/toolkit/inc/toolkit/helper/property.hxx b/toolkit/inc/toolkit/helper/property.hxx index 861ed18df847..c2d6380dcb65 100644 --- a/toolkit/inc/toolkit/helper/property.hxx +++ b/toolkit/inc/toolkit/helper/property.hxx @@ -202,9 +202,10 @@ namespace rtl { #define BASEPROPERTY_GRID_LINE_COLOR 151 #define BASEPROPERTY_MULTISELECTION_SIMPLEMODE 152 #define BASEPROPERTY_ITEM_SEPARATOR_POS 153 -#define BASEPROPERTY_ROW_HEADER_WIDTH 154 -#define BASEPROPERTY_COLUMN_HEADER_HEIGHT 155 -#define BASEPROPERTY_USE_GRID_LINES 156 +#define BASEPROPERTY_AUTO_REPEAT 154 +#define BASEPROPERTY_ROW_HEADER_WIDTH 155 +#define BASEPROPERTY_COLUMN_HEADER_HEIGHT 156 +#define BASEPROPERTY_USE_GRID_LINES 157 // Keine gebundenen Properties, werden immer aus der Property BASEPROPERTY_FONTDESCRIPTOR entnommen. diff --git a/toolkit/inc/toolkit/helper/servicenames.hxx b/toolkit/inc/toolkit/helper/servicenames.hxx index a149f9e8f25f..f3013b1e026c 100644 --- a/toolkit/inc/toolkit/helper/servicenames.hxx +++ b/toolkit/inc/toolkit/helper/servicenames.hxx @@ -103,6 +103,9 @@ extern const sal_Char __FAR_DATA szServiceName_UnoSimpleAnimationControl[], szSe extern const sal_Char __FAR_DATA szServiceName_UnoSimpleAnimationControlModel[], szServiceName2_UnoSimpleAnimationControlModel[]; extern const sal_Char __FAR_DATA szServiceName_UnoThrobberControl[], szServiceName2_UnoThrobberControl[]; extern const sal_Char __FAR_DATA szServiceName_UnoThrobberControlModel[], szServiceName2_UnoThrobberControlModel[]; +extern const sal_Char __FAR_DATA szServiceName_AnimatedImagesControl[]; +extern const sal_Char __FAR_DATA szServiceName_AnimatedImagesControlModel[]; +extern const sal_Char __FAR_DATA szServiceName_SpinningProgressControlModel[]; extern const sal_Char __FAR_DATA szServiceName_UnoControlFixedHyperlink[], szServiceName_UnoControlFixedHyperlinkModel[]; #endif // _TOOLKIT_HELPER_SERVICENAMES_HXX_ diff --git a/toolkit/inc/toolkit/helper/throbberimpl.hxx b/toolkit/inc/toolkit/helper/throbberimpl.hxx deleted file mode 100644 index b944a74b65d2..000000000000 --- a/toolkit/inc/toolkit/helper/throbberimpl.hxx +++ /dev/null @@ -1,84 +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. - * - ************************************************************************/ - -#ifndef _TOOLKIT_HELPER_THROBBERIMPL_HXX_ -#define _TOOLKIT_HELPER_THROBBERIMPL_HXX_ - -#include <toolkit/awt/vclxwindow.hxx> -#include <com/sun/star/uno/Reference.hxx> - -#include <com/sun/star/graphic/XGraphic.hpp> -#include <vcl/timer.hxx> -#include <vos/mutex.hxx> - -//........................................................................ -namespace toolkit -//........................................................................ -{ - - class Throbber_Impl - { - private: - vos::IMutex& mrMutex; // Reference to SolarMutex - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > > maImageList; - ::com::sun::star::uno::Reference< VCLXWindow > mxParent; - - sal_Bool mbRepeat; - sal_Int32 mnStepTime; - sal_Int32 mnCurStep; - sal_Int32 mnStepCount; - AutoTimer maWaitTimer; - - DECL_LINK( TimeOutHdl, Throbber_Impl* ); - - vos::IMutex& GetMutex() { return mrMutex; } - - public: - Throbber_Impl( ::com::sun::star::uno::Reference< VCLXWindow > xParent, - sal_Int32 nStepTime, - sal_Bool bRepeat ); - ~Throbber_Impl(); - - // Properties - void setStepTime( sal_Int32 nStepTime ) { mnStepTime = nStepTime; } - void setRepeat( sal_Bool bRepeat ) { mbRepeat = bRepeat; } - - // XSimpleAnimation - void start() throw ( ::com::sun::star::uno::RuntimeException ); - void stop() throw ( ::com::sun::star::uno::RuntimeException ); - void setImageList( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > >& ImageList ) - throw ( ::com::sun::star::uno::RuntimeException ); - // Helpers - void initImage() throw ( ::com::sun::star::uno::RuntimeException ); - sal_Bool isHCMode() throw ( ::com::sun::star::uno::RuntimeException ); - }; -//........................................................................ -} // namespacetoolkit -//........................................................................ - -#endif //_TOOLKIT_HELPER_THROBBERIMPL_HXX_ - diff --git a/toolkit/prj/build.lst b/toolkit/prj/build.lst index d9823204ecb0..ce6e32adfe49 100644 --- a/toolkit/prj/build.lst +++ b/toolkit/prj/build.lst @@ -1,20 +1,3 @@ -ti toolkit : vcl test qadevOOo NULL -ti toolkit usr1 - all ti_mkout NULL -ti toolkit\prj get - all ti_prj NULL -ti toolkit\inc nmake - all ti_inc NULL -ti toolkit\uiconfig\layout nmake - all ti_uiconfig_layout NULL -ti toolkit\source\helper nmake - all ti_helper ti_inc NULL -ti toolkit\source\awt nmake - all ti_awt ti_inc NULL -ti toolkit\source\controls nmake - all ti_controls ti_inc NULL -ti toolkit\source\controls\tree nmake - all ti_tree NULL -ti toolkit\source\controls\grid nmake - all ti_grid NULL -ti toolkit\source\layout\core nmake - all ti_layout_core NULL -ti toolkit\source\layout\vcl nmake - all ti_layout_vcl NULL -ti toolkit\util nmake - all ti_util ti_awt ti_controls ti_layout_core ti_helper ti_tree ti_grid ti_layout_vcl NULL - -ti toolkit\qa\unoapi nmake - all ti_qa_unoapi NULL - -ti toolkit\qa\complex\toolkit nmake - all ti_complex_toolkit NULL - -# fail on unxsoli4 -#ti toolkit\qa\complex\xunitconversion nmake - all ti_complex_conv ti_util NULL +ti toolkit : LIBXSLT:libxslt vcl qadevOOo NULL +ti toolkit\prj nmake - all ti_prj NULL +ti toolkit\qa\complex\toolkit nmake - all ti_complex_toolkit NULL diff --git a/toolkit/prj/d.lst b/toolkit/prj/d.lst index 01eb5026e401..e69de29bb2d1 100644 --- a/toolkit/prj/d.lst +++ b/toolkit/prj/d.lst @@ -1,66 +0,0 @@ -mkdir: %COMMON_DEST%\bin%_EXT%\hid -mkdir: %_DEST%\inc%_EXT%\toolkit -mkdir: %_DEST%\inc%_EXT%\toolkit\helper -mkdir: %_DEST%\inc%_EXT%\toolkit\awt -mkdir: %_DEST%\inc%_EXT%\toolkit\controls - -..\%COMMON_OUTDIR%\misc\*.hid %COMMON_DEST%\bin%_EXT%\hid\*.hid -..\%__SRC%\lib\itk.lib %_DEST%\lib%_EXT%\itk.lib -..\%__SRC%\lib\lib*.so %_DEST%\lib%_EXT% -..\%__SRC%\lib\*.sl %_DEST%\lib%_EXT%\*.sl -..\%__SRC%\lib\*.a %_DEST%\lib%_EXT%\*.a -..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib -..\%__SRC%\bin\tk*.res %_DEST%\bin%_EXT%\tk*res -..\%__SRC%\bin\tk?????.sym %_DEST%\bin%_EXT%\tk?????.sym -..\%__SRC%\bin\tk?????.dll %_DEST%\bin%_EXT%\tk?????.dll -..\%__SRC%\misc\tk?????.map %_DEST%\bin%_EXT%\tk?????.map - -..\util\toolkit.xml %_DEST%\xml%_EXT%\toolkit.xml - -..\inc\toolkit\awt\vclxaccessiblecomponent.hxx %_DEST%\inc%_EXT%\toolkit\awt\vclxaccessiblecomponent.hxx -..\inc\toolkit\awt\vclxcontainer.hxx %_DEST%\inc%_EXT%\toolkit\awt\vclxcontainer.hxx -..\inc\toolkit\awt\vclxdevice.hxx %_DEST%\inc%_EXT%\toolkit\awt\vclxdevice.hxx -..\inc\toolkit\awt\vclxfont.hxx %_DEST%\inc%_EXT%\toolkit\awt\vclxfont.hxx -..\inc\toolkit\awt\vclxtopwindow.hxx %_DEST%\inc%_EXT%\toolkit\awt\vclxtopwindow.hxx -..\inc\toolkit\awt\vclxtoolkit.hxx %_DEST%\inc%_EXT%\toolkit\awt\vclxtoolkit.hxx -..\inc\toolkit\awt\vclxwindow.hxx %_DEST%\inc%_EXT%\toolkit\awt\vclxwindow.hxx -..\inc\toolkit\awt\vclxsystemdependentwindow.hxx %_DEST%\inc%_EXT%\toolkit\awt\vclxsystemdependentwindow.hxx -..\source\awt\vclxdialog.hxx %_DEST%\inc%_EXT%\toolkit\awt\vclxdialog.hxx -..\inc\toolkit\awt\vclxwindows.hxx %_DEST%\inc%_EXT%\toolkit\awt\vclxwindows.hxx -..\inc\toolkit\awt\vclxmenu.hxx %_DEST%\inc%_EXT%\toolkit\awt\vclxmenu.hxx - -..\inc\toolkit\controls\unocontrol.hxx %_DEST%\inc%_EXT%\toolkit\controls\unocontrol.hxx -..\inc\toolkit\controls\unocontrols.hxx %_DEST%\inc%_EXT%\toolkit\controls\unocontrols.hxx -..\inc\toolkit\controls\unocontrolmodel.hxx %_DEST%\inc%_EXT%\toolkit\controls\unocontrolmodel.hxx -..\inc\toolkit\controls\unocontrolbase.hxx %_DEST%\inc%_EXT%\toolkit\controls\unocontrolbase.hxx -..\inc\toolkit\helper\servicenames.hxx %_DEST%\inc%_EXT%\toolkit\helper\servicenames.hxx - -..\inc\toolkit\helper\emptyfontdescriptor.hxx %_DEST%\inc%_EXT%\toolkit\helper\emptyfontdescriptor.hxx -..\inc\toolkit\helper\vclunohelper.hxx %_DEST%\inc%_EXT%\toolkit\helper\vclunohelper.hxx -..\inc\toolkit\helper\convert.hxx %_DEST%\inc%_EXT%\toolkit\helper\convert.hxx -..\inc\toolkit\helper\property.hxx %_DEST%\inc%_EXT%\toolkit\helper\property.hxx -..\inc\toolkit\helper\macros.hxx %_DEST%\inc%_EXT%\toolkit\helper\macros.hxx -..\inc\toolkit\helper\mutexhelper.hxx %_DEST%\inc%_EXT%\toolkit\helper\mutexhelper.hxx -..\inc\toolkit\helper\mutexandbroadcasthelper.hxx %_DEST%\inc%_EXT%\toolkit\helper\mutexandbroadcasthelper.hxx -..\inc\toolkit\helper\listenermultiplexer.hxx %_DEST%\inc%_EXT%\toolkit\helper\listenermultiplexer.hxx -..\inc\toolkit\helper\unowrapper.hxx %_DEST%\inc%_EXT%\toolkit\helper\unowrapper.hxx -..\inc\toolkit\helper\externallock.hxx %_DEST%\inc%_EXT%\toolkit\helper\externallock.hxx -..\inc\toolkit\helper\formpdfexport.hxx %_DEST%\inc%_EXT%\toolkit\helper/formpdfexport.hxx -..\inc\toolkit\helper\accessiblefactory.hxx %_DEST%\inc%_EXT%\toolkit\helper\accessiblefactory.hxx -..\inc\toolkit\helper\fixedhyperbase.hxx %_DEST%\inc%_EXT%\toolkit\helper\fixedhyperbase.hxx -..\inc\toolkit\helper\unopropertyarrayhelper.hxx %_DEST%\inc%_EXT%\toolkit\helper\unopropertyarrayhelper.hxx - -..\inc\toolkit\helper\vclunohelper.hxx %_DEST%\inc%_EXT%\toolkit\unohlp.hxx -..\inc\toolkit\dllapi.h %_DEST%\inc%_EXT%\toolkit\dllapi.h - -mkdir: %_DEST%\inc%_EXT%\layout -..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib - -..\inc\layout\*.hxx %_DEST%\inc%_EXT%\layout\*.hxx -mkdir: %_DEST%\inc%_EXT%\layout\core -..\source\layout\core\*.hxx %_DEST%\inc%_EXT%\layout\core\*.hxx -mkdir: %_DEST%\inc%_EXT%\layout\vcl -..\source\layout\vcl\*.hxx %_DEST%\inc%_EXT%\layout\vcl\*.hxx - -..\%__SRC%\bin\*-layout.zip %_DEST%\pck%_EXT%\*.* -..\%__SRC%\misc\tk.component %_DEST%\xml%_EXT%\tk.component diff --git a/toolkit/uiconfig/layout/makefile.mk b/toolkit/prj/makefile.mk index 46d0b187b744..c73a3d944bbf 100644 --- a/toolkit/uiconfig/layout/makefile.mk +++ b/toolkit/prj/makefile.mk @@ -25,30 +25,16 @@ # #************************************************************************* -PRJ=../.. -PRJNAME=toolkit -TARGET=layout +PRJ=.. +TARGET=prj .INCLUDE : settings.mk -.IF "$(ENABLE_LAYOUT)" == "TRUE" +.IF "$(VERBOSE)"!="" +VERBOSEFLAG := +.ELSE +VERBOSEFLAG := -s +.ENDIF -all: ALLTAR - -XML_FILES=\ - message-box.xml\ - tab-dialog.xml\ - -# - -.INCLUDE : layout.mk - -.ELSE # ENABLE_LAYOUT != TRUE -all .PHONY: -.ENDIF # ENABLE_LAYOUT != TRUE - -.INCLUDE : target.mk - -localize.sdf: - echo '#empty' | cat - > $@ - rm -f *-$@ +all: + cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) diff --git a/toolkit/qa/complex/toolkit/makefile.mk b/toolkit/qa/complex/toolkit/makefile.mk deleted file mode 100755 index 63605dace711..000000000000 --- a/toolkit/qa/complex/toolkit/makefile.mk +++ /dev/null @@ -1,89 +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 \ - -#----- create a jar from compiled files ---------------------------- - -JARTARGET = $(TARGET).jar - -#----- JUnit tests class ------------------------------------------- - -JAVATESTFILES = \ - UnitConversion.java \ - AccessibleStatusBar.java \ - -# fails; 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) -# 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/source/awt/animatedimagespeer.cxx b/toolkit/source/awt/animatedimagespeer.cxx new file mode 100755 index 000000000000..5e127d399434 --- /dev/null +++ b/toolkit/source/awt/animatedimagespeer.cxx @@ -0,0 +1,532 @@ +/************************************************************************* + * 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. + * + ************************************************************************/ + +#include "precompiled_toolkit.hxx" + +#include "toolkit/awt/animatedimagespeer.hxx" +#include "toolkit/helper/property.hxx" + +/** === begin UNO includes === **/ +#include <com/sun/star/awt/XAnimatedImages.hpp> +#include <com/sun/star/awt/Size.hpp> +#include <com/sun/star/graphic/XGraphicProvider.hpp> +#include <com/sun/star/beans/XPropertySet.hpp> +#include <com/sun/star/graphic/XGraphic.hpp> +#include <com/sun/star/awt/ImageScaleMode.hpp> +/** === end UNO includes === **/ + +#include <comphelper/componentcontext.hxx> +#include <comphelper/namedvaluecollection.hxx> +#include <comphelper/processfactory.hxx> +#include <rtl/ustrbuf.hxx> +#include <tools/diagnose_ex.h> +#include <tools/urlobj.hxx> +#include <vcl/throbber.hxx> + +#include <limits> + +//...................................................................................................................... +namespace toolkit +{ +//...................................................................................................................... + + /** === begin UNO using === **/ + using ::com::sun::star::uno::Reference; + using ::com::sun::star::uno::XInterface; + using ::com::sun::star::uno::UNO_QUERY; + using ::com::sun::star::uno::UNO_QUERY_THROW; + using ::com::sun::star::uno::UNO_SET_THROW; + using ::com::sun::star::uno::Exception; + using ::com::sun::star::uno::RuntimeException; + using ::com::sun::star::uno::Any; + using ::com::sun::star::uno::makeAny; + using ::com::sun::star::uno::Sequence; + using ::com::sun::star::uno::Type; + using ::com::sun::star::lang::EventObject; + using ::com::sun::star::container::ContainerEvent; + using ::com::sun::star::awt::XAnimatedImages; + using ::com::sun::star::awt::Size; + using ::com::sun::star::lang::XMultiServiceFactory; + using ::com::sun::star::graphic::XGraphicProvider; + using ::com::sun::star::beans::XPropertySet; + using ::com::sun::star::graphic::XGraphic; + /** === end UNO using === **/ + namespace ImageScaleMode = ::com::sun::star::awt::ImageScaleMode; + + //================================================================================================================== + //= AnimatedImagesPeer_Data + //================================================================================================================== + struct CachedImage + { + ::rtl::OUString sImageURL; + mutable Reference< XGraphic > xGraphic; + + CachedImage() + :sImageURL() + ,xGraphic() + { + } + + CachedImage( ::rtl::OUString const& i_imageURL ) + :sImageURL( i_imageURL ) + ,xGraphic() + { + } + }; + + struct AnimatedImagesPeer_Data + { + AnimatedImagesPeer& rAntiImpl; + ::std::vector< ::std::vector< CachedImage > > aCachedImageSets; + + AnimatedImagesPeer_Data( AnimatedImagesPeer& i_antiImpl ) + :rAntiImpl( i_antiImpl ) + ,aCachedImageSets() + { + } + }; + + //================================================================================================================== + //= helper + //================================================================================================================== + namespace + { + //-------------------------------------------------------------------------------------------------------------- + ::rtl::OUString lcl_getHighContrastURL( ::rtl::OUString const& i_imageURL ) + { + INetURLObject aURL( i_imageURL ); + if ( aURL.GetProtocol() != INET_PROT_PRIV_SOFFICE ) + { + OSL_VERIFY( aURL.insertName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "hicontrast" ) ), false, 0 ) ); + return aURL.GetMainURL( INetURLObject::NO_DECODE ); + } + // the private: scheme is not considered to be hierarchical by INetURLObject, so manually insert the + // segment + const sal_Int32 separatorPos = i_imageURL.indexOf( '/' ); + ENSURE_OR_RETURN( separatorPos != -1, "lcl_getHighContrastURL: unsipported URL scheme - cannot automatically determine HC version!", i_imageURL ); + + ::rtl::OUStringBuffer composer; + composer.append( i_imageURL.copy( 0, separatorPos ) ); + composer.appendAscii( "/hicontrast" ); + composer.append( i_imageURL.copy( separatorPos ) ); + return composer.makeStringAndClear(); + } + + //-------------------------------------------------------------------------------------------------------------- + bool lcl_ensureImage_throw( Reference< XGraphicProvider > const& i_graphicProvider, const bool i_isHighContrast, const CachedImage& i_cachedImage ) + { + if ( !i_cachedImage.xGraphic.is() ) + { + ::comphelper::NamedValueCollection aMediaProperties; + if ( i_isHighContrast ) + { + // try (to find) the high-contrast version of the graphic first + aMediaProperties.put( "URL", lcl_getHighContrastURL( i_cachedImage.sImageURL ) ); + i_cachedImage.xGraphic.set( i_graphicProvider->queryGraphic( aMediaProperties.getPropertyValues() ), UNO_QUERY ); + } + if ( !i_cachedImage.xGraphic.is() ) + { + aMediaProperties.put( "URL", i_cachedImage.sImageURL ); + i_cachedImage.xGraphic.set( i_graphicProvider->queryGraphic( aMediaProperties.getPropertyValues() ), UNO_QUERY ); + } + } + return i_cachedImage.xGraphic.is(); + } + + //-------------------------------------------------------------------------------------------------------------- + Size lcl_getGraphicSizePixel( Reference< XGraphic > const& i_graphic ) + { + Size aSizePixel; + try + { + if ( i_graphic.is() ) + { + const Reference< XPropertySet > xGraphicProps( i_graphic, UNO_QUERY_THROW ); + OSL_VERIFY( xGraphicProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SizePixel" ) ) ) >>= aSizePixel ); + } + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + return aSizePixel; + } + + //-------------------------------------------------------------------------------------------------------------- + void lcl_init( Sequence< ::rtl::OUString > const& i_imageURLs, ::std::vector< CachedImage >& o_images ) + { + o_images.resize(0); + size_t count = size_t( i_imageURLs.getLength() ); + o_images.reserve( count ); + for ( size_t i = 0; i < count; ++i ) + { + o_images.push_back( CachedImage( i_imageURLs[i] ) ); + } + } + + //-------------------------------------------------------------------------------------------------------------- + void lcl_updateImageList_nothrow( AnimatedImagesPeer_Data& i_data ) + { + Throbber* pThrobber = dynamic_cast< Throbber* >( i_data.rAntiImpl.GetWindow() ); + if ( pThrobber == NULL ) + return; + + try + { + // collect the image sizes of the different image sets + const ::comphelper::ComponentContext aContext( ::comphelper::getProcessServiceFactory() ); + const Reference< XGraphicProvider > xGraphicProvider( aContext.createComponent( "com.sun.star.graphic.GraphicProvider" ), UNO_QUERY_THROW ); + + const bool isHighContrast = pThrobber->GetSettings().GetStyleSettings().GetHighContrastMode(); + + sal_Int32 nPreferredSet = -1; + const size_t nImageSetCount = i_data.aCachedImageSets.size(); + if ( nImageSetCount < 2 ) + { + nPreferredSet = sal_Int32( nImageSetCount ) - 1; + } + else + { + ::std::vector< Size > aImageSizes( nImageSetCount ); + for ( sal_Int32 nImageSet = 0; size_t( nImageSet ) < nImageSetCount; ++nImageSet ) + { + ::std::vector< CachedImage > const& rImageSet( i_data.aCachedImageSets[ nImageSet ] ); + if ( ( rImageSet.empty() ) + || ( !lcl_ensureImage_throw( xGraphicProvider, isHighContrast, rImageSet[0] ) ) + ) + { + aImageSizes[ nImageSet ] = Size( ::std::numeric_limits< long >::max(), ::std::numeric_limits< long >::max() ); + } + else + { + aImageSizes[ nImageSet ] = lcl_getGraphicSizePixel( rImageSet[0].xGraphic ); + } + } + + // find the set with the smallest difference between window size and image size + const ::Size aWindowSizePixel = pThrobber->GetSizePixel(); + long nMinimalDistance = ::std::numeric_limits< long >::max(); + for ( ::std::vector< Size >::const_iterator check = aImageSizes.begin(); + check != aImageSizes.end(); + ++check + ) + { + const sal_Int64 distance = + ( aWindowSizePixel.Width() - check->Width ) * ( aWindowSizePixel.Width() - check->Width ) + + ( aWindowSizePixel.Height() - check->Height ) * ( aWindowSizePixel.Height() - check->Height ); + if ( distance < nMinimalDistance ) + { + nMinimalDistance = distance; + nPreferredSet = check - aImageSizes.begin(); + } + } + } + + // found a set? + Sequence< Reference< XGraphic > > aImages; + if ( ( nPreferredSet >= 0 ) && ( size_t( nPreferredSet ) < nImageSetCount ) ) + { + // => set the images + ::std::vector< CachedImage > const& rImageSet( i_data.aCachedImageSets[ nPreferredSet ] ); + aImages.realloc( rImageSet.size() ); + sal_Int32 imageIndex = 0; + for ( ::std::vector< CachedImage >::const_iterator cachedImage = rImageSet.begin(); + cachedImage != rImageSet.end(); + ++cachedImage, ++imageIndex + ) + { + lcl_ensureImage_throw( xGraphicProvider, isHighContrast, *cachedImage ); + aImages[ imageIndex ] = cachedImage->xGraphic; + } + } + pThrobber->setImageList( aImages ); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + } + + //-------------------------------------------------------------------------------------------------------------- + void lcl_updateImageList_nothrow( AnimatedImagesPeer_Data& i_data, const Reference< XAnimatedImages >& i_images ) + { + try + { + const sal_Int32 nImageSetCount = i_images->getImageSetCount(); + i_data.aCachedImageSets.resize(0); + for ( sal_Int32 set = 0; set < nImageSetCount; ++set ) + { + const Sequence< ::rtl::OUString > aImageURLs( i_images->getImageSet( set ) ); + ::std::vector< CachedImage > aImages; + lcl_init( aImageURLs, aImages ); + i_data.aCachedImageSets.push_back( aImages ); + } + + lcl_updateImageList_nothrow( i_data ); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + } + } + + //================================================================================================================== + //= AnimatedImagesPeer + //================================================================================================================== + //------------------------------------------------------------------------------------------------------------------ + AnimatedImagesPeer::AnimatedImagesPeer() + :AnimatedImagesPeer_Base() + ,m_pData( new AnimatedImagesPeer_Data( *this ) ) + { + } + + //------------------------------------------------------------------------------------------------------------------ + AnimatedImagesPeer::~AnimatedImagesPeer() + { + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL AnimatedImagesPeer::startAnimation( ) throw (RuntimeException) + { + ::vos::OGuard aGuard( GetMutex() ); + Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) ); + if ( pThrobber != NULL) + pThrobber->start(); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL AnimatedImagesPeer::stopAnimation( ) throw (RuntimeException) + { + ::vos::OGuard aGuard( GetMutex() ); + Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) ); + if ( pThrobber != NULL) + pThrobber->stop(); + } + + //------------------------------------------------------------------------------------------------------------------ + ::sal_Bool SAL_CALL AnimatedImagesPeer::isAnimationRunning( ) throw (RuntimeException) + { + ::vos::OGuard aGuard( GetMutex() ); + Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) ); + if ( pThrobber != NULL) + return pThrobber->isRunning(); + return sal_False; + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL AnimatedImagesPeer::setProperty( const ::rtl::OUString& i_propertyName, const Any& i_value ) throw(RuntimeException) + { + ::vos::OGuard aGuard( GetMutex() ); + + Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) ); + if ( pThrobber == NULL ) + { + VCLXWindow::setProperty( i_propertyName, i_value ); + return; + } + + const sal_uInt16 nPropertyId = GetPropertyId( i_propertyName ); + switch ( nPropertyId ) + { + case BASEPROPERTY_STEP_TIME: + { + sal_Int32 nStepTime( 0 ); + if ( i_value >>= nStepTime ) + pThrobber->setStepTime( nStepTime ); + break; + } + case BASEPROPERTY_AUTO_REPEAT: + { + sal_Bool bRepeat( sal_True ); + if ( i_value >>= bRepeat ) + pThrobber->setRepeat( bRepeat ); + break; + } + + case BASEPROPERTY_IMAGE_SCALE_MODE: + { + sal_Int16 nScaleMode( ImageScaleMode::Anisotropic ); + ImageControl* pImageControl = dynamic_cast< ImageControl* >( GetWindow() ); + if ( pImageControl && ( i_value >>= nScaleMode ) ) + { + pImageControl->SetScaleMode( nScaleMode ); + } + } + break; + + default: + AnimatedImagesPeer_Base::setProperty( i_propertyName, i_value ); + break; + } + } + + //------------------------------------------------------------------------------------------------------------------ + Any SAL_CALL AnimatedImagesPeer::getProperty( const ::rtl::OUString& i_propertyName ) throw(RuntimeException) + { + ::vos::OGuard aGuard( GetMutex() ); + + Any aReturn; + + Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) ); + if ( pThrobber == NULL ) + return VCLXWindow::getProperty( i_propertyName ); + + const sal_uInt16 nPropertyId = GetPropertyId( i_propertyName ); + switch ( nPropertyId ) + { + case BASEPROPERTY_STEP_TIME: + aReturn <<= pThrobber->getStepTime(); + break; + + case BASEPROPERTY_AUTO_REPEAT: + aReturn <<= pThrobber->getRepeat(); + break; + + case BASEPROPERTY_IMAGE_SCALE_MODE: + { + ImageControl const* pImageControl = dynamic_cast< ImageControl* >( GetWindow() ); + aReturn <<= ( pImageControl ? pImageControl->GetScaleMode() : ImageScaleMode::Anisotropic ); + } + break; + + default: + aReturn = AnimatedImagesPeer_Base::getProperty( i_propertyName ); + break; + } + + return aReturn; + } + + //------------------------------------------------------------------------------------------------------------------ + void AnimatedImagesPeer::ProcessWindowEvent( const VclWindowEvent& i_windowEvent ) + { + switch ( i_windowEvent.GetId() ) + { + case VCLEVENT_WINDOW_RESIZE: + lcl_updateImageList_nothrow( *m_pData ); + break; + } + + AnimatedImagesPeer_Base::ProcessWindowEvent( i_windowEvent ); + } + + //------------------------------------------------------------------------------------------------------------------ + void AnimatedImagesPeer::impl_updateImages_nolck( const Reference< XInterface >& i_animatedImages ) + { + ::vos::OGuard aGuard( GetMutex() ); + + lcl_updateImageList_nothrow( *m_pData, Reference< XAnimatedImages >( i_animatedImages, UNO_QUERY_THROW ) ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL AnimatedImagesPeer::elementInserted( const ContainerEvent& i_event ) throw (RuntimeException) + { + ::vos::OGuard aGuard( GetMutex() ); + Reference< XAnimatedImages > xAnimatedImages( i_event.Source, UNO_QUERY_THROW ); + + sal_Int32 nPosition(0); + OSL_VERIFY( i_event.Accessor >>= nPosition ); + size_t position = size_t( nPosition ); + if ( position > m_pData->aCachedImageSets.size() ) + { + OSL_ENSURE( false, "AnimatedImagesPeer::elementInserted: illegal accessor/index!" ); + lcl_updateImageList_nothrow( *m_pData, xAnimatedImages ); + } + + Sequence< ::rtl::OUString > aImageURLs; + OSL_VERIFY( i_event.Element >>= aImageURLs ); + ::std::vector< CachedImage > aImages; + lcl_init( aImageURLs, aImages ); + m_pData->aCachedImageSets.insert( m_pData->aCachedImageSets.begin() + position, aImages ); + lcl_updateImageList_nothrow( *m_pData ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL AnimatedImagesPeer::elementRemoved( const ContainerEvent& i_event ) throw (RuntimeException) + { + ::vos::OGuard aGuard( GetMutex() ); + Reference< XAnimatedImages > xAnimatedImages( i_event.Source, UNO_QUERY_THROW ); + + sal_Int32 nPosition(0); + OSL_VERIFY( i_event.Accessor >>= nPosition ); + size_t position = size_t( nPosition ); + if ( position >= m_pData->aCachedImageSets.size() ) + { + OSL_ENSURE( false, "AnimatedImagesPeer::elementRemoved: illegal accessor/index!" ); + lcl_updateImageList_nothrow( *m_pData, xAnimatedImages ); + } + + m_pData->aCachedImageSets.erase( m_pData->aCachedImageSets.begin() + position ); + lcl_updateImageList_nothrow( *m_pData ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL AnimatedImagesPeer::elementReplaced( const ContainerEvent& i_event ) throw (RuntimeException) + { + ::vos::OGuard aGuard( GetMutex() ); + Reference< XAnimatedImages > xAnimatedImages( i_event.Source, UNO_QUERY_THROW ); + + sal_Int32 nPosition(0); + OSL_VERIFY( i_event.Accessor >>= nPosition ); + size_t position = size_t( nPosition ); + if ( position >= m_pData->aCachedImageSets.size() ) + { + OSL_ENSURE( false, "AnimatedImagesPeer::elementReplaced: illegal accessor/index!" ); + lcl_updateImageList_nothrow( *m_pData, xAnimatedImages ); + } + + Sequence< ::rtl::OUString > aImageURLs; + OSL_VERIFY( i_event.Element >>= aImageURLs ); + ::std::vector< CachedImage > aImages; + lcl_init( aImageURLs, aImages ); + m_pData->aCachedImageSets[ position ] = aImages; + lcl_updateImageList_nothrow( *m_pData ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL AnimatedImagesPeer::disposing( const EventObject& i_event ) throw (RuntimeException) + { + VCLXWindow::disposing( i_event ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL AnimatedImagesPeer::modified( const EventObject& i_event ) throw (RuntimeException) + { + impl_updateImages_nolck( i_event.Source ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL AnimatedImagesPeer::dispose( ) throw(RuntimeException) + { + AnimatedImagesPeer_Base::dispose(); + ::vos::OGuard aGuard( GetMutex() ); + m_pData->aCachedImageSets.resize(0); + } + +//...................................................................................................................... +} // namespace toolkit +//...................................................................................................................... diff --git a/toolkit/source/awt/makefile.mk b/toolkit/source/awt/makefile.mk deleted file mode 100644 index 88b40a597410..000000000000 --- a/toolkit/source/awt/makefile.mk +++ /dev/null @@ -1,84 +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. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=toolkit -TARGET=awt - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -.IF "$(GUIBASE)"=="aqua" -CFLAGSCXX+=$(OBJCXXFLAGS) -.ENDIF # "$(GUIBASE)"=="aqua" - -SLOFILES= \ - $(SLO)$/stylesettings.obj \ - $(SLO)$/vclxaccessiblecomponent.obj \ - $(SLO)$/vclxbitmap.obj \ - $(SLO)$/vclxcontainer.obj \ - $(SLO)$/vclxdevice.obj \ - $(SLO)$/vclxfont.obj \ - $(SLO)$/vclxgraphics.obj \ - $(SLO)$/vclxmenu.obj \ - $(SLO)$/vclxpointer.obj \ - $(SLO)$/vclxprinter.obj \ - $(SLO)$/vclxregion.obj \ - $(SLO)$/vclxsystemdependentwindow.obj \ - $(SLO)$/vclxtoolkit.obj \ - $(SLO)$/vclxtopwindow.obj \ - $(SLO)$/vclxwindow.obj \ - $(SLO)$/vclxwindow1.obj \ - $(SLO)$/vclxwindows.obj \ - $(SLO)$/vclxspinbutton.obj \ - $(SLO)$/xsimpleanimation.obj \ - $(SLO)$/xthrobber.obj \ - $(SLO)$/asynccallback.obj\ - $(SLO)/vclxbutton.obj\ - $(SLO)/vclxdialog.obj\ - $(SLO)/vclxfixedline.obj\ - $(SLO)/vclxplugin.obj\ - $(SLO)/vclxscroller.obj\ - $(SLO)/vclxsplitter.obj\ - $(SLO)/vclxtabcontrol.obj\ - $(SLO)/vclxtabpage.obj - -SRS1NAME=$(TARGET) -SRC1FILES=\ - xthrobber.src - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx index 1af422bf7f00..a609a7df3268 100644 --- a/toolkit/source/awt/vclxtoolkit.cxx +++ b/toolkit/source/awt/vclxtoolkit.cxx @@ -33,6 +33,7 @@ #include <tools/svwin.h> #endif #include <stdio.h> +#include <com/sun/star/awt/ImageScaleMode.hpp> #include <com/sun/star/awt/WindowAttribute.hpp> #include <com/sun/star/awt/VclWindowPeerAttribute.hpp> #include <com/sun/star/awt/WindowClass.hpp> @@ -71,6 +72,7 @@ #include <toolkit/awt/xsimpleanimation.hxx> #include <toolkit/awt/xthrobber.hxx> +#include <toolkit/awt/animatedimagespeer.hxx> #include <toolkit/awt/vclxtopwindow.hxx> #include <toolkit/awt/vclxwindow.hxx> #include <toolkit/helper/vclunohelper.hxx> @@ -115,6 +117,7 @@ #include <vcl/virdev.hxx> #include <vcl/window.hxx> #include <vcl/wrkwin.hxx> +#include <vcl/throbber.hxx> #include "toolkit/awt/vclxspinbutton.hxx" #include <tools/debug.hxx> @@ -313,6 +316,7 @@ static ComponentInfo __FAR_DATA aComponentInfos [] = { "scrollbar", WINDOW_SCROLLBAR }, { "scrollbarbox", WINDOW_SCROLLBARBOX }, { "simpleanimation", WINDOW_CONTROL }, + { "animatedimages", WINDOW_CONTROL }, { "spinbutton", WINDOW_SPINBUTTON }, { "spinfield", WINDOW_SPINFIELD }, { "throbber", WINDOW_CONTROL }, @@ -984,22 +988,29 @@ Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp, } break; case WINDOW_CONTROL: - if ( rDescriptor.WindowServiceName.equalsIgnoreAsciiCase( - ::rtl::OUString::createFromAscii("simpleanimation") ) ) + if ( aServiceName.EqualsAscii( "simpleanimation" ) ) { - nWinBits |= WB_SCALE; - pNewWindow = new FixedImage( pParent, nWinBits ); + pNewWindow = new Throbber( pParent, nWinBits, Throbber::IMAGES_NONE ); + ((Throbber*)pNewWindow)->SetScaleMode( css::awt::ImageScaleMode::Anisotropic ); + // (compatibility) *ppNewComp = new ::toolkit::XSimpleAnimation; } - else if ( rDescriptor.WindowServiceName.equalsIgnoreAsciiCase( - ::rtl::OUString::createFromAscii("throbber") ) ) + else if ( aServiceName.EqualsAscii( "throbber" ) ) { - nWinBits |= WB_SCALE; - pNewWindow = new FixedImage( pParent, nWinBits ); + pNewWindow = new Throbber( pParent, nWinBits, Throbber::IMAGES_NONE ); + ((Throbber*)pNewWindow)->SetScaleMode( css::awt::ImageScaleMode::Anisotropic ); + // (compatibility) *ppNewComp = new ::toolkit::XThrobber; } + else if ( aServiceName.EqualsAscii( "animatedimages" ) ) + { + pNewWindow = new Throbber( pParent, nWinBits ); + *ppNewComp = new ::toolkit::AnimatedImagesPeer; + } break; - default: DBG_ERRORFILE( "UNO3!" ); + default: + OSL_ENSURE( false, "VCLXToolkit::ImplCreateWindow: unknown window type!" ); + break; } } diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx index 06c9167336a8..cc247c40b9a1 100644 --- a/toolkit/source/awt/vclxwindows.cxx +++ b/toolkit/source/awt/vclxwindows.cxx @@ -219,7 +219,7 @@ void VCLXGraphicControl::ImplSetNewImage() { OSL_PRECOND( GetWindow(), "VCLXGraphicControl::ImplSetNewImage: window is required to be not-NULL!" ); Button* pButton = static_cast< Button* >( GetWindow() ); - pButton->SetModeBitmap( GetBitmap() ); + pButton->SetModeImage( GetImage() ); } void VCLXGraphicControl::setPosSize( sal_Int32 X, sal_Int32 Y, sal_Int32 Width, sal_Int32 Height, short Flags ) throw(::com::sun::star::uno::RuntimeException) @@ -660,14 +660,14 @@ void VCLXImageControl::ImplSetNewImage() { OSL_PRECOND( GetWindow(), "VCLXImageControl::ImplSetNewImage: window is required to be not-NULL!" ); ImageControl* pControl = static_cast< ImageControl* >( GetWindow() ); - pControl->SetBitmap( GetBitmap() ); + pControl->SetImage( GetImage() ); } ::com::sun::star::awt::Size VCLXImageControl::getMinimumSize( ) throw(::com::sun::star::uno::RuntimeException) { ::vos::OGuard aGuard( GetMutex() ); - Size aSz = GetBitmap().GetSizePixel(); + Size aSz = GetImage().GetSizePixel(); aSz = ImplCalcWindowSize( aSz ); return AWTSize(aSz); diff --git a/toolkit/source/awt/xsimpleanimation.cxx b/toolkit/source/awt/xsimpleanimation.cxx index c7ccbde118f4..75701cb94b46 100644 --- a/toolkit/source/awt/xsimpleanimation.cxx +++ b/toolkit/source/awt/xsimpleanimation.cxx @@ -29,8 +29,8 @@ #include "precompiled_toolkit.hxx" #include "toolkit/awt/xsimpleanimation.hxx" #include "toolkit/helper/property.hxx" -#include "toolkit/helper/throbberimpl.hxx" #include <tools/debug.hxx> +#include <vcl/throbber.hxx> //........................................................................ namespace toolkit @@ -48,54 +48,40 @@ namespace toolkit XSimpleAnimation::XSimpleAnimation() { DBG_CTOR( XSimpleAnimation, NULL ); - mbRepeat = sal_True; - mnStepTime = 100; - mpThrobber = new Throbber_Impl( this, mnStepTime, mbRepeat ); } //-------------------------------------------------------------------- XSimpleAnimation::~XSimpleAnimation() { DBG_DTOR( XSimpleAnimation, NULL ); - delete mpThrobber; } //-------------------------------------------------------------------- - IMPLEMENT_FORWARD_XINTERFACE2( XSimpleAnimation, VCLXWindow, XSimpleAnimation_Base ) - - //-------------------------------------------------------------------- - IMPLEMENT_FORWARD_XTYPEPROVIDER2( XSimpleAnimation, VCLXWindow, XSimpleAnimation_Base ) - - //-------------------------------------------------------------------- void SAL_CALL XSimpleAnimation::start() throw ( uno::RuntimeException ) { - mpThrobber->start(); + ::vos::OGuard aGuard( GetMutex() ); + Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) ); + if ( pThrobber != NULL) + pThrobber->start(); } //-------------------------------------------------------------------- void SAL_CALL XSimpleAnimation::stop() throw ( uno::RuntimeException ) { - mpThrobber->stop(); + ::vos::OGuard aGuard( GetMutex() ); + Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) ); + if ( pThrobber != NULL) + pThrobber->stop(); } //-------------------------------------------------------------------- void SAL_CALL XSimpleAnimation::setImageList( const uno::Sequence< uno::Reference< graphic::XGraphic > >& rImageList ) throw ( uno::RuntimeException ) { - mpThrobber->setImageList( rImageList ); - } - - //-------------------------------------------------------------------- - void XSimpleAnimation::ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent ) - { - // TODO: XSimpleAnimation::ProcessWindowEvent - //::vos::OClearableGuard aGuard( GetMutex() ); - //Reference< XSimpleAnimation > xKeepAlive( this ); - //SpinButton* pSpinButton = static_cast< SpinButton* >( GetWindow() ); - //if ( !pSpinButton ) - // return; - - VCLXWindow::ProcessWindowEvent( _rVclWindowEvent ); + ::vos::OGuard aGuard( GetMutex() ); + Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) ); + if ( pThrobber != NULL) + pThrobber->setImageList( rImageList ); } //-------------------------------------------------------------------- @@ -104,33 +90,31 @@ namespace toolkit { ::vos::OGuard aGuard( GetMutex() ); - if ( GetWindow() ) + Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) ); + if ( pThrobber == NULL ) { - sal_uInt16 nPropertyId = GetPropertyId( PropertyName ); - switch ( nPropertyId ) - { - case BASEPROPERTY_STEP_TIME: { - sal_Int32 nStepTime( 0 ); - if ( Value >>= nStepTime ) - { - mnStepTime = nStepTime; - mpThrobber->setStepTime( mnStepTime ); - } - - break; - } - case BASEPROPERTY_REPEAT: { - sal_Bool bRepeat( sal_True ); - if ( Value >>= bRepeat ) - { - mbRepeat = bRepeat; - mpThrobber->setRepeat( mbRepeat ); - } - break; - } - default: - VCLXWindow::setProperty( PropertyName, Value ); + VCLXWindow::setProperty( PropertyName, Value ); + return; + } + + sal_uInt16 nPropertyId = GetPropertyId( PropertyName ); + switch ( nPropertyId ) + { + case BASEPROPERTY_STEP_TIME: { + sal_Int32 nStepTime( 0 ); + if ( Value >>= nStepTime ) + pThrobber->setStepTime( nStepTime ); + + break; } + case BASEPROPERTY_REPEAT: { + sal_Bool bRepeat( sal_True ); + if ( Value >>= bRepeat ) + pThrobber->setRepeat( bRepeat ); + break; + } + default: + VCLXWindow::setProperty( PropertyName, Value ); } } @@ -140,22 +124,22 @@ namespace toolkit { ::vos::OGuard aGuard( GetMutex() ); - uno::Any aReturn; + Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) ); + if ( pThrobber == NULL ) + return VCLXWindow::getProperty( PropertyName ); - if ( GetWindow() ) + uno::Any aReturn; + sal_uInt16 nPropertyId = GetPropertyId( PropertyName ); + switch ( nPropertyId ) { - sal_uInt16 nPropertyId = GetPropertyId( PropertyName ); - switch ( nPropertyId ) - { - case BASEPROPERTY_STEP_TIME: - aReturn <<= mnStepTime; - break; - case BASEPROPERTY_REPEAT: - aReturn <<= mbRepeat; - break; - default: - aReturn = VCLXWindow::getProperty( PropertyName ); - } + case BASEPROPERTY_STEP_TIME: + aReturn <<= pThrobber->getStepTime(); + break; + case BASEPROPERTY_REPEAT: + aReturn <<= pThrobber->getRepeat(); + break; + default: + aReturn = VCLXWindow::getProperty( PropertyName ); } return aReturn; } diff --git a/toolkit/source/awt/xthrobber.cxx b/toolkit/source/awt/xthrobber.cxx index 439fb49c1cbe..3b9b361202e9 100644 --- a/toolkit/source/awt/xthrobber.cxx +++ b/toolkit/source/awt/xthrobber.cxx @@ -30,7 +30,6 @@ #include "toolkit/awt/xthrobber.hxx" #include "toolkit/helper/property.hxx" #include <toolkit/helper/tkresmgr.hxx> -#include <toolkit/helper/throbberimpl.hxx> #ifndef _TOOLKIT_AWT_XTHROBBER_HRC_ #include "xthrobber.hrc" @@ -38,6 +37,7 @@ #include <tools/debug.hxx> #include <vcl/fixed.hxx> #include <vcl/timer.hxx> +#include <vcl/throbber.hxx> //........................................................................ namespace toolkit @@ -55,82 +55,37 @@ namespace toolkit XThrobber::XThrobber() { DBG_CTOR( XThrobber, NULL ); - - mpThrobber = new Throbber_Impl( this, 100, sal_True ); - - InitImageList(); } //-------------------------------------------------------------------- XThrobber::~XThrobber() { DBG_DTOR( XThrobber, NULL ); - delete mpThrobber; } //-------------------------------------------------------------------- - IMPLEMENT_FORWARD_XINTERFACE2( XThrobber, VCLXWindow, XThrobber_Base ) - - //-------------------------------------------------------------------- - IMPLEMENT_FORWARD_XTYPEPROVIDER2( XThrobber, VCLXWindow, XThrobber_Base ) - - //-------------------------------------------------------------------- void SAL_CALL XThrobber::start() throw ( uno::RuntimeException ) { - mpThrobber->start(); + ::vos::OGuard aGuard( GetMutex() ); + Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) ); + if ( pThrobber != NULL) + pThrobber->start(); } //-------------------------------------------------------------------- void SAL_CALL XThrobber::stop() throw ( uno::RuntimeException ) { - mpThrobber->stop(); - } - - //-------------------------------------------------------------------- - void XThrobber::ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent ) - { - static bool bInit = false; - if ( !bInit ) - { - // Images won't be shown if set too early - mpThrobber->initImage(); - bInit = true; - } - // TODO: XSimpleAnimation::ProcessWindowEvent - //::vos::OClearableGuard aGuard( GetMutex() ); - //Reference< XSimpleAnimation > xKeepAlive( this ); - //SpinButton* pSpinButton = static_cast< SpinButton* >( GetWindow() ); - //if ( !pSpinButton ) - // return; - - VCLXWindow::ProcessWindowEvent( _rVclWindowEvent ); - } - - //-------------------------------------------------------------------- - void SAL_CALL XThrobber::setProperty( const ::rtl::OUString& PropertyName, const uno::Any& Value ) - throw( uno::RuntimeException ) - { ::vos::OGuard aGuard( GetMutex() ); - - if ( GetWindow() ) - { - VCLXWindow::setProperty( PropertyName, Value ); - } + Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) ); + if ( pThrobber != NULL) + pThrobber->stop(); } //-------------------------------------------------------------------- - uno::Any SAL_CALL XThrobber::getProperty( const ::rtl::OUString& PropertyName ) - throw( uno::RuntimeException ) + void XThrobber::SetWindow( Window* pWindow ) { - ::vos::OGuard aGuard( GetMutex() ); - - uno::Any aReturn; - - if ( GetWindow() ) - { - aReturn = VCLXWindow::getProperty( PropertyName ); - } - return aReturn; + XThrobber_Base::SetWindow( pWindow ); + InitImageList(); } //-------------------------------------------------------------------- @@ -138,10 +93,15 @@ namespace toolkit throw( uno::RuntimeException ) { ::vos::OGuard aGuard( GetMutex() ); + + Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) ); + if ( pThrobber == NULL) + return; + uno::Sequence< uno::Reference< graphic::XGraphic > > aImageList(12); sal_uInt16 nIconIdStart = RID_TK_ICON_THROBBER_START; - if ( mpThrobber->isHCMode() ) + if ( pThrobber->GetSettings().GetStyleSettings().GetHighContrastMode() ) nIconIdStart = RID_TK_HC_ICON_THROBBER_START; for ( sal_uInt16 i=0; i<12; i++ ) @@ -150,7 +110,7 @@ namespace toolkit aImageList[i] = aImage.GetXGraphic(); } - mpThrobber->setImageList( aImageList ); + pThrobber->setImageList( aImageList ); } //........................................................................ diff --git a/toolkit/source/controls/animatedimages.cxx b/toolkit/source/controls/animatedimages.cxx new file mode 100755 index 000000000000..03cb2f26f324 --- /dev/null +++ b/toolkit/source/controls/animatedimages.cxx @@ -0,0 +1,491 @@ +/************************************************************************* + * 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. + * + ************************************************************************/ + +#include "precompiled_toolkit.hxx" + +#include "toolkit/controls/animatedimages.hxx" +#include "toolkit/helper/servicenames.hxx" +#include "toolkit/helper/property.hxx" +#include "toolkit/helper/unopropertyarrayhelper.hxx" + +/** === begin UNO includes === **/ +#include <com/sun/star/lang/DisposedException.hpp> +#include <com/sun/star/awt/VisualEffect.hpp> +#include <com/sun/star/awt/ImageScaleMode.hpp> +#include <com/sun/star/util/XModifyListener.hpp> +/** === end UNO includes === **/ + +//...................................................................................................................... +namespace toolkit +{ +//...................................................................................................................... + + /** === begin UNO using === **/ + using ::com::sun::star::uno::Reference; + using ::com::sun::star::uno::XInterface; + using ::com::sun::star::uno::UNO_QUERY; + using ::com::sun::star::uno::UNO_QUERY_THROW; + using ::com::sun::star::uno::UNO_SET_THROW; + using ::com::sun::star::uno::Exception; + using ::com::sun::star::uno::RuntimeException; + using ::com::sun::star::uno::Any; + using ::com::sun::star::uno::makeAny; + using ::com::sun::star::uno::Sequence; + using ::com::sun::star::uno::Type; + using ::com::sun::star::container::ContainerEvent; + using ::com::sun::star::container::XContainerListener; + using ::com::sun::star::beans::XPropertySetInfo; + using ::com::sun::star::lang::DisposedException; + using ::com::sun::star::lang::IndexOutOfBoundsException; + using ::com::sun::star::lang::EventObject; + using ::com::sun::star::awt::XControlModel; + using ::com::sun::star::awt::XAnimatedImages; + using ::com::sun::star::lang::IllegalArgumentException; + using ::com::sun::star::awt::XWindowPeer; + using ::com::sun::star::util::XModifyListener; + using ::com::sun::star::awt::XToolkit; + /** === end UNO using === **/ + namespace VisualEffect = ::com::sun::star::awt::VisualEffect; + namespace ImageScaleMode = ::com::sun::star::awt::ImageScaleMode; + + //================================================================================================================== + //= AnimatedImagesControl + //================================================================================================================== + //------------------------------------------------------------------------------------------------------------------ + AnimatedImagesControl::AnimatedImagesControl() + :AnimatedImagesControl_Base() + { + } + + //------------------------------------------------------------------------------------------------------------------ + ::rtl::OUString AnimatedImagesControl::GetComponentServiceName() + { + return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "AnimatedImages" ) ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL AnimatedImagesControl::startAnimation( ) throw (RuntimeException) + { + Reference< XAnimation > xAnimation( getPeer(), UNO_QUERY ); + if ( xAnimation.is() ) + xAnimation->startAnimation(); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL AnimatedImagesControl::stopAnimation( ) throw (RuntimeException) + { + Reference< XAnimation > xAnimation( getPeer(), UNO_QUERY ); + if ( xAnimation.is() ) + xAnimation->stopAnimation(); + } + + //------------------------------------------------------------------------------------------------------------------ + ::sal_Bool SAL_CALL AnimatedImagesControl::isAnimationRunning( ) throw (RuntimeException) + { + Reference< XAnimation > xAnimation( getPeer(), UNO_QUERY ); + if ( xAnimation.is() ) + return xAnimation->isAnimationRunning(); + return sal_False; + } + + //------------------------------------------------------------------------------------------------------------------ + ::rtl::OUString SAL_CALL AnimatedImagesControl::getImplementationName( ) throw(RuntimeException) + { + return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.comp.toolkit.AnimatedImagesControl" ) ); + } + + //------------------------------------------------------------------------------------------------------------------ + Sequence< ::rtl::OUString > SAL_CALL AnimatedImagesControl::getSupportedServiceNames() throw(RuntimeException) + { + Sequence< ::rtl::OUString > aServices( AnimatedImagesControl_Base::getSupportedServiceNames() ); + aServices.realloc( aServices.getLength() + 1 ); + aServices[ aServices.getLength() - 1 ] = ::rtl::OUString::createFromAscii( szServiceName_AnimatedImagesControl ); + return aServices; + } + + //------------------------------------------------------------------------------------------------------------------ + namespace + { + void lcl_updatePeer( Reference< XWindowPeer > const& i_peer, Reference< XControlModel > const& i_model ) + { + const Reference< XModifyListener > xPeerModify( i_peer, UNO_QUERY ); + if ( xPeerModify.is() ) + { + EventObject aEvent; + aEvent.Source = i_model; + xPeerModify->modified( aEvent ); + } + } + } + + //------------------------------------------------------------------------------------------------------------------ + sal_Bool SAL_CALL AnimatedImagesControl::setModel( const Reference< XControlModel >& i_rModel ) throw ( RuntimeException ) + { + const Reference< XAnimatedImages > xOldContainer( getModel(), UNO_QUERY ); + const Reference< XAnimatedImages > xNewContainer( i_rModel, UNO_QUERY ); + + if ( !AnimatedImagesControl_Base::setModel( i_rModel ) ) + return sal_False; + + if ( xOldContainer.is() ) + xOldContainer->removeContainerListener( this ); + + if ( xNewContainer.is() ) + xNewContainer->addContainerListener( this ); + + lcl_updatePeer( getPeer(), getModel() ); + + return sal_True; + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL AnimatedImagesControl::createPeer( const Reference< XToolkit >& i_toolkit, const Reference< XWindowPeer >& i_parentPeer ) throw(RuntimeException) + { + AnimatedImagesControl_Base::createPeer( i_toolkit, i_parentPeer ); + + lcl_updatePeer( getPeer(), getModel() ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL AnimatedImagesControl::elementInserted( const ContainerEvent& i_event ) throw (RuntimeException) + { + const Reference< XContainerListener > xPeerListener( getPeer(), UNO_QUERY ); + if ( xPeerListener.is() ) + xPeerListener->elementInserted( i_event ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL AnimatedImagesControl::elementRemoved( const ContainerEvent& i_event ) throw (RuntimeException) + { + const Reference< XContainerListener > xPeerListener( getPeer(), UNO_QUERY ); + if ( xPeerListener.is() ) + xPeerListener->elementRemoved( i_event ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL AnimatedImagesControl::elementReplaced( const ContainerEvent& i_event ) throw (RuntimeException) + { + const Reference< XContainerListener > xPeerListener( getPeer(), UNO_QUERY ); + if ( xPeerListener.is() ) + xPeerListener->elementReplaced( i_event ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL AnimatedImagesControl::disposing( const EventObject& i_event ) throw (RuntimeException) + { + UnoControlBase::disposing( i_event ); + } + + //================================================================================================================== + //= AnimatedImagesControlModel_Data + //================================================================================================================== + struct AnimatedImagesControlModel_Data + { + ::std::vector< Sequence< ::rtl::OUString > > aImageSets; + }; + + namespace + { + void lcl_checkIndex( const AnimatedImagesControlModel_Data& i_data, const sal_Int32 i_index, const Reference< XInterface >& i_context, + const bool i_forInsert = false ) + { + if ( ( i_index < 0 ) || ( size_t( i_index ) > i_data.aImageSets.size() + ( i_forInsert ? 1 : 0 ) ) ) + throw IndexOutOfBoundsException( ::rtl::OUString(), i_context ); + } + + void lcl_notify( ::osl::ClearableMutexGuard& i_guard, ::cppu::OBroadcastHelper& i_broadcaseHelper, + void ( SAL_CALL XContainerListener::*i_notificationMethod )( const ContainerEvent& ), + const sal_Int32 i_accessor, const Sequence< ::rtl::OUString >& i_imageURLs, const Reference< XInterface >& i_context ) + { + ::cppu::OInterfaceContainerHelper* pContainerListeners = i_broadcaseHelper.getContainer( XContainerListener::static_type() ); + if ( pContainerListeners == NULL ) + return; + + ContainerEvent aEvent; + aEvent.Source = i_context; + aEvent.Accessor <<= i_accessor; + aEvent.Element <<= i_imageURLs; + + i_guard.clear(); + pContainerListeners->notifyEach( i_notificationMethod, aEvent ); + } + } + + //================================================================================================================== + //= AnimatedImagesControlModel + //================================================================================================================== + //------------------------------------------------------------------------------------------------------------------ + AnimatedImagesControlModel::AnimatedImagesControlModel() + :m_pData( new AnimatedImagesControlModel_Data ) + { + ImplRegisterProperty( BASEPROPERTY_AUTO_REPEAT ); + ImplRegisterProperty( BASEPROPERTY_BORDER ); + ImplRegisterProperty( BASEPROPERTY_BORDERCOLOR ); + ImplRegisterProperty( BASEPROPERTY_BACKGROUNDCOLOR ); + ImplRegisterProperty( BASEPROPERTY_DEFAULTCONTROL ); + ImplRegisterProperty( BASEPROPERTY_ENABLEVISIBLE ); + ImplRegisterProperty( BASEPROPERTY_HELPTEXT ); + ImplRegisterProperty( BASEPROPERTY_HELPURL ); + ImplRegisterProperty( BASEPROPERTY_IMAGE_SCALE_MODE ); + ImplRegisterProperty( BASEPROPERTY_STEP_TIME ); + } + + //------------------------------------------------------------------------------------------------------------------ + AnimatedImagesControlModel::AnimatedImagesControlModel( const AnimatedImagesControlModel& i_copySource ) + :AnimatedImagesControlModel_Base( i_copySource ) + ,m_pData( new AnimatedImagesControlModel_Data( *i_copySource.m_pData ) ) + { + } + + //------------------------------------------------------------------------------------------------------------------ + AnimatedImagesControlModel::~AnimatedImagesControlModel() + { + } + + //------------------------------------------------------------------------------------------------------------------ + UnoControlModel* AnimatedImagesControlModel::Clone() const + { + return new AnimatedImagesControlModel( *this ); + } + + //------------------------------------------------------------------------------------------------------------------ + Reference< XPropertySetInfo > SAL_CALL AnimatedImagesControlModel::getPropertySetInfo( ) throw(RuntimeException) + { + static Reference< XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) ); + return xInfo; + } + + //------------------------------------------------------------------------------------------------------------------ + ::rtl::OUString SAL_CALL AnimatedImagesControlModel::getServiceName() throw(RuntimeException) + { + return ::rtl::OUString::createFromAscii( szServiceName_AnimatedImagesControlModel ); + } + + //------------------------------------------------------------------------------------------------------------------ + ::rtl::OUString SAL_CALL AnimatedImagesControlModel::getImplementationName( ) throw(RuntimeException) + { + return ::rtl::OUString::createFromAscii( "org.openoffice.comp.toolkit.AnimatedImagesControlModel" ); + } + + //------------------------------------------------------------------------------------------------------------------ + Sequence< ::rtl::OUString > SAL_CALL AnimatedImagesControlModel::getSupportedServiceNames() throw(RuntimeException) + { + Sequence< ::rtl::OUString > aServiceNames(2); + aServiceNames[0] = ::rtl::OUString::createFromAscii( szServiceName_AnimatedImagesControlModel ); + aServiceNames[1] = ::rtl::OUString::createFromAscii( "com.sun.star.awt.UnoControlModel" ); + return aServiceNames; + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL AnimatedImagesControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 i_handle, const Any& i_value ) throw (Exception) + { + switch ( i_handle ) + { + case BASEPROPERTY_IMAGE_SCALE_MODE: + { + sal_Int16 nImageScaleMode( ImageScaleMode::Anisotropic ); + OSL_VERIFY( i_value >>= nImageScaleMode ); // convertFastPropertyValue ensures that this has the proper type + if ( ( nImageScaleMode != ImageScaleMode::None ) + && ( nImageScaleMode != ImageScaleMode::Isotropic ) + && ( nImageScaleMode != ImageScaleMode::Anisotropic ) + ) + throw IllegalArgumentException( ::rtl::OUString(), *this, 1 ); + } + break; + } + + AnimatedImagesControlModel_Base::setFastPropertyValue_NoBroadcast( i_handle, i_value ); + } + + //------------------------------------------------------------------------------------------------------------------ + Any AnimatedImagesControlModel::ImplGetDefaultValue( sal_uInt16 i_propertyId ) const + { + switch ( i_propertyId ) + { + case BASEPROPERTY_DEFAULTCONTROL: + return makeAny( ::rtl::OUString::createFromAscii( szServiceName_AnimatedImagesControl ) ); + + case BASEPROPERTY_BORDER: + return makeAny( VisualEffect::NONE ); + + case BASEPROPERTY_STEP_TIME: + return makeAny( (sal_Int32) 100 ); + + case BASEPROPERTY_AUTO_REPEAT: + return makeAny( (sal_Bool)sal_True ); + + case BASEPROPERTY_IMAGE_SCALE_MODE: + return makeAny( ImageScaleMode::None ); + + default: + return UnoControlModel::ImplGetDefaultValue( i_propertyId ); + } + } + + //------------------------------------------------------------------------------------------------------------------ + ::cppu::IPropertyArrayHelper& SAL_CALL AnimatedImagesControlModel::getInfoHelper() + { + static UnoPropertyArrayHelper* pHelper = NULL; + if ( !pHelper ) + { + Sequence< sal_Int32 > aIDs = ImplGetPropertyIds(); + pHelper = new UnoPropertyArrayHelper( aIDs ); + } + return *pHelper; + } + + //------------------------------------------------------------------------------------------------------------------ + ::sal_Int32 SAL_CALL AnimatedImagesControlModel::getStepTime() throw (RuntimeException) + { + sal_Int32 nStepTime( 100 ); + OSL_VERIFY( getPropertyValue( GetPropertyName( BASEPROPERTY_STEP_TIME ) ) >>= nStepTime ); + return nStepTime; + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL AnimatedImagesControlModel::setStepTime( ::sal_Int32 i_stepTime ) throw (RuntimeException) + { + setPropertyValue( GetPropertyName( BASEPROPERTY_STEP_TIME ), makeAny( i_stepTime ) ); + } + + //------------------------------------------------------------------------------------------------------------------ + ::sal_Bool SAL_CALL AnimatedImagesControlModel::getAutoRepeat() throw (RuntimeException) + { + sal_Bool bAutoRepeat( sal_True ); + OSL_VERIFY( getPropertyValue( GetPropertyName( BASEPROPERTY_AUTO_REPEAT ) ) >>= bAutoRepeat ); + return bAutoRepeat; + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL AnimatedImagesControlModel::setAutoRepeat( ::sal_Bool i_autoRepeat ) throw (RuntimeException) + { + setPropertyValue( GetPropertyName( BASEPROPERTY_AUTO_REPEAT ), makeAny( i_autoRepeat ) ); + } + + //------------------------------------------------------------------------------------------------------------------ + ::sal_Int16 SAL_CALL AnimatedImagesControlModel::getScaleMode() throw (RuntimeException) + { + sal_Int16 nImageScaleMode( ImageScaleMode::Anisotropic ); + OSL_VERIFY( getPropertyValue( GetPropertyName( BASEPROPERTY_IMAGE_SCALE_MODE ) ) >>= nImageScaleMode ); + return nImageScaleMode; + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL AnimatedImagesControlModel::setScaleMode( ::sal_Int16 i_scaleMode ) throw (IllegalArgumentException, RuntimeException) + { + setPropertyValue( GetPropertyName( BASEPROPERTY_IMAGE_SCALE_MODE ), makeAny( i_scaleMode ) ); + } + + //------------------------------------------------------------------------------------------------------------------ + ::sal_Int32 SAL_CALL AnimatedImagesControlModel::getImageSetCount( ) throw (RuntimeException) + { + ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); + if ( GetBroadcastHelper().bDisposed || GetBroadcastHelper().bInDispose ) + throw DisposedException(); + + return m_pData->aImageSets.size(); + } + + //------------------------------------------------------------------------------------------------------------------ + Sequence< ::rtl::OUString > SAL_CALL AnimatedImagesControlModel::getImageSet( ::sal_Int32 i_index ) throw (IndexOutOfBoundsException, RuntimeException) + { + ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); + if ( GetBroadcastHelper().bDisposed || GetBroadcastHelper().bInDispose ) + throw DisposedException(); + + lcl_checkIndex( *m_pData, i_index, *this ); + + return m_pData->aImageSets[ i_index ]; + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL AnimatedImagesControlModel::insertImageSet( ::sal_Int32 i_index, const Sequence< ::rtl::OUString >& i_imageURLs ) throw (IndexOutOfBoundsException, RuntimeException) + { + ::osl::ClearableMutexGuard aGuard( GetMutex() ); + // sanity checks + if ( GetBroadcastHelper().bDisposed || GetBroadcastHelper().bInDispose ) + throw DisposedException(); + + lcl_checkIndex( *m_pData, i_index, *this, true ); + + // actaul insertion + m_pData->aImageSets.insert( m_pData->aImageSets.begin() + i_index, i_imageURLs ); + + // listener notification + lcl_notify( aGuard, BrdcstHelper, &XContainerListener::elementInserted, i_index, i_imageURLs, *this ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL AnimatedImagesControlModel::replaceImageSet( ::sal_Int32 i_index, const Sequence< ::rtl::OUString >& i_imageURLs ) throw (IndexOutOfBoundsException, RuntimeException) + { + ::osl::ClearableMutexGuard aGuard( GetMutex() ); + // sanity checks + if ( GetBroadcastHelper().bDisposed || GetBroadcastHelper().bInDispose ) + throw DisposedException(); + + lcl_checkIndex( *m_pData, i_index, *this ); + + // actaul insertion + m_pData->aImageSets[ i_index ] = i_imageURLs; + + // listener notification + lcl_notify( aGuard, BrdcstHelper, &XContainerListener::elementReplaced, i_index, i_imageURLs, *this ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL AnimatedImagesControlModel::removeImageSet( ::sal_Int32 i_index ) throw (IndexOutOfBoundsException, RuntimeException) + { + ::osl::ClearableMutexGuard aGuard( GetMutex() ); + // sanity checks + if ( GetBroadcastHelper().bDisposed || GetBroadcastHelper().bInDispose ) + throw DisposedException(); + + lcl_checkIndex( *m_pData, i_index, *this ); + + // actual removal + ::std::vector< Sequence< ::rtl::OUString > >::iterator removalPos = m_pData->aImageSets.begin() + i_index; + Sequence< ::rtl::OUString > aRemovedElement( *removalPos ); + m_pData->aImageSets.erase( removalPos ); + + // listener notification + lcl_notify( aGuard, BrdcstHelper, &XContainerListener::elementRemoved, i_index, aRemovedElement, *this ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL AnimatedImagesControlModel::addContainerListener( const Reference< XContainerListener >& i_listener ) throw (RuntimeException) + { + BrdcstHelper.addListener( XContainerListener::static_type(), i_listener ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL AnimatedImagesControlModel::removeContainerListener( const Reference< XContainerListener >& i_listener ) throw (RuntimeException) + { + BrdcstHelper.removeListener( XContainerListener::static_type(), i_listener ); + } + +//...................................................................................................................... +} // namespace toolkit +//...................................................................................................................... diff --git a/toolkit/source/controls/grid/makefile.mk b/toolkit/source/controls/grid/makefile.mk deleted file mode 100644 index 5b4e87bf77ee..000000000000 --- a/toolkit/source/controls/grid/makefile.mk +++ /dev/null @@ -1,52 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=toolkit -TARGET=grid - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES= \ - $(SLO)$/gridcontrol.obj\ - $(SLO)$/defaultgriddatamodel.obj\ - $(SLO)$/defaultgridcolumnmodel.obj\ - $(SLO)$/gridcolumn.obj\ - $(SLO)$/grideventforwarder.obj\ - $(SLO)$/sortablegriddatamodel.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/toolkit/source/controls/makefile.mk b/toolkit/source/controls/makefile.mk deleted file mode 100644 index 1ce9f7b22c8c..000000000000 --- a/toolkit/source/controls/makefile.mk +++ /dev/null @@ -1,66 +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. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=toolkit -TARGET=controls - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - - -# --- Files -------------------------------------------------------- - -SLOFILES= \ - $(SLO)$/accessiblecontrolcontext.obj \ - $(SLO)$/geometrycontrolmodel.obj \ - $(SLO)$/eventcontainer.obj \ - $(SLO)$/stdtabcontroller.obj \ - $(SLO)$/stdtabcontrollermodel.obj \ - $(SLO)$/unocontrol.obj \ - $(SLO)$/unocontrolbase.obj \ - $(SLO)$/unocontrolcontainer.obj \ - $(SLO)$/unocontrolcontainermodel.obj \ - $(SLO)$/unocontrolmodel.obj \ - $(SLO)$/unocontrols.obj \ - $(SLO)$/formattedcontrol.obj \ - $(SLO)$/roadmapcontrol.obj \ - $(SLO)$/roadmapentry.obj \ - $(SLO)$/dialogcontrol.obj \ - $(SLO)$/tkscrollbar.obj \ - $(SLO)$/tkspinbutton.obj \ - $(SLO)$/tksimpleanimation.obj \ - $(SLO)$/tkthrobber.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/toolkit/source/controls/spinningprogress.cxx b/toolkit/source/controls/spinningprogress.cxx new file mode 100755 index 000000000000..d4b89d5123ec --- /dev/null +++ b/toolkit/source/controls/spinningprogress.cxx @@ -0,0 +1,138 @@ +/************************************************************************* + * 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. + * + ************************************************************************/ + +#include "precompiled_toolkit.hxx" + +#include "toolkit/controls/spinningprogress.hxx" +#include "toolkit/helper/servicenames.hxx" +#include "toolkit/helper/unopropertyarrayhelper.hxx" + +/** === begin UNO includes === **/ +/** === end UNO includes === **/ + +#include <rtl/ustrbuf.hxx> +#include <tools/diagnose_ex.h> +#include <vcl/throbber.hxx> + +//...................................................................................................................... +namespace toolkit +{ +//...................................................................................................................... + + /** === begin UNO using === **/ + using ::com::sun::star::uno::Reference; + using ::com::sun::star::uno::XInterface; + using ::com::sun::star::uno::UNO_QUERY; + using ::com::sun::star::uno::UNO_QUERY_THROW; + using ::com::sun::star::uno::UNO_SET_THROW; + using ::com::sun::star::uno::Exception; + using ::com::sun::star::uno::RuntimeException; + using ::com::sun::star::uno::Any; + using ::com::sun::star::uno::makeAny; + using ::com::sun::star::uno::Sequence; + using ::com::sun::star::uno::Type; + using ::com::sun::star::beans::XPropertySetInfo; + /** === end UNO using === **/ + + //================================================================================================================== + //= SpinningProgressControlModel + //================================================================================================================== + //------------------------------------------------------------------------------------------------------------------ + SpinningProgressControlModel::SpinningProgressControlModel() + { + // default image sets + osl_incrementInterlockedCount( &m_refCount ); + { + try + { + Throbber::ImageSet aImageSets[] = + { + Throbber::IMAGES_16_PX, Throbber::IMAGES_32_PX, Throbber::IMAGES_64_PX + }; + for ( size_t i=0; i < sizeof( aImageSets ) / sizeof( aImageSets[0] ); ++i ) + { + const ::std::vector< ::rtl::OUString > aDefaultURLs( Throbber::getDefaultImageURLs( aImageSets[i] ) ); + const Sequence< ::rtl::OUString > aImageURLs( &aDefaultURLs[0], aDefaultURLs.size() ); + insertImageSet( i, aImageURLs ); + } + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + } + osl_decrementInterlockedCount( &m_refCount ); + } + + //------------------------------------------------------------------------------------------------------------------ + SpinningProgressControlModel::SpinningProgressControlModel( const SpinningProgressControlModel& i_copySource ) + :SpinningProgressControlModel_Base( i_copySource ) + { + } + + //------------------------------------------------------------------------------------------------------------------ + SpinningProgressControlModel::~SpinningProgressControlModel() + { + } + + //------------------------------------------------------------------------------------------------------------------ + UnoControlModel* SpinningProgressControlModel::Clone() const + { + return new SpinningProgressControlModel( *this ); + } + + //------------------------------------------------------------------------------------------------------------------ + Reference< XPropertySetInfo > SAL_CALL SpinningProgressControlModel::getPropertySetInfo( ) throw(RuntimeException) + { + static Reference< XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) ); + return xInfo; + } + + //------------------------------------------------------------------------------------------------------------------ + ::rtl::OUString SAL_CALL SpinningProgressControlModel::getServiceName() throw(RuntimeException) + { + return ::rtl::OUString::createFromAscii( szServiceName_SpinningProgressControlModel ); + } + + //------------------------------------------------------------------------------------------------------------------ + ::rtl::OUString SAL_CALL SpinningProgressControlModel::getImplementationName( ) throw(RuntimeException) + { + return ::rtl::OUString::createFromAscii( "org.openoffice.comp.toolkit.SpinningProgressControlModel" ); + } + + //------------------------------------------------------------------------------------------------------------------ + Sequence< ::rtl::OUString > SAL_CALL SpinningProgressControlModel::getSupportedServiceNames() throw(RuntimeException) + { + Sequence< ::rtl::OUString > aServiceNames(3); + aServiceNames[0] = ::rtl::OUString::createFromAscii( szServiceName_SpinningProgressControlModel ); + aServiceNames[1] = ::rtl::OUString::createFromAscii( szServiceName_AnimatedImagesControlModel ); + aServiceNames[2] = ::rtl::OUString::createFromAscii( "com.sun.star.awt.UnoControlModel" ); + return aServiceNames; + } + +//...................................................................................................................... +} // namespace toolkit +//...................................................................................................................... diff --git a/toolkit/source/controls/tksimpleanimation.cxx b/toolkit/source/controls/tksimpleanimation.cxx index f6e559f6e6fc..aeab327793f8 100644 --- a/toolkit/source/controls/tksimpleanimation.cxx +++ b/toolkit/source/controls/tksimpleanimation.cxx @@ -132,27 +132,6 @@ namespace toolkit } //-------------------------------------------------------------------- - uno::Any UnoSimpleAnimationControl::queryAggregation( const uno::Type & rType ) - throw( uno::RuntimeException ) - { - uno::Any aRet = UnoControlBase::queryAggregation( rType ); - if ( !aRet.hasValue() ) - aRet = UnoSimpleAnimationControl_Base::queryInterface( rType ); - return aRet; - } - - //-------------------------------------------------------------------- - IMPLEMENT_FORWARD_XTYPEPROVIDER2( UnoSimpleAnimationControl, UnoControlBase, UnoSimpleAnimationControl_Base ) - - //-------------------------------------------------------------------- - void UnoSimpleAnimationControl::dispose() throw( uno::RuntimeException ) - { - ::osl::ClearableMutexGuard aGuard( GetMutex() ); - - UnoControl::dispose(); - } - - //-------------------------------------------------------------------- ::rtl::OUString SAL_CALL UnoSimpleAnimationControl::getImplementationName() throw( uno::RuntimeException ) { @@ -163,26 +142,20 @@ namespace toolkit uno::Sequence< ::rtl::OUString > SAL_CALL UnoSimpleAnimationControl::getSupportedServiceNames() throw( uno::RuntimeException ) { - uno::Sequence< ::rtl::OUString > aServices( UnoControlBase::getSupportedServiceNames() ); + uno::Sequence< ::rtl::OUString > aServices( UnoSimpleAnimationControl_Base::getSupportedServiceNames() ); aServices.realloc( aServices.getLength() + 1 ); aServices[ aServices.getLength() - 1 ] = ::rtl::OUString::createFromAscii( szServiceName_UnoSimpleAnimationControl ); return aServices; } //-------------------------------------------------------------------- - void UnoSimpleAnimationControl::createPeer( const uno::Reference< awt::XToolkit > &rxToolkit, - const uno::Reference< awt::XWindowPeer > &rParentPeer ) - throw( uno::RuntimeException ) - { - UnoControl::createPeer( rxToolkit, rParentPeer ); - } - - //-------------------------------------------------------------------- void SAL_CALL UnoSimpleAnimationControl::start() throw ( uno::RuntimeException ) { - ::osl::MutexGuard aGuard( GetMutex() ); - - uno::Reference< XSimpleAnimation > xAnimation( getPeer(), uno::UNO_QUERY ); + uno::Reference< XSimpleAnimation > xAnimation; + { + ::osl::MutexGuard aGuard( GetMutex() ); + xAnimation.set( getPeer(), uno::UNO_QUERY ); + } if ( xAnimation.is() ) xAnimation->start(); } @@ -190,9 +163,11 @@ namespace toolkit //-------------------------------------------------------------------- void SAL_CALL UnoSimpleAnimationControl::stop() throw ( uno::RuntimeException ) { - ::osl::MutexGuard aGuard( GetMutex() ); - - uno::Reference< XSimpleAnimation > xAnimation( getPeer(), uno::UNO_QUERY ); + uno::Reference< XSimpleAnimation > xAnimation; + { + ::osl::MutexGuard aGuard( GetMutex() ); + xAnimation.set( getPeer(), uno::UNO_QUERY ); + } if ( xAnimation.is() ) xAnimation->stop(); } @@ -201,9 +176,11 @@ namespace toolkit void SAL_CALL UnoSimpleAnimationControl::setImageList( const uno::Sequence< uno::Reference< graphic::XGraphic > >& ImageList ) throw ( uno::RuntimeException ) { - ::osl::MutexGuard aGuard( GetMutex() ); - - uno::Reference< XSimpleAnimation > xAnimation( getPeer(), uno::UNO_QUERY ); + uno::Reference< XSimpleAnimation > xAnimation; + { + ::osl::MutexGuard aGuard( GetMutex() ); + xAnimation.set( getPeer(), uno::UNO_QUERY ); + } if ( xAnimation.is() ) xAnimation->setImageList( ImageList ); } diff --git a/toolkit/source/controls/unocontrolmodel.cxx b/toolkit/source/controls/unocontrolmodel.cxx index dceffdfe77f8..f8c7de1960a4 100644 --- a/toolkit/source/controls/unocontrolmodel.cxx +++ b/toolkit/source/controls/unocontrolmodel.cxx @@ -526,6 +526,8 @@ void UnoControlModel::dispose( ) throw(::com::sun::star::uno::RuntimeException) aEvt.Source = (::com::sun::star::uno::XAggregation*)(::cppu::OWeakAggObject*)this; maDisposeListeners.disposeAndClear( aEvt ); + BrdcstHelper.aLC.disposeAndClear( aEvt ); + // let the property set helper notify our property listeners OPropertySetHelper::disposing(); } diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx index 7f09b562ccb0..caf9b8a00bfe 100644 --- a/toolkit/source/controls/unocontrols.cxx +++ b/toolkit/source/controls/unocontrols.cxx @@ -1817,6 +1817,11 @@ struct UnoControlListBoxModel_Data return aItems; } + void copyItems( const UnoControlListBoxModel_Data& i_copySource ) + { + m_aListItems = i_copySource.m_aListItems; + } + void setAllItems( const ::std::vector< ListItem >& i_rItems ) { m_aListItems = i_rItems; @@ -1863,6 +1868,7 @@ UnoControlListBoxModel::UnoControlListBoxModel( const UnoControlListBoxModel& i_ ,m_pData( new UnoControlListBoxModel_Data( *this ) ) ,m_aItemListListeners( GetMutex() ) { + m_pData->copyItems( *i_rSource.m_pData ); } UnoControlListBoxModel::~UnoControlListBoxModel() { diff --git a/toolkit/source/helper/makefile.mk b/toolkit/source/helper/makefile.mk deleted file mode 100644 index bf10b0aa0178..000000000000 --- a/toolkit/source/helper/makefile.mk +++ /dev/null @@ -1,64 +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. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=toolkit -TARGET=helper - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -.INCLUDE : $(PRJ)$/util$/makefile.pmk - - -# --- Files -------------------------------------------------------- - -SLOFILES= \ - $(SLO)$/listenermultiplexer.obj \ - $(SLO)$/property.obj \ - $(SLO)$/registerservices.obj \ - $(SLO)$/servicenames.obj \ - $(SLO)$/tkresmgr.obj \ - $(SLO)$/unomemorystream.obj \ - $(SLO)$/unopropertyarrayhelper.obj \ - $(SLO)$/unowrapper.obj \ - $(SLO)$/vclunohelper.obj \ - $(SLO)$/externallock.obj \ - $(SLO)$/imagealign.obj \ - $(SLO)$/throbberimpl.obj \ - $(SLO)$/formpdfexport.obj \ - $(SLO)$/accessibilityclient.obj \ - $(SLO)$/fixedhyperbase.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - diff --git a/toolkit/source/helper/property.cxx b/toolkit/source/helper/property.cxx index 97ba72c41f50..a418b4a00b7b 100644 --- a/toolkit/source/helper/property.cxx +++ b/toolkit/source/helper/property.cxx @@ -65,6 +65,7 @@ using ::com::sun::star::uno::Reference; using ::com::sun::star::awt::XDevice; using ::com::sun::star::awt::FontDescriptor; using ::com::sun::star::style::VerticalAlignment; +using ::com::sun::star::graphic::XGraphic; struct ImplPropertyInfo { @@ -180,7 +181,7 @@ ImplPropertyInfo* ImplGetPropertyInfos( sal_uInt16& rElementCount ) DECL_PROP_3 ( "FormatKey", FORMATKEY, sal_Int32, BOUND, MAYBEVOID, TRANSIENT ), DECL_PROP_3 ( "FormatsSupplier", FORMATSSUPPLIER, Reference< ::com::sun::star::util::XNumberFormatsSupplier >, BOUND, MAYBEVOID, TRANSIENT ), - DECL_PROP_2 ( "Graphic", GRAPHIC, Reference< ::com::sun::star::graphic::XGraphic >, BOUND, TRANSIENT ), + DECL_PROP_2 ( "Graphic", GRAPHIC, Reference< XGraphic >, BOUND, TRANSIENT ), DECL_PROP_2 ( "HelpText", HELPTEXT, ::rtl::OUString, BOUND, MAYBEDEFAULT ), DECL_PROP_2 ( "HelpURL", HELPURL, ::rtl::OUString, BOUND, MAYBEDEFAULT ), DECL_PROP_2 ( "HideInactiveSelection", HIDEINACTIVESELECTION, bool, BOUND, MAYBEDEFAULT ), @@ -217,6 +218,7 @@ ImplPropertyInfo* ImplGetPropertyInfos( sal_uInt16& rElementCount ) DECL_PROP_2 ( "PushButtonType", PUSHBUTTONTYPE, sal_Int16, BOUND, MAYBEDEFAULT), DECL_PROP_2 ( "ReadOnly", READONLY, bool, BOUND, MAYBEDEFAULT ), DECL_PROP_2 ( "Repeat", REPEAT, bool, BOUND, MAYBEDEFAULT ), + DECL_PROP_2 ( "AutoRepeat", AUTO_REPEAT, sal_Bool, BOUND, MAYBEDEFAULT ), DECL_PROP_2 ( "RepeatDelay", REPEAT_DELAY, sal_Int32, BOUND, MAYBEDEFAULT ), DECL_PROP_2 ( "ScaleImage", SCALEIMAGE, bool, BOUND, MAYBEDEFAULT ), DECL_PROP_2 ( "ScaleMode", IMAGE_SCALE_MODE, sal_Int16, BOUND, MAYBEDEFAULT ), diff --git a/toolkit/source/helper/registerservices.cxx b/toolkit/source/helper/registerservices.cxx index 61e734d39208..f662b915cb34 100644 --- a/toolkit/source/helper/registerservices.cxx +++ b/toolkit/source/helper/registerservices.cxx @@ -51,6 +51,8 @@ #include "toolkit/controls/tkspinbutton.hxx" #include <toolkit/controls/tksimpleanimation.hxx> #include <toolkit/controls/tkthrobber.hxx> +#include <toolkit/controls/animatedimages.hxx> +#include <toolkit/controls/spinningprogress.hxx> #include <toolkit/controls/dialogcontrol.hxx> #include "toolkit/dllapi.h" @@ -198,6 +200,9 @@ IMPL_CREATEINSTANCE2( UnoSimpleAnimationControl ) IMPL_CREATEINSTANCE2( UnoSimpleAnimationControlModel ) IMPL_CREATEINSTANCE2( UnoThrobberControl ) IMPL_CREATEINSTANCE2( UnoThrobberControlModel ) +IMPL_CREATEINSTANCE2( AnimatedImagesControl ) +IMPL_CREATEINSTANCE2( AnimatedImagesControlModel ) +IMPL_CREATEINSTANCE2( SpinningProgressControlModel ) extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL TreeControl_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& ); extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL TreeControlModel_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& ); @@ -300,6 +305,9 @@ TOOLKIT_DLLPUBLIC void* SAL_CALL component_getFactory( const sal_Char* sImplemen GET_FACTORY( DefaultGridColumnModel, szServiceName_DefaultGridColumnModel, NULL ); GET_FACTORY_WITH_IMPL_PREFIX( GridColumn, "org.openoffice.comp.toolkit", szServiceName_GridColumn, NULL ); GET_FACTORY_WITH_IMPL_PREFIX( SortableGridDataModel, "org.openoffice.comp.toolkit", szServiceName_SortableGridDataModel, NULL ); + GET_FACTORY_WITH_IMPL_PREFIX( AnimatedImagesControl, "org.openoffice.comp.toolkit", szServiceName_AnimatedImagesControl, NULL ) + GET_FACTORY_WITH_IMPL_PREFIX( AnimatedImagesControlModel, "org.openoffice.comp.toolkit", szServiceName_AnimatedImagesControlModel, NULL ) + GET_FACTORY_WITH_IMPL_PREFIX( SpinningProgressControlModel, "org.openoffice.comp.toolkit", szServiceName_SpinningProgressControlModel, NULL ) if ( rtl_str_compare( sImplementationName, "com.sun.star.awt.comp.AsyncCallback" ) == 0 ) return comp_AsyncCallback_component_getFactory( sImplementationName, _pServiceManager, _pRegistryKey ); diff --git a/toolkit/source/helper/servicenames.cxx b/toolkit/source/helper/servicenames.cxx index 0a2131a92eb3..9a930d33c7eb 100644 --- a/toolkit/source/helper/servicenames.cxx +++ b/toolkit/source/helper/servicenames.cxx @@ -92,6 +92,9 @@ const sal_Char __FAR_DATA szServiceName_TreeControl[] = "com.sun.star.awt.tree.T const sal_Char __FAR_DATA szServiceName_TreeControlModel[] = "com.sun.star.awt.tree.TreeControlModel"; const sal_Char __FAR_DATA szServiceName_MutableTreeDataModel[] = "com.sun.star.awt.tree.MutableTreeDataModel"; const sal_Char __FAR_DATA szServiceName_UnoSimpleAnimationControlModel[] = "com.sun.star.awt.UnoSimpleAnimationControlModel", szServiceName2_UnoSimpleAnimationControlModel[] = "com.sun.star.awt.UnoControlSimpleAnimationModel"; +const sal_Char __FAR_DATA szServiceName_AnimatedImagesControl[] = "com.sun.star.awt.AnimatedImagesControl"; +const sal_Char __FAR_DATA szServiceName_AnimatedImagesControlModel[] = "com.sun.star.awt.AnimatedImagesControlModel"; +const sal_Char __FAR_DATA szServiceName_SpinningProgressControlModel[] = "com.sun.star.awt.SpinningProgressControlModel"; const sal_Char __FAR_DATA szServiceName_UnoSimpleAnimationControl[] = "com.sun.star.awt.UnoSimpleAnimationControl", szServiceName2_UnoSimpleAnimationControl[] = "com.sun.star.awt.UnoControlSimpleAnimation"; const sal_Char __FAR_DATA szServiceName_UnoThrobberControlModel[] = "com.sun.star.awt.UnoThrobberControlModel", szServiceName2_UnoThrobberControlModel[] = "com.sun.star.awt.UnoControlThrobberModel"; const sal_Char __FAR_DATA szServiceName_UnoThrobberControl[] = "com.sun.star.awt.UnoThrobberControl", szServiceName2_UnoThrobberControl[] = "com.sun.star.awt.UnoControlThrobber"; diff --git a/toolkit/source/helper/throbberimpl.cxx b/toolkit/source/helper/throbberimpl.cxx deleted file mode 100644 index 7a8e260ab4b8..000000000000 --- a/toolkit/source/helper/throbberimpl.cxx +++ /dev/null @@ -1,138 +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. - * - ************************************************************************/ -#include "precompiled_toolkit.hxx" -#include <toolkit/helper/throbberimpl.hxx> - -#include <vcl/svapp.hxx> -#include <vcl/fixed.hxx> - -//........................................................................ -namespace toolkit -//........................................................................ -{ - using namespace ::com::sun::star; - - //-------------------------------------------------------------------- - Throbber_Impl::Throbber_Impl( uno::Reference< VCLXWindow > xParent, - sal_Int32 nStepTime, - sal_Bool bRepeat ) - :mrMutex( Application::GetSolarMutex() ) - { - mxParent = xParent; - mbRepeat = bRepeat; - mnStepTime = nStepTime; - maWaitTimer.SetTimeout( mnStepTime ); - maWaitTimer.SetTimeoutHdl( LINK( this, Throbber_Impl, TimeOutHdl ) ); - } - - //-------------------------------------------------------------------- - Throbber_Impl::~Throbber_Impl() - { - maWaitTimer.Stop(); - mxParent = NULL; - } - - //-------------------------------------------------------------------- - void Throbber_Impl::start() throw ( uno::RuntimeException ) - { - ::vos::OGuard aGuard( GetMutex() ); - - mnCurStep = 0; - maWaitTimer.Start(); - } - - //-------------------------------------------------------------------- - void Throbber_Impl::stop() throw ( uno::RuntimeException ) - { - ::vos::OGuard aGuard( GetMutex() ); - - maWaitTimer.Stop(); - } - - //-------------------------------------------------------------------- - void Throbber_Impl::setImageList( const uno::Sequence< uno::Reference< graphic::XGraphic > >& rImageList ) - throw ( uno::RuntimeException ) - { - ::vos::OGuard aGuard( GetMutex() ); - - maImageList = rImageList; - - mnStepCount = maImageList.getLength(); - FixedImage* pImage = static_cast< FixedImage* >( mxParent->GetWindow() ); - if ( pImage ) - { - if ( mnStepCount ) - pImage->SetImage( maImageList[ 0 ] ); - else - pImage->SetImage( Image() ); - } - } - - //-------------------------------------------------------------------- - void Throbber_Impl::initImage() - throw ( uno::RuntimeException ) - { - FixedImage* pImage = static_cast< FixedImage* >( mxParent->GetWindow() ); - if ( pImage && maImageList.getLength() ) - pImage->SetImage( maImageList[ 0 ] ); - } - - //-------------------------------------------------------------------- - sal_Bool Throbber_Impl::isHCMode() - throw ( uno::RuntimeException ) - { - FixedImage* pImage = static_cast< FixedImage* >( mxParent->GetWindow() ); - if ( pImage ) - return pImage->GetSettings().GetStyleSettings().GetHighContrastMode(); - else - return Application::GetSettings().GetStyleSettings().GetHighContrastMode(); - } - - // ----------------------------------------------------------------------- - IMPL_LINK( Throbber_Impl, TimeOutHdl, Throbber_Impl*, EMPTYARG ) - { - ::vos::OGuard aGuard( GetMutex() ); - - FixedImage* pImage = static_cast< FixedImage* >( mxParent->GetWindow() ); - - if ( !pImage || !maImageList.getLength() ) - return 0; - - if ( mnCurStep < mnStepCount - 1 ) - mnCurStep += 1; - else - mnCurStep = 0; - - pImage->SetImage( maImageList[ mnCurStep ] ); - - return 0; - } - -//........................................................................ -} // namespacetoolkit -//........................................................................ - diff --git a/toolkit/source/layout/core/makefile.mk b/toolkit/source/layout/core/makefile.mk deleted file mode 100644 index 2c90921799af..000000000000 --- a/toolkit/source/layout/core/makefile.mk +++ /dev/null @@ -1,65 +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. -# -#************************************************************************* - -PRJ=../../.. -PRJNAME=toolkit -TARGET=layout-core -ENABLE_EXCEPTIONS=true - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -# FIXME: This is bad, hmkay -CFLAGS+= -I$(PRJ)/source - -SLOFILES= \ - $(SLO)$/bin.obj \ - $(SLO)$/box-base.obj \ - $(SLO)$/box.obj \ - $(SLO)$/byteseq.obj \ - $(SLO)$/container.obj \ - $(SLO)$/dialogbuttonhbox.obj \ - $(SLO)$/factory.obj \ - $(SLO)$/flow.obj \ - $(SLO)$/helper.obj \ - $(SLO)$/import.obj \ - $(SLO)$/localized-string.obj \ - $(SLO)$/proplist.obj \ - $(SLO)$/root.obj \ - $(SLO)$/table.obj \ - $(SLO)$/timer.obj \ - $(SLO)$/translate.obj\ - $(SLO)$/vcl.obj\ -# - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/toolkit/source/layout/vcl/makefile.mk b/toolkit/source/layout/vcl/makefile.mk deleted file mode 100644 index 529ddc31d97e..000000000000 --- a/toolkit/source/layout/vcl/makefile.mk +++ /dev/null @@ -1,52 +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. -# -#************************************************************************* - -PRJ=../../.. -PRJNAME=toolkit -TARGET=layout-vcl -ENABLE_EXCEPTIONS=true - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -.IF "$(COMNAME)" == "gcc3" -CFLAGS+=-Wall -fno-default-inline -.ENDIF - -# --- Files -------------------------------------------------------- - -SLOFILES= \ - $(SLO)$/wrapper.obj \ - $(SLO)$/wbutton.obj \ - $(SLO)$/wcontainer.obj \ - $(SLO)$/wfield.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/toolkit/src2xml/src-sw.lst b/toolkit/src2xml/src-sw.lst index 8d43400462d8..a0e7245fc4f4 100644 --- a/toolkit/src2xml/src-sw.lst +++ b/toolkit/src2xml/src-sw.lst @@ -51,7 +51,6 @@ ../../sw/source/ui/fldui/DropDownFieldDialog.src ../../sw/source/ui/fldui/fldui.src ../../sw/source/ui/fmtui/tmpdlg.src -../../sw/source/ui/fmtui/fmtui.src ../../sw/source/ui/index/cnttab.src ../../sw/source/ui/index/multmrk.src ../../sw/source/ui/index/idxmrk.src diff --git a/toolkit/src2xml/src.lst b/toolkit/src2xml/src.lst index 4a5876b84a08..a402a6b633c9 100644 --- a/toolkit/src2xml/src.lst +++ b/toolkit/src2xml/src.lst @@ -170,7 +170,6 @@ ../../sw/source/ui/fldui/DropDownFieldDialog.src ../../sw/source/ui/fldui/fldui.src ../../sw/source/ui/fmtui/tmpdlg.src -../../sw/source/ui/fmtui/fmtui.src ../../sw/source/ui/index/cnttab.src ../../sw/source/ui/index/multmrk.src ../../sw/source/ui/index/idxmrk.src diff --git a/toolkit/test/accessibility/makefile.mk b/toolkit/test/accessibility/makefile.mk deleted file mode 100644 index cc6f410f7404..000000000000 --- a/toolkit/test/accessibility/makefile.mk +++ /dev/null @@ -1,127 +0,0 @@ -# This is the dmake version. - -# copied from settings.mk -SOLARBINDIR=$(SOLARVERSION)$/$(INPATH)$/bin$(UPDMINOREXT) - -# Please modify the following lines to match your environment: -# If you use the run: target at the end of the file, then adapt port number. -PORT_NUMBER = 5678 - -# The following variables probably don't need to be changed. -JAVAC = javac -JAVA = java -# The JAR_PATH points to the jar files of your local office installation. -JAR_PATH = $(SOLARBINDIR)$/ - - -# The rest of this makefile should not need to be touched. - -all : AccessibilityWorkBench - -JAR_FILES = \ - unoil.jar \ - ridl.jar \ - jurt.jar \ - juh.jar \ - java_uno.jar - -JAVA_FILES = \ - AccTreeNode.java \ - AccessibilityTree.java \ - AccessibilityTreeModel.java \ - AccessibilityTreeModelBase.java \ - AccessibilityWorkBench.java \ - AccessibleActionHandler.java \ - AccessibleActionNode.java \ - AccessibleCellHandler.java \ - AccessibleComponentHandler.java \ - AccessibleContextHandler.java \ - AccessibleEditableTextHandler.java \ - AccessibleExtendedComponentHandler.java \ - AccessibleHyperlinkHandler.java \ - AccessibleHypertextHandler.java \ - AccessibleImageHandler.java \ - AccessibleRelationHandler.java \ - AccessibleSelectionHandler.java \ - AccessibleTableHandler.java \ - AccessibleTextHandler.java \ - AccessibleTreeCellRenderer.java \ - AccessibleTreeHandler.java \ - AccessibleTreeNode.java \ - AccessibleUNOHandler.java \ - Canvas.java \ - CanvasShape.java \ - ChildEventHandler.java \ - ContextEventHandler.java \ - EventHandler.java \ - EventListener.java \ - EventLogger.java \ - EventQueue.java \ - FrameActionListener.java \ - GeometryEventHandler.java \ - HelpWindow.java \ - InformationWriter.java \ - MessageArea.java \ - NodeFactory.java \ - NodeHandler.java \ - NodeMap.java \ - OfficeConnection.java \ - Options.java \ - QueuedListener.java \ - QueuedTopWindowListener.java \ - SelectionDialog.java \ - SimpleOffice.java \ - StringNode.java \ - TableEventHandler.java \ - TextLogger.java \ - TextUpdateListener.java \ - TopWindowListener.java \ - VectorNode.java - -JAVA_CLASSPATHS := \ - . \ - $(foreach,i,$(JAR_FILES) $(JAR_PATH)$i) \ - $(CLASSPATH) - -CLASSPATH !:=$(JAVA_CLASSPATHS:t$(PATH_SEPERATOR)) - -JFLAGS = -deprecation -classpath $(CLASSPATH) - -%.class : %.java - $(JAVAC) $(JFLAGS) $< - -%.class : %.java - $(JAVAC) $(JFLAGS) $< - -AccessibilityWorkBench : ObjectView Tools $(JAVA_FILES:b:+".class") - -ObjectView .SETDIR=ov : - @echo "making package ObjectView" - dmake - -Tools .SETDIR=tools : - @echo "making package Tools" - dmake - -# Remove all class files. -clean : ObjectView.clean Tools.clean - rm *.class - rm AccessibilityWorkBench.jar -ObjectView.clean .SETDIR=ov : - rm *.class -Tools.clean .SETDIR=tools : - rm *.class - -# Create a jar file of all files neccessary to build and run the work bench. -dist: AccessibilityWorkBench.jar - -AccessibilityWorkBench.jar: $(JAVA_FILES:b:+".class") jawb.mf - jar -cfm AccessibilityWorkBench.jar jawb.mf *.class ov\*.class tools\*.class - -# Example of how to run the work bench. -run: all - $(JAVA) -classpath $(CLASSPATH) AccessibilityWorkBench -p $(PORT_NUMBER) - -runjar: all dist - $(JAVA) -classpath $(CLASSPATH) -jar AccessibilityWorkBench.jar -p $(PORT_NUMBER) - diff --git a/toolkit/test/accessibility/ov/makefile.mk b/toolkit/test/accessibility/ov/makefile.mk deleted file mode 100644 index 56fb563eeee0..000000000000 --- a/toolkit/test/accessibility/ov/makefile.mk +++ /dev/null @@ -1,51 +0,0 @@ -# This is the dmake version. - -# copied from settings.mk -SOLARBINDIR=$(SOLARVERSION)$/$(INPATH)$/bin$(UPDMINOREXT) - -# Please modify the following lines to match your environment: -# If you use the run: target at the end of the file, then adapt port number. -PORT_NUMBER = 5678 - -# The following variables probably don't need to be changed. -JAVAC = javac -JAVA = java -# The JAR_PATH points to the jar files of your local office installation. -JAR_PATH = $(SOLARBINDIR)$/ - - -# The rest of this makefile should not need to be touched. - -all : ov - -JAR_FILES = \ - unoil.jar \ - ridl.jar \ - jurt.jar \ - juh.jar \ - java_uno.jar - -JAVA_FILES = \ - ov/ObjectViewContainer.java \ - ov/ObjectView.java \ - ov/ListeningObjectView.java \ - ov/ContextView.java \ - ov/FocusView.java \ - ov/SelectionView.java \ - ov/TextView.java -# ov/StateSetView.java \ - - -JAVA_CLASSPATHS := \ - . .. \ - $(foreach,i,$(JAR_FILES) $(JAR_PATH)$i) \ - $(CLASSPATH) - -CLASSPATH !:=$(JAVA_CLASSPATHS:t$(PATH_SEPERATOR)) - -JFLAGS = -deprecation -classpath $(CLASSPATH) - -%.class : %.java - $(JAVAC) $(JFLAGS) $< - -ov : $(JAVA_FILES:b:+".class") diff --git a/toolkit/test/accessibility/tools/makefile.mk b/toolkit/test/accessibility/tools/makefile.mk deleted file mode 100644 index 045ba6f65b49..000000000000 --- a/toolkit/test/accessibility/tools/makefile.mk +++ /dev/null @@ -1,42 +0,0 @@ -# copied from settings.mk -SOLARBINDIR=$(SOLARVERSION)$/$(INPATH)$/bin$(UPDMINOREXT) - -# Please modify the following lines to match your environment: -# If you use the run: target at the end of the file, then adapt port number. -PORT_NUMBER = 5678 - -# The following variables probably don't need to be changed. -JAVAC = javac -JAVA = java -# The JAR_PATH points to the jar files of your local office installation. -JAR_PATH = $(SOLARBINDIR)$/ - - -# The rest of this makefile should not need to be touched. - -all : tools - -JAR_FILES = \ - unoil.jar \ - ridl.jar \ - jurt.jar \ - juh.jar \ - java_uno.jar - -JAVA_FILES = \ - tools/NameProvider.java - - -JAVA_CLASSPATHS := \ - . .. \ - $(foreach,i,$(JAR_FILES) $(JAR_PATH)$i) \ - $(CLASSPATH) - -CLASSPATH !:=$(JAVA_CLASSPATHS:t$(PATH_SEPERATOR)) - -JFLAGS = -deprecation -classpath $(CLASSPATH) - -%.class : %.java - $(JAVAC) $(JFLAGS) $< - -tools : $(JAVA_FILES:b:+".class") diff --git a/toolkit/util/makefile.mk b/toolkit/util/makefile.mk deleted file mode 100644 index 2e9adce4f6bd..000000000000 --- a/toolkit/util/makefile.mk +++ /dev/null @@ -1,93 +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. -# -#************************************************************************* - -# tk.dxp should contain all c functions that have to be exported. MT 2001/11/29 - -PRJ=.. - -PRJNAME=toolkit -TARGET=tk -TARGET2=tka -USE_DEFFILE=TRUE - -# --- Settings ----------------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - - -# --- Allgemein ---------------------------------------------------------- - -# ======================================================================== -# = tk lib: the "classic" toolkit library - -LIB1TARGET= $(SLB)$/$(TARGET).lib -LIB1FILES= $(SLB)$/awt.lib \ - $(SLB)$/tree.lib \ - $(SLB)$/grid.lib \ - $(SLB)$/controls.lib \ - $(SLB)$/helper.lib\ - $(SLB)$/layout-core.lib \ - $(SLB)$/layout-vcl.lib - -SHL1TARGET= tk$(DLLPOSTFIX) -SHL1IMPLIB= itk -SHL1USE_EXPORTS=name - -SHL1STDLIBS=\ - $(VCLLIB) \ - $(UNOTOOLSLIB) \ - $(TOOLSLIB) \ - $(COMPHELPERLIB) \ - $(CPPUHELPERLIB) \ - $(CPPULIB) \ - $(SALLIB) - -SHL1LIBS= $(LIB1TARGET) -SHL1DEF= $(MISC)$/$(SHL1TARGET).def -SHL1DEPN=$(LIB1TARGET) - -DEF1NAME =$(SHL1TARGET) -DEF1DEPN =$(LIB1TARGET) -DEF1DES =TK -DEFLIB1NAME =tk - -RESLIB1IMAGES=$(PRJ)$/source$/awt -RES1FILELIST=$(SRS)$/awt.srs -RESLIB1NAME=$(TARGET) -RESLIB1SRSFILES=$(RES1FILELIST) - -# --- Footer ------------------------------------------------------------- -.INCLUDE : target.mk - -ALLTAR : $(MISC)/tk.component - -$(MISC)/tk.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ - tk.component - $(XSLTPROC) --nonet --stringparam uri \ - '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ - $(SOLARENV)/bin/createcomponent.xslt tk.component diff --git a/toolkit/util/tk.component b/toolkit/util/tk.component index ef6e8abfc268..c01327ba11fe 100644 --- a/toolkit/util/tk.component +++ b/toolkit/util/tk.component @@ -260,6 +260,15 @@ <service name="com.sun.star.awt.UnoControlSimpleAnimationModel"/> <service name="com.sun.star.awt.UnoSimpleAnimationControlModel"/> </implementation> + <implementation name="org.openoffice.comp.toolkit.SpinningProgressControlModel"> + <service name="com.sun.star.awt.SpinningProgressControlModel"/> + </implementation> + <implementation name="org.openoffice.comp.toolkit.AnimatedImagesControlModel"> + <service name="com.sun.star.awt.AnimatedImagesControlModel"/> + </implementation> + <implementation name="org.openoffice.comp.toolkit.AnimatedImagesControl"> + <service name="com.sun.star.awt.AnimatedImagesControl"/> + </implementation> <implementation name="stardiv.Toolkit.UnoSpinButtonControl"> <service name="com.sun.star.awt.UnoControlSpinButton"/> </implementation> diff --git a/toolkit/workben/layout/makefile.mk b/toolkit/workben/layout/makefile.mk deleted file mode 100644 index 53797e5a3102..000000000000 --- a/toolkit/workben/layout/makefile.mk +++ /dev/null @@ -1,151 +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. -# -#************************************************************************* - -PRJ=../.. -PRJNAME=toolkit -TARGET=test -TARGETTYPE=GUI -LIBTARGET=NO -ENABLE_EXCEPTIONS=TRUE - -.INCLUDE : settings.mk - -.IF "$(ENABLE_LAYOUT)" == "TRUE" - -# Allow zoom and wordcount to be built without depending on svx,sv,sfx2 -CFLAGS += -I../$(PRJ)/svx/inc -I../$(PRJ)/svtools/inc -I../$(PRJ)/sfx2/inc -I../$(PRJ)/sc/inc -I../$(PRJ)/sc/source/ui/inc -I../$(PRJ)/sw/inc - -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -.IF "$(COMNAME)" == "gcc3" -CFLAGS+=-Wall -Wno-non-virtual-dtor -.ENDIF - -CXXFILES=\ - editor.cxx \ - plugin.cxx \ - recover.cxx \ - wordcountdialog.cxx \ - test.cxx \ - zoom.cxx - -OBJFILES=\ - $(OBJ)$/editor.obj \ - $(OBJ)$/plugin.obj \ - $(OBJ)$/recover.obj \ - $(OBJ)$/test.obj \ - $(OBJ)$/tpsort.obj \ - $(OBJ)$/sortdlg.obj \ - $(OBJ)$/wordcountdialog.obj \ - $(OBJ)$/zoom.obj - -APP1TARGET=$(TARGET) -APP1OBJS=$(OBJFILES) -APP1STDLIBS= \ - $(TOOLSLIB) \ - $(COMPHELPERLIB) \ - $(VCLLIB) \ - $(CPPULIB) \ - $(CPPUHELPERLIB) \ - $(SALLIB) \ - $(XMLSCRIPTLIB) \ - $(TKLIB) \ - $(SVXLIB) \ - $(ISCLIB) \ -# - -svtools = $(INCCOM)/svtools -default: ALLTAR - -.INCLUDE : target.mk - -XML_FILES=\ - insert-sheet.xml\ - message-box.xml\ - move-copy-sheet.xml\ - recover.xml\ - sort-options.xml\ - string-input.xml\ - tab-dialog.xml\ - wordcount.xml\ - zoom.xml\ - -TRALAY=$(AUGMENT_LIBRARY_PATH) tralay -XML_LANGS=$(alllangiso) - -ALLTAR: localize.sdf $(BIN)/testrc $(svtools) $(foreach,i,$(XML_FILES) en-US/$i) - -$(XML_LANGS:f:t"/%.xml ")/%.xml: %.xml - $(TRALAY) -m localize.sdf -o . -l $(XML_LANGS:f:t" -l ") $< - rm -rf en-US - -$(BIN)/%: %.in - cp $< $@ - -$(svtools): -# FIXME: there's a bug in svtools layout or usage -# Include files are in svtools/inc, but are referenced as <svtools/..> -# They probably should be in svtools/inc/svtools -# This means that include files can only be included after svtools -# is built, which would mean a circular dependency, -# because svtools depends on toolkit. - ln -sf ..$/$(PRJ)$/svtools$/inc $(INCCOM)$/svtools - -dist .PHONY : - cp -pv message-box.xml $(PRJ)/uiconfig/layout - cp -pv tab-dialog.xml $(PRJ)/uiconfig/layout - $(SHELL) ./un-test.sh zoom.cxx > ../$(PRJ)/svx/source/dialog/zoom.cxx - $(SHELL) ./un-test.sh zoom.hxx > ../$(PRJ)/svx/source/dialog/zoom.hxx - touch ../$(PRJ)/svx/source/dialog/dlgfact.cxx - cp -pv zoom.xml ../$(PRJ)/svx/uiconfig/layout - $(SHELL) ./un-test.sh wordcountdialog.cxx > ../$(PRJ)/sw/source/ui/dialog/wordcountdialog.cxx - $(SHELL) ./un-test.sh wordcountdialog.hxx > ../$(PRJ)/sw/source/ui/inc/wordcountdialog.hxx - touch ../$(PRJ)/sw/source/ui/dialog/swdlgfact.cxx - cp -pv wordcount.xml ../$(PRJ)/sw/uiconfig/layout - # FIXME: broken setup - ln -sf ../inc/wordcountdialog.hxx ../$(PRJ)/sw/source/ui/dialog/wordcountdialog.hxx - $(SHELL) ./un-test.sh tpsort.cxx > ../$(PRJ)/sc/source/ui/dbgui/tpsort.cxx - $(SHELL) ./un-test.sh tpsort.hxx > ../$(PRJ)/sc/source/ui/inc/tpsort.hxx - $(SHELL) ./un-test.sh sortdlg.cxx > ../$(PRJ)/sc/source/ui/dbgui/sortdlg.cxx - $(SHELL) ./un-test.sh sortdlg.hxx > ../$(PRJ)/sc/source/ui/inc/sortdlg.hxx - touch ../$(PRJ)/sc/source/ui/attrdlg/scdlgfact.cxx - touch ../$(PRJ)/sc/source/ui/view/cellsh2.cxx - cp -pv insert-sheet.xml ../$(PRJ)/sc/uiconfig/layout - cp -pv move-copy-sheet.xml ../$(PRJ)/sc/uiconfig/layout - cp -pv sort-options.xml ../$(PRJ)/sc/uiconfig/layout - cp -pv string-input.xml ../$(PRJ)/sc/uiconfig/layout - -localize.sdf: $(PRJ)/../svx/source/dialog/localize.sdf $(PRJ)/../sw/source/ui/dialog/localize.sdf $(PRJ)/../sc/source/ui/src/localize.sdf - grep sortdlg.src $(PRJ)/../sc/source/ui/src/localize.sdf | awk -F'\t' '{{printf "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n", "layout", "sc\\uiconfig\\layout\\sort-options.xml", $$3, "layout", $$6 "_label", "", "", $$8, "0", $$10, $$11, $$12, "", $$14, $$15}}' | sed -e 's/\(\(FL\|STR\)_[^\t]*\)_label/\1_text/' -e 's/\t_label/\tRID_SCDLG_SORT_title/' > sort-options-$@ - grep wordcountdialog.src $(PRJ)/../sw/source/ui/dialog/localize.sdf | awk -F'\t' '{{printf "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n", "layout", "sw\\uiconfig\\layout\\wordcount.xml", $$3, "layout", $$6 "_label", "", "", $$8, "0", $$10, $$11, $$12, "", $$14, $$15}}' | sed -e 's/\(\(FL\|STR\)_[^\t]*\)_label/\1_text/' -e 's/\t_label/\tDLG_WORDCOUNT_title/' > wordcount-$@ - grep zoom.src $(PRJ)/source/dialog/localize.sdf | awk -F'\t' '{{printf "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n", "layout", "svx\\uiconfig\\layout\\zoom.xml", $$3, "layout", $$6 "_label", "", "", $$8, "0", $$10, $$11, $$12, "", $$14, $$15}}' | sed -e 's/\(\(FL\|STR\)_[^\t]*\)_label/\1_text/' -e 's/\t_label/\tRID_SVXDLG_ZOOM_title/' > zoom-$@ - echo '#empty' | cat - sort-options-$@ wordcount-$@ zoom-$@ > $@ - rm -f *-$@ - -.ELSE # ENABLE_LAYOUT != TRUE -all .PHONY: -.ENDIF # ENABLE_LAYOUT != TRUE diff --git a/toolkit/workben/makefile.mk b/toolkit/workben/makefile.mk deleted file mode 100644 index 8e54c7737a20..000000000000 --- a/toolkit/workben/makefile.mk +++ /dev/null @@ -1,84 +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. -# -#************************************************************************* - -PRJ=.. - -PRJNAME=toolkit -TARGET=unodialog -LIBTARGET=NO -ENABLE_EXCEPTIONS=TRUE - - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Files -------------------------------------------------------- - -CXXFILES= unodialog.cxx - -OBJFILES= $(OBJ)$/unodialog.obj - - -APP2NOSAL= TRUE -APP2TARGET= unodialog -APP2OBJS= $(OBJ)$/unodialog.obj -APP2STDLIBS=$(TOOLSLIB) \ - $(SOTLIB) \ - $(COMPHELPERLIB) \ - $(CPPULIB) \ - $(CPPUHELPERLIB) \ - $(VCLLIB) \ - $(SALLIB) - -# $(SVTOOLLIB) \ - -APP2DEF= $(MISC)$/unodialog.def - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - - -# ------------------------------------------------------------------ -# Windows -# ------------------------------------------------------------------ - -.IF "$(GUI)" == "WIN" - -$(MISC)$/unodialog.def: makefile.mk - echo NAME unodialog >$@ - echo DESCRIPTION 'StarView - Testprogramm' >>$@ - echo EXETYPE WINDOWS >>$@ - echo STUB 'winSTUB.EXE' >>$@ - echo PROTMODE >>$@ - echo CODE PRELOAD MOVEABLE DISCARDABLE >>$@ - echo DATA PRELOAD MOVEABLE MULTIPLE >>$@ - echo HEAPSIZE 8192 >>$@ - echo STACKSIZE 32768 >>$@ - -.ENDIF |