diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-06-19 12:47:44 +0200 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-06-19 12:47:44 +0200 |
commit | 941020379b1ea1ec7c564c21e68ea1674cda7683 (patch) | |
tree | 40fcaf109d6d585bcdc0faf7ea6c0812b3cc9a39 /toolkit | |
parent | 0692507dcc62e94c7af88388961db1d7d12d6dbd (diff) | |
parent | 0d2916e03ea51529e15995830a1a8c36bd72e442 (diff) |
Merge branch 'master' into feature/gnumake4
Conflicts:
basebmp/prj/d.lst
basebmp/test/basictest.cxx
basebmp/test/makefile.mk
basegfx/inc/basegfx/basegfxdllapi.h
basegfx/inc/basegfx/tools/debugplotter.hxx
basegfx/inc/basegfx/tuple/b2ituple.hxx
basegfx/prj/d.lst
basegfx/source/numeric/makefile.mk
basegfx/source/polygon/makefile.mk
basegfx/source/range/makefile.mk
basegfx/source/raster/makefile.mk
basegfx/source/tuple/makefile.mk
basegfx/source/vector/makefile.mk
basegfx/test/basegfx1d.cxx
basegfx/test/makefile.mk
basegfx/util/makefile.mk
canvas/Library_canvasfactory.mk
canvas/Module_canvas.mk
canvas/prj/build.lst
canvas/prj/d.lst
canvas/source/cairo/cairo_canvashelper_texturefill.cxx
canvas/source/cairo/makefile.mk
canvas/source/tools/makefile.mk
comphelper/qa/string/makefile.mk
cppcanvas/Module_cppcanvas.mk
cppcanvas/inc/cppcanvas/cppcanvasdllapi.h
cppcanvas/prj/build.lst
cppcanvas/prj/d.lst
cppcanvas/source/mtfrenderer/makefile.mk
cppcanvas/util/makefile.mk
i18npool/source/search/makefile.mk
regexp/Library_regexp.mk
regexp/prj/d.lst
sax/CppunitTest_sax.mk
sax/Library_sax.mk
sax/prj/d.lst
sax/qa/cppunit/test_converter.cxx
sax/source/expatwrap/attrlistimpl.hxx
sax/util/makefile.mk
svtools/Library_svt.mk
tools/Executable_sspretty.mk
ucbhelper/prj/d.lst
ucbhelper/source/provider/configureucb.cxx
ucbhelper/source/provider/provconf.cxx
ucbhelper/util/makefile.mk
unotools/Library_utl.mk
unotools/Module_unotools.mk
unotools/Package_inc.mk
unotools/prj/build.lst
vcl/Library_desktop_detector.mk
vcl/Library_vcl.mk
vcl/Library_vclplug_gtk.mk
vcl/aqua/source/gdi/salprn.cxx
vcl/inc/aqua/saldata.hxx
vcl/unx/generic/gdi/salgdi3.cxx
Diffstat (limited to 'toolkit')
250 files changed, 3561 insertions, 4282 deletions
diff --git a/toolkit/JunitTest_toolkit_unoapi.mk b/toolkit/JunitTest_toolkit_unoapi.mk index 8c61923d9566..8e3aed68b88c 100755 --- a/toolkit/JunitTest_toolkit_unoapi.mk +++ b/toolkit/JunitTest_toolkit_unoapi.mk @@ -42,12 +42,8 @@ $(eval $(call gb_JunitTest_add_jars,toolkit_unoapi,\ $(OUTDIR)/bin/jurt.jar \ )) -$(eval $(call gb_JunitTest_add_sourcefiles,toolkit_unoapi,\ - toolkit/qa/unoapi/Test \ -)) - $(eval $(call gb_JunitTest_add_classes,toolkit_unoapi,\ - org.openoffice.toolkit.qa.unoapi.Test \ + org.openoffice.test.UnoApiTest \ )) # vim: set noet sw=4 ts=4: diff --git a/toolkit/Library_tk.mk b/toolkit/Library_tk.mk index 44bd96e02a3e..6cae73035236 100644 --- a/toolkit/Library_tk.mk +++ b/toolkit/Library_tk.mk @@ -35,9 +35,9 @@ $(eval $(call gb_Library_add_package_headers,tk,toolkit_inc)) $(eval $(call gb_Library_set_include,tk,\ $$(INCLUDE) \ - -I$(SRCDIR)/toolkit/inc \ - -I$(SRCDIR)/toolkit/inc/pch \ - -I$(SRCDIR)/toolkit/source \ + -I$(realpath $(SRCDIR)/toolkit/inc) \ + -I$(realpath $(SRCDIR)/toolkit/inc/pch) \ + -I$(realpath $(SRCDIR)/toolkit/source) \ -I$(OUTDIR)/inc/offuh \ )) @@ -50,7 +50,6 @@ $(eval $(call gb_Library_add_linked_libs,tk,\ cppu \ cppuhelper \ sal \ - stl \ tl \ utl \ vcl \ @@ -164,7 +163,7 @@ $(eval $(call gb_Library_add_cxxflags,tk,\ )) endif -ifeq ($(OS),LINUX) +ifneq (,$(filter LINUX DRAGONFLY OPENBSD FREEBSD NETBSD, $(OS))) $(eval $(call gb_Library_add_linked_libs,tk,\ X11 \ )) diff --git a/toolkit/Package_inc.mk b/toolkit/Package_inc.mk index 88832533490c..03d49fe6a45e 100644 --- a/toolkit/Package_inc.mk +++ b/toolkit/Package_inc.mk @@ -58,7 +58,6 @@ $(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/mutexandbroadca $(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)) diff --git a/toolkit/doc/layout/ChangeLog b/toolkit/doc/layout/ChangeLog deleted file mode 100644 index 240db833847c..000000000000 --- a/toolkit/doc/layout/ChangeLog +++ /dev/null @@ -1,1286 +0,0 @@ -2008-03-20 Jan Nieuwenhuizen <janneke@gnu.org> - - * source/awt/vclxwindow.cxx: Fix compile warning. - -2008-03-20 Jan Nieuwenhuizen <janneke@gnu.org> - - * util/makefile.mk: Revert obsolete VERSION addition. - -2008-03-20 Jan Nieuwenhuizen <janneke@gnu.org> - - * source/controls/dialogcontrol.cxx, - source/controls/unocontrol.cxx, source/helper/tkresmgr.cxx, - util/defs/wntmsci11: Revert weird initial patch. - -2008-03-20 Jan Nieuwenhuizen <janneke@gnu.org> - - * doc/layout/TODO: Doc update. - -2008-03-20 Jan Nieuwenhuizen <janneke@gnu.org> - - * inc/layout/layout-post.hxx, inc/layout/layout-pre.hxx, - inc/layout/layout.hxx, source/awt/vclxbutton.cxx, - source/vclcompat/wbutton.cxx, workben/layout/recover.xml: Implement - MoreButton. TODO: images. - -2008-03-19 Jan Nieuwenhuizen <janneke@gnu.org> - - * source/vclcompat/wbutton.cxx: Remove redraw cruft, rename - redrawAlready to redraw. - -2008-03-19 Jan Nieuwenhuizen <janneke@gnu.org> - - * inc/layout/layout-post.hxx, source/vclcompat/wbutton.cxx: Step - towards cleaner redraw. - -2008-03-19 Jan Nieuwenhuizen <janneke@gnu.org> - - * inc/layout/layout-post.hxx, inc/layout/layout-pre.hxx, - inc/layout/layout.hxx, source/awt/vclxbutton.cxx, - source/awt/vclxbutton.hxx, source/layout/helper.cxx, - source/vclcompat/wbutton.cxx, workben/layout/recover.cxx, - workben/layout/recover.hxx: Extract AdvancedButton implementation - from recover.cxx into new widget. - -2008-03-19 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/layout/recover.cxx, workben/layout/recover.hxx, - workben/layout/recover.xml: Update recover dialog, make - advanced/simple switching work. - -2008-03-14 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/layout/zoom.cxx: In test mode, enable everything. - -2008-03-14 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/layout/localize.sdf: Manually add new translatable strings - and translations for de, nl. - -2008-03-14 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/layout/zoom.xml: Update zoom to have hbox of Zoom factor - and View layout alongside each other. - -2008-03-14 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/layout/zoom.cxx, workben/layout/zoom.hxx, - workben/layout/zoom.xml: Merge upstream's zoom. - -2008-03-14 Jan Nieuwenhuizen <janneke@gnu.org> - - * source/vclcompat/wbutton.cxx, source/vclcompat/wrapper.hxx: - Nitpick, debugging aid. - -2008-03-14 Jan Nieuwenhuizen <janneke@gnu.org> - - * inc/layout/layout.hxx, source/vclcompat/wrapper.cxx: Implement - FixedLine.IsEnabled(). - -2008-03-14 Jan Nieuwenhuizen <janneke@gnu.org> - - * util/makefile.mk: Build lib name fix. - -2008-03-14 Jan Nieuwenhuizen <janneke@gnu.org> - - * inc/layout/layout-post.hxx, inc/layout/layout-pre.hxx, - inc/layout/layout.hxx, source/vclcompat/wcontainer.cxx, - workben/layout/recover.cxx, workben/layout/recover.hxx, - workben/layout/recover.xml: Complete VBox/HBox wrappers. Not use - them in recover, spacing still wrong. - -2008-03-13 Jan Nieuwenhuizen <janneke@gnu.org> - - * doc/layout/TODO, workben/layout/recover.cxx, - workben/layout/recover.hxx, workben/layout/recover.xml: More - recovery dialog mockuping. - -2008-03-13 Jan Nieuwenhuizen <janneke@gnu.org> - - * source/layout/box-base.cxx: Implement visibility of - elements/containers better. - -2008-03-13 Jan Nieuwenhuizen <janneke@gnu.org> - - * inc/layout/layout-post.hxx, inc/layout/layout-pre.hxx, - inc/layout/layout.hxx, source/layout/helper.cxx, - source/layout/import.cxx, source/layout/proplist.cxx, - source/vclcompat/wbutton.cxx, source/vclcompat/wfield.cxx, - source/vclcompat/wrapper.cxx, source/vclcompat/wrapper.hxx: - Implement FixedImage. Needed for recovery dialog. - -2008-02-28 Jan Nieuwenhuizen <janneke@gnu.org> - - * source/layout/box-base.hxx, workben/layout/editor.cxx: Give - ChildData virtual distructor. - -2008-02-28 Jan Nieuwenhuizen <janneke@gnu.org> - - * inc/layout/layout-post.hxx, inc/layout/layout-pre.hxx, - inc/layout/layout.hxx, source/layout/helper.cxx, - source/vclcompat/makefile.mk, source/vclcompat/wrapper.cxx, - util/makefile.mk, workben/layout/makefile.mk, - workben/layout/recover.cxx, workben/layout/recover.hxx, - workben/layout/recover.xml, workben/layout/test.cxx: Stab at new - recover dialog. - -2008-02-28 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/layout/editor.cxx: Do not clear fresh container. Disable - debug printing. - -2008-02-27 Jan Nieuwenhuizen <janneke@gnu.org> - - * doc/layout/TODO, workben/layout/localize.sdf: Fix localize.sdf for - wordcount. - -2008-02-27 Jan Nieuwenhuizen <janneke@gnu.org> - - * inc/layout/layout-pre.hxx, source/layout/dialogbuttonhbox.cxx: Fix - ID for displaying dialogs. - -2008-02-27 Jan Nieuwenhuizen <janneke@gnu.org> - - * doc/layout/TODO, workben/layout/localize.sdf, - workben/layout/wordcount.xml, workben/layout/zoom.xml: Add strings - for all languages. - -2008-02-27 Jan Nieuwenhuizen <janneke@gnu.org> - - * doc/layout/TODO, source/awt/vclxsplitter.cxx, - source/awt/vclxsplitter.hxx, source/awt/vclxtabcontrol.cxx, - source/awt/vclxtabcontrol.hxx, source/layout/box-base.cxx, - source/layout/box-base.hxx, source/layout/box.cxx, - source/layout/box.hxx, source/layout/container.cxx, - source/layout/dialogbuttonhbox.cxx, - source/layout/dialogbuttonhbox.hxx, source/layout/factory.cxx, - source/layout/flow.cxx, source/layout/helper.cxx, - source/layout/import.hxx, source/layout/makefile.mk, - source/layout/proplist.cxx, source/layout/root.cxx, - source/layout/table.cxx, source/layout/table.hxx, - source/layout/timer.cxx, source/vclcompat/wcontainer.cxx, - source/vclcompat/wfield.cxx, source/vclcompat/wrapper.cxx: Clean-up - code duplication from layout: new Box_Base class implements - addChild, removeChild, getChildren, getChildProperties for Box, - Table, VCLXSplitter, VCLXTabControl. - -2008-02-26 Jan Nieuwenhuizen <janneke@gnu.org> - - * doc/layout/TODO, source/layout/root.cxx: Document more fixmes. - -2008-02-26 Jan Nieuwenhuizen <janneke@gnu.org> - - * doc/layout/TODO, source/layout/proplist.cxx: Remove m237 - workaround. - -2008-02-26 Jan Nieuwenhuizen <janneke@gnu.org> - - * source/layout/helper.cxx: More comment cleanups. - -2008-02-26 Jan Nieuwenhuizen <janneke@gnu.org> - - * source/awt/vclxtabcontrol.cxx, source/layout/box.cxx, - source/layout/container.cxx, source/vclcompat/wrapper.cxx: - Commented-out code cleanups. - -2008-02-26 Jan Nieuwenhuizen <janneke@gnu.org> - - * inc/layout/layout-post.hxx, inc/layout/layout-pre.hxx, - inc/layout/layout.hxx, inc/layout/layoutcore.hxx, - source/awt/forward.hxx, source/awt/vclxbutton.cxx, - source/awt/vclxbutton.hxx, source/awt/vclxdialog.cxx, - source/awt/vclxdialog.hxx, source/awt/vclxfixedline.cxx, - source/awt/vclxfixedline.hxx, source/awt/vclxscroller.cxx, - source/awt/vclxscroller.hxx, source/awt/vclxsplitter.cxx, - source/awt/vclxsplitter.hxx, source/awt/vclxtabcontrol.cxx, - source/awt/vclxtabcontrol.hxx, source/layout/bin.cxx, - source/layout/bin.hxx, source/layout/box.cxx, - source/layout/box.hxx, source/layout/container.cxx, - source/layout/container.hxx, source/layout/dialogbuttonhbox.cxx, - source/layout/dialogbuttonhbox.hxx, source/layout/factory.cxx, - source/layout/factory.hxx, source/layout/flow.cxx, - source/layout/flow.hxx, source/layout/helper.cxx, - source/layout/helper.hxx, source/layout/import.cxx, - source/layout/import.hxx, source/layout/makefile.mk, - source/layout/precompiled_xmlscript.hxx, - source/layout/proplist.cxx, source/layout/proplist.hxx, - source/layout/root.cxx, source/layout/root.hxx, - source/layout/table.cxx, source/layout/table.hxx, - source/layout/timer.cxx, source/layout/timer.hxx, - source/layout/translate.cxx, source/layout/translate.hxx, - source/vclcompat/makefile.mk, source/vclcompat/wbutton.cxx, - source/vclcompat/wcontainer.cxx, source/vclcompat/wfield.cxx, - source/vclcompat/wrapper.cxx, source/vclcompat/wrapper.hxx, - workben/layout/editor.cxx, workben/layout/editor.hxx, - workben/layout/makefile.mk, workben/layout/simple-paragraph.cxx, - workben/layout/simple-paragraph.hxx, workben/layout/test.cxx, - workben/layout/uno.hxx, workben/layout/zoom_def.hxx: Add licence - headers. - -2008-02-26 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/layout/meekfile.mk: Junk meekfile.mk - -2008-02-26 Jan Nieuwenhuizen <janneke@gnu.org> - - * doc/layout/TODO: Update TODO. - -2008-02-26 Jan Nieuwenhuizen <janneke@gnu.org> - - * inc/toolkit/awt/vclxwindows.hxx, source/awt/vclxwindow.cxx, - source/awt/vclxwindows.cxx: Move VCLXScrollBar's getMinimumSize() - from VCLXWindow's switch to method. - -2008-02-26 Jan Nieuwenhuizen <janneke@gnu.org> - - * inc/toolkit/awt/vclxwindows.hxx, source/awt/vclxwindow.cxx, - source/awt/vclxwindows.cxx: Move VCLXMessageBox's getMinimumSize() - from VCLXWindow's switch to method. - -2008-02-26 Jan Nieuwenhuizen <janneke@gnu.org> - - * doc/layout/TODO, inc/toolkit/awt/vclxtopwindow.hxx, - source/awt/vclxdialog.cxx, source/awt/vclxdialog.hxx, - source/awt/vclxtopwindow.cxx: Remove code duplication from - VCLXDialog. - -2008-02-26 Jan Nieuwenhuizen <janneke@gnu.org> - - * source/awt/vclxdialog.cxx, source/vclcompat/wbutton.cxx, - source/vclcompat/wcontainer.cxx, source/vclcompat/wrapper.hxx: - Comment cleanup. - -2008-02-21 Jan Nieuwenhuizen <janneke@gnu.org> - - * doc/layout/TODO, source/layout/helper.hxx, - workben/layout/editor.cxx, workben/layout/wordcountdialog.cxx: Fix - remaining SUN warnings. - -2008-02-21 Jan Nieuwenhuizen <janneke@gnu.org> - - * inc/layout/layout.hxx, source/awt/vclxfixedline.hxx, - source/layout/byteseq.cxx, source/layout/helper.hxx, - source/layout/import.cxx, source/layout/makefile.mk, - source/layout/proplist.cxx, source/layout/translate.hxx, - source/vclcompat/wbutton.cxx, source/vclcompat/wcontainer.cxx, - source/vclcompat/wfield.cxx, source/vclcompat/wrapper.cxx, - source/vclcompat/wrapper.hxx, workben/layout/editor.cxx: Fix some - sunstudio12 warnings. - -2008-02-20 Jan Nieuwenhuizen <janneke@gnu.org> - - * doc/layout/TODO, source/awt/makefile.mk, - source/awt/vclxbutton.cxx, source/awt/vclxbutton.hxx, - source/awt/vclxproxy.cxx, source/awt/vclxproxy.hxx, - source/layout/helper.cxx: Junk VCLXProxy. - -2008-02-20 Jan Nieuwenhuizen <janneke@gnu.org> - - * inc/toolkit/awt/vclxwindows.hxx, - inc/toolkit/helper/listenermultiplexer.hxx, - source/awt/vclxbutton.cxx, source/awt/vclxbutton.hxx, - source/awt/vclxtabcontrol.cxx, source/awt/vclxtabcontrol.hxx, - source/layout/helper.cxx: Hello world on AWTVCLXCancelButton() label - and images. - -2008-02-20 Jan Nieuwenhuizen <janneke@gnu.org> - - * .gitignore, source/awt/forward.hxx, source/awt/makefile.mk, - source/awt/vclxdialog.cxx, source/awt/vclxdialog.hxx, - source/awt/vclxfixedline.cxx, source/awt/vclxfixedline.hxx, - source/awt/vclxscroller.cxx, source/awt/vclxscroller.hxx, - source/awt/vclxsplitter.cxx, source/awt/vclxsplitter.hxx, - source/awt/vclxtabcontrol.cxx, source/awt/vclxtabcontrol.hxx, - source/layout/makefile.mk, workben/layout/localize-de.sdf, - workben/layout/localize-nl.sdf: Cleanup of includes, namespace in - headers in awt. - -2008-02-11 Jan Nieuwenhuizen <janneke@gnu.org> - - * prj/build.lst: Have workspace depend on util, fixes parallel build - (thanks kendy, Fridrich). - -2008-02-07 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/ooo-patch: Update ooo-patch. - -2008-02-07 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/ooo-patch: Add transex3 to ooo-patch. - -2008-02-07 Jan Nieuwenhuizen <janneke@gnu.org> - - * TODO, workben/ooo-patch: Add transex3 to ooo-patch & update. - -2008-02-07 Jan Nieuwenhuizen <janneke@gnu.org> - - * TODO, workben/ooo-patch: Add transex3 patch export. - -2008-02-07 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/de/wordcount.xml, workben/de/zoom.xml, - workben/nl/wordcount.xml, workben/nl/zoom.xml: Remove - hand-translated xml files. - -2008-02-07 Jan Nieuwenhuizen <janneke@gnu.org> - - * TODO, source/core/proplist.cxx: Grok translatable attributes with - _ prefix. - -2008-02-07 Jan Nieuwenhuizen <janneke@gnu.org> - - * : Add en-US,de,nl populated localize.sdf for zoom and wordcount. - -2008-02-07 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/makefile.mk: Add compile time tralay translation rule. - -2008-02-07 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/de/wordcount.xml, workben/de/zoom.xml, - workben/nl/wordcount.xml, workben/nl/zoom.xml, - workben/wordcount.xml, workben/zoom.xml: Prefix translatable - attributes with _. - -2008-02-04 Jan Nieuwenhuizen <janneke@gnu.org> - - * TODO, source/core/import.cxx, source/core/import.hxx, - source/core/proplist.cxx, source/core/proplist.hxx, - source/core/root.cxx, source/core/root.hxx, workben/zoom-1.xml, - workben/zoom-2.xml: Support Ivo Hinkelmann's move label/text/title - attribute to CONTENT transex3 hack. - -2008-01-10 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/nl/zoom.xml, workben/zoom.xml: Remove unnecessary ~. - -2008-01-10 Jan Nieuwenhuizen <janneke@gnu.org> - - * prj/d.lst, workben/de/wordcount.xml, workben/de/zoom.xml, - workben/makefile.mk: Add manually translated de/zoom.xml and - de/wordcount.xml. - -2008-01-10 Jan Nieuwenhuizen <janneke@gnu.org> - - * TODO, workben/ooo-patch: Update patch info. - -2008-01-10 Jan Nieuwenhuizen <janneke@gnu.org> - - * source/core/translate.cxx: Remove #if 0'ed fopen code in - fileExists. - -2008-01-10 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/test.cxx: Remove test code. - -2008-01-10 Jan Nieuwenhuizen <janneke@gnu.org> - - * TODO, prj/d.lst, workben/makefile.mk, workben/ooo-patch: Install - nl/*xml files. - -2008-01-10 Jan Nieuwenhuizen <janneke@gnu.org> - - * TODO, source/core/makefile.mk, source/core/root.cxx, - source/core/translate.cxx, source/core/translate.hxx, - workben/nl/wordcount.xml, workben/nl/zoom.xml, workben/test.cxx: - Implement read-right translation, cheat nl translations for zoom and - wordcount. - -2008-01-09 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/makefile.mk: Check for ENABLE_LAYOUT == "TRUE" (was: != - ""). Disables harder, esp. on Sun. - -2008-01-09 Jan Nieuwenhuizen <janneke@gnu.org> - - * TODO: Add comment about Sun build problems. - -2008-01-09 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/makefile.mk: [!ENABLE_LAYOUT]: Do not compile anything in - workben. Also remove unnecessary not portable compiler flags. - -2008-01-09 Jan Nieuwenhuizen <janneke@gnu.org> - - * : Put gcc flags inside GCC conditional. - -2008-01-08 Jan Nieuwenhuizen <janneke@gnu.org> - - * source/awt/vclxbutton.cxx: Use plain sc_BUTTON.png names for - standard buttons. - -2008-01-08 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/zoom.cxx: Remove zoom.src part from zoom-combobox patch. - -2008-01-08 Jan Nieuwenhuizen <janneke@gnu.org> - - * TODO, workben/ooo-patch: Update to m1. - -2008-01-07 Jan Nieuwenhuizen <janneke@gnu.org> - - * TODO, workben/ooo-patch: Update and add i18n TODO. - -2008-01-04 Jan Nieuwenhuizen <janneke@gnu.org> - - * TODO, source/awt/vclxbutton.cxx: Fix l10n for default buttons. - -2007-12-21 Jan Nieuwenhuizen <janneke@gnu.org> - - * TODO, workben/ooo-patch: Update for ooo-build svn up. - -2007-12-21 Jan Nieuwenhuizen <janneke@gnu.org> - - * source/core/dialogbuttonhbox.cxx, source/core/helper.cxx, - source/core/proplist.cxx, util/makefile.pmk, workben/makefile.mk: - TEST_LAYOUT cleanups and fixes. - -2007-12-21 Jan Nieuwenhuizen <janneke@gnu.org> - - * : [!TEST_LAYOUT]: Read *.xml from BASE_INSTALLATION/share/layout - only. - -2007-12-21 Jan Nieuwenhuizen <janneke@gnu.org> - - * source/wrapper/wrapper.cxx: Cleanups. - -2007-12-21 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/zoom.xml: Update zoom.xml: in m241 FieldTypes:FUNIT_CUSTOM - == 13 (was: 11). - -2007-12-21 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/dialogbuttons-ok.xml, workben/dialogbuttons-reset.xml, - workben/dialogbuttons-save.xml, workben/dialogbuttons-yes.xml: - Remove some cruft from xml. - -2007-12-21 Jan Nieuwenhuizen <janneke@gnu.org> - - * source/core/box.cxx, source/core/box.hxx, - source/core/container.cxx, source/core/dialogbuttonhbox.cxx, - source/core/dialogbuttonhbox.hxx, workben/shutdown.xml: Allow other - pushbuttons in dialogbuttonhbox too, sort as Action type. - -2007-12-20 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/ooo-patch: Add ooo-patch: facilitate export to ooo-build. - -2007-12-20 Jan Nieuwenhuizen <janneke@gnu.org> - - * TODO, source/core/box.cxx, source/core/container.cxx, - workben/adjust.xml, workben/align.xml, workben/wordcount-tight.xml, - workben/wordcount.xml, workben/zoom-indent.xml, workben/zoom.xml: - Default to border=0, padding=0. Clean xml files. - -2007-12-20 Jan Nieuwenhuizen <janneke@gnu.org> - - * TODO, inc/layout/layout.hxx, source/awt/vclxbutton.cxx, - source/awt/vclxbutton.hxx, source/awt/vclxdialog.cxx, - source/core/dialogbuttonhbox.cxx, source/core/dialogbuttonhbox.hxx, - source/wrapper/wbutton.cxx, source/wrapper/wcontainer.cxx, - workben/dialogbuttons-ok.xml, workben/dialogbuttons-reset.xml, - workben/dialogbuttons-save.xml, workben/dialogbuttons-yes.xml, - workben/dialogbuttons.xml, workben/editor.cxx, workben/makefile.mk: - Implement more buttons: Yes, No, Retry, Ignore, Reset, Apply. - -2007-12-19 Jan Nieuwenhuizen <janneke@gnu.org> - - * TODO: Update TODO. - -2007-12-19 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/editor.cxx, workben/test.cxx: More whitespace nits. - -2007-12-19 Jan Nieuwenhuizen <janneke@gnu.org> - - * source/core/box.hxx, source/core/dialogbuttonhbox.cxx, - source/core/dialogbuttonhbox.hxx: Refactor dialogbuttonhbox. - -2007-12-19 Jan Nieuwenhuizen <janneke@gnu.org> - - * apinotes.txt, doc/apinotes.txt, doc/notes.txt, notes.txt: Move - documentation to doc/. - -2007-12-19 Jan Nieuwenhuizen <janneke@gnu.org> - - * source/core/table.cxx, workben/editor.cxx, workben/test.cxx, - workben/uno.hxx: More whitespace fixes. - -2007-12-19 Jan Nieuwenhuizen <janneke@gnu.org> - - * source/core/dialogbuttonhbox.cxx: Comments and whitespace fixes. - -2007-12-18 Jan Nieuwenhuizen <janneke@gnu.org> - - * README, TODO, source/awt/vclxbutton.hxx, source/core/box.hxx, - source/core/dialogbuttonhbox.cxx, source/core/dialogbuttonhbox.hxx, - source/core/helper.cxx, source/core/import.cxx, - source/core/makefile.mk, source/core/proplist.cxx, - workben/dialogbuttons.xml, workben/wordcount.xml, workben/zoom.xml: - Implement dialog button ordering. - -2007-12-18 Jan Nieuwenhuizen <janneke@gnu.org> - - * source/awt/vclxbutton.hxx, source/core/box.hxx, - source/core/helper.cxx, source/core/makefile.mk, - source/wrapper/wrapper.hxx, workben/editor.cxx, workben/test.cxx, - workben/zoom.xml: First attempt at AlertHBox. - -2007-12-17 Jan Nieuwenhuizen <janneke@gnu.org> - - * TODO: Update TODO. - -2007-12-17 Jan Nieuwenhuizen <janneke@gnu.org> - - * : Merge lilypond.org:vc/layout.git/ - -2007-12-17 Jan Nieuwenhuizen <janneke@gnu.org> - - * inc/layout/layout.hxx, source/wrapper/wrapper.cxx: Implement - Dialog::SetParent, add Dialog (::Window *) constructor. - -2007-12-17 Jan Nieuwenhuizen <janneke@gnu.org> - - * : Merge lilypond.org:vc/layout.git/ - -2007-12-17 Jan Nieuwenhuizen <janneke@gnu.org> - - * : Bugfix: update install inc/layout/*. - -2007-12-14 Jan Nieuwenhuizen <janneke@gnu.org> - - * TODO: Apply Michael's TODO patch. - -2007-12-14 Jan Nieuwenhuizen <janneke@gnu.org> - - * source/core/helper.cxx, source/core/helper.hxx, - source/core/proplist.cxx, source/core/proplist.hxx: Move - OUSTRING_CSTR define and debugging compile fix & feature. - -2007-12-14 Jan Nieuwenhuizen <janneke@gnu.org> - - * source/core/timer.cxx: Remove commented-out include. - -2007-11-28 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/editor.cxx, workben/uno.hxx: Add includes for m9. - -2007-11-28 Jan Nieuwenhuizen <janneke@gnu.org> - - * : Major cleanup of includes and header namespace pollution. - -2007-11-28 Jan Nieuwenhuizen <janneke@gnu.org> - - * TODO, inc/layout/layout-post.hxx, inc/layout/layout.hxx, - source/api/com/sun/star/awt/MaxChildrenException.idl, - source/api/com/sun/star/awt/XDialog2.idl, - source/api/com/sun/star/awt/XLayoutFlow.idl, - source/api/com/sun/star/awt/XLayoutFlowContainer.idl, - source/api/com/sun/star/awt/XLayoutRoot.idl, - source/awt/vclxbutton.cxx, source/awt/vclxbutton.hxx, - source/awt/vclxdialog.cxx, source/awt/vclxdialog.hxx, - source/awt/vclxfixedline.cxx, source/awt/vclxfixedline.hxx, - source/awt/vclxproxy.cxx, source/awt/vclxproxy.hxx, - source/awt/vclxscroller.cxx, source/awt/vclxscroller.hxx, - source/awt/vclxsplitter.cxx, source/awt/vclxsplitter.hxx, - source/awt/vclxtabcontrol.cxx, source/awt/vclxtabcontrol.hxx, - source/core/bin.cxx, source/core/bin.hxx, source/core/box.cxx, - source/core/box.hxx, source/core/byteseq.cxx, - source/core/container.cxx, source/core/container.hxx, - source/core/factory.cxx, source/core/factory.hxx, - source/core/flow.cxx, source/core/flow.hxx, - source/core/globals.hxx, source/core/helper.cxx, - source/core/helper.hxx, source/core/import.cxx, - source/core/import.hxx, source/core/root.cxx, source/core/root.hxx, - source/core/table.cxx, source/core/table.hxx, - source/core/timeout.cxx, source/inc/layoutcore.hxx, - source/wrapper/wbutton.cxx, source/wrapper/wcontainer.cxx, - source/wrapper/wfield.cxx, source/wrapper/wimpl.hxx, - source/wrapper/wrapper.cxx: Whitespace and layout cleanups. - -2007-11-28 Jan Nieuwenhuizen <janneke@gnu.org> - - * source/awt/vclxdialog.hxx, source/core/byteseq.cxx, - source/core/import.hxx, source/core/root.cxx, - source/wrapper/wfield.cxx, source/wrapper/wimpl.hxx, - source/wrapper/wrapper.cxx: Cleanup: have braces on separate lines. - -2007-11-28 Jan Nieuwenhuizen <janneke@gnu.org> - - * inc/layout/uno.hxx, workben/uno.hxx: Move uno.hxx to workben, no - need to export it. - -2007-11-28 Jan Nieuwenhuizen <janneke@gnu.org> - - * inc/layout/uno.hxx, source/awt/vclxbutton.cxx, - source/awt/vclxdialog.cxx, source/awt/vclxfixedline.cxx, - source/awt/vclxproxy.cxx, source/awt/vclxscroller.cxx, - source/awt/vclxsplitter.cxx, source/awt/vclxtabcontrol.cxx, - source/core/bin.cxx, source/core/box.cxx, source/core/byteseq.cxx, - source/core/container.cxx, source/core/container.hxx, - source/core/flow.cxx, source/core/globals.hxx, - source/core/helper.cxx, source/core/import.cxx, - source/core/import.hxx, source/core/root.cxx, - source/core/table.cxx, source/core/timeout.cxx, - source/wrapper/wbutton.cxx, source/wrapper/wcontainer.cxx, - source/wrapper/wfield.cxx, source/wrapper/wimpl.hxx, - source/wrapper/wrapper.cxx: Use DBG_ERROR* instead of printing to - console. - -2007-11-28 Jan Nieuwenhuizen <janneke@gnu.org> - - * source/core/box.cxx, source/core/container.cxx, - source/core/container.hxx, source/core/helper.cxx, - source/core/import.cxx, source/core/table.cxx: Use DBG_ERROR instead - of printf for errors. - -2007-11-28 Jan Nieuwenhuizen <janneke@gnu.org> - - * TODO, prj/build.lst: Fix dependency/concurrent make problem. - -2007-11-27 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/wordcountdialog.cxx: Update wordcountdialog.cxx from sw - tree. - -2007-11-27 Jan Nieuwenhuizen <janneke@gnu.org> - - * : Move postprocessing to src2xml. - -2007-11-27 Jan Nieuwenhuizen <janneke@gnu.org> - - * : Move src2xml postprocessing from run-s2x to src2xml.py. - -2007-11-27 Jan Nieuwenhuizen <janneke@gnu.org> - - * src2xml/source/globals.py: src2xml: write progress to stderr, - allows progress while using stdout output. - -2007-11-26 Jan Nieuwenhuizen <janneke@gnu.org> - - * TODO: Update TODO. - -2007-11-26 Jan Nieuwenhuizen <janneke@gnu.org> - - * prj/build.lst, prj/d.lst, workben/makefile.mk: Install xml files - too. Thanks Fridrich! - -2007-11-23 Jan Nieuwenhuizen <janneke@gnu.org> - - * TODO: Update TODO. - -2007-11-23 Jan Nieuwenhuizen <janneke@gnu.org> - - * : Put Ok/Help buttons in homogenous hbox. - -2007-11-23 Jan Nieuwenhuizen <janneke@gnu.org> - - * : Add extra hbox/vbox pairs to reduce cnt:padding duplication. - -2007-11-21 Jan Nieuwenhuizen <janneke@gnu.org> - - * : More layout-pre.hxx cpp hacks to make zoom and wordcount diffs - smaller. - -2007-11-21 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/makefile.mk, workben/un-test.sh: Add un-test.sh to remove - TEST_LAYOUT code and dist into OO.o. - -2007-11-21 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/zoom.cxx: Remove misguided NON_LAYOUT_COMPILE_FIXES and - whitespace nits. - -2007-11-21 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/makefile.mk, workben/pytt, workben/run-s2x, - workben/un-test.sh, workben/zoom.cxx: Add un-test.sh script and dist - target to `distribute' dialog code to OO.o. - -2007-11-21 Jan Nieuwenhuizen <janneke@gnu.org> - - * TODO, inc/layout/layout-post.hxx, inc/layout/layout-pre.hxx, - inc/layout/layout.hxx, source/awt/makefile.mk, - source/core/makefile.mk, source/wrapper/makefile.mk, - workben/makefile.mk, workben/wordcountdialog.cxx, - workben/wordcountdialog.hxx, workben/zoom.cxx, workben/zoom.hxx: - Rename USE_LAYOUT -> ENABLE_LAYOUT. Make zoom, wordcount diffs bits - smaller. - -2007-11-20 Jan Nieuwenhuizen <janneke@gnu.org> - - * : Add <layout/layout-pre.hxx> <layout/layout-post.hxx> cpp - hacking. - -2007-11-20 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/run-s2x: Remove all geometry attributes. - -2007-11-19 Jan Nieuwenhuizen <janneke@gnu.org> - - * TODO: Update TODO. - -2007-11-19 Jan Nieuwenhuizen <janneke@gnu.org> - - * source/core/helper.cxx: Disable "fixedinfo" workaround. - -2007-11-19 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/wordcount.xml: Remove misguided "fixedinfo" from - wordcount.xml. - -2007-11-19 Jan Nieuwenhuizen <janneke@gnu.org> - - * .gitignore: Ingore pyc files. - -2007-11-19 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/wordcount-plain.xml, workben/wordcount-tight.xml, - workben/zoom-plain.xml: Add plain postprocessed output from src2xml. - -2007-11-19 Jan Nieuwenhuizen <janneke@gnu.org> - - * : Comment-out #include statements from .src files. - -2007-11-19 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/zoom.cxx, workben/zoom.xml: Use stringize to make zoom.cxx - diff smaller. - -2007-11-19 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/wordcount.xml, workben/wordcountdialog.cxx: Use stringize - to make wordcount diff smaller. - -2007-11-19 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/test.cxx: Fix standalone .xml loading for test. - -2007-11-19 Jan Nieuwenhuizen <janneke@gnu.org> - - * TODO, workben/run-s2x: Add run-s2x: make .xml from src2xml - compilable for zoom, wordcount. - -2007-11-19 Jan Nieuwenhuizen <janneke@gnu.org> - - * TODO, source/core/helper.cxx: Small fixedline doco fix. - -2007-11-19 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/wordcount.xml, workben/wordcountdialog.hxx: Use - "fixedinfo" rather than "fixedtext" in wordcountdialog. - -2007-11-19 Jan Nieuwenhuizen <janneke@gnu.org> - - * : Use "fixedtext" to when asked to create "fixedinfo". - -2007-11-19 Jan Nieuwenhuizen <janneke@gnu.org> - - * inc/layout/layout.hxx, source/wrapper/wrapper.cxx: Implement - FixedInfo. - -2007-11-19 Jan Nieuwenhuizen <janneke@gnu.org> - - * cenarios, source/awt/vclxdialog.cxx, source/core/root.cxx, - source/wrapper/wimpl.hxx, source/wrapper/wrapper.cxx: Cleanups. - -2007-11-19 Jan Nieuwenhuizen <janneke@gnu.org> - - * inc/layout/uno.hxx, source/core/factory.cxx, - source/core/makefile.mk, source/core/root.cxx, - source/core/root.hxx, source/wrapper/makefile.mk, - source/wrapper/wrapper.cxx, workben/makefile.mk: Remove - [!LAYOUT_FACTORY] branch. - -2007-11-19 Jan Nieuwenhuizen <janneke@gnu.org> - - * source/Documento por Gravar 1: Remove Documento por Gravar 1. - -2007-11-16 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/zoom.xml: Tweak. - -2007-11-16 Jan Nieuwenhuizen <janneke@gnu.org> - - * : [LAYOUT_FACTORY]: Add LayoutFactory and register that for Layout - Serviceinfo instead of LayoutRoot. - -2007-11-16 Jan Nieuwenhuizen <janneke@gnu.org> - - * README: Update README. - -2007-11-16 Jan Nieuwenhuizen <janneke@gnu.org> - - * : Also grok TypeClass_ENUM. Set unit=11 (custom) on zoom - metricfield. - -2007-11-16 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/wordcountdialog.cxx: Typo in workben/wordcountdialog. - Fixes Document word count display. - -2007-11-15 Jan Nieuwenhuizen <janneke@gnu.org> - - * TODO: Update TODO. - -2007-11-15 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/wordcount.xml, workben/wordcountdialog.cxx, - workben/wordcountdialog.xml: Rename wordcountdialog.xml to - wordcount.xml, compile fixes from sw/... - -2007-11-15 Jan Nieuwenhuizen <janneke@gnu.org> - - * source/core/import.cxx, source/core/import.hxx: Indentation fixes. - Move ~ElementBase destructor to cxx file. - -2007-11-15 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/test.cxx: Bugfix for test default --test argument. - -2007-11-15 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/wordcountdialog.xml: Wordcountdialog default text tweak. - -2007-11-15 Jan Nieuwenhuizen <janneke@gnu.org> - - * source/core/root.cxx, source/core/root.hxx, - source/wrapper/wrapper.cxx: Remove LAYOUT_WEAK and other hackerish - feeble attempts at second init bug. - -2007-11-15 Jan Nieuwenhuizen <janneke@gnu.org> - - * : More attempts at tackling second init bug. - -2007-11-15 Jan Nieuwenhuizen <janneke@gnu.org> - - * : Lost of handwaving to try to destroy LayoutRoot. - -2007-11-15 Jan Nieuwenhuizen <janneke@gnu.org> - - * source/core/import.hxx: Add destructor for WidgetElement. - -2007-11-15 Jan Nieuwenhuizen <janneke@gnu.org> - - * : Fix indentation of import.cxx. - -2007-11-14 Jan Nieuwenhuizen <janneke@gnu.org> - - * TODO, workben/zoom-margin.xml, workben/zoom.xml: Tweak zoom - dialog. Add zoom-margin.xml. - -2007-11-14 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/wordcountdialog.xml: Tweak wordcountdialog till it looks - nice. - -2007-11-14 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/wordcountdialog.cxx: Typo. - -2007-11-14 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/wordcountdialog.xml: Import workben/wordcountdialog.xml - straight from src2xml. - -2007-11-14 Jan Nieuwenhuizen <janneke@gnu.org> - - * : src2xml/source/src2xml.py: also grok -I option, do not print - progress. - -2007-11-14 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/zoom.xml: Use modaldialog for zoom.xml. - -2007-11-14 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/wordcountdialog.xml, workben/zoom_def.hxx: Oops, add - zoom_def.hxx and wordcountdialog.xml. - -2007-11-14 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/test.cxx: Refactor test program, also run wordcountdialog. - -2007-11-14 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/test.cxx: Prune unused headers. - -2007-11-14 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/zoom.cxx, workben/zoom.hxx: Make zoom diff even smaller, - import from svx. - -2007-11-13 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/makefile.mk, workben/wordcountdialog.cxx, - workben/wordcountdialog.hxx: Make wordcountdialog compilable under - test and add to makefile. - -2007-11-13 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/wordcountdialog.cxx, workben/wordcountdialog.hxx: Import - wordcountdialog.cxx, wordcountdialog.hxx. - -2007-11-13 Jan Nieuwenhuizen <janneke@gnu.org> - - * inc/layout/layout.hxx, inc/layout/uno.hxx, - source/awt/globals.hxx, source/awt/vclxdialog.cxx, - source/awt/vclxdialog.hxx, source/awt/vclxfixedline.cxx, - source/awt/vclxfixedline.hxx, source/awt/vclxproxy.cxx, - source/awt/vclxscroller.cxx, source/awt/vclxscroller.hxx, - source/awt/vclxsplitter.cxx, source/awt/vclxsplitter.hxx, - source/awt/vclxtabcontrol.cxx, source/awt/vclxtabcontrol.hxx, - source/core/bin.cxx, source/core/bin.hxx, source/core/box.cxx, - source/core/box.hxx, source/core/byteseq.cxx, - source/core/container.cxx, source/core/container.hxx, - source/core/factory.cxx, source/core/flow.cxx, - source/core/flow.hxx, source/core/globals.hxx, - source/core/helper.cxx, source/core/helper.hxx, - source/core/import.cxx, source/core/import.hxx, - source/core/root.cxx, source/core/root.hxx, source/core/table.cxx, - source/core/table.hxx, source/core/timeout.cxx, - source/core/timeout.hxx, source/inc/layoutcore.hxx, - source/wrapper/wbutton.cxx, source/wrapper/wcontainer.cxx, - source/wrapper/wfield.cxx, source/wrapper/wrapper.cxx, - workben/editor.cxx, workben/editor.hxx, workben/paragraph.cxx, - workben/paragraph.hxx, workben/simple-paragraph.cxx, - workben/simple-paragraph.hxx, workben/test.cxx: Replace TAB -> 4 - spaces. - -2007-11-13 Jan Nieuwenhuizen <janneke@gnu.org> - - * TODO: Update TODO. - -2007-11-13 Jan Nieuwenhuizen <janneke@gnu.org> - - * source/core/helper.cxx, source/wrapper/wbutton.cxx, - source/wrapper/wimpl.hxx, source/wrapper/wrapper.cxx: Add debug - printing, ~ContextImpl. - -2007-11-13 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/zoom.xml: Add space in custom-unit-text. - -2007-11-13 Jan Nieuwenhuizen <janneke@gnu.org> - - * TODO: Update TODO. - -2007-11-13 Jan Nieuwenhuizen <janneke@gnu.org> - - * : Remove core/dialog.hxx, core/dialog.cxx. - -2007-11-13 Jan Nieuwenhuizen <janneke@gnu.org> - - * TODO: Update TODO. - -2007-11-13 Jan Nieuwenhuizen <janneke@gnu.org> - - * source/wrapper/wbutton.cxx: Make RadioButton hack more complete: - remove buttons from RadioButtonGroup too. - -2007-11-13 Jan Nieuwenhuizen <janneke@gnu.org> - - * source/wrapper/wimpl.hxx: Make WindowImpl hierarchy virtual from - top. - -2007-11-13 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/zoom.xml: Add Id for FixedLine. Fixes warning. - -2007-11-13 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/zoom.cxx: Fix comment. Import from svx. - -2007-11-12 Jan Nieuwenhuizen <janneke@gnu.org> - - * : Replace XDialog2, VCXDialog, Dialog Cancel/Help/Ok by EndDialog - ( BUTTONID_* ) - -2007-11-12 Jan Nieuwenhuizen <janneke@gnu.org> - - * : Actually return the result of a dialog. - -2007-11-12 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/zoom.cxx, workben/zoom.hxx: Update zoom code from svx - module with TEST_LAYOUT switches. - -2007-11-12 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/makefile.mk: Also set -DTEST_LAYOUT in makefile. - -2007-11-12 Jan Nieuwenhuizen <janneke@gnu.org> - - * source/wrapper/wbutton.cxx: Workaround for radiobutton-unset - inside OOo. - -2007-11-09 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/test.cxx: Add comment about using WeakImplHelper1 for - standalone run. - -2007-11-09 Jan Nieuwenhuizen <janneke@gnu.org> - - * inc/layout/uno.hxx: Compile fix for using WeakImplHelper1 in - UnoBootstrapLayout. - -2007-11-09 Jan Nieuwenhuizen <janneke@gnu.org> - - * : Rename UnoBootstrapSucks to UnoBootstrapLayout and move to - uno.hxx header. - -2007-11-09 Jan Nieuwenhuizen <janneke@gnu.org> - - * : Rename #define LAYOUT to USE_LAYOUT. - -2007-11-08 Jan Nieuwenhuizen <janneke@gnu.org> - - * : In-tree compile fixes for -DLAYOUT=1. - -2007-11-08 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/zoom.hxx: Make diff with svx/source/dialog/zoom.hxx - minimal. - -2007-11-08 Jan Nieuwenhuizen <janneke@gnu.org> - - * : Add FixedLine member to SvxZoomDialog. - -2007-11-08 Jan Nieuwenhuizen <janneke@gnu.org> - - * inc/layout/layout.hxx, workben/editor.cxx: Do not set namespace in - header. - -2007-11-08 Jan Nieuwenhuizen <janneke@gnu.org> - - * : Make diff for zoom.cxx with svx/source/dialog/zoom.cxx minimal. - -2007-11-07 Jan Nieuwenhuizen <janneke@gnu.org> - - * TODO: Update TODO. - -2007-11-07 Jan Nieuwenhuizen <janneke@gnu.org> - - * source/wrapper/wbutton.cxx: Use #if 0 rather than #if 1 and add - comment, easier to catch. - -2007-11-07 Jan Nieuwenhuizen <janneke@gnu.org> - - * source/awt/vclxdialog.cxx: Use BUTTONID_CANCEL, BUTTONID_OK from - msgbox.hxx rather than ERRCODE. - -2007-11-07 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/zoom.cxx: Remove debugging code. - -2007-11-07 Jan Nieuwenhuizen <janneke@gnu.org> - - * inc/layout/layout.hxx, source/api/com/sun/star/awt/XDialog2.idl, - source/awt/vclxdialog.cxx, source/awt/vclxdialog.hxx, - source/wrapper/wbutton.cxx, source/wrapper/wrapper.cxx: Implement Ok - and Help alongside Cancel in XDialog2, VCLXDialog, OKButton. - -2007-11-07 Jan Nieuwenhuizen <janneke@gnu.org> - - * : Add workben/paragraph.* - -2007-11-07 Jan Nieuwenhuizen <janneke@gnu.org> - - * : Use 'has_border' instead of 'border' for awt attributes. Also - put back fullsize, optimumsize, show properties. - -2007-11-07 Jan Nieuwenhuizen <janneke@gnu.org> - - * source/core/box.cxx: Spacing nits. - -2007-11-07 Jan Nieuwenhuizen <janneke@gnu.org> - - * TODO: Add Ricardo's suggestion for actual dialog. - -2007-11-05 Jan Nieuwenhuizen <janneke@gnu.org> - - * : Make Window (top of layout hierarchy) virtual. - -2007-11-05 Jan Nieuwenhuizen <janneke@gnu.org> - - * : Tweaks to zoom dialog. - -2007-11-05 Jan Nieuwenhuizen <janneke@gnu.org> - - * source/wrapper/wbutton.cxx: Remove debugging code and add explicit - casts for mpWindow in callbacks. - -2007-10-31 Michael Meeks <michael@t60p.(none)> - - * source/wrapper/wbutton.cxx: raw mpWindow static casting fix - -2007-10-30 Jan Nieuwenhuizen <janneke@gnu.org> - - * : Add Kohei's converter under src2xml. - -2007-10-30 Jan Nieuwenhuizen <janneke@gnu.org> - - * .gitignore: Ignore more. - -2007-10-30 Jan Nieuwenhuizen <janneke@gnu.org> - - * source/wrapper/wbutton.cxx: Only print debugging if pointers are - wrong. - -2007-10-30 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/zoom.cxx: Debug print. - -2007-10-30 Jan Nieuwenhuizen <janneke@gnu.org> - - * source/api/makefile.mk, source/awt/makefile.mk, - source/core/makefile.mk, source/wrapper/makefile.mk, - util/makefile.mk, workben/makefile.mk: Unification of .mk files. - -2007-10-30 Jan Nieuwenhuizen <janneke@gnu.org> - - * : Add mpWindow != &OKbutton debug code and crude fix. - -2007-10-30 Jan Nieuwenhuizen <janneke@gnu.org> - - * : Revert "Revert introduction of XDialog2." - -2007-10-30 Jan Nieuwenhuizen <janneke@gnu.org> - - * source/api/makefile.mk, source/awt/vclxdialog.hxx, - source/core/dialog.cxx, source/core/dialog.hxx, - source/core/globals.hxx, source/core/import.cxx, - source/core/import.hxx, source/core/makefile.mk, - source/wrapper/wrapper.cxx, workben/test.cxx: Revert introduction of - XDialog2. - -2007-10-30 Jan Nieuwenhuizen <janneke@gnu.org> - - * source/wrapper/wbutton.cxx: Revert - 338f4229e321fa79ab3564504d1546e5010c0b0b. - -2007-10-30 Jan Nieuwenhuizen <janneke@gnu.org> - - * TODO: Update TODO. - -2007-10-30 Jan Nieuwenhuizen <janneke@gnu.org> - - * source/api/com/sun/star/awt/XDialog2.idl: Spacing nit. - -2007-10-30 Jan Nieuwenhuizen <janneke@gnu.org> - - * : Revert "Add GetImplementation to VCLXProxy." - -2007-10-30 Jan Nieuwenhuizen <janneke@gnu.org> - - * : Revert "Add Click and LINK (Click) to IconButton." - -2007-10-30 Jan Nieuwenhuizen <janneke@gnu.org> - - * TODO: Update TODO. - -2007-10-30 Jan Nieuwenhuizen <janneke@gnu.org> - - * : Implement non-dummy HelpButton. - -2007-10-29 Jan Nieuwenhuizen <janneke@gnu.org> - - * : Oops, add XDialog2 to archive. - -2007-10-29 Jan Nieuwenhuizen <janneke@gnu.org> - - * : Implement cancel in vclxdialog. - -2007-10-29 Jan Nieuwenhuizen <janneke@gnu.org> - - * : Implement default callback to ButtonImpl using XButton. - -2007-10-29 Jan Nieuwenhuizen <janneke@gnu.org> - - * : Revert "Set click handler in Button instead of ButtonImpl, add - debug printing." - -2007-10-29 Jan Nieuwenhuizen <janneke@gnu.org> - - * : Revert "Attempt at using DialogImpl to hold button Click - handler." - -2007-10-29 Jan Nieuwenhuizen <janneke@gnu.org> - - * : Revert "Pass a Button instead of ButtonImpl to default click - handler." - -2007-10-29 Jan Nieuwenhuizen <janneke@gnu.org> - - * : Revert "Use Dialog as the Click link handler." - -2007-10-29 Jan Nieuwenhuizen <janneke@gnu.org> - - * inc/layout/layout.hxx, source/wrapper/wbutton.cxx: Use Dialog as - the Click link handler. - -2007-10-29 Jan Nieuwenhuizen <janneke@gnu.org> - - * : Pass a Button instead of ButtonImpl to default click handler. - -2007-10-29 Jan Nieuwenhuizen <janneke@gnu.org> - - * : Attempt at using DialogImpl to hold button Click handler. - -2007-10-29 Jan Nieuwenhuizen <janneke@gnu.org> - - * : Set click handler in Button instead of ButtonImpl, add debug - printing. - -2007-10-29 Jan Nieuwenhuizen <janneke@gnu.org> - - * source/wrapper/wbutton.cxx: Add non-dummy implementation of - CancelButtonImpl. - -2007-10-29 Jan Nieuwenhuizen <janneke@gnu.org> - - * source/awt/vclxdialog.cxx: Add comment about XDialog2::cancel's - pure virtualness. - -2007-10-29 Jan Nieuwenhuizen <janneke@gnu.org> - - * source/wrapper/wrapper.cxx: Add debug print to - layout::Dialog::Cancel. - -2007-10-29 Jan Nieuwenhuizen <janneke@gnu.org> - - * : if(0)'ed code that sets default handler for ButtonImpl. - -2007-10-26 Jan Nieuwenhuizen <janneke@gnu.org> - - * source/awt/vclxbutton.cxx, source/awt/vclxbutton.hxx: Add Click - and LINK (Click) to IconButton. - -2007-10-26 Jan Nieuwenhuizen <janneke@gnu.org> - - * source/awt/vclxproxy.cxx, source/awt/vclxproxy.hxx: Add - GetImplementation to VCLXProxy. - -2007-10-26 Jan Nieuwenhuizen <janneke@gnu.org> - - * inc/layout/layout.hxx, source/api/makefile.mk, - source/awt/vclxdialog.cxx, source/awt/vclxdialog.hxx, - source/core/dialog.cxx, source/core/dialog.hxx, - source/core/globals.hxx, source/core/import.cxx, - source/core/import.hxx, source/core/makefile.mk, - source/wrapper/wrapper.cxx, workben/test.cxx: Add XDialog2 with - dummy Cancel interface. Use it instead of XDialog. - -2007-10-26 Jan Nieuwenhuizen <janneke@gnu.org> - - * TODO: Add Michael's bug list, with progress. - -2007-10-25 Jan Nieuwenhuizen <janneke@gnu.org> - - * : Silence non-virtual-destructor warnings the proper way. - -2007-10-24 Jan Nieuwenhuizen <janneke@gnu.org> - - * ChangeLog: Put marker in ChangeLog to say it's discontinued. diff --git a/toolkit/doc/layout/ChangeLog.0 b/toolkit/doc/layout/ChangeLog.0 deleted file mode 100644 index 326cbe218ec6..000000000000 --- a/toolkit/doc/layout/ChangeLog.0 +++ /dev/null @@ -1,546 +0,0 @@ -2007-10-24 Jan Nieuwenhuizen <janneke@gnu.org> - - * Discontinued for now. Generate from git log. - -2007-10-22 Jan Nieuwenhuizen <janneke@gnu.org> - - * source/awt/vclxsplitter.hxx: - * source/awt/vclxtabcontrol.hxx: - * source/core/bin.cxx: - * source/core/bin.hxx: - * source/core/box.cxx: - * source/core/box.hxx: - * source/core/container.hxx: - * source/core/flow.cxx: - * source/core/flow.hxx: - * source/core/table.hxx (getHeightForWidth): Use sal_Int32 instead of - LONG. Fixes compile on x86_64. - - * source/awt/vclxsplitter.cxx: - * source/awt/vclxscroller.cxx: - * source/awt/vclxdialog.cxx: Use %d, as INT is used here, - not LONG. Fixes compile warnings on x86_64. - - * workben/refresh: FIXME: filter-out flood of - - class <> has virtual functions but non-virtual destructor - - for now, to make other messages visible. - - * Resolve conflicts. - -2007-10-19 Jan Nieuwenhuizen <janneke@gnu.org> - - * workben/test.cxx (MyApp::Main): Display usage () upon -h, --help. - - * workben/refresh: Append "$@" so that refresh --inst FOO works. - - * README: New file. - - * workben/refresh: Softcode outdir. Fixes running on x86_64. - - * workben/makefile.mk (APP1STDLIBS): Softcode layout library name. - Fixes linking on x86_64. - - * workben/zoom.cxx: Another <c..> include. Fixes compiling test - on x86_64. - -2007-10-18 Jan Nieuwenhuizen <janneke@gnu.org> - - * .gitignore: Ingore x86_64 output dir too. - - * source/wrapper/wimpl.hxx: - * source/core/timeout.cxx: - * source/core/deck.cxx: - * source/core/byteseq.cxx: - * source/core/bin.cxx: Add some <c..> includes. - -2007-10-22 Jan Nieuwenhuizen <janneke@gnu.org> - - * Remove two empty files. - - * Deleted workben/editor_pre - * Deleted workben/output - - * Incorporate http://www.alunos.dcc.fc.up.pt/~c0607045/trash/openoffice/layout.tgz - - * Modified source/core/box.cxx - * Modified source/core/table.cxx - * Modified source/wrapper/wcontainer.cxx - * Modified workben/editor.cxx - * Modified workben/flow.xml - * Added cenarios - * Added source/Documento por Gravar 1 - * Added source/api/com/sun/star/awt/XLayoutFlow.idl - * Added source/api/com/sun/star/awt/XLayoutFlowContainer.idl - * Added source/awt/non-interactable-containers.xml - * Added source/awt/vclxfactory.cxx - * Added source/awt/vclxfiledialog.cxx - * Added source/awt/vclxfiledialog.hxx - * Added source/awt/vclxline.cxx - * Added source/awt/vclxline.hxx - * Added source/awt/vclxpane.cxx - * Added source/awt/vclxpane.hxx - * Added source/awt/vclxradiobutton.cxx - * Added source/awt/vclxradiobutton.hxx - * Added source/gtk/vclxcommon.cxx - * Added source/gtk/vclxcommon.hxx - * Added source/gtk/vclxcontainer.cxx - * Added source/gtk/vclxcontainer.hxx - * Added source/gtk/vclxdialog.cxx - * Added source/gtk/vclxdialog.hxx - * Added source/gtk/vclxwidget.cxx - * Added source/gtk/vclxwidget.hxx - * Added workben/adjust.xml - * Added workben/editor-normal.xml - * Added workben/editor_pre - * Added workben/flow-container.xml - * Added workben/output - * Added workben/test.xml - -2007-08-20 Michael Meeks <michael.meeks@novell.com> - - * source/wrapper/wimpl.hxx (wrapperGone): fix ordering - issue. - - * workben/editor.cxx (PropertiesList::destruct): bin, - use virtual destructors. - - * source/core/visualcnt.cxx: set only size, not - position too. - -2007-08-20 Michael Meeks <michael.meeks@novell.com> - - * merge Ricardo's nice work ... - -2007-08-20 Michael Meeks <michael.meeks@novell.com> - - * source/core/box.cxx (getMinimumSize): calculate size - correctly wrt. 2x padding. - -2007-08-17 Michael Meeks <michael.meeks@novell.com> - - * source/core/helper.cxx (findAndRemove): rename - border -> 'has_border' to not conflict with container / - widget prop of same name. - - * workben/*.xml: rename all border attributes. - - * source/core/box.hxx: bin bogus mnBorderWidth - use - the container instead. - - * source/core/helper.cxx: rename 'border' to - 'has_border' so container borders work. - (anyFromString): fix type of LONG, add unsigned types & - re-order into TypeClass.idl sequence. - - * source/awt/vclxbutton.cxx (IconButton): center - labels, somehow setting a graphic changes the behavior - of widgets with no align set. - -2007-08-16 Michael Meeks <michael.meeks@novell.com> - - * source/wrapper/wcontainer.cxx (Clear): get condition - right. - - * source/core/container.cxx (setParent): cope with null - parents by not throwing. - - * workben/editor.cxx: add Alignment ... and adapt to new - property code - so we get container properties. - - * source/core/helper.cxx (setProperties): adapt to new - layoutimpl::prophlp helpers. - (canHandleProps, queryPropertyInfo, setProperty, getProperty): - impl. - -2007-08-16 Michael Meeks <michael.meeks@novell.com> - - * source/core/*.cxx: calm down debug. - - * source/core/align.cxx, box.cxx: add PROPHELPER_SET_INFO - to the child props too ... (doh). - - * source/core/helper.hxx (PROPHELPER_SET_INFO): impl. this - as a macro, comment it heavily. - * source/core/container.hxx, box.hxx, align.hxx, bin.hxx: add - the macro back cf. 2007-06-07 ... - - * source/core/import.cxx, source/wrapper/wimpl.hxx: calm the - churning debug problem down: finally can see the important - messages. - - * workben/editor.cxx (EditorDialog): add 'maDelete' member & - rename 'engine->mpEngine' - - * source/awt/vclxbutton.cxx (IconButton, VCLXCancelButton), - (VCLXHelpButton): impl. - - * source/core/import.cxx (handleCornerCases): bin. - -2007-08-16 Michael Meeks <michael.meeks@novell.com> - - * source/awt/vclxproxy.cxx (queryInterface): fixup. - - * source/awt/vclxbutton.cxx: impl OKButton stub. - - * source/awt/vclxproxy.cxx: gut-wrenching manual cut/paste - proxy creation: urgh. - - * source/core/import.cxx (handleCornerCases): bin okbutton - corner case. - -2007-08-15 Michael Meeks <michael.meeks@novell.com> - - * source/core/helper.cxx (setProperties): add debug for - dropped properties. - - * source/core/container.cxx (queryInterface, acquire, - release): unwind nightmarish UNO lifecycle evil: not - implementing acquire/release is a spectacularly bad - idea: trashed memory gets accessed by the next queryinterface. - -2007-08-15 Michael Meeks <michael.meeks@novell.com> - - * source/wrapper/wrapper.cxx (GetPeer): bin debug. - (Clear): impl. for Ricardo. - - * workben/editor.cxx (naturalSize): impl. and call post - construction, so we size to the total size with the added - widgets. - - * source/core/root.hxx: remember to declare we impl. - XLayoutConstrains. - - * workben/editor.cxx (getDepth, makeListEntryName): impl. - & cleanup code. - - * workben/editor.hxx (class EditorEngine): bin maIdentList. - -2007-08-15 Michael Meeks <michael.meeks@novell.com> - - * workben/editor.cxx (PropertyEntry): show the - widgets post construction: now appears to work - as nicely, if not better than before. - - * source/wrapper/wcontainer.cxx (Container): add - warning if no peer to associate with is found. - (Container): actually assign mxContainer. - - * source/wrapper/wbutton.cxx (SetImageAlign): impl. - SetImageAlign, and use it to align-left the images. - - * workben/test.cxx (InitUCB): enable this. - (Main): set more magic environment variables: 'magic'! - -2007-08-14 Michael Meeks <michael.meeks@novell.com> - - * workben/test.cxx: attempt to defeat stupid configmgr - bootstrapping evilness. - - * workben/test.cxx (UnoBootstrapSucks): log component - instantiations, and exception text - caught config mgr. - not being happy. - - * source/inc/layoutcore.hxx: impl. - a header for - sharing code from core -> wrapper. - - * source/wrapper/wbutton.cxx (ImageImpl): impl. - and add SetImageMode method. - - * source/core/helper.cxx (loadGraphic): impl. - - * inc/layout/layout.hxx: add lstbox.h for - LISTBOX_ENTRY_NOT_FOUND & fix editor with this. - - * source/core/helper.cxx (createWidget): merge - conflicts. - -2007-08-09 Michael Meeks <michael.meeks@novell.com> - - * source/awt/vclxtabcontrol.?xx, source/awt/makefile.mk, - * utils/makefile.mk: import TabControl. - - * source/core/*.cxx: put in 'layoutimpl' namespace. - - * source/core/import.cxx (WidgetElement): handle - corner cases again. - -2007-08-09 Michael Meeks <michael.meeks@novell.com> - - * doc/stats.ods: statistics on widget impl. & attribute - priorities. - - * source/core/helper.cxx (createWidget): re-enable - handleCornerCases. - - * source/core/import.cxx (handleCornerCases): - un-comment handle-corner-cases. - -2007-08-09 Ricardo Cruz <rpmcruz@alunos.dcc.fc.up.pt> - - * latest work. - -2007-07-30 Michael Meeks <michael.meeks@novell.com> - - * doc/vcl.txt: add notes on how fallback awt peer - creation happens. - - * doc/awt-props.ods: try to bring some sanity to the - cut/paste frenzy in the awt properties. - - * source/core/import.cxx (ToplevelElement): switch back - to the new pseudo-'root' 'XLayoutContainer' approach that - is cleaner & simpler. - -2007-07-30 Michael Meeks <michael.meeks@novell.com> - - * workben/editor.cxx (createWidget): fix variable naming - _name -> pName; fix createContainer call signature. - - * source/core/deck.cxx (setVisible): switch to queueRecalc. - - * source/core/root.cxx (getChildren, removeChild): impl. - - * source/core/container.cxx (getSingleChild): impl. - helper & upd. callers. - - * Resolve conflicts with Ricardo. - -2007-07-26 Ricardo Cruz <rpmcruz@alunos.dcc.fc.up.pt> - - * Added SVLXTabControl that offers XWindow and XLayoutContainer - interfaces for the VCL TabControl. - But its allocateSize() isn't being called (though sometimes it - is), so multi tabs are broken. - - * Touched a bit XLayoutContainer interface: added getChildren() - and removeChildren(). And got rid of clearChildren(). - SPECIFICATION: setParent() must be called on child when added - or removed to a container -- in case child implements XChild - -- pass null to remove. - -2007-07-25 Michael Meeks <michael.meeks@novell.com> - - * notes.txt, doc/metricfield.txt, doc/oldnotes.txt: - move some of my cruft out of notes.txt - - * source/core/root.cxx: made LayoutRoot implement - XLayoutConstrains and XLayoutContainer (a simple bin). - - * source/core/timeout.cxx: do idle sizing via the - toplevel. - - * source/core/import.cxx (~ToplevelElement): simplify - toplevel sizing. Tie LayoutRoot to the toplevel window: - ok for now. - -2007-07-25 Michael Meeks <michael.meeks@novell.com> - - * workben/zoom.xml: update variously. - - * source/core/timeout.cxx: add evil hack using VCL - idle handler to layout idly (not that we do re-layout - yet). - - * source/core/container.cxx (allocateChildAt): calm - down debug spew. - - * source/wrapper: move fields pieces from wrapper.cxx - to 'wfields.cxx'. - - * NB. The code now depends on recent toolkit/ changes in - HEAD ooo-build. - -2007-07-13 Michael Meeks <michael.meeks@novell.com> - - * source/wrapper/*.cxx: propagate a Context* pointer - through to all wrapper instances; ready to implement - OKButton / CancelButton etc. - - * source/wrapper/wbutton.cxx: split from - * source/wrapper/wrapper.cxx: here. - - * source/core/import.cxx (handleCornerCases): impl. - and call - the ok/help/cancel buttons are -so- lame in - awt, we need to emulate them in the wrapper. - -2007-07-12 Michael Meeks <michael.meeks@novell.com> - - * source/wrapper/wrapper.cxx (GetPeerHandle): switch - to just 1 impl, with an optional nId argument too, - in case we need it. - - * inc/layout/layout.hxx, source/wrapper/impl.hxx, - * source/wrapper/wrap_container.cxx, - * source/wrapper/wrapper.cxx: impl. new 'Box' - container type, also allow explicit widget - instantiation. - - * workben/editor.cxx: re-work to use a sequence of - PushButtons instead of create<N> thing. - -2007-07-06 Ricardo Cruz <rpmcruz@alunos.dcc.fc.up.pt> - - * a bunch of stuff touched (in special workben/editor.hxx and cxx): - Sorry, will try to take better care of the ChangeLog in - the future... - - Made a first layout editor. Added temporary calls recalc() - and clearChildren() to the XLayoutContainer interface. :P - Quite hacky overall; but its already more functional than - was targetting for the milestone, and will be cleaning it up... - - Committed part of koehin's patch: the ListBox wrapper. - -2007-06-22 Michael Meeks <michael.meeks@novell.com> - - * source/wrapper/wrapper.cxx: impl. NumericFormatter - - we still need MetricField to implement a (mis-named) - XCurrencyField interface though ... - -2007-06-22 Michael Meeks <michael.meeks@novell.com> - - * source/wrapper/wrapper.cxx (WindowImpl): add - get/setProperty helpers. - (PushButton::[Is]Check[ed]): impl. - - * source/core/*: some debug calming action. - - * source/wrapper/wrapper.cxx (::Dialog): get toplevel - widget correctly. - (GetPeerHandle): calm debug. - -2007-06-21 Michael Meeks <michael.meeks@novell.com> - - * source/wrapper/wrapper.cxx (Dialog::SetText), - - * source/core/import.cxx (startRootElement): check - the namespace & allow non-framewindow toplevels. - (WidgetElement): !pParent -> WindowClass_TOP. - - * workben/zoom.xml: add 'group' attributes, hmm. Not - working that well for some reaosn. - - * source/wrapper/wrapper.cxx (ButtonImpl::SetClickHdl) - don't add the action listener until we need to to preserve - VCL's semantics. - -2007-06-20 Ricardo Cruz <rpmcruz@alunos.dcc.fc.up.pt> - - * source/core/import.h/cxx: added support for radio groups. - As agreed, a group is specified by an id. So, the xml - would be: <radio group="pizza" value="margarita" /> ... - -2007-06-20 Michael Meeks <michael.meeks@novell.com> - - * source/core/import.cxx (WidgetElement): filter out 'id' - property and add into mrRoot. - - * source/core/helper.cxx (setProperties): remove 'id' bits. - -2007-06-20 Michael Meeks <michael.meeks@novell.com> - - * source/core/byteseq.cxx: add - gross hack, to go later. - * source/core/root.cxx: upd. to use it. - - * workben/test.cxx: move much of the file reading / - stream handling evil into the core & initialize via UNO. - - * workben/*: remove LAYOUT_API_TEST conditionals ... - -2007-06-20 Michael Meeks <michael.meeks@novell.com> - - * source/core/root.[ch]xx: start of XLayoutRoot impl. - - * source/core/factory.cxx: UNO component registration fun. - - * workben/test.cxx: turn off zoomy bits if - LAYOUT_API_TEST is not set. - - * source/wrapper/wrapper.cxx: impl. first cut at - wrapping logic; get a few things in order. - -2007-06-19 Michael Meeks <michael.meeks@novell.com> - - * source/*: move to source/core/* - - * source/wrapper: add. - - * prj/build.lst: upd. - -2007-06-19 Michael Meeks <michael.meeks@novell.com> - - * workben/zoom.[ch]xx: import cut/paste of - svx/source/dialog/zoom.[ch]xx - hack out svx dependencies - and port to: - - * inc/layout/layout.hxx: new 'layout' wrapper API - -2007-06-08 Michael Meeks <michael.meeks@novell.com> - - * source/helper.hxx: move ChildProps - * source/helper.hxx: to here, rename to PropHelper, - add include guards etc. - - * source/import.?xx: substantial clean up. - - * workben/*.xml: switch namespace - -2007-06-07 Michael Meeks <michael.meeks@novell.com> - - * source/container.cxx: remove static singleton setting - 'getPropertSetInfo' method, and make it abstract. - * source/bin.cxx, source/box.cxx: implement here, so we - get different SetInfo for each. - - * source/vbox.cxx (convertFastPropertyValue): impl. properly. - - * source/import.cxx (ChildElement::startChildElement): pass - the right child attributes. - (addChildWidget): actually set properties on the container's - child not the widget itself. - -2007-06-06 Michael Meeks <michael.meeks@novell.com> - - * source/makefile.mk, - * source/import.cxx: rename from newimport.cxx - - * source/newimport.cxx (getPropAsInt): bin, obsolete. - (addChildWidget): add setProperties call for child props. - (windowResized): do size request before allocate. - -2007-06-06 Michael Meeks <michael.meeks@novell.com> - - * source/newimport.cxx (getAttributeProps): re-factor & split. - (findAndRemove): this. - - * source/helper.cxx (setProperties, toUnoNaming, anyFromString): - split from newimport.cxx. - - * source/newimport.cxx (~ToplevelElement): add, so we - show the dialog post sizing. - - * workben/*.xml: remove 'show' attribute on toplevels. - -2007-06-06 Michael Meeks <michael.meeks@novell.com> - - * source/newimport.cxx: add hacks (missing Ricardo's - hierarchy parsing), to whack all children in 1 hbox. - We have layout at last. - - * source/vbox.cxx (allocateChildAt): get PosSize flags right. - - * source/newimport.cxx (startRootElement): upd. - (ResizeListener): impl. - - * source/newimport.hxx (class ToplevelElement): add. - -2007-06-05 Michael Meeks <michael.meeks@novell.com> - - * workben/layout.xml: add nested vbox. - - * workben/layout-flat.xml: flat xml - - * start a ChangeLog - diff --git a/toolkit/inc/layout/layout-post.hxx b/toolkit/inc/layout/layout-post.hxx index 8ef66bf04470..46d4c383a984 100644 --- a/toolkit/inc/layout/layout-post.hxx +++ b/toolkit/inc/layout/layout-post.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -74,8 +75,10 @@ #undef RadioButton #undef ResetButton #undef RetryButton -#undef SfxTabPage #undef SfxTabDialog +#undef SfxTabPage +#undef SvxFontListBox +#undef SvxLanguageBox #undef SpinField #undef TabDialog #undef TabControl @@ -100,3 +103,5 @@ #endif /* ENABLE_LAYOUT */ #endif /* _LAYOUT_POST_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/layout/layout-pre.hxx b/toolkit/inc/layout/layout-pre.hxx index 09605ad440d5..4205a44f1f54 100644 --- a/toolkit/inc/layout/layout-pre.hxx +++ b/toolkit/inc/layout/layout-pre.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -76,10 +77,8 @@ #define RetryButton layout::RetryButton #define SfxTabDialog layout::SfxTabDialog #define SfxTabPage layout::SfxTabPage -#if ENABLE_LAYOUT #define SvxFontListBox layout::SvxFontListBox #define SvxLanguageBox layout::SvxLanguageBox -#endif #define SpinField layout::SpinField #define TabControl layout::TabControl #define TabPage layout::TabPage @@ -105,3 +104,5 @@ #endif /* ENABLE_LAYOUT */ #endif /* _LAYOUT_PRE_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/layout/layout.hxx b/toolkit/inc/layout/layout.hxx index c434347b38e2..083214407e7a 100644 --- a/toolkit/inc/layout/layout.hxx +++ b/toolkit/inc/layout/layout.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -59,8 +60,6 @@ class PushButton; class RadioButton; class ResId; struct SfxChildWinInfo; -//class SvxFontListBox; -//class SvxLanguageBox; class TabControl; class TabPage; class VCLXRadioButton; @@ -166,8 +165,6 @@ public: void EnterWait (); void LeaveWait (); bool IsWait () const; - //void Enable (bool enable=true, bool child=true); - //void Disable (bool child=true); bool IsEnabled () const; void EnableInput (bool enable=true, bool child=true); bool IsInputEnabled () const; @@ -264,7 +261,7 @@ public: static String GetStandardText (sal_uInt16 button_type); void SetText( rtl::OUString const& rStr ); bool SetModeImage (Image const& image); - bool SetModeImage (::Image const& image, BmpColorMode mode=BMP_COLOR_NORMAL); + bool SetModeImage (::Image const& image); void SetImageAlign( ImageAlign eAlign ); void SetClickHdl( Link const& rLink ); @@ -772,7 +769,6 @@ class PluginImpl; class TOOLKIT_DLLPUBLIC Plugin : public Control { DECL_GET_IMPL( Plugin ); - //DECL_CONSTRUCTORS( Plugin, Control, 0 ); public: ::Control *mpPlugin; Plugin( Context *context, char const* id, ::Control *plugin ); @@ -824,3 +820,5 @@ public: #endif /* !ENABLE_LAYOUT */ #endif /* _LAYOUT_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/pch/precompiled_toolkit.cxx b/toolkit/inc/pch/precompiled_toolkit.cxx index b448e489dc90..1fe273215d9b 100644 --- a/toolkit/inc/pch/precompiled_toolkit.cxx +++ b/toolkit/inc/pch/precompiled_toolkit.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -27,3 +28,4 @@ #include "precompiled_toolkit.hxx" +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/pch/precompiled_toolkit.hxx b/toolkit/inc/pch/precompiled_toolkit.hxx index 77be02429484..c2c86fe35611 100644 --- a/toolkit/inc/pch/precompiled_toolkit.hxx +++ b/toolkit/inc/pch/precompiled_toolkit.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -292,7 +293,6 @@ #include "toolkit/helper/mutexhelper.hxx" #include "toolkit/helper/property.hxx" #include "toolkit/helper/servicenames.hxx" -#include "toolkit/helper/solarrelease.hxx" #include "toolkit/helper/tkresmgr.hxx" #include "toolkit/helper/unomemorystream.hxx" #include "toolkit/helper/unopropertyarrayhelper.hxx" @@ -303,7 +303,6 @@ #include "tools/diagnose_ex.h" #include "tools/gen.hxx" #include "tools/link.hxx" -#include "tools/list.hxx" #include "tools/poly.hxx" #include "tools/simplerm.hxx" #include "tools/solar.h" @@ -340,7 +339,8 @@ #include "vcl/vclenum.hxx" #include "vcl/virdev.hxx" -#include "vos/mutex.hxx" +#include "osl/mutex.hxx" //---MARKER--- #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/awt/animatedimagespeer.hxx b/toolkit/inc/toolkit/awt/animatedimagespeer.hxx index b9bdecdf0e47..b9bdecdf0e47 100755..100644 --- a/toolkit/inc/toolkit/awt/animatedimagespeer.hxx +++ b/toolkit/inc/toolkit/awt/animatedimagespeer.hxx diff --git a/toolkit/inc/toolkit/awt/vclxaccessiblecomponent.hxx b/toolkit/inc/toolkit/awt/vclxaccessiblecomponent.hxx index 2c3744a2eefe..0b88ee59bb56 100644 --- a/toolkit/inc/toolkit/awt/vclxaccessiblecomponent.hxx +++ b/toolkit/inc/toolkit/awt/vclxaccessiblecomponent.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -164,3 +165,4 @@ private: #endif // _TOOLKIT_AWT_VCLXACCESSIBLECOMPONENT_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/awt/vclxbitmap.hxx b/toolkit/inc/toolkit/awt/vclxbitmap.hxx index 7712372dfaee..aa489d094e48 100644 --- a/toolkit/inc/toolkit/awt/vclxbitmap.hxx +++ b/toolkit/inc/toolkit/awt/vclxbitmap.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -85,3 +86,4 @@ public: #endif // _TOOLKIT_AWT_VCLXBITMAP_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/awt/vclxcontainer.hxx b/toolkit/inc/toolkit/awt/vclxcontainer.hxx index dbf8c62f4580..fa66ba43af99 100644 --- a/toolkit/inc/toolkit/awt/vclxcontainer.hxx +++ b/toolkit/inc/toolkit/awt/vclxcontainer.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -78,3 +79,4 @@ public: #endif // _TOOLKIT_AWT_VCLXCONTAINER_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/awt/vclxdevice.hxx b/toolkit/inc/toolkit/awt/vclxdevice.hxx index ca0b20a3f4bc..fba5ec764a86 100644 --- a/toolkit/inc/toolkit/awt/vclxdevice.hxx +++ b/toolkit/inc/toolkit/awt/vclxdevice.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -33,9 +34,8 @@ #include <com/sun/star/lang/XTypeProvider.hpp> #include <com/sun/star/lang/XUnoTunnel.hpp> #include <cppuhelper/weak.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> -// #include <com/sun/star/awt/XTextConstraints.hpp> #include <com/sun/star/awt/XUnitConversion.hpp> class OutputDevice; @@ -58,7 +58,6 @@ class TOOLKIT_DLLPUBLIC VCLXDevice : public ::com::sun::star::awt::XDevice, friend class VCLXGraphics; private: - vos::IMutex& mrMutex; // Reference to SolarMutex OutputDevice* mpOutputDevice; public: @@ -66,7 +65,6 @@ public: sal_uInt32 nFlags; protected: - vos::IMutex& GetMutex() { return mrMutex; } void DestroyOutputDevice(); public: @@ -135,3 +133,4 @@ public: #endif // _TOOLKIT_AWT_VCLXDEVICE_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/awt/vclxfont.hxx b/toolkit/inc/toolkit/awt/vclxfont.hxx index 352dae82c853..a35ec3aa1875 100644 --- a/toolkit/inc/toolkit/awt/vclxfont.hxx +++ b/toolkit/inc/toolkit/awt/vclxfont.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -94,3 +95,4 @@ public: #endif // _TOOLKIT_AWT_VCLXFONT_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/awt/vclxgraphics.hxx b/toolkit/inc/toolkit/awt/vclxgraphics.hxx index 6a076a5339b8..1feea0be2e0b 100644 --- a/toolkit/inc/toolkit/awt/vclxgraphics.hxx +++ b/toolkit/inc/toolkit/awt/vclxgraphics.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -33,7 +34,7 @@ #include <com/sun/star/lang/XTypeProvider.hpp> #include <com/sun/star/lang/XUnoTunnel.hpp> #include <cppuhelper/weak.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <vcl/font.hxx> #include <tools/color.hxx> @@ -60,7 +61,6 @@ class VCLXGraphics : public ::com::sun::star::awt::XGraphics, public ::cppu::OWeakObject { private: - vos::IMutex& mrMutex; // Reference to SolarMutex ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice> mxDevice; // nur um bei getDevice() immer das gleiche zurueckzugeben OutputDevice* mpOutputDevice; @@ -72,9 +72,6 @@ private: RasterOp meRasterOp; Region* mpClipRegion; -protected: - vos::IMutex& GetMutex() { return mrMutex; } - public: VCLXGraphics(); ~VCLXGraphics(); @@ -138,3 +135,4 @@ public: #endif // _TOOLKIT_AWT_VCLXGRAPHICS_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/awt/vclxmenu.hxx b/toolkit/inc/toolkit/awt/vclxmenu.hxx index 7eee1bfea7c4..74bdeeefa4d3 100644 --- a/toolkit/inc/toolkit/awt/vclxmenu.hxx +++ b/toolkit/inc/toolkit/awt/vclxmenu.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -37,16 +38,19 @@ #include <cppuhelper/weak.hxx> #include <osl/mutex.hxx> -#include <tools/list.hxx> #include <tools/link.hxx> #include <toolkit/helper/listenermultiplexer.hxx> +#include <vector> class Menu; class MenuBar; class VclSimpleEvent; +class PopupMenu; -DECLARE_LIST( PopupMenuRefList, ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu >* ) +typedef ::std::vector< + ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu >* +> PopupMenuRefList; // ---------------------------------------------------- // class VCLXMenu @@ -181,6 +185,9 @@ class TOOLKIT_DLLPUBLIC VCLXPopupMenu : public VCLXMenu { public: VCLXPopupMenu(); + VCLXPopupMenu( PopupMenu* pPopMenu ); }; #endif // _TOOLKIT_AWT_VCLXMENU_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/awt/vclxpointer.hxx b/toolkit/inc/toolkit/awt/vclxpointer.hxx index 2dd694f6e742..20fea4e36216 100644 --- a/toolkit/inc/toolkit/awt/vclxpointer.hxx +++ b/toolkit/inc/toolkit/awt/vclxpointer.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -83,3 +84,4 @@ public: #endif // _TOOLKIT_AWT_VCLXPOINTER_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/awt/vclxprinter.hxx b/toolkit/inc/toolkit/awt/vclxprinter.hxx index a7991d38a387..318177d5d818 100644 --- a/toolkit/inc/toolkit/awt/vclxprinter.hxx +++ b/toolkit/inc/toolkit/awt/vclxprinter.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -223,3 +224,4 @@ public: #endif // _TOOLKIT_AWT_VCLXPRINTER_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/awt/vclxregion.hxx b/toolkit/inc/toolkit/awt/vclxregion.hxx index 3e95c880558b..b2c6d765e445 100644 --- a/toolkit/inc/toolkit/awt/vclxregion.hxx +++ b/toolkit/inc/toolkit/awt/vclxregion.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -94,3 +95,4 @@ public: #endif // _TOOLKIT_AWT_VCLXREGION_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/awt/vclxspinbutton.hxx b/toolkit/inc/toolkit/awt/vclxspinbutton.hxx index f855b6efb948..4139f7c92815 100644 --- a/toolkit/inc/toolkit/awt/vclxspinbutton.hxx +++ b/toolkit/inc/toolkit/awt/vclxspinbutton.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -98,3 +99,4 @@ namespace toolkit #endif // TOOLKIT_INC_TOOLKIT_AWT_VCLXSPINBUTTON_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/awt/vclxsystemdependentwindow.hxx b/toolkit/inc/toolkit/awt/vclxsystemdependentwindow.hxx index 73bd100c2bb7..c2903a144bdc 100644 --- a/toolkit/inc/toolkit/awt/vclxsystemdependentwindow.hxx +++ b/toolkit/inc/toolkit/awt/vclxsystemdependentwindow.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -65,3 +66,4 @@ public: #endif // _TOOLKIT_AWT_VCLXSYSTEMDEPENDENTWINDOW_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/awt/vclxtoolkit.hxx b/toolkit/inc/toolkit/awt/vclxtoolkit.hxx index 31de39bf1fc3..e706d9cc4a81 100644 --- a/toolkit/inc/toolkit/awt/vclxtoolkit.hxx +++ b/toolkit/inc/toolkit/awt/vclxtoolkit.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -215,3 +216,5 @@ public: }; #endif // _TOOLKIT_AWT_VCLXTOOLKIT_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/awt/vclxtopwindow.hxx b/toolkit/inc/toolkit/awt/vclxtopwindow.hxx index d3b130cc8202..16f9910391d0 100644 --- a/toolkit/inc/toolkit/awt/vclxtopwindow.hxx +++ b/toolkit/inc/toolkit/awt/vclxtopwindow.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -54,7 +55,6 @@ protected: bool isSystemDependentWindowPeer() const { return m_bWHWND; } - virtual ::vos::IMutex& GetMutexImpl() = 0; virtual Window* GetWindowImpl() = 0; virtual ::cppu::OInterfaceContainerHelper& GetTopWindowListenersImpl() = 0; @@ -95,7 +95,6 @@ class TOOLKIT_DLLPUBLIC VCLXTopWindow: public VCLXTopWindow_Base, public VCLXContainer { protected: - virtual vos::IMutex& GetMutexImpl(); virtual Window* GetWindowImpl(); virtual ::cppu::OInterfaceContainerHelper& GetTopWindowListenersImpl(); @@ -121,3 +120,4 @@ public: #endif // _TOOLKIT_AWT_VCLXTOPWINDOW_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/awt/vclxwindow.hxx b/toolkit/inc/toolkit/awt/vclxwindow.hxx index 81419fcafa0f..e5c60349a2f7 100644 --- a/toolkit/inc/toolkit/awt/vclxwindow.hxx +++ b/toolkit/inc/toolkit/awt/vclxwindow.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -241,3 +242,4 @@ public: #endif // _TOOLKIT_AWT_VCLXWINDOW_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/awt/vclxwindows.hxx b/toolkit/inc/toolkit/awt/vclxwindows.hxx index 8dcf05c9f8db..3949b543c685 100644 --- a/toolkit/inc/toolkit/awt/vclxwindows.hxx +++ b/toolkit/inc/toolkit/awt/vclxwindows.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -64,9 +65,7 @@ #include <com/sun/star/awt/XUnoControlContainer.hpp> #include <com/sun/star/awt/XTextLayoutConstrains.hpp> #include <com/sun/star/awt/XNumericField.hpp> -#ifndef _COM_SUN_STAR_AWT_XMetricFIELD_HPP_ #include <com/sun/star/awt/XMetricField.hpp> -#endif #include <com/sun/star/awt/XButton.hpp> #include <com/sun/star/awt/XToggleButton.hpp> #include <com/sun/star/awt/XPointer.hpp> @@ -83,6 +82,8 @@ #include <com/sun/star/awt/XComboBox.hpp> #include <com/sun/star/awt/XCheckBox.hpp> #include <com/sun/star/awt/XItemListListener.hpp> +#include <com/sun/star/awt/XImageConsumer.hpp> +#include <com/sun/star/awt/XSimpleTabController.hpp> #include <cppuhelper/weak.hxx> #include <cppuhelper/implbase3.hxx> #include <cppuhelper/implbase2.hxx> @@ -93,7 +94,9 @@ #include <vcl/pointr.hxx> #include <vcl/image.hxx> +#include <vcl/tabctrl.hxx> +#include <com/sun/star/document/XVbaMethodParameter.hpp> //liuchen 2009-6-22, add the support of input/output parameters to VBA Dialog_QueryClose event class Button; class CheckBox; class RadioButton; @@ -372,12 +375,47 @@ public: virtual void GetPropertyIds( std::list< sal_uInt16 > &aIds ) { return ImplGetPropertyIds( aIds ); } }; +// ---------------------------------------------------- +// class VCLXFrame +// ---------------------------------------------------- +class VCLXFrame : public VCLXContainer +{ +protected: + void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); + +public: + VCLXFrame(); + ~VCLXFrame(); + + // ::com::sun::star::uno::XInterface + ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL acquire() throw() { OWeakObject::acquire(); } + void SAL_CALL release() throw() { OWeakObject::release(); } + + // ::com::sun::star::lang::XTypeProvider + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException); + ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::awt::XView + void SAL_CALL draw( sal_Int32 nX, sal_Int32 nY ) throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::awt::XDevice, + ::com::sun::star::awt::DeviceInfo SAL_CALL getInfo() throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::awt::XVclWindowPeer + void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException); + + static void ImplGetPropertyIds( std::list< sal_uInt16 > &aIds ); + virtual void GetPropertyIds( std::list< sal_uInt16 > &aIds ) { return ImplGetPropertyIds( aIds ); } +}; + // ---------------------------------------------------- // class VCLXDialog // ---------------------------------------------------- class TOOLKIT_DLLPUBLIC VCLXDialog : public ::com::sun::star::awt::XDialog2, + public ::com::sun::star::document::XVbaMethodParameter, //liuchen 2009-6-22, add the support of input/output parameters to VBA UserForm_QueryClose event public VCLXTopWindow { public: @@ -415,6 +453,10 @@ public: // ::com::sun::star::awt::XVclWindowPeer void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException); + //liuchen 2009-6-23, support Excel VBA UserForm_QueryClose event + // ::com::sun::star::document::XVBAMethodParameter + void SAL_CALL setVbaMethodParameter( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException); + ::com::sun::star::uno::Any SAL_CALL getVbaMethodParameter( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException); }; // ---------------------------------------------------- @@ -444,6 +486,59 @@ public: // ::com::sun::star::awt::XVclWindowPeer void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException); + TabPage* getTabPage() const throw ( ::com::sun::star::uno::RuntimeException); + static void ImplGetPropertyIds( std::list< sal_uInt16 > &aIds ); + virtual void GetPropertyIds( std::list< sal_uInt16 > &aIds ) { return ImplGetPropertyIds( aIds ); } +}; + +class VCLXMultiPage : public ::com::sun::star::awt::XSimpleTabController, public VCLXContainer +{ + TabListenerMultiplexer maTabListeners; + sal_Int32 mTabId; +protected: + void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); +public: + VCLXMultiPage(); + ~VCLXMultiPage(); + + // ::com::sun::star::uno::XInterface + ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL acquire() throw() { OWeakObject::acquire(); } + void SAL_CALL release() throw() { OWeakObject::release(); } + + // ::com::sun::star::lang::XTypeProvider + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException); + ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::lang::XComponent + void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::awt::XView + void SAL_CALL draw( sal_Int32 nX, sal_Int32 nY ) throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::awt::XDevice, + ::com::sun::star::awt::DeviceInfo SAL_CALL getInfo() throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::awt::XVclWindowPeer + void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException); + ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException); + // XSimpleTabController + virtual ::sal_Int32 SAL_CALL insertTab() throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeTab( ::sal_Int32 ID ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL setTabProps( ::sal_Int32 ID, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& Properties ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue > SAL_CALL getTabProps( ::sal_Int32 ID ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL activateTab( ::sal_Int32 ID ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual ::sal_Int32 SAL_CALL getActiveTabID() throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL addTabListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabListener >& Listener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeTabListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabListener >& Listener ) throw (::com::sun::star::uno::RuntimeException); + // C++ + TabControl* getTabControl() const throw ( ::com::sun::star::uno::RuntimeException); + sal_uInt16 insertTab( TabPage*, rtl::OUString& sTitle ); + static void ImplGetPropertyIds( std::list< sal_uInt16 > &aIds ); + virtual void GetPropertyIds( std::list< sal_uInt16 > &aIds ) { return ImplGetPropertyIds( aIds ); } }; // ---------------------------------------------------- @@ -1160,3 +1255,4 @@ public: #endif // _TOOLKIT_AWT_VCLXWINDOWS_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/awt/xsimpleanimation.hxx b/toolkit/inc/toolkit/awt/xsimpleanimation.hxx index 9e6043b7d9ef..e00c01082045 100644 --- a/toolkit/inc/toolkit/awt/xsimpleanimation.hxx +++ b/toolkit/inc/toolkit/awt/xsimpleanimation.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -75,3 +76,4 @@ namespace toolkit #endif // TOOLKIT_INC_TOOLKIT_AWT_XSIMPLEANIMATION_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/awt/xthrobber.hxx b/toolkit/inc/toolkit/awt/xthrobber.hxx index 67015e049a48..1ea916c56072 100644 --- a/toolkit/inc/toolkit/awt/xthrobber.hxx +++ b/toolkit/inc/toolkit/awt/xthrobber.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -78,3 +79,4 @@ namespace toolkit #endif // TOOLKIT_AWT_XTHROBBER_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/controls/accessiblecontrolcontext.hxx b/toolkit/inc/toolkit/controls/accessiblecontrolcontext.hxx index bc5f1e1295a2..8ececaeda794 100644 --- a/toolkit/inc/toolkit/controls/accessiblecontrolcontext.hxx +++ b/toolkit/inc/toolkit/controls/accessiblecontrolcontext.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -134,3 +135,4 @@ namespace toolkit #endif // TOOLKIT_ACCESSIBLE_CONTROL_CONTEXT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/controls/animatedimages.hxx b/toolkit/inc/toolkit/controls/animatedimages.hxx index c19ed5e5451c..c19ed5e5451c 100755..100644 --- a/toolkit/inc/toolkit/controls/animatedimages.hxx +++ b/toolkit/inc/toolkit/controls/animatedimages.hxx diff --git a/toolkit/inc/toolkit/controls/controlmodelcontainerbase.hxx b/toolkit/inc/toolkit/controls/controlmodelcontainerbase.hxx index 3090eba68749..9e006f4afd1b 100644 --- a/toolkit/inc/toolkit/controls/controlmodelcontainerbase.hxx +++ b/toolkit/inc/toolkit/controls/controlmodelcontainerbase.hxx @@ -65,6 +65,7 @@ typedef ::cppu::AggImplInheritanceHelper8 < ControlModel_Base class ControlModelContainerBase : public ControlModelContainer_IBase { public: + enum ChildOperation { Insert = 0, Remove }; // would like to make this typedef private, too, but the Forte 7 compiler does have // problems with this ..... typedef ::std::pair< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >, ::rtl::OUString > @@ -72,6 +73,7 @@ public: private: typedef ::std::list< UnoControlModelHolder > UnoControlModelHolderList; +public: // for grouping control models (XTabControllerModel::getGroupXXX) typedef ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > > ModelGroup; @@ -96,13 +98,13 @@ protected: sal_Int16 m_nTabPageId; void Clone_Impl(ControlModelContainerBase& _rClone) const; - protected: ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const; ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); UnoControlModelHolderList::iterator ImplFindElement( const ::rtl::OUString& rName ); + void updateUserFormChildren( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& xAllChildren, const rtl::OUString& aName, ChildOperation Operation, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& xTarget ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::ElementExistException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); public: ControlModelContainerBase( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ControlModelContainerBase( const ControlModelContainerBase& rModel ); diff --git a/toolkit/inc/toolkit/controls/dialogcontrol.hxx b/toolkit/inc/toolkit/controls/dialogcontrol.hxx index 9c0ffa3b78fb..339ea11bdd8b 100644 --- a/toolkit/inc/toolkit/controls/dialogcontrol.hxx +++ b/toolkit/inc/toolkit/controls/dialogcontrol.hxx @@ -31,6 +31,7 @@ #include <toolkit/controls/controlmodelcontainerbase.hxx> #include <com/sun/star/awt/XTopWindow.hpp> #include <com/sun/star/awt/XDialog2.hpp> +#include <com/sun/star/awt/XSimpleTabController.hpp> #include <com/sun/star/resource/XStringResourceResolver.hpp> #include "toolkit/helper/servicenames.hxx" #include "toolkit/helper/macros.hxx" @@ -126,4 +127,145 @@ protected: protected: }; +class UnoMultiPageModel : public ControlModelContainerBase +{ +public: + UnoMultiPageModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); + ~UnoMultiPageModel(); + UnoMultiPageModel( const UnoMultiPageModel& rModel ); + + UnoControlModel* Clone() const; + + DECLIMPL_SERVICEINFO_DERIVED( UnoMultiPageModel, ControlModelContainerBase, szServiceName_UnoMultiPageModel ) + + virtual ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw( ::com::sun::star::uno::RuntimeException); + // XNamedContainer + void SAL_CALL insertByName( const ::rtl::OUString& aName, const ::com::sun::star::uno::Any& aElement ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::ElementExistException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + // Override the method of parent Class + virtual sal_Bool SAL_CALL getGroupControl( ) throw (::com::sun::star::uno::RuntimeException); +protected: + virtual ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const; + ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); + +}; + +class UnoMultiPageControl : public ControlContainerBase + ,public ::com::sun::star::awt::XSimpleTabController + ,public ::com::sun::star::awt::XTabListener +{ + TabListenerMultiplexer maTabListeners; + void bindPage( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& _rxControl ); +public: + UnoMultiPageControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); + ~UnoMultiPageControl(); + ::rtl::OUString GetComponentServiceName(); + + // ::com::sun::star::lang::XServiceInfo + DECLIMPL_SERVICEINFO_DERIVED( UnoMultiPageControl, ControlContainerBase, szServiceName_UnoMultiPageControl ) + ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return ControlContainerBase::queryInterface(rType); } + ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL acquire() throw() { OWeakAggObject::acquire(); } + void SAL_CALL release() throw() { OWeakAggObject::release(); } + // ::com::sun::star::lang::XTypeProvider + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException); + ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() 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); + // com::sun::star::awt::XSimpleTabController + virtual ::sal_Int32 SAL_CALL insertTab() throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeTab( ::sal_Int32 ID ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL setTabProps( ::sal_Int32 ID, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& Properties ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue > SAL_CALL getTabProps( ::sal_Int32 ID ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL activateTab( ::sal_Int32 ID ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual ::sal_Int32 SAL_CALL getActiveTabID() throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL addTabListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabListener >& Listener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeTabListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabListener >& Listener ) throw (::com::sun::star::uno::RuntimeException); + // XTabListener + virtual void SAL_CALL inserted( ::sal_Int32 ID ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removed( ::sal_Int32 ID ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL changed( ::sal_Int32 ID, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& Properties ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL activated( ::sal_Int32 ID ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL deactivated( ::sal_Int32 ID ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& evt ) throw (::com::sun::star::uno::RuntimeException); + // XComponent + void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException); + +protected: + virtual void impl_createControlPeerIfNecessary( + const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& _rxControl + ); + +}; + + +class UnoPageModel : public ControlModelContainerBase +{ +public: + UnoPageModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); + ~UnoPageModel(); + UnoPageModel( const UnoPageModel& rModel ); + + UnoControlModel* Clone() const; + + DECLIMPL_SERVICEINFO_DERIVED( UnoPageModel, ControlModelContainerBase, szServiceName_UnoPageModel ) + + virtual ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw( ::com::sun::star::uno::RuntimeException); + + // Override the method of parent Class + virtual sal_Bool SAL_CALL getGroupControl( ) throw (::com::sun::star::uno::RuntimeException); +protected: + virtual ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const; + ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); + +}; + +class UnoPageControl : public ControlContainerBase +{ +public: + UnoPageControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); + ~UnoPageControl(); + ::rtl::OUString GetComponentServiceName(); + + + // ::com::sun::star::lang::XServiceInfo + DECLIMPL_SERVICEINFO_DERIVED( UnoPageControl, ControlContainerBase, szServiceName_UnoPageControl ) +}; + +class UnoFrameModel : public ControlModelContainerBase +{ +public: + UnoFrameModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); + ~UnoFrameModel(); + UnoFrameModel( const UnoFrameModel& rModel ); + + UnoControlModel* Clone() const; + + DECLIMPL_SERVICEINFO_DERIVED( UnoFrameModel, ControlModelContainerBase, szServiceName_UnoFrameModel ) + + virtual ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw( ::com::sun::star::uno::RuntimeException); + +protected: + virtual ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const; + ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); +}; + +class UnoFrameControl : public ControlContainerBase +{ +protected: + virtual void ImplSetPosSize( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& rxCtrl ); +public: + UnoFrameControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); + ~UnoFrameControl(); + ::rtl::OUString GetComponentServiceName(); + +// ::com::sun::star::lang::XServiceInfo +DECLIMPL_SERVICEINFO_DERIVED( UnoFrameControl, ControlContainerBase, szServiceName_UnoPageControl ) +}; + #endif // TOOLKIT_DIALOG_CONTROL_HXX diff --git a/toolkit/inc/toolkit/controls/eventcontainer.hxx b/toolkit/inc/toolkit/controls/eventcontainer.hxx index d0b7adbbe497..ceabfb2a6fc6 100644 --- a/toolkit/inc/toolkit/controls/eventcontainer.hxx +++ b/toolkit/inc/toolkit/controls/eventcontainer.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -27,16 +28,12 @@ #include <osl/diagnose.h> -#ifndef _COM_SUN_STAR_XNAMECONTAINER_HPP_ #include <com/sun/star/container/XNameContainer.hpp> -#endif -#ifndef _COM_SUN_STAR_XCONTAINER_HPP_ #include <com/sun/star/container/XContainer.hpp> -#endif #include <toolkit/helper/listenermultiplexer.hxx> -#include <hash_map> +#include <boost/unordered_map.hpp> #include <cppuhelper/implbase2.hxx> typedef ::cppu::WeakImplHelper2< ::com::sun::star::container::XNameContainer, ::com::sun::star::container::XContainer > NameContainerHelper; @@ -62,7 +59,7 @@ struct eqName_Impl } }; -typedef std::hash_map +typedef boost::unordered_map < ::rtl::OUString, sal_Int32, @@ -140,3 +137,4 @@ public: } // namespace toolkit_namecontainer +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/controls/formattedcontrol.hxx b/toolkit/inc/toolkit/controls/formattedcontrol.hxx index 93f675dae03f..525e67dc6027 100644 --- a/toolkit/inc/toolkit/controls/formattedcontrol.hxx +++ b/toolkit/inc/toolkit/controls/formattedcontrol.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -128,3 +129,5 @@ namespace toolkit //........................................................................ #endif // TOOLKIT_FORMATTED_CONTROL_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/controls/geometrycontrolmodel.hxx b/toolkit/inc/toolkit/controls/geometrycontrolmodel.hxx index ef86ec8eb5b8..3bb3e0f3be49 100644 --- a/toolkit/inc/toolkit/controls/geometrycontrolmodel.hxx +++ b/toolkit/inc/toolkit/controls/geometrycontrolmodel.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -260,3 +261,5 @@ FORWARD_DECLARE_INTERFACE( script, XNameContainer ) //........................................................................ #endif // _TOOLKIT_HELPERS_GEOMETRYCONTROLMODEL_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/controls/geometrycontrolmodel_impl.hxx b/toolkit/inc/toolkit/controls/geometrycontrolmodel_impl.hxx index 0b2362656433..7eb5d0966282 100644 --- a/toolkit/inc/toolkit/controls/geometrycontrolmodel_impl.hxx +++ b/toolkit/inc/toolkit/controls/geometrycontrolmodel_impl.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -94,3 +95,4 @@ OGeometryControlModel_Base* OGeometryControlModel<CONTROLMODEL>::createClone_Imp } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/controls/roadmapcontrol.hxx b/toolkit/inc/toolkit/controls/roadmapcontrol.hxx index 0848fb21b8b5..d570216fbccd 100644 --- a/toolkit/inc/toolkit/controls/roadmapcontrol.hxx +++ b/toolkit/inc/toolkit/controls/roadmapcontrol.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -204,3 +205,5 @@ namespace toolkit #endif // _TOOLKIT_ROADMAP_CONTROL_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/controls/roadmapentry.hxx b/toolkit/inc/toolkit/controls/roadmapentry.hxx index 6f43f0510465..71ab5752012e 100644 --- a/toolkit/inc/toolkit/controls/roadmapentry.hxx +++ b/toolkit/inc/toolkit/controls/roadmapentry.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -89,3 +90,4 @@ protected: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/controls/spinningprogress.hxx b/toolkit/inc/toolkit/controls/spinningprogress.hxx index e0a676b2aa86..e0a676b2aa86 100755..100644 --- a/toolkit/inc/toolkit/controls/spinningprogress.hxx +++ b/toolkit/inc/toolkit/controls/spinningprogress.hxx diff --git a/toolkit/inc/toolkit/controls/stdtabcontroller.hxx b/toolkit/inc/toolkit/controls/stdtabcontroller.hxx index 9dc5ae1a2d5a..847f8a057b36 100644 --- a/toolkit/inc/toolkit/controls/stdtabcontroller.hxx +++ b/toolkit/inc/toolkit/controls/stdtabcontroller.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -92,3 +93,4 @@ public: #endif // _TOOLKIT_AWT_STDTABCONTROLLER_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/controls/stdtabcontrollermodel.hxx b/toolkit/inc/toolkit/controls/stdtabcontrollermodel.hxx index d49fa720d5fd..322faee119bb 100644 --- a/toolkit/inc/toolkit/controls/stdtabcontrollermodel.hxx +++ b/toolkit/inc/toolkit/controls/stdtabcontrollermodel.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -40,16 +41,16 @@ #include <toolkit/helper/servicenames.hxx> #include <osl/mutex.hxx> -#include <tools/list.hxx> #include <tools/gen.hxx> +#include <vector> struct UnoControlModelEntry; +typedef ::std::vector< UnoControlModelEntry* > UnoControlModelEntryListBase; -DECLARE_LIST( UnoControlModelEntryListBase, UnoControlModelEntry* ) - -class UnoControlModelEntryList : public UnoControlModelEntryListBase +class UnoControlModelEntryList { private: + UnoControlModelEntryListBase maList; ::rtl::OUString maGroupName; public: @@ -60,7 +61,11 @@ public: void SetName( const ::rtl::OUString& rName ) { maGroupName = rName; } void Reset(); - void DestroyEntry( sal_uInt32 nEntry ); + void DestroyEntry( size_t nEntry ); + size_t size() const; + UnoControlModelEntry* operator[]( size_t i ) const; + void push_back( UnoControlModelEntry* item ); + void insert( size_t i, UnoControlModelEntry* item ); }; struct UnoControlModelEntry @@ -73,14 +78,13 @@ struct UnoControlModelEntry }; }; -// Keine Referenz halten, nur temporaer fuer AutoTabOrder struct ComponentEntry { ::com::sun::star::awt::XWindow* pComponent; Point aPos; }; -DECLARE_LIST( ComponentEntryList, ComponentEntry* ) +typedef ::std::vector< ComponentEntry* > ComponentEntryList; #define CONTROLPOS_NOTFOUND 0xFFFFFFFF @@ -140,3 +144,4 @@ public: #endif // _TOOLKIT_HELPER_STDTABCONTROLLERMODEL_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/controls/tkscrollbar.hxx b/toolkit/inc/toolkit/controls/tkscrollbar.hxx index da3d97ab1bc2..d51dceef32c2 100644 --- a/toolkit/inc/toolkit/controls/tkscrollbar.hxx +++ b/toolkit/inc/toolkit/controls/tkscrollbar.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -122,3 +123,5 @@ namespace toolkit //........................................................................ #endif // TOOLKIT_TOOLKIT_CONTROLS_TKSCROLLBAR_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/controls/tksimpleanimation.hxx b/toolkit/inc/toolkit/controls/tksimpleanimation.hxx index a0ddfc0dbf8d..944d9cfcb1fe 100644 --- a/toolkit/inc/toolkit/controls/tksimpleanimation.hxx +++ b/toolkit/inc/toolkit/controls/tksimpleanimation.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -99,3 +100,5 @@ namespace toolkit //........................................................................ #endif // TOOLKIT_CONTROLS_TKSIMPLEANIMATION_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/controls/tkspinbutton.hxx b/toolkit/inc/toolkit/controls/tkspinbutton.hxx index 7600c3e6f9e7..6be8c21e0d0d 100644 --- a/toolkit/inc/toolkit/controls/tkspinbutton.hxx +++ b/toolkit/inc/toolkit/controls/tkspinbutton.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -125,3 +126,5 @@ namespace toolkit //........................................................................ #endif // TOOLKIT_CONTROLS_TKSPINBUTTON_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/controls/tkthrobber.hxx b/toolkit/inc/toolkit/controls/tkthrobber.hxx index 1c149639fc47..0add98c51b85 100644 --- a/toolkit/inc/toolkit/controls/tkthrobber.hxx +++ b/toolkit/inc/toolkit/controls/tkthrobber.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -107,3 +108,5 @@ namespace toolkit //........................................................................ #endif // TOOLKIT_CONTROLS_TKTHROBBER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/controls/unocontrol.hxx b/toolkit/inc/toolkit/controls/unocontrol.hxx index 44836ec28dd6..d7d141148771 100644 --- a/toolkit/inc/toolkit/controls/unocontrol.hxx +++ b/toolkit/inc/toolkit/controls/unocontrol.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -31,9 +32,7 @@ #include <toolkit/dllapi.h> #include <com/sun/star/awt/XControl.hpp> #include <com/sun/star/awt/XWindow2.hpp> -#ifndef _COM_SUN_STAR_AWT_XView_HPP_ #include <com/sun/star/awt/XView.hpp> -#endif #include <com/sun/star/beans/XPropertiesChangeListener.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/XTypeProvider.hpp> @@ -248,3 +247,4 @@ private: #endif // _TOOLKIT_CONTROLS_UNOCONTROL_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/controls/unocontrolbase.hxx b/toolkit/inc/toolkit/controls/unocontrolbase.hxx index 1ce56c11cec1..aa2036935344 100644 --- a/toolkit/inc/toolkit/controls/unocontrolbase.hxx +++ b/toolkit/inc/toolkit/controls/unocontrolbase.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -75,3 +76,4 @@ protected: #endif // _TOOLKIT_AWT_UNOCONTROLBASE_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/controls/unocontrolcontainer.hxx b/toolkit/inc/toolkit/controls/unocontrolcontainer.hxx index dcba4fdcbf9a..e29fab5b8350 100644 --- a/toolkit/inc/toolkit/controls/unocontrolcontainer.hxx +++ b/toolkit/inc/toolkit/controls/unocontrolcontainer.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -120,6 +121,15 @@ protected: virtual void removingControl( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& _rxControl ); virtual void addingControl( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& _rxControl ); + /** ensures that the given control has a peer, if necessary and possible + @param _rxControl + an ->XControl which has just been inserted into the container. Must not be <NULL/>. + @precond + our mutex is locked + */ + virtual void impl_createControlPeerIfNecessary( + const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& _rxControl + ); private: /** adds the control to the container, does necessary notifications, and the like @param _rxControl @@ -150,18 +160,10 @@ private: const ::rtl::OUString* _pNameAccessor ); - /** ensures that the given control has a peer, if necessary and possible - @param _rxControl - an ->XControl which has just been inserted into the container. Must not be <NULL/>. - @precond - our mutex is locked - */ - void impl_createControlPeerIfNecessary( - const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& _rxControl - ); }; #endif // _TOOLKIT_CONTROLS_UNOCONTROLCONTAINER_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/controls/unocontrolcontainermodel.hxx b/toolkit/inc/toolkit/controls/unocontrolcontainermodel.hxx index cdc908718988..8d4d97836989 100644 --- a/toolkit/inc/toolkit/controls/unocontrolcontainermodel.hxx +++ b/toolkit/inc/toolkit/controls/unocontrolcontainermodel.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -64,3 +65,4 @@ public: #endif // _TOOLKIT_CONTROLS_UNOCONTROLCONTAINERMODEL_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/controls/unocontrolmodel.hxx b/toolkit/inc/toolkit/controls/unocontrolmodel.hxx index bdb6e5d4bc68..7aba0ec710ee 100644 --- a/toolkit/inc/toolkit/controls/unocontrolmodel.hxx +++ b/toolkit/inc/toolkit/controls/unocontrolmodel.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -181,3 +182,4 @@ public: #endif // _TOOLKIT_AWT_UNOCONTROLMODEL_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/controls/unocontrols.hxx b/toolkit/inc/toolkit/controls/unocontrols.hxx index 09622d2c8ef8..201858da0a12 100644 --- a/toolkit/inc/toolkit/controls/unocontrols.hxx +++ b/toolkit/inc/toolkit/controls/unocontrols.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -71,7 +72,6 @@ #define UNO_NAME_GRAPHOBJ_URLPREFIX "vnd.sun.star.GraphicObject:" #define UNO_NAME_GRAPHOBJ_URLPKGPREFIX "vnd.sun.star.Package:" - // ---------------------------------------------------- // class UnoControlEditModel // ---------------------------------------------------- @@ -1517,3 +1517,4 @@ public: #endif // _TOOLKIT_HELPER_UNOCONTROLS_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/dllapi.h b/toolkit/inc/toolkit/dllapi.h index 02e64153310c..c1dc5f48a138 100644 --- a/toolkit/inc/toolkit/dllapi.h +++ b/toolkit/inc/toolkit/dllapi.h @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -38,3 +39,5 @@ #endif #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/helper/accessibilityclient.hxx b/toolkit/inc/toolkit/helper/accessibilityclient.hxx index 732e2d76279a..beec9681aad4 100644 --- a/toolkit/inc/toolkit/helper/accessibilityclient.hxx +++ b/toolkit/inc/toolkit/helper/accessibilityclient.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -71,3 +72,4 @@ namespace toolkit #endif // TOOLKIT_HELPER_ACCESSIBILITY_CLIENT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/helper/accessiblefactory.hxx b/toolkit/inc/toolkit/helper/accessiblefactory.hxx index f3f28287d460..1362a7d4d365 100644 --- a/toolkit/inc/toolkit/helper/accessiblefactory.hxx +++ b/toolkit/inc/toolkit/helper/accessiblefactory.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,13 +29,9 @@ #ifndef TOOLKIT_HELPER_ACCESSIBLE_FACTORY_HXX #define TOOLKIT_HELPER_ACCESSIBLE_FACTORY_HXX -#ifndef _COM_SUN_STAR_UNO_REFERENCE_HXX #include <com/sun/star/uno/Reference.hxx> -#endif -#ifndef _RTL_REF_HXX #include <rtl/ref.hxx> -#endif namespace com { namespace sun { namespace star { namespace accessibility { class XAccessible; @@ -139,3 +136,5 @@ namespace toolkit //........................................................................ #endif // TOOLKIT_HELPER_ACCESSIBLE_FACTORY_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/helper/convert.hxx b/toolkit/inc/toolkit/helper/convert.hxx index 5de2b8861abf..2a7f9a46169d 100644 --- a/toolkit/inc/toolkit/helper/convert.hxx +++ b/toolkit/inc/toolkit/helper/convert.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -65,3 +66,5 @@ inline ::Rectangle VCLRectangle( const ::com::sun::star::awt::Rectangle& rAWTRec } #endif // _TOOLKIT_HELPER_CONVERT_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/helper/emptyfontdescriptor.hxx b/toolkit/inc/toolkit/helper/emptyfontdescriptor.hxx index e35b1395eb54..5f9cacd85f3b 100644 --- a/toolkit/inc/toolkit/helper/emptyfontdescriptor.hxx +++ b/toolkit/inc/toolkit/helper/emptyfontdescriptor.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -54,3 +55,4 @@ public: #endif // _TOOLKIT_HELPER_EMPTYFONTDESCRIPTOR_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/helper/externallock.hxx b/toolkit/inc/toolkit/helper/externallock.hxx index 75246a829790..667051d409b6 100644 --- a/toolkit/inc/toolkit/helper/externallock.hxx +++ b/toolkit/inc/toolkit/helper/externallock.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -43,3 +44,4 @@ public: #endif // _TOOLKIT_HELPER_EXTERNALLOCK_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/helper/fixedhyperbase.hxx b/toolkit/inc/toolkit/helper/fixedhyperbase.hxx index 4688e2a3f33d..4372861a7e15 100644 --- a/toolkit/inc/toolkit/helper/fixedhyperbase.hxx +++ b/toolkit/inc/toolkit/helper/fixedhyperbase.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -55,3 +56,4 @@ namespace toolkit #endif // TOOLKIT_INC_TOOLKIT_HELPER_FIXEDHYPERBASE_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/helper/formpdfexport.hxx b/toolkit/inc/toolkit/helper/formpdfexport.hxx index cafcb5d00d38..73ed870c13e5 100644 --- a/toolkit/inc/toolkit/helper/formpdfexport.hxx +++ b/toolkit/inc/toolkit/helper/formpdfexport.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -61,3 +62,5 @@ namespace toolkitform //........................................................................ #endif // _TOOLKIT_HELPER_FORM_FORMPDFEXPORT_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/helper/imagealign.hxx b/toolkit/inc/toolkit/helper/imagealign.hxx index 5d725a692bc6..4dd6a019a1de 100644 --- a/toolkit/inc/toolkit/helper/imagealign.hxx +++ b/toolkit/inc/toolkit/helper/imagealign.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -61,3 +62,5 @@ namespace toolkit //........................................................................ #endif // TOOLKIT_INC_TOOLKIT_HELPER_IMAGEALIGN_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/helper/listenermultiplexer.hxx b/toolkit/inc/toolkit/helper/listenermultiplexer.hxx index 408dd4cbe385..46de6c4ad8d5 100644 --- a/toolkit/inc/toolkit/helper/listenermultiplexer.hxx +++ b/toolkit/inc/toolkit/helper/listenermultiplexer.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -41,6 +42,7 @@ #include <com/sun/star/awt/XTextListener.hpp> #include <com/sun/star/awt/XActionListener.hpp> #include <com/sun/star/awt/XItemListener.hpp> +#include <com/sun/star/awt/XTabListener.hpp> #include <com/sun/star/container/XContainerListener.hpp> #include <com/sun/star/awt/XSpinListener.hpp> #include <com/sun/star/awt/XAdjustmentListener.hpp> @@ -184,6 +186,17 @@ DECL_LISTENERMULTIPLEXER_START_DLLPUB( ItemListenerMultiplexer, ::com::sun::star DECL_LISTENERMULTIPLEXER_END // ---------------------------------------------------- +// class TabListenerMultiplexer +// ---------------------------------------------------- +DECL_LISTENERMULTIPLEXER_START_DLLPUB( TabListenerMultiplexer, ::com::sun::star::awt::XTabListener ) + void SAL_CALL inserted( ::sal_Int32 ID ) throw (::com::sun::star::uno::RuntimeException); + void SAL_CALL removed( ::sal_Int32 ID ) throw (::com::sun::star::uno::RuntimeException); + void SAL_CALL changed( ::sal_Int32 ID, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& Properties ) throw (::com::sun::star::uno::RuntimeException); + void SAL_CALL activated( ::sal_Int32 ID ) throw (::com::sun::star::uno::RuntimeException); + void SAL_CALL deactivated( ::sal_Int32 ID ) throw (::com::sun::star::uno::RuntimeException); +DECL_LISTENERMULTIPLEXER_END + +// ---------------------------------------------------- // class ContainerListenerMultiplexer // ---------------------------------------------------- DECL_LISTENERMULTIPLEXER_START( ContainerListenerMultiplexer, ::com::sun::star::container::XContainerListener ) @@ -261,3 +274,4 @@ DECL_LISTENERMULTIPLEXER_END #endif // _TOOLKIT_HELPER_LISTENERMULTIPLEXER_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/helper/macros.hxx b/toolkit/inc/toolkit/helper/macros.hxx index 48386d9a404c..255530a32628 100644 --- a/toolkit/inc/toolkit/helper/macros.hxx +++ b/toolkit/inc/toolkit/helper/macros.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,7 +29,7 @@ #ifndef _TOOLKIT_HELPER_MACROS_HXX_ #define _TOOLKIT_HELPER_MACROS_HXX_ -// ------------------------------------------------------------------------------------- +#include <comphelper/servicehelper.hxx> #define IMPL_XUNOTUNNEL( ClassName ) \ sal_Int64 ClassName::getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& rIdentifier ) throw(::com::sun::star::uno::RuntimeException) \ @@ -39,20 +40,13 @@ sal_Int64 ClassName::getSomething( const ::com::sun::star::uno::Sequence< sal_In } \ return 0; \ } \ +namespace \ +{ \ + class the##ClassName##UnoTunnelId : public rtl::Static< UnoTunnelIdInit, the##ClassName##UnoTunnelId> {}; \ +} \ const ::com::sun::star::uno::Sequence< sal_Int8 >& ClassName::GetUnoTunnelId() throw() \ { \ - static ::com::sun::star::uno::Sequence< sal_Int8 > * pSeq = NULL; \ - if( !pSeq ) \ - { \ - ::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() ); \ - if( !pSeq ) \ - { \ - static ::com::sun::star::uno::Sequence< sal_Int8 > aSeq( 16 ); \ - rtl_createUuid( (sal_uInt8*)aSeq.getArray(), 0, sal_True ); \ - pSeq = &aSeq; \ - } \ - } \ - return *pSeq; \ + return the##ClassName##UnoTunnelId::get().getSeq(); \ } \ ClassName* ClassName::GetImplementation( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rxIFace ) throw() \ { \ @@ -69,20 +63,13 @@ sal_Int64 ClassName::getSomething( const ::com::sun::star::uno::Sequence< sal_In } \ return BaseClass::getSomething( rIdentifier ); \ } \ +namespace \ +{ \ + class the##ClassName##UnoTunnelId : public rtl::Static< UnoTunnelIdInit, the##ClassName##UnoTunnelId> {}; \ +} \ const ::com::sun::star::uno::Sequence< sal_Int8 >& ClassName::GetUnoTunnelId() throw() \ { \ - static ::com::sun::star::uno::Sequence< sal_Int8 > * pSeq = NULL; \ - if( !pSeq ) \ - { \ - ::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() ); \ - if( !pSeq ) \ - { \ - static ::com::sun::star::uno::Sequence< sal_Int8 > aSeq( 16 ); \ - rtl_createUuid( (sal_uInt8*)aSeq.getArray(), 0, sal_True ); \ - pSeq = &aSeq; \ - } \ - } \ - return *pSeq; \ + return the##ClassName##UnoTunnelId::get().getSeq(); \ } \ ClassName* ClassName::GetImplementation( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rxIFace ) throw() \ { \ @@ -184,11 +171,62 @@ void ClassName::disposing( const ::com::sun::star::lang::EventObject& ) throw(:: #define DISPLAY_EXCEPTION( ClassName, MethodName, e ) \ ::rtl::OString sMessage( #ClassName "::" #MethodName ": caught an exception!\n" ); \ sMessage += ::rtl::OString( e.Message.getStr(), e.Message.getLength(), RTL_TEXTENCODING_ASCII_US ); \ - OSL_ENSURE( sal_False, sMessage.getStr() ); + OSL_FAIL( sMessage.getStr() ); #else #define DISPLAY_EXCEPTION( ClassName, MethodName, e ) #endif +#define IMPL_TABLISTENERMULTIPLEXER_LISTENERMETHOD_BODY_2PARAM( ClassName, InterfaceName, MethodName, ParamType1, ParamType2 ) \ +{ \ + ParamType1 aMulti( evt ); \ + ParamType2 aMulti2( evt2 ); \ + ::cppu::OInterfaceIteratorHelper aIt( *this ); \ + while( aIt.hasMoreElements() ) \ + { \ + ::com::sun::star::uno::Reference< InterfaceName > xListener( \ + static_cast< InterfaceName* >( aIt.next() ) ); \ + try \ + { \ + xListener->MethodName( aMulti, aMulti2 ); \ + } \ + catch( ::com::sun::star::lang::DisposedException e ) \ + { \ + OSL_ENSURE( e.Context.is(), "caught DisposedException with empty Context field" ); \ + if ( e.Context == xListener || !e.Context.is() ) \ + aIt.remove(); \ + } \ + catch( ::com::sun::star::uno::RuntimeException e ) \ + { \ + DISPLAY_EXCEPTION( ClassName, MethodName, e ) \ + } \ + } \ +} + +#define IMPL_TABLISTENERMULTIPLEXER_LISTENERMETHOD_BODY_1PARAM( ClassName, InterfaceName, MethodName, ParamType1 ) \ +{ \ + ParamType1 aMulti( evt ); \ + ::cppu::OInterfaceIteratorHelper aIt( *this ); \ + while( aIt.hasMoreElements() ) \ + { \ + ::com::sun::star::uno::Reference< InterfaceName > xListener( \ + static_cast< InterfaceName* >( aIt.next() ) ); \ + try \ + { \ + xListener->MethodName( aMulti ); \ + } \ + catch( ::com::sun::star::lang::DisposedException e ) \ + { \ + OSL_ENSURE( e.Context.is(), "caught DisposedException with empty Context field" ); \ + if ( e.Context == xListener || !e.Context.is() ) \ + aIt.remove(); \ + } \ + catch( ::com::sun::star::uno::RuntimeException e ) \ + { \ + DISPLAY_EXCEPTION( ClassName, MethodName, e ) \ + } \ + } \ +} + #define IMPL_LISTENERMULTIPLEXER_LISTENERMETHOD_BODY( ClassName, InterfaceName, MethodName, EventType ) \ { \ EventType aMulti( evt ); \ @@ -240,7 +278,7 @@ IMPL_LISTENERMULTIPLEXER_LISTENERMETHOD_BODY( ClassName, InterfaceName, MethodNa // ------------------------------------------------------------------------------------- #define DECLIMPL_SERVICEINFO_DERIVED( ImplName, BaseClass, ServiceName ) \ - ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException) { return ::rtl::OUString::createFromAscii( "stardiv.Toolkit." #ImplName ); } \ + ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException) { return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "stardiv.Toolkit." #ImplName )); } \ ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException) \ { \ ::com::sun::star::uno::Sequence< ::rtl::OUString > aNames = BaseClass::getSupportedServiceNames( ); \ @@ -252,7 +290,7 @@ IMPL_LISTENERMULTIPLEXER_LISTENERMETHOD_BODY( ClassName, InterfaceName, MethodNa // ------------------------------------------------------------------------------------- #define DECLIMPL_SERVICEINFO( ImplName, ServiceName ) \ - ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException) { return ::rtl::OUString::createFromAscii( "stardiv.Toolkit." #ImplName ); } \ + ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException) { return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "stardiv.Toolkit." #ImplName )); } \ ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException) \ { \ ::com::sun::star::uno::Sequence< ::rtl::OUString > aNames( 1 ); \ @@ -268,3 +306,4 @@ IMPL_LISTENERMULTIPLEXER_LISTENERMETHOD_BODY( ClassName, InterfaceName, MethodNa #endif // _TOOLKIT_HELPER_MACROS_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/helper/mutexandbroadcasthelper.hxx b/toolkit/inc/toolkit/helper/mutexandbroadcasthelper.hxx index 4ae1dd17c62f..4bc4d4d59825 100644 --- a/toolkit/inc/toolkit/helper/mutexandbroadcasthelper.hxx +++ b/toolkit/inc/toolkit/helper/mutexandbroadcasthelper.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -49,3 +50,4 @@ public: #endif // _TOOLKIT_HELPER_MUTEXANDBROADCASTHELPER_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/helper/mutexhelper.hxx b/toolkit/inc/toolkit/helper/mutexhelper.hxx index 43d5e77b353e..d1cd5e258dbd 100644 --- a/toolkit/inc/toolkit/helper/mutexhelper.hxx +++ b/toolkit/inc/toolkit/helper/mutexhelper.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -49,3 +50,4 @@ public: #endif // _TOOLKIT_HELPER_MUTEXHELPER_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/helper/property.hxx b/toolkit/inc/toolkit/helper/property.hxx index c2d6380dcb65..dd4bdd1f7d40 100644 --- a/toolkit/inc/toolkit/helper/property.hxx +++ b/toolkit/inc/toolkit/helper/property.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -195,6 +196,7 @@ namespace rtl { #define BASEPROPERTY_GRID_SELECTIONMODE 144 #define BASEPROPERTY_ENABLEVISIBLE 145 // sal_Bool #define BASEPROPERTY_REFERENCE_DEVICE 146 + #define BASEPROPERTY_HIGHCONTRASTMODE 147 #define BASEPROPERTY_GRID_HEADER_BACKGROUND 148 #define BASEPROPERTY_GRID_HEADER_TEXT_COLOR 149 @@ -202,10 +204,13 @@ namespace rtl { #define BASEPROPERTY_GRID_LINE_COLOR 151 #define BASEPROPERTY_MULTISELECTION_SIMPLEMODE 152 #define BASEPROPERTY_ITEM_SEPARATOR_POS 153 -#define BASEPROPERTY_AUTO_REPEAT 154 -#define BASEPROPERTY_ROW_HEADER_WIDTH 155 -#define BASEPROPERTY_COLUMN_HEADER_HEIGHT 156 -#define BASEPROPERTY_USE_GRID_LINES 157 +#define BASEPROPERTY_GROUPNAME 154 // ::rtl::OUString +#define BASEPROPERTY_MULTIPAGEVALUE 155 // sal_Int32 +#define BASEPROPERTY_USERFORMCONTAINEES 156 // css::container::XNameContainer +#define BASEPROPERTY_AUTO_REPEAT 157 +#define BASEPROPERTY_ROW_HEADER_WIDTH 158 +#define BASEPROPERTY_COLUMN_HEADER_HEIGHT 159 +#define BASEPROPERTY_USE_GRID_LINES 160 // Keine gebundenen Properties, werden immer aus der Property BASEPROPERTY_FONTDESCRIPTOR entnommen. @@ -250,3 +255,4 @@ sal_Bool CompareProperties( const ::com::sun::star::u #endif // _TOOLKIT_HELPER_PROPERTY_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/helper/servicenames.hxx b/toolkit/inc/toolkit/helper/servicenames.hxx index 27949e9de791..d784f5950328 100644 --- a/toolkit/inc/toolkit/helper/servicenames.hxx +++ b/toolkit/inc/toolkit/helper/servicenames.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -31,89 +32,96 @@ #include <sal/types.h> #include <tools/solar.h> -extern const sal_Char __FAR_DATA szServiceName_Toolkit[], szServiceName2_Toolkit[]; -extern const sal_Char __FAR_DATA szServiceName_MVCIntrospection[], szServiceName2_MVCIntrospection[]; -extern const sal_Char __FAR_DATA szServiceName_PopupMenu[], szServiceName2_PopupMenu[]; -extern const sal_Char __FAR_DATA szServiceName_MenuBar[], szServiceName2_MenuBar[]; -extern const sal_Char __FAR_DATA szServiceName_Pointer[], szServiceName2_Pointer[]; -extern const sal_Char __FAR_DATA szServiceName_UnoControlContainer[], szServiceName2_UnoControlContainer[]; -extern const sal_Char __FAR_DATA szServiceName_UnoControlContainerModel[], szServiceName2_UnoControlContainerModel[]; -extern const sal_Char __FAR_DATA szServiceName_TabController[], szServiceName2_TabController[]; -extern const sal_Char __FAR_DATA szServiceName_TabControllerModel[], szServiceName2_TabControllerModel[]; -extern const sal_Char __FAR_DATA szServiceName_UnoControlDialog[], szServiceName2_UnoControlDialog[]; -extern const sal_Char __FAR_DATA szServiceName_UnoControlDialogModel[], szServiceName2_UnoControlDialogModel[]; -extern const sal_Char __FAR_DATA szServiceName_UnoControlEdit[], szServiceName2_UnoControlEdit[]; -extern const sal_Char __FAR_DATA szServiceName_UnoControlEditModel[], szServiceName2_UnoControlEditModel[]; -extern const sal_Char __FAR_DATA szServiceName_UnoControlFileControl[], szServiceName2_UnoControlFileControl[]; -extern const sal_Char __FAR_DATA szServiceName_UnoControlFileControlModel[], szServiceName2_UnoControlFileControlModel[]; -extern const sal_Char __FAR_DATA szServiceName_UnoControlButton[], szServiceName2_UnoControlButton[]; -extern const sal_Char __FAR_DATA szServiceName_UnoControlButtonModel[], szServiceName2_UnoControlButtonModel[]; -extern const sal_Char __FAR_DATA szServiceName_UnoControlImageButton[], szServiceName2_UnoControlImageButton[]; -extern const sal_Char __FAR_DATA szServiceName_UnoControlImageButtonModel[], szServiceName2_UnoControlImageButtonModel[]; -extern const sal_Char __FAR_DATA szServiceName_UnoControlImageControl[], szServiceName2_UnoControlImageControl[]; -extern const sal_Char __FAR_DATA szServiceName_UnoControlImageControlModel[], szServiceName2_UnoControlImageControlModel[]; -extern const sal_Char __FAR_DATA szServiceName_UnoControlRadioButton[], szServiceName2_UnoControlRadioButton[]; -extern const sal_Char __FAR_DATA szServiceName_UnoControlRadioButtonModel[], szServiceName2_UnoControlRadioButtonModel[]; -extern const sal_Char __FAR_DATA szServiceName_UnoControlCheckBox[], szServiceName2_UnoControlCheckBox[]; -extern const sal_Char __FAR_DATA szServiceName_UnoControlCheckBoxModel[], szServiceName2_UnoControlCheckBoxModel[]; -extern const sal_Char __FAR_DATA szServiceName_UnoControlListBox[], szServiceName2_UnoControlListBox[]; -extern const sal_Char __FAR_DATA szServiceName_UnoControlListBoxModel[], szServiceName2_UnoControlListBoxModel[]; -extern const sal_Char __FAR_DATA szServiceName_UnoControlComboBox[], szServiceName2_UnoControlComboBox[]; -extern const sal_Char __FAR_DATA szServiceName_UnoControlComboBoxModel[], szServiceName2_UnoControlComboBoxModel[]; -extern const sal_Char __FAR_DATA szServiceName_UnoControlFixedText[], szServiceName2_UnoControlFixedText[]; -extern const sal_Char __FAR_DATA szServiceName_UnoControlFixedTextModel[], szServiceName2_UnoControlFixedTextModel[]; -extern const sal_Char __FAR_DATA szServiceName_UnoControlGroupBox[], szServiceName2_UnoControlGroupBox[]; -extern const sal_Char __FAR_DATA szServiceName_UnoControlGroupBoxModel[], szServiceName2_UnoControlGroupBoxModel[]; -extern const sal_Char __FAR_DATA szServiceName_UnoControlDateField[], szServiceName2_UnoControlDateField[]; -extern const sal_Char __FAR_DATA szServiceName_UnoControlDateFieldModel[], szServiceName2_UnoControlDateFieldModel[]; -extern const sal_Char __FAR_DATA szServiceName_UnoControlTimeField[], szServiceName2_UnoControlTimeField[]; -extern const sal_Char __FAR_DATA szServiceName_UnoControlTimeFieldModel[], szServiceName2_UnoControlTimeFieldModel[]; -extern const sal_Char __FAR_DATA szServiceName_UnoControlNumericField[], szServiceName2_UnoControlNumericField[]; -extern const sal_Char __FAR_DATA szServiceName_UnoControlNumericFieldModel[], szServiceName2_UnoControlNumericFieldModel[]; -extern const sal_Char __FAR_DATA szServiceName_UnoControlCurrencyField[], szServiceName2_UnoControlCurrencyField[]; -extern const sal_Char __FAR_DATA szServiceName_UnoControlCurrencyFieldModel[], szServiceName2_UnoControlCurrencyFieldModel[]; -extern const sal_Char __FAR_DATA szServiceName_UnoControlPatternField[], szServiceName2_UnoControlPatternField[]; -extern const sal_Char __FAR_DATA szServiceName_UnoControlPatternFieldModel[], szServiceName2_UnoControlPatternFieldModel[]; -extern const sal_Char __FAR_DATA szServiceName_UnoControlFormattedField[], szServiceName2_UnoControlFormattedField[]; -extern const sal_Char __FAR_DATA szServiceName_UnoControlFormattedFieldModel[], szServiceName2_UnoControlFormattedFieldModel[]; -extern const sal_Char __FAR_DATA szServiceName_UnoControlProgressBar[], szServiceName2_UnoControlProgressBar[]; -extern const sal_Char __FAR_DATA szServiceName_UnoControlProgressBarModel[], szServiceName2_UnoControlProgressBarModel[]; -extern const sal_Char __FAR_DATA szServiceName_UnoControlScrollBar[], szServiceName2_UnoControlScrollBar[]; -extern const sal_Char __FAR_DATA szServiceName_UnoControlScrollBarModel[], szServiceName2_UnoControlScrollBarModel[]; -extern const sal_Char __FAR_DATA szServiceName_UnoControlFixedLine[], szServiceName2_UnoControlFixedLine[]; -extern const sal_Char __FAR_DATA szServiceName_UnoControlFixedLineModel[], szServiceName2_UnoControlFixedLineModel[]; -extern const sal_Char __FAR_DATA szServiceName_PrinterServer[], szServiceName2_PrinterServer[]; -extern const sal_Char __FAR_DATA szServiceName_UnoControlRoadmap[], szServiceName2_UnoControlRoadmap[]; -extern const sal_Char __FAR_DATA szServiceName_UnoControlRoadmapModel[], szServiceName2_UnoControlRoadmapModel[]; +extern const sal_Char szServiceName_Toolkit[], szServiceName2_Toolkit[]; +extern const sal_Char szServiceName_MVCIntrospection[], szServiceName2_MVCIntrospection[]; +extern const sal_Char szServiceName_PopupMenu[], szServiceName2_PopupMenu[]; +extern const sal_Char szServiceName_MenuBar[], szServiceName2_MenuBar[]; +extern const sal_Char szServiceName_Pointer[], szServiceName2_Pointer[]; +extern const sal_Char szServiceName_UnoControlContainer[], szServiceName2_UnoControlContainer[]; +extern const sal_Char szServiceName_UnoControlContainerModel[], szServiceName2_UnoControlContainerModel[]; +extern const sal_Char szServiceName_UnoMultiPageControl[], szServiceName2_UnoMultiPageControl[]; +extern const sal_Char szServiceName_UnoMultiPageModel[], szServiceName2_UnoMultiPageModel[]; +extern const sal_Char szServiceName_UnoPageControl[], szServiceName2_UnoPageControl[]; +extern const sal_Char szServiceName_UnoPageModel[], szServiceName2_UnoPageModel[]; +extern const sal_Char szServiceName_UnoFrameControl[], szServiceName2_UnoFrameControl[]; +extern const sal_Char szServiceName_UnoFrameModel[], szServiceName2_UnoFrameModel[]; +extern const sal_Char szServiceName_TabController[], szServiceName2_TabController[]; +extern const sal_Char szServiceName_TabControllerModel[], szServiceName2_TabControllerModel[]; +extern const sal_Char szServiceName_UnoControlDialog[], szServiceName2_UnoControlDialog[]; +extern const sal_Char szServiceName_UnoControlDialogModel[], szServiceName2_UnoControlDialogModel[]; +extern const sal_Char szServiceName_UnoControlEdit[], szServiceName2_UnoControlEdit[]; +extern const sal_Char szServiceName_UnoControlEditModel[], szServiceName2_UnoControlEditModel[]; +extern const sal_Char szServiceName_UnoControlFileControl[], szServiceName2_UnoControlFileControl[]; +extern const sal_Char szServiceName_UnoControlFileControlModel[], szServiceName2_UnoControlFileControlModel[]; +extern const sal_Char szServiceName_UnoControlButton[], szServiceName2_UnoControlButton[]; +extern const sal_Char szServiceName_UnoControlButtonModel[], szServiceName2_UnoControlButtonModel[]; +extern const sal_Char szServiceName_UnoControlImageButton[], szServiceName2_UnoControlImageButton[]; +extern const sal_Char szServiceName_UnoControlImageButtonModel[], szServiceName2_UnoControlImageButtonModel[]; +extern const sal_Char szServiceName_UnoControlImageControl[], szServiceName2_UnoControlImageControl[]; +extern const sal_Char szServiceName_UnoControlImageControlModel[], szServiceName2_UnoControlImageControlModel[]; +extern const sal_Char szServiceName_UnoControlRadioButton[], szServiceName2_UnoControlRadioButton[]; +extern const sal_Char szServiceName_UnoControlRadioButtonModel[], szServiceName2_UnoControlRadioButtonModel[]; +extern const sal_Char szServiceName_UnoControlCheckBox[], szServiceName2_UnoControlCheckBox[]; +extern const sal_Char szServiceName_UnoControlCheckBoxModel[], szServiceName2_UnoControlCheckBoxModel[]; +extern const sal_Char szServiceName_UnoControlListBox[], szServiceName2_UnoControlListBox[]; +extern const sal_Char szServiceName_UnoControlListBoxModel[], szServiceName2_UnoControlListBoxModel[]; +extern const sal_Char szServiceName_UnoControlComboBox[], szServiceName2_UnoControlComboBox[]; +extern const sal_Char szServiceName_UnoControlComboBoxModel[], szServiceName2_UnoControlComboBoxModel[]; +extern const sal_Char szServiceName_UnoControlFixedText[], szServiceName2_UnoControlFixedText[]; +extern const sal_Char szServiceName_UnoControlFixedTextModel[], szServiceName2_UnoControlFixedTextModel[]; +extern const sal_Char szServiceName_UnoControlGroupBox[], szServiceName2_UnoControlGroupBox[]; +extern const sal_Char szServiceName_UnoControlGroupBoxModel[], szServiceName2_UnoControlGroupBoxModel[]; +extern const sal_Char szServiceName_UnoControlDateField[], szServiceName2_UnoControlDateField[]; +extern const sal_Char szServiceName_UnoControlDateFieldModel[], szServiceName2_UnoControlDateFieldModel[]; +extern const sal_Char szServiceName_UnoControlTimeField[], szServiceName2_UnoControlTimeField[]; +extern const sal_Char szServiceName_UnoControlTimeFieldModel[], szServiceName2_UnoControlTimeFieldModel[]; +extern const sal_Char szServiceName_UnoControlNumericField[], szServiceName2_UnoControlNumericField[]; +extern const sal_Char szServiceName_UnoControlNumericFieldModel[], szServiceName2_UnoControlNumericFieldModel[]; +extern const sal_Char szServiceName_UnoControlCurrencyField[], szServiceName2_UnoControlCurrencyField[]; +extern const sal_Char szServiceName_UnoControlCurrencyFieldModel[], szServiceName2_UnoControlCurrencyFieldModel[]; +extern const sal_Char szServiceName_UnoControlPatternField[], szServiceName2_UnoControlPatternField[]; +extern const sal_Char szServiceName_UnoControlPatternFieldModel[], szServiceName2_UnoControlPatternFieldModel[]; +extern const sal_Char szServiceName_UnoControlFormattedField[], szServiceName2_UnoControlFormattedField[]; +extern const sal_Char szServiceName_UnoControlFormattedFieldModel[], szServiceName2_UnoControlFormattedFieldModel[]; +extern const sal_Char szServiceName_UnoControlProgressBar[], szServiceName2_UnoControlProgressBar[]; +extern const sal_Char szServiceName_UnoControlProgressBarModel[], szServiceName2_UnoControlProgressBarModel[]; +extern const sal_Char szServiceName_UnoControlScrollBar[], szServiceName2_UnoControlScrollBar[]; +extern const sal_Char szServiceName_UnoControlScrollBarModel[], szServiceName2_UnoControlScrollBarModel[]; +extern const sal_Char szServiceName_UnoControlFixedLine[], szServiceName2_UnoControlFixedLine[]; +extern const sal_Char szServiceName_UnoControlFixedLineModel[], szServiceName2_UnoControlFixedLineModel[]; +extern const sal_Char szServiceName_PrinterServer[], szServiceName2_PrinterServer[]; +extern const sal_Char szServiceName_UnoControlRoadmap[], szServiceName2_UnoControlRoadmap[]; +extern const sal_Char szServiceName_UnoControlRoadmapModel[], szServiceName2_UnoControlRoadmapModel[]; -extern const sal_Char __FAR_DATA szServiceName_UnoSpinButtonControl[], szServiceName_UnoSpinButtonModel[]; +extern const sal_Char szServiceName_UnoSpinButtonControl[], szServiceName_UnoSpinButtonModel[]; -extern const sal_Char __FAR_DATA szServiceName_TreeControl[]; -extern const sal_Char __FAR_DATA szServiceName_TreeControlModel[]; -extern const sal_Char __FAR_DATA szServiceName_MutableTreeDataModel[]; +extern const sal_Char szServiceName_TreeControl[]; +extern const sal_Char szServiceName_TreeControlModel[]; +extern const sal_Char szServiceName_MutableTreeDataModel[]; -extern const sal_Char __FAR_DATA szServiceName_GridControl[]; -extern const sal_Char __FAR_DATA szServiceName_GridControlModel[]; -extern const sal_Char __FAR_DATA szServiceName_DefaultGridDataModel[]; -extern const sal_Char __FAR_DATA szServiceName_DefaultGridColumnModel[]; -extern const sal_Char __FAR_DATA szServiceName_GridColumn[]; -extern const sal_Char __FAR_DATA szServiceName_SortableGridDataModel[]; +extern const sal_Char szServiceName_GridControl[]; +extern const sal_Char szServiceName_GridControlModel[]; +extern const sal_Char szServiceName_DefaultGridDataModel[]; +extern const sal_Char szServiceName_DefaultGridColumnModel[]; +extern const sal_Char szServiceName_GridColumn[]; +extern const sal_Char szServiceName_SortableGridDataModel[]; -extern const sal_Char __FAR_DATA szServiceName_UnoSimpleAnimationControl[], szServiceName2_UnoSimpleAnimationControl[]; -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[]; +extern const sal_Char szServiceName_UnoSimpleAnimationControl[], szServiceName2_UnoSimpleAnimationControl[]; +extern const sal_Char szServiceName_UnoSimpleAnimationControlModel[], szServiceName2_UnoSimpleAnimationControlModel[]; +extern const sal_Char szServiceName_UnoThrobberControl[], szServiceName2_UnoThrobberControl[]; +extern const sal_Char szServiceName_UnoThrobberControlModel[], szServiceName2_UnoThrobberControlModel[]; +extern const sal_Char szServiceName_AnimatedImagesControl[]; +extern const sal_Char szServiceName_AnimatedImagesControlModel[]; +extern const sal_Char szServiceName_SpinningProgressControlModel[]; +extern const sal_Char szServiceName_UnoControlFixedHyperlink[], szServiceName_UnoControlFixedHyperlinkModel[]; -extern const sal_Char __FAR_DATA szServiceName_UnoControlTabPageModel[], szServiceName2_UnoControlTabPageModel[]; -extern const sal_Char __FAR_DATA szServiceName_UnoControlTabPage[]; -extern const sal_Char __FAR_DATA szServiceName_UnoControlTabPageContainerModel[]; -extern const sal_Char __FAR_DATA szServiceName_UnoControlTabPageContainer[]; +extern const sal_Char szServiceName_UnoControlTabPageModel[], szServiceName2_UnoControlTabPageModel[]; +extern const sal_Char szServiceName_UnoControlTabPage[]; +extern const sal_Char szServiceName_UnoControlTabPageContainerModel[]; +extern const sal_Char szServiceName_UnoControlTabPageContainer[]; // ExtUnoWrapper: -extern const char __FAR_DATA szServiceName_ImageProducer[], szServiceName2_ImageProducer[]; +extern const char szServiceName_ImageProducer[], szServiceName2_ImageProducer[]; #endif // _TOOLKIT_HELPER_SERVICENAMES_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/helper/solarrelease.hxx b/toolkit/inc/toolkit/helper/solarrelease.hxx deleted file mode 100644 index e45a1b6ee2c3..000000000000 --- a/toolkit/inc/toolkit/helper/solarrelease.hxx +++ /dev/null @@ -1,82 +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_INC_TOOLKIT_HELPER_SOLARRELEASE_HXX -#define TOOLKIT_INC_TOOLKIT_HELPER_SOLARRELEASE_HXX - -#include <vcl/svapp.hxx> - -//........................................................................ -namespace toolkit -{ -//........................................................................ - - //==================================================================== - //= ReleaseSolarMutex - //==================================================================== - class ReleaseSolarMutex - { - sal_uInt32 mnLockCount; - const bool mbRescheduleDuringAcquire; - - public: - enum - { - RescheduleDuringAcquire = true - }; - - public: - ReleaseSolarMutex( const bool i_rescheduleDuringAcquire = false ) - :mnLockCount( Application::ReleaseSolarMutex() ) - ,mbRescheduleDuringAcquire( i_rescheduleDuringAcquire ) - { - - } - - ~ReleaseSolarMutex() - { - if ( mnLockCount > 0 ) - { - if ( mbRescheduleDuringAcquire ) - { - while ( !Application::GetSolarMutex().tryToAcquire() ) - { - Application::Reschedule(); - } - --mnLockCount; - } - Application::AcquireSolarMutex( mnLockCount ); - } - } - }; - -//........................................................................ -} // namespace toolkit -//........................................................................ - -#endif // TOOLKIT_INC_TOOLKIT_HELPER_SOLARRELEASE_HXX - diff --git a/toolkit/inc/toolkit/helper/tkresmgr.hxx b/toolkit/inc/toolkit/helper/tkresmgr.hxx index ea62cd3db361..17c65919bdc0 100644 --- a/toolkit/inc/toolkit/helper/tkresmgr.hxx +++ b/toolkit/inc/toolkit/helper/tkresmgr.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -76,3 +77,4 @@ public: #endif // _TOOLKIT_HELPER_TKRESMGR_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/helper/unomemorystream.hxx b/toolkit/inc/toolkit/helper/unomemorystream.hxx index c7d91e076f73..7cfeae03d8b1 100644 --- a/toolkit/inc/toolkit/helper/unomemorystream.hxx +++ b/toolkit/inc/toolkit/helper/unomemorystream.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -71,3 +72,4 @@ public: #endif // _TOOLKIT_HELPER_UNOMEMORYSTREAM_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/helper/unopropertyarrayhelper.hxx b/toolkit/inc/toolkit/helper/unopropertyarrayhelper.hxx index 99d1763db1e6..c109528beed9 100644 --- a/toolkit/inc/toolkit/helper/unopropertyarrayhelper.hxx +++ b/toolkit/inc/toolkit/helper/unopropertyarrayhelper.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -64,3 +65,4 @@ public: #endif // _TOOLKIT_HELPER_UNOPROPERTYARRAYHELPER_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/helper/unowrapper.hxx b/toolkit/inc/toolkit/helper/unowrapper.hxx index 562d78f34c83..0518768bf952 100644 --- a/toolkit/inc/toolkit/helper/unowrapper.hxx +++ b/toolkit/inc/toolkit/helper/unowrapper.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -91,3 +92,4 @@ private: #endif // _TOOLKIT_HELPER_UNOWRAPPER_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/helper/vclunohelper.hxx b/toolkit/inc/toolkit/helper/vclunohelper.hxx index fc35c480d854..ba8844eb277c 100644 --- a/toolkit/inc/toolkit/helper/vclunohelper.hxx +++ b/toolkit/inc/toolkit/helper/vclunohelper.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -161,3 +162,5 @@ public: #endif // _TOOLKIT_HELPER_VCLUNOHELPER_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/qa/complex/toolkit/accessibility/_XAccessibleComponent.java b/toolkit/qa/complex/toolkit/accessibility/_XAccessibleComponent.java index 7dca37ce18b7..d1025979a0bf 100755..100644 --- a/toolkit/qa/complex/toolkit/accessibility/_XAccessibleComponent.java +++ b/toolkit/qa/complex/toolkit/accessibility/_XAccessibleComponent.java @@ -394,7 +394,7 @@ public class _XAccessibleComponent { /** * Just calls the method. <p> * - * Has <b> OK </b> status if no runtime exceptions occured. + * Has <b> OK </b> status if no runtime exceptions occurred. * @return */ public boolean _grabFocus() { @@ -410,7 +410,7 @@ public class _XAccessibleComponent { * component which support <code>XAccessibleComponent</code>. * * @return The array of children. Empty array returned if - * such children were not found or some error occured. + * such children were not found or some error occurred. */ private XAccessibleComponent[] getChildrenComponents() { XAccessible xAcc = UnoRuntime.queryInterface(XAccessible.class, oObj) ; @@ -448,7 +448,7 @@ public class _XAccessibleComponent { * <code>XAccessibleComponent</code>. * * @return The parent or <code>null</code> if the component - * has no parent or some errors occured. + * has no parent or some errors occurred. */ private XAccessibleComponent getParentComponent() { XAccessible xAcc = UnoRuntime.queryInterface(XAccessible.class, oObj) ; diff --git a/toolkit/qa/unoapi/Test.java b/toolkit/qa/unoapi/Test.java deleted file mode 100644 index 0543fee83f9f..000000000000 --- a/toolkit/qa/unoapi/Test.java +++ /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. -************************************************************************/ - -package org.openoffice.toolkit.qa.unoapi; - -import org.openoffice.Runner; -import org.openoffice.test.OfficeConnection; -import org.openoffice.test.Argument; -import static org.junit.Assert.*; - -public final class Test { - @org.junit.Before public void setUp() throws Exception { - connection.setUp(); - } - - @org.junit.After public void tearDown() - throws InterruptedException, com.sun.star.uno.Exception - { - connection.tearDown(); - } - - @org.junit.Test public void test() { - assertTrue( - Runner.run( - "-sce", Argument.get("sce"), "-xcl", Argument.get("xcl"), "-tdoc", - Argument.get("tdoc"), "-cs", connection.getDescription())); - } - - private final OfficeConnection connection = new OfficeConnection(); -} diff --git a/toolkit/qa/unoapi/knownissues.xcl b/toolkit/qa/unoapi/knownissues.xcl index 273b4b72dbe2..e6880b85efaf 100644 --- a/toolkit/qa/unoapi/knownissues.xcl +++ b/toolkit/qa/unoapi/knownissues.xcl @@ -258,3 +258,9 @@ toolkit.AccessibleMenu::com::sun::star::accessibility::XAccessibleSelection ### i114636 ### toolkit.AccessibleScrollBar::com::sun::star::accessibility::XAccessibleAction toolkit.AccessibleScrollBar::com::sun::star::accessibility::XAccessibleContext + +### fd#35666 ### +toolkit.UnoControlDialogModel::com::sun::star::io::XPersistObject + +### fd#35772 ### +toolkit.Toolkit::com::sun::star::awt::XMessageBoxFactory diff --git a/toolkit/source/awt/animatedimagespeer.cxx b/toolkit/source/awt/animatedimagespeer.cxx index c9c640d51c60..45d60f0d88aa 100755..100644 --- a/toolkit/source/awt/animatedimagespeer.cxx +++ b/toolkit/source/awt/animatedimagespeer.cxx @@ -45,6 +45,7 @@ #include <tools/diagnose_ex.h> #include <tools/urlobj.hxx> #include <vcl/throbber.hxx> +#include <vcl/svapp.hxx> #include <limits> @@ -318,7 +319,7 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ void SAL_CALL AnimatedImagesPeer::startAnimation( ) throw (RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) ); if ( pThrobber != NULL) pThrobber->start(); @@ -327,7 +328,7 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ void SAL_CALL AnimatedImagesPeer::stopAnimation( ) throw (RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) ); if ( pThrobber != NULL) pThrobber->stop(); @@ -336,7 +337,7 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ ::sal_Bool SAL_CALL AnimatedImagesPeer::isAnimationRunning( ) throw (RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) ); if ( pThrobber != NULL) return pThrobber->isRunning(); @@ -346,7 +347,7 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ void SAL_CALL AnimatedImagesPeer::setProperty( const ::rtl::OUString& i_propertyName, const Any& i_value ) throw(RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) ); if ( pThrobber == NULL ) @@ -393,7 +394,7 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ Any SAL_CALL AnimatedImagesPeer::getProperty( const ::rtl::OUString& i_propertyName ) throw(RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Any aReturn; @@ -443,7 +444,7 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ void AnimatedImagesPeer::impl_updateImages_nolck( const Reference< XInterface >& i_animatedImages ) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; lcl_updateImageList_nothrow( *m_pData, Reference< XAnimatedImages >( i_animatedImages, UNO_QUERY_THROW ) ); } @@ -451,7 +452,7 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ void SAL_CALL AnimatedImagesPeer::elementInserted( const ContainerEvent& i_event ) throw (RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Reference< XAnimatedImages > xAnimatedImages( i_event.Source, UNO_QUERY_THROW ); sal_Int32 nPosition(0); @@ -474,7 +475,7 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ void SAL_CALL AnimatedImagesPeer::elementRemoved( const ContainerEvent& i_event ) throw (RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Reference< XAnimatedImages > xAnimatedImages( i_event.Source, UNO_QUERY_THROW ); sal_Int32 nPosition(0); @@ -493,7 +494,7 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ void SAL_CALL AnimatedImagesPeer::elementReplaced( const ContainerEvent& i_event ) throw (RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Reference< XAnimatedImages > xAnimatedImages( i_event.Source, UNO_QUERY_THROW ); sal_Int32 nPosition(0); @@ -529,7 +530,7 @@ namespace toolkit void SAL_CALL AnimatedImagesPeer::dispose( ) throw(RuntimeException) { AnimatedImagesPeer_Base::dispose(); - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; m_pData->aCachedImageSets.resize(0); } diff --git a/toolkit/source/awt/asynccallback.cxx b/toolkit/source/awt/asynccallback.cxx index 9e5334b2d28c..1994b2b4ac26 100644 --- a/toolkit/source/awt/asynccallback.cxx +++ b/toolkit/source/awt/asynccallback.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -29,7 +30,7 @@ #include "precompiled_toolkit.hxx" #include "vcl/svapp.hxx" -#include "vos/mutex.hxx" +#include "osl/mutex.hxx" #include "sal/config.h" #include "cppuhelper/factory.hxx" #include "cppuhelper/implementationentry.hxx" @@ -124,7 +125,8 @@ void SAL_CALL AsyncCallback::addCallback(const css::uno::Reference< css::awt::XC { if ( Application::IsInMain() ) { - osl::Guard< vos::IMutex > aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; + CallbackData* pCallbackData = new CallbackData( xCallback, aData ); Application::PostUserEvent( STATIC_LINK( this, AsyncCallback, Notify_Impl ), pCallbackData ); } @@ -191,3 +193,6 @@ void * SAL_CALL comp_AsyncCallback_component_getFactory( return ::cppu::component_getFactoryHelper( implName, serviceManager, registryKey, entries); } + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/forward.hxx b/toolkit/source/awt/forward.hxx index 0228be562b2c..ab39b40ba7c9 100644 --- a/toolkit/source/awt/forward.hxx +++ b/toolkit/source/awt/forward.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -71,3 +72,5 @@ #endif // !(defined (_MSC_VER) && (_MSC_VER <= 1310)) #endif /* AWT_FORWARD_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/stylesettings.cxx b/toolkit/source/awt/stylesettings.cxx index fc3ec241101c..9e7494779fc7 100644 --- a/toolkit/source/awt/stylesettings.cxx +++ b/toolkit/source/awt/stylesettings.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -35,10 +36,10 @@ /** === end UNO includes === **/ #include <cppuhelper/interfacecontainer.hxx> -#include <vos/mutex.hxx> #include <osl/mutex.hxx> #include <vcl/window.hxx> #include <vcl/settings.hxx> +#include <vcl/svapp.hxx> //...................................................................................................................... namespace toolkit @@ -69,13 +70,11 @@ namespace toolkit //================================================================================================================== struct WindowStyleSettings_Data { - ::vos::IMutex& rMutex; VCLXWindow* pOwningWindow; ::cppu::OInterfaceContainerHelper aStyleChangeListeners; - WindowStyleSettings_Data( ::vos::IMutex& i_rWindowMutex, ::osl::Mutex& i_rListenerMutex, VCLXWindow& i_rOwningWindow ) - :rMutex( i_rWindowMutex ) - ,pOwningWindow( &i_rOwningWindow ) + WindowStyleSettings_Data( ::osl::Mutex& i_rListenerMutex, VCLXWindow& i_rOwningWindow ) + : pOwningWindow( &i_rOwningWindow ) ,aStyleChangeListeners( i_rListenerMutex ) { } @@ -106,7 +105,6 @@ namespace toolkit { public: StyleMethodGuard( WindowStyleSettings_Data& i_rData ) - :m_aGuard( i_rData.rMutex ) { if ( i_rData.pOwningWindow == NULL ) throw DisposedException(); @@ -117,15 +115,15 @@ namespace toolkit } private: - ::vos::OGuard m_aGuard; + SolarMutexGuard m_aGuard; }; //================================================================================================================== //= WindowStyleSettings //================================================================================================================== //------------------------------------------------------------------------------------------------------------------ - WindowStyleSettings::WindowStyleSettings( ::vos::IMutex& i_rWindowMutex, ::osl::Mutex& i_rListenerMutex, VCLXWindow& i_rOwningWindow ) - :m_pData( new WindowStyleSettings_Data( i_rWindowMutex, i_rListenerMutex, i_rOwningWindow ) ) + WindowStyleSettings::WindowStyleSettings(::osl::Mutex& i_rListenerMutex, VCLXWindow& i_rOwningWindow ) + :m_pData( new WindowStyleSettings_Data(i_rListenerMutex, i_rOwningWindow ) ) { Window* pWindow = i_rOwningWindow.GetWindow(); if ( !pWindow ) @@ -985,3 +983,5 @@ namespace toolkit //...................................................................................................................... } // namespace toolkit //...................................................................................................................... + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/stylesettings.hxx b/toolkit/source/awt/stylesettings.hxx index 466e50bad1f1..b79969f455f2 100644 --- a/toolkit/source/awt/stylesettings.hxx +++ b/toolkit/source/awt/stylesettings.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -35,10 +36,6 @@ #include <boost/scoped_ptr.hpp> -namespace vos -{ - class IMutex; -} namespace osl { class Mutex; @@ -60,7 +57,7 @@ namespace toolkit class WindowStyleSettings : public WindowStyleSettings_Base { public: - WindowStyleSettings( ::vos::IMutex& i_rWindowMutex, ::osl::Mutex& i_rListenerMutex, VCLXWindow& i_rOwningWindow ); + WindowStyleSettings( ::osl::Mutex& i_rListenerMutex, VCLXWindow& i_rOwningWindow ); ~WindowStyleSettings(); void dispose(); @@ -186,3 +183,5 @@ namespace toolkit //...................................................................................................................... #endif // TOOLKIT_STYLESETTINGS_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/vclxaccessiblecomponent.cxx b/toolkit/source/awt/vclxaccessiblecomponent.cxx index de5ebab36b2a..66a2a4bf1cb3 100644 --- a/toolkit/source/awt/vclxaccessiblecomponent.cxx +++ b/toolkit/source/awt/vclxaccessiblecomponent.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -109,7 +110,7 @@ IMPLEMENT_FORWARD_XTYPEPROVIDER3( VCLXAccessibleComponent, AccessibleExtendedCom ::rtl::OUString VCLXAccessibleComponent::getImplementationName() throw (uno::RuntimeException) { - return ::rtl::OUString::createFromAscii( "com.sun.star.comp.toolkit.AccessibleWindow" ); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.toolkit.AccessibleWindow")); } sal_Bool VCLXAccessibleComponent::supportsService( const ::rtl::OUString& rServiceName ) throw (uno::RuntimeException) @@ -126,7 +127,7 @@ sal_Bool VCLXAccessibleComponent::supportsService( const ::rtl::OUString& rServi uno::Sequence< ::rtl::OUString > VCLXAccessibleComponent::getSupportedServiceNames() throw (uno::RuntimeException) { uno::Sequence< ::rtl::OUString > aNames(1); - aNames[0] = ::rtl::OUString::createFromAscii( "com.sun.star.awt.AccessibleWindow" ); + aNames[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.AccessibleWindow")); return aNames; } @@ -922,3 +923,4 @@ uno::Reference< awt::XFont > SAL_CALL VCLXAccessibleComponent::getFont( ) throw return sRet; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/vclxbitmap.cxx b/toolkit/source/awt/vclxbitmap.cxx index 44d909674ca4..7b5dc0a53442 100644 --- a/toolkit/source/awt/vclxbitmap.cxx +++ b/toolkit/source/awt/vclxbitmap.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -91,3 +92,4 @@ IMPL_XTYPEPROVIDER_END +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/vclxbutton.cxx b/toolkit/source/awt/vclxbutton.cxx index 3701eee409c3..5a368793fc89 100644 --- a/toolkit/source/awt/vclxbutton.cxx +++ b/toolkit/source/awt/vclxbutton.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -44,11 +45,11 @@ VCLXIconButton::VCLXIconButton( Window *p, rtl::OUString aDefaultLabel, char con p->SetComponentInterface( this ); setLabel( aDefaultLabel ); - setProperty( rtl::OUString::createFromAscii( "Graphic" ), + setProperty( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Graphic")), css::uno::Any( layoutimpl::loadGraphic( pGraphName ) ) ); - setProperty( rtl::OUString::createFromAscii( "ImagePosition" ), + setProperty( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ImagePosition")), css::uno::Any( css::awt::ImagePosition::LeftCenter ) ); - setProperty( rtl::OUString::createFromAscii( "Align" ), + setProperty( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Align")), css::uno::Any( (sal_Int16) 1 /* magic - center */ ) ); } @@ -56,71 +57,73 @@ VCLXIconButton::VCLXIconButton( Window *p, rtl::OUString aDefaultLabel, char con VCLXOKButton::VCLXOKButton( Window *p ) : VCLXIconButton( p, Button::GetStandardText( BUTTON_OK ), - "res/commandimagelist/sc_ok.png" ) + "cmd/sc_ok.png" ) { } VCLXCancelButton::VCLXCancelButton( Window *p ) : VCLXIconButton( p, Button::GetStandardText( BUTTON_CANCEL ), -// : VCLXIconButton( xButton, rtl::OUString::createFromAscii( "~Cancel " ), - "res/commandimagelist/sc_cancel.png" ) +// : VCLXIconButton( xButton, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("~Cancel ")), + "cmd/sc_cancel.png" ) { } VCLXYesButton::VCLXYesButton( Window *p ) : VCLXIconButton( p, Button::GetStandardText( BUTTON_YES ), - "res/commandimagelist/sc_yes.png" ) + "cmd/sc_yes.png" ) { } VCLXNoButton::VCLXNoButton( Window *p ) : VCLXIconButton( p, Button::GetStandardText( BUTTON_NO ), - "res/commandimagelist/sc_no.png" ) + "cmd/sc_no.png" ) { } VCLXRetryButton::VCLXRetryButton( Window *p ) : VCLXIconButton( p, Button::GetStandardText( BUTTON_RETRY ), - "res/commandimagelist/sc_retry.png" ) + "cmd/sc_retry.png" ) { } VCLXIgnoreButton::VCLXIgnoreButton( Window *p ) : VCLXIconButton( p, Button::GetStandardText( BUTTON_IGNORE ), - "res/commandimagelist/sc_ignore.png" ) + "cmd/sc_ignore.png" ) { } VCLXResetButton::VCLXResetButton( Window *p ) - : VCLXIconButton( p, rtl::OUString::createFromAscii( "~Reset " ), - "res/commandimagelist/sc_reset.png" ) + : VCLXIconButton( p, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("~Reset ")), + "cmd/sc_reset.png" ) { } VCLXApplyButton::VCLXApplyButton( Window *p ) - : VCLXIconButton( p, rtl::OUString::createFromAscii( "Apply" ), - "res/commandimagelist/sc_apply.png" ) + : VCLXIconButton( p, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Apply")), + "cmd/sc_apply.png" ) { } VCLXHelpButton::VCLXHelpButton( Window *p ) : VCLXIconButton( p, Button::GetStandardText( BUTTON_HELP ), - "res/commandimagelist/sc_help.png" ) + "cmd/sc_help.png" ) { } VCLXMoreButton::VCLXMoreButton( Window *p ) : VCLXIconButton( p, Button::GetStandardText( BUTTON_MORE ), -// : VCLXIconButton( p, rtl::OUString::createFromAscii( "More " ), - "res/commandimagelist/sc_more.png" ) +// : VCLXIconButton( p, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("More ")), + "cmd/sc_more.png" ) { } VCLXAdvancedButton::VCLXAdvancedButton( Window *p ) // : VCLXIconButton( p, Button::GetStandardText( BUTTON_ADVANCED ), - : VCLXIconButton( p, rtl::OUString::createFromAscii( "Advanced " ), - "res/commandimagelist/sc_advanced.png" ) + : VCLXIconButton( p, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Advanced ")), + "cmd/sc_advanced.png" ) { } } // namespace layoutimpl + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/vclxbutton.hxx b/toolkit/source/awt/vclxbutton.hxx index 5ec29321cb4f..34ac8fe0b84b 100644 --- a/toolkit/source/awt/vclxbutton.hxx +++ b/toolkit/source/awt/vclxbutton.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -112,3 +113,5 @@ public: } // namespace layoutimpl #endif // LAYOUT_AWT_VCLXBUTTON_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/vclxcontainer.cxx b/toolkit/source/awt/vclxcontainer.cxx index d86b3bbb5591..a8cc0415e322 100644 --- a/toolkit/source/awt/vclxcontainer.cxx +++ b/toolkit/source/awt/vclxcontainer.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -36,6 +37,7 @@ #include <rtl/memory.h> #include <rtl/uuid.h> +#include <vcl/svapp.hxx> #include <vcl/window.hxx> #include <tools/debug.hxx> @@ -76,21 +78,21 @@ IMPL_XTYPEPROVIDER_END // ::com::sun::star::awt::XVclContainer void VCLXContainer::addVclContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XVclContainerListener >& rxListener ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; GetContainerListeners().addInterface( rxListener ); } void VCLXContainer::removeVclContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XVclContainerListener >& rxListener ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; GetContainerListeners().removeInterface( rxListener ); } ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > > VCLXContainer::getWindows( ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; // Bei allen Childs das Container-Interface abfragen... ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > > aSeq; @@ -118,7 +120,7 @@ void VCLXContainer::removeVclContainerListener( const ::com::sun::star::uno::Ref // ::com::sun::star::awt::XVclContainerPeer void VCLXContainer::enableDialogControl( sal_Bool bEnable ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Window* pWindow = GetWindow(); if ( pWindow ) @@ -134,7 +136,7 @@ void VCLXContainer::enableDialogControl( sal_Bool bEnable ) throw(::com::sun::st void VCLXContainer::setTabOrder( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > >& Components, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Tabs, sal_Bool bGroupControl ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; sal_uInt32 nCount = Components.getLength(); DBG_ASSERT( nCount == (sal_uInt32)Tabs.getLength(), "setTabOrder: TabCount != ComponentCount" ); @@ -179,7 +181,7 @@ void VCLXContainer::setTabOrder( const ::com::sun::star::uno::Sequence< ::com::s void VCLXContainer::setGroup( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > >& Components ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; sal_uInt32 nCount = Components.getLength(); const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > * pComps = Components.getConstArray(); @@ -233,7 +235,4 @@ void VCLXContainer::setGroup( const ::com::sun::star::uno::Sequence< ::com::sun: } } - - - - +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/vclxdevice.cxx b/toolkit/source/awt/vclxdevice.cxx index 310f01a97679..80cdc766e990 100644 --- a/toolkit/source/awt/vclxdevice.cxx +++ b/toolkit/source/awt/vclxdevice.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -52,7 +53,7 @@ // ---------------------------------------------------- // class VCLXDevice // ---------------------------------------------------- -VCLXDevice::VCLXDevice() : mrMutex( Application::GetSolarMutex() ) +VCLXDevice::VCLXDevice() { mpOutputDevice = NULL; nFlags = 0; @@ -111,7 +112,7 @@ IMPL_XTYPEPROVIDER_END // ::com::sun::star::awt::XDevice, ::com::sun::star::uno::Reference< ::com::sun::star::awt::XGraphics > VCLXDevice::createGraphics( ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::uno::Reference< ::com::sun::star::awt::XGraphics > xRef; @@ -123,7 +124,7 @@ IMPL_XTYPEPROVIDER_END ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice > VCLXDevice::createDevice( sal_Int32 nWidth, sal_Int32 nHeight ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice > xRef; if ( GetOutputDevice() ) @@ -139,7 +140,7 @@ IMPL_XTYPEPROVIDER_END ::com::sun::star::awt::DeviceInfo VCLXDevice::getInfo() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::awt::DeviceInfo aInfo; @@ -190,7 +191,7 @@ IMPL_XTYPEPROVIDER_END ::com::sun::star::uno::Sequence< ::com::sun::star::awt::FontDescriptor > VCLXDevice::getFontDescriptors( ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::uno::Sequence< ::com::sun::star::awt::FontDescriptor> aFonts; if( mpOutputDevice ) @@ -209,7 +210,7 @@ IMPL_XTYPEPROVIDER_END ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFont > VCLXDevice::getFont( const ::com::sun::star::awt::FontDescriptor& rDescriptor ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFont > xRef; if( mpOutputDevice ) @@ -223,7 +224,7 @@ IMPL_XTYPEPROVIDER_END ::com::sun::star::uno::Reference< ::com::sun::star::awt::XBitmap > VCLXDevice::createBitmap( sal_Int32 nX, sal_Int32 nY, sal_Int32 nWidth, sal_Int32 nHeight ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::uno::Reference< ::com::sun::star::awt::XBitmap > xBmp; if( mpOutputDevice ) @@ -239,7 +240,7 @@ IMPL_XTYPEPROVIDER_END ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDisplayBitmap > VCLXDevice::createDisplayBitmap( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XBitmap >& rxBitmap ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; BitmapEx aBmp = VCLUnoHelper::GetBitmap( rxBitmap ); VCLXBitmap* pBmp = new VCLXBitmap; @@ -251,41 +252,20 @@ IMPL_XTYPEPROVIDER_END VCLXVirtualDevice::~VCLXVirtualDevice() { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; DestroyOutputDevice(); } // ----------------------------------------------------------------------------- -// ::com::sun::star::awt::XTextConstraints -// ----------------------------------------------------------------------------- -// ::sal_Int32 SAL_CALL VCLXDevice::getTextWidth( const ::rtl::OUString& Text ) throw (::com::sun::star::uno::RuntimeException) -// { -// ::vos::OGuard aGuard( GetMutex() ); -// if (Text.getLength() == 0) -// { -// return 0; -// } -// -// return 1; -// } -// -// ::sal_Int32 SAL_CALL VCLXDevice::getTextHeight( ) throw (::com::sun::star::uno::RuntimeException) -// { -// ::vos::OGuard aGuard( GetMutex() ); -// return 1; -// } - - -// ----------------------------------------------------------------------------- // Interface implementation of ::com::sun::star::awt::XUnitConversion // ----------------------------------------------------------------------------- ::com::sun::star::awt::Point SAL_CALL VCLXDevice::convertPointToLogic( const ::com::sun::star::awt::Point& aPoint, ::sal_Int16 TargetUnit ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException) { (void)aPoint; - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if (TargetUnit == com::sun::star::util::MeasureUnit::PERCENT ) { // percentage not allowed here @@ -310,7 +290,7 @@ VCLXVirtualDevice::~VCLXVirtualDevice() ::com::sun::star::awt::Point SAL_CALL VCLXDevice::convertPointToPixel( const ::com::sun::star::awt::Point& aPoint, ::sal_Int16 SourceUnit ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException) { (void)aPoint; - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if (SourceUnit == com::sun::star::util::MeasureUnit::PERCENT || SourceUnit == com::sun::star::util::MeasureUnit::PIXEL ) { @@ -334,7 +314,7 @@ VCLXVirtualDevice::~VCLXVirtualDevice() ::com::sun::star::awt::Size SAL_CALL VCLXDevice::convertSizeToLogic( const ::com::sun::star::awt::Size& aSize, ::sal_Int16 TargetUnit ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException) { (void)aSize; - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if (TargetUnit == com::sun::star::util::MeasureUnit::PERCENT) { // percentage not allowed here @@ -359,7 +339,7 @@ VCLXVirtualDevice::~VCLXVirtualDevice() ::com::sun::star::awt::Size SAL_CALL VCLXDevice::convertSizeToPixel( const ::com::sun::star::awt::Size& aSize, ::sal_Int16 SourceUnit ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException) { (void)aSize; - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if (SourceUnit == com::sun::star::util::MeasureUnit::PERCENT || SourceUnit == com::sun::star::util::MeasureUnit::PIXEL) { @@ -380,3 +360,4 @@ VCLXVirtualDevice::~VCLXVirtualDevice() return aAWTSize; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/vclxdialog.cxx b/toolkit/source/awt/vclxdialog.cxx index 70ebade69ddc..3d301e362b9c 100644 --- a/toolkit/source/awt/vclxdialog.cxx +++ b/toolkit/source/awt/vclxdialog.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -25,6 +26,7 @@ * ************************************************************************/ +#include <boost/ptr_container/ptr_vector.hpp> #include "vclxdialog.hxx" #include <com/sun/star/awt/PosSize.hpp> @@ -37,11 +39,7 @@ #include <toolkit/helper/macros.hxx> #include <toolkit/helper/property.hxx> -#ifdef WNT -#include <tools/prewin.h> -#include <windows.h> -#include <tools/postwin.h> -#elif defined ( QUARTZ ) +#ifdef QUARTZ #include "premac.h" #include <Cocoa/Cocoa.h> #include "postmac.h" @@ -79,11 +77,6 @@ VCLXDialog::~VCLXDialog() DBG_DTOR( VCLXDialog, NULL ); } -vos::IMutex& VCLXDialog::GetMutexImpl() -{ - return VCLXWindow::GetMutex(); -} - Window* VCLXDialog::GetWindowImpl() { return VCLXWindow::GetWindow(); @@ -101,7 +94,7 @@ IMPLEMENT_FORWARD_XTYPEPROVIDER2( VCLXDialog, VCLXWindow, VCLXDialog_Base ); void SAL_CALL VCLXDialog::dispose() throw(::com::sun::star::uno::RuntimeException) { { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::lang::EventObject aDisposeEvent; aDisposeEvent.Source = W3K_EXPLICIT_CAST (*this); @@ -146,7 +139,7 @@ void SAL_CALL VCLXDialog::allocateArea( const css::awt::Rectangle &rArea ) void VCLXDialog::ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent ) { - ::vos::OClearableGuard aGuard( GetMutex() ); + SolarMutexClearableGuard aGuard; switch ( _rVclWindowEvent.GetId() ) { @@ -161,7 +154,7 @@ void VCLXDialog::ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent ) void SAL_CALL VCLXDialog::setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any &Value ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if ( GetWindow() ) { @@ -178,7 +171,7 @@ void SAL_CALL VCLXDialog::setProperty( const ::rtl::OUString& PropertyName, cons ::com::sun::star::uno::Any SAL_CALL VCLXDialog::getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::uno::Any aReturn; if ( GetWindow() ) @@ -199,7 +192,7 @@ void SAL_CALL VCLXDialog::setProperty( const ::rtl::OUString& PropertyName, cons void VCLXDialog::setTitle( const ::rtl::OUString& Title ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Window* pWindow = GetWindow(); if ( pWindow ) @@ -208,7 +201,7 @@ void VCLXDialog::setTitle( const ::rtl::OUString& Title ) throw(::com::sun::star void VCLXDialog::setHelpId( const rtl::OUString& rId ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Window* pWindow = GetWindow(); if ( pWindow ) @@ -217,7 +210,7 @@ void VCLXDialog::setHelpId( const rtl::OUString& rId ) throw(::com::sun::star::u ::rtl::OUString VCLXDialog::getTitle() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::rtl::OUString aTitle; Window* pWindow = GetWindow(); @@ -228,7 +221,7 @@ void VCLXDialog::setHelpId( const rtl::OUString& rId ) throw(::com::sun::star::u sal_Int16 VCLXDialog::execute() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; sal_Int16 nRet = 0; if ( GetWindow() ) @@ -252,7 +245,7 @@ sal_Int16 VCLXDialog::execute() throw(::com::sun::star::uno::RuntimeException) void VCLXDialog::endDialog( sal_Int32 nResult ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if ( nResult == BUTTONID_HELP ) { @@ -277,3 +270,5 @@ void VCLXDialog::endExecute() throw(::com::sun::star::uno::RuntimeException) } } // namespace layoutimpl + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/vclxdialog.hxx b/toolkit/source/awt/vclxdialog.hxx index 9d52064c68bf..785f6b3b7e48 100644 --- a/toolkit/source/awt/vclxdialog.hxx +++ b/toolkit/source/awt/vclxdialog.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -53,7 +54,6 @@ private: VCLXDialog& operator=( const VCLXDialog& ); // never implemented protected: - vos::IMutex& GetMutexImpl(); Window* GetWindowImpl(); ::cppu::OInterfaceContainerHelper& GetTopWindowListenersImpl(); @@ -105,3 +105,5 @@ public: } // namespace layoutimpl #endif /* LAYOUT_AWT_VCLXDIALOG_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/vclxfixedline.cxx b/toolkit/source/awt/vclxfixedline.cxx index 8c77a4f35e19..1d51defe2d7d 100644 --- a/toolkit/source/awt/vclxfixedline.cxx +++ b/toolkit/source/awt/vclxfixedline.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -32,6 +33,7 @@ #include <toolkit/helper/vclunohelper.hxx> #include <tools/debug.hxx> #include <vcl/fixed.hxx> +#include <vcl/svapp.hxx> #include "forward.hxx" @@ -62,7 +64,7 @@ IMPLEMENT_FORWARD_XTYPEPROVIDER1( VCLXFixedLine, VCLXWindow ); void SAL_CALL VCLXFixedLine::dispose() throw(RuntimeException) { { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; EventObject aDisposeEvent; aDisposeEvent.Source = W3K_EXPLICIT_CAST (*this); @@ -79,23 +81,14 @@ void SAL_CALL VCLXFixedLine::dispose() throw(RuntimeException) void VCLXFixedLine::ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent ) { - ::vos::OClearableGuard aGuard( GetMutex() ); -/* - switch ( _rVclWindowEvent.GetId() ) - { - default: - aGuard.clear(); -*/ - VCLXWindow::ProcessWindowEvent( _rVclWindowEvent ); -/* - break; - } -*/ + SolarMutexGuard aGuard; + + VCLXWindow::ProcessWindowEvent( _rVclWindowEvent ); } void SAL_CALL VCLXFixedLine::setProperty( const ::rtl::OUString& PropertyName, const Any &Value ) throw(RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if ( GetWindow() ) { @@ -112,7 +105,7 @@ void SAL_CALL VCLXFixedLine::setProperty( const ::rtl::OUString& PropertyName, c Any SAL_CALL VCLXFixedLine::getProperty( const ::rtl::OUString& PropertyName ) throw(RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Any aReturn; if ( GetWindow() ) @@ -130,3 +123,5 @@ Any SAL_CALL VCLXFixedLine::getProperty( const ::rtl::OUString& PropertyName ) t } } // namespace layoutimpl + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/vclxfixedline.hxx b/toolkit/source/awt/vclxfixedline.hxx index d7dfd76d961f..8bd26f5ecc0b 100644 --- a/toolkit/source/awt/vclxfixedline.hxx +++ b/toolkit/source/awt/vclxfixedline.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -73,3 +74,5 @@ private: } // namespace layoutimpl #endif /* LAYOUT_AWT_VCLXFIXEDLINE_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/vclxfont.cxx b/toolkit/source/awt/vclxfont.cxx index 9d46107d8522..28224c30232d 100644 --- a/toolkit/source/awt/vclxfont.cxx +++ b/toolkit/source/awt/vclxfont.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -250,3 +251,5 @@ sal_Bool VCLXFont::hasGlyphs( const ::rtl::OUString& aText ) return sal_False; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/vclxgraphics.cxx b/toolkit/source/awt/vclxgraphics.cxx index edaf64799d43..dc2c84702664 100644 --- a/toolkit/source/awt/vclxgraphics.cxx +++ b/toolkit/source/awt/vclxgraphics.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -64,7 +65,7 @@ IMPL_XTYPEPROVIDER_START( VCLXGraphics ) getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XGraphics>* ) NULL ) IMPL_XTYPEPROVIDER_END -VCLXGraphics::VCLXGraphics() : mrMutex( Application::GetSolarMutex() ) +VCLXGraphics::VCLXGraphics() { mpOutputDevice = NULL; mpClipRegion = NULL; @@ -109,7 +110,7 @@ void VCLXGraphics::InitOutputDevice( sal_uInt16 nFlags ) { if(mpOutputDevice) { - vos::OGuard aVclGuard( Application::GetSolarMutex() ); + SolarMutexGuard aVclGuard; if ( nFlags & INITOUTDEV_FONT ) { @@ -141,7 +142,7 @@ void VCLXGraphics::InitOutputDevice( sal_uInt16 nFlags ) ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice > VCLXGraphics::getDevice() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if( !mxDevice.is() && mpOutputDevice ) { @@ -154,7 +155,7 @@ void VCLXGraphics::InitOutputDevice( sal_uInt16 nFlags ) ::com::sun::star::awt::SimpleFontMetric VCLXGraphics::getFontMetric() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::awt::SimpleFontMetric aM; if( mpOutputDevice ) @@ -167,56 +168,56 @@ void VCLXGraphics::InitOutputDevice( sal_uInt16 nFlags ) void VCLXGraphics::setFont( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFont >& rxFont ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; maFont = VCLUnoHelper::CreateFont( rxFont ); } void VCLXGraphics::selectFont( const ::com::sun::star::awt::FontDescriptor& rDescription ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; maFont = VCLUnoHelper::CreateFont( rDescription, Font() ); } void VCLXGraphics::setTextColor( sal_Int32 nColor ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; maTextColor = Color( (sal_uInt32)nColor ); } void VCLXGraphics::setTextFillColor( sal_Int32 nColor ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; maTextFillColor = Color( (sal_uInt32)nColor ); } void VCLXGraphics::setLineColor( sal_Int32 nColor ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; maLineColor = Color( (sal_uInt32)nColor ); } void VCLXGraphics::setFillColor( sal_Int32 nColor ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; maFillColor = Color( (sal_uInt32)nColor ); } void VCLXGraphics::setRasterOp( ::com::sun::star::awt::RasterOperation eROP ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; meRasterOp = (RasterOp)eROP; } void VCLXGraphics::setClipRegion( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XRegion >& rxRegion ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; delete mpClipRegion; if ( rxRegion.is() ) @@ -227,7 +228,7 @@ void VCLXGraphics::setClipRegion( const ::com::sun::star::uno::Reference< ::com: void VCLXGraphics::intersectClipRegion( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XRegion >& rxRegion ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if ( rxRegion.is() ) { @@ -241,7 +242,7 @@ void VCLXGraphics::intersectClipRegion( const ::com::sun::star::uno::Reference< void VCLXGraphics::push( ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if( mpOutputDevice ) @@ -250,7 +251,7 @@ void VCLXGraphics::push( ) throw(::com::sun::star::uno::RuntimeException) void VCLXGraphics::pop( ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if( mpOutputDevice ) @@ -259,7 +260,7 @@ void VCLXGraphics::pop( ) throw(::com::sun::star::uno::RuntimeException) void VCLXGraphics::copy( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice >& rxSource, sal_Int32 nSourceX, sal_Int32 nSourceY, sal_Int32 nSourceWidth, sal_Int32 nSourceHeight, sal_Int32 nDestX, sal_Int32 nDestY, sal_Int32 nDestWidth, sal_Int32 nDestHeight ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if ( mpOutputDevice ) { @@ -276,7 +277,7 @@ void VCLXGraphics::copy( const ::com::sun::star::uno::Reference< ::com::sun::sta void VCLXGraphics::draw( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDisplayBitmap >& rxBitmapHandle, sal_Int32 nSourceX, sal_Int32 nSourceY, sal_Int32 nSourceWidth, sal_Int32 nSourceHeight, sal_Int32 nDestX, sal_Int32 nDestY, sal_Int32 nDestWidth, sal_Int32 nDestHeight ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if( mpOutputDevice ) { @@ -308,7 +309,7 @@ void VCLXGraphics::draw( const ::com::sun::star::uno::Reference< ::com::sun::sta void VCLXGraphics::drawPixel( sal_Int32 x, sal_Int32 y ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if( mpOutputDevice ) { @@ -319,7 +320,7 @@ void VCLXGraphics::drawPixel( sal_Int32 x, sal_Int32 y ) throw(::com::sun::star: void VCLXGraphics::drawLine( sal_Int32 x1, sal_Int32 y1, sal_Int32 x2, sal_Int32 y2 ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if( mpOutputDevice ) { @@ -330,7 +331,7 @@ void VCLXGraphics::drawLine( sal_Int32 x1, sal_Int32 y1, sal_Int32 x2, sal_Int32 void VCLXGraphics::drawRect( sal_Int32 x, sal_Int32 y, sal_Int32 width, sal_Int32 height ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if( mpOutputDevice ) { @@ -341,7 +342,7 @@ void VCLXGraphics::drawRect( sal_Int32 x, sal_Int32 y, sal_Int32 width, sal_Int3 void VCLXGraphics::drawRoundedRect( sal_Int32 x, sal_Int32 y, sal_Int32 width, sal_Int32 height, sal_Int32 nHorzRound, sal_Int32 nVertRound ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if( mpOutputDevice ) { @@ -352,7 +353,7 @@ void VCLXGraphics::drawRoundedRect( sal_Int32 x, sal_Int32 y, sal_Int32 width, s void VCLXGraphics::drawPolyLine( const ::com::sun::star::uno::Sequence< sal_Int32 >& DataX, const ::com::sun::star::uno::Sequence< sal_Int32 >& DataY ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if( mpOutputDevice ) { @@ -363,7 +364,7 @@ void VCLXGraphics::drawPolyLine( const ::com::sun::star::uno::Sequence< sal_Int3 void VCLXGraphics::drawPolygon( const ::com::sun::star::uno::Sequence< sal_Int32 >& DataX, const ::com::sun::star::uno::Sequence< sal_Int32 >& DataY ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if( mpOutputDevice ) { @@ -374,7 +375,7 @@ void VCLXGraphics::drawPolygon( const ::com::sun::star::uno::Sequence< sal_Int32 void VCLXGraphics::drawPolyPolygon( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< sal_Int32 > >& DataX, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< sal_Int32 > >& DataY ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if( mpOutputDevice ) { @@ -390,7 +391,7 @@ void VCLXGraphics::drawPolyPolygon( const ::com::sun::star::uno::Sequence< ::com void VCLXGraphics::drawEllipse( sal_Int32 x, sal_Int32 y, sal_Int32 width, sal_Int32 height ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if( mpOutputDevice ) { @@ -401,7 +402,7 @@ void VCLXGraphics::drawEllipse( sal_Int32 x, sal_Int32 y, sal_Int32 width, sal_I void VCLXGraphics::drawArc( sal_Int32 x, sal_Int32 y, sal_Int32 width, sal_Int32 height, sal_Int32 x1, sal_Int32 y1, sal_Int32 x2, sal_Int32 y2 ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if( mpOutputDevice ) { @@ -412,7 +413,7 @@ void VCLXGraphics::drawArc( sal_Int32 x, sal_Int32 y, sal_Int32 width, sal_Int32 void VCLXGraphics::drawPie( sal_Int32 x, sal_Int32 y, sal_Int32 width, sal_Int32 height, sal_Int32 x1, sal_Int32 y1, sal_Int32 x2, sal_Int32 y2 ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if( mpOutputDevice ) { @@ -423,7 +424,7 @@ void VCLXGraphics::drawPie( sal_Int32 x, sal_Int32 y, sal_Int32 width, sal_Int32 void VCLXGraphics::drawChord( sal_Int32 x, sal_Int32 y, sal_Int32 width, sal_Int32 height, sal_Int32 x1, sal_Int32 y1, sal_Int32 x2, sal_Int32 y2 ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if( mpOutputDevice ) { @@ -434,7 +435,7 @@ void VCLXGraphics::drawChord( sal_Int32 x, sal_Int32 y, sal_Int32 width, sal_Int void VCLXGraphics::drawGradient( sal_Int32 x, sal_Int32 y, sal_Int32 width, sal_Int32 height, const ::com::sun::star::awt::Gradient& rGradient ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if( mpOutputDevice ) { @@ -453,7 +454,7 @@ void VCLXGraphics::drawGradient( sal_Int32 x, sal_Int32 y, sal_Int32 width, sal_ void VCLXGraphics::drawText( sal_Int32 x, sal_Int32 y, const ::rtl::OUString& rText ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if( mpOutputDevice ) { @@ -464,7 +465,7 @@ void VCLXGraphics::drawText( sal_Int32 x, sal_Int32 y, const ::rtl::OUString& rT void VCLXGraphics::drawTextArray( sal_Int32 x, sal_Int32 y, const ::rtl::OUString& rText, const ::com::sun::star::uno::Sequence< sal_Int32 >& rLongs ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if( mpOutputDevice ) { @@ -476,3 +477,4 @@ void VCLXGraphics::drawTextArray( sal_Int32 x, sal_Int32 y, const ::rtl::OUStrin +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/vclxmenu.cxx b/toolkit/source/awt/vclxmenu.cxx index 817899cdcd35..919986fa49f6 100644 --- a/toolkit/source/awt/vclxmenu.cxx +++ b/toolkit/source/awt/vclxmenu.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -37,7 +38,7 @@ #include <cppuhelper/typeprovider.hxx> #include <rtl/memory.h> #include <rtl/uuid.h> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <vcl/menu.hxx> #include <vcl/keycod.hxx> @@ -97,10 +98,8 @@ VCLXMenu::VCLXMenu( Menu* pMenu ) : maMenuListeners( *this ) VCLXMenu::~VCLXMenu() { DBG_DTOR( VCLXMenu, 0 ); - for ( sal_uInt32 n = maPopupMenueRefs.Count(); n; ) - { - ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu > * pRef = maPopupMenueRefs.GetObject( --n ); - delete pRef; + for ( size_t n = maPopupMenueRefs.size(); n; ) { + delete maPopupMenueRefs[ --n ]; } if ( mpMenu ) { @@ -204,7 +203,7 @@ IMPL_LINK( VCLXMenu, MenuEventListener, VclSimpleEvent*, pEvent ) case VCLEVENT_MENU_HIDE: break; - default: DBG_ERROR( "MenuEventListener - Unknown event!" ); + default: OSL_FAIL( "MenuEventListener - Unknown event!" ); } } } @@ -418,7 +417,7 @@ void VCLXMenu::removeMenuListener( const ::com::sun::star::uno::Reference< ::com void VCLXMenu::insertItem( sal_Int16 nItemId, const ::rtl::OUString& aText, sal_Int16 nItemStyle, sal_Int16 nPos ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); if ( mpMenu ) @@ -427,7 +426,7 @@ void VCLXMenu::insertItem( sal_Int16 nItemId, const ::rtl::OUString& aText, sal_ void VCLXMenu::removeItem( sal_Int16 nPos, sal_Int16 nCount ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); sal_Int32 nItemCount = (sal_Int32)mpMenu->GetItemCount(); @@ -442,7 +441,7 @@ void VCLXMenu::removeItem( sal_Int16 nPos, sal_Int16 nCount ) throw(::com::sun:: sal_Int16 VCLXMenu::getItemCount( ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); return mpMenu ? mpMenu->GetItemCount() : 0; @@ -450,7 +449,7 @@ sal_Int16 VCLXMenu::getItemCount( ) throw(::com::sun::star::uno::RuntimeExcepti sal_Int16 VCLXMenu::getItemId( sal_Int16 nPos ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); return mpMenu ? mpMenu->GetItemId( nPos ) : 0; @@ -458,7 +457,7 @@ sal_Int16 VCLXMenu::getItemId( sal_Int16 nPos ) throw(::com::sun::star::uno::Run sal_Int16 VCLXMenu::getItemPos( sal_Int16 nId ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); return mpMenu ? mpMenu->GetItemPos( nId ) : 0; @@ -466,7 +465,7 @@ sal_Int16 VCLXMenu::getItemPos( sal_Int16 nId ) throw(::com::sun::star::uno::Run void VCLXMenu::enableItem( sal_Int16 nItemId, sal_Bool bEnable ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); if ( mpMenu ) @@ -475,7 +474,7 @@ void VCLXMenu::enableItem( sal_Int16 nItemId, sal_Bool bEnable ) throw(::com::su sal_Bool VCLXMenu::isItemEnabled( sal_Int16 nItemId ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); return mpMenu ? mpMenu->IsItemEnabled( nItemId ) : sal_False; @@ -483,7 +482,7 @@ sal_Bool VCLXMenu::isItemEnabled( sal_Int16 nItemId ) throw(::com::sun::star::un void VCLXMenu::setItemText( sal_Int16 nItemId, const ::rtl::OUString& aText ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); if ( mpMenu ) @@ -492,7 +491,7 @@ void VCLXMenu::setItemText( sal_Int16 nItemId, const ::rtl::OUString& aText ) th ::rtl::OUString VCLXMenu::getItemText( sal_Int16 nItemId ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); ::rtl::OUString aItemText; @@ -503,7 +502,7 @@ void VCLXMenu::setItemText( sal_Int16 nItemId, const ::rtl::OUString& aText ) th void VCLXMenu::setPopupMenu( sal_Int16 nItemId, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu >& rxPopupMenu ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); VCLXMenu* pVCLMenu = VCLXMenu::GetImplementation( rxPopupMenu ); @@ -514,7 +513,7 @@ void VCLXMenu::setPopupMenu( sal_Int16 nItemId, const ::com::sun::star::uno::Ref // Selbst eine Ref halten! ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu > * pNewRef = new ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu > ; *pNewRef = rxPopupMenu; - maPopupMenueRefs.Insert( pNewRef, LIST_APPEND ); + maPopupMenueRefs.push_back( pNewRef ); mpMenu->SetPopupMenu( nItemId, (PopupMenu*) pVCLMenu->GetMenu() ); } @@ -522,16 +521,16 @@ void VCLXMenu::setPopupMenu( sal_Int16 nItemId, const ::com::sun::star::uno::Ref ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu > VCLXMenu::getPopupMenu( sal_Int16 nItemId ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu > aRef; Menu* pMenu = mpMenu ? mpMenu->GetPopupMenu( nItemId ) : NULL; if ( pMenu ) { - for ( sal_uInt32 n = maPopupMenueRefs.Count(); n; ) + for ( size_t n = maPopupMenueRefs.size(); n; ) { - ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu > * pRef = maPopupMenueRefs.GetObject( --n ); + ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu > * pRef = maPopupMenueRefs[ --n ]; Menu* pM = ((VCLXMenu*)pRef->get())->GetMenu(); if ( pM == pMenu ) { @@ -539,6 +538,14 @@ void VCLXMenu::setPopupMenu( sal_Int16 nItemId, const ::com::sun::star::uno::Ref break; } } + // it seems the popup menu is not insert into maPopupMenueRefs + // if the popup men is not created by stardiv.Toolkit.VCLXPopupMenu + if( !aRef.is() ) + { + ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu > * pNewRef = new ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu > ; + *pNewRef = new VCLXPopupMenu( (PopupMenu*)pMenu ); + aRef = *pNewRef; + } } return aRef; } @@ -546,7 +553,7 @@ void VCLXMenu::setPopupMenu( sal_Int16 nItemId, const ::com::sun::star::uno::Ref // ::com::sun::star::awt::XPopupMenu void VCLXMenu::insertSeparator( sal_Int16 nPos ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); if ( mpMenu ) @@ -555,7 +562,7 @@ void VCLXMenu::insertSeparator( sal_Int16 nPos ) throw(::com::sun::star::uno::Ru void VCLXMenu::setDefaultItem( sal_Int16 nItemId ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); if ( mpMenu ) @@ -564,7 +571,7 @@ void VCLXMenu::setDefaultItem( sal_Int16 nItemId ) throw(::com::sun::star::uno:: sal_Int16 VCLXMenu::getDefaultItem( ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); return mpMenu ? mpMenu->GetDefaultItem() : 0; @@ -572,7 +579,7 @@ sal_Int16 VCLXMenu::getDefaultItem( ) throw(::com::sun::star::uno::RuntimeExcep void VCLXMenu::checkItem( sal_Int16 nItemId, sal_Bool bCheck ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); if ( mpMenu ) @@ -581,7 +588,7 @@ void VCLXMenu::checkItem( sal_Int16 nItemId, sal_Bool bCheck ) throw(::com::sun: sal_Bool VCLXMenu::isItemChecked( sal_Int16 nItemId ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); return mpMenu ? mpMenu->IsItemChecked( nItemId ) : sal_False; @@ -589,7 +596,7 @@ sal_Bool VCLXMenu::isItemChecked( sal_Int16 nItemId ) throw(::com::sun::star::un sal_Int16 VCLXMenu::execute( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& rxWindowPeer, const ::com::sun::star::awt::Rectangle& rArea, sal_Int16 nFlags ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); sal_Int16 nRet = 0; @@ -601,7 +608,7 @@ sal_Int16 VCLXMenu::execute( const ::com::sun::star::uno::Reference< ::com::sun: void SAL_CALL VCLXMenu::setCommand( sal_Int16 nItemId, const ::rtl::OUString& aCommand ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); if ( mpMenu ) @@ -610,7 +617,7 @@ void SAL_CALL VCLXMenu::setCommand( sal_Int16 nItemId, const ::rtl::OUString& aC ::rtl::OUString SAL_CALL VCLXMenu::getCommand( sal_Int16 nItemId ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); ::rtl::OUString aItemCommand; @@ -621,7 +628,7 @@ void SAL_CALL VCLXMenu::setCommand( sal_Int16 nItemId, const ::rtl::OUString& aC void SAL_CALL VCLXMenu::setHelpCommand( sal_Int16 nItemId, const ::rtl::OUString& aHelp ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); if ( mpMenu ) @@ -630,7 +637,7 @@ void SAL_CALL VCLXMenu::setHelpCommand( sal_Int16 nItemId, const ::rtl::OUString ::rtl::OUString SAL_CALL VCLXMenu::getHelpCommand( sal_Int16 nItemId ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); ::rtl::OUString aHelpCommand; @@ -731,14 +738,14 @@ namespace ::sal_Bool SAL_CALL VCLXMenu::isPopupMenu( ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); return IsPopupMenu(); } void SAL_CALL VCLXMenu::clear( ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); if ( mpMenu ) mpMenu->Clear(); @@ -749,7 +756,7 @@ void SAL_CALL VCLXMenu::clear( ) throw (::com::sun::star::uno::RuntimeException throw ( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); ::com::sun::star::awt::MenuItemType aMenuItemType = @@ -766,7 +773,7 @@ throw ( ::com::sun::star::container::NoSuchElementException, void SAL_CALL VCLXMenu::hideDisabledEntries( ::sal_Bool bHide ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); if ( mpMenu ) { @@ -788,7 +795,7 @@ throw (::com::sun::star::uno::RuntimeException) ::sal_Bool SAL_CALL VCLXMenu::isInExecute( ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); if ( mpMenu && IsPopupMenu() ) @@ -801,7 +808,7 @@ throw (::com::sun::star::uno::RuntimeException) void SAL_CALL VCLXMenu::endExecute() throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); if ( mpMenu && IsPopupMenu() ) @@ -812,7 +819,7 @@ throw (::com::sun::star::uno::RuntimeException) void SAL_CALL VCLXMenu::setLogo( const ::com::sun::star::awt::MenuLogo& aMenuLogo ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); if ( mpMenu ) @@ -837,7 +844,7 @@ throw (::com::sun::star::uno::RuntimeException) ::com::sun::star::awt::MenuLogo SAL_CALL VCLXMenu::getLogo( ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); ::com::sun::star::awt::MenuLogo aAWTMenuLogo; @@ -858,7 +865,7 @@ throw (::com::sun::star::uno::RuntimeException) void SAL_CALL VCLXMenu::enableAutoMnemonics( ::sal_Bool bEnable ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); if ( mpMenu ) { @@ -875,7 +882,7 @@ void SAL_CALL VCLXMenu::setAcceleratorKeyEvent( ::sal_Int16 nItemId, throw ( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); if ( mpMenu && IsPopupMenu() ) @@ -891,7 +898,7 @@ throw ( ::com::sun::star::container::NoSuchElementException, throw ( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); ::com::sun::star::awt::KeyEvent aKeyEvent; @@ -910,7 +917,7 @@ void SAL_CALL VCLXMenu::setHelpText( ::sal_Int16 nItemId, const ::rtl::OUString& throw ( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); if ( mpMenu && IsPopupMenu() ) @@ -925,7 +932,7 @@ throw ( ::com::sun::star::container::NoSuchElementException, throw ( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); rtl::OUString sHelpText; @@ -943,7 +950,7 @@ void SAL_CALL VCLXMenu::setTipHelpText( ::sal_Int16 nItemId, const ::rtl::OUStri throw ( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); if ( mpMenu && IsPopupMenu() ) @@ -958,7 +965,7 @@ throw ( ::com::sun::star::container::NoSuchElementException, throw ( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); rtl::OUString sTipHelpText; @@ -977,7 +984,7 @@ void SAL_CALL VCLXMenu::setItemImage( throw ( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); if ( mpMenu && IsPopupMenu() ) @@ -993,7 +1000,7 @@ throw ( ::com::sun::star::container::NoSuchElementException, throw ( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > rxGraphic; @@ -1013,7 +1020,7 @@ void SAL_CALL VCLXMenu::setItemImageAngle( ::sal_Int16 nItemId, ::sal_Int32 nAng throw ( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); if ( mpMenu && IsPopupMenu() ) @@ -1028,7 +1035,7 @@ throw ( ::com::sun::star::container::NoSuchElementException, throw ( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); ::sal_Int32 nItemImageAngle( 0 ); @@ -1045,7 +1052,7 @@ void SAL_CALL VCLXMenu::setItemImageMirrorMode( ::sal_Int16 nItemId, ::sal_Bool throw ( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); if ( mpMenu && IsPopupMenu() ) @@ -1060,7 +1067,7 @@ throw ( ::com::sun::star::container::NoSuchElementException, throw ( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); sal_Bool bMirrorMode( sal_False ); @@ -1101,3 +1108,10 @@ VCLXPopupMenu::VCLXPopupMenu() DBG_CTOR( VCLXPopupMenu, 0 ); ImplCreateMenu( sal_True ); } + +VCLXPopupMenu::VCLXPopupMenu( PopupMenu* pPopMenu ) : VCLXMenu( (Menu *)pPopMenu ) +{ + DBG_CTOR( VCLXPopupMenu, 0 ); +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/vclxplugin.cxx b/toolkit/source/awt/vclxplugin.cxx index 29264ef0a85d..93b1a9db6830 100644 --- a/toolkit/source/awt/vclxplugin.cxx +++ b/toolkit/source/awt/vclxplugin.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -31,6 +32,7 @@ #include <toolkit/helper/convert.hxx> #include <toolkit/helper/property.hxx> #include <vcl/ctrl.hxx> +#include <vcl/svapp.hxx> #include "forward.hxx" @@ -54,7 +56,7 @@ VCLXPlugin::~VCLXPlugin() void SAL_CALL VCLXPlugin::dispose() throw(uno::RuntimeException) { { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; lang::EventObject aDisposeEvent; aDisposeEvent.Source = W3K_EXPLICIT_CAST (*this); @@ -71,10 +73,12 @@ void VCLXPlugin::SetPlugin( ::Control *p ) awt::Size SAL_CALL VCLXPlugin::getMinimumSize() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OClearableGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if ( mpPlugin ) return AWTSize( mpPlugin->GetSizePixel() ); return awt::Size(); } } // namespace layoutimpl + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/vclxplugin.hxx b/toolkit/source/awt/vclxplugin.hxx index 2b42eecc5872..458fef360d57 100644 --- a/toolkit/source/awt/vclxplugin.hxx +++ b/toolkit/source/awt/vclxplugin.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -65,3 +66,5 @@ private: } // namespace layoutimpl #endif /* LAYOUT_AWT_VCLXPLUGIN_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/vclxpointer.cxx b/toolkit/source/awt/vclxpointer.cxx index d6f2160fb694..6f0d0a8af449 100644 --- a/toolkit/source/awt/vclxpointer.cxx +++ b/toolkit/source/awt/vclxpointer.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -78,3 +79,4 @@ sal_Int32 VCLXPointer::getType() throw(::com::sun::star::uno::RuntimeException) +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/vclxprinter.cxx b/toolkit/source/awt/vclxprinter.cxx index 3c100c7c2186..831a9d07506a 100644 --- a/toolkit/source/awt/vclxprinter.cxx +++ b/toolkit/source/awt/vclxprinter.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -57,13 +58,13 @@ static sal_uInt16 nElements = 0; if( !pProperties ) { - ::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() ); + ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); if( !pProperties ) { - static ::com::sun::star::beans::Property __FAR_DATA aPropTable[] = + static ::com::sun::star::beans::Property aPropTable[] = { - ::com::sun::star::beans::Property( ::rtl::OUString::createFromAscii( "Orientation" ), PROPERTY_Orientation, ::getCppuType((const sal_Int16*)0), 0 ), - ::com::sun::star::beans::Property( ::rtl::OUString::createFromAscii( "Horizontal" ), PROPERTY_Horizontal, ::getBooleanCppuType(), 0 ) + ::com::sun::star::beans::Property( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Orientation")), PROPERTY_Orientation, ::getCppuType((const sal_Int16*)0), 0 ), + ::com::sun::star::beans::Property( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Horizontal")), PROPERTY_Horizontal, ::getBooleanCppuType(), 0 ) }; pProperties = aPropTable; nElements = sizeof( aPropTable ) / sizeof( ::com::sun::star::beans::Property ); @@ -101,7 +102,7 @@ VCLXPrinterPropertySet::VCLXPrinterPropertySet( const String& rPrinterName ) : OPropertySetHelper( BrdcstHelper ) , mpPrinter( new Printer( rPrinterName ) ) { - osl::Guard< vos::IMutex > aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; mnOrientation = 0; mbHorizontal = sal_False; @@ -109,7 +110,7 @@ VCLXPrinterPropertySet::VCLXPrinterPropertySet( const String& rPrinterName ) VCLXPrinterPropertySet::~VCLXPrinterPropertySet() { - osl::Guard< vos::IMutex > aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; mpPrinter.reset(); } @@ -135,7 +136,7 @@ VCLXPrinterPropertySet::~VCLXPrinterPropertySet() static ::cppu::OPropertyArrayHelper* pPropertyArrayHelper = NULL; if ( !pPropertyArrayHelper ) { - ::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() ); + ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); if( !pPropertyArrayHelper ) { sal_uInt16 nElements; @@ -148,7 +149,7 @@ VCLXPrinterPropertySet::~VCLXPrinterPropertySet() sal_Bool VCLXPrinterPropertySet::convertFastPropertyValue( ::com::sun::star::uno::Any & rConvertedValue, ::com::sun::star::uno::Any & rOldValue, sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::lang::IllegalArgumentException) { - ::osl::Guard< ::osl::Mutex > aGuard( Mutex ); + ::osl::MutexGuard aGuard( Mutex ); sal_Bool bDifferent = sal_False; switch ( nHandle ) @@ -177,7 +178,7 @@ sal_Bool VCLXPrinterPropertySet::convertFastPropertyValue( ::com::sun::star::uno break; default: { - DBG_ERROR( "VCLXPrinterPropertySet_Impl::convertFastPropertyValue - invalid Handle" ); + OSL_FAIL( "VCLXPrinterPropertySet_Impl::convertFastPropertyValue - invalid Handle" ); } } return bDifferent; @@ -185,7 +186,7 @@ sal_Bool VCLXPrinterPropertySet::convertFastPropertyValue( ::com::sun::star::uno void VCLXPrinterPropertySet::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::uno::Exception) { - ::osl::Guard< ::osl::Mutex > aGuard( Mutex ); + ::osl::MutexGuard aGuard( Mutex ); switch( nHandle ) { @@ -201,14 +202,14 @@ void VCLXPrinterPropertySet::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle break; default: { - DBG_ERROR( "VCLXPrinterPropertySet_Impl::convertFastPropertyValue - invalid Handle" ); + OSL_FAIL( "VCLXPrinterPropertySet_Impl::convertFastPropertyValue - invalid Handle" ); } } } void VCLXPrinterPropertySet::getFastPropertyValue( ::com::sun::star::uno::Any& rValue, sal_Int32 nHandle ) const { - ::osl::Guard< ::osl::Mutex > aGuard( ((VCLXPrinterPropertySet*)this)->Mutex ); + ::osl::MutexGuard aGuard( ((VCLXPrinterPropertySet*)this)->Mutex ); switch( nHandle ) { @@ -220,7 +221,7 @@ void VCLXPrinterPropertySet::getFastPropertyValue( ::com::sun::star::uno::Any& r break; default: { - DBG_ERROR( "VCLXPrinterPropertySet_Impl::convertFastPropertyValue - invalid Handle" ); + OSL_FAIL( "VCLXPrinterPropertySet_Impl::convertFastPropertyValue - invalid Handle" ); } } } @@ -228,7 +229,7 @@ void VCLXPrinterPropertySet::getFastPropertyValue( ::com::sun::star::uno::Any& r // ::com::sun::star::awt::XPrinterPropertySet void VCLXPrinterPropertySet::setHorizontal( sal_Bool bHorizontal ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException) { - ::osl::Guard< ::osl::Mutex > aGuard( Mutex ); + ::osl::MutexGuard aGuard( Mutex ); ::com::sun::star::uno::Any aValue; aValue <<= bHorizontal; @@ -237,7 +238,7 @@ void VCLXPrinterPropertySet::setHorizontal( sal_Bool bHorizontal ) throw(::com:: ::com::sun::star::uno::Sequence< ::rtl::OUString > VCLXPrinterPropertySet::getFormDescriptions( ) throw(::com::sun::star::uno::RuntimeException) { - ::osl::Guard< ::osl::Mutex > aGuard( Mutex ); + ::osl::MutexGuard aGuard( Mutex ); sal_uInt16 nPaperBinCount = GetPrinter()->GetPaperBinCount(); ::com::sun::star::uno::Sequence< ::rtl::OUString > aDescriptions( nPaperBinCount ); @@ -257,7 +258,7 @@ void VCLXPrinterPropertySet::setHorizontal( sal_Bool bHorizontal ) throw(::com:: void VCLXPrinterPropertySet::selectForm( const ::rtl::OUString& rFormDescription ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException) { - ::osl::Guard< ::osl::Mutex > aGuard( Mutex ); + ::osl::MutexGuard aGuard( Mutex ); sal_Int32 nIndex = 0; sal_uInt16 nPaperBin = sal::static_int_cast< sal_uInt16 >( @@ -267,7 +268,7 @@ void VCLXPrinterPropertySet::selectForm( const ::rtl::OUString& rFormDescription ::com::sun::star::uno::Sequence< sal_Int8 > VCLXPrinterPropertySet::getBinarySetup( ) throw(::com::sun::star::uno::RuntimeException) { - ::osl::Guard< ::osl::Mutex > aGuard( Mutex ); + ::osl::MutexGuard aGuard( Mutex ); SvMemoryStream aMem; aMem << BINARYSETUPMARKER; @@ -277,7 +278,7 @@ void VCLXPrinterPropertySet::selectForm( const ::rtl::OUString& rFormDescription void VCLXPrinterPropertySet::setBinarySetup( const ::com::sun::star::uno::Sequence< sal_Int8 >& data ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException) { - ::osl::Guard< ::osl::Mutex > aGuard( Mutex ); + ::osl::MutexGuard aGuard( Mutex ); SvMemoryStream aMem( (char*) data.getConstArray(), data.getLength(), STREAM_READ ); sal_uInt32 nMarker; @@ -324,7 +325,7 @@ IMPL_XTYPEPROVIDER_END sal_Bool VCLXPrinter::start( const ::rtl::OUString& /*rJobName*/, sal_Int16 /*nCopies*/, sal_Bool /*bCollate*/ ) throw(::com::sun::star::awt::PrinterException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException) { - ::osl::Guard< ::osl::Mutex > aGuard( Mutex ); + ::osl::MutexGuard aGuard( Mutex ); sal_Bool bDone = sal_True; if ( mpListener.get() ) @@ -338,7 +339,7 @@ sal_Bool VCLXPrinter::start( const ::rtl::OUString& /*rJobName*/, sal_Int16 /*nC void VCLXPrinter::end( ) throw(::com::sun::star::awt::PrinterException, ::com::sun::star::uno::RuntimeException) { - ::osl::Guard< ::osl::Mutex > aGuard( Mutex ); + ::osl::MutexGuard aGuard( Mutex ); if ( mpListener.get() ) { @@ -349,14 +350,14 @@ void VCLXPrinter::end( ) throw(::com::sun::star::awt::PrinterException, ::com:: void VCLXPrinter::terminate( ) throw(::com::sun::star::uno::RuntimeException) { - ::osl::Guard< ::osl::Mutex > aGuard( Mutex ); + ::osl::MutexGuard aGuard( Mutex ); mpListener.reset(); } ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice > VCLXPrinter::startPage( ) throw(::com::sun::star::awt::PrinterException, ::com::sun::star::uno::RuntimeException) { - ::osl::Guard< ::osl::Mutex > aGuard( Mutex ); + ::osl::MutexGuard aGuard( Mutex ); if ( mpListener.get() ) { @@ -367,7 +368,7 @@ void VCLXPrinter::terminate( ) throw(::com::sun::star::uno::RuntimeException) void VCLXPrinter::endPage( ) throw(::com::sun::star::awt::PrinterException, ::com::sun::star::uno::RuntimeException) { - ::osl::Guard< ::osl::Mutex > aGuard( Mutex ); + ::osl::MutexGuard aGuard( Mutex ); if ( mpListener.get() ) { @@ -410,7 +411,7 @@ IMPL_XTYPEPROVIDER_END // ::com::sun::star::awt::XInfoPrinter ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice > VCLXInfoPrinter::createDevice( ) throw(::com::sun::star::uno::RuntimeException) { - ::osl::Guard< ::osl::Mutex > aGuard( Mutex ); + ::osl::MutexGuard aGuard( Mutex ); return GetDevice(); } @@ -461,3 +462,4 @@ IMPL_XTYPEPROVIDER_END +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/vclxregion.cxx b/toolkit/source/awt/vclxregion.cxx index 2a7d56554dd8..f7df2a3291b3 100644 --- a/toolkit/source/awt/vclxregion.cxx +++ b/toolkit/source/awt/vclxregion.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -169,3 +170,4 @@ void VCLXRegion::xOrRegion( const ::com::sun::star::uno::Reference< ::com::sun:: +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/vclxscroller.cxx b/toolkit/source/awt/vclxscroller.cxx index 834632a7548b..407b7552eeec 100644 --- a/toolkit/source/awt/vclxscroller.cxx +++ b/toolkit/source/awt/vclxscroller.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -34,6 +35,7 @@ #include <toolkit/helper/property.hxx> #include <tools/debug.hxx> #include <vcl/scrbar.hxx> +#include <vcl/svapp.hxx> #include "forward.hxx" @@ -68,7 +70,7 @@ IMPLEMENT_FORWARD_XTYPEPROVIDER1( VCLXScroller, VCLXWindow ); void SAL_CALL VCLXScroller::dispose() throw(RuntimeException) { { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; EventObject aDisposeEvent; aDisposeEvent.Source = W3K_EXPLICIT_CAST (*this); @@ -148,24 +150,12 @@ void SAL_CALL VCLXScroller::allocateArea( void VCLXScroller::ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent ) { -/* - ::vos::OClearableGuard aGuard( GetMutex() ); - - switch ( _rVclWindowEvent.GetId() ) - { - default: - aGuard.clear(); -*/ - VCLXWindow::ProcessWindowEvent( _rVclWindowEvent ); -/* - break; - } -*/ + VCLXWindow::ProcessWindowEvent( _rVclWindowEvent ); } void SAL_CALL VCLXScroller::setProperty( const ::rtl::OUString& PropertyName, const Any &Value ) throw(RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if ( GetWindow() ) { @@ -184,7 +174,7 @@ void SAL_CALL VCLXScroller::setProperty( const ::rtl::OUString& PropertyName, co Any SAL_CALL VCLXScroller::getProperty( const ::rtl::OUString& PropertyName ) throw(RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Any aReturn; if ( GetWindow() ) @@ -210,3 +200,5 @@ IMPL_LINK( VCLXScroller, ScrollHdl, ScrollBar *, pScrollBar ) } } // namespace layoutimpl + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/vclxscroller.hxx b/toolkit/source/awt/vclxscroller.hxx index be2524020c72..7252cd68563a 100644 --- a/toolkit/source/awt/vclxscroller.hxx +++ b/toolkit/source/awt/vclxscroller.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -85,3 +86,5 @@ private: } // namespace layoutimpl #endif /* LAYOUT_AWT_VCLXSCROLLER_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/vclxspinbutton.cxx b/toolkit/source/awt/vclxspinbutton.cxx index e9c2b3271396..2197321b41fb 100644 --- a/toolkit/source/awt/vclxspinbutton.cxx +++ b/toolkit/source/awt/vclxspinbutton.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -34,6 +35,7 @@ #include <tools/debug.hxx> #include <vcl/spin.hxx> +#include <vcl/svapp.hxx> namespace toolkit { @@ -92,7 +94,7 @@ namespace toolkit void SAL_CALL VCLXSpinButton::dispose( ) throw(RuntimeException) { { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; EventObject aDisposeEvent; aDisposeEvent.Source = *this; @@ -122,19 +124,18 @@ namespace toolkit typedef long (SpinButton::*GetSpinButtonValue) (void) const; //................................................................ - void lcl_setSpinButtonValue( ::vos::IMutex& _rMutex, Window* _pWindow, SetSpinButtonValue _pSetter, sal_Int32 _nValue ) + void lcl_setSpinButtonValue(Window* _pWindow, SetSpinButtonValue _pSetter, sal_Int32 _nValue ) { - ::vos::OGuard aGuard( _rMutex ); - + SolarMutexGuard aGuard; SpinButton* pSpinButton = static_cast< SpinButton* >( _pWindow ); if ( pSpinButton ) (pSpinButton->*_pSetter)( _nValue ); } //................................................................ - sal_Int32 lcl_getSpinButtonValue( ::vos::IMutex& _rMutex, const Window* _pWindow, GetSpinButtonValue _pGetter ) + sal_Int32 lcl_getSpinButtonValue(const Window* _pWindow, GetSpinButtonValue _pGetter ) { - ::vos::OGuard aGuard( _rMutex ); + SolarMutexGuard aGuard; sal_Int32 nValue = 0; @@ -148,13 +149,13 @@ namespace toolkit //-------------------------------------------------------------------- void SAL_CALL VCLXSpinButton::setValue( sal_Int32 n ) throw (RuntimeException) { - lcl_setSpinButtonValue( GetMutex(), GetWindow(), &SpinButton::SetValue, n ); + lcl_setSpinButtonValue( GetWindow(), &SpinButton::SetValue, n ); } //-------------------------------------------------------------------- void SAL_CALL VCLXSpinButton::setValues( sal_Int32 minValue, sal_Int32 maxValue, sal_Int32 currentValue ) throw (RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; setMinimum( minValue ); setMaximum( maxValue ); @@ -164,49 +165,49 @@ namespace toolkit //-------------------------------------------------------------------- sal_Int32 SAL_CALL VCLXSpinButton::getValue( ) throw (RuntimeException) { - return lcl_getSpinButtonValue( GetMutex(), GetWindow(), &SpinButton::GetValue ); + return lcl_getSpinButtonValue( GetWindow(), &SpinButton::GetValue ); } //-------------------------------------------------------------------- void SAL_CALL VCLXSpinButton::setMinimum( sal_Int32 minValue ) throw (RuntimeException) { - lcl_setSpinButtonValue( GetMutex(), GetWindow(), &SpinButton::SetRangeMin, minValue ); + lcl_setSpinButtonValue( GetWindow(), &SpinButton::SetRangeMin, minValue ); } //-------------------------------------------------------------------- void SAL_CALL VCLXSpinButton::setMaximum( sal_Int32 maxValue ) throw (RuntimeException) { - lcl_setSpinButtonValue( GetMutex(), GetWindow(), &SpinButton::SetRangeMax, maxValue ); + lcl_setSpinButtonValue( GetWindow(), &SpinButton::SetRangeMax, maxValue ); } //-------------------------------------------------------------------- sal_Int32 SAL_CALL VCLXSpinButton::getMinimum( ) throw (RuntimeException) { - return lcl_getSpinButtonValue( GetMutex(), GetWindow(), &SpinButton::GetRangeMin ); + return lcl_getSpinButtonValue( GetWindow(), &SpinButton::GetRangeMin ); } //-------------------------------------------------------------------- sal_Int32 SAL_CALL VCLXSpinButton::getMaximum( ) throw (RuntimeException) { - return lcl_getSpinButtonValue( GetMutex(), GetWindow(), &SpinButton::GetRangeMax ); + return lcl_getSpinButtonValue( GetWindow(), &SpinButton::GetRangeMax ); } //-------------------------------------------------------------------- void SAL_CALL VCLXSpinButton::setSpinIncrement( sal_Int32 spinIncrement ) throw (RuntimeException) { - lcl_setSpinButtonValue( GetMutex(), GetWindow(), &SpinButton::SetValueStep, spinIncrement ); + lcl_setSpinButtonValue( GetWindow(), &SpinButton::SetValueStep, spinIncrement ); } //-------------------------------------------------------------------- sal_Int32 SAL_CALL VCLXSpinButton::getSpinIncrement( ) throw (RuntimeException) { - return lcl_getSpinButtonValue( GetMutex(), GetWindow(), &SpinButton::GetValueStep ); + return lcl_getSpinButtonValue( GetWindow(), &SpinButton::GetValueStep ); } //-------------------------------------------------------------------- void SAL_CALL VCLXSpinButton::setOrientation( sal_Int32 orientation ) throw (NoSupportException, RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; lcl_modifyStyle( GetWindow(), WB_HSCROLL, orientation == ScrollBarOrientation::HORIZONTAL ); } @@ -222,7 +223,7 @@ namespace toolkit //-------------------------------------------------------------------- void VCLXSpinButton::ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent ) { - ::vos::OClearableGuard aGuard( GetMutex() ); + SolarMutexClearableGuard aGuard; Reference< XSpinValue > xKeepAlive( this ); SpinButton* pSpinButton = static_cast< SpinButton* >( GetWindow() ); if ( !pSpinButton ) @@ -254,7 +255,7 @@ namespace toolkit //-------------------------------------------------------------------- void SAL_CALL VCLXSpinButton::setProperty( const ::rtl::OUString& PropertyName, const Any& Value ) throw(RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; sal_Int32 nValue = 0; sal_Bool bIsLongValue = ( Value >>= nValue ); @@ -304,7 +305,7 @@ namespace toolkit //-------------------------------------------------------------------- Any SAL_CALL VCLXSpinButton::getProperty( const ::rtl::OUString& PropertyName ) throw(RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Any aReturn; @@ -353,3 +354,5 @@ namespace toolkit //........................................................................ } // namespace toolkit //........................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/vclxsplitter.cxx b/toolkit/source/awt/vclxsplitter.cxx index 07fcf96cb813..a0b67e2ca823 100644 --- a/toolkit/source/awt/vclxsplitter.cxx +++ b/toolkit/source/awt/vclxsplitter.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -33,6 +34,7 @@ #include <toolkit/helper/property.hxx> #include <toolkit/helper/vclunohelper.hxx> #include <vcl/split.hxx> +#include <vcl/svapp.hxx> #include "forward.hxx" @@ -106,7 +108,7 @@ VCLXSplitter::getChild( int i ) void SAL_CALL VCLXSplitter::dispose() throw(RuntimeException) { { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; EventObject aDisposeEvent; aDisposeEvent.Source = W3K_EXPLICIT_CAST (*this); @@ -243,3 +245,5 @@ IMPL_LINK( VCLXSplitter, HandleMovedHdl, Splitter *, pSplitter ) } } // namespace layoutimpl + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/vclxsplitter.hxx b/toolkit/source/awt/vclxsplitter.hxx index 69be466e6be8..2880e70993ef 100644 --- a/toolkit/source/awt/vclxsplitter.hxx +++ b/toolkit/source/awt/vclxsplitter.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -119,3 +120,5 @@ protected: } // namespace layoutimpl #endif /* LAYOUT_AWT_VCLXSPLITTER_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/vclxsystemdependentwindow.cxx b/toolkit/source/awt/vclxsystemdependentwindow.cxx index a0d8febb44f0..7cb667b18528 100644 --- a/toolkit/source/awt/vclxsystemdependentwindow.cxx +++ b/toolkit/source/awt/vclxsystemdependentwindow.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -39,16 +40,13 @@ #include <toolkit/helper/macros.hxx> #include <cppuhelper/typeprovider.hxx> -#ifdef WNT -#include <tools/prewin.h> -#include <windows.h> -#include <tools/postwin.h> -#elif defined ( QUARTZ ) +#ifdef QUARTZ #include "premac.h" #include <Cocoa/Cocoa.h> #include "postmac.h" #endif +#include <vcl/svapp.hxx> #include <vcl/syschild.hxx> #include <vcl/sysdata.hxx> @@ -79,7 +77,7 @@ IMPL_XTYPEPROVIDER_END ::com::sun::star::uno::Any VCLXSystemDependentWindow::getWindowHandle( const ::com::sun::star::uno::Sequence< sal_Int8 >& /*ProcessId*/, sal_Int16 SystemType ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; // TODO, check the process id ::com::sun::star::uno::Any aRet; @@ -94,11 +92,6 @@ IMPL_XTYPEPROVIDER_END { aRet <<= (sal_Int32)pSysData->hWnd; } -#elif (defined OS2) - if( SystemType == ::com::sun::star::lang::SystemDependent::SYSTEM_OS2 ) - { - aRet <<= (sal_Int32)pSysData->hWnd; - } #elif (defined QUARTZ) if( SystemType == ::com::sun::star::lang::SystemDependent::SYSTEM_MAC ) { @@ -122,3 +115,4 @@ IMPL_XTYPEPROVIDER_END +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/vclxtabcontrol.cxx b/toolkit/source/awt/vclxtabcontrol.cxx index 773b9922ea56..cc3940c92784 100644 --- a/toolkit/source/awt/vclxtabcontrol.cxx +++ b/toolkit/source/awt/vclxtabcontrol.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -25,7 +26,7 @@ * ************************************************************************/ -#include "vclxtabcontrol.hxx" +#include <vclxtabcontrol.hxx> #include <com/sun/star/awt/PosSize.hpp> #include <sal/macros.h> @@ -33,6 +34,7 @@ #include <toolkit/helper/vclunohelper.hxx> #include <vcl/tabctrl.hxx> #include <vcl/tabpage.hxx> +#include <vcl/svapp.hxx> #include "forward.hxx" @@ -99,7 +101,7 @@ IMPLEMENT_FORWARD_XTYPEPROVIDER2( VCLXTabControl, VCLXWindow, VCLXTabControl_Bas void SAL_CALL VCLXTabControl::dispose( ) throw(uno::RuntimeException) { { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; EventObject aDisposeEvent; aDisposeEvent.Source = W3K_EXPLICIT_CAST (*this); @@ -109,19 +111,6 @@ void SAL_CALL VCLXTabControl::dispose( ) throw(uno::RuntimeException) VCLXWindow::dispose(); } -#if 0 -void SAL_CALL VCLXTabControl::addTabListener( const Reference< XTabListener >& listener ) throw (uno::RuntimeException) -{ - if ( listener.is() ) - maTabListeners.addInterface( listener ); -} - -void SAL_CALL VCLXTabControl::removeTabListener( const Reference< XTabListener >& listener ) throw (uno::RuntimeException) -{ - if ( listener.is() ) - maTabListeners.removeInterface( listener ); -} -#endif TabControl *VCLXTabControl::getTabControl() const throw (uno::RuntimeException) { @@ -166,7 +155,7 @@ void SAL_CALL VCLXTabControl::addTabListener( const uno::Reference< awt::XTabLis { for ( std::list< uno::Reference < awt::XTabListener > >::const_iterator it - = mxTabListeners.begin(); it != mxTabListeners.end(); it++ ) + = mxTabListeners.begin(); it != mxTabListeners.end(); ++it ) { if ( *it == xListener ) // already added @@ -179,7 +168,7 @@ void SAL_CALL VCLXTabControl::removeTabListener( const uno::Reference< awt::XTab { for ( std::list< uno::Reference < awt::XTabListener > >::iterator it - = mxTabListeners.begin(); it != mxTabListeners.end(); it++ ) + = mxTabListeners.begin(); it != mxTabListeners.end(); ++it ) { if ( *it == xListener ) { @@ -232,7 +221,7 @@ uno::Sequence< NamedValue > SAL_CALL VCLXTabControl::getTabProps( sal_Int32 ID ) // TODO: draw tab border here void SAL_CALL VCLXTabControl::draw( sal_Int32 nX, sal_Int32 nY ) throw(uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; TabControl *pTabControl = getTabControl(); TabPage *pTabPage = pTabControl->GetTabPage( sal::static_int_cast< sal_uInt16 >( getActiveTabID() ) ); @@ -317,9 +306,6 @@ void SAL_CALL VCLXTabControl::allocateArea (awt::Rectangle const &area) // LATER: Nah, the proper fix is to get the XWindow hierarchy // straight. -#if 0 - setPosSize( area.X, area.Y, area.Width, area.Height, awt::PosSize::POSSIZE ); -#else awt::Size currentSize = getSize(); awt::Size requestedSize (area.Width, area.Height); // requestedSize.Height = getHeightForWidth( area.Width ); @@ -345,7 +331,6 @@ void SAL_CALL VCLXTabControl::allocateArea (awt::Rectangle const &area) if (requestedSize.Height < pageBasedSize.Height) requestedSize.Height = pageBasedSize.Height + hc; - Size windowSize = GetWindow()->GetSizePixel(); Window *parent = GetWindow()->GetParent(); Size parentSize = parent->GetSizePixel(); @@ -358,9 +343,6 @@ void SAL_CALL VCLXTabControl::allocateArea (awt::Rectangle const &area) OSL_TRACE ("%s: minimum: %d, %d", __FUNCTION__, minimumSize.Width, minimumSize.Height ); OSL_TRACE ("%s: requestedSize: %d, %d", __FUNCTION__, requestedSize.Width, requestedSize.Height ); OSL_TRACE ("%s: pageBasedSize: %d, %d", __FUNCTION__, pageBasedSize.Width, pageBasedSize.Height ); - - //OSL_TRACE ("%s: parent: %d, %d", __FUNCTION__, parentSize.Width(), parentSize.Height() ); - //OSL_TRACE ("%s: window: %d, %d", __FUNCTION__, windowSize.Width(), windowSize.Height() ); #endif //bRealized = false; @@ -376,7 +358,6 @@ void SAL_CALL VCLXTabControl::allocateArea (awt::Rectangle const &area) if ( requestedSize.Height > currentSize.Height + 10) setPosSize( 0, 0, 0, requestedSize.Height, awt::PosSize::HEIGHT ); } -#endif if (pageBasedSize.Width > parentSize.Width () || pageBasedSize.Height > parentSize.Height ()) @@ -388,7 +369,7 @@ void SAL_CALL VCLXTabControl::allocateArea (awt::Rectangle const &area) // it here does makes it easier when changing tabs (just needs a recalc()) unsigned i = 0; for ( std::list<Box_Base::ChildData *>::const_iterator it - = maChildren.begin(); it != maChildren.end(); it++, i++ ) + = maChildren.begin(); it != maChildren.end(); ++it, ++i ) { ChildData *child = static_cast<VCLXTabControl::ChildData*> ( *it ); uno::Reference @@ -400,12 +381,7 @@ void SAL_CALL VCLXTabControl::allocateArea (awt::Rectangle const &area) // HACK: since our layout:: container don't implement XWindow, we have no easy // way to set them invisible; lets just set all their children as such :P -#if 0 - if ( xWin.is() ) - xWin->setVisible( active ); -#else setChildrenVisible( xChild, active ); -#endif if ( active ) { @@ -437,7 +413,7 @@ awt::Size SAL_CALL VCLXTabControl::getMinimumSize() // calculate size to accomodate all children unsigned i = 0; for ( std::list<Box_Base::ChildData *>::const_iterator it - = maChildren.begin(); it != maChildren.end(); it++, i++ ) + = maChildren.begin(); it != maChildren.end(); ++it, ++i ) { ChildData *child = static_cast<VCLXTabControl::ChildData*> ( *it ); if ( child->mxChild.is() ) @@ -468,7 +444,7 @@ awt::Size SAL_CALL VCLXTabControl::getMinimumSize() void VCLXTabControl::ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent ) { - ::vos::OClearableGuard aGuard( GetMutex() ); + SolarMutexClearableGuard aGuard; TabControl* pTabControl = static_cast< TabControl* >( GetWindow() ); if ( !pTabControl ) return; @@ -486,7 +462,7 @@ void VCLXTabControl::ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent sal_uLong page = (sal_uLong) _rVclWindowEvent.GetData(); for ( std::list< uno::Reference < awt::XTabListener > >::iterator it - = mxTabListeners.begin(); it != mxTabListeners.end(); it++) + = mxTabListeners.begin(); it != mxTabListeners.end(); ++it ) { uno::Reference < awt::XTabListener > listener = *it; @@ -538,3 +514,5 @@ uno::Any SAL_CALL VCLXTabControl::getProperty( const ::rtl::OUString& PropertyNa } } // namespace layoutimpl + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/vclxtabcontrol.hxx b/toolkit/source/awt/vclxtabcontrol.hxx index 8f5debf2626c..e5d391b0c783 100644 --- a/toolkit/source/awt/vclxtabcontrol.hxx +++ b/toolkit/source/awt/vclxtabcontrol.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -122,6 +123,8 @@ public: ChildProps( VCLXTabControl::ChildData *pData ); }; + inline TabControl *getTabControl() const throw (::com::sun::star::uno::RuntimeException); + protected: ChildData *createChild( css::uno::Reference< css::awt::XLayoutConstrains > const& xChild ); ChildProps *createChildProps( Box_Base::ChildData* pData ); @@ -132,7 +135,6 @@ protected: std::list< ::com::sun::star::uno::Reference < ::com::sun::star::awt::XTabListener > > mxTabListeners; - inline TabControl *getTabControl() const throw (::com::sun::star::uno::RuntimeException); private: VCLXTabControl( const VCLXTabControl& ); // never implemented @@ -142,3 +144,5 @@ private: } // namespace layoutimpl #endif /* LAYOUT_AWT_VCLXTABCONTROLLER_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/vclxtabpage.cxx b/toolkit/source/awt/vclxtabpage.cxx index 6523f7e98c5f..c50e40ec331e 100644 --- a/toolkit/source/awt/vclxtabpage.cxx +++ b/toolkit/source/awt/vclxtabpage.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -25,13 +26,15 @@ * ************************************************************************/ -#include "vclxtabpage.hxx" +#include <vclxtabpage.hxx> + #include "forward.hxx" #include <com/sun/star/awt/PosSize.hpp> #include <toolkit/helper/convert.hxx> #include <vcl/tabpage.hxx> #include <vcl/tabctrl.hxx> +#include <vcl/svapp.hxx> #if !defined (__GNUC__) #define __PRETTY_FUNCTION__ __FUNCTION__ @@ -65,7 +68,7 @@ VCLXTabPage::~VCLXTabPage() void SAL_CALL VCLXTabPage::dispose() throw(uno::RuntimeException) { { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; lang::EventObject aDisposeEvent; aDisposeEvent.Source = W3K_EXPLICIT_CAST (*this); @@ -108,20 +111,6 @@ void SAL_CALL VCLXTabPage::allocateArea( awt::Rectangle const& area ) OSL_TRACE ("%s: window: %d, %d", __FUNCTION__, windowSize.Width(), windowSize.Height() ); #endif -#if 0 - if (requestedSize.Width > parentSize.Width () - || requestedSize.Height > parentSize.Height ()) - { -#ifndef __SUNPRO_CC - OSL_TRACE ("%s: ***setting parent: %d, %d", __FUNCTION__, requestedSize.Width, requestedSize.Height ); -#endif - parent->SetSizePixel ( Size (requestedSize.Width, requestedSize.Height) ); - - if (Window *grand_parent = parent->GetParent ()) - grand_parent->SetSizePixel ( Size (requestedSize.Width, requestedSize.Height) ); - } -#endif - if ( !bRealized ) { setPosSize( area.X, area.Y, requestedSize.Width, requestedSize.Height, awt::PosSize::SIZE ); @@ -148,9 +137,11 @@ void SAL_CALL VCLXTabPage::allocateArea( awt::Rectangle const& area ) awt::Size SAL_CALL VCLXTabPage::getMinimumSize() throw(uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; return Bin::getMinimumSize(); } } // namespace layoutimpl + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/vclxtabpage.hxx b/toolkit/source/awt/vclxtabpage.hxx index 215ee49c5716..81560e07da76 100644 --- a/toolkit/source/awt/vclxtabpage.hxx +++ b/toolkit/source/awt/vclxtabpage.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -71,3 +72,5 @@ private: } // namespace layoutimpl #endif /* LAYOUT_AWT_VCLXTABPAGE_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/vclxtabpagecontainer.cxx b/toolkit/source/awt/vclxtabpagecontainer.cxx index d4f7a5048701..9eecb16286ca 100644 --- a/toolkit/source/awt/vclxtabpagecontainer.cxx +++ b/toolkit/source/awt/vclxtabpagecontainer.cxx @@ -31,6 +31,7 @@ #include <com/sun/star/awt/XControl.hpp> #include <vcl/tabpage.hxx> #include <vcl/tabctrl.hxx> +#include <vcl/svapp.hxx> #include <toolkit/helper/property.hxx> #include <toolkit/helper/vclunohelper.hxx> #include <toolkit/helper/tkresmgr.hxx> @@ -65,7 +66,7 @@ VCLXTabPageContainer::~VCLXTabPageContainer() void SAL_CALL VCLXTabPageContainer::draw( sal_Int32 nX, sal_Int32 nY ) throw(RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; TabControl* pTabControl = (TabControl*)GetWindow(); if ( pTabControl ) { @@ -107,7 +108,7 @@ void SAL_CALL VCLXTabPageContainer::draw( sal_Int32 nX, sal_Int32 nY ) throw(Run void SAL_CALL VCLXTabPageContainer::setProperty(const ::rtl::OUString& PropertyName, const Any& Value ) throw(RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; TabControl* pTabPage = (TabControl*)GetWindow(); if ( pTabPage ) @@ -141,7 +142,7 @@ Reference< ::com::sun::star::awt::tab::XTabPage > SAL_CALL VCLXTabPageContainer: } Reference< ::com::sun::star::awt::tab::XTabPage > SAL_CALL VCLXTabPageContainer::getTabPageByID( ::sal_Int16 tabPageID ) throw (RuntimeException) { - ::vos::OClearableGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Reference< ::com::sun::star::awt::tab::XTabPage > xTabPage; ::std::vector< Reference< ::com::sun::star::awt::tab::XTabPage > >::iterator aIter = m_aTabPages.begin(); ::std::vector< Reference< ::com::sun::star::awt::tab::XTabPage > >::iterator aEnd = m_aTabPages.end(); @@ -168,7 +169,7 @@ void SAL_CALL VCLXTabPageContainer::removeTabPageListener( const Reference< ::co void VCLXTabPageContainer::ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent ) { - ::vos::OClearableGuard aGuard( GetMutex() ); + SolarMutexClearableGuard aGuard; TabControl* pTabControl = static_cast< TabControl* >( GetWindow() ); if ( pTabControl ) { @@ -194,7 +195,7 @@ void SAL_CALL VCLXTabPageContainer::disposing( const ::com::sun::star::lang::Eve } void SAL_CALL VCLXTabPageContainer::elementInserted( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; TabControl* pTabCtrl = (TabControl*)GetWindow(); Reference< ::com::sun::star::awt::tab::XTabPage > xTabPage(Event.Element,uno::UNO_QUERY); if ( pTabCtrl && xTabPage.is() ) @@ -217,7 +218,7 @@ void SAL_CALL VCLXTabPageContainer::elementInserted( const ::com::sun::star::con } void SAL_CALL VCLXTabPageContainer::elementRemoved( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; TabControl* pTabCtrl = (TabControl*)GetWindow(); Reference< ::com::sun::star::awt::tab::XTabPage > xTabPage(Event.Element,uno::UNO_QUERY); if ( pTabCtrl && xTabPage.is() ) diff --git a/toolkit/source/awt/vclxtabpagemodel.cxx b/toolkit/source/awt/vclxtabpagemodel.cxx index c7145992bd7f..6f8b2b51c134 100644 --- a/toolkit/source/awt/vclxtabpagemodel.cxx +++ b/toolkit/source/awt/vclxtabpagemodel.cxx @@ -107,7 +107,7 @@ void SAL_CALL VCLXTabPageModel::setEnabled( ::sal_Bool _enabled ) throw (::com:: //if ( pTabControl ) // return pTabControl->GetPageText(0); //else - return ::rtl::OUString::createFromAscii(""); + return ::rtl::OUString(); } void SAL_CALL VCLXTabPageModel::setTitle( const ::rtl::OUString& _title ) throw (::com::sun::star::uno::RuntimeException) { @@ -118,7 +118,7 @@ void SAL_CALL VCLXTabPageModel::setTitle( const ::rtl::OUString& _title ) throw } ::rtl::OUString SAL_CALL VCLXTabPageModel::getImageURL() throw (::com::sun::star::uno::RuntimeException) { - return ::rtl::OUString::createFromAscii(""); + return ::rtl::OUString(); } void SAL_CALL VCLXTabPageModel::setImageURL( const ::rtl::OUString& /*_imageurl*/ ) throw (::com::sun::star::uno::RuntimeException) { @@ -127,7 +127,7 @@ void SAL_CALL VCLXTabPageModel::setImageURL( const ::rtl::OUString& /*_imageurl* ::rtl::OUString SAL_CALL VCLXTabPageModel::getTooltip() throw (::com::sun::star::uno::RuntimeException) { //return m_sTooltip; - return ::rtl::OUString::createFromAscii(""); + return ::rtl::OUString(); } void SAL_CALL VCLXTabPageModel::setTooltip( const ::rtl::OUString& _tooltip ) throw (::com::sun::star::uno::RuntimeException) { diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx index 1c2df22e56a7..f255777f5cb6 100644 --- a/toolkit/source/awt/vclxtoolkit.cxx +++ b/toolkit/source/awt/vclxtoolkit.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -27,12 +28,16 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_toolkit.hxx" + +#include <boost/ptr_container/ptr_vector.hpp> + #include <com/sun/star/beans/PropertyAttribute.hpp> -#ifndef _SVWIN_HXX -#include <tools/svwin.h> -#endif #include <stdio.h> +#ifdef WNT +#include <prewin.h> +#include <postwin.h> +#endif #include <com/sun/star/awt/ImageScaleMode.hpp> #include <com/sun/star/awt/WindowAttribute.hpp> #include <com/sun/star/awt/VclWindowPeerAttribute.hpp> @@ -54,11 +59,7 @@ #include <rtl/uuid.h> #include <rtl/process.h> -#ifdef WNT -#include <tools/prewin.h> -#include <windows.h> -#include <tools/postwin.h> -#elif (defined QUARTZ) +#ifdef QUARTZ #include "premac.h" #include <Cocoa/Cocoa.h> #include "postmac.h" @@ -81,14 +82,11 @@ #include <toolkit/helper/unowrapper.hxx> #include <toolkit/helper/servicenames.hxx> - #include <toolkit/helper/macros.hxx> #include <toolkit/helper/convert.hxx> #include <vcl/unohelp.hxx> #include <vcl/btndlg.hxx> -#ifndef _SV_BUTTON_HXX #include <vcl/button.hxx> -#endif #include <vcl/combobox.hxx> #include <vcl/ctrl.hxx> #include <vcl/dialog.hxx> @@ -124,6 +122,7 @@ #include <tools/debug.hxx> #include <comphelper/processfactory.hxx> +#include "awt/vclxtabcontrol.hxx" namespace css = ::com::sun::star; @@ -132,8 +131,6 @@ namespace css = ::com::sun::star; #if (defined WNT) #define SYSTEM_DEPENDENT_TYPE ::com::sun::star::lang::SystemDependent::SYSTEM_WIN32 -#elif (defined OS2) -#define SYSTEM_DEPENDENT_TYPE ::com::sun::star::lang::SystemDependent::SYSTEM_OS2 #elif (defined QUARTZ) #define SYSTEM_DEPENDENT_TYPE ::com::sun::star::lang::SystemDependent::SYSTEM_MAC #elif (defined UNX) @@ -268,7 +265,7 @@ struct ComponentInfo WindowType nWinType; }; -static ComponentInfo __FAR_DATA aComponentInfos [] = +static ComponentInfo aComponentInfos [] = { { "buttondialog", WINDOW_BUTTONDIALOG }, { "cancelbutton", WINDOW_CANCELBUTTON }, @@ -291,6 +288,7 @@ static ComponentInfo __FAR_DATA aComponentInfos [] = { "floatingwindow", WINDOW_FLOATINGWINDOW }, { "framewindow", VCLWINDOW_FRAMEWINDOW }, { "groupbox", WINDOW_GROUPBOX }, + { "frame", WINDOW_GROUPBOX }, { "helpbutton", WINDOW_HELPBUTTON }, { "imagebutton", WINDOW_IMAGEBUTTON }, { "imageradiobutton", WINDOW_IMAGERADIOBUTTON }, @@ -342,14 +340,7 @@ static ComponentInfo __FAR_DATA aComponentInfos [] = extern "C" { -static int -#if defined( WNT ) - __cdecl -#endif -#if defined( ICC ) && defined( OS2 ) -_Optlink -#endif - ComponentInfoCompare( const void* pFirst, const void* pSecond) +static int SAL_CALL ComponentInfoCompare( const void* pFirst, const void* pSecond) { return( strcmp( ((ComponentInfo*)pFirst)->pName, ((ComponentInfo*)pSecond)->pName ) ); @@ -452,8 +443,8 @@ static void SAL_CALL ToolkitWorkerFunction( void* pArgs ) if( bInitedByVCLToolkit ) { { - osl::Guard< vos::IMutex > aGuard( Application::GetSolarMutex() ); - Application::Execute(); + SolarMutexGuard aGuard; + Application::Execute(); } try { @@ -607,7 +598,7 @@ void SAL_CALL VCLXToolkit::disposing() ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice > xRef; VCLXVirtualDevice* pVDev = new VCLXVirtualDevice; - osl::Guard< vos::IMutex > aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; VirtualDevice* pV = new VirtualDevice; pV->SetOutputSizePixel( Size( Width, Height ) ); @@ -634,7 +625,14 @@ Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp, Window* pNewWindow = NULL; sal_uInt16 nType = ImplGetComponentType( aServiceName ); - + bool bFrameControl = false; + if ( aServiceName == String( RTL_CONSTASCII_USTRINGPARAM("frame") ) ) + bFrameControl = true; + if ( aServiceName == String( RTL_CONSTASCII_USTRINGPARAM("tabcontrolnotabs") ) ) + { + nWinBits |= WB_NOBORDER; + nType = ImplGetComponentType( String( RTL_CONSTASCII_USTRINGPARAM("tabcontrol") ) ); + } if ( !pParent ) { // Wenn die Component einen Parent braucht, dann NULL zurueckgeben, @@ -667,7 +665,7 @@ Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp, if ( nType ) { - vos::OGuard aVclGuard( Application::GetSolarMutex() ); + SolarMutexGuard aVclGuard; switch ( (WindowType)nType ) { case WINDOW_CANCELBUTTON: @@ -731,7 +729,17 @@ Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp, pNewWindow = new FloatingWindow( pParent, nWinBits ); break; case WINDOW_GROUPBOX: + { pNewWindow = new GroupBox( pParent, nWinBits ); + if ( bFrameControl ) + { + GroupBox* pGroupBox = static_cast< GroupBox* >( pNewWindow ); + *ppNewComp = new VCLXFrame; + // Frame control needs to recieve + // Mouse events + pGroupBox->SetMouseTransparent( sal_False ); + } + } break; case WINDOW_HELPBUTTON: pNewWindow = new HelpButton( pParent, nWinBits ); @@ -878,15 +886,15 @@ Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp, break; case WINDOW_TABCONTROL: pNewWindow = new TabControl( pParent, nWinBits ); - *ppNewComp = new VCLXTabPageContainer; + *ppNewComp = new VCLXMultiPage; break; case WINDOW_TABDIALOG: pNewWindow = new TabDialog( pParent, nWinBits ); break; case WINDOW_TABPAGE: /* - if ( rDescriptor.WindowServiceName.equalsIgnoreAsciiCase( - ::rtl::OUString::createFromAscii("tabpagemodel") ) ) + if ( rDescriptor.WindowServiceName.equalsIgnoreAsciiCaseAsciiL( + RTL_CONSTASCII_STRINGPARAM("tabpagemodel") ) ) { pNewWindow = new TabControl( pParent, nWinBits ); *ppNewComp = new VCLXTabPageContainer; @@ -958,9 +966,9 @@ Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp, const css::beans::NamedValue* pProps = aProps.getConstArray(); for( int i = 0; i < nProps; i++ ) { - if( pProps[i].Name.equalsAscii( "WINDOW" ) ) + if( pProps[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "WINDOW" ) ) ) pProps[i].Value >>= nWindowHandle; - else if( pProps[i].Name.equalsAscii( "XEMBED" ) ) + else if( pProps[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "XEMBED" ) ) ) pProps[i].Value >>= bXEmbed; } } @@ -979,8 +987,6 @@ Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp, aParentData.bXEmbedSupport = bXEmbed; #elif defined WNT aParentData.hWnd = reinterpret_cast<HWND>(nWindowHandle); - #elif defined OS2 - aParentData.hWnd = (HWND)nWindowHandle; #endif pNewWindow = new WorkWindow( &aParentData ); } @@ -1025,8 +1031,8 @@ Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp, // (compatibility) *ppNewComp = new ::toolkit::XThrobber; } - else if ( rDescriptor.WindowServiceName.equalsIgnoreAsciiCase( - ::rtl::OUString::createFromAscii("tabpagecontainer") ) ) + else if ( rDescriptor.WindowServiceName.equalsIgnoreAsciiCaseAsciiL( + RTL_CONSTASCII_STRINGPARAM("tabpagecontainer") ) ) { pNewWindow = new TabControl( pParent, nWinBits ); *ppNewComp = new VCLXTabPageContainer; @@ -1054,7 +1060,7 @@ css::uno::Reference< css::awt::XWindowPeer > VCLXToolkit::ImplCreateWindow( { ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); - osl::Guard< vos::IMutex > aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > xRef; @@ -1184,9 +1190,9 @@ css::uno::Reference< css::awt::XWindowPeer > VCLXToolkit::ImplCreateWindow( const css::beans::NamedValue* pProps = aProps.getConstArray(); for( int i = 0; i < nProps; i++ ) { - if( pProps[i].Name.equalsAscii( "WINDOW" ) ) + if( pProps[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "WINDOW" ) ) ) pProps[i].Value >>= nWindowHandle; - else if( pProps[i].Name.equalsAscii( "XEMBED" ) ) + else if( pProps[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "XEMBED" ) ) ) pProps[i].Value >>= bXEmbed; } } @@ -1205,10 +1211,8 @@ css::uno::Reference< css::awt::XWindowPeer > VCLXToolkit::ImplCreateWindow( aParentData.bXEmbedSupport = bXEmbed; #elif defined WNT aParentData.hWnd = reinterpret_cast<HWND>(nWindowHandle); - #elif defined OS2 - aParentData.hWnd = (HWND)nWindowHandle; #endif - osl::Guard< vos::IMutex > aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; try { pChildWindow = new WorkWindow( &aParentData ); @@ -1226,7 +1230,7 @@ css::uno::Reference< css::awt::XWindowPeer > VCLXToolkit::ImplCreateWindow( } else if (nSystemType == com::sun::star::lang::SystemDependent::SYSTEM_JAVA) { - osl::Guard< vos::IMutex > aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; pChildWindow = new WorkWindow(0, Parent); } @@ -1234,7 +1238,7 @@ css::uno::Reference< css::awt::XWindowPeer > VCLXToolkit::ImplCreateWindow( if ( pChildWindow ) { VCLXTopWindow* pPeer = new VCLXTopWindow(true); - osl::Guard< vos::IMutex > aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; pPeer->SetWindow( pChildWindow ); xPeer = pPeer; } @@ -1301,7 +1305,7 @@ css::uno::Reference< css::awt::XWindowPeer > VCLXToolkit::ImplCreateWindow( Window * pWindow = VCLUnoHelper::GetWindow( xWindow ); if ( pWindow ) { - osl::Guard< vos::IMutex > aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; xMsgBox->setCaptionText( aTitle ); xMsgBox->setMessageText( aMessage ); } @@ -1351,14 +1355,14 @@ css::uno::Reference< css::awt::XWindowPeer > VCLXToolkit::ImplCreateWindow( { // remember clipboard here mxClipboard = ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard > ( - xFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.datatransfer.clipboard.SystemClipboard" ) ), ::com::sun::star::uno::UNO_QUERY ); + xFactory->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.clipboard.SystemClipboard")) ), ::com::sun::star::uno::UNO_QUERY ); } } return mxClipboard; } - else if( clipboardName.equals( ::rtl::OUString::createFromAscii("Selection") ) ) + else if( clipboardName.equals( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Selection")) ) ) { return mxSelection; } @@ -1369,7 +1373,7 @@ css::uno::Reference< css::awt::XWindowPeer > VCLXToolkit::ImplCreateWindow( // XServiceInfo ::rtl::OUString VCLXToolkit::getImplementationName() throw(::com::sun::star::uno::RuntimeException) { - return rtl::OUString::createFromAscii( "stardiv.Toolkit.VCLXToolkit" ); + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("stardiv.Toolkit.VCLXToolkit")); } sal_Bool VCLXToolkit::supportsService( const ::rtl::OUString& rServiceName ) throw(::com::sun::star::uno::RuntimeException) @@ -1743,3 +1747,4 @@ void SAL_CALL VCLXToolkit::reschedule() Application::Reschedule(true); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/vclxtopwindow.cxx b/toolkit/source/awt/vclxtopwindow.cxx index 10220a87de63..8bf3c861c01d 100644 --- a/toolkit/source/awt/vclxtopwindow.cxx +++ b/toolkit/source/awt/vclxtopwindow.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,11 +31,7 @@ #include <com/sun/star/lang/SystemDependent.hpp> #include <com/sun/star/awt/SystemDependentXWindow.hpp> -#ifdef WNT -#include <tools/prewin.h> -#include <windows.h> -#include <tools/postwin.h> -#elif defined ( QUARTZ ) +#if defined ( QUARTZ ) #include "premac.h" #include <Cocoa/Cocoa.h> #include "postmac.h" @@ -92,7 +89,7 @@ Sequence< Type > VCLXTopWindow_Base::getTypes() throw(RuntimeException) ::com::sun::star::uno::Any VCLXTopWindow_Base::getWindowHandle( const ::com::sun::star::uno::Sequence< sal_Int8 >& /*ProcessId*/, sal_Int16 SystemType ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutexImpl() ); + SolarMutexGuard aGuard; // TODO, check the process id ::com::sun::star::uno::Any aRet; @@ -107,11 +104,6 @@ Sequence< Type > VCLXTopWindow_Base::getTypes() throw(RuntimeException) { aRet <<= (sal_Int32)pSysData->hWnd; } -#elif (defined OS2) - if( SystemType == ::com::sun::star::lang::SystemDependent::SYSTEM_OS2 ) - { - aRet <<= (sal_Int32)pSysData->hWnd; - } #elif (defined QUARTZ) if( SystemType == ::com::sun::star::lang::SystemDependent::SYSTEM_MAC ) { @@ -133,21 +125,21 @@ Sequence< Type > VCLXTopWindow_Base::getTypes() throw(RuntimeException) void VCLXTopWindow_Base::addTopWindowListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTopWindowListener >& rxListener ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutexImpl() ); + SolarMutexGuard aGuard; GetTopWindowListenersImpl().addInterface( rxListener ); } void VCLXTopWindow_Base::removeTopWindowListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTopWindowListener >& rxListener ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutexImpl() ); + SolarMutexGuard aGuard; GetTopWindowListenersImpl().removeInterface( rxListener ); } void VCLXTopWindow_Base::toFront( ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutexImpl() ); + SolarMutexGuard aGuard; Window* pWindow = GetWindowImpl(); if ( pWindow ) @@ -156,21 +148,11 @@ void VCLXTopWindow_Base::toFront( ) throw(::com::sun::star::uno::RuntimeExcepti void VCLXTopWindow_Base::toBack( ) throw(::com::sun::star::uno::RuntimeException) { -#if 0 // Not possible in VCL... - - ::vos::OGuard aGuard( GetMutexImpl() ); - - Window* pWindow = GetWindowImpl(); - if ( pWindow ) - { - ((WorkWindow*)pWindow)->ToBack(); - } -#endif } void VCLXTopWindow_Base::setMenuBar( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMenuBar >& rxMenu ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutexImpl() ); + SolarMutexGuard aGuard; SystemWindow* pWindow = (SystemWindow*) GetWindowImpl(); if ( pWindow ) @@ -189,7 +171,7 @@ void VCLXTopWindow_Base::setMenuBar( const ::com::sun::star::uno::Reference< ::c //-------------------------------------------------------------------- ::sal_Bool SAL_CALL VCLXTopWindow_Base::getIsMaximized() throw (RuntimeException) { - ::vos::OGuard aGuard( GetMutexImpl() ); + SolarMutexGuard aGuard; const WorkWindow* pWindow = dynamic_cast< const WorkWindow* >( GetWindowImpl() ); if ( !pWindow ) @@ -201,7 +183,7 @@ void VCLXTopWindow_Base::setMenuBar( const ::com::sun::star::uno::Reference< ::c //-------------------------------------------------------------------- void SAL_CALL VCLXTopWindow_Base::setIsMaximized( ::sal_Bool _ismaximized ) throw (RuntimeException) { - ::vos::OGuard aGuard( GetMutexImpl() ); + SolarMutexGuard aGuard; WorkWindow* pWindow = dynamic_cast< WorkWindow* >( GetWindowImpl() ); if ( !pWindow ) @@ -213,7 +195,7 @@ void SAL_CALL VCLXTopWindow_Base::setIsMaximized( ::sal_Bool _ismaximized ) thro //-------------------------------------------------------------------- ::sal_Bool SAL_CALL VCLXTopWindow_Base::getIsMinimized() throw (RuntimeException) { - ::vos::OGuard aGuard( GetMutexImpl() ); + SolarMutexGuard aGuard; const WorkWindow* pWindow = dynamic_cast< const WorkWindow* >( GetWindowImpl() ); if ( !pWindow ) @@ -225,7 +207,7 @@ void SAL_CALL VCLXTopWindow_Base::setIsMaximized( ::sal_Bool _ismaximized ) thro //-------------------------------------------------------------------- void SAL_CALL VCLXTopWindow_Base::setIsMinimized( ::sal_Bool _isMinimized ) throw (RuntimeException) { - ::vos::OGuard aGuard( GetMutexImpl() ); + SolarMutexGuard aGuard; WorkWindow* pWindow = dynamic_cast< WorkWindow* >( GetWindowImpl() ); if ( !pWindow ) @@ -237,7 +219,7 @@ void SAL_CALL VCLXTopWindow_Base::setIsMinimized( ::sal_Bool _isMinimized ) thro //-------------------------------------------------------------------- ::sal_Int32 SAL_CALL VCLXTopWindow_Base::getDisplay() throw (RuntimeException) { - ::vos::OGuard aGuard( GetMutexImpl() ); + SolarMutexGuard aGuard; const SystemWindow* pWindow = dynamic_cast< const SystemWindow* >( GetWindowImpl() ); if ( !pWindow ) @@ -249,7 +231,7 @@ void SAL_CALL VCLXTopWindow_Base::setIsMinimized( ::sal_Bool _isMinimized ) thro //-------------------------------------------------------------------- void SAL_CALL VCLXTopWindow_Base::setDisplay( ::sal_Int32 _display ) throw (RuntimeException, IndexOutOfBoundsException) { - ::vos::OGuard aGuard( GetMutexImpl() ); + SolarMutexGuard aGuard; if ( ( _display < 0 ) || ( _display >= (sal_Int32)Application::GetScreenCount() ) ) throw IndexOutOfBoundsException(); @@ -279,11 +261,6 @@ VCLXTopWindow::~VCLXTopWindow() { } -vos::IMutex& VCLXTopWindow::GetMutexImpl() -{ - return VCLXContainer::GetMutex(); -} - Window* VCLXTopWindow::GetWindowImpl() { return VCLXContainer::GetWindow(); @@ -343,3 +320,5 @@ Window* VCLXTopWindow::GetWindowImpl() { return ::comphelper::concatSequences( VCLXTopWindow_Base::getTypes(), VCLXContainer::getTypes() ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx index 669b49e29313..def82b41ee9b 100644 --- a/toolkit/source/awt/vclxwindow.cxx +++ b/toolkit/source/awt/vclxwindow.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -66,7 +67,6 @@ #include <vcl/button.hxx> #include <comphelper/asyncnotification.hxx> #include <comphelper/flagguard.hxx> -#include <toolkit/helper/solarrelease.hxx> #include "stylesettings.hxx" #include <tools/urlobj.hxx> #include <toolkit/helper/unopropertyarrayhelper.hxx> @@ -93,8 +93,6 @@ using ::com::sun::star::style::VerticalAlignment_MAKE_FIXED_SIZE; namespace WritingMode2 = ::com::sun::star::text::WritingMode2; namespace MouseWheelBehavior = ::com::sun::star::awt::MouseWheelBehavior; -using ::toolkit::ReleaseSolarMutex; - //==================================================================== //= VCLXWindowImpl //==================================================================== @@ -105,7 +103,6 @@ private: private: VCLXWindow& mrAntiImpl; - ::vos::IMutex& mrMutex; ::toolkit::AccessibilityClient maAccFactory; bool mbDisposed; bool mbDrawingOntoParent; // no bit mask, is passed around by reference @@ -158,7 +155,7 @@ public: the <type>VCLXWindow</type> instance which the object belongs to. Must live longer then the object just being constructed. */ - VCLXWindowImpl( VCLXWindow& _rAntiImpl, ::vos::IMutex& _rMutex, bool _bWithDefaultProps ); + VCLXWindowImpl( VCLXWindow& _rAntiImpl, bool _bWithDefaultProps ); /** synchronously mbEnableVisible */ @@ -214,9 +211,8 @@ private: }; //-------------------------------------------------------------------- -VCLXWindowImpl::VCLXWindowImpl( VCLXWindow& _rAntiImpl, ::vos::IMutex& _rMutex, bool _bWithDefaultProps ) +VCLXWindowImpl::VCLXWindowImpl( VCLXWindow& _rAntiImpl, bool _bWithDefaultProps ) :mrAntiImpl( _rAntiImpl ) - ,mrMutex( _rMutex ) ,mbDisposed( false ) ,mbDrawingOntoParent( false ) ,mbEnableVisible(sal_True) @@ -253,7 +249,7 @@ VCLXWindowImpl::~VCLXWindowImpl() //-------------------------------------------------------------------- void VCLXWindowImpl::disposing() { - ::vos::OGuard aGuard( mrMutex ); + SolarMutexGuard aGuard; if ( mnCallbackEventId ) Application::RemoveUserEvent( mnCallbackEventId ); mnCallbackEventId = 0; @@ -263,6 +259,7 @@ void VCLXWindowImpl::disposing() ::com::sun::star::lang::EventObject aEvent; aEvent.Source = mrAntiImpl; + maDockableWindowListeners.disposeAndClear( aEvent ); maEventListeners.disposeAndClear( aEvent ); maFocusListeners.disposeAndClear( aEvent ); maWindowListeners.disposeAndClear( aEvent ); @@ -300,7 +297,7 @@ IMPL_LINK( VCLXWindowImpl, OnProcessCallbacks, void*, EMPTYARG ) // work on a copy of the callback array CallbackArray aCallbacksCopy; { - ::vos::OGuard aGuard( mrMutex ); + SolarMutexGuard aGuard; aCallbacksCopy = maCallbackEvents; maCallbackEvents.clear(); @@ -315,7 +312,7 @@ IMPL_LINK( VCLXWindowImpl, OnProcessCallbacks, void*, EMPTYARG ) } { - ReleaseSolarMutex aReleaseSolar( ReleaseSolarMutex::RescheduleDuringAcquire ); + SolarMutexReleaser aReleaseSolar( SolarMutexReleaser::RescheduleDuringAcquire ); for ( CallbackArray::const_iterator loop = aCallbacksCopy.begin(); loop != aCallbacksCopy.end(); ++loop @@ -343,11 +340,11 @@ void SAL_CALL VCLXWindowImpl::release() //-------------------------------------------------------------------- Reference< XStyleSettings > VCLXWindowImpl::getStyleSettings() { - ::vos::OGuard aGuard( mrMutex ); + SolarMutexGuard aGuard; if ( mbDisposed ) throw DisposedException( ::rtl::OUString(), mrAntiImpl ); if ( !mxWindowStyleSettings.is() ) - mxWindowStyleSettings = new ::toolkit::WindowStyleSettings( mrMutex, maListenerContainerMutex, mrAntiImpl ); + mxWindowStyleSettings = new ::toolkit::WindowStyleSettings( maListenerContainerMutex, mrAntiImpl ); return mxWindowStyleSettings; } @@ -381,7 +378,7 @@ VCLXWindow::VCLXWindow( bool _bWithDefaultProps ) { DBG_CTOR( VCLXWindow, 0 ); - mpImpl = new VCLXWindowImpl( *this, GetMutex(), _bWithDefaultProps ); + mpImpl = new VCLXWindowImpl( *this, _bWithDefaultProps ); } VCLXWindow::~VCLXWindow() @@ -426,7 +423,6 @@ void VCLXWindow::SetWindow( Window* pWindow ) sal_Bool bDirectVisible = pWindow ? pWindow->IsVisible() : false; mpImpl->setDirectVisible( bDirectVisible ); } - } void VCLXWindow::suspendVclEventListening( ) @@ -725,7 +721,6 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) // handles a context menu command as special case of a mouse event, which is simply wrong. // Without extending the API, we would not have another chance to notify listeners of a // keyboard-triggered context menu request - // 102205 - 16.08.2002 - fs@openoffice.org aWhere = Point( -1, -1 ); } @@ -920,7 +915,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) uno::Reference< accessibility::XAccessibleContext > VCLXWindow::CreateAccessibleContext() { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; return getAccessibleFactory().createAccessibleContext( this ); } @@ -956,7 +951,7 @@ IMPL_XUNOTUNNEL2( VCLXWindow, VCLXDevice ) // ::com::sun::star::lang::Component void VCLXWindow::dispose( ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; mpImpl->mxViewGraphics = NULL; @@ -985,7 +980,7 @@ void VCLXWindow::dispose( ) throw(::com::sun::star::uno::RuntimeException) } catch ( const ::com::sun::star::uno::Exception& ) { - DBG_ERROR( "VCLXWindow::dispose: could not dispose the accessible context!" ); + OSL_FAIL( "VCLXWindow::dispose: could not dispose the accessible context!" ); } mpImpl->mxAccessibleContext.clear(); @@ -995,14 +990,14 @@ void VCLXWindow::dispose( ) throw(::com::sun::star::uno::RuntimeException) void VCLXWindow::addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& rxListener ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; mpImpl->getEventListeners().addInterface( rxListener ); } void VCLXWindow::removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& rxListener ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; mpImpl->getEventListeners().removeInterface( rxListener ); } @@ -1011,7 +1006,7 @@ void VCLXWindow::removeEventListener( const ::com::sun::star::uno::Reference< :: // ::com::sun::star::awt::XWindow void VCLXWindow::setPosSize( sal_Int32 X, sal_Int32 Y, sal_Int32 Width, sal_Int32 Height, sal_Int16 Flags ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if ( GetWindow() ) { @@ -1024,7 +1019,7 @@ void VCLXWindow::setPosSize( sal_Int32 X, sal_Int32 Y, sal_Int32 Width, sal_Int3 ::com::sun::star::awt::Rectangle VCLXWindow::getPosSize( ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::awt::Rectangle aBounds; if ( GetWindow() ) @@ -1040,7 +1035,7 @@ void VCLXWindow::setPosSize( sal_Int32 X, sal_Int32 Y, sal_Int32 Width, sal_Int3 void VCLXWindow::setVisible( sal_Bool bVisible ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Window* pWindow = GetWindow(); if ( pWindow ) @@ -1065,7 +1060,7 @@ void VCLXWindow::setVisible( sal_Bool bVisible ) throw(::com::sun::star::uno::Ru void VCLXWindow::setEnable( sal_Bool bEnable ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Window* pWindow = GetWindow(); if ( pWindow ) @@ -1077,7 +1072,7 @@ void VCLXWindow::setEnable( sal_Bool bEnable ) throw(::com::sun::star::uno::Runt void VCLXWindow::setFocus( ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if ( GetWindow() ) GetWindow()->GrabFocus(); @@ -1085,7 +1080,7 @@ void VCLXWindow::setFocus( ) throw(::com::sun::star::uno::RuntimeException) void VCLXWindow::addWindowListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowListener >& rxListener ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; mpImpl->getWindowListeners().addInterface( rxListener ); @@ -1100,7 +1095,7 @@ void VCLXWindow::addWindowListener( const ::com::sun::star::uno::Reference< ::co void VCLXWindow::removeWindowListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowListener >& rxListener ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Reference< XWindowListener2 > xListener2( rxListener, UNO_QUERY ); if ( xListener2.is() ) @@ -1111,61 +1106,61 @@ void VCLXWindow::removeWindowListener( const ::com::sun::star::uno::Reference< : void VCLXWindow::addFocusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& rxListener ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; mpImpl->getFocusListeners().addInterface( rxListener ); } void VCLXWindow::removeFocusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& rxListener ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; mpImpl->getFocusListeners().removeInterface( rxListener ); } void VCLXWindow::addKeyListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XKeyListener >& rxListener ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; mpImpl->getKeyListeners().addInterface( rxListener ); } void VCLXWindow::removeKeyListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XKeyListener >& rxListener ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; mpImpl->getKeyListeners().removeInterface( rxListener ); } void VCLXWindow::addMouseListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseListener >& rxListener ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; mpImpl->getMouseListeners().addInterface( rxListener ); } void VCLXWindow::removeMouseListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseListener >& rxListener ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; mpImpl->getMouseListeners().removeInterface( rxListener ); } void VCLXWindow::addMouseMotionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseMotionListener >& rxListener ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; mpImpl->getMouseMotionListeners().addInterface( rxListener ); } void VCLXWindow::removeMouseMotionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseMotionListener >& rxListener ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; mpImpl->getMouseMotionListeners().removeInterface( rxListener ); } void VCLXWindow::addPaintListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPaintListener >& rxListener ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; mpImpl->getPaintListeners().addInterface( rxListener ); } void VCLXWindow::removePaintListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPaintListener >& rxListener ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; mpImpl->getPaintListeners().removeInterface( rxListener ); } @@ -1179,7 +1174,7 @@ void VCLXWindow::removePaintListener( const ::com::sun::star::uno::Reference< :: void VCLXWindow::setPointer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPointer >& rxPointer ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; VCLXPointer* pPointer = VCLXPointer::GetImplementation( rxPointer ); if ( pPointer ) @@ -1192,7 +1187,7 @@ void VCLXWindow::setPointer( const ::com::sun::star::uno::Reference< ::com::sun: void VCLXWindow::setBackground( sal_Int32 nColor ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if ( GetWindow() ) { @@ -1212,7 +1207,7 @@ void VCLXWindow::setBackground( sal_Int32 nColor ) throw(::com::sun::star::uno:: void VCLXWindow::invalidate( sal_Int16 nInvalidateFlags ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if ( GetWindow() ) GetWindow()->Invalidate( (sal_uInt16) nInvalidateFlags ); @@ -1220,7 +1215,7 @@ void VCLXWindow::invalidate( sal_Int16 nInvalidateFlags ) throw(::com::sun::star void VCLXWindow::invalidateRect( const ::com::sun::star::awt::Rectangle& rRect, sal_Int16 nInvalidateFlags ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if ( GetWindow() ) GetWindow()->Invalidate( VCLRectangle(rRect), (sal_uInt16) nInvalidateFlags ); @@ -1230,7 +1225,7 @@ void VCLXWindow::invalidateRect( const ::com::sun::star::awt::Rectangle& rRect, // ::com::sun::star::awt::XVclWindowPeer sal_Bool VCLXWindow::isChild( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& rxPeer ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; sal_Bool bIsChild = sal_False; Window* pWindow = GetWindow(); @@ -1245,20 +1240,20 @@ sal_Bool VCLXWindow::isChild( const ::com::sun::star::uno::Reference< ::com::sun void VCLXWindow::setDesignMode( sal_Bool bOn ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; mpImpl->mbDesignMode = bOn; } sal_Bool VCLXWindow::isDesignMode( ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; return mpImpl->mbDesignMode; } void VCLXWindow::enableClipSiblings( sal_Bool bClip ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if ( GetWindow() ) GetWindow()->EnableClipSiblings( bClip ); @@ -1266,7 +1261,7 @@ void VCLXWindow::enableClipSiblings( sal_Bool bClip ) throw(::com::sun::star::un void VCLXWindow::setForeground( sal_Int32 nColor ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if ( GetWindow() ) { @@ -1277,7 +1272,7 @@ void VCLXWindow::setForeground( sal_Int32 nColor ) throw(::com::sun::star::uno:: void VCLXWindow::setControlFont( const ::com::sun::star::awt::FontDescriptor& rFont ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if ( GetWindow() ) GetWindow()->SetControlFont( VCLUnoHelper::CreateFont( rFont, GetWindow()->GetControlFont() ) ); @@ -1285,7 +1280,7 @@ void VCLXWindow::setControlFont( const ::com::sun::star::awt::FontDescriptor& rF void VCLXWindow::getStyles( sal_Int16 nType, ::com::sun::star::awt::FontDescriptor& Font, sal_Int32& ForegroundColor, sal_Int32& BackgroundColor ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if ( GetWindow() ) { @@ -1307,7 +1302,7 @@ void VCLXWindow::getStyles( sal_Int16 nType, ::com::sun::star::awt::FontDescript BackgroundColor = rStyleSettings.GetDialogColor().GetColor(); } break; - default: DBG_ERROR( "VCLWindow::getStyles() - unknown Type" ); + default: OSL_FAIL( "VCLWindow::getStyles() - unknown Type" ); } } @@ -1369,7 +1364,7 @@ void VCLXWindow::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds, bool bWithDe // lovely hack from: // void UnoControlModel::ImplRegisterProperty( sal_uInt16 nPropId ) std::list< sal_uInt16 >::const_iterator iter; - for( iter = rIds.begin(); iter != rIds.end(); iter++) { + for( iter = rIds.begin(); iter != rIds.end(); ++iter) { if( *iter == BASEPROPERTY_FONTDESCRIPTOR ) { // some properties are not included in the FontDescriptor, but everytime @@ -1430,7 +1425,7 @@ namespace } break; default: - OSL_ENSURE( false, "lcl_updateWritingMode: unsupported WritingMode!" ); + OSL_FAIL( "lcl_updateWritingMode: unsupported WritingMode!" ); } // switch ( nWritingMode ) _rWindow.EnableRTL( bEnableRTL ); @@ -1439,7 +1434,7 @@ namespace void VCLXWindow::setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Window* pWindow = GetWindow(); if ( !pWindow ) @@ -1495,10 +1490,10 @@ void VCLXWindow::setProperty( const ::rtl::OUString& PropertyName, const ::com:: case MouseWheelBehavior::SCROLL_FOCUS_ONLY: nVclBehavior = MOUSE_WHEEL_FOCUS_ONLY; break; case MouseWheelBehavior::SCROLL_ALWAYS: nVclBehavior = MOUSE_WHEEL_ALWAYS; break; default: - OSL_ENSURE( false, "VCLXWindow::setProperty( 'MouseWheelBehavior' ): illegal property value!" ); + OSL_FAIL( "VCLXWindow::setProperty( 'MouseWheelBehavior' ): illegal property value!" ); } - aMouseSettings.SetWheelBehavior( nWheelBehavior ); + aMouseSettings.SetWheelBehavior( nVclBehavior ); aSettings.SetMouseSettings( aMouseSettings ); pWindow->SetSettings( aSettings, sal_True ); } @@ -1966,7 +1961,7 @@ void VCLXWindow::setProperty( const ::rtl::OUString& PropertyName, const ::com:: ::com::sun::star::uno::Any VCLXWindow::getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::uno::Any aProp; if ( GetWindow() ) @@ -2006,7 +2001,7 @@ void VCLXWindow::setProperty( const ::rtl::OUString& PropertyName, const ::com:: case MOUSE_WHEEL_FOCUS_ONLY: nBehavior = MouseWheelBehavior::SCROLL_FOCUS_ONLY; break; case MOUSE_WHEEL_ALWAYS: nBehavior = MouseWheelBehavior::SCROLL_ALWAYS; break; default: - OSL_ENSURE( false, "VCLXWindow::getProperty( 'MouseWheelBehavior' ): illegal VCL value!" ); + OSL_FAIL( "VCLXWindow::getProperty( 'MouseWheelBehavior' ): illegal VCL value!" ); } aProp <<= nBehavior; } @@ -2195,7 +2190,7 @@ void VCLXWindow::setProperty( const ::rtl::OUString& PropertyName, const ::com:: // ::com::sun::star::awt::XLayoutConstrains ::com::sun::star::awt::Size VCLXWindow::getMinimumSize( ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; // Diese Methode sollte nur fuer Componenten gerufen werden, die zwar // ueber das ::com::sun::star::awt::Toolkit erzeugt werden koennen, aber fuer die es @@ -2239,7 +2234,7 @@ void VCLXWindow::setProperty( const ::rtl::OUString& PropertyName, const ::com:: ::com::sun::star::awt::Size VCLXWindow::calcAdjustedSize( const ::com::sun::star::awt::Size& rNewSize ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::awt::Size aNewSize( rNewSize ); ::com::sun::star::awt::Size aMinSize = getMinimumSize(); @@ -2256,7 +2251,7 @@ void VCLXWindow::setProperty( const ::rtl::OUString& PropertyName, const ::com:: // ::com::sun::star::awt::XView sal_Bool VCLXWindow::setGraphics( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XGraphics >& rxDevice ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if ( VCLUnoHelper::GetOutputDevice( rxDevice ) ) mpImpl->mxViewGraphics = rxDevice; @@ -2268,14 +2263,14 @@ sal_Bool VCLXWindow::setGraphics( const ::com::sun::star::uno::Reference< ::com: ::com::sun::star::uno::Reference< ::com::sun::star::awt::XGraphics > VCLXWindow::getGraphics( ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; return mpImpl->mxViewGraphics; } ::com::sun::star::awt::Size VCLXWindow::getSize( ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Size aSz; if ( GetWindow() ) @@ -2285,7 +2280,7 @@ sal_Bool VCLXWindow::setGraphics( const ::com::sun::star::uno::Reference< ::com: void VCLXWindow::draw( sal_Int32 nX, sal_Int32 nY ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Window* pWindow = GetWindow(); if ( !pWindow ) @@ -2381,7 +2376,7 @@ void VCLXWindow::draw( sal_Int32 nX, sal_Int32 nY ) throw(::com::sun::star::uno: void VCLXWindow::setZoom( float fZoomX, float /*fZoomY*/ ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if ( GetWindow() ) { @@ -2397,7 +2392,7 @@ void VCLXWindow::setZoom( float fZoomX, float /*fZoomY*/ ) throw(::com::sun::sta // ::com::sun::star::lang::XEventListener void SAL_CALL VCLXWindow::disposing( const ::com::sun::star::lang::EventObject& _rSource ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; // check if it comes from our AccessibleContext uno::Reference< uno::XInterface > aAC( mpImpl->mxAccessibleContext, uno::UNO_QUERY ); @@ -2414,7 +2409,7 @@ void SAL_CALL VCLXWindow::disposing( const ::com::sun::star::lang::EventObject& { using namespace ::com::sun::star; - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; // already disposed if( ! mpImpl ) @@ -2438,7 +2433,7 @@ void SAL_CALL VCLXWindow::disposing( const ::com::sun::star::lang::EventObject& // ::com::sun::star::awt::XDockable void SAL_CALL VCLXWindow::addDockableWindowListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDockableWindowListener >& xListener ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if ( xListener.is() ) mpImpl->getDockableWindowListeners().addInterface( xListener ); @@ -2447,14 +2442,14 @@ void SAL_CALL VCLXWindow::addDockableWindowListener( const ::com::sun::star::uno void SAL_CALL VCLXWindow::removeDockableWindowListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDockableWindowListener >& xListener ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; mpImpl->getDockableWindowListeners().removeInterface( xListener ); } void SAL_CALL VCLXWindow::enableDocking( sal_Bool bEnable ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Window* pWindow = GetWindow(); if ( pWindow ) @@ -2463,7 +2458,7 @@ void SAL_CALL VCLXWindow::enableDocking( sal_Bool bEnable ) throw (::com::sun::s sal_Bool SAL_CALL VCLXWindow::isFloating( ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Window* pWindow = GetWindow(); if( pWindow ) @@ -2474,7 +2469,7 @@ sal_Bool SAL_CALL VCLXWindow::isFloating( ) throw (::com::sun::star::uno::Runti void SAL_CALL VCLXWindow::setFloatingMode( sal_Bool bFloating ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Window* pWindow = GetWindow(); if( pWindow ) @@ -2483,7 +2478,7 @@ void SAL_CALL VCLXWindow::setFloatingMode( sal_Bool bFloating ) throw (::com::su sal_Bool SAL_CALL VCLXWindow::isLocked( ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Window* pWindow = GetWindow(); if( pWindow ) @@ -2494,7 +2489,7 @@ sal_Bool SAL_CALL VCLXWindow::isLocked( ) throw (::com::sun::star::uno::Runtime void SAL_CALL VCLXWindow::lock( ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Window* pWindow = GetWindow(); if( pWindow && !Window::GetDockingManager()->IsFloating( pWindow ) ) @@ -2503,7 +2498,7 @@ void SAL_CALL VCLXWindow::lock( ) throw (::com::sun::star::uno::RuntimeExceptio void SAL_CALL VCLXWindow::unlock( ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Window* pWindow = GetWindow(); if( pWindow && !Window::GetDockingManager()->IsFloating( pWindow ) ) @@ -2512,14 +2507,14 @@ void SAL_CALL VCLXWindow::unlock( ) throw (::com::sun::star::uno::RuntimeExcept void SAL_CALL VCLXWindow::startPopupMode( const ::com::sun::star::awt::Rectangle& ) throw (::com::sun::star::uno::RuntimeException) { // TODO: remove interface in the next incompatible build - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; } sal_Bool SAL_CALL VCLXWindow::isInPopupMode( ) throw (::com::sun::star::uno::RuntimeException) { // TODO: remove interface in the next incompatible build - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; return sal_False; } @@ -2528,7 +2523,7 @@ sal_Bool SAL_CALL VCLXWindow::isInPopupMode( ) throw (::com::sun::star::uno::Ru void SAL_CALL VCLXWindow::setOutputSize( const ::com::sun::star::awt::Size& aSize ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Window *pWindow; if( (pWindow = GetWindow()) != NULL ) { @@ -2542,7 +2537,7 @@ void SAL_CALL VCLXWindow::setOutputSize( const ::com::sun::star::awt::Size& aSiz ::com::sun::star::awt::Size SAL_CALL VCLXWindow::getOutputSize( ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Window *pWindow; if( (pWindow = GetWindow()) != NULL ) { @@ -2558,7 +2553,7 @@ void SAL_CALL VCLXWindow::setOutputSize( const ::com::sun::star::awt::Size& aSiz sal_Bool SAL_CALL VCLXWindow::isVisible( ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if( GetWindow() ) return GetWindow()->IsVisible(); else @@ -2567,7 +2562,7 @@ sal_Bool SAL_CALL VCLXWindow::isVisible( ) throw (::com::sun::star::uno::Runtim sal_Bool SAL_CALL VCLXWindow::isActive( ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if( GetWindow() ) return GetWindow()->IsActive(); else @@ -2577,7 +2572,7 @@ sal_Bool SAL_CALL VCLXWindow::isActive( ) throw (::com::sun::star::uno::Runtime sal_Bool SAL_CALL VCLXWindow::isEnabled( ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if( GetWindow() ) return GetWindow()->IsEnabled(); else @@ -2586,7 +2581,7 @@ sal_Bool SAL_CALL VCLXWindow::isEnabled( ) throw (::com::sun::star::uno::Runtim sal_Bool SAL_CALL VCLXWindow::hasFocus( ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if( GetWindow() ) return GetWindow()->HasFocus(); else @@ -2598,7 +2593,7 @@ sal_Bool SAL_CALL VCLXWindow::hasFocus( ) throw (::com::sun::star::uno::Runtime UnoPropertyArrayHelper * VCLXWindow::GetPropHelper() { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if ( mpImpl->mpPropHelper == NULL ) { std::list< sal_uInt16 > aIDs; @@ -2629,3 +2624,5 @@ Reference< XStyleSettings > SAL_CALL VCLXWindow::getStyleSettings() throw (Runti { return mpImpl->getStyleSettings(); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/vclxwindow1.cxx b/toolkit/source/awt/vclxwindow1.cxx index 3572607772dc..6a9c64ba3c95 100644 --- a/toolkit/source/awt/vclxwindow1.cxx +++ b/toolkit/source/awt/vclxwindow1.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,7 +29,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_toolkit.hxx" -#include <tools/svwin.h> #include <toolkit/awt/vclxwindow.hxx> #include <com/sun/star/beans/NamedValue.hpp> #ifndef _SV_WORKWIN @@ -37,9 +37,8 @@ #include <vcl/window.hxx> #ifdef WNT -#include <tools/prewin.h> -#include <windows.h> -#include <tools/postwin.h> +#include <prewin.h> +#include <postwin.h> #elif defined ( QUARTZ ) #include "premac.h" #include <Cocoa/Cocoa.h> @@ -56,7 +55,7 @@ void VCLXWindow::SetSystemParent_Impl( const com::sun::star::uno::Any& rHandle ) { ::com::sun::star::uno::Exception *pException = new ::com::sun::star::uno::RuntimeException; - pException->Message = ::rtl::OUString::createFromAscii( "not a work window" ); + pException->Message = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("not a work window")); throw pException; } @@ -74,9 +73,9 @@ void VCLXWindow::SetSystemParent_Impl( const com::sun::star::uno::Any& rHandle ) const com::sun::star::beans::NamedValue* pProps = aProps.getConstArray(); for( int i = 0; i < nProps; i++ ) { - if( pProps[i].Name.equalsAscii( "WINDOW" ) ) + if( pProps[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "WINDOW" ) ) ) pProps[i].Value >>= nHandle; - else if( pProps[i].Name.equalsAscii( "XEMBED" ) ) + else if( pProps[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "XEMBED" ) ) ) pProps[i].Value >>= bXEmbed; } } @@ -87,13 +86,13 @@ void VCLXWindow::SetSystemParent_Impl( const com::sun::star::uno::Any& rHandle ) { ::com::sun::star::uno::Exception *pException = new ::com::sun::star::uno::RuntimeException; - pException->Message = ::rtl::OUString::createFromAscii( "incorrect window handle type" ); + pException->Message = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("incorrect window handle type")); throw pException; } // create system parent data SystemParentData aSysParentData; aSysParentData.nSize = sizeof ( SystemParentData ); -#if defined( WNT ) || defined ( OS2 ) +#if defined( WNT ) aSysParentData.hWnd = (HWND) nHandle; #elif defined( QUARTZ ) aSysParentData.pView = reinterpret_cast<NSView*>(nHandle); @@ -106,3 +105,4 @@ void VCLXWindow::SetSystemParent_Impl( const com::sun::star::uno::Any& rHandle ) ((WorkWindow*)pWindow)->SetPluginParent( &aSysParentData ); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx index 2b3bc2b2c01b..1c6d5418dd38 100644 --- a/toolkit/source/awt/vclxwindows.cxx +++ b/toolkit/source/awt/vclxwindows.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -50,9 +51,7 @@ #include <comphelper/namedvaluecollection.hxx> #include <comphelper/processfactory.hxx> -#ifndef _SV_BUTTON_HXX #include <vcl/button.hxx> -#endif #include <vcl/lstbox.hxx> #include <vcl/combobox.hxx> #include <vcl/field.hxx> @@ -226,7 +225,7 @@ void VCLXGraphicControl::ImplSetNewImage() void VCLXGraphicControl::setPosSize( sal_Int32 X, sal_Int32 Y, sal_Int32 Width, sal_Int32 Height, short Flags ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if ( GetWindow() ) { @@ -239,7 +238,7 @@ void VCLXGraphicControl::setPosSize( sal_Int32 X, sal_Int32 Y, sal_Int32 Width, void VCLXGraphicControl::setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Button* pButton = static_cast< Button* >( GetWindow() ); if ( !pButton ) @@ -292,7 +291,7 @@ void VCLXGraphicControl::setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any VCLXGraphicControl::getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::uno::Any aProp; if ( !GetWindow() ) @@ -392,7 +391,7 @@ VCLXButton::~VCLXButton() void VCLXButton::dispose() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::lang::EventObject aObj; aObj.Source = (::cppu::OWeakObject*)this; @@ -403,31 +402,31 @@ void VCLXButton::dispose() throw(::com::sun::star::uno::RuntimeException) void VCLXButton::addActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener > & l )throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; maActionListeners.addInterface( l ); } void VCLXButton::removeActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener > & l ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; maActionListeners.removeInterface( l ); } void VCLXButton::addItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener > & l )throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; maItemListeners.addInterface( l ); } void VCLXButton::removeItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener > & l ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; maItemListeners.removeInterface( l ); } void VCLXButton::setLabel( const ::rtl::OUString& rLabel ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Window* pWindow = GetWindow(); if ( pWindow ) @@ -436,14 +435,14 @@ void VCLXButton::setLabel( const ::rtl::OUString& rLabel ) throw(::com::sun::sta void VCLXButton::setActionCommand( const ::rtl::OUString& rCommand ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; maActionCommand = rCommand; } ::com::sun::star::awt::Size VCLXButton::getMinimumSize( ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Size aSz; PushButton* pButton = (PushButton*) GetWindow(); @@ -462,7 +461,7 @@ void VCLXButton::setActionCommand( const ::rtl::OUString& rCommand ) throw(::com ::com::sun::star::awt::Size VCLXButton::calcAdjustedSize( const ::com::sun::star::awt::Size& rNewSize ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Size aSz = VCLSize(rNewSize); PushButton* pButton = (PushButton*) GetWindow(); @@ -490,7 +489,7 @@ void VCLXButton::setActionCommand( const ::rtl::OUString& rCommand ) throw(::com void VCLXButton::setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Button* pButton = (Button*)GetWindow(); if ( pButton ) @@ -535,7 +534,7 @@ void VCLXButton::setProperty( const ::rtl::OUString& PropertyName, const ::com:: ::com::sun::star::uno::Any VCLXButton::getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::uno::Any aProp; Button* pButton = (Button*)GetWindow(); @@ -584,7 +583,6 @@ void VCLXButton::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) // since we call listeners below, there is a potential that we will be destroyed // during the listener call. To prevent the resulting crashs, we keep us // alive as long as we're here - // #20178# - 2003-10-01 - fs@openoffice.org if ( maActionListeners.getLength() ) { @@ -667,7 +665,7 @@ void VCLXImageControl::ImplSetNewImage() ::com::sun::star::awt::Size VCLXImageControl::getMinimumSize( ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Size aSz = GetImage().GetSizePixel(); aSz = ImplCalcWindowSize( aSz ); @@ -682,7 +680,7 @@ void VCLXImageControl::ImplSetNewImage() ::com::sun::star::awt::Size VCLXImageControl::calcAdjustedSize( const ::com::sun::star::awt::Size& rNewSize ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::awt::Size aSz = rNewSize; ::com::sun::star::awt::Size aMinSz = getMinimumSize(); @@ -695,7 +693,7 @@ void VCLXImageControl::ImplSetNewImage() void VCLXImageControl::setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ImageControl* pImageControl = (ImageControl*)GetWindow(); @@ -731,7 +729,7 @@ void VCLXImageControl::setProperty( const ::rtl::OUString& PropertyName, const : ::com::sun::star::uno::Any VCLXImageControl::getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::uno::Any aProp; ImageControl* pImageControl = (ImageControl*)GetWindow(); @@ -815,7 +813,7 @@ IMPL_XTYPEPROVIDER_END void VCLXCheckBox::dispose() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::lang::EventObject aObj; aObj.Source = (::cppu::OWeakObject*)this; @@ -825,37 +823,37 @@ void VCLXCheckBox::dispose() throw(::com::sun::star::uno::RuntimeException) void VCLXCheckBox::addItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener > & l ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; maItemListeners.addInterface( l ); } void VCLXCheckBox::removeItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener > & l ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; maItemListeners.removeInterface( l ); } void VCLXCheckBox::addActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener > & l )throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; maActionListeners.addInterface( l ); } void VCLXCheckBox::removeActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener > & l ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; maActionListeners.removeInterface( l ); } void VCLXCheckBox::setActionCommand( const ::rtl::OUString& rCommand ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; maActionCommand = rCommand; } void VCLXCheckBox::setLabel( const ::rtl::OUString& rLabel ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Window* pWindow = GetWindow(); if ( pWindow ) @@ -864,7 +862,7 @@ void VCLXCheckBox::setLabel( const ::rtl::OUString& rLabel ) throw(::com::sun::s void VCLXCheckBox::setState( short n ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; CheckBox* pCheckBox = (CheckBox*)GetWindow(); if ( pCheckBox) @@ -892,7 +890,7 @@ void VCLXCheckBox::setState( short n ) throw(::com::sun::star::uno::RuntimeExcep short VCLXCheckBox::getState() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; short nState = -1; CheckBox* pCheckBox = (CheckBox*)GetWindow(); @@ -903,7 +901,7 @@ short VCLXCheckBox::getState() throw(::com::sun::star::uno::RuntimeException) case STATE_NOCHECK: nState = 0; break; case STATE_CHECK: nState = 1; break; case STATE_DONTKNOW: nState = 2; break; - default: DBG_ERROR( "VCLXCheckBox::getState(): unknown TriState!" ); + default: OSL_FAIL( "VCLXCheckBox::getState(): unknown TriState!" ); } } @@ -912,7 +910,7 @@ short VCLXCheckBox::getState() throw(::com::sun::star::uno::RuntimeException) void VCLXCheckBox::enableTriState( sal_Bool b ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; CheckBox* pCheckBox = (CheckBox*)GetWindow(); if ( pCheckBox) @@ -921,7 +919,7 @@ void VCLXCheckBox::enableTriState( sal_Bool b ) throw(::com::sun::star::uno::Run ::com::sun::star::awt::Size VCLXCheckBox::getMinimumSize( ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Size aSz; CheckBox* pCheckBox = (CheckBox*) GetWindow(); @@ -937,7 +935,7 @@ void VCLXCheckBox::enableTriState( sal_Bool b ) throw(::com::sun::star::uno::Run ::com::sun::star::awt::Size VCLXCheckBox::calcAdjustedSize( const ::com::sun::star::awt::Size& rNewSize ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Size aSz = VCLSize(rNewSize); CheckBox* pCheckBox = (CheckBox*) GetWindow(); @@ -954,7 +952,7 @@ void VCLXCheckBox::enableTriState( sal_Bool b ) throw(::com::sun::star::uno::Run void VCLXCheckBox::setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; CheckBox* pCheckBox = (CheckBox*)GetWindow(); if ( pCheckBox ) @@ -990,7 +988,7 @@ void VCLXCheckBox::setProperty( const ::rtl::OUString& PropertyName, const ::com ::com::sun::star::uno::Any VCLXCheckBox::getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::uno::Any aProp; CheckBox* pCheckBox = (CheckBox*)GetWindow(); @@ -1027,7 +1025,6 @@ void VCLXCheckBox::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) // since we call listeners below, there is a potential that we will be destroyed // in during the listener call. To prevent the resulting crashs, we keep us // alive as long as we're here - // #20178# - 2003-10-01 - fs@openoffice.org CheckBox* pCheckBox = (CheckBox*)GetWindow(); if ( pCheckBox ) @@ -1084,6 +1081,7 @@ void VCLXRadioButton::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) BASEPROPERTY_WRITING_MODE, BASEPROPERTY_CONTEXT_WRITING_MODE, BASEPROPERTY_REFERENCE_DEVICE, + BASEPROPERTY_GROUPNAME, 0); VCLXGraphicControl::ImplGetPropertyIds( rIds ); } @@ -1116,7 +1114,7 @@ IMPL_XTYPEPROVIDER_END void VCLXRadioButton::dispose() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::lang::EventObject aObj; aObj.Source = (::cppu::OWeakObject*)this; @@ -1126,7 +1124,7 @@ void VCLXRadioButton::dispose() throw(::com::sun::star::uno::RuntimeException) void VCLXRadioButton::setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; RadioButton* pButton = (RadioButton*)GetWindow(); if ( pButton ) @@ -1168,7 +1166,7 @@ void VCLXRadioButton::setProperty( const ::rtl::OUString& PropertyName, const :: ::com::sun::star::uno::Any VCLXRadioButton::getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::uno::Any aProp; RadioButton* pButton = (RadioButton*)GetWindow(); @@ -1197,31 +1195,31 @@ void VCLXRadioButton::setProperty( const ::rtl::OUString& PropertyName, const :: void VCLXRadioButton::addItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener > & l ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; maItemListeners.addInterface( l ); } void VCLXRadioButton::removeItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener > & l ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; maItemListeners.removeInterface( l ); } void VCLXRadioButton::addActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener > & l )throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; maActionListeners.addInterface( l ); } void VCLXRadioButton::removeActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener > & l ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; maActionListeners.removeInterface( l ); } void VCLXRadioButton::setLabel( const ::rtl::OUString& rLabel ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Window* pWindow = GetWindow(); if ( pWindow ) @@ -1230,13 +1228,13 @@ void VCLXRadioButton::setLabel( const ::rtl::OUString& rLabel ) throw(::com::sun void VCLXRadioButton::setActionCommand( const ::rtl::OUString& rCommand ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; maActionCommand = rCommand; } void VCLXRadioButton::setState( sal_Bool b ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; RadioButton* pRadioButton = (RadioButton*)GetWindow(); if ( pRadioButton) @@ -1255,7 +1253,7 @@ void VCLXRadioButton::setState( sal_Bool b ) throw(::com::sun::star::uno::Runtim sal_Bool VCLXRadioButton::getState() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; RadioButton* pRadioButton = (RadioButton*)GetWindow(); return pRadioButton ? pRadioButton->IsChecked() : sal_False; @@ -1263,7 +1261,7 @@ sal_Bool VCLXRadioButton::getState() throw(::com::sun::star::uno::RuntimeExcepti ::com::sun::star::awt::Size VCLXRadioButton::getMinimumSize( ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Size aSz; RadioButton* pRadioButton = (RadioButton*) GetWindow(); @@ -1279,7 +1277,7 @@ sal_Bool VCLXRadioButton::getState() throw(::com::sun::star::uno::RuntimeExcepti ::com::sun::star::awt::Size VCLXRadioButton::calcAdjustedSize( const ::com::sun::star::awt::Size& rNewSize ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Size aSz = VCLSize(rNewSize); RadioButton* pRadioButton = (RadioButton*) GetWindow(); @@ -1300,7 +1298,6 @@ void VCLXRadioButton::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent // since we call listeners below, there is a potential that we will be destroyed // in during the listener call. To prevent the resulting crashs, we keep us // alive as long as we're here - // #20178# - 2003-10-01 - fs@openoffice.org switch ( rVclWindowEvent.GetId() ) { @@ -1378,19 +1375,19 @@ IMPL_XTYPEPROVIDER_END void VCLXSpinField::addSpinListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XSpinListener > & l ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; maSpinListeners.addInterface( l ); } void VCLXSpinField::removeSpinListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XSpinListener > & l ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; maSpinListeners.removeInterface( l ); } void VCLXSpinField::up() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; SpinField* pSpinField = (SpinField*) GetWindow(); if ( pSpinField ) @@ -1399,7 +1396,7 @@ void VCLXSpinField::up() throw(::com::sun::star::uno::RuntimeException) void VCLXSpinField::down() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; SpinField* pSpinField = (SpinField*) GetWindow(); if ( pSpinField ) @@ -1408,7 +1405,7 @@ void VCLXSpinField::down() throw(::com::sun::star::uno::RuntimeException) void VCLXSpinField::first() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; SpinField* pSpinField = (SpinField*) GetWindow(); if ( pSpinField ) @@ -1417,7 +1414,7 @@ void VCLXSpinField::first() throw(::com::sun::star::uno::RuntimeException) void VCLXSpinField::last() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; SpinField* pSpinField = (SpinField*) GetWindow(); if ( pSpinField ) @@ -1426,7 +1423,7 @@ void VCLXSpinField::last() throw(::com::sun::star::uno::RuntimeException) void VCLXSpinField::enableRepeat( sal_Bool bRepeat ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Window* pWindow = GetWindow(); if ( pWindow ) @@ -1453,7 +1450,6 @@ void VCLXSpinField::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) // since we call listeners below, there is a potential that we will be destroyed // in during the listener call. To prevent the resulting crashs, we keep us // alive as long as we're here - // #20178# - 2003-10-01 - fs@openoffice.org if ( maSpinListeners.getLength() ) { @@ -1525,7 +1521,7 @@ VCLXListBox::VCLXListBox() void VCLXListBox::dispose() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::lang::EventObject aObj; aObj.Source = (::cppu::OWeakObject*)this; @@ -1536,31 +1532,31 @@ void VCLXListBox::dispose() throw(::com::sun::star::uno::RuntimeException) void VCLXListBox::addItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener > & l ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; maItemListeners.addInterface( l ); } void VCLXListBox::removeItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener > & l ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; maItemListeners.removeInterface( l ); } void VCLXListBox::addActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener > & l ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; maActionListeners.addInterface( l ); } void VCLXListBox::removeActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener > & l ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; maActionListeners.removeInterface( l ); } void VCLXListBox::addItem( const ::rtl::OUString& aItem, sal_Int16 nPos ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ListBox* pBox = (ListBox*) GetWindow(); if ( pBox ) @@ -1569,7 +1565,7 @@ void VCLXListBox::addItem( const ::rtl::OUString& aItem, sal_Int16 nPos ) throw( void VCLXListBox::addItems( const ::com::sun::star::uno::Sequence< ::rtl::OUString>& aItems, sal_Int16 nPos ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ListBox* pBox = (ListBox*) GetWindow(); if ( pBox ) @@ -1581,7 +1577,7 @@ void VCLXListBox::addItems( const ::com::sun::star::uno::Sequence< ::rtl::OUStri { if ( (sal_uInt16)nP == 0xFFFF ) { - OSL_ENSURE( false, "VCLXListBox::addItems: too many entries!" ); + OSL_FAIL( "VCLXListBox::addItems: too many entries!" ); // skip remaining entries, list cannot hold them, anyway break; } @@ -1593,7 +1589,7 @@ void VCLXListBox::addItems( const ::com::sun::star::uno::Sequence< ::rtl::OUStri void VCLXListBox::removeItems( sal_Int16 nPos, sal_Int16 nCount ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ListBox* pBox = (ListBox*) GetWindow(); if ( pBox ) @@ -1605,7 +1601,7 @@ void VCLXListBox::removeItems( sal_Int16 nPos, sal_Int16 nCount ) throw(::com::s sal_Int16 VCLXListBox::getItemCount() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ListBox* pBox = (ListBox*) GetWindow(); return pBox ? pBox->GetEntryCount() : 0; @@ -1613,7 +1609,7 @@ sal_Int16 VCLXListBox::getItemCount() throw(::com::sun::star::uno::RuntimeExcept ::rtl::OUString VCLXListBox::getItem( sal_Int16 nPos ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; String aItem; ListBox* pBox = (ListBox*) GetWindow(); @@ -1624,7 +1620,7 @@ sal_Int16 VCLXListBox::getItemCount() throw(::com::sun::star::uno::RuntimeExcept ::com::sun::star::uno::Sequence< ::rtl::OUString> VCLXListBox::getItems() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::uno::Sequence< ::rtl::OUString> aSeq; ListBox* pBox = (ListBox*) GetWindow(); @@ -1643,7 +1639,7 @@ sal_Int16 VCLXListBox::getItemCount() throw(::com::sun::star::uno::RuntimeExcept sal_Int16 VCLXListBox::getSelectedItemPos() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ListBox* pBox = (ListBox*) GetWindow(); return pBox ? pBox->GetSelectEntryPos() : 0; @@ -1651,7 +1647,7 @@ sal_Int16 VCLXListBox::getSelectedItemPos() throw(::com::sun::star::uno::Runtime ::com::sun::star::uno::Sequence<sal_Int16> VCLXListBox::getSelectedItemsPos() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::uno::Sequence<sal_Int16> aSeq; ListBox* pBox = (ListBox*) GetWindow(); @@ -1667,7 +1663,7 @@ sal_Int16 VCLXListBox::getSelectedItemPos() throw(::com::sun::star::uno::Runtime ::rtl::OUString VCLXListBox::getSelectedItem() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; String aItem; ListBox* pBox = (ListBox*) GetWindow(); @@ -1678,7 +1674,7 @@ sal_Int16 VCLXListBox::getSelectedItemPos() throw(::com::sun::star::uno::Runtime ::com::sun::star::uno::Sequence< ::rtl::OUString> VCLXListBox::getSelectedItems() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::uno::Sequence< ::rtl::OUString> aSeq; ListBox* pBox = (ListBox*) GetWindow(); @@ -1694,7 +1690,7 @@ sal_Int16 VCLXListBox::getSelectedItemPos() throw(::com::sun::star::uno::Runtime void VCLXListBox::selectItemPos( sal_Int16 nPos, sal_Bool bSelect ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ListBox* pBox = (ListBox*) GetWindow(); if ( pBox && ( pBox->IsEntryPosSelected( nPos ) != bSelect ) ) @@ -1713,7 +1709,7 @@ void VCLXListBox::selectItemPos( sal_Int16 nPos, sal_Bool bSelect ) throw(::com: void VCLXListBox::selectItemsPos( const ::com::sun::star::uno::Sequence<sal_Int16>& aPositions, sal_Bool bSelect ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ListBox* pBox = (ListBox*) GetWindow(); if ( pBox ) @@ -1744,7 +1740,7 @@ void VCLXListBox::selectItemsPos( const ::com::sun::star::uno::Sequence<sal_Int1 void VCLXListBox::selectItem( const ::rtl::OUString& rItemText, sal_Bool bSelect ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ListBox* pBox = (ListBox*) GetWindow(); if ( pBox ) @@ -1757,7 +1753,7 @@ void VCLXListBox::selectItem( const ::rtl::OUString& rItemText, sal_Bool bSelect void VCLXListBox::setDropDownLineCount( sal_Int16 nLines ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ListBox* pBox = (ListBox*) GetWindow(); if ( pBox ) @@ -1766,7 +1762,7 @@ void VCLXListBox::setDropDownLineCount( sal_Int16 nLines ) throw(::com::sun::sta sal_Int16 VCLXListBox::getDropDownLineCount() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; sal_Int16 nLines = 0; ListBox* pBox = (ListBox*) GetWindow(); @@ -1777,7 +1773,7 @@ sal_Int16 VCLXListBox::getDropDownLineCount() throw(::com::sun::star::uno::Runti sal_Bool VCLXListBox::isMutipleMode() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; sal_Bool bMulti = sal_False; ListBox* pBox = (ListBox*) GetWindow(); @@ -1788,7 +1784,7 @@ sal_Bool VCLXListBox::isMutipleMode() throw(::com::sun::star::uno::RuntimeExcept void VCLXListBox::setMultipleMode( sal_Bool bMulti ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ListBox* pBox = (ListBox*) GetWindow(); if ( pBox ) @@ -1797,7 +1793,7 @@ void VCLXListBox::setMultipleMode( sal_Bool bMulti ) throw(::com::sun::star::uno void VCLXListBox::makeVisible( sal_Int16 nEntry ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ListBox* pBox = (ListBox*) GetWindow(); if ( pBox ) @@ -1810,7 +1806,6 @@ void VCLXListBox::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) // since we call listeners below, there is a potential that we will be destroyed // in during the listener call. To prevent the resulting crashs, we keep us // alive as long as we're here - // #20178# - 2003-10-01 - fs@openoffice.org switch ( rVclWindowEvent.GetId() ) { @@ -1856,14 +1851,14 @@ void VCLXListBox::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > VCLXListBox::CreateAccessibleContext() { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; return getAccessibleFactory().createAccessibleContext( this ); } void VCLXListBox::setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ListBox* pListBox = (ListBox*)GetWindow(); if ( pListBox ) @@ -1940,7 +1935,7 @@ void VCLXListBox::setProperty( const ::rtl::OUString& PropertyName, const ::com: ::com::sun::star::uno::Any VCLXListBox::getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::uno::Any aProp; ListBox* pListBox = (ListBox*)GetWindow(); @@ -1994,7 +1989,7 @@ void VCLXListBox::setProperty( const ::rtl::OUString& PropertyName, const ::com: ::com::sun::star::awt::Size VCLXListBox::getMinimumSize( ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Size aSz; ListBox* pListBox = (ListBox*) GetWindow(); @@ -2005,7 +2000,7 @@ void VCLXListBox::setProperty( const ::rtl::OUString& PropertyName, const ::com: ::com::sun::star::awt::Size VCLXListBox::getPreferredSize( ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Size aSz; ListBox* pListBox = (ListBox*) GetWindow(); @@ -2020,7 +2015,7 @@ void VCLXListBox::setProperty( const ::rtl::OUString& PropertyName, const ::com: ::com::sun::star::awt::Size VCLXListBox::calcAdjustedSize( const ::com::sun::star::awt::Size& rNewSize ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Size aSz = VCLSize(rNewSize); ListBox* pListBox = (ListBox*) GetWindow(); @@ -2031,7 +2026,7 @@ void VCLXListBox::setProperty( const ::rtl::OUString& PropertyName, const ::com: ::com::sun::star::awt::Size VCLXListBox::getMinimumSize( sal_Int16 nCols, sal_Int16 nLines ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Size aSz; ListBox* pListBox = (ListBox*) GetWindow(); @@ -2042,7 +2037,7 @@ void VCLXListBox::setProperty( const ::rtl::OUString& PropertyName, const ::com: void VCLXListBox::getColumnsAndLines( sal_Int16& nCols, sal_Int16& nLines ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; nCols = nLines = 0; ListBox* pListBox = (ListBox*) GetWindow(); @@ -2098,7 +2093,7 @@ namespace } void SAL_CALL VCLXListBox::listItemInserted( const ItemListEvent& i_rEvent ) throw (RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ListBox* pListBox = dynamic_cast< ListBox* >( GetWindow() ); @@ -2113,7 +2108,7 @@ void SAL_CALL VCLXListBox::listItemInserted( const ItemListEvent& i_rEvent ) thr void SAL_CALL VCLXListBox::listItemRemoved( const ItemListEvent& i_rEvent ) throw (RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ListBox* pListBox = dynamic_cast< ListBox* >( GetWindow() ); @@ -2126,7 +2121,7 @@ void SAL_CALL VCLXListBox::listItemRemoved( const ItemListEvent& i_rEvent ) thro void SAL_CALL VCLXListBox::listItemModified( const ItemListEvent& i_rEvent ) throw (RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ListBox* pListBox = dynamic_cast< ListBox* >( GetWindow() ); @@ -2145,7 +2140,7 @@ void SAL_CALL VCLXListBox::listItemModified( const ItemListEvent& i_rEvent ) thr void SAL_CALL VCLXListBox::allItemsRemoved( const EventObject& i_rEvent ) throw (RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ListBox* pListBox = dynamic_cast< ListBox* >( GetWindow() ); ENSURE_OR_RETURN_VOID( pListBox, "VCLXListBox::listItemModified: no ListBox?!" ); @@ -2157,7 +2152,7 @@ void SAL_CALL VCLXListBox::allItemsRemoved( const EventObject& i_rEvent ) throw void SAL_CALL VCLXListBox::itemListChanged( const EventObject& i_rEvent ) throw (RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ListBox* pListBox = dynamic_cast< ListBox* >( GetWindow() ); ENSURE_OR_RETURN_VOID( pListBox, "VCLXListBox::listItemModified: no ListBox?!" ); @@ -2228,7 +2223,7 @@ IMPL_XTYPEPROVIDER_END void VCLXMessageBox::setCaptionText( const ::rtl::OUString& rText ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Window* pWindow = GetWindow(); if ( pWindow ) @@ -2237,7 +2232,7 @@ void VCLXMessageBox::setCaptionText( const ::rtl::OUString& rText ) throw(::com: ::rtl::OUString VCLXMessageBox::getCaptionText() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; String aText; Window* pWindow = GetWindow(); @@ -2248,7 +2243,7 @@ void VCLXMessageBox::setCaptionText( const ::rtl::OUString& rText ) throw(::com: void VCLXMessageBox::setMessageText( const ::rtl::OUString& rText ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; MessBox* pBox = (MessBox*)GetWindow(); if ( pBox ) @@ -2257,7 +2252,7 @@ void VCLXMessageBox::setMessageText( const ::rtl::OUString& rText ) throw(::com: ::rtl::OUString VCLXMessageBox::getMessageText() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::rtl::OUString aText; MessBox* pBox = (MessBox*)GetWindow(); @@ -2268,7 +2263,7 @@ void VCLXMessageBox::setMessageText( const ::rtl::OUString& rText ) throw(::com: sal_Int16 VCLXMessageBox::execute() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; MessBox* pBox = (MessBox*)GetWindow(); return pBox ? pBox->Execute() : 0; @@ -2276,7 +2271,7 @@ sal_Int16 VCLXMessageBox::execute() throw(::com::sun::star::uno::RuntimeExceptio ::com::sun::star::awt::Size SAL_CALL VCLXMessageBox::getMinimumSize() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; return ::com::sun::star::awt::Size( 250, 100 ); } @@ -2290,6 +2285,7 @@ void VCLXDialog::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) VCLXDialog::VCLXDialog() { + OSL_TRACE("XDialog created"); } VCLXDialog::~VCLXDialog() @@ -2303,6 +2299,7 @@ VCLXDialog::~VCLXDialog() ::com::sun::star::uno::Any VCLXDialog::queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { ::com::sun::star::uno::Any aRet = ::cppu::queryInterface( rType, + SAL_STATIC_CAST( ::com::sun::star::document::XVbaMethodParameter*, this ), SAL_STATIC_CAST( ::com::sun::star::awt::XDialog2*, this ), SAL_STATIC_CAST( ::com::sun::star::awt::XDialog*, this ) ); return (aRet.hasValue() ? aRet : VCLXTopWindow::queryInterface( rType )); @@ -2310,6 +2307,7 @@ VCLXDialog::~VCLXDialog() // ::com::sun::star::lang::XTypeProvider IMPL_XTYPEPROVIDER_START( VCLXDialog ) + getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::document::XVbaMethodParameter>* ) NULL ), getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDialog2>* ) NULL ), getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDialog>* ) NULL ), VCLXTopWindow::getTypes() @@ -2317,7 +2315,7 @@ IMPL_XTYPEPROVIDER_END void SAL_CALL VCLXDialog::endDialog( ::sal_Int32 i_result ) throw (RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Dialog* pDialog = dynamic_cast< Dialog* >( GetWindow() ); if ( pDialog ) @@ -2326,7 +2324,7 @@ void SAL_CALL VCLXDialog::endDialog( ::sal_Int32 i_result ) throw (RuntimeExcept void SAL_CALL VCLXDialog::setHelpId( const ::rtl::OUString& rId ) throw (RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Window* pWindow = GetWindow(); if ( pWindow ) @@ -2335,7 +2333,7 @@ void SAL_CALL VCLXDialog::setHelpId( const ::rtl::OUString& rId ) throw (Runtime void VCLXDialog::setTitle( const ::rtl::OUString& Title ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Window* pWindow = GetWindow(); if ( pWindow ) @@ -2344,7 +2342,7 @@ void VCLXDialog::setTitle( const ::rtl::OUString& Title ) throw(::com::sun::star ::rtl::OUString VCLXDialog::getTitle() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::rtl::OUString aTitle; Window* pWindow = GetWindow(); @@ -2355,7 +2353,7 @@ void VCLXDialog::setTitle( const ::rtl::OUString& Title ) throw(::com::sun::star sal_Int16 VCLXDialog::execute() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; sal_Int16 nRet = 0; if ( GetWindow() ) @@ -2392,7 +2390,7 @@ void VCLXDialog::endExecute() throw(::com::sun::star::uno::RuntimeException) void SAL_CALL VCLXDialog::draw( sal_Int32 nX, sal_Int32 nY ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Window* pWindow = GetWindow(); if ( pWindow ) @@ -2412,7 +2410,7 @@ void SAL_CALL VCLXDialog::draw( sal_Int32 nX, sal_Int32 nY ) throw(::com::sun::s { ::com::sun::star::awt::DeviceInfo aInfo = VCLXDevice::getInfo(); - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Dialog* pDlg = (Dialog*) GetWindow(); if ( pDlg ) pDlg->GetDrawWindowBorder( aInfo.LeftInset, aInfo.TopInset, aInfo.RightInset, aInfo.BottomInset ); @@ -2420,13 +2418,42 @@ void SAL_CALL VCLXDialog::draw( sal_Int32 nX, sal_Int32 nY ) throw(::com::sun::s return aInfo; } +// ::com::sun::star::document::XVbaMethodParameter +void SAL_CALL VCLXDialog::setVbaMethodParameter( + const ::rtl::OUString& PropertyName, + const ::com::sun::star::uno::Any& Value ) +throw(::com::sun::star::uno::RuntimeException) +{ + if (rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Cancel")) == PropertyName) + { + SolarMutexGuard aGuard; + if ( GetWindow() ) + { + sal_Int8 nCancel = 0; + Value >>= nCancel; + + Dialog* pDlg = (Dialog*) GetWindow(); + pDlg->SetCloseFlag(nCancel); + } + } +} + +::com::sun::star::uno::Any SAL_CALL VCLXDialog::getVbaMethodParameter( + const ::rtl::OUString& /*PropertyName*/ ) +throw(::com::sun::star::uno::RuntimeException) +{ + SolarMutexGuard aGuard; + + ::com::sun::star::uno::Any aRet; + return aRet; +} void SAL_CALL VCLXDialog::setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Dialog* pDialog = (Dialog*)GetWindow(); if ( pDialog ) @@ -2467,6 +2494,292 @@ throw(::com::sun::star::uno::RuntimeException) } } + +// ---------------------------------------------------- +// class VCLXTabPage +// ---------------------------------------------------- +VCLXMultiPage::VCLXMultiPage() : maTabListeners( *this ), mTabId( 1 ) +{ + OSL_TRACE("VCLXMultiPage::VCLXMultiPage()" ); +} + +void VCLXMultiPage::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) +{ + PushPropertyIds( rIds, + BASEPROPERTY_BACKGROUNDCOLOR, + BASEPROPERTY_DEFAULTCONTROL, + BASEPROPERTY_ENABLED, + BASEPROPERTY_MULTIPAGEVALUE, + BASEPROPERTY_ENABLEVISIBLE, + BASEPROPERTY_FONTDESCRIPTOR, + BASEPROPERTY_GRAPHIC, + BASEPROPERTY_HELPTEXT, + BASEPROPERTY_HELPURL, + BASEPROPERTY_IMAGEALIGN, + BASEPROPERTY_IMAGEPOSITION, + BASEPROPERTY_IMAGEURL, + BASEPROPERTY_PRINTABLE, + BASEPROPERTY_TABSTOP, + BASEPROPERTY_FOCUSONCLICK, + 0); + VCLXContainer::ImplGetPropertyIds( rIds ); +} + +VCLXMultiPage::~VCLXMultiPage() +{ +} +void SAL_CALL VCLXMultiPage::dispose() throw(::com::sun::star::uno::RuntimeException) +{ + SolarMutexGuard aGuard; + + ::com::sun::star::lang::EventObject aObj; + aObj.Source = (::cppu::OWeakObject*)this; + maTabListeners.disposeAndClear( aObj ); + VCLXContainer::dispose(); +} +::com::sun::star::uno::Any SAL_CALL VCLXMultiPage::queryInterface(const ::com::sun::star::uno::Type & rType ) +throw(::com::sun::star::uno::RuntimeException) +{ + uno::Any aRet = ::cppu::queryInterface( rType, static_cast< awt::XSimpleTabController*>( this ) ); + + return ( aRet.hasValue() ? aRet : VCLXContainer::queryInterface( rType ) ); +} + +// ::com::sun::star::lang::XTypeProvider +IMPL_XTYPEPROVIDER_START( VCLXMultiPage ) + VCLXContainer::getTypes() +IMPL_XTYPEPROVIDER_END + +// ::com::sun::star::awt::XView +void SAL_CALL VCLXMultiPage::draw( sal_Int32 nX, sal_Int32 nY ) +throw(::com::sun::star::uno::RuntimeException) +{ + SolarMutexGuard aGuard; + Window* pWindow = GetWindow(); + + if ( pWindow ) + { + OutputDevice* pDev = VCLUnoHelper::GetOutputDevice( getGraphics() ); + if ( !pDev ) + pDev = pWindow->GetParent(); + + Size aSize = pDev->PixelToLogic( pWindow->GetSizePixel() ); + Point aPos = pDev->PixelToLogic( Point( nX, nY ) ); + + pWindow->Draw( pDev, aPos, aSize, WINDOW_DRAW_NOCONTROLS ); + } +} + +// ::com::sun::star::awt::XDevice, +::com::sun::star::awt::DeviceInfo SAL_CALL VCLXMultiPage::getInfo() +throw(::com::sun::star::uno::RuntimeException) +{ + ::com::sun::star::awt::DeviceInfo aInfo = VCLXDevice::getInfo(); + return aInfo; +} + +uno::Any SAL_CALL VCLXMultiPage::getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException) +{ + SolarMutexGuard aGuard; + OSL_TRACE(" **** VCLXMultiPage::getProperty( %s )", + rtl::OUStringToOString( PropertyName, + RTL_TEXTENCODING_UTF8 ).getStr() ); + ::com::sun::star::uno::Any aProp; + sal_uInt16 nPropType = GetPropertyId( PropertyName ); + switch ( nPropType ) + { + + case BASEPROPERTY_MULTIPAGEVALUE: + { + aProp <<= getActiveTabID(); + } + break; + default: + aProp <<= VCLXContainer::getProperty( PropertyName ); + } + return aProp; +} + +void SAL_CALL VCLXMultiPage::setProperty( + const ::rtl::OUString& PropertyName, + const ::com::sun::star::uno::Any& Value ) +throw(::com::sun::star::uno::RuntimeException) +{ + SolarMutexGuard aGuard; + OSL_TRACE(" **** VCLXMultiPage::setProperty( %s )", rtl::OUStringToOString( PropertyName, RTL_TEXTENCODING_UTF8 ).getStr() ); + + TabControl* pTabControl = (TabControl*)GetWindow(); + if ( pTabControl ) + { + sal_Bool bVoid = Value.getValueType().getTypeClass() == ::com::sun::star::uno::TypeClass_VOID; + + sal_uInt16 nPropType = GetPropertyId( PropertyName ); + switch ( nPropType ) + { + case BASEPROPERTY_MULTIPAGEVALUE: + { + OSL_TRACE("***MULTIPAGE VALUE"); + sal_Int32 nId(0); + Value >>= nId; + // when the multipage is created we attempt to set the activepage + // but no pages created + if ( nId && nId <= getWindows().getLength() ) + activateTab( nId ); + } + case BASEPROPERTY_GRAPHIC: + { + Reference< XGraphic > xGraphic; + if (( Value >>= xGraphic ) && xGraphic.is() ) + { + Image aImage( xGraphic ); + + Wallpaper aWallpaper( aImage.GetBitmapEx()); + aWallpaper.SetStyle( WALLPAPER_SCALE ); + pTabControl->SetBackground( aWallpaper ); + } + else if ( bVoid || !xGraphic.is() ) + { + Color aColor = pTabControl->GetControlBackground().GetColor(); + if ( aColor == COL_AUTO ) + aColor = pTabControl->GetSettings().GetStyleSettings().GetDialogColor(); + + Wallpaper aWallpaper( aColor ); + pTabControl->SetBackground( aWallpaper ); + } + } + break; + + default: + { + VCLXContainer::setProperty( PropertyName, Value ); + } + } + } +} + +TabControl *VCLXMultiPage::getTabControl() const throw (uno::RuntimeException) +{ + TabControl *pTabControl = dynamic_cast< TabControl* >( GetWindow() ); + if ( pTabControl ) + return pTabControl; + throw uno::RuntimeException(); +} +sal_Int32 SAL_CALL VCLXMultiPage::insertTab() throw (uno::RuntimeException) +{ + TabControl *pTabControl = getTabControl(); + TabPage* pTab = new TabPage( pTabControl ); + rtl::OUString title (RTL_CONSTASCII_USTRINGPARAM( "" ) ); + return static_cast< sal_Int32 >( insertTab( pTab, title ) ); +} + +sal_uInt16 VCLXMultiPage::insertTab( TabPage* pPage, rtl::OUString& sTitle ) +{ + TabControl *pTabControl = getTabControl(); + sal_uInt16 id = sal::static_int_cast< sal_uInt16 >( mTabId++ ); + pTabControl->InsertPage( id, sTitle.getStr(), TAB_APPEND ); + pTabControl->SetTabPage( id, pPage ); + return id; +} + +void SAL_CALL VCLXMultiPage::removeTab( sal_Int32 ID ) throw (uno::RuntimeException, lang::IndexOutOfBoundsException) +{ + TabControl *pTabControl = getTabControl(); + if ( pTabControl->GetTabPage( sal::static_int_cast< sal_uInt16 >( ID ) ) == NULL ) + throw lang::IndexOutOfBoundsException(); + pTabControl->RemovePage( sal::static_int_cast< sal_uInt16 >( ID ) ); +} + +void SAL_CALL VCLXMultiPage::activateTab( sal_Int32 ID ) throw (uno::RuntimeException, lang::IndexOutOfBoundsException) +{ + TabControl *pTabControl = getTabControl(); + OSL_TRACE("Attempting to activate tab %d, active tab is %d, numtabs is %d", ID, getActiveTabID(), getWindows().getLength() ); + if ( pTabControl->GetTabPage( sal::static_int_cast< sal_uInt16 >( ID ) ) == NULL ) + throw lang::IndexOutOfBoundsException(); + pTabControl->SelectTabPage( sal::static_int_cast< sal_uInt16 >( ID ) ); +} + +sal_Int32 SAL_CALL VCLXMultiPage::getActiveTabID() throw (uno::RuntimeException) +{ + return getTabControl()->GetCurPageId( ); +} + +void SAL_CALL VCLXMultiPage::addTabListener( const uno::Reference< awt::XTabListener >& xListener ) throw (uno::RuntimeException) +{ + SolarMutexGuard aGuard; + maTabListeners.addInterface( xListener ); +} + +void SAL_CALL VCLXMultiPage::removeTabListener( const uno::Reference< awt::XTabListener >& xListener ) throw (uno::RuntimeException) +{ + SolarMutexGuard aGuard; + maTabListeners.addInterface( xListener ); +} + +void SAL_CALL VCLXMultiPage::setTabProps( sal_Int32 ID, const uno::Sequence< beans::NamedValue >& Properties ) throw (uno::RuntimeException, lang::IndexOutOfBoundsException) +{ + SolarMutexGuard aGuard; + TabControl *pTabControl = getTabControl(); + if ( pTabControl->GetTabPage( sal::static_int_cast< sal_uInt16 >( ID ) ) == NULL ) + throw lang::IndexOutOfBoundsException(); + + for ( int i = 0; i < Properties.getLength(); i++ ) + { + const rtl::OUString &name = Properties[i].Name; + const uno::Any &value = Properties[i].Value; + + if ( name == rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ) ) ) + { + rtl::OUString title = value.get<rtl::OUString>(); + pTabControl->SetPageText( sal::static_int_cast< sal_uInt16 >( ID ), title.getStr() ); + } + } +} + +uno::Sequence< beans::NamedValue > SAL_CALL VCLXMultiPage::getTabProps( sal_Int32 ID ) + throw (lang::IndexOutOfBoundsException, uno::RuntimeException) +{ + SolarMutexGuard aGuard; + TabControl *pTabControl = getTabControl(); + if ( pTabControl->GetTabPage( sal::static_int_cast< sal_uInt16 >( ID ) ) == NULL ) + throw lang::IndexOutOfBoundsException(); + +#define ADD_PROP( seq, i, name, val ) { \ + beans::NamedValue value; \ + value.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( name ) ); \ + value.Value = uno::makeAny( val ); \ + seq[i] = value; \ + } + + uno::Sequence< beans::NamedValue > props( 2 ); + ADD_PROP( props, 0, "Title", rtl::OUString( pTabControl->GetPageText( sal::static_int_cast< sal_uInt16 >( ID ) ) ) ); + ADD_PROP( props, 1, "Position", pTabControl->GetPagePos( sal::static_int_cast< sal_uInt16 >( ID ) ) ); +#undef ADD_PROP + return props; +} +void VCLXMultiPage::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) +{ + ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > xKeepAlive( this ); + switch ( rVclWindowEvent.GetId() ) + { + case VCLEVENT_TABPAGE_DEACTIVATE: + { + sal_uLong nPageID = (sal_uLong)( rVclWindowEvent.GetData() ); + maTabListeners.deactivated( nPageID ); + break; + + } + case VCLEVENT_TABPAGE_ACTIVATE: + { + sal_uLong nPageID = (sal_uLong)( rVclWindowEvent.GetData() ); + maTabListeners.activated( nPageID ); + break; + } + default: + VCLXContainer::ProcessWindowEvent( rVclWindowEvent ); + break; + }; +} + // ---------------------------------------------------- // class VCLXTabPage // ---------------------------------------------------- @@ -2474,6 +2787,27 @@ VCLXTabPage::VCLXTabPage() { } +void VCLXTabPage::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) +{ + PushPropertyIds( rIds, + BASEPROPERTY_BACKGROUNDCOLOR, + BASEPROPERTY_DEFAULTCONTROL, + BASEPROPERTY_ENABLED, + BASEPROPERTY_ENABLEVISIBLE, + BASEPROPERTY_FONTDESCRIPTOR, + BASEPROPERTY_GRAPHIC, + BASEPROPERTY_HELPTEXT, + BASEPROPERTY_HELPURL, + BASEPROPERTY_IMAGEALIGN, + BASEPROPERTY_IMAGEPOSITION, + BASEPROPERTY_IMAGEURL, + BASEPROPERTY_PRINTABLE, + BASEPROPERTY_TABSTOP, + BASEPROPERTY_FOCUSONCLICK, + 0); + VCLXContainer::ImplGetPropertyIds( rIds ); +} + VCLXTabPage::~VCLXTabPage() { } @@ -2493,7 +2827,7 @@ IMPL_XTYPEPROVIDER_END void SAL_CALL VCLXTabPage::draw( sal_Int32 nX, sal_Int32 nY ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Window* pWindow = GetWindow(); if ( pWindow ) @@ -2522,7 +2856,7 @@ void SAL_CALL VCLXTabPage::setProperty( const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; TabPage* pTabPage = (TabPage*)GetWindow(); if ( pTabPage ) @@ -2572,9 +2906,18 @@ throw(::com::sun::star::uno::RuntimeException) } } +TabPage *VCLXTabPage::getTabPage() const throw (uno::RuntimeException) +{ + TabPage *pTabPage = dynamic_cast< TabPage* >( GetWindow() ); + if ( pTabPage ) + return pTabPage; + throw uno::RuntimeException(); +} + // ---------------------------------------------------- // class VCLXFixedHyperlink // ---------------------------------------------------- + VCLXFixedHyperlink::VCLXFixedHyperlink() : maActionListeners( *this ) @@ -2596,7 +2939,7 @@ VCLXFixedHyperlink::~VCLXFixedHyperlink() void VCLXFixedHyperlink::dispose() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::lang::EventObject aObj; aObj.Source = (::cppu::OWeakObject*)this; @@ -2631,7 +2974,7 @@ void VCLXFixedHyperlink::ProcessWindowEvent( const VclWindowEvent& rVclWindowEve sURL = pBase->GetURL(); Reference< ::com::sun::star::system::XSystemShellExecute > xSystemShellExecute( ::comphelper::getProcessServiceFactory()->createInstance( - ::rtl::OUString::createFromAscii( "com.sun.star.system.SystemShellExecute" )), uno::UNO_QUERY ); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.system.SystemShellExecute"))), uno::UNO_QUERY ); if ( sURL.getLength() > 0 && xSystemShellExecute.is() ) { try @@ -2660,7 +3003,7 @@ void VCLXFixedHyperlink::ProcessWindowEvent( const VclWindowEvent& rVclWindowEve void VCLXFixedHyperlink::setText( const ::rtl::OUString& Text ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::toolkit::FixedHyperlinkBase* pBase = (::toolkit::FixedHyperlinkBase*)GetWindow(); if ( pBase ) @@ -2669,7 +3012,7 @@ void VCLXFixedHyperlink::setText( const ::rtl::OUString& Text ) throw(::com::sun ::rtl::OUString VCLXFixedHyperlink::getText() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::rtl::OUString aText; Window* pWindow = GetWindow(); @@ -2680,7 +3023,7 @@ void VCLXFixedHyperlink::setText( const ::rtl::OUString& Text ) throw(::com::sun void VCLXFixedHyperlink::setURL( const ::rtl::OUString& URL ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::toolkit::FixedHyperlinkBase* pBase = (::toolkit::FixedHyperlinkBase*)GetWindow(); if ( pBase ) @@ -2689,7 +3032,7 @@ void VCLXFixedHyperlink::setURL( const ::rtl::OUString& URL ) throw(::com::sun:: ::rtl::OUString VCLXFixedHyperlink::getURL( ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::rtl::OUString aText; ::toolkit::FixedHyperlinkBase* pBase = (::toolkit::FixedHyperlinkBase*)GetWindow(); @@ -2700,7 +3043,7 @@ void VCLXFixedHyperlink::setURL( const ::rtl::OUString& URL ) throw(::com::sun:: void VCLXFixedHyperlink::setAlignment( short nAlign ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Window* pWindow = GetWindow(); if ( pWindow ) @@ -2721,7 +3064,7 @@ void VCLXFixedHyperlink::setAlignment( short nAlign ) throw(::com::sun::star::un short VCLXFixedHyperlink::getAlignment() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; short nAlign = 0; Window* pWindow = GetWindow(); @@ -2740,19 +3083,19 @@ short VCLXFixedHyperlink::getAlignment() throw(::com::sun::star::uno::RuntimeExc void VCLXFixedHyperlink::addActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener > & l )throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; maActionListeners.addInterface( l ); } void VCLXFixedHyperlink::removeActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener > & l ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; maActionListeners.removeInterface( l ); } ::com::sun::star::awt::Size VCLXFixedHyperlink::getMinimumSize( ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Size aSz; FixedText* pFixedText = (FixedText*)GetWindow(); @@ -2768,7 +3111,7 @@ void VCLXFixedHyperlink::removeActionListener( const ::com::sun::star::uno::Refe ::com::sun::star::awt::Size VCLXFixedHyperlink::calcAdjustedSize( const ::com::sun::star::awt::Size& rNewSize ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::awt::Size aSz = rNewSize; ::com::sun::star::awt::Size aMinSz = getMinimumSize(); @@ -2780,7 +3123,7 @@ void VCLXFixedHyperlink::removeActionListener( const ::com::sun::star::uno::Refe void VCLXFixedHyperlink::setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::toolkit::FixedHyperlinkBase* pBase = (::toolkit::FixedHyperlinkBase*)GetWindow(); if ( pBase ) @@ -2814,7 +3157,7 @@ void VCLXFixedHyperlink::setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any VCLXFixedHyperlink::getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::uno::Any aProp; ::toolkit::FixedHyperlinkBase* pBase = (::toolkit::FixedHyperlinkBase*)GetWindow(); @@ -2922,7 +3265,7 @@ IMPL_XTYPEPROVIDER_END void VCLXFixedText::setText( const ::rtl::OUString& Text ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Window* pWindow = GetWindow(); if ( pWindow ) @@ -2931,7 +3274,7 @@ void VCLXFixedText::setText( const ::rtl::OUString& Text ) throw(::com::sun::sta ::rtl::OUString VCLXFixedText::getText() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::rtl::OUString aText; Window* pWindow = GetWindow(); @@ -2942,7 +3285,7 @@ void VCLXFixedText::setText( const ::rtl::OUString& Text ) throw(::com::sun::sta void VCLXFixedText::setAlignment( short nAlign ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Window* pWindow = GetWindow(); if ( pWindow ) @@ -2963,7 +3306,7 @@ void VCLXFixedText::setAlignment( short nAlign ) throw(::com::sun::star::uno::Ru short VCLXFixedText::getAlignment() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; short nAlign = 0; Window* pWindow = GetWindow(); @@ -2982,7 +3325,7 @@ short VCLXFixedText::getAlignment() throw(::com::sun::star::uno::RuntimeExceptio ::com::sun::star::awt::Size VCLXFixedText::getMinimumSize( ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Size aSz; FixedText* pFixedText = (FixedText*)GetWindow(); @@ -2998,7 +3341,7 @@ short VCLXFixedText::getAlignment() throw(::com::sun::star::uno::RuntimeExceptio ::com::sun::star::awt::Size VCLXFixedText::calcAdjustedSize( const ::com::sun::star::awt::Size& rMaxSize ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Size aAdjustedSize( VCLUnoHelper::ConvertToVCLSize( rMaxSize ) ); FixedText* pFixedText = (FixedText*)GetWindow(); @@ -3065,7 +3408,7 @@ IMPL_XTYPEPROVIDER_END // ::com::sun::star::lang::XComponent void VCLXScrollBar::dispose() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::lang::EventObject aObj; aObj.Source = (::cppu::OWeakObject*)this; @@ -3076,19 +3419,19 @@ void VCLXScrollBar::dispose() throw(::com::sun::star::uno::RuntimeException) // ::com::sun::star::awt::XScrollbar void VCLXScrollBar::addAdjustmentListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XAdjustmentListener > & l ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; maAdjustmentListeners.addInterface( l ); } void VCLXScrollBar::removeAdjustmentListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XAdjustmentListener > & l ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; maAdjustmentListeners.removeInterface( l ); } void VCLXScrollBar::setValue( sal_Int32 n ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ScrollBar* pScrollBar = (ScrollBar*) GetWindow(); if ( pScrollBar ) @@ -3097,7 +3440,7 @@ void VCLXScrollBar::setValue( sal_Int32 n ) throw(::com::sun::star::uno::Runtime void VCLXScrollBar::setValues( sal_Int32 nValue, sal_Int32 nVisible, sal_Int32 nMax ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ScrollBar* pScrollBar = (ScrollBar*) GetWindow(); if ( pScrollBar ) @@ -3110,7 +3453,7 @@ void VCLXScrollBar::setValues( sal_Int32 nValue, sal_Int32 nVisible, sal_Int32 n sal_Int32 VCLXScrollBar::getValue() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ScrollBar* pScrollBar = (ScrollBar*) GetWindow(); return pScrollBar ? pScrollBar->GetThumbPos() : 0; @@ -3118,7 +3461,7 @@ sal_Int32 VCLXScrollBar::getValue() throw(::com::sun::star::uno::RuntimeExceptio void VCLXScrollBar::setMaximum( sal_Int32 n ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ScrollBar* pScrollBar = (ScrollBar*) GetWindow(); if ( pScrollBar ) @@ -3127,7 +3470,7 @@ void VCLXScrollBar::setMaximum( sal_Int32 n ) throw(::com::sun::star::uno::Runti sal_Int32 VCLXScrollBar::getMaximum() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ScrollBar* pScrollBar = (ScrollBar*) GetWindow(); return pScrollBar ? pScrollBar->GetRangeMax() : 0; @@ -3135,7 +3478,7 @@ sal_Int32 VCLXScrollBar::getMaximum() throw(::com::sun::star::uno::RuntimeExcept void VCLXScrollBar::setMinimum( sal_Int32 n ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ScrollBar* pScrollBar = static_cast< ScrollBar* >( GetWindow() ); if ( pScrollBar ) @@ -3144,7 +3487,7 @@ void VCLXScrollBar::setMinimum( sal_Int32 n ) throw(::com::sun::star::uno::Runti sal_Int32 VCLXScrollBar::getMinimum() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ScrollBar* pScrollBar = static_cast< ScrollBar* >( GetWindow() ); return pScrollBar ? pScrollBar->GetRangeMin() : 0; @@ -3152,7 +3495,7 @@ sal_Int32 VCLXScrollBar::getMinimum() throw(::com::sun::star::uno::RuntimeExcept void VCLXScrollBar::setLineIncrement( sal_Int32 n ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ScrollBar* pScrollBar = (ScrollBar*) GetWindow(); if ( pScrollBar ) @@ -3161,7 +3504,7 @@ void VCLXScrollBar::setLineIncrement( sal_Int32 n ) throw(::com::sun::star::uno: sal_Int32 VCLXScrollBar::getLineIncrement() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ScrollBar* pScrollBar = (ScrollBar*) GetWindow(); return pScrollBar ? pScrollBar->GetLineSize() : 0; @@ -3169,7 +3512,7 @@ sal_Int32 VCLXScrollBar::getLineIncrement() throw(::com::sun::star::uno::Runtime void VCLXScrollBar::setBlockIncrement( sal_Int32 n ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ScrollBar* pScrollBar = (ScrollBar*) GetWindow(); if ( pScrollBar ) @@ -3178,7 +3521,7 @@ void VCLXScrollBar::setBlockIncrement( sal_Int32 n ) throw(::com::sun::star::uno sal_Int32 VCLXScrollBar::getBlockIncrement() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ScrollBar* pScrollBar = (ScrollBar*) GetWindow(); return pScrollBar ? pScrollBar->GetPageSize() : 0; @@ -3186,7 +3529,7 @@ sal_Int32 VCLXScrollBar::getBlockIncrement() throw(::com::sun::star::uno::Runtim void VCLXScrollBar::setVisibleSize( sal_Int32 n ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ScrollBar* pScrollBar = (ScrollBar*) GetWindow(); if ( pScrollBar ) @@ -3195,7 +3538,7 @@ void VCLXScrollBar::setVisibleSize( sal_Int32 n ) throw(::com::sun::star::uno::R sal_Int32 VCLXScrollBar::getVisibleSize() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ScrollBar* pScrollBar = (ScrollBar*) GetWindow(); return pScrollBar ? pScrollBar->GetVisibleSize() : 0; @@ -3203,7 +3546,7 @@ sal_Int32 VCLXScrollBar::getVisibleSize() throw(::com::sun::star::uno::RuntimeEx void VCLXScrollBar::setOrientation( sal_Int32 n ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Window* pWindow = GetWindow(); if ( pWindow ) @@ -3222,7 +3565,7 @@ void VCLXScrollBar::setOrientation( sal_Int32 n ) throw(::com::sun::star::uno::R sal_Int32 VCLXScrollBar::getOrientation() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; sal_Int32 n = 0; Window* pWindow = GetWindow(); @@ -3241,7 +3584,7 @@ sal_Int32 VCLXScrollBar::getOrientation() throw(::com::sun::star::uno::RuntimeEx // ::com::sun::star::awt::VclWindowPeer void VCLXScrollBar::setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ScrollBar* pScrollBar = (ScrollBar*)GetWindow(); if ( pScrollBar ) @@ -3356,7 +3699,7 @@ void VCLXScrollBar::setProperty( const ::rtl::OUString& PropertyName, const ::co ::com::sun::star::uno::Any VCLXScrollBar::getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::uno::Any aProp; ScrollBar* pScrollBar = (ScrollBar*)GetWindow(); @@ -3433,7 +3776,6 @@ void VCLXScrollBar::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) // since we call listeners below, there is a potential that we will be destroyed // in during the listener call. To prevent the resulting crashs, we keep us // alive as long as we're here - // #20178# - 2003-10-01 - fs@openoffice.org if ( maAdjustmentListeners.getLength() ) { @@ -3480,7 +3822,7 @@ void VCLXScrollBar::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) ::com::sun::star::awt::Size SAL_CALL VCLXScrollBar::getMinimumSize() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; return implGetMinimumSize( GetWindow() ); } @@ -3553,7 +3895,7 @@ IMPL_XTYPEPROVIDER_END void VCLXEdit::dispose() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::lang::EventObject aObj; aObj.Source = (::cppu::OWeakObject*)this; @@ -3563,19 +3905,19 @@ void VCLXEdit::dispose() throw(::com::sun::star::uno::RuntimeException) void VCLXEdit::addTextListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextListener > & l ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; GetTextListeners().addInterface( l ); } void VCLXEdit::removeTextListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextListener > & l ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; GetTextListeners().removeInterface( l ); } void VCLXEdit::setText( const ::rtl::OUString& aText ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Edit* pEdit = (Edit*)GetWindow(); if ( pEdit ) @@ -3592,7 +3934,7 @@ void VCLXEdit::setText( const ::rtl::OUString& aText ) throw(::com::sun::star::u void VCLXEdit::insertText( const ::com::sun::star::awt::Selection& rSel, const ::rtl::OUString& aText ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Edit* pEdit = (Edit*)GetWindow(); if ( pEdit ) @@ -3610,7 +3952,7 @@ void VCLXEdit::insertText( const ::com::sun::star::awt::Selection& rSel, const : ::rtl::OUString VCLXEdit::getText() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::rtl::OUString aText; Window* pWindow = GetWindow(); @@ -3621,7 +3963,7 @@ void VCLXEdit::insertText( const ::com::sun::star::awt::Selection& rSel, const : ::rtl::OUString VCLXEdit::getSelectedText() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::rtl::OUString aText; Edit* pEdit = (Edit*) GetWindow(); @@ -3633,7 +3975,7 @@ void VCLXEdit::insertText( const ::com::sun::star::awt::Selection& rSel, const : void VCLXEdit::setSelection( const ::com::sun::star::awt::Selection& aSelection ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Edit* pEdit = (Edit*) GetWindow(); if ( pEdit ) @@ -3642,7 +3984,7 @@ void VCLXEdit::setSelection( const ::com::sun::star::awt::Selection& aSelection ::com::sun::star::awt::Selection VCLXEdit::getSelection() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Selection aSel; Edit* pEdit = (Edit*) GetWindow(); @@ -3653,7 +3995,7 @@ void VCLXEdit::setSelection( const ::com::sun::star::awt::Selection& aSelection sal_Bool VCLXEdit::isEditable() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Edit* pEdit = (Edit*) GetWindow(); return ( pEdit && !pEdit->IsReadOnly() && pEdit->IsEnabled() ) ? sal_True : sal_False; @@ -3661,7 +4003,7 @@ sal_Bool VCLXEdit::isEditable() throw(::com::sun::star::uno::RuntimeException) void VCLXEdit::setEditable( sal_Bool bEditable ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Edit* pEdit = (Edit*) GetWindow(); if ( pEdit ) @@ -3671,7 +4013,7 @@ void VCLXEdit::setEditable( sal_Bool bEditable ) throw(::com::sun::star::uno::Ru void VCLXEdit::setMaxTextLen( sal_Int16 nLen ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Edit* pEdit = (Edit*) GetWindow(); if ( pEdit ) @@ -3680,7 +4022,7 @@ void VCLXEdit::setMaxTextLen( sal_Int16 nLen ) throw(::com::sun::star::uno::Runt sal_Int16 VCLXEdit::getMaxTextLen() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Edit* pEdit = (Edit*) GetWindow(); return pEdit ? pEdit->GetMaxTextLen() : 0; @@ -3688,7 +4030,7 @@ sal_Int16 VCLXEdit::getMaxTextLen() throw(::com::sun::star::uno::RuntimeExceptio void VCLXEdit::setEchoChar( sal_Unicode cEcho ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Edit* pEdit = (Edit*) GetWindow(); if ( pEdit ) @@ -3697,7 +4039,7 @@ void VCLXEdit::setEchoChar( sal_Unicode cEcho ) throw(::com::sun::star::uno::Run void VCLXEdit::setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Edit* pEdit = (Edit*)GetWindow(); if ( pEdit ) @@ -3742,7 +4084,7 @@ void VCLXEdit::setProperty( const ::rtl::OUString& PropertyName, const ::com::su ::com::sun::star::uno::Any VCLXEdit::getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::uno::Any aProp; Edit* pEdit = (Edit*)GetWindow(); @@ -3774,7 +4116,7 @@ void VCLXEdit::setProperty( const ::rtl::OUString& PropertyName, const ::com::su ::com::sun::star::awt::Size VCLXEdit::getMinimumSize( ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Size aSz; Edit* pEdit = (Edit*) GetWindow(); @@ -3785,7 +4127,7 @@ void VCLXEdit::setProperty( const ::rtl::OUString& PropertyName, const ::com::su ::com::sun::star::awt::Size VCLXEdit::getPreferredSize( ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Size aSz; Edit* pEdit = (Edit*) GetWindow(); @@ -3799,7 +4141,7 @@ void VCLXEdit::setProperty( const ::rtl::OUString& PropertyName, const ::com::su ::com::sun::star::awt::Size VCLXEdit::calcAdjustedSize( const ::com::sun::star::awt::Size& rNewSize ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::awt::Size aSz = rNewSize; ::com::sun::star::awt::Size aMinSz = getMinimumSize(); @@ -3811,7 +4153,7 @@ void VCLXEdit::setProperty( const ::rtl::OUString& PropertyName, const ::com::su ::com::sun::star::awt::Size VCLXEdit::getMinimumSize( sal_Int16 nCols, sal_Int16 ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Size aSz; Edit* pEdit = (Edit*) GetWindow(); @@ -3827,7 +4169,7 @@ void VCLXEdit::setProperty( const ::rtl::OUString& PropertyName, const ::com::su void VCLXEdit::getColumnsAndLines( sal_Int16& nCols, sal_Int16& nLines ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; nLines = 1; nCols = 0; @@ -3846,7 +4188,6 @@ void VCLXEdit::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) // since we call listeners below, there is a potential that we will be destroyed // during the listener call. To prevent the resulting crashs, we keep us // alive as long as we're here - // #20178# - 2003-10-01 - fs@openoffice.org if ( GetTextListeners().getLength() ) { @@ -3915,14 +4256,14 @@ VCLXComboBox::~VCLXComboBox() ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > VCLXComboBox::CreateAccessibleContext() { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; return getAccessibleFactory().createAccessibleContext( this ); } void VCLXComboBox::dispose() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::lang::EventObject aObj; aObj.Source = (::cppu::OWeakObject*)this; @@ -3934,31 +4275,31 @@ void VCLXComboBox::dispose() throw(::com::sun::star::uno::RuntimeException) void VCLXComboBox::addItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener > & l ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; maItemListeners.addInterface( l ); } void VCLXComboBox::removeItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener > & l ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; maItemListeners.removeInterface( l ); } void VCLXComboBox::addActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener > & l ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; maActionListeners.addInterface( l ); } void VCLXComboBox::removeActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener > & l ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; maActionListeners.removeInterface( l ); } void VCLXComboBox::addItem( const ::rtl::OUString& aItem, sal_Int16 nPos ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ComboBox* pBox = (ComboBox*) GetWindow(); if ( pBox ) @@ -3967,7 +4308,7 @@ void VCLXComboBox::addItem( const ::rtl::OUString& aItem, sal_Int16 nPos ) throw void VCLXComboBox::addItems( const ::com::sun::star::uno::Sequence< ::rtl::OUString>& aItems, sal_Int16 nPos ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ComboBox* pBox = (ComboBox*) GetWindow(); if ( pBox ) @@ -3978,7 +4319,7 @@ void VCLXComboBox::addItems( const ::com::sun::star::uno::Sequence< ::rtl::OUStr pBox->InsertEntry( aItems.getConstArray()[n], nP ); if ( nP == 0xFFFF ) { - OSL_ENSURE( false, "VCLXComboBox::addItems: too many entries!" ); + OSL_FAIL( "VCLXComboBox::addItems: too many entries!" ); // skip remaining entries, list cannot hold them, anyway break; } @@ -3988,7 +4329,7 @@ void VCLXComboBox::addItems( const ::com::sun::star::uno::Sequence< ::rtl::OUStr void VCLXComboBox::removeItems( sal_Int16 nPos, sal_Int16 nCount ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ComboBox* pBox = (ComboBox*) GetWindow(); if ( pBox ) @@ -4000,7 +4341,7 @@ void VCLXComboBox::removeItems( sal_Int16 nPos, sal_Int16 nCount ) throw(::com:: sal_Int16 VCLXComboBox::getItemCount() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ComboBox* pBox = (ComboBox*) GetWindow(); return pBox ? pBox->GetEntryCount() : 0; @@ -4008,7 +4349,7 @@ sal_Int16 VCLXComboBox::getItemCount() throw(::com::sun::star::uno::RuntimeExcep ::rtl::OUString VCLXComboBox::getItem( sal_Int16 nPos ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::rtl::OUString aItem; ComboBox* pBox = (ComboBox*) GetWindow(); @@ -4019,7 +4360,7 @@ sal_Int16 VCLXComboBox::getItemCount() throw(::com::sun::star::uno::RuntimeExcep ::com::sun::star::uno::Sequence< ::rtl::OUString> VCLXComboBox::getItems() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::uno::Sequence< ::rtl::OUString> aSeq; ComboBox* pBox = (ComboBox*) GetWindow(); @@ -4038,7 +4379,7 @@ sal_Int16 VCLXComboBox::getItemCount() throw(::com::sun::star::uno::RuntimeExcep void VCLXComboBox::setDropDownLineCount( sal_Int16 nLines ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ComboBox* pBox = (ComboBox*) GetWindow(); if ( pBox ) @@ -4047,7 +4388,7 @@ void VCLXComboBox::setDropDownLineCount( sal_Int16 nLines ) throw(::com::sun::st sal_Int16 VCLXComboBox::getDropDownLineCount() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; sal_Int16 nLines = 0; ComboBox* pBox = (ComboBox*) GetWindow(); @@ -4058,7 +4399,7 @@ sal_Int16 VCLXComboBox::getDropDownLineCount() throw(::com::sun::star::uno::Runt void VCLXComboBox::setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ComboBox* pComboBox = (ComboBox*)GetWindow(); if ( pComboBox ) @@ -4108,7 +4449,7 @@ void VCLXComboBox::setProperty( const ::rtl::OUString& PropertyName, const ::com ::com::sun::star::uno::Any VCLXComboBox::getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::uno::Any aProp; ComboBox* pComboBox = (ComboBox*)GetWindow(); @@ -4153,7 +4494,6 @@ void VCLXComboBox::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) // since we call listeners below, there is a potential that we will be destroyed // during the listener call. To prevent the resulting crashs, we keep us // alive as long as we're here - // #20178# - 2003-10-01 - fs@openoffice.org switch ( rVclWindowEvent.GetId() ) { @@ -4196,7 +4536,7 @@ void VCLXComboBox::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) ::com::sun::star::awt::Size VCLXComboBox::getMinimumSize( ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Size aSz; ComboBox* pComboBox = (ComboBox*) GetWindow(); @@ -4207,7 +4547,7 @@ void VCLXComboBox::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) ::com::sun::star::awt::Size VCLXComboBox::getPreferredSize( ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Size aSz; ComboBox* pComboBox = (ComboBox*) GetWindow(); @@ -4222,7 +4562,7 @@ void VCLXComboBox::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) ::com::sun::star::awt::Size VCLXComboBox::calcAdjustedSize( const ::com::sun::star::awt::Size& rNewSize ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Size aSz = VCLSize(rNewSize); ComboBox* pComboBox = (ComboBox*) GetWindow(); @@ -4233,7 +4573,7 @@ void VCLXComboBox::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) ::com::sun::star::awt::Size VCLXComboBox::getMinimumSize( sal_Int16 nCols, sal_Int16 nLines ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Size aSz; ComboBox* pComboBox = (ComboBox*) GetWindow(); @@ -4244,7 +4584,7 @@ void VCLXComboBox::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) void VCLXComboBox::getColumnsAndLines( sal_Int16& nCols, sal_Int16& nLines ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; nCols = nLines = 0; ComboBox* pComboBox = (ComboBox*) GetWindow(); @@ -4258,7 +4598,7 @@ void VCLXComboBox::getColumnsAndLines( sal_Int16& nCols, sal_Int16& nLines ) thr } void SAL_CALL VCLXComboBox::listItemInserted( const ItemListEvent& i_rEvent ) throw (RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ComboBox* pComboBox = dynamic_cast< ComboBox* >( GetWindow() ); @@ -4273,7 +4613,7 @@ void SAL_CALL VCLXComboBox::listItemInserted( const ItemListEvent& i_rEvent ) th void SAL_CALL VCLXComboBox::listItemRemoved( const ItemListEvent& i_rEvent ) throw (RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ComboBox* pComboBox = dynamic_cast< ComboBox* >( GetWindow() ); @@ -4286,7 +4626,7 @@ void SAL_CALL VCLXComboBox::listItemRemoved( const ItemListEvent& i_rEvent ) thr void SAL_CALL VCLXComboBox::listItemModified( const ItemListEvent& i_rEvent ) throw (RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ComboBox* pComboBox = dynamic_cast< ComboBox* >( GetWindow() ); @@ -4305,7 +4645,7 @@ void SAL_CALL VCLXComboBox::listItemModified( const ItemListEvent& i_rEvent ) th void SAL_CALL VCLXComboBox::allItemsRemoved( const EventObject& i_rEvent ) throw (RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ComboBox* pComboBox = dynamic_cast< ComboBox* >( GetWindow() ); ENSURE_OR_RETURN_VOID( pComboBox, "VCLXComboBox::listItemModified: no ComboBox?!" ); @@ -4317,7 +4657,7 @@ void SAL_CALL VCLXComboBox::allItemsRemoved( const EventObject& i_rEvent ) throw void SAL_CALL VCLXComboBox::itemListChanged( const EventObject& i_rEvent ) throw (RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ComboBox* pComboBox = dynamic_cast< ComboBox* >( GetWindow() ); ENSURE_OR_RETURN_VOID( pComboBox, "VCLXComboBox::listItemModified: no ComboBox?!" ); @@ -4376,7 +4716,7 @@ VCLXFormattedSpinField::~VCLXFormattedSpinField() void VCLXFormattedSpinField::setStrictFormat( sal_Bool bStrict ) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; FormatterBase* pFormatter = GetFormatter(); if ( pFormatter ) @@ -4392,7 +4732,7 @@ sal_Bool VCLXFormattedSpinField::isStrictFormat() void VCLXFormattedSpinField::setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; FormatterBase* pFormatter = GetFormatter(); if ( pFormatter ) @@ -4431,7 +4771,7 @@ void VCLXFormattedSpinField::setProperty( const ::rtl::OUString& PropertyName, c ::com::sun::star::uno::Any VCLXFormattedSpinField::getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::uno::Any aProp; FormatterBase* pFormatter = GetFormatter(); @@ -4525,7 +4865,7 @@ IMPL_XTYPEPROVIDER_END void VCLXDateField::setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if ( GetWindow() ) { @@ -4594,7 +4934,7 @@ void VCLXDateField::setProperty( const ::rtl::OUString& PropertyName, const ::co ::com::sun::star::uno::Any VCLXDateField::getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::uno::Any aProp; FormatterBase* pFormatter = GetFormatter(); @@ -4640,7 +4980,7 @@ void VCLXDateField::setProperty( const ::rtl::OUString& PropertyName, const ::co void VCLXDateField::setDate( sal_Int32 nDate ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; DateField* pDateField = (DateField*) GetWindow(); if ( pDateField ) @@ -4657,7 +4997,7 @@ void VCLXDateField::setDate( sal_Int32 nDate ) throw(::com::sun::star::uno::Runt sal_Int32 VCLXDateField::getDate() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; sal_Int32 nDate = 0; DateField* pDateField = (DateField*) GetWindow(); @@ -4669,7 +5009,7 @@ sal_Int32 VCLXDateField::getDate() throw(::com::sun::star::uno::RuntimeException void VCLXDateField::setMin( sal_Int32 nDate ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; DateField* pDateField = (DateField*) GetWindow(); if ( pDateField ) @@ -4678,7 +5018,7 @@ void VCLXDateField::setMin( sal_Int32 nDate ) throw(::com::sun::star::uno::Runti sal_Int32 VCLXDateField::getMin() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; sal_Int32 nDate = 0; DateField* pDateField = (DateField*) GetWindow(); @@ -4690,7 +5030,7 @@ sal_Int32 VCLXDateField::getMin() throw(::com::sun::star::uno::RuntimeException) void VCLXDateField::setMax( sal_Int32 nDate ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; DateField* pDateField = (DateField*) GetWindow(); if ( pDateField ) @@ -4699,7 +5039,7 @@ void VCLXDateField::setMax( sal_Int32 nDate ) throw(::com::sun::star::uno::Runti sal_Int32 VCLXDateField::getMax() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; sal_Int32 nDate = 0; DateField* pDateField = (DateField*) GetWindow(); @@ -4711,7 +5051,7 @@ sal_Int32 VCLXDateField::getMax() throw(::com::sun::star::uno::RuntimeException) void VCLXDateField::setFirst( sal_Int32 nDate ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; DateField* pDateField = (DateField*) GetWindow(); if ( pDateField ) @@ -4720,7 +5060,7 @@ void VCLXDateField::setFirst( sal_Int32 nDate ) throw(::com::sun::star::uno::Run sal_Int32 VCLXDateField::getFirst() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; sal_Int32 nDate = 0; DateField* pDateField = (DateField*) GetWindow(); @@ -4732,7 +5072,7 @@ sal_Int32 VCLXDateField::getFirst() throw(::com::sun::star::uno::RuntimeExceptio void VCLXDateField::setLast( sal_Int32 nDate ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; DateField* pDateField = (DateField*) GetWindow(); if ( pDateField ) @@ -4741,7 +5081,7 @@ void VCLXDateField::setLast( sal_Int32 nDate ) throw(::com::sun::star::uno::Runt sal_Int32 VCLXDateField::getLast() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; sal_Int32 nDate = 0; DateField* pDateField = (DateField*) GetWindow(); @@ -4753,7 +5093,7 @@ sal_Int32 VCLXDateField::getLast() throw(::com::sun::star::uno::RuntimeException void VCLXDateField::setLongFormat( sal_Bool bLong ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; DateField* pDateField = (DateField*) GetWindow(); if ( pDateField ) @@ -4762,7 +5102,7 @@ void VCLXDateField::setLongFormat( sal_Bool bLong ) throw(::com::sun::star::uno: sal_Bool VCLXDateField::isLongFormat() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; DateField* pDateField = (DateField*) GetWindow(); return pDateField ? pDateField->IsLongFormat() : sal_False; @@ -4770,7 +5110,7 @@ sal_Bool VCLXDateField::isLongFormat() throw(::com::sun::star::uno::RuntimeExcep void VCLXDateField::setEmpty() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; DateField* pDateField = (DateField*) GetWindow(); if ( pDateField ) @@ -4787,7 +5127,7 @@ void VCLXDateField::setEmpty() throw(::com::sun::star::uno::RuntimeException) sal_Bool VCLXDateField::isEmpty() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; DateField* pDateField = (DateField*) GetWindow(); return pDateField ? pDateField->IsEmptyDate() : sal_False; @@ -4867,7 +5207,7 @@ IMPL_XTYPEPROVIDER_END void VCLXTimeField::setTime( sal_Int32 nTime ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; TimeField* pTimeField = (TimeField*) GetWindow(); if ( pTimeField ) @@ -4884,7 +5224,7 @@ void VCLXTimeField::setTime( sal_Int32 nTime ) throw(::com::sun::star::uno::Runt sal_Int32 VCLXTimeField::getTime() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; sal_Int32 nTime = 0; TimeField* pTimeField = (TimeField*) GetWindow(); @@ -4896,7 +5236,7 @@ sal_Int32 VCLXTimeField::getTime() throw(::com::sun::star::uno::RuntimeException void VCLXTimeField::setMin( sal_Int32 nTime ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; TimeField* pTimeField = (TimeField*) GetWindow(); if ( pTimeField ) @@ -4905,7 +5245,7 @@ void VCLXTimeField::setMin( sal_Int32 nTime ) throw(::com::sun::star::uno::Runti sal_Int32 VCLXTimeField::getMin() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; sal_Int32 nTime = 0; TimeField* pTimeField = (TimeField*) GetWindow(); @@ -4917,7 +5257,7 @@ sal_Int32 VCLXTimeField::getMin() throw(::com::sun::star::uno::RuntimeException) void VCLXTimeField::setMax( sal_Int32 nTime ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; TimeField* pTimeField = (TimeField*) GetWindow(); if ( pTimeField ) @@ -4926,7 +5266,7 @@ void VCLXTimeField::setMax( sal_Int32 nTime ) throw(::com::sun::star::uno::Runti sal_Int32 VCLXTimeField::getMax() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; sal_Int32 nTime = 0; TimeField* pTimeField = (TimeField*) GetWindow(); @@ -4938,7 +5278,7 @@ sal_Int32 VCLXTimeField::getMax() throw(::com::sun::star::uno::RuntimeException) void VCLXTimeField::setFirst( sal_Int32 nTime ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; TimeField* pTimeField = (TimeField*) GetWindow(); if ( pTimeField ) @@ -4947,7 +5287,7 @@ void VCLXTimeField::setFirst( sal_Int32 nTime ) throw(::com::sun::star::uno::Run sal_Int32 VCLXTimeField::getFirst() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; sal_Int32 nTime = 0; TimeField* pTimeField = (TimeField*) GetWindow(); @@ -4959,7 +5299,7 @@ sal_Int32 VCLXTimeField::getFirst() throw(::com::sun::star::uno::RuntimeExceptio void VCLXTimeField::setLast( sal_Int32 nTime ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; TimeField* pTimeField = (TimeField*) GetWindow(); if ( pTimeField ) @@ -4968,7 +5308,7 @@ void VCLXTimeField::setLast( sal_Int32 nTime ) throw(::com::sun::star::uno::Runt sal_Int32 VCLXTimeField::getLast() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; sal_Int32 nTime = 0; TimeField* pTimeField = (TimeField*) GetWindow(); @@ -4980,7 +5320,7 @@ sal_Int32 VCLXTimeField::getLast() throw(::com::sun::star::uno::RuntimeException void VCLXTimeField::setEmpty() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; TimeField* pTimeField = (TimeField*) GetWindow(); if ( pTimeField ) @@ -4989,7 +5329,7 @@ void VCLXTimeField::setEmpty() throw(::com::sun::star::uno::RuntimeException) sal_Bool VCLXTimeField::isEmpty() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; TimeField* pTimeField = (TimeField*) GetWindow(); return pTimeField ? pTimeField->IsEmptyTime() : sal_False; @@ -5008,7 +5348,7 @@ sal_Bool VCLXTimeField::isStrictFormat() throw(::com::sun::star::uno::RuntimeExc void VCLXTimeField::setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if ( GetWindow() ) { @@ -5070,7 +5410,7 @@ void VCLXTimeField::setProperty( const ::rtl::OUString& PropertyName, const ::co ::com::sun::star::uno::Any VCLXTimeField::getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::uno::Any aProp; if ( GetWindow() ) @@ -5171,7 +5511,7 @@ IMPL_XTYPEPROVIDER_END void VCLXNumericField::setValue( double Value ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; NumericFormatter* pNumericFormatter = (NumericFormatter*) GetFormatter(); if ( pNumericFormatter ) @@ -5195,7 +5535,7 @@ void VCLXNumericField::setValue( double Value ) throw(::com::sun::star::uno::Run double VCLXNumericField::getValue() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; NumericFormatter* pNumericFormatter = (NumericFormatter*) GetFormatter(); return pNumericFormatter @@ -5205,7 +5545,7 @@ double VCLXNumericField::getValue() throw(::com::sun::star::uno::RuntimeExceptio void VCLXNumericField::setMin( double Value ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; NumericFormatter* pNumericFormatter = (NumericFormatter*) GetFormatter(); if ( pNumericFormatter ) @@ -5215,7 +5555,7 @@ void VCLXNumericField::setMin( double Value ) throw(::com::sun::star::uno::Runti double VCLXNumericField::getMin() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; NumericFormatter* pNumericFormatter = (NumericFormatter*) GetFormatter(); return pNumericFormatter @@ -5225,7 +5565,7 @@ double VCLXNumericField::getMin() throw(::com::sun::star::uno::RuntimeException) void VCLXNumericField::setMax( double Value ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; NumericFormatter* pNumericFormatter = (NumericFormatter*) GetFormatter(); if ( pNumericFormatter ) @@ -5235,7 +5575,7 @@ void VCLXNumericField::setMax( double Value ) throw(::com::sun::star::uno::Runti double VCLXNumericField::getMax() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; NumericFormatter* pNumericFormatter = (NumericFormatter*) GetFormatter(); return pNumericFormatter @@ -5245,7 +5585,7 @@ double VCLXNumericField::getMax() throw(::com::sun::star::uno::RuntimeException) void VCLXNumericField::setFirst( double Value ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; NumericField* pNumericField = (NumericField*) GetWindow(); if ( pNumericField ) @@ -5255,7 +5595,7 @@ void VCLXNumericField::setFirst( double Value ) throw(::com::sun::star::uno::Run double VCLXNumericField::getFirst() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; NumericField* pNumericField = (NumericField*) GetWindow(); return pNumericField @@ -5265,7 +5605,7 @@ double VCLXNumericField::getFirst() throw(::com::sun::star::uno::RuntimeExceptio void VCLXNumericField::setLast( double Value ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; NumericField* pNumericField = (NumericField*) GetWindow(); if ( pNumericField ) @@ -5275,7 +5615,7 @@ void VCLXNumericField::setLast( double Value ) throw(::com::sun::star::uno::Runt double VCLXNumericField::getLast() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; NumericField* pNumericField = (NumericField*) GetWindow(); return pNumericField @@ -5296,7 +5636,7 @@ sal_Bool VCLXNumericField::isStrictFormat() throw(::com::sun::star::uno::Runtime void VCLXNumericField::setSpinSize( double Value ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; NumericField* pNumericField = (NumericField*) GetWindow(); if ( pNumericField ) @@ -5306,7 +5646,7 @@ void VCLXNumericField::setSpinSize( double Value ) throw(::com::sun::star::uno:: double VCLXNumericField::getSpinSize() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; NumericField* pNumericField = (NumericField*) GetWindow(); return pNumericField @@ -5316,7 +5656,7 @@ double VCLXNumericField::getSpinSize() throw(::com::sun::star::uno::RuntimeExcep void VCLXNumericField::setDecimalDigits( sal_Int16 Value ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; NumericFormatter* pNumericFormatter = (NumericFormatter*) GetFormatter(); if ( pNumericFormatter ) @@ -5329,7 +5669,7 @@ void VCLXNumericField::setDecimalDigits( sal_Int16 Value ) throw(::com::sun::sta sal_Int16 VCLXNumericField::getDecimalDigits() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; NumericFormatter* pNumericFormatter = (NumericFormatter*) GetFormatter(); return pNumericFormatter ? pNumericFormatter->GetDecimalDigits() : 0; @@ -5337,7 +5677,7 @@ sal_Int16 VCLXNumericField::getDecimalDigits() throw(::com::sun::star::uno::Runt void VCLXNumericField::setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if ( GetWindow() ) { @@ -5406,7 +5746,7 @@ void VCLXNumericField::setProperty( const ::rtl::OUString& PropertyName, const : ::com::sun::star::uno::Any VCLXNumericField::getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::uno::Any aProp; FormatterBase* pFormatter = GetFormatter(); @@ -5531,12 +5871,12 @@ IMPL_XTYPEPROVIDER_END #define METRIC_MAP_PAIR(method,parent) \ sal_Int64 VCLXMetricField::get##method( sal_Int16 nUnit ) throw (::com::sun::star::uno::RuntimeException) \ { \ - ::vos::OGuard aGuard( GetMutex() ); \ + SolarMutexGuard aGuard; \ return GetMetric##parent()->Get##method( MetricUnitUnoToVcl( nUnit ) ); \ } \ void VCLXMetricField::set##method( sal_Int64 nValue, sal_Int16 nUnit ) throw (::com::sun::star::uno::RuntimeException) \ { \ - ::vos::OGuard aGuard( GetMutex() ); \ + SolarMutexGuard aGuard; \ GetMetric##parent()->Set##method( nValue, MetricUnitUnoToVcl( nUnit ) ); \ } @@ -5549,13 +5889,13 @@ METRIC_MAP_PAIR(Last, Field) ::sal_Int64 VCLXMetricField::getValue( ::sal_Int16 nUnit ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; return GetMetricFormatter()->GetValue( MetricUnitUnoToVcl( nUnit ) ); } ::sal_Int64 VCLXMetricField::getCorrectedValue( ::sal_Int16 nUnit ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; return GetMetricFormatter()->GetCorrectedValue( MetricUnitUnoToVcl( nUnit ) ); } @@ -5575,14 +5915,14 @@ void VCLXMetricField::CallListeners() void VCLXMetricField::setValue( ::sal_Int64 Value, ::sal_Int16 Unit ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; GetMetricFormatter()->SetValue( Value, MetricUnitUnoToVcl( Unit ) ); CallListeners(); } void VCLXMetricField::setUserValue( ::sal_Int64 Value, ::sal_Int16 Unit ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; GetMetricFormatter()->SetUserValue( Value, MetricUnitUnoToVcl( Unit ) ); CallListeners(); } @@ -5599,25 +5939,25 @@ sal_Bool VCLXMetricField::isStrictFormat() throw(::com::sun::star::uno::RuntimeE void VCLXMetricField::setSpinSize( sal_Int64 Value ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; GetMetricField()->SetSpinSize( Value ); } sal_Int64 VCLXMetricField::getSpinSize() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; return GetMetricField()->GetSpinSize(); } void VCLXMetricField::setDecimalDigits( sal_Int16 Value ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; GetMetricFormatter()->SetDecimalDigits( Value ); } sal_Int16 VCLXMetricField::getDecimalDigits() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; NumericFormatter* pNumericFormatter = (NumericFormatter*) GetFormatter(); return pNumericFormatter ? pNumericFormatter->GetDecimalDigits() : 0; @@ -5625,7 +5965,7 @@ sal_Int16 VCLXMetricField::getDecimalDigits() throw(::com::sun::star::uno::Runti void VCLXMetricField::setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if ( GetWindow() ) { @@ -5671,7 +6011,7 @@ void VCLXMetricField::setProperty( const ::rtl::OUString& PropertyName, const :: ::com::sun::star::uno::Any VCLXMetricField::getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::uno::Any aProp; FormatterBase* pFormatter = GetFormatter(); @@ -5766,7 +6106,7 @@ IMPL_XTYPEPROVIDER_END void VCLXCurrencyField::setValue( double Value ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; LongCurrencyFormatter* pCurrencyFormatter = (LongCurrencyFormatter*) GetFormatter(); if ( pCurrencyFormatter ) @@ -5790,7 +6130,7 @@ void VCLXCurrencyField::setValue( double Value ) throw(::com::sun::star::uno::Ru double VCLXCurrencyField::getValue() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; LongCurrencyFormatter* pCurrencyFormatter = (LongCurrencyFormatter*) GetFormatter(); return pCurrencyFormatter @@ -5800,7 +6140,7 @@ double VCLXCurrencyField::getValue() throw(::com::sun::star::uno::RuntimeExcepti void VCLXCurrencyField::setMin( double Value ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; LongCurrencyFormatter* pCurrencyFormatter = (LongCurrencyFormatter*) GetFormatter(); if ( pCurrencyFormatter ) @@ -5810,7 +6150,7 @@ void VCLXCurrencyField::setMin( double Value ) throw(::com::sun::star::uno::Runt double VCLXCurrencyField::getMin() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; LongCurrencyFormatter* pCurrencyFormatter = (LongCurrencyFormatter*) GetFormatter(); return pCurrencyFormatter @@ -5820,7 +6160,7 @@ double VCLXCurrencyField::getMin() throw(::com::sun::star::uno::RuntimeException void VCLXCurrencyField::setMax( double Value ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; LongCurrencyFormatter* pCurrencyFormatter = (LongCurrencyFormatter*) GetFormatter(); if ( pCurrencyFormatter ) @@ -5830,7 +6170,7 @@ void VCLXCurrencyField::setMax( double Value ) throw(::com::sun::star::uno::Runt double VCLXCurrencyField::getMax() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; LongCurrencyFormatter* pCurrencyFormatter = (LongCurrencyFormatter*) GetFormatter(); return pCurrencyFormatter @@ -5840,7 +6180,7 @@ double VCLXCurrencyField::getMax() throw(::com::sun::star::uno::RuntimeException void VCLXCurrencyField::setFirst( double Value ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; LongCurrencyField* pCurrencyField = (LongCurrencyField*) GetWindow(); if ( pCurrencyField ) @@ -5850,7 +6190,7 @@ void VCLXCurrencyField::setFirst( double Value ) throw(::com::sun::star::uno::Ru double VCLXCurrencyField::getFirst() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; LongCurrencyField* pCurrencyField = (LongCurrencyField*) GetWindow(); return pCurrencyField @@ -5860,7 +6200,7 @@ double VCLXCurrencyField::getFirst() throw(::com::sun::star::uno::RuntimeExcepti void VCLXCurrencyField::setLast( double Value ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; LongCurrencyField* pCurrencyField = (LongCurrencyField*) GetWindow(); if ( pCurrencyField ) @@ -5870,7 +6210,7 @@ void VCLXCurrencyField::setLast( double Value ) throw(::com::sun::star::uno::Run double VCLXCurrencyField::getLast() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; LongCurrencyField* pCurrencyField = (LongCurrencyField*) GetWindow(); return pCurrencyField @@ -5880,7 +6220,7 @@ double VCLXCurrencyField::getLast() throw(::com::sun::star::uno::RuntimeExceptio void VCLXCurrencyField::setSpinSize( double Value ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; LongCurrencyField* pCurrencyField = (LongCurrencyField*) GetWindow(); if ( pCurrencyField ) @@ -5890,7 +6230,7 @@ void VCLXCurrencyField::setSpinSize( double Value ) throw(::com::sun::star::uno: double VCLXCurrencyField::getSpinSize() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; LongCurrencyField* pCurrencyField = (LongCurrencyField*) GetWindow(); return pCurrencyField @@ -5911,7 +6251,7 @@ sal_Bool VCLXCurrencyField::isStrictFormat() throw(::com::sun::star::uno::Runtim void VCLXCurrencyField::setDecimalDigits( sal_Int16 Value ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; LongCurrencyFormatter* pCurrencyFormatter = (LongCurrencyFormatter*) GetFormatter(); if ( pCurrencyFormatter ) @@ -5924,7 +6264,7 @@ void VCLXCurrencyField::setDecimalDigits( sal_Int16 Value ) throw(::com::sun::st sal_Int16 VCLXCurrencyField::getDecimalDigits() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; LongCurrencyFormatter* pCurrencyFormatter = (LongCurrencyFormatter*) GetFormatter(); return pCurrencyFormatter ? pCurrencyFormatter->GetDecimalDigits() : 0; @@ -5932,7 +6272,7 @@ sal_Int16 VCLXCurrencyField::getDecimalDigits() throw(::com::sun::star::uno::Run void VCLXCurrencyField::setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if ( GetWindow() ) { @@ -6008,7 +6348,7 @@ void VCLXCurrencyField::setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any VCLXCurrencyField::getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::uno::Any aProp; FormatterBase* pFormatter = GetFormatter(); @@ -6114,7 +6454,7 @@ IMPL_XTYPEPROVIDER_END void VCLXPatternField::setMasks( const ::rtl::OUString& EditMask, const ::rtl::OUString& LiteralMask ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; PatternField* pPatternField = (PatternField*) GetWindow(); if ( pPatternField ) @@ -6125,7 +6465,7 @@ void VCLXPatternField::setMasks( const ::rtl::OUString& EditMask, const ::rtl::O void VCLXPatternField::getMasks( ::rtl::OUString& EditMask, ::rtl::OUString& LiteralMask ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; PatternField* pPatternField = (PatternField*) GetWindow(); if ( pPatternField ) @@ -6137,7 +6477,7 @@ void VCLXPatternField::getMasks( ::rtl::OUString& EditMask, ::rtl::OUString& Lit void VCLXPatternField::setString( const ::rtl::OUString& Str ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; PatternField* pPatternField = (PatternField*) GetWindow(); if ( pPatternField ) @@ -6148,7 +6488,7 @@ void VCLXPatternField::setString( const ::rtl::OUString& Str ) throw(::com::sun: ::rtl::OUString VCLXPatternField::getString() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::rtl::OUString aString; PatternField* pPatternField = (PatternField*) GetWindow(); @@ -6169,7 +6509,7 @@ sal_Bool VCLXPatternField::isStrictFormat() throw(::com::sun::star::uno::Runtime void VCLXPatternField::setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if ( GetWindow() ) { @@ -6202,7 +6542,7 @@ void VCLXPatternField::setProperty( const ::rtl::OUString& PropertyName, const : ::com::sun::star::uno::Any VCLXPatternField::getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::uno::Any aProp; if ( GetWindow() ) @@ -6246,3 +6586,99 @@ VCLXToolBox::~VCLXToolBox() return getAccessibleFactory().createAccessibleContext( this ); } +// ---------------------------------------------------- +// class VCLXFrame +// ---------------------------------------------------- +VCLXFrame::VCLXFrame() +{ +} + +void VCLXFrame::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) +{ + PushPropertyIds( rIds, + BASEPROPERTY_BACKGROUNDCOLOR, + BASEPROPERTY_DEFAULTCONTROL, + BASEPROPERTY_ENABLED, + BASEPROPERTY_ENABLEVISIBLE, + BASEPROPERTY_FONTDESCRIPTOR, + BASEPROPERTY_GRAPHIC, + BASEPROPERTY_HELPTEXT, + BASEPROPERTY_HELPURL, + BASEPROPERTY_PRINTABLE, + BASEPROPERTY_LABEL, + 0); + VCLXContainer::ImplGetPropertyIds( rIds ); +} + +VCLXFrame::~VCLXFrame() +{ +} + +::com::sun::star::uno::Any SAL_CALL VCLXFrame::queryInterface(const ::com::sun::star::uno::Type & rType ) +throw(::com::sun::star::uno::RuntimeException) +{ + return VCLXContainer::queryInterface( rType ); +} + +// ::com::sun::star::lang::XTypeProvider +IMPL_XTYPEPROVIDER_START( VCLXFrame ) + VCLXContainer::getTypes() +IMPL_XTYPEPROVIDER_END + +// ::com::sun::star::awt::XView +void SAL_CALL VCLXFrame::draw( sal_Int32 nX, sal_Int32 nY ) +throw(::com::sun::star::uno::RuntimeException) +{ + SolarMutexGuard aGuard; + Window* pWindow = GetWindow(); + + if ( pWindow ) + { + OutputDevice* pDev = VCLUnoHelper::GetOutputDevice( getGraphics() ); + if ( !pDev ) + pDev = pWindow->GetParent(); + + Size aSize = pDev->PixelToLogic( pWindow->GetSizePixel() ); + Point aPos = pDev->PixelToLogic( Point( nX, nY ) ); + + pWindow->Draw( pDev, aPos, aSize, WINDOW_DRAW_NOCONTROLS ); + } +} + +// ::com::sun::star::awt::XDevice, +::com::sun::star::awt::DeviceInfo SAL_CALL VCLXFrame::getInfo() +throw(::com::sun::star::uno::RuntimeException) +{ + ::com::sun::star::awt::DeviceInfo aInfo = VCLXDevice::getInfo(); + return aInfo; +} + +void SAL_CALL VCLXFrame::setProperty( + const ::rtl::OUString& PropertyName, + const ::com::sun::star::uno::Any& Value ) +throw(::com::sun::star::uno::RuntimeException) +{ + SolarMutexGuard aGuard; + +#if OSL_DEBUG_LEVEL > 0 + sal_Bool bVoid = Value.getValueType().getTypeClass() == ::com::sun::star::uno::TypeClass_VOID; + (void)bVoid; +#endif + + sal_uInt16 nPropType = GetPropertyId( PropertyName ); + switch ( nPropType ) + { + default: + { + VCLXContainer::setProperty( PropertyName, Value ); + } + } +} + +void VCLXFrame::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) +{ + ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > xKeepAlive( this ); + VCLXContainer::ProcessWindowEvent( rVclWindowEvent ); +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/xsimpleanimation.cxx b/toolkit/source/awt/xsimpleanimation.cxx index 75701cb94b46..f59016fd77a2 100644 --- a/toolkit/source/awt/xsimpleanimation.cxx +++ b/toolkit/source/awt/xsimpleanimation.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -31,6 +32,7 @@ #include "toolkit/helper/property.hxx" #include <tools/debug.hxx> #include <vcl/throbber.hxx> +#include <vcl/svapp.hxx> //........................................................................ namespace toolkit @@ -59,7 +61,7 @@ namespace toolkit //-------------------------------------------------------------------- void SAL_CALL XSimpleAnimation::start() throw ( uno::RuntimeException ) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) ); if ( pThrobber != NULL) pThrobber->start(); @@ -68,7 +70,7 @@ namespace toolkit //-------------------------------------------------------------------- void SAL_CALL XSimpleAnimation::stop() throw ( uno::RuntimeException ) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) ); if ( pThrobber != NULL) pThrobber->stop(); @@ -78,7 +80,7 @@ namespace toolkit void SAL_CALL XSimpleAnimation::setImageList( const uno::Sequence< uno::Reference< graphic::XGraphic > >& rImageList ) throw ( uno::RuntimeException ) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) ); if ( pThrobber != NULL) pThrobber->setImageList( rImageList ); @@ -88,7 +90,7 @@ namespace toolkit void SAL_CALL XSimpleAnimation::setProperty( const ::rtl::OUString& PropertyName, const uno::Any& Value ) throw( uno::RuntimeException ) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) ); if ( pThrobber == NULL ) @@ -122,7 +124,7 @@ namespace toolkit uno::Any SAL_CALL XSimpleAnimation::getProperty( const ::rtl::OUString& PropertyName ) throw( uno::RuntimeException ) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) ); if ( pThrobber == NULL ) @@ -147,3 +149,5 @@ namespace toolkit //........................................................................ } // namespace toolkit //........................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/xthrobber.cxx b/toolkit/source/awt/xthrobber.cxx index 3b9b361202e9..95c6b5b3d197 100644 --- a/toolkit/source/awt/xthrobber.cxx +++ b/toolkit/source/awt/xthrobber.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -31,12 +32,11 @@ #include "toolkit/helper/property.hxx" #include <toolkit/helper/tkresmgr.hxx> -#ifndef _TOOLKIT_AWT_XTHROBBER_HRC_ #include "xthrobber.hrc" -#endif #include <tools/debug.hxx> #include <vcl/fixed.hxx> #include <vcl/timer.hxx> +#include <vcl/svapp.hxx> #include <vcl/throbber.hxx> //........................................................................ @@ -66,7 +66,7 @@ namespace toolkit //-------------------------------------------------------------------- void SAL_CALL XThrobber::start() throw ( uno::RuntimeException ) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) ); if ( pThrobber != NULL) pThrobber->start(); @@ -75,7 +75,7 @@ namespace toolkit //-------------------------------------------------------------------- void SAL_CALL XThrobber::stop() throw ( uno::RuntimeException ) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) ); if ( pThrobber != NULL) pThrobber->stop(); @@ -92,7 +92,7 @@ namespace toolkit void SAL_CALL XThrobber::InitImageList() throw( uno::RuntimeException ) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) ); if ( pThrobber == NULL) @@ -101,9 +101,6 @@ namespace toolkit uno::Sequence< uno::Reference< graphic::XGraphic > > aImageList(12); sal_uInt16 nIconIdStart = RID_TK_ICON_THROBBER_START; - if ( pThrobber->GetSettings().GetStyleSettings().GetHighContrastMode() ) - nIconIdStart = RID_TK_HC_ICON_THROBBER_START; - for ( sal_uInt16 i=0; i<12; i++ ) { Image aImage = TK_RES_IMAGE( nIconIdStart + i ); @@ -116,3 +113,5 @@ namespace toolkit //........................................................................ } // namespace toolkit //........................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/xthrobber.hrc b/toolkit/source/awt/xthrobber.hrc index 32c068ff8a85..8fd8e741fa40 100644 --- a/toolkit/source/awt/xthrobber.hrc +++ b/toolkit/source/awt/xthrobber.hrc @@ -28,12 +28,6 @@ #ifndef _TOOLKIT_AWT_XTHROBBER_HRC_ #define _TOOLKIT_AWT_XTHROBBER_HRC_ - -//------------------------------------------------------------------------------ - #define RID_TK_ICON_THROBBER_START 1000 -#define RID_TK_HC_ICON_THROBBER_START 1020 - -// ----------------------------------------------------------------------------- #endif // _TOOLKIT_AWT_XTHROBBER_HRC_ diff --git a/toolkit/source/awt/xthrobber.src b/toolkit/source/awt/xthrobber.src index 199b25015056..90b8fdf1201c 100644 --- a/toolkit/source/awt/xthrobber.src +++ b/toolkit/source/awt/xthrobber.src @@ -102,76 +102,3 @@ Image RID_TK_ICON_THROBBER_START + 11 ImageBitmap = Bitmap{ file = "spinner03-grey_12.png"; }; STD_MASK_COLOR }; - -Image RID_TK_HC_ICON_THROBBER_START -{ - ImageBitmap = Bitmap{ file = "spinner03-32-hc_01.png"; }; - STD_MASK_COLOR -}; - -Image RID_TK_HC_ICON_THROBBER_START + 1 -{ - ImageBitmap = Bitmap{ file = "spinner03-32-hc_02.png"; }; - STD_MASK_COLOR -}; - -Image RID_TK_HC_ICON_THROBBER_START + 2 -{ - ImageBitmap = Bitmap{ file = "spinner03-32-hc_03.png"; }; - STD_MASK_COLOR -}; - -Image RID_TK_HC_ICON_THROBBER_START + 3 -{ - ImageBitmap = Bitmap{ file = "spinner03-32-hc_04.png"; }; - STD_MASK_COLOR -}; - -Image RID_TK_HC_ICON_THROBBER_START + 4 -{ - ImageBitmap = Bitmap{ file = "spinner03-32-hc_05.png"; }; - STD_MASK_COLOR -}; - -Image RID_TK_HC_ICON_THROBBER_START + 5 -{ - ImageBitmap = Bitmap{ file = "spinner03-32-hc_06.png"; }; - STD_MASK_COLOR -}; - -Image RID_TK_HC_ICON_THROBBER_START + 6 -{ - ImageBitmap = Bitmap{ file = "spinner03-32-hc_07.png"; }; - STD_MASK_COLOR -}; - -Image RID_TK_HC_ICON_THROBBER_START + 7 -{ - ImageBitmap = Bitmap{ file = "spinner03-32-hc_08.png"; }; - STD_MASK_COLOR -}; - -Image RID_TK_HC_ICON_THROBBER_START + 8 -{ - ImageBitmap = Bitmap{ file = "spinner03-32-hc_09.png"; }; - STD_MASK_COLOR -}; - -Image RID_TK_HC_ICON_THROBBER_START + 9 -{ - ImageBitmap = Bitmap{ file = "spinner03-32-hc_10.png"; }; - STD_MASK_COLOR -}; - -Image RID_TK_HC_ICON_THROBBER_START + 10 -{ - ImageBitmap = Bitmap{ file = "spinner03-32-hc_11.png"; }; - STD_MASK_COLOR -}; - -Image RID_TK_HC_ICON_THROBBER_START + 11 -{ - ImageBitmap = Bitmap{ file = "spinner03-32-hc_12.png"; }; - STD_MASK_COLOR -}; - diff --git a/toolkit/source/controls/accessiblecontrolcontext.cxx b/toolkit/source/controls/accessiblecontrolcontext.cxx index 2611b2f37a91..d56deb87c72c 100644 --- a/toolkit/source/controls/accessiblecontrolcontext.cxx +++ b/toolkit/source/controls/accessiblecontrolcontext.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -103,7 +104,7 @@ namespace toolkit } catch( const Exception& ) { - OSL_ENSURE( sal_False, "OAccessibleControlContext::create: caught an exception from the late ctor!" ); + OSL_FAIL( "OAccessibleControlContext::create: caught an exception from the late ctor!" ); } return pNew; } @@ -228,7 +229,7 @@ namespace toolkit } catch( const Exception& ) { - OSL_ENSURE( sal_False, "OAccessibleControlContext::getModelStringProperty: caught an exception!" ); + OSL_FAIL( "OAccessibleControlContext::getModelStringProperty: caught an exception!" ); } return sReturn; } @@ -251,11 +252,11 @@ namespace toolkit //-------------------------------------------------------------------- awt::Rectangle SAL_CALL OAccessibleControlContext::implGetBounds( ) throw (RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; // want to do some VCL stuff here ... OContextEntryGuard aGuard( this ); - OSL_ENSURE( sal_False, "OAccessibleControlContext::implGetBounds: performance issue: forced to calc the size myself!" ); + OSL_FAIL( "OAccessibleControlContext::implGetBounds: performance issue: forced to calc the size myself!" ); // In design mode (and this is what this class is for), the surrounding shape (if any) should handle this call // The problem is that in design mode, our size may not be correct (in the drawing layer, controls are // positioned/sized for painting only), and that calculation of our position is expensive @@ -318,7 +319,7 @@ namespace toolkit //-------------------------------------------------------------------- void SAL_CALL OAccessibleControlContext::grabFocus( ) throw (RuntimeException) { - OSL_ENSURE( sal_False, "OAccessibleControlContext::grabFocus: !isFocusTraversable, but grabFocus!" ); + OSL_FAIL( "OAccessibleControlContext::grabFocus: !isFocusTraversable, but grabFocus!" ); } //-------------------------------------------------------------------- @@ -331,7 +332,7 @@ namespace toolkit //-------------------------------------------------------------------- sal_Int32 SAL_CALL OAccessibleControlContext::getForeground( ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; // want to do some VCL stuff here ... OContextEntryGuard aGuard( this ); @@ -357,7 +358,7 @@ namespace toolkit //-------------------------------------------------------------------- sal_Int32 SAL_CALL OAccessibleControlContext::getBackground( ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; // want to do some VCL stuff here ... OContextEntryGuard aGuard( this ); @@ -378,3 +379,4 @@ namespace toolkit } //namespace toolkit //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/controls/animatedimages.cxx b/toolkit/source/controls/animatedimages.cxx index c2fd91f1ea46..8ee3bbd866b3 100755..100644 --- a/toolkit/source/controls/animatedimages.cxx +++ b/toolkit/source/controls/animatedimages.cxx @@ -289,7 +289,7 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ ::rtl::OUString SAL_CALL AnimatedImagesControlModel::getImplementationName( ) throw(RuntimeException) { - return ::rtl::OUString::createFromAscii( "org.openoffice.comp.toolkit.AnimatedImagesControlModel" ); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.toolkit.AnimatedImagesControlModel")); } //------------------------------------------------------------------------------------------------------------------ @@ -297,7 +297,7 @@ namespace toolkit { Sequence< ::rtl::OUString > aServiceNames(2); aServiceNames[0] = ::rtl::OUString::createFromAscii( szServiceName_AnimatedImagesControlModel ); - aServiceNames[1] = ::rtl::OUString::createFromAscii( "com.sun.star.awt.UnoControlModel" ); + aServiceNames[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlModel")); return aServiceNames; } diff --git a/toolkit/source/controls/controlmodelcontainerbase.cxx b/toolkit/source/controls/controlmodelcontainerbase.cxx index 25f30cb88d34..f791ee07ca2d 100644 --- a/toolkit/source/controls/controlmodelcontainerbase.cxx +++ b/toolkit/source/controls/controlmodelcontainerbase.cxx @@ -32,7 +32,7 @@ #include <vcl/svapp.hxx> #include <vcl/window.hxx> #include <vcl/wall.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <toolkit/helper/property.hxx> #include <toolkit/helper/unopropertyarrayhelper.hxx> #include <toolkit/controls/geometrycontrolmodel.hxx> @@ -47,7 +47,6 @@ #include <com/sun/star/awt/WindowAttribute.hpp> #include <com/sun/star/resource/XStringResourceResolver.hpp> #include <com/sun/star/graphic/XGraphicProvider.hpp> -#include <tools/list.hxx> #include <cppuhelper/typeprovider.hxx> #include <tools/debug.hxx> #include <tools/diagnose_ex.h> @@ -67,11 +66,14 @@ #include "grid/gridcontrol.hxx" #include <toolkit/controls/tabpagecontainer.hxx> +#include <boost/bind.hpp> + #include <map> #include <algorithm> #include <functional> #include "tools/urlobj.hxx" #include "osl/file.hxx" +#include "toolkit/controls/dialogcontrol.hxx" using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -126,7 +128,7 @@ struct DisposeControlModel : public ::std::unary_function< Reference< XControlMo } catch( const Exception& ) { - DBG_ERROR( "DisposeControlModel::(): caught an exception while disposing a component!" ); + OSL_TRACE( "DisposeControlModel::(): caught an exception while disposing a component!" ); } } }; @@ -295,7 +297,7 @@ void SAL_CALL ControlModelContainerBase::dispose( ) throw(RuntimeException) ::std::transform( maModels.begin(), maModels.end(), // source range aChildModels.begin(), // target location - ::std::select1st< UnoControlModelHolder >( ) // operation to apply -> select the XControlModel part + ::boost::bind( &UnoControlModelHolder::first, _1 ) // operation to apply -> select the XControlModel part ); // now dispose @@ -336,7 +338,7 @@ ControlModelContainerBase::UnoControlModelHolderList::iterator ControlModelConta // ::XMultiServiceFactory Reference< XInterface > ControlModelContainerBase::createInstance( const ::rtl::OUString& aServiceSpecifier ) throw(Exception, RuntimeException) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; OGeometryControlModel_Base* pNewModel = NULL; @@ -389,6 +391,12 @@ Reference< XInterface > ControlModelContainerBase::createInstance( const ::rtl:: pNewModel = new OGeometryControlModel< UnoGridModel >( xFactory ); else if ( aServiceSpecifier.compareToAscii( szServiceName_UnoControlTabPageContainerModel ) == 0 ) pNewModel = new OGeometryControlModel< UnoControlTabPageContainerModel >( xFactory ); + else if ( aServiceSpecifier.compareToAscii( szServiceName_UnoMultiPageModel ) == 0 ) + pNewModel = new OGeometryControlModel< UnoMultiPageModel >( xFactory ); + else if ( aServiceSpecifier.compareToAscii( szServiceName_UnoPageModel ) == 0 ) + pNewModel = new OGeometryControlModel< UnoPageModel >( xFactory ); + else if ( aServiceSpecifier.compareToAscii( szServiceName_UnoFrameModel ) == 0 ) + pNewModel = new OGeometryControlModel< UnoFrameModel >( xFactory ); if ( !pNewModel ) { @@ -400,7 +408,7 @@ Reference< XInterface > ControlModelContainerBase::createInstance( const ::rtl:: Reference< XAggregation > xAgg( xCloneAccess, UNO_QUERY ); if ( xAgg.is() ) { - if ( xSI->supportsService( ::rtl::OUString::createFromAscii( "com.sun.star.awt.UnoControlModel" ) ) ) + if ( xSI->supportsService(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlModel"))) ) { // release 3 of the 4 references we have to the object xAgg.clear(); @@ -427,7 +435,7 @@ Sequence< ::rtl::OUString > ControlModelContainerBase::getAvailableServiceNames( static Sequence< ::rtl::OUString >* pNamesSeq = NULL; if ( !pNamesSeq ) { - pNamesSeq = new Sequence< ::rtl::OUString >( 24 ); + pNamesSeq = new Sequence< ::rtl::OUString >( 26 ); ::rtl::OUString* pNames = pNamesSeq->getArray(); pNames[0] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlEditModel ); pNames[1] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlFormattedFieldModel ); @@ -453,6 +461,8 @@ Sequence< ::rtl::OUString > ControlModelContainerBase::getAvailableServiceNames( pNames[21] = ::rtl::OUString::createFromAscii( szServiceName_GridControlModel ); pNames[22] = ::rtl::OUString::createFromAscii( szServiceName_UnoControlTabPageContainerModel ); pNames[23] = ::rtl::OUString::createFromAscii( szServiceName_UnoControlTabPageModel ); + pNames[23] = ::rtl::OUString::createFromAscii( szServiceName_UnoMultiPageModel ); + pNames[24] = ::rtl::OUString::createFromAscii( szServiceName_UnoFrameModel ); } return *pNamesSeq; } @@ -483,7 +493,7 @@ sal_Bool ControlModelContainerBase::hasElements() throw(RuntimeException) // XNameContainer, XNameReplace, XNameAccess void ControlModelContainerBase::replaceByName( const ::rtl::OUString& aName, const Any& aElement ) throw(IllegalArgumentException, NoSuchElementException, WrappedTargetException, RuntimeException) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; Reference< XControlModel > xNewModel; aElement >>= xNewModel; @@ -493,7 +503,20 @@ void ControlModelContainerBase::replaceByName( const ::rtl::OUString& aName, con UnoControlModelHolderList::iterator aElementPos = ImplFindElement( aName ); if ( maModels.end() == aElementPos ) lcl_throwNoSuchElementException(); - + // Dialog behaviour is to have all containee names unique ( MSO Userform is the same ) + // With container controls you could have constructed an existing hierachy and are now + // add this to an existing container, in this case a name nested in the containment + // hierachy of the added control could contain a name clash, if we have access to the + // list of global names then recursively check for previously existing names ( we need + // to do this obviously before the 'this' objects container is updated + Reference< XNameContainer > xAllChildren( getPropertyValue( GetPropertyName( BASEPROPERTY_USERFORMCONTAINEES ) ), UNO_QUERY ); + if ( xAllChildren.is() ) + { + // remove old control ( and children ) from global list of containees + updateUserFormChildren( xAllChildren, aName, Remove, uno::Reference< XControlModel >() ); + // Add new control ( and containees if they exist ) + updateUserFormChildren( xAllChildren, aName, Insert, xNewModel ); + } // stop listening at the old model stopControlListening( aElementPos->first ); Reference< XControlModel > xReplaced( aElementPos->first ); @@ -530,7 +553,7 @@ Sequence< ::rtl::OUString > ControlModelContainerBase::getElementNames() throw(R ::std::transform( maModels.begin(), maModels.end(), // source range aNames.getArray(), // target range - ::std::select2nd< UnoControlModelHolder >() // operator to apply: select the second element (the name) + ::boost::bind( &UnoControlModelHolder::second, _1 ) // operator to apply: select the second element (the name) ); return aNames; @@ -543,7 +566,7 @@ sal_Bool ControlModelContainerBase::hasByName( const ::rtl::OUString& aName ) th void ControlModelContainerBase::insertByName( const ::rtl::OUString& aName, const Any& aElement ) throw(IllegalArgumentException, ElementExistException, WrappedTargetException, RuntimeException) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; Reference< XControlModel > xM; aElement >>= xM; @@ -580,6 +603,17 @@ void ControlModelContainerBase::insertByName( const ::rtl::OUString& aName, cons if ( maModels.end() != aElementPos ) lcl_throwElementExistException(); + // Dialog behaviour is to have all containee names unique ( MSO Userform is the same ) + // With container controls you could have constructed an existing hierachy and are now + // add this to an existing container, in this case a name nested in the containment + // hierachy of the added control could contain a name clash, if we have access to the + // list of global names then we need to recursively check for previously existing + // names ( we need to do this obviously before the 'this' objects container is updated + // remove old control ( and children ) from global list of containees + Reference< XNameContainer > xAllChildren( getPropertyValue( GetPropertyName( BASEPROPERTY_USERFORMCONTAINEES ) ), UNO_QUERY ); + + if ( xAllChildren.is() ) + updateUserFormChildren( xAllChildren, aName, Insert, xM ); maModels.push_back( UnoControlModelHolder( xM, aName ) ); mbGroupsUpToDate = sal_False; startControlListening( xM ); @@ -596,12 +630,21 @@ void ControlModelContainerBase::insertByName( const ::rtl::OUString& aName, cons void ControlModelContainerBase::removeByName( const ::rtl::OUString& aName ) throw(NoSuchElementException, WrappedTargetException, RuntimeException) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; UnoControlModelHolderList::iterator aElementPos = ImplFindElement( aName ); if ( maModels.end() == aElementPos ) lcl_throwNoSuchElementException(); + // Dialog behaviour is to have all containee names unique ( MSO Userform is the same ) + // With container controls you could have constructed an existing hierachy and are now + // removing this control from an existing container, in this case all nested names in + // the containment hierachy of the control to be removed need to be removed from the global + // names cache ( we need to do this obviously before the 'this' objects container is updated ) + Reference< XNameContainer > xAllChildren( getPropertyValue( GetPropertyName( BASEPROPERTY_USERFORMCONTAINEES ) ), UNO_QUERY ); + if ( xAllChildren.is() ) + updateUserFormChildren( xAllChildren, aName, Remove, uno::Reference< XControlModel >() ); + ContainerEvent aEvent; aEvent.Source = *this; aEvent.Element <<= aElementPos->first; @@ -633,13 +676,13 @@ sal_Bool SAL_CALL ControlModelContainerBase::getGroupControl( ) throw (RuntimeE // ---------------------------------------------------------------------------- void SAL_CALL ControlModelContainerBase::setGroupControl( sal_Bool ) throw (RuntimeException) { - DBG_ERROR( "UnoControlDialogModel::setGroupControl: explicit grouping not supported" ); + OSL_TRACE( "UnoControlDialogModel::setGroupControl: explicit grouping not supported" ); } // ---------------------------------------------------------------------------- void SAL_CALL ControlModelContainerBase::setControlModels( const Sequence< Reference< XControlModel > >& _rControls ) throw (RuntimeException) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; // set the tab indexes according to the order of models in the sequence const Reference< XControlModel >* pControls = _rControls.getConstArray( ); @@ -676,7 +719,7 @@ typedef ::std::multimap< sal_Int32, Reference< XControlModel >, ::std::less< sal // ---------------------------------------------------------------------------- Sequence< Reference< XControlModel > > SAL_CALL ControlModelContainerBase::getControlModels( ) throw (RuntimeException) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; MapIndexToModel aSortedModels; // will be the sorted container of all models which have a tab index property @@ -715,7 +758,7 @@ Sequence< Reference< XControlModel > > SAL_CALL ControlModelContainerBase::getCo ::std::transform( aSortedModels.begin(), aSortedModels.end(), ::std::copy( aUnindexedModels.begin(), aUnindexedModels.end(), aReturn.getArray() ), - ::std::select2nd< MapIndexToModel::value_type >( ) + ::boost::bind( &MapIndexToModel::value_type::second, _1 ) ); return aReturn; @@ -728,7 +771,7 @@ void SAL_CALL ControlModelContainerBase::setGroup( const Sequence< Reference< XC // We only have a sequence of control models, and we _know_ (yes, that's a HACK relying on // implementation details) that VCL does grouping according to the order of controls automatically // At least VCL does this for all we're interested in: Radio buttons. - DBG_ERROR( "UnoControlDialogModel::setGroup: grouping not supported" ); + OSL_TRACE( "UnoControlDialogModel::setGroup: grouping not supported" ); } ////----- XInitialization ------------------------------------------------------------------- @@ -758,7 +801,7 @@ void SAL_CALL ControlModelContainerBase::setEnabled( ::sal_Bool _enabled ) throw } ::rtl::OUString SAL_CALL ControlModelContainerBase::getTitle() throw (::com::sun::star::uno::RuntimeException) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; Reference<XPropertySet> xThis(*this,UNO_QUERY); ::rtl::OUString sTitle; xThis->getPropertyValue(GetPropertyName(BASEPROPERTY_TITLE)) >>= sTitle; @@ -767,7 +810,7 @@ void SAL_CALL ControlModelContainerBase::setEnabled( ::sal_Bool _enabled ) throw } void SAL_CALL ControlModelContainerBase::setTitle( const ::rtl::OUString& _title ) throw (::com::sun::star::uno::RuntimeException) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; Reference<XPropertySet> xThis(*this,UNO_QUERY); xThis->setPropertyValue(GetPropertyName(BASEPROPERTY_TITLE),makeAny(_title)); } @@ -808,7 +851,7 @@ namespace } catch( const Exception& ) { - DBG_ERROR( "lcl_getDialogStep: caught an exception while determining the dialog page!" ); + OSL_TRACE( "lcl_getDialogStep: caught an exception while determining the dialog page!" ); } return nStep; } @@ -817,7 +860,7 @@ namespace // ---------------------------------------------------------------------------- sal_Int32 SAL_CALL ControlModelContainerBase::getGroupCount( ) throw (RuntimeException) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; implUpdateGroupStructure(); @@ -827,13 +870,13 @@ sal_Int32 SAL_CALL ControlModelContainerBase::getGroupCount( ) throw (RuntimeEx // ---------------------------------------------------------------------------- void SAL_CALL ControlModelContainerBase::getGroup( sal_Int32 _nGroup, Sequence< Reference< XControlModel > >& _rGroup, ::rtl::OUString& _rName ) throw (RuntimeException) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; implUpdateGroupStructure(); if ( ( _nGroup < 0 ) || ( _nGroup >= (sal_Int32)maGroups.size() ) ) { - DBG_ERROR( "UnoControlDialogModel::getGroup: invalid argument and I am not allowed to throw an exception!" ); + OSL_TRACE( "UnoControlDialogModel::getGroup: invalid argument and I am not allowed to throw an exception!" ); _rGroup.realloc( 0 ); _rName = ::rtl::OUString(); } @@ -851,7 +894,7 @@ void SAL_CALL ControlModelContainerBase::getGroup( sal_Int32 _nGroup, Sequence< // ---------------------------------------------------------------------------- void SAL_CALL ControlModelContainerBase::getGroupByName( const ::rtl::OUString& _rName, Sequence< Reference< XControlModel > >& _rGroup ) throw (RuntimeException) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; ::rtl::OUString sDummyName; getGroup( _rName.toInt32( ), _rGroup, sDummyName ); @@ -953,8 +996,8 @@ void ControlModelContainerBase::implUpdateGroupStructure() #if OSL_DEBUG_LEVEL > 1 Reference< XPropertySet > xModelProps( *pControlModels, UNO_QUERY ); ::rtl::OUString sLabel; - if ( xModelProps.is() && xModelProps->getPropertySetInfo().is() && xModelProps->getPropertySetInfo()->hasPropertyByName( ::rtl::OUString::createFromAscii( "Label" ) ) ) - xModelProps->getPropertyValue( ::rtl::OUString::createFromAscii( "Label" ) ) >>= sLabel; + if ( xModelProps.is() && xModelProps->getPropertySetInfo().is() && xModelProps->getPropertySetInfo()->hasPropertyByName( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Label")) ) ) + xModelProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Label")) ) >>= sLabel; aCurrentGroupLabels.push_back( sLabel ); #endif } @@ -986,8 +1029,8 @@ void ControlModelContainerBase::implUpdateGroupStructure() #if OSL_DEBUG_LEVEL > 1 Reference< XPropertySet > xModelProps( *pControlModels, UNO_QUERY ); ::rtl::OUString sLabel; - if ( xModelProps.is() && xModelProps->getPropertySetInfo().is() && xModelProps->getPropertySetInfo()->hasPropertyByName( ::rtl::OUString::createFromAscii( "Label" ) ) ) - xModelProps->getPropertyValue( ::rtl::OUString::createFromAscii( "Label" ) ) >>= sLabel; + if ( xModelProps.is() && xModelProps->getPropertySetInfo().is() && xModelProps->getPropertySetInfo()->hasPropertyByName( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Label")) ) ) + xModelProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Label")) ) >>= sLabel; aCurrentGroupLabels.push_back( sLabel ); #endif continue; @@ -1016,8 +1059,8 @@ void ControlModelContainerBase::implUpdateGroupStructure() #if OSL_DEBUG_LEVEL > 1 Reference< XPropertySet > xModelProps( *pControlModels, UNO_QUERY ); ::rtl::OUString sLabel; - if ( xModelProps.is() && xModelProps->getPropertySetInfo().is() && xModelProps->getPropertySetInfo()->hasPropertyByName( ::rtl::OUString::createFromAscii( "Label" ) ) ) - xModelProps->getPropertyValue( ::rtl::OUString::createFromAscii( "Label" ) ) >>= sLabel; + if ( xModelProps.is() && xModelProps->getPropertySetInfo().is() && xModelProps->getPropertySetInfo()->hasPropertyByName( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Label")) ) ) + xModelProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Label")) ) >>= sLabel; aCurrentGroupLabels.push_back( sLabel ); #endif } @@ -1031,7 +1074,7 @@ void ControlModelContainerBase::implUpdateGroupStructure() // ---------------------------------------------------------------------------- void SAL_CALL ControlModelContainerBase::propertyChange( const PropertyChangeEvent& _rEvent ) throw (RuntimeException) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; DBG_ASSERT( 0 == _rEvent.PropertyName.compareToAscii( "TabIndex" ), "UnoControlDialogModel::propertyChange: not listening for this property!" ); @@ -1062,7 +1105,7 @@ void SAL_CALL ControlModelContainerBase::disposing( const EventObject& /*rEvent* // ---------------------------------------------------------------------------- void ControlModelContainerBase::startControlListening( const Reference< XControlModel >& _rxChildModel ) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; Reference< XPropertySet > xModelProps( _rxChildModel, UNO_QUERY ); Reference< XPropertySetInfo > xPSI; @@ -1076,7 +1119,7 @@ void ControlModelContainerBase::startControlListening( const Reference< XControl // ---------------------------------------------------------------------------- void ControlModelContainerBase::stopControlListening( const Reference< XControlModel >& _rxChildModel ) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; Reference< XPropertySet > xModelProps( _rxChildModel, UNO_QUERY ); Reference< XPropertySetInfo > xPSI; @@ -1331,7 +1374,7 @@ ControlContainerBase::~ControlContainerBase() void ControlContainerBase::createPeer( const Reference< XToolkit > & rxToolkit, const Reference< XWindowPeer > & rParentPeer ) throw(RuntimeException) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; UnoControlContainer::createPeer( rxToolkit, rParentPeer ); } @@ -1436,13 +1479,12 @@ void ControlContainerBase::ImplSetPosSize( Reference< XControl >& rxCtrl ) void ControlContainerBase::dispose() throw(RuntimeException) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); - EventObject aEvt; aEvt.Source = static_cast< ::cppu::OWeakObject* >( this ); // Notify our listener helper about dispose // --- SAFE --- - ::osl::ResettableGuard< ::osl::Mutex > aGuard( GetMutex() ); + + SolarMutexClearableGuard aGuard; Reference< XEventListener > xListener( mxListener, UNO_QUERY ); mxListener.clear(); aGuard.clear(); @@ -1462,7 +1504,7 @@ throw(RuntimeException) sal_Bool ControlContainerBase::setModel( const Reference< XControlModel >& rxModel ) throw(RuntimeException) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; // destroy the old tab controller, if existent if ( mxTabController.is() ) @@ -1535,8 +1577,7 @@ sal_Bool ControlContainerBase::setModel( const Reference< XControlModel >& rxMod } void ControlContainerBase::setDesignMode( sal_Bool bOn ) throw(RuntimeException) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); - ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); + SolarMutexGuard aGuard; UnoControl::setDesignMode( bOn ); @@ -1555,7 +1596,7 @@ void ControlContainerBase::setDesignMode( sal_Bool bOn ) throw(RuntimeException) void ControlContainerBase::elementInserted( const ContainerEvent& Event ) throw(RuntimeException) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; Reference< XControlModel > xModel; ::rtl::OUString aName; @@ -1576,7 +1617,7 @@ void ControlContainerBase::elementInserted( const ContainerEvent& Event ) throw( void ControlContainerBase::elementRemoved( const ContainerEvent& Event ) throw(RuntimeException) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; Reference< XControlModel > xModel; Event.Element >>= xModel; @@ -1594,7 +1635,7 @@ void ControlContainerBase::elementRemoved( const ContainerEvent& Event ) throw(R void ControlContainerBase::elementReplaced( const ContainerEvent& Event ) throw(RuntimeException) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; Reference< XControlModel > xModel; Event.ReplacedElement >>= xModel; @@ -1671,7 +1712,7 @@ void ControlContainerBase::ImplModelPropertiesChanged( const Sequence< PropertyC void ControlContainerBase::addingControl( const Reference< XControl >& _rxControl ) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; UnoControlContainer::addingControl( _rxControl ); if ( _rxControl.is() ) @@ -1681,10 +1722,10 @@ void ControlContainerBase::addingControl( const Reference< XControl >& _rxContro { Sequence< ::rtl::OUString > aNames( 4 ); ::rtl::OUString* pNames = aNames.getArray(); - *pNames++ = ::rtl::OUString::createFromAscii( "PositionX" ); - *pNames++ = ::rtl::OUString::createFromAscii( "PositionY" ); - *pNames++ = ::rtl::OUString::createFromAscii( "Width" ); - *pNames++ = ::rtl::OUString::createFromAscii( "Height" ); + *pNames++ = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PositionX") ); + *pNames++ = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PositionY") ); + *pNames++ = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Width")); + *pNames++ = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Height")); xProps->addPropertiesChangeListener( aNames, this ); } @@ -1693,7 +1734,7 @@ void ControlContainerBase::addingControl( const Reference< XControl >& _rxContro void ControlContainerBase::removingControl( const Reference< XControl >& _rxControl ) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; UnoControlContainer::removingControl( _rxControl ); if ( _rxControl.is() ) @@ -1707,7 +1748,7 @@ void ControlContainerBase::removingControl( const Reference< XControl >& _rxCont void SAL_CALL ControlContainerBase::changesOccurred( const ChangesEvent& ) throw (RuntimeException) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; // a tab controller model may have changed // #109067# in design mode don't notify the tab controller @@ -1858,3 +1899,53 @@ uno::Reference< graphic::XGraphic > ControlContainerBase::Impl_getGraphicFromURL return absoluteURL; } +void +ControlModelContainerBase::updateUserFormChildren( const Reference< XNameContainer >& xAllChildren, const rtl::OUString& aName, ChildOperation Operation, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& xTarget ) throw(IllegalArgumentException, ElementExistException, WrappedTargetException, RuntimeException) +{ + if ( Operation < Insert || Operation > Remove ) + throw IllegalArgumentException(); + + if ( xAllChildren.is() ) + { + if ( Operation == Remove ) + { + Reference< XControlModel > xOldModel( xAllChildren->getByName( aName ), UNO_QUERY ); + xAllChildren->removeByName( aName ); + + Reference< XNameContainer > xChildContainer( xOldModel, UNO_QUERY ); + if ( xChildContainer.is() ) + { + Reference< XPropertySet > xProps( xChildContainer, UNO_QUERY ); + // container control is being removed from this container, reset the + // global list of containees + if ( xProps.is() ) + xProps->setPropertyValue( GetPropertyName( BASEPROPERTY_USERFORMCONTAINEES ), uno::makeAny( uno::Reference< XNameContainer >() ) ); + Sequence< rtl::OUString > aChildNames = xChildContainer->getElementNames(); + for ( sal_Int32 index=0; index< aChildNames.getLength(); ++index ) + updateUserFormChildren( xAllChildren, aChildNames[ index ], Operation, Reference< XControlModel > () ); + } + } + else if ( Operation == Insert ) + { + xAllChildren->insertByName( aName, uno::makeAny( xTarget ) ); + Reference< XNameContainer > xChildContainer( xTarget, UNO_QUERY ); + if ( xChildContainer.is() ) + { + // container control is being added from this container, reset the + // global list of containees to point to the correct global list + Reference< XPropertySet > xProps( xChildContainer, UNO_QUERY ); + if ( xProps.is() ) + xProps->setPropertyValue( GetPropertyName( BASEPROPERTY_USERFORMCONTAINEES ), uno::makeAny( xAllChildren ) ); + Sequence< rtl::OUString > aChildNames = xChildContainer->getElementNames(); + for ( sal_Int32 index=0; index< aChildNames.getLength(); ++index ) + { + Reference< XControlModel > xChildTarget( xChildContainer->getByName( aChildNames[ index ] ), UNO_QUERY ); + updateUserFormChildren( xAllChildren, aChildNames[ index ], Operation, xChildTarget ); + } + } + } + } + else + throw IllegalArgumentException(); +} + diff --git a/toolkit/source/controls/dialogcontrol.cxx b/toolkit/source/controls/dialogcontrol.cxx index 069e1d497324..072a8ae5b09d 100644 --- a/toolkit/source/controls/dialogcontrol.cxx +++ b/toolkit/source/controls/dialogcontrol.cxx @@ -31,7 +31,7 @@ #include <vcl/svapp.hxx> #include <vcl/window.hxx> #include <vcl/wall.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <toolkit/controls/dialogcontrol.hxx> #include <toolkit/helper/property.hxx> #include <toolkit/helper/unopropertyarrayhelper.hxx> @@ -40,7 +40,6 @@ #include <com/sun/star/awt/WindowAttribute.hpp> #include <com/sun/star/resource/XStringResourceResolver.hpp> #include <com/sun/star/graphic/XGraphicProvider.hpp> -#include <tools/list.hxx> #include <cppuhelper/typeprovider.hxx> #include <tools/debug.hxx> #include <tools/diagnose_ex.h> @@ -53,11 +52,16 @@ #include <vcl/graph.hxx> #include <vcl/image.hxx> #include <map> +#include <boost/unordered_map.hpp> +#include <cppuhelper/implbase1.hxx> #include <algorithm> #include <functional> #include "tools/urlobj.hxx" #include "osl/file.hxx" +#include <vcl/tabctrl.hxx> +#include <toolkit/awt/vclxwindows.hxx> + using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::awt; @@ -70,6 +74,82 @@ using namespace ::com::sun::star::util; #define PROPERTY_IMAGEURL ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ImageURL" )) #define PROPERTY_GRAPHIC ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Graphic" )) // + +// we probably will need both a hash of control models and hash of controls +// => use some template magic + +typedef ::cppu::WeakImplHelper1< container::XNameContainer > SimpleNameContainer_BASE; + +template< typename T > +class SimpleNamedThingContainer : public SimpleNameContainer_BASE +{ + typedef boost::unordered_map< rtl::OUString, Reference< T >, ::rtl::OUStringHash, + ::std::equal_to< ::rtl::OUString > > NamedThingsHash; + NamedThingsHash things; + ::osl::Mutex m_aMutex; +public: + // ::com::sun::star::container::XNameContainer, XNameReplace, XNameAccess + virtual void SAL_CALL replaceByName( const ::rtl::OUString& aName, const Any& aElement ) throw(IllegalArgumentException, NoSuchElementException, WrappedTargetException, RuntimeException) + { + ::osl::MutexGuard aGuard( m_aMutex ); + if ( !hasByName( aName ) ) + throw NoSuchElementException(); + Reference< T > xElement; + if ( ! ( aElement >>= xElement ) ) + throw IllegalArgumentException(); + things[ aName ] = xElement; + } + virtual Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw(NoSuchElementException, WrappedTargetException, RuntimeException) + { + ::osl::MutexGuard aGuard( m_aMutex ); + if ( !hasByName( aName ) ) + throw NoSuchElementException(); + return uno::makeAny( things[ aName ] ); + } + virtual Sequence< ::rtl::OUString > SAL_CALL getElementNames( ) throw(RuntimeException) + { + ::osl::MutexGuard aGuard( m_aMutex ); + Sequence< ::rtl::OUString > aResult( things.size() ); + typename NamedThingsHash::iterator it = things.begin(); + typename NamedThingsHash::iterator it_end = things.end(); + rtl::OUString* pName = aResult.getArray(); + for (; it != it_end; ++it, ++pName ) + *pName = it->first; + return aResult; + } + virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw(RuntimeException) + { + ::osl::MutexGuard aGuard( m_aMutex ); + return ( things.find( aName ) != things.end() ); + } + virtual void SAL_CALL insertByName( const ::rtl::OUString& aName, const Any& aElement ) throw(IllegalArgumentException, ElementExistException, WrappedTargetException, RuntimeException) + { + ::osl::MutexGuard aGuard( m_aMutex ); + if ( hasByName( aName ) ) + throw ElementExistException(); + Reference< T > xElement; + if ( ! ( aElement >>= xElement ) ) + throw IllegalArgumentException(); + things[ aName ] = xElement; + } + virtual void SAL_CALL removeByName( const ::rtl::OUString& aName ) throw(NoSuchElementException, WrappedTargetException, RuntimeException) + { + ::osl::MutexGuard aGuard( m_aMutex ); + if ( !hasByName( aName ) ) + throw NoSuchElementException(); + things.erase( things.find( aName ) ); + } + virtual Type SAL_CALL getElementType( ) throw (RuntimeException) + { + return T::static_type( NULL ); + } + virtual ::sal_Bool SAL_CALL hasElements( ) throw (RuntimeException) + { + ::osl::MutexGuard aGuard( m_aMutex ); + return ( things.size() > 0 ); + } +}; + ////HELPER ::rtl::OUString getPhysicalLocation( const ::com::sun::star::uno::Any& rbase, const ::com::sun::star::uno::Any& rUrl ); @@ -99,6 +179,9 @@ UnoControlDialogModel::UnoControlDialogModel( const Reference< XMultiServiceFact aBool <<= (sal_Bool) sal_True; ImplRegisterProperty( BASEPROPERTY_MOVEABLE, aBool ); ImplRegisterProperty( BASEPROPERTY_CLOSEABLE, aBool ); + // #TODO separate class for 'UserForm' ( instead of re-using Dialog ? ) + uno::Reference< XNameContainer > xNameCont = new SimpleNamedThingContainer< XControlModel >(); + ImplRegisterProperty( BASEPROPERTY_USERFORMCONTAINEES, uno::makeAny( xNameCont ) ); } UnoControlDialogModel::UnoControlDialogModel( const UnoControlDialogModel& rModel ) @@ -183,14 +266,14 @@ UnoDialogControl::~UnoDialogControl() sal_Bool bDecoration( sal_True ); ImplGetPropertyValue( GetPropertyName( BASEPROPERTY_DECORATION )) >>= bDecoration; if ( bDecoration ) - return ::rtl::OUString::createFromAscii( "Dialog" ); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Dialog")); else - return ::rtl::OUString::createFromAscii( "TabPage" ); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TabPage")); } void UnoDialogControl::dispose() throw(RuntimeException) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; EventObject aEvt; aEvt.Source = static_cast< ::cppu::OWeakObject* >( this ); @@ -208,7 +291,7 @@ throw(RuntimeException) sal_Bool UnoDialogControl::setModel( const Reference< XControlModel >& rxModel ) throw(RuntimeException) { // #Can we move all the Resource stuff to the ControlContainerBase ? - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; sal_Bool bRet = ControlContainerBase::setModel( rxModel ); ImplStartListingForResourceEvents(); return bRet; @@ -216,7 +299,7 @@ sal_Bool UnoDialogControl::setModel( const Reference< XControlModel >& rxModel ) void UnoDialogControl::createPeer( const Reference< XToolkit > & rxToolkit, const Reference< XWindowPeer > & rParentPeer ) throw(RuntimeException) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; UnoControlContainer::createPeer( rxToolkit, rParentPeer ); @@ -288,7 +371,7 @@ void UnoDialogControl::removeTopWindowListener( const Reference< XTopWindowListe void UnoDialogControl::toFront( ) throw (RuntimeException) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if ( getPeer().is() ) { Reference< XTopWindow > xTW( getPeer(), UNO_QUERY ); @@ -299,7 +382,7 @@ void UnoDialogControl::toFront( ) throw (RuntimeException) void UnoDialogControl::toBack( ) throw (RuntimeException) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if ( getPeer().is() ) { Reference< XTopWindow > xTW( getPeer(), UNO_QUERY ); @@ -310,7 +393,7 @@ void UnoDialogControl::toBack( ) throw (RuntimeException) void UnoDialogControl::setMenuBar( const Reference< XMenuBar >& rxMenuBar ) throw (RuntimeException) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; mxMenuBar = rxMenuBar; if ( getPeer().is() ) { @@ -419,7 +502,7 @@ void SAL_CALL UnoDialogControl::setHelpId( const rtl::OUString& i_id ) throw (Ru void UnoDialogControl::setTitle( const ::rtl::OUString& Title ) throw(RuntimeException) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; Any aAny; aAny <<= Title; ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_TITLE ), aAny, sal_True ); @@ -427,13 +510,13 @@ void UnoDialogControl::setTitle( const ::rtl::OUString& Title ) throw(RuntimeExc ::rtl::OUString UnoDialogControl::getTitle() throw(RuntimeException) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; return ImplGetPropertyValue_UString( BASEPROPERTY_TITLE ); } sal_Int16 UnoDialogControl::execute() throw(RuntimeException) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; sal_Int16 nDone = -1; if ( getPeer().is() ) { @@ -450,7 +533,7 @@ sal_Int16 UnoDialogControl::execute() throw(RuntimeException) void UnoDialogControl::endExecute() throw(RuntimeException) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if ( getPeer().is() ) { Reference< XDialog > xDlg( getPeer(), UNO_QUERY ); @@ -497,3 +580,560 @@ void UnoDialogControl::ImplModelPropertiesChanged( const Sequence< PropertyChang } ControlContainerBase::ImplModelPropertiesChanged(rEvents); } + +// ---------------------------------------------------- +// class MultiPageControl +// ---------------------------------------------------- +UnoMultiPageControl::UnoMultiPageControl( const uno::Reference< lang::XMultiServiceFactory >& i_factory) : ControlContainerBase( i_factory ), maTabListeners( *this ) +{ + maComponentInfos.nWidth = 280; + maComponentInfos.nHeight = 400; +} + +UnoMultiPageControl::~UnoMultiPageControl() +{ +} +// XTabListener + +void SAL_CALL UnoMultiPageControl::inserted( ::sal_Int32 /*ID*/ ) throw (RuntimeException) +{ +} +void SAL_CALL UnoMultiPageControl::removed( ::sal_Int32 /*ID*/ ) throw (RuntimeException) +{ +} +void SAL_CALL UnoMultiPageControl::changed( ::sal_Int32 /*ID*/, const Sequence< NamedValue >& /*Properties*/ ) throw (RuntimeException) +{ +} +void SAL_CALL UnoMultiPageControl::activated( ::sal_Int32 ID ) throw (RuntimeException) +{ + ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_MULTIPAGEVALUE ), uno::makeAny( ID ), sal_False ); + +} +void SAL_CALL UnoMultiPageControl::deactivated( ::sal_Int32 /*ID*/ ) throw (RuntimeException) +{ +} +void SAL_CALL UnoMultiPageControl::disposing(const EventObject&) throw (RuntimeException) +{ +} + +void SAL_CALL UnoMultiPageControl::dispose() throw (RuntimeException) +{ + lang::EventObject aEvt; + aEvt.Source = (::cppu::OWeakObject*)this; + maTabListeners.disposeAndClear( aEvt ); + ControlContainerBase::dispose(); +} + +// com::sun::star::awt::XSimpleTabController +::sal_Int32 SAL_CALL UnoMultiPageControl::insertTab() throw (RuntimeException) +{ + Reference< XSimpleTabController > xMultiPage( getPeer(), UNO_QUERY ); + if ( !xMultiPage.is() ) + throw RuntimeException(); + return xMultiPage->insertTab(); +} + +void SAL_CALL UnoMultiPageControl::removeTab( ::sal_Int32 ID ) throw (IndexOutOfBoundsException, RuntimeException) +{ + Reference< XSimpleTabController > xMultiPage( getPeer(), UNO_QUERY ); + if ( !xMultiPage.is() ) + throw RuntimeException(); + xMultiPage->removeTab( ID ); +} + +void SAL_CALL UnoMultiPageControl::setTabProps( ::sal_Int32 ID, const Sequence< NamedValue >& Properties ) throw (IndexOutOfBoundsException, RuntimeException) +{ + Reference< XSimpleTabController > xMultiPage( getPeer(), UNO_QUERY ); + if ( !xMultiPage.is() ) + throw RuntimeException(); + xMultiPage->setTabProps( ID, Properties ); +} + +Sequence< NamedValue > SAL_CALL UnoMultiPageControl::getTabProps( ::sal_Int32 ID ) throw (IndexOutOfBoundsException, RuntimeException) +{ + Reference< XSimpleTabController > xMultiPage( getPeer(), UNO_QUERY ); + if ( !xMultiPage.is() ) + throw RuntimeException(); + return xMultiPage->getTabProps( ID ); +} + +void SAL_CALL UnoMultiPageControl::activateTab( ::sal_Int32 ID ) throw (IndexOutOfBoundsException, RuntimeException) +{ + Reference< XSimpleTabController > xMultiPage( getPeer(), UNO_QUERY ); + if ( !xMultiPage.is() ) + throw RuntimeException(); + xMultiPage->activateTab( ID ); + ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_MULTIPAGEVALUE ), uno::makeAny( ID ), sal_True ); + +} + +::sal_Int32 SAL_CALL UnoMultiPageControl::getActiveTabID() throw (RuntimeException) +{ + Reference< XSimpleTabController > xMultiPage( getPeer(), UNO_QUERY ); + if ( !xMultiPage.is() ) + throw RuntimeException(); + return xMultiPage->getActiveTabID(); +} + +void SAL_CALL UnoMultiPageControl::addTabListener( const Reference< XTabListener >& Listener ) throw (RuntimeException) +{ + maTabListeners.addInterface( Listener ); + Reference< XSimpleTabController > xMultiPage( getPeer(), UNO_QUERY ); + if ( xMultiPage.is() && maTabListeners.getLength() == 1 ) + xMultiPage->addTabListener( &maTabListeners ); +} + +void SAL_CALL UnoMultiPageControl::removeTabListener( const Reference< XTabListener >& Listener ) throw (RuntimeException) +{ + Reference< XSimpleTabController > xMultiPage( getPeer(), UNO_QUERY ); + if ( xMultiPage.is() && maTabListeners.getLength() == 1 ) + xMultiPage->removeTabListener( &maTabListeners ); + maTabListeners.removeInterface( Listener ); +} + + +// lang::XTypeProvider +IMPL_XTYPEPROVIDER_START( UnoMultiPageControl ) + getCppuType( ( uno::Reference< awt::XSimpleTabController>* ) NULL ), + getCppuType( ( uno::Reference< awt::XTabListener>* ) NULL ), + ControlContainerBase::getTypes() +IMPL_XTYPEPROVIDER_END + +// uno::XInterface +uno::Any UnoMultiPageControl::queryAggregation( const uno::Type & rType ) throw(uno::RuntimeException) +{ + uno::Any aRet = ::cppu::queryInterface( rType, + SAL_STATIC_CAST( awt::XTabListener*, this ), SAL_STATIC_CAST( awt::XSimpleTabController*, this ) ); + return (aRet.hasValue() ? aRet : ControlContainerBase::queryAggregation( rType )); +} + +::rtl::OUString UnoMultiPageControl::GetComponentServiceName() +{ + sal_Bool bDecoration( sal_True ); + ImplGetPropertyValue( GetPropertyName( BASEPROPERTY_DECORATION )) >>= bDecoration; + if ( bDecoration ) + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("tabcontrol")); + // Hopefully we can tweak the tabcontrol to display without tabs + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("tabcontrolnotabs")); +} + +void UnoMultiPageControl::bindPage( const uno::Reference< awt::XControl >& _rxControl ) +{ + uno::Reference< awt::XWindowPeer > xPage( _rxControl->getPeer() ); + uno::Reference< awt::XSimpleTabController > xTabCntrl( getPeer(), uno::UNO_QUERY ); + uno::Reference< beans::XPropertySet > xProps( _rxControl->getModel(), uno::UNO_QUERY ); + + VCLXTabPage* pXPage = dynamic_cast< VCLXTabPage* >( xPage.get() ); + TabPage* pPage = pXPage ? pXPage->getTabPage() : NULL; + if ( xTabCntrl.is() && pPage ) + { + VCLXMultiPage* pXTab = dynamic_cast< VCLXMultiPage* >( xTabCntrl.get() ); + if ( pXTab ) + { + rtl::OUString sTitle; + xProps->getPropertyValue( GetPropertyName( BASEPROPERTY_TITLE ) ) >>= sTitle; + pXTab->insertTab( pPage, sTitle); + } + } + +} + +void UnoMultiPageControl::createPeer( const Reference< XToolkit > & rxToolkit, const Reference< XWindowPeer > & rParentPeer ) throw(RuntimeException) +{ + SolarMutexGuard aSolarGuard; + + UnoControlContainer::createPeer( rxToolkit, rParentPeer ); + + uno::Sequence< uno::Reference< awt::XControl > > aCtrls = getControls(); + sal_uInt32 nCtrls = aCtrls.getLength(); + for( sal_uInt32 n = 0; n < nCtrls; n++ ) + bindPage( aCtrls[ n ] ); + sal_Int32 nActiveTab(0); + Reference< XPropertySet > xMultiProps( getModel(), UNO_QUERY ); + xMultiProps->getPropertyValue( GetPropertyName( BASEPROPERTY_MULTIPAGEVALUE ) ) >>= nActiveTab; + + uno::Reference< awt::XSimpleTabController > xTabCntrl( getPeer(), uno::UNO_QUERY ); + if ( xTabCntrl.is() ) + { + xTabCntrl->addTabListener( this ); + if ( nActiveTab && nCtrls ) // Ensure peer is initialise with correct activated tab + { + xTabCntrl->activateTab( nActiveTab ); + ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_MULTIPAGEVALUE ), uno::makeAny( nActiveTab ), sal_True ); + } + } +} + +void UnoMultiPageControl::impl_createControlPeerIfNecessary( const uno::Reference< awt::XControl >& _rxControl) +{ + OSL_PRECOND( _rxControl.is(), "UnoMultiPageControl::impl_createControlPeerIfNecessary: invalid control, this will crash!" ); + + // if the container already has a peer, then also create a peer for the control + uno::Reference< awt::XWindowPeer > xMyPeer( getPeer() ); + + if( xMyPeer.is() ) + { + _rxControl->createPeer( NULL, xMyPeer ); + bindPage( _rxControl ); + ImplActivateTabControllers(); + } + +} + +// ------------- UnoMultiPageModel ----------------- + +UnoMultiPageModel::UnoMultiPageModel( const Reference< XMultiServiceFactory >& i_factory ) : ControlModelContainerBase( i_factory ) +{ + ImplRegisterProperty( BASEPROPERTY_DEFAULTCONTROL ); + ImplRegisterProperty( BASEPROPERTY_BACKGROUNDCOLOR ); + ImplRegisterProperty( BASEPROPERTY_ENABLEVISIBLE ); + ImplRegisterProperty( BASEPROPERTY_ENABLED ); + + ImplRegisterProperty( BASEPROPERTY_FONTDESCRIPTOR ); + ImplRegisterProperty( BASEPROPERTY_HELPTEXT ); + ImplRegisterProperty( BASEPROPERTY_HELPURL ); + ImplRegisterProperty( BASEPROPERTY_SIZEABLE ); + //ImplRegisterProperty( BASEPROPERTY_DIALOGSOURCEURL ); + ImplRegisterProperty( BASEPROPERTY_MULTIPAGEVALUE ); + ImplRegisterProperty( BASEPROPERTY_PRINTABLE ); + ImplRegisterProperty( BASEPROPERTY_USERFORMCONTAINEES ); + + Any aBool; + aBool <<= (sal_Bool) sal_True; + ImplRegisterProperty( BASEPROPERTY_MOVEABLE, aBool ); + ImplRegisterProperty( BASEPROPERTY_CLOSEABLE, aBool ); + ImplRegisterProperty( BASEPROPERTY_DECORATION, aBool ); + // MultiPage Control has the tab stop property. And the default value is True. + ImplRegisterProperty( BASEPROPERTY_TABSTOP, aBool ); + + uno::Reference< XNameContainer > xNameCont = new SimpleNamedThingContainer< XControlModel >(); + ImplRegisterProperty( BASEPROPERTY_USERFORMCONTAINEES, uno::makeAny( xNameCont ) ); +} + +UnoMultiPageModel::UnoMultiPageModel( const UnoMultiPageModel& rModel ) + : ControlModelContainerBase( rModel ) +{ +} + +UnoMultiPageModel::~UnoMultiPageModel() +{ +} + +UnoControlModel* +UnoMultiPageModel::Clone() const +{ + // clone the container itself + UnoMultiPageModel* pClone = new UnoMultiPageModel( *this ); + Clone_Impl( *pClone ); + return pClone; +} + +::rtl::OUString UnoMultiPageModel::getServiceName() throw(::com::sun::star::uno::RuntimeException) +{ + return ::rtl::OUString::createFromAscii( szServiceName_UnoMultiPageModel ); +} + +uno::Any UnoMultiPageModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const +{ + if ( nPropId == BASEPROPERTY_DEFAULTCONTROL ) + { + uno::Any aAny; + aAny <<= ::rtl::OUString::createFromAscii( szServiceName_UnoMultiPageControl ); + return aAny; + } + return ControlModelContainerBase::ImplGetDefaultValue( nPropId ); +} + +::cppu::IPropertyArrayHelper& UnoMultiPageModel::getInfoHelper() +{ + static UnoPropertyArrayHelper* pHelper = NULL; + if ( !pHelper ) + { + uno::Sequence<sal_Int32> aIDs = ImplGetPropertyIds(); + pHelper = new UnoPropertyArrayHelper( aIDs ); + } + return *pHelper; +} + +// beans::XMultiPropertySet +uno::Reference< beans::XPropertySetInfo > UnoMultiPageModel::getPropertySetInfo( ) throw(uno::RuntimeException) +{ + static uno::Reference< beans::XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) ); + return xInfo; +} + +void UnoMultiPageModel::insertByName( const ::rtl::OUString& aName, const Any& aElement ) throw(IllegalArgumentException, ElementExistException, WrappedTargetException, RuntimeException) +{ + Reference< XServiceInfo > xInfo; + aElement >>= xInfo; + + if ( !xInfo.is() ) + throw IllegalArgumentException(); + + // Only a Page model can be inserted into the multipage + if ( !xInfo->supportsService( rtl::OUString::createFromAscii( szServiceName_UnoPageModel ) ) ) + throw IllegalArgumentException(); + + return ControlModelContainerBase::insertByName( aName, aElement ); +} + +// ---------------------------------------------------------------------------- +sal_Bool SAL_CALL UnoMultiPageModel::getGroupControl( ) throw (RuntimeException) +{ + return sal_True; +} + +// ---------------------------------------------------- +// class UnoPageControl +// ---------------------------------------------------- +UnoPageControl::UnoPageControl( const uno::Reference< lang::XMultiServiceFactory >& i_factory ) : ControlContainerBase( i_factory ) +{ + maComponentInfos.nWidth = 280; + maComponentInfos.nHeight = 400; +} + +UnoPageControl::~UnoPageControl() +{ +} + +::rtl::OUString UnoPageControl::GetComponentServiceName() +{ + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("tabpage")); +} + + +// ------------- UnoPageModel ----------------- + +UnoPageModel::UnoPageModel( const Reference< XMultiServiceFactory >& i_factory ) : ControlModelContainerBase( i_factory ) +{ + ImplRegisterProperty( BASEPROPERTY_DEFAULTCONTROL ); + ImplRegisterProperty( BASEPROPERTY_BACKGROUNDCOLOR ); + ImplRegisterProperty( BASEPROPERTY_ENABLED ); + ImplRegisterProperty( BASEPROPERTY_ENABLEVISIBLE ); + + ImplRegisterProperty( BASEPROPERTY_FONTDESCRIPTOR ); + ImplRegisterProperty( BASEPROPERTY_HELPTEXT ); + ImplRegisterProperty( BASEPROPERTY_HELPURL ); + ImplRegisterProperty( BASEPROPERTY_TITLE ); + ImplRegisterProperty( BASEPROPERTY_SIZEABLE ); + ImplRegisterProperty( BASEPROPERTY_PRINTABLE ); + ImplRegisterProperty( BASEPROPERTY_USERFORMCONTAINEES ); +// ImplRegisterProperty( BASEPROPERTY_DIALOGSOURCEURL ); + + Any aBool; + aBool <<= (sal_Bool) sal_True; + ImplRegisterProperty( BASEPROPERTY_MOVEABLE, aBool ); + ImplRegisterProperty( BASEPROPERTY_CLOSEABLE, aBool ); + //ImplRegisterProperty( BASEPROPERTY_TABSTOP, aBool ); + + uno::Reference< XNameContainer > xNameCont = new SimpleNamedThingContainer< XControlModel >(); + ImplRegisterProperty( BASEPROPERTY_USERFORMCONTAINEES, uno::makeAny( xNameCont ) ); +} + +UnoPageModel::UnoPageModel( const UnoPageModel& rModel ) + : ControlModelContainerBase( rModel ) +{ +} + +UnoPageModel::~UnoPageModel() +{ +} + +UnoControlModel* +UnoPageModel::Clone() const +{ + // clone the container itself + UnoPageModel* pClone = new UnoPageModel( *this ); + Clone_Impl( *pClone ); + return pClone; +} + +::rtl::OUString UnoPageModel::getServiceName() throw(::com::sun::star::uno::RuntimeException) +{ + return ::rtl::OUString::createFromAscii( szServiceName_UnoPageModel ); +} + +uno::Any UnoPageModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const +{ + if ( nPropId == BASEPROPERTY_DEFAULTCONTROL ) + { + uno::Any aAny; + aAny <<= ::rtl::OUString::createFromAscii( szServiceName_UnoPageControl ); + return aAny; + } + return ControlModelContainerBase::ImplGetDefaultValue( nPropId ); +} + +::cppu::IPropertyArrayHelper& UnoPageModel::getInfoHelper() +{ + static UnoPropertyArrayHelper* pHelper = NULL; + if ( !pHelper ) + { + uno::Sequence<sal_Int32> aIDs = ImplGetPropertyIds(); + pHelper = new UnoPropertyArrayHelper( aIDs ); + } + return *pHelper; +} + +// beans::XMultiPropertySet +uno::Reference< beans::XPropertySetInfo > UnoPageModel::getPropertySetInfo( ) throw(uno::RuntimeException) +{ + static uno::Reference< beans::XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) ); + return xInfo; +} + +// ---------------------------------------------------------------------------- +sal_Bool SAL_CALL UnoPageModel::getGroupControl( ) throw (RuntimeException) +{ + return sal_False; +} + +// Frame control + +// ---------------------------------------------------- +// class UnoFrameControl +// ---------------------------------------------------- +UnoFrameControl::UnoFrameControl( const uno::Reference< lang::XMultiServiceFactory >& i_factory ) : ControlContainerBase( i_factory ) +{ + maComponentInfos.nWidth = 280; + maComponentInfos.nHeight = 400; +} + +UnoFrameControl::~UnoFrameControl() +{ +} + +::rtl::OUString UnoFrameControl::GetComponentServiceName() +{ + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("frame")); +} + +void UnoFrameControl::ImplSetPosSize( Reference< XControl >& rxCtrl ) +{ + bool bOwnCtrl = false; + rtl::OUString sTitle; + if ( rxCtrl.get() == Reference<XControl>( this ).get() ) + bOwnCtrl = true; + Reference< XPropertySet > xProps( getModel(), UNO_QUERY ); + //xProps->getPropertyValue( GetPropertyName( BASEPROPERTY_TITLE ) ) >>= sTitle; + xProps->getPropertyValue( GetPropertyName( BASEPROPERTY_LABEL ) ) >>= sTitle; + + ControlContainerBase::ImplSetPosSize( rxCtrl ); + Reference < XWindow > xW( rxCtrl, UNO_QUERY ); + if ( !bOwnCtrl && xW.is() && sTitle.getLength() ) + { + awt::Rectangle aSizePos = xW->getPosSize(); + + sal_Int32 nX = aSizePos.X, nY = aSizePos.Y, nWidth = aSizePos.Width, nHeight = aSizePos.Height; + // Retrieve the values set by the base class + OutputDevice*pOutDev = Application::GetDefaultDevice(); + if ( pOutDev ) + { + if ( !bOwnCtrl && sTitle.getLength() ) + { + // Adjust Y based on height of Title + ::Rectangle aRect = pOutDev->GetTextRect( aRect, sTitle ); + nY = nY + ( aRect.GetHeight() / 2 ); + } + } + else + { + Reference< XWindowPeer > xPeer = ImplGetCompatiblePeer( sal_True ); + Reference< XDevice > xD( xPeer, UNO_QUERY ); + + SimpleFontMetric aFM; + FontDescriptor aFD; + Any aVal = ImplGetPropertyValue( GetPropertyName( BASEPROPERTY_FONTDESCRIPTOR ) ); + aVal >>= aFD; + if ( aFD.StyleName.getLength() ) + { + Reference< XFont > xFont = xD->getFont( aFD ); + aFM = xFont->getFontMetric(); + } + else + { + Reference< XGraphics > xG = xD->createGraphics(); + aFM = xG->getFontMetric(); + } + + sal_Int16 nH = aFM.Ascent + aFM.Descent; + if ( !bOwnCtrl && sTitle.getLength() ) + // offset y based on height of font ( not sure if my guess at the correct calculation is correct here ) + nY = nY + ( nH / 8); // how do I test this + } + xW->setPosSize( nX, nY, nWidth, nHeight, PosSize::POSSIZE ); + } +} + +// ------------- UnoFrameModel ----------------- + +UnoFrameModel::UnoFrameModel( const Reference< XMultiServiceFactory >& i_factory ) : ControlModelContainerBase( i_factory ) +{ + ImplRegisterProperty( BASEPROPERTY_DEFAULTCONTROL ); + ImplRegisterProperty( BASEPROPERTY_BACKGROUNDCOLOR ); + ImplRegisterProperty( BASEPROPERTY_ENABLED ); + ImplRegisterProperty( BASEPROPERTY_ENABLEVISIBLE ); + ImplRegisterProperty( BASEPROPERTY_FONTDESCRIPTOR ); + ImplRegisterProperty( BASEPROPERTY_HELPTEXT ); + ImplRegisterProperty( BASEPROPERTY_HELPURL ); + ImplRegisterProperty( BASEPROPERTY_PRINTABLE ); + ImplRegisterProperty( BASEPROPERTY_LABEL ); + ImplRegisterProperty( BASEPROPERTY_WRITING_MODE ); + ImplRegisterProperty( BASEPROPERTY_CONTEXT_WRITING_MODE ); + ImplRegisterProperty( BASEPROPERTY_USERFORMCONTAINEES ); + + uno::Reference< XNameContainer > xNameCont = new SimpleNamedThingContainer< XControlModel >(); + ImplRegisterProperty( BASEPROPERTY_USERFORMCONTAINEES, uno::makeAny( xNameCont ) ); +} + +UnoFrameModel::UnoFrameModel( const UnoFrameModel& rModel ) + : ControlModelContainerBase( rModel ) +{ +} + +UnoFrameModel::~UnoFrameModel() +{ +} + +UnoControlModel* +UnoFrameModel::Clone() const +{ + // clone the container itself + UnoFrameModel* pClone = new UnoFrameModel( *this ); + Clone_Impl( *pClone ); + return pClone; +} + +::rtl::OUString UnoFrameModel::getServiceName() throw(::com::sun::star::uno::RuntimeException) +{ + return ::rtl::OUString::createFromAscii( szServiceName_UnoFrameModel ); +} + +uno::Any UnoFrameModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const +{ + if ( nPropId == BASEPROPERTY_DEFAULTCONTROL ) + { + uno::Any aAny; + aAny <<= ::rtl::OUString::createFromAscii( szServiceName_UnoFrameControl ); + return aAny; + } + return ControlModelContainerBase::ImplGetDefaultValue( nPropId ); +} + +::cppu::IPropertyArrayHelper& UnoFrameModel::getInfoHelper() +{ + static UnoPropertyArrayHelper* pHelper = NULL; + if ( !pHelper ) + { + uno::Sequence<sal_Int32> aIDs = ImplGetPropertyIds(); + pHelper = new UnoPropertyArrayHelper( aIDs ); + } + return *pHelper; +} + +// beans::XMultiPropertySet +uno::Reference< beans::XPropertySetInfo > UnoFrameModel::getPropertySetInfo( ) throw(uno::RuntimeException) +{ + static uno::Reference< beans::XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) ); + return xInfo; +} diff --git a/toolkit/source/controls/eventcontainer.cxx b/toolkit/source/controls/eventcontainer.cxx index 0cbf9d4e7281..f9e546410973 100644 --- a/toolkit/source/controls/eventcontainer.cxx +++ b/toolkit/source/controls/eventcontainer.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -31,9 +32,7 @@ #include <osl/mutex.hxx> #include <cppuhelper/queryinterface.hxx> -#ifndef _CPPUHELER_WEAK_HXX_ #include <cppuhelper/weak.hxx> -#endif #include <cppuhelper/factory.hxx> #include <cppuhelper/interfacecontainer.hxx> @@ -48,9 +47,9 @@ using namespace com::sun::star::registry; using namespace com::sun::star::script; using namespace cppu; using namespace osl; -using namespace rtl; using namespace std; +using ::rtl::OUString; namespace toolkit { @@ -212,3 +211,4 @@ ScriptEventContainer::ScriptEventContainer( void ) +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/controls/formattedcontrol.cxx b/toolkit/source/controls/formattedcontrol.cxx index fb2d0f720c2e..fc8b49ddebe6 100644 --- a/toolkit/source/controls/formattedcontrol.cxx +++ b/toolkit/source/controls/formattedcontrol.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -375,9 +376,9 @@ namespace toolkit } throw IllegalArgumentException( - ( ::rtl::OUString::createFromAscii("Unable to convert the given value for the property ") + ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Unable to convert the given value for the property ")) += GetPropertyName((sal_uInt16)nPropId) ) - += ::rtl::OUString::createFromAscii(" (double, integer, or string expected)."), + += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" (double, integer, or string expected).")), static_cast< XPropertySet* >(this), 1); } @@ -442,7 +443,7 @@ namespace toolkit // ------------------------------------------------------------------- ::rtl::OUString UnoFormattedFieldControl::GetComponentServiceName() { - return ::rtl::OUString::createFromAscii( "FormattedField" ); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FormattedField")); } // ------------------------------------------------------------------- @@ -468,3 +469,5 @@ namespace toolkit //........................................................................ } // namespace toolkit //........................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/controls/geometrycontrolmodel.cxx b/toolkit/source/controls/geometrycontrolmodel.cxx index ac8a6e83ae28..20abfff2654e 100644 --- a/toolkit/source/controls/geometrycontrolmodel.cxx +++ b/toolkit/source/controls/geometrycontrolmodel.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -34,9 +35,7 @@ #include <rtl/instance.hxx> #include <comphelper/property.hxx> #include <comphelper/sequence.hxx> -#ifndef _COM_SUN_STAR_XNAMECONTAINER_HPP_ #include <toolkit/controls/eventcontainer.hxx> -#endif #include <toolkit/helper/property.hxx> #include <tools/debug.hxx> #include <algorithm> @@ -211,7 +210,7 @@ case GCM_PROPERTY_ID_STEP: aDefault <<= (sal_Int32) 0; break; case GCM_PROPERTY_ID_TAG: aDefault <<= ::rtl::OUString(); break; case GCM_PROPERTY_ID_RESOURCERESOLVER: aDefault <<= Reference< resource::XStringResourceResolver >(); break; - default: DBG_ERROR( "ImplGetDefaultValueByHandle - unknown Property" ); + default: OSL_FAIL( "ImplGetDefaultValueByHandle - unknown Property" ); } return aDefault; @@ -233,7 +232,7 @@ case GCM_PROPERTY_ID_STEP: aValue <<= m_nStep; break; case GCM_PROPERTY_ID_TAG: aValue <<= m_aTag; break; case GCM_PROPERTY_ID_RESOURCERESOLVER: aValue <<= m_xStrResolver; break; - default: DBG_ERROR( "ImplGetPropertyValueByHandle - unknown Property" ); + default: OSL_FAIL( "ImplGetPropertyValueByHandle - unknown Property" ); } return aValue; @@ -253,7 +252,7 @@ case GCM_PROPERTY_ID_STEP: aValue >>= m_nStep; break; case GCM_PROPERTY_ID_TAG: aValue >>= m_aTag; break; case GCM_PROPERTY_ID_RESOURCERESOLVER: aValue >>= m_xStrResolver; break; - default: DBG_ERROR( "ImplSetPropertyValueByHandle - unknown Property" ); + default: OSL_FAIL( "ImplSetPropertyValueByHandle - unknown Property" ); } } @@ -454,7 +453,7 @@ //==================================================================== //-------------------------------------------------------------------- - typedef ::std::hash_map< ::rtl::OUString, sal_Int32, ::comphelper::UStringHash > HashMapString2Int; + typedef ::boost::unordered_map< ::rtl::OUString, sal_Int32, ::comphelper::UStringHash > HashMapString2Int; typedef ::std::vector< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property > > PropSeqArray; typedef ::std::vector< ::std::vector< sal_Int32 > > IntArrayArray; @@ -594,20 +593,16 @@ return new OCommonGeometryControlModel( _rxAggregateInstance, m_sServiceSpecifier ); } + namespace + { + class theOCommonGeometryControlModelImplementationId : + public rtl::Static< ::cppu::OImplementationId, theOCommonGeometryControlModelImplementationId > {}; + } + //-------------------------------------------------------------------- Sequence< sal_Int8 > SAL_CALL OCommonGeometryControlModel::getImplementationId( ) throw (RuntimeException) { - static ::cppu::OImplementationId * pId = NULL; - if ( !pId ) - { - ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if ( !pId ) - { - static ::cppu::OImplementationId s_aId; - pId = &s_aId; - } - } - return pId->getImplementationId(); + return theOCommonGeometryControlModelImplementationId::get().getImplementationId(); } //-------------------------------------------------------------------- @@ -651,3 +646,5 @@ //........................................................................ // } // namespace toolkit //........................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx index 0195ddff09a2..91cc3c151e5f 100644 --- a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx +++ b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -390,3 +391,4 @@ namespace toolkit { return ::com::sun::star::uno::Reference < ::com::sun::star::uno::XInterface >( ( ::cppu::OWeakObject* ) new ::toolkit::DefaultGridColumnModel( _rFactory ) ); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/controls/grid/defaultgridcolumnmodel.hxx b/toolkit/source/controls/grid/defaultgridcolumnmodel.hxx index da0ef20e3287..1cdc1ab30c0d 100644 --- a/toolkit/source/controls/grid/defaultgridcolumnmodel.hxx +++ b/toolkit/source/controls/grid/defaultgridcolumnmodel.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -95,3 +96,5 @@ private: }; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/controls/grid/defaultgriddatamodel.cxx b/toolkit/source/controls/grid/defaultgriddatamodel.cxx index 4ef99d749ba1..aae6d61a4692 100644 --- a/toolkit/source/controls/grid/defaultgriddatamodel.cxx +++ b/toolkit/source/controls/grid/defaultgriddatamodel.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -437,3 +438,5 @@ Reference< XInterface > SAL_CALL DefaultGridDataModel_CreateInstance( const Refe { return Reference < XInterface >( ( ::cppu::OWeakObject* ) new ::toolkit::DefaultGridDataModel() ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/controls/grid/defaultgriddatamodel.hxx b/toolkit/source/controls/grid/defaultgriddatamodel.hxx index bf4b6cc3355e..b7fcf01c4f5b 100644 --- a/toolkit/source/controls/grid/defaultgriddatamodel.hxx +++ b/toolkit/source/controls/grid/defaultgriddatamodel.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -116,3 +117,5 @@ private: }; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/controls/grid/gridcolumn.cxx b/toolkit/source/controls/grid/gridcolumn.cxx index c1216d53f328..0e7253509e7a 100644 --- a/toolkit/source/controls/grid/gridcolumn.cxx +++ b/toolkit/source/controls/grid/gridcolumn.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -327,3 +328,4 @@ namespace toolkit return *( new ::toolkit::GridColumn ); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/controls/grid/gridcolumn.hxx b/toolkit/source/controls/grid/gridcolumn.hxx index b1be836a3862..87fe85afce94 100644 --- a/toolkit/source/controls/grid/gridcolumn.hxx +++ b/toolkit/source/controls/grid/gridcolumn.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -133,3 +134,5 @@ private: }; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/controls/grid/gridcontrol.cxx b/toolkit/source/controls/grid/gridcontrol.cxx index acda52753a60..1aeb53fa42fb 100644 --- a/toolkit/source/controls/grid/gridcontrol.cxx +++ b/toolkit/source/controls/grid/gridcontrol.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -287,7 +288,7 @@ UnoGridControl::~UnoGridControl() //---------------------------------------------------------------------------------------------------------------------- OUString UnoGridControl::GetComponentServiceName() { - return OUString::createFromAscii( "Grid" ); + return OUString(RTL_CONSTASCII_USTRINGPARAM("Grid")); } //---------------------------------------------------------------------------------------------------------------------- @@ -451,3 +452,5 @@ Reference< XInterface > SAL_CALL GridControlModel_CreateInstance( const Referenc { return Reference < XInterface >( ( ::cppu::OWeakObject* ) new ::toolkit::UnoGridModel( i_factory ) ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/controls/grid/gridcontrol.hxx b/toolkit/source/controls/grid/gridcontrol.hxx index 61d9f8fc0232..97283e7827b5 100644 --- a/toolkit/source/controls/grid/gridcontrol.hxx +++ b/toolkit/source/controls/grid/gridcontrol.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -130,3 +131,5 @@ private: } // toolkit #endif // _TOOLKIT_TREE_CONTROL_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/controls/grid/grideventforwarder.cxx b/toolkit/source/controls/grid/grideventforwarder.cxx index c3760b8315a3..c3760b8315a3 100755..100644 --- a/toolkit/source/controls/grid/grideventforwarder.cxx +++ b/toolkit/source/controls/grid/grideventforwarder.cxx diff --git a/toolkit/source/controls/grid/grideventforwarder.hxx b/toolkit/source/controls/grid/grideventforwarder.hxx index 5a8b03f57037..5a8b03f57037 100755..100644 --- a/toolkit/source/controls/grid/grideventforwarder.hxx +++ b/toolkit/source/controls/grid/grideventforwarder.hxx diff --git a/toolkit/source/controls/grid/initguard.hxx b/toolkit/source/controls/grid/initguard.hxx index b2dddd2e5987..33a8d58c44a4 100755..100644 --- a/toolkit/source/controls/grid/initguard.hxx +++ b/toolkit/source/controls/grid/initguard.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -62,3 +63,5 @@ namespace toolkit //...................................................................................................................... #endif // SVTOOLS_INITGUARD_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/controls/grid/sortablegriddatamodel.cxx b/toolkit/source/controls/grid/sortablegriddatamodel.cxx index 77a2ffa1637b..77a2ffa1637b 100755..100644 --- a/toolkit/source/controls/grid/sortablegriddatamodel.cxx +++ b/toolkit/source/controls/grid/sortablegriddatamodel.cxx diff --git a/toolkit/source/controls/grid/sortablegriddatamodel.hxx b/toolkit/source/controls/grid/sortablegriddatamodel.hxx index 50f08d3a7113..50f08d3a7113 100755..100644 --- a/toolkit/source/controls/grid/sortablegriddatamodel.hxx +++ b/toolkit/source/controls/grid/sortablegriddatamodel.hxx diff --git a/toolkit/source/controls/roadmapcontrol.cxx b/toolkit/source/controls/roadmapcontrol.cxx index 875f05e2f80d..f72e4126e527 100644 --- a/toolkit/source/controls/roadmapcontrol.cxx +++ b/toolkit/source/controls/roadmapcontrol.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,9 +29,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_toolkit.hxx" -#ifndef _TOOLKIT_ROADMAP_CONTROL_HXX #include <toolkit/controls/roadmapcontrol.hxx> -#endif #include <toolkit/helper/unopropertyarrayhelper.hxx> #include <toolkit/helper/property.hxx> #include <com/sun/star/awt/XVclWindowPeer.hpp> @@ -199,7 +198,7 @@ static void lcl_throwIndexOutOfBoundsException( ) if ( !xRoadmapItem.is() ) lcl_throwIllegalArgumentException(); Reference< XServiceInfo > xServiceInfo( xRoadmapItem, UNO_QUERY ); - sal_Bool bIsRoadmapItem = xServiceInfo->supportsService( ::rtl::OUString::createFromAscii( "com.sun.star.awt.RoadmapItem" ) ); + sal_Bool bIsRoadmapItem = xServiceInfo->supportsService( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.RoadmapItem")) ); if ( !bIsRoadmapItem ) lcl_throwIllegalArgumentException(); } @@ -213,12 +212,12 @@ static void lcl_throwIndexOutOfBoundsException( ) if ( xProps.is() ) { sal_Int32 LocID = 0; - Any aValue = xPropertySet->getPropertyValue( ::rtl::OUString::createFromAscii( "ID" ) ); + Any aValue = xPropertySet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ID")) ); aValue >>= LocID; if (LocID < 0) // index may not be smaller than zero { aAny <<= GetUniqueID(); - xPropertySet->setPropertyValue( ::rtl::OUString::createFromAscii( "ID" ), aAny ); + xPropertySet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ID")), aAny ); } } } @@ -236,12 +235,12 @@ static void lcl_throwIndexOutOfBoundsException( ) Reference< XInterface > CurRoadmapItem; while ( bIncrement ) { - bIncrement = sal_False; - for ( RoadmapItemHolderList::iterator i = maRoadmapItems.begin(); i < maRoadmapItems.end(); i++ ) + bIncrement = sal_False; + for ( RoadmapItemHolderList::iterator i = maRoadmapItems.begin(); i < maRoadmapItems.end(); ++i ) { CurRoadmapItem = *i; Reference< XPropertySet > xPropertySet( CurRoadmapItem, UNO_QUERY ); - aAny = xPropertySet->getPropertyValue( ::rtl::OUString::createFromAscii( "ID" ) ); + aAny = xPropertySet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ID")) ); aAny >>= n_CurItemID; if (n_CurItemID == CurID) { @@ -401,7 +400,7 @@ sal_Bool SAL_CALL UnoRoadmapControl::setModel(const Reference< XControlModel >& // ------------------------------------------------------------------- ::rtl::OUString UnoRoadmapControl::GetComponentServiceName() { - return ::rtl::OUString::createFromAscii( "Roadmap" ); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Roadmap")); } @@ -501,3 +500,4 @@ void SAL_CALL UnoRoadmapControl::propertyChange( const PropertyChangeEvent& evt } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/controls/roadmapentry.cxx b/toolkit/source/controls/roadmapentry.cxx index fb760e404b93..55a3e8b1b3f9 100644 --- a/toolkit/source/controls/roadmapentry.cxx +++ b/toolkit/source/controls/roadmapentry.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -29,10 +30,7 @@ #include "precompiled_toolkit.hxx" #include <toolkit/controls/roadmapentry.hxx> -#ifndef _RTL_USTRING_HXX_ -#include <rtl/OUString.hxx> -#endif - +#include <rtl/ustring.hxx> #include <com/sun/star/beans/PropertyAttribute.hpp> @@ -42,22 +40,22 @@ ORoadmapEntry::ORoadmapEntry() : ORoadmapEntry_Base( ) { // registerProperty or registerMayBeVoidProperty or registerPropertyNoMember - registerProperty( ::rtl::OUString::createFromAscii( "Label" ), RM_PROPERTY_ID_LABEL, + registerProperty( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Label")), RM_PROPERTY_ID_LABEL, ::com::sun::star::beans::PropertyAttribute::BOUND | ::com::sun::star::beans::PropertyAttribute::CONSTRAINED, & m_sLabel, ::getCppuType( &m_sLabel ) ); m_nID = -1; - registerProperty( ::rtl::OUString::createFromAscii( "ID" ), RM_PROPERTY_ID_ID, + registerProperty( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ID")), RM_PROPERTY_ID_ID, ::com::sun::star::beans::PropertyAttribute::BOUND | ::com::sun::star::beans::PropertyAttribute::CONSTRAINED, & m_nID, ::getCppuType( &m_nID ) ); m_bEnabled = sal_True; - registerProperty( ::rtl::OUString::createFromAscii( "Enabled" ), RM_PROPERTY_ID_ENABLED, + registerProperty( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Enabled")), RM_PROPERTY_ID_ENABLED, ::com::sun::star::beans::PropertyAttribute::BOUND | ::com::sun::star::beans::PropertyAttribute::MAYBEDEFAULT, & m_bEnabled, ::getCppuType( &m_bEnabled ) ); - registerProperty( ::rtl::OUString::createFromAscii( "Interactive" ), RM_PROPERTY_ID_INTERACTIVE, + registerProperty( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Interactive")), RM_PROPERTY_ID_INTERACTIVE, ::com::sun::star::beans::PropertyAttribute::BOUND | ::com::sun::star::beans::PropertyAttribute::MAYBEDEFAULT, & m_bInteractive, ::getCppuType( &m_bInteractive ) ); @@ -93,20 +91,20 @@ IMPLEMENT_FORWARD_XTYPEPROVIDER2( ORoadmapEntry, ORoadmapEntry_Base, ::comphelpe ::rtl::OUString SAL_CALL ORoadmapEntry::getImplementationName( ) throw (::com::sun::star::uno::RuntimeException) { - ::rtl::OUString aStr = ::rtl::OUString::createFromAscii("com.sun.star.comp.toolkit.RoadmapItem"); + ::rtl::OUString aStr(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.toolkit.RoadmapItem")); return aStr; } sal_Bool SAL_CALL ORoadmapEntry::supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException) { - return ServiceName.equals( ::rtl::OUString::createFromAscii( "com.sun.star.awt.RoadmapItem" ) ); + return ServiceName.equals( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.RoadmapItem")) ); } ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL ORoadmapEntry::getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException) { ::com::sun::star::uno::Sequence< ::rtl::OUString > aRet(1); ::rtl::OUString* pArray = aRet.getArray(); - pArray[0] = ::rtl::OUString::createFromAscii( "com.sun.star.awt.RoadmapItem" ); + pArray[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.RoadmapItem")); return aRet; } //-------------------------------------------------------------------------- @@ -124,3 +122,5 @@ sal_Bool SAL_CALL ORoadmapEntry::supportsService( const ::rtl::OUString& Service return new ::cppu::OPropertyArrayHelper( aProps ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/controls/spinningprogress.cxx b/toolkit/source/controls/spinningprogress.cxx index cb02274e3997..632d139f8c33 100755..100644 --- a/toolkit/source/controls/spinningprogress.cxx +++ b/toolkit/source/controls/spinningprogress.cxx @@ -122,7 +122,7 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ ::rtl::OUString SAL_CALL SpinningProgressControlModel::getImplementationName( ) throw(RuntimeException) { - return ::rtl::OUString::createFromAscii( "org.openoffice.comp.toolkit.SpinningProgressControlModel" ); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.toolkit.SpinningProgressControlModel")); } //------------------------------------------------------------------------------------------------------------------ @@ -131,7 +131,7 @@ namespace toolkit 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" ); + aServiceNames[2] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlModel")); return aServiceNames; } diff --git a/toolkit/source/controls/stdtabcontroller.cxx b/toolkit/source/controls/stdtabcontroller.cxx index 012a7bc0a084..3065515415f3 100644 --- a/toolkit/source/controls/stdtabcontroller.cxx +++ b/toolkit/source/controls/stdtabcontroller.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -120,7 +121,7 @@ sal_Bool StdTabController::ImplCreateComponentSequence( if ( pTabs ) { // opt: String fuer TabStop als Konstante - static const ::rtl::OUString aTabStopName( ::rtl::OUString::createFromAscii( "Tabstop" ) ); + static const ::rtl::OUString aTabStopName( RTL_CONSTASCII_USTRINGPARAM("Tabstop") ); Reference< XPropertySet > xPSet( xCtrl->getModel(), UNO_QUERY ); Reference< XPropertySetInfo > xInfo = xPSet->getPropertySetInfo(); @@ -132,7 +133,7 @@ sal_Bool StdTabController::ImplCreateComponentSequence( } else { - DBG_TRACE( "ImplCreateComponentSequence: Control not found" ); + OSL_TRACE( "ImplCreateComponentSequence: Control not found" ); bOK = sal_False; } } @@ -262,7 +263,7 @@ void StdTabController::autoTabOrder( ) throw(RuntimeException) Reference< XWindow > * pComponents = aCompSeq.getArray(); ComponentEntryList aCtrls; - sal_uInt32 n; + size_t n; for ( n = 0; n < nCtrls; n++ ) { XWindow* pC = (XWindow*)pComponents[n].get(); @@ -273,31 +274,37 @@ void StdTabController::autoTabOrder( ) throw(RuntimeException) pE->aPos.Y() = aPosSize.Y; sal_uInt16 nPos; - for ( nPos = 0; nPos < aCtrls.Count(); nPos++ ) + for ( nPos = 0; nPos < aCtrls.size(); nPos++ ) { - ComponentEntry* pEntry = aCtrls.GetObject( nPos ); + ComponentEntry* pEntry = aCtrls[ nPos ]; if ( pEntry->aPos.Y() >= pE->aPos.Y() ) { while ( pEntry && ( pEntry->aPos.Y() == pE->aPos.Y() ) && ( pEntry->aPos.X() < pE->aPos.X() ) ) { - pEntry = aCtrls.GetObject( ++nPos ); + pEntry = aCtrls[ ++nPos ]; } break; } } - aCtrls.Insert( pE, nPos ); + if ( nPos < aCtrls.size() ) { + ComponentEntryList::iterator it = aCtrls.begin(); + ::std::advance( it, nPos ); + aCtrls.insert( it, pE ); + } else { + aCtrls.push_back( pE ); + } } Sequence< Reference< XControlModel > > aNewSeq( nCtrls ); for ( n = 0; n < nCtrls; n++ ) { - ComponentEntry* pE = aCtrls.GetObject( n ); + ComponentEntry* pE = aCtrls[ n ]; Reference< XControl > xUC( pE->pComponent, UNO_QUERY ); aNewSeq.getArray()[n] = xUC->getModel(); delete pE; } - aCtrls.Clear(); + aCtrls.clear(); mxModel->setControlModels( aNewSeq ); } @@ -426,3 +433,5 @@ Reference< XControl > StdTabController::FindControl( Sequence< Reference< XCont } return Reference< XControl > (); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/controls/stdtabcontrollermodel.cxx b/toolkit/source/controls/stdtabcontrollermodel.cxx index db0555762511..6ec89722342d 100644 --- a/toolkit/source/controls/stdtabcontrollermodel.cxx +++ b/toolkit/source/controls/stdtabcontrollermodel.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -55,23 +56,47 @@ UnoControlModelEntryList::~UnoControlModelEntryList() void UnoControlModelEntryList::Reset() { - for ( sal_uInt32 n = Count(); n; ) + for ( size_t n = maList.size(); n; ) DestroyEntry( --n ); } -void UnoControlModelEntryList::DestroyEntry( sal_uInt32 nEntry ) +void UnoControlModelEntryList::DestroyEntry( size_t nEntry ) { - UnoControlModelEntry* pEntry = GetObject( nEntry ); + UnoControlModelEntryListBase::iterator it = maList.begin(); + ::std::advance( it, nEntry ); - if ( pEntry->bGroup ) - delete pEntry->pGroup; + if ( (*it)->bGroup ) + delete (*it)->pGroup; else - delete pEntry->pxControl; + delete (*it)->pxControl; - Remove( nEntry ); - delete pEntry; + delete *it; + maList.erase( it ); } +size_t UnoControlModelEntryList::size() const { + return maList.size(); +} + +UnoControlModelEntry* UnoControlModelEntryList::operator[]( size_t i ) const { + return ( i < maList.size() ) ? maList[ i ] : NULL; +} + +void UnoControlModelEntryList::push_back( UnoControlModelEntry* item ) { + maList.push_back( item ); +} + +void UnoControlModelEntryList::insert( size_t i, UnoControlModelEntry* item ) { + if ( i < maList.size() ) { + UnoControlModelEntryListBase::iterator it = maList.begin(); + ::std::advance( it, i ); + maList.insert( it, item ); + } else { + maList.push_back( item ); + } +} + + // ---------------------------------------------------- // class StdTabControllerModel // ---------------------------------------------------- @@ -87,10 +112,10 @@ StdTabControllerModel::~StdTabControllerModel() sal_uInt32 StdTabControllerModel::ImplGetControlCount( const UnoControlModelEntryList& rList ) const { sal_uInt32 nCount = 0; - sal_uInt32 nEntries = rList.Count(); - for ( sal_uInt32 n = 0; n < nEntries; n++ ) + size_t nEntries = rList.size(); + for ( size_t n = 0; n < nEntries; n++ ) { - UnoControlModelEntry* pEntry = rList.GetObject( n ); + UnoControlModelEntry* pEntry = rList[ n ]; if ( pEntry->bGroup ) nCount += ImplGetControlCount( *pEntry->pGroup ); else @@ -101,10 +126,10 @@ sal_uInt32 StdTabControllerModel::ImplGetControlCount( const UnoControlModelEntr void StdTabControllerModel::ImplGetControlModels( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > ** ppRefs, const UnoControlModelEntryList& rList ) const { - sal_uInt32 nEntries = rList.Count(); - for ( sal_uInt32 n = 0; n < nEntries; n++ ) + size_t nEntries = rList.size(); + for ( size_t n = 0; n < nEntries; n++ ) { - UnoControlModelEntry* pEntry = rList.GetObject( n ); + UnoControlModelEntry* pEntry = rList[ n ]; if ( pEntry->bGroup ) ImplGetControlModels( ppRefs, *pEntry->pGroup ); else @@ -125,15 +150,15 @@ void StdTabControllerModel::ImplSetControlModels( UnoControlModelEntryList& rLis pNewEntry->bGroup = sal_False; pNewEntry->pxControl = new ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > ; *pNewEntry->pxControl = pRefs[n]; - rList.Insert( pNewEntry, LIST_APPEND ); + rList.push_back( pNewEntry ); } } sal_uInt32 StdTabControllerModel::ImplGetControlPos( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > xCtrl, const UnoControlModelEntryList& rList ) const { - for ( sal_uInt32 n = rList.Count(); n; ) + for ( size_t n = rList.size(); n; ) { - UnoControlModelEntry* pEntry = rList.GetObject( --n ); + UnoControlModelEntry* pEntry = rList[ --n ]; if ( !pEntry->bGroup && ( *pEntry->pxControl == xCtrl ) ) return n; } @@ -263,10 +288,10 @@ void StdTabControllerModel::setGroup( const ::com::sun::star::uno::Sequence< ::c ImplSetControlModels( *pNewEntry->pGroup, Group ); sal_Bool bInserted = sal_False; - sal_uInt32 nElements = pNewEntry->pGroup->Count(); - for ( sal_uInt32 n = 0; n < nElements; n++ ) + size_t nElements = pNewEntry->pGroup->size(); + for ( size_t n = 0; n < nElements; n++ ) { - UnoControlModelEntry* pEntry = pNewEntry->pGroup->GetObject( n ); + UnoControlModelEntry* pEntry = (*pNewEntry->pGroup)[ n ]; if ( !pEntry->bGroup ) { sal_uInt32 nPos = ImplGetControlPos( *pEntry->pxControl, maControls ); @@ -277,14 +302,14 @@ void StdTabControllerModel::setGroup( const ::com::sun::star::uno::Sequence< ::c maControls.DestroyEntry( nPos ); if ( !bInserted ) { - maControls.Insert( pNewEntry, nPos ); + maControls.insert( nPos, pNewEntry ); bInserted = sal_True; } } } } if ( !bInserted ) - maControls.Insert( pNewEntry, LIST_APPEND ); + maControls.push_back( pNewEntry ); } sal_Int32 StdTabControllerModel::getGroupCount( ) throw(::com::sun::star::uno::RuntimeException) @@ -296,10 +321,10 @@ sal_Int32 StdTabControllerModel::getGroupCount( ) throw(::com::sun::star::uno:: // erstmal nich nach aussen gegeben. sal_Int32 nGroups = 0; - sal_uInt32 nEntries = maControls.Count(); - for ( sal_uInt32 n = 0; n < nEntries; n++ ) + size_t nEntries = maControls.size(); + for ( size_t n = 0; n < nEntries; n++ ) { - UnoControlModelEntry* pEntry = maControls.GetObject( n ); + UnoControlModelEntry* pEntry = maControls[ n ]; if ( pEntry->bGroup ) nGroups++; } @@ -312,10 +337,10 @@ void StdTabControllerModel::getGroup( sal_Int32 nGroup, ::com::sun::star::uno::S ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > > aSeq; sal_uInt32 nG = 0; - sal_uInt32 nEntries = maControls.Count(); - for ( sal_uInt32 n = 0; n < nEntries; n++ ) + size_t nEntries = maControls.size(); + for ( size_t n = 0; n < nEntries; n++ ) { - UnoControlModelEntry* pEntry = maControls.GetObject( n ); + UnoControlModelEntry* pEntry = maControls[ n ]; if ( pEntry->bGroup ) { if ( nG == (sal_uInt32)nGroup ) @@ -338,10 +363,10 @@ void StdTabControllerModel::getGroupByName( const ::rtl::OUString& rName, ::com: ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); sal_uInt32 nGroup = 0; - sal_uInt32 nEntries = maControls.Count(); - for ( sal_uInt32 n = 0; n < nEntries; n++ ) + size_t nEntries = maControls.size(); + for ( size_t n = 0; n < nEntries; n++ ) { - UnoControlModelEntry* pEntry = maControls.GetObject( n ); + UnoControlModelEntry* pEntry = maControls[ n ]; if ( pEntry->bGroup ) { if ( pEntry->pGroup->GetName() == rName ) @@ -406,3 +431,4 @@ void StdTabControllerModel::read( const ::com::sun::star::uno::Reference< ::com: +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/controls/tabpagecontainer.cxx b/toolkit/source/controls/tabpagecontainer.cxx index 808feca02e8a..162f5683153a 100644 --- a/toolkit/source/controls/tabpagecontainer.cxx +++ b/toolkit/source/controls/tabpagecontainer.cxx @@ -38,7 +38,6 @@ #include <comphelper/processfactory.hxx> #include <osl/diagnose.h> #include <vcl/svapp.hxx> -#include <vos/mutex.hxx> #include <com/sun/star/awt/XControlModel.hpp> #include <tools/diagnose_ex.h> @@ -105,7 +104,7 @@ Reference< ::com::sun::star::beans::XPropertySetInfo > UnoControlTabPageContaine void SAL_CALL UnoControlTabPageContainerModel::insertByIndex( ::sal_Int32 nIndex, const com::sun::star::uno::Any& aElement) throw (IllegalArgumentException, IndexOutOfBoundsException, WrappedTargetException, uno::RuntimeException) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; uno::Reference < ::awt::tab::XTabPageModel > xTabPageModel; if(aElement >>= xTabPageModel) { @@ -186,7 +185,7 @@ UnoControlTabPageContainer::UnoControlTabPageContainer( const Reference< XMultiS OUString UnoControlTabPageContainer::GetComponentServiceName() { - return OUString::createFromAscii( "TabPageContainer" ); + return OUString(RTL_CONSTASCII_USTRINGPARAM("TabPageContainer")); } void SAL_CALL UnoControlTabPageContainer::dispose( ) throw(RuntimeException) @@ -211,37 +210,37 @@ void UnoControlTabPageContainer::createPeer( const uno::Reference< awt::XToolkit ::sal_Int16 SAL_CALL UnoControlTabPageContainer::getActiveTabPageID() throw (RuntimeException) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; Reference< XTabPageContainer > xTPContainer( getPeer(), UNO_QUERY_THROW ); return xTPContainer->getActiveTabPageID(); } void SAL_CALL UnoControlTabPageContainer::setActiveTabPageID( ::sal_Int16 _activetabpageid ) throw (RuntimeException) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; Reference< XTabPageContainer > xTPContainer( getPeer(), UNO_QUERY_THROW ); xTPContainer->setActiveTabPageID(_activetabpageid); } ::sal_Int32 SAL_CALL UnoControlTabPageContainer::getTabPageCount( ) throw (RuntimeException) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; Reference< XTabPageContainer > xTPContainer( getPeer(), UNO_QUERY_THROW ); return xTPContainer->getTabPageCount(); } ::sal_Bool SAL_CALL UnoControlTabPageContainer::isTabPageActive( ::sal_Int16 tabPageIndex ) throw (RuntimeException) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; Reference< XTabPageContainer > xTPContainer( getPeer(), UNO_QUERY_THROW ); return xTPContainer->isTabPageActive(tabPageIndex); } Reference< ::com::sun::star::awt::tab::XTabPage > SAL_CALL UnoControlTabPageContainer::getTabPage( ::sal_Int16 tabPageIndex ) throw (RuntimeException) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; Reference< XTabPageContainer > xTPContainer( getPeer(), UNO_QUERY_THROW ); return xTPContainer->getTabPage(tabPageIndex); } Reference< ::com::sun::star::awt::tab::XTabPage > SAL_CALL UnoControlTabPageContainer::getTabPageByID( ::sal_Int16 tabPageID ) throw (RuntimeException) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; Reference< XTabPageContainer > xTPContainer( getPeer(), UNO_QUERY_THROW ); return xTPContainer->getTabPageByID(tabPageID); } @@ -284,7 +283,7 @@ void UnoControlTabPageContainer::updateFromModel() } void SAL_CALL UnoControlTabPageContainer::addControl( const ::rtl::OUString& Name, const Reference< ::com::sun::star::awt::XControl >& Control ) throw (RuntimeException) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ControlContainerBase::addControl(Name,Control); Reference< XContainerListener > xContainerListener( getPeer(), UNO_QUERY ); ContainerEvent aEvent; diff --git a/toolkit/source/controls/tabpagemodel.cxx b/toolkit/source/controls/tabpagemodel.cxx index f498fefd761b..0235139165dc 100644 --- a/toolkit/source/controls/tabpagemodel.cxx +++ b/toolkit/source/controls/tabpagemodel.cxx @@ -31,7 +31,6 @@ #include <vcl/svapp.hxx> #include <vcl/window.hxx> #include <vcl/wall.hxx> -#include <vos/mutex.hxx> #include <toolkit/controls/tabpagemodel.hxx> #include <toolkit/helper/property.hxx> #include <toolkit/helper/unopropertyarrayhelper.hxx> @@ -41,7 +40,6 @@ #include <com/sun/star/awt/UnoControlDialogModelProvider.hpp> #include <com/sun/star/resource/XStringResourceResolver.hpp> #include <com/sun/star/graphic/XGraphicProvider.hpp> -#include <tools/list.hxx> #include <cppuhelper/typeprovider.hxx> #include <tools/debug.hxx> #include <tools/diagnose_ex.h> @@ -249,14 +247,13 @@ void SAL_CALL UnoControlTabPageModel::initialize (const Sequence<Any>& rArgument //===== Service =============================================================== ::rtl::OUString UnoControlTabPageModel_getImplementationName (void) throw(RuntimeException) { - return rtl::OUString::createFromAscii("com.sun.star.awt.tab.UnoControlTabPageModel"); + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.tab.UnoControlTabPageModel")); } Sequence<rtl::OUString> SAL_CALL UnoControlTabPageModel_getSupportedServiceNames (void) throw (RuntimeException) { - static const ::rtl::OUString sServiceName( - ::rtl::OUString::createFromAscii("com.sun.star.awt.tab.UnoControlTabPageModel")); + const ::rtl::OUString sServiceName(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.tab.UnoControlTabPageModel")); return Sequence<rtl::OUString>(&sServiceName, 1); } //============================================================================= @@ -276,12 +273,12 @@ UnoControlTabPage::~UnoControlTabPage() ::rtl::OUString UnoControlTabPage::GetComponentServiceName() { - return ::rtl::OUString::createFromAscii( "TabPageModel" ); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TabPageModel")); } void UnoControlTabPage::dispose() throw(RuntimeException) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; EventObject aEvt; aEvt.Source = static_cast< ::cppu::OWeakObject* >( this ); @@ -295,7 +292,7 @@ void SAL_CALL UnoControlTabPage::disposing( const EventObject& Source )throw( void UnoControlTabPage::createPeer( const Reference< XToolkit > & rxToolkit, const Reference< XWindowPeer > & rParentPeer ) throw(RuntimeException) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ImplUpdateResourceResolver(); UnoControlContainer::createPeer( rxToolkit, rParentPeer ); diff --git a/toolkit/source/controls/tkscrollbar.cxx b/toolkit/source/controls/tkscrollbar.cxx index f75183186610..d32a849ae0e8 100644 --- a/toolkit/source/controls/tkscrollbar.cxx +++ b/toolkit/source/controls/tkscrollbar.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -105,7 +106,7 @@ namespace toolkit ::rtl::OUString UnoScrollBarControl::GetComponentServiceName() { - return ::rtl::OUString::createFromAscii( "ScrollBar" ); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScrollBar")); } // ::com::sun::star::uno::XInterface @@ -161,7 +162,7 @@ namespace toolkit break; default: { - DBG_ERROR( "UnoScrollBarControl::adjustmentValueChanged - unknown Type" ); + OSL_FAIL( "UnoScrollBarControl::adjustmentValueChanged - unknown Type" ); } } @@ -294,3 +295,4 @@ namespace toolkit } // namespace toolkit //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/controls/tksimpleanimation.cxx b/toolkit/source/controls/tksimpleanimation.cxx index 90f56d5ad4bd..e5760c215ce2 100644 --- a/toolkit/source/controls/tksimpleanimation.cxx +++ b/toolkit/source/controls/tksimpleanimation.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -128,7 +129,7 @@ namespace toolkit //-------------------------------------------------------------------- ::rtl::OUString UnoSimpleAnimationControl::GetComponentServiceName() { - return ::rtl::OUString::createFromAscii( "SimpleAnimation" ); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SimpleAnimation")); } //-------------------------------------------------------------------- @@ -189,3 +190,4 @@ namespace toolkit } // namespace toolkit //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/controls/tkspinbutton.cxx b/toolkit/source/controls/tkspinbutton.cxx index 9396aea43290..2dc7c14b78bd 100644 --- a/toolkit/source/controls/tkspinbutton.cxx +++ b/toolkit/source/controls/tkspinbutton.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -147,7 +148,7 @@ namespace toolkit //-------------------------------------------------------------------- ::rtl::OUString UnoSpinButtonControl::GetComponentServiceName() { - return ::rtl::OUString::createFromAscii( "SpinButton" ); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SpinButton")); } //-------------------------------------------------------------------- @@ -218,7 +219,7 @@ namespace toolkit ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_SPINVALUE ), makeAny( rEvent.Value ), sal_False ); break; default: - DBG_ERROR( "UnoSpinButtonControl::adjustmentValueChanged - unknown Type" ); + OSL_FAIL( "UnoSpinButtonControl::adjustmentValueChanged - unknown Type" ); } if ( maAdjustmentListeners.getLength() ) @@ -350,3 +351,4 @@ namespace toolkit } // namespace toolkit //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/controls/tkthrobber.cxx b/toolkit/source/controls/tkthrobber.cxx index 8a1927a732cb..a70b7acc8175 100644 --- a/toolkit/source/controls/tkthrobber.cxx +++ b/toolkit/source/controls/tkthrobber.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -126,7 +127,7 @@ namespace toolkit //-------------------------------------------------------------------- ::rtl::OUString UnoThrobberControl::GetComponentServiceName() { - return ::rtl::OUString::createFromAscii( "Throbber" ); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Throbber")); } //-------------------------------------------------------------------- @@ -199,3 +200,4 @@ namespace toolkit } // namespace toolkit //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/controls/tree/treecontrol.cxx b/toolkit/source/controls/tree/treecontrol.cxx index d2c66c64b41a..81d2c41f6139 100644 --- a/toolkit/source/controls/tree/treecontrol.cxx +++ b/toolkit/source/controls/tree/treecontrol.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,9 +29,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_toolkit.hxx" -#ifndef _TOOLKIT_TREE_CONTROL_HXX #include <treecontrol.hxx> -#endif #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/view/SelectionType.hpp> @@ -151,7 +150,7 @@ UnoTreeControl::UnoTreeControl( const Reference< XMultiServiceFactory >& i_facto OUString UnoTreeControl::GetComponentServiceName() { - return OUString::createFromAscii( "Tree" ); + return OUString(RTL_CONSTASCII_USTRINGPARAM("Tree")); } // ------------------------------------------------------------------- @@ -511,3 +510,5 @@ void SAL_CALL TreeEditListenerMultiplexer::nodeEdited( const Reference< XTreeNod } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/controls/tree/treecontrol.hxx b/toolkit/source/controls/tree/treecontrol.hxx index ff5ddb4e348c..61f6f6e59d71 100644 --- a/toolkit/source/controls/tree/treecontrol.hxx +++ b/toolkit/source/controls/tree/treecontrol.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -136,3 +137,5 @@ private: } // toolkit #endif // _TOOLKIT_TREE_CONTROL_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/controls/tree/treedatamodel.cxx b/toolkit/source/controls/tree/treedatamodel.cxx index 8ca76c0e57a8..2f6f6e9118cf 100644 --- a/toolkit/source/controls/tree/treedatamodel.cxx +++ b/toolkit/source/controls/tree/treedatamodel.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -671,3 +672,5 @@ Reference< XInterface > SAL_CALL MutableTreeDataModel_CreateInstance( const Refe { return Reference < XInterface >( ( ::cppu::OWeakObject* ) new ::toolkit::MutableTreeDataModel ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/controls/unocontrol.cxx b/toolkit/source/controls/unocontrol.cxx index 38f2fd7c2603..af46d98cef5d 100644 --- a/toolkit/source/controls/unocontrol.cxx +++ b/toolkit/source/controls/unocontrol.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -31,9 +32,7 @@ #include <com/sun/star/awt/WindowAttribute.hpp> #include <com/sun/star/awt/VclWindowPeerAttribute.hpp> #include <com/sun/star/awt/PosSize.hpp> -#ifndef _COM_SUN_STAR_LAN_XMULTISERVICEFACTORY_HPP_ #include <com/sun/star/lang/XMultiServiceFactory.hpp> -#endif #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/resource/XStringResourceResolver.hpp> #include <toolkit/controls/unocontrol.hxx> @@ -41,7 +40,7 @@ #include <cppuhelper/typeprovider.hxx> #include <rtl/memory.h> #include <rtl/uuid.h> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <tools/string.hxx> #include <tools/table.hxx> #include <tools/date.hxx> @@ -58,7 +57,7 @@ #include <toolkit/helper/vclunohelper.hxx> #include <toolkit/awt/vclxwindow.hxx> #include <vcl/svapp.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <toolkit/controls/accessiblecontrolcontext.hxx> #include <comphelper/container.hxx> @@ -229,7 +228,7 @@ Reference< XWindowPeer > UnoControl::ImplGetCompatiblePeer( sal_Bool bAcceptE Window* pParentWindow( NULL ); { - osl::Guard< vos::IMutex > aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; pParentWindow = dynamic_cast< Window* >( Application::GetDefaultDevice() ); ENSURE_OR_THROW( pParentWindow != NULL, "could obtain a default parent window!" ); } @@ -385,7 +384,7 @@ void UnoControl::disposeAccessibleContext() } catch( const Exception& ) { - DBG_ERROR( "UnoControl::disposeAccessibleContext: could not dispose my AccessibleContext!" ); + OSL_FAIL( "UnoControl::disposeAccessibleContext: could not dispose my AccessibleContext!" ); } } } @@ -660,14 +659,13 @@ void UnoControl::ImplModelPropertiesChanged( const Sequence< PropertyChangeEvent aGuard.clear(); // clear the guard before creating a new peer - as usual, our peer implementations use the SolarMutex - // #82300# - 2000-12-21 - fs@openoffice.org + if (bNeedNewPeer && xParent.is()) { - vos::OGuard aVclGuard( Application::GetSolarMutex() ); + SolarMutexGuard aVclGuard; // and now this is the final withdrawal: - // With 83561, I have no other idea than locking the SolarMutex here .... + // I have no other idea than locking the SolarMutex here .... // I really hate the fact that VCL is not theadsafe .... - // #83561# - 2001-03-01 - fs@openoffice.org // Funktioniert beim Container nicht! getPeer()->dispose(); @@ -685,7 +683,7 @@ void UnoControl::ImplModelPropertiesChanged( const Sequence< PropertyChangeEvent // model did not cause the listeners of the controls/peers to be called // Since the implementations for the listeners changed a lot towards 1.1, this // would not be the case anymore, if we would not do this listener-lock below - // #i14703# - 2003-05-23 - fs@openoffice.org + // #i14703# Window* pVclPeer = VCLUnoHelper::GetWindow( getPeer() ); VCLXWindow* pPeer = pVclPeer ? pVclPeer->GetWindowPeer() : NULL; VclListenerLock aNoVclEventMultiplexing( pPeer ); @@ -693,7 +691,6 @@ void UnoControl::ImplModelPropertiesChanged( const Sequence< PropertyChangeEvent // setting peer properties may result in an attemp to acquire the solar mutex, 'cause the peers // usually don't have an own mutex but use the SolarMutex instead. // To prevent deadlocks resulting from this, we do this without our own mutex locked - // 2000-11-03 - fs@openoffice.org PropertyValueVectorIterator aEnd = aPeerPropertiesToSet.end(); for ( PropertyValueVectorIterator aLoop = aPeerPropertiesToSet.begin(); aLoop != aEnd; @@ -1130,7 +1127,7 @@ void UnoControl::createPeer( const Reference< XToolkit >& rxToolkit, const Refer if ( !mxModel.is() ) { RuntimeException aException; - aException.Message = ::rtl::OUString::createFromAscii( "createPeer: no model!" ); + aException.Message = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("createPeer: no model!")); aException.Context = (XAggregation*)(::cppu::OWeakAggObject*)this; throw( aException ); } @@ -1439,7 +1436,7 @@ void UnoControl::setDesignMode( sal_Bool bOn ) throw(RuntimeException) disposeAccessibleContext(); aModeChangeEvent.Source = *this; - aModeChangeEvent.NewMode = ::rtl::OUString::createFromAscii( mbDesignMode ? "design" : "alive" ); + aModeChangeEvent.NewMode = mbDesignMode ? ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("design")) : ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("alive" )); } // ajust the visibility of our window @@ -1463,7 +1460,7 @@ sal_Bool UnoControl::isTransparent( ) throw(RuntimeException) // XServiceInfo ::rtl::OUString UnoControl::getImplementationName( ) throw(RuntimeException) { - DBG_ERROR( "This method should be overloaded!" ); + OSL_FAIL( "This method should be overloaded!" ); return ::rtl::OUString(); } @@ -1491,7 +1488,7 @@ Sequence< ::rtl::OUString > UnoControl::getSupportedServiceNames( ) throw(Runti Reference< XAccessibleContext > SAL_CALL UnoControl::getAccessibleContext( ) throw (RuntimeException) { // creation of the context will certainly require the SolarMutex ... - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( GetMutex() ); Reference< XAccessibleContext > xCurrentContext( maAccessibleContext.get(), UNO_QUERY ); @@ -1609,3 +1606,5 @@ uno::Reference< awt::XStyleSettings > SAL_CALL UnoControl::getStyleSettings() th return xPeerSupplier->getStyleSettings(); return NULL; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/controls/unocontrolbase.cxx b/toolkit/source/controls/unocontrolbase.cxx index 4dc1412ba661..c2622946009b 100644 --- a/toolkit/source/controls/unocontrolbase.cxx +++ b/toolkit/source/controls/unocontrolbase.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -292,3 +293,4 @@ void UnoControlBase::Impl_getColumnsAndLines( sal_Int16& nCols, sal_Int16& nLine +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/controls/unocontrolcontainer.cxx b/toolkit/source/controls/unocontrolcontainer.cxx index bdbdc9aae7f1..c73bd401bf51 100644 --- a/toolkit/source/controls/unocontrolcontainer.cxx +++ b/toolkit/source/controls/unocontrolcontainer.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -43,7 +44,6 @@ #include <comphelper/sequence.hxx> #include <tools/debug.hxx> -#include <tools/list.hxx> #include <vcl/svapp.hxx> #include <vcl/window.hxx> @@ -74,8 +74,6 @@ public: inline const uno::Reference< awt::XControl >& getControl() const { return mxControl; } }; -//DECLARE_LIST( UnoControlHolderList, UnoControlHolder* ); - class UnoControlHolderList { public: @@ -811,9 +809,8 @@ void UnoControlContainer::createPeer( const uno::Reference< awt::XToolkit >& rxT aCtrls.getArray()[n]->createPeer( rxToolkit, getPeer() ); uno::Reference< awt::XVclContainerPeer > xC( getPeer(), uno::UNO_QUERY ); - OSL_ENSURE(xC.is(),"Peer isn't valid. Please check!"); - - xC->enableDialogControl( sal_True ); + if ( xC.is() ) + xC->enableDialogControl( sal_True ); ImplActivateTabControllers(); } @@ -836,3 +833,4 @@ void UnoControlContainer::setVisible( sal_Bool bVisible ) throw(uno::RuntimeExce +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/controls/unocontrolcontainermodel.cxx b/toolkit/source/controls/unocontrolcontainermodel.cxx index 66948ce095d1..a3fba37b273b 100644 --- a/toolkit/source/controls/unocontrolcontainermodel.cxx +++ b/toolkit/source/controls/unocontrolcontainermodel.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -88,3 +89,4 @@ UnoControlContainerModel::UnoControlContainerModel( const ::com::sun::star::uno: +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/controls/unocontrolmodel.cxx b/toolkit/source/controls/unocontrolmodel.cxx index 7a2742abae57..a101d9fd8793 100644 --- a/toolkit/source/controls/unocontrolmodel.cxx +++ b/toolkit/source/controls/unocontrolmodel.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -146,7 +147,7 @@ static void lcl_ImplMergeFontProperty( FontDescriptor& rFD, sal_uInt16 nPropId, break; case BASEPROPERTY_FONTDESCRIPTORPART_TYPE: rValue >>= rFD.Type; break; - default: DBG_ERROR( "FontProperty?!" ); + default: OSL_FAIL( "FontProperty?!" ); } } @@ -204,7 +205,7 @@ UnoControlModel::~UnoControlModel() UnoControlModel* UnoControlModel::Clone() const { - DBG_ERROR( "UnoControlModel::Clone() ?!" ); + OSL_FAIL( "UnoControlModel::Clone() ?!" ); return NULL; } @@ -258,7 +259,7 @@ sal_Bool UnoControlModel::ImplHasProperty( sal_uInt16 nPropId ) const case BASEPROPERTY_FONTDESCRIPTORPART_KERNING: aDefault <<= aFD.Kerning; break; case BASEPROPERTY_FONTDESCRIPTORPART_WORDLINEMODE: aDefault <<= aFD.WordLineMode; break; case BASEPROPERTY_FONTDESCRIPTORPART_TYPE: aDefault <<= aFD.Type; break; - default: DBG_ERROR( "FontProperty?!" ); + default: OSL_FAIL( "FontProperty?!" ); } } else @@ -359,6 +360,7 @@ sal_Bool UnoControlModel::ImplHasProperty( sal_uInt16 nPropId ) const case BASEPROPERTY_ENABLEVISIBLE: case BASEPROPERTY_DECORATION: aDefault <<= (sal_Bool) sal_True; break; + case BASEPROPERTY_GROUPNAME: case BASEPROPERTY_HELPTEXT: case BASEPROPERTY_HELPURL: case BASEPROPERTY_IMAGEURL: @@ -446,13 +448,14 @@ sal_Bool UnoControlModel::ImplHasProperty( sal_uInt16 nPropId ) const break; } DBG_ASSERT( bLegacy || pAllCurrencies != pAllCurrenciesEnd, "UnoControlModel::ImplGetDefaultValue: did not find the given bank symbol!" ); + (void)bLegacy; } aDefault <<= sCurrencySymbol; } break; - default: DBG_ERROR( "ImplGetDefaultValue - unknown Property" ); + default: OSL_FAIL( "ImplGetDefaultValue - unknown Property" ); } } @@ -485,7 +488,8 @@ void UnoControlModel::ImplRegisterProperty( sal_uInt16 nPropId ) void UnoControlModel::ImplRegisterProperties( const std::list< sal_uInt16 > &rIds ) { std::list< sal_uInt16 >::const_iterator iter; - for( iter = rIds.begin(); iter != rIds.end(); iter++) { + for( iter = rIds.begin(); iter != rIds.end(); ++iter) + { if( !ImplHasProperty( *iter ) ) ImplRegisterProperty( *iter, ImplGetDefaultValue( *iter ) ); } @@ -599,7 +603,7 @@ void UnoControlModel::setPropertyToDefault( const ::rtl::OUString& PropertyName { ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); - DBG_ERROR( "ServiceName von UnoControlModel ?!" ); + OSL_FAIL( "ServiceName von UnoControlModel ?!" ); return ::rtl::OUString(); } @@ -753,7 +757,7 @@ void UnoControlModel::write( const ::com::sun::star::uno::Reference< ::com::sun: ::rtl::OUString sPropertyName( GetPropertyName( pProp->GetId() ) ); sMessage += ::rtl::OString( sPropertyName.getStr(), sPropertyName.getLength(), osl_getThreadTextEncoding() ); sMessage += "'.)"; - DBG_ERROR( sMessage ); + OSL_FAIL( sMessage.getStr() ); } #endif } @@ -811,7 +815,7 @@ void UnoControlModel::write( const ::com::sun::star::uno::Reference< ::com::sun: } else { - DBG_ERROR( "Property?!" ); + OSL_FAIL( "Property?!" ); } sal_Int32 nPropDataLen = xMark->offsetToMark( nPropDataBeginMark ); @@ -954,7 +958,7 @@ void UnoControlModel::read( const ::com::sun::star::uno::Reference< ::com::sun:: ::rtl::OUString sPropertyName( GetPropertyName( nPropId ) ); sMessage += ::rtl::OString( sPropertyName.getStr(), sPropertyName.getLength(), osl_getThreadTextEncoding() ); sMessage += "'.)"; - DBG_ERROR( sMessage ); + OSL_FAIL( sMessage.getStr() ); } } else @@ -1019,7 +1023,7 @@ void UnoControlModel::read( const ::com::sun::star::uno::Reference< ::com::sun:: } else { - DBG_ERROR( "read: unknown Property!" ); + OSL_FAIL( "read: unknown Property!" ); } } } @@ -1082,7 +1086,7 @@ void UnoControlModel::read( const ::com::sun::star::uno::Reference< ::com::sun:: // ::com::sun::star::lang::XServiceInfo ::rtl::OUString UnoControlModel::getImplementationName( ) throw(::com::sun::star::uno::RuntimeException) { - DBG_ERROR( "This method should be overloaded!" ); + OSL_FAIL( "This method should be overloaded!" ); return ::rtl::OUString(); } @@ -1108,7 +1112,7 @@ sal_Bool UnoControlModel::supportsService( const ::rtl::OUString& rServiceName ) // ::cppu::OPropertySetHelper ::cppu::IPropertyArrayHelper& UnoControlModel::getInfoHelper() { - DBG_ERROR( "UnoControlModel::getInfoHelper() not possible!" ); + OSL_FAIL( "UnoControlModel::getInfoHelper() not possible!" ); return *(::cppu::IPropertyArrayHelper*) NULL; } @@ -1162,7 +1166,7 @@ sal_Bool UnoControlModel::convertFastPropertyValue( Any & rConvertedValue, Any & if ( bConverted ) rConvertedValue <<= nAsDouble; else - { // try as integer - 96136 - 2002-10-08 - fs@openoffice.org + { // try as integer sal_Int32 nAsInteger = 0; bConverted = ( rValue >>= nAsInteger ); if ( bConverted ) @@ -1309,12 +1313,12 @@ void UnoControlModel::getFastPropertyValue( ::com::sun::star::uno::Any& rValue, break; case BASEPROPERTY_FONTDESCRIPTORPART_TYPE: rValue <<= aFD.Type; break; - default: DBG_ERROR( "FontProperty?!" ); + default: OSL_FAIL( "FontProperty?!" ); } } else { - DBG_ERROR( "getFastPropertyValue - invalid Property!" ); + OSL_FAIL( "getFastPropertyValue - invalid Property!" ); } } @@ -1371,7 +1375,7 @@ void UnoControlModel::setFastPropertyValue( sal_Int32 nPropId, const ::com::sun: // ::com::sun::star::beans::XMultiPropertySet ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > UnoControlModel::getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException) { - DBG_ERROR( "UnoControlModel::getPropertySetInfo() not possible!" ); + OSL_FAIL( "UnoControlModel::getPropertySetInfo() not possible!" ); return ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >(); } @@ -1387,7 +1391,6 @@ void UnoControlModel::setPropertyValues( const ::com::sun::star::uno::Sequence< sal_Int32* pHandles = aHandles.getArray(); // may need to change the order in the sequence, for this we need a non-const value sequence - // 15.05.2002 - 99314 - fs@openoffice.org uno::Sequence< uno::Any > aValues( Values ); uno::Any* pValues = aValues.getArray(); @@ -1421,7 +1424,7 @@ void UnoControlModel::setPropertyValues( const ::com::sun::star::uno::Sequence< // clear our guard before calling into setFastPropertyValues - this method // will implicitly call property listeners, and this should not happen with // our mutex locked - // #i23451# - 2004-03-18 - fs@openoffice.org + // #i23451# setFastPropertyValues( nProps, pHandles, pValues, nValidHandles ); } else @@ -1478,3 +1481,5 @@ void UnoControlModel::ImplEnsureHandleOrder( const sal_Int32 _nCount, sal_Int32* } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx index 210fc08a2680..730ff6d11b21 100644 --- a/toolkit/source/controls/unocontrols.cxx +++ b/toolkit/source/controls/unocontrols.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -59,9 +60,7 @@ #include <vcl/wrkwin.hxx> #include <vcl/svapp.hxx> #include <vcl/edit.hxx> -#ifndef _SV_BUTTON_HXX #include <vcl/button.hxx> -#endif #include <vcl/group.hxx> #include <vcl/fixed.hxx> #include <vcl/lstbox.hxx> @@ -80,7 +79,7 @@ using ::com::sun::star::uno::Reference; using namespace ::toolkit; #define IMPL_SERVICEINFO_DERIVED( ImplName, BaseClass, ServiceName ) \ - ::rtl::OUString SAL_CALL ImplName::getImplementationName( ) throw(::com::sun::star::uno::RuntimeException) { return ::rtl::OUString::createFromAscii( "stardiv.Toolkit." #ImplName ); } \ + ::rtl::OUString SAL_CALL ImplName::getImplementationName( ) throw(::com::sun::star::uno::RuntimeException) { return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "stardiv.Toolkit." #ImplName )); } \ ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL ImplName::getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException) \ { \ ::com::sun::star::uno::Sequence< ::rtl::OUString > aNames = BaseClass::getSupportedServiceNames( ); \ @@ -188,13 +187,13 @@ IMPLEMENT_FORWARD_XTYPEPROVIDER2( UnoEditControl, UnoControlBase, UnoEditControl ::rtl::OUString UnoEditControl::GetComponentServiceName() { // by default, we want a simple edit field - ::rtl::OUString sName( ::rtl::OUString::createFromAscii( "Edit" ) ); + ::rtl::OUString sName( RTL_CONSTASCII_USTRINGPARAM("Edit") ); // but maybe we are to display multi-line text? uno::Any aVal = ImplGetPropertyValue( GetPropertyName( BASEPROPERTY_MULTILINE ) ); sal_Bool b = sal_Bool(); if ( ( aVal >>= b ) && b ) - sName= ::rtl::OUString::createFromAscii( "MultiLineEdit" ); + sName= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MultiLineEdit")); return sName; } @@ -528,7 +527,7 @@ UnoFileControl::UnoFileControl( const Reference< XMultiServiceFactory >& i_facto ::rtl::OUString UnoFileControl::GetComponentServiceName() { - return ::rtl::OUString::createFromAscii( "filecontrol" ); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("filecontrol")); } // ---------------------------------------------------- @@ -541,6 +540,7 @@ uno::Any GraphicControlModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const return UnoControlModel::ImplGetDefaultValue( nPropId ); } + uno::Reference< graphic::XGraphic > GraphicControlModel::getGraphicFromURL_nothrow( const ::rtl::OUString& _rURL ) { uno::Reference< graphic::XGraphic > xGraphic; @@ -631,7 +631,7 @@ void SAL_CALL GraphicControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 n } catch( const ::com::sun::star::uno::Exception& ) { - OSL_ENSURE( sal_False, "GraphicControlModel::setFastPropertyValue_NoBroadcast: caught an exception while aligning the ImagePosition/ImageAlign properties!" ); + OSL_FAIL( "GraphicControlModel::setFastPropertyValue_NoBroadcast: caught an exception while aligning the ImagePosition/ImageAlign properties!" ); mbAdjustingImagePosition = sal_False; } } @@ -707,7 +707,7 @@ UnoButtonControl::UnoButtonControl( const uno::Reference< lang::XMultiServiceFac ::rtl::OUString UnoButtonControl::GetComponentServiceName() { - ::rtl::OUString aName( ::rtl::OUString::createFromAscii( "pushbutton" ) ); + ::rtl::OUString aName( RTL_CONSTASCII_USTRINGPARAM("pushbutton") ); uno::Any aVal = ImplGetPropertyValue( GetPropertyName( BASEPROPERTY_PUSHBUTTONTYPE ) ); sal_Int16 n = sal_Int16(); if ( ( aVal >>= n ) && n ) @@ -715,15 +715,15 @@ UnoButtonControl::UnoButtonControl( const uno::Reference< lang::XMultiServiceFac // Use PushButtonType later when available... switch ( n ) { - case 1 /*PushButtonType::OK*/: aName= ::rtl::OUString::createFromAscii( "okbutton" ); + case 1 /*PushButtonType::OK*/: aName= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("okbutton")); break; - case 2 /*PushButtonType::CANCEL*/: aName= ::rtl::OUString::createFromAscii( "cancelbutton" ); + case 2 /*PushButtonType::CANCEL*/: aName= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("cancelbutton")); break; - case 3 /*PushButtonType::HELP*/: aName= ::rtl::OUString::createFromAscii( "helpbutton" ); + case 3 /*PushButtonType::HELP*/: aName= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("helpbutton")); break; default: { - DBG_ERROR( "Unknown Button Type!" ); + OSL_FAIL( "Unknown Button Type!" ); } } } @@ -929,7 +929,7 @@ UnoImageControlControl::UnoImageControlControl( const Reference< XMultiServiceFa ::rtl::OUString UnoImageControlControl::GetComponentServiceName() { - return ::rtl::OUString::createFromAscii( "fixedimage" ); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("fixedimage")); } void UnoImageControlControl::dispose() throw(uno::RuntimeException) @@ -1022,7 +1022,7 @@ UnoRadioButtonControl::UnoRadioButtonControl( const Reference< XMultiServiceFact ::rtl::OUString UnoRadioButtonControl::GetComponentServiceName() { - return ::rtl::OUString::createFromAscii( "radiobutton" ); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("radiobutton")); } void UnoRadioButtonControl::dispose() throw(uno::RuntimeException) @@ -1139,7 +1139,7 @@ void UnoRadioButtonControl::itemStateChanged( const awt::ItemEvent& rEvent ) thr // Thus, we suppress all events with a new state other than "1". This is unlogical, and weird, when looking // from a pure API perspective, but it's _compatible_ with older product versions, and this is // all which matters here. - // #i14703# - 2003-05-23 - fs@openoffice.org + // #i14703# if ( 1 == rEvent.Selected ) { if ( maItemListeners.getLength() ) @@ -1231,7 +1231,7 @@ UnoCheckBoxControl::UnoCheckBoxControl( const uno::Reference< lang::XMultiServic ::rtl::OUString UnoCheckBoxControl::GetComponentServiceName() { - return ::rtl::OUString::createFromAscii( "checkbox" ); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("checkbox")); } void UnoCheckBoxControl::dispose() throw(uno::RuntimeException) @@ -1424,7 +1424,7 @@ UnoFixedHyperlinkControl::UnoFixedHyperlinkControl( const Reference< XMultiServi ::rtl::OUString UnoFixedHyperlinkControl::GetComponentServiceName() { - return ::rtl::OUString::createFromAscii( "fixedhyperlink" ); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("fixedhyperlink")); } // uno::XInterface @@ -1605,7 +1605,7 @@ UnoFixedTextControl::UnoFixedTextControl( const Reference< XMultiServiceFactory ::rtl::OUString UnoFixedTextControl::GetComponentServiceName() { - return ::rtl::OUString::createFromAscii( "fixedtext" ); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("fixedtext")); } // uno::XInterface @@ -1738,7 +1738,7 @@ UnoGroupBoxControl::UnoGroupBoxControl( const Reference< XMultiServiceFactory >& ::rtl::OUString UnoGroupBoxControl::GetComponentServiceName() { - return ::rtl::OUString::createFromAscii( "groupbox" ); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("groupbox")); } sal_Bool UnoGroupBoxControl::isTransparent() throw(uno::RuntimeException) @@ -2306,7 +2306,7 @@ UnoListBoxControl::UnoListBoxControl( const Reference< XMultiServiceFactory >& i ::rtl::OUString UnoListBoxControl::GetComponentServiceName() { - return ::rtl::OUString::createFromAscii( "listbox" ); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("listbox")); } IMPL_SERVICEINFO_DERIVED( UnoListBoxControl, UnoControlBase, szServiceName2_UnoControlListBox ) @@ -2625,7 +2625,7 @@ void UnoListBoxControl::itemStateChanged( const awt::ItemEvent& rEvent ) throw(u #else ::rtl::OString sMessage( "UnoListBoxControl::itemStateChanged: caught an exception:\n" ); sMessage += ::rtl::OString( e.Message.getStr(), e.Message.getLength(), RTL_TEXTENCODING_ASCII_US ); - OSL_ENSURE( sal_False, sMessage.getStr() ); + OSL_FAIL( sMessage.getStr() ); #endif } } @@ -2814,7 +2814,7 @@ IMPL_SERVICEINFO_DERIVED( UnoComboBoxControl, UnoEditControl, szServiceName2_Uno ::rtl::OUString UnoComboBoxControl::GetComponentServiceName() { - return ::rtl::OUString::createFromAscii( "combobox" ); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("combobox")); } void UnoComboBoxControl::dispose() throw(uno::RuntimeException) @@ -2934,7 +2934,7 @@ void UnoComboBoxControl::itemStateChanged( const awt::ItemEvent& rEvent ) throw( #else ::rtl::OString sMessage( "UnoComboBoxControl::itemStateChanged: caught an exception:\n" ); sMessage += ::rtl::OString( e.Message.getStr(), e.Message.getLength(), RTL_TEXTENCODING_ASCII_US ); - OSL_ENSURE( sal_False, sMessage.getStr() ); + OSL_FAIL( sMessage.getStr() ); #endif } } @@ -3271,7 +3271,7 @@ UnoDateFieldControl::UnoDateFieldControl( const Reference< XMultiServiceFactory ::rtl::OUString UnoDateFieldControl::GetComponentServiceName() { - return ::rtl::OUString::createFromAscii( "datefield" ); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("datefield")); } // uno::XInterface @@ -3512,7 +3512,7 @@ UnoTimeFieldControl::UnoTimeFieldControl( const Reference< XMultiServiceFactory ::rtl::OUString UnoTimeFieldControl::GetComponentServiceName() { - return ::rtl::OUString::createFromAscii( "timefield" ); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("timefield")); } // uno::XInterface @@ -3713,7 +3713,7 @@ UnoNumericFieldControl::UnoNumericFieldControl( const Reference< XMultiServiceFa ::rtl::OUString UnoNumericFieldControl::GetComponentServiceName() { - return ::rtl::OUString::createFromAscii( "numericfield" ); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("numericfield")); } // uno::XInterface @@ -3915,7 +3915,7 @@ UnoCurrencyFieldControl::UnoCurrencyFieldControl( const Reference< XMultiService ::rtl::OUString UnoCurrencyFieldControl::GetComponentServiceName() { - return ::rtl::OUString::createFromAscii( "longcurrencyfield" ); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("longcurrencyfield")); } // uno::XInterface @@ -4108,7 +4108,7 @@ UnoPatternFieldControl::UnoPatternFieldControl( const Reference< XMultiServiceFa ::rtl::OUString UnoPatternFieldControl::GetComponentServiceName() { - return ::rtl::OUString::createFromAscii( "patternfield" ); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("patternfield")); } void UnoPatternFieldControl::ImplSetPeerProperty( const ::rtl::OUString& rPropName, const uno::Any& rVal ) @@ -4255,7 +4255,7 @@ UnoProgressBarControl::UnoProgressBarControl( const Reference< XMultiServiceFact ::rtl::OUString UnoProgressBarControl::GetComponentServiceName() { - return ::rtl::OUString::createFromAscii( "ProgressBar" ); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ProgressBar")); } // uno::XInterface @@ -4386,7 +4386,7 @@ UnoFixedLineControl::UnoFixedLineControl( const Reference< XMultiServiceFactory ::rtl::OUString UnoFixedLineControl::GetComponentServiceName() { - return ::rtl::OUString::createFromAscii( "FixedLine" ); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FixedLine")); } sal_Bool UnoFixedLineControl::isTransparent() throw(uno::RuntimeException) @@ -4394,3 +4394,4 @@ sal_Bool UnoFixedLineControl::isTransparent() throw(uno::RuntimeException) return sal_True; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/helper/accessibilityclient.cxx b/toolkit/source/helper/accessibilityclient.cxx index ba466ac6959d..0848e5a2df08 100644 --- a/toolkit/source/helper/accessibilityclient.cxx +++ b/toolkit/source/helper/accessibilityclient.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -204,14 +205,14 @@ namespace toolkit // load the library implementing the factory if ( !s_pFactory.get() ) { - const ::rtl::OUString sModuleName = ::rtl::OUString::createFromAscii( - SVLIBRARY( "acc" ) + const ::rtl::OUString sModuleName(RTL_CONSTASCII_USTRINGPARAM( + SVLIBRARY( "acc" )) ); s_hAccessibleImplementationModule = osl_loadModuleRelative( &thisModule, sModuleName.pData, 0 ); if ( s_hAccessibleImplementationModule != NULL ) { const ::rtl::OUString sFactoryCreationFunc = - ::rtl::OUString::createFromAscii( "getStandardAccessibleFactory" ); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("getStandardAccessibleFactory")); s_pAccessibleFactoryFunc = (GetStandardAccComponentFactory) osl_getFunctionSymbol( s_hAccessibleImplementationModule, sFactoryCreationFunc.pData ); @@ -275,3 +276,5 @@ namespace toolkit //........................................................................ } // namespace toolkit //........................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/helper/externallock.cxx b/toolkit/source/helper/externallock.cxx index c0eb2427936f..9f5de20466cc 100644 --- a/toolkit/source/helper/externallock.cxx +++ b/toolkit/source/helper/externallock.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,7 +29,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_toolkit.hxx" #include <toolkit/helper/externallock.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <vcl/svapp.hxx> // ----------------------------------------------------------------------------- @@ -44,3 +45,4 @@ void VCLExternalSolarLock::release() Application::GetSolarMutex().release(); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/helper/fixedhyperbase.cxx b/toolkit/source/helper/fixedhyperbase.cxx index d6c22e936116..0519593339d8 100644 --- a/toolkit/source/helper/fixedhyperbase.cxx +++ b/toolkit/source/helper/fixedhyperbase.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -70,3 +71,4 @@ void FixedHyperlinkBase::SetDescription( const String& ) } // namespace toolkit //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/helper/formpdfexport.cxx b/toolkit/source/helper/formpdfexport.cxx index 1bde6f66a3c0..d62570084c2a 100644 --- a/toolkit/source/helper/formpdfexport.cxx +++ b/toolkit/source/helper/formpdfexport.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -46,7 +47,6 @@ /** === end UNO includes === **/ #include <toolkit/helper/vclunohelper.hxx> -#include <tools/diagnose_ex.h> #include <vcl/pdfextoutdevdata.hxx> #include <vcl/outdev.hxx> @@ -67,26 +67,7 @@ namespace toolkitform using namespace ::com::sun::star::lang; using namespace ::com::sun::star::container; - // used strings - static const ::rtl::OUString FM_PROP_CLASSID(RTL_CONSTASCII_USTRINGPARAM("ClassId")); static const ::rtl::OUString FM_PROP_NAME(RTL_CONSTASCII_USTRINGPARAM("Name")); - static const ::rtl::OUString FM_PROP_STRINGITEMLIST(RTL_CONSTASCII_USTRINGPARAM("StringItemList")); - static const ::rtl::OUString FM_PROP_HELPTEXT(RTL_CONSTASCII_USTRINGPARAM("HelpText")); - static const ::rtl::OUString FM_PROP_TEXT(RTL_CONSTASCII_USTRINGPARAM("Text")); - static const ::rtl::OUString FM_PROP_LABEL(RTL_CONSTASCII_USTRINGPARAM("Label")); - static const ::rtl::OUString FM_PROP_READONLY(RTL_CONSTASCII_USTRINGPARAM("ReadOnly")); - static const ::rtl::OUString FM_PROP_BORDER(RTL_CONSTASCII_USTRINGPARAM("Border")); - static const ::rtl::OUString FM_PROP_BACKGROUNDCOLOR(RTL_CONSTASCII_USTRINGPARAM("BackgroundColor")); - static const ::rtl::OUString FM_PROP_TEXTCOLOR(RTL_CONSTASCII_USTRINGPARAM("TextColor")); - static const ::rtl::OUString FM_PROP_MULTILINE(RTL_CONSTASCII_USTRINGPARAM("MultiLine")); - static const ::rtl::OUString FM_PROP_ALIGN(RTL_CONSTASCII_USTRINGPARAM("Align")); - static const ::rtl::OUString FM_PROP_FONT(RTL_CONSTASCII_USTRINGPARAM("FontDescriptor")); - static const ::rtl::OUString FM_PROP_MAXTEXTLEN(RTL_CONSTASCII_USTRINGPARAM("MaxTextLen")); - static const ::rtl::OUString FM_PROP_TARGET_URL(RTL_CONSTASCII_USTRINGPARAM("TargetURL")); - static const ::rtl::OUString FM_PROP_STATE(RTL_CONSTASCII_USTRINGPARAM("State")); - static const ::rtl::OUString FM_PROP_REFVALUE(RTL_CONSTASCII_USTRINGPARAM("RefValue")); - static const ::rtl::OUString FM_PROP_DROPDOWN(RTL_CONSTASCII_USTRINGPARAM("Dropdown")); - static const ::rtl::OUString FM_SUN_COMPONENT_FILECONTROL(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.form.component.FileControl")); namespace { @@ -95,6 +76,7 @@ namespace toolkitform */ sal_Int16 classifyFormControl( const Reference< XPropertySet >& _rxModel ) SAL_THROW(( Exception )) { + static const ::rtl::OUString FM_PROP_CLASSID(RTL_CONSTASCII_USTRINGPARAM("ClassId")); sal_Int16 nControlType = FormComponentType::CONTROL; Reference< XPropertySetInfo > xPSI; @@ -215,7 +197,7 @@ namespace toolkitform Reference< XInterface > xElement( xCurrentContainer->getByIndex( i ), UNO_QUERY ); if ( !xElement.is() ) { - OSL_ENSURE( sal_False, "determineRadioGroupId: very suspicious!" ); + OSL_FAIL( "determineRadioGroupId: very suspicious!" ); continue; } @@ -250,7 +232,7 @@ namespace toolkitform } ++pElementNames; } - OSL_ENSURE( sal_False, "determineRadioGroupId: did not find the radios element name!" ); + OSL_FAIL( "determineRadioGroupId: did not find the radios element name!" ); } } @@ -274,6 +256,7 @@ namespace toolkitform */ void getStringItemVector( const Reference< XPropertySet >& _rxModel, ::std::vector< ::rtl::OUString >& _rVector ) { + static const ::rtl::OUString FM_PROP_STRINGITEMLIST(RTL_CONSTASCII_USTRINGPARAM("StringItemList")); Sequence< ::rtl::OUString > aListEntries; OSL_VERIFY( _rxModel->getPropertyValue( FM_PROP_STRINGITEMLIST ) >>= aListEntries ); ::std::copy( aListEntries.getConstArray(), aListEntries.getConstArray() + aListEntries.getLength(), @@ -313,8 +296,11 @@ namespace toolkitform // -------------------------------- // Name, Description, Text OSL_VERIFY( xModelProps->getPropertyValue( FM_PROP_NAME ) >>= _rpDescriptor->Name ); + static const ::rtl::OUString FM_PROP_HELPTEXT(RTL_CONSTASCII_USTRINGPARAM("HelpText")); OSL_VERIFY( xModelProps->getPropertyValue( FM_PROP_HELPTEXT ) >>= _rpDescriptor->Description ); Any aText; + static const ::rtl::OUString FM_PROP_TEXT(RTL_CONSTASCII_USTRINGPARAM("Text")); + static const ::rtl::OUString FM_PROP_LABEL(RTL_CONSTASCII_USTRINGPARAM("Label")); if ( xPSI->hasPropertyByName( FM_PROP_TEXT ) ) aText = xModelProps->getPropertyValue( FM_PROP_TEXT ); else if ( xPSI->hasPropertyByName( FM_PROP_LABEL ) ) @@ -324,12 +310,14 @@ namespace toolkitform // -------------------------------- // readonly + static const ::rtl::OUString FM_PROP_READONLY(RTL_CONSTASCII_USTRINGPARAM("ReadOnly")); if ( xPSI->hasPropertyByName( FM_PROP_READONLY ) ) OSL_VERIFY( xModelProps->getPropertyValue( FM_PROP_READONLY ) >>= _rpDescriptor->ReadOnly ); // -------------------------------- // border { + static const ::rtl::OUString FM_PROP_BORDER(RTL_CONSTASCII_USTRINGPARAM("Border")); if ( xPSI->hasPropertyByName( FM_PROP_BORDER ) ) { sal_Int16 nBorderType = 0; @@ -350,6 +338,7 @@ namespace toolkitform // -------------------------------- // background color + static const ::rtl::OUString FM_PROP_BACKGROUNDCOLOR(RTL_CONSTASCII_USTRINGPARAM("BackgroundColor")); if ( xPSI->hasPropertyByName( FM_PROP_BACKGROUNDCOLOR ) ) { sal_Int32 nBackColor = COL_TRANSPARENT; @@ -360,6 +349,7 @@ namespace toolkitform // -------------------------------- // text color + static const ::rtl::OUString FM_PROP_TEXTCOLOR(RTL_CONSTASCII_USTRINGPARAM("TextColor")); if ( xPSI->hasPropertyByName( FM_PROP_TEXTCOLOR ) ) { sal_Int32 nTextColor = COL_TRANSPARENT; @@ -374,6 +364,7 @@ namespace toolkitform // multi line and word break // The MultiLine property of the control is mapped to both the "MULTILINE" and // "WORDBREAK" style flags + static const ::rtl::OUString FM_PROP_MULTILINE(RTL_CONSTASCII_USTRINGPARAM("MultiLine")); if ( xPSI->hasPropertyByName( FM_PROP_MULTILINE ) ) { sal_Bool bMultiLine = sal_False; @@ -383,6 +374,7 @@ namespace toolkitform } // ............................ // horizontal alignment + static const ::rtl::OUString FM_PROP_ALIGN(RTL_CONSTASCII_USTRINGPARAM("Align")); if ( xPSI->hasPropertyByName( FM_PROP_ALIGN ) ) { sal_Int16 nAlign = awt::TextAlign::LEFT; @@ -395,7 +387,7 @@ namespace toolkitform case awt::TextAlign::CENTER: _rpDescriptor->TextStyle |= TEXT_DRAW_CENTER; break; case awt::TextAlign::RIGHT: _rpDescriptor->TextStyle |= TEXT_DRAW_RIGHT; break; default: - OSL_ENSURE( sal_False, "describePDFControl: invalid text align!" ); + OSL_FAIL( "describePDFControl: invalid text align!" ); } } // ............................ @@ -412,12 +404,13 @@ namespace toolkitform case VerticalAlignment_MIDDLE: _rpDescriptor->TextStyle |= TEXT_DRAW_VCENTER; break; case VerticalAlignment_BOTTOM: _rpDescriptor->TextStyle |= TEXT_DRAW_BOTTOM; break; default: - OSL_ENSURE( sal_False, "describePDFControl: invalid vertical text align!" ); + OSL_FAIL( "describePDFControl: invalid vertical text align!" ); } } } // font + static const ::rtl::OUString FM_PROP_FONT(RTL_CONSTASCII_USTRINGPARAM("FontDescriptor")); if ( xPSI->hasPropertyByName( FM_PROP_FONT ) ) { FontDescriptor aUNOFont; @@ -455,10 +448,12 @@ namespace toolkitform } // ............................ // file select + static const ::rtl::OUString FM_SUN_COMPONENT_FILECONTROL(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.form.component.FileControl")); if ( xSI->supportsService( FM_SUN_COMPONENT_FILECONTROL ) ) pEditWidget->FileSelect = true; // ............................ // maximum text length + static const ::rtl::OUString FM_PROP_MAXTEXTLEN(RTL_CONSTASCII_USTRINGPARAM("MaxTextLen")); if ( xPSI->hasPropertyByName( FM_PROP_MAXTEXTLEN ) ) { sal_Int16 nMaxTextLength = 0; @@ -477,6 +472,7 @@ namespace toolkitform ::vcl::PDFWriter::PushButtonWidget* pButtonWidget = static_cast< ::vcl::PDFWriter::PushButtonWidget* >( _rpDescriptor.get() ); FormButtonType eButtonType = FormButtonType_PUSH; OSL_VERIFY( xModelProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ButtonType" ) ) ) >>= eButtonType ); + static const ::rtl::OUString FM_PROP_TARGET_URL(RTL_CONSTASCII_USTRINGPARAM("TargetURL")); if ( eButtonType == FormButtonType_SUBMIT ) { // if a button is a submit button, then it uses the URL at it's parent form @@ -536,6 +532,7 @@ namespace toolkitform // -------------------------------- // check boxes + static const ::rtl::OUString FM_PROP_STATE(RTL_CONSTASCII_USTRINGPARAM("State")); if ( _rpDescriptor->getType() == ::vcl::PDFWriter::CheckBox ) { ::vcl::PDFWriter::CheckBoxWidget* pCheckBoxWidget = static_cast< ::vcl::PDFWriter::CheckBoxWidget* >( _rpDescriptor.get() ); @@ -555,6 +552,7 @@ namespace toolkitform pRadioWidget->RadioGroup = determineRadioGroupId( xModelProps ); try { + static const ::rtl::OUString FM_PROP_REFVALUE(RTL_CONSTASCII_USTRINGPARAM("RefValue")); xModelProps->getPropertyValue( FM_PROP_REFVALUE ) >>= pRadioWidget->OnValue; } catch(...) @@ -570,6 +568,7 @@ namespace toolkitform ::vcl::PDFWriter::ListBoxWidget* pListWidget = static_cast< ::vcl::PDFWriter::ListBoxWidget* >( _rpDescriptor.get() ); // ............................ // drop down + static const ::rtl::OUString FM_PROP_DROPDOWN(RTL_CONSTASCII_USTRINGPARAM("Dropdown")); OSL_VERIFY( xModelProps->getPropertyValue( FM_PROP_DROPDOWN ) >>= pListWidget->DropDown ); // ............................ // multi selection @@ -618,10 +617,12 @@ namespace toolkitform } catch( const Exception& ) { - DBG_UNHANDLED_EXCEPTION(); + OSL_FAIL( "describePDFControl: caught an exception!" ); } } //........................................................................ } // namespace toolkitform //........................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/helper/imagealign.cxx b/toolkit/source/helper/imagealign.cxx index c5e8781d478b..883aac322568 100644 --- a/toolkit/source/helper/imagealign.cxx +++ b/toolkit/source/helper/imagealign.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -58,7 +59,7 @@ namespace toolkit case IMAGEALIGN_BOTTOM_RIGHT: nReturn = BelowRight; break; case IMAGEALIGN_CENTER: nReturn = Centered; break; default: - OSL_ENSURE( sal_False, "translateImagePosition: unknown IMAGEALIGN value!" ); + OSL_FAIL( "translateImagePosition: unknown IMAGEALIGN value!" ); } return nReturn; } @@ -82,7 +83,7 @@ namespace toolkit case BelowRight: nReturn = IMAGEALIGN_BOTTOM_RIGHT; break; case Centered: nReturn = IMAGEALIGN_CENTER; break; default: - OSL_ENSURE( sal_False, "translateImagePosition: unknown css.awt.ImagePosition value!" ); + OSL_FAIL( "translateImagePosition: unknown css.awt.ImagePosition value!" ); } return nReturn; } @@ -110,7 +111,7 @@ namespace toolkit case IMAGEALIGN_CENTER: nReturn = TOP; break; default: - OSL_ENSURE( sal_False, "getCompatibleImageAlign: unknown IMAGEALIGN value!" ); + OSL_FAIL( "getCompatibleImageAlign: unknown IMAGEALIGN value!" ); } return nReturn; } @@ -125,7 +126,7 @@ namespace toolkit case RIGHT: nReturn = RightCenter; break; case BOTTOM: nReturn = BelowCenter; break; default: - OSL_ENSURE( sal_False, "getExtendedImagePosition: unknown ImageAlign value!" ); + OSL_FAIL( "getExtendedImagePosition: unknown ImageAlign value!" ); } return nReturn; } @@ -133,3 +134,5 @@ namespace toolkit //........................................................................ } // namespace toolkit //........................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/helper/listenermultiplexer.cxx b/toolkit/source/helper/listenermultiplexer.cxx index ed2fe978b169..9ef7508b7635 100644 --- a/toolkit/source/helper/listenermultiplexer.cxx +++ b/toolkit/source/helper/listenermultiplexer.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -26,7 +27,6 @@ ************************************************************************/ // MARKER(update_precomp.py): autogen include statement, do not remove -//#include "precompiled_toolkit.hxx" #include "precompiled_toolkit.hxx" #include <toolkit/helper/listenermultiplexer.hxx> #include <com/sun/star/lang/DisposedException.hpp> @@ -154,6 +154,21 @@ IMPL_LISTENERMULTIPLEXER_BASEMETHODS( ItemListenerMultiplexer, ::com::sun::star: IMPL_LISTENERMULTIPLEXER_LISTENERMETHOD( ItemListenerMultiplexer, ::com::sun::star::awt::XItemListener, itemStateChanged, ::com::sun::star::awt::ItemEvent ) // ---------------------------------------------------- +// class TabListenerMultiplexer +// ---------------------------------------------------- +IMPL_LISTENERMULTIPLEXER_BASEMETHODS( TabListenerMultiplexer, ::com::sun::star::awt::XTabListener ) +void TabListenerMultiplexer::inserted( sal_Int32 evt ) throw(::com::sun::star::uno::RuntimeException) +IMPL_TABLISTENERMULTIPLEXER_LISTENERMETHOD_BODY_1PARAM( TabListenerMultiplexer, ::com::sun::star::awt::XTabListener, inserted, ::sal_Int32 ) +void TabListenerMultiplexer::removed( sal_Int32 evt ) throw(::com::sun::star::uno::RuntimeException) +IMPL_TABLISTENERMULTIPLEXER_LISTENERMETHOD_BODY_1PARAM( TabListenerMultiplexer, ::com::sun::star::awt::XTabListener, removed, ::sal_Int32 ) +void TabListenerMultiplexer::changed( sal_Int32 evt, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& evt2 ) throw(::com::sun::star::uno::RuntimeException) +IMPL_TABLISTENERMULTIPLEXER_LISTENERMETHOD_BODY_2PARAM( TabListenerMultiplexer, ::com::sun::star::awt::XTabListener, changed, ::sal_Int32, ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue > ) +void TabListenerMultiplexer::activated( sal_Int32 evt ) throw(::com::sun::star::uno::RuntimeException) +IMPL_TABLISTENERMULTIPLEXER_LISTENERMETHOD_BODY_1PARAM( TabListenerMultiplexer, ::com::sun::star::awt::XTabListener, activated, ::sal_Int32 ) +void TabListenerMultiplexer::deactivated( sal_Int32 evt ) throw(::com::sun::star::uno::RuntimeException) +IMPL_TABLISTENERMULTIPLEXER_LISTENERMETHOD_BODY_1PARAM( TabListenerMultiplexer, ::com::sun::star::awt::XTabListener, deactivated, ::sal_Int32 ) + +// ---------------------------------------------------- // class ContainerListenerMultiplexer // ---------------------------------------------------- IMPL_LISTENERMULTIPLEXER_BASEMETHODS( ContainerListenerMultiplexer, ::com::sun::star::container::XContainerListener ) @@ -217,3 +232,4 @@ IMPL_LISTENERMULTIPLEXER_LISTENERMETHOD( SelectionListenerMultiplexer, ::com::su // ---------------------------------------------------- IMPL_LISTENERMULTIPLEXER_BASEMETHODS( TabPageListenerMultiplexer, ::com::sun::star::awt::tab::XTabPageContainerListener ) IMPL_LISTENERMULTIPLEXER_LISTENERMETHOD( TabPageListenerMultiplexer, ::com::sun::star::awt::tab::XTabPageContainerListener, tabPageActivated, ::com::sun::star::awt::tab::TabPageActivatedEvent ) +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/helper/property.cxx b/toolkit/source/helper/property.cxx index a418b4a00b7b..50358d779877 100644 --- a/toolkit/source/helper/property.cxx +++ b/toolkit/source/helper/property.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -54,6 +55,7 @@ #include <com/sun/star/beans/PropertyAttribute.hpp> #include <com/sun/star/graphic/XGraphic.hpp> #include <com/sun/star/resource/XStringResourceResolver.hpp> +#include <com/sun/star/container/XNameContainer.hpp> #include <comphelper/types.hxx> #include <functional> #include <algorithm> @@ -119,7 +121,7 @@ ImplPropertyInfo* ImplGetPropertyInfos( sal_uInt16& rElementCount ) ::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() ); if( !pPropertyInfos ) { - static ImplPropertyInfo __FAR_DATA aImplPropertyInfos [] = + static ImplPropertyInfo aImplPropertyInfos [] = { DECL_PROP_2 ( "AccessibleName", ACCESSIBLENAME, ::rtl::OUString, BOUND, MAYBEDEFAULT ), DECL_PROP_3 ( "Align", ALIGN, sal_Int16, BOUND, MAYBEDEFAULT, MAYBEVOID ), @@ -182,6 +184,7 @@ ImplPropertyInfo* ImplGetPropertyInfos( sal_uInt16& rElementCount ) DECL_PROP_3 ( "FormatsSupplier", FORMATSSUPPLIER, Reference< ::com::sun::star::util::XNumberFormatsSupplier >, BOUND, MAYBEVOID, TRANSIENT ), DECL_PROP_2 ( "Graphic", GRAPHIC, Reference< XGraphic >, BOUND, TRANSIENT ), + DECL_PROP_2 ( "GroupName", GROUPNAME, ::rtl::OUString, BOUND, MAYBEDEFAULT ), 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 ), @@ -292,6 +295,8 @@ ImplPropertyInfo* ImplGetPropertyInfos( sal_uInt16& rElementCount ) DECL_PROP_3 ( "GridLineColor", GRID_LINE_COLOR, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ), DECL_PROP_3 ( "RowBackgroundColors", GRID_ROW_BACKGROUND_COLORS, Sequence< sal_Int32 >, BOUND, MAYBEDEFAULT, MAYBEVOID ), DECL_PROP_2 ( "UseGridLines", USE_GRID_LINES, sal_Bool, BOUND, MAYBEDEFAULT ), + DECL_DEP_PROP_3 ( "MultiPageValue", MULTIPAGEVALUE, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ), + DECL_PROP_3 ( "AllDialogChildren", USERFORMCONTAINEES, Reference< ::com::sun::star::container::XNameContainer >, BOUND, MAYBEDEFAULT, MAYBEVOID ), }; pPropertyInfos = aImplPropertyInfos; nElements = sizeof( aImplPropertyInfos ) / sizeof( ImplPropertyInfo ); @@ -407,3 +412,4 @@ sal_Bool CompareProperties( const ::com::sun::star::uno::Any& r1, const ::com::s +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/helper/registerservices.cxx b/toolkit/source/helper/registerservices.cxx index 8a6b1d8de4b9..cadd228d1c4b 100644 --- a/toolkit/source/helper/registerservices.cxx +++ b/toolkit/source/helper/registerservices.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -41,6 +42,7 @@ #include <toolkit/awt/vclxpointer.hxx> #include <toolkit/awt/vclxprinter.hxx> #include <toolkit/controls/unocontrols.hxx> +#include <toolkit/controls/dialogcontrol.hxx> #include <toolkit/controls/unocontrolcontainer.hxx> #include <toolkit/controls/unocontrolcontainermodel.hxx> #include <toolkit/controls/stdtabcontroller.hxx> @@ -106,7 +108,6 @@ namespace toolkit _rxServiceFactory, ::rtl::OUString::createFromAscii( _pComponentImplName ), _pInstantiation, aServiceNames ) ); - if ( xFactory.is() ) { xFactory->acquire(); @@ -174,6 +175,9 @@ IMPL_CREATEINSTANCE2( UnoControlTimeFieldModel ) IMPL_CREATEINSTANCE2( UnoControlProgressBarModel ) IMPL_CREATEINSTANCE2( UnoControlScrollBarModel ) IMPL_CREATEINSTANCE2( UnoSpinButtonModel ) +IMPL_CREATEINSTANCE2( UnoMultiPageModel ) +IMPL_CREATEINSTANCE2( UnoPageModel ) +IMPL_CREATEINSTANCE2( UnoFrameModel ) IMPL_CREATEINSTANCE2( UnoControlFixedLineModel ) IMPL_CREATEINSTANCE2( UnoCurrencyFieldControl ) IMPL_CREATEINSTANCE2( UnoDateFieldControl ) @@ -194,6 +198,9 @@ IMPL_CREATEINSTANCE2( UnoProgressBarControl ) IMPL_CREATEINSTANCE2( UnoScrollBarControl ) IMPL_CREATEINSTANCE2( UnoSpinButtonControl ) IMPL_CREATEINSTANCE2( UnoFixedLineControl ) +IMPL_CREATEINSTANCE2( UnoMultiPageControl ) +IMPL_CREATEINSTANCE2( UnoPageControl ) +IMPL_CREATEINSTANCE2( UnoFrameControl ) IMPL_CREATEINSTANCE( VCLXMenuBar ) IMPL_CREATEINSTANCE( VCLXPointer ) IMPL_CREATEINSTANCE( VCLXPopupMenu ) @@ -242,7 +249,6 @@ TOOLKIT_DLLPUBLIC void* SAL_CALL component_getFactory( const sal_Char* sImplemen { ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory = static_cast< ::com::sun::star::lang::XMultiServiceFactory* >( _pServiceManager ); - GET_FACTORY( VCLXToolkit, szServiceName_Toolkit, szServiceName2_Toolkit ) GET_FACTORY( VCLXPopupMenu, szServiceName_PopupMenu, szServiceName2_PopupMenu ) GET_FACTORY( VCLXMenuBar, szServiceName_MenuBar, szServiceName2_MenuBar ) @@ -296,6 +302,12 @@ TOOLKIT_DLLPUBLIC void* SAL_CALL component_getFactory( const sal_Char* sImplemen GET_FACTORY( VCLXPrinterServer, szServiceName_PrinterServer, szServiceName2_PrinterServer ) GET_FACTORY( UnoRoadmapControl, szServiceName_UnoControlRoadmap, szServiceName2_UnoControlRoadmap ) GET_FACTORY( UnoControlRoadmapModel, szServiceName_UnoControlRoadmapModel, szServiceName2_UnoControlRoadmapModel ) + GET_FACTORY( UnoMultiPageModel, szServiceName_UnoMultiPageModel, NULL ) + GET_FACTORY( UnoMultiPageControl, szServiceName_UnoMultiPageControl, NULL ) + GET_FACTORY( UnoPageModel, szServiceName_UnoPageModel, NULL ) + GET_FACTORY( UnoPageControl, szServiceName_UnoPageControl, NULL ) + GET_FACTORY( UnoFrameModel, szServiceName_UnoFrameModel, NULL ) + GET_FACTORY( UnoFrameControl, szServiceName_UnoFrameControl, NULL ) GET_FACTORY( UnoSpinButtonModel, szServiceName_UnoSpinButtonModel, NULL ) GET_FACTORY( UnoSpinButtonControl, szServiceName_UnoSpinButtonControl, NULL ) GET_FACTORY( TreeControl, szServiceName_TreeControl, NULL ) @@ -332,3 +344,4 @@ TOOLKIT_DLLPUBLIC void* SAL_CALL component_getFactory( const sal_Char* sImplemen +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/helper/servicenames.cxx b/toolkit/source/helper/servicenames.cxx index 293d257da832..4c8f11c69484 100644 --- a/toolkit/source/helper/servicenames.cxx +++ b/toolkit/source/helper/servicenames.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -32,82 +33,91 @@ #include <toolkit/helper/servicenames.hxx> -const sal_Char __FAR_DATA szServiceName_Toolkit[] = "stardiv.vcl.VclToolkit", szServiceName2_Toolkit[] = "com.sun.star.awt.Toolkit"; -const sal_Char __FAR_DATA szServiceName_PopupMenu[] = "stardiv.vcl.PopupMenu", szServiceName2_PopupMenu[] = "com.sun.star.awt.PopupMenu"; -const sal_Char __FAR_DATA szServiceName_MenuBar[] = "stardiv.vcl.MenuBar", szServiceName2_MenuBar[] = "com.sun.star.awt.MenuBar"; -const sal_Char __FAR_DATA szServiceName_Pointer[] = "stardiv.vcl.Pointer", szServiceName2_Pointer[] = "com.sun.star.awt.Pointer"; -const sal_Char __FAR_DATA szServiceName_UnoControlContainer[] = "stardiv.vcl.control.ControlContainer", szServiceName2_UnoControlContainer[] = "com.sun.star.awt.UnoControlContainer"; -const sal_Char __FAR_DATA szServiceName_UnoControlContainerModel[] = "stardiv.vcl.controlmodel.ControlContainer", szServiceName2_UnoControlContainerModel[] = "com.sun.star.awt.UnoControlContainerModel"; -const sal_Char __FAR_DATA szServiceName_TabController[] = "stardiv.vcl.control.TabController", szServiceName2_TabController[] = "com.sun.star.awt.TabController"; -const sal_Char __FAR_DATA szServiceName_TabControllerModel[] = "stardiv.vcl.controlmodel.TabController", szServiceName2_TabControllerModel[] = "com.sun.star.awt.TabControllerModel"; -const sal_Char __FAR_DATA szServiceName_UnoControlDialog[] = "stardiv.vcl.control.Dialog", szServiceName2_UnoControlDialog[] = "com.sun.star.awt.UnoControlDialog"; -const sal_Char __FAR_DATA szServiceName_UnoControlDialogModel[] = "stardiv.vcl.controlmodel.Dialog", szServiceName2_UnoControlDialogModel[] = "com.sun.star.awt.UnoControlDialogModel"; -const sal_Char __FAR_DATA szServiceName_UnoControlEdit[] = "stardiv.vcl.control.Edit", szServiceName2_UnoControlEdit[] = "com.sun.star.awt.UnoControlEdit"; -const sal_Char __FAR_DATA szServiceName_UnoControlEditModel[] = "stardiv.vcl.controlmodel.Edit", szServiceName2_UnoControlEditModel[] = "com.sun.star.awt.UnoControlEditModel"; -const sal_Char __FAR_DATA szServiceName_UnoControlFileControl[] = "stardiv.vcl.control.FileControl", szServiceName2_UnoControlFileControl[] = "com.sun.star.awt.UnoControlFileControl"; -const sal_Char __FAR_DATA szServiceName_UnoControlFileControlModel[] = "stardiv.vcl.controlmodel.FileControl", szServiceName2_UnoControlFileControlModel[] = "com.sun.star.awt.UnoControlFileControlModel"; -const sal_Char __FAR_DATA szServiceName_UnoControlButton[] = "stardiv.vcl.control.Button", szServiceName2_UnoControlButton[] = "com.sun.star.awt.UnoControlButton"; -const sal_Char __FAR_DATA szServiceName_UnoControlButtonModel[] = "stardiv.vcl.controlmodel.Button", szServiceName2_UnoControlButtonModel[] = "com.sun.star.awt.UnoControlButtonModel"; -const sal_Char __FAR_DATA szServiceName_UnoControlImageButton[] = "stardiv.vcl.control.ImageButton", szServiceName2_UnoControlImageButton[] = "com.sun.star.awt.UnoControlImageButton"; -const sal_Char __FAR_DATA szServiceName_UnoControlImageButtonModel[] = "stardiv.vcl.controlmodel.ImageButton", szServiceName2_UnoControlImageButtonModel[] = "com.sun.star.awt.UnoControlImageButtonModel"; -const sal_Char __FAR_DATA szServiceName_UnoControlImageControl[] = "stardiv.vcl.control.ImageControl", szServiceName2_UnoControlImageControl[] = "com.sun.star.awt.UnoControlImageControl"; -const sal_Char __FAR_DATA szServiceName_UnoControlImageControlModel[] = "stardiv.vcl.controlmodel.ImageControl", szServiceName2_UnoControlImageControlModel[] = "com.sun.star.awt.UnoControlImageControlModel"; -const sal_Char __FAR_DATA szServiceName_UnoControlRadioButton[] = "stardiv.vcl.control.RadioButton", szServiceName2_UnoControlRadioButton[] = "com.sun.star.awt.UnoControlRadioButton"; -const sal_Char __FAR_DATA szServiceName_UnoControlRadioButtonModel[] = "stardiv.vcl.controlmodel.RadioButton", szServiceName2_UnoControlRadioButtonModel[] = "com.sun.star.awt.UnoControlRadioButtonModel"; -const sal_Char __FAR_DATA szServiceName_UnoControlCheckBox[] = "stardiv.vcl.control.CheckBox", szServiceName2_UnoControlCheckBox[] = "com.sun.star.awt.UnoControlCheckBox"; -const sal_Char __FAR_DATA szServiceName_UnoControlCheckBoxModel[] = "stardiv.vcl.controlmodel.CheckBox", szServiceName2_UnoControlCheckBoxModel[] = "com.sun.star.awt.UnoControlCheckBoxModel"; -const sal_Char __FAR_DATA szServiceName_UnoControlListBox[] = "stardiv.vcl.control.ListBox", szServiceName2_UnoControlListBox[] = "com.sun.star.awt.UnoControlListBox"; -const sal_Char __FAR_DATA szServiceName_UnoControlListBoxModel[] = "stardiv.vcl.controlmodel.ListBox", szServiceName2_UnoControlListBoxModel[] = "com.sun.star.awt.UnoControlListBoxModel"; -const sal_Char __FAR_DATA szServiceName_UnoControlComboBox[] = "stardiv.vcl.control.ComboBox", szServiceName2_UnoControlComboBox[] = "com.sun.star.awt.UnoControlComboBox"; -const sal_Char __FAR_DATA szServiceName_UnoControlComboBoxModel[] = "stardiv.vcl.controlmodel.ComboBox", szServiceName2_UnoControlComboBoxModel[] = "com.sun.star.awt.UnoControlComboBoxModel"; -const sal_Char __FAR_DATA szServiceName_UnoControlFixedText[] = "stardiv.vcl.control.FixedText", szServiceName2_UnoControlFixedText[] = "com.sun.star.awt.UnoControlFixedText"; -const sal_Char __FAR_DATA szServiceName_UnoControlFixedTextModel[] = "stardiv.vcl.controlmodel.FixedText", szServiceName2_UnoControlFixedTextModel[] = "com.sun.star.awt.UnoControlFixedTextModel"; -const sal_Char __FAR_DATA szServiceName_UnoControlGroupBox[] = "stardiv.vcl.control.GroupBox", szServiceName2_UnoControlGroupBox[] = "com.sun.star.awt.UnoControlGroupBox"; -const sal_Char __FAR_DATA szServiceName_UnoControlGroupBoxModel[] = "stardiv.vcl.controlmodel.GroupBox", szServiceName2_UnoControlGroupBoxModel[] = "com.sun.star.awt.UnoControlGroupBoxModel"; -const sal_Char __FAR_DATA szServiceName_UnoControlDateField[] = "stardiv.vcl.control.DateField", szServiceName2_UnoControlDateField[] = "com.sun.star.awt.UnoControlDateField"; -const sal_Char __FAR_DATA szServiceName_UnoControlDateFieldModel[] = "stardiv.vcl.controlmodel.DateField", szServiceName2_UnoControlDateFieldModel[] = "com.sun.star.awt.UnoControlDateFieldModel"; -const sal_Char __FAR_DATA szServiceName_UnoControlTimeField[] = "stardiv.vcl.control.TimeField", szServiceName2_UnoControlTimeField[] = "com.sun.star.awt.UnoControlTimeField"; -const sal_Char __FAR_DATA szServiceName_UnoControlTimeFieldModel[] = "stardiv.vcl.controlmodel.TimeField", szServiceName2_UnoControlTimeFieldModel[] = "com.sun.star.awt.UnoControlTimeFieldModel"; -const sal_Char __FAR_DATA szServiceName_UnoControlNumericField[] = "stardiv.vcl.control.NumericField", szServiceName2_UnoControlNumericField[] = "com.sun.star.awt.UnoControlNumericField"; -const sal_Char __FAR_DATA szServiceName_UnoControlNumericFieldModel[] = "stardiv.vcl.controlmodel.NumericField", szServiceName2_UnoControlNumericFieldModel[] = "com.sun.star.awt.UnoControlNumericFieldModel"; -const sal_Char __FAR_DATA szServiceName_UnoControlCurrencyField[] = "stardiv.vcl.control.CurrencyField", szServiceName2_UnoControlCurrencyField[] = "com.sun.star.awt.UnoControlCurrencyField"; -const sal_Char __FAR_DATA szServiceName_UnoControlCurrencyFieldModel[] = "stardiv.vcl.controlmodel.CurrencyField", szServiceName2_UnoControlCurrencyFieldModel[] = "com.sun.star.awt.UnoControlCurrencyFieldModel"; -const sal_Char __FAR_DATA szServiceName_UnoControlPatternField[] = "stardiv.vcl.control.PatternField", szServiceName2_UnoControlPatternField[] = "com.sun.star.awt.UnoControlPatternField"; -const sal_Char __FAR_DATA szServiceName_UnoControlPatternFieldModel[] = "stardiv.vcl.controlmodel.PatternField", szServiceName2_UnoControlPatternFieldModel[] = "com.sun.star.awt.UnoControlPatternFieldModel"; -const sal_Char __FAR_DATA szServiceName_UnoControlFormattedField[] = "stardiv.vcl.control.FormattedField", szServiceName2_UnoControlFormattedField[] = "com.sun.star.awt.UnoControlFormattedField"; -const sal_Char __FAR_DATA szServiceName_UnoControlFormattedFieldModel[] = "stardiv.vcl.controlmodel.FormattedField", szServiceName2_UnoControlFormattedFieldModel[] = "com.sun.star.awt.UnoControlFormattedFieldModel"; -const sal_Char __FAR_DATA szServiceName_MVCIntrospection[] = "stardiv.vcl.MVCIntrospection", szServiceName2_MVCIntrospection[] = "com.sun.star.awt.MVCIntrospection"; -const sal_Char __FAR_DATA szServiceName_PrinterServer[] = "stardiv.vcl.PrinterServer", szServiceName2_PrinterServer[] = "com.sun.star.awt.PrinterServer"; -const sal_Char __FAR_DATA szServiceName_UnoControlProgressBar[] = "stardiv.vcl.control.ProgressBar", szServiceName2_UnoControlProgressBar[] = "com.sun.star.awt.UnoControlProgressBar"; -const sal_Char __FAR_DATA szServiceName_UnoControlProgressBarModel[] = "stardiv.vcl.controlmodel.ProgressBar", szServiceName2_UnoControlProgressBarModel[] = "com.sun.star.awt.UnoControlProgressBarModel"; -const sal_Char __FAR_DATA szServiceName_UnoControlScrollBar[] = "stardiv.vcl.control.ScrollBar", szServiceName2_UnoControlScrollBar[] = "com.sun.star.awt.UnoControlScrollBar"; -const sal_Char __FAR_DATA szServiceName_UnoControlScrollBarModel[] = "stardiv.vcl.controlmodel.ScrollBar", szServiceName2_UnoControlScrollBarModel[] = "com.sun.star.awt.UnoControlScrollBarModel"; -const sal_Char __FAR_DATA szServiceName_UnoControlFixedLine[] = "stardiv.vcl.control.FixedLine", szServiceName2_UnoControlFixedLine[] = "com.sun.star.awt.UnoControlFixedLine"; -const sal_Char __FAR_DATA szServiceName_UnoControlFixedLineModel[] = "stardiv.vcl.controlmodel.FixedLine", szServiceName2_UnoControlFixedLineModel[] = "com.sun.star.awt.UnoControlFixedLineModel"; -const sal_Char __FAR_DATA szServiceName_UnoControlRoadmap[] = "stardiv.vcl.control.Roadmap", szServiceName2_UnoControlRoadmap[] = "com.sun.star.awt.UnoControlRoadmap"; -const sal_Char __FAR_DATA szServiceName_UnoControlRoadmapModel[] = "stardiv.vcl.controlmodel.Roadmap", szServiceName2_UnoControlRoadmapModel[] = "com.sun.star.awt.UnoControlRoadmapModel"; -const sal_Char __FAR_DATA szServiceName_UnoSpinButtonControl[] = "com.sun.star.awt.UnoControlSpinButton"; -const sal_Char __FAR_DATA szServiceName_UnoSpinButtonModel[] = "com.sun.star.awt.UnoControlSpinButtonModel"; -const sal_Char __FAR_DATA szServiceName_TreeControl[] = "com.sun.star.awt.tree.TreeControl"; -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"; -const sal_Char __FAR_DATA szServiceName_UnoControlFixedHyperlink[] = "com.sun.star.awt.UnoControlFixedHyperlink"; -const sal_Char __FAR_DATA szServiceName_UnoControlFixedHyperlinkModel[] = "com.sun.star.awt.UnoControlFixedHyperlinkModel"; -const sal_Char __FAR_DATA szServiceName_GridControl[] = "com.sun.star.awt.grid.UnoControlGrid"; -const sal_Char __FAR_DATA szServiceName_GridControlModel[] = "com.sun.star.awt.grid.UnoControlGridModel"; -const sal_Char __FAR_DATA szServiceName_DefaultGridDataModel[] = "com.sun.star.awt.grid.DefaultGridDataModel"; -const sal_Char __FAR_DATA szServiceName_DefaultGridColumnModel[] = "com.sun.star.awt.grid.DefaultGridColumnModel"; -const sal_Char __FAR_DATA szServiceName_GridColumn[] = "com.sun.star.awt.grid.GridColumn"; -const sal_Char __FAR_DATA szServiceName_UnoControlTabPage[] = "com.sun.star.awt.tab.UnoControlTabPage"; -const sal_Char __FAR_DATA szServiceName_UnoControlTabPageModel[] = "com.sun.star.awt.tab.UnoControlTabPageModel"; -const sal_Char __FAR_DATA szServiceName_UnoControlTabPageContainerModel[] = "com.sun.star.awt.tab.UnoControlTabPageContainerModel"; -const sal_Char __FAR_DATA szServiceName_UnoControlTabPageContainer[] = "com.sun.star.awt.tab.UnoControlTabPageContainer"; -const sal_Char __FAR_DATA szServiceName_SortableGridDataModel[] = "com.sun.star.awt.grid.SortableGridDataModel"; +const sal_Char szServiceName_Toolkit[] = "stardiv.vcl.VclToolkit", szServiceName2_Toolkit[] = "com.sun.star.awt.Toolkit"; +const sal_Char szServiceName_PopupMenu[] = "stardiv.vcl.PopupMenu", szServiceName2_PopupMenu[] = "com.sun.star.awt.PopupMenu"; +const sal_Char szServiceName_MenuBar[] = "stardiv.vcl.MenuBar", szServiceName2_MenuBar[] = "com.sun.star.awt.MenuBar"; +const sal_Char szServiceName_Pointer[] = "stardiv.vcl.Pointer", szServiceName2_Pointer[] = "com.sun.star.awt.Pointer"; +const sal_Char szServiceName_UnoControlContainer[] = "stardiv.vcl.control.ControlContainer", szServiceName2_UnoControlContainer[] = "com.sun.star.awt.UnoControlContainer"; + +const sal_Char szServiceName_UnoControlContainerModel[] = "stardiv.vcl.controlmodel.ControlContainer", szServiceName2_UnoControlContainerModel[] = "com.sun.star.awt.UnoControlContainerModel"; +const sal_Char szServiceName_TabController[] = "stardiv.vcl.control.TabController", szServiceName2_TabController[] = "com.sun.star.awt.TabController"; +const sal_Char szServiceName_TabControllerModel[] = "stardiv.vcl.controlmodel.TabController", szServiceName2_TabControllerModel[] = "com.sun.star.awt.TabControllerModel"; +const sal_Char szServiceName_UnoControlDialog[] = "stardiv.vcl.control.Dialog", szServiceName2_UnoControlDialog[] = "com.sun.star.awt.UnoControlDialog"; +const sal_Char szServiceName_UnoControlDialogModel[] = "stardiv.vcl.controlmodel.Dialog", szServiceName2_UnoControlDialogModel[] = "com.sun.star.awt.UnoControlDialogModel"; +const sal_Char szServiceName_UnoControlEdit[] = "stardiv.vcl.control.Edit", szServiceName2_UnoControlEdit[] = "com.sun.star.awt.UnoControlEdit"; +const sal_Char szServiceName_UnoControlEditModel[] = "stardiv.vcl.controlmodel.Edit", szServiceName2_UnoControlEditModel[] = "com.sun.star.awt.UnoControlEditModel"; +const sal_Char szServiceName_UnoControlFileControl[] = "stardiv.vcl.control.FileControl", szServiceName2_UnoControlFileControl[] = "com.sun.star.awt.UnoControlFileControl"; +const sal_Char szServiceName_UnoControlFileControlModel[] = "stardiv.vcl.controlmodel.FileControl", szServiceName2_UnoControlFileControlModel[] = "com.sun.star.awt.UnoControlFileControlModel"; +const sal_Char szServiceName_UnoControlButton[] = "stardiv.vcl.control.Button", szServiceName2_UnoControlButton[] = "com.sun.star.awt.UnoControlButton"; +const sal_Char szServiceName_UnoControlButtonModel[] = "stardiv.vcl.controlmodel.Button", szServiceName2_UnoControlButtonModel[] = "com.sun.star.awt.UnoControlButtonModel"; +const sal_Char szServiceName_UnoControlImageButton[] = "stardiv.vcl.control.ImageButton", szServiceName2_UnoControlImageButton[] = "com.sun.star.awt.UnoControlImageButton"; +const sal_Char szServiceName_UnoControlImageButtonModel[] = "stardiv.vcl.controlmodel.ImageButton", szServiceName2_UnoControlImageButtonModel[] = "com.sun.star.awt.UnoControlImageButtonModel"; +const sal_Char szServiceName_UnoControlImageControl[] = "stardiv.vcl.control.ImageControl", szServiceName2_UnoControlImageControl[] = "com.sun.star.awt.UnoControlImageControl"; +const sal_Char szServiceName_UnoControlImageControlModel[] = "stardiv.vcl.controlmodel.ImageControl", szServiceName2_UnoControlImageControlModel[] = "com.sun.star.awt.UnoControlImageControlModel"; +const sal_Char szServiceName_UnoControlRadioButton[] = "stardiv.vcl.control.RadioButton", szServiceName2_UnoControlRadioButton[] = "com.sun.star.awt.UnoControlRadioButton"; +const sal_Char szServiceName_UnoControlRadioButtonModel[] = "stardiv.vcl.controlmodel.RadioButton", szServiceName2_UnoControlRadioButtonModel[] = "com.sun.star.awt.UnoControlRadioButtonModel"; +const sal_Char szServiceName_UnoControlCheckBox[] = "stardiv.vcl.control.CheckBox", szServiceName2_UnoControlCheckBox[] = "com.sun.star.awt.UnoControlCheckBox"; +const sal_Char szServiceName_UnoControlCheckBoxModel[] = "stardiv.vcl.controlmodel.CheckBox", szServiceName2_UnoControlCheckBoxModel[] = "com.sun.star.awt.UnoControlCheckBoxModel"; +const sal_Char szServiceName_UnoControlListBox[] = "stardiv.vcl.control.ListBox", szServiceName2_UnoControlListBox[] = "com.sun.star.awt.UnoControlListBox"; +const sal_Char szServiceName_UnoControlListBoxModel[] = "stardiv.vcl.controlmodel.ListBox", szServiceName2_UnoControlListBoxModel[] = "com.sun.star.awt.UnoControlListBoxModel"; +const sal_Char szServiceName_UnoControlComboBox[] = "stardiv.vcl.control.ComboBox", szServiceName2_UnoControlComboBox[] = "com.sun.star.awt.UnoControlComboBox"; +const sal_Char szServiceName_UnoControlComboBoxModel[] = "stardiv.vcl.controlmodel.ComboBox", szServiceName2_UnoControlComboBoxModel[] = "com.sun.star.awt.UnoControlComboBoxModel"; +const sal_Char szServiceName_UnoControlFixedText[] = "stardiv.vcl.control.FixedText", szServiceName2_UnoControlFixedText[] = "com.sun.star.awt.UnoControlFixedText"; +const sal_Char szServiceName_UnoControlFixedTextModel[] = "stardiv.vcl.controlmodel.FixedText", szServiceName2_UnoControlFixedTextModel[] = "com.sun.star.awt.UnoControlFixedTextModel"; +const sal_Char szServiceName_UnoControlGroupBox[] = "stardiv.vcl.control.GroupBox", szServiceName2_UnoControlGroupBox[] = "com.sun.star.awt.UnoControlGroupBox"; +const sal_Char szServiceName_UnoControlGroupBoxModel[] = "stardiv.vcl.controlmodel.GroupBox", szServiceName2_UnoControlGroupBoxModel[] = "com.sun.star.awt.UnoControlGroupBoxModel"; +const sal_Char szServiceName_UnoControlDateField[] = "stardiv.vcl.control.DateField", szServiceName2_UnoControlDateField[] = "com.sun.star.awt.UnoControlDateField"; +const sal_Char szServiceName_UnoControlDateFieldModel[] = "stardiv.vcl.controlmodel.DateField", szServiceName2_UnoControlDateFieldModel[] = "com.sun.star.awt.UnoControlDateFieldModel"; +const sal_Char szServiceName_UnoControlTimeField[] = "stardiv.vcl.control.TimeField", szServiceName2_UnoControlTimeField[] = "com.sun.star.awt.UnoControlTimeField"; +const sal_Char szServiceName_UnoControlTimeFieldModel[] = "stardiv.vcl.controlmodel.TimeField", szServiceName2_UnoControlTimeFieldModel[] = "com.sun.star.awt.UnoControlTimeFieldModel"; +const sal_Char szServiceName_UnoControlNumericField[] = "stardiv.vcl.control.NumericField", szServiceName2_UnoControlNumericField[] = "com.sun.star.awt.UnoControlNumericField"; +const sal_Char szServiceName_UnoControlNumericFieldModel[] = "stardiv.vcl.controlmodel.NumericField", szServiceName2_UnoControlNumericFieldModel[] = "com.sun.star.awt.UnoControlNumericFieldModel"; +const sal_Char szServiceName_UnoControlCurrencyField[] = "stardiv.vcl.control.CurrencyField", szServiceName2_UnoControlCurrencyField[] = "com.sun.star.awt.UnoControlCurrencyField"; +const sal_Char szServiceName_UnoControlCurrencyFieldModel[] = "stardiv.vcl.controlmodel.CurrencyField", szServiceName2_UnoControlCurrencyFieldModel[] = "com.sun.star.awt.UnoControlCurrencyFieldModel"; +const sal_Char szServiceName_UnoControlPatternField[] = "stardiv.vcl.control.PatternField", szServiceName2_UnoControlPatternField[] = "com.sun.star.awt.UnoControlPatternField"; +const sal_Char szServiceName_UnoControlPatternFieldModel[] = "stardiv.vcl.controlmodel.PatternField", szServiceName2_UnoControlPatternFieldModel[] = "com.sun.star.awt.UnoControlPatternFieldModel"; +const sal_Char szServiceName_UnoControlFormattedField[] = "stardiv.vcl.control.FormattedField", szServiceName2_UnoControlFormattedField[] = "com.sun.star.awt.UnoControlFormattedField"; +const sal_Char szServiceName_UnoControlFormattedFieldModel[] = "stardiv.vcl.controlmodel.FormattedField", szServiceName2_UnoControlFormattedFieldModel[] = "com.sun.star.awt.UnoControlFormattedFieldModel"; +const sal_Char szServiceName_MVCIntrospection[] = "stardiv.vcl.MVCIntrospection", szServiceName2_MVCIntrospection[] = "com.sun.star.awt.MVCIntrospection"; +const sal_Char szServiceName_PrinterServer[] = "stardiv.vcl.PrinterServer", szServiceName2_PrinterServer[] = "com.sun.star.awt.PrinterServer"; +const sal_Char szServiceName_UnoControlProgressBar[] = "stardiv.vcl.control.ProgressBar", szServiceName2_UnoControlProgressBar[] = "com.sun.star.awt.UnoControlProgressBar"; +const sal_Char szServiceName_UnoControlProgressBarModel[] = "stardiv.vcl.controlmodel.ProgressBar", szServiceName2_UnoControlProgressBarModel[] = "com.sun.star.awt.UnoControlProgressBarModel"; +const sal_Char szServiceName_UnoControlScrollBar[] = "stardiv.vcl.control.ScrollBar", szServiceName2_UnoControlScrollBar[] = "com.sun.star.awt.UnoControlScrollBar"; +const sal_Char szServiceName_UnoControlScrollBarModel[] = "stardiv.vcl.controlmodel.ScrollBar", szServiceName2_UnoControlScrollBarModel[] = "com.sun.star.awt.UnoControlScrollBarModel"; +const sal_Char szServiceName_UnoControlFixedLine[] = "stardiv.vcl.control.FixedLine", szServiceName2_UnoControlFixedLine[] = "com.sun.star.awt.UnoControlFixedLine"; +const sal_Char szServiceName_UnoControlFixedLineModel[] = "stardiv.vcl.controlmodel.FixedLine", szServiceName2_UnoControlFixedLineModel[] = "com.sun.star.awt.UnoControlFixedLineModel"; +const sal_Char szServiceName_UnoControlRoadmap[] = "stardiv.vcl.control.Roadmap", szServiceName2_UnoControlRoadmap[] = "com.sun.star.awt.UnoControlRoadmap"; +const sal_Char szServiceName_UnoControlRoadmapModel[] = "stardiv.vcl.controlmodel.Roadmap", szServiceName2_UnoControlRoadmapModel[] = "com.sun.star.awt.UnoControlRoadmapModel"; +const sal_Char szServiceName_UnoSpinButtonControl[] = "com.sun.star.awt.UnoControlSpinButton"; +const sal_Char szServiceName_UnoSpinButtonModel[] = "com.sun.star.awt.UnoControlSpinButtonModel"; +const sal_Char szServiceName_UnoMultiPageControl[] = "com.sun.star.awt.UnoControlMultiPage"; +const sal_Char szServiceName_UnoMultiPageModel[] = "com.sun.star.awt.UnoMultiPageModel"; +const sal_Char szServiceName_UnoPageControl[] = "com.sun.star.awt.UnoControlPage"; +const sal_Char szServiceName_UnoPageModel[] = "com.sun.star.awt.UnoPageModel"; +const sal_Char szServiceName_UnoFrameControl[] = "com.sun.star.awt.UnoControlFrame"; +const sal_Char szServiceName_AnimatedImagesControl[] = "com.sun.star.awt.AnimatedImagesControl"; +const sal_Char szServiceName_AnimatedImagesControlModel[] = "com.sun.star.awt.AnimatedImagesControlModel"; +const sal_Char szServiceName_SpinningProgressControlModel[] = "com.sun.star.awt.SpinningProgressControlModel"; +const sal_Char szServiceName_UnoFrameModel[] = "com.sun.star.awt.UnoFrameModel"; +const sal_Char szServiceName_TreeControl[] = "com.sun.star.awt.tree.TreeControl"; +const sal_Char szServiceName_TreeControlModel[] = "com.sun.star.awt.tree.TreeControlModel"; +const sal_Char szServiceName_MutableTreeDataModel[] = "com.sun.star.awt.tree.MutableTreeDataModel"; +const sal_Char szServiceName_UnoSimpleAnimationControlModel[] = "com.sun.star.awt.UnoSimpleAnimationControlModel", szServiceName2_UnoSimpleAnimationControlModel[] = "com.sun.star.awt.UnoControlSimpleAnimationModel"; +const sal_Char szServiceName_UnoSimpleAnimationControl[] = "com.sun.star.awt.UnoSimpleAnimationControl", szServiceName2_UnoSimpleAnimationControl[] = "com.sun.star.awt.UnoControlSimpleAnimation"; +const sal_Char szServiceName_UnoThrobberControlModel[] = "com.sun.star.awt.UnoThrobberControlModel", szServiceName2_UnoThrobberControlModel[] = "com.sun.star.awt.UnoControlThrobberModel"; +const sal_Char szServiceName_UnoThrobberControl[] = "com.sun.star.awt.UnoThrobberControl", szServiceName2_UnoThrobberControl[] = "com.sun.star.awt.UnoControlThrobber"; +const sal_Char szServiceName_UnoControlFixedHyperlink[] = "com.sun.star.awt.UnoControlFixedHyperlink"; +const sal_Char szServiceName_UnoControlFixedHyperlinkModel[] = "com.sun.star.awt.UnoControlFixedHyperlinkModel"; +const sal_Char szServiceName_GridControl[] = "com.sun.star.awt.grid.UnoControlGrid"; +const sal_Char szServiceName_GridControlModel[] = "com.sun.star.awt.grid.UnoControlGridModel"; +const sal_Char szServiceName_DefaultGridDataModel[] = "com.sun.star.awt.grid.DefaultGridDataModel"; +const sal_Char szServiceName_DefaultGridColumnModel[] = "com.sun.star.awt.grid.DefaultGridColumnModel"; +const sal_Char szServiceName_GridColumn[] = "com.sun.star.awt.grid.GridColumn"; +const sal_Char szServiceName_UnoControlTabPage[] = "com.sun.star.awt.tab.UnoControlTabPage"; +const sal_Char szServiceName_UnoControlTabPageModel[] = "com.sun.star.awt.tab.UnoControlTabPageModel"; +const sal_Char szServiceName_UnoControlTabPageContainerModel[] = "com.sun.star.awt.tab.UnoControlTabPageContainerModel"; +const sal_Char szServiceName_UnoControlTabPageContainer[] = "com.sun.star.awt.tab.UnoControlTabPageContainer"; +const sal_Char szServiceName_SortableGridDataModel[] = "com.sun.star.awt.grid.SortableGridDataModel"; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/helper/tkresmgr.cxx b/toolkit/source/helper/tkresmgr.cxx index d0336c27bdf5..8c4901326cf4 100644 --- a/toolkit/source/helper/tkresmgr.cxx +++ b/toolkit/source/helper/tkresmgr.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -33,9 +34,7 @@ #include <comphelper/componentcontext.hxx> #include <comphelper/namedvaluecollection.hxx> #include <com/sun/star/graphic/XGraphicProvider.hpp> -#ifndef _TOOLS_RESMGR_HXX_ #include <tools/resmgr.hxx> -#endif #include <tools/diagnose_ex.h> #include <vcl/svapp.hxx> @@ -129,3 +128,4 @@ Image TkResMgr::getImageFromURL( const ::rtl::OUString& i_rImageURL ) return Image(); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/helper/unomemorystream.cxx b/toolkit/source/helper/unomemorystream.cxx index b07cee100406..765353e9b678 100644 --- a/toolkit/source/helper/unomemorystream.cxx +++ b/toolkit/source/helper/unomemorystream.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -106,3 +107,4 @@ void UnoMemoryStream::closeInput() throw(::com::sun::star::io::NotConnectedExcep +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/helper/unopropertyarrayhelper.cxx b/toolkit/source/helper/unopropertyarrayhelper.cxx index 8e2141033aab..f265a1bdf08c 100644 --- a/toolkit/source/helper/unopropertyarrayhelper.cxx +++ b/toolkit/source/helper/unopropertyarrayhelper.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -46,7 +47,7 @@ UnoPropertyArrayHelper::UnoPropertyArrayHelper( const ::com::sun::star::uno::Seq UnoPropertyArrayHelper::UnoPropertyArrayHelper( const std::list< sal_uInt16 > &rIDs ) { std::list< sal_uInt16 >::const_iterator iter; - for( iter = rIDs.begin(); iter != rIDs.end(); iter++) + for( iter = rIDs.begin(); iter != rIDs.end(); ++iter) maIDs.Insert( *iter, (void*)1L); } @@ -83,13 +84,13 @@ sal_Bool UnoPropertyArrayHelper::fillPropertyMembersByHandle( ::rtl::OUString * { sal_uInt16 nId = sal::static_int_cast< sal_uInt16 >( maIDs.GetObjectKey( s )); - aSortedPropsIds.Insert( 1+GetPropertyOrderNr( nId ), (void*)(sal_uInt32)nId ); + aSortedPropsIds.Insert( 1+GetPropertyOrderNr( nId ), (void*)(sal_uIntPtr)nId ); if ( nId == BASEPROPERTY_FONTDESCRIPTOR ) { // Einzelproperties... for ( sal_uInt16 i = BASEPROPERTY_FONTDESCRIPTORPART_START; i <= BASEPROPERTY_FONTDESCRIPTORPART_END; i++ ) - aSortedPropsIds.Insert( 1+GetPropertyOrderNr( i ), (void*)(sal_uInt32)i ); + aSortedPropsIds.Insert( 1+GetPropertyOrderNr( i ), (void*)(sal_uIntPtr)i ); } } @@ -158,3 +159,4 @@ sal_Int32 UnoPropertyArrayHelper::fillHandles( sal_Int32* pHandles, const ::com: } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/helper/unowrapper.cxx b/toolkit/source/helper/unowrapper.cxx index 9612e450ee81..b5abb11d632e 100644 --- a/toolkit/source/helper/unowrapper.cxx +++ b/toolkit/source/helper/unowrapper.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -38,6 +39,7 @@ #include <toolkit/awt/vclxcontainer.hxx> #include <toolkit/awt/vclxtopwindow.hxx> #include <toolkit/awt/vclxgraphics.hxx> +#include <awt/vclxtabcontrol.hxx> #include "toolkit/dllapi.h" #include <vcl/svapp.hxx> @@ -62,7 +64,7 @@ using namespace ::com::sun::star; case WINDOW_OKBUTTON: case WINDOW_CANCELBUTTON: return new VCLXButton; case WINDOW_CHECKBOX: return new VCLXCheckBox; - // --> OD 2009-06-29 #i95042# + // #i95042# // A Window of type <MetricBox> is inherited from type <ComboBox>. // Thus, it does make more sense to return a <VCLXComboBox> instance // instead of only a <VCLXWindow> instance, especially regarding its @@ -106,6 +108,7 @@ using namespace ::com::sun::star; case WINDOW_TABPAGE: return new VCLXContainer; case WINDOW_TOOLBOX: return new VCLXToolBox; + case WINDOW_TABCONTROL: return new VCLXMultiPage; // case WINDOW_FIXEDLINE: // case WINDOW_FIXEDBITMAP: @@ -339,3 +342,5 @@ void UnoWrapper::WindowDestroyed( Window* pWindow ) { return maAccessibleFactoryAccess.getFactory().createAccessible( pMenu, bIsMenuBar ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/helper/vclunohelper.cxx b/toolkit/source/helper/vclunohelper.cxx index 600687a3633b..7f8de3e25e59 100644 --- a/toolkit/source/helper/vclunohelper.cxx +++ b/toolkit/source/helper/vclunohelper.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -32,6 +33,7 @@ #include <tools/stream.hxx> #include <vcl/bitmap.hxx> #include <vcl/window.hxx> +#include <sal/macros.h> #include <com/sun/star/util/MeasureUnit.hpp> #include <com/sun/star/awt/XBitmap.hpp> #include <com/sun/star/awt/XWindow.hpp> @@ -245,7 +247,7 @@ float VCLUnoHelper::ConvertFontWidth( FontWidth eWidth ) else if( eWidth == WIDTH_ULTRA_EXPANDED ) return ::com::sun::star::awt::FontWidth::ULTRAEXPANDED; - DBG_ERROR( "Unknown FontWidth" ); + OSL_FAIL( "Unknown FontWidth" ); return ::com::sun::star::awt::FontWidth::DONTKNOW; } @@ -272,7 +274,7 @@ FontWidth VCLUnoHelper::ConvertFontWidth( float f ) else if( f <= ::com::sun::star::awt::FontWidth::ULTRAEXPANDED ) return WIDTH_ULTRA_EXPANDED; - DBG_ERROR( "Unknown FontWidth" ); + OSL_FAIL( "Unknown FontWidth" ); return WIDTH_DONTKNOW; } @@ -299,7 +301,7 @@ float VCLUnoHelper::ConvertFontWeight( FontWeight eWeight ) else if( eWeight == WEIGHT_BLACK ) return ::com::sun::star::awt::FontWeight::BLACK; - DBG_ERROR( "Unknown FontWeigth" ); + OSL_FAIL( "Unknown FontWeigth" ); return ::com::sun::star::awt::FontWeight::DONTKNOW; } @@ -326,7 +328,7 @@ FontWeight VCLUnoHelper::ConvertFontWeight( float f ) else if( f <= ::com::sun::star::awt::FontWeight::BLACK ) return WEIGHT_BLACK; - DBG_ERROR( "Unknown FontWeigth" ); + OSL_FAIL( "Unknown FontWeigth" ); return WEIGHT_DONTKNOW; } @@ -442,7 +444,7 @@ MapUnit VCLUnoHelper::UnoEmbed2VCLMapUnit( sal_Int32 nUnoEmbedMapUnit ) return MAP_PIXEL; } - OSL_ENSURE( sal_False, "Unexpected UNO map mode is provided!\n" ); + OSL_FAIL( "Unexpected UNO map mode is provided!\n" ); return MAP_LASTENUMDUMMY; } @@ -475,7 +477,7 @@ sal_Int32 VCLUnoHelper::VCL2UnoEmbedMapUnit( MapUnit nVCLMapUnit ) default: ; // avoid compiler warning } - OSL_ENSURE( sal_False, "Unexpected VCL map mode is provided!\n" ); + OSL_FAIL( "Unexpected VCL map mode is provided!\n" ); return -1; } @@ -517,7 +519,7 @@ namespace { FUNIT_FOOT, MeasureUnit::FOOT, 1 }, { FUNIT_MILE, MeasureUnit::MILE, 1 }, }; - for ( size_t i = 0; i < sizeof( aUnits ) / sizeof( aUnits[0] ); ++i ) + for ( size_t i = 0; i < SAL_N_ELEMENTS( aUnits ); ++i ) { if ( eDirection == FieldUnitToMeasurementUnit ) { @@ -638,7 +640,7 @@ MapUnit /* MapModeUnit */ VCLUnoHelper::ConvertToMapModeUnit(sal_Int16 /* com.su */ default: - throw ::com::sun::star::lang::IllegalArgumentException(::rtl::OUString::createFromAscii("Unsupported measure unit."), NULL, 1 ); + throw ::com::sun::star::lang::IllegalArgumentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Unsupported measure unit.")), NULL, 1 ); } return eMode; } @@ -708,7 +710,7 @@ sal_Int16 /* com.sun.star.util.MeasureUnit.* */ VCLUnoHelper::ConvertToMeasureme break; */ default: - throw ::com::sun::star::lang::IllegalArgumentException(::rtl::OUString::createFromAscii("Unsupported MapMode unit."), NULL, 1 ); + throw ::com::sun::star::lang::IllegalArgumentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Unsupported MapMode unit.")), NULL, 1 ); } return nMeasureUnit; } @@ -798,3 +800,5 @@ awt::KeyEvent VCLUnoHelper::createKeyEvent( const ::KeyEvent& _rVclEvent, const return aKeyEvent; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/layout/core/bin.cxx b/toolkit/source/layout/core/bin.cxx index 0f0719f12bbd..e8b665b73a4a 100644 --- a/toolkit/source/layout/core/bin.cxx +++ b/toolkit/source/layout/core/bin.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -196,3 +197,5 @@ awt::Size SAL_CALL MinSize::getMinimumSize() } } // namespace layoutimpl + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/layout/core/bin.hxx b/toolkit/source/layout/core/bin.hxx index 554f6f1bbcf9..69e97cebdf40 100644 --- a/toolkit/source/layout/core/bin.hxx +++ b/toolkit/source/layout/core/bin.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -111,3 +112,5 @@ public: } // namespace layoutimpl #endif /* LAYOUT_CORE_BIN_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/layout/core/box-base.cxx b/toolkit/source/layout/core/box-base.cxx index d203e63ce2ed..93b5f53f4482 100644 --- a/toolkit/source/layout/core/box-base.cxx +++ b/toolkit/source/layout/core/box-base.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -51,7 +52,7 @@ static bool isVisible( uno::Reference< awt::XLayoutConstrains > xWidget ) { if ( !xWidget.is() ) { - DBG_ERROR( "FIXME: invalid child !" ); + OSL_FAIL( "FIXME: invalid child !" ); return true; } @@ -107,7 +108,7 @@ Box_Base::ChildData* Box_Base::removeChildData( std::list< ChildData* >& lst, css::uno::Reference< css::awt::XLayoutConstrains > const& xChild ) { for ( std::list< ChildData* >::iterator it = lst.begin(); - it != lst.end(); it++ ) + it != lst.end(); ++it ) { if ( (*it)->mxChild == xChild ) { @@ -131,7 +132,7 @@ Box_Base::removeChild( const uno::Reference< awt::XLayoutConstrains >& xChild ) } else { - DBG_ERROR( "Box_Base: removeChild: no such child" ); + OSL_FAIL( "Box_Base: removeChild: no such child" ); } } @@ -142,7 +143,7 @@ Box_Base::getChildren() uno::Sequence< uno::Reference< awt::XLayoutConstrains > > children( maChildren.size() ); unsigned int index = 0; for ( std::list< ChildData* >::iterator it = maChildren.begin(); - it != maChildren.end(); it++, index++ ) + it != maChildren.end(); ++it, ++index ) children[index] = ( *it )->mxChild; return children; @@ -154,7 +155,7 @@ Box_Base::getChildProperties( const uno::Reference< awt::XLayoutConstrains >& xC { for ( std::list< ChildData * >::iterator it = maChildren.begin(); - it != maChildren.end(); it++) + it != maChildren.end(); ++it) { if ( ( *it )->mxChild == xChild ) { @@ -171,3 +172,5 @@ Box_Base::getChildProperties( const uno::Reference< awt::XLayoutConstrains >& xC } } // namespace layoutimpl + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/layout/core/box-base.hxx b/toolkit/source/layout/core/box-base.hxx index 685e0e35e8b6..0c0415afe622 100644 --- a/toolkit/source/layout/core/box-base.hxx +++ b/toolkit/source/layout/core/box-base.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -85,3 +86,5 @@ public: } // namespace layoutimpl #endif /* LAYOUT_CORE_BOX_BASE HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/layout/core/box.cxx b/toolkit/source/layout/core/box.cxx index a173bb5b7633..96a8b798a0ca 100644 --- a/toolkit/source/layout/core/box.cxx +++ b/toolkit/source/layout/core/box.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -98,7 +99,7 @@ Box::calculateSize( long nWidth ) mbHasFlowChildren = false; for ( std::list<Box_Base::ChildData *>::const_iterator it - = maChildren.begin(); it != maChildren.end(); it++ ) + = maChildren.begin(); it != maChildren.end(); ++it ) { ChildData *child = static_cast<Box::ChildData*> ( *it ); if ( !child->isVisible() ) @@ -140,7 +141,7 @@ Box::calculateSize( long nWidth ) if ( nWidth == 0 ) nWidth = nSecSize ? nSecSize : nFlowMinWidth; for ( std::list<Box_Base::ChildData *>::const_iterator it - = maChildren.begin(); it != maChildren.end(); it++ ) + = maChildren.begin(); it != maChildren.end(); ++it ) { ChildData *child = static_cast<Box::ChildData*> ( *it ); if ( !child->isVisible() ) @@ -191,7 +192,7 @@ Box::allocateArea( const awt::Rectangle &newArea ) int nVisibleChildren = 0, nExpandChildren = 0; for ( std::list<Box_Base::ChildData *>::const_iterator it - = maChildren.begin(); it != maChildren.end(); it++ ) + = maChildren.begin(); it != maChildren.end(); ++it ) { ChildData *child = static_cast<Box::ChildData*> ( *it ); if ( child->isVisible() ) @@ -228,7 +229,7 @@ Box::allocateArea( const awt::Rectangle &newArea ) int nBoxSecSize = SAL_MAX( 1, secDim( newSize ) - mnBorderWidth * 2 ); for ( std::list<Box_Base::ChildData *>::const_iterator it - = maChildren.begin(); it != maChildren.end(); it++ ) + = maChildren.begin(); it != maChildren.end(); ++it ) { ChildData *child = static_cast<Box::ChildData*> ( *it ); if ( !child->isVisible() ) @@ -279,3 +280,5 @@ Box::allocateArea( const awt::Rectangle &newArea ) } } // namespace layoutimpl + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/layout/core/box.hxx b/toolkit/source/layout/core/box.hxx index 9e4652a37b2f..46309a5d0b1c 100644 --- a/toolkit/source/layout/core/box.hxx +++ b/toolkit/source/layout/core/box.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -100,3 +101,5 @@ struct HBox : public Box } // namespace layoutimpl #endif /* LAYOUT_CORE_BOX_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/layout/core/byteseq.cxx b/toolkit/source/layout/core/byteseq.cxx index b49297d8b1c9..641750b52b93 100644 --- a/toolkit/source/layout/core/byteseq.cxx +++ b/toolkit/source/layout/core/byteseq.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -43,7 +44,7 @@ uno::Reference< io::XInputStream > getFileAsStream( const rtl::OUString &rName ) sFileURL = rName; // maybe it already was a file url File * blobFile = new File(sFileURL); - File::RC errorCode = blobFile->open(OpenFlag_Read); + File::RC errorCode = blobFile->open(osl_File_OpenFlag_Read); uno::Reference<io::XInputStream> xResult; switch (errorCode) @@ -74,3 +75,5 @@ uno::Reference< io::XInputStream > getFileAsStream( const rtl::OUString &rName ) } } // namespace layoutimpl + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/layout/core/container.cxx b/toolkit/source/layout/core/container.cxx index 43f837f32de5..2b59ffc0236c 100644 --- a/toolkit/source/layout/core/container.cxx +++ b/toolkit/source/layout/core/container.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -75,7 +76,7 @@ Container::allocateChildAt( const uno::Reference< awt::XLayoutConstrains > &xChi awt::PosSize::POSSIZE ); else { - DBG_ERROR( "Error: non-sizeable child" ); + OSL_FAIL( "Error: non-sizeable child" ); } } } @@ -103,10 +104,6 @@ Container::setChildParent( const uno::Reference< awt::XLayoutConstrains >& xChil if ( xContChild.is() ) { xContChild->setParent( uno::Reference< awt::XLayoutContainer >( this ) ); -#if 0 - assert( !mxLayoutUnit.is() ); - xContChild->setLayoutUnit( mxLayoutUnit ); -#endif } } @@ -117,46 +114,9 @@ Container::unsetChildParent( const uno::Reference< awt::XLayoutConstrains >& xCh if ( xContChild.is() ) { xContChild->setParent( uno::Reference< awt::XLayoutContainer >() ); -#if 0 - xContChild->setLayoutUnit( uno::Reference< awt::XLayoutUnit >() ); -#endif } } -#if 0 -std::string -Container::getLabel() // debug label -{ - std::string depth; - uno::Reference< awt::XLayoutContainer > xContainer( this ); - while ( xContainer.is() ) - { - int node = 0; // child nb - uno::Reference< awt::XLayoutContainer > xParent = xContainer->getContainerParent(); - if ( xParent.is() ) - { - - uno::Sequence< uno::Reference< awt::XLayoutConstrains > > aChildren; - aChildren = xParent->getChildren(); - for ( node = 0; node < aChildren.getLength(); node++ ) - if ( aChildren[ node ] == xContainer ) - break; - } - - char str[ 8 ]; - snprintf( str, 8, "%d", node ); - if ( depth.empty() ) - depth = std::string( str ); - else - depth = std::string( str ) + ":" + depth; - - xContainer = xParent; - } - - return std::string( getName() ) + " (" + depth + ")"; -} -#endif - void Container::propertiesChanged() { // cl: why this assertion? This is also called to set properties at the top level widget which has no parent!? @@ -167,3 +127,5 @@ void Container::propertiesChanged() } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/layout/core/container.hxx b/toolkit/source/layout/core/container.hxx index f236139fb1cb..5f53f47b8ece 100644 --- a/toolkit/source/layout/core/container.hxx +++ b/toolkit/source/layout/core/container.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -134,3 +135,5 @@ protected: } // namespace layoutimpl #endif /* LAYOUT_CORE_CONTAINER_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/layout/core/dialogbuttonhbox.cxx b/toolkit/source/layout/core/dialogbuttonhbox.cxx index 4a54fcecaf8c..9c1930600c5a 100644 --- a/toolkit/source/layout/core/dialogbuttonhbox.cxx +++ b/toolkit/source/layout/core/dialogbuttonhbox.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -34,15 +35,6 @@ #include "flow.hxx" #include "proplist.hxx" -#if TEST_LAYOUT && !defined( DBG_UTIL ) -#undef DBG_ERROR -#define DBG_ERROR OSL_TRACE -#undef DBG_ERROR1 -#define DBG_ERROR1 OSL_TRACE -#undef DBG_ERROR2 -#define DBG_ERROR2 OSL_TRACE -#endif /* TEST_LAYOUT && !DBG_UTIL */ - namespace layoutimpl { @@ -89,7 +81,7 @@ DialogButtonHBox::setOrdering( rtl::OUString const& ordering ) mnOrdering = WINDOWS; else { - DBG_ERROR1( "DialogButtonHBox: no such ordering: %s", OUSTRING_CSTR( ordering ) ); + OSL_TRACE( "DialogButtonHBox: no such ordering: %s", OUSTRING_CSTR( ordering ) ); } } @@ -184,7 +176,7 @@ DialogButtonHBox::removeChild( uno::Reference< awt::XLayoutConstrains > const& x } else { - DBG_ERROR( "DialogButtonHBox: removeChild: no such child" ); + OSL_FAIL( "DialogButtonHBox: removeChild: no such child" ); } } @@ -287,3 +279,5 @@ DialogButtonHBox::windowsOrdering() } } // namespace layoutimpl + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/layout/core/dialogbuttonhbox.hxx b/toolkit/source/layout/core/dialogbuttonhbox.hxx index b1e5ca0f6ba3..aead7fc1eb80 100644 --- a/toolkit/source/layout/core/dialogbuttonhbox.hxx +++ b/toolkit/source/layout/core/dialogbuttonhbox.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -71,3 +72,5 @@ private: } // namespace layoutimpl #endif /* LAYOUT_CORE_DIALOGBUTTONHBOX_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/layout/core/factory.cxx b/toolkit/source/layout/core/factory.cxx index 1390d9405f71..4cf442798d42 100644 --- a/toolkit/source/layout/core/factory.cxx +++ b/toolkit/source/layout/core/factory.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -60,14 +61,14 @@ void * SAL_CALL comp_Layout_component_getFactory( const char * pImplName, void * // Component registration ::rtl::OUString SAL_CALL LayoutFactory::impl_staticGetImplementationName() { - return ::rtl::OUString::createFromAscii( "com.sun.star.comp.awt.Layout" ); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.awt.Layout")); } uno::Sequence< ::rtl::OUString > SAL_CALL LayoutFactory::impl_staticGetSupportedServiceNames() { uno::Sequence< ::rtl::OUString > aRet(2); - aRet[0] = ::rtl::OUString::createFromAscii("com.sun.star.awt.Layout"); - aRet[1] = ::rtl::OUString::createFromAscii("com.sun.star.comp.awt.Layout"); + aRet[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.Layout")); + aRet[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.awt.Layout")); return aRet; } @@ -121,3 +122,5 @@ uno::Reference< uno::XInterface > SAL_CALL LayoutFactory::createInstanceWithArgu xInit->initialize( aArguments ); return layout; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/layout/core/factory.hxx b/toolkit/source/layout/core/factory.hxx index 3e2af712b961..57fca62cdca1 100644 --- a/toolkit/source/layout/core/factory.hxx +++ b/toolkit/source/layout/core/factory.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -72,3 +73,5 @@ public: }; #endif /* LAYOUT_CORE_FACTORY_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/layout/core/flow.cxx b/toolkit/source/layout/core/flow.cxx index 9a573b7487f4..7a43c8137deb 100644 --- a/toolkit/source/layout/core/flow.cxx +++ b/toolkit/source/layout/core/flow.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -43,6 +44,7 @@ Flow::Flow() : Container() , mnSpacing( 0 ) , mbHomogeneous( false ) + , mnEachWidth( 0 ) { addProp( RTL_CONSTASCII_USTRINGPARAM( "Homogeneous" ), ::getCppuType( static_cast< const sal_Bool* >( NULL ) ), @@ -78,7 +80,7 @@ Flow::removeChild( const css::uno::Reference< css::awt::XLayoutConstrains >& xCh throw (css::uno::RuntimeException) { for ( std::list< ChildData * >::iterator it = maChildren.begin(); - it != maChildren.end(); it++ ) + it != maChildren.end(); ++it ) { if ( (*it)->xChild == xChild ) { @@ -99,7 +101,7 @@ Flow::getChildren() uno::Sequence< uno::Reference< awt::XLayoutConstrains > > children( maChildren.size() ); unsigned int i = 0; for ( std::list< ChildData * >::iterator it = maChildren.begin(); - it != maChildren.end(); it++, i++ ) + it != maChildren.end(); ++it, ++i ) children[i] = (*it)->xChild; return children; @@ -120,7 +122,7 @@ Flow::calculateSize( long nMaxWidth ) std::list<ChildData *>::const_iterator it; mnEachWidth = 0; // first pass, for homogeneous property - for (it = maChildren.begin(); it != maChildren.end(); it++) + for (it = maChildren.begin(); it != maChildren.end(); ++it) { if ( !(*it)->isVisible() ) continue; @@ -130,7 +132,7 @@ Flow::calculateSize( long nMaxWidth ) } long nRowWidth = 0, nRowHeight = 0; - for (it = maChildren.begin(); it != maChildren.end(); it++) + for (it = maChildren.begin(); it != maChildren.end(); ++it) { if ( !(*it)->isVisible() ) continue; @@ -181,7 +183,7 @@ Flow::allocateArea( const css::awt::Rectangle &rArea ) std::list<ChildData *>::const_iterator it; long nX = 0, nY = 0, nRowHeight = 0; - for (it = maChildren.begin(); it != maChildren.end(); it++) + for (it = maChildren.begin(); it != maChildren.end(); ++it) { ChildData *child = *it; if ( !child->isVisible() ) @@ -207,3 +209,5 @@ Flow::allocateArea( const css::awt::Rectangle &rArea ) } } // namespace layoutimpl + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/layout/core/flow.hxx b/toolkit/source/layout/core/flow.hxx index e2b4708cf261..d1965e1ecb4f 100644 --- a/toolkit/source/layout/core/flow.hxx +++ b/toolkit/source/layout/core/flow.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -93,3 +94,5 @@ private: } // namespace layoutimpl #endif /* LAYOUT_FLOW_CORE_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/layout/core/helper.cxx b/toolkit/source/layout/core/helper.cxx index c3a9bd8b122f..0b0905011fbc 100644 --- a/toolkit/source/layout/core/helper.cxx +++ b/toolkit/source/layout/core/helper.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -37,15 +38,6 @@ #include "proplist.hxx" -#if TEST_LAYOUT && !defined( DBG_UTIL ) -#undef DBG_ERROR -#define DBG_ERROR OSL_TRACE -#undef DBG_ERROR1 -#define DBG_ERROR1 OSL_TRACE -#undef DBG_ERROR2 -#define DBG_ERROR2 OSL_TRACE -#endif /* TEST_LAYOUT && !DBG_UTIL */ - namespace layoutimpl { using namespace com::sun::star; @@ -69,26 +61,6 @@ getParent( uno::Reference< uno::XInterface > xRef ) return uno::Reference< awt::XWindowPeer >(); } -#if 0 -static uno::Reference< awt::XWindowPeer > -getToplevel( uno::Reference< uno::XInterface > xRef ) -{ - uno::Reference< awt::XWindowPeer > xTop, i; - while ( ( i = uno::Reference< awt::XWindowPeer >( xRef, uno::UNO_QUERY ) ).is() ) - { - xTop = i; - - uno::Reference< awt::XLayoutContainer > xCont( xRef, uno::UNO_QUERY ); - if ( xCont.is() ) - xRef = xCont->getParent(); - else - xRef = uno::Reference< awt::XWindowPeer >(); - } - - return xTop; -} -#endif - } #include "bin.hxx" @@ -108,21 +80,21 @@ uno::Reference <awt::XLayoutContainer> WidgetFactory::createContainer (OUString { uno::Reference< awt::XLayoutContainer > xPeer; - if ( name.equalsAscii( "hbox" ) ) + if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "hbox" ) ) ) xPeer = uno::Reference< awt::XLayoutContainer >( new HBox() ); - else if ( name.equalsAscii( "vbox" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "vbox" ) ) ) xPeer = uno::Reference< awt::XLayoutContainer >( new VBox() ); - else if ( name.equalsAscii( "table" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "table" ) ) ) xPeer = uno::Reference< awt::XLayoutContainer >( new Table() ); - else if ( name.equalsAscii( "flow" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "flow" ) ) ) xPeer = uno::Reference< awt::XLayoutContainer >( new Flow() ); - else if ( name.equalsAscii( "bin" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "bin" ) ) ) xPeer = uno::Reference< awt::XLayoutContainer >( new Bin() ); - else if ( name.equalsAscii( "min-size" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "min-size" ) ) ) xPeer = uno::Reference< awt::XLayoutContainer >( new MinSize() ); - else if ( name.equalsAscii( "align" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "align" ) ) ) xPeer = uno::Reference< awt::XLayoutContainer >( new Align() ); - else if ( name.equalsAscii( "dialogbuttonhbox" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "dialogbuttonhbox" ) ) ) xPeer = uno::Reference< awt::XLayoutContainer >( new DialogButtonHBox() ); return xPeer; @@ -141,13 +113,7 @@ uno::Reference <awt::XLayoutConstrains> WidgetFactory::toolkitCreateWidget (uno: { desc.Type = awt::WindowClass_SIMPLE; -#if 0 - // top container -- a wrapper for framewindow -- is de-coupled - // from awt::XWindowPeer. So, getParent() fails at it. - uno::Reference< awt::XWindowPeer > xWinParent = getParent( xParent ); -#else uno::Reference< awt::XWindowPeer > xWinParent( xParent, uno::UNO_QUERY ); -#endif assert( xParent.is() ); assert( xWinParent.is() ); /* @@ -164,7 +130,7 @@ uno::Reference <awt::XLayoutConstrains> WidgetFactory::toolkitCreateWidget (uno: VCLXWindow* parentComponent = VCLXWindow::GetImplementation( xWinParent ); if ( !parentComponent ) throw uno::RuntimeException( - OUString::createFromAscii( "parent has no implementation" ), + OUString(RTL_CONSTASCII_USTRINGPARAM("parent has no implementation")), uno::Reference< uno::XInterface >() ); desc.Parent = xWinParent; } @@ -192,22 +158,10 @@ uno::Reference <awt::XLayoutConstrains> WidgetFactory::toolkitCreateWidget (uno: } catch( uno::Exception & ) { - DBG_ERROR1( "Warning: %s is not a recognized type\n", OUSTRING_CSTR( name ) ); + OSL_TRACE( "Warning: %s is not a recognized type\n", OUSTRING_CSTR( name ) ); return uno::Reference< awt::XLayoutConstrains >(); } -#if 0 // This shadows the show="false" property and seems otherwise - // unnecessary - - // default to visible, let then people change it on properties - if ( ! bToplevel ) - { - uno::Reference< awt::XWindow> xWindow( xPeer, uno::UNO_QUERY ); - if ( xWindow.is() ) - xWindow->setVisible( true ); - } -#endif - return xPeer; } @@ -228,8 +182,8 @@ WidgetFactory::createWidget (uno::Reference< awt::XToolkit > xToolkit, uno::Refe #if FIXED_INFO OUString tName = name; // FIXME - if ( name.equalsAscii( "fixedinfo" ) ) - tName = OUString::createFromAscii( "fixedtext" ); + if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "fixedinfo" ) ) ) + tName = OUString(RTL_CONSTASCII_USTRINGPARAM("fixedtext")); xPeer = toolkitCreateWidget (xToolkit, xParent, tName, properties); #else xPeer = toolkitCreateWidget (xToolkit, xParent, name, properties); @@ -324,25 +278,6 @@ PropHelper::getFastPropertyValue( uno::Any& rValue, { OSL_ASSERT( nHandle >= 0 && nHandle < (sal_Int32) maDetails.size() ); const PropDetails &rInfo = maDetails[ nHandle ]; -#if 0 - switch ( rInfo.aType.getTypeClass() ) - { -#define MAP(classtype,ctype) \ - case uno::TypeClass_##classtype: \ - rValue <<= *(ctype *)(rInfo.pValue); \ - break - MAP( DOUBLE, double ); - MAP( SHORT, sal_Int16 ); - MAP( LONG, sal_Int32 ); - MAP( UNSIGNED_SHORT, sal_uInt16 ); - MAP( UNSIGNED_LONG, sal_uInt32 ); - MAP( STRING, ::rtl::OUString ); - default: - DBG_ERROR( "ERROR: unknown type to map!" ); - break; - } -#undef MAP -#endif rValue.setValue( rInfo.pValue, rInfo.aType ); } @@ -444,7 +379,7 @@ Window* WidgetFactory::layoutCreateWindow (VCLXWindow** component, Window *paren { ; } - if ( name.equalsAscii( "dialog" ) ) + if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "dialog" ) ) ) { if ( parent == NULL ) parent = DIALOG_NO_PARENT; @@ -453,7 +388,7 @@ Window* WidgetFactory::layoutCreateWindow (VCLXWindow** component, Window *paren attributes ^= awt::WindowAttribute::SHOW; } - else if ( name.equalsAscii( "modaldialog" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "modaldialog" ) ) ) { if ( parent == NULL ) parent = DIALOG_NO_PARENT; @@ -462,7 +397,7 @@ Window* WidgetFactory::layoutCreateWindow (VCLXWindow** component, Window *paren attributes ^= awt::WindowAttribute::SHOW; } - else if ( name.equalsAscii( "modelessdialog" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "modelessdialog" ) ) ) { if ( parent == NULL ) parent = DIALOG_NO_PARENT; @@ -471,7 +406,7 @@ Window* WidgetFactory::layoutCreateWindow (VCLXWindow** component, Window *paren attributes ^= awt::WindowAttribute::SHOW; } - else if ( name.equalsAscii( "sfxdialog" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "sfxdialog" ) ) ) { if ( parent == NULL ) parent = DIALOG_NO_PARENT; @@ -480,7 +415,7 @@ Window* WidgetFactory::layoutCreateWindow (VCLXWindow** component, Window *paren attributes ^= awt::WindowAttribute::SHOW; } - else if ( name.equalsAscii( "sfxmodaldialog" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "sfxmodaldialog" ) ) ) { if ( parent == NULL ) parent = DIALOG_NO_PARENT; @@ -490,7 +425,7 @@ Window* WidgetFactory::layoutCreateWindow (VCLXWindow** component, Window *paren attributes ^= awt::WindowAttribute::SHOW; } - else if ( name.equalsAscii( "sfxmodelessdialog" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "sfxmodelessdialog" ) ) ) { if ( parent == NULL ) parent = DIALOG_NO_PARENT; @@ -499,95 +434,95 @@ Window* WidgetFactory::layoutCreateWindow (VCLXWindow** component, Window *paren attributes ^= awt::WindowAttribute::SHOW; } - else if ( name.equalsAscii( "tabcontrol" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "tabcontrol" ) ) ) { window = new TabControl( parent, ImplGetWinBits( attributes, WINDOW_TABCONTROL ) ); *component = new layoutimpl::VCLXTabControl(); } - else if ( name.equalsAscii( "scroller" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "scroller" ) ) ) { // used FixedImage because I just want some empty non-intrusive widget window = new FixedImage( parent, ImplGetWinBits( attributes, 0 ) ); *component = new layoutimpl::VCLXScroller(); } - else if ( name.equalsAscii( "hsplitter" ) || name.equalsAscii( "vsplitter" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "hsplitter" ) ) || name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "vsplitter" ) ) ) { window = new FixedImage( parent, ImplGetWinBits( attributes, 0 ) ); - *component = new layoutimpl::VCLXSplitter( name.equalsAscii( "hsplitter" ) ); + *component = new layoutimpl::VCLXSplitter( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "hsplitter" ) ) ); } - else if ( name.equalsAscii( "hfixedline" ) || name.equalsAscii( "vfixedline" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "hfixedline" ) ) || name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "vfixedline" ) ) ) { WinBits nStyle = ImplGetWinBits( attributes, 0 ); nStyle ^= WB_HORZ; - if ( name.equalsAscii( "hfixedline" ) ) + if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "hfixedline" ) ) ) nStyle |= WB_HORZ; else nStyle |= WB_VERT; window = new FixedLine( parent, nStyle ); *component = new layoutimpl::VCLXFixedLine(); } - else if ( name.equalsAscii( "okbutton" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "okbutton" ) ) ) { window = new PushButton( parent, ImplGetWinBits( attributes, 0 ) ); *component = new layoutimpl::VCLXOKButton( window ); window->SetType (WINDOW_OKBUTTON); } - else if ( name.equalsAscii( "cancelbutton" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "cancelbutton" ) ) ) { window = new PushButton( parent, ImplGetWinBits( attributes, 0 ) ); *component = new layoutimpl::VCLXCancelButton( window ); window->SetType (WINDOW_CANCELBUTTON); } - else if ( name.equalsAscii( "yesbutton" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "yesbutton" ) ) ) { window = new PushButton( parent, ImplGetWinBits( attributes, 0 ) ); *component = new layoutimpl::VCLXYesButton( window ); window->SetType (WINDOW_OKBUTTON); } - else if ( name.equalsAscii( "nobutton" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "nobutton" ) ) ) { window = new PushButton( parent, ImplGetWinBits( attributes, 0 ) ); window->SetType (WINDOW_CANCELBUTTON); *component = new layoutimpl::VCLXNoButton( window ); } - else if ( name.equalsAscii( "retrybutton" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "retrybutton" ) ) ) { window = new PushButton( parent, ImplGetWinBits( attributes, 0 ) ); *component = new layoutimpl::VCLXRetryButton( window ); } - else if ( name.equalsAscii( "ignorebutton" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ignorebutton" ) ) ) { window = new PushButton( parent, ImplGetWinBits( attributes, 0 ) ); *component = new layoutimpl::VCLXIgnoreButton( window ); } - else if ( name.equalsAscii( "resetbutton" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "resetbutton" ) ) ) { window = new PushButton( parent, ImplGetWinBits( attributes, 0 ) ); *component = new layoutimpl::VCLXResetButton( window ); } - else if ( name.equalsAscii( "applybutton" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "applybutton" ) ) ) { window = new PushButton( parent, ImplGetWinBits( attributes, 0 ) ); *component = new layoutimpl::VCLXApplyButton( window ); } - else if ( name.equalsAscii( "helpbutton" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "helpbutton" ) ) ) { window = new PushButton( parent, ImplGetWinBits( attributes, 0 ) ); *component = new layoutimpl::VCLXHelpButton( window ); window->SetType (WINDOW_HELPBUTTON); } - else if ( name.equalsAscii( "morebutton" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "morebutton" ) ) ) { window = new PushButton( parent, ImplGetWinBits( attributes, 0 ) ); *component = new layoutimpl::VCLXMoreButton( window ); window->SetType (WINDOW_MOREBUTTON); } - else if ( name.equalsAscii( "advancedbutton" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "advancedbutton" ) ) ) { window = new PushButton( parent, ImplGetWinBits( attributes, 0 ) ); *component = new layoutimpl::VCLXAdvancedButton( window ); } - else if ( name.equalsAscii( "plugin" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "plugin" ) ) ) { window = new Control( parent, ImplGetWinBits( attributes, 0 ) ); #ifndef __SUNPRO_CC @@ -595,16 +530,11 @@ Window* WidgetFactory::layoutCreateWindow (VCLXWindow** component, Window *paren #endif *component = new layoutimpl::VCLXPlugin( window, ImplGetWinBits( attributes, 0 ) ); } - else if ( name.equalsAscii( "tabpage" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "tabpage" ) ) ) { -#if 0 - if ( !parent ) - parent = layout::TabPage::global_parent; -#else if (layout::TabPage::global_parent) parent = layout::TabPage::global_parent; layout::TabPage::global_parent = 0; -#endif //window = new TabPage( parent, ImplGetWinBits( attributes, 0 ) ); attributes ^= awt::WindowAttribute::SHOW; WinBits nStyle = ImplGetWinBits( attributes, 0 ); @@ -621,22 +551,15 @@ Window* WidgetFactory::layoutCreateWindow (VCLXWindow** component, Window *paren *component = new VCLXTabPage( window ); } } - else if ( name.equalsAscii( "string" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "string" ) ) ) { // FIXME: move <string>s.text to simple map<string> in root? attributes &= ~awt::WindowAttribute::SHOW; window = new Window( parent, ImplGetWinBits( attributes, 0 ) ); *component = new layoutimpl::LocalizedString(); } -#if 0 // parent paranoia - else if ( name.equalsAscii( "listbox" ) ) - { - window = new ListBox (parent, ImplGetWinBits (attributes, 0)); - *component = new VCLXListBox (); - } -#endif - else if (name.equalsAscii ("svxfontlistbox") - || name.equalsAscii ("svxlanguagebox")) + else if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("svxfontlistbox")) + || name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("svxlanguagebox"))) { window = new ListBox (parent, ImplGetWinBits (attributes, 0)); *component = new VCLXListBox (); @@ -663,10 +586,12 @@ uno::Reference< graphic::XGraphic > loadGraphic( const char *pName ) if ( aStr.compareToAscii( ".uno:" ) == 0 ) aStr = aStr.copy( 5 ).toAsciiLowerCase(); - if ( !vcl::ImageRepository::loadImage( OUString::createFromAscii( pName ), aBmp, true ) ) + if ( !vcl::ImageRepository::loadImage( OUString::createFromAscii( pName ), aBmp, true, true ) ) return uno::Reference< graphic::XGraphic >(); return Graphic( aBmp ).GetXGraphic(); } } // namespace layoutimpl + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/layout/core/helper.hxx b/toolkit/source/layout/core/helper.hxx index 2fac41ebc493..cd91a19aa88d 100644 --- a/toolkit/source/layout/core/helper.hxx +++ b/toolkit/source/layout/core/helper.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -147,3 +148,5 @@ css::uno::Reference< css::graphic::XGraphic > loadGraphic( const char *pName ); } // end namespace layoutimpl #endif /* LAYOUT_CORE_HELPER_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/layout/core/import.cxx b/toolkit/source/layout/core/import.cxx index 84e46f5b68f1..5114ca586a74 100644 --- a/toolkit/source/layout/core/import.cxx +++ b/toolkit/source/layout/core/import.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -106,7 +107,7 @@ SAL_THROW (()) } // DEBUG: else if ( pParent == NULL ) { - DBG_ERROR( "Fatal error: top node isn't a dialog" ); + OSL_FAIL( "Fatal error: top node isn't a dialog" ); } OUString aOrdering; @@ -128,7 +129,7 @@ SAL_THROW (()) if ( xRadio.is() ) { if (!bSetRadioGroup) - aRadioGroup = OUString::createFromAscii ("default"); + aRadioGroup = OUString(RTL_CONSTASCII_USTRINGPARAM ("default")); pImport->mxRadioGroups.addItem( aRadioGroup, xRadio ); } } @@ -149,7 +150,7 @@ WidgetElement::startChildElement ( sal_Int32 nUid, OUString const &name, if ( !mpWidget->addChild( pChild->mpWidget ) ) { - DBG_ERROR2( "ERROR: cannot add %s to container %s, container full", OUSTRING_CSTR( name ), OUSTRING_CSTR( getLocalName() ) ); + OSL_TRACE( "ERROR: cannot add %s to container %s, container full", OUSTRING_CSTR( name ), OUSTRING_CSTR( getLocalName() ) ); throw xml::sax::SAXException(); } @@ -173,9 +174,9 @@ WidgetElement::characters( OUString const& rChars ) if ( xDialog.is() ) xDialog->setTitle( rChars ); else if ( xButton.is() ) - mpWidget->setProperty( OUString::createFromAscii( "label" ), rChars ); + mpWidget->setProperty( OUString(RTL_CONSTASCII_USTRINGPARAM("label")), rChars ); else - mpWidget->setProperty( OUString::createFromAscii( "text" ), rChars ); + mpWidget->setProperty( OUString(RTL_CONSTASCII_USTRINGPARAM("text")), rChars ); } } // ---- ElementBase ---- @@ -287,7 +288,7 @@ void RadioGroups::RadioGroup::handleSelected () throw (uno::RuntimeException) { for ( RadioButtonsList::iterator it = mxRadios.begin(); - it != mxRadios.end(); it++ ) + it != mxRadios.end(); ++it ) if ( *it != mxSelectedRadio && (*it)->getState() ) { mxSelectedRadio->setState( false ); @@ -323,3 +324,5 @@ void SAL_CALL RadioGroups::RadioGroup::disposing( const lang::EventObject& ) } } // namespace layoutimpl + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/layout/core/import.hxx b/toolkit/source/layout/core/import.hxx index 7af8f16eb5d3..dc86ba006070 100644 --- a/toolkit/source/layout/core/import.hxx +++ b/toolkit/source/layout/core/import.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -31,7 +32,7 @@ #include <map> #include <list> #define _BACKWARD_BACKWARD_WARNING_H 1 -#include <hash_map> +#include <boost/unordered_map.hpp> #include <com/sun/star/xml/input/XRoot.hpp> @@ -88,54 +89,6 @@ private: RadioGroupsMap mxRadioGroups; }; -#if 0 -// generator -class Widget -{ -public: - Widget( css::uno::Reference< css::awt::XToolkit > xToolkit, - css::uno::Reference< css::awt::XWindow > xToplevel, - rtl::OUString unoName, long attrbs ); - virtual ~Widget(); - - virtual void setProperties( const PropList &rProps ); - - virtual bool addChild( Widget *pChild ); - virtual void setChildProperties( Widget *pChild, const PropList &rProps ); - - inline css::uno::Reference< css::awt::XLayoutConstrains > getPeer() - { return mxWidget; } - - inline css::uno::Reference< css::awt::XLayoutConstrains > getContainer() - { return mxContainer; } - -protected: - css::uno::Reference< css::awt::XLayoutConstrains > mxWidget; - css::uno::Reference< css::awt::XLayoutContainer > mxContainer; -}; - -class Root -{ -public: - Root( css::uno::Reference< css::awt::XToolkit > xToolkit ) - : mxToolkit( xToolkit ) {} - ~Root(); - - virtual Widget *create( rtl::OUString id, const rtl::OUString unoName, long attrbs ); - - css::uno::Reference< css::awt::XLayoutConstrains > getById( rtl::OUString id ); - inline css::uno::Reference< css::awt::XLayoutConstrains > getToplevel(); - -protected: - css::uno::Reference< css::awt::XToolkit > mxToolkit; - Widget *mpToplevel; - - typedef std::hash_map< rtl::OUString, css::uno::Reference< css::awt::XLayoutConstrains >, - rtl::OUStringHash > ItemHash; - ItemHash maItems; -}; -#endif - // parser class ImportContext : public ::cppu::WeakImplHelper1< css::xml::input::XRoot > { @@ -257,3 +210,5 @@ public: } // namespace layoutimpl #endif /* LAYOUT_CORE_IMPORT_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/layout/core/localized-string.cxx b/toolkit/source/layout/core/localized-string.cxx index bbf067011f6b..e555817cef54 100644 --- a/toolkit/source/layout/core/localized-string.cxx +++ b/toolkit/source/layout/core/localized-string.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -29,6 +30,7 @@ #include <toolkit/helper/property.hxx> #include <vcl/window.hxx> +#include <vcl/svapp.hxx> namespace layoutimpl { @@ -60,7 +62,7 @@ uno::Any LocalizedString::queryInterface( uno::Type const& rType ) void LocalizedString::setText( OUString const& s ) throw(uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if ( Window *w = GetWindow() ) return w->SetText( s ); @@ -69,7 +71,7 @@ void LocalizedString::setText( OUString const& s ) OUString LocalizedString::getText() throw(uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if ( Window *w = GetWindow() ) return w->GetText(); @@ -77,3 +79,5 @@ OUString LocalizedString::getText() } } // namespace layoutimpl + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/layout/core/localized-string.hxx b/toolkit/source/layout/core/localized-string.hxx index a6310336ceb6..d8a4f7a89369 100644 --- a/toolkit/source/layout/core/localized-string.hxx +++ b/toolkit/source/layout/core/localized-string.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -74,3 +75,5 @@ public: } // namespace layoutimpl #endif /* LAYOUT_CORE_LOCALIZED_STRING_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/layout/core/precompiled_xmlscript.hxx b/toolkit/source/layout/core/precompiled_xmlscript.hxx index 0fc538151348..0be98395c1ea 100644 --- a/toolkit/source/layout/core/precompiled_xmlscript.hxx +++ b/toolkit/source/layout/core/precompiled_xmlscript.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -33,3 +34,5 @@ It would be nice to modify xml_byteseq.cxx making it friendlier to include. */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/layout/core/proplist.cxx b/toolkit/source/layout/core/proplist.cxx index 7cd27473a8c7..99e35941e6f4 100644 --- a/toolkit/source/layout/core/proplist.cxx +++ b/toolkit/source/layout/core/proplist.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -37,15 +38,6 @@ #include "helper.hxx" -#if TEST_LAYOUT && !defined( DBG_UTIL ) -#undef DBG_ERROR -#define DBG_ERROR OSL_TRACE -#undef DBG_ERROR1 -#define DBG_ERROR1 OSL_TRACE -#undef DBG_ERROR2 -#define DBG_ERROR2 OSL_TRACE -#endif /* TEST_LAYOUT && !DBG_UTIL */ - namespace layoutimpl { @@ -192,14 +184,14 @@ uno::Any anyFromString( OUString const& value, uno::Type const& type ) uno::Sequence< OUString > seq( values.size() ); i = 0; for ( std::list< OUString >::const_iterator it = values.begin(); - it != values.end(); it++, i++ ) + it != values.end(); ++it, ++i ) seq[ i ] = *it; return uno::makeAny( seq ); } default: - DBG_ERROR1( "ERROR: unknown property type of value: `%s'\n", OUSTRING_CSTR( value ) ); + OSL_TRACE( "ERROR: unknown property type of value: `%s'\n", OUSTRING_CSTR( value ) ); break; } throw uno::RuntimeException(); @@ -245,17 +237,17 @@ setProperties( uno::Reference< uno::XInterface > const& xPeer, { if ( !prophlp::canHandleProps( xPeer ) ) { - DBG_ERROR( "Error: setProperties - bad handle ignoring props:\n" ); + OSL_FAIL( "Error: setProperties - bad handle ignoring props:\n" ); for ( PropList::const_iterator it = rProps.begin(); it != rProps.end(); - it++ ) + ++it ) { - DBG_ERROR2( "%s=%s\n", OUSTRING_CSTR( it->first ), OUSTRING_CSTR( it->second ) ); + OSL_TRACE( "%s=%s\n", OUSTRING_CSTR( it->first ), OUSTRING_CSTR( it->second ) ); } return; } for ( PropList::const_iterator it = rProps.begin(); it != rProps.end(); - it++ ) + ++it ) setProperty( xPeer, it->first, it->second ); } @@ -276,13 +268,13 @@ setProperty( uno::Reference< uno::XInterface > const& xPeer, } catch( beans::UnknownPropertyException & ) { - DBG_ERROR1( "Warning: unknown attribute: `%s'\n", OUSTRING_CSTR( unoAttr ) ); + OSL_TRACE( "Warning: unknown attribute: `%s'\n", OUSTRING_CSTR( unoAttr ) ); return; } if ( prop.Name.getLength() <= 0 ) { - DBG_ERROR1( "Warning: missing prop: `%s'\n", OUSTRING_CSTR( unoAttr ) ); + OSL_TRACE( "Warning: missing prop: `%s'\n", OUSTRING_CSTR( unoAttr ) ); return; } @@ -294,7 +286,7 @@ setProperty( uno::Reference< uno::XInterface > const& xPeer, } catch( uno::RuntimeException & ) { - DBG_ERROR5( "Warning: %s( %s )( %s ) attribute is of type %s( rejected: %s )\n", OUSTRING_CSTR( unoAttr ), OUSTRING_CSTR( value ), OUSTRING_CSTR( prop.Name ), OUSTRING_CSTR( prop.Type.getTypeName() ), OUSTRING_CSTR( value ) ); + OSL_TRACE( "Warning: %s( %s )( %s ) attribute is of type %s( rejected: %s )\n", OUSTRING_CSTR( unoAttr ), OUSTRING_CSTR( value ), OUSTRING_CSTR( prop.Name ), OUSTRING_CSTR( prop.Type.getTypeName() ), OUSTRING_CSTR( value ) ); return; } @@ -305,7 +297,7 @@ setProperty( uno::Reference< uno::XInterface > const& xPeer, } catch( ... ) { - DBG_ERROR2( "Warning: cannot set attribute %s to %s \n", OUSTRING_CSTR( unoAttr ), OUSTRING_CSTR( value ) ); + OSL_TRACE( "Warning: cannot set attribute %s to %s \n", OUSTRING_CSTR( unoAttr ), OUSTRING_CSTR( value ) ); } } @@ -348,31 +340,6 @@ static const AttributesMap attribsMap[] = }; static const int attribsMapLen = sizeof( attribsMap ) / sizeof( AttributesMap ); -#if 0 -long getAttribute( const OUString &rName, bool bTopWindow ) -{ - - int min = 0, max = attribsMapLen - 1, mid, cmp; - do - { - mid = min +( max - min )/2; - cmp = rName.compareToAscii( attribsMap[ mid ].name ); - if ( cmp > 0 ) - min = mid+1; - else if ( cmp < 0 ) - max = mid-1; - else - { - if ( bTopWindow || attribsMap[ mid ].value ) - return attribsMap[ mid ].windowAttr; - return 0; - } - } - while ( min <= max ); - return 0; -} -#endif - void propsFromAttributes( const uno::Reference<xml::input::XAttributes> & xAttributes, PropList &rProps, sal_Int32 nNamespace ) { @@ -397,10 +364,10 @@ findAndRemove( const char *pAttr, PropList &rProps, OUString &rValue ) PropList::iterator it; OUString aName = OUString::createFromAscii( pAttr ); - for ( it = rProps.begin(); it != rProps.end(); it++ ) + for ( it = rProps.begin(); it != rProps.end(); ++it ) { if ( it->first.equalsIgnoreAsciiCase( aName ) - || it->first.equalsIgnoreAsciiCase( OUString::createFromAscii ("_") + aName ) ) + || it->first.equalsIgnoreAsciiCase( OUString(RTL_CONSTASCII_USTRINGPARAM ("_")) + aName ) ) { rValue = it->second; rProps.erase( it ); @@ -452,3 +419,4 @@ getAttributeProps( PropList &rProps ) } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/layout/core/proplist.hxx b/toolkit/source/layout/core/proplist.hxx index 6a98cf449df3..fafd45059552 100644 --- a/toolkit/source/layout/core/proplist.hxx +++ b/toolkit/source/layout/core/proplist.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -89,3 +90,5 @@ inline char const* OUSTRING_CSTR( rtl::OUString const& str ) #endif #endif /* LAYOUT_CORE_PROPLIST_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/layout/core/root.cxx b/toolkit/source/layout/core/root.cxx index af56e77f9aac..6a3ebe85e836 100644 --- a/toolkit/source/layout/core/root.cxx +++ b/toolkit/source/layout/core/root.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -79,7 +80,7 @@ LayoutRoot::~LayoutRoot() void ShowMessageBox( uno::Reference< lang::XMultiServiceFactory > const& xFactory, uno::Reference< awt::XToolkit > xToolkit, OUString const& aTitle, OUString const& aMessage ) { uno::Reference< uno::XInterface > iDesktop = xFactory->createInstance - ( OUString::createFromAscii( "com.sun.star.frame.Desktop" ) ); + ( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop")) ); uno::Reference< frame::XDesktop > xDesktop ( iDesktop, uno::UNO_QUERY ); uno::Reference< frame::XFrame > xFrame ( xDesktop->getCurrentFrame() ); uno::Reference< awt::XWindow > xContainerWindow( xFrame->getContainerWindow() ); @@ -89,7 +90,7 @@ void ShowMessageBox( uno::Reference< lang::XMultiServiceFactory > const& xFactor awt::Rectangle aRectangle; uno::Reference< awt::XMessageBox > xMessageBox = xMessageBoxFactory->createMessageBox - ( xWindowPeer, aRectangle, OUString::createFromAscii( "errorbox" ), + ( xWindowPeer, aRectangle, OUString(RTL_CONSTASCII_USTRINGPARAM("errorbox")), awt::MessageBoxButtons::BUTTONS_OK, aTitle, aMessage ); if ( xMessageBox.is() ) @@ -103,7 +104,7 @@ void LayoutRoot::error( OUString const& message ) { OSL_TRACE( "%s\n", OUSTRING_CSTR( message ) ); ShowMessageBox( mxFactory, mxToolkit, - OUString::createFromAscii( "Fatal error" ), + OUString(RTL_CONSTASCII_USTRINGPARAM("Fatal error")), message ); throw uno::RuntimeException( message, uno::Reference< uno::XInterface >() ); } @@ -132,13 +133,13 @@ void SAL_CALL LayoutRoot::initialize( const uno::Sequence< uno::Any >& aArgument uno::Reference< xml::sax::XParser > xParser ( mxFactory->createInstance( - OUString::createFromAscii( "com.sun.star.xml.sax.Parser" ) ), + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Parser")) ), uno::UNO_QUERY ); OSL_ASSERT( xParser.is() ); if (! xParser.is()) { throw uno::RuntimeException( - OUString::createFromAscii( "cannot create sax-parser component" ), + OUString(RTL_CONSTASCII_USTRINGPARAM("cannot create sax-parser component")), uno::Reference< uno::XInterface >() ); } @@ -147,18 +148,18 @@ void SAL_CALL LayoutRoot::initialize( const uno::Sequence< uno::Any >& aArgument mxToolkit = uno::Reference< awt::XToolkit >( mxFactory->createInstance( - OUString::createFromAscii( "com.sun.star.awt.Toolkit" ) ), + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.Toolkit")) ), uno::UNO_QUERY ); if ( !mxToolkit.is() ) throw uno::RuntimeException( - OUString::createFromAscii( "failed to create toolkit!" ), + OUString(RTL_CONSTASCII_USTRINGPARAM("failed to create toolkit!")), uno::Reference< uno::XInterface >() ); OUString aXMLFile = readRightTranslation( aXMLName ); uno::Reference< io::XInputStream > xStream = getFileAsStream( aXMLFile ); if (! xStream.is() ) - error( OUString::createFromAscii( "Installation problem: cannot find XML file:" ) + aXMLName ); + error( OUString(RTL_CONSTASCII_USTRINGPARAM("Installation problem: cannot find XML file:")) + aXMLName ); // error handler, entity resolver omitted @@ -169,17 +170,17 @@ void SAL_CALL LayoutRoot::initialize( const uno::Sequence< uno::Any >& aArgument aArgs[0] <<= xRoot; uno::Reference< xml::sax::XDocumentHandler > xDocHandler (mxFactory->createInstanceWithArguments - ( OUString::createFromAscii( "com.sun.star.xml.input.SaxDocumentHandler" ), + ( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.input.SaxDocumentHandler")), aArgs ), uno::UNO_QUERY ); if (! xDocHandler.is() ) - error( OUString::createFromAscii( "cannot find SAx handler for document type of:") + aXMLName ); + error( OUString(RTL_CONSTASCII_USTRINGPARAM("cannot find SAx handler for document type of:")) + aXMLName ); xParser->setDocumentHandler( xDocHandler ); xml::sax::InputSource source; source.aInputStream = xStream; - source.sSystemId = OUString::createFromAscii( "virtual file" ); + source.sSystemId = OUString(RTL_CONSTASCII_USTRINGPARAM("virtual file")); try { @@ -187,11 +188,11 @@ void SAL_CALL LayoutRoot::initialize( const uno::Sequence< uno::Any >& aArgument } catch ( xml::sax::SAXParseException& e ) { - OUString c = OUString::createFromAscii( ":" ); + OUString c(RTL_CONSTASCII_USTRINGPARAM(":")); error( aXMLName + c + OUString::valueOf( e.LineNumber ) + c + OUString::valueOf( e.ColumnNumber ) - + c + OUString::createFromAscii( "Sax parse error" ) ); + + c + OUString(RTL_CONSTASCII_USTRINGPARAM("Sax parse error")) ); } } @@ -245,7 +246,7 @@ uno::Sequence< OUString > SAL_CALL LayoutRoot::getElementNames() sal_Int32 nPos = 0; for ( ItemHash::const_iterator it = maItems.begin(); - it != maItems.end(); it++ ) + it != maItems.end(); ++it ) aNames[ nPos++ ] = it->first; return aNames; @@ -329,24 +330,6 @@ LayoutWidget *LayoutRoot::create( OUString id, const OUString unoName, long attr return pWidget; } -#if 0 -uno::Reference< awt::XLayoutConstrains > LayoutRoot::getToplevel() -{ - if ( mpToplevel ) - return mpToplevel->getPeer(); - return uno::Reference< awt::XLayoutConstrains > (); -} - -uno::Reference< awt::XLayoutConstrains > LayoutRoot::getById( OUString id ) -{ - uno::Reference< awt::XLayoutConstrains > rRef = 0; - ItemHash::iterator it = maItems.find( id ); - if ( it != maItems.end() ) - rRef = it->second; - return rRef; -} -#endif - LayoutWidget::LayoutWidget( uno::Reference< awt::XToolkit > xToolkit, uno::Reference< awt::XLayoutContainer > xParent, OUString unoName, long attrbs ) @@ -407,3 +390,4 @@ void LayoutWidget::setChildProperties( LayoutWidget *pChild, } // namespace layoutimpl +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/layout/core/root.hxx b/toolkit/source/layout/core/root.hxx index 321c891bbe50..8254f1b46b38 100644 --- a/toolkit/source/layout/core/root.hxx +++ b/toolkit/source/layout/core/root.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -29,7 +30,7 @@ #define LAYOUT_CORE_ROOT_HXX #define _BACKWARD_BACKWARD_WARNING_H 1 -#include <hash_map> +#include <boost/unordered_map.hpp> #include <com/sun/star/awt/XLayoutRoot.hpp> #include <com/sun/star/awt/XToolkit.hpp> @@ -72,7 +73,7 @@ class TOOLKIT_DLLPUBLIC LayoutRoot : public ::cppu::WeakImplHelper3< protected: ::osl::Mutex maMutex; - typedef std::hash_map< rtl::OUString, + typedef boost::unordered_map< rtl::OUString, css::uno::Reference< css::awt::XLayoutConstrains >, ::rtl::OUStringHash > ItemHash; ItemHash maItems; @@ -154,3 +155,5 @@ protected: } // namespace layoutimpl #endif /* LAYOUT_CORE_ROOT_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/layout/core/table.cxx b/toolkit/source/layout/core/table.cxx index 48156b1d730e..53faefff1271 100644 --- a/toolkit/source/layout/core/table.cxx +++ b/toolkit/source/layout/core/table.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -124,7 +125,7 @@ Table::getMinimumSize() throw( uno::RuntimeException ) int col = 0; int row = 0; for ( std::list<Box_Base::ChildData *>::iterator it - = maChildren.begin(); it != maChildren.end(); it++ ) + = maChildren.begin(); it != maChildren.end(); ++it ) { ChildData *child = static_cast<Table::ChildData*> ( *it ); if ( !child->isVisible() ) @@ -171,7 +172,7 @@ Table::getMinimumSize() throw( uno::RuntimeException ) // 2.1 base sizes on one-column/row children for ( std::list<Box_Base::ChildData *>::iterator it - = maChildren.begin(); it != maChildren.end(); it++ ) + = maChildren.begin(); it != maChildren.end(); ++it ) { ChildData *child = static_cast<Table::ChildData*> ( *it ); if ( !child->isVisible() ) @@ -194,7 +195,7 @@ Table::getMinimumSize() throw( uno::RuntimeException ) // 2.2 make sure multiple-columns/rows children fit for ( std::list<Box_Base::ChildData *>::iterator it - = maChildren.begin(); it != maChildren.end(); it++ ) + = maChildren.begin(); it != maChildren.end(); ++it ) { ChildData *child = static_cast<Table::ChildData*> ( *it ); if ( !child->isVisible() ) @@ -236,14 +237,14 @@ Table::getMinimumSize() throw( uno::RuntimeException ) mnColExpandables =( mnRowExpandables = 0 ); maRequisition.Width =( maRequisition.Height = 0 ); for ( std::vector<GroupData>::iterator it = maCols.begin(); - it != maCols.end(); it++ ) + it != maCols.end(); ++it ) { maRequisition.Width += it->mnSize; if ( it->mbExpand ) mnColExpandables++; } for ( std::vector<GroupData>::iterator it = maRows.begin(); - it != maRows.end(); it++ ) + it != maRows.end(); ++it ) { maRequisition.Height += it->mnSize; if ( it->mbExpand ) @@ -268,7 +269,7 @@ Table::allocateArea( const awt::Rectangle &rArea ) nExtraSize[ 1 ] /= mnRowExpandables ? mnRowExpandables : maRows.size(); for ( std::list<Box_Base::ChildData *>::const_iterator it - = maChildren.begin(); it != maChildren.end(); it++ ) + = maChildren.begin(); it != maChildren.end(); ++it ) { ChildData *child = static_cast<Table::ChildData*> ( *it ); if ( !child->isVisible() ) @@ -309,3 +310,5 @@ Table::allocateArea( const awt::Rectangle &rArea ) } } // namespace layoutimpl + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/layout/core/table.hxx b/toolkit/source/layout/core/table.hxx index dd05eba38c41..30e7f24540b7 100644 --- a/toolkit/source/layout/core/table.hxx +++ b/toolkit/source/layout/core/table.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -100,3 +101,5 @@ public: } // namespace layoutimpl #endif /* LAYOUT_CORE_TABLE_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/layout/core/timer.cxx b/toolkit/source/layout/core/timer.cxx index f0975fd3f76b..279c0ea7f172 100644 --- a/toolkit/source/layout/core/timer.cxx +++ b/toolkit/source/layout/core/timer.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -69,7 +70,7 @@ public: if ( it != jt && isParentOf( *it, *jt ) ) jt = list.erase( jt ); else - jt++; + ++jt; } } @@ -97,12 +98,12 @@ public: // 1. remove duplications and children for ( ContainerList::iterator it = mxContainers.begin(); - it != mxContainers.end(); it++ ) + it != mxContainers.end(); ++it ) eraseChildren( it, mxContainers ); // 2. check damage extent for ( ContainerList::iterator it = mxContainers.begin(); - it != mxContainers.end(); it++ ) + it != mxContainers.end(); ++it ) { uno::Reference< awt::XLayoutContainer > xContainer = *it; while ( xContainer->getParent().is() && isContainerDamaged( xContainer ) ) @@ -123,7 +124,7 @@ public: // 3. force re-calculations for ( ContainerList::iterator it = mxContainers.begin(); - it != mxContainers.end(); it++ ) + it != mxContainers.end(); ++it ) (*it)->allocateArea( (*it)->getAllocatedArea() ); } }; @@ -146,3 +147,5 @@ void SAL_CALL LayoutUnit::queueResize( const uno::Reference< awt::XLayoutContain } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/layout/core/timer.hxx b/toolkit/source/layout/core/timer.hxx index f8432141c2f1..8be521e634f3 100644 --- a/toolkit/source/layout/core/timer.hxx +++ b/toolkit/source/layout/core/timer.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -47,3 +48,5 @@ public: } #endif /* LAYOUT_CORE_TIMER_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/layout/core/translate.cxx b/toolkit/source/layout/core/translate.cxx index fa09d02190d2..8cff68364cfa 100644 --- a/toolkit/source/layout/core/translate.cxx +++ b/toolkit/source/layout/core/translate.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -53,19 +54,19 @@ static std::list<OUString> getLocaleSubdirList( lang::Locale const& rLocale ) { std::list<OUString> aSubdirs; - aSubdirs.push_front( OUString::createFromAscii( "." ) ); - aSubdirs.push_front( OUString::createFromAscii( "en-US" ) ); + aSubdirs.push_front( OUString(RTL_CONSTASCII_USTRINGPARAM(".")) ); + aSubdirs.push_front( OUString(RTL_CONSTASCII_USTRINGPARAM("en-US")) ); if ( rLocale.Language.getLength() ) aSubdirs.push_front( rLocale.Language ); if ( rLocale.Country.getLength() ) { OUString aLocaleCountry = rLocale.Language - + OUString::createFromAscii( "-" ) + + OUString(RTL_CONSTASCII_USTRINGPARAM("-")) + rLocale.Country; aSubdirs.push_front( aLocaleCountry ); if ( rLocale.Variant.getLength() ) aSubdirs.push_front( aLocaleCountry - + OUString::createFromAscii( "." ) + + OUString(RTL_CONSTASCII_USTRINGPARAM(".")) + rLocale.Variant ); } return aSubdirs; @@ -83,10 +84,10 @@ static OUString getFirstExisting( OUString const& aDir, std::list<OUString> const& aSubDirs, OUString const& aXMLName ) { - static OUString const aSlash = OUString::createFromAscii( "/" ); + static OUString const aSlash(RTL_CONSTASCII_USTRINGPARAM("/")); String aResult; for ( std::list<OUString>::const_iterator i = aSubDirs.begin(); - i != aSubDirs.end(); i++ ) + i != aSubDirs.end(); ++i ) { String aFile = aDir + aSlash + *i + aSlash + aXMLName; OSL_TRACE( "testing: %s", OUSTRING_CSTR( aFile ) ); @@ -106,7 +107,7 @@ readRightTranslation( OUString const& aXMLName ) = getLocaleSubdirList( Application::GetSettings().GetUILocale() ); #if TEST_LAYOUT // read from cwd first OUString aCurrentWorkingUrl; - tools::getProcessWorkingDir( &aCurrentWorkingUrl ); + tools::getProcessWorkingDir( aCurrentWorkingUrl ); String aCurrentWorkingDir; LocalFileHelper::ConvertURLToPhysicalName( aCurrentWorkingUrl, aCurrentWorkingDir ); aXMLFile = getFirstExisting( aCurrentWorkingDir, aSubdirs, aXMLName ); @@ -117,7 +118,7 @@ readRightTranslation( OUString const& aXMLName ) { OUString aShareUrl; Bootstrap::locateSharedData( aShareUrl ); - OUString aXMLUrl = aShareUrl + OUString::createFromAscii( "/layout" ); + OUString aXMLUrl = aShareUrl + OUString(RTL_CONSTASCII_USTRINGPARAM("/layout")); String aXMLDir; LocalFileHelper::ConvertURLToPhysicalName( aXMLUrl, aXMLDir ); aXMLFile = getFirstExisting( aXMLDir, aSubdirs, aXMLName ); @@ -128,3 +129,5 @@ readRightTranslation( OUString const& aXMLName ) } } // namespace layoutimpl + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/layout/core/translate.hxx b/toolkit/source/layout/core/translate.hxx index 597b4a88530e..b20166252bd6 100644 --- a/toolkit/source/layout/core/translate.hxx +++ b/toolkit/source/layout/core/translate.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -38,3 +39,5 @@ namespace layoutimpl } // namespace layoutimpl #endif /* LAYOUT_CORE_TRANSLATE_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/layout/core/vcl.cxx b/toolkit/source/layout/core/vcl.cxx index 4e65bf7e0114..2b9d2d3c4f5d 100644 --- a/toolkit/source/layout/core/vcl.cxx +++ b/toolkit/source/layout/core/vcl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -64,3 +65,5 @@ static PushButton* get_button (Dialog const* dialog, sal_uInt32 type) IMPLEMENT_CLOSING_DIALOG (Dialog); IMPLEMENT_CLOSING_DIALOG (ModelessDialog); IMPLEMENT_CLOSING_DIALOG (ModalDialog); + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/layout/core/vcl.hxx b/toolkit/source/layout/core/vcl.hxx index a8f6d4755a23..bcf6cfb700f1 100644 --- a/toolkit/source/layout/core/vcl.hxx +++ b/toolkit/source/layout/core/vcl.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -46,3 +47,5 @@ DECLARE_CLOSING_DIALOG (ModelessDialog); #undef DECLARE_CLOSING_DIALOG #endif /* LAYOUT_CORE_VCL_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/layout/vcl/wbutton.cxx b/toolkit/source/layout/vcl/wbutton.cxx index 26d4410ccf9a..5e303ada03ba 100644 --- a/toolkit/source/layout/vcl/wbutton.cxx +++ b/toolkit/source/layout/vcl/wbutton.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -63,7 +64,7 @@ class ImageImpl { if ( !mxGraphic.is() ) { - DBG_ERROR1( "ERROR: failed to load image: `%s'\n", pName ); + OSL_TRACE( "ERROR: failed to load image: `%s'\n", pName ); } } }; @@ -165,9 +166,9 @@ bool Button::SetModeImage (Image const& image) return getImpl().SetModeImage (image.getImpl().mxGraphic); } -bool Button::SetModeImage (::Image const& image, BmpColorMode mode) +bool Button::SetModeImage (::Image const& image) { - return GetButton ()->SetModeImage (image, mode); + return GetButton ()->SetModeImage (image); } void Button::SetImageAlign( ImageAlign eAlign ) @@ -490,7 +491,7 @@ protected: Window* Remove( std::list< Window*> lst, Window* w ) { for ( std::list< Window*>::iterator it = maAdvanced.begin(); - it != maAdvanced.end(); it++ ) + it != maAdvanced.end(); ++it ) if ( *it == w ) { lst.erase( it ); @@ -506,8 +507,8 @@ public: // TODO: i18n // Button::GetStandardText( BUTTON_ADVANCED ); // Button::GetStandardText( BUTTON_SIMPLE ); - , mAdvancedLabel( rtl::OUString::createFromAscii( "Advanced..." ) ) - , mSimpleLabel( rtl::OUString::createFromAscii( "Simple..." ) ) + , mAdvancedLabel( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Advanced...")) ) + , mSimpleLabel( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Simple...")) ) { } void Click() @@ -533,10 +534,10 @@ public: if (mSimpleLabel.getLength ()) b->SetText (mSimpleLabel); for ( std::list< Window*>::iterator it = maAdvanced.begin(); - it != maAdvanced.end(); it++ ) + it != maAdvanced.end(); ++it ) ( *it )->Show(); for ( std::list< Window*>::iterator it = maSimple.begin(); - it != maSimple.end(); it++ ) + it != maSimple.end(); ++it ) ( *it )->Hide(); redraw (); @@ -550,10 +551,10 @@ public: b->SetText (mAdvancedLabel); setAlign (); for ( std::list< Window*>::iterator it = maAdvanced.begin(); - it != maAdvanced.end(); it++ ) + it != maAdvanced.end(); ++it ) ( *it )->Hide(); for ( std::list< Window*>::iterator it = maSimple.begin(); - it != maSimple.end(); it++ ) + it != maSimple.end(); ++it ) ( *it )->Show(); redraw (true); @@ -679,3 +680,5 @@ rtl::OUString MoreButton::GetLessText () const } } // namespace layout + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/layout/vcl/wcontainer.cxx b/toolkit/source/layout/vcl/wcontainer.cxx index 712aae19934d..699a1af14761 100644 --- a/toolkit/source/layout/vcl/wcontainer.cxx +++ b/toolkit/source/layout/vcl/wcontainer.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -43,7 +44,7 @@ Container::Container( Context const* context, char const* pId ) { if ( !mxContainer.is() ) { - DBG_ERROR1( "Error: failed to associate container with '%s'", pId ); + OSL_TRACE( "Error: failed to associate container with '%s'", pId ); } } @@ -264,3 +265,5 @@ VBox::VBox( Context const* context, char const* pId ) } } // namespace layout + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/layout/vcl/wfield.cxx b/toolkit/source/layout/vcl/wfield.cxx index fb26d04a478b..ce8b59f6023f 100644 --- a/toolkit/source/layout/vcl/wfield.cxx +++ b/toolkit/source/layout/vcl/wfield.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -790,3 +791,5 @@ IMPL_CONSTRUCTORS_BODY( MultiListBox, ListBox, "multilistbox", GetMultiListBox() IMPL_GET_IMPL( MultiListBox ); IMPL_GET_WINDOW( MultiListBox ); } // namespace layout + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/layout/vcl/wrapper.cxx b/toolkit/source/layout/vcl/wrapper.cxx index 06423af6900c..d4d16357d037 100644 --- a/toolkit/source/layout/vcl/wrapper.cxx +++ b/toolkit/source/layout/vcl/wrapper.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -80,7 +81,7 @@ public: uno::Reference< lang::XSingleServiceFactory > xFactory( comphelper::createProcessComponent( - OUString::createFromAscii( "com.sun.star.awt.Layout" ) ), + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.Layout")) ), uno::UNO_QUERY ); if ( !xFactory.is() ) { @@ -150,13 +151,13 @@ PeerHandle Context::GetPeerHandle( const char *id, sal_uInt32 nId ) const xHandle = pImpl->getByName( OUString( id, strlen( id ), RTL_TEXTENCODING_UTF8 ) ); if ( !xHandle.is() ) { - DBG_ERROR1( "Failed to fetch widget '%s'", id ); + OSL_TRACE( "Failed to fetch widget '%s'", id ); } if ( nId != 0 ) { rtl::OString aStr = rtl::OString::valueOf( (sal_Int32) nId ); - xHandle = GetPeerHandle( aStr, 0 ); + xHandle = GetPeerHandle( aStr.getStr(), 0 ); } return xHandle; } @@ -1119,25 +1120,6 @@ void TabControl::InsertPage (sal_uInt16 id, OUString const& title, sal_uInt16 po #else GetTabPage (id)->SetText (title); #endif - -#if 0 - /// This so seems the right solution, but it makes the buttons of the - /// tabdialog move up - - ::TabPage *page = GetTabPage (id); - if (Window *w = dynamic_cast <Window*> (page)) - { - w->SetParent (this); - //GetVCLXTabControl ()->Box_Base::addChild (uno::Reference <awt::XLayoutConstrains> (w->GetPeer (), uno::UNO_QUERY)); - //GetVCLXTabControl ()->Box_Base::AddChild (uno::Reference <awt::XLayoutConstrains> (w->GetPeer (), uno::UNO_QUERY)); - //GetVCLXTabControl ()->AddChild (w); - //GetVCLXTabControl ()->AddChild (uno::Reference <awt::XLayoutConstrains> (w->GetPeer (), uno::UNO_QUERY)); - //uno::Reference <uno::XInterface> x (page->GetWindowPeer()); - //GetVCLXTabControl ()->AddChild (uno::Reference <awt::XLayoutConstrains> (page->::Window::GetWindowPeer (), uno::UNO_QUERY)); - //GetVCLXTabControl ()->AddChild (uno::Reference <awt::XLayoutConstrains> (page->GetComponentInterface (), uno::UNO_QUERY)); - } - getImpl ().redraw (); -#endif } void TabControl::RemovePage (sal_uInt16 id) { @@ -1168,21 +1150,6 @@ sal_uInt16 TabControl::GetCurPageId () const void TabControl::SetTabPage (sal_uInt16 id, ::TabPage* page) { GetTabControl ()->SetTabPage (id, page); - -#if 0 - /// This so seems the right solution, but it makes the buttons of the - /// tabdialog move up - if (Window *w = dynamic_cast <Window*> (page)) - { - w->SetParent (this); - //GetVCLXTabControl ()->Box_Base::addChild (uno::Reference <awt::XLayoutConstrains> (w->GetPeer (), uno::UNO_QUERY)); - //GetVCLXTabControl ()->Box_Base::AddChild (uno::Reference <awt::XLayoutConstrains> (w->GetPeer (), uno::UNO_QUERY)); - //GetVCLXTabControl ()->AddChild (w); - //GetVCLXTabControl ()->AddChild (uno::Reference <awt::XLayoutConstrains> (w->GetPeer (), uno::UNO_QUERY)); - //GetVCLXTabControl ()->AddChild (uno::Reference <awt::XLayoutConstrains> (page->GetWindowPeer (), uno::UNO_QUERY)); - //GetVCLXTabControl ()->AddChild (uno::Reference <awt::XLayoutConstrains> (page->GetComponentInterface (), uno::UNO_QUERY)); - } -#endif getImpl ().redraw (); } ::TabPage* TabControl::GetTabPage (sal_uInt16 id) const @@ -1216,17 +1183,6 @@ void TabControl::SetTabPageSizePixel (Size const& size) } Size TabControl::GetTabPageSizePixel () const { -#if 0 - //return GetTabControl ()->GetTabPageSizePixel (); - static size_t const tab_page_first_index = 1; - for (size_t i = 0; i < GetPageCount (); i++) - { - ::TabPage *p = GetTabPage (i + tab_page_first_index); - //if (dynamic_cast<Windowt*> (p)) - if (i) // URG - return p->GetOptimalSize (WINDOWSIZE_MINIMUM); - } -#endif return GetTabControl ()->GetTabPageSizePixel (); } @@ -1375,19 +1331,13 @@ class FixedImageImpl: public ControlImpl public: uno::Reference< graphic::XGraphic > mxGraphic; FixedImageImpl( Context *context, const PeerHandle &peer, Window *window) -// const char *pName ) : ControlImpl( context, peer, window ) - //, mxGraphic( layoutimpl::loadGraphic( pName ) ) , mxGraphic( peer, uno::UNO_QUERY ) { if ( !mxGraphic.is() ) { - DBG_ERROR( "ERROR: failed to load image: `%s'" /*, pName*/ ); + OSL_FAIL( "ERROR: failed to load image: `%s'" ); } -#if 0 - else - getImpl().mxGraphic->...(); -#endif } }; @@ -1403,20 +1353,6 @@ void FixedImage::setImage( ::Image const& i ) //getImpl().mxGraphic = } -#if 0 - -FixedImage::FixedImage( const char *pName ) - : pImpl( new FixedImageImpl( pName ) ) -{ -} - -FixedImage::~FixedImage() -{ - delete pImpl; -} - -#endif - IMPL_CONSTRUCTORS( ProgressBar, Control, "ProgressBar" ); IMPL_GET_IMPL( ProgressBar ); @@ -1618,3 +1554,5 @@ void InPlug::ParentSet (Window *window) } } // namespace layout + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/layout/vcl/wrapper.hxx b/toolkit/source/layout/vcl/wrapper.hxx index 2f7e24211150..8a88be68001e 100644 --- a/toolkit/source/layout/vcl/wrapper.hxx +++ b/toolkit/source/layout/vcl/wrapper.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -147,3 +148,5 @@ inline WindowImpl &Window::getImpl() const{ return *(static_cast< WindowImpl * > } // namespace layout #endif /* LAYOUT_VCL_WRAPPER_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/src2xml/include.lst b/toolkit/src2xml/include.lst index 2bf5fced6fd3..dc15fe7592b6 100644 --- a/toolkit/src2xml/include.lst +++ b/toolkit/src2xml/include.lst @@ -56,8 +56,6 @@ ../../vcl/unxlngi6.pro/inc ../../ure/unxlngi6.pro/inc ../../uui/unxlngi6.pro/inc -../../vos/inc -../../vos/unxlngi6.pro/inc ../../dbaccess/inc ../../dbaccess/source/ui/inc ../../dbaccess/source/inc diff --git a/toolkit/src2xml/src.lst b/toolkit/src2xml/src.lst index a402a6b633c9..44143571b0dc 100644 --- a/toolkit/src2xml/src.lst +++ b/toolkit/src2xml/src.lst @@ -335,7 +335,6 @@ ../../svx/source/dialog/macropg.src ../../svx/source/dialog/fontsubs.src ../../svx/source/dialog/align.src -../../svx/source/dialog/hyprlink.src ../../svx/source/dialog/imapdlg.src ../../svx/source/dialog/dlgctrl.src ../../svx/source/dialog/tabstpge.src @@ -523,7 +522,6 @@ ../../basic/source/app/basmsg.src ../../basic/source/sbx/format.src ../../basic/source/classes/sb.src -../../basic/workben/basmgr.src ../../forms/source/resource/xforms.src ../../forms/source/resource/strings.src ../../scaddins/source/datefunc/datefunc.src @@ -553,7 +551,6 @@ ../../chart2/source/controller/dialogs/dlg_RotateDiagram.src ../../chart2/source/controller/dialogs/tp_PointGeometry.src ../../chart2/source/controller/dialogs/dlg_ObjectProperties.src -../../chart2/source/controller/dialogs/Bitmaps_HC.src ../../chart2/source/controller/dialogs/tp_TitleRotation.src ../../chart2/source/controller/dialogs/dlg_ChartType.src ../../chart2/source/controller/dialogs/Bitmaps.src diff --git a/toolkit/test/accessibility/AWB.sxw b/toolkit/test/accessibility/AWB.sxw Binary files differindex 57931aed1d19..57931aed1d19 100755..100644 --- a/toolkit/test/accessibility/AWB.sxw +++ b/toolkit/test/accessibility/AWB.sxw diff --git a/toolkit/test/accessibility/HelpWindow.java b/toolkit/test/accessibility/HelpWindow.java index 74627ad99761..a66d0975f704 100644 --- a/toolkit/test/accessibility/HelpWindow.java +++ b/toolkit/test/accessibility/HelpWindow.java @@ -30,7 +30,7 @@ class HelpWindow File aFile = new File (sFilename); try { - loadURL (aFile.toURL()); + loadURL (aFile.toURI().toURL()); } catch (MalformedURLException e) { diff --git a/toolkit/uiconfig/layout/message-box.xml b/toolkit/uiconfig/layout/message-box.xml index 61305e443fa3..2bd19bbb42fb 100644 --- a/toolkit/uiconfig/layout/message-box.xml +++ b/toolkit/uiconfig/layout/message-box.xml @@ -10,16 +10,16 @@ <vbox border="5" spacing="5"> <hbox border="5" spacing="20"> <align cnt:expand="false" cnt:fill="true"> - <fixedimage id="FI_ERROR" cnt:expand="false" cnt:v-align="0.5" cnt:v-fill="0" graphic="res/commandimagelist/msgbox-error.png" /> + <fixedimage id="FI_ERROR" cnt:expand="false" cnt:v-align="0.5" cnt:v-fill="0" graphic="cmd/msgbox-error.png" /> </align> <align cnt:expand="false" cnt:fill="true"> - <fixedimage id="FI_INFO" cnt:expand="false" cnt:v-align="0.5" cnt:v-fill="0" graphic="res/commandimagelist/msgbox-info.png" /> + <fixedimage id="FI_INFO" cnt:expand="false" cnt:v-align="0.5" cnt:v-fill="0" graphic="cmd/msgbox-info.png" /> </align> <align cnt:expand="false" cnt:fill="true"> - <fixedimage id="FI_QUERY" cnt:expand="false" cnt:v-align="0.5" cnt:v-fill="0" graphic="res/commandimagelist/msgbox-query.png" /> + <fixedimage id="FI_QUERY" cnt:expand="false" cnt:v-align="0.5" cnt:v-fill="0" graphic="cmd/msgbox-query.png" /> </align> <align cnt:expand="false" cnt:fill="true"> - <fixedimage id="FI_WARNING" cnt:expand="false" cnt:v-align="0.5" cnt:v-fill="0" graphic="res/commandimagelist/msgbox-warning.png" /> + <fixedimage id="FI_WARNING" cnt:expand="false" cnt:v-align="0.5" cnt:v-fill="0" graphic="cmd/msgbox-warning.png" /> </align> <align cnt:expand="false" cnt:fill="true"> <fixedtext id="FT_MESSAGE" _label="FT-LABEL" cnt:v-align="0.5" cnt:v-fill="0" /> diff --git a/toolkit/util/tk.component b/toolkit/util/tk.component index 690b3f324498..4d4713e87c45 100644 --- a/toolkit/util/tk.component +++ b/toolkit/util/tk.component @@ -319,4 +319,22 @@ <service name="com.sun.star.awt.Toolkit"/> <service name="stardiv.vcl.VclToolkit"/> </implementation> + <implementation name="stardiv.Toolkit.UnoMultiPageModel"> + <service name="com.sun.star.awt.UnoMultiPageModel"/> + </implementation> + <implementation name="stardiv.Toolkit.UnoMultiPageControl"> + <service name="com.sun.star.awt.UnoControlMultiPage"/> + </implementation> + <implementation name="stardiv.Toolkit.UnoPageModel"> + <service name="com.sun.star.awt.UnoPageModel"/> + </implementation> + <implementation name="stardiv.Toolkit.UnoPageControl"> + <service name="com.sun.star.awt.UnoControlPage"/> + </implementation> + <implementation name="stardiv.Toolkit.UnoFrameModel"> + <service name="com.sun.star.awt.UnoFrameModel"/> + </implementation> + <implementation name="stardiv.Toolkit.UnoFrameControl"> + <service name="com.sun.star.awt.UnoControlFrame"/> + </implementation> </component> diff --git a/toolkit/workben/controls.cxx b/toolkit/workben/controls.cxx index 9047e914a76d..93b68649db82 100644 --- a/toolkit/workben/controls.cxx +++ b/toolkit/workben/controls.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -43,7 +44,6 @@ #include <unoctrl.hxx> -// #include <unoctrl2.hxx> #include <svtools/unoiface.hxx> // InitExtToolkit @@ -121,35 +121,6 @@ void MyWin::MouseButtonDown( const MouseEvent& rMEvt ) XViewRef xV( xDrawCtrl, USR_QUERY ); XWindowRef xC( xDrawCtrl, USR_QUERY ); xV->draw( xC->getPosSize().Left(), xC->getPosSize().Top() ); - - // Printer Testen... -/* - XServiceManagerRef xProv = getGlobalServiceManager(); - XServiceProviderRef xSSI = xProv->queryServiceProvider( L"stardiv.vcl.PrinterServer" ); - XPrinterServerRef xPrinterServer( xSSI->createInstance(), USR_QUERY ); - - Sequence< UString > aPrinterNames = xPrinterServer->getPrinterNames(); - USHORT nPrinters = aPrinterNames.getLen(); - String aInfo( "Printers: " ); - aInfo += nPrinters; - if ( nPrinters ) - { - for ( USHORT n = 0; n < nPrinters; n++ ) - { - aInfo += '\n'; - aInfo += OUStringToString( aPrinterNames.getConstArray()[n], CHARSET_SYSTEM ); - } - - XPrinterRef xPrinter = xPrinterServer->createPrinter( aPrinterNames.getConstArray()[0] ); - xPrinter->start( L"UNOPrinterTest", 1, TRUE ); - XDeviceRef xDev = xPrinter->startPage(); - XGraphicsRef xGraphics = xDev->createGraphics(); - xGraphics->drawText( 200, 200, L"Printed with UNO" ); - xPrinter->endPage(); - xPrinter->end(); - } - InfoBox( this, aInfo ).Execute(); -*/ } else if( rMEvt.GetClicks() == 1 ) { @@ -263,135 +234,6 @@ void MyWin::MouseButtonDown( const MouseEvent& rMEvt ) xCont->addControl( L"", xButton1 ); -/* - - // ListBox... - xModelProv = xProv->queryServiceProvider( L"stardiv.vcl.controlmodel.ListBox" ); - xModel = (XInterface*)xModelProv->createInstance()->queryInterface( XInterface::getSmartUik() ); - - xPSet = (XPropertySet*)xModel->queryInterface( XPropertySet::getSmartUik() ); - Sequence<UString> aSeq( 7 ); - aSeq.getArray()[0] = L"Item1"; - aSeq.getArray()[1] = L"Item2"; - aSeq.getArray()[2] = L"Item3"; - aSeq.getArray()[3] = L"Item4"; - aSeq.getArray()[4] = L"Item5"; - aSeq.getArray()[5] = L"Item6"; - aSeq.getArray()[6] = L"Item7"; - xPSet->setPropertyValue( L"StringItemList", UsrAny( &aSeq, Sequence<UString>::getReflection() ) ); - xPSet->setPropertyValue( L"LineCount", UsrAny_UINT16( 4 ) ); - xPSet->setPropertyValue( L"Dropdown", UsrAny( (BOOL)TRUE ) ); - - XServiceProviderRef xListBoxCtrlProv = xProv->queryServiceProvider( L"stardiv.vcl.control.ListBox" ); - XControlRef xListBox1 = (XControl*)xListBoxCtrlProv->createInstance()->queryInterface( XControl::getSmartUik() ); - xListBox1->setModel( (XControlModel*)xModel->queryInterface( XControlModel::getSmartUik() ) ); - XWindowRef xListBoxCmp1 = (XWindow*)xListBox1->queryInterface( XWindow::getSmartUik() ); - xListBoxCmp1->setPosSize( 20, 250, 200, 20, PosSize_POSSIZE ); - xCont->addControl( L"", xListBox1 ); - - // FixedText... - xModelProv = xProv->queryServiceProvider( L"stardiv.vcl.controlmodel.FixedText" ); - xModel = (XInterface*)xModelProv->createInstance()->queryInterface( XInterface::getSmartUik() ); - DBG_ASSERT( xModel, "No Model!" ); - - xPSet = (XPropertySet*)xModel->queryInterface( XPropertySet::getSmartUik() ); - xPSet->setPropertyValue( L"Label", UsrAny( L"Label:" ) ); - xPSet->setPropertyValue( L"BackgroundColor", UsrAny( (UINT32)0x00888888) ); - - Font_Attribs aFontAttrs; - aFontAttrs.Italic = ITALIC_NORMAL; - xPSet->setPropertyValue( L"Font_Attribs", UsrAny( &aFontAttrs, Font_Attribs_getReflection() ) ); - - XPropertyStateRef xState = (XPropertyState*)xPSet->queryInterface( XPropertyState::getSmartUik() ); - xState->getPropertyState( L"Font_Attribs" ); - xState->getPropertyState( L"Font_Size" ); - - XServiceProviderRef xFixedTextCtrlProv = xProv->queryServiceProvider( L"stardiv.vcl.control.FixedText" ); - XControlRef xFixedText1 = (XControl*)xFixedTextCtrlProv->createInstance()->queryInterface( XControl::getSmartUik() ); - DBG_ASSERT( xFixedText1, "No FixedText!" ); - xFixedText1->setModel( (XControlModel*)xModel->queryInterface( XControlModel::getSmartUik() ) ); - XWindowRef xFixedTextCmp1 = (XWindow*)xFixedText1->queryInterface( XWindow::getSmartUik() ); - xFixedTextCmp1->setPosSize( 20, 20, 120, 20, PosSize_POSSIZE ); - xCont->addControl( L"", xFixedText1 ); - - // TabTest... - xModelProv = xProv->queryServiceProvider( L"stardiv.vcl.controlmodel.GroupBox" ); - xModel = (XInterface*)xModelProv->createInstance()->queryInterface( XInterface::getSmartUik() ); - xPSet = (XPropertySet*)xModel->queryInterface( XPropertySet::getSmartUik() ); - xPSet->setPropertyValue( L"Label", UsrAny( L"Radio-Test:" ) ); - XServiceProviderRef xGroupBoxCtrlProv = xProv->queryServiceProvider( L"stardiv.vcl.control.GroupBox" ); - XControlRef xGroupBox1 = (XControl*)xGroupBoxCtrlProv->createInstance()->queryInterface( XControl::getSmartUik() ); - xGroupBox1->setModel( (XControlModel*)xModel->queryInterface( XControlModel::getSmartUik() ) ); - XWindowRef xGroupBoxCmp1 = (XWindow*)xGroupBox1->queryInterface( XWindow::getSmartUik() ); - xGroupBoxCmp1->setPosSize( 30, 410, 100, 130, PosSize_POSSIZE ); - xCont->addControl( L"", xGroupBox1 ); - - XServiceProviderRef xRadioButtonModelProv = xProv->queryServiceProvider( L"stardiv.vcl.controlmodel.RadioButton" ); - XServiceProviderRef xRadioButtonCtrlProv = xProv->queryServiceProvider( L"stardiv.vcl.control.RadioButton" ); - - xModel = (XInterface*)xRadioButtonModelProv->createInstance()->queryInterface( XInterface::getSmartUik() ); - XControlRef xT1 = (XControl*)xRadioButtonCtrlProv->createInstance()->queryInterface( XControl::getSmartUik() ); - xT1->setModel( (XControlModel*)xModel->queryInterface( XControlModel::getSmartUik() ) ); - XWindowRef xTC1 = (XWindow*)xT1->queryInterface( XWindow::getSmartUik() ); - xTC1->setPosSize( 40, 430, 80, 20, PosSize_POSSIZE ); - xCont->addControl( L"", xT1 ); - xPSet = (XPropertySet*)xModel->queryInterface( XPropertySet::getSmartUik() ); - xPSet->setPropertyValue( L"Label", UsrAny( L"Radio1" ) ); - xPSet->setPropertyValue( L"State", UsrAny_UINT16( 1 ) ); - - xModel = (XInterface*)xRadioButtonModelProv->createInstance()->queryInterface( XInterface::getSmartUik() ); - XControlRef xT2 = (XControl*)xRadioButtonCtrlProv->createInstance()->queryInterface( XControl::getSmartUik() ); - xT2->setModel( (XControlModel*)xModel->queryInterface( XControlModel::getSmartUik() ) ); - XWindowRef xTC2 = (XWindow*)xT2->queryInterface( XWindow::getSmartUik() ); - xTC2->setPosSize( 40, 470, 80, 20, PosSize_POSSIZE ); - xCont->addControl( L"", xT2 ); - xPSet = (XPropertySet*)xModel->queryInterface( XPropertySet::getSmartUik() ); - xPSet->setPropertyValue( L"Label", UsrAny( L"Radio2" ) ); - - xModel = (XInterface*)xRadioButtonModelProv->createInstance()->queryInterface( XInterface::getSmartUik() ); - XControlRef xT3 = (XControl*)xRadioButtonCtrlProv->createInstance()->queryInterface( XControl::getSmartUik() ); - xT3->setModel( (XControlModel*)xModel->queryInterface( XControlModel::getSmartUik() ) ); - XWindowRef xTC3 = (XWindow*)xT3->queryInterface( XWindow::getSmartUik() ); - xTC3->setPosSize( 40, 510, 80, 20, PosSize_POSSIZE ); - xCont->addControl( L"", xT3 ); - xPSet = (XPropertySet*)xModel->queryInterface( XPropertySet::getSmartUik() ); - xPSet->setPropertyValue( L"Label", UsrAny( L"Radio3" ) ); - - xModel = (XInterface*)xRadioButtonModelProv->createInstance()->queryInterface( XInterface::getSmartUik() ); - XControlRef xT4 = (XControl*)xRadioButtonCtrlProv->createInstance()->queryInterface( XControl::getSmartUik() ); - xT4->setModel( (XControlModel*)xModel->queryInterface( XControlModel::getSmartUik() ) ); - XWindowRef xTC4 = (XWindow*)xT4->queryInterface( XWindow::getSmartUik() ); - xTC4->setPosSize( 40, 550, 80, 20, PosSize_POSSIZE ); - xCont->addControl( L"", xT4 ); - xPSet = (XPropertySet*)xModel->queryInterface( XPropertySet::getSmartUik() ); - xPSet->setPropertyValue( L"Label", UsrAny( L"Radio4 - no" ) ); - xPSet->setPropertyValue( L"Tabstop", UsrAny( (BOOL)TRUE ) ); - - // TabController: - xModelProv = xProv->queryServiceProvider( L"stardiv.vcl.controlmodel.TabController" ); - xModel = (XInterface*)xModelProv->createInstance()->queryInterface( XInterface::getSmartUik() ); - XTabControllerModelRef xTCModel = (XTabControllerModel*)xModel->queryInterface( XTabControllerModel::getSmartUik() ); - - XServiceProviderRef xTCProv = xProv->queryServiceProvider( L"stardiv.vcl.control.TabController" ); - XTabControllerRef xTC = (XTabController*)xTCProv->createInstance()->queryInterface( XTabController::getSmartUik() ); - xTC->setModel( (XTabControllerModel*)xModel->queryInterface( XTabControllerModel::getSmartUik() ) ); - XUnoControlContainerRef xUCC = (XUnoControlContainer*)xCont->queryInterface( XUnoControlContainer::getSmartUik() ); - xUCC->addTabController( xTC ); - - Sequence<XControlModelRef> aControls( 5 ); - aControls.getArray()[0] = xGroupBox1->getModel(); - aControls.getArray()[1] = xT1->getModel(); - aControls.getArray()[2] = xT3->getModel(); - aControls.getArray()[3] = xT2->getModel(); - aControls.getArray()[4] = xT4->getModel(); - xTCModel->setControls( aControls ); - - Sequence<XControlModelRef> aGroup( 3 ); - aGroup.getArray()[0] = xT1->getModel(); - aGroup.getArray()[1] = xT3->getModel(); - aGroup.getArray()[2] = xT2->getModel(); - xTCModel->setGroup( aGroup, L"test" ); -*/ // Container anzeigen... // Als Child zu diesem Fenster xContControl->createPeer( XToolkitRef(), GetComponentInterface( TRUE ) ); @@ -401,26 +243,6 @@ void MyWin::MouseButtonDown( const MouseEvent& rMEvt ) XViewRef xV ( xDrawCtrl, USR_QUERY ); xV->setGraphics( xG ); -// ((UnoControl*)(XControl*)xNumField))->updateFromModel(); - -/* - // TEST: - WindowDecriptor aDescr; - aDescr.ComponentServiceName = "window"; - aDescr.Type = VCLCOMPONENTTYPE_CONTAINER; - aDescr.Parent = GetComponentInterface( TRUE ); - aDescr.WindowAttributes = WA_SHOW|WA_BORDER; - aDescr.Bounds = Rectangle( Point( 500, 50 ), Size( 300, 200 ) ); - XVclWindowPeerRef xSPWin = xToolkit->createComponent( aDescr ); - - WindowDecriptor aDescr2; - aDescr2.ComponentServiceName = "scrollbar"; - aDescr2.Type = VCLCOMPONENTTYPE_SIMPLE; - aDescr2.Parent = xSPWin; - aDescr2.WindowAttributes = WA_SHOW|WA_BORDER|WA_VSCROLL; - aDescr2.Bounds = Rectangle( Point( 250, 0 ), Size( 50, 200 ) ); - XVclWindowPeerRef xSB = xToolkit->createComponent( aDescr2 ); -*/ } return; } @@ -447,3 +269,4 @@ void MyWin::Paint( const Rectangle& r ) } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/workben/layout/editor.cxx b/toolkit/workben/layout/editor.cxx index 699c103d2ee8..ceee0fdaba4d 100644 --- a/toolkit/workben/layout/editor.cxx +++ b/toolkit/workben/layout/editor.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -160,19 +161,6 @@ public: mxContainer = uno::Reference< awt::XLayoutContainer >( mxWidget, uno::UNO_QUERY ); mrLabel = rtl::OUString( label, strlen( label ), RTL_TEXTENCODING_UTF8 ); - -#if 0 /* obsolete */ - // FIXME: this code is meant to import a XML file. Just use the importer, - // then pass the root widget. But information like the ID string is lost. - // So, this needs to be more closely tight to the importer. - uno::Sequence< uno::Reference< awt::XLayoutConstrains > > aChildren; - for ( int i = 0; i < aChildren.getLength(); i++ ) - { - Widget *pChild = new Widget( aChildren[ i ], "---" ); - maChildren.push_back( pChild ); - pChild->mpParent = this; - } -#endif } Widget( rtl::OUString id, uno::Reference< awt::XToolkit > xToolkit, @@ -204,17 +192,7 @@ public: // set default Text property // TODO: disable editing of text fields, check boxes selected, etc... -#if 0 - uno::Reference< awt::XVclWindowPeer> xVclPeer( mxWidget, uno::UNO_QUERY ) - if ( xVclPeer.is() ) // XVclWindowPeer ignores missing / incorrect properties - -//FIXME: it looks odd on widgets like NumericField seeing text which is deleted -// when you interact with it... We can avoid it for those widgets, by doing a getProp -// of "Text" and check if it is empty or not. - xVclPeer->setProperty( rtl::OUString::createFromAscii( "Text" ), - uno::makeAny( rtl::OUString::createFromAscii( "new widget" ) ) ); -#endif // store original properties { @@ -237,7 +215,7 @@ public: ~Widget() { for ( std::vector< Widget *>::const_iterator it = maChildren.begin(); - it != maChildren.end(); it++ ) + it != maChildren.end(); ++it ) delete *it; if ( !mbForeign ) { @@ -388,18 +366,18 @@ public: std::vector< Widget *> aChildChildren = pChild->maChildren; for ( std::vector< Widget *>::const_iterator it = aChildChildren.begin(); - it != aChildChildren.end(); it++ ) + it != aChildChildren.end(); ++it ) pChild->removeChild( *it ); for ( std::vector< Widget *>::const_iterator it = aChildChildren.begin(); - it != aChildChildren.end(); it++ ) + it != aChildChildren.end(); ++it ) if ( !addChild( *it ) ) { // failure for ( std::vector< Widget *>::const_iterator jt = aChildChildren.begin(); - jt != it; jt++ ) + jt != it; ++jt ) removeChild( *jt ); for ( std::vector< Widget *>::const_iterator jt = aChildChildren.begin(); - jt != aChildChildren.end(); jt++ ) + jt != aChildChildren.end(); ++jt ) pChild->addChild( *jt ); return false; } @@ -419,7 +397,7 @@ public: { int i = 0; for ( std::vector< Widget *>::const_iterator it = maChildren.begin(); - it != maChildren.end(); it++, i++ ) + it != maChildren.end(); ++it, ++i ) if ( *it == pChild ) break; return i; @@ -456,7 +434,7 @@ public: static rtl::OUString findProperty( const PropList &props, rtl::OUString propName ) { - for ( PropList::const_iterator it = props.begin(); it != props.end(); it++ ) + for ( PropList::const_iterator it = props.begin(); it != props.end(); ++it ) if ( it->first.equalsIgnoreAsciiCase( propName ) ) return it->second; #if DEBUG_PRINT @@ -684,11 +662,6 @@ bool moveWidget( Widget *pWidget, bool up /*or down*/ ) } else { -// TODO: this is a nice feature, but we probably want to do it explicitely... -#if 0 - if ( pWidget->down() && pWidget->swapWithChild( pWidget->down() ) ) - return true; -#endif } } @@ -892,66 +865,14 @@ class PropertiesList : public layout::Table mbMultiLine = bMultiLine; } -#if 0 - // TODO: make this global... We'll likely need it for export... - struct Translate { - const char *ori, *dest; - }; - static rtl::OUString stringReplace( rtl::OUString _str, - Translate *trans ) - { - const sal_Unicode *str = _str.getStr(); - rtl::OUStringBuffer buf; - int i, j, k; - for ( i = 0; i < _str.getLength(); i++ ) - { - for ( j = 0; trans[ j ].ori; j++ ) - { - const char *ori = trans[ j ].ori; - for ( k = 0; ori[ k ] && i+k < _str.getLength(); k++ ) - if ( ori[ k ] != str[ i+k ] ) - break; - if ( !ori[ k ] ) - { - // found substring - buf.appendAscii( trans[ j ].dest ); - i += k; - continue; - } - } - buf.append( str[ i ] ); - } - return buf.makeStringAndClear(); - } -#endif - virtual void load() { -#if 0 - // replace end of lines by "\\n" strings - Translate trans[] = { - { "\\", "\\\\" }, { "\n", "\\n" }, { 0, 0 } - }; - rtl::OUString str = anyToString( getValue() ); - str = stringReplace( str, trans ); - SetText( str ); -#endif mpEdit->SetText( getValue() ); checkProperty(); } virtual void store() { -#if 0 - // replace "\\n" strings by actual end of lines - Translate trans[] = { - { "\\\\", "\\" }, { "\\n", "\n" }, - { "\\", "" }, { 0, 0 } - }; - rtl::OUString str = GetText(); - str = stringReplace( str, trans ); - save( uno::makeAny( str ) ); -#endif save( uno::makeAny( (rtl::OUString) mpEdit->GetText() ) ); } }; @@ -1209,20 +1130,6 @@ class PropertiesList : public layout::Table "Printable", "Repeat", "RepeatDelay", "Tabstop" }; -#if 0 - // checks list sanity -- enable this when you add some entries... - for ( unsigned int i = 1; i < sizeof( toIgnoreList )/sizeof( char * ); i++ ) - { - if ( strcmp(toIgnoreList[i-1], toIgnoreList[i]) >= 0 ) - { - printf("ignore list not ordered properly: " - "'%s' should come before '%s'\n", - toIgnoreList[i], toIgnoreList[i-1]); - exit(-1); - } - } -#endif - int min = 0, max = sizeof( toIgnoreList )/sizeof( char * ) - 1, mid, cmp; do { mid = min + (max - min)/2; @@ -1304,7 +1211,7 @@ public: Container::Clear(); for ( std::list< PropertyEntry* >::iterator it = maPropertiesList.begin(); - it != maPropertiesList.end(); it++) + it != maPropertiesList.end(); ++it) delete *it; maPropertiesList.clear(); @@ -1422,16 +1329,16 @@ public: { mpListBox->SetSelectHdl( LINK( this, SortListBox, ItemSelectedHdl ) ); - mpUpButton->SetModeImage( layout::Image ( "res/commandimagelist/lc_moveup.png" ) ); + mpUpButton->SetModeImage( layout::Image ( "cmd/lc_moveup.png" ) ); mpUpButton->SetImageAlign( IMAGEALIGN_LEFT ); mpUpButton->SetClickHdl( LINK( this, SortListBox, UpPressedHdl ) ); - mpDownButton->SetModeImage( layout::Image ( "res/commandimagelist/lc_movedown.png" ) ); + mpDownButton->SetModeImage( layout::Image ( "cmd/lc_movedown.png" ) ); mpDownButton->SetImageAlign( IMAGEALIGN_LEFT ); mpDownButton->SetClickHdl( LINK( this, SortListBox, DownPressedHdl ) ); - // "res/commandimagelist/lch_delete.png", "res/commandimagelist/lc_delete.png" - mpRemoveButton->SetModeImage( layout::Image ( "res/commandimagelist/sc_closedoc.png" ) ); + // "cmd/lch_delete.png", "cmd/lc_delete.png" + mpRemoveButton->SetModeImage( layout::Image ( "cmd/sc_closedoc.png" ) ); mpRemoveButton->SetImageAlign( IMAGEALIGN_LEFT ); mpRemoveButton->SetClickHdl( LINK( this, SortListBox, RemovePressedHdl ) ); @@ -1752,7 +1659,7 @@ EditorImpl::EditorImpl( layout::Dialog *dialog, pBtn->SetClickHdl( LINK( this, EditorImpl, CreateWidgetHdl ) ); if ( WIDGETS_SPECS[ i ].pIconName != NULL ) { - rtl::OString aPath ("res/commandimagelist/"); + rtl::OString aPath ("cmd/"); aPath += WIDGETS_SPECS[ i ].pIconName; layout::Image aImg( aPath ); pBtn->SetModeImage( aImg ); @@ -1783,7 +1690,7 @@ EditorImpl::~EditorImpl() delete mpPropertiesList; delete mpLayoutTree; for ( std::list< layout::PushButton * >::const_iterator i = maCreateButtons.begin(); - i != maCreateButtons.end(); i++) + i != maCreateButtons.end(); ++i) delete *i; delete pImportButton; delete pExportButton; @@ -1800,7 +1707,7 @@ void EditorImpl::loadFile( const rtl::OUString &aTestFile ) /* mxMSF->createInstance - ( ::rtl::OUString::createFromAscii( "com.sun.star.awt.Layout" ) ), + ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.Layout")) ), uno::UNO_QUERY ); */ if ( !xRoot.is() ) @@ -1863,13 +1770,13 @@ void EditorImpl::widgetSelected( Widget *pWidget ) if ( !pWidget || pWidget->isContainer() ) { for ( std::list< layout::PushButton *>::const_iterator it = maCreateButtons.begin(); - it != maCreateButtons.end(); it++) + it != maCreateButtons.end(); ++it) (*it)->Enable(); } else { for ( std::list< layout::PushButton *>::const_iterator it = maCreateButtons.begin(); - it != maCreateButtons.end(); it++) + it != maCreateButtons.end(); ++it) (*it)->Disable(); } @@ -1880,7 +1787,7 @@ IMPL_LINK( EditorImpl, CreateWidgetHdl, layout::Button *, pBtn ) { int i = 0; for ( std::list< layout::PushButton *>::const_iterator it = maCreateButtons.begin(); - it != maCreateButtons.end(); it++, i++ ) + it != maCreateButtons.end(); ++it, ++i ) { if ( pBtn == *it ) break; @@ -1942,3 +1849,5 @@ Editor::~Editor() { delete mpImpl; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/workben/layout/editor.hxx b/toolkit/workben/layout/editor.hxx index b955732e32c9..c977941703fa 100644 --- a/toolkit/workben/layout/editor.hxx +++ b/toolkit/workben/layout/editor.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -46,3 +47,5 @@ public: }; #endif /*EDITOR_HXX*/ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/workben/layout/interactable-containers.xml b/toolkit/workben/layout/interactable-containers.xml index fa1bbfc5ed15..afb663951d6c 100644 --- a/toolkit/workben/layout/interactable-containers.xml +++ b/toolkit/workben/layout/interactable-containers.xml @@ -44,6 +44,6 @@ <pushbutton label="Content 4" cnt:title="Page 4" /> <pushbutton label="Content 5" cnt:title="Page 5" /> </tabcontrol> - </vscroll> + </vsplitter> </hsplitter> </dialog> diff --git a/toolkit/workben/layout/message-box.xml b/toolkit/workben/layout/message-box.xml index 61305e443fa3..2bd19bbb42fb 100644 --- a/toolkit/workben/layout/message-box.xml +++ b/toolkit/workben/layout/message-box.xml @@ -10,16 +10,16 @@ <vbox border="5" spacing="5"> <hbox border="5" spacing="20"> <align cnt:expand="false" cnt:fill="true"> - <fixedimage id="FI_ERROR" cnt:expand="false" cnt:v-align="0.5" cnt:v-fill="0" graphic="res/commandimagelist/msgbox-error.png" /> + <fixedimage id="FI_ERROR" cnt:expand="false" cnt:v-align="0.5" cnt:v-fill="0" graphic="cmd/msgbox-error.png" /> </align> <align cnt:expand="false" cnt:fill="true"> - <fixedimage id="FI_INFO" cnt:expand="false" cnt:v-align="0.5" cnt:v-fill="0" graphic="res/commandimagelist/msgbox-info.png" /> + <fixedimage id="FI_INFO" cnt:expand="false" cnt:v-align="0.5" cnt:v-fill="0" graphic="cmd/msgbox-info.png" /> </align> <align cnt:expand="false" cnt:fill="true"> - <fixedimage id="FI_QUERY" cnt:expand="false" cnt:v-align="0.5" cnt:v-fill="0" graphic="res/commandimagelist/msgbox-query.png" /> + <fixedimage id="FI_QUERY" cnt:expand="false" cnt:v-align="0.5" cnt:v-fill="0" graphic="cmd/msgbox-query.png" /> </align> <align cnt:expand="false" cnt:fill="true"> - <fixedimage id="FI_WARNING" cnt:expand="false" cnt:v-align="0.5" cnt:v-fill="0" graphic="res/commandimagelist/msgbox-warning.png" /> + <fixedimage id="FI_WARNING" cnt:expand="false" cnt:v-align="0.5" cnt:v-fill="0" graphic="cmd/msgbox-warning.png" /> </align> <align cnt:expand="false" cnt:fill="true"> <fixedtext id="FT_MESSAGE" _label="FT-LABEL" cnt:v-align="0.5" cnt:v-fill="0" /> diff --git a/toolkit/workben/layout/number-format.xml b/toolkit/workben/layout/number-format.xml index 6f4c61d01b3e..77460ea79ceb 100644 --- a/toolkit/workben/layout/number-format.xml +++ b/toolkit/workben/layout/number-format.xml @@ -10,11 +10,6 @@ <idlist none="IID_INFO"/> <idcount none="3"/> </imagelist> - <imagelist prefix="nuh" id="IL_ICON_HC"> - <maskcolor blue="0xFFFF" green="0x0000" red="0xFFFF" type="Color"/> - <idlist none="IID_INFO"/> - <idcount none="3"/> - </imagelist> !--> <vbox spacing="5" border="5"> <string id="STR_EUROPE" _text="Europe"/> diff --git a/toolkit/workben/layout/plugin.cxx b/toolkit/workben/layout/plugin.cxx index d20fad8c71b9..65af2e510021 100644 --- a/toolkit/workben/layout/plugin.cxx +++ b/toolkit/workben/layout/plugin.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -63,3 +64,5 @@ PluginDialog::PluginDialog( Window* pParent ) PluginDialog::~PluginDialog() { } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/workben/layout/plugin.hxx b/toolkit/workben/layout/plugin.hxx index 6c8f238b0f57..862e6f6dc85a 100644 --- a/toolkit/workben/layout/plugin.hxx +++ b/toolkit/workben/layout/plugin.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -55,3 +56,4 @@ public: #endif /* _LAYOUT_PLUGIN_HXX */ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/workben/layout/plugin.xml b/toolkit/workben/layout/plugin.xml index c5f1b2abe040..5303e3a2329e 100644 --- a/toolkit/workben/layout/plugin.xml +++ b/toolkit/workben/layout/plugin.xml @@ -10,7 +10,7 @@ has_border="true" sizeable="true" moveable="true"> <vbox spacing="5" border="5"> <hbox spacing="5" cnt:expand="false"> - <fixedimage id="FI_HEADER" cnt:expand="false" graphic="res/commandimagelist/sc_apply.png" /> + <fixedimage id="FI_HEADER" cnt:expand="false" graphic="cmd/sc_apply.png" /> <fixedtext id="FT_HEADER" _label="Plugin Test"/> </hbox> <fixedline id="FL_HEADER"/> diff --git a/toolkit/workben/layout/recover.cxx b/toolkit/workben/layout/recover.cxx index fc54fc0be28d..c776ec0bd8d2 100644 --- a/toolkit/workben/layout/recover.cxx +++ b/toolkit/workben/layout/recover.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -108,3 +109,5 @@ SvxRecoverDialog::SvxRecoverDialog( Window* pParent, const SfxItemSet& rCoreSet SvxRecoverDialog::~SvxRecoverDialog() { } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/workben/layout/recover.hxx b/toolkit/workben/layout/recover.hxx index d01350121375..de3a63c84510 100644 --- a/toolkit/workben/layout/recover.hxx +++ b/toolkit/workben/layout/recover.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -77,3 +78,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/workben/layout/recover.xml b/toolkit/workben/layout/recover.xml index b7387b687de2..790a6b694658 100644 --- a/toolkit/workben/layout/recover.xml +++ b/toolkit/workben/layout/recover.xml @@ -10,7 +10,7 @@ has_border="true" sizeable="true" moveable="true"> <vbox spacing="5" border="5" width="640"> <hbox spacing="5" cnt:expand="false"> - <fixedimage id="FI_HEADER" cnt:expand="false" graphic="res/commandimagelist/sc_apply.png" /> + <fixedimage id="FI_HEADER" cnt:expand="false" graphic="cmd/sc_apply.png" /> <fixedtext id="FT_HEADER" _label="OpenOffice.org Document Restore"/> </hbox> <fixedline id="FL_HEADER"/> @@ -24,22 +24,22 @@ LINE TEST"/> <vbox cnt:fill="true" cnt:expand="true" cnt:padding="20" border="20" spacing="20"> <hbox> <checkbox id="CB_DOC" state="1" cnt:expand="false" scale="false"/> - <fixedimage id="FI_DOC" cnt:v-align="0.5" image-align="0.5" cnt:expand="false" scale="false" graphic="res/commandimagelist/lc_insertdoc.png"/> + <fixedimage id="FI_DOC" cnt:v-align="0.5" image-align="0.5" cnt:expand="false" scale="false" graphic="cmd/lc_insertdoc.png"/> <fixedtext id="FT_DOC" _label="My document"/> </hbox> <hbox> <checkbox id="CB_SHEET" state="1" cnt:expand="false" scale="false" /> - <fixedimage id="FI_SHEET" cnt:expand="false" scale="false" graphic="res/commandimagelist/lc_inserttable.png" /> + <fixedimage id="FI_SHEET" cnt:expand="false" scale="false" graphic="cmd/lc_inserttable.png" /> <fixedtext id="FT_SHEET" _label="My spreadsheet"/> </hbox> <hbox> <checkbox id="CB_DRAW" state="1" cnt:expand="false" scale="false"/> - <fixedimage id="FI_DRAW" cnt:expand="false" scale="false" graphic="res/commandimagelist/lc_insertdraw.png" /> + <fixedimage id="FI_DRAW" cnt:expand="false" scale="false" graphic="cmd/lc_insertdraw.png" /> <fixedtext id="FT_DRAW" _label="My drawing"/> </hbox> <hbox> <checkbox id="CB_PRESENT" state="1" cnt:expand="false" scale="false" /> - <fixedimage id="FI_PRESENT" cnt:expand="false" scale="false" graphic="res/commandimagelist/lc_insertvideo.png" /> + <fixedimage id="FI_PRESENT" cnt:expand="false" scale="false" graphic="cmd/lc_insertvideo.png" /> <fixedtext id="FT_PRESENT" _label="My presentation"/> </hbox> <hbox border="5"> diff --git a/toolkit/workben/layout/simple-paragraph.cxx b/toolkit/workben/layout/simple-paragraph.cxx index 721dd9030c67..4cd204d107f7 100644 --- a/toolkit/workben/layout/simple-paragraph.cxx +++ b/toolkit/workben/layout/simple-paragraph.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -151,10 +152,11 @@ namespace SVX { -SvxSimpleParagraphDialog::SvxSimpleParagraphDialog( Window* pParent ) : - SfxTabPage( pParent, SVX_RES( RID_SVXPAGE_STD_PARAGRAPH ), rAttr ), - Dialog( pParent, "simple-paragraph.xml", "dialog" ), - aLineSpacingList( this, "line-spacing-list" ) +SvxSimpleParagraphDialog::SvxSimpleParagraphDialog( Window* pParent ) + : SfxTabPage( pParent, SVX_RES( RID_SVXPAGE_STD_PARAGRAPH ), rAttr ) + , Dialog( pParent, "simple-paragraph.xml", "dialog" ) + , aLineSpacingList( this, "line-spacing-list" ) + , pPrevWin(NULL) { fprintf(stderr, "creating res mgr\n"); pMgr = ResMgr::CreateResMgr("SOME_NAME"); @@ -177,3 +179,5 @@ fprintf(stderr, "done\n"); SvxSimpleParagraphDialog::~SvxSimpleParagraphDialog() { } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/workben/layout/simple-paragraph.hxx b/toolkit/workben/layout/simple-paragraph.hxx index 07d85da29723..d4feff479135 100644 --- a/toolkit/workben/layout/simple-paragraph.hxx +++ b/toolkit/workben/layout/simple-paragraph.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -50,3 +51,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/workben/layout/sortdlg.cxx b/toolkit/workben/layout/sortdlg.cxx index cc3aa08c105d..ecc18da4fbc8 100644 --- a/toolkit/workben/layout/sortdlg.cxx +++ b/toolkit/workben/layout/sortdlg.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -56,15 +57,16 @@ ScSortDlg::ScSortDlg( Window* pParent, AddTabPage( TP_FIELDS, ScTabPageSortFields::Create, 0 ); AddTabPage( TP_OPTIONS, ScTabPageSortOptions::Create, 0 ); #else /* !LAYOUT_SFX_TABDIALOG_BROKEN */ - String fields = rtl::OUString::createFromAscii ("fields"); + String fields(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM ("fields"))); AddTabPage( TP_FIELDS, fields, ScTabPageSortFields::Create, 0, FALSE, TAB_APPEND); - String options = rtl::OUString::createFromAscii ("options"); + String options(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM ("options"))); AddTabPage( TP_OPTIONS, options, ScTabPageSortOptions::Create, 0, FALSE, TAB_APPEND); #endif /* !LAYOUT_SFX_TABDIALOG_BROKEN */ FreeResource(); } -__EXPORT ScSortDlg::~ScSortDlg() +ScSortDlg::~ScSortDlg() { } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/workben/layout/sortdlg.hrc b/toolkit/workben/layout/sortdlg.hrc index 0cecd39e8541..1b62f3f8cbac 100644 --- a/toolkit/workben/layout/sortdlg.hrc +++ b/toolkit/workben/layout/sortdlg.hrc @@ -33,12 +33,6 @@ // -> SCSTR_UNDEFINED // -> SCSTR_FIELD -/* -#define RID_SCDLG_SORT 256 -#define RID_SCPAGE_SORT_FIELDS 257 -#define RID_SCPAGE_SORT_OPTIONS 258 -*/ - #define TP_FIELDS 1 #define TP_OPTIONS 2 @@ -61,8 +55,6 @@ #define LB_SORT_USER 2 #define LB_OUTAREA 3 #define ED_OUTAREA 4 -//#define FT_AREA_LABEL 5 -//#define FT_AREA 6 #define BTN_SORT_USER 7 #define BTN_CASESENSITIVE 8 #define BTN_LABEL 9 @@ -77,7 +69,3 @@ #define FT_ALGORITHM 18 #define LB_ALGORITHM 19 #define BTN_NATURALSORT 20 - - - - diff --git a/toolkit/workben/layout/sortdlg.hxx b/toolkit/workben/layout/sortdlg.hxx index e5b3b289434d..c63f24989aca 100644 --- a/toolkit/workben/layout/sortdlg.hxx +++ b/toolkit/workben/layout/sortdlg.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -71,3 +72,5 @@ inline BOOL ScSortDlg::GetByRows () const { return bIsByRows; } #endif #endif // SC_SORTDLG_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/workben/layout/sortdlg.src b/toolkit/workben/layout/sortdlg.src index e9e2b7a0a26b..f52758f61785 100644 --- a/toolkit/workben/layout/sortdlg.src +++ b/toolkit/workben/layout/sortdlg.src @@ -125,6 +125,7 @@ TabPage RID_SCPAGE_SORT_FIELDS Text [ en-US ] = "T~hen by" ; }; }; + TabPage RID_SCPAGE_SORT_OPTIONS { Hide = TRUE ; @@ -171,7 +172,7 @@ TabPage RID_SCPAGE_SORT_OPTIONS Text [ de ] = "Enable ~natural sort" ; Text [ en-US ] = "Enable ~natural sort" ; Text [ cs ] = "Aktivovat přirozené třídění" ; - Text [ sk ] = "Aktivovať prirodzené triedenie" ; + Text [ sk ] = "Aktivovať prirodzené triedenie" ; TabStop = TRUE ; Text [ x-comment ] = " " ; }; @@ -272,15 +273,8 @@ TabPage RID_SCPAGE_SORT_OPTIONS Text [ en-US ] = "L~eft to right (sort columns)" ; TabStop = TRUE ; }; -/* - FixedText FT_AREA_LABEL - { - Pos = MAP_APPFONT ( 6 , 171 ) ; - Size = MAP_APPFONT ( 248 , 8 ) ; - Text [ en-US ] = "Data area:" ; - }; -*/ }; + TabDialog RID_SCDLG_SORT { OutputSize = TRUE ; @@ -335,5 +329,3 @@ TabDialog RID_SCDLG_SORT TabStop = TRUE ; }; }; - - diff --git a/toolkit/workben/layout/test.cxx b/toolkit/workben/layout/test.cxx index 6a09518ebc4f..f90317a5ae37 100644 --- a/toolkit/workben/layout/test.cxx +++ b/toolkit/workben/layout/test.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -146,12 +147,12 @@ void LayoutTest::InitUCB() OUString aEmpty; Sequence< Any > aArgs( 6 ); aArgs[0] - <<= OUString::createFromAscii( UCB_CONFIGURATION_KEY1_LOCAL ); + <<= OUString(RTL_CONSTASCII_USTRINGPARAM( UCB_CONFIGURATION_KEY1_LOCAL )); aArgs[1] - <<= OUString::createFromAscii( UCB_CONFIGURATION_KEY2_OFFICE ); - aArgs[2] <<= OUString::createFromAscii( "PIPE" ); + <<= OUString(RTL_CONSTASCII_USTRINGPARAM( UCB_CONFIGURATION_KEY2_OFFICE )); + aArgs[2] <<= OUString(RTL_CONSTASCII_USTRINGPARAM("PIPE")); aArgs[3] <<= aEmpty; - aArgs[4] <<= OUString::createFromAscii( "PORTAL" ); + aArgs[4] <<= OUString(RTL_CONSTASCII_USTRINGPARAM("PORTAL")); aArgs[5] <<= aEmpty; if ( !::ucbhelper::ContentBroker::initialize( mxMSF, aArgs ) ) @@ -197,29 +198,29 @@ void LayoutTest::ParseCommandLine() for ( sal_uInt16 i = 0; i < GetCommandLineParamCount(); i++ ) { OUString aParam = OUString( GetCommandLineParam( i ) ); - if ( aParam.equalsAscii( "-h" ) || aParam.equalsAscii( "--help" ) ) + if ( aParam.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-h" ) ) || aParam.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "--help" ) ) ) usage(); - if ( aParam.equalsAscii( "--inst" ) ) + if ( aParam.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "--inst" ) ) ) { if ( i >= GetCommandLineParamCount() - 1) usage(); mInstallDir = GetCommandLineParam( ++i ); setenv( "OOO_INSTALL_PREFIX", OUSTRING_CSTR( mInstallDir ), 1 ); } - else if ( aParam.equalsAscii( "--test" ) ) + else if ( aParam.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "--test" ) ) ) { - mTestDialog = OUString::createFromAscii( "zoom" ); + mTestDialog = OUString(RTL_CONSTASCII_USTRINGPARAM("zoom")); if (i + 1 < GetCommandLineParamCount()) mTestDialog = GetCommandLineParam( ++i ); } - else if ( aParam.equalsAscii( "--editor" ) ) + else if ( aParam.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "--editor" ) ) ) mEditMode = true; else mFiles.push_back( aParam ); } if ( mFiles.size() <= 0 ) - mFiles.push_back( OUString::createFromAscii( "layout.xml" ) ); + mFiles.push_back( OUString(RTL_CONSTASCII_USTRINGPARAM("layout.xml")) ); } void LayoutTest::RunEditor() @@ -263,43 +264,43 @@ void TestDialog( OUString const& name ) { if ( 0 ) ; - else if ( name.equalsAscii( "plugin" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "plugin" ) ) ) { PluginDialog plugin ( 0 ); RunDialog( plugin ); } - else if ( name.equalsAscii( "query" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "query" ) ) ) { QueryBox query ( 0, "Do you want to do?", "do"); RunDialog( query ); } - else if ( name.equalsAscii( "query-compat" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "query-compat" ) ) ) { QueryBox query ( 0, WinBits( WB_YES_NO | WB_DEF_YES ), // WinBits( WB_ABORT_RETRY_IGNORE ), - OUString::createFromAscii ("Do you want to do?")); + OUString(RTL_CONSTASCII_USTRINGPARAM ("Do you want to do?"))); RunDialog( query ); } - else if ( name.equalsAscii( "recover" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "recover" ) ) ) { SvxRecoverDialog recover ( 0 ); RunDialog( recover ); } #if SORT_DLG - else if ( name.equalsAscii( "sort" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "sort" ) ) ) { LoadSC(); ScSortDlg sort (0, 0); RunDialog( sort ); } #endif /* SORT_DLG */ - else if ( name.equalsAscii( "wordcount" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "wordcount" ) ) ) { SwWordCountDialog words ( 0 ); RunDialog( words ); } - else if ( name.equalsAscii( "zoom" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "zoom" ) ) ) { SvxZoomDialog zoom( 0 ); RunDialog( zoom ); @@ -309,7 +310,7 @@ void TestDialog( OUString const& name ) void LayoutTest::RunFiles() { fprintf( stderr, "TEST: loading files\n" ); - for ( std::list< OUString >::iterator i = mFiles.begin(); i != mFiles.end(); i++ ) + for ( std::list< OUString >::iterator i = mFiles.begin(); i != mFiles.end(); ++i ) LoadFile( *i ); fprintf( stderr, "TEST: executing\n" ); Execute(); @@ -343,14 +344,14 @@ void LayoutTest::Main() aStr += OUStringToOString( exc.Message, RTL_TEXTENCODING_ASCII_US ); } fprintf (stderr, "Parsing error: '%s'\n", aStr.getStr()); - OSL_ENSURE( 0, aStr.getStr() ); + OSL_FAIL( aStr.getStr() ); } catch ( uno::Exception & rExc ) { OString aStr( OUStringToOString( rExc.Message, RTL_TEXTENCODING_ASCII_US ) ); fprintf (stderr, "UNO error: '%s'\n", aStr.getStr()); - OSL_ENSURE( 0, aStr.getStr() ); + OSL_FAIL( aStr.getStr() ); } Reference< lang::XComponent > xComp( mxContext, UNO_QUERY ); @@ -364,3 +365,5 @@ LayoutTest::LayoutTest( char const* installDir ) } LayoutTest layout_test( "/usr/local/lib/ooo" ); + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/workben/layout/tpsort.cxx b/toolkit/workben/layout/tpsort.cxx index 949f3b777a71..ff8526c890aa 100644 --- a/toolkit/workben/layout/tpsort.cxx +++ b/toolkit/workben/layout/tpsort.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -147,7 +148,7 @@ ScTabPageSortFields::ScTabPageSortFields( Window* pParent, // ----------------------------------------------------------------------- -__EXPORT ScTabPageSortFields::~ScTabPageSortFields() +ScTabPageSortFields::~ScTabPageSortFields() { } @@ -191,14 +192,14 @@ void ScTabPageSortFields::Init() //------------------------------------------------------------------------ -USHORT* __EXPORT ScTabPageSortFields::GetRanges() +USHORT* ScTabPageSortFields::GetRanges() { return pSortRanges; } // ----------------------------------------------------------------------- -SfxTabPage* __EXPORT ScTabPageSortFields::Create( Window* pParent, +SfxTabPage* ScTabPageSortFields::Create( Window* pParent, const SfxItemSet& rArgSet ) { return ( new ScTabPageSortFields( pParent, rArgSet ) ); @@ -206,7 +207,7 @@ SfxTabPage* __EXPORT ScTabPageSortFields::Create( Window* pParent, // ----------------------------------------------------------------------- -void __EXPORT ScTabPageSortFields::Reset( const SfxItemSet& /* rArgSet */ ) +void ScTabPageSortFields::Reset( const SfxItemSet& /* rArgSet */ ) { bSortByRows = rSortData.bByRow; bHasHeader = rSortData.bHasHeader; @@ -266,7 +267,7 @@ void __EXPORT ScTabPageSortFields::Reset( const SfxItemSet& /* rArgSet */ ) // ----------------------------------------------------------------------- -BOOL __EXPORT ScTabPageSortFields::FillItemSet( SfxItemSet& rArgSet ) +BOOL ScTabPageSortFields::FillItemSet( SfxItemSet& rArgSet ) { ScSortParam theSortData = rSortData; if (pDlg) @@ -337,7 +338,7 @@ BOOL __EXPORT ScTabPageSortFields::FillItemSet( SfxItemSet& rArgSet ) // fuer Datenaustausch ohne Dialog-Umweg: (! noch zu tun !) // void ScTabPageSortFields::ActivatePage( const SfxItemSet& rSet ) -void __EXPORT ScTabPageSortFields::ActivatePage() +void ScTabPageSortFields::ActivatePage() { if ( pDlg ) { @@ -360,7 +361,7 @@ void __EXPORT ScTabPageSortFields::ActivatePage() // ----------------------------------------------------------------------- -int __EXPORT ScTabPageSortFields::DeactivatePage( SfxItemSet* pSetP ) +int ScTabPageSortFields::DeactivatePage( SfxItemSet* pSetP ) { if ( pDlg ) { @@ -614,7 +615,7 @@ ScTabPageSortOptions::ScTabPageSortOptions( Window* pParent, // ----------------------------------------------------------------------- -__EXPORT ScTabPageSortOptions::~ScTabPageSortOptions() +ScTabPageSortOptions::~ScTabPageSortOptions() { #if !TEST_LAYOUT USHORT nEntries = aLbOutPos.GetEntryCount(); @@ -737,7 +738,7 @@ void ScTabPageSortOptions::Init() //------------------------------------------------------------------------ -USHORT* __EXPORT ScTabPageSortOptions::GetRanges() +USHORT* ScTabPageSortOptions::GetRanges() { return pSortRanges; } @@ -747,7 +748,7 @@ USHORT* __EXPORT ScTabPageSortOptions::GetRanges() #if ENABLE_LAYOUT #undef SfxTabPage #endif /* ENABLE_LAYOUT */ -SfxTabPage* __EXPORT ScTabPageSortOptions::Create( +SfxTabPage* ScTabPageSortOptions::Create( Window* pParent, const SfxItemSet& rArgSet ) { @@ -756,7 +757,7 @@ SfxTabPage* __EXPORT ScTabPageSortOptions::Create( // ----------------------------------------------------------------------- -void __EXPORT ScTabPageSortOptions::Reset( const SfxItemSet& /* rArgSet */ ) +void ScTabPageSortOptions::Reset( const SfxItemSet& /* rArgSet */ ) { if ( rSortData.bUserDef ) { @@ -826,7 +827,7 @@ void __EXPORT ScTabPageSortOptions::Reset( const SfxItemSet& /* rArgSet */ ) // ----------------------------------------------------------------------- -BOOL __EXPORT ScTabPageSortOptions::FillItemSet( SfxItemSet& rArgSet ) +BOOL ScTabPageSortOptions::FillItemSet( SfxItemSet& rArgSet ) { ScSortParam theSortData = rSortData; if (pDlg) @@ -877,7 +878,7 @@ BOOL __EXPORT ScTabPageSortOptions::FillItemSet( SfxItemSet& rArgSet ) // fuer Datenaustausch ohne Dialog-Umweg: (! noch zu tun !) // void ScTabPageSortOptions::ActivatePage( const SfxItemSet& rSet ) -void __EXPORT ScTabPageSortOptions::ActivatePage() +void ScTabPageSortOptions::ActivatePage() { if ( pDlg ) { @@ -900,7 +901,7 @@ void __EXPORT ScTabPageSortOptions::ActivatePage() // ----------------------------------------------------------------------- -int __EXPORT ScTabPageSortOptions::DeactivatePage( SfxItemSet* pSetP ) +int ScTabPageSortOptions::DeactivatePage( SfxItemSet* pSetP ) { BOOL bPosInputOk = TRUE; @@ -1036,7 +1037,7 @@ IMPL_LINK( ScTabPageSortOptions, SortDirHdl, RadioButton *, pBtn ) // ----------------------------------------------------------------------- -void __EXPORT ScTabPageSortOptions::EdOutPosModHdl( Edit* pEd ) +void ScTabPageSortOptions::EdOutPosModHdl( Edit* pEd ) { if ( pEd == &aEdOutPos ) { @@ -1103,3 +1104,4 @@ IMPL_LINK( ScTabPageSortOptions, FillAlgorHdl, void *, EMPTYARG ) } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/workben/layout/tpsort.hxx b/toolkit/workben/layout/tpsort.hxx index 9cc851914fd5..64e4f4b6de42 100644 --- a/toolkit/workben/layout/tpsort.hxx +++ b/toolkit/workben/layout/tpsort.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -215,3 +216,4 @@ private: #endif // SC_TPSORT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/workben/layout/uno.hxx b/toolkit/workben/layout/uno.hxx index 89b1bedd4e11..94a70e9fdc1e 100644 --- a/toolkit/workben/layout/uno.hxx +++ b/toolkit/workben/layout/uno.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -53,7 +54,7 @@ public: virtual com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SAL_CALL createInstance( const rtl::OUString& aServiceSpecifier ) throw (com::sun::star::uno::Exception, com::sun::star::uno::RuntimeException) { - if ( aServiceSpecifier.equalsAscii( "com.sun.star.awt.Layout" ) ) + if ( aServiceSpecifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.awt.Layout" ) ) ) { fprintf( stderr, "UnoBootstrapLayout: create service '%s'\n", rtl::OUStringToOString (aServiceSpecifier, RTL_TEXTENCODING_UTF8 ).getStr() ); @@ -104,3 +105,5 @@ public: }; #endif /* _LAYOUT_UNO_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/workben/layout/wordcount-plain.xml b/toolkit/workben/layout/wordcount-plain.xml index a7c34fe5a16f..5adce42acdbd 100644 --- a/toolkit/workben/layout/wordcount-plain.xml +++ b/toolkit/workben/layout/wordcount-plain.xml @@ -1,6 +1,6 @@ -<modaldialog sizeable="true" height="108" help-id="HID_DLG_WORDCOUNT" moveable="true" output-size="true" id="DLG_WORDCOUNT" sv-look="true" text="Word Count" width="170" xmlns="http://openoffice.org/2007/layout" xmlns:cnt="http://openoffice.org/2007/layout/container"> +<modaldialog sizeable="true" height="132" help-id="HID_DLG_WORDCOUNT" moveable="true" output-size="true" id="DLG_WORDCOUNT" sv-look="true" text="Word Count" width="170" xmlns="http://openoffice.org/2007/layout" xmlns:cnt="http://openoffice.org/2007/layout/container"> <vbox> <fixedline height="8" id="FL_CURRENT" text="Current selection" width="158" x="6" y="3"/> <hbox> @@ -11,19 +11,27 @@ <fixedtext height="8" id="FT_CURRENTCHARACTER" label="Characters:" width="80" x="12" y="26"/> <fixedtext height="8" id="FI_CURRENTCHARACTER" right="true" width="50" x="111" y="26"/> </hbox> - <fixedline height="8" id="FL_DOC" text="Whole document" width="158" x="6" y="40"/> <hbox> - <fixedtext height="8" id="FT_DOCWORD" label="Words:" width="80" x="12" y="51"/> - <fixedtext height="8" id="FI_DOCWORD" right="true" width="50" x="111" y="51"/> + <fixedtext height="8" id="FT_CURRENTCHARACTEREXCLUDINGSPACES" label="Characters excluding spaces:" width="80" x="12" y="38"/> + <fixedtext height="8" id="FI_CURRENTCHARACTEREXCLUDINGSPACES" right="true" width="50" x="111" y="38"/> </hbox> + <fixedline height="8" id="FL_DOC" text="Whole document" width="158" x="6" y="52"/> <hbox> - <fixedtext height="8" id="FT_DOCCHARACTER" label="Characters:" width="80" x="12" y="63"/> - <fixedtext height="8" id="FI_DOCCHARACTER" right="true" width="50" x="111" y="63"/> + <fixedtext height="8" id="FT_DOCWORD" label="Words:" width="80" x="12" y="63"/> + <fixedtext height="8" id="FI_DOCWORD" right="true" width="50" x="111" y="63"/> </hbox> - <fixedline height="8" id="FL_BOTTOM" width="158" x="6" y="77"/> <hbox> - <okbutton defbutton="true" height="14" id="PB_OK" width="50" x="61" y="88"/> - <helpbutton height="14" id="PB_HELP" width="50" x="114" y="88"/> + <fixedtext height="8" id="FT_DOCCHARACTER" label="Characters:" width="80" x="12" y="75"/> + <fixedtext height="8" id="FI_DOCCHARACTER" right="true" width="50" x="111" y="75"/> + </hbox> + <hbox> + <fixedtext height="8" id="FT_DOCCHARACTEREXCLUDINGSPACES" label="Characters excluding spaces:" width="80" x="12" y="87"/> + <fixedtext height="8" id="FI_DOCCHARACTEREXCLUDINGSPACES" right="true" width="50" x="111" y="87"/> + </hbox> + <fixedline height="8" id="FL_BOTTOM" width="158" x="6" y="101"/> + <hbox> + <okbutton defbutton="true" height="14" id="PB_OK" width="50" x="61" y="112"/> + <helpbutton height="14" id="PB_HELP" width="50" x="114" y="112"/> </hbox> </vbox> </modaldialog> diff --git a/toolkit/workben/layout/wordcount-tight.xml b/toolkit/workben/layout/wordcount-tight.xml index a9f6a7a09393..bcf6a6d86fca 100644 --- a/toolkit/workben/layout/wordcount-tight.xml +++ b/toolkit/workben/layout/wordcount-tight.xml @@ -16,14 +16,22 @@ <fixedtext id="FT_CURRENTCHARACTER" label="Characters:" cnt:padding="13"/> <fixedinfo id="FI_CURRENTCHARACTER" right="true" label="00" cnt:padding="13"/> </hbox> + <hbox> + <fixedtext id="FT_CURRENTCHARACTEREXCLUDINGSPACES" label="Characters excluding spaces:" cnt:padding="13"/> + <fixedinfo id="FI_CURRENTCHARACTEREXCLUDINGSPACES" right="true" label="000" cnt:padding="13"/> + </hbox> <fixedline id="FL_DOC" text="Whole document"/> <hbox> <fixedtext id="FT_DOCWORD" label="Words:" cnt:padding="13"/> - <fixedinfo id="FI_DOCWORD" right="true" label="000" cnt:padding="13"/> + <fixedinfo id="FI_DOCWORD" right="true" label="0000" cnt:padding="13"/> </hbox> <hbox> <fixedtext id="FT_DOCCHARACTER" label="Characters:" cnt:padding="13"/> - <fixedinfo id="FI_DOCCHARACTER" right="true" label="0000" cnt:padding="13"/> + <fixedinfo id="FI_DOCCHARACTER" right="true" label="00000" cnt:padding="13"/> + </hbox> + <hbox> + <fixedtext id="FT_DOCCHARACTEREXCLUDINGSPACES" label="Characters excluding spaces:" cnt:padding="13"/> + <fixedinfo id="FI_DOCCHARACTEREXCLUDINGSPACES" right="true" label="000000" cnt:padding="13"/> </hbox> <fixedline cnt:padding="1" id="FL_BOTTOM"/> <hbox border="5"> diff --git a/toolkit/workben/layout/wordcount.xml b/toolkit/workben/layout/wordcount.xml index fa9d44f896ad..4b4e362e8583 100644 --- a/toolkit/workben/layout/wordcount.xml +++ b/toolkit/workben/layout/wordcount.xml @@ -23,6 +23,11 @@ <flow cnt:padding="60"/> <fixedtext id="FI_CURRENTCHARACTER" right="true" _label="00"/> </hbox> + <hbox> + <fixedtext id="FT_CURRENTCHARACTEREXCLUDINGSPACES" _label="Characters excluding spaces:"/> + <flow cnt:padding="60"/> + <fixedtext id="FI_CURRENTCHARACTEREXCLUDINGSPACES" right="true" _label="000"/> + </hbox> </vbox> </hbox> <!-- if we could do cnt:cnt:padding="-12" here, we would not have to close @@ -32,11 +37,15 @@ <vbox cnt:padding="12" spacing="6"> <hbox> <fixedtext id="FT_DOCWORD" _label="Words:"/> - <fixedtext id="FI_DOCWORD" right="true" _label="000"/> + <fixedtext id="FI_DOCWORD" right="true" _label="0000"/> </hbox> <hbox> <fixedtext id="FT_DOCCHARACTER" _label="Characters:"/> - <fixedtext id="FI_DOCCHARACTER" right="true" _label="0000"/> + <fixedtext id="FI_DOCCHARACTER" right="true" _label="00000"/> + </hbox> + <hbox> + <fixedtext id="FT_DOCCHARACTEREXCLUDINGSPACES" _label="Characters excluding spaces:"/> + <fixedtext id="FI_DOCCHARACTEREXCLUDINGSPACES" right="true" _label="000000"/> </hbox> </vbox> </hbox> diff --git a/toolkit/workben/layout/wordcountdialog.cxx b/toolkit/workben/layout/wordcountdialog.cxx index 0f391f7f7d5e..da0083e09456 100644 --- a/toolkit/workben/layout/wordcountdialog.cxx +++ b/toolkit/workben/layout/wordcountdialog.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -53,9 +54,6 @@ #include <helpid.h> #endif /* ENABLE_LAYOUT */ -/*-- 06.04.2004 16:05:55--------------------------------------------------- - - -----------------------------------------------------------------------*/ SwWordCountDialog::SwWordCountDialog(Window* pParent) : SfxModalDialog(pParent, SW_RES(DLG_WORDCOUNT)), #if defined _MSC_VER @@ -66,12 +64,16 @@ SwWordCountDialog::SwWordCountDialog(Window* pParent) : aCurrentWordFI( this, SW_RES( FI_CURRENTWORD )), aCurrentCharacterFT( this, SW_RES( FT_CURRENTCHARACTER )), aCurrentCharacterFI( this, SW_RES( FI_CURRENTCHARACTER )), + aCurrentCharacterExcludingSpacesFT( this, SW_RES( FT_CURRENTCHARACTEREXCLUDINGSPACES )), + aCurrentCharacterExcludingSpacesFI( this, SW_RES( FI_CURRENTCHARACTEREXCLUDINGSPACES )), aDocFL( this, SW_RES( FL_DOC )), aDocWordFT( this, SW_RES( FT_DOCWORD )), aDocWordFI( this, SW_RES( FI_DOCWORD )), aDocCharacterFT( this, SW_RES( FT_DOCCHARACTER )), aDocCharacterFI( this, SW_RES( FI_DOCCHARACTER )), + aDocCharacterExcludingSpacesFT( this, SW_RES( FT_DOCCHARACTEREXCLUDINGSPACES )), + aDocCharacterExcludingSpacesFI( this, SW_RES( FI_DOCCHARACTEREXCLUDINGSPACES )), aBottomFL(this, SW_RES( FL_BOTTOM )), aOK( this, SW_RES( PB_OK )), aHelp( this, SW_RES( PB_HELP )) @@ -84,15 +86,11 @@ SwWordCountDialog::SwWordCountDialog(Window* pParent) : #endif /* ENABLE_LAYOUT */ FreeResource(); } -/*-- 06.04.2004 16:05:56--------------------------------------------------- - -----------------------------------------------------------------------*/ SwWordCountDialog::~SwWordCountDialog() { } -/*-- 06.04.2004 16:05:57--------------------------------------------------- - -----------------------------------------------------------------------*/ void SwWordCountDialog::SetValues(const SwDocStat& rCurrent, const SwDocStat& rDoc) { #if TEST_LAYOUT @@ -101,10 +99,13 @@ void SwWordCountDialog::SetValues(const SwDocStat& rCurrent, const SwDocStat& r #else /* !TEST_LAYOUT */ aCurrentWordFI.SetText( String::CreateFromInt32(rCurrent.nWord )); aCurrentCharacterFI.SetText(String::CreateFromInt32(rCurrent.nChar )); + aCurrentCharacterExcludingSpacesFI.SetText(String::CreateFromInt32(rCurrent.nCharExcludingSpaces )); aDocWordFI.SetText( String::CreateFromInt32(rDoc.nWord )); aDocCharacterFI.SetText( String::CreateFromInt32(rDoc.nChar )); + aDocCharacterExcludingSpacesFI.SetText( String::CreateFromInt32(rDoc.nCharExcludingSpaces )); #endif /* !TEST_LAYOUT */ } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/workben/layout/wordcountdialog.hxx b/toolkit/workben/layout/wordcountdialog.hxx index a228b8bdea77..5c6dbabea04f 100644 --- a/toolkit/workben/layout/wordcountdialog.hxx +++ b/toolkit/workben/layout/wordcountdialog.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,9 +29,7 @@ #define SW_WORDCOUNTDIALOG_HXX #include <sfx2/basedlgs.hxx> #include <svtools/stdctrl.hxx> -#ifndef _SV_BUTTON_HXX #include <vcl/button.hxx> -#endif #include <layout/layout.hxx> #include <layout/layout-pre.hxx> struct SwDocStat; @@ -41,12 +40,16 @@ class SwWordCountDialog : public SfxModalDialog FixedInfo aCurrentWordFI; FixedText aCurrentCharacterFT; FixedInfo aCurrentCharacterFI; + FixedText aCurrentCharacterExcludingSpacesFT; + FixedInfo aCurrentCharacterExcludingSpacesFI; FixedLine aDocFL; FixedText aDocWordFT; FixedInfo aDocWordFI; FixedText aDocCharacterFT; FixedInfo aDocCharacterFI; + FixedText aDocCharacterExcludingSpacesFT; + FixedInfo aDocCharacterExcludingSpacesFI; FixedLine aBottomFL; @@ -63,3 +66,5 @@ public: #include <layout/layout-post.hxx> #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/workben/layout/zoom.cxx b/toolkit/workben/layout/zoom.cxx index bf27ad3feaf6..d05074908475 100644 --- a/toolkit/workben/layout/zoom.cxx +++ b/toolkit/workben/layout/zoom.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -91,16 +92,6 @@ struct SvxViewLayoutItem : public LAYOUT_SfxPoolItem void SetBookMode( bool ) { } -#if 0 // needed for real SfxPoolItem - int operator==( const SfxPoolItem& ) const - { - return 0; - } - SfxPoolItem* Clone( SfxItemPool* ) const - { - return 0; - } -#endif }; #else /* !TEST_LAYOUT */ #include <svx/zoomitem.hxx> @@ -206,7 +197,7 @@ void SvxZoomDialog::SetButtonText( USHORT nBtnId, const String& rNewTxt ) break; default: - DBG_ERROR( "wrong button number" ); + OSL_FAIL( "wrong button number" ); } } @@ -229,7 +220,7 @@ void SvxZoomDialog::HideButton( USHORT nBtnId ) break; default: - DBG_ERROR( "Falsche Button-Nummer!!!" ); + OSL_FAIL( "Falsche Button-Nummer!!!" ); } } @@ -507,7 +498,7 @@ IMPL_LINK( SvxZoomDialog, ViewLayoutUserHdl, RadioButton *, pBtn ) } else { - DBG_ERROR( "Wrong Button" ); + OSL_FAIL( "Wrong Button" ); return 0; } @@ -594,7 +585,7 @@ IMPL_LINK( SvxZoomDialog, OKHdl, Button *, pBtn ) } else { - DBG_ERROR( "Wrong Button" ); + OSL_FAIL( "Wrong Button" ); return 0; } #if !TEST_LAYOUT @@ -620,3 +611,4 @@ IMPL_LINK( SvxZoomDialog, OKHdl, Button *, pBtn ) } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/workben/layout/zoom.hxx b/toolkit/workben/layout/zoom.hxx index f0c617a4b4d6..0fab50eb1ced 100644 --- a/toolkit/workben/layout/zoom.hxx +++ b/toolkit/workben/layout/zoom.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -31,9 +32,7 @@ #include <layout/layout.hxx> #include <sfx2/basedlgs.hxx> -#ifndef _SV_BUTTON_HXX //autogen wg. Radio-/OK-/Cancel-/HelpButton #include <vcl/button.hxx> -#endif #include <vcl/field.hxx> #include <vcl/fixed.hxx> @@ -43,9 +42,7 @@ #define ZOOMBTN_PAGEWIDTH ((USHORT)0x0002) #define ZOOMBTN_WHOLEPAGE ((USHORT)0x0004) */ -#ifndef _SVX_ZOOM_HXX #include "zoom_def.hxx" -#endif // class SvxZoomDialog --------------------------------------------------- /* {k:\svx\prototyp\dialog\zoom.bmp} @@ -121,3 +118,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/workben/layout/zoom_def.hxx b/toolkit/workben/layout/zoom_def.hxx index 5af749f2abde..84b2db945a6e 100644 --- a/toolkit/workben/layout/zoom_def.hxx +++ b/toolkit/workben/layout/zoom_def.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -33,3 +34,5 @@ #define ZOOMBTN_WHOLEPAGE ((USHORT)0x0004) #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/workben/unodialog.cxx b/toolkit/workben/unodialog.cxx index 052ece9ac7fd..4652457766c2 100644 --- a/toolkit/workben/unodialog.cxx +++ b/toolkit/workben/unodialog.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -27,7 +28,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_toolkit.hxx" -#include <tools/svwin.h> #include <sal/main.h> #include <com/sun/star/awt/XToolkit.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> @@ -56,7 +56,6 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::connection; -using namespace ::vos; using namespace ::rtl; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::registry; @@ -216,7 +215,8 @@ void Main( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMult xPSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "PositionX" ) ), aValue ); MyWin * pWindow; - ::osl::Guard< vos::IMutex > aVclGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aVclGuard; + pWindow = new MyWin(); pWindow->Show(); @@ -267,3 +267,4 @@ void MyWin::Paint( const Rectangle& r ) mxView->draw( 50, 50 ); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |