diff options
author | Matthias Huetsch [mhu] <matthias.huetsch@oracle.com> | 2011-01-27 18:16:28 +0100 |
---|---|---|
committer | Matthias Huetsch [mhu] <matthias.huetsch@oracle.com> | 2011-01-27 18:16:28 +0100 |
commit | 45893f9a2740eb9c291476df4eaa3700003f0efd (patch) | |
tree | a7e2381af1a4136eb18b89b55af639306c9fc2c0 /svtools | |
parent | e3f92103a5a14baf81c7f4fca6bc8fb4f3741e1d (diff) | |
parent | ffd600e777970df0908125da66b280e1b00dbec9 (diff) |
Update from master repository (DEV300_m98).
Diffstat (limited to 'svtools')
314 files changed, 5404 insertions, 11562 deletions
diff --git a/svtools/source/java/makefile.mk b/svtools/AllLangResTarget_productregistration.mk index 6db57388dca0..af510d338c6e 100644 --- a/svtools/source/java/makefile.mk +++ b/svtools/AllLangResTarget_productregistration.mk @@ -2,7 +2,7 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2000, 2010 Oracle and/or its affiliates. +# Copyright 2009 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite # @@ -14,41 +14,37 @@ # # OpenOffice.org is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License version 3 for more details # (a copy is included in the LICENSE file that accompanied this code). # # You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see +# version 3 along with OpenOffice.org. If not, see # <http://www.openoffice.org/license.html> # for a copy of the LGPLv3 License. # #************************************************************************* -PRJ=..$/.. +$(eval $(call gb_AllLangResTarget_AllLangResTarget,productregistration)) -PRJNAME=svtools -TARGET=java -ENABLE_EXCEPTIONS=TRUE +$(eval $(call gb_AllLangResTarget_set_reslocation,productregistration,svtools)) -# --- Settings ----------------------------------------------------- +$(eval $(call gb_AllLangResTarget_add_srs,productregistration,\ + svt/productregistration \ +)) -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svt.pmk +$(eval $(call gb_SrsTarget_SrsTarget,svt/productregistration)) -# --- Files -------------------------------------------------------- +$(eval $(call gb_SrsTarget_set_include,svt/productregistration,\ + $$(INCLUDE) \ + -I$(WORKDIR)/inc \ + -I$(SRCDIR)/svtools/source/inc \ + -I$(SRCDIR)/svtools/inc/ \ + -I$(SRCDIR)/svtools/inc/svtools \ +)) -SRS1NAME= javaerror -SRC1FILES= javaerror.src +$(eval $(call gb_SrsTarget_add_files,svt/productregistration,\ + svtools/source/productregistration/registrationdlg.src \ +)) -SRS2NAME= patchjavaerror -SRC2FILES= patchjavaerror.src - -SLOFILES= \ - $(SLO)$/javainteractionhandler.obj \ - $(SLO)$/javacontext.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/svtools/AllLangResTarget_svt.mk b/svtools/AllLangResTarget_svt.mk new file mode 100644 index 000000000000..c41bc9d6b29e --- /dev/null +++ b/svtools/AllLangResTarget_svt.mk @@ -0,0 +1,75 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_AllLangResTarget_AllLangResTarget,svt)) + +$(eval $(call gb_AllLangResTarget_set_reslocation,svt,svtools)) + +$(eval $(call gb_AllLangResTarget_add_srs,svt,\ + svt/res \ +)) + +$(eval $(call gb_SrsTarget_SrsTarget,svt/res)) + +$(eval $(call gb_SrsTarget_set_include,svt/res,\ + $$(INCLUDE) \ + -I$(WORKDIR)/inc \ + -I$(SRCDIR)/svtools/source/uno \ + -I$(SRCDIR)/svtools/source/inc \ + -I$(SRCDIR)/svtools/inc/ \ + -I$(SRCDIR)/svtools/inc/svtools \ +)) + +$(eval $(call gb_SrsTarget_add_files,svt/res,\ + svtools/source/brwbox/editbrowsebox.src \ + svtools/source/contnr/fileview.src \ + svtools/source/contnr/svcontnr.src \ + svtools/source/contnr/templwin.src \ + svtools/source/control/calendar.src \ + svtools/source/control/ctrlbox.src \ + svtools/source/control/ctrltool.src \ + svtools/source/control/filectrl.src \ + svtools/source/dialogs/addresstemplate.src \ + svtools/source/dialogs/colrdlg.src \ + svtools/source/dialogs/filedlg2.src \ + svtools/source/dialogs/formats.src \ + svtools/source/dialogs/prnsetup.src \ + svtools/source/dialogs/so3res.src \ + svtools/source/dialogs/wizardmachine.src \ + svtools/source/filter.vcl/filter/exportdialog.src \ + svtools/source/java/javaerror.src \ + svtools/source/misc/ehdl.src \ + svtools/source/misc/helpagent.src \ + svtools/source/misc/imagemgr.src \ + svtools/source/misc/langtab.src \ + svtools/source/misc/undo.src \ + svtools/source/plugapp/testtool.src \ + svtools/source/toolpanel/toolpanel.src \ +)) + + +# vim: set noet sw=4 ts=4: diff --git a/svtools/Executable_bmp.mk b/svtools/Executable_bmp.mk new file mode 100644 index 000000000000..67b21600e523 --- /dev/null +++ b/svtools/Executable_bmp.mk @@ -0,0 +1,86 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Executable_Executable,bmp)) + +$(eval $(call gb_Executable_set_include,bmp,\ + $$(INCLUDE) \ + -I$(WORKDIR)/inc/svtools \ + -I$(WORKDIR)/inc/ \ + -I$(OUTDIR)/inc/ \ + -I$(SRCDIR)/svtools/inc \ + -I$(SRCDIR)/svtools/inc/svtools \ + -I$(SRCDIR)/svtools/source/inc \ + -I$(SRCDIR)/svtools/inc/pch \ + -I$(OUTDIR)/inc/offuh \ +)) + +$(eval $(call gb_Executable_add_linked_libs,bmp,\ + sal \ + stl \ + tl \ + vcl \ + vos3 \ +)) + +$(eval $(call gb_Executable_add_exception_objects,bmp,\ + svtools/bmpmaker/bmp \ + svtools/bmpmaker/bmpcore \ +)) + +ifeq ($(OS),WNT) +ifneq ($(USE_MINGW),) +$(eval $(call gb_Executable_add_linked_libs,bmp,\ + mingwthrd \ + $(gb_MINGW_LIBSTDCPP) \ + mingw32 \ + $(gb_MINGW_LIBGCC) \ + uwinapi \ + moldname \ + mingwex \ + kernel32 \ + msvcrt \ + user32 \ +)) +else +$(eval $(call gb_Executable_add_linked_libs,bmp,\ + kernel32 \ + msvcrt \ + oldnames \ + user32 \ + uwinapi \ +)) +endif +endif + +ifeq ($(OS),LINUX) +$(eval $(call gb_Executable_add_linked_libs,bmp,\ + dl \ + pthread \ +)) +endif +# vim: set noet sw=4 ts=4: diff --git a/svtools/Executable_bmpsum.mk b/svtools/Executable_bmpsum.mk new file mode 100644 index 000000000000..6b2c0466f0ec --- /dev/null +++ b/svtools/Executable_bmpsum.mk @@ -0,0 +1,82 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Executable_Executable,bmpsum)) + +$(eval $(call gb_Executable_set_include,bmpsum,\ + $$(INCLUDE) \ + -I$(OUTDIR)/inc/ \ + -I$(OUTDIR)/inc/offuh/ \ + -I$(SRCDIR)/svtools/inc/ \ + -I$(SRCDIR)/svtools/inc/pch/ \ + -I$(SRCDIR)/svtools/inc/svtools/ \ +)) + +$(eval $(call gb_Executable_add_linked_libs,bmpsum,\ + sal \ + stl \ + tl \ + vcl \ + vos3 \ +)) + +$(eval $(call gb_Executable_add_exception_objects,bmpsum,\ + svtools/bmpmaker/bmpsum \ +)) + +ifeq ($(OS),WNT) +ifneq ($(USE_MINGW),) +$(eval $(call gb_Executable_add_linked_libs,bmpsum,\ + mingwthrd \ + $(gb_MINGW_LIBSTDCPP) \ + mingw32 \ + $(gb_MINGW_LIBGCC) \ + uwinapi \ + moldname \ + mingwex \ + kernel32 \ + msvcrt \ + user32 \ +)) +else +$(eval $(call gb_Executable_add_linked_libs,bmpsum,\ + kernel32 \ + msvcrt \ + oldnames \ + user32 \ + uwinapi \ +)) +endif +endif + +ifeq ($(OS),LINUX) +$(eval $(call gb_Executable_add_linked_libs,bmpsum,\ + dl \ + pthread \ +)) +endif +# vim: set noet sw=4 ts=4: diff --git a/svtools/Executable_g2g.mk b/svtools/Executable_g2g.mk new file mode 100644 index 000000000000..d6b96970eacc --- /dev/null +++ b/svtools/Executable_g2g.mk @@ -0,0 +1,83 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Executable_Executable,g2g)) + +$(eval $(call gb_Executable_set_include,g2g,\ + $$(INCLUDE) \ + -I$(OUTDIR)/inc/ \ + -I$(OUTDIR)/inc/offuh/ \ + -I$(SRCDIR)/svtools/inc/ \ + -I$(SRCDIR)/svtools/inc/pch/ \ + -I$(SRCDIR)/svtools/inc/svtools/ \ +)) + +$(eval $(call gb_Executable_add_linked_libs,g2g,\ + jvmfwk \ + sal \ + stl \ + svt \ + tl \ + vcl \ + vos3 \ +)) + +$(eval $(call gb_Executable_add_exception_objects,g2g,\ + svtools/bmpmaker/g2g \ +)) +ifeq ($(OS),WNT) +ifneq ($(USE_MINGW),) +$(eval $(call gb_Executable_add_linked_libs,g2g,\ + mingwthrd \ + $(gb_MINGW_LIBSTDCPP) \ + mingw32 \ + $(gb_MINGW_LIBGCC) \ + uwinapi \ + moldname \ + mingwex \ + kernel32 \ + msvcrt \ + user32 \ +)) +else +$(eval $(call gb_Executable_add_linked_libs,g2g,\ + kernel32 \ + msvcrt \ + oldnames \ + user32 \ + uwinapi \ +)) +endif +endif +ifeq ($(OS),LINUX) +$(eval $(call gb_Executable_add_linked_libs,g2g,\ + pthread \ + dl \ + X11 \ +)) +endif +# vim: set noet sw=4 ts=4: diff --git a/svtools/Library_hatchwindowfactory.mk b/svtools/Library_hatchwindowfactory.mk new file mode 100644 index 000000000000..3e96d22588c8 --- /dev/null +++ b/svtools/Library_hatchwindowfactory.mk @@ -0,0 +1,91 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Library_Library,hatchwindowfactory)) + +$(eval $(call gb_Library_set_componentfile,hatchwindowfactory,svtools/source/hatchwindow/hatchwindowfactory)) + +$(eval $(call gb_Library_set_include,hatchwindowfactory,\ + $$(INCLUDE) \ + -I$(WORKDIR)/inc/svtools \ + -I$(WORKDIR)/inc/ \ + -I$(SRCDIR)/svtools/inc/pch/ \ + -I$(OUTDIR)/inc/ \ + -I$(SRCDIR)/svtools/inc \ + -I$(OUTDIR)/inc/offuh \ + -I$(OUTDIR)/inc \ +)) + +$(eval $(call gb_Library_add_linked_libs,hatchwindowfactory,\ + cppu \ + cppuhelper \ + sal \ + tk \ + tl \ + vcl \ +)) + +$(eval $(call gb_Library_add_exception_objects,hatchwindowfactory,\ + svtools/source/hatchwindow/documentcloser \ + svtools/source/hatchwindow/hatchwindow \ + svtools/source/hatchwindow/hatchwindowfactory \ + svtools/source/hatchwindow/ipwin \ +)) + +ifeq ($(OS),LINUX) +$(eval $(call gb_Library_add_linked_libs,hatchwindowfactory,\ + dl \ + m \ + pthread \ +)) +endif +ifeq ($(OS),WNT) +ifneq ($(USE_MINGW),) +$(eval $(call gb_Library_add_linked_libs,hatchwindowfactory,\ + mingwthrd \ + $(gb_MINGW_LIBSTDCPP) \ + mingw32 \ + $(gb_MINGW_LIBGCC) \ + uwinapi \ + moldname \ + mingwex \ + kernel32 \ + msvcrt \ + user32 \ +)) +else +$(eval $(call gb_Library_add_linked_libs,hatchwindowfactory,\ + kernel32 \ + msvcrt \ + oldnames \ + stl \ + user32 \ + uwinapi \ +)) +endif +endif +# vim: set noet sw=4 ts=4: diff --git a/svtools/Library_productregistration.mk b/svtools/Library_productregistration.mk new file mode 100644 index 000000000000..5df44f631097 --- /dev/null +++ b/svtools/Library_productregistration.mk @@ -0,0 +1,92 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Library_Library,productregistration)) + +$(eval $(call gb_Library_set_componentfile,productregistration,svtools/source/productregistration/productregistration.uno)) + +$(eval $(call gb_Library_set_include,productregistration,\ + $$(SOLARINC) \ + -I$(WORKDIR)/inc/svtools \ + -I$(WORKDIR)/inc/ \ + -I$(SRCDIR)/svtools/inc/pch/ \ + -I$(OUTDIR)/inc/ \ + -I$(SRCDIR)/svtools/inc \ + -I$(OUTDIR)/inc/offuh \ + -I$(OUTDIR)/inc \ +)) + +$(eval $(call gb_Library_add_linked_libs,productregistration,\ + cppu \ + cppuhelper \ + sal \ + stl \ + svl \ + tk \ + tl \ + utl \ + vcl \ +)) + +$(eval $(call gb_Library_add_exception_objects,productregistration,\ + svtools/source/productregistration/productregistration \ + svtools/source/productregistration/registrationdlg \ +)) + +ifeq ($(OS),LINUX) +$(eval $(call gb_Library_add_linked_libs,productregistration,\ + dl \ + m \ + pthread \ +)) +endif + +ifeq ($(OS),WNT) +ifneq ($(USE_MINGW),) +$(eval $(call gb_Library_add_linked_libs,productregistration,\ + mingwthrd \ + $(gb_MINGW_LIBSTDCPP) \ + mingw32 \ + $(gb_MINGW_LIBGCC) \ + uwinapi \ + moldname \ + mingwex \ + kernel32 \ + msvcrt \ + user32 \ +)) +else +$(eval $(call gb_Library_add_linked_libs,productregistration,\ + kernel32 \ + msvcrt \ + oldnames \ + user32 \ + uwinapi \ +)) +endif +endif +# vim: set noet sw=4 ts=4: diff --git a/svtools/Library_svt.mk b/svtools/Library_svt.mk new file mode 100644 index 000000000000..fb0fae66ca12 --- /dev/null +++ b/svtools/Library_svt.mk @@ -0,0 +1,335 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Library_Library,svt)) + +$(eval $(call gb_Library_add_package_headers,svt,svtools_inc)) + +$(eval $(call gb_Library_add_precompiled_header,svt,$(SRCDIR)/svtools/inc/pch/precompiled_svtools)) + +$(eval $(call gb_Library_set_componentfile,svt,svtools/util/svt)) + +$(eval $(call gb_Library_set_include,svt,\ + $$(INCLUDE) \ + -I$(WORKDIR)/inc/svtools \ + -I$(WORKDIR)/inc/ \ + -I$(OUTDIR)/inc/ \ + -I$(SRCDIR)/svtools/inc \ + -I$(SRCDIR)/svtools/inc/svtools \ + -I$(SRCDIR)/svtools/source/inc \ + -I$(SRCDIR)/svtools/inc/pch \ + -I$(OUTDIR)/inc/offuh \ + -I$(OUTDIR)/inc \ +)) + +$(eval $(call gb_Library_set_defs,svt,\ + $$(DEFS) \ + -DSVT_DLLIMPLEMENTATION \ +)) + +$(eval $(call gb_Library_add_linked_libs,svt,\ + basegfx \ + comphelper \ + cppu \ + cppuhelper \ + i18nisolang1 \ + i18nutil \ + icuuc \ + jvmfwk \ + sal \ + sot \ + stl \ + svl \ + tk \ + tl \ + ucbhelper \ + utl \ + vcl \ + vos3 \ +)) + +ifeq ($(SYSTEM_JPEG),YES) +$(eval $(call gb_Library_add_linked_libs,svt,\ + jpeg \ +)) +$(eval $(call gb_Library_set_ldflags,svt,\ + $$(filter-out -L/usr/lib/jvm%,$$(LDFLAGS)) \ +)) +else +$(eval $(call gb_Library_add_linked_static_libs,svt,\ + jpeglib \ +)) +endif + +$(eval $(call gb_Library_add_exception_objects,svt,\ + svtools/source/brwbox/brwbox1 \ + svtools/source/brwbox/brwbox2 \ + svtools/source/brwbox/brwbox3 \ + svtools/source/brwbox/brwhead \ + svtools/source/brwbox/datwin \ + svtools/source/brwbox/ebbcontrols \ + svtools/source/brwbox/editbrowsebox \ + svtools/source/brwbox/editbrowsebox2 \ + svtools/source/config/accessibilityoptions \ + svtools/source/config/apearcfg \ + svtools/source/config/colorcfg \ + svtools/source/config/extcolorcfg \ + svtools/source/config/fontsubstconfig \ + svtools/source/config/helpopt \ + svtools/source/config/htmlcfg \ + svtools/source/config/itemholder2 \ + svtools/source/config/menuoptions \ + svtools/source/config/miscopt \ + svtools/source/config/optionsdrawinglayer \ + svtools/source/config/printoptions \ + svtools/source/contnr/contentenumeration \ + svtools/source/contnr/fileview \ + svtools/source/contnr/imivctl1 \ + svtools/source/contnr/imivctl2 \ + svtools/source/contnr/ivctrl \ + svtools/source/contnr/svicnvw \ + svtools/source/contnr/svimpbox \ + svtools/source/contnr/svimpicn \ + svtools/source/contnr/svlbitm \ + svtools/source/contnr/svlbox \ + svtools/source/contnr/svtabbx \ + svtools/source/contnr/svtreebx \ + svtools/source/contnr/templwin \ + svtools/source/contnr/tooltiplbox \ + svtools/source/contnr/treelist \ + svtools/source/control/asynclink \ + svtools/source/control/calendar \ + svtools/source/control/collatorres \ + svtools/source/control/ctrlbox \ + svtools/source/control/ctrltool \ + svtools/source/control/filectrl \ + svtools/source/control/filectrl2 \ + svtools/source/control/fileurlbox \ + svtools/source/control/fixedhyper \ + svtools/source/control/fmtfield \ + svtools/source/control/headbar \ + svtools/source/control/hyperlabel \ + svtools/source/control/indexentryres \ + svtools/source/control/inettbc \ + svtools/source/control/prgsbar \ + svtools/source/control/roadmap \ + svtools/source/control/ruler \ + svtools/source/control/scriptedtext \ + svtools/source/control/scrwin \ + svtools/source/control/stdctrl \ + svtools/source/control/stdmenu \ + svtools/source/control/tabbar \ + svtools/source/control/taskbar \ + svtools/source/control/taskbox \ + svtools/source/control/taskmisc \ + svtools/source/control/taskstat \ + svtools/source/control/toolbarmenu \ + svtools/source/control/toolbarmenuacc \ + svtools/source/control/urlcontrol \ + svtools/source/control/valueacc \ + svtools/source/control/valueset \ + svtools/source/dialogs/addresstemplate \ + svtools/source/dialogs/colctrl \ + svtools/source/dialogs/colrdlg \ + svtools/source/dialogs/filedlg \ + svtools/source/dialogs/filedlg2 \ + svtools/source/dialogs/insdlg \ + svtools/source/dialogs/mcvmath \ + svtools/source/dialogs/prnsetup \ + svtools/source/dialogs/property \ + svtools/source/dialogs/roadmapwizard \ + svtools/source/dialogs/wizardmachine \ + svtools/source/dialogs/wizdlg \ + svtools/source/edit/editsyntaxhighlighter \ + svtools/source/edit/svmedit \ + svtools/source/edit/svmedit2 \ + svtools/source/edit/sychconv \ + svtools/source/edit/syntaxhighlight \ + svtools/source/edit/textdata \ + svtools/source/edit/textdoc \ + svtools/source/edit/texteng \ + svtools/source/edit/textundo \ + svtools/source/edit/textview \ + svtools/source/edit/textwindowpeer \ + svtools/source/edit/txtattr \ + svtools/source/edit/xtextedt \ + svtools/source/filter.vcl/filter/FilterConfigCache \ + svtools/source/filter.vcl/filter/FilterConfigItem \ + svtools/source/filter.vcl/filter/SvFilterOptionsDialog \ + svtools/source/filter.vcl/filter/exportdialog \ + svtools/source/filter.vcl/filter/filter \ + svtools/source/filter.vcl/filter/filter2 \ + svtools/source/filter.vcl/filter/sgfbram \ + svtools/source/filter.vcl/filter/sgvmain \ + svtools/source/filter.vcl/filter/sgvspln \ + svtools/source/filter.vcl/filter/sgvtext \ + svtools/source/filter.vcl/igif/decode \ + svtools/source/filter.vcl/igif/gifread \ + svtools/source/filter.vcl/ixbm/xbmread \ + svtools/source/filter.vcl/ixpm/xpmread \ + svtools/source/filter.vcl/jpeg/jpeg \ + svtools/source/filter.vcl/wmf/emfwr \ + svtools/source/filter.vcl/wmf/enhwmf \ + svtools/source/filter.vcl/wmf/winmtf \ + svtools/source/filter.vcl/wmf/winwmf \ + svtools/source/filter.vcl/wmf/wmf \ + svtools/source/filter.vcl/wmf/wmfwr \ + svtools/source/graphic/descriptor \ + svtools/source/graphic/graphic \ + svtools/source/graphic/graphicunofactory \ + svtools/source/graphic/grfattr \ + svtools/source/graphic/grfcache \ + svtools/source/graphic/grfmgr \ + svtools/source/graphic/grfmgr2 \ + svtools/source/graphic/provider \ + svtools/source/graphic/renderer \ + svtools/source/graphic/transformer \ + svtools/source/java/javacontext \ + svtools/source/java/javainteractionhandler \ + svtools/source/misc/acceleratorexecute \ + svtools/source/misc/chartprettypainter \ + svtools/source/misc/cliplistener \ + svtools/source/misc/dialogclosedlistener \ + svtools/source/misc/dialogcontrolling \ + svtools/source/misc/ehdl \ + svtools/source/misc/embedhlp \ + svtools/source/misc/embedtransfer \ + svtools/source/misc/helpagentwindow \ + svtools/source/misc/imagemgr \ + svtools/source/misc/imageresourceaccess \ + svtools/source/misc/imap \ + svtools/source/misc/imap2 \ + svtools/source/misc/imap3 \ + svtools/source/misc/itemdel \ + svtools/source/misc/langtab \ + svtools/source/misc/stringtransfer \ + svtools/source/misc/svtaccessiblefactory \ + svtools/source/misc/svtdata \ + svtools/source/misc/templatefoldercache \ + svtools/source/misc/transfer \ + svtools/source/misc/transfer2 \ + svtools/source/misc/unitconv \ + svtools/source/misc/wallitem \ + svtools/source/misc/xwindowitem \ + svtools/source/plugapp/ttprops \ + svtools/source/svhtml/htmlkywd \ + svtools/source/svhtml/htmlout \ + svtools/source/svhtml/htmlsupp \ + svtools/source/svhtml/parhtml \ + svtools/source/svrtf/parrtf \ + svtools/source/svrtf/rtfkeywd \ + svtools/source/svrtf/rtfout \ + svtools/source/svrtf/svparser \ + svtools/source/table/defaultinputhandler \ + svtools/source/table/gridtablerenderer \ + svtools/source/table/tablecontrol \ + svtools/source/table/tablecontrol_impl \ + svtools/source/table/tabledatawindow \ + svtools/source/table/tablegeometry \ + svtools/source/toolpanel/drawerlayouter \ + svtools/source/toolpanel/dummypanel \ + svtools/source/toolpanel/paneldecklisteners \ + svtools/source/toolpanel/paneltabbar \ + svtools/source/toolpanel/paneltabbarpeer \ + svtools/source/toolpanel/refbase \ + svtools/source/toolpanel/tabbargeometry \ + svtools/source/toolpanel/tablayouter \ + svtools/source/toolpanel/toolpanel \ + svtools/source/toolpanel/toolpanelcollection \ + svtools/source/toolpanel/toolpaneldeck \ + svtools/source/toolpanel/toolpaneldeckpeer \ + svtools/source/toolpanel/toolpaneldrawer \ + svtools/source/toolpanel/toolpaneldrawerpeer \ + svtools/source/uno/addrtempuno \ + svtools/source/uno/contextmenuhelper \ + svtools/source/uno/framestatuslistener \ + svtools/source/uno/generictoolboxcontroller \ + svtools/source/uno/genericunodialog \ + svtools/source/uno/miscservices \ + svtools/source/uno/popupmenucontrollerbase \ + svtools/source/uno/popupwindowcontroller \ + svtools/source/uno/statusbarcontroller \ + svtools/source/uno/svtxgridcontrol \ + svtools/source/uno/toolboxcontroller \ + svtools/source/uno/treecontrolpeer \ + svtools/source/uno/unocontroltablemodel \ + svtools/source/uno/unoevent \ + svtools/source/uno/unoiface \ + svtools/source/uno/unoimap \ + svtools/source/uno/wizard/unowizard \ + svtools/source/uno/wizard/wizardpagecontroller \ + svtools/source/uno/wizard/wizardshell \ + svtools/source/urlobj/inetimg \ +)) + +$(eval $(call gb_Library_add_cobjects,svt,\ + svtools/source/filter.vcl/jpeg/jpegc \ +)) + +ifeq ($(OS),LINUX) +$(eval $(call gb_Library_add_linked_libs,svt,\ + dl \ + m \ + pthread \ +)) +endif + +ifeq ($(OS),WNT) +ifneq ($(USE_MINGW),) +$(eval $(call gb_Library_add_linked_libs,svt,\ + mingwthrd \ + $(gb_MINGW_LIBSTDCPP) \ + mingw32 \ + $(gb_MINGW_LIBGCC) \ + uwinapi \ + moldname \ + mingwex \ + advapi32 \ + gdi32 \ + kernel32 \ + msvcrt \ + ole32 \ + oleaut32 \ + user32 \ + uuid \ +)) +else +$(eval $(call gb_Library_add_linked_libs,svt,\ + advapi32 \ + gdi32 \ + kernel32 \ + msvcrt \ + oldnames \ + ole32 \ + oleaut32 \ + user32 \ + uuid \ + uwinapi \ +)) +endif +endif +# vim: set noet sw=4 ts=4: diff --git a/svtools/source/filter.vcl/ixbm/makefile.mk b/svtools/Makefile index 55708d2f2630..a79aff831024 100644 --- a/svtools/source/filter.vcl/ixbm/makefile.mk +++ b/svtools/Makefile @@ -25,20 +25,14 @@ # #************************************************************************* -PRJ=..$/..$/.. +ifeq ($(strip $(SOLARENV)),) +$(error No environment set!) +endif -PRJNAME=svtools -TARGET=ixbm +gb_PARTIALBUILD := T +GBUILDDIR := $(SOLARENV)/gbuild +include $(GBUILDDIR)/gbuild.mk -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svt.pmk -SOLARINC+=-I../../inc - -# --- Files -------------------------------------------------------- - -SLOFILES= $(SLO)$/xbmread.obj - -.INCLUDE : target.mk +$(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk))) +# vim: set noet sw=4 ts=4: diff --git a/svtools/inc/makefile.mk b/svtools/Module_svtools.mk index cde85ffe82ca..bc760add6d26 100644 --- a/svtools/inc/makefile.mk +++ b/svtools/Module_svtools.mk @@ -2,7 +2,7 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2000, 2010 Oracle and/or its affiliates. +# Copyright 2009 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite # @@ -14,35 +14,35 @@ # # OpenOffice.org is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License version 3 for more details # (a copy is included in the LICENSE file that accompanied this code). # # You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see +# version 3 along with OpenOffice.org. If not, see # <http://www.openoffice.org/license.html> # for a copy of the LGPLv3 License. # #************************************************************************* -PRJ=.. -PRJNAME=svtools -TARGET=inc +$(eval $(call gb_Module_Module,svtools)) -# --- Settings ----------------------------------------------------- +$(eval $(call gb_Module_add_targets,svtools,\ + AllLangResTarget_productregistration \ + AllLangResTarget_svt \ + Executable_bmp \ + Executable_bmpsum \ + Executable_g2g \ + Library_hatchwindowfactory \ + Library_productregistration \ + Library_svt \ + Package_inc \ +)) -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svt.pmk - -# --- Files -------------------------------------------------------- -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - -.IF "$(ENABLE_PCH)"!="" -ALLTAR : \ - $(SLO)$/precompiled.pch \ - $(SLO)$/precompiled_ex.pch - -.ENDIF # "$(ENABLE_PCH)"!="" +#todo: javapatchres +#todo: jpeg on mac in svtools/util/makefile.mk +#todo: deliver errtxt.src as ehdl.srs +#todo: nooptfiles filter, filterconfigitem, FilterConfigCache, SvFilterOptionsDialog +#todo: map file +# vim: set noet sw=4 ts=4: diff --git a/svtools/Package_inc.mk b/svtools/Package_inc.mk new file mode 100644 index 000000000000..f6a48e845679 --- /dev/null +++ b/svtools/Package_inc.mk @@ -0,0 +1,192 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Package_Package,svtools_inc,$(SRCDIR)/svtools/inc)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/AccessibleBrowseBoxObjType.hxx,svtools/AccessibleBrowseBoxObjType.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/DocumentInfoPreview.hxx,svtools/DocumentInfoPreview.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/FilterConfigItem.hxx,svtools/FilterConfigItem.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/QueryFolderName.hxx,svtools/QueryFolderName.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/acceleratorexecute.hxx,svtools/acceleratorexecute.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/accessibilityoptions.hxx,svtools/accessibilityoptions.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/accessiblefactory.hxx,svtools/accessiblefactory.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/accessibletable.hxx,svtools/accessibletable.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/accessibletableprovider.hxx,svtools/accessibletableprovider.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/addresstemplate.hxx,svtools/addresstemplate.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/apearcfg.hxx,svtools/apearcfg.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/asynclink.hxx,svtools/asynclink.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/brwbox.hxx,svtools/brwbox.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/brwhead.hxx,svtools/brwhead.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/calendar.hxx,svtools/calendar.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/chartprettypainter.hxx,svtools/chartprettypainter.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/cliplistener.hxx,svtools/cliplistener.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/colctrl.hxx,svtools/colctrl.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/collatorres.hxx,svtools/collatorres.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/colorcfg.hxx,svtools/colorcfg.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/colrdlg.hxx,svtools/colrdlg.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/contextmenuhelper.hxx,svtools/contextmenuhelper.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/controldims.hrc,svtools/controldims.hrc)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/ctrlbox.hxx,svtools/ctrlbox.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/ctrltool.hxx,svtools/ctrltool.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/dialogclosedlistener.hxx,svtools/dialogclosedlistener.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/dialogcontrolling.hxx,svtools/dialogcontrolling.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/editbrowsebox.hxx,svtools/editbrowsebox.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/editimplementation.hxx,svtools/editimplementation.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/editsyntaxhighlighter.hxx,svtools/editsyntaxhighlighter.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/ehdl.hxx,svtools/ehdl.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/embedhlp.hxx,svtools/embedhlp.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/embedtransfer.hxx,svtools/embedtransfer.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/expander.hxx,svtools/expander.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/extcolorcfg.hxx,svtools/extcolorcfg.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/extensionlistbox.hxx,svtools/extensionlistbox.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/filectrl.hxx,svtools/filectrl.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/filedlg.hxx,svtools/filedlg.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/filedlg2.hrc,svtools/filedlg2.hrc)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/fileurlbox.hxx,svtools/fileurlbox.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/fileview.hxx,svtools/fileview.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/filter.hxx,svtools/filter.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/fixedhyper.hxx,svtools/fixedhyper.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/fltcall.hxx,svtools/fltcall.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/fltdefs.hxx,svtools/fltdefs.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/fmtfield.hxx,svtools/fmtfield.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/fontsubstconfig.hxx,svtools/fontsubstconfig.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/framestatuslistener.hxx,svtools/framestatuslistener.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/generictoolboxcontroller.hxx,svtools/generictoolboxcontroller.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/genericunodialog.hxx,svtools/genericunodialog.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/grfmgr.hxx,svtools/grfmgr.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/headbar.hxx,svtools/headbar.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/helpagentwindow.hxx,svtools/helpagentwindow.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/helpid.hrc,svtools/helpid.hrc)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/helpopt.hxx,svtools/helpopt.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/htmlcfg.hxx,svtools/htmlcfg.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/htmlkywd.hxx,svtools/htmlkywd.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/htmlout.hxx,svtools/htmlout.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/htmltokn.h,svtools/htmltokn.h)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/hyperlabel.hxx,svtools/hyperlabel.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/imagemgr.hrc,svtools/imagemgr.hrc)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/imagemgr.hxx,svtools/imagemgr.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/imageresourceaccess.hxx,svtools/imageresourceaccess.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/imap.hxx,svtools/imap.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/imapcirc.hxx,svtools/imapcirc.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/imapobj.hxx,svtools/imapobj.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/imappoly.hxx,svtools/imappoly.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/imaprect.hxx,svtools/imaprect.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/imgdef.hxx,svtools/imgdef.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/indexentryres.hxx,svtools/indexentryres.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/inetimg.hxx,svtools/inetimg.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/inettbc.hxx,svtools/inettbc.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/insdlg.hxx,svtools/insdlg.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/itemdel.hxx,svtools/itemdel.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/ivctrl.hxx,svtools/ivctrl.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/javacontext.hxx,svtools/javacontext.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/javainteractionhandler.hxx,svtools/javainteractionhandler.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/langtab.hxx,svtools/langtab.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/localresaccess.hxx,svtools/localresaccess.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/menuoptions.hxx,svtools/menuoptions.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/miscopt.hxx,svtools/miscopt.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/optionsdrawinglayer.hxx,svtools/optionsdrawinglayer.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/parhtml.hxx,svtools/parhtml.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/parrtf.hxx,svtools/parrtf.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/popupmenucontrollerbase.hxx,svtools/popupmenucontrollerbase.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/popupwindowcontroller.hxx,svtools/popupwindowcontroller.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/prgsbar.hxx,svtools/prgsbar.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/printoptions.hxx,svtools/printoptions.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/prnsetup.hxx,svtools/prnsetup.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/roadmap.hxx,svtools/roadmap.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/roadmapwizard.hxx,svtools/roadmapwizard.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/rtfkeywd.hxx,svtools/rtfkeywd.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/rtfout.hxx,svtools/rtfout.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/rtftoken.h,svtools/rtftoken.h)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/ruler.hxx,svtools/ruler.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/scriptedtext.hxx,svtools/scriptedtext.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/scrwin.hxx,svtools/scrwin.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/sfxecode.hxx,svtools/sfxecode.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/soerr.hxx,svtools/soerr.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/sores.hxx,svtools/sores.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/statusbarcontroller.hxx,svtools/statusbarcontroller.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/stdctrl.hxx,svtools/stdctrl.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/stdmenu.hxx,svtools/stdmenu.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/stringtransfer.hxx,svtools/stringtransfer.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/svicnvw.hxx,svtools/svicnvw.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/svlbitm.hxx,svtools/svlbitm.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/svlbox.hxx,svtools/svlbox.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/svmedit.hxx,svtools/svmedit.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/svmedit2.hxx,svtools/svmedit2.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/svparser.hxx,svtools/svparser.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/svtabbx.hxx,svtools/svtabbx.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/svtdata.hxx,svtools/svtdata.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/svtdllapi.h,svtools/svtdllapi.h)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/svtools.hrc,svtools/svtools.hrc)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/svtreebx.hxx,svtools/svtreebx.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/svxbox.hxx,svtools/svxbox.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/sychconv.hxx,svtools/sychconv.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/syntaxhighlight.hxx,svtools/syntaxhighlight.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/tabbar.hxx,svtools/tabbar.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/table/abstracttablecontrol.hxx,svtools/table/abstracttablecontrol.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/table/defaultinputhandler.hxx,svtools/table/defaultinputhandler.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/table/gridtablerenderer.hxx,svtools/table/gridtablerenderer.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/table/tablecontrol.hxx,svtools/table/tablecontrol.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/table/tabledatawindow.hxx,svtools/table/tabledatawindow.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/table/tableinputhandler.hxx,svtools/table/tableinputhandler.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/table/tablemodel.hxx,svtools/table/tablemodel.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/table/tablerenderer.hxx,svtools/table/tablerenderer.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/table/tabletypes.hxx,svtools/table/tabletypes.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/taskbar.hxx,svtools/taskbar.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/templatefoldercache.hxx,svtools/templatefoldercache.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/templdlg.hxx,svtools/templdlg.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/testtool.hxx,svtools/testtool.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/textdata.hxx,svtools/textdata.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/texteng.hxx,svtools/texteng.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/textview.hxx,svtools/textview.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/textwindowpeer.hxx,svtools/textwindowpeer.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/toolbarmenu.hxx,svtools/toolbarmenu.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/toolboxcontroller.hxx,svtools/toolboxcontroller.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/toolpanel/decklayouter.hxx,svtools/toolpanel/decklayouter.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/toolpanel/drawerlayouter.hxx,svtools/toolpanel/drawerlayouter.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/toolpanel/paneltabbar.hxx,svtools/toolpanel/paneltabbar.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/toolpanel/refbase.hxx,svtools/toolpanel/refbase.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/toolpanel/tabalignment.hxx,svtools/toolpanel/tabalignment.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/toolpanel/tabitemcontent.hxx,svtools/toolpanel/tabitemcontent.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/toolpanel/tablayouter.hxx,svtools/toolpanel/tablayouter.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/toolpanel/toolpanel.hxx,svtools/toolpanel/toolpanel.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/toolpanel/toolpaneldeck.hxx,svtools/toolpanel/toolpaneldeck.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/tooltiplbox.hxx,svtools/tooltiplbox.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/transfer.hxx,svtools/transfer.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/treelist.hxx,svtools/treelist.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/ttprops.hxx,svtools/ttprops.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/txtattr.hxx,svtools/txtattr.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/txtcmp.hxx,svtools/txtcmp.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/unitconv.hxx,svtools/unitconv.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/unoevent.hxx,svtools/unoevent.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/unoimap.hxx,svtools/unoimap.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/urlcontrol.hxx,svtools/urlcontrol.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/valueset.hxx,svtools/valueset.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/wallitem.hxx,svtools/wallitem.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/wizardmachine.hxx,svtools/wizardmachine.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/wizdlg.hxx,svtools/wizdlg.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/wmf.hxx,svtools/wmf.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/xtextedt.hxx,svtools/xtextedt.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/xwindowitem.hxx,svtools/xwindowitem.hxx)) diff --git a/svtools/bmpmaker/bmp.cxx b/svtools/bmpmaker/bmp.cxx index 5b473b0289c2..76a4d3ef4043 100644 --- a/svtools/bmpmaker/bmp.cxx +++ b/svtools/bmpmaker/bmp.cxx @@ -41,7 +41,7 @@ using namespace std; #include <vcl/svapp.hxx> #include "svl/solar.hrc" -#include "filedlg.hxx" +#include <svtools/filedlg.hxx> #include "bmpcore.hxx" #include "bmp.hrc" diff --git a/svtools/bmpmaker/bmp.src b/svtools/bmpmaker/bmp.src index 7431d2e335a4..30ff9488a805 100644 --- a/svtools/bmpmaker/bmp.src +++ b/svtools/bmpmaker/bmp.src @@ -27,6 +27,7 @@ #include "bmp.hrc" ModalDialog DLG_PATH { + HelpID = "svtools:ModalDialog:DLG_PATH"; OutputSize = TRUE; SVLook = TRUE; Size = MAP_APPFONT( 301, 104 ); @@ -54,36 +55,42 @@ ModalDialog DLG_PATH { Text = "Bitmap-Pfad:"; }; Edit EDT_SRS { + HelpID = "svtools:Edit:DLG_PATH:EDT_SRS"; Border = TRUE; Pos = MAP_APPFONT( 65, 14 ); Size = MAP_APPFONT( 160, 12 ); TabStop = TRUE; }; Edit EDT_RES { + HelpID = "svtools:Edit:DLG_PATH:EDT_RES"; Border = TRUE; Pos = MAP_APPFONT( 65, 29 ); Size = MAP_APPFONT( 160, 12 ); TabStop = TRUE; }; Edit EDT_OUT { + HelpID = "svtools:Edit:DLG_PATH:EDT_OUT"; Border = TRUE; Pos = MAP_APPFONT( 65, 44 ); Size = MAP_APPFONT( 160, 12 ); TabStop = TRUE; }; PushButton BTN_SRS { + HelpID = "svtools:PushButton:DLG_PATH:BTN_SRS"; Pos = MAP_APPFONT( 228, 14 ); Size = MAP_APPFONT( 15, 12 ); Text = "..."; TabStop = TRUE; }; PushButton BTN_RES { + HelpID = "svtools:PushButton:DLG_PATH:BTN_RES"; Pos = MAP_APPFONT( 228, 29 ); Size = MAP_APPFONT( 15, 12 ); Text = "..."; TabStop = TRUE; }; PushButton BTN_OUT { + HelpID = "svtools:PushButton:DLG_PATH:BTN_OUT"; Pos = MAP_APPFONT( 228, 44 ); Size = MAP_APPFONT( 15, 12 ); Text = "..."; @@ -106,6 +113,7 @@ ModalDialog DLG_PATH { Text = "Sprache"; }; ListBox LB_LANG { + HelpID = "svtools:ListBox:DLG_PATH:LB_LANG"; Border = TRUE; Pos = MAP_APPFONT( 12, 76 ); Size = MAP_APPFONT( 231, 70 ); diff --git a/svtools/bmpmaker/makefile.mk b/svtools/bmpmaker/makefile.mk deleted file mode 100644 index a1303343a503..000000000000 --- a/svtools/bmpmaker/makefile.mk +++ /dev/null @@ -1,74 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=.. -PRJNAME=svtools -TARGET=bmp -LIBTARGET=NO - -# --- Settings ----------------------------------------------------- - -ENABLE_EXCEPTIONS=true - -.INCLUDE : settings.mk - -# --- Files -------------------------------------------------------- - -OBJFILES= $(OBJ)$/bmp.obj \ - $(OBJ)$/bmpcore.obj \ - $(OBJ)$/g2g.obj \ - $(OBJ)$/bmpsum.obj - -# --- APP1TARGET --------------------------------------------------- - -APP1TARGET= $(TARGET) - -APP1STDLIBS = \ - $(VCLLIB) \ - $(TOOLSLIB) \ - $(VOSLIB) \ - $(SALLIB) - -APP1OBJS= $(OBJ)$/bmp.obj \ - $(OBJ)$/bmpcore.obj - -APP1BASE=0x10000000 - -# --- APP2TARGET -------------------------------------------------- - -APP2TARGET = bmpsum -APP2BASE = 0x10000000 -APP2OBJS = $(OBJ)$/bmpsum.obj - -APP2STDLIBS = $(VCLLIB) \ - $(TOOLSLIB) \ - $(VOSLIB) \ - $(SALLIB) - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/svtools/inc/pch/precompiled_svtools.hxx b/svtools/inc/pch/precompiled_svtools.hxx index ddedfc5a0369..ebabe33af690 100644 --- a/svtools/inc/pch/precompiled_svtools.hxx +++ b/svtools/inc/pch/precompiled_svtools.hxx @@ -419,8 +419,8 @@ #include <unotools/processfactory.hxx> #include <vcl/dndhelp.hxx> -#include <vcl/fldunit.hxx> -#include <vcl/mapunit.hxx> +#include <tools/fldunit.hxx> +#include <tools/mapunit.hxx> #include <vcl/unohelp.hxx> #include <vos/mutex.hxx> diff --git a/svtools/inc/DocumentInfoPreview.hxx b/svtools/inc/svtools/DocumentInfoPreview.hxx index ae57b1a68b32..ae57b1a68b32 100644 --- a/svtools/inc/DocumentInfoPreview.hxx +++ b/svtools/inc/svtools/DocumentInfoPreview.hxx diff --git a/svtools/inc/QueryFolderName.hxx b/svtools/inc/svtools/QueryFolderName.hxx index 971b4b26e13e..971b4b26e13e 100644 --- a/svtools/inc/QueryFolderName.hxx +++ b/svtools/inc/svtools/QueryFolderName.hxx diff --git a/svtools/inc/acceleratorexecute.hxx b/svtools/inc/svtools/acceleratorexecute.hxx index 3ee79e1fca0c..3ee79e1fca0c 100644 --- a/svtools/inc/acceleratorexecute.hxx +++ b/svtools/inc/svtools/acceleratorexecute.hxx diff --git a/svtools/inc/svtools/accessibletable.hxx b/svtools/inc/svtools/accessibletable.hxx index 198a24b8eb62..8ff17a2b71c7 100755..100644 --- a/svtools/inc/svtools/accessibletable.hxx +++ b/svtools/inc/svtools/accessibletable.hxx @@ -124,7 +124,7 @@ public: virtual ::com::sun::star::uno::Any GetCellContent( sal_Int32 _nRowPos, sal_Int32 _nColPos) const = 0; virtual std::vector<sal_Int32>& GetSelectedRows() = 0; virtual void RemoveSelectedRow(sal_Int32 _nRowPos) = 0; - virtual ::rtl::OUString GetAccessibleCellText(sal_Int32 _nRowPos, sal_Int32 _nColPos) = 0; + virtual ::rtl::OUString GetAccessibleCellText(sal_Int32 _nRowPos, sal_Int32 _nColPos) const = 0; }; // ---------------------------------------------------------------------------- diff --git a/svtools/inc/addresstemplate.hxx b/svtools/inc/svtools/addresstemplate.hxx index f29ea2478b4e..bb4ee44647e9 100644 --- a/svtools/inc/addresstemplate.hxx +++ b/svtools/inc/svtools/addresstemplate.hxx @@ -33,7 +33,7 @@ #include <vcl/group.hxx> #include <vcl/fixed.hxx> #include <vcl/combobox.hxx> -#include <vcl/imagebtn.hxx> +#include <vcl/button.hxx> #include <vcl/lstbox.hxx> #include <vcl/scrbar.hxx> #include <com/sun/star/container/XNameAccess.hpp> diff --git a/svtools/inc/apearcfg.hxx b/svtools/inc/svtools/apearcfg.hxx index 8e6018424c4c..5dea74761e17 100644 --- a/svtools/inc/apearcfg.hxx +++ b/svtools/inc/svtools/apearcfg.hxx @@ -37,14 +37,6 @@ class Application; Beschreibung: --------------------------------------------------------------------*/ typedef enum { - LookStardivision = 0, - LookMotif, - LookWindows, - LookOSTwo, - LookMacintosh -} SystemLook; - -typedef enum { SnapToButton = 0, SnapToMiddle, NoSnap @@ -59,7 +51,6 @@ typedef enum { // MUST match the order chosen in ListBox LB_DRAG_MODE in optgdlg class SVT_DLLPUBLIC SvtTabAppearanceCfg : public utl::ConfigItem { - short nLookNFeel ; short nDragMode ; short nScaleFactor ; short nSnapMode ; @@ -69,8 +60,6 @@ class SVT_DLLPUBLIC SvtTabAppearanceCfg : public utl::ConfigItem #endif BOOL bMenuMouseFollow ; - BOOL bSingleLineTabCtrl ; - BOOL bColoredTabCtrl ; #if defined( UNX ) || defined ( FS_PRIV_DEBUG ) BOOL bFontAntialiasing ; #endif @@ -86,9 +75,6 @@ public: virtual void Commit(); virtual void Notify( const com::sun::star::uno::Sequence< rtl::OUString >& _rPropertyNames); - USHORT GetLookNFeel () const { return nLookNFeel; } - void SetLookNFeel ( USHORT nSet ); - USHORT GetDragMode () const { return nDragMode; } void SetDragMode ( USHORT nSet ); @@ -106,9 +92,6 @@ public: void SetMenuMouseFollow(BOOL bSet) {bMenuMouseFollow = bSet; SetModified();} BOOL IsMenuMouseFollow() const{return bMenuMouseFollow;} - void SetSingleLineTabCtrl(BOOL bSet) {bSingleLineTabCtrl = bSet; SetModified();} - BOOL IsSingleLineTabCtrl()const {return bSingleLineTabCtrl;} - #if defined( UNX ) || defined ( FS_PRIV_DEBUG ) void SetFontAntiAliasing( BOOL bSet ) { bFontAntialiasing = bSet; SetModified(); } BOOL IsFontAntiAliasing() const { return bFontAntialiasing; } @@ -117,9 +100,6 @@ public: void SetFontAntialiasingMinPixelHeight( USHORT _nMinHeight ) { nAAMinPixelHeight = _nMinHeight; SetModified(); } #endif - void SetColoredTabCtrl(BOOL bSet) {bColoredTabCtrl = bSet; SetModified();}; - BOOL IsColoredTabCtrl()const {return bColoredTabCtrl;} - static sal_Bool IsInitialized() { return bInitialized; } static void SetInitialized() { bInitialized = sal_True; } }; diff --git a/svtools/inc/asynclink.hxx b/svtools/inc/svtools/asynclink.hxx index 41c6f3e92388..41c6f3e92388 100644 --- a/svtools/inc/asynclink.hxx +++ b/svtools/inc/svtools/asynclink.hxx diff --git a/svtools/inc/calendar.hxx b/svtools/inc/svtools/calendar.hxx index f85887873bb0..f85887873bb0 100644 --- a/svtools/inc/calendar.hxx +++ b/svtools/inc/svtools/calendar.hxx diff --git a/svtools/inc/cliplistener.hxx b/svtools/inc/svtools/cliplistener.hxx index ab20d6d7aa20..ab20d6d7aa20 100644 --- a/svtools/inc/cliplistener.hxx +++ b/svtools/inc/svtools/cliplistener.hxx diff --git a/svtools/inc/collatorres.hxx b/svtools/inc/svtools/collatorres.hxx index 63b4e7ef64f3..63b4e7ef64f3 100644 --- a/svtools/inc/collatorres.hxx +++ b/svtools/inc/svtools/collatorres.hxx diff --git a/svtools/inc/contextmenuhelper.hxx b/svtools/inc/svtools/contextmenuhelper.hxx index 54d254309b1e..54d254309b1e 100644 --- a/svtools/inc/contextmenuhelper.hxx +++ b/svtools/inc/svtools/contextmenuhelper.hxx diff --git a/svtools/inc/controldims.hrc b/svtools/inc/svtools/controldims.hrc index 5e26f132897d..5e26f132897d 100644 --- a/svtools/inc/controldims.hrc +++ b/svtools/inc/svtools/controldims.hrc diff --git a/svtools/inc/ctrlbox.hxx b/svtools/inc/svtools/ctrlbox.hxx index 9e6e942daf1e..9e6e942daf1e 100644 --- a/svtools/inc/ctrlbox.hxx +++ b/svtools/inc/svtools/ctrlbox.hxx diff --git a/svtools/inc/ctrltool.hxx b/svtools/inc/svtools/ctrltool.hxx index a0eb5db2b955..a0eb5db2b955 100644 --- a/svtools/inc/ctrltool.hxx +++ b/svtools/inc/svtools/ctrltool.hxx diff --git a/svtools/inc/dialogclosedlistener.hxx b/svtools/inc/svtools/dialogclosedlistener.hxx index 3712d408af52..3712d408af52 100644 --- a/svtools/inc/dialogclosedlistener.hxx +++ b/svtools/inc/svtools/dialogclosedlistener.hxx diff --git a/svtools/inc/dialogcontrolling.hxx b/svtools/inc/svtools/dialogcontrolling.hxx index cd60736527f5..cd60736527f5 100644 --- a/svtools/inc/dialogcontrolling.hxx +++ b/svtools/inc/svtools/dialogcontrolling.hxx diff --git a/svtools/inc/svtools/editbrowsebox.hxx b/svtools/inc/svtools/editbrowsebox.hxx index f97449e1880c..26ff11e11ca2 100644 --- a/svtools/inc/svtools/editbrowsebox.hxx +++ b/svtools/inc/svtools/editbrowsebox.hxx @@ -37,7 +37,7 @@ #include <vcl/lstbox.hxx> #ifndef _IMAGEBTN_HXX -#include <vcl/imagebtn.hxx> +#include <vcl/button.hxx> #endif #include <svtools/brwbox.hxx> #include <vcl/timer.hxx> diff --git a/svtools/inc/svtools/embedhlp.hxx b/svtools/inc/svtools/embedhlp.hxx index 098b565385ec..bc9770c1bcc8 100644 --- a/svtools/inc/svtools/embedhlp.hxx +++ b/svtools/inc/svtools/embedhlp.hxx @@ -34,9 +34,7 @@ #include <com/sun/star/embed/Aspects.hpp> #include <com/sun/star/io/XInputStream.hpp> #include <vcl/graph.hxx> -#ifndef _SV_MAPUNIT_HXX -#include <vcl/mapunit.hxx> -#endif +#include <tools/mapunit.hxx> #include <rtl/ustring.hxx> #define NS_UNO ::com::sun::star::uno diff --git a/svtools/inc/expander.hxx b/svtools/inc/svtools/expander.hxx index c0f3cfc7632a..c0f3cfc7632a 100644 --- a/svtools/inc/expander.hxx +++ b/svtools/inc/svtools/expander.hxx diff --git a/svtools/inc/extcolorcfg.hxx b/svtools/inc/svtools/extcolorcfg.hxx index 44167f63287c..44167f63287c 100644 --- a/svtools/inc/extcolorcfg.hxx +++ b/svtools/inc/svtools/extcolorcfg.hxx diff --git a/svtools/inc/filectrl.hxx b/svtools/inc/svtools/filectrl.hxx index dd314bb23ca1..dd314bb23ca1 100644 --- a/svtools/inc/filectrl.hxx +++ b/svtools/inc/svtools/filectrl.hxx diff --git a/svtools/inc/filedlg.hxx b/svtools/inc/svtools/filedlg.hxx index c04e48fc7658..c04e48fc7658 100644 --- a/svtools/inc/filedlg.hxx +++ b/svtools/inc/svtools/filedlg.hxx diff --git a/svtools/inc/filedlg2.hrc b/svtools/inc/svtools/filedlg2.hrc index a87bd6ebcad0..a87bd6ebcad0 100644 --- a/svtools/inc/filedlg2.hrc +++ b/svtools/inc/svtools/filedlg2.hrc diff --git a/svtools/inc/fileview.hxx b/svtools/inc/svtools/fileview.hxx index 74476541dcd8..db704a0e6784 100644 --- a/svtools/inc/fileview.hxx +++ b/svtools/inc/svtools/fileview.hxx @@ -104,8 +104,8 @@ public: sal_Bool GetParentURL( String& _rParentURL ) const; sal_Bool CreateNewFolder( const String& rNewFolder ); - void SetHelpId( sal_uInt32 nHelpId ); - sal_uInt32 GetHelpId( ) const; + void SetHelpId( const rtl::OString& rHelpId ); + const rtl::OString& GetHelpId( ) const; void SetSizePixel( const Size& rNewSize ); using Window::SetPosSizePixel; virtual void SetPosSizePixel( const Point& rNewPos, const Size& rNewSize ); diff --git a/svtools/inc/svtools/filter.hxx b/svtools/inc/svtools/filter.hxx index 49ec77adfea5..8c6f014d4219 100644 --- a/svtools/inc/svtools/filter.hxx +++ b/svtools/inc/svtools/filter.hxx @@ -134,16 +134,6 @@ class Graphic; #define GFF_EMF ( (USHORT)0x00f8 ) #define GFF_XXX ( (USHORT)0xffff ) -// --------------- -// - RequestInfo - -// --------------- - -struct RequestInfo -{ - BYTE* pBuffer; - ULONG nRealBufferSize; -}; - // --------------------- // - GraphicDescriptor - // --------------------- @@ -151,29 +141,18 @@ struct RequestInfo class SVT_DLLPUBLIC GraphicDescriptor { SvStream* pFileStm; - Link aReqLink; + String aPathExt; Size aPixSize; Size aLogSize; - SvStream* pMemStm; - SvStream* pBaseStm; - ULONG nStmPos; USHORT nBitsPerPixel; USHORT nPlanes; USHORT nFormat; BOOL bCompressed; - BOOL bDataReady; - BOOL bLinked; - BOOL bLinkChanged; - BOOL bWideSearch; - BOOL bBaseStm; - long nExtra1; - long nExtra2; + BOOL bOwnStream; void ImpConstruct(); -//#if 0 // _SOLAR__PRIVATE - BOOL ImpDetectBMP( SvStream& rStm, BOOL bExtendedInfo ); BOOL ImpDetectGIF( SvStream& rStm, BOOL bExtendedInfo ); BOOL ImpDetectJPG( SvStream& rStm, BOOL bExtendedInfo ); @@ -199,27 +178,11 @@ class SVT_DLLPUBLIC GraphicDescriptor BOOL ImpDetectSGV( SvStream& rStm, BOOL bExtendedInfo ); BOOL ImpDetectEMF( SvStream& rStm, BOOL bExtendedInfo ); -//#endif - GraphicDescriptor( const GraphicDescriptor& ); GraphicDescriptor& operator=( const GraphicDescriptor& ); -protected: - - BOOL IsDataReady() const; - BOOL IsWideSearch() const; - SvStream& GetSearchStream() const; - const String& GetPathExtension() const; - public: - // Default-Ctor, um anschliessend einen Link zu setzen, mit dem - // die Daten vom Aufrufer im ::Detect() angefordert werden. - // da einige Formate ( Mtf's ) keinen eindeutigen Header besitzen, - // ist es sinnvoll den vollen Filenamen (inkl. Ext. ) mitanzugeben, - // da so das Format ueber die Extension ermittelt werden kann - GraphicDescriptor( const String* pPath = NULL ); - // Ctor, um einen Filenamen zu setzen. Es muss ::Detect() gerufen werden, // um das File zu identifizieren; // wenn das File keinen eindeutigen Header besitzt ( Mtf's ) wird das @@ -261,21 +224,6 @@ public: // zeigt an, ob das Bild evtl. komprimiert (wie auch immer) ist BOOL IsCompressed() const { return bCompressed; } - // setzt den LinkHdl zum Setzen der Bytes; - // der Handler muss einen Pointer auf die RequestInfo-Struktur - // zurueckgeben; die Anzahl der minimal zur Verfuegung zu stellenden - // Daten muss im Handler ueber ::GetRequestedByteCount() erfragt werden; - // die tatsaechlich zur Verfuegung gestellte BYTE-Anzahl - // wird in der RequestInfo-Struktur gesetzt - void SetRequestHdl( const Link& rRequestHdl ); - - // gibt den LinkHdl zum Setzen der Bytes zurueck - const Link& GetRequestHdl() const { return aReqLink; } - - // muss im ReqHdl gerufen werden, um zu erfahren, wieviele - // Bytes _mindestens_ bereitgestellt werden muessen - ULONG GetRequestedByteCount() const; - // gibt die Filternummer des Filters zurueck, // der im GraphicFilter zum Lesen dieses Formats // benoetigt wird diff --git a/svtools/inc/fltdefs.hxx b/svtools/inc/svtools/fltdefs.hxx index 8ef3f2ab3740..86462c2faa33 100644 --- a/svtools/inc/fltdefs.hxx +++ b/svtools/inc/svtools/fltdefs.hxx @@ -34,7 +34,7 @@ #define _FLTDEFS_HXX -#if defined ( WIN ) || defined ( WNT ) +#if defined ( WNT ) #define RGBQUAD RGBQUADWIN @@ -53,21 +53,6 @@ typedef struct RGBQUAD } RGBQUAD; -#ifdef WIN -typedef BYTE huge* PDIBBYTE; -#define MEMCPY hmemcpy -#define GLOBALALLOC(nSize) ((PDIBBYTE)GlobalLock(GlobalAlloc(GHND,(nSize)))) -#define GLOBALHANDLE(pPointer) ((HGLOBAL)GlobalHandle((*((size_t*)&(pPointer)+1)))) -#define GLOBALFREE(pPointer) (GlobalUnlock(GLOBALHANDLE((pPointer)))) -#define MEMSET( pDst, cByte, nCount ) \ -{ \ - PDIBBYTE pTmp = (PDIBBYTE) pDst; \ - for ( ULONG i = 0; i < nCount; i++ )\ - *pTmp++ = cByte; \ -} - -#else - typedef BYTE* PDIBBYTE; #define MEMCPY memcpy #define MEMSET memset @@ -75,7 +60,6 @@ typedef BYTE* PDIBBYTE; #define GLOBALFREE(pPointer) (GlobalFree((HGLOBAL)pPointer)) #define GLOBALHANDLE(pPointer) ((HGLOBAL)(pPointer)) -#endif #else typedef BYTE* PDIBBYTE; diff --git a/svtools/inc/fontsubstconfig.hxx b/svtools/inc/svtools/fontsubstconfig.hxx index 7bdb0dc412c3..7bdb0dc412c3 100644 --- a/svtools/inc/fontsubstconfig.hxx +++ b/svtools/inc/svtools/fontsubstconfig.hxx diff --git a/svtools/inc/framestatuslistener.hxx b/svtools/inc/svtools/framestatuslistener.hxx index fd068ac5f86b..fd068ac5f86b 100644 --- a/svtools/inc/framestatuslistener.hxx +++ b/svtools/inc/svtools/framestatuslistener.hxx diff --git a/svtools/inc/svtools/headbar.hxx b/svtools/inc/svtools/headbar.hxx index 1ef7687cfb1d..c225a95d1f55 100644 --- a/svtools/inc/svtools/headbar.hxx +++ b/svtools/inc/svtools/headbar.hxx @@ -360,15 +360,15 @@ public: void SetHelpText( USHORT nItemId, const XubString& rText ); XubString GetHelpText( USHORT nItemId ) const; - void SetHelpId( USHORT nItemId, ULONG nHelpId ); - ULONG GetHelpId( USHORT nItemId ) const; + void SetHelpId( USHORT nItemId, const rtl::OString& nHelpId ); + rtl::OString GetHelpId( USHORT nItemId ) const; Size CalcWindowSizePixel() const; inline void SetHelpText( const String& rText ) { Window::SetHelpText( rText ); } inline const String& GetHelpText() const { return Window::GetHelpText(); } - inline void SetHelpId( ULONG nId ) { Window::SetHelpId( nId ); } - inline ULONG GetHelpId() const { return Window::GetHelpId(); } + inline void SetHelpId( const rtl::OString& rId ) { Window::SetHelpId( rId ); } + inline const rtl::OString& GetHelpId() const { return Window::GetHelpId(); } inline void SetStartDragHdl( const Link& rLink ) { maStartDragHdl = rLink; } inline const Link& GetStartDragHdl() const { return maStartDragHdl; } diff --git a/svtools/inc/helpagentwindow.hxx b/svtools/inc/svtools/helpagentwindow.hxx index 45b2917c500a..45b2917c500a 100644 --- a/svtools/inc/helpagentwindow.hxx +++ b/svtools/inc/svtools/helpagentwindow.hxx diff --git a/svtools/inc/svtools/helpid.hrc b/svtools/inc/svtools/helpid.hrc index 1ffb7a99fb32..ecf8ba4b1bf7 100644 --- a/svtools/inc/svtools/helpid.hrc +++ b/svtools/inc/svtools/helpid.hrc @@ -28,90 +28,103 @@ #ifndef _SVT_HELPID_HRC #define _SVT_HELPID_HRC -// include --------------------------------------------------------------- - -#include <svl/solar.hrc> - -// Help-Ids -------------------------------------------------------------- - -#define HID_FILEDLG_OPENDLG (HID_SVTOOLS_START + 0) -#define HID_FILEDLG_PATHDLG (HID_SVTOOLS_START + 1) -#define HID_FILEDLG_DIR (HID_SVTOOLS_START + 2) -#define HID_FILEDLG_EDIT (HID_SVTOOLS_START + 3) -#define HID_FILEDLG_DIRS (HID_SVTOOLS_START + 4) -#define HID_FILEDLG_DRIVE (HID_SVTOOLS_START + 5) -#define HID_FILEDLG_DRIVES (HID_SVTOOLS_START + 6) -#define HID_FILEDLG_NEWDIR (HID_SVTOOLS_START + 7) -#define HID_FILEDLG_HOME (HID_SVTOOLS_START + 8) -#define HID_FILEDLG_FILE (HID_SVTOOLS_START + 9) -#define HID_FILEDLG_FILES (HID_SVTOOLS_START + 10) -#define HID_FILEDLG_PATH (HID_SVTOOLS_START + 11) -#define HID_FILEDLG_TYPE (HID_SVTOOLS_START + 12) -#define HID_FILEDLG_TYPES (HID_SVTOOLS_START + 13) +#define HID_FILEDLG_OPENDLG "SVT_HID_FILEDLG_OPENDLG" +#define HID_FILEDLG_PATHDLG "SVT_HID_FILEDLG_PATHDLG" +#define HID_FILEDLG_DIR "SVT_HID_FILEDLG_DIR" +#define HID_FILEDLG_EDIT "SVT_HID_FILEDLG_EDIT" +#define HID_FILEDLG_DIRS "SVT_HID_FILEDLG_DIRS" +#define HID_FILEDLG_DRIVE "SVT_HID_FILEDLG_DRIVE" +#define HID_FILEDLG_DRIVES "SVT_HID_FILEDLG_DRIVES" +#define HID_FILEDLG_NEWDIR "SVT_HID_FILEDLG_NEWDIR" +#define HID_FILEDLG_HOME "SVT_HID_FILEDLG_HOME" +#define HID_FILEDLG_FILE "SVT_HID_FILEDLG_FILE" +#define HID_FILEDLG_FILES "SVT_HID_FILEDLG_FILES" +#define HID_FILEDLG_PATH "SVT_HID_FILEDLG_PATH" +#define HID_FILEDLG_TYPE "SVT_HID_FILEDLG_TYPE" +#define HID_FILEDLG_TYPES "SVT_HID_FILEDLG_TYPES" +#define HID_FILEDLG_LINK_CB "SVT_HID_FILEDLG_LINK_CB" +#define HID_FILEDLG_PREVIEW_CB "SVT_HID_FILEDLG_PREVIEW_CB" +#define HID_FILEDLG_STANDARD "SVT_HID_FILEDLG_STANDARD" +#define HID_FILEDLG_MANAGER "SVT_HID_FILEDLG_MANAGER" +#define HID_FILEDLG_URL "SVT_HID_FILEDLG_URL" +#define HID_FILEDLG_USE_PASSWD "SVT_HID_FILEDLG_USE_PASSWD" +#define HID_FILEDLG_READ_ONLY "SVT_HID_FILEDLG_READ_ONLY" +#define HID_FILEDLG_AUTOCOMPLETEBOX "SVT_HID_FILEDLG_AUTOCOMPLETEBOX" +#define HID_FILEDLG_SAVE_BTN "SVT_HID_FILEDLG_SAVE_BTN" +#define HID_FILEDLG_SAVE_FILENAME "SVT_HID_FILEDLG_SAVE_FILENAME" +#define HID_FILEDLG_SAVE_FILETYPE "SVT_HID_FILEDLG_SAVE_FILETYPE" +#define HID_FILEDLG_INSERT_BTN "SVT_HID_FILEDLG_INSERT_BTN" +#define HID_FILEDLG_PATH_BTN "SVT_HID_FILEDLG_PATH_BTN" +#define HID_FILEDLG_PATH_FILENAME "SVT_HID_FILEDLG_PATH_FILENAME" +#define HID_FILEDLG_FOLDER_BTN "SVT_HID_FILEDLG_FOLDER_BTN" +#define HID_FILEDLG_FOLDER_FILENAME "SVT_HID_FILEDLG_FOLDER_FILENAME" +#define HID_FILEDLG_SRCHFOLDER_BTN "SVT_HID_FILEDLG_SRCHFOLDER_BTN" +#define HID_FILEDLG_EDIT_FAVORITES "SVT_HID_FILEDLG_EDIT_FAVORITES" +#define HID_FILEDLG_NEW_FAVORITE "SVT_HID_FILEDLG_NEW_FAVORITE" +#define HID_FILEDLG_EDIT_FAVORITES_LISTBOX "SVT_HID_FILEDLG_EDIT_FAVORITES_LISTBOX" +#define HID_FILEDLG_EDIT_FAVORITES_HEADERBAR "SVT_HID_FILEDLG_EDIT_FAVORITES_HEADERBAR" +#define HID_FILEDLG_EXPORTASPDF "SVT_HID_FILEDLG_EXPORTASPDF" // HelpID's fuer die Textkomponente -#define HID_TEXTCPNT_OPEN_LINK (HID_SVTOOLS_START + 14) -#define HID_TEXTCPNT_OPEN_LINK_NEW (HID_SVTOOLS_START + 15) -#define HID_TEXTCPNT_DOWNLOAD (HID_SVTOOLS_START + 16) -#define HID_TEXTCPNT_ADD_BOOKMARK (HID_SVTOOLS_START + 17) -#define HID_TEXTCPNT_COPY_LINK (HID_SVTOOLS_START + 18) +#define HID_TEXTCPNT_OPEN_LINK "SVT_HID_TEXTCPNT_OPEN_LINK" +#define HID_TEXTCPNT_OPEN_LINK_NEW "SVT_HID_TEXTCPNT_OPEN_LINK_NEW" +#define HID_TEXTCPNT_DOWNLOAD "SVT_HID_TEXTCPNT_DOWNLOAD" +#define HID_TEXTCPNT_ADD_BOOKMARK "SVT_HID_TEXTCPNT_ADD_BOOKMARK" +#define HID_TEXTCPNT_COPY_LINK "SVT_HID_TEXTCPNT_COPY_LINK" // HelpID's fuer RegisterDialog -#define HID_LIMITED_DIALOG (HID_SVTOOLS_START + 20) +#define HID_LIMITED_DIALOG "SVT_HID_LIMITED_DIALOG" // Help ids of template dialog -#define HID_TEMPLATEDLG_DIALOG (HID_SVTOOLS_START + 21) -#define HID_TEMPLATEDLG_ICONCTRL (HID_SVTOOLS_START + 22) -#define HID_TEMPLATEDLG_FILEVIEW (HID_SVTOOLS_START + 23) -#define HID_TEMPLATEDLG_TB_BACK (HID_SVTOOLS_START + 24) -#define HID_TEMPLATEDLG_TB_PREV (HID_SVTOOLS_START + 25) -#define HID_TEMPLATEDLG_TB_PRINT (HID_SVTOOLS_START + 26) -#define HID_TEMPLATEDLG_TB_DOCINFO (HID_SVTOOLS_START + 27) -#define HID_TEMPLATEDLG_TB_PREVIEW (HID_SVTOOLS_START + 28) +#define HID_TEMPLATEDLG_DIALOG "SVT_HID_TEMPLATEDLG_DIALOG" +#define HID_TEMPLATEDLG_ICONCTRL "SVT_HID_TEMPLATEDLG_ICONCTRL" +#define HID_TEMPLATEDLG_FILEVIEW "SVT_HID_TEMPLATEDLG_FILEVIEW" +#define HID_TEMPLATEDLG_TB_BACK "SVT_HID_TEMPLATEDLG_TB_BACK" +#define HID_TEMPLATEDLG_TB_PREV "SVT_HID_TEMPLATEDLG_TB_PREV" +#define HID_TEMPLATEDLG_TB_PRINT "SVT_HID_TEMPLATEDLG_TB_PRINT" +#define HID_TEMPLATEDLG_TB_DOCINFO "SVT_HID_TEMPLATEDLG_TB_DOCINFO" +#define HID_TEMPLATEDLG_TB_PREVIEW "SVT_HID_TEMPLATEDLG_TB_PREVIEW" -#define HID_ADDRTEMPL_FIELD_ASSIGNMENT (HID_SVTOOLS_START + 29) +#define HID_ADDRTEMPL_FIELD_ASSIGNMENT "SVT_HID_ADDRTEMPL_FIELD_ASSIGNMENT" // Help ids for the filepicker dialogs -#define HID_EXPLORERDLG_FILE (HID_SVTOOLS_START + 30) +#define HID_EXPLORERDLG_FILE "SVT_HID_EXPLORERDLG_FILE" // help ids for fileview contextmenu -#define HID_FILEVIEW_MENU_DELETE (HID_SVTOOLS_START + 31) -#define HID_FILEVIEW_MENU_RENAME (HID_SVTOOLS_START + 32) +#define HID_FILEVIEW_MENU_DELETE "SVT_HID_FILEVIEW_MENU_DELETE" +#define HID_FILEVIEW_MENU_RENAME "SVT_HID_FILEVIEW_MENU_RENAME" // help ids for the different modi of the file picker dialog // FREE -#define HID_FILESAVE_LEVELUP (HID_SVTOOLS_START + 34) -#define HID_FILESAVE_CREATEDIRECTORY (HID_SVTOOLS_START + 35) -#define HID_FILESAVE_DEFAULTDIRECTORY (HID_SVTOOLS_START + 36) -#define HID_FILESAVE_FILEVIEW (HID_SVTOOLS_START + 37) -#define HID_FILESAVE_TEMPLATE (HID_SVTOOLS_START + 38) -#define HID_FILESAVE_FILEURL (HID_SVTOOLS_START + 39) -#define HID_FILESAVE_FILETYPE (HID_SVTOOLS_START + 40) -#define HID_FILESAVE_DOSAVE (HID_SVTOOLS_START + 41) -#define HID_FILESAVE_AUTOEXTENSION (HID_SVTOOLS_START + 42) -#define HID_FILESAVE_SAVEWITHPASSWORD (HID_SVTOOLS_START + 43) -#define HID_FILESAVE_CUSTOMIZEFILTER (HID_SVTOOLS_START + 44) -#define HID_FILESAVE_SELECTION (HID_SVTOOLS_START + 45) -#define HID_FILESAVE_DIALOG (HID_SVTOOLS_START + 46) -#define HID_FILESAVE_DOPLAY (HID_SVTOOLS_START + 47) - -#define HID_FILEOPEN_READONLY (HID_SVTOOLS_START + 48) -#define HID_FILEOPEN_VERSION (HID_SVTOOLS_START + 49) -#define HID_FILEOPEN_IMAGE_TEMPLATE (HID_SVTOOLS_START + 50) - -#define HID_FILEDLG_LINK_CB (HID_SFX_START + 276) -#define HID_FILEDLG_PREVIEW_CB (HID_SFX_START + 277) +#define HID_FILESAVE_LEVELUP "SVT_HID_FILESAVE_LEVELUP" +#define HID_FILESAVE_CREATEDIRECTORY "SVT_HID_FILESAVE_CREATEDIRECTORY" +#define HID_FILESAVE_DEFAULTDIRECTORY "SVT_HID_FILESAVE_DEFAULTDIRECTORY" +#define HID_FILESAVE_FILEVIEW "SVT_HID_FILESAVE_FILEVIEW" +#define HID_FILESAVE_TEMPLATE "SVT_HID_FILESAVE_TEMPLATE" +#define HID_FILESAVE_FILEURL "SVT_HID_FILESAVE_FILEURL" +#define HID_FILESAVE_FILETYPE "SVT_HID_FILESAVE_FILETYPE" +#define HID_FILESAVE_DOSAVE "SVT_HID_FILESAVE_DOSAVE" +#define HID_FILESAVE_AUTOEXTENSION "SVT_HID_FILESAVE_AUTOEXTENSION" +#define HID_FILESAVE_SAVEWITHPASSWORD "SVT_HID_FILESAVE_SAVEWITHPASSWORD" +#define HID_FILESAVE_CUSTOMIZEFILTER "SVT_HID_FILESAVE_CUSTOMIZEFILTER" +#define HID_FILESAVE_SELECTION "SVT_HID_FILESAVE_SELECTION" +#define HID_FILESAVE_DIALOG "SVT_HID_FILESAVE_DIALOG" +#define HID_FILESAVE_DOPLAY "SVT_HID_FILESAVE_DOPLAY" + +#define HID_FILEOPEN_READONLY "SVT_HID_FILEOPEN_READONLY" +#define HID_FILEOPEN_VERSION "SVT_HID_FILEOPEN_VERSION" +#define HID_FILEOPEN_IMAGE_TEMPLATE "SVT_HID_FILEOPEN_IMAGE_TEMPLATE" // uniqueid for the helpagent window (testtool) -#define HID_HELPAGENT_WINDOW (HID_SVTOOLS_START + 51) +#define HID_HELPAGENT_WINDOW "SVT_HID_HELPAGENT_WINDOW" // registration dialog -#define HID_REGISTRATION_DIALOG (HID_SVTOOLS_START + 52) +#define HID_REGISTRATION_DIALOG "SVT_HID_REGISTRATION_DIALOG" -#define HID_PRINTDIALOG_TOFILE (HID_SVTOOLS_START + 53) +#define HID_PRINTDIALOG_TOFILE "SVT_HID_PRINTDIALOG_TOFILE" -#define HID_WIZARD_NEXT (HID_SVTOOLS_START + 54) -#define HID_WIZARD_PREVIOUS (HID_SVTOOLS_START + 55) +#define HID_WIZARD_NEXT "SVT_HID_WIZARD_NEXT" +#define HID_WIZARD_PREVIOUS "SVT_HID_WIZARD_PREVIOUS" #endif diff --git a/svtools/inc/htmlkywd.hxx b/svtools/inc/svtools/htmlkywd.hxx index 13928eaeaa39..13928eaeaa39 100644 --- a/svtools/inc/htmlkywd.hxx +++ b/svtools/inc/svtools/htmlkywd.hxx diff --git a/svtools/inc/svtools/htmlout.hxx b/svtools/inc/svtools/htmlout.hxx index 888286b231ee..1a21f1154602 100644 --- a/svtools/inc/svtools/htmlout.hxx +++ b/svtools/inc/svtools/htmlout.hxx @@ -60,7 +60,7 @@ struct SVT_DLLPUBLIC HTMLOutContext struct HTMLOutFuncs { -#if defined(MAC) || defined(UNX) +#if defined(UNX) static const sal_Char sNewLine; // nur \012 oder \015 #else static const sal_Char __FAR_DATA sNewLine[]; // \015\012 diff --git a/svtools/inc/htmltokn.h b/svtools/inc/svtools/htmltokn.h index 7c43c1463e25..7c43c1463e25 100644 --- a/svtools/inc/htmltokn.h +++ b/svtools/inc/svtools/htmltokn.h diff --git a/svtools/inc/imagemgr.hrc b/svtools/inc/svtools/imagemgr.hrc index 19cc2942d6f4..19cc2942d6f4 100644 --- a/svtools/inc/imagemgr.hrc +++ b/svtools/inc/svtools/imagemgr.hrc diff --git a/svtools/inc/imagemgr.hxx b/svtools/inc/svtools/imagemgr.hxx index efd15c5f4cde..efd15c5f4cde 100644 --- a/svtools/inc/imagemgr.hxx +++ b/svtools/inc/svtools/imagemgr.hxx diff --git a/svtools/inc/imageresourceaccess.hxx b/svtools/inc/svtools/imageresourceaccess.hxx index d77b1c97a512..d77b1c97a512 100644 --- a/svtools/inc/imageresourceaccess.hxx +++ b/svtools/inc/svtools/imageresourceaccess.hxx diff --git a/svtools/inc/imgdef.hxx b/svtools/inc/svtools/imgdef.hxx index 7cdcec0fd642..7cdcec0fd642 100644 --- a/svtools/inc/imgdef.hxx +++ b/svtools/inc/svtools/imgdef.hxx diff --git a/svtools/inc/indexentryres.hxx b/svtools/inc/svtools/indexentryres.hxx index f2c73000ed67..f2c73000ed67 100644 --- a/svtools/inc/indexentryres.hxx +++ b/svtools/inc/svtools/indexentryres.hxx diff --git a/svtools/inc/inetimg.hxx b/svtools/inc/svtools/inetimg.hxx index 924bbad831d6..924bbad831d6 100644 --- a/svtools/inc/inetimg.hxx +++ b/svtools/inc/svtools/inetimg.hxx diff --git a/svtools/inc/itemdel.hxx b/svtools/inc/svtools/itemdel.hxx index 51af97730079..51af97730079 100644 --- a/svtools/inc/itemdel.hxx +++ b/svtools/inc/svtools/itemdel.hxx diff --git a/svtools/inc/ivctrl.hxx b/svtools/inc/svtools/ivctrl.hxx index 5bea4675b62e..5bea4675b62e 100644 --- a/svtools/inc/ivctrl.hxx +++ b/svtools/inc/svtools/ivctrl.hxx diff --git a/svtools/inc/localresaccess.hxx b/svtools/inc/svtools/localresaccess.hxx index c72f68f64f03..c72f68f64f03 100644 --- a/svtools/inc/localresaccess.hxx +++ b/svtools/inc/svtools/localresaccess.hxx diff --git a/svtools/inc/svtools/logindlg.hxx b/svtools/inc/svtools/logindlg.hxx deleted file mode 100644 index 9cf12dd70610..000000000000 --- a/svtools/inc/svtools/logindlg.hxx +++ /dev/null @@ -1,118 +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 _SVTOOLS_LOGINDLG_HXX_ -#define _SVTOOLS_LOGINDLG_HXX_ - -#include "svtools/svtdllapi.h" -#include <svtools/stdctrl.hxx> -#ifndef _SV_BUTTON_HXX -#include <vcl/button.hxx> -#endif -#include <vcl/dialog.hxx> -#include <vcl/edit.hxx> -#include <vcl/fixed.hxx> - -//============================================================================ -#define LF_NO_PATH 0x0001 // hide "path" -#define LF_NO_USERNAME 0x0002 // hide "name" -#define LF_NO_PASSWORD 0x0004 // hide "password" -#define LF_NO_SAVEPASSWORD 0x0008 // hide "save password" -#define LF_NO_ERRORTEXT 0x0010 // hide message -#define LF_PATH_READONLY 0x0020 // "path" readonly -#define LF_USERNAME_READONLY 0x0040 // "name" readonly -#define LF_NO_ACCOUNT 0x0080 // hide "account" - -//............................................................................ -namespace svt -{ -//............................................................................ - -//============================================================================ -class SVT_DLLPUBLIC LoginDialog : public ModalDialog -{ - FixedInfo aErrorInfo; - FixedLine aErrorGB; - FixedInfo aRequestInfo; - FixedText aPathFT; - Edit aPathED; - FixedInfo aPathInfo; - PushButton aPathBtn; - FixedText aNameFT; - Edit aNameED; - FixedInfo aNameInfo; - FixedText aPasswordFT; - Edit aPasswordED; - FixedText aAccountFT; - Edit aAccountED; - CheckBox aSavePasswdBtn; - FixedLine aLoginGB; - OKButton aOKBtn; - CancelButton aCancelBtn; - HelpButton aHelpBtn; - - SVT_DLLPRIVATE void HideControls_Impl( USHORT nFlags ); - - DECL_DLLPRIVATE_LINK( OKHdl_Impl, OKButton * ); - DECL_DLLPRIVATE_LINK( PathHdl_Impl, PushButton * ); - -public: - LoginDialog( Window* pParent, USHORT nFlags, - const String& rServer, const String* pRealm = NULL ); - - String GetPath() const { return aPathED.GetText(); } - void SetPath( const String& rNewPath ) - { aPathED.SetText( rNewPath ); - aPathInfo.SetText( rNewPath );} - String GetName() const { return aNameED.GetText(); } - void SetName( const String& rNewName ); - String GetPassword() const { return aPasswordED.GetText(); } - void SetPassword( const String& rNew ) - { aPasswordED.SetText( rNew ); } - String GetAccount() const { return aAccountED.GetText(); } - void SetAccount( const String& rNew ) - { aAccountED.SetText( rNew ); } - BOOL IsSavePassword() const - { return aSavePasswdBtn.IsChecked(); } - void SetSavePassword( BOOL bSave ) - { aSavePasswdBtn.Check( bSave ); } - void SetSavePasswordText( const String& rTxt ) - { aSavePasswdBtn.SetText( rTxt ); } - void SetErrorText( const String& rTxt ) - { aErrorInfo.SetText( rTxt ); } - void SetLoginRequestText( const String& rTxt ) - { aRequestInfo.SetText( rTxt ); } - void ClearPassword(); - void ClearAccount(); -}; - -//............................................................................ -} // namespace svt -//............................................................................ - -#endif // _SVTOOLS_LOGINDLG_HXX_ - diff --git a/svtools/inc/svtools/parrtf.hxx b/svtools/inc/svtools/parrtf.hxx index 179f5a28259a..b96e3937231d 100644 --- a/svtools/inc/svtools/parrtf.hxx +++ b/svtools/inc/svtools/parrtf.hxx @@ -30,7 +30,7 @@ #include "svtools/svtdllapi.h" #include <svtools/svparser.hxx> -#include <svl/svarray.hxx> +#include <stack> struct RtfParserState_Impl { @@ -42,7 +42,7 @@ struct RtfParserState_Impl {} }; -SV_DECL_VARARR( RtfParserStates_Impl, RtfParserState_Impl, 16, 16 ) +typedef std::stack< RtfParserState_Impl > RtfParserStates_Impl; class SVT_DLLPUBLIC SvRTFParser : public SvParser { diff --git a/svtools/inc/prgsbar.hxx b/svtools/inc/svtools/prgsbar.hxx index c02d400c6931..c02d400c6931 100644 --- a/svtools/inc/prgsbar.hxx +++ b/svtools/inc/svtools/prgsbar.hxx diff --git a/svtools/inc/svtools/printdlg.hxx b/svtools/inc/svtools/printdlg.hxx deleted file mode 100644 index 8c455b910b41..000000000000 --- a/svtools/inc/svtools/printdlg.hxx +++ /dev/null @@ -1,297 +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 _SV_PRINTDLG_HXX_ -#define _SV_PRINTDLG_HXX_ - -#include "svtools/svtdllapi.h" - -#ifndef _VCL_DIALOG_HXX -#include <vcl/dialog.hxx> -#endif -#ifndef _VCL_FIXED_HXX -#include <vcl/fixed.hxx> -#endif -#ifndef _VCL_BUTTON_HXX -#include <vcl/button.hxx> -#endif -#ifndef _VCL_GROUP_HXX -#include <vcl/group.hxx> -#endif -#ifndef _VCL_FIELD_HXX -#include <vcl/field.hxx> -#endif -#ifndef _VCL_EDIT_HXX -#include <vcl/edit.hxx> -#endif -#ifndef _VCL_LSTBOX_HXX -#include <vcl/lstbox.hxx> -#endif -#include <svtools/stdctrl.hxx> - -class Printer; -class QueueInfo; -struct SvtPrinterImpl; - -// --------------------- -// - PrintDialog-Types - -// --------------------- - -enum PrintDialogRange{ - PRINTDIALOG_ALL, PRINTDIALOG_SELECTION, PRINTDIALOG_FROMTO, PRINTDIALOG_RANGE }; - -enum PrintSheetRange -{ - PRINTSHEETS_ALL, - PRINTSHEETS_SELECTED_SHEETS, - PRINTSHEETS_SELECTED_CELLS -}; - - -// --------------- -// - PrintDialog - -// --------------- - -class SVT_DLLPUBLIC PrintDialog : public ModalDialog -{ -private: - FixedLine maFlPrinter; - FixedText maFtName; - ListBox maLbName; - PushButton maBtnProperties; - FixedText maFtStatus; - FixedInfo maFiStatus; - FixedText maFtType; - FixedInfo maFiType; - FixedText maFtLocation; - FixedInfo maFiLocation; - FixedText maFtComment; - FixedInfo maFiComment; - - // "Print to file" or "Fax number" - CheckBox maCbxFilePrint; - FixedInfo maFiPrintFile; - FixedText maFiFaxNo; - Edit maEdtFaxNo; - //PushButton maBtnBrowse_nomore; - - // "Print" - FixedLine maFlPrint; - RadioButton maRbtAllSheets; - RadioButton maRbtSelectedSheets; - RadioButton maRbtSelectedCells; - - // "Print range" - FixedLine maFlPrintRange; - RadioButton maRbtAll; - RadioButton maRbtPages; - RadioButton maRbtSelection; - Edit maEdtPages; - - FixedLine maFlSepCopiesRange; - - // "Copies" - FixedLine maFlCopies; - FixedText maFtCopies; - NumericField maNumCopies; - FixedImage maImgCollate; - FixedImage maImgNotCollate; - CheckBox maCbxCollate; - - FixedLine maFlSepButtonLine; - PushButton maBtnOptions; - OKButton maBtnOK; - CancelButton maBtnCancel; - HelpButton maBtnHelp; - - AutoTimer maStatusTimer; - Printer* mpPrinter; - SvtPrinterImpl* mpPrinterImpl; - - XubString maRangeText; - USHORT mnCopyCount; - USHORT mnFirstPage; - USHORT mnLastPage; - USHORT mnMinPage; - USHORT mnMaxPage; - PrintDialogRange meCheckRange; - BOOL mbAll; - BOOL mbSelection; - BOOL mbFromTo; - BOOL mbRange; - BOOL mbCollate; - BOOL mbCollateCheck; - BOOL mbOptions; - bool mbWithSheetsAndCells; - Link maOptionsHdlLink; // Link zum Options-Handler - Link maOKHdlLink; // Link zum OK-Handler - - String maAllFilterStr; - - SVT_DLLPRIVATE void ImplCheckOK(); - SVT_DLLPRIVATE void ImplInitControls(); - SVT_DLLPRIVATE void ImplFillDialogData(); - SVT_DLLPRIVATE void ImplSetInfo(); - SVT_DLLPRIVATE void ImplSetImages(); - SVT_DLLPRIVATE bool ImplGetFilename(); - - DECL_DLLPRIVATE_LINK( ImplPropertiesHdl, void* ); - DECL_DLLPRIVATE_LINK( ImplChangePrinterHdl, void* ); - DECL_DLLPRIVATE_LINK( ImplModifyControlHdl, void* ); - DECL_DLLPRIVATE_LINK( ImplStatusHdl, Timer* ); - -public: - PrintDialog( Window* pWindow, bool bWithSheetsAndCells ); - ~PrintDialog(); - - virtual long OK(); - virtual long ClickOptionsHdl(); - - void SetPrinter( Printer* pNewPrinter ) { mpPrinter = pNewPrinter; } - Printer* GetPrinter() const { return mpPrinter; } - - inline bool IsSheetRangeAvailable() const { return mbWithSheetsAndCells; } - void EnableSheetRange( bool bEnable, PrintSheetRange eRange ); - bool IsSheetRangeEnabled( PrintSheetRange eRange ) const; - void CheckSheetRange( PrintSheetRange eRange ); - PrintSheetRange GetCheckedSheetRange() const; - bool IsSheetRangeChecked( PrintSheetRange eRange ) const; - - void EnableRange( PrintDialogRange eRange ); - void DisableRange( PrintDialogRange eRange ); - BOOL IsRangeEnabled( PrintDialogRange eRange ) const; - - void CheckRange( PrintDialogRange eRange = PRINTDIALOG_ALL ) - { meCheckRange = eRange; } - PrintDialogRange GetCheckedRange() const { return meCheckRange; } - BOOL IsRangeChecked( PrintDialogRange eRange ) const; - - void SetRangeText( const XubString& rRange ) { maRangeText = rRange; } - const XubString& GetRangeText() const { return maRangeText; } - - void SetFirstPage( USHORT nPage = 0 ); - USHORT GetFirstPage() const { return mnFirstPage; } - void SetLastPage( USHORT nPage = 0 ); - USHORT GetLastPage() const { return mnLastPage; } - - void SetMinPage( USHORT nPage = 1 ) { mnMinPage = nPage; } - USHORT GetMinPage() const { return mnMinPage; } - void SetMaxPage( USHORT nPage = 65535 ) { mnMaxPage = nPage; } - USHORT GetMaxPage() const { return mnMaxPage; } - - void SetCopyCount( USHORT nCopies = 1 ) { mnCopyCount = nCopies; } - USHORT GetCopyCount() const { return mnCopyCount; } - - void EnableCollate( BOOL bEnable = TRUE ) - { mbCollate = bEnable; } - BOOL IsCollateEnabled() const { return mbCollate; } - void CheckCollate( BOOL bCheck = TRUE ) - { mbCollateCheck = bCheck; } - BOOL IsCollateChecked() const { return mbCollateCheck; } - - void ShowOptionsButton( BOOL bShow = TRUE ) - { mbOptions = bShow; } - BOOL IsOptionsButtonVisible() const { return mbOptions; } - - void SetOptionsHdl( const Link& rLink ) { maOptionsHdlLink = rLink; } - const Link& GetOptionsHdl() const { return maOptionsHdlLink; } - - void SetOKHdl( const Link& rLink ) { maOKHdlLink = rLink; } - const Link& GetOKHdl() const { return maOKHdlLink; } - - virtual void DataChanged( const DataChangedEvent& rDCEvt ); - virtual long Notify( NotifyEvent& rNEvt ); - - virtual short Execute(); - - void DisableHelp(); -}; - -inline void PrintDialog::EnableRange( PrintDialogRange eRange ) -{ - if ( eRange == PRINTDIALOG_ALL ) - mbAll = TRUE; - else if ( eRange == PRINTDIALOG_SELECTION ) - mbSelection = TRUE; - else if ( eRange == PRINTDIALOG_FROMTO ) - mbFromTo = TRUE; - else - mbRange = TRUE; -} - -inline void PrintDialog::DisableRange( PrintDialogRange eRange ) -{ - if ( eRange == PRINTDIALOG_ALL ) - mbAll = FALSE; - else if ( eRange == PRINTDIALOG_SELECTION ) - mbSelection = FALSE; - else if ( eRange == PRINTDIALOG_FROMTO ) - mbFromTo = FALSE; - else - mbRange = FALSE; -} - -inline BOOL PrintDialog::IsRangeEnabled( PrintDialogRange eRange ) const -{ - BOOL bRet; - - if ( eRange == PRINTDIALOG_ALL ) - bRet = mbAll; - else if ( eRange == PRINTDIALOG_SELECTION ) - bRet = mbSelection; - else if ( eRange == PRINTDIALOG_FROMTO ) - bRet = mbFromTo; - else - bRet = mbRange; - - return bRet; -} - -inline BOOL PrintDialog::IsRangeChecked( PrintDialogRange eRange ) const -{ - if ( eRange == meCheckRange ) - return TRUE; - else - return FALSE; -} - -inline void PrintDialog::SetFirstPage( USHORT nPage ) -{ - mnFirstPage = nPage; - if ( nPage && (nPage < mnMinPage) ) - mnMinPage = nPage; -} - -inline void PrintDialog::SetLastPage( USHORT nPage ) -{ - mnLastPage = nPage; - if ( nPage && (nPage > mnMaxPage) ) - mnMaxPage = nPage; -} - -#endif // _SV_PRINTDLG_HXX_ - diff --git a/svtools/inc/roadmap.hxx b/svtools/inc/svtools/roadmap.hxx index ff94cc966f4d..ff94cc966f4d 100644 --- a/svtools/inc/roadmap.hxx +++ b/svtools/inc/svtools/roadmap.hxx diff --git a/svtools/inc/svtools/roadmapwizard.hxx b/svtools/inc/svtools/roadmapwizard.hxx index 5d8e0d9b01bb..25d983c85a90 100644 --- a/svtools/inc/svtools/roadmapwizard.hxx +++ b/svtools/inc/svtools/roadmapwizard.hxx @@ -90,8 +90,8 @@ namespace svt void SetRoadmapBitmap( const BitmapEx& _rBitmap ); const BitmapEx& GetRoadmapBitmap( ) const; - void SetRoadmapSmartHelpId( const SmartId& _rId, SmartIdUpdateMode _aMode = SMART_SET_SMART ); - SmartId GetRoadmapSmartHelpId() const; + void SetRoadmapHelpId( const rtl::OString& _rId ); + const rtl::OString& GetRoadmapHelpId() const; void SetRoadmapInteractive( sal_Bool _bInteractive ); sal_Bool IsRoadmapInteractive(); diff --git a/svtools/inc/rtfkeywd.hxx b/svtools/inc/svtools/rtfkeywd.hxx index 5ccd9149bd68..de59e1d8faf9 100644 --- a/svtools/inc/rtfkeywd.hxx +++ b/svtools/inc/svtools/rtfkeywd.hxx @@ -39,6 +39,7 @@ #define OOO_STRING_SVTOOLS_RTF_ALT "\\alt" #define OOO_STRING_SVTOOLS_RTF_ANNOTATION "\\annotation" #define OOO_STRING_SVTOOLS_RTF_ANSI "\\ansi" +#define OOO_STRING_SVTOOLS_RTF_ATNDATE "\\atndate" #define OOO_STRING_SVTOOLS_RTF_ATNID "\\atnid" #define OOO_STRING_SVTOOLS_RTF_AUTHOR "\\author" #define OOO_STRING_SVTOOLS_RTF_B "\\b" @@ -976,12 +977,15 @@ #define OOO_STRING_SVTOOLS_RTF_SHPBXCOLUMN "\\shpbxcolumn" #define OOO_STRING_SVTOOLS_RTF_SHPBXMARGIN "\\shpbxmargin" #define OOO_STRING_SVTOOLS_RTF_SHPBXPAGE "\\shpbxpage" +#define OOO_STRING_SVTOOLS_RTF_SHPBXIGNORE "\\shpbxignore" #define OOO_STRING_SVTOOLS_RTF_SHPBYMARGIN "\\shpbymargin" #define OOO_STRING_SVTOOLS_RTF_SHPBYPAGE "\\shpbypage" #define OOO_STRING_SVTOOLS_RTF_SHPBYPARA "\\shpbypara" +#define OOO_STRING_SVTOOLS_RTF_SHPBYIGNORE "\\shpbyignore" #define OOO_STRING_SVTOOLS_RTF_SHPFBLWTXT "\\shpfblwtxt" #define OOO_STRING_SVTOOLS_RTF_SHPFHDR "\\shpfhdr" #define OOO_STRING_SVTOOLS_RTF_SHPGRP "\\shpgrp" +#define OOO_STRING_SVTOOLS_RTF_SHPINST "\\shpinst" #define OOO_STRING_SVTOOLS_RTF_SHPLEFT "\\shpleft" #define OOO_STRING_SVTOOLS_RTF_SHPLID "\\shplid" #define OOO_STRING_SVTOOLS_RTF_SHPLOCKANCHOR "\\shplockanchor" @@ -993,6 +997,7 @@ #define OOO_STRING_SVTOOLS_RTF_SHPWRK "\\shpwrk" #define OOO_STRING_SVTOOLS_RTF_SHPWR "\\shpwr" #define OOO_STRING_SVTOOLS_RTF_SHPZ "\\shpz" +#define OOO_STRING_SVTOOLS_RTF_SP "\\sp" #define OOO_STRING_SVTOOLS_RTF_SPRSBSP "\\sprsbsp" #define OOO_STRING_SVTOOLS_RTF_SPRSLNSP "\\sprslnsp" #define OOO_STRING_SVTOOLS_RTF_SPRSTSM "\\sprstsm" @@ -1116,6 +1121,7 @@ #define OOO_STRING_SVTOOLS_RTF_SHP "\\shp" #define OOO_STRING_SVTOOLS_RTF_SN "\\sn" #define OOO_STRING_SVTOOLS_RTF_SV "\\sv" +#define OOO_STRING_SVTOOLS_RTF_SP "\\sp" // Support for overline attributes #define OOO_STRING_SVTOOLS_RTF_OL "\\ol" @@ -1138,4 +1144,11 @@ #define OOO_STRING_SVTOOLS_RTF_OLHWAVE "\\olhwave" #define OOO_STRING_SVTOOLS_RTF_OLOLDBWAVE "\\ololdbwave" +// Support for nested tables +#define OOO_STRING_SVTOOLS_RTF_ITAP "\\itap" +#define OOO_STRING_SVTOOLS_RTF_NESTCELL "\\nestcell" +#define OOO_STRING_SVTOOLS_RTF_NESTTABLEPROPRS "\\nesttableprops" +#define OOO_STRING_SVTOOLS_RTF_NESTROW "\\nestrow" +#define OOO_STRING_SVTOOLS_RTF_NONESTTABLES "\\nonesttables" + #endif // _RTFKEYWD_HXX diff --git a/svtools/inc/rtfout.hxx b/svtools/inc/svtools/rtfout.hxx index 12a125635132..b9bfbc901848 100644 --- a/svtools/inc/rtfout.hxx +++ b/svtools/inc/svtools/rtfout.hxx @@ -41,7 +41,7 @@ class SvStream; class SVT_DLLPUBLIC RTFOutFuncs { public: -#if defined(MAC) || defined(UNX) +#if defined(UNX) static const sal_Char sNewLine; // nur \012 oder \015 #else static const sal_Char __FAR_DATA sNewLine[]; // \015\012 diff --git a/svtools/inc/rtftoken.h b/svtools/inc/svtools/rtftoken.h index e75254487312..f292682a0236 100644 --- a/svtools/inc/rtftoken.h +++ b/svtools/inc/svtools/rtftoken.h @@ -1258,7 +1258,7 @@ enum RTF_TOKEN_IDS { RTF_SOUTLVL, // shapes - RTF_SHP, RTF_SN, RTF_SV + RTF_SHP, RTF_SN, RTF_SV, RTF_SP /* RTF_SHPLEFT, RTF_SHPTOP, diff --git a/svtools/inc/ruler.hxx b/svtools/inc/svtools/ruler.hxx index c2649b298ba6..c2649b298ba6 100644 --- a/svtools/inc/ruler.hxx +++ b/svtools/inc/svtools/ruler.hxx diff --git a/svtools/inc/scriptedtext.hxx b/svtools/inc/svtools/scriptedtext.hxx index 5bb89969785b..5bb89969785b 100644 --- a/svtools/inc/scriptedtext.hxx +++ b/svtools/inc/svtools/scriptedtext.hxx diff --git a/svtools/inc/scrwin.hxx b/svtools/inc/svtools/scrwin.hxx index 1542ed667133..1542ed667133 100644 --- a/svtools/inc/scrwin.hxx +++ b/svtools/inc/svtools/scrwin.hxx diff --git a/svtools/inc/sfxecode.hxx b/svtools/inc/svtools/sfxecode.hxx index 59611eb35844..59611eb35844 100644 --- a/svtools/inc/sfxecode.hxx +++ b/svtools/inc/svtools/sfxecode.hxx diff --git a/svtools/inc/soerr.hxx b/svtools/inc/svtools/soerr.hxx index 41e488480039..41e488480039 100644 --- a/svtools/inc/soerr.hxx +++ b/svtools/inc/svtools/soerr.hxx diff --git a/svtools/inc/sores.hxx b/svtools/inc/svtools/sores.hxx index e5a7e51b54cf..e5a7e51b54cf 100644 --- a/svtools/inc/sores.hxx +++ b/svtools/inc/svtools/sores.hxx diff --git a/svtools/inc/statusbarcontroller.hxx b/svtools/inc/svtools/statusbarcontroller.hxx index 7856d96bcd77..7856d96bcd77 100644 --- a/svtools/inc/statusbarcontroller.hxx +++ b/svtools/inc/svtools/statusbarcontroller.hxx diff --git a/svtools/inc/stdmenu.hxx b/svtools/inc/svtools/stdmenu.hxx index 1b7e9816a103..1b7e9816a103 100644 --- a/svtools/inc/stdmenu.hxx +++ b/svtools/inc/svtools/stdmenu.hxx diff --git a/svtools/inc/svtools/svicnvw.hxx b/svtools/inc/svtools/svicnvw.hxx index ac15f0b55be6..68a76d25e108 100644 --- a/svtools/inc/svtools/svicnvw.hxx +++ b/svtools/inc/svtools/svicnvw.hxx @@ -89,7 +89,6 @@ class SvIconView : public SvLBox SvImpIconView* pImp; Image aCollapsedEntryBmp; Image aExpandedEntryBmp; - WinBits nWinBits; USHORT nIcnVwFlags; void SetModel( SvLBoxTreeList* ); @@ -111,6 +110,7 @@ protected: virtual void ReadDragServerInfo( const Point&, SvLBoxDDInfo* ); virtual void Command( const CommandEvent& rCEvt ); virtual void PreparePaint( SvLBoxEntry* ); + virtual void StateChanged( StateChangedType nStateChange ); public: @@ -203,7 +203,6 @@ public: SvLBoxEntry* GetEntryFromLogicPos( const Point& rDocPos ) const; - void SetWindowBits( WinBits nWinStyle ); virtual void PaintEntry( SvLBoxEntry* ); virtual void PaintEntry( SvLBoxEntry*, const Point& rDocPos ); Rectangle GetFocusRect( SvLBoxEntry* ); diff --git a/svtools/inc/svtools/svlbitm.hxx b/svtools/inc/svtools/svlbitm.hxx index c28b8d5db10c..5158c38fbd87 100644 --- a/svtools/inc/svtools/svlbitm.hxx +++ b/svtools/inc/svtools/svlbitm.hxx @@ -176,6 +176,8 @@ class SVT_DLLPUBLIC SvLBoxButton : public SvLBoxItem USHORT nItemFlags; USHORT nImgArrOffs; USHORT nBaseOffs; + + void ImplAdjustBoxSize( Size& io_rCtrlSize, ControlType i_eType, Window* pParent ); public: // An SvLBoxButton can be of three different kinds: an // enabled checkbox (the normal kind), a disabled checkbox diff --git a/svtools/inc/svtools/svlbox.hxx b/svtools/inc/svtools/svlbox.hxx index f33784f45397..95fbd9f014d1 100644 --- a/svtools/inc/svtools/svlbox.hxx +++ b/svtools/inc/svtools/svlbox.hxx @@ -47,6 +47,7 @@ #include <vcl/accel.hxx> #endif #include <vcl/mnemonicengine.hxx> +#include <vcl/quickselectionengine.hxx> #include <tools/gen.hxx> #include <svtools/treelist.hxx> #include <svl/svarray.hxx> @@ -253,10 +254,12 @@ DECLARE_SVTREELIST(SvLBoxTreeList, SvLBoxEntry*) class SvLBox; struct SvLBox_Impl { - bool m_bIsEmptyTextAllowed; - bool m_bEntryMnemonicsEnabled; - Link* m_pLink; - ::vcl::MnemonicEngine m_aMnemonicEngine; + bool m_bIsEmptyTextAllowed; + bool m_bEntryMnemonicsEnabled; + bool m_bDoingQuickSelection; + Link* m_pLink; + ::vcl::MnemonicEngine m_aMnemonicEngine; + ::vcl::QuickSelectionEngine m_aQuickSelectionEngine; SvLBox_Impl( SvLBox& _rBox ); }; @@ -267,6 +270,7 @@ class SVT_DLLPUBLIC SvLBox ,public DropTargetHelper ,public DragSourceHelper ,public ::vcl::IMnemonicEntryList + ,public ::vcl::ISearchableStringList { friend class SvLBoxEntry; @@ -290,7 +294,6 @@ class SVT_DLLPUBLIC SvLBox protected: - WinBits nWindowStyle; Link aExpandedHdl; Link aExpandingHdl; Link aSelectHdl; @@ -376,11 +379,18 @@ protected: // for asynchronous D&D sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt, SvLBox* pSourceView ); - // IMnemonicEntryList - virtual const void* FirstSearchEntry( String& _rEntryText ); - virtual const void* NextSearchEntry( const void* _pCurrentSearchEntry, String& _rEntryText ); - virtual void SelectSearchEntry( const void* _pEntry ); - virtual void ExecuteSearchEntry( const void* _pEntry ); + void OnCurrentEntryChanged(); + + // IMnemonicEntryList + virtual const void* FirstSearchEntry( String& _rEntryText ) const; + virtual const void* NextSearchEntry( const void* _pCurrentSearchEntry, String& _rEntryText ) const; + virtual void SelectSearchEntry( const void* _pEntry ); + virtual void ExecuteSearchEntry( const void* _pEntry ) const; + + // ISearchableStringList + virtual ::vcl::StringEntryIdentifier CurrentEntry( String& _out_entryText ) const; + virtual ::vcl::StringEntryIdentifier NextEntry( ::vcl::StringEntryIdentifier _currentEntry, String& _out_entryText ) const; + virtual void SelectEntry( ::vcl::StringEntryIdentifier _entry ); public: diff --git a/svtools/inc/svtools/svmedit.hxx b/svtools/inc/svtools/svmedit.hxx index 3bdfdc44e8e9..9c8a4a34dbf6 100644 --- a/svtools/inc/svtools/svmedit.hxx +++ b/svtools/inc/svtools/svmedit.hxx @@ -28,7 +28,7 @@ #ifndef _SVEDIT_HXX #define _SVEDIT_HXX -#include <vcl/wintypes.hxx> +#include <tools/wintypes.hxx> #include <vcl/edit.hxx> #include <svtools/syntaxhighlight.hxx> diff --git a/svtools/inc/svtools/svtdata.hxx b/svtools/inc/svtools/svtdata.hxx index 9faadaff7305..ad7b60b3f2b7 100644 --- a/svtools/inc/svtools/svtdata.hxx +++ b/svtools/inc/svtools/svtdata.hxx @@ -28,6 +28,7 @@ #ifndef _SVTOOLS_SVTDATA_HXX #define _SVTOOLS_SVTDATA_HXX +#include "svtools/svtdllapi.h" #include <tools/resid.hxx> #include <com/sun/star/lang/Locale.hpp> @@ -40,11 +41,10 @@ class ImpSvtData public: SfxItemDesruptorList_Impl * pItemDesruptList; ResMgr * pResMgr; - ResMgr * pPatchResMgr; private: ImpSvtData(): - pItemDesruptList(0), pResMgr(0), pPatchResMgr(0) + pItemDesruptList(0), pResMgr(0) {} ~ImpSvtData(); @@ -52,32 +52,16 @@ private: public: ResMgr * GetResMgr(const ::com::sun::star::lang::Locale aLocale); ResMgr * GetResMgr(); // VCL dependant, only available in SVT, not in SVL! - ResMgr * GetPatchResMgr(); - ResMgr * GetPatchResMgr(const ::com::sun::star::lang::Locale& aLocale); static ImpSvtData & GetSvtData(); }; //============================================================================ - -class SvpResId: public ResId +class SVT_DLLPUBLIC SvtResId: public ResId { public: - SvpResId( USHORT nId, const ::com::sun::star::lang::Locale aLocale ): - ResId( nId, *ImpSvtData::GetSvtData().GetResMgr( aLocale ) ) {} - - // VCL dependant, only available in SVT, not in SVL! - SvpResId( USHORT nId ); -}; - - -class SvtResId: public ResId -{ -public: - SvtResId(USHORT nId, const ::com::sun::star::lang::Locale aLocale): - ResId(nId, *ImpSvtData::GetSvtData().GetResMgr(aLocale)) {} - - SvtResId(USHORT nId): ResId(nId, *ImpSvtData::GetSvtData().GetResMgr()) {} + SvtResId(USHORT nId, const ::com::sun::star::lang::Locale aLocale); + SvtResId(USHORT nId); // VCL dependant, only available in SVT, not in SVL! }; diff --git a/svtools/inc/svtools/svtools.hrc b/svtools/inc/svtools/svtools.hrc index a57a0f5bb0fe..0461064f7d96 100644 --- a/svtools/inc/svtools/svtools.hrc +++ b/svtools/inc/svtools/svtools.hrc @@ -38,22 +38,12 @@ //............................................................................. // various unsorted stuff -#define DLG_EXPORT_PIX (RID_SVTOOLS_START+1) -#define DLG_EXPORT_VEC (RID_SVTOOLS_START+2) #define DLG_TWAIN_SOURCE (RID_SVTOOLS_START+3) #define DLG_SVT_EXPLORERFILE (RID_SVTOOLS_START+4) #define DLG_SVT_QUERYFOLDERNAME (RID_SVTOOLS_START+5) #define DLG_SVT_QUERYDELETE (RID_SVTOOLS_START+6) -#define EXPORT_DIALOG_TITLE (RID_SVTOOLS_START+4) -#define KEY_MODE (RID_SVTOOLS_START+5) -#define KEY_RES (RID_SVTOOLS_START+6) -#define KEY_SIZE (RID_SVTOOLS_START+7) - -#define KEY_COLORS (RID_SVTOOLS_START+9) -#define KEY_RLE_CODING (RID_SVTOOLS_START+10) - #define STR_SVT_AUTOMATIC_COLOR (RID_SVTOOLS_START+16) #define STR_SVT_FILEVIEW_COLUMN_TITLE (RID_SVTOOLS_START + 20) @@ -99,6 +89,10 @@ #define STR_BASICKEY_FORMAT_TRUE (RID_SVTOOLS_START+107) #define STR_BASICKEY_FORMAT_FALSE (RID_SVTOOLS_START+108) #define CONFIG_BASIC_FORMAT_END (RID_SVTOOLS_START+109) +#define STR_UNDO (RID_SVTOOLS_START+110) +#define STR_REDO (RID_SVTOOLS_START+111) +#define STR_REPEAT (RID_SVTOOLS_START+112) + #define STR_INVALIDTRYBUY (RID_SVTOOLS_START+120) #define STR_OLDTRYBUY (RID_SVTOOLS_START+121) @@ -289,17 +283,16 @@ //............................................................................. // dialogs - -#define DLG_EXPORT_JPG_START (RID_SVTOOLS_START+110) -#define DLG_EXPORT_JPG (RID_SVTOOLS_START+111) -#define DLG_EXPORT_JPG_END (RID_SVTOOLS_START+112) +#define DLG_EXPORT_START (STR_ARR_SVT_LANGUAGE_TABLE_END + 1) +#define DLG_EXPORT (DLG_EXPORT_START) +#define DLG_EXPORT_TITLE (DLG_EXPORT_START+1) +#define DLG_EXPORT_END (DLG_EXPORT_TITLE) #define DLG_LOGIN (RID_SVTOOLS_START+113) #define DLG_ADDRESSBOOKSOURCE (RID_SVTOOLS_START+114) #define DLG_REGISTRATION_REQUEST (RID_SVTOOLS_START+115) -#define DLG_EXPORT_EPNG (RID_SVTOOLS_START+116) //............................................................................. // bitmaps diff --git a/svtools/inc/svtools/svtreebx.hxx b/svtools/inc/svtools/svtreebx.hxx index a600b91db1c4..79402cb13f23 100644 --- a/svtools/inc/svtools/svtreebx.hxx +++ b/svtools/inc/svtools/svtreebx.hxx @@ -39,11 +39,6 @@ class TabBar; #define SV_TAB_BORDER 8 -#define WB_HASBUTTONSATROOT ((WinBits)0x0800) -#define WB_NOINITIALSELECTION WB_DROPDOWN -#define WB_HIDESELECTION WB_NOHIDESELECTION -#define WB_FORCE_MAKEVISIBLE WB_SPIN - #define SV_LISTBOX_ID_TREEBOX 1 // fuer SvLBox::IsA() #define SV_ENTRYHEIGHTOFFS_PIXEL 2 @@ -97,9 +92,11 @@ class SVT_DLLPUBLIC SvTreeListBox : public SvLBox USHORT nTabFlagMask=0xffff, BOOL bHasClipRegion=FALSE ); - SVT_DLLPRIVATE void InitTreeView( WinBits nWinStyle ); + SVT_DLLPRIVATE void InitTreeView(); SVT_DLLPRIVATE SvLBoxItem* GetItem_Impl( SvLBoxEntry*, long nX, SvLBoxTab** ppTab, USHORT nEmptyWidth ); + SVT_DLLPRIVATE void ImplInitStyle(); + #endif protected: @@ -156,6 +153,7 @@ protected: virtual void CursorMoved( SvLBoxEntry* pNewCursor ); virtual void PreparePaint( SvLBoxEntry* ); virtual void DataChanged( const DataChangedEvent& rDCEvt ); + virtual void StateChanged( StateChangedType nStateChange ); void InitSettings(BOOL bFont,BOOL bForeground,BOOL bBackground); BOOL IsCellFocusEnabled() const; @@ -317,9 +315,6 @@ public: SvLBoxEntry* GetEntry( SvLBoxEntry* pParent, ULONG nPos ) const { return SvLBox::GetEntry(pParent,nPos); } SvLBoxEntry* GetEntry( ULONG nRootPos ) const { return SvLBox::GetEntry(nRootPos);} - void SetWindowBits( WinBits nWinStyle ); - WinBits GetWindowBits() const { return nWindowStyle; } - void PaintEntry( SvLBoxEntry* ); long PaintEntry( SvLBoxEntry*, long nLine, USHORT nTabFlagMask=0xffff ); diff --git a/svtools/inc/svtools/svxbox.hxx b/svtools/inc/svtools/svxbox.hxx index 25deba4d091c..a4a920e692be 100644 --- a/svtools/inc/svtools/svxbox.hxx +++ b/svtools/inc/svtools/svxbox.hxx @@ -129,11 +129,7 @@ enum SvxComboBoxStyle SVX_CBS_LOWER = 0x02, SVX_CBS_ALL = 0x04, SVX_CBS_FILENAME = 0x08, -#ifdef WIN - SVX_CBS_SW_FILENAME = SVX_CBS_FILENAME | SVX_CBS_LOWER -#else SVX_CBS_SW_FILENAME = SVX_CBS_FILENAME -#endif }; // class SvxComboBox ----------------------------------------------------- diff --git a/svtools/inc/sychconv.hxx b/svtools/inc/svtools/sychconv.hxx index 4056556a2100..4056556a2100 100644 --- a/svtools/inc/sychconv.hxx +++ b/svtools/inc/svtools/sychconv.hxx diff --git a/svtools/inc/svtools/syntaxhighlight.hxx b/svtools/inc/svtools/syntaxhighlight.hxx index 8cf7126fa24c..e406c33fc54f 100644 --- a/svtools/inc/svtools/syntaxhighlight.hxx +++ b/svtools/inc/svtools/syntaxhighlight.hxx @@ -57,8 +57,6 @@ #include <tools/string.hxx> #include <tools/gen.hxx> -#include <svl/svarray.hxx> - // Token-Typen TT_... enum TokenTypes @@ -79,8 +77,7 @@ enum TokenTypes struct HighlightPortion { UINT16 nBegin; UINT16 nEnd; TokenTypes tokenType; }; - -SV_DECL_VARARR(HighlightPortions, HighlightPortion, 0, 16) +typedef std::vector<HighlightPortion> HighlightPortions; ///////////////////////////////////////////////////////////////////////// // Hilfsklasse zur Untersuchung von JavaScript-Modulen, zunaechst zum diff --git a/svtools/inc/tabbar.hxx b/svtools/inc/svtools/tabbar.hxx index cf89d4426726..2757811ba34e 100644 --- a/svtools/inc/tabbar.hxx +++ b/svtools/inc/svtools/tabbar.hxx @@ -320,9 +320,6 @@ typedef USHORT TabBarPageBits; // - TabBar-Types - // ---------------- -#define TABBAR_APPEND ((USHORT)0xFFFF) -#define TABBAR_PAGE_NOTFOUND ((USHORT)0xFFFF) - #define TABBAR_RENAMING_YES ((long)TRUE) #define TABBAR_RENAMING_NO ((long)FALSE) #define TABBAR_RENAMING_CANCEL ((long)2) @@ -400,6 +397,9 @@ private: DECL_DLLPRIVATE_LINK( ImplClickHdl, ImplTabButton* ); public: + static const sal_uInt16 APPEND; + static const sal_uInt16 PAGE_NOT_FOUND; + TabBar( Window* pParent, WinBits nWinStyle = WB_STDTABBAR ); virtual ~TabBar(); @@ -424,9 +424,14 @@ public: void InsertPage( USHORT nPageId, const XubString& rText, TabBarPageBits nBits = 0, - USHORT nPos = TABBAR_APPEND ); + USHORT nPos = TabBar::APPEND ); void RemovePage( USHORT nPageId ); void MovePage( USHORT nPageId, USHORT nNewPos ); + + Color GetTabBgColor( USHORT nPageId ) const; + void SetTabBgColor( USHORT nPageId, const Color& aTabBgColor ); + BOOL IsDefaultTabBgColor( USHORT nPageId ); + void Clear(); void EnablePage( USHORT nPageId, BOOL bEnable = TRUE ); @@ -453,7 +458,7 @@ public: void SelectPage( USHORT nPageId, BOOL bSelect = TRUE ); void SelectPageRange( BOOL bSelect = FALSE, USHORT nStartPos = 0, - USHORT nEndPos = TABBAR_APPEND ); + USHORT nEndPos = TabBar::APPEND ); USHORT GetSelectPage( USHORT nSelIndex = 0 ) const; USHORT GetSelectPageCount() const; BOOL IsPageSelected( USHORT nPageId ) const; @@ -511,8 +516,8 @@ public: XubString GetPageText( USHORT nPageId ) const; void SetHelpText( USHORT nPageId, const XubString& rText ); XubString GetHelpText( USHORT nPageId ) const; - void SetHelpId( USHORT nPageId, ULONG nHelpId ); - ULONG GetHelpId( USHORT nPageId ) const; + void SetHelpId( USHORT nPageId, const rtl::OString& nHelpId ); + rtl::OString GetHelpId( USHORT nPageId ) const; long GetSplitSize() const { return mnSplitSize; } long GetMinSize() const; @@ -521,9 +526,9 @@ public: { Window::SetHelpText( rText ); } XubString GetHelpText() const { return Window::GetHelpText(); }; - void SetHelpId( ULONG nId ) - { Window::SetHelpId( nId ); } - ULONG GetHelpId() const + void SetHelpId( const rtl::OString& rId ) + { Window::SetHelpId( rId ); } + const rtl::OString& GetHelpId() const { return Window::GetHelpId(); } void SetStyle( WinBits nStyle ); diff --git a/svtools/inc/svtools/table/abstracttablecontrol.hxx b/svtools/inc/svtools/table/abstracttablecontrol.hxx index 2b3951f6aaf3..9206f20ecbcb 100644 --- a/svtools/inc/svtools/table/abstracttablecontrol.hxx +++ b/svtools/inc/svtools/table/abstracttablecontrol.hxx @@ -116,6 +116,7 @@ namespace svt { namespace table /** returns selection engine*/ virtual SelectionEngine* getSelEngine() = 0; virtual void setCursorAtCurrentCell(const Point& rPoint) = 0; + virtual bool isTooltipActive() = 0; virtual rtl::OUString& setTooltip(const Point& rPoint ) = 0; virtual RowPos getCurrentRow(const Point& rPoint ) = 0; virtual void resizeColumn(const Point& rPoint ) = 0; diff --git a/svtools/inc/svtools/table/tablecontrol.hxx b/svtools/inc/svtools/table/tablecontrol.hxx index 6eb7f063f9fa..f3b7ed88b565 100644 --- a/svtools/inc/svtools/table/tablecontrol.hxx +++ b/svtools/inc/svtools/table/tablecontrol.hxx @@ -79,6 +79,7 @@ namespace svt { namespace table ::com::sun::star::uno::Sequence< ::rtl::OUString > m_aText; Link m_aSelectHdl; bool m_bSelectionChanged; + bool m_bTooltip; public: ::std::auto_ptr< AccessibleTableControl_Impl > m_pAccessTable; @@ -217,12 +218,13 @@ namespace svt { namespace table virtual sal_Bool isAccessibleAlive( ) const; virtual void commitGridControlEvent( sal_Int16 _nEventId, const com::sun::star::uno::Any& _rNewValue, const com::sun::star::uno::Any& _rOldValue ); virtual void RemoveSelectedRow(RowPos _nRowPos); - virtual ::rtl::OUString GetAccessibleCellText(sal_Int32 _nRowPos, sal_Int32 _nColPos); + virtual ::rtl::OUString GetAccessibleCellText(sal_Int32 _nRowPos, sal_Int32 _nColPos) const; ::com::sun::star::uno::Sequence< sal_Int32 >& getColumnsForTooltip(); ::com::sun::star::uno::Sequence< ::rtl::OUString >& getTextForTooltip(); void setTooltip(const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aText, const ::com::sun::star::uno::Sequence< sal_Int32 >& nCols); void clearSelection(); void selectionChanged(bool _bChanged); + bool isTooltip(); protected: /// retrieves the XAccessible implementation associated with the GridControl instance diff --git a/svtools/inc/svtools/table/tabledatawindow.hxx b/svtools/inc/svtools/table/tabledatawindow.hxx index c9f96483d943..829feecd5836 100644 --- a/svtools/inc/svtools/table/tabledatawindow.hxx +++ b/svtools/inc/svtools/table/tabledatawindow.hxx @@ -55,7 +55,6 @@ namespace svt { namespace table Link m_aMouseButtonDownHdl; Link m_aMouseButtonUpHdl; Link m_aSelectHdl; - RowPos m_nRowAlreadySelected; public: TableDataWindow( TableControl_Impl& _rTableControl ); inline void SetMouseButtonDownHdl( const Link& rLink ) { m_aMouseButtonDownHdl = rLink; } @@ -74,6 +73,11 @@ namespace svt { namespace table virtual void CaptureMouse(); virtual void ReleaseMouse(); virtual long Notify(NotifyEvent& rNEvt); + virtual void SetControlBackground(const Color& rColor); + virtual void SetControlBackground(); + + void SetBackground(const Wallpaper& rColor); + void SetBackground(); }; //........................................................................ } } // namespace svt::table diff --git a/svtools/inc/taskbar.hxx b/svtools/inc/svtools/taskbar.hxx index 46853fa07c03..d4a6699e2d5e 100644 --- a/svtools/inc/taskbar.hxx +++ b/svtools/inc/svtools/taskbar.hxx @@ -268,7 +268,7 @@ private: Image maImage; XubString maQuickHelpText; XubString maHelpText; - ULONG mnHelpId; + rtl::OString maHelpId; USHORT mnFlags; public: @@ -289,8 +289,8 @@ public: const XubString& GetQuickHelpText() const { return maQuickHelpText; } void SetHelpText( const XubString& rStr ) { maHelpText = rStr; } const XubString& GetHelpText() const { return maHelpText; } - void SetHelpId( ULONG nHelpId ) { mnHelpId = nHelpId; } - ULONG GetHelpId() const { return mnHelpId; } + void SetHelpId( const rtl::OString& rHelpId ) { maHelpId = rHelpId; } + const rtl::OString& GetHelpId() const { return maHelpId; } void SetFlags( USHORT nFlags ) { mnFlags = nFlags; } USHORT GetFlags() const { return mnFlags; } diff --git a/svtools/inc/templatefoldercache.hxx b/svtools/inc/svtools/templatefoldercache.hxx index 25d5080bd748..25d5080bd748 100644 --- a/svtools/inc/templatefoldercache.hxx +++ b/svtools/inc/svtools/templatefoldercache.hxx diff --git a/svtools/inc/templdlg.hxx b/svtools/inc/svtools/templdlg.hxx index f08f7cc8770d..f08f7cc8770d 100644 --- a/svtools/inc/templdlg.hxx +++ b/svtools/inc/svtools/templdlg.hxx diff --git a/svtools/inc/testtool.hxx b/svtools/inc/svtools/testtool.hxx index ea00fe33cdbf..ea00fe33cdbf 100644 --- a/svtools/inc/testtool.hxx +++ b/svtools/inc/svtools/testtool.hxx diff --git a/svtools/inc/svtools/toolpanel/toolpanel.hxx b/svtools/inc/svtools/toolpanel/toolpanel.hxx index 432dea64e8b5..d38d8e7d257d 100644 --- a/svtools/inc/svtools/toolpanel/toolpanel.hxx +++ b/svtools/inc/svtools/toolpanel/toolpanel.hxx @@ -32,7 +32,6 @@ #include <rtl/ustring.hxx> #include <vcl/image.hxx> -#include <vcl/smartid.hxx> #include <boost/noncopyable.hpp> @@ -62,7 +61,7 @@ namespace svt virtual Image GetImage() const = 0; /// retrieves the help ID associated with the panel, if any. - virtual SmartId GetHelpID() const = 0; + virtual rtl::OString GetHelpID() const = 0; /** activates the panel diff --git a/svtools/inc/tooltiplbox.hxx b/svtools/inc/svtools/tooltiplbox.hxx index e50d516f5aa1..e50d516f5aa1 100644 --- a/svtools/inc/tooltiplbox.hxx +++ b/svtools/inc/svtools/tooltiplbox.hxx diff --git a/svtools/inc/txtattr.hxx b/svtools/inc/svtools/txtattr.hxx index 29723a38129b..29723a38129b 100644 --- a/svtools/inc/txtattr.hxx +++ b/svtools/inc/svtools/txtattr.hxx diff --git a/svtools/inc/txtcmp.hxx b/svtools/inc/svtools/txtcmp.hxx index 7b30b76e69a7..7b30b76e69a7 100644 --- a/svtools/inc/txtcmp.hxx +++ b/svtools/inc/svtools/txtcmp.hxx diff --git a/svtools/inc/unoevent.hxx b/svtools/inc/svtools/unoevent.hxx index 5d5378bf909b..5d5378bf909b 100644 --- a/svtools/inc/unoevent.hxx +++ b/svtools/inc/svtools/unoevent.hxx diff --git a/svtools/inc/unoimap.hxx b/svtools/inc/svtools/unoimap.hxx index 9ed2afe8dc6c..9ed2afe8dc6c 100644 --- a/svtools/inc/unoimap.hxx +++ b/svtools/inc/svtools/unoimap.hxx diff --git a/svtools/inc/wallitem.hxx b/svtools/inc/svtools/wallitem.hxx index 533d5ae3f6d3..533d5ae3f6d3 100644 --- a/svtools/inc/wallitem.hxx +++ b/svtools/inc/svtools/wallitem.hxx diff --git a/svtools/source/filter.vcl/filter/fldll.cxx b/svtools/inc/svtools/xwindowitem.hxx index b44e08835f34..eca425cf1369 100644 --- a/svtools/source/filter.vcl/filter/fldll.cxx +++ b/svtools/inc/svtools/xwindowitem.hxx @@ -2,10 +2,13 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2000, 2010 Oracle and/or its affiliates. + * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite * + * $RCSfile: chrtitem.hxx,v $ + * $Revision: 1.9 $ + * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -24,53 +27,44 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ +#ifndef _XWINDOWITEM_HXX_ +#define _XWINDOWITEM_HXX_ + -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_svtools.hxx" +#include "svtools/svtdllapi.h" -#ifdef WIN -#include <svwin.h> +#include <svl/poolitem.hxx> +#include <toolkit/helper/vclunohelper.hxx> -// Statische DLL-Verwaltungs-Variablen -static HINSTANCE hDLLInst = 0; // HANDLE der DLL +#include <com/sun/star/awt/XWindow.hpp> +class Window; -/*************************************************************************** -|* -|* LibMain() -|* -|* Beschreibung Initialisierungsfunktion der DLL -|* Ersterstellung TH 05.05.93 -|* Letzte Aenderung TH 05.05.93 -|* -***************************************************************************/ +////////////////////////////////////////////////////////////////////// -extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR ) +class SVT_DLLPUBLIC XWindowItem : public SfxPoolItem { -#ifndef WNT - if ( nHeap ) - UnlockData( 0 ); -#endif + ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > m_xWin; - hDLLInst = hDLL; + // disallow use assignment operator + XWindowItem & operator = ( const XWindowItem & ); - return TRUE; -} +public: + TYPEINFO(); + XWindowItem(); + explicit XWindowItem( USHORT nWhich, Window * pWin ); + XWindowItem( USHORT nWhich, com::sun::star::uno::Reference< com::sun::star::awt::XWindow > & rxWin ); + XWindowItem( const XWindowItem &rItem ); + ~XWindowItem(); -/*************************************************************************** -|* -|* WEP() -|* -|* Beschreibung DLL-Deinitialisierung -|* Ersterstellung TH 05.05.93 -|* Letzte Aenderung TH 05.05.93 -|* -***************************************************************************/ + virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const; + virtual int operator == ( const SfxPoolItem& rAttr ) const; -extern "C" int CALLBACK WEP( int ) -{ - return 1; -} + Window * GetWindowPtr() const { return VCLUnoHelper::GetWindow( m_xWin ); } + com::sun::star::uno::Reference< com::sun::star::awt::XWindow > GetXWindow() const { return m_xWin; } +}; + +////////////////////////////////////////////////////////////////////// #endif diff --git a/svtools/prj/build.lst b/svtools/prj/build.lst index a7d8569de301..3f9e02b26ca3 100644 --- a/svtools/prj/build.lst +++ b/svtools/prj/build.lst @@ -1,33 +1,3 @@ -st svtools : l10n svl offuh toolkit ucbhelper unotools JPEG:jpeg cppu cppuhelper comphelper sal sot jvmfwk NULL -st svtools usr1 - all st_mkout NULL -st svtools\inc nmake - all st_inc NULL -st svtools\bmpmaker nmake - all st_bmp st_inc NULL -st svtools\source\brwbox nmake - all st__brw st_bmp st_inc NULL -st svtools\source\config nmake - all st_conf st_inc NULL -st svtools\source\contnr nmake - all st__ctr st_inc NULL -st svtools\source\control nmake - all st_ctl st_inc NULL -st svtools\source\dialogs nmake - all st_dial st_inc NULL -st svtools\source\edit nmake - all st_edit st_inc NULL -st svtools\source\filter.vcl\filter nmake - all st_vfilt st_inc NULL -st svtools\source\filter.vcl\wmf nmake - all st_vwmf st_inc NULL -st svtools\source\filter.vcl\igif nmake - all st_vigif st_inc NULL -st svtools\source\filter.vcl\jpeg nmake - all st_vjpeg st_inc NULL -st svtools\source\filter.vcl\ixbm nmake - all st_vixbm st_inc NULL -st svtools\source\filter.vcl\ixpm nmake - all st_vixpm st_inc NULL -st svtools\source\graphic nmake - all st_svtgraphic st_inc NULL -st svtools\source\java nmake - all st_svtjava st_inc NULL -st svtools\source\misc nmake - all st__misc st_bmp st_inc NULL -st svtools\source\plugapp nmake - all st_papp st_inc NULL -st svtools\source\svhtml nmake - all st_html st_inc NULL -st svtools\source\svrtf nmake - all st_rtf st_inc NULL -st svtools\source\table nmake - all st_table st_inc NULL -st svtools\source\toolpanel nmake - all st_toolpanel st_inc NULL -st svtools\source\uno nmake - all st_uno st_inc NULL -st svtools\source\uno\wizard nmake - all st_uno_wiz st_inc NULL -st svtools\source\urlobj nmake - all st__url st_inc NULL -st svtools\util nmake - all st_util st_svtgraphic st__brw st__ctr st_conf st_ctl st_dial st_edit st__misc st__url st_html st_papp st_rtf st_table st_toolpanel st_uno st_uno_wiz st_vfilt st_vigif st_vixbm st_vixpm st_vjpeg st_vwmf st_svtjava NULL -st svtools\source\hatchwindow nmake - all st_hatchwin st_inc NULL -st svtools\source\productregistration nmake - all st_prodreg st_util st_inc NULL -st svtools\workben\unodialog nmake - all st_workben_udlg st_util NULL -st svtools\workben\toolpanel nmake - all st_workben_toolpanel st_util st_toolpanel NULL +st svtools : l10n svl offuh toolkit ucbhelper unotools JPEG:jpeg cppu cppuhelper comphelper sal sot jvmfwk LIBXSLT:libxslt NULL +st svtools\prj nmake - all st_prj NULL st svtools\qa\unoapi nmake - all st_qa_unoapi NULL diff --git a/svtools/prj/d.lst b/svtools/prj/d.lst index b46ddef72311..e69de29bb2d1 100644 --- a/svtools/prj/d.lst +++ b/svtools/prj/d.lst @@ -1,40 +0,0 @@ -mkdir: %COMMON_DEST%\bin%_EXT%\hid -mkdir: %COMMON_DEST%\res%_EXT% -mkdir: %_DEST%\inc%_EXT%\svtools -mkdir: %_DEST%\inc%_EXT%\svtools\toolpanel -mkdir: %_DEST%\inc%_EXT%\svtools\table - -..\%COMMON_OUTDIR%\misc\*.hid %COMMON_DEST%\bin%_EXT%\hid\*.hid -..\%__SRC%\srs\ehdl.srs %_DEST%\res%_EXT%\svtools.srs -..\%COMMON_OUTDIR%\srs\ehdl_srs.hid %COMMON_DEST%\res%_EXT%\svtools_srs.hid -..\%__SRC%\lib\svtool.lib %_DEST%\lib%_EXT%\svtool.lib -..\%__SRC%\slb\svt.lib %_DEST%\lib%_EXT%\xsvtool.lib -..\%__SRC%\bin\*.dll %_DEST%\bin%_EXT%\* -..\%__SRC%\bin\*.res %_DEST%\bin%_EXT%\* -..\%__SRC%\bin\bmp.* %_DEST%\bin%_EXT%\bmp.* -..\%__SRC%\bin\bmpsum.* %_DEST%\bin%_EXT%\bmpsum.* -..\%__SRC%\bin\bmpgui.* %_DEST%\bin%_EXT%\bmpgui.* -..\%__SRC%\bin\g2g.* %_DEST%\bin%_EXT%\g2g.* -..\%__SRC%\bin\bmp %_DEST%\bin%_EXT%\bmp -..\%__SRC%\bin\bmpsum %_DEST%\bin%_EXT%\bmpsum -..\%__SRC%\bin\bmpgui %_DEST%\bin%_EXT%\bmpgui -..\%__SRC%\bin\g2g %_DEST%\bin%_EXT%\g2g -..\%__SRC%\res\bmp.* %_DEST%\bin%_EXT%\bmp.* -..\%__SRC%\res\bmpgui.* %_DEST%\bin%_EXT%\bmpgui.* -..\%__SRC%\lib\*.so %_DEST%\lib%_EXT%\* -..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\* - -..\inc\svtools\*.hxx %_DEST%\inc%_EXT%\svtools\*.hxx -..\inc\svtools\*.h %_DEST%\inc%_EXT%\svtools\*.h -..\inc\svtools\*.hrc %_DEST%\inc%_EXT%\svtools\*.hrc -..\inc\svtools\table\*.hxx %_DEST%\inc%_EXT%\svtools\table\*.hxx -..\inc\*.hxx %_DEST%\inc%_EXT%\svtools\*.hxx -..\inc\*.h %_DEST%\inc%_EXT%\svtools\*.h -..\inc\*.hrc %_DEST%\inc%_EXT%\svtools\*.hrc - -..\inc\svtools\toolpanel\*.* %_DEST%\inc%_EXT%\svtools\toolpanel\*.hrc - -dos: sh -c "if test %OS% = MACOSX; then macosx-create-bundle %_DEST%\bin%_EXT%\bmp=%__PRJROOT%\%__SRC%\bin%_EXT%; fi" - -*.xml %_DEST%\xml%_EXT%\*.xml - diff --git a/svtools/source/filter.vcl/ixpm/makefile.mk b/svtools/prj/makefile.mk index 98f93290d325..c73a3d944bbf 100644 --- a/svtools/source/filter.vcl/ixpm/makefile.mk +++ b/svtools/prj/makefile.mk @@ -25,19 +25,16 @@ # #************************************************************************* -PRJ=..$/..$/.. +PRJ=.. +TARGET=prj -PRJNAME=svtools -TARGET=ixpm +.INCLUDE : settings.mk -# --- Settings ----------------------------------------------------- +.IF "$(VERBOSE)"!="" +VERBOSEFLAG := +.ELSE +VERBOSEFLAG := -s +.ENDIF -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svt.pmk -SOLARINC+=-I../../inc - -# --- Files -------------------------------------------------------- - -SLOFILES= $(SLO)$/xpmread.obj - -.INCLUDE : target.mk +all: + cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) diff --git a/svtools/source/brwbox/brwbox2.cxx b/svtools/source/brwbox/brwbox2.cxx index 68cf316e813b..53c2a5ac86f6 100644 --- a/svtools/source/brwbox/brwbox2.cxx +++ b/svtools/source/brwbox/brwbox2.cxx @@ -613,13 +613,6 @@ void BrowseBox::Resize() if (IsZoom()) nSBSize = (ULONG)(nSBSize * (double)GetZoom()); - long nSize = pDataWin->GetPosPixel().Y(); - if( !getDataWindow()->bNoHScroll ) - nSize += aHScroll.GetSizePixel().Height(); - - if ( GetOutputSizePixel().Height() < nSize ) - return; - DoHideCursor( "Resize" ); USHORT nOldVisibleRows = (USHORT)(pDataWin->GetOutputSizePixel().Height() / GetDataRowHeight() + 1); diff --git a/svtools/source/brwbox/makefile.mk b/svtools/source/brwbox/makefile.mk deleted file mode 100644 index e195e0ef4859..000000000000 --- a/svtools/source/brwbox/makefile.mk +++ /dev/null @@ -1,59 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=svtools -TARGET=browse - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svt.pmk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES= editbrowsebox.src - -EXCEPTIONSFILES =\ - $(SLO)$/editbrowsebox2.obj \ - $(SLO)$/brwbox1.obj \ - $(SLO)$/brwbox3.obj - -SLOFILES= \ - $(EXCEPTIONSFILES) \ - $(SLO)$/ebbcontrols.obj \ - $(SLO)$/editbrowsebox.obj \ - $(SLO)$/brwbox2.obj \ - $(SLO)$/brwhead.obj \ - $(SLO)$/datwin.obj - - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk diff --git a/svtools/source/config/apearcfg.cxx b/svtools/source/config/apearcfg.cxx index 316e6ab34656..4a95d0c03dcd 100644 --- a/svtools/source/config/apearcfg.cxx +++ b/svtools/source/config/apearcfg.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#include "apearcfg.hxx" +#include <svtools/apearcfg.hxx> #include "com/sun/star/uno/Any.hxx" #include "tools/debug.hxx" @@ -52,7 +52,6 @@ sal_Bool SvtTabAppearanceCfg::bInitialized = sal_False; --------------------------------------------------------------------*/ SvtTabAppearanceCfg::SvtTabAppearanceCfg() :ConfigItem(OUString::createFromAscii("Office.Common/View")) - ,nLookNFeel ( DEFAULT_LOOKNFEEL ) ,nDragMode ( DEFAULT_DRAGMODE ) ,nScaleFactor ( DEFAULT_SCALEFACTOR ) ,nSnapMode ( DEFAULT_SNAPMODE ) @@ -61,8 +60,6 @@ SvtTabAppearanceCfg::SvtTabAppearanceCfg() ,nAAMinPixelHeight ( DEFAULT_AAMINHEIGHT ) #endif ,bMenuMouseFollow(FALSE) - ,bSingleLineTabCtrl(FALSE) - ,bColoredTabCtrl(FALSE) #if defined( UNX ) || defined ( FS_PRIV_DEBUG ) ,bFontAntialiasing ( TRUE ) #endif @@ -83,16 +80,13 @@ SvtTabAppearanceCfg::SvtTabAppearanceCfg() switch(nProp) { case 0: *pValues >>= nScaleFactor; break; //"FontScaling", - case 1: *pValues >>= nLookNFeel; break; //"LookAndFeel", - case 2: *pValues >>= nDragMode; break; //"Window/Drag", - case 3: bMenuMouseFollow = *(sal_Bool*)pValues->getValue(); break; //"Menu/FollowMouse", - case 4: bSingleLineTabCtrl = *(sal_Bool*)pValues->getValue(); break; //"Dialog/SingleLineTab", - case 5: bColoredTabCtrl = *(sal_Bool*)pValues->getValue(); break; //"Dialog/ColoredTab", - case 6: *pValues >>= nSnapMode; break; //"Dialog/MousePositioning", - case 7: *pValues >>= nMiddleMouse; break; //"Dialog/MiddleMouseButton", + case 1: *pValues >>= nDragMode; break; //"Window/Drag", + case 2: bMenuMouseFollow = *(sal_Bool*)pValues->getValue(); break; //"Menu/FollowMouse", + case 3: *pValues >>= nSnapMode; break; //"Dialog/MousePositioning", + case 4: *pValues >>= nMiddleMouse; break; //"Dialog/MiddleMouseButton", #if defined( UNX ) || defined ( FS_PRIV_DEBUG ) - case 8: bFontAntialiasing = *(sal_Bool*)pValues->getValue(); break; // "FontAntialising/Enabled", - case 9: *pValues >>= nAAMinPixelHeight; break; // "FontAntialising/MinPixelHeight", + case 5: bFontAntialiasing = *(sal_Bool*)pValues->getValue(); break; // "FontAntialising/Enabled", + case 6: *pValues >>= nAAMinPixelHeight; break; // "FontAntialising/MinPixelHeight", #endif } } @@ -116,16 +110,13 @@ const Sequence<OUString>& SvtTabAppearanceCfg::GetPropertyNames() static const sal_Char* aPropNames[] = { "FontScaling" // 0 - ,"LookAndFeel" // 1 - ,"Window/Drag" // 2 - ,"Menu/FollowMouse" // 3 - ,"Dialog/SingleLineTab" // 4 - ,"Dialog/ColoredTab" // 5 - ,"Dialog/MousePositioning" // 6 - ,"Dialog/MiddleMouseButton" // 7 + ,"Window/Drag" // 1 + ,"Menu/FollowMouse" // 2 + ,"Dialog/MousePositioning" // 3 + ,"Dialog/MiddleMouseButton" // 4 #if defined( UNX ) || defined ( FS_PRIV_DEBUG ) - ,"FontAntiAliasing/Enabled" // 8 - ,"FontAntiAliasing/MinPixelHeight" // 9 + ,"FontAntiAliasing/Enabled" // 5 + ,"FontAntiAliasing/MinPixelHeight" // 6 #endif }; const int nCount = sizeof( aPropNames ) / sizeof( aPropNames[0] ); @@ -153,16 +144,13 @@ void SvtTabAppearanceCfg::Commit() switch(nProp) { case 0: pValues[nProp] <<= nScaleFactor; break; // "FontScaling", - case 1: pValues[nProp] <<= nLookNFeel; break; //"LookAndFeel", - case 2: pValues[nProp] <<= nDragMode; break; //"Window/Drag", - case 3: pValues[nProp].setValue(&bMenuMouseFollow, rType); break; //"Menu/FollowMouse", - case 4: pValues[nProp].setValue(&bSingleLineTabCtrl, rType); break; //"Dialog/SingleLineTab", - case 5: pValues[nProp].setValue(&bColoredTabCtrl, rType); break; //"Dialog/ColoredTab", - case 6: pValues[nProp] <<= nSnapMode; break; //"Dialog/MousePositioning", - case 7: pValues[nProp] <<= nMiddleMouse; break; //"Dialog/MiddleMouseButton", + case 1: pValues[nProp] <<= nDragMode; break; //"Window/Drag", + case 2: pValues[nProp].setValue(&bMenuMouseFollow, rType); break; //"Menu/FollowMouse", + case 3: pValues[nProp] <<= nSnapMode; break; //"Dialog/MousePositioning", + case 4: pValues[nProp] <<= nMiddleMouse; break; //"Dialog/MiddleMouseButton", #if defined( UNX ) || defined ( FS_PRIV_DEBUG ) - case 8: pValues[nProp].setValue(&bFontAntialiasing, rType); break; // "FontAntialising/Enabled", - case 9: pValues[nProp] <<= nAAMinPixelHeight; break; // "FontAntialising/MinPixelHeight", + case 5: pValues[nProp].setValue(&bFontAntialiasing, rType); break; // "FontAntialising/Enabled", + case 6: pValues[nProp] <<= nAAMinPixelHeight; break; // "FontAntialising/MinPixelHeight", #endif } } @@ -177,16 +165,6 @@ void SvtTabAppearanceCfg::Notify( const com::sun::star::uno::Sequence< rtl::OUSt Beschreibung: --------------------------------------------------------------------*/ -void SvtTabAppearanceCfg::SetLookNFeel ( USHORT nSet ) -{ - nLookNFeel = nSet; - SetModified(); -} - -/*-------------------------------------------------------------------- - Beschreibung: - --------------------------------------------------------------------*/ - void SvtTabAppearanceCfg::SetDragMode ( USHORT nSet ) { nDragMode = nSet; @@ -234,26 +212,7 @@ void SvtTabAppearanceCfg::SetApplicationDefaults ( Application* pApp ) // SetStandard...Styles() resets the UseSystemUIFonts flag, // but we don't want to change it now, so save the flag before ... BOOL bUseSystemUIFonts = hAppStyle.GetUseSystemUIFonts(); - - switch ( nLookNFeel ) - { - case LookMotif: - hAppStyle.SetStandardUnixStyles(); break; - - case LookOSTwo: - hAppStyle.SetStandardOS2Styles(); break; - - case LookMacintosh: - hAppStyle.SetStandardMacStyles(); break; - - case LookWindows: - hAppStyle.SetStandardWinStyles(); break; - - case LookStardivision: - default: - hAppStyle.SetStandardStyles(); break; - } - + hAppStyle.SetStandardStyles(); // and set it here hAppStyle.SetUseSystemUIFonts( bUseSystemUIFonts ); @@ -298,14 +257,6 @@ void SvtTabAppearanceCfg::SetApplicationDefaults ( Application* pApp ) else nFollow &= ~MOUSE_FOLLOW_MENU; hMouseSettings.SetFollow( nFollow ); - sal_uInt16 nTabStyle = 0; - if(bSingleLineTabCtrl) - nTabStyle |= STYLE_TABCONTROL_SINGLELINE; - - if(bColoredTabCtrl) - nTabStyle |= STYLE_TABCONTROL_COLOR; - hAppStyle.SetTabControlStyle(nTabStyle); - hAppSettings.SetMouseSettings( hMouseSettings ); diff --git a/svtools/source/config/extcolorcfg.cxx b/svtools/source/config/extcolorcfg.cxx index 993025b22884..35d0276144ec 100644 --- a/svtools/source/config/extcolorcfg.cxx +++ b/svtools/source/config/extcolorcfg.cxx @@ -27,7 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#include "extcolorcfg.hxx" +#include <svtools/extcolorcfg.hxx> #include <com/sun/star/uno/Any.hxx> #include <com/sun/star/uno/Sequence.hxx> #include <com/sun/star/lang/Locale.hpp> diff --git a/svtools/source/config/fontsubstconfig.cxx b/svtools/source/config/fontsubstconfig.cxx index 7bcbc1e4be82..bf372902fb6f 100644 --- a/svtools/source/config/fontsubstconfig.cxx +++ b/svtools/source/config/fontsubstconfig.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#include "fontsubstconfig.hxx" +#include <svtools/fontsubstconfig.hxx> #include <svl/svarray.hxx> #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/uno/Any.hxx> diff --git a/svtools/source/config/itemholder2.cxx b/svtools/source/config/itemholder2.cxx index 8e971a1629bf..2382bf3ad7a3 100644 --- a/svtools/source/config/itemholder2.cxx +++ b/svtools/source/config/itemholder2.cxx @@ -36,10 +36,10 @@ #include <com/sun/star/lang/XComponent.hpp> #include <svtools/accessibilityoptions.hxx> -#include <apearcfg.hxx> +#include <svtools/apearcfg.hxx> #include <svtools/menuoptions.hxx> #include <svtools/colorcfg.hxx> -#include <fontsubstconfig.hxx> +#include <svtools/fontsubstconfig.hxx> #include <svtools/helpopt.hxx> #include <svtools/printoptions.hxx> #include <unotools/options.hxx> diff --git a/svtools/source/config/makefile.mk b/svtools/source/config/makefile.mk deleted file mode 100644 index d3ba43de68ef..000000000000 --- a/svtools/source/config/makefile.mk +++ /dev/null @@ -1,58 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/.. - -PRJNAME=svtools -TARGET=config - -ENABLE_EXCEPTIONS := TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svt.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES= \ - $(SLO)$/accessibilityoptions.obj \ - $(SLO)$/apearcfg.obj \ - $(SLO)$/colorcfg.obj \ - $(SLO)$/extcolorcfg.obj \ - $(SLO)$/fontsubstconfig.obj \ - $(SLO)$/helpopt.obj \ - $(SLO)$/htmlcfg.obj \ - $(SLO)$/itemholder2.obj \ - $(SLO)$/menuoptions.obj \ - $(SLO)$/miscopt.obj \ - $(SLO)$/optionsdrawinglayer.obj \ - $(SLO)$/printoptions.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - diff --git a/svtools/source/config/menuoptions.cxx b/svtools/source/config/menuoptions.cxx index 70d9d1623ef2..e33251050b81 100644 --- a/svtools/source/config/menuoptions.cxx +++ b/svtools/source/config/menuoptions.cxx @@ -314,8 +314,16 @@ void SvtMenuOptions_Impl::Notify( const Sequence< OUString >& seqPropertyNames ) // We need values from ALL notified configuration keys. DBG_ASSERT( !(seqPropertyNames.getLength()!=seqValues.getLength()), "SvtMenuOptions_Impl::Notify()\nI miss some values of configuration keys!\n" ); - sal_Bool bMenuIcons = true; - sal_Bool bSystemMenuIcons = true; + sal_Bool bMenuSettingsChanged = sal_False; + sal_Bool bMenuIcons = sal_True; + sal_Bool bSystemMenuIcons = sal_True; + if (m_nMenuIcons == 2) + bMenuIcons = (sal_Bool)(Application::GetSettings().GetStyleSettings().GetUseImagesInMenus()); + else + { + bSystemMenuIcons = sal_False; + bMenuIcons = m_nMenuIcons ? sal_True : sal_False; + } // Step over list of property names and get right value from coreesponding value list to set it on internal members! sal_Int32 nCount = seqPropertyNames.getLength(); @@ -334,12 +342,12 @@ void SvtMenuOptions_Impl::Notify( const Sequence< OUString >& seqPropertyNames ) else if( seqPropertyNames[nProperty] == PROPERTYNAME_SHOWICONSINMENUES ) { DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_BOOLEAN), "SvtMenuOptions_Impl::SvtMenuOptions_Impl()\nWho has changed the value type of \"Office.Common\\View\\Menu\\ShowIconsInMenues\"?" ); - seqValues[nProperty] >>= bMenuIcons; + bMenuSettingsChanged = seqValues[nProperty] >>= bMenuIcons; } else if( seqPropertyNames[nProperty] == PROPERTYNAME_SYSTEMICONSINMENUES ) { DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_BOOLEAN), "SvtMenuOptions_Impl::SvtMenuOptions_Impl()\nWho has changed the value type of \"Office.Common\\View\\Menu\\IsSystemIconsInMenus\"?" ); - seqValues[nProperty] >>= bSystemMenuIcons; + bMenuSettingsChanged = seqValues[nProperty] >>= bSystemMenuIcons; } #if OSL_DEBUG_LEVEL > 1 @@ -347,7 +355,8 @@ void SvtMenuOptions_Impl::Notify( const Sequence< OUString >& seqPropertyNames ) #endif } - m_nMenuIcons = bSystemMenuIcons ? 2 : bMenuIcons; + if ( bMenuSettingsChanged ) + m_nMenuIcons = bSystemMenuIcons ? 2 : bMenuIcons; for ( USHORT n=0; n<aList.Count(); n++ ) aList.GetObject(n)->Call( this ); @@ -377,11 +386,13 @@ void SvtMenuOptions_Impl::Commit() break; //Output cache of current setting as possibly modified by System Theme for older version case PROPERTYHANDLE_SHOWICONSINMENUES : { - seqValues[nProperty] <<=(sal_Bool)(Application::GetSettings().GetStyleSettings().GetUseImagesInMenus()); + sal_Bool bValue = (sal_Bool)(Application::GetSettings().GetStyleSettings().GetUseImagesInMenus()); + seqValues[nProperty] <<= bValue; } break; case PROPERTYHANDLE_SYSTEMICONSINMENUES : { - seqValues[nProperty] <<= (m_nMenuIcons == 2 ? sal_True : sal_False) ; + sal_Bool bValue = (m_nMenuIcons == 2 ? sal_True : sal_False) ; + seqValues[nProperty] <<= bValue; } break; } diff --git a/svtools/source/config/miscopt.cxx b/svtools/source/config/miscopt.cxx index 7b04b56104e0..2f455734a01d 100644 --- a/svtools/source/config/miscopt.cxx +++ b/svtools/source/config/miscopt.cxx @@ -45,7 +45,7 @@ #include <rtl/logfile.hxx> #include "itemholder2.hxx" -#include <imgdef.hxx> +#include <svtools/imgdef.hxx> #include <vcl/svapp.hxx> //_________________________________________________________________________________________________________________ diff --git a/svtools/source/config/test/makefile.mk b/svtools/source/config/test/makefile.mk deleted file mode 100644 index 71bea788d8de..000000000000 --- a/svtools/source/config/test/makefile.mk +++ /dev/null @@ -1,62 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/..$/.. - -PRJNAME= svtools -TARGET= test_configitems -LIBTARGET= NO -ENABLE_EXCEPTIONS= TRUE -USE_DEFFILE= TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- application: "test" -------------------------------------------------- - -APP1TARGET= test - -APP1OBJS= $(SLO)$/test.obj \ - $(SLO)$/dynamicmenuoptions.obj - -DEPOBJFILES=$(APP1OBJS) - -APP1STDLIBS= $(CPPULIB) \ - $(CPPUHELPERLIB) \ - $(COMPHELPERLIB) \ - $(UNOTOOLSLIB) \ - $(SALLIB) \ - $(VOSLIB) \ - $(TOOLSLIB) \ - $(VCLLIB) - -APP1DEPN= $(SLO)$/dynamicmenuoptions.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - diff --git a/svtools/source/contnr/cont_pch.cxx b/svtools/source/contnr/cont_pch.cxx deleted file mode 100644 index 4661a08162a2..000000000000 --- a/svtools/source/contnr/cont_pch.cxx +++ /dev/null @@ -1,41 +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. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_svtools.hxx" - -#include <sv.hxx> -#include <svtools/treelist.hxx> -#include <svtools/svtabbx.hxx> -#include <svtools/svtreebx.hxx> -#include <svtools/svicnvw.hxx> -#include "svimpbox.hxx" -#include "svimpicn.hxx" -#include <svtools/svlbox.hxx> -#include <svtools/svlbitm.hxx> - - diff --git a/svtools/source/contnr/contentenumeration.cxx b/svtools/source/contnr/contentenumeration.cxx index 93f328ae2028..e3ba48180e9c 100644 --- a/svtools/source/contnr/contentenumeration.cxx +++ b/svtools/source/contnr/contentenumeration.cxx @@ -30,7 +30,7 @@ #include "contentenumeration.hxx" #include <svl/urlfilter.hxx> #include <svtools/inettbc.hxx> -#include "imagemgr.hxx" +#include <svtools/imagemgr.hxx> /** === begin UNO includes === **/ #include <com/sun/star/beans/XPropertySet.hpp> diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx index 843de83f7710..c9b9b23786b4 100644 --- a/svtools/source/contnr/fileview.cxx +++ b/svtools/source/contnr/fileview.cxx @@ -28,12 +28,11 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#include "fileview.hxx" +#include <svtools/fileview.hxx> #include <svtools/svtdata.hxx> -#include "imagemgr.hxx" +#include <svtools/imagemgr.hxx> #include <svtools/headbar.hxx> #include <svtools/svtabbx.hxx> - #include <svtools/svtools.hrc> #include "fileview.hrc" #include "contentenumeration.hxx" @@ -54,6 +53,9 @@ #include <vcl/waitobj.hxx> #include <com/sun/star/io/XPersist.hpp> #include <com/sun/star/beans/XPropertySet.hpp> +#include <com/sun/star/ucb/XCommandInfo.hpp> +#include <com/sun/star/beans/XPropertySetInfo.hpp> +#include <com/sun/star/beans/PropertyAttribute.hpp> #include <algorithm> #include <memory> @@ -100,7 +102,7 @@ using ::rtl::OUString; DECLARE_LIST( StringList_Impl, OUString* ) -#define ROW_HEIGHT 17 // the height of a row has to be a little higher than the bitmap +#define ROW_HEIGHT 17 // the height of a row has to be a little higher than the bitmap #define QUICK_SEARCH_TIMEOUT 1500 // time in mSec before the quicksearch string will be reseted namespace @@ -210,6 +212,7 @@ private: sal_Bool mbResizeDisabled : 1; sal_Bool mbAutoResize : 1; sal_Bool mbEnableDelete : 1; + sal_Bool mbEnableRename : 1; void DeleteEntries(); void DoQuickSearch( const xub_Unicode& rChar ); @@ -232,6 +235,7 @@ public: void EnableAutoResize() { mbAutoResize = sal_True; } void EnableDelete( sal_Bool bEnable ) { mbEnableDelete = bEnable; } + void EnableRename( sal_Bool bEnable ) { mbEnableRename = bEnable; } sal_Bool IsDeleteOrContextMenuEnabled() { return mbEnableDelete || IsContextMenuHandlingEnabled(); } Reference< XCommandEnvironment > GetCommandEnvironment() const { return mxCmdEnv; } @@ -299,11 +303,11 @@ inline const OUString& HashedEntry::GetName() const class HashedEntryList : protected List {// provides a list of _unique_ Entries protected: - inline HashedEntry* First(); - inline HashedEntry* Next(); - inline void Append( HashedEntry* pNewEntry ); + inline HashedEntry* First(); + inline HashedEntry* Next(); + inline void Append( HashedEntry* pNewEntry ); public: - virtual ~HashedEntryList(); + virtual ~HashedEntryList(); const HashedEntry* Find( const OUString& rNameToSearchFor ); const HashedEntry* Find( const HashedEntry& rToSearchFor ); @@ -338,7 +342,7 @@ HashedEntryList::~HashedEntryList() const HashedEntry* HashedEntryList::Find( const OUString& rRefName ) { // simple linear search, which should be fast enough for this purpose - HashedEntry aRef( rRefName ); + HashedEntry aRef( rRefName ); HashedEntry* pIter = First(); while( pIter && *pIter != aRef ) pIter = Next(); @@ -419,12 +423,12 @@ class NameTranslationList : protected HashedEntryList { // contains a list of substitutes of strings for a given folder (as URL) // explanation of the circumstances see in remarks for Init(); protected: - INetURLObject maTransFile; // URL of file with translation entries - HashedEntry maHashedURL; // for future purposes when dealing with a set of cached - // NameTranslationLists + INetURLObject maTransFile; // URL of file with translation entries + HashedEntry maHashedURL; // for future purposes when dealing with a set of cached + // NameTranslationLists private: const String maTransFileName; - void Init(); // reads the translation file and fills the (internal) list + void Init(); // reads the translation file and fills the (internal) list public: NameTranslationList( const INetURLObject& rBaseURL ); @@ -436,12 +440,12 @@ public: using List::operator!=; inline sal_Bool operator !=( const HashedEntry& rRef ) const; - const OUString* Translate( const OUString& rName ) const; + const OUString* Translate( const OUString& rName ) const; // returns NULL, if rName can't be found - inline void Update(); // clears list and init + inline void Update(); // clears list and init - inline const String& GetTransTableFileName() const; + inline const String& GetTransTableFileName() const; // returns the name for the file, which contains the translation strings }; @@ -463,7 +467,7 @@ void NameTranslationList::Init() if( aTestContent.isDocument() ) {// ... also tests the existence of maTransFile by throwing an Exception - const sal_Char* pSection = "TRANSLATIONNAMES"; + const sal_Char* pSection = "TRANSLATIONNAMES"; String aFsysName( maTransFile.getFSysPath( INetURLObject::FSYS_DETECT ) ); Config aConfig( aFsysName ); @@ -475,7 +479,7 @@ void NameTranslationList::Init() Insert( new NameTranslationEntry( aConfig.GetKeyName( nCnt ), aConfig.ReadKey( nCnt ) ) ); } } - catch( Exception& ) {} + catch( Exception const & ) {} } NameTranslationList::NameTranslationList( const INetURLObject& rBaseURL ): @@ -527,7 +531,7 @@ public: // IContentTitleTranslation virtual sal_Bool GetTranslation( const OUString& rOriginalName, OUString& rTranslatedName ) const; - void UpdateTranslationTable(); // reads the translation file again + void UpdateTranslationTable(); // reads the translation file again void SetActualFolder( const INetURLObject& rActualFolder ); const String* GetTransTableFileName() const; @@ -600,7 +604,7 @@ public: void OpenFolder_Impl(); // #83004# ------- - void ReplaceTabWithString( OUString& aValue ); + void ReplaceTabWithString( OUString& aValue ); void CreateDisplayText_Impl(); void CreateVector_Impl( const Sequence < OUString > &rList ); void SortFolderContent_Impl(); @@ -661,11 +665,13 @@ inline void SvtFileView_Impl::EnableDelete( sal_Bool bEnable ) inline sal_Bool SvtFileView_Impl::EnableNameReplacing( sal_Bool bEnable ) { + mpView->EnableRename( bEnable ); + sal_Bool bRet; if( mpView->IsDeleteOrContextMenuEnabled() ) { DBG_ASSERT( !mbReplaceNames, "SvtFileView_Impl::EnableNameReplacing(): state should be not possible!" ); - bRet = !bEnable; // only for enabling this is an unsuccessful result + bRet = !bEnable; // only for enabling this is an unsuccessful result } else { @@ -744,7 +750,8 @@ ViewTabListBox_Impl::ViewTabListBox_Impl( Window* pParentWin, mnSearchIndex ( 0 ), mbResizeDisabled ( sal_False ), mbAutoResize ( sal_False ), - mbEnableDelete ( sal_True ) + mbEnableDelete ( sal_True ), + mbEnableRename ( sal_True ) { Size aBoxSize = pParentWin->GetSizePixel(); @@ -824,7 +831,7 @@ void ViewTabListBox_Impl::Resize() mbResizeDisabled = sal_True; Point aPos = GetPosPixel(); SetPosSizePixel( Point( 0, aBarSize.Height() ), - Size( aBoxSize.Width(), aBoxSize.Height() - aBarSize.Height() ) ); + Size( aBoxSize.Width(), aBoxSize.Height() - aBarSize.Height() ) ); mbResizeDisabled = sal_False; } } @@ -870,20 +877,90 @@ void ViewTabListBox_Impl::KeyInput( const KeyEvent& rKEvt ) PopupMenu* ViewTabListBox_Impl::CreateContextMenu( void ) { - PopupMenu* pRet; - sal_Int32 nSelectedEntries = GetSelectionCount(); + bool bEnableDelete = mbEnableDelete; + bool bEnableRename = mbEnableRename; + + if ( bEnableDelete || bEnableRename ) + { + sal_Int32 nSelectedEntries = GetSelectionCount(); + bEnableDelete &= nSelectedEntries > 0; + bEnableRename &= nSelectedEntries == 1; + } + + if ( bEnableDelete || bEnableRename ) + { + SvLBoxEntry* pEntry = FirstSelected(); + while ( pEntry ) + { + ::ucbhelper::Content aCnt; + try + { + OUString aURL( static_cast< SvtContentEntry * >( + pEntry->GetUserData() )->maURL ); + aCnt = ::ucbhelper::Content( aURL, mxCmdEnv ); + } + catch( Exception const & ) + { + bEnableDelete = bEnableRename = false; + } + + if ( bEnableDelete ) + { + try + { + Reference< XCommandInfo > aCommands = aCnt.getCommands(); + if ( aCommands.is() ) + bEnableDelete + = aCommands->hasCommandByName( + OUString::createFromAscii( "delete" ) ); + else + bEnableDelete = false; + } + catch( Exception const & ) + { + bEnableDelete = false; + } + } + + if ( bEnableRename ) + { + try + { + Reference< XPropertySetInfo > aProps = aCnt.getProperties(); + if ( aProps.is() ) + { + Property aProp + = aProps->getPropertyByName( + OUString::createFromAscii( "Title" ) ); + bEnableRename + = !( aProp.Attributes & PropertyAttribute::READONLY ); + } + else + bEnableRename = false; + } + catch( Exception const & ) + { + bEnableRename = false; + } + } + + pEntry = ( bEnableDelete || bEnableRename ) + ? NextSelected( pEntry ) + : 0; + } + } - if ( nSelectedEntries ) + if ( bEnableDelete || bEnableRename ) { - pRet = new PopupMenu( SvtResId( RID_FILEVIEW_CONTEXTMENU ) ); - pRet->EnableItem( MID_FILEVIEW_DELETE, 0 < nSelectedEntries ); - pRet->EnableItem( MID_FILEVIEW_RENAME, 1 == nSelectedEntries ); + PopupMenu * pRet + = new PopupMenu( SvtResId( RID_FILEVIEW_CONTEXTMENU ) ); + pRet->EnableItem( MID_FILEVIEW_DELETE, bEnableDelete ); + pRet->EnableItem( MID_FILEVIEW_RENAME, bEnableRename ); pRet->RemoveDisabledEntries( sal_True, sal_True ); + return pRet; } - else - pRet = NULL; - return pRet; + return NULL; } // ----------------------------------------------------------------------- @@ -928,12 +1005,31 @@ void ViewTabListBox_Impl::DeleteEntries() aURL = ( (SvtContentEntry*)pCurEntry->GetUserData() )->maURL; if ( !aURL.Len() ) - return; + continue; + + bool canDelete = true; + try + { + ::ucbhelper::Content aCnt( aURL, mxCmdEnv ); + Reference< XCommandInfo > aCommands = aCnt.getCommands(); + if ( aCommands.is() ) + canDelete + = aCommands->hasCommandByName( + OUString::createFromAscii( "delete" ) ); + else + canDelete = false; + } + catch( Exception const & ) + { + canDelete = false; + } - INetURLObject aObj( aURL ); + if (!canDelete) + continue; // process next entry if ( eResult != svtools::QUERYDELETE_ALL ) { + INetURLObject aObj( aURL ); svtools::QueryDeleteDlg_Impl aDlg( NULL, aObj.GetName( INetURLObject::DECODE_WITH_CHARSET ) ); if ( sDialogPosition.Len() ) aDlg.SetWindowState( sDialogPosition ); @@ -979,22 +1075,44 @@ BOOL ViewTabListBox_Impl::EditedEntry( SvLBoxEntry* pEntry, try { + OUString aPropName = OUString::createFromAscii( "Title" ); + bool canRename = true; ::ucbhelper::Content aContent( aURL, mxCmdEnv ); - OUString aPropName = OUString::createFromAscii( "Title" ); - Any aValue; - aValue <<= OUString( rNewText ); - aContent.setPropertyValue( aPropName, aValue ); - mpParent->EntryRenamed( aURL, rNewText ); + try + { + Reference< XPropertySetInfo > aProps = aContent.getProperties(); + if ( aProps.is() ) + { + Property aProp = aProps->getPropertyByName( aPropName ); + canRename = !( aProp.Attributes & PropertyAttribute::READONLY ); + } + else + { + canRename = false; + } + } + catch ( Exception const & ) + { + canRename = false; + } + + if ( canRename ) + { + Any aValue; + aValue <<= OUString( rNewText ); + aContent.setPropertyValue( aPropName, aValue ); + mpParent->EntryRenamed( aURL, rNewText ); - pData->maURL = aURL; - pEntry->SetUserData( pData ); + pData->maURL = aURL; + pEntry->SetUserData( pData ); - bRet = TRUE; + bRet = TRUE; + } + } + catch( Exception const & ) + { } - catch( ::com::sun::star::ucb::ContentCreationException ) {} - catch( ::com::sun::star::ucb::CommandAbortedException ) {} - catch( ::com::sun::star::uno::Exception ) {} return bRet; } @@ -1095,12 +1213,12 @@ sal_Bool ViewTabListBox_Impl::Kill( const OUString& rContent ) ::ucbhelper::Content aCnt( rContent, mxCmdEnv ); aCnt.executeCommand( OUString::createFromAscii( "delete" ), makeAny( sal_Bool( sal_True ) ) ); } - catch( ::com::sun::star::ucb::CommandAbortedException& ) + catch( ::com::sun::star::ucb::CommandAbortedException const & ) { DBG_WARNING( "CommandAbortedException" ); bRet = sal_False; } - catch( ::com::sun::star::uno::Exception& ) + catch( Exception const & ) { DBG_WARNING( "Any other exception" ); bRet = sal_False; @@ -1314,7 +1432,7 @@ sal_Bool SvtFileView::GetParentURL( String& rParentURL ) const } } } - catch( ::com::sun::star::uno::Exception ) + catch( Exception const & ) { // perhaps an unkown url protocol (e.g. "private:newdoc") } @@ -1324,16 +1442,16 @@ sal_Bool SvtFileView::GetParentURL( String& rParentURL ) const // ----------------------------------------------------------------------- -sal_uInt32 SvtFileView::GetHelpId( ) const +const rtl::OString& SvtFileView::GetHelpId( ) const { return mpImp->mpView->GetHelpId( ); } // ----------------------------------------------------------------------- -void SvtFileView::SetHelpId( sal_uInt32 nHelpId ) +void SvtFileView::SetHelpId( const rtl::OString& rHelpId ) { - mpImp->mpView->SetHelpId( nHelpId ); + mpImp->mpView->SetHelpId( rHelpId ); } // ----------------------------------------------------------------------- @@ -1366,7 +1484,7 @@ sal_Bool SvtFileView::Initialize( const ::com::sun::star::uno::Reference< ::com: mpImp->FilterFolderContent_Impl( rFilter ); - mpImp->SortFolderContent_Impl(); // possibly not necessary!!!!!!!!!! + mpImp->SortFolderContent_Impl(); // possibly not necessary!!!!!!!!!! mpImp->CreateDisplayText_Impl(); mpImp->OpenFolder_Impl(); @@ -1999,7 +2117,7 @@ void SvtFileView_Impl::FilterFolderContent_Impl( const OUString &rFilter ) { // normalize the content title (we always match case-insensitive) // 91872 - 11.09.2001 - frank.schoenheit@sun.com - sCompareString = (*aContentLoop)->GetFileName(); // filter works on file name, not on title! + sCompareString = (*aContentLoop)->GetFileName(); // filter works on file name, not on title! sal_Bool bDelete; if( bHideTransFile && sCompareString == sHideEntry ) @@ -2643,12 +2761,12 @@ QueryDeleteDlg_Impl::QueryDeleteDlg_Impl ModalDialog( pParent, SvtResId( DLG_SVT_QUERYDELETE ) ), - _aEntryLabel ( this, SvtResId( TXT_ENTRY ) ), - _aEntry ( this, SvtResId( TXT_ENTRYNAME ) ), - _aQueryMsg ( this, SvtResId( TXT_QUERYMSG ) ), - _aYesButton ( this, SvtResId( BTN_YES ) ), - _aAllButton ( this, SvtResId( BTN_ALL ) ), - _aNoButton ( this, SvtResId( BTN_NO ) ), + _aEntryLabel ( this, SvtResId( TXT_ENTRY ) ), + _aEntry ( this, SvtResId( TXT_ENTRYNAME ) ), + _aQueryMsg ( this, SvtResId( TXT_QUERYMSG ) ), + _aYesButton ( this, SvtResId( BTN_YES ) ), + _aAllButton ( this, SvtResId( BTN_ALL ) ), + _aNoButton ( this, SvtResId( BTN_NO ) ), _aCancelButton( this, SvtResId( BTN_CANCEL ) ) { @@ -2671,12 +2789,6 @@ QueryDeleteDlg_Impl::QueryDeleteDlg_Impl // ----------------------------------------------------------------------- IMPL_STATIC_LINK( QueryDeleteDlg_Impl, ClickLink, PushButton*, pBtn ) - -/* [Beschreibung] - - Die Methode wertet das Resultat der Abfrage aus. -*/ - { if ( pBtn == &pThis->_aYesButton ) pThis->_eResult = QUERYDELETE_YES; diff --git a/svtools/source/contnr/fileview.src b/svtools/source/contnr/fileview.src index f40530c10347..bcb282f44615 100644 --- a/svtools/source/contnr/fileview.src +++ b/svtools/source/contnr/fileview.src @@ -110,6 +110,7 @@ Menu RID_FILEVIEW_CONTEXTMENU ModalDialog DLG_SVT_QUERYDELETE { + HelpID = "svtools:ModalDialog:DLG_SVT_QUERYDELETE"; SVLook = TRUE ; OutputSize = TRUE ; Moveable = TRUE ; @@ -142,6 +143,7 @@ ModalDialog DLG_SVT_QUERYDELETE PushButton BTN_YES { + HelpID = "svtools:PushButton:DLG_SVT_QUERYDELETE:BTN_YES"; Pos = MAP_APPFONT ( 6 , 47 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -151,6 +153,7 @@ ModalDialog DLG_SVT_QUERYDELETE PushButton BTN_ALL { + HelpID = "svtools:PushButton:DLG_SVT_QUERYDELETE:BTN_ALL"; Pos = MAP_APPFONT ( 59 , 47 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -160,6 +163,7 @@ ModalDialog DLG_SVT_QUERYDELETE PushButton BTN_NO { + HelpID = "svtools:PushButton:DLG_SVT_QUERYDELETE:BTN_NO"; Pos = MAP_APPFONT ( 112 , 47 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; diff --git a/svtools/source/contnr/imivctl.hxx b/svtools/source/contnr/imivctl.hxx index cc7aa4e05ee1..6b0f2cdccdd8 100644 --- a/svtools/source/contnr/imivctl.hxx +++ b/svtools/source/contnr/imivctl.hxx @@ -41,7 +41,7 @@ #include <limits.h> -#include "ivctrl.hxx" +#include <svtools/ivctrl.hxx> #include <svl/svarray.hxx> class IcnCursor_Impl; diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx index dd2ed992536e..ff7c42e9309a 100644 --- a/svtools/source/contnr/imivctl1.cxx +++ b/svtools/source/contnr/imivctl1.cxx @@ -40,7 +40,7 @@ #include <vcl/mnemonic.hxx> #include <vcl/controllayout.hxx> -#include "ivctrl.hxx" +#include <svtools/ivctrl.hxx> #include "imivctl.hxx" #include <svtools/svmedit.hxx> diff --git a/svtools/source/contnr/ivctrl.cxx b/svtools/source/contnr/ivctrl.cxx index dae3abbac966..9d494e5c32db 100644 --- a/svtools/source/contnr/ivctrl.cxx +++ b/svtools/source/contnr/ivctrl.cxx @@ -28,10 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#ifndef GCC -#endif - -#include "ivctrl.hxx" +#include <svtools/ivctrl.hxx> #include "imivctl.hxx" #include <vcl/bitmapex.hxx> #include <vcl/controllayout.hxx> diff --git a/svtools/source/contnr/makefile.mk b/svtools/source/contnr/makefile.mk deleted file mode 100644 index 232665c88c9c..000000000000 --- a/svtools/source/contnr/makefile.mk +++ /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. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=svtools -TARGET=svcontnr - -PROJECTPCH4DLL=TRUE -PROJECTPCH=cont_pch -PROJECTPCHSOURCE=cont_pch - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svt.pmk - -# --- Files -------------------------------------------------------- - -EXCEPTIONSFILES=\ - $(SLO)$/contentenumeration.obj \ - $(SLO)$/fileview.obj \ - $(SLO)$/svlbox.obj \ - $(SLO)$/svtabbx.obj \ - $(SLO)$/svimpbox.obj \ - $(SLO)$/templwin.obj - -SLOFILES= $(EXCEPTIONSFILES) \ - $(SLO)$/svicnvw.obj \ - $(SLO)$/svimpicn.obj \ - $(SLO)$/treelist.obj \ - $(SLO)$/svlbitm.obj \ - $(SLO)$/svtreebx.obj \ - $(SLO)$/imivctl1.obj \ - $(SLO)$/imivctl2.obj \ - $(SLO)$/ivctrl.obj \ - $(SLO)$/tooltiplbox.obj - -SRS1NAME=$(TARGET) -SRC1FILES =\ - fileview.src \ - templwin.src \ - svcontnr.src - -HXX1TARGET= svcontnr -HXX1EXT= hxx -HXX1FILES= $(PRJ)$/inc$/svlbox.hxx \ - $(PRJ)$/inc$/svlbitm.hxx \ - $(PRJ)$/inc$/svtreebx.hxx \ - $(PRJ)$/inc$/svicnvw.hxx \ - $(PRJ)$/inc$/svtabbx.hxx \ - $(PRJ)$/inc$/treelist.hxx -HXX1EXCL= -E:*include* - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - diff --git a/svtools/source/contnr/svicnvw.cxx b/svtools/source/contnr/svicnvw.cxx index 20bcfe0fe33a..6fd0f5bf0c9c 100644 --- a/svtools/source/contnr/svicnvw.cxx +++ b/svtools/source/contnr/svicnvw.cxx @@ -50,7 +50,6 @@ SvIcnVwDataEntry::~SvIcnVwDataEntry() SvIconView::SvIconView( Window* pParent, WinBits nWinStyle ) : SvLBox( pParent, nWinStyle | WB_BORDER ) { - nWinBits = nWinStyle; nIcnVwFlags = 0; pImp = new SvImpIconView( this, GetModel(), nWinStyle | WB_ICON ); pImp->mpViewData = 0; @@ -72,8 +71,6 @@ SvIconView::SvIconView( Window* pParent , const ResId& rResId ) : SetBackground( Wallpaper( rStyleSettings.GetFieldColor() ) ); SetDefaultFont(); pImp->SetSelectionMode( GetSelectionMode() ); - pImp->SetWindowBits( nWindowStyle ); - nWinBits = nWindowStyle; } SvIconView::~SvIconView() @@ -403,10 +400,11 @@ SvLBoxEntry* SvIconView::GetEntryFromLogicPos( const Point& rDocPos ) const } -void SvIconView::SetWindowBits( WinBits nWinStyle ) +void SvIconView::StateChanged( StateChangedType i_nStateChange ) { - nWinBits = nWinStyle; - pImp->SetWindowBits( nWinStyle ); + SvLBox::StateChanged( i_nStateChange ); + if ( i_nStateChange == STATE_CHANGE_STYLE ) + pImp->SetStyle( GetStyle() ); } void SvIconView::PaintEntry( SvLBoxEntry* pEntry ) @@ -469,6 +467,7 @@ void SvIconView::SelectAll( BOOL bSelect, BOOL ) void SvIconView::SetCurEntry( SvLBoxEntry* _pEntry ) { pImp->SetCursor( _pEntry ); + OnCurrentEntryChanged(); } SvLBoxEntry* SvIconView::GetCurEntry() const @@ -550,9 +549,6 @@ void SvIconView::EditItemText( SvLBoxEntry* pEntry, SvLBoxItem* pItem, aRect.Bottom() += 2; // sieht huebscher aus -#ifdef WIN - aRect.Bottom() += 4; -#endif #ifdef OS2 #if OS2_SINGLE_LINE_EDIT diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx index 7111a29a6a8a..74c6bb163797 100644 --- a/svtools/source/contnr/svimpbox.cxx +++ b/svtools/source/contnr/svimpbox.cxx @@ -29,15 +29,10 @@ #include "precompiled_svtools.hxx" #include <vcl/svapp.hxx> #include <vcl/salnativewidgets.hxx> - -#ifndef _HELP_HXX #include <vcl/help.hxx> -#endif -#include <tabbar.hxx> +#include <svtools/tabbar.hxx> -#ifndef _STACK_ #include <stack> -#endif #define _SVTREEBX_CXX #include <svtools/svtreebx.hxx> @@ -45,15 +40,9 @@ #include <svimpbox.hxx> #include <rtl/instance.hxx> #include <svtools/svtdata.hxx> - -#ifndef _SVTOOLS_HRC +#include <tools/wintypes.hxx> #include <svtools/svtools.hrc> -#endif - -// #102891# -------------------- -#ifndef _UNOTOOLS_PROCESSFACTORY_HXX #include <comphelper/processfactory.hxx> -#endif #define NODE_BMP_TABDIST_NOTVALID -2000000 #define FIRST_ENTRY_TAB 1 @@ -83,7 +72,7 @@ SvImpLBox::SvImpLBox( SvTreeListBox* pLBView, SvLBoxTreeList* pLBTree, WinBits n pTree = pLBTree; aSelEng.SetFunctionSet( (FunctionSet*)&aFctSet ); aSelEng.ExpandSelectionOnMouseMove( FALSE ); - SetWindowBits( nWinStyle ); + SetStyle( nWinStyle ); SetSelectionMode( SINGLE_SELECTION ); SetDragDropMode( 0 ); @@ -253,10 +242,10 @@ void SvImpLBox::CalcCellFocusRect( SvLBoxEntry* pEntry, Rectangle& rRect ) } } -void SvImpLBox::SetWindowBits( WinBits nWinStyle ) +void SvImpLBox::SetStyle( WinBits i_nWinStyle ) { - nWinBits = nWinStyle; - if((nWinStyle & WB_SIMPLEMODE) && aSelEng.GetSelectionMode()==MULTIPLE_SELECTION) + m_nStyle = i_nWinStyle; + if ( ( m_nStyle & WB_SIMPLEMODE) && ( aSelEng.GetSelectionMode() == MULTIPLE_SELECTION ) ) aSelEng.AddAlways( TRUE ); } @@ -683,6 +672,8 @@ void SvImpLBox::SetCursor( SvLBoxEntry* pEntry, BOOL bForceNoSelect ) } } nFlags &= (~F_DESEL_ALL); + + pView->OnCurrentEntryChanged(); } void SvImpLBox::ShowCursor( BOOL bShow ) @@ -952,7 +943,7 @@ void SvImpLBox::Paint( const Rectangle& rRect ) // erst die Linien Zeichnen, dann clippen! pView->SetClipRegion(); - if( nWinBits & ( WB_HASLINES | WB_HASLINESATROOT ) ) + if( m_nStyle & ( WB_HASLINES | WB_HASLINESATROOT ) ) DrawNet(); pView->SetClipRegion( aClipRegion ); @@ -969,7 +960,7 @@ void SvImpLBox::Paint( const Rectangle& rRect ) { // do not select if multiselection or explicit set BOOL bNotSelect = ( aSelEng.GetSelectionMode() == MULTIPLE_SELECTION ) - || ( ( nWinBits & WB_NOINITIALSELECTION ) == WB_NOINITIALSELECTION ); + || ( ( m_nStyle & WB_NOINITIALSELECTION ) == WB_NOINITIALSELECTION ); SetCursor( pStartEntry, bNotSelect ); } @@ -994,7 +985,7 @@ void SvImpLBox::MakeVisible( SvLBoxEntry* pEntry, BOOL bMoveToTop ) if( bInView && (!bMoveToTop || pStartEntry == pEntry) ) return; // ist schon sichtbar - if( pStartEntry || (nWinBits & WB_FORCE_MAKEVISIBLE) ) + if( pStartEntry || (m_nStyle & WB_FORCE_MAKEVISIBLE) ) nFlags &= (~F_FILLING); if( !bInView ) { @@ -1067,14 +1058,14 @@ void SvImpLBox::DrawNet() //so that SvImpLBox::DrawNet() doesn't draw anything too if(pView->IsNativeControlSupported( CTRL_LISTNET, PART_ENTIRE_CONTROL)) { ImplControlValue aControlValue; - Point aTemp(0,0); // temporary needed for g++ 3.3.5 - Region aCtrlRegion( Rectangle(aTemp, Size( 0, 0 )) ); + Point aTemp(0,0); // temporary needed for g++ 3.3.5 + Rectangle aCtrlRegion( aTemp, Size( 0, 0 ) ); ControlState nState = CTRL_STATE_ENABLED; - if( pView->DrawNativeControl( CTRL_LISTNET, PART_ENTIRE_CONTROL, - aCtrlRegion, nState, aControlValue, rtl::OUString() ) ) - { - return; - } + if( pView->DrawNativeControl( CTRL_LISTNET, PART_ENTIRE_CONTROL, + aCtrlRegion, nState, aControlValue, rtl::OUString() ) ) + { + return; + } } @@ -1132,7 +1123,7 @@ void SvImpLBox::DrawNet() pView->DrawLine( aPos1, aPos2 ); } // Sichtbar im Control ? - if( n>= nOffs && ((nWinBits & WB_HASLINESATROOT) || !pTree->IsAtRootDepth(pEntry))) + if( n>= nOffs && ((m_nStyle & WB_HASLINESATROOT) || !pTree->IsAtRootDepth(pEntry))) { // kann aPos1 recyclet werden ? if( !pView->IsExpanded(pEntry) ) @@ -1154,7 +1145,7 @@ void SvImpLBox::DrawNet() nY += nEntryHeight; pEntry = (SvLBoxEntry*)(pView->NextVisible( pEntry )); } - if( nWinBits & WB_HASLINESATROOT ) + if( m_nStyle & WB_HASLINESATROOT ) { pEntry = pView->First(); aPos1.X() = pView->GetTabPos( pEntry, pFirstDynamicTab); @@ -1248,7 +1239,8 @@ USHORT SvImpLBox::AdjustScrollBars( Size& rSize ) Size aOSize( pView->Control::GetOutputSizePixel() ); - BOOL bVerSBar = ( pView->nWindowStyle & WB_VSCROLL ) != 0; + const WinBits nWindowStyle = pView->GetStyle(); + BOOL bVerSBar = ( nWindowStyle & WB_VSCROLL ) != 0; BOOL bHorBar = FALSE; long nMaxRight = aOSize.Width(); //GetOutputSize().Width(); Point aOrigin( pView->GetMapMode().GetOrigin() ); @@ -1256,7 +1248,7 @@ USHORT SvImpLBox::AdjustScrollBars( Size& rSize ) nMaxRight += aOrigin.X() - 1; long nVis = nMostRight - aOrigin.X(); if( pTabBar || ( - (pView->nWindowStyle & WB_HSCROLL) && + (nWindowStyle & WB_HSCROLL) && (nVis < nMostRight || nMaxRight < nMostRight) )) bHorBar = TRUE; @@ -1274,7 +1266,7 @@ USHORT SvImpLBox::AdjustScrollBars( Size& rSize ) nMaxRight -= nVerSBarWidth; if( !bHorBar ) { - if( (pView->nWindowStyle & WB_HSCROLL) && + if( (nWindowStyle & WB_HSCROLL) && (nVis < nMostRight || nMaxRight < nMostRight) ) bHorBar = TRUE; } @@ -1439,7 +1431,7 @@ void SvImpLBox::FillView() void SvImpLBox::ShowVerSBar() { - BOOL bVerBar = ( pView->nWindowStyle & WB_VSCROLL ) != 0; + BOOL bVerBar = ( pView->GetStyle() & WB_VSCROLL ) != 0; ULONG nVis = 0; if( !bVerBar ) nVis = pView->GetVisibleCount(); @@ -1681,7 +1673,7 @@ void SvImpLBox::EntrySelected( SvLBoxEntry* pEntry, BOOL bSelect ) return; /* - if( (nWinBits & WB_HIDESELECTION) && pEntry && !pView->HasFocus() ) + if( (m_nStyle & WB_HIDESELECTION) && pEntry && !pView->HasFocus() ) { SvViewData* pViewData = pView->GetViewData( pEntry ); pViewData->SetCursored( bSelect ); @@ -1943,7 +1935,7 @@ void SvImpLBox::EntryInserted( SvLBoxEntry* pEntry ) // die Linien invalidieren /* if( (bEntryVisible || bPrevEntryVisible) && - (nWinBits & ( WB_HASLINES | WB_HASLINESATROOT )) ) + (m_nStyle & ( WB_HASLINES | WB_HASLINESATROOT )) ) { SvLBoxTab* pTab = pView->GetFirstDynamicTab(); if( pTab ) @@ -2172,14 +2164,6 @@ void SvImpLBox::MouseButtonDown( const MouseEvent& rMEvt ) SelAllDestrAnch( FALSE, TRUE ); // DeselectAll(); SetCursor( pEntry ); - DBG_ERROR( "Please report what you did to get this assertion to FS!" ); - // The entry which has been double-clicked changed - and we select it, again. - // I have situations where this behaviour does not make any sense at all - even more, it - // leads to hacks to revert it's results. - // So I'm not sure if this behaviour here is nonsense (which I believe at the moment), - // or if there are really scenarious where it dones make sense .... - // 07.12.2001 - 95727 - fs@openoffice.org - return; } if( pEntry->HasChilds() || pEntry->HasChildsOnDemand() ) @@ -2273,6 +2257,7 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt) SvLBoxEntry* pNewCursor; + const WinBits nWindowStyle = pView->GetStyle(); switch( aCode ) { case KEY_UP: @@ -2356,7 +2341,7 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt) CallEventListeners( VCLEVENT_LISTBOX_SELECT, pCursor ); } } - else if( pView->nWindowStyle & WB_HSCROLL ) + else if( nWindowStyle & WB_HSCROLL ) { long nThumb = aHorSBar.GetThumbPos(); nThumb += aHorSBar.GetLineSize(); @@ -2387,7 +2372,7 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt) CallEventListeners( VCLEVENT_LISTBOX_SELECT, pCursor ); } } - else if ( pView->nWindowStyle & WB_HSCROLL ) + else if ( nWindowStyle & WB_HSCROLL ) { long nThumb = aHorSBar.GetThumbPos(); nThumb -= aHorSBar.GetLineSize(); @@ -2489,13 +2474,17 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt) else if ( !bShift /*&& !bMod1*/ ) { if ( aSelEng.IsAddMode() ) + { // toggle selection pView->Select( pCursor, !pView->IsSelected( pCursor ) ); - else + } + else if ( !pView->IsSelected( pCursor ) ) { SelAllDestrAnch( FALSE ); pView->Select( pCursor, TRUE ); } + else + bKeyUsed = FALSE; } else bKeyUsed = FALSE; @@ -2528,7 +2517,7 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt) case KEY_F8: if( bShift && pView->GetSelectionMode()==MULTIPLE_SELECTION && - !(nWinBits & WB_SIMPLEMODE)) + !(m_nStyle & WB_SIMPLEMODE)) { if( aSelEng.IsAlwaysAdding() ) aSelEng.AddAlways( FALSE ); @@ -2576,8 +2565,8 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt) case KEY_A: if( bMod1 ) SelAllDestrAnch( TRUE ); -// else -// bKeyUsed = FALSE; #105907# assume user wants to use quicksearch with key "a", so key is handled! + else + bKeyUsed = FALSE; break; case KEY_SUBTRACT: @@ -2688,10 +2677,15 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt) break; default: - if( bMod1 || rKeyCode.GetGroup() == KEYGROUP_FKEYS ) - // #105907# CTRL or Function key is pressed, assume user don't want to use quicksearch... - // if there are groups of keys which should not be handled, they can be added here - bKeyUsed = FALSE; + // is there any reason why we should eat the events here? The only place where this is called + // is from SvTreeListBox::KeyInput. If we set bKeyUsed to TRUE here, then the key input + // is just silenced. However, we want SvLBox::KeyInput to get a chance, to do the QuickSelection + // handling. + // (The old code here which intentionally set bKeyUsed to TRUE said this was because of "quick search" + // handling, but actually there was no quick search handling anymore. We just re-implemented it.) + // #i31275# / 2009-06-16 / frank.schoenheit@sun.com + bKeyUsed = FALSE; + break; } return bKeyUsed; } @@ -2706,7 +2700,7 @@ void __EXPORT SvImpLBox::GetFocus() // if( bSimpleTravel && !pView->IsSelected(pCursor) ) // pView->Select( pCursor, TRUE ); } - if( nWinBits & WB_HIDESELECTION ) + if( m_nStyle & WB_HIDESELECTION ) { SvLBoxEntry* pEntry = pView->FirstSelected(); while( pEntry ) @@ -2739,7 +2733,7 @@ void __EXPORT SvImpLBox::LoseFocus() pView->SetEntryFocus( pCursor,FALSE ); ShowCursor( FALSE ); - if( nWinBits & WB_HIDESELECTION ) + if( m_nStyle & WB_HIDESELECTION ) { SvLBoxEntry* pEntry = pView->FirstSelected(); while( pEntry ) @@ -3037,7 +3031,7 @@ void SvImpLBox::SetSelectionMode( SelectionMode eSelMode ) bSimpleTravel = TRUE; else bSimpleTravel = FALSE; - if( (nWinBits & WB_SIMPLEMODE) && (eSelMode == MULTIPLE_SELECTION) ) + if( (m_nStyle & WB_SIMPLEMODE) && (eSelMode == MULTIPLE_SELECTION) ) aSelEng.AddAlways( TRUE ); } @@ -3115,7 +3109,7 @@ void lcl_DeleteSubPopups(PopupMenu* pPopup) } } -bool SvImpLBox::Command( const CommandEvent& rCEvt ) +void SvImpLBox::Command( const CommandEvent& rCEvt ) { USHORT nCommand = rCEvt.GetCommand(); @@ -3123,22 +3117,9 @@ bool SvImpLBox::Command( const CommandEvent& rCEvt ) aEditTimer.Stop(); // Rollmaus-Event? - if ( ( ( nCommand == COMMAND_WHEEL ) - || ( nCommand == COMMAND_STARTAUTOSCROLL ) - || ( nCommand == COMMAND_AUTOSCROLL ) - ) - && pView->HandleScrollCommand( rCEvt, &aHorSBar, &aVerSBar ) - ) - { - return true; - } - - if ( ( nCommand == COMMAND_CONTEXTMENU ) - && !bContextMenuHandling - ) - { - return false; - } + if( ( ( nCommand == COMMAND_WHEEL ) || ( nCommand == COMMAND_STARTAUTOSCROLL ) || ( nCommand == COMMAND_AUTOSCROLL ) ) + && pView->HandleScrollCommand( rCEvt, &aHorSBar, &aVerSBar ) ) + return; if( bContextMenuHandling && nCommand == COMMAND_CONTEXTMENU ) { @@ -3187,6 +3168,8 @@ bool SvImpLBox::Command( const CommandEvent& rCEvt ) { // deselect all pView->SelectAll( FALSE ); } + + } else { // key event (or at least no mouse event) @@ -3246,18 +3229,15 @@ bool SvImpLBox::Command( const CommandEvent& rCEvt ) aSelRestore.pop(); } } - return true; } - - const Point& rPos = rCEvt.GetMousePosPixel(); - if( rPos.X() < aOutputSize.Width() && rPos.Y() < aOutputSize.Height() ) - aSelEng.Command( rCEvt ); - - // strictly, this is not correct. However, it leads to a behavior compatible to the one at the time - // when this method did have a void return value ... - // A proper solution would be to give the EditEngine::Command also a boolean return value, and forward - // this (or false) to our caller - return true; +#ifndef NOCOMMAND + else + { + const Point& rPos = rCEvt.GetMousePosPixel(); + if( rPos.X() < aOutputSize.Width() && rPos.Y() < aOutputSize.Height() ) + aSelEng.Command( rCEvt ); + } +#endif } void SvImpLBox::BeginScroll() diff --git a/svtools/source/contnr/svimpicn.cxx b/svtools/source/contnr/svimpicn.cxx index 2d4c9cf2df0e..0d335429d564 100644 --- a/svtools/source/contnr/svimpicn.cxx +++ b/svtools/source/contnr/svimpicn.cxx @@ -708,7 +708,7 @@ public: SvImpIconView::SvImpIconView( SvIconView* pCurView, SvLBoxTreeList* pTree, - WinBits nWinStyle ) : + WinBits i_nWinStyle ) : aVerSBar( pCurView, WB_DRAG | WB_VSCROLL ), aHorSBar( pCurView, WB_DRAG | WB_HSCROLL ) { @@ -716,7 +716,7 @@ SvImpIconView::SvImpIconView( SvIconView* pCurView, SvLBoxTreeList* pTree, pModel = pTree; pCurParent = 0; pZOrderList = new SvPtrarr; - SetWindowBits( nWinStyle ); + SetStyle( i_nWinStyle ); nHorDist = 0; nVerDist = 0; nFlags = 0; @@ -785,13 +785,12 @@ void SvImpIconView::Clear( BOOL bInCtor ) AdjustScrollBars(); } -void SvImpIconView::SetWindowBits( WinBits nWinStyle ) +void SvImpIconView::SetStyle( const WinBits i_nWinStyle ) { - nWinBits = nWinStyle; nViewMode = VIEWMODE_TEXT; - if( nWinStyle & WB_NAME ) + if( i_nWinStyle & WB_NAME ) nViewMode = VIEWMODE_NAME; - if( nWinStyle & WB_ICON ) + if( i_nWinStyle & WB_ICON ) nViewMode = VIEWMODE_ICON; } @@ -1702,11 +1701,6 @@ void SvImpIconView::PositionScrollBars( long nRealWidth, long nRealHeight ) Point aPos( 0, nRealHeight ); aPos.Y() -= nHorSBarHeight; -#ifdef WIN - // vom linken und unteren Rand ein Pixel abschneiden - aPos.Y()++; - aPos.X()--; -#endif #ifdef OS2 aPos.Y()++; #endif @@ -1717,7 +1711,7 @@ void SvImpIconView::PositionScrollBars( long nRealWidth, long nRealHeight ) aPos.X() = nRealWidth; aPos.Y() = 0; aPos.X() -= nVerSBarWidth; -#if defined(WIN) || defined(WNT) +#if defined(WNT) aPos.X()++; aPos.Y()--; #endif @@ -1759,8 +1753,8 @@ void SvImpIconView::AdjustScrollBars() else nVisibleHeight = nRealHeight; - bool bVerSBar = (pView->nWindowStyle & WB_VSCROLL) ? true : false; - bool bHorSBar = (pView->nWindowStyle & WB_HSCROLL) ? true : false; + bool bVerSBar = (pView->GetStyle() & WB_VSCROLL) ? true : false; + bool bHorSBar = (pView->GetStyle() & WB_HSCROLL) ? true : false; USHORT nResult = 0; if( nVirtHeight ) @@ -1809,7 +1803,7 @@ void SvImpIconView::AdjustScrollBars() // size ver scrollbar long nThumb = aVerSBar.GetThumbPos(); Size aSize( nVerSBarWidth, nRealHeight ); -#if defined(WIN) || defined(WNT) +#if defined(WNT) aSize.Height() += 2; #endif #ifdef OS2 @@ -1834,7 +1828,7 @@ void SvImpIconView::AdjustScrollBars() nThumb = aHorSBar.GetThumbPos(); aSize.Width() = nRealWidth; aSize.Height() = nHorSBarHeight; -#if defined(WIN) || defined(WNT) +#if defined(WNT) aSize.Width()++; #endif #ifdef OS2 @@ -1842,7 +1836,7 @@ void SvImpIconView::AdjustScrollBars() if( nResult & 0x0001 ) // vertikale Scrollbar ? aSize.Width()--; #endif -#if defined(WIN) || defined(WNT) +#if defined(WNT) if( nResult & 0x0001 ) // vertikale Scrollbar ? { aSize.Width()++; @@ -1868,7 +1862,7 @@ void SvImpIconView::AdjustScrollBars() nRealWidth++; #endif aOutputSize.Width() = nRealWidth; -#if defined(WIN) || defined(WNT) +#if defined(WNT) if( nResult & 0x0002 ) // hor scrollbar ? nRealHeight++; // weil unterer Rand geclippt wird #endif @@ -1908,7 +1902,7 @@ BOOL SvImpIconView::CheckHorScrollBar() return FALSE; const MapMode& rMapMode = pView->GetMapMode(); Point aOrigin( rMapMode.GetOrigin() ); - if(!(pView->nWindowStyle & WB_HSCROLL) && !aOrigin.X() ) + if(!(pView->GetStyle() & WB_HSCROLL) && !aOrigin.X() ) { long nWidth = aOutputSize.Width(); USHORT nCount = pZOrderList->Count(); @@ -1946,7 +1940,7 @@ BOOL SvImpIconView::CheckVerScrollBar() return FALSE; const MapMode& rMapMode = pView->GetMapMode(); Point aOrigin( rMapMode.GetOrigin() ); - if(!(pView->nWindowStyle & WB_VSCROLL) && !aOrigin.Y() ) + if(!(pView->GetStyle() & WB_VSCROLL) && !aOrigin.Y() ) { long nDeepest = 0; long nHeight = aOutputSize.Height(); diff --git a/svtools/source/contnr/svlbitm.cxx b/svtools/source/contnr/svlbitm.cxx index 82321b53259e..d260f984c2b0 100644 --- a/svtools/source/contnr/svlbitm.cxx +++ b/svtools/source/contnr/svlbitm.cxx @@ -406,7 +406,7 @@ BOOL SvLBoxButton::ClickHdl( SvLBox*, SvLBoxEntry* pEntry ) } void SvLBoxButton::Paint( const Point& rPos, SvLBox& rDev, USHORT /* nFlags */, - SvLBoxEntry* ) + SvLBoxEntry* /*pEntry*/ ) { DBG_CHKTHIS(SvLBoxButton,0); USHORT nIndex = eKind == SvLBoxButtonKind_staticImage @@ -418,14 +418,13 @@ void SvLBoxButton::Paint( const Point& rPos, SvLBox& rDev, USHORT /* nFlags */, //Native drawing /// BOOL bNativeOK = FALSE; - Window *pWin = NULL; - if( rDev.GetOutDevType() == OUTDEV_WINDOW ) - pWin = (Window*) &rDev; - - if ( nIndex != SV_BMP_STATICIMAGE && pWin && pWin->IsNativeControlSupported( (pData->IsRadio())? CTRL_RADIOBUTTON : CTRL_CHECKBOX, PART_ENTIRE_CONTROL) ) + ControlType eCtrlType = (pData->IsRadio())? CTRL_RADIOBUTTON : CTRL_CHECKBOX; + if ( nIndex != SV_BMP_STATICIMAGE && rDev.IsNativeControlSupported( eCtrlType, PART_ENTIRE_CONTROL) ) { + Size aSize(pData->Width(), pData->Height()); + ImplAdjustBoxSize( aSize, eCtrlType, &rDev ); ImplControlValue aControlValue; - Region aCtrlRegion( Rectangle(rPos, Size(pData->Width(), pData->Height())) ); + Rectangle aCtrlRegion( rPos, aSize ); ControlState nState = 0; //states CTRL_STATE_DEFAULT, CTRL_STATE_PRESSED and CTRL_STATE_ROLLOVER are not implemented @@ -439,7 +438,7 @@ void SvLBoxButton::Paint( const Point& rPos, SvLBox& rDev, USHORT /* nFlags */, else if ( IsStateTristate() ) aControlValue.setTristateVal( BUTTONVALUE_MIXED ); - bNativeOK = pWin->DrawNativeControl( (pData->IsRadio())? CTRL_RADIOBUTTON : CTRL_CHECKBOX, PART_ENTIRE_CONTROL, + bNativeOK = rDev.DrawNativeControl( eCtrlType, PART_ENTIRE_CONTROL, aCtrlRegion, nState, aControlValue, rtl::OUString() ); } @@ -459,13 +458,47 @@ void SvLBoxButton::Clone( SvLBoxItem* pSource ) pData = ((SvLBoxButton*)pSource)->pData; } +void SvLBoxButton::ImplAdjustBoxSize( Size& io_rSize, ControlType i_eType, Window* i_pParent ) +{ + if ( i_pParent->IsNativeControlSupported( i_eType, PART_ENTIRE_CONTROL) ) + { + ImplControlValue aControlValue; + Rectangle aCtrlRegion( Point( 0, 0 ), io_rSize ); + ControlState nState = CTRL_STATE_ENABLED; + + aControlValue.setTristateVal( BUTTONVALUE_ON ); + + Rectangle aNativeBounds, aNativeContent; + bool bNativeOK = i_pParent->GetNativeControlRegion( i_eType, + PART_ENTIRE_CONTROL, + aCtrlRegion, + nState, + aControlValue, + rtl::OUString(), + aNativeBounds, + aNativeContent ); + if( bNativeOK ) + { + Size aContentSize( aNativeContent.GetSize() ); + // leave a little space around the box image (looks better + if( aContentSize.Height() + 2 > io_rSize.Height() ) + io_rSize.Height() = aContentSize.Height() + 2; + } + } +} + void SvLBoxButton::InitViewData( SvLBox* pView,SvLBoxEntry* pEntry, SvViewDataItem* pViewData ) { DBG_CHKTHIS(SvLBoxButton,0); if( !pViewData ) pViewData = pView->GetViewDataItem( pEntry, this ); - pViewData->aSize = Size( pData->Width(), pData->Height() ); + Size aSize( pData->Width(), pData->Height() ); + + ControlType eCtrlType = (pData->IsRadio())? CTRL_RADIOBUTTON : CTRL_CHECKBOX; + if ( eKind != SvLBoxButtonKind_staticImage && pView ) + ImplAdjustBoxSize( aSize, eCtrlType, pView ); + pViewData->aSize = aSize; } bool SvLBoxButton::CheckModification() const diff --git a/svtools/source/contnr/svlbox.cxx b/svtools/source/contnr/svlbox.cxx index fb71f64772ad..11e19c6bab3c 100644 --- a/svtools/source/contnr/svlbox.cxx +++ b/svtools/source/contnr/svlbox.cxx @@ -685,6 +685,7 @@ SvLBox_Impl::SvLBox_Impl( SvLBox& _rBox ) ,m_bEntryMnemonicsEnabled( false ) ,m_pLink( NULL ) ,m_aMnemonicEngine( _rBox ) + ,m_aQuickSelectionEngine( _rBox ) { } @@ -699,7 +700,6 @@ SvLBox::SvLBox( Window* pParent, WinBits nWinStyle ) : DropTargetHelper( this ), DragSourceHelper( this ), eSelMode( NO_SELECTION ) { DBG_CTOR(SvLBox,0); - nWindowStyle = nWinStyle; nDragOptions = DND_ACTION_COPYMOVE | DND_ACTION_LINK; nImpFlags = 0; pTargetEntry = 0; @@ -724,7 +724,6 @@ SvLBox::SvLBox( Window* pParent, const ResId& rResId ) : DBG_CTOR(SvLBox,0); pTargetEntry = 0; nImpFlags = 0; - nWindowStyle = 0; pLBoxImpl = new SvLBox_Impl( *this ); nDragOptions = DND_ACTION_COPYMOVE | DND_ACTION_LINK; nDragDropMode = 0; @@ -1251,6 +1250,12 @@ ULONG SvLBox::SelectChilds( SvLBoxEntry* , BOOL ) return 0; } +void SvLBox::OnCurrentEntryChanged() +{ + if ( !pLBoxImpl->m_bDoingQuickSelection ) + pLBoxImpl->m_aQuickSelectionEngine.Reset(); +} + void SvLBox::SelectAll( BOOL /* bSelect */ , BOOL /* bPaint */ ) { DBG_CHKTHIS(SvLBox,0); @@ -1518,6 +1523,13 @@ void SvLBox::MakeVisible( SvLBoxEntry* ) void SvLBox::Command( const CommandEvent& i_rCommandEvent ) { DBG_CHKTHIS(SvLBox,0); + + if ( COMMAND_STARTDRAG == i_rCommandEvent.GetCommand() ) + { + Point aEventPos( i_rCommandEvent.GetMousePosPixel() ); + MouseEvent aMouseEvt( aEventPos, 1, MOUSE_SELECT, MOUSE_LEFT ); + MouseButtonUp( aMouseEvt ); + } Control::Command( i_rCommandEvent ); } @@ -1528,15 +1540,14 @@ void SvLBox::KeyInput( const KeyEvent& rKEvt ) Control::KeyInput( rKEvt ); } -const void* SvLBox::FirstSearchEntry( String& _rEntryText ) +const void* SvLBox::FirstSearchEntry( String& _rEntryText ) const { SvLBoxEntry* pEntry = GetCurEntry(); if ( pEntry ) pEntry = const_cast< SvLBoxEntry* >( static_cast< const SvLBoxEntry* >( NextSearchEntry( pEntry, _rEntryText ) ) ); else { - if ( !pEntry ) - pEntry = FirstSelected(); + pEntry = FirstSelected(); if ( !pEntry ) pEntry = First(); } @@ -1547,11 +1558,23 @@ const void* SvLBox::FirstSearchEntry( String& _rEntryText ) return pEntry; } -const void* SvLBox::NextSearchEntry( const void* _pCurrentSearchEntry, String& _rEntryText ) +const void* SvLBox::NextSearchEntry( const void* _pCurrentSearchEntry, String& _rEntryText ) const { SvLBoxEntry* pEntry = const_cast< SvLBoxEntry* >( static_cast< const SvLBoxEntry* >( _pCurrentSearchEntry ) ); - pEntry = Next( pEntry ); + if ( ( ( GetChildCount( pEntry ) > 0 ) + || ( pEntry->HasChildsOnDemand() ) + ) + && !IsExpanded( pEntry ) + ) + { + pEntry = NextSibling( pEntry ); + } + else + { + pEntry = Next( pEntry ); + } + if ( !pEntry ) pEntry = First(); @@ -1565,7 +1588,7 @@ void SvLBox::SelectSearchEntry( const void* _pEntry ) { SvLBoxEntry* pEntry = const_cast< SvLBoxEntry* >( static_cast< const SvLBoxEntry* >( _pEntry ) ); DBG_ASSERT( pEntry, "SvLBox::SelectSearchEntry: invalid entry!" ); - if ( pEntry ) + if ( !pEntry ) return; SelectAll( FALSE ); @@ -1573,17 +1596,50 @@ void SvLBox::SelectSearchEntry( const void* _pEntry ) Select( pEntry ); } -void SvLBox::ExecuteSearchEntry( const void* /*_pEntry*/ ) +void SvLBox::ExecuteSearchEntry( const void* /*_pEntry*/ ) const { // nothing to do here, we have no "execution" } +::vcl::StringEntryIdentifier SvLBox::CurrentEntry( String& _out_entryText ) const +{ + // always accept the current entry if there is one + SvLBoxEntry* pCurrentEntry( GetCurEntry() ); + if ( pCurrentEntry ) + { + _out_entryText = GetEntryText( pCurrentEntry ); + return pCurrentEntry; + } + return FirstSearchEntry( _out_entryText ); +} + +::vcl::StringEntryIdentifier SvLBox::NextEntry( ::vcl::StringEntryIdentifier _currentEntry, String& _out_entryText ) const +{ + return NextSearchEntry( _currentEntry, _out_entryText ); +} + +void SvLBox::SelectEntry( ::vcl::StringEntryIdentifier _entry ) +{ + SelectSearchEntry( _entry ); +} + bool SvLBox::HandleKeyInput( const KeyEvent& _rKEvt ) { - if ( !IsEntryMnemonicsEnabled() ) - return false; + if ( IsEntryMnemonicsEnabled() + && pLBoxImpl->m_aMnemonicEngine.HandleKeyEvent( _rKEvt ) + ) + return true; - return pLBoxImpl->m_aMnemonicEngine.HandleKeyEvent( _rKEvt ); + if ( ( GetStyle() & WB_QUICK_SEARCH ) != 0 ) + { + pLBoxImpl->m_bDoingQuickSelection = true; + const bool bHandled = pLBoxImpl->m_aQuickSelectionEngine.HandleKeyEvent( _rKEvt ); + pLBoxImpl->m_bDoingQuickSelection = false; + if ( bHandled ) + return true; + } + + return false; } SvLBoxEntry* SvLBox::GetEntry( const Point&, BOOL ) const @@ -1775,6 +1831,10 @@ void SvLBox::StartDrag( sal_Int8, const Point& rPosPixel ) { DBG_CHKTHIS(SvLBox,0); + Point aEventPos( rPosPixel ); + MouseEvent aMouseEvt( aEventPos, 1, MOUSE_SELECT, MOUSE_LEFT ); + MouseButtonUp( aMouseEvt ); + nOldDragMode = GetDragDropMode(); if ( !nOldDragMode ) return; diff --git a/svtools/source/contnr/svtreebx.cxx b/svtools/source/contnr/svtreebx.cxx index bf6e41f93f36..9d6bc78caff9 100644 --- a/svtools/source/contnr/svtreebx.cxx +++ b/svtools/source/contnr/svtreebx.cxx @@ -65,10 +65,10 @@ DBG_NAME(SvTreeListBox) #define SV_LBOX_DEFAULT_INDENT_PIXEL 20 SvTreeListBox::SvTreeListBox( Window* pParent, WinBits nWinStyle ) - : SvLBox(pParent,nWinStyle ) + : SvLBox( pParent, nWinStyle ) { DBG_CTOR(SvTreeListBox,0); - InitTreeView( nWinStyle ); + InitTreeView(); SetSublistOpenWithLeftRight(); } @@ -78,13 +78,13 @@ SvTreeListBox::SvTreeListBox( Window* pParent , const ResId& rResId ) { DBG_CTOR(SvTreeListBox,0); - InitTreeView( 0 ); + InitTreeView(); Resize(); SetSublistOpenWithLeftRight(); } -void SvTreeListBox::InitTreeView( WinBits nWinStyle ) +void SvTreeListBox::InitTreeView() { DBG_CHKTHIS(SvTreeListBox,0); pCheckButtonData = NULL; @@ -102,7 +102,7 @@ void SvTreeListBox::InitTreeView( WinBits nWinStyle ) nTreeFlags = TREEFLAG_RECALCTABS; nIndent = SV_LBOX_DEFAULT_INDENT_PIXEL; nEntryHeightOffs = SV_ENTRYHEIGHTOFFS_PIXEL; - pImp = new SvImpLBox( this, GetModel(), nWinStyle ); + pImp = new SvImpLBox( this, GetModel(), GetStyle() ); aContextBmpMode = SVLISTENTRYFLAG_EXPANDED; nContextBmpWidthMax = 0; @@ -110,7 +110,7 @@ void SvTreeListBox::InitTreeView( WinBits nWinStyle ) SetSpaceBetweenEntries( 0 ); SetLineColor(); InitSettings( TRUE, TRUE, TRUE ); - SetWindowBits( nWinStyle ); + ImplInitStyle(); SetTabs(); } @@ -227,8 +227,9 @@ void SvTreeListBox::SetTabs() EndEditing( TRUE ); nTreeFlags &= (~TREEFLAG_RECALCTABS); nFocusWidth = -1; - BOOL bHasButtons = (nWindowStyle & WB_HASBUTTONS)!=0; - BOOL bHasButtonsAtRoot = (nWindowStyle & (WB_HASLINESATROOT | + const WinBits nStyle( GetStyle() ); + BOOL bHasButtons = (nStyle & WB_HASBUTTONS)!=0; + BOOL bHasButtonsAtRoot = (nStyle & (WB_HASLINESATROOT | WB_HASBUTTONSATROOT))!=0; long nStartPos = TAB_STARTPOS; long nNodeWidthPixel = GetExpandedNodeBmp().GetSizePixel().Width(); @@ -1492,12 +1493,14 @@ SvLBoxEntry* SvTreeListBox::GetCurEntry() const return pImp->GetCurEntry(); } -void SvTreeListBox::SetWindowBits( WinBits nWinStyle ) +void SvTreeListBox::ImplInitStyle() { DBG_CHKTHIS(SvTreeListBox,0); - nWindowStyle = nWinStyle; + + const WinBits nWindowStyle = GetStyle(); + nTreeFlags |= TREEFLAG_RECALCTABS; - if( nWinStyle & WB_SORT ) + if( nWindowStyle & WB_SORT ) { GetModel()->SetSortMode( SortAscending ); GetModel()->SetCompareHdl( LINK(this,SvTreeListBox,DefaultCompare)); @@ -1508,9 +1511,9 @@ void SvTreeListBox::SetWindowBits( WinBits nWinStyle ) GetModel()->SetCompareHdl( Link() ); } #ifdef OS2 - nWinStyle |= WB_VSCROLL; + nWindowStyle |= WB_VSCROLL; #endif - pImp->SetWindowBits( nWinStyle ); + pImp->SetStyle( nWindowStyle ); pImp->Resize(); Invalidate(); } @@ -1578,8 +1581,9 @@ long SvTreeListBox::PaintEntry1(SvLBoxEntry* pEntry,long nLine,USHORT nTabFlags, BOOL bInUse = pEntry->HasInUseEmphasis(); // wenn eine ClipRegion von aussen gesetzt wird, dann // diese nicht zuruecksetzen - BOOL bResetClipRegion = !bHasClipRegion; - BOOL bHideSelection = ((nWindowStyle & WB_HIDESELECTION) && !HasFocus())!=0; + const WinBits nWindowStyle = GetStyle(); + const BOOL bResetClipRegion = !bHasClipRegion; + const BOOL bHideSelection = ((nWindowStyle & WB_HIDESELECTION) && !HasFocus())!=0; const StyleSettings& rSettings = GetSettings().GetStyleSettings(); Font aHighlightFont( GetFont() ); @@ -1814,7 +1818,7 @@ long SvTreeListBox::PaintEntry1(SvLBoxEntry* pEntry,long nLine,USHORT nTabFlags, if ( IsNativeControlSupported( CTRL_LISTNODE, PART_ENTIRE_CONTROL) ) { ImplControlValue aControlValue; - Region aCtrlRegion( Rectangle(aPos, pImg->GetSizePixel() ) ); + Rectangle aCtrlRegion( aPos, pImg->GetSizePixel() ); ControlState nState = 0; if ( IsEnabled() ) nState |= CTRL_STATE_ENABLED; @@ -2229,8 +2233,8 @@ Region SvTreeListBox::GetDragRegion() const void SvTreeListBox::Command( const CommandEvent& rCEvt ) { DBG_CHKTHIS(SvTreeListBox,0); - if ( !pImp->Command( rCEvt ) ) - SvLBox::Command( rCEvt ); + // FIXME gnumake2 resync to DEV300_m84 + pImp->Command( rCEvt ); } @@ -2367,6 +2371,7 @@ void SvTreeListBox::ModelNotification( USHORT nActionId, SvListEntry* pEntry1, long SvTreeListBox::GetTextOffset() const { DBG_CHKTHIS(SvTreeListBox,0); + const WinBits nWindowStyle = GetStyle(); BOOL bHasButtons = (nWindowStyle & WB_HASBUTTONS)!=0; BOOL bHasButtonsAtRoot = (nWindowStyle & (WB_HASLINESATROOT | WB_HASBUTTONSATROOT))!=0; @@ -2516,6 +2521,13 @@ void SvTreeListBox::DataChanged( const DataChangedEvent& rDCEvt ) Control::DataChanged( rDCEvt ); } +void SvTreeListBox::StateChanged( StateChangedType i_nStateChange ) +{ + SvLBox::StateChanged( i_nStateChange ); + if ( i_nStateChange == STATE_CHANGE_STYLE ) + ImplInitStyle(); +} + void SvTreeListBox::InitSettings(BOOL bFont,BOOL bForeground,BOOL bBackground) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); diff --git a/svtools/source/contnr/templwin.cxx b/svtools/source/contnr/templwin.cxx index 61112f6669ca..86bab5b8e42a 100644 --- a/svtools/source/contnr/templwin.cxx +++ b/svtools/source/contnr/templwin.cxx @@ -28,31 +28,24 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" #include "templwin.hxx" -#include "templdlg.hxx" +#include <svtools/templdlg.hxx> #include <svtools/svtdata.hxx> #include <unotools/pathoptions.hxx> #include <unotools/dynamicmenuoptions.hxx> #include <unotools/extendedsecurityoptions.hxx> #include <svtools/xtextedt.hxx> #include <svl/inettype.hxx> -#include "imagemgr.hxx" +#include <svtools/imagemgr.hxx> #include <svtools/miscopt.hxx> -#include "templatefoldercache.hxx" -#include "imgdef.hxx" -#include "txtattr.hxx" -#ifndef _SVTOOLS_HRC +#include <svtools/templatefoldercache.hxx> +#include <svtools/imgdef.hxx> +#include <svtools/txtattr.hxx> #include <svtools/svtools.hrc> -#endif -#ifndef _SVTOOLS_TEMPLWIN_HRC #include "templwin.hrc" -#endif -#ifndef _SVT_HELPID_HRC #include <svtools/helpid.hrc> -#endif #include <unotools/pathoptions.hxx> #include <unotools/viewoptions.hxx> #include <unotools/ucbhelper.hxx> - #include "unotools/configmgr.hxx" #include <com/sun/star/awt/XWindow.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> @@ -87,7 +80,7 @@ #include <vcl/svapp.hxx> #include <vcl/split.hxx> #include <vcl/msgbox.hxx> -#include "DocumentInfoPreview.hxx" +#include <svtools/DocumentInfoPreview.hxx> #include <vcl/mnemonic.hxx> #include <ucbhelper/content.hxx> diff --git a/svtools/source/contnr/templwin.hxx b/svtools/source/contnr/templwin.hxx index acb7c602ad30..d8ec12224f60 100644 --- a/svtools/source/contnr/templwin.hxx +++ b/svtools/source/contnr/templwin.hxx @@ -32,8 +32,8 @@ #include <vcl/toolbox.hxx> #include <vcl/window.hxx> #include <svtools/headbar.hxx> -#include "fileview.hxx" -#include "ivctrl.hxx" +#include <svtools/fileview.hxx> +#include <svtools/ivctrl.hxx> #include <svtools/svmedit2.hxx> #include <svl/restrictedpaths.hxx> #include <com/sun/star/frame/XDispatch.hpp> diff --git a/svtools/source/contnr/templwin.src b/svtools/source/contnr/templwin.src index 048d052c18d8..113e20c34f28 100644 --- a/svtools/source/contnr/templwin.src +++ b/svtools/source/contnr/templwin.src @@ -28,7 +28,7 @@ // includes ------------------------------------------------------------------ #include "templwin.hrc" -#include "controldims.hrc" +#include <svtools/controldims.hrc> #include <svtools/helpid.hrc> #include <svtools/svtools.hrc> @@ -289,12 +289,14 @@ ModalDialog DLG_DOCTEMPLATE }; PushButton BTN_DOCTEMPLATE_MANAGE { + HelpID = "svtools:PushButton:DLG_DOCTEMPLATE:BTN_DOCTEMPLATE_MANAGE"; Pos = MAP_APPFONT( 6, 230 ); Size = MAP_APPFONT( 50, 14 ); Text [ en-US ] = "Organi~ze..."; }; PushButton BTN_DOCTEMPLATE_EDIT { + HelpID = "svtools:PushButton:DLG_DOCTEMPLATE:BTN_DOCTEMPLATE_EDIT"; Pos = MAP_APPFONT( 59, 230 ); Size = MAP_APPFONT( 50, 14 ); Text [ en-US ] = "~Edit"; diff --git a/svtools/source/contnr/tooltiplbox.cxx b/svtools/source/contnr/tooltiplbox.cxx index 6aae495bd504..69073a0793c5 100644 --- a/svtools/source/contnr/tooltiplbox.cxx +++ b/svtools/source/contnr/tooltiplbox.cxx @@ -27,7 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#include "tooltiplbox.hxx" +#include <svtools/tooltiplbox.hxx> #include <vcl/help.hxx> // ============================================================================ diff --git a/svtools/source/contnr/treelist.cxx b/svtools/source/contnr/treelist.cxx index 3395dffc28f5..1b96f1ac89e4 100644 --- a/svtools/source/contnr/treelist.cxx +++ b/svtools/source/contnr/treelist.cxx @@ -139,16 +139,6 @@ void SvTreeEntryList::DestroyAll() } - - -#if defined (WIN) && defined (MSC) -// siehe BugId 42896: Die Funktionen Prev, PrevVisible, Next, NextVisible -// (andere?) funktionieren nicht mit Optimierung. -#pragma optimize ("", off) -#endif - - - /************************************************************************* |* |* SvTreeList:: diff --git a/svtools/source/control/asynclink.cxx b/svtools/source/control/asynclink.cxx index 04b2b58367ee..d3ef0c349f08 100644..100755 --- a/svtools/source/control/asynclink.cxx +++ b/svtools/source/control/asynclink.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#include <asynclink.hxx> +#include <svtools/asynclink.hxx> #include <vos/mutex.hxx> #include <tools/debug.hxx> #include <vcl/timer.hxx> diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx index f7b49ac57eeb..043d7023508b 100755 --- a/svtools/source/control/calendar.cxx +++ b/svtools/source/control/calendar.cxx @@ -28,30 +28,14 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#ifndef _APP_HXX #include <vcl/svapp.hxx> -#endif -#ifndef _TABLE_HXX #include <tools/table.hxx> -#endif -#ifndef _HELP_HXX #include <vcl/help.hxx> -#endif -#ifndef _MENU_HXX #include <vcl/menu.hxx> -#endif -#ifndef _DECOVIEW_HXX #include <vcl/decoview.hxx> -#endif -#ifndef _FLOATWIN_HXX #include <vcl/floatwin.hxx> -#endif -#ifndef _BUTTON_HXX #include <vcl/button.hxx> -#endif -#ifndef _FIXED_HXX #include <vcl/fixed.hxx> -#endif #include <unotools/calendarwrapper.hxx> #include <unotools/localedatawrapper.hxx> #include <com/sun/star/i18n/Weekdays.hpp> @@ -61,7 +45,7 @@ #define _SV_CALENDAR_CXX #include <svtools/svtools.hrc> #include <svtools/svtdata.hxx> -#include <calendar.hxx> +#include <svtools/calendar.hxx> // ======================================================================= diff --git a/svtools/source/control/collatorres.cxx b/svtools/source/control/collatorres.cxx index 9988bfdadbb9..4514ec918b24 100755 --- a/svtools/source/control/collatorres.cxx +++ b/svtools/source/control/collatorres.cxx @@ -30,9 +30,7 @@ #include "precompiled_svtools.hxx" #include <svtools/svtdata.hxx> #include <svtools/svtools.hrc> - - -#include <collatorres.hxx> +#include <svtools/collatorres.hxx> // ------------------------------------------------------------------------- // diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index d44b18a29ae1..91c446a880a9 100755 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -30,19 +30,15 @@ #define _CTRLBOX_CXX #include <tools/debug.hxx> -#ifndef _APP_HXX #include <vcl/svapp.hxx> -#endif -#ifndef _FIELD_HXX #include <vcl/field.hxx> -#endif #include <comphelper/processfactory.hxx> #include <unotools/charclass.hxx> #include <svtools/svtdata.hxx> #include <svtools/svtools.hrc> -#include <ctrlbox.hxx> -#include <ctrltool.hxx> +#include <svtools/ctrlbox.hxx> +#include <svtools/ctrltool.hxx> #include <vcl/i18nhelp.hxx> diff --git a/svtools/source/control/ctrldll.cxx b/svtools/source/control/ctrldll.cxx deleted file mode 100644 index 2f3ff037be31..000000000000 --- a/svtools/source/control/ctrldll.cxx +++ /dev/null @@ -1,78 +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. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_svtools.hxx" - -#ifdef WIN -#include <svwin.h> - -#ifndef _SYSDEP_HXX -#include <sysdep.hxx> -#endif - -// Statische DLL-Verwaltungs-Variablen -static HINSTANCE hDLLInst = 0; // HANDLE der DLL - -/*************************************************************************** -|* -|* LibMain() -|* -|* Beschreibung Initialisierungsfunktion der DLL -|* Ersterstellung TH 05.05.93 -|* Letzte Aenderung TH 05.05.93 -|* -***************************************************************************/ - -extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR ) -{ -#ifndef WNT - if ( nHeap ) - UnlockData( 0 ); -#endif - - hDLLInst = hDLL; - - return TRUE; -} - -/*************************************************************************** -|* -|* WEP() -|* -|* Beschreibung DLL-Deinitialisierung -|* Ersterstellung TH 05.05.93 -|* Letzte Aenderung TH 05.05.93 -|* -***************************************************************************/ - -extern "C" int CALLBACK WEP( int ) -{ - return 1; -} - -#endif diff --git a/svtools/source/control/ctrltool.cxx b/svtools/source/control/ctrltool.cxx index bd965aca66a6..979a8a3a3d32 100755 --- a/svtools/source/control/ctrltool.cxx +++ b/svtools/source/control/ctrltool.cxx @@ -32,19 +32,14 @@ #include <string.h> -#ifndef TOOLS_DEBUG_HXX #include <tools/debug.hxx> -#endif #include <i18npool/mslangid.hxx> -#ifndef _VCL_WINDOW_HXX #include <vcl/window.hxx> -#endif #include <vcl/svapp.hxx> #include <vcl/wrkwin.hxx> - #include <svtools/svtools.hrc> #include <svtools/svtdata.hxx> -#include <ctrltool.hxx> +#include <svtools/ctrltool.hxx> // ======================================================================= diff --git a/svtools/source/control/filectrl.cxx b/svtools/source/control/filectrl.cxx index 14c0478f5327..3541a43effc1 100644..100755 --- a/svtools/source/control/filectrl.cxx +++ b/svtools/source/control/filectrl.cxx @@ -31,13 +31,8 @@ #define _SV_FIELCTRL_CXX #include <tools/urlobj.hxx> #include <svtools/svtdata.hxx> -#include <filectrl.hxx> -#ifndef _SV_FILECTRL_HRC +#include <svtools/filectrl.hxx> #include <filectrl.hrc> -#endif - -#ifndef GCC -#endif // ======================================================================= diff --git a/svtools/source/control/filectrl2.cxx b/svtools/source/control/filectrl2.cxx index 2a75c5d3d7e8..904b643d2ae3 100644..100755 --- a/svtools/source/control/filectrl2.cxx +++ b/svtools/source/control/filectrl2.cxx @@ -29,7 +29,7 @@ #include "precompiled_svtools.hxx" // this file contains code from filectrl.cxx which needs to be compiled with enabled exception hanling -#include <filectrl.hxx> +#include <svtools/filectrl.hxx> #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/ui/dialogs/XFilePicker.hpp> #include <vcl/unohelp.hxx> diff --git a/svtools/source/control/headbar.cxx b/svtools/source/control/headbar.cxx index 1ae223bebf06..7b1f2ad87108 100644..100755 --- a/svtools/source/control/headbar.cxx +++ b/svtools/source/control/headbar.cxx @@ -53,7 +53,7 @@ struct ImplHeadItem USHORT mnId; HeaderBarItemBits mnBits; long mnSize; - ULONG mnHelpId; + rtl::OString maHelpId; Image maImage; XubString maOutText; XubString maText; @@ -1132,13 +1132,13 @@ void HeaderBar::RequestHelp( const HelpEvent& rHEvt ) } else if ( rHEvt.GetMode() & HELPMODE_EXTENDED ) { - ULONG nHelpId = GetHelpId( nItemId ); - if ( nHelpId ) + rtl::OUString aHelpId( rtl::OStringToOUString( GetHelpId( nItemId ), RTL_TEXTENCODING_UTF8 ) ); + if ( aHelpId.getLength() ) { // Wenn eine Hilfe existiert, dann ausloesen Help* pHelp = Application::GetHelp(); if ( pHelp ) - pHelp->Start( nHelpId, this ); + pHelp->Start( aHelpId, this ); return; } } @@ -1266,7 +1266,6 @@ void HeaderBar::InsertItem( USHORT nItemId, const XubString& rText, pItem->mnId = nItemId; pItem->mnBits = nBits; pItem->mnSize = nSize; - pItem->mnHelpId = 0; pItem->maText = rText; pItem->mpUserData = 0; mpItemList->Insert( pItem, nPos ); @@ -1291,7 +1290,6 @@ void HeaderBar::InsertItem( USHORT nItemId, pItem->mnId = nItemId; pItem->mnBits = nBits; pItem->mnSize = nSize; - pItem->mnHelpId = 0; pItem->maImage = rImage; pItem->maText = rText; pItem->mpUserData = 0; @@ -1563,11 +1561,11 @@ XubString HeaderBar::GetHelpText( USHORT nItemId ) const if ( nPos != HEADERBAR_ITEM_NOTFOUND ) { ImplHeadItem* pItem = mpItemList->GetObject( nPos ); - if ( !pItem->maHelpText.Len() && pItem->mnHelpId ) + if ( !pItem->maHelpText.Len() && pItem->maHelpId.getLength() ) { Help* pHelp = Application::GetHelp(); if ( pHelp ) - pItem->maHelpText = pHelp->GetHelpText( pItem->mnHelpId, this ); + pItem->maHelpText = pHelp->GetHelpText( rtl::OStringToOUString( pItem->maHelpId, RTL_TEXTENCODING_UTF8 ), this ); } return pItem->maHelpText; @@ -1578,22 +1576,22 @@ XubString HeaderBar::GetHelpText( USHORT nItemId ) const // ----------------------------------------------------------------------- -void HeaderBar::SetHelpId( USHORT nItemId, ULONG nHelpId ) +void HeaderBar::SetHelpId( USHORT nItemId, const rtl::OString& rHelpId ) { USHORT nPos = GetItemPos( nItemId ); if ( nPos != HEADERBAR_ITEM_NOTFOUND ) - mpItemList->GetObject( nPos )->mnHelpId = nHelpId; + mpItemList->GetObject( nPos )->maHelpId = rHelpId; } // ----------------------------------------------------------------------- -ULONG HeaderBar::GetHelpId( USHORT nItemId ) const +rtl::OString HeaderBar::GetHelpId( USHORT nItemId ) const { USHORT nPos = GetItemPos( nItemId ); + rtl::OString aRet; if ( nPos != HEADERBAR_ITEM_NOTFOUND ) - return mpItemList->GetObject( nPos )->mnHelpId; - else - return 0; + aRet = mpItemList->GetObject( nPos )->maHelpId; + return aRet; } // ----------------------------------------------------------------------- diff --git a/svtools/source/control/indexentryres.cxx b/svtools/source/control/indexentryres.cxx index 5a79edab5b77..23eada244a47 100755 --- a/svtools/source/control/indexentryres.cxx +++ b/svtools/source/control/indexentryres.cxx @@ -30,9 +30,7 @@ #include "precompiled_svtools.hxx" #include <svtools/svtdata.hxx> #include <svtools/svtools.hrc> - - -#include <indexentryres.hxx> +#include <svtools/indexentryres.hxx> // ------------------------------------------------------------------------- // diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx index 02a578629039..574f2bde4e1e 100644..100755 --- a/svtools/source/control/inettbc.cxx +++ b/svtools/source/control/inettbc.cxx @@ -33,7 +33,6 @@ #include <sys/types.h> #endif - #include <svtools/inettbc.hxx> #include <com/sun/star/uno/Any.hxx> #include <com/sun/star/uno/Reference.hxx> @@ -41,27 +40,16 @@ #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/sdbc/XResultSet.hpp> #include <com/sun/star/sdbc/XRow.hpp> - -#ifndef _COM_SUN_STAR_TASK_XINTERACTIONHANDLER_HDL_ -#include <com/sun/star/task/XInteractionHandler.hdl> -#endif +#include <com/sun/star/task/XInteractionHandler.hpp> #include <com/sun/star/ucb/NumberedSortingInfo.hpp> #include <com/sun/star/ucb/XAnyCompareFactory.hpp> #include <com/sun/star/ucb/XProgressHandler.hpp> #include <com/sun/star/ucb/XContentAccess.hpp> #include <com/sun/star/ucb/XSortedDynamicResultSetFactory.hpp> - -#ifndef _UNOTOOLS_PROCESSFACTORY_HXX #include <comphelper/processfactory.hxx> -#endif - #include <vcl/toolbox.hxx> -#ifndef _VOS_THREAD_HXX //autogen #include <vos/thread.hxx> -#endif -#ifndef _VOS_MUTEX_HXX //autogen #include <vos/mutex.hxx> -#endif #include <vcl/svapp.hxx> #include <unotools/historyoptions.hxx> #include <svl/eitem.hxx> @@ -76,9 +64,8 @@ #include <ucbhelper/content.hxx> #include <unotools/localfilehelper.hxx> #include <unotools/ucbhelper.hxx> - #include "iodlg.hrc" -#include <asynclink.hxx> +#include <svtools/asynclink.hxx> #include <svl/urlfilter.hxx> #include <vector> @@ -165,7 +152,7 @@ SvtMatchContext_Impl::SvtMatchContext_Impl( SvtURLBox* pBoxP, const String& rText ) : aLink( STATIC_LINK( this, SvtMatchContext_Impl, Select_Impl ) ) , aBaseURL( pBoxP->aBaseURL ) - , aText( rText ) + , aText( rText ) , pBox( pBoxP ) , bStop( FALSE ) , bOnlyDirectories( pBoxP->bOnlyDirectories ) @@ -426,7 +413,7 @@ void SvtMatchContext_Impl::ReadFolder( const String& rURL, uno::Reference< XDynamicResultSet > xDynResultSet; ResultSetInclude eInclude = INCLUDE_FOLDERS_AND_DOCUMENTS; if ( bOnlyDirectories ) - eInclude = INCLUDE_FOLDERS_ONLY; + eInclude = INCLUDE_FOLDERS_ONLY; xDynResultSet = aCnt.createDynamicCursor( aProps, eInclude ); @@ -654,7 +641,7 @@ void SvtMatchContext_Impl::run() { // if text input is a directory, it must be part of the match list! Until then it is scanned if ( UCBContentHelper::IsFolder( aMainURL ) && aURLObject.hasFinalSlash() ) - Insert( aText, aMatch ); + Insert( aText, aMatch ); else // otherwise the parent folder will be taken aURLObject.removeSegment(); @@ -684,6 +671,7 @@ void SvtMatchContext_Impl::run() aCurObj.SetURL( *aPickList.GetObject( nPos ) ); aCurObj.SetSmartURL( aCurObj.GetURLNoPass()); aCurMainURL = aCurObj.GetMainURL( INetURLObject::NO_DECODE ); + if( eProt != INET_PROT_NOT_VALID && aCurObj.GetProtocol() != eProt ) continue; @@ -708,7 +696,7 @@ void SvtMatchContext_Impl::run() { // try if text matches the scheme String aScheme( INetURLObject::GetScheme( aCurObj.GetProtocol() ) ); - if ( aText.CompareTo( aScheme, aText.Len() ) == COMPARE_EQUAL && aText.Len() < aScheme.Len() ) + if ( aText.CompareIgnoreCaseToAscii( aScheme, aText.Len() ) == COMPARE_EQUAL && aText.Len() < aScheme.Len() ) { if( bFull ) aMatch = aCurObj.GetMainURL( INetURLObject::NO_DECODE ); @@ -727,7 +715,7 @@ void SvtMatchContext_Impl::run() aCurString.Erase( 0, aScheme.Len() ); } - if( aText.CompareTo( aCurString, aText.Len() )== COMPARE_EQUAL ) + if( aText.CompareIgnoreCaseToAscii( aCurString, aText.Len() )== COMPARE_EQUAL ) { if( bFull ) aMatch = aCurObj.GetMainURL( INetURLObject::NO_DECODE ); @@ -858,7 +846,8 @@ SvtURLBox::SvtURLBox( Window* pParent, const ResId& _rResId, INetProtocol eSmart void SvtURLBox::ImplInit() { pImp = new SvtURLBox_Impl(); - SetHelpId( SID_OPENURL ); + + SetHelpId( ".uno:OpenURL" ); EnableAutocomplete( FALSE ); SetText( String() ); @@ -1314,7 +1303,7 @@ sal_Bool SvtURLBox_Impl::TildeParsing( return sal_False; // no such user #else pPasswd = getpwnam( OUStringToOString( OUString( aUserName ), RTL_TEXTENCODING_ASCII_US ).getStr() ); - if( pPasswd ) + if( pPasswd ) aParseTilde = String::CreateFromAscii( pPasswd->pw_dir ); else return sal_False; // no such user diff --git a/svtools/source/control/makefile.mk b/svtools/source/control/makefile.mk deleted file mode 100755 index a2e622730635..000000000000 --- a/svtools/source/control/makefile.mk +++ /dev/null @@ -1,87 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=svtools -TARGET=ctrl - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svt.pmk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES=\ - ctrltool.src \ - ctrlbox.src \ - calendar.src \ - filectrl.src - -EXCEPTIONSFILES=\ - $(SLO)$/svxbox.obj \ - $(SLO)$/filectrl2.obj \ - $(SLO)$/roadmap.obj \ - $(SLO)$/scriptedtext.obj\ - $(SLO)$/fmtfield.obj \ - $(SLO)$/inettbc.obj \ - $(SLO)$/valueacc.obj \ - $(SLO)$/toolbarmenu.obj \ - $(SLO)$/toolbarmenuacc.obj - -SLOFILES=\ - $(EXCEPTIONSFILES) \ - $(SLO)$/asynclink.obj \ - $(SLO)$/urlcontrol.obj \ - $(SLO)$/fileurlbox.obj \ - $(SLO)$/ctrltool.obj \ - $(SLO)$/ctrlbox.obj \ - $(SLO)$/stdctrl.obj \ - $(SLO)$/stdmenu.obj \ - $(SLO)$/valueset.obj \ - $(SLO)$/tabbar.obj \ - $(SLO)$/headbar.obj \ - $(SLO)$/prgsbar.obj \ - $(SLO)$/ruler.obj \ - $(SLO)$/taskbar.obj \ - $(SLO)$/taskbox.obj \ - $(SLO)$/taskstat.obj \ - $(SLO)$/taskmisc.obj \ - $(SLO)$/calendar.obj \ - $(SLO)$/filectrl.obj \ - $(SLO)$/scrwin.obj \ - $(SLO)$/collatorres.obj \ - $(SLO)$/indexentryres.obj \ - $(SLO)$/hyperlabel.obj \ - $(SLO)$/fixedhyper.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - diff --git a/svtools/source/control/prgsbar.cxx b/svtools/source/control/prgsbar.cxx index b67202e9c1fc..bb57d043b11d 100644..100755 --- a/svtools/source/control/prgsbar.cxx +++ b/svtools/source/control/prgsbar.cxx @@ -30,13 +30,9 @@ #define _SV_PRGSBAR_CXX -#ifndef _TOOLS_DEBUGS_HXX #include <tools/debug.hxx> -#endif -#ifndef _VCL_STATUS_HXX #include <vcl/status.hxx> -#endif -#include <prgsbar.hxx> +#include <svtools/prgsbar.hxx> // ======================================================================= diff --git a/svtools/source/control/roadmap.cxx b/svtools/source/control/roadmap.cxx index 7cf88816199f..f4c04a7000af 100644..100755 --- a/svtools/source/control/roadmap.cxx +++ b/svtools/source/control/roadmap.cxx @@ -27,23 +27,16 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#include <roadmap.hxx> +#include <svtools/roadmap.hxx> #ifndef _STRING_HXX #define _STRING_HXX #endif -#ifndef __SGI_STL_VECTOR #include <vector> -#endif - #include <algorithm> #include <vcl/bitmap.hxx> #include <tools/color.hxx> - -#ifndef _RTL_USTRING_HXX_ -#include <rtl/OUString.hxx> -#endif #include <memory> #define ROADMAP_INDENT_X 4 diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx index 6fcbd92597ba..bdbcd253c198 100644..100755 --- a/svtools/source/control/ruler.cxx +++ b/svtools/source/control/ruler.cxx @@ -32,11 +32,10 @@ #include <tools/debug.hxx> #include <vcl/svapp.hxx> #include <tools/poly.hxx> - #include <vcl/i18nhelp.hxx> #define _SV_RULER_CXX -#include <ruler.hxx> +#include <svtools/ruler.hxx> // ======================================================================= @@ -468,6 +467,7 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long nStart, long nCenter ) BOOL bNoTicks = FALSE; // Groessenvorberechnung + // Sizes calculation BOOL bVertRight = FALSE; if ( mnWinStyle & WB_HORZ ) nTickWidth = aPixSize.Width(); @@ -486,19 +486,21 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long nStart, long nCenter ) } long nMaxWidth = maVirDev.PixelToLogic( Size( mpData->nPageWidth, 0 ), maMapMode ).Width(); if ( nMaxWidth < 0 ) - nMaxWidth *= -1; + nMaxWidth = -nMaxWidth; nMaxWidth /= aImplRulerUnitTab[mnUnitIndex].nTickUnit; UniString aNumStr( UniString::CreateFromInt32( nMaxWidth ) ); long nTxtWidth = GetTextWidth( aNumStr ); - if ( (nTxtWidth*2) > nTickWidth ) + + const long nTextOff = 4; + if ( nTickWidth < nTxtWidth+nTextOff ) { + // Calculate the scale of the ruler long nMulti = 1; long nOrgTick3 = nTick3; - long nTextOff = 2; while ( nTickWidth < nTxtWidth+nTextOff ) { long nOldMulti = nMulti; - if ( !nTickWidth ) + if ( !nTickWidth ) //If nTickWidth equals 0 nMulti *= 10; else if ( nMulti < 10 ) nMulti++; @@ -516,8 +518,7 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long nStart, long nCenter ) bNoTicks = TRUE; break; } - if ( nMulti >= 100 ) - nTextOff = 4; + nTick3 = nOrgTick3 * nMulti; aPixSize = maVirDev.LogicToPixel( Size( nTick3, nTick3 ), maMapMode ); if ( mnWinStyle & WB_HORZ ) @@ -541,7 +542,7 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long nStart, long nCenter ) { if ( nStart > nMin ) { - // Nur 0 malen, wenn Margin1 nicht gleich dem NullPunkt ist + // 0 is only painted when Margin1 is not equal to zero if ( (mpData->nMargin1Style & RULER_STYLE_INVISIBLE) || (mpData->nMargin1 != 0) ) { aNumStr = (sal_Unicode)'0'; @@ -564,7 +565,7 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long nStart, long nCenter ) else n = aPixSize.Height(); - // Tick3 - Ausgabe (Text) + // Tick3 - Output (Text) if ( !(nTick % nTick3) ) { aNumStr = UniString::CreateFromInt32( nTick / aImplRulerUnitTab[mnUnitIndex].nTickUnit ); @@ -573,7 +574,9 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long nStart, long nCenter ) nX = nStart+n; //different orientation needs a different starting position nY = bVertRight ? nCenter+nTxtHeight2 : nCenter-nTxtHeight2; - if ( nX < nMax ) + + // Check if we can display full number + if ( nX < (nMax-nTxtWidth2) ) { if ( mnWinStyle & WB_HORZ ) nX -= nTxtWidth2; @@ -582,7 +585,7 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long nStart, long nCenter ) ImplVDrawText( nX, nY, aNumStr ); } nX = nStart-n; - if ( nX > nMin ) + if ( nX > (nMin+nTxtWidth2) ) { if ( mnWinStyle & WB_HORZ ) nX -= nTxtWidth2; @@ -591,7 +594,7 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long nStart, long nCenter ) ImplVDrawText( nX, nY, aNumStr ); } } - // Tick/Tick2 - Ausgabe (Striche) + // Tick/Tick2 - Output (Strokes) else { if ( !(nTick % aImplRulerUnitTab[mnUnitIndex].nTick2) ) @@ -1258,7 +1261,7 @@ void Ruler::ImplFormat() Size aVirDevSize; BOOL b3DLook = !(rStyleSettings.GetOptions() & STYLE_OPTION_MONO); - // VirtualDevice initialisieren + // VirtualDevice initialize if ( mnWinStyle & WB_HORZ ) { aVirDevSize.Width() = mnVirWidth; @@ -1387,15 +1390,15 @@ void Ruler::ImplFormat() if ( nP2 < nVirRight ) nMax--; - // Beschriftung ausgeben + // Draw captions ImplDrawTicks( nMin, nMax, nStart, nCenter ); } - // Spalten ausgeben + // Draw borders if ( mpData->pBorders ) ImplDrawBorders( nVirLeft, nP2, nVirTop, nVirBottom ); - // Einzuege ausgeben + // Draw indents if ( mpData->pIndents ) ImplDrawIndents( nVirLeft, nP2, nVirTop-1, nVirBottom+1 ); @@ -2888,7 +2891,7 @@ void Ruler::SetMargin2( long nPos, USHORT nMarginStyle ) void Ruler::SetLines( USHORT n, const RulerLine* pLineAry ) { - // Testen, ob sich was geaendert hat + // To determine if what has changed if ( mpData->nLines == n ) { USHORT i = n; @@ -2907,18 +2910,18 @@ void Ruler::SetLines( USHORT n, const RulerLine* pLineAry ) return; } - // Neue Werte setzen und neu ausgeben + // New values and new share issue BOOL bMustUpdate; if ( IsReallyVisible() && IsUpdateMode() ) bMustUpdate = TRUE; else bMustUpdate = FALSE; - // Alte Linien loeschen + // Delete old lines if ( bMustUpdate ) ImplInvertLines(); - // Neue Daten setzen + // New data set if ( !n || !pLineAry ) { if ( !mpData->pLines ) diff --git a/svtools/source/control/scriptedtext.cxx b/svtools/source/control/scriptedtext.cxx index 2067e6d245f0..191dedfabe98 100644..100755 --- a/svtools/source/control/scriptedtext.cxx +++ b/svtools/source/control/scriptedtext.cxx @@ -27,11 +27,8 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#include "scriptedtext.hxx" - -#ifndef __SGI_STL_VECTOR +#include <svtools/scriptedtext.hxx> #include <vector> -#endif #include <rtl/ustring.hxx> #include <vcl/outdev.hxx> #include <vcl/font.hxx> diff --git a/svtools/source/control/scrwin.cxx b/svtools/source/control/scrwin.cxx index eb47d2c780ad..364c938f3f65 100644..100755 --- a/svtools/source/control/scrwin.cxx +++ b/svtools/source/control/scrwin.cxx @@ -29,7 +29,7 @@ #include "precompiled_svtools.hxx" #define _SVT_SCRWIN_CXX -#include <scrwin.hxx> +#include <svtools/scrwin.hxx> //=================================================================== diff --git a/svtools/source/control/stdmenu.cxx b/svtools/source/control/stdmenu.cxx index 95b6d3fbd5c6..9df32d74fc59 100644..100755 --- a/svtools/source/control/stdmenu.cxx +++ b/svtools/source/control/stdmenu.cxx @@ -29,15 +29,10 @@ #include "precompiled_svtools.hxx" #include <string.h> - -#ifndef _APP_HXX #include <vcl/svapp.hxx> -#endif - #include <vcl/i18nhelp.hxx> - -#include <ctrltool.hxx> -#include <stdmenu.hxx> +#include <svtools/ctrltool.hxx> +#include <svtools/stdmenu.hxx> // ======================================================================== diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx index c4896ba8b812..0c2800246061 100644..100755 --- a/svtools/source/control/tabbar.cxx +++ b/svtools/source/control/tabbar.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#include "tabbar.hxx" +#include <svtools/tabbar.hxx> #include <tools/time.hxx> #include <tools/debug.hxx> #include <tools/poly.hxx> @@ -39,6 +39,8 @@ #include <vcl/edit.hxx> #include "svtaccessiblefactory.hxx" +#include <limits> + // ======================================================================= #define TABBAR_OFFSET_X 7 @@ -58,10 +60,14 @@ struct ImplTabBarItem XubString maHelpText; Rectangle maRect; long mnWidth; - ULONG mnHelpId; + rtl::OString maHelpId; BOOL mbShort; BOOL mbSelect; BOOL mbEnable; + Color maTabBgColor; + bool IsDefaultTabBgColor() const { return maTabBgColor == Color(COL_AUTO) ? TRUE : FALSE; }; + Color maTabTextColor; + bool IsDefaultTabTextColor() const { return maTabTextColor == Color(COL_AUTO) ? TRUE : FALSE; }; ImplTabBarItem( USHORT nItemId, const XubString& rText, TabBarPageBits nPageBits ) : @@ -70,10 +76,11 @@ struct ImplTabBarItem mnId = nItemId; mnBits = nPageBits; mnWidth = 0; - mnHelpId = 0; mbShort = FALSE; mbSelect = FALSE; mbEnable = TRUE; + maTabBgColor = Color( COL_AUTO ); + maTabTextColor = Color( COL_AUTO ); } }; @@ -348,6 +355,9 @@ struct TabBar_Impl // ======================================================================= +const sal_uInt16 TabBar::APPEND = ::std::numeric_limits<sal_uInt16>::max(); +const sal_uInt16 TabBar::PAGE_NOT_FOUND = ::std::numeric_limits<sal_uInt16>::max(); + void TabBar::ImplInit( WinBits nWinStyle ) { mpItemList = new ImplTabBarList; @@ -1046,7 +1056,8 @@ void TabBar::Paint( const Rectangle& ) // Font selektieren Font aFont = GetFont(); Font aLightFont = aFont; - aLightFont.SetWeight( WEIGHT_LIGHT ); + //aLightFont.SetWeight( WEIGHT_LIGHT ); //TODO Make font weight light on custom color only? + aLightFont.SetWeight( WEIGHT_NORMAL ); // #i36013# exclude push buttons from painting area Rectangle aClipRect( Point( mnOffX, 0 ), Point( mnLastOffX, GetOutputHeightPixel() - 1 ) ); @@ -1120,15 +1131,23 @@ void TabBar::Paint( const Rectangle& ) SetFont( aLightFont ); // Je nach Status die richtige FillInBrush setzen + // Set the correct FillInBrush depending upon status if ( pItem->mbSelect || (pItem->mnId == mnCurPageId) ) { + // Currently selected Tab SetFillColor( aSelectColor ); SetTextColor( aSelectTextColor ); } else { - SetFillColor( aFaceColor ); - SetTextColor( aFaceTextColor ); + if ( !pItem->IsDefaultTabBgColor() && !rStyleSettings.GetHighContrastMode() ) + { + SetFillColor( pItem->maTabBgColor ); + SetTextColor( pItem->maTabTextColor ); + } else { + SetFillColor( aFaceColor ); + SetTextColor( aFaceTextColor ); + } } // Muss Font Kursiv geschaltet werden @@ -1160,21 +1179,38 @@ void TabBar::Paint( const Rectangle& ) long nTextHeight = GetTextHeight(); Point aTxtPos( aRect.Left()+(aRectSize.Width()-nTextWidth)/2, (aRectSize.Height()-nTextHeight)/2 ); - if ( !pItem->mbEnable ) - DrawCtrlText( aTxtPos, aText, 0, STRING_LEN, (TEXT_DRAW_DISABLE | TEXT_DRAW_MNEMONIC) ); - else - DrawText( aTxtPos, aText ); - + if ( pItem->IsDefaultTabBgColor() || (!pItem->mbSelect) ) + { + if ( !pItem->mbEnable ) + DrawCtrlText( aTxtPos, aText, 0, STRING_LEN, (TEXT_DRAW_DISABLE | TEXT_DRAW_MNEMONIC) ); + else + DrawText( aTxtPos, aText ); + } // Jetzt im Inhalt den 3D-Effekt ausgeben aPos0.X()++; aPos1.X()++; aPos2.X()--; aPos3.X()--; - SetLineColor( rStyleSettings.GetLightColor() ); + + // If this is the current tab, draw the left inner shadow the default color, + // otherwise make it the same as the custom background color + if ( pItem->mbSelect || (pItem->mnId == mnCurPageId) ) { + SetLineColor( rStyleSettings.GetLightColor() ); + } else { + if ( !pItem->IsDefaultTabBgColor() && ! rStyleSettings.GetHighContrastMode() ) + { + SetLineColor( pItem->maTabBgColor ); + } else { + SetLineColor( rStyleSettings.GetLightColor() ); + } + } + // Draw the left side of the tab DrawLine( aPos0, aPos1 ); if ( !pItem->mbSelect && (pItem->mnId != mnCurPageId) ) { + // Draw the top inner shadow + // ToDo: Change from this static color to tab custom bg color DrawLine( Point( aPos0.X(), aPos0.Y()+1 ), Point( aPos3.X(), aPos3.Y()+1 ) ); } @@ -1184,8 +1220,27 @@ void TabBar::Paint( const Rectangle& ) aPos1.X()--; aPos1.Y()--; aPos2.Y()--; + if ( !pItem->IsDefaultTabBgColor() && ( pItem->mbSelect || (pItem->mnId == mnCurPageId) ) ) + { + SetLineColor( pItem->maTabBgColor ); + DrawLine( Point(aPos1.X()-1, aPos1.Y()-1), Point(aPos2.X(), aPos2.Y()-1) ); + } DrawLine( aPos1, aPos2 ); + // draw a small 2px sliver of the original background color at the bottom of the selected tab + + if ( !pItem->IsDefaultTabBgColor() ) + { + if ( pItem->mbSelect || (pItem->mnId == mnCurPageId) || rStyleSettings.GetHighContrastMode() ) { + SetLineColor( pItem->maTabBgColor ); + DrawLine( Point(aPos1.X()-1, aPos1.Y()-1), Point(aPos2.X(), aPos2.Y()-1) ); + if ( !pItem->mbEnable ) + DrawCtrlText( aTxtPos, aText, 0, STRING_LEN, (TEXT_DRAW_DISABLE | TEXT_DRAW_MNEMONIC) ); + else + DrawText( aTxtPos, aText ); + } + } + // Da etwas uebermalt werden konnte, muessen wir die Polygon- // umrandung nocheinmal ausgeben SetLineColor( rStyleSettings.GetDarkShadowColor() ); @@ -1338,13 +1393,13 @@ void TabBar::RequestHelp( const HelpEvent& rHEvt ) } else if ( rHEvt.GetMode() & HELPMODE_EXTENDED ) { - ULONG nHelpId = GetHelpId( nItemId ); - if ( nHelpId ) + rtl::OUString aHelpId( rtl::OStringToOUString( GetHelpId( nItemId ), RTL_TEXTENCODING_UTF8 ) ); + if ( aHelpId.getLength() ) { // Wenn eine Hilfe existiert, dann ausloesen Help* pHelp = Application::GetHelp(); if ( pHelp ) - pHelp->Start( nHelpId, this ); + pHelp->Start( aHelpId, this ); return; } } @@ -1540,7 +1595,7 @@ void TabBar::InsertPage( USHORT nPageId, const XubString& rText, TabBarPageBits nBits, USHORT nPos ) { DBG_ASSERT( nPageId, "TabBar::InsertPage(): PageId == 0" ); - DBG_ASSERT( GetPagePos( nPageId ) == TABBAR_PAGE_NOTFOUND, + DBG_ASSERT( GetPagePos( nPageId ) == PAGE_NOT_FOUND, "TabBar::InsertPage(): PageId already exists" ); DBG_ASSERT( nBits <= TPB_SPECIAL, "TabBar::InsertPage(): nBits is wrong" ); @@ -1562,12 +1617,47 @@ void TabBar::InsertPage( USHORT nPageId, const XubString& rText, // ----------------------------------------------------------------------- +Color TabBar::GetTabBgColor( USHORT nPageId ) const +{ + USHORT nPos = GetPagePos( nPageId ); + + if ( nPos != PAGE_NOT_FOUND ) + return mpItemList->GetObject( nPos )->maTabBgColor; + else + return Color( COL_AUTO ); +} + +void TabBar::SetTabBgColor( USHORT nPageId, const Color& aTabBgColor ) +{ + USHORT nPos = GetPagePos( nPageId ); + ImplTabBarItem* pItem; + if ( nPos != PAGE_NOT_FOUND ) + { + pItem = mpItemList->GetObject( nPos ); + if ( aTabBgColor != Color( COL_AUTO ) ) + { + pItem->maTabBgColor = aTabBgColor; + if ( aTabBgColor.GetLuminance() <= 128 ) //Do not use aTabBgColor.IsDark(), because that threshold is way too low... + pItem->maTabTextColor = Color( COL_WHITE ); + else + pItem->maTabTextColor = Color( COL_BLACK ); + } + else + { + pItem->maTabBgColor = Color( COL_AUTO ); + pItem->maTabTextColor = Color( COL_AUTO ); + } + } +} + +// ----------------------------------------------------------------------- + void TabBar::RemovePage( USHORT nPageId ) { USHORT nPos = GetPagePos( nPageId ); // Existiert Item - if ( nPos != TABBAR_PAGE_NOTFOUND ) + if ( nPos != PAGE_NOT_FOUND ) { if ( mnCurPageId == nPageId ) mnCurPageId = 0; @@ -1602,7 +1692,7 @@ void TabBar::MovePage( USHORT nPageId, USHORT nNewPos ) return; // Existiert Item - if ( nPos != TABBAR_PAGE_NOTFOUND ) + if ( nPos != PAGE_NOT_FOUND ) { // TabBar-Item in der Liste verschieben ImplTabBarItem* pItem = mpItemList->Remove( nPos ); @@ -1640,7 +1730,7 @@ void TabBar::Clear() if ( IsReallyVisible() && IsUpdateMode() ) Invalidate(); - CallEventListeners( VCLEVENT_TABBAR_PAGEREMOVED, (void*) TABBAR_PAGE_NOTFOUND ); + CallEventListeners( VCLEVENT_TABBAR_PAGEREMOVED, (void*) PAGE_NOT_FOUND ); } // ----------------------------------------------------------------------- @@ -1649,7 +1739,7 @@ void TabBar::EnablePage( USHORT nPageId, BOOL bEnable ) { USHORT nPos = GetPagePos( nPageId ); - if ( nPos != TABBAR_PAGE_NOTFOUND ) + if ( nPos != PAGE_NOT_FOUND ) { ImplTabBarItem* pItem = mpItemList->GetObject( nPos ); @@ -1672,7 +1762,7 @@ BOOL TabBar::IsPageEnabled( USHORT nPageId ) const { USHORT nPos = GetPagePos( nPageId ); - if ( nPos != TABBAR_PAGE_NOTFOUND ) + if ( nPos != PAGE_NOT_FOUND ) return mpItemList->GetObject( nPos )->mbEnable; else return FALSE; @@ -1684,7 +1774,7 @@ void TabBar::SetPageBits( USHORT nPageId, TabBarPageBits nBits ) { USHORT nPos = GetPagePos( nPageId ); - if ( nPos != TABBAR_PAGE_NOTFOUND ) + if ( nPos != PAGE_NOT_FOUND ) { ImplTabBarItem* pItem = mpItemList->GetObject( nPos ); @@ -1705,7 +1795,7 @@ TabBarPageBits TabBar::GetPageBits( USHORT nPageId ) const { USHORT nPos = GetPagePos( nPageId ); - if ( nPos != TABBAR_PAGE_NOTFOUND ) + if ( nPos != PAGE_NOT_FOUND ) return mpItemList->GetObject( nPos )->mnBits; else return FALSE; @@ -1742,7 +1832,7 @@ USHORT TabBar::GetPagePos( USHORT nPageId ) const pItem = mpItemList->Next(); } - return TABBAR_PAGE_NOTFOUND; + return PAGE_NOT_FOUND; } // ----------------------------------------------------------------------- @@ -1767,7 +1857,7 @@ Rectangle TabBar::GetPageRect( USHORT nPageId ) const { USHORT nPos = GetPagePos( nPageId ); - if ( nPos != TABBAR_PAGE_NOTFOUND ) + if ( nPos != PAGE_NOT_FOUND ) return mpItemList->GetObject( nPos )->maRect; else return Rectangle(); @@ -1780,7 +1870,7 @@ void TabBar::SetCurPageId( USHORT nPageId ) USHORT nPos = GetPagePos( nPageId ); // Wenn Item nicht existiert, dann nichts machen - if ( nPos != TABBAR_PAGE_NOTFOUND ) + if ( nPos != PAGE_NOT_FOUND ) { // Wenn sich aktuelle Page nicht geaendert hat, dann muessen wir // jetzt nichts mehr machen @@ -1872,7 +1962,7 @@ void TabBar::MakeVisible( USHORT nPageId ) USHORT nPos = GetPagePos( nPageId ); // Wenn Item nicht existiert, dann nichts machen - if ( nPos != TABBAR_PAGE_NOTFOUND ) + if ( nPos != PAGE_NOT_FOUND ) { if ( nPos < mnFirstPos ) SetFirstPageId( nPageId ); @@ -1921,7 +2011,7 @@ void TabBar::SetFirstPageId( USHORT nPageId ) USHORT nPos = GetPagePos( nPageId ); // Wenn Item nicht existiert, dann FALSE zurueckgeben - if ( nPos != TABBAR_PAGE_NOTFOUND ) + if ( nPos != PAGE_NOT_FOUND ) { if ( nPos != mnFirstPos ) { @@ -1955,7 +2045,7 @@ void TabBar::SelectPage( USHORT nPageId, BOOL bSelect ) { USHORT nPos = GetPagePos( nPageId ); - if ( nPos != TABBAR_PAGE_NOTFOUND ) + if ( nPos != PAGE_NOT_FOUND ) { ImplTabBarItem* pItem = mpItemList->GetObject( nPos ); @@ -2036,7 +2126,7 @@ USHORT TabBar::GetSelectPageCount() const BOOL TabBar::IsPageSelected( USHORT nPageId ) const { USHORT nPos = GetPagePos( nPageId ); - if ( nPos != TABBAR_PAGE_NOTFOUND ) + if ( nPos != PAGE_NOT_FOUND ) return mpItemList->GetObject( nPos )->mbSelect; else return FALSE; @@ -2047,7 +2137,7 @@ BOOL TabBar::IsPageSelected( USHORT nPageId ) const BOOL TabBar::StartEditMode( USHORT nPageId ) { USHORT nPos = GetPagePos( nPageId ); - if ( mpEdit || (nPos == TABBAR_PAGE_NOTFOUND) || (mnLastOffX < 8) ) + if ( mpEdit || (nPos == PAGE_NOT_FOUND) || (mnLastOffX < 8) ) return FALSE; mnEditId = nPageId; @@ -2268,7 +2358,7 @@ void TabBar::SetSelectTextColor( const Color& rColor ) void TabBar::SetPageText( USHORT nPageId, const XubString& rText ) { USHORT nPos = GetPagePos( nPageId ); - if ( nPos != TABBAR_PAGE_NOTFOUND ) + if ( nPos != PAGE_NOT_FOUND ) { mpItemList->GetObject( nPos )->maText = rText; mbSizeFormat = TRUE; @@ -2286,7 +2376,7 @@ void TabBar::SetPageText( USHORT nPageId, const XubString& rText ) XubString TabBar::GetPageText( USHORT nPageId ) const { USHORT nPos = GetPagePos( nPageId ); - if ( nPos != TABBAR_PAGE_NOTFOUND ) + if ( nPos != PAGE_NOT_FOUND ) return mpItemList->GetObject( nPos )->maText; else return XubString(); @@ -2297,7 +2387,7 @@ XubString TabBar::GetPageText( USHORT nPageId ) const void TabBar::SetHelpText( USHORT nPageId, const XubString& rText ) { USHORT nPos = GetPagePos( nPageId ); - if ( nPos != TABBAR_PAGE_NOTFOUND ) + if ( nPos != PAGE_NOT_FOUND ) mpItemList->GetObject( nPos )->maHelpText = rText; } @@ -2306,14 +2396,14 @@ void TabBar::SetHelpText( USHORT nPageId, const XubString& rText ) XubString TabBar::GetHelpText( USHORT nPageId ) const { USHORT nPos = GetPagePos( nPageId ); - if ( nPos != TABBAR_PAGE_NOTFOUND ) + if ( nPos != PAGE_NOT_FOUND ) { ImplTabBarItem* pItem = mpItemList->GetObject( nPos ); - if ( !pItem->maHelpText.Len() && pItem->mnHelpId ) + if ( !pItem->maHelpText.Len() && pItem->maHelpId.getLength() ) { Help* pHelp = Application::GetHelp(); if ( pHelp ) - pItem->maHelpText = pHelp->GetHelpText( pItem->mnHelpId, this ); + pItem->maHelpText = pHelp->GetHelpText( rtl::OStringToOUString( pItem->maHelpId, RTL_TEXTENCODING_UTF8 ), this ); } return pItem->maHelpText; @@ -2324,22 +2414,22 @@ XubString TabBar::GetHelpText( USHORT nPageId ) const // ----------------------------------------------------------------------- -void TabBar::SetHelpId( USHORT nPageId, ULONG nHelpId ) +void TabBar::SetHelpId( USHORT nPageId, const rtl::OString& rHelpId ) { USHORT nPos = GetPagePos( nPageId ); - if ( nPos != TABBAR_PAGE_NOTFOUND ) - mpItemList->GetObject( nPos )->mnHelpId = nHelpId; + if ( nPos != PAGE_NOT_FOUND ) + mpItemList->GetObject( nPos )->maHelpId = rHelpId; } // ----------------------------------------------------------------------- -ULONG TabBar::GetHelpId( USHORT nPageId ) const +rtl::OString TabBar::GetHelpId( USHORT nPageId ) const { USHORT nPos = GetPagePos( nPageId ); - if ( nPos != TABBAR_PAGE_NOTFOUND ) - return mpItemList->GetObject( nPos )->mnHelpId; - else - return 0; + rtl::OString aRet; + if ( nPos != PAGE_NOT_FOUND ) + aRet = mpItemList->GetObject( nPos )->maHelpId; + return aRet; } // ----------------------------------------------------------------------- @@ -2483,9 +2573,12 @@ USHORT TabBar::ShowDropPos( const Point& rPos ) nX--; else nX++; + if ( !pItem->IsDefaultTabBgColor() && !pItem->mbSelect) + SetLineColor( pItem->maTabTextColor ); DrawLine( Point( nX, nY ), Point( nX, nY ) ); DrawLine( Point( nX+1, nY-1 ), Point( nX+1, nY+1 ) ); DrawLine( Point( nX+2, nY-2 ), Point( nX+2, nY+2 ) ); + SetLineColor( aBlackColor ); } if ( (mnDropPos > 0) && (mnDropPos < nItemCount+1) ) { @@ -2493,6 +2586,8 @@ USHORT TabBar::ShowDropPos( const Point& rPos ) nX = pItem->maRect.Right()-TABBAR_OFFSET_X; if ( mnDropPos == nCurPos ) nX++; + if ( !pItem->IsDefaultTabBgColor() && !pItem->mbSelect) + SetLineColor( pItem->maTabTextColor ); DrawLine( Point( nX, nY ), Point( nX, nY ) ); DrawLine( Point( nX-1, nY-1 ), Point( nX-1, nY+1 ) ); DrawLine( Point( nX-2, nY-2 ), Point( nX-2, nY+2 ) ); diff --git a/svtools/source/control/taskbar.cxx b/svtools/source/control/taskbar.cxx index e84c934ef0d8..232727951281 100644..100755 --- a/svtools/source/control/taskbar.cxx +++ b/svtools/source/control/taskbar.cxx @@ -30,16 +30,11 @@ #define _TASKBAR_CXX -#ifndef _TOOLS_LIST_HXX #include <tools/list.hxx> -#endif #include <tools/debug.hxx> - -#ifndef _VCL_FLOATWIN_HXX #include <vcl/floatwin.hxx> -#endif -#include <taskbar.hxx> +#include <svtools/taskbar.hxx> // ======================================================================= diff --git a/svtools/source/control/taskbox.cxx b/svtools/source/control/taskbox.cxx index 8e5ff6de8def..3f05d077b7c5 100644..100755 --- a/svtools/source/control/taskbox.cxx +++ b/svtools/source/control/taskbox.cxx @@ -30,14 +30,11 @@ #define _TASKBAR_CXX -#ifndef _TOOLS_LIST_HXX #include <tools/list.hxx> -#endif #include <tools/debug.hxx> #include <vcl/image.hxx> #include <vcl/help.hxx> - -#include <taskbar.hxx> +#include <svtools/taskbar.hxx> // ======================================================================= diff --git a/svtools/source/control/taskmisc.cxx b/svtools/source/control/taskmisc.cxx index 4c9fda217258..62eaf020c8f0 100644..100755 --- a/svtools/source/control/taskmisc.cxx +++ b/svtools/source/control/taskmisc.cxx @@ -30,13 +30,10 @@ #define _TASKBAR_CXX -#ifndef _TOOLS_LIST_HXX #include <tools/list.hxx> -#endif #include <tools/debug.hxx> #include <vcl/help.hxx> - -#include <taskbar.hxx> +#include <svtools/taskbar.hxx> // ======================================================================= diff --git a/svtools/source/control/taskstat.cxx b/svtools/source/control/taskstat.cxx index 2fdab63be37f..2e1cffcaac10 100644..100755 --- a/svtools/source/control/taskstat.cxx +++ b/svtools/source/control/taskstat.cxx @@ -30,18 +30,15 @@ #define _TASKBAR_CXX -#ifndef _TOOLS_LIST_HXX #include <tools/list.hxx> -#endif #include <tools/debug.hxx> #include <tools/date.hxx> #include <vcl/image.hxx> #include <vcl/help.hxx> #include <vcl/svapp.hxx> #include <unotools/calendarwrapper.hxx> - #include <unotools/syslocale.hxx> -#include <taskbar.hxx> +#include <svtools/taskbar.hxx> // ======================================================================= @@ -517,13 +514,13 @@ void TaskStatusBar::RequestHelp( const HelpEvent& rHEvt ) { if ( pItem ) { - ULONG nHelpId = pItem->maItem.GetHelpId(); - if ( nHelpId ) + rtl::OUString aHelpId( rtl::OStringToOUString( pItem->maItem.GetHelpId(), RTL_TEXTENCODING_UTF8 ) ); + if ( aHelpId.getLength() ) { // Wenn eine Hilfe existiert, dann ausloesen Help* pHelp = Application::GetHelp(); if ( pHelp ) - pHelp->Start( nHelpId, this ); + pHelp->Start( aHelpId, this ); return; } } diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx index f07ebd7fe8cd..f0bd192fc02c 100644 --- a/svtools/source/control/toolbarmenu.cxx +++ b/svtools/source/control/toolbarmenu.cxx @@ -481,6 +481,9 @@ void ToolbarMenu::implInit(const Reference< XFrame >& rFrame) { mpImpl = new ToolbarMenu_Impl( *this, rFrame ); + const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); + SetControlBackground( rStyleSettings.GetMenuColor() ); + initWindow(); Window* pWindow = GetTopMostParentSystemWindow( this ); @@ -638,8 +641,6 @@ void ToolbarMenu::initWindow() { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); - SetControlBackground( GetSettings().GetStyleSettings().GetFaceGradientColor() ); - SetPointFont( rStyleSettings.GetMenuFont() ); SetBackground( Wallpaper( GetControlBackground() ) ); SetTextColor( rStyleSettings.GetMenuTextColor() ); @@ -919,7 +920,7 @@ void ToolbarMenu::implHighlightEntry( int nHighlightEntry, bool bHighlight ) IntersectClipRegion( Rectangle( Point( nX, nY ), Size( aSz.Width(), pEntry->maSize.Height() ) ) ); Rectangle aCtrlRect( Point( nX, 0 ), Size( aPxSize.Width()-nX, aPxSize.Height() ) ); DrawNativeControl( CTRL_MENU_POPUP, PART_ENTIRE_CONTROL, - Region( aCtrlRect ), + aCtrlRect, CTRL_STATE_ENABLED, ImplControlValue(), OUString() ); @@ -927,7 +928,7 @@ void ToolbarMenu::implHighlightEntry( int nHighlightEntry, bool bHighlight ) { bDrawItemRect = false; if( FALSE == DrawNativeControl( CTRL_MENU_POPUP, PART_MENU_ITEM, - Region( aItemRect ), + aItemRect, CTRL_STATE_SELECTED | ( pEntry->mbEnabled? CTRL_STATE_ENABLED: 0 ), ImplControlValue(), OUString() ) ) @@ -1311,13 +1312,12 @@ static void ImplPaintCheckBackground( Window* i_pWindow, const Rectangle& i_rRec if( i_pWindow->IsNativeControlSupported( CTRL_TOOLBAR, PART_BUTTON ) ) { ImplControlValue aControlValue; - Region aCtrlRegion( i_rRect ); ControlState nState = CTRL_STATE_PRESSED | CTRL_STATE_ENABLED; aControlValue.setTristateVal( BUTTONVALUE_ON ); bNativeOk = i_pWindow->DrawNativeControl( CTRL_TOOLBAR, PART_BUTTON, - aCtrlRegion, nState, aControlValue, + i_rRect, nState, aControlValue, rtl::OUString() ); } @@ -1334,10 +1334,10 @@ static long ImplGetNativeCheckAndRadioSize( Window* pWin, long& rCheckHeight, lo rMaxWidth = rCheckHeight = rRadioHeight = 0; ImplControlValue aVal; - Region aNativeBounds; - Region aNativeContent; + Rectangle aNativeBounds; + Rectangle aNativeContent; Point tmp( 0, 0 ); - Region aCtrlRegion( Rectangle( tmp, Size( 100, 15 ) ) ); + Rectangle aCtrlRegion( tmp, Size( 100, 15 ) ); if( pWin->IsNativeControlSupported( CTRL_MENU_POPUP, PART_MENU_ITEM_CHECK_MARK ) ) { if( pWin->GetNativeControlRegion( ControlType(CTRL_MENU_POPUP), @@ -1350,8 +1350,8 @@ static long ImplGetNativeCheckAndRadioSize( Window* pWin, long& rCheckHeight, lo aNativeContent ) ) { - rCheckHeight = aNativeBounds.GetBoundRect().GetHeight(); - rMaxWidth = aNativeContent.GetBoundRect().GetWidth(); + rCheckHeight = aNativeBounds.GetHeight(); + rMaxWidth = aNativeContent.GetWidth(); } } if( pWin->IsNativeControlSupported( CTRL_MENU_POPUP, PART_MENU_ITEM_RADIO_MARK ) ) @@ -1366,8 +1366,8 @@ static long ImplGetNativeCheckAndRadioSize( Window* pWin, long& rCheckHeight, lo aNativeContent ) ) { - rRadioHeight = aNativeBounds.GetBoundRect().GetHeight(); - rMaxWidth = Max (rMaxWidth, aNativeContent.GetBoundRect().GetWidth()); + rRadioHeight = aNativeBounds.GetHeight(); + rMaxWidth = Max (rMaxWidth, aNativeContent.GetWidth()); } } return (rCheckHeight > rRadioHeight) ? rCheckHeight : rRadioHeight; @@ -1491,7 +1491,7 @@ void ToolbarMenu::implPaint( ToolbarMenuEntry* pThisOnly, bool bHighlighted ) aTmpPos.Y() = aOuterCheckRect.Top() + (aOuterCheckRect.GetHeight() - nCtrlHeight)/2; Rectangle aCheckRect( aTmpPos, Size( nCtrlHeight, nCtrlHeight ) ); - DrawNativeControl( CTRL_MENU_POPUP, nPart, Region( aCheckRect ), nState, ImplControlValue(), OUString() ); + DrawNativeControl( CTRL_MENU_POPUP, nPart, aCheckRect, nState, ImplControlValue(), OUString() ); } else if ( pEntry->mbChecked ) // by default do nothing for unchecked items { diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx index 9a66230f012c..bfcdfe98ea5a 100644 --- a/svtools/source/dialogs/addresstemplate.cxx +++ b/svtools/source/dialogs/addresstemplate.cxx @@ -29,18 +29,10 @@ #include "precompiled_svtools.hxx" #include <stdio.h> - - -#include "addresstemplate.hxx" -#ifndef _SVT_ADDRESSTEMPLATE_HRC_ +#include <svtools/addresstemplate.hxx> #include "addresstemplate.hrc" -#endif -#ifndef _SVTOOLS_HRC #include <svtools/svtools.hrc> -#endif -#ifndef _SVT_HELPID_HRC #include <svtools/helpid.hrc> -#endif #include <svtools/svtdata.hxx> #include <tools/debug.hxx> #include <comphelper/processfactory.hxx> @@ -49,9 +41,7 @@ #include <vcl/waitobj.hxx> #include <vcl/msgbox.hxx> #include <toolkit/helper/vclunohelper.hxx> -#ifndef _CPPUHELPER_EXTRACT_HXX_ #include <cppuhelper/extract.hxx> -#endif #include <comphelper/interaction.hxx> #include <com/sun/star/ui/dialogs/XExecutableDialog.hpp> #include <com/sun/star/awt/XWindow.hpp> @@ -65,12 +55,9 @@ #include <com/sun/star/sdbcx/XTablesSupplier.hpp> #include <com/sun/star/sdbcx/XColumnsSupplier.hpp> #include <com/sun/star/sdb/CommandType.hpp> -#include "localresaccess.hxx" -#ifndef SVTOOLS_FILENOTATION_HXX_ +#include <svtools/localresaccess.hxx> #include "svl/filenotation.hxx" -#endif #include <tools/urlobj.hxx> - #include <algorithm> // ....................................................................... diff --git a/svtools/source/dialogs/addresstemplate.src b/svtools/source/dialogs/addresstemplate.src index 0652dfb9d0f5..0e4845949dca 100644 --- a/svtools/source/dialogs/addresstemplate.src +++ b/svtools/source/dialogs/addresstemplate.src @@ -25,20 +25,15 @@ * ************************************************************************/ -#ifndef _SVTOOLS_HRC #include <svtools/svtools.hrc> -#endif -#ifndef _SVT_ADDRESSTEMPLATE_HRC_ #include "addresstemplate.hrc" -#endif -#ifndef _SVT_CONTROLDIMS_HRC_ -#include "controldims.hrc" -#endif +#include <svtools/controldims.hrc> #define FIELD_ROW_HEIGHT 17 ModalDialog DLG_ADDRESSBOOKSOURCE { + HelpID = "svtools:ModalDialog:DLG_ADDRESSBOOKSOURCE"; SVLook = TRUE ; OutputSize = TRUE ; Size = MAP_APPFONT ( 300 , 88 + FIELD_ROW_HEIGHT * FIELD_PAIRS_VISIBLE ) ; @@ -64,6 +59,7 @@ ModalDialog DLG_ADDRESSBOOKSOURCE }; ComboBox CB_DATASOURCE { + HelpID = "svtools:ComboBox:DLG_ADDRESSBOOKSOURCE:CB_DATASOURCE"; SVLook = TRUE ; Pos = MAP_APPFONT ( 105, 13 ) ; Size = MAP_APPFONT ( 96, 55 ) ; @@ -73,6 +69,7 @@ ModalDialog DLG_ADDRESSBOOKSOURCE }; PushButton PB_ADMINISTATE_DATASOURCES { + HelpID = "svtools:PushButton:DLG_ADDRESSBOOKSOURCE:PB_ADMINISTATE_DATASOURCES"; Text [ en-US ] = "~Address Data Source..."; SVLook = TRUE ; Pos = MAP_APPFONT ( 204, 13 ) ; @@ -90,6 +87,7 @@ ModalDialog DLG_ADDRESSBOOKSOURCE }; ComboBox CB_TABLE { + HelpID = "svtools:ComboBox:DLG_ADDRESSBOOKSOURCE:CB_TABLE"; SVLook = TRUE ; Pos = MAP_APPFONT ( 105, 30 ) ; Size = MAP_APPFONT ( 96, 55 ) ; diff --git a/svtools/source/dialogs/colrdlg.src b/svtools/source/dialogs/colrdlg.src index ad9a5c1aa015..a93642b0bd05 100644 --- a/svtools/source/dialogs/colrdlg.src +++ b/svtools/source/dialogs/colrdlg.src @@ -29,6 +29,7 @@ #define DIFF 3 ModalDialog DLG_COLOR { + HelpID = "svtools:ModalDialog:DLG_COLOR"; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 260 , 165 + DIFF ) ; @@ -93,6 +94,7 @@ ModalDialog DLG_COLOR }; MetricField NUM_CYAN { + HelpID = "svtools:MetricField:DLG_COLOR:NUM_CYAN"; Border = TRUE ; Pos = MAP_APPFONT ( 42 , 109 + DIFF ) ; Size = MAP_APPFONT ( 26 , 12 ) ; @@ -106,6 +108,7 @@ ModalDialog DLG_COLOR }; MetricField NUM_MAGENTA { + HelpID = "svtools:MetricField:DLG_COLOR:NUM_MAGENTA"; Border = TRUE ; Pos = MAP_APPFONT ( 42 , 122 + DIFF ) ; Size = MAP_APPFONT ( 26 , 12 ) ; @@ -119,6 +122,7 @@ ModalDialog DLG_COLOR }; MetricField NUM_YELLOW { + HelpID = "svtools:MetricField:DLG_COLOR:NUM_YELLOW"; Border = TRUE ; Pos = MAP_APPFONT ( 42 , 135 + DIFF ) ; Size = MAP_APPFONT ( 26 , 12 ) ; @@ -132,6 +136,7 @@ ModalDialog DLG_COLOR }; MetricField NUM_KEY { + HelpID = "svtools:MetricField:DLG_COLOR:NUM_KEY"; Border = TRUE ; Pos = MAP_APPFONT ( 42 , 148 + DIFF ) ; Size = MAP_APPFONT ( 26 , 12 ) ; @@ -163,6 +168,7 @@ ModalDialog DLG_COLOR }; NumericField NUM_RED { + HelpID = "svtools:NumericField:DLG_COLOR:NUM_RED"; Border = TRUE ; Pos = MAP_APPFONT ( 106 , 122 + DIFF ) ; Size = MAP_APPFONT ( 26 , 12 ) ; @@ -174,6 +180,7 @@ ModalDialog DLG_COLOR }; NumericField NUM_GREEN { + HelpID = "svtools:NumericField:DLG_COLOR:NUM_GREEN"; Border = TRUE ; Pos = MAP_APPFONT ( 106 , 135 + DIFF ) ; Size = MAP_APPFONT ( 26 , 12 ) ; @@ -185,6 +192,7 @@ ModalDialog DLG_COLOR }; NumericField NUM_BLUE { + HelpID = "svtools:NumericField:DLG_COLOR:NUM_BLUE"; Border = TRUE ; Pos = MAP_APPFONT ( 106 , 148 + DIFF ) ; Size = MAP_APPFONT ( 26 , 12 ) ; @@ -202,6 +210,7 @@ ModalDialog DLG_COLOR }; NumericField NUM_HUE { + HelpID = "svtools:NumericField:DLG_COLOR:NUM_HUE"; Border = TRUE ; Pos = MAP_APPFONT ( 171 , 122 + DIFF ) ; Size = MAP_APPFONT ( 26 , 12 ) ; @@ -219,6 +228,7 @@ ModalDialog DLG_COLOR }; NumericField NUM_SATURATION { + HelpID = "svtools:NumericField:DLG_COLOR:NUM_SATURATION"; Border = TRUE ; Pos = MAP_APPFONT ( 171 , 135 + DIFF ) ; Size = MAP_APPFONT ( 26 , 12 ) ; @@ -236,6 +246,7 @@ ModalDialog DLG_COLOR }; NumericField NUM_LUMINANCE { + HelpID = "svtools:NumericField:DLG_COLOR:NUM_LUMINANCE"; Border = TRUE ; Pos = MAP_APPFONT ( 171 , 148 + DIFF ) ; Size = MAP_APPFONT ( 26 , 12 ) ; @@ -247,6 +258,7 @@ ModalDialog DLG_COLOR }; PushButton BTN_1 { + HelpID = "svtools:PushButton:DLG_COLOR:BTN_1"; Pos = MAP_APPFONT ( 80 , 109 ) ; Size = MAP_APPFONT ( 17 , 12 ) ; Text = "~<--" ; @@ -254,6 +266,7 @@ ModalDialog DLG_COLOR }; PushButton BTN_2 { + HelpID = "svtools:PushButton:DLG_COLOR:BTN_2"; Pos = MAP_APPFONT ( 100 , 109 ) ; Size = MAP_APPFONT ( 17 , 12 ) ; Text = "--~>" ; diff --git a/svtools/source/dialogs/filedlg.cxx b/svtools/source/dialogs/filedlg.cxx index 5567651c0480..de465b34e1c6 100644 --- a/svtools/source/dialogs/filedlg.cxx +++ b/svtools/source/dialogs/filedlg.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#include <filedlg.hxx> +#include <svtools/filedlg.hxx> #include <filedlg2.hxx> PathDialog::PathDialog( Window* _pParent, WinBits nStyle, BOOL bCreateDir ) : diff --git a/svtools/source/dialogs/filedlg2.cxx b/svtools/source/dialogs/filedlg2.cxx index b0e77d658931..a2c68270ed81 100644 --- a/svtools/source/dialogs/filedlg2.cxx +++ b/svtools/source/dialogs/filedlg2.cxx @@ -28,17 +28,14 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" #include <vcl/svapp.hxx> -#ifndef _SV_BUTTON_HXX //autogen #include <vcl/button.hxx> -#endif #include <vcl/fixed.hxx> #include <vcl/edit.hxx> #include <vcl/lstbox.hxx> #include <svtools/svtdata.hxx> - #include <filedlg2.hxx> -#include <filedlg.hxx> -#include <filedlg2.hrc> +#include <svtools/filedlg.hxx> +#include <svtools/filedlg2.hrc> #include <vcl/msgbox.hxx> #include <vos/security.hxx> #include <com/sun/star/i18n/XCollator.hpp> @@ -68,9 +65,9 @@ DECLARE_LIST( UniStringList, UniString* ) // #define STD_BTN_WIDTH 90 // #define STD_BTN_HEIGHT 35 -#define INITCONTROL( p, ControlClass, nBits, aPos, aSize, aTitel, nHelpId ) \ +#define INITCONTROL( p, ControlClass, nBits, aPos, aSize, aTitel, rHelpId ) \ p = new ControlClass( GetPathDialog(), WinBits( nBits ) ); \ - p->SetHelpId( nHelpId ); \ + p->SetHelpId( rHelpId ); \ p->SetPosSizePixel( aPos, aSize ); \ p->SetText( aTitel ); \ p->Show(); @@ -226,10 +223,10 @@ void ImpPathDialog::InitControls() aPnt.X() = 2 * a6Siz.Width() + aEDSiz.Width(); aPnt.Y() = a6Siz.Height(); INITCONTROL( pOkBtn, PushButton, WB_DEFBUTTON, - aPnt, aBtnSiz, aOkStr, 0 ); + aPnt, aBtnSiz, aOkStr, "" ); aPnt.Y() += aBtnSiz.Height() + a3Siz.Height(); INITCONTROL( pCancelBtn, CancelButton, 0, - aPnt, aBtnSiz, aCancelStr, 0 ); + aPnt, aBtnSiz, aCancelStr, "" ); aPnt.Y() += aBtnSiz.Height() + a3Siz.Height(); INITCONTROL( pNewDirBtn, PushButton, WB_DEFBUTTON, aPnt, aBtnSiz, aNewDirStr, HID_FILEDLG_NEWDIR ); @@ -347,7 +344,7 @@ IMPL_LINK( ImpPathDialog, ClickHdl, Button*, pBtn ) if ( pBtn == pHomeBtn ) { ::rtl::OUString aHomeDir; - NAMESPACE_VOS( OSecurity ) aSecurity; + vos:: OSecurity aSecurity; if ( aSecurity.getHomeDir( aHomeDir ) ) { DirEntry aFile ( aHomeDir ); @@ -782,10 +779,10 @@ void ImpFileDialog::InitControls() const long nButtonStartX = 2*nW+20+15; INITCONTROL( pOkBtn, PushButton, WB_DEFBUTTON, Point(nButtonStartX, 10), Size(STD_BTN_WIDTH, STD_BTN_HEIGHT), - Button::GetStandardText( BUTTON_OK ), 0 ); + Button::GetStandardText( BUTTON_OK ), "" ); INITCONTROL( pCancelBtn, CancelButton, 0, Point(nButtonStartX, 45 ), Size(STD_BTN_WIDTH, STD_BTN_HEIGHT), - Button::GetStandardText( BUTTON_CANCEL ), 0 ); + Button::GetStandardText( BUTTON_CANCEL ), "" ); pLoadBtn = 0; diff --git a/svtools/source/dialogs/filedlg2.src b/svtools/source/dialogs/filedlg2.src index 977a0d6f430b..acef462c04cb 100644 --- a/svtools/source/dialogs/filedlg2.src +++ b/svtools/source/dialogs/filedlg2.src @@ -25,7 +25,8 @@ * ************************************************************************/ -#include <filedlg2.hrc> +#include <svtools/filedlg2.hrc> + String STR_FILEDLG_SELECT { Text [ en-US ] = "Select Directory" ; diff --git a/svtools/source/dialogs/formats.src b/svtools/source/dialogs/formats.src index f8ce80f62f2f..d91700afac8f 100644 --- a/svtools/source/dialogs/formats.src +++ b/svtools/source/dialogs/formats.src @@ -25,7 +25,7 @@ * ************************************************************************/ -#include "sores.hxx" +#include <svtools/sores.hxx> String STR_FORMAT_STRING { diff --git a/svtools/source/dialogs/insdlg.cxx b/svtools/source/dialogs/insdlg.cxx index 3f7700805995..0dd30ebdab89 100644 --- a/svtools/source/dialogs/insdlg.cxx +++ b/svtools/source/dialogs/insdlg.cxx @@ -33,7 +33,7 @@ // include --------------------------------------------------------------- #include <svtools/insdlg.hxx> -#include "sores.hxx" +#include <svtools/sores.hxx> #include <svtools/svtdata.hxx> #include <tools/rc.hxx> diff --git a/svtools/source/dialogs/logindlg.cxx b/svtools/source/dialogs/logindlg.cxx deleted file mode 100644 index 036d5d71a4cf..000000000000 --- a/svtools/source/dialogs/logindlg.cxx +++ /dev/null @@ -1,312 +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. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_svtools.hxx" -#include <filedlg.hxx> -#include <vcl/msgbox.hxx> -#include <svtools/logindlg.hxx> - -#ifndef _SVTOOLS_LOGINDLG_HRC_ -#include "logindlg.hrc" -#endif -#ifndef _SVTOOLS_HRC -#include <svtools/svtools.hrc> -#endif -#include <svtools/svtdata.hxx> - -#ifdef UNX -#include <limits.h> -#define _MAX_PATH PATH_MAX -#endif - -// LoginDialog ------------------------------------------------------- - -//............................................................................ -namespace svt -{ -//............................................................................ - -void LoginDialog::HideControls_Impl( USHORT nFlags ) -{ - FASTBOOL bPathHide = FALSE; - FASTBOOL bErrorHide = FALSE; - FASTBOOL bAccountHide = FALSE; - - if ( ( nFlags & LF_NO_PATH ) == LF_NO_PATH ) - { - aPathFT.Hide(); - aPathED.Hide(); - aPathBtn.Hide(); - bPathHide = TRUE; - } - else if ( ( nFlags & LF_PATH_READONLY ) == LF_PATH_READONLY ) - { - aPathED.Hide(); - aPathInfo.Show(); - aPathBtn.Hide(); - } - - if ( ( nFlags & LF_NO_USERNAME ) == LF_NO_USERNAME ) - { - aNameFT.Hide(); - aNameED.Hide(); - } - else if ( ( nFlags & LF_USERNAME_READONLY ) == LF_USERNAME_READONLY ) - { - aNameED.Hide(); - aNameInfo.Show(); - } - - if ( ( nFlags & LF_NO_PASSWORD ) == LF_NO_PASSWORD ) - { - aPasswordFT.Hide(); - aPasswordED.Hide(); - } - - if ( ( nFlags & LF_NO_SAVEPASSWORD ) == LF_NO_SAVEPASSWORD ) - aSavePasswdBtn.Hide(); - - if ( ( nFlags & LF_NO_ERRORTEXT ) == LF_NO_ERRORTEXT ) - { - aErrorInfo.Hide(); - aErrorGB.Hide(); - bErrorHide = TRUE; - } - - if ( ( nFlags & LF_NO_ACCOUNT ) == LF_NO_ACCOUNT ) - { - aAccountFT.Hide(); - aAccountED.Hide(); - bAccountHide = TRUE; - } - - if ( bErrorHide ) - { - long nOffset = aLoginGB.GetPosPixel().Y() - - aErrorGB.GetPosPixel().Y(); - Point aNewPnt = aRequestInfo.GetPosPixel(); - aNewPnt.Y() -= nOffset; - aRequestInfo.SetPosPixel( aNewPnt ); - aNewPnt = aPathFT.GetPosPixel(); - aNewPnt.Y() -= nOffset; - aPathFT.SetPosPixel( aNewPnt ); - aNewPnt = aPathED.GetPosPixel(); - aNewPnt.Y() -= nOffset; - aPathED.SetPosPixel( aNewPnt ); - aNewPnt = aPathInfo.GetPosPixel(); - aNewPnt.Y() -= nOffset; - aPathInfo.SetPosPixel( aNewPnt ); - aNewPnt = aPathBtn.GetPosPixel(); - aNewPnt.Y() -= nOffset; - aPathBtn.SetPosPixel( aNewPnt ); - aNewPnt = aNameFT.GetPosPixel(); - aNewPnt.Y() -= nOffset; - aNameFT.SetPosPixel( aNewPnt ); - aNewPnt = aNameED.GetPosPixel(); - aNewPnt.Y() -= nOffset; - aNameED.SetPosPixel( aNewPnt ); - aNewPnt = aNameInfo.GetPosPixel(); - aNewPnt.Y() -= nOffset; - aNameInfo.SetPosPixel( aNewPnt ); - aNewPnt = aPasswordFT.GetPosPixel(); - aNewPnt.Y() -= nOffset; - aPasswordFT.SetPosPixel( aNewPnt ); - aNewPnt = aPasswordED.GetPosPixel(); - aNewPnt.Y() -= nOffset; - aPasswordED.SetPosPixel( aNewPnt ); - aNewPnt = aAccountFT.GetPosPixel(); - aNewPnt.Y() -= nOffset; - aAccountFT.SetPosPixel( aNewPnt ); - aNewPnt = aAccountED.GetPosPixel(); - aNewPnt.Y() -= nOffset; - aAccountED.SetPosPixel( aNewPnt ); - aNewPnt = aSavePasswdBtn.GetPosPixel(); - aNewPnt.Y() -= nOffset; - aSavePasswdBtn.SetPosPixel( aNewPnt ); - aNewPnt = aLoginGB.GetPosPixel(); - aNewPnt.Y() -= nOffset; - aLoginGB.SetPosPixel( aNewPnt ); - Size aNewSiz = GetSizePixel(); - aNewSiz.Height() -= nOffset; - SetSizePixel( aNewSiz ); - } - - if ( bPathHide ) - { - long nOffset = aNameED.GetPosPixel().Y() - - aPathED.GetPosPixel().Y(); - - Point aTmpPnt1 = aNameFT.GetPosPixel(); - Point aTmpPnt2 = aPasswordFT.GetPosPixel(); - aNameFT.SetPosPixel( aPathFT.GetPosPixel() ); - aPasswordFT.SetPosPixel( aTmpPnt1 ); - aAccountFT.SetPosPixel( aTmpPnt2 ); - aTmpPnt1 = aNameED.GetPosPixel(); - aTmpPnt2 = aPasswordED.GetPosPixel(); - aNameED.SetPosPixel( aPathED.GetPosPixel() ); - aPasswordED.SetPosPixel( aTmpPnt1 ); - aAccountED.SetPosPixel( aTmpPnt2 ); - aNameInfo.SetPosPixel( aPathInfo.GetPosPixel() ); - aTmpPnt1 = aSavePasswdBtn.GetPosPixel(); - aTmpPnt1.Y() -= nOffset; - aSavePasswdBtn.SetPosPixel( aTmpPnt1 ); - Size aNewSz = GetSizePixel(); - aNewSz.Height() -= nOffset; - SetSizePixel( aNewSz ); - } - - if ( bAccountHide ) - { - long nOffset = aAccountED.GetPosPixel().Y() - aPasswordED.GetPosPixel().Y(); - - Point aTmpPnt = aSavePasswdBtn.GetPosPixel(); - aTmpPnt.Y() -= nOffset; - aSavePasswdBtn.SetPosPixel( aTmpPnt ); - Size aNewSz = GetSizePixel(); - aNewSz.Height() -= nOffset; - SetSizePixel( aNewSz ); - } -}; - -// ----------------------------------------------------------------------- - -IMPL_LINK( LoginDialog, OKHdl_Impl, OKButton *, EMPTYARG ) -{ - // trim the strings - aNameED.SetText( aNameED.GetText().EraseLeadingChars(). - EraseTrailingChars() ); - aPasswordED.SetText( aPasswordED.GetText().EraseLeadingChars(). - EraseTrailingChars() ); - EndDialog( RET_OK ); - return 1; -} - -// ----------------------------------------------------------------------- - -IMPL_LINK( LoginDialog, PathHdl_Impl, PushButton *, EMPTYARG ) -{ - PathDialog* pDlg = new PathDialog( this, WB_3DLOOK ); -// DirEntry aEntry; -// aEntry.ToAbs(); -// pDlg->SetPath( aEntry.GetFull() ); - - if ( pDlg->Execute() == RET_OK ) - aPathED.SetText( pDlg->GetPath() ); - - delete pDlg; - return 1; -} - -// ----------------------------------------------------------------------- - -LoginDialog::LoginDialog -( - Window* pParent, - USHORT nFlags, - const String& rServer, - const String* pRealm -) : - - ModalDialog( pParent, SvtResId( DLG_LOGIN ) ), - - aErrorInfo ( this, SvtResId( INFO_LOGIN_ERROR ) ), - aErrorGB ( this, SvtResId( GB_LOGIN_ERROR ) ), - aRequestInfo ( this, SvtResId( INFO_LOGIN_REQUEST ) ), - aPathFT ( this, SvtResId( FT_LOGIN_PATH ) ), - aPathED ( this, SvtResId( ED_LOGIN_PATH ) ), - aPathInfo ( this, SvtResId( INFO_LOGIN_PATH ) ), - aPathBtn ( this, SvtResId( BTN_LOGIN_PATH ) ), - aNameFT ( this, SvtResId( FT_LOGIN_USERNAME ) ), - aNameED ( this, SvtResId( ED_LOGIN_USERNAME ) ), - aNameInfo ( this, SvtResId( INFO_LOGIN_USERNAME ) ), - aPasswordFT ( this, SvtResId( FT_LOGIN_PASSWORD ) ), - aPasswordED ( this, SvtResId( ED_LOGIN_PASSWORD ) ), - aAccountFT ( this, SvtResId( FT_LOGIN_ACCOUNT ) ), - aAccountED ( this, SvtResId( ED_LOGIN_ACCOUNT ) ), - aSavePasswdBtn ( this, SvtResId( CB_LOGIN_SAVEPASSWORD ) ), - aLoginGB ( this, SvtResId( GB_LOGIN_LOGIN ) ), - aOKBtn ( this, SvtResId( BTN_LOGIN_OK ) ), - aCancelBtn ( this, SvtResId( BTN_LOGIN_CANCEL ) ), - aHelpBtn ( this, SvtResId( BTN_LOGIN_HELP ) ) - -{ - // Einlog-Ort eintragen - String aServer; - - if ( ( ( nFlags & LF_NO_ACCOUNT ) == LF_NO_ACCOUNT ) && pRealm && pRealm->Len() ) - { - aServer = *pRealm; - ( ( aServer += ' ' ) += String( SvtResId( STR_LOGIN_AT ) ) ) += ' '; - } - aServer += rServer; - String aTxt = aRequestInfo.GetText(); - aTxt.SearchAndReplaceAscii( "%1", aServer ); - aRequestInfo.SetText( aTxt ); - - FreeResource(); - - aPathED.SetMaxTextLen( _MAX_PATH ); - aNameED.SetMaxTextLen( _MAX_PATH ); - - aOKBtn.SetClickHdl( LINK( this, LoginDialog, OKHdl_Impl ) ); - aPathBtn.SetClickHdl( LINK( this, LoginDialog, PathHdl_Impl ) ); - - HideControls_Impl( nFlags ); -}; - -// ----------------------------------------------------------------------- - -void LoginDialog::SetName( const String& rNewName ) -{ - aNameED.SetText( rNewName ); - aNameInfo.SetText( rNewName ); -} - -// ----------------------------------------------------------------------- - -void LoginDialog::ClearPassword() -{ - aPasswordED.SetText( String() ); - - if ( 0 == aNameED.GetText().Len() ) - aNameED.GrabFocus(); - else - aPasswordED.GrabFocus(); -}; - -// ----------------------------------------------------------------------- - -void LoginDialog::ClearAccount() -{ - aAccountED.SetText( String() ); - aAccountED.GrabFocus(); -}; - -//............................................................................ -} // namespace svt -//............................................................................ diff --git a/svtools/source/dialogs/logindlg.hrc b/svtools/source/dialogs/logindlg.hrc deleted file mode 100644 index 7baf6010f531..000000000000 --- a/svtools/source/dialogs/logindlg.hrc +++ /dev/null @@ -1,57 +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 _SVTOOLS_LOGINDLG_HRC_ -#define _SVTOOLS_LOGINDLG_HRC_ - -//============================================================================ -#define INFO_LOGIN_ERROR 10 -#define GB_LOGIN_ERROR 11 - -#define INFO_LOGIN_REQUEST 20 -#define FT_LOGIN_PATH 21 -#define ED_LOGIN_PATH 22 -#define INFO_LOGIN_PATH 23 -#define BTN_LOGIN_PATH 24 -#define FT_LOGIN_USERNAME 25 -#define ED_LOGIN_USERNAME 26 -#define INFO_LOGIN_USERNAME 27 -#define FT_LOGIN_PASSWORD 28 -#define ED_LOGIN_PASSWORD 29 -#define FT_LOGIN_ACCOUNT 30 -#define ED_LOGIN_ACCOUNT 31 -#define CB_LOGIN_SAVEPASSWORD 32 -#define GB_LOGIN_LOGIN 33 - -#define BTN_LOGIN_OK 50 -#define BTN_LOGIN_CANCEL 51 -#define BTN_LOGIN_HELP 52 - -#define STR_LOGIN_AT 60 - -#endif // _SVTOOLS_LOGINDLG_HRC_ diff --git a/svtools/source/dialogs/logindlg.src b/svtools/source/dialogs/logindlg.src deleted file mode 100644 index f6e3565d8cd9..000000000000 --- a/svtools/source/dialogs/logindlg.src +++ /dev/null @@ -1,200 +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 _SVTOOLS_HRC -#include <svtools/svtools.hrc> -#endif - -#ifndef _SVTOOLS_LOGINDLG_HRC_ -#include "logindlg.hrc" -#endif - -ModalDialog DLG_LOGIN -{ -// HelpId = HID_DLG_LOGIN ; - Border = TRUE ; - Moveable = TRUE ; - OutputSize = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( 265 , 158 ) ; - FixedText INFO_LOGIN_ERROR - { - Pos = MAP_APPFONT ( 12 , 14 ) ; - Size = MAP_APPFONT ( 185 , 18 ) ; - WordBreak = TRUE ; - }; - FixedLine GB_LOGIN_ERROR - { - Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( 197 , 8 ) ; - Text [ en-US ] = "Message from server" ; - }; - FixedText INFO_LOGIN_REQUEST - { - Pos = MAP_APPFONT ( 12 , 55 ) ; - Size = MAP_APPFONT ( 185 , 18 ) ; - WordBreak = TRUE ; - Text [ en-US ] = "Please enter user name and password for %1." ; - }; - FixedText FT_LOGIN_PATH - { - Pos = MAP_APPFONT ( 12 , 77 ) ; - Size = MAP_APPFONT ( 57 , 10 ) ; - Text [ en-US ] = "~Path" ; - }; - Edit ED_LOGIN_PATH - { - Border = TRUE ; - Pos = MAP_APPFONT ( 72 , 76 ) ; - Size = MAP_APPFONT ( 108 , 12 ) ; - }; - FixedText INFO_LOGIN_PATH - { - Hide = TRUE ; - Pos = MAP_APPFONT ( 72 , 77 ) ; - Size = MAP_APPFONT ( 125 , 10 ) ; - }; - PushButton BTN_LOGIN_PATH - { - Pos = MAP_APPFONT ( 183 , 75 ) ; - Size = MAP_APPFONT ( 14 , 14 ) ; - Text = "~..." ; - }; - FixedText FT_LOGIN_USERNAME - { - Pos = MAP_APPFONT ( 12 , 92 ) ; - Size = MAP_APPFONT ( 57 , 10 ) ; - Text [ en-US ] = "~User name" ; - }; - Edit ED_LOGIN_USERNAME - { - Border = TRUE ; - Pos = MAP_APPFONT ( 72 , 91 ) ; - Size = MAP_APPFONT ( 125 , 12 ) ; - }; - FixedText INFO_LOGIN_USERNAME - { - Hide = TRUE ; - Pos = MAP_APPFONT ( 72 , 92 ) ; - Size = MAP_APPFONT ( 125 , 10 ) ; - }; - FixedText FT_LOGIN_PASSWORD - { - Pos = MAP_APPFONT ( 12 , 107 ) ; - Size = MAP_APPFONT ( 57 , 10 ) ; - Text [ en-US ] = "Pass~word" ; - }; - Edit ED_LOGIN_PASSWORD - { - Border = TRUE ; - Pos = MAP_APPFONT ( 72 , 106 ) ; - Size = MAP_APPFONT ( 125 , 12 ) ; - PassWord = TRUE ; - }; - FixedText FT_LOGIN_ACCOUNT - { - Pos = MAP_APPFONT ( 12 , 122 ) ; - Size = MAP_APPFONT ( 57 , 10 ) ; - Text [ en-US ] = "A~ccount"; - }; - Edit ED_LOGIN_ACCOUNT - { - Border = TRUE ; - Pos = MAP_APPFONT ( 72 , 121 ) ; - Size = MAP_APPFONT ( 125 , 12 ) ; - PassWord = TRUE ; - }; - CheckBox CB_LOGIN_SAVEPASSWORD - { - Pos = MAP_APPFONT ( 12 , 136 ) ; - Size = MAP_APPFONT ( 185 , 10 ) ; - Text [ en-US ] = "~Save password" ; - }; - FixedLine GB_LOGIN_LOGIN - { - Pos = MAP_APPFONT ( 7 , 44 ) ; - Size = MAP_APPFONT ( 197 , 8 ) ; - Text [ en-US ] = "Log in" ; - }; - OKButton BTN_LOGIN_OK - { - Pos = MAP_APPFONT ( 209 , 6 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - DefButton = TRUE ; - }; - CancelButton BTN_LOGIN_CANCEL - { - Pos = MAP_APPFONT ( 209 , 23 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - }; - HelpButton BTN_LOGIN_HELP - { - Pos = MAP_APPFONT ( 209 , 43 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - }; - String STR_LOGIN_AT - { - Text [ en-US ] = "to " ; - }; - Text [ en-US ] = "User Name and Password Required" ; -}; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/svtools/source/dialogs/makefile.mk b/svtools/source/dialogs/makefile.mk deleted file mode 100644 index 16528ee7d4cd..000000000000 --- a/svtools/source/dialogs/makefile.mk +++ /dev/null @@ -1,77 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=svtools -TARGET=dialogs - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svt.pmk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES= filedlg2.src \ - so3res.src \ - formats.src \ - prnsetup.src \ - printdlg.src \ - colrdlg.src \ - logindlg.src \ - addresstemplate.src \ - wizardmachine.src - - -EXCEPTIONSFILES= $(SLO)$/addresstemplate.obj \ - $(SLO)$/insdlg.obj \ - $(SLO)$/roadmapwizard.obj \ - $(SLO)$/printdlg.obj \ - $(SLO)$/wizardmachine.obj - - -SLOFILES= \ - $(SLO)$/insdlg.obj \ - $(SLO)$/roadmapwizard.obj \ - $(SLO)$/wizardmachine.obj \ - $(SLO)$/addresstemplate.obj \ - $(SLO)$/filedlg.obj \ - $(SLO)$/filedlg2.obj \ - $(SLO)$/prnsetup.obj \ - $(SLO)$/printdlg.obj \ - $(SLO)$/colctrl.obj \ - $(SLO)$/colrdlg.obj \ - $(SLO)$/property.obj \ - $(SLO)$/wizdlg.obj \ - $(SLO)$/mcvmath.obj \ - $(SLO)$/logindlg.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/svtools/source/dialogs/printdlg.cxx b/svtools/source/dialogs/printdlg.cxx deleted file mode 100644 index 532fd3f61bb2..000000000000 --- a/svtools/source/dialogs/printdlg.cxx +++ /dev/null @@ -1,798 +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. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_svtools.hxx" -#include <tools/debug.hxx> -#ifndef _SV_APP_HXX -#include <vcl/svapp.hxx> -#endif -#ifndef _VCL_PRINT_HXX -#include <vcl/print.hxx> -#endif -#include <vcl/msgbox.hxx> -#include <vcl/jobset.hxx> -#include <tools/urlobj.hxx> - -#include "printdlg.hrc" -#include "controldims.hrc" -#include <svtools/prnsetup.hxx> -#include <svtools/printdlg.hxx> -#include <svtools/svtdata.hxx> -#include <filedlg.hxx> -#include "svl/pickerhelper.hxx" -#ifndef _SVT_HELPID_HRC -#include <svtools/helpid.hrc> -#endif -#include <com/sun/star/ui/dialogs/TemplateDescription.hpp> -#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp> -#include <com/sun/star/ui/dialogs/XFilePicker.hpp> -#include <com/sun/star/ui/dialogs/XFilterManager.hpp> -#include <com/sun/star/lang/XMultiServiceFactory.hpp> -#include <comphelper/processfactory.hxx> - -using rtl::OUString; -using namespace com::sun::star; - -struct SvtPrinterImpl -{ - Printer* m_pTempPrinter; - sal_Bool m_bHelpDisabled; - PrintSheetRange m_eSheetRange; - - SvtPrinterImpl() : - m_pTempPrinter( NULL ), m_bHelpDisabled( sal_False ), m_eSheetRange( PRINTSHEETS_ALL ) {} - ~SvtPrinterImpl() { delete m_pTempPrinter; } -}; - -#define TEMPPRINTER() mpPrinterImpl->m_pTempPrinter - -// ======================================================================= - -PrintDialog::PrintDialog( Window* pWindow, bool bWithSheetsAndCells ) : - ModalDialog ( pWindow, SvtResId( DLG_SVT_PRNDLG_PRINTDLG ) ), - maFlPrinter ( this, SvtResId( FL_PRINTER ) ), - maFtName ( this, SvtResId( FT_NAME ) ), - maLbName ( this, SvtResId( LB_NAMES ) ), - maBtnProperties ( this, SvtResId( BTN_PROPERTIES ) ), - maFtStatus ( this, SvtResId( FT_STATUS ) ), - maFiStatus ( this, SvtResId( FI_STATUS ) ), - maFtType ( this, SvtResId( FT_TYPE ) ), - maFiType ( this, SvtResId( FI_TYPE ) ), - maFtLocation ( this, SvtResId( FT_LOCATION ) ), - maFiLocation ( this, SvtResId( FI_LOCATION ) ), - maFtComment ( this, SvtResId( FT_COMMENT ) ), - maFiComment ( this, SvtResId( FI_COMMENT ) ), - maCbxFilePrint ( this, SvtResId( CBX_FILEPRINT ) ), - maFiPrintFile ( this, SvtResId( FI_PRINTFILE ) ), - maFiFaxNo ( this, SvtResId( FI_FAXNO ) ), - maEdtFaxNo ( this, SvtResId( EDT_FAXNO ) ), - maFlPrint ( this, SvtResId( FL_PRINT ) ), - maRbtAllSheets ( this, SvtResId( RBT_ALL_SHEETS ) ), - maRbtSelectedSheets ( this, SvtResId( RBT_SELECTED_SHEETS ) ), - maRbtSelectedCells ( this, SvtResId( RBT_SELECTED_CELLS ) ), - maFlPrintRange ( this, SvtResId( FL_PRINTRANGE ) ), - maRbtAll ( this, SvtResId( RBT_ALL ) ), - maRbtPages ( this, SvtResId( RBT_PAGES ) ), - maRbtSelection ( this, SvtResId( RBT_SELECTION ) ), - maEdtPages ( this, SvtResId( EDT_PAGES ) ), - maFlSepCopiesRange ( this, SvtResId( FL_SEPCOPIESRANGE ) ), - maFlCopies ( this, SvtResId( FL_COPIES ) ), - maFtCopies ( this, SvtResId( FT_COPIES ) ), - maNumCopies ( this, SvtResId( NUM_COPIES ) ), - maImgCollate ( this, SvtResId( IMG_COLLATE ) ), - maImgNotCollate ( this, SvtResId( IMG_NOT_COLLATE ) ), - maCbxCollate ( this, SvtResId( CBX_COLLATE ) ), - maFlSepButtonLine ( this, SvtResId( FL_SEPBUTTONLINE ) ), - maBtnOptions ( this, SvtResId( BTN_OPTIONS ) ), - maBtnOK ( this, SvtResId( BTN_OK ) ), - maBtnCancel ( this, SvtResId( BTN_CANCEL ) ), - maBtnHelp ( this, SvtResId( BTN_HELP ) ), - mbWithSheetsAndCells( bWithSheetsAndCells ), - maAllFilterStr ( SvtResId( STR_ALLFILTER ) ) - -{ - FreeResource(); - - mpPrinter = NULL; - mpPrinterImpl = new SvtPrinterImpl; - mnCopyCount = 1; - mnFirstPage = 0; - mnLastPage = 0; - mnMinPage = 1; - mnMaxPage = 65535; - meCheckRange = PRINTDIALOG_ALL; - mbAll = TRUE; - mbSelection = FALSE; - mbFromTo = FALSE; - mbRange = FALSE; - mbCollate = TRUE; - mbCollateCheck = TRUE; - mbOptions = FALSE; - - maStatusTimer.SetTimeout( IMPL_PRINTDLG_STATUS_UPDATE ); - maStatusTimer.SetTimeoutHdl( LINK( this, PrintDialog, ImplStatusHdl ) ); - maBtnProperties.SetClickHdl( LINK( this, PrintDialog, ImplPropertiesHdl ) ); - maLbName.SetSelectHdl( LINK( this, PrintDialog, ImplChangePrinterHdl ) ); - - maFiPrintFile.SetStyle( maFiPrintFile.GetStyle() | WB_PATHELLIPSIS ); - - Link aLink( LINK( this, PrintDialog, ImplModifyControlHdl ) ); - maCbxFilePrint.SetClickHdl( aLink ); - maRbtAll.SetClickHdl( aLink ); - maRbtPages.SetClickHdl( aLink ); - maRbtSelection.SetClickHdl( aLink ); - maEdtPages.SetModifyHdl( aLink ); - maNumCopies.SetModifyHdl( aLink ); - maCbxCollate.SetClickHdl( aLink ); - maBtnOptions.SetClickHdl( aLink ); - maEdtFaxNo.SetModifyHdl( aLink ); - maBtnOK.SetClickHdl( aLink ); - - maRbtAll.Check(); - ImplSetImages(); -} - -// ----------------------------------------------------------------------- - -PrintDialog::~PrintDialog() -{ - ImplFreePrnDlgListBox( &maLbName, FALSE ); - delete mpPrinterImpl; -} - -// ----------------------------------------------------------------------- - -void PrintDialog::ImplSetImages() -{ - if( ! GetSettings().GetStyleSettings().GetHighContrastMode() ) - { - maImgCollate.SetModeImage( Image( SvtResId( RID_IMG_PRNDLG_COLLATE ) ), BMP_COLOR_NORMAL ); - maImgNotCollate.SetModeImage( Image( SvtResId( RID_IMG_PRNDLG_NOCOLLATE ) ), BMP_COLOR_NORMAL ); - } - else - { - maImgCollate.SetModeImage( Image( SvtResId( RID_IMG_PRNDLG_COLLATE_HC ) ), BMP_COLOR_HIGHCONTRAST ); - maImgNotCollate.SetModeImage( Image( SvtResId( RID_IMG_PRNDLG_NOCOLLATE_HC ) ), BMP_COLOR_HIGHCONTRAST ); - } -} - -// ----------------------------------------------------------------------- - -void PrintDialog::ImplSetInfo() -{ - const QueueInfo* pInfo = Printer::GetQueueInfo( maLbName.GetSelectEntry(), true ); - if ( pInfo ) - { - maFiType.SetText( pInfo->GetDriver() ); - maFiLocation.SetText( pInfo->GetLocation() ); - maFiComment.SetText( pInfo->GetComment() ); - maFiStatus.SetText( ImplPrnDlgGetStatusText( *pInfo ) ); - } - else - { - XubString aTempStr; - maFiType.SetText( aTempStr ); - maFiLocation.SetText( aTempStr ); - maFiComment.SetText( aTempStr ); - maFiStatus.SetText( aTempStr ); - } - -#ifdef UNX - if( pInfo && pInfo->GetLocation().EqualsAscii( "fax_queue" ) ) - { - maFiPrintFile.Show( FALSE ); - maCbxFilePrint.Show( FALSE ); - maFiFaxNo.Show( TRUE ); - maEdtFaxNo.Show( TRUE ); - Printer* pPrinter = TEMPPRINTER() ? TEMPPRINTER() : mpPrinter; - maEdtFaxNo.SetText( pPrinter->GetJobValue( String::CreateFromAscii( "FAX#" ) ) ); - - Size aFTSize = maFiFaxNo.GetSizePixel(); - long nTextWidth = maFiFaxNo.GetCtrlTextWidth( maFiFaxNo.GetText() ) + 10; - if ( aFTSize.Width() < nTextWidth ) - { - long nDelta = nTextWidth - aFTSize.Width(); - aFTSize.Width() = aFTSize.Width() + nDelta; - maFiFaxNo.SetSizePixel( aFTSize ); - Size aEdtSize = maEdtFaxNo.GetSizePixel(); - aEdtSize.Width() = aEdtSize.Width() - nDelta; - Point aEdtPos = maEdtFaxNo.GetPosPixel(); - aEdtPos.X() = aEdtPos.X() + nDelta; - maEdtFaxNo.SetPosSizePixel( aEdtPos, aEdtSize ); - } - } - else -#endif - { - maFiPrintFile.Show( TRUE ); - maCbxFilePrint.Show( TRUE ); - maFiFaxNo.Show( FALSE ); - maEdtFaxNo.Show( FALSE ); - } - -} - -// ----------------------------------------------------------------------- - -void PrintDialog::ImplCheckOK() -{ - // Ueberprueft, ob der OK-Button enabled ist - BOOL bEnable = TRUE; - - if ( bEnable && maRbtPages.IsChecked() ) - bEnable = maEdtPages.GetText().Len() > 0; - - if ( bEnable ) - { - if ( TEMPPRINTER() ) - bEnable = TEMPPRINTER()->IsValid(); - else - bEnable = mpPrinter->IsValid(); - } - - maBtnOK.Enable( bEnable ); -} - -// ----------------------------------------------------------------------- - -void PrintDialog::ImplInitControls() -{ - // Alles - if ( mbAll ) - { - maRbtAll.Enable(); - if( meCheckRange == PRINTDIALOG_ALL ) - maRbtAll.Check( TRUE ); - } - else - maRbtAll.Enable( FALSE ); - - // Selektion - if ( mbSelection ) - { - maRbtSelection.Enable(); - if ( meCheckRange == PRINTDIALOG_SELECTION ) - maRbtSelection.Check( TRUE ); - } - else - maRbtSelection.Enable( FALSE ); - - // Seiten - if ( mbRange ) - { - maRbtPages.Enable(); - maEdtPages.Show(); - maEdtPages.SetText( maRangeText ); - - if( ( meCheckRange == PRINTDIALOG_FROMTO ) || - ( meCheckRange == PRINTDIALOG_RANGE ) ) - { - maRbtPages.Check( TRUE ); - maEdtPages.Enable(); - } - else - maEdtPages.Enable( FALSE ); - } - else - { - maRbtPages.Enable( FALSE ); - maEdtPages.Hide(); - } - - // Anzahl Kopien - maNumCopies.SetValue( mnCopyCount ); - - // Sortierung - maCbxCollate.Enable( mbCollate ); - maCbxCollate.Check( mbCollateCheck ); - - // Zusaetze-Button - if ( mbOptions ) - maBtnOptions.Show(); - - if ( !mbWithSheetsAndCells ) - { - Size aMarginSize = - LogicToPixel( Size( RSC_SP_CTRL_GROUP_X, RSC_SP_CTRL_GROUP_Y ), MAP_APPFONT ); - long nTempPos = maImgCollate.GetPosPixel().Y() + - maImgCollate.GetSizePixel().Height() + aMarginSize.Height(); - long nDelta1 = maFlPrintRange.GetPosPixel().Y() - maFlPrint.GetPosPixel().Y(); - long nDelta2 = maFlSepButtonLine.GetPosPixel().Y() - nTempPos; - - maFlPrint.Hide(); - maRbtAllSheets.Hide(); - maRbtSelectedSheets.Hide(); - maRbtSelectedCells.Hide(); - maRbtSelection.Show(); - - Size aNewSize = GetSizePixel(); - aNewSize.Height() -= nDelta2; - SetSizePixel( aNewSize ); - aNewSize = maFlSepCopiesRange.GetSizePixel(); - aNewSize.Height() -= nDelta2; - maFlSepCopiesRange.SetSizePixel( aNewSize ); - - long nDelta = nDelta1; - Window* pControls[] = { &maFlPrintRange, &maRbtAll, - &maRbtPages, &maEdtPages, &maRbtSelection, NULL, - &maFlSepButtonLine, &maBtnOptions, &maBtnOK, - &maBtnCancel, &maBtnHelp }; - Window** pCtrl = pControls; - const sal_Int32 nCount = sizeof( pControls ) / sizeof( pControls[0] ); - for ( sal_Int32 i = 0; i < nCount; ++i, ++pCtrl ) - { - if ( NULL == *pCtrl ) - { - nDelta = nDelta2; - continue; - } - Point aNewPos = (*pCtrl)->GetPosPixel(); - aNewPos.Y() -= nDelta; - (*pCtrl)->SetPosPixel( aNewPos ); - } - } -} - -// ----------------------------------------------------------------------- - -void PrintDialog::ImplFillDialogData() -{ - if ( maRbtAll.IsChecked() ) - meCheckRange = PRINTDIALOG_ALL; - else if( maRbtSelection.IsChecked() ) - meCheckRange = PRINTDIALOG_SELECTION; - else - { - meCheckRange = PRINTDIALOG_RANGE; - maRangeText = maEdtPages.GetText(); - } - - mnCopyCount = (USHORT) maNumCopies.GetValue(); - mbCollateCheck = maCbxCollate.IsChecked(); - - // In Datei drucken - if ( maCbxFilePrint.IsChecked() ) - mpPrinter->SetPrintFile( maFiPrintFile.GetText() ); - mpPrinter->EnablePrintFile( maCbxFilePrint.IsChecked() ); -} - -// ----------------------------------------------------------------------- - -IMPL_LINK( PrintDialog, ImplStatusHdl, Timer*, EMPTYARG ) -{ - QueueInfo aInfo; - ImplPrnDlgUpdateQueueInfo( &maLbName, aInfo ); - maFiStatus.SetText( ImplPrnDlgGetStatusText( aInfo ) ); - - return 0; -} - -// ----------------------------------------------------------------------- - -IMPL_LINK( PrintDialog, ImplPropertiesHdl, void*, EMPTYARG ) -{ - if ( !TEMPPRINTER() ) - TEMPPRINTER() = new Printer( mpPrinter->GetJobSetup() ); - TEMPPRINTER()->Setup( this ); - - return 0; -} - -// ----------------------------------------------------------------------- - -IMPL_LINK( PrintDialog, ImplChangePrinterHdl, void*, EMPTYARG ) -{ - TEMPPRINTER() = ImplPrnDlgListBoxSelect( &maLbName, &maBtnProperties, - mpPrinter, TEMPPRINTER() ); - ImplSetInfo(); - ImplCheckOK(); // Check if "OK" button can be enabled now! - - return 0; -} - -// ----------------------------------------------------------------------- - -bool PrintDialog::ImplGetFilename() -{ - uno::Reference< lang::XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() ); - static ::rtl::OUString aOldFile; - if( xFactory.is() ) - { - uno::Sequence< uno::Any > aTempl( 1 ); - aTempl.getArray()[0] <<= ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION; - uno::Reference< ui::dialogs::XFilePicker > xFilePicker( - xFactory->createInstanceWithArguments( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FilePicker" ) ), - aTempl ), uno::UNO_QUERY ); - DBG_ASSERT( xFilePicker.is(), "could not get FilePicker service" ); - - uno::Reference< ui::dialogs::XFilterManager > xFilterMgr( xFilePicker, uno::UNO_QUERY ); - if( xFilePicker.is() && xFilterMgr.is() ) - { - try - { -#ifdef UNX - // add PostScript and PDF - Printer* pPrinter = TEMPPRINTER() ? TEMPPRINTER() : mpPrinter; - bool bPS = true, bPDF = true; - if( pPrinter ) - { - if( pPrinter->GetCapabilities( PRINTER_CAPABILITIES_PDF ) ) - bPS = false; - else - bPDF = false; - } - if( bPS ) - xFilterMgr->appendFilter( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PostScript" ) ), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "*.ps" ) ) ); - if( bPDF ) - xFilterMgr->appendFilter( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Portable Document Format" ) ), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "*.pdf" ) ) ); -#elif defined WNT - xFilterMgr->appendFilter( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "*.PRN" ) ), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "*.prn" ) ) ); -#endif - // add arbitrary files - xFilterMgr->appendFilter( maAllFilterStr, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "*.*" ) ) ); - } - catch( lang::IllegalArgumentException rExc ) - { - DBG_ERRORFILE( "caught IllegalArgumentException when registering filter\n" ); - } - - if( aOldFile.getLength() ) - { - INetURLObject aUrl( aOldFile, INET_PROT_FILE ); - xFilePicker->setDefaultName( aUrl.GetLastName() ); - aUrl.CutLastName(); - xFilePicker->setDisplayDirectory( aUrl.GetMainURL( INetURLObject::DECODE_TO_IURI ) ); - } - - if( xFilePicker->execute() == ui::dialogs::ExecutableDialogResults::OK ) - { - uno::Sequence< ::rtl::OUString > aPathSeq( xFilePicker->getFiles() ); - INetURLObject aObj( aPathSeq[0] ); - maFiPrintFile.SetText( aOldFile = aObj.PathToFileName() ); - return true; - } - return false; - } - } - - // something went awry, lets try the old fashioned dialogue - Window* pDlgParent = IsReallyVisible() ? this : GetParent(); - FileDialog aDlg( pDlgParent, WB_STDDIALOG | WB_SAVEAS ); -#ifdef WNT - aDlg.AddFilter( String( RTL_CONSTASCII_USTRINGPARAM( "*.prn" ) ), String( RTL_CONSTASCII_USTRINGPARAM( "*.prn" ) ) ); - aDlg.SetDefaultExt( String( RTL_CONSTASCII_USTRINGPARAM( "prn" ) ) ); -#elif defined UNX - aDlg.AddFilter( String( RTL_CONSTASCII_USTRINGPARAM( "PostScript" ) ), String( RTL_CONSTASCII_USTRINGPARAM( "*.ps" ) ) ); - aDlg.SetDefaultExt( String( RTL_CONSTASCII_USTRINGPARAM( "ps" ) ) ); -#endif - - if( aOldFile.getLength() ) - aDlg.SetPath( aOldFile ); - - if( aDlg.Execute() ) - { - String aTargetFile = aDlg.GetPath(); - maFiPrintFile.SetText( aOldFile = aTargetFile ); - return true; - } - - return false; -} - -// ----------------------------------------------------------------------- - -IMPL_LINK( PrintDialog, ImplModifyControlHdl, void*, p ) -{ - // Radiobuttons (Umfang) - if ( !p || (p == &maRbtAll) || (p == &maRbtPages) || (p == &maRbtSelection) ) - { - BOOL bCheck = maRbtPages.IsChecked(); - maEdtPages.Enable( bCheck ); - if ( p == &maRbtPages ) - maEdtPages.GrabFocus(); - ImplCheckOK(); - } - - // Edit-Felder (Seiten) - if ( p == &maEdtPages ) - ImplCheckOK(); - - if( p == &maEdtFaxNo ) - { - Printer* pPrinter = TEMPPRINTER() ? TEMPPRINTER() : mpPrinter; - pPrinter->SetJobValue( String::CreateFromAscii( "FAX#" ), maEdtFaxNo.GetText() ); - } - - // Anzahl Kopien - BOOL bNumCopies = FALSE; - - if ( !p || p == &maNumCopies ) - { - if ( p ) - bNumCopies = TRUE; - //BOOL bCopies = maNumCopies.GetValue() > 1; - maCbxCollate.Enable( mbCollate ); - - /*if ( !bCopies ) - maCbxCollate.Check( FALSE ); - else*/ - if ( mbCollateCheck ) - maCbxCollate.Check( TRUE ); - } - - // Sortieren - if ( !p || p == &maCbxCollate || bNumCopies ) - { - BOOL bCheck = maCbxCollate.IsChecked(); - - if ( !bNumCopies ) - mbCollateCheck = maCbxCollate.IsChecked(); - - if( bCheck ) - { - maImgCollate.Show(); - maImgNotCollate.Hide(); - } - else - { - maImgCollate.Hide(); - maImgNotCollate.Show(); - } - } - - // Zus"atze - if ( p == &maBtnOptions ) - ClickOptionsHdl(); - - if( p == &maBtnOK ) - { - EndDialog( maCbxFilePrint.IsChecked() ? ImplGetFilename() : TRUE ); - } - - return 0; -} - -// ----------------------------------------------------------------------- - -long PrintDialog::ClickOptionsHdl() -{ - if ( maOptionsHdlLink.IsSet() ) - return maOptionsHdlLink.Call( this ); - else - return TRUE; -} - -// ----------------------------------------------------------------------- - -long PrintDialog::OK() -{ - if ( maOKHdlLink.IsSet() ) - return maOKHdlLink.Call( this ); - else - return TRUE; -} - -// ----------------------------------------------------------------------- - -void PrintDialog::EnableSheetRange( bool bEnable, PrintSheetRange eRange ) -{ - if ( mbWithSheetsAndCells ) - { - switch ( eRange ) - { - case PRINTSHEETS_ALL : - maRbtAllSheets.Enable( bEnable != false ); - break; - case PRINTSHEETS_SELECTED_SHEETS : - maRbtSelectedSheets.Enable( bEnable != false ); - break; - case PRINTSHEETS_SELECTED_CELLS : - maRbtSelectedCells.Enable( bEnable != false ); - break; - default: - DBG_ERRORFILE( "PrintDialog::EnableSheetRange(): invalid range" ); - } - } -} - -// ----------------------------------------------------------------------- - -bool PrintDialog::IsSheetRangeEnabled( PrintSheetRange eRange ) const -{ - if ( !mbWithSheetsAndCells ) - return false; - - bool bRet = false; - switch ( eRange ) - { - case PRINTSHEETS_ALL : - bRet = maRbtAllSheets.IsEnabled() != FALSE; - break; - case PRINTSHEETS_SELECTED_SHEETS : - bRet = maRbtSelectedSheets.IsEnabled() != FALSE; - break; - case PRINTSHEETS_SELECTED_CELLS : - bRet = maRbtSelectedCells.IsEnabled() != FALSE; - break; - default: - DBG_ERRORFILE( "PrintDialog::IsSheetRangeEnabled(): invalid range" ); - } - return bRet; -} - -// ----------------------------------------------------------------------- - -void PrintDialog::CheckSheetRange( PrintSheetRange eRange ) -{ - if ( mbWithSheetsAndCells ) - { - switch ( eRange ) - { - case PRINTSHEETS_ALL : - maRbtAllSheets.Check(); - break; - case PRINTSHEETS_SELECTED_SHEETS : - maRbtSelectedSheets.Check(); - break; - case PRINTSHEETS_SELECTED_CELLS : - maRbtSelectedCells.Check(); - break; - default: - DBG_ERRORFILE( "PrintDialog::CheckSheetRange(): invalid range" ); - } - } -} - -// ----------------------------------------------------------------------- - -PrintSheetRange PrintDialog::GetCheckedSheetRange() const -{ - PrintSheetRange eRange = PRINTSHEETS_ALL; - if ( mbWithSheetsAndCells ) - { - if ( maRbtSelectedSheets.IsChecked() ) - eRange = PRINTSHEETS_SELECTED_SHEETS; - else if ( maRbtSelectedCells.IsChecked() ) - eRange = PRINTSHEETS_SELECTED_CELLS; - } - return eRange; -} - -// ----------------------------------------------------------------------- - -bool PrintDialog::IsSheetRangeChecked( PrintSheetRange eRange ) const -{ - if ( !mbWithSheetsAndCells ) - return false; - - bool bRet = false; - switch ( eRange ) - { - case PRINTSHEETS_ALL : - bRet = maRbtAllSheets.IsChecked() != FALSE; - break; - case PRINTSHEETS_SELECTED_SHEETS : - bRet = maRbtSelectedSheets.IsChecked() != FALSE; - break; - case PRINTSHEETS_SELECTED_CELLS : - bRet = maRbtSelectedCells.IsChecked() != FALSE; - break; - default: - DBG_ERRORFILE( "PrintDialog::IsSheetRangeChecked(): invalid range" ); - } - return bRet; -} - -// ----------------------------------------------------------------------- - -long PrintDialog::Notify( NotifyEvent& rNEvt ) -{ - if ( (rNEvt.GetType() == EVENT_GETFOCUS) && IsReallyVisible() ) - ImplStatusHdl( &maStatusTimer ); - else if ( rNEvt.GetType() == EVENT_KEYINPUT ) - { - if ( rNEvt.GetKeyEvent()->GetKeyCode().GetCode() == KEY_F1 && mpPrinterImpl->m_bHelpDisabled ) - return 1; // do nothing - } - - return ModalDialog::Notify( rNEvt ); -} - -// ----------------------------------------------------------------------- - -void PrintDialog::DataChanged( const DataChangedEvent& rDCEvt ) -{ - if ( rDCEvt.GetType() == DATACHANGED_PRINTER ) - { - TEMPPRINTER() = ImplPrnDlgUpdatePrinter( mpPrinter, TEMPPRINTER() ); - Printer* pPrn; - if ( TEMPPRINTER() ) - pPrn = TEMPPRINTER(); - else - pPrn = mpPrinter; - ImplFillPrnDlgListBox( pPrn, &maLbName, &maBtnProperties ); - ImplSetInfo(); - ImplCheckOK(); - } - else if ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) - ImplSetImages(); - - ModalDialog::DataChanged( rDCEvt ); -} - -// ----------------------------------------------------------------------- - -short PrintDialog::Execute() -{ - if ( !mpPrinter || mpPrinter->IsPrinting() || mpPrinter->IsJobActive() ) - { - DBG_ERRORFILE( "PrinterSetupDialog::Execute() - No Printer or printer is printing" ); - return FALSE; - } - - // check if the printer brings up its own dialog - // in that case leave the work to that dialog - if( mpPrinter->GetCapabilities( PRINTER_CAPABILITIES_EXTERNALDIALOG ) ) - return TRUE; - - Printer::updatePrinters(); - - // Controls initialisieren - ImplFillPrnDlgListBox( mpPrinter, &maLbName, &maBtnProperties ); - ImplSetInfo(); - maStatusTimer.Start(); - ImplInitControls(); - maNumCopies.GrabFocus(); - maNumCopies.SetSelection( Selection( 0, maNumCopies.GetText().Len() ) ); - ImplModifyControlHdl( NULL ); - - // Dialog starten - short nRet = ModalDialog::Execute(); - - // Wenn Dialog mit OK beendet wurde, dann die Daten updaten - if( nRet == TRUE ) - { - if ( TEMPPRINTER() ) - mpPrinter->SetPrinterProps( TEMPPRINTER() ); - ImplFillDialogData(); - } - - maStatusTimer.Stop(); - - return nRet; -} - -// ----------------------------------------------------------------------- - -void PrintDialog::DisableHelp() -{ - mpPrinterImpl->m_bHelpDisabled = sal_True; - maBtnHelp.Disable(); -} - diff --git a/svtools/source/dialogs/printdlg.hrc b/svtools/source/dialogs/printdlg.hrc deleted file mode 100644 index 83b7b0b28c82..000000000000 --- a/svtools/source/dialogs/printdlg.hrc +++ /dev/null @@ -1,74 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include <svtools/svtools.hrc> - -#define FL_PRINTER 1 -#define LB_NAMES 2 -#define BTN_PROPERTIES 3 -#define FT_NAME 4 -#define FT_STATUS 5 -#define FI_STATUS 6 -#define FT_TYPE 7 -#define FI_TYPE 8 -#define FT_LOCATION 9 -#define FI_LOCATION 10 -#define FT_COMMENT 11 -#define FI_COMMENT 12 -#define CBX_FILEPRINT 13 -#define FI_PRINTFILE 14 -#define FI_FAXNO 15 -#define EDT_FAXNO 16 - -#define FL_PRINT 20 -#define RBT_ALL_SHEETS 21 -#define RBT_SELECTED_SHEETS 22 -#define RBT_SELECTED_CELLS 23 - -#define FL_PRINTRANGE 30 -#define RBT_ALL 31 -#define RBT_PAGES 32 -#define EDT_PAGES 33 -#define RBT_SELECTION 34 - -#define FL_SEPCOPIESRANGE 35 - -#define FL_COPIES 40 -#define FT_COPIES 41 -#define NUM_COPIES 42 -#define CBX_COLLATE 43 -#define IMG_COLLATE 44 -#define IMG_NOT_COLLATE 45 - -#define FL_SEPBUTTONLINE 50 -#define BTN_OK 51 -#define BTN_CANCEL 52 -#define BTN_HELP 53 -#define BTN_OPTIONS 54 - -#define STR_ALLFILTER 10 - diff --git a/svtools/source/dialogs/printdlg.src b/svtools/source/dialogs/printdlg.src deleted file mode 100644 index 405accc63344..000000000000 --- a/svtools/source/dialogs/printdlg.src +++ /dev/null @@ -1,333 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include "printdlg.hrc" - -#define IMAGE_MAGENTA_MASK Color { Red = 0xFFFF; Green = 0x0000; Blue = 0xFFFF; } - -ModalDialog DLG_SVT_PRNDLG_PRINTDLG -{ - SVLook = TRUE ; - OutputSize = TRUE ; - Moveable = TRUE ; - Size = MAP_APPFONT ( 265 , 210 ) ; - Text [ en-US ] = "Print" ; - FixedLine FL_PRINTER - { - Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( 253 , 8 ) ; - Text [ en-US ] = "Printer" ; - }; - FixedText FT_NAME - { - Pos = MAP_APPFONT ( 12 , 14 ) ; - Size = MAP_APPFONT ( 45 , 10 ) ; - Text [ en-US ] = "~Name" ; - }; - ListBox LB_NAMES - { - Border = TRUE ; - Pos = MAP_APPFONT ( 60 , 13 ) ; - Size = MAP_APPFONT ( 130 , 80 ) ; - DropDown = TRUE ; - Sort = TRUE ; - }; - PushButton BTN_PROPERTIES - { - Pos = MAP_APPFONT ( 193 , 12 ) ; - Size = MAP_APPFONT ( 60 , 14 ) ; - Text [ en-US ] = "Propert~ies..." ; - }; - FixedText FT_STATUS - { - Pos = MAP_APPFONT ( 12 , 29 ) ; - Size = MAP_APPFONT ( 45 , 8 ) ; - Text [ en-US ] = "Status" ; - }; - FixedText FI_STATUS - { - Pos = MAP_APPFONT ( 60 , 29 ) ; - Size = MAP_APPFONT ( 193 , 8 ) ; - }; - FixedText FT_TYPE - { - Pos = MAP_APPFONT ( 12 , 40 ) ; - Size = MAP_APPFONT ( 45 , 8 ) ; - Text [ en-US ] = "Type" ; - }; - FixedText FI_TYPE - { - Pos = MAP_APPFONT ( 60 , 40 ) ; - Size = MAP_APPFONT ( 193 , 8 ) ; - }; - FixedText FT_LOCATION - { - Pos = MAP_APPFONT ( 12 , 51 ) ; - Size = MAP_APPFONT ( 45 , 8 ) ; - Text [ en-US ] = "Location" ; - }; - FixedText FI_LOCATION - { - Pos = MAP_APPFONT ( 60 , 51 ) ; - Size = MAP_APPFONT ( 193 , 8 ) ; - }; - FixedText FT_COMMENT - { - Pos = MAP_APPFONT ( 12 , 62 ) ; - Size = MAP_APPFONT ( 45 , 8 ) ; - Text [ en-US ] = "Comment" ; - }; - FixedText FI_COMMENT - { - Pos = MAP_APPFONT ( 60 , 62 ) ; - Size = MAP_APPFONT ( 193 , 8 ) ; - }; - FixedText FI_FAXNO - { - Pos = MAP_APPFONT ( 12 , 75 ) ; - Size = MAP_APPFONT ( 45 , 8 ) ; - Text [ en-US ] = "Fax number"; - }; - Edit EDT_FAXNO - { - Border = TRUE; - Pos = MAP_APPFONT ( 60 , 73 ); - Size = MAP_APPFONT ( 188 , 12 ); - }; - CheckBox CBX_FILEPRINT - { - Pos = MAP_APPFONT ( 12 , 73 ) ; - Size = MAP_APPFONT ( 75 , 10 ) ; - Text [ en-US ] = "Print to file" ; - }; - FixedText FI_PRINTFILE - { - Pos = MAP_APPFONT ( 90 , 74 ) ; - Size = MAP_APPFONT ( 163 , 8 ) ; - }; - /*!!! - PushButton BTN_BROWSE - { - Pos = MAP_APPFONT ( 234 , 75 ) ; - Size = MAP_APPFONT ( 14 , 14 ) ; - Text = "~..." ; - Hide = TRUE ; - }; - */ - FixedLine FL_PRINT - { - Pos = MAP_APPFONT ( 6 , 91 ) ; - Size = MAP_APPFONT ( 117 , 8 ) ; - Text [ en-US ] = "Print" ; - }; - RadioButton RBT_ALL_SHEETS - { - Pos = MAP_APPFONT ( 12 , 102 ) ; - Size = MAP_APPFONT ( 105 , 10 ) ; - Text [ en-US ] = "All sheets" ; - }; - RadioButton RBT_SELECTED_SHEETS - { - Pos = MAP_APPFONT ( 12 , 115 ) ; - Size = MAP_APPFONT ( 105 , 10 ) ; - Text [ en-US ] = "Selected sheets" ; - }; - RadioButton RBT_SELECTED_CELLS - { - Pos = MAP_APPFONT ( 12 , 128 ) ; - Size = MAP_APPFONT ( 105 , 10 ) ; - Text [ en-US ] = "Selected cells" ; - }; - FixedLine FL_PRINTRANGE - { - Pos = MAP_APPFONT ( 6 , 141 ) ; - Size = MAP_APPFONT ( 117 , 8 ) ; - Text [ en-US ] = "Print range" ; - }; - RadioButton RBT_ALL - { - Pos = MAP_APPFONT ( 12 , 152 ) ; - Size = MAP_APPFONT ( 105 , 10 ) ; - Text [ en-US ] = "All pages" ; - }; - RadioButton RBT_PAGES - { - Pos = MAP_APPFONT ( 12 , 165 ) ; - Size = MAP_APPFONT ( 50 , 10 ) ; - Text [ en-US ] = "Pages" ; - }; - Edit EDT_PAGES - { - Border = TRUE ; - Pos = MAP_APPFONT ( 65 , 164 ) ; - Size = MAP_APPFONT ( 52 , 12 ) ; - }; - RadioButton RBT_SELECTION - { - Hide = TRUE ; - Pos = MAP_APPFONT ( 12 , 179 ) ; - Size = MAP_APPFONT ( 105 , 10 ) ; - Text [ en-US ] = "Selection" ; - }; - FixedLine FL_SEPCOPIESRANGE - { - Pos = MAP_APPFONT( 126, 102 ); - Size = MAP_APPFONT( 1, 74 ); - Vert = TRUE; - }; - FixedLine FL_COPIES - { - Pos = MAP_APPFONT ( 129 , 91 ) ; - Size = MAP_APPFONT ( 130 , 8 ) ; - Text [ en-US ] = "Copies" ; - }; - FixedText FT_COPIES - { - Pos = MAP_APPFONT ( 135 , 104 ) ; - Size = MAP_APPFONT ( 63 , 8 ) ; - Text [ en-US ] = "Number of copies" ; - }; - NumericField NUM_COPIES - { - Border = TRUE ; - Pos = MAP_APPFONT ( 201 , 102 ) ; - Size = MAP_APPFONT ( 33 , 12 ) ; - Repeat = TRUE ; - Spin = TRUE ; - Minimum = 1 ; - Maximum = 9999 ; - StrictFormat = TRUE ; - First = 1 ; - Last = 9999 ; - }; - CheckBox CBX_COLLATE - { - Pos = MAP_APPFONT ( 201 , 123 ) ; - Size = MAP_APPFONT ( 60 , 10 ) ; - Text [ en-US ] = "Co~llate" ; - }; - FixedImage IMG_COLLATE - { - Pos = MAP_APPFONT ( 132 , 117 ) ; - Size = MAP_APPFONT ( 67 , 22 ) ; - Hide = TRUE ; - }; - FixedImage IMG_NOT_COLLATE - { - Pos = MAP_APPFONT ( 132 , 117 ) ; - Size = MAP_APPFONT ( 67 , 22 ) ; - Hide = TRUE ; - }; - FixedLine FL_SEPBUTTONLINE - { - Pos = MAP_APPFONT( 0, 179 ); - Size = MAP_APPFONT( 265, 8 ); - }; - PushButton BTN_OPTIONS - { - Hide = TRUE ; - Pos = MAP_APPFONT ( 6 , 190 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - Text [ en-US ] = "~Options..." ; - }; - OKButton BTN_OK - { - Pos = MAP_APPFONT ( 100 , 190 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - DefButton = TRUE ; - }; - CancelButton BTN_CANCEL - { - Pos = MAP_APPFONT ( 153 , 190 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - }; - HelpButton BTN_HELP - { - Pos = MAP_APPFONT ( 209 , 190 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - }; - String STR_ALLFILTER - { - Text [ en-US ] = "<All>"; - }; -}; - -Image RID_IMG_PRNDLG_COLLATE -{ - ImageBitmap = Bitmap { File = "collate.bmp" ; }; - MaskColor = IMAGE_MAGENTA_MASK ; -}; - -Image RID_IMG_PRNDLG_NOCOLLATE -{ - ImageBitmap = Bitmap { File = "ncollate.bmp" ; }; - MaskColor = IMAGE_MAGENTA_MASK ; -}; - -Image RID_IMG_PRNDLG_COLLATE_HC -{ - ImageBitmap = Bitmap { File = "collate_h.bmp" ; }; - MaskColor = IMAGE_MAGENTA_MASK ; -}; - -Image RID_IMG_PRNDLG_NOCOLLATE_HC -{ - ImageBitmap = Bitmap { File = "ncollate_h.bmp" ; }; - MaskColor = IMAGE_MAGENTA_MASK ; -}; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/svtools/source/dialogs/prnsetup.src b/svtools/source/dialogs/prnsetup.src index 1443a35e0f39..afdf7d56864e 100644 --- a/svtools/source/dialogs/prnsetup.src +++ b/svtools/source/dialogs/prnsetup.src @@ -138,6 +138,7 @@ String STR_SVT_PRNDLG_JOBCOUNT ModalDialog DLG_SVT_PRNDLG_PRNSETUPDLG { + HelpID = "svtools:ModalDialog:DLG_SVT_PRNDLG_PRNSETUPDLG"; OutputSize = TRUE ; SVLook = TRUE ; Moveable = TRUE ; @@ -157,6 +158,7 @@ ModalDialog DLG_SVT_PRNDLG_PRNSETUPDLG }; ListBox LB_NAMES { + HelpID = "svtools:ListBox:DLG_SVT_PRNDLG_PRNSETUPDLG:LB_NAMES"; Border = TRUE ; Pos = MAP_APPFONT ( 60 , 12 ) ; Size = MAP_APPFONT ( 125 , 80 ) ; @@ -165,6 +167,7 @@ ModalDialog DLG_SVT_PRNDLG_PRNSETUPDLG }; PushButton BTN_PROPERTIES { + HelpID = "svtools:PushButton:DLG_SVT_PRNDLG_PRNSETUPDLG:BTN_PROPERTIES"; Pos = MAP_APPFONT ( 188 , 12 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; Text [ en-US ] = "Propert~ies..." ; @@ -220,6 +223,7 @@ ModalDialog DLG_SVT_PRNDLG_PRNSETUPDLG }; PushButton BTN_OPTIONS { + HelpID = "svtools:PushButton:DLG_SVT_PRNDLG_PRNSETUPDLG:BTN_OPTIONS"; Pos = MAP_APPFONT ( 5 , 84 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Options..." ; diff --git a/svtools/source/dialogs/propctrl.cxx b/svtools/source/dialogs/propctrl.cxx deleted file mode 100644 index 675a93ca728b..000000000000 --- a/svtools/source/dialogs/propctrl.cxx +++ /dev/null @@ -1,503 +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. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_svtools.hxx" - - -#ifndef _USR_INTROSP_HXX -#include <usr/inspect.hxx> -#endif -#ifndef _USR_SERINFO_HXX -#include <usr/serinfo.hxx> -#endif -#ifndef _USR_INTROSP_HXX -#include <usr/introsp.hxx> -#endif - -#include <propctrl.hxx> -#include <property.hxx> - - -// Controller-Implementation -class PropertyEditorControler_Impl : public SvPropertyDataControl -{ - XIntrospectionAccessRef mxUnoAccess; - PropertySequence mPropSeq; - XPropertyEditorRef mxEditor; - SvPropertyBox* mpPropBox; - UsrAny maUnoObj; - -public: - // Provisorisch direkt Window mitgeben - PropertyEditorControler_Impl( SvPropertyBox* pPropBox_ ); - //SimplePropertyEditor_Impl( void ); - - // Objekt zum Editieren setzen, dies loest das Eintragen - // der Properties in die PropertyBox aus - void setObject( XPropertyEditorRef xEditor_, const UsrAny& aToEditObj, - /* HACK fuer History-Interface*/String aPath, BOOL bBack=FALSE, BOOL bForward=FALSE ); - - /* SPAETER - SMART_UNO_DECLARATION(ImplIntrospection,UsrObject); - - // Methoden von XInterface - XInterface * queryInterface( Uik aUik ); - XIdlClassRef getIdlClass(); - */ - - // Methoden von SvPropertyDataControl - virtual void Modified( const String& aName, - const String& aVal, - void* pData); - - virtual void Clicked( const String& aName, - const String& aVal, - void* pData); - - virtual void Commit( const String& aName, - const String& aVal, - void* pData); - - virtual void Select( const String& aName, - void* pData); - - virtual void LinkClicked(const String& aName, - void* pData); - - // TODO: Das muss raus, sehr unglueckliche Schnittstelle - // PropertyBox erzwingt Zustand des Controllers - virtual String GetTheCorrectProperty() const; -}; - -// Methoden von XPropertyEditor -PropertyEditorControler_Impl::PropertyEditorControler_Impl( SvPropertyBox* pPropBox_ ) -{ - mpPropBox = pPropBox_; -} - -void PropertyEditorControler_Impl::setObject( XPropertyEditorRef xEditor_, const UsrAny& aToEditObj, - /* HACK fuer History-Interface*/ String aPath, BOOL bBack, BOOL bForward ) -{ - static XIntrospectionRef xIntrospection; - - // Ohne Fenster laeuft gar nix - if( !mpPropBox ) - return; - - // Fenster aufraeumen - mpPropBox->ClearAll(); - - // Editor und Objekt bernehmen - mxEditor = xEditor_; - maUnoObj = aToEditObj; - - if( !xIntrospection.is() ) - { - // Introspection-Service holen - XServiceManagerRef xServiceManager = getGlobalServiceManager(); - XServiceProviderRef xProv = xServiceManager->getServiceProvider - ( "com.sun.star.beans.Introspection", UikSequence(), UikSequence() ); - xIntrospection = (XIntrospection *)xProv->newInstance() - ->queryInterface( XIntrospection::getSmartUik() ); - } - if( !xIntrospection.is() ) - return; - - // und unspecten - mxUnoAccess = xIntrospection->inspect( maUnoObj ); - if( !mxUnoAccess.Is() ) - return; - - // Uns als Controler anmelden - mpPropBox->SetController( this ); - - // Properties anlegen - mPropSeq = mxUnoAccess->getProperties(); - UINT32 nPropCount = mPropSeq.getLen(); - const Property* pProps = mPropSeq.getConstArray(); - - // 1. Seite anlegen - USHORT nPropPageId = mpPropBox->AppendPage("Properties"); - - // Beim Eintragen solls nicht flimmern - mpPropBox->DisableUpdate(); - - // Dummy-Properties fuer Path und Navigation - SvPropertyData aProperty; - if( aPath.Len() ) - { - // Interface und Structs werden Hyperlinks - aProperty.bIsHyperLink = FALSE; - aProperty.bIsLocked = TRUE; - aProperty.bHasVisibleXButton = FALSE; - aProperty.eKind = KOC_EDIT; - aProperty.pControl = NULL; - aProperty.pDataPtr = NULL; - aProperty.aName = "Path"; - aProperty.aValue = aPath; - mpPropBox->InsertEntry( aProperty ); - } - if( bBack || bForward ) - { - // Interface und Structs werden Hyperlinks - aProperty.bIsHyperLink = TRUE; - aProperty.bIsLocked = TRUE; - // HACK, solange Hyperlink nicht funktioniert - aProperty.bHasVisibleXButton = aProperty.bIsHyperLink; - aProperty.eKind = KOC_EDIT; - UINT32 iHandle; - aProperty.pControl = NULL; - if( bBack ) - { - iHandle = 1000001; - aProperty.pDataPtr = (void*)iHandle; - aProperty.aName = "<-"; - aProperty.aValue = "Back"; - mpPropBox->InsertEntry( aProperty ); - } - if( bForward ) - { - iHandle = 1000000; - aProperty.pDataPtr = (void*)iHandle; - aProperty.aName = "->"; - aProperty.aValue = "Forward"; - mpPropBox->InsertEntry( aProperty ); - } - } - - // Properties eintragen - // TODO: Wo kommen die Strings her - UINT32 i; - for( i = 0 ; i < nPropCount ; i++ ) - { - const Property& rProp = pProps[ i ]; - - // TypeClass des Property ermitteln - XIdlClassRef xPropClass = rProp.Type; - if( !xPropClass.is() ) - { - DBG_ERROR( "PropertyEditorControler_Impl::Commit(), Property without type" ) - return; - } - TypeClass eType = xPropClass->getTypeClass(); - - // Interface und Structs werden Hyperlinks - aProperty.bIsHyperLink = ( eType == TYPECLASS_INTERFACE || eType == TYPECLASS_STRUCT ); - aProperty.bIsLocked = ((rProp.Attributes & PROPERTY_READONLY) != 0 ); - - // HACK, solange Hyperlink nicht funktioniert - aProperty.bHasVisibleXButton = aProperty.bIsHyperLink; - - // Wert holen und in String wandeln - UsrAny aVal = mxUnoAccess->getPropertyValueByIndex( maUnoObj, i ); - String aStrVal = AnyToString( aVal ); - - // Properties reinbraten - aProperty.eKind = KOC_EDIT; - aProperty.aName = rProp.Name; - aProperty.aValue = aStrVal; - aProperty.pDataPtr = (void*)i; - aProperty.pControl = NULL; - //aProperty.theValues.Insert(new String("1"),aProperty.theValues.Count()); - //aProperty.theValues.Insert(new String("2"),aProperty.theValues.Count()); - //aProperty.theValues.Insert(new String("3"),aProperty.theValues.Count()); - //aProperty.theValues.Insert(new String("4"),aProperty.theValues.Count()); - mpPropBox->InsertEntry( aProperty ); - } - - // 2. Seite fuer Listener - // TODO: Wo kommen die Eintraege her - USHORT nListenerPageId = mpPropBox->AppendPage("Listener"); - - XIdlClassSequence aSupportedListenerSeq = mxUnoAccess->getSupportedListeners(); - const XIdlClassRef* pListenerArray = aSupportedListenerSeq.getConstArray(); - UINT32 nIfaceCount = aSupportedListenerSeq.getLen(); - - // Property-Data vorfuellen - aProperty.eKind = KOC_EDIT; - //aProperty.eKind = KOC_UNDEFINED; - aProperty.aValue = "Listener-Value"; - aProperty.bHasVisibleXButton = TRUE; - // TEST - //aProperty.bIsHyperLink = TRUE; - aProperty.bIsHyperLink = FALSE; - aProperty.bIsLocked = TRUE; - //aProperty.bIsLocked = FALSE; - aProperty.pDataPtr = NULL; - aProperty.pControl = NULL; - - for( UINT32 j = 0 ; j < nIfaceCount ; j++ ) - { - const XIdlClassRef& rxIfaceClass = pListenerArray[j]; - aProperty.aName = rxIfaceClass->getName(); - mpPropBox->InsertEntry( aProperty ); - } - mpPropBox->EnableUpdate(); - mpPropBox->SetPage( nPropPageId ); -} - -void PropertyEditorControler_Impl::Modified -( const String& aName, const String& aVal, void* pData) -{ -} - -void PropertyEditorControler_Impl::Clicked -( const String& aName, const String& aVal, void* pData) -{ - // HACK, solange LinkClicked nicht funktioniert - UINT32 iPos = (UINT32)pData; - UINT32 nPropCount = mPropSeq.getLen(); - if( iPos >= nPropCount ) - { - // Spezial-IDs fuer forward/back? - BOOL bForward = (iPos == 1000000); - BOOL bBack = (iPos == 1000001); - if( bForward || bBack ) - { - // Unterstuetzt der PropertyEditor das? - XPropertyEditorNavigationRef xPropEdNav = (XPropertyEditorNavigation*) - mxEditor->queryInterface( XPropertyEditorNavigation::getSmartUik() ); - if( xPropEdNav.is() ) - { - if( bForward ) - xPropEdNav->forward(); - else - xPropEdNav->back(); - } - } - return; - } - - const Property* pProps = mPropSeq.getConstArray(); - const Property& rProp = pProps[ iPos ]; - XIdlClassRef xPropClass = rProp.Type; - if( !xPropClass.is() ) - { - DBG_ERROR( "PropertyEditorControler_Impl::Commit(), Property without type" ) - return; - } - TypeClass eType = xPropClass->getTypeClass(); - if( eType == TYPECLASS_INTERFACE || eType == TYPECLASS_STRUCT ) - LinkClicked( aName, pData ); -} - -void PropertyEditorControler_Impl::Commit -( const String& aName, const String& aVal, void* pData) -{ - UINT32 iPos = (UINT32)pData; - UINT32 nPropCount = mPropSeq.getLen(); - if( iPos >= nPropCount ) - return; - - // String in Property-Typ wandeln - const Property* pProps = mPropSeq.getConstArray(); - const Property& rProp = pProps[ iPos ]; - XIdlClassRef xPropClass = rProp.Type; - if( !xPropClass.is() ) - { - DBG_ERROR( "PropertyEditorControler_Impl::Commit(), Property without type" ) - return; - } - TypeClass eType = xPropClass->getTypeClass(); - UsrAny aValue = StringToAny( aVal, eType ); - - // Wert setzen - mxUnoAccess->setPropertyValueByIndex( maUnoObj, iPos, aValue ); - - // Wert neu holen und ggf. neu setzen - UsrAny aNewVal = mxUnoAccess->getPropertyValueByIndex( maUnoObj, iPos ); - String aNewStrVal = AnyToString( aNewVal ); - if( aNewStrVal != aVal ) - mpPropBox->SetPropertyValue( aName, aNewStrVal ); -} - -void PropertyEditorControler_Impl::Select -( const String& aName, void* pData) -{ -} - -void PropertyEditorControler_Impl::LinkClicked(const String& aName, void* pData) -{ - UINT32 iPos = (UINT32)pData; - UINT32 nPropCount = mPropSeq.getLen(); - if( iPos >= nPropCount ) - return; - - // Wert holen und an Master-Controller zurueckgeben - UsrAny aNewObj = mxUnoAccess->getPropertyValueByIndex( maUnoObj, iPos ); - mxEditor->setObject( aNewObj, aName ); -} - - -// TODO: Das muss raus, sehr unglueckliche Schnittstelle -// PropertyBox erzwingt Zustand des Controllers -String PropertyEditorControler_Impl::GetTheCorrectProperty() const -{ - return String(); -} - - -SMART_UNO_IMPLEMENTATION(SimplePropertyEditor_Impl,UsrObject); - -// Methoden von XInterface -XInterface * SimplePropertyEditor_Impl::queryInterface( Uik aUik ) -{ - if( aUik == XPropertyEditor::getSmartUik() ) - return (XPropertyEditor *)this; - if( aUik == XPropertyEditorNavigation::getSmartUik() ) - return (XPropertyEditorNavigation *)this; - return UsrObject::queryInterface( aUik ); -} - -XIdlClassRef SimplePropertyEditor_Impl::getIdlClass() -{ - // TODO: Unterstuetzen - return NULL; -} - - -// Methoden von SimplePropertyEditor_Impl -SimplePropertyEditor_Impl::SimplePropertyEditor_Impl( Window *pParent ) - : maHistorySeq( 10 ), maHistoryNames( 10 ), bSimpleHistory( FALSE ) -{ - //XVCLComponent xC = pParent->getVCLComponent - //xC->addVCLComponentListener( MyListener ) - - pActiveControler = NULL; - mpPropBox = new SvPropertyBox( pParent ); - mpPropBox->Show(); - - long cxOut = pParent->GetOutputSizePixel().Width(); - long cyOut = pParent->GetOutputSizePixel().Height(); - Size aSize( cxOut, cyOut ); - mpPropBox->SetPosSizePixel( Point( 0, 0 ), aSize ); - - mnHistoryCount = 0; - mnActualHistoryLevel = -1; -} - -SimplePropertyEditor_Impl::~SimplePropertyEditor_Impl() -{ - delete mpPropBox; - if( pActiveControler ) - delete pActiveControler; -} - -// Private Methode zum Anlegen/Aktivieren der Controller -void SimplePropertyEditor_Impl::showObject( const UsrAny& aToShowObj ) -{ - if( pActiveControler ) - delete pActiveControler; - - // Neuen Controller auf der Wiese anlegen (TODO: Controller cachen?) - pActiveControler = new PropertyEditorControler_Impl( mpPropBox ); - - XPropertyEditorRef xThis = (XPropertyEditor *)this; - pActiveControler->setObject( xThis, aToShowObj, - /*aPath*/bSimpleHistory ? getPath() : String(), - /*bBack*/bSimpleHistory && mnActualHistoryLevel > 0, - /*bForward*/bSimpleHistory && (INT32)mnHistoryCount > mnActualHistoryLevel ); -} - -String SimplePropertyEditor_Impl::getPath( void ) -{ - String aRetStr; - const String* pStr = maHistoryNames.getConstArray(); - for( INT32 i = 0 ; i <= mnActualHistoryLevel ; i++ ) - { - String aName = pStr[i]; - - // Root speziell behandeln - if( i == 0 ) - { - aRetStr += aName; - } - else - { - // Ist es ein Index? - long l = (long)aName; - String aNumStr( l ); - if( aNumStr == aName ) - { - aRetStr += '['; - aRetStr += aName; - aRetStr += ']'; - } - else - { - aRetStr += '.'; - aRetStr += aName; - } - } - } - return aRetStr; -} - -// Methoden von XPropertyEditor -void SimplePropertyEditor_Impl::setObject( const UsrAny& aToEditObj, const XubString& aObjName ) -{ - // History pflegen - mnActualHistoryLevel++; - mnHistoryCount = (UINT32)mnActualHistoryLevel; - UINT32 iHistorySize = maHistorySeq.getLen(); - if( mnHistoryCount > iHistorySize ) - { - maHistorySeq.realloc( iHistorySize + 10 ); - maHistoryNames.realloc( iHistorySize + 10 ); - } - - // Neues Object eintragen - maHistorySeq.getArray()[ mnHistoryCount ] = aToEditObj; - maHistoryNames.getArray()[ mnHistoryCount ] = aObjName; - - // Object anzeigen - showObject( aToEditObj ); -} - -// Methoden von PropertyEditorNavigation -void SimplePropertyEditor_Impl::forward(void) -{ - if( (INT32)mnHistoryCount > mnActualHistoryLevel ) - { - // Naechstes Object darstellen - mnActualHistoryLevel++; - showObject( maHistorySeq.getConstArray()[mnActualHistoryLevel] ); - } -} - -void SimplePropertyEditor_Impl::back(void) -{ - if( mnActualHistoryLevel > 0 ) - { - // Voriges Object darstellen - mnActualHistoryLevel--; - showObject( maHistorySeq.getConstArray()[mnActualHistoryLevel] ); - } -} - - diff --git a/svtools/source/dialogs/propctrl.hxx b/svtools/source/dialogs/propctrl.hxx deleted file mode 100644 index 949873ceb1b7..000000000000 --- a/svtools/source/dialogs/propctrl.hxx +++ /dev/null @@ -1,115 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -/* -#include <tools/stream.hxx> -#include <vcl/sound.hxx> -#include "sbx.hxx" -#include "sbxbase.hxx" -#include "sbxres.hxx" -#include <svl/brdcst.hxx> - */ - - -#ifndef __PROPED_HXX__ -#include <proped.hxx> -#endif -#ifndef _UNO_HXX -#include <usr/uno.hxx> -#endif -#ifndef _USR_SEQU_HXX -#include <usr/sequ.hxx> -#endif -#ifndef __TOOLSIDL_HXX__ -#include <usr/toolsidl.hxx> -#endif - -/* -class XPropertyEditor - : public XInterface -{ -public: - - virtual void setObject(const UsrAny& aToInspectObj) = 0; - - static Uik getSmartUik() { return(385); } -}; -*/ - -class PropertyEditorControler_Impl; -class SvPropertyBox; -class Window; - -class SimplePropertyEditor_Impl : - public XPropertyEditor, - public XPropertyEditorNavigation, - public UsrObject -{ - PropertyEditorControler_Impl* pActiveControler; - SvPropertyBox* mpPropBox; - UsrAny maStartUnoObj; - UsrAny maActiveUnoObj; - - // History der Objekte speichern - AnySequence maHistorySeq; - WSStringSequence maHistoryNames; - UINT32 mnHistoryCount; - INT32 mnActualHistoryLevel; - - // Einfache History via Dummy-Properties - BOOL bSimpleHistory; - - // Methode zum Anlegen/Aktivieren der Controller - void showObject( const UsrAny& aToShowObj ); - String getPath( void ); - -public: - // Provisorischer Ctor mit Parent-Window - SimplePropertyEditor_Impl( Window *pParent ); - ~SimplePropertyEditor_Impl(); - - // HACK fuer History-Test - void enableSimpleHistory( BOOL bHistory_ ) { bSimpleHistory = bHistory_; } - - SMART_UNO_DECLARATION(ImplIntrospection,UsrObject); - - // Methoden von XInterface - XInterface * queryInterface( Uik aUik ); - XIdlClassRef getIdlClass(); - - // Methoden von XPropertyEditor - virtual void setObject(const UsrAny& aToInspectObj, const XubString& aObjName); - - // Methoden von PropertyEditorNavigation - virtual void forward(void); - virtual void back(void); - -}; - - - - diff --git a/svtools/source/dialogs/roadmapwizard.cxx b/svtools/source/dialogs/roadmapwizard.cxx index c28cfe1d4b18..cdf2eef32fdc 100644 --- a/svtools/source/dialogs/roadmapwizard.cxx +++ b/svtools/source/dialogs/roadmapwizard.cxx @@ -31,7 +31,7 @@ #include <svtools/roadmapwizard.hxx> #include <svtools/svtools.hrc> #include <svtools/svtdata.hxx> -#include "roadmap.hxx" +#include <svtools/roadmap.hxx> #include <tools/debug.hxx> #include <stdarg.h> @@ -239,15 +239,15 @@ namespace svt } //-------------------------------------------------------------------- - void RoadmapWizard::SetRoadmapSmartHelpId( const SmartId& _rId, SmartIdUpdateMode _aMode ) + void RoadmapWizard::SetRoadmapHelpId( const rtl::OString& _rId ) { - m_pImpl->pRoadmap->SetSmartHelpId( _rId, _aMode ); + m_pImpl->pRoadmap->SetHelpId( _rId ); } //-------------------------------------------------------------------- - SmartId RoadmapWizard::GetRoadmapSmartHelpId() const + const rtl::OString& RoadmapWizard::GetRoadmapHelpId() const { - return m_pImpl->pRoadmap->GetSmartHelpId(); + return m_pImpl->pRoadmap->GetHelpId(); } //-------------------------------------------------------------------- diff --git a/svtools/source/dialogs/so3res.src b/svtools/source/dialogs/so3res.src index 524b58e0a5df..0d1aa1756267 100644 --- a/svtools/source/dialogs/so3res.src +++ b/svtools/source/dialogs/so3res.src @@ -25,10 +25,11 @@ * ************************************************************************/ -#include "sores.hxx" +#include "svtools/sores.hxx" #define __RSC -#include "soerr.hxx" +#include <svtools/soerr.hxx> #define S_MAX 0x7fff + Resource RID_SO_ERROR_HANDLER { String ERRCODE_SO_GENERALERROR&S_MAX diff --git a/svtools/source/dialogs/wizardmachine.cxx b/svtools/source/dialogs/wizardmachine.cxx index 2053da80019d..41e759eda43b 100644 --- a/svtools/source/dialogs/wizardmachine.cxx +++ b/svtools/source/dialogs/wizardmachine.cxx @@ -197,7 +197,7 @@ namespace svt if (_nButtonFlags & WZB_PREVIOUS) { m_pPrevPage = new PushButton(this, WB_TABSTOP); - m_pPrevPage->SetSmartHelpId( SmartId(HID_WIZARD_PREVIOUS) ); + m_pPrevPage->SetHelpId( HID_WIZARD_PREVIOUS ); m_pPrevPage->SetSizePixel( LogicToPixel( Size( 50, 14 ), MAP_APPFONT ) ); m_pPrevPage->SetText(String(SvtResId(STR_WIZDLG_PREVIOUS))); m_pPrevPage->Show(); @@ -214,7 +214,7 @@ namespace svt if (_nButtonFlags & WZB_NEXT) { m_pNextPage = new PushButton(this, WB_TABSTOP); - m_pNextPage->SetSmartHelpId( SmartId(HID_WIZARD_NEXT) ); + m_pNextPage->SetHelpId( HID_WIZARD_NEXT ); m_pNextPage->SetSizePixel( LogicToPixel( Size( 50, 14 ), MAP_APPFONT ) ); m_pNextPage->SetText(String(SvtResId(STR_WIZDLG_NEXT))); m_pNextPage->Show(); diff --git a/svtools/source/edit/editsyntaxhighlighter.cxx b/svtools/source/edit/editsyntaxhighlighter.cxx index 01bb7ad41682..c211413af925 100644 --- a/svtools/source/edit/editsyntaxhighlighter.cxx +++ b/svtools/source/edit/editsyntaxhighlighter.cxx @@ -31,7 +31,7 @@ #include <svtools/svmedit.hxx> #include <svtools/xtextedt.hxx> #include <svtools/editsyntaxhighlighter.hxx> -#include "../../inc/txtattr.hxx" +#include <svtools/txtattr.hxx> MultiLineEditSyntaxHighlight::MultiLineEditSyntaxHighlight( Window* pParent, WinBits nWinStyle, @@ -193,7 +193,7 @@ void MultiLineEditSyntaxHighlight::UpdateData() GetTextEngine()->RemoveAttribs( nLine, TRUE ); HighlightPortions aPortions; aHighlighter.getHighlightPortions( nLine, aLine, aPortions ); - for ( USHORT i = 0; i < aPortions.Count(); i++ ) + for ( size_t i = 0; i < aPortions.size(); i++ ) { HighlightPortion& r = aPortions[i]; GetTextEngine()->SetAttrib( TextAttribFontColor( GetColorValue(r.tokenType) ), nLine, r.nBegin, r.nEnd, TRUE ); diff --git a/svtools/source/edit/makefile.mk b/svtools/source/edit/makefile.mk deleted file mode 100644 index 58a63be58f78..000000000000 --- a/svtools/source/edit/makefile.mk +++ /dev/null @@ -1,63 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=svtools -TARGET=edit - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svt.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES= \ - $(SLO)$/textdata.obj \ - $(SLO)$/textdoc.obj \ - $(SLO)$/texteng.obj \ - $(SLO)$/textundo.obj \ - $(SLO)$/textview.obj \ - $(SLO)$/txtattr.obj \ - $(SLO)$/xtextedt.obj \ - $(SLO)$/sychconv.obj \ - $(SLO)$/svmedit.obj \ - $(SLO)$/svmedit2.obj \ - $(SLO)$/textwindowpeer.obj \ - $(SLO)$/syntaxhighlight.obj \ - $(SLO)$/editsyntaxhighlighter.obj - -EXCEPTIONSFILES= \ - $(SLO)$/textview.obj \ - $(SLO)$/textdoc.obj \ - $(SLO)$/texteng.obj \ - $(SLO)$/textwindowpeer.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/svtools/source/edit/sychconv.cxx b/svtools/source/edit/sychconv.cxx index 3efa510bfc5a..d72200ac9c42 100644 --- a/svtools/source/edit/sychconv.cxx +++ b/svtools/source/edit/sychconv.cxx @@ -27,7 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#include "sychconv.hxx" +#include <svtools/sychconv.hxx> #include <vcl/outdev.hxx> BOOL SymCharConverter::Convert( Font& rFont, UniString& rString, OutputDevice* pDev ) diff --git a/svtools/source/edit/syntaxhighlight.cxx b/svtools/source/edit/syntaxhighlight.cxx index 5729eb712bfe..6ea9f05d78a1 100644 --- a/svtools/source/edit/syntaxhighlight.cxx +++ b/svtools/source/edit/syntaxhighlight.cxx @@ -34,9 +34,6 @@ #include <tools/debug.hxx> -SV_IMPL_VARARR(HighlightPortions, HighlightPortion) - - // ########################################################################## // ATTENTION: all these words needs to be in small caps // ########################################################################## @@ -526,7 +523,7 @@ BOOL SimpleTokenizer_Impl::getNextToken( /*out*/TokenTypes& reType, c = getChar(); // '/' entfernen // Alle Zeichen bis Zeilen-Ende oder EOF entfernen - sal_Unicode cPeek = peekChar(); + sal_Unicode cPeek = c; while( cPeek != CHAR_EOF && testCharFlags( cPeek, CHAR_EOL ) == FALSE ) { getChar(); @@ -849,7 +846,7 @@ void SimpleTokenizer_Impl::getHighlightPortions( UINT32 nParseLine, const String portion.nEnd = (UINT16)(pEndPos - mpStringBegin); portion.tokenType = eType; - portions.Insert(portion, portions.Count()); + portions.push_back(portion); } } diff --git a/svtools/source/edit/textdata.cxx b/svtools/source/edit/textdata.cxx index 32bdfe40a3fb..cb33ea7d50e6 100644 --- a/svtools/source/edit/textdata.cxx +++ b/svtools/source/edit/textdata.cxx @@ -37,7 +37,7 @@ SV_IMPL_PTRARR( TextLines, TextLinePtr ); SV_IMPL_VARARR( TEWritingDirectionInfos, TEWritingDirectionInfo ); -// ------------------------------------------------------------------------- +// ------------------------------------------------------------------------- // (+) class TextSelection // ------------------------------------------------------------------------- @@ -66,7 +66,7 @@ void TextSelection::Justify() } -// ------------------------------------------------------------------------- +// ------------------------------------------------------------------------- // (+) class TETextPortionList // ------------------------------------------------------------------------- TETextPortionList::TETextPortionList() @@ -129,7 +129,7 @@ USHORT TETextPortionList::GetPortionStartIndex( USHORT nPortion ) */ -// ------------------------------------------------------------------------- +// ------------------------------------------------------------------------- // (+) class TEParaPortion // ------------------------------------------------------------------------- TEParaPortion::TEParaPortion( TextNode* pN ) @@ -254,7 +254,7 @@ void TEParaPortion::CorrectValuesBehindLastFormattedLine( USHORT nLastFormattedL } } -// ------------------------------------------------------------------------- +// ------------------------------------------------------------------------- // (+) class TEParaPortions // ------------------------------------------------------------------------- TEParaPortions::TEParaPortions() @@ -274,7 +274,7 @@ void TEParaPortions::Reset() clear(); } -// ------------------------------------------------------------------------- +// ------------------------------------------------------------------------- // (+) class IdleFormatter // ------------------------------------------------------------------------- IdleFormatter::IdleFormatter() diff --git a/svtools/source/edit/textdoc.cxx b/svtools/source/edit/textdoc.cxx index d4470904077e..1f7fa9745c8c 100644 --- a/svtools/source/edit/textdoc.cxx +++ b/svtools/source/edit/textdoc.cxx @@ -27,7 +27,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" - #include <textdoc.hxx> #include <stdlib.h> diff --git a/svtools/source/edit/textdoc.hxx b/svtools/source/edit/textdoc.hxx index 0c875b4fe07f..258f821beb19 100644 --- a/svtools/source/edit/textdoc.hxx +++ b/svtools/source/edit/textdoc.hxx @@ -30,7 +30,7 @@ #include <svl/svarray.hxx> #include <svtools/textdata.hxx> -#include <txtattr.hxx> +#include <svtools/txtattr.hxx> #include <tools/debug.hxx> #include <tools/string.hxx> diff --git a/svtools/source/edit/txtattr.cxx b/svtools/source/edit/txtattr.cxx index e7466cbe1d85..810132731712 100644 --- a/svtools/source/edit/txtattr.cxx +++ b/svtools/source/edit/txtattr.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#include <txtattr.hxx> +#include <svtools/txtattr.hxx> #include <vcl/font.hxx> diff --git a/svtools/source/filter.vcl/filter/FilterConfigCache.cxx b/svtools/source/filter.vcl/filter/FilterConfigCache.cxx index 4c8023bed883..48408609cf98 100644 --- a/svtools/source/filter.vcl/filter/FilterConfigCache.cxx +++ b/svtools/source/filter.vcl/filter/FilterConfigCache.cxx @@ -46,7 +46,7 @@ using namespace ::com::sun::star::container ; // XNameAccess using namespace ::com::sun::star::uno ; // Reference using namespace ::com::sun::star::beans ; // PropertyValue using namespace ::utl ; // getProcessServiceFactory(); -using namespace ::rtl ; +using ::rtl::OUString; const char* FilterConfigCache::FilterConfigCacheEntry::InternalPixelFilterNameList[] = { diff --git a/svtools/source/filter.vcl/filter/FilterConfigItem.cxx b/svtools/source/filter.vcl/filter/FilterConfigItem.cxx index 765711ad8d4a..312f62af9d84 100644 --- a/svtools/source/filter.vcl/filter/FilterConfigItem.cxx +++ b/svtools/source/filter.vcl/filter/FilterConfigItem.cxx @@ -38,7 +38,7 @@ #include <com/sun/star/beans/XPropertySetInfo.hpp> #include <com/sun/star/container/XHierarchicalNameAccess.hpp> -using namespace ::rtl; +using ::rtl::OUString; using namespace ::utl ; // getProcessServiceFactory using namespace ::com::sun::star::lang ; // XMultiServiceFactory using namespace ::com::sun::star::beans ; // PropertyValue diff --git a/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.cxx b/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.cxx index 038930ef80ee..1c4eeeff1bbf 100644 --- a/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.cxx +++ b/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.cxx @@ -36,9 +36,7 @@ #include <osl/module.hxx> #include <svl/solar.hrc> #include <svtools/fltcall.hxx> -#include "dlgexpor.hxx" -#include "dlgejpg.hxx" -#include "dlgepng.hxx" +#include "exportdialog.hxx" #include <uno/mapping.hxx> #include <com/sun/star/frame/XModel.hpp> #include <com/sun/star/document/XViewDataSupplier.hpp> @@ -49,12 +47,6 @@ #include <unotools/syslocale.hxx> #include "vcl/svapp.hxx" -#if defined WIN || (defined OS2 && !defined ICC) -#define EXPDLG_FUNCTION_NAME "_DoExportDialog" -#else -#define EXPDLG_FUNCTION_NAME "DoExportDialog" -#endif - using namespace ::rtl; using namespace ::com::sun::star; @@ -93,9 +85,10 @@ uno::Sequence< OUString > SAL_CALL SvFilterOptionsDialog_getSupportedServiceName // ----------------------------------------------------------------------------- -SvFilterOptionsDialog::SvFilterOptionsDialog( const uno::Reference< lang::XMultiServiceFactory > & xMgr ) : - rxMgr ( xMgr ), - eFieldUnit ( FUNIT_CM ) +SvFilterOptionsDialog::SvFilterOptionsDialog( const uno::Reference< lang::XMultiServiceFactory > xMgr ) : + mxMgr ( xMgr ), + meFieldUnit ( FUNIT_CM ), + mbExportSelection ( sal_False ) { } @@ -148,18 +141,18 @@ uno::Sequence< beans::PropertyValue > SvFilterOptionsDialog::getPropertyValues() throw ( uno::RuntimeException ) { sal_Int32 i, nCount; - for ( i = 0, nCount = aMediaDescriptor.getLength(); i < nCount; i++ ) + for ( i = 0, nCount = maMediaDescriptor.getLength(); i < nCount; i++ ) { - if ( aMediaDescriptor[ i ].Name.equalsAscii( "FilterData" ) ) + if ( maMediaDescriptor[ i ].Name.equalsAscii( "FilterData" ) ) break; } if ( i == nCount ) - aMediaDescriptor.realloc( ++nCount ); + maMediaDescriptor.realloc( ++nCount ); // the "FilterData" Property is an Any that will contain our PropertySequence of Values - aMediaDescriptor[ i ].Name = String( RTL_CONSTASCII_USTRINGPARAM( "FilterData" ) ); - aMediaDescriptor[ i ].Value <<= aFilterDataSequence; - return aMediaDescriptor; + maMediaDescriptor[ i ].Name = String( RTL_CONSTASCII_USTRINGPARAM( "FilterData" ) ); + maMediaDescriptor[ i ].Value <<= maFilterDataSequence; + return maMediaDescriptor; } void SvFilterOptionsDialog::setPropertyValues( const uno::Sequence< beans::PropertyValue > & aProps ) @@ -167,15 +160,18 @@ void SvFilterOptionsDialog::setPropertyValues( const uno::Sequence< beans::Prope lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException ) { - aMediaDescriptor = aProps; + maMediaDescriptor = aProps; sal_Int32 i, nCount; - for ( i = 0, nCount = aMediaDescriptor.getLength(); i < nCount; i++ ) + for ( i = 0, nCount = maMediaDescriptor.getLength(); i < nCount; i++ ) { - if ( aMediaDescriptor[ i ].Name.equalsAscii( "FilterData" ) ) + if ( maMediaDescriptor[ i ].Name.equalsAscii( "FilterData" ) ) { - aMediaDescriptor[ i ].Value >>= aFilterDataSequence; - break; + maMediaDescriptor[ i ].Value >>= maFilterDataSequence; + } + else if ( maMediaDescriptor[ i ].Name.equalsAscii( "SelectionOnly" ) ) + { + maMediaDescriptor[ i ].Value >>= mbExportSelection; } } } @@ -184,7 +180,7 @@ void SvFilterOptionsDialog::setPropertyValues( const uno::Sequence< beans::Prope void SvFilterOptionsDialog::setTitle( const OUString& aTitle ) throw ( uno::RuntimeException ) { - aDialogTitle = aTitle; + maDialogTitle = aTitle; } sal_Int16 SvFilterOptionsDialog::execute() @@ -194,13 +190,13 @@ sal_Int16 SvFilterOptionsDialog::execute() String aFilterNameStr( RTL_CONSTASCII_USTRINGPARAM( "FilterName" ) ); String aInternalFilterName; - sal_Int32 j, nCount = aMediaDescriptor.getLength(); + sal_Int32 j, nCount = maMediaDescriptor.getLength(); for ( j = 0; j < nCount; j++ ) { - if ( aMediaDescriptor[ j ].Name.equals( aFilterNameStr ) ) + if ( maMediaDescriptor[ j ].Name.equals( aFilterNameStr ) ) { OUString aStr; - aMediaDescriptor[ j ].Value >>= aStr; + maMediaDescriptor[ j ].Value >>= aStr; aInternalFilterName = aStr; aInternalFilterName.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "draw_" ) ), String(), 0 ); aInternalFilterName.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "impress_" ) ), String(), 0 ); @@ -219,79 +215,24 @@ sal_Int16 SvFilterOptionsDialog::execute() } if ( nFormat < nFilterCount ) { - FltCallDialogParameter aFltCallDlgPara( Application::GetDefDialogParent(), NULL, eFieldUnit ); - aFltCallDlgPara.aFilterData = aFilterDataSequence; - - String aFilterName( aGraphicFilter.pConfig->GetExportFilterName( nFormat ) ); - if ( aGraphicFilter.pConfig->IsExportInternalFilter( nFormat ) ) - { - // Export-Dialog fuer Bitmap's, SVM's und WMF's - if( ( aFilterName.EqualsIgnoreCaseAscii( EXP_BMP ) ) || - ( aFilterName.EqualsIgnoreCaseAscii( EXP_SVMETAFILE ) ) || - ( aFilterName.EqualsIgnoreCaseAscii( EXP_WMF ) ) || - ( aFilterName.EqualsIgnoreCaseAscii( EXP_EMF ) ) || - ( aFilterName.EqualsIgnoreCaseAscii( EXP_JPEG ) )|| - ( aFilterName.EqualsIgnoreCaseAscii( EXP_PNG ) ) ) - { - ByteString aResMgrName( "svt", 3 ); - ResMgr* pResMgr; - - pResMgr = ResMgr::CreateResMgr( aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() ); - aFltCallDlgPara.pResMgr = pResMgr; - // JPEG-Dialog - if( aFilterName.EqualsIgnoreCaseAscii( EXP_JPEG ) ) - { - if ( DlgExportEJPG( aFltCallDlgPara ).Execute() == RET_OK ) - nRet = ui::dialogs::ExecutableDialogResults::OK; - } - else if ( aFilterName.EqualsIgnoreCaseAscii( EXP_PNG ) ) - { - if ( DlgExportEPNG( aFltCallDlgPara ).Execute() == RET_OK ) - nRet = ui::dialogs::ExecutableDialogResults::OK; - } - else if( aFilterName.EqualsIgnoreCaseAscii( EXP_BMP ) ) - { - // Fuer Vektorformate nehmen wir den Vektor-Dialog - aFltCallDlgPara.aFilterExt = aGraphicFilter.pConfig->GetExportFormatShortName( nFormat ); - if ( DlgExportPix( aFltCallDlgPara ).Execute() == RET_OK ) - nRet = ui::dialogs::ExecutableDialogResults::OK; - } - else - { - aFltCallDlgPara.aFilterExt = aGraphicFilter.pConfig->GetExportFormatShortName( nFormat ); - if ( DlgExportVec( aFltCallDlgPara ).Execute() == RET_OK ) - nRet = ui::dialogs::ExecutableDialogResults::OK; - } - delete pResMgr; - } - } - else // ladbare Filter - { - xub_StrLen i, nTokenCount = aGraphicFilter.aFilterPath.GetTokenCount( ';' ); - for ( i = 0; i < nTokenCount; i++ ) - { - - OUString aPathURL; - - ::osl::FileBase::getFileURLFromSystemPath( aGraphicFilter.aFilterPath.GetToken( i ), aPathURL ); - aPathURL += String( '/' ); - - OUString aSystemPath; - ::osl::FileBase::getSystemPathFromFileURL( aPathURL, aSystemPath ); - aSystemPath += OUString( aFilterName ); - - osl::Module aLibrary( aSystemPath ); - PFilterDlgCall pFunc = (PFilterDlgCall) aLibrary.getFunctionSymbol( UniString::CreateFromAscii( EXPDLG_FUNCTION_NAME ) ); - // Dialog in DLL ausfuehren - if( pFunc ) - { - if ( (*pFunc)( aFltCallDlgPara ) ) - nRet = ui::dialogs::ExecutableDialogResults::OK; - } - } - } + FltCallDialogParameter aFltCallDlgPara( Application::GetDefDialogParent(), NULL, meFieldUnit ); + aFltCallDlgPara.aFilterData = maFilterDataSequence; + + ByteString aResMgrName( "svt", 3 ); + ResMgr* pResMgr; + + pResMgr = ResMgr::CreateResMgr( aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() ); + aFltCallDlgPara.pResMgr = pResMgr; + + aFltCallDlgPara.aFilterExt = aGraphicFilter.pConfig->GetExportFormatShortName( nFormat ); + sal_Bool bIsPixelFormat( aGraphicFilter.pConfig->IsExportPixelFormat( nFormat ) ); + if ( ExportDialog( aFltCallDlgPara, mxMgr, mxSourceDocument, mbExportSelection, bIsPixelFormat ).Execute() == RET_OK ) + nRet = ui::dialogs::ExecutableDialogResults::OK; + + delete pResMgr; + // taking the out parameter from the dialog - aFilterDataSequence = aFltCallDlgPara.aFilterData; + maFilterDataSequence = aFltCallDlgPara.aFilterData; } } return nRet; @@ -301,6 +242,8 @@ sal_Int16 SvFilterOptionsDialog::execute() void SvFilterOptionsDialog::setSourceDocument( const uno::Reference< lang::XComponent >& xDoc ) throw ( lang::IllegalArgumentException, uno::RuntimeException ) { + mxSourceDocument = xDoc; + // try to set the corresponding metric unit String aConfigPath; uno::Reference< lang::XServiceInfo > xServiceInfo @@ -320,7 +263,7 @@ void SvFilterOptionsDialog::setSourceDocument( const uno::Reference< lang::XComp aPropertyName = String( RTL_CONSTASCII_USTRINGPARAM( "Metric" ) ); else aPropertyName = String( RTL_CONSTASCII_USTRINGPARAM( "NonMetric" ) ); - eFieldUnit = (FieldUnit)aConfigItem.ReadInt32( aPropertyName, FUNIT_CM ); + meFieldUnit = (FieldUnit)aConfigItem.ReadInt32( aPropertyName, FUNIT_CM ); } } } diff --git a/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.hxx b/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.hxx index a55fc4c84520..027fac99c2e8 100644 --- a/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.hxx +++ b/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.hxx @@ -28,7 +28,7 @@ #ifndef _SV_FILTER_OPTIONS_DIALOG_HXX_ #define _SV_FILTER_OPTIONS_DIALOG_HXX_ -#include <vcl/fldunit.hxx> +#include <tools/fldunit.hxx> #include <cppuhelper/implbase5.hxx> #include <com/sun/star/lang/XInitialization.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> @@ -46,18 +46,22 @@ class SvFilterOptionsDialog : public cppu::WeakImplHelper5 com::sun::star::lang::XServiceInfo > { - const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > & - rxMgr; + const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > + mxMgr; com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > - aMediaDescriptor; + maMediaDescriptor; com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > - aFilterDataSequence; - rtl::OUString aDialogTitle; - FieldUnit eFieldUnit; + maFilterDataSequence; + com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > + mxSourceDocument; + + rtl::OUString maDialogTitle; + FieldUnit meFieldUnit; + sal_Bool mbExportSelection; public: - SvFilterOptionsDialog( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB ); + SvFilterOptionsDialog( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > _rxORB ); ~SvFilterOptionsDialog(); // XInterface diff --git a/svtools/source/filter.vcl/filter/dlgejpg.cxx b/svtools/source/filter.vcl/filter/dlgejpg.cxx deleted file mode 100644 index 377697023de3..000000000000 --- a/svtools/source/filter.vcl/filter/dlgejpg.cxx +++ /dev/null @@ -1,96 +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. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_svtools.hxx" -#include "dlgejpg.hxx" -#include "dlgejpg.hrc" -#include "strings.hrc" -#include <svtools/FilterConfigItem.hxx> - -#define KEY_QUALITY "Quality" -#define KEY_GRAYSCALES "ColorMode" - -/************************************************************************* -|* -|* Ctor -|* -\************************************************************************/ - -DlgExportEJPG::DlgExportEJPG( FltCallDialogParameter& rPara ) : - ModalDialog ( rPara.pWindow, ResId( DLG_EXPORT_JPG, *rPara.pResMgr ) ), - rFltCallPara ( rPara ), - aFiDescr ( this, ResId( FI_DESCR, *rPara.pResMgr ) ), - aNumFldQuality ( this, ResId( NUM_FLD_QUALITY, *rPara.pResMgr ) ), - aGrpQuality ( this, ResId( GRP_QUALITY, *rPara.pResMgr ) ), - aRbGray ( this, ResId( RB_GRAY, *rPara.pResMgr ) ), - aRbRGB ( this, ResId( RB_RGB, *rPara.pResMgr ) ), - aGrpColors ( this, ResId( GRP_COLORS, *rPara.pResMgr ) ), - aBtnOK ( this, ResId( BTN_OK, *rPara.pResMgr ) ), - aBtnCancel ( this, ResId( BTN_CANCEL, *rPara.pResMgr ) ), - aBtnHelp ( this, ResId( BTN_HELP, *rPara.pResMgr ) ) -{ - FreeResource(); - String aFilterConfigPath( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Filter/Graphic/Export/JPG" ) ); - pConfigItem = new FilterConfigItem( aFilterConfigPath, &rPara.aFilterData ); - - // reading filter options - sal_Int32 nQuality = pConfigItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( KEY_QUALITY ) ), 75 ); - sal_Int32 nColorMode = pConfigItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( KEY_GRAYSCALES ) ), 0 ); - aNumFldQuality.SetValue( nQuality ); - - if ( nColorMode ) - aRbGray.Check( sal_True ); - else - aRbRGB.Check( sal_True ); - - aBtnOK.SetClickHdl( LINK( this, DlgExportEJPG, OK ) ); -} - - -/************************************************************************* -|* -|* Speichert eingestellte Werte in ini-Datei -|* -\************************************************************************/ - -IMPL_LINK( DlgExportEJPG, OK, void *, EMPTYARG ) -{ - // Config-Parameter schreiben - pConfigItem->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( KEY_QUALITY ) ), (sal_Int32)aNumFldQuality.GetValue() ); - pConfigItem->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( KEY_GRAYSCALES ) ), aRbGray.IsChecked() ? 1 : 0 ); - rFltCallPara.aFilterData = pConfigItem->GetFilterData(); - EndDialog( RET_OK ); - return 0; -} - -DlgExportEJPG::~DlgExportEJPG() -{ - delete pConfigItem; -} - - diff --git a/svtools/source/filter.vcl/filter/dlgejpg.hxx b/svtools/source/filter.vcl/filter/dlgejpg.hxx deleted file mode 100644 index d80682574a54..000000000000 --- a/svtools/source/filter.vcl/filter/dlgejpg.hxx +++ /dev/null @@ -1,72 +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 _DLGEJPG_HXX_ -#define _DLGEJPG_HXX_ - -#include <vcl/dialog.hxx> -#include <vcl/button.hxx> -#include <vcl/fixed.hxx> -#include <vcl/field.hxx> -#include <vcl/lstbox.hxx> -#include <vcl/msgbox.hxx> -#include <svtools/stdctrl.hxx> -#include <svtools/fltcall.hxx> - -/************************************************************************* -|* -|* Dialog zum Einstellen von Filteroptionen -|* -\************************************************************************/ -class FilterConfigItem; -class DlgExportEJPG : public ModalDialog -{ -private: - - FltCallDialogParameter& rFltCallPara; - - FixedInfo aFiDescr; - NumericField aNumFldQuality; - FixedLine aGrpQuality; - RadioButton aRbGray; - RadioButton aRbRGB; - FixedLine aGrpColors; - OKButton aBtnOK; - CancelButton aBtnCancel; - HelpButton aBtnHelp; - FilterConfigItem* pConfigItem; - - DECL_LINK( OK, void * ); - -public: - DlgExportEJPG( FltCallDialogParameter& rDlgPara ); - ~DlgExportEJPG(); -}; - -#endif // _DLGEJPG_HXX_ - diff --git a/svtools/source/filter.vcl/filter/dlgejpg.src b/svtools/source/filter.vcl/filter/dlgejpg.src deleted file mode 100644 index fd224f22c409..000000000000 --- a/svtools/source/filter.vcl/filter/dlgejpg.src +++ /dev/null @@ -1,136 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include "dlgejpg.hrc" -ModalDialog DLG_EXPORT_JPG -{ - OutputSize = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( 159 , 92 ) ; - Text [ en-US ] = "JPEG Options" ; - Moveable = TRUE ; - Closeable = TRUE ; - OKButton BTN_OK - { - Pos = MAP_APPFONT ( 103 , 6 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - DefButton = TRUE ; - }; - CancelButton BTN_CANCEL - { - Pos = MAP_APPFONT ( 103 , 23 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - HelpButton BTN_HELP - { - Pos = MAP_APPFONT ( 103 , 43 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - FixedLine GRP_QUALITY - { - Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( 90 , 8 ) ; - Text [ en-US ] = "Quality" ; - }; - FixedText FI_DESCR - { - Pos = MAP_APPFONT ( 12 , 14 ) ; - Size = MAP_APPFONT ( 81 , 16 ) ; - Text [ en-US ] = "1: min. quality\n100: max. quality" ; - }; - NumericField NUM_FLD_QUALITY - { - Border = TRUE ; - Pos = MAP_APPFONT ( 12 , 33 ) ; - Size = MAP_APPFONT ( 50 , 12 ) ; - TabStop = TRUE ; - Spin = TRUE ; - Minimum = 1; - Maximum = 100 ; - StrictFormat = TRUE ; - Last = 100 ; - Repeat = TRUE ; - }; - FixedLine GRP_COLORS - { - Pos = MAP_APPFONT ( 6 , 51 ) ; - Size = MAP_APPFONT ( 90 , 8 ) ; - Text [ en-US ] = "Color resolution" ; - }; - RadioButton RB_GRAY - { - Pos = MAP_APPFONT ( 12 , 62 ) ; - Size = MAP_APPFONT ( 81 , 10 ) ; - TabStop = TRUE ; - Text [ en-US ] = "Grayscale" ; - }; - RadioButton RB_RGB - { - Pos = MAP_APPFONT ( 12 , 76 ) ; - Size = MAP_APPFONT ( 81 , 10 ) ; - TabStop = TRUE ; - Text [ en-US ] = "True Colors" ; - }; -}; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/svtools/source/filter.vcl/filter/dlgepng.cxx b/svtools/source/filter.vcl/filter/dlgepng.cxx deleted file mode 100644 index bd551e9a4bda..000000000000 --- a/svtools/source/filter.vcl/filter/dlgepng.cxx +++ /dev/null @@ -1,90 +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. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_svtools.hxx" -#include <tools/ref.hxx> -#include <vcl/msgbox.hxx> -#include "dlgepng.hxx" -#include "dlgepng.hrc" - -using namespace ::rtl; -using namespace ::com::sun::star::uno; - -/************************************************************************* -|* -|* Ctor -|* -\************************************************************************/ - -DlgExportEPNG::DlgExportEPNG( FltCallDialogParameter& rPara ) : - ModalDialog ( rPara.pWindow, ResId( DLG_EXPORT_EPNG, *rPara.pResMgr ) ), - FilterConfigItem ( OUString( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Filter/Graphic/Export/PNG" ) ), &rPara.aFilterData ), - rFltCallPara ( rPara ), - aGrpCompression ( this, ResId( GRP_COMPRESSION, *rPara.pResMgr ) ), - aFiCompression ( this, ResId( FI_COMPRESSION, *rPara.pResMgr ) ), - aNumCompression ( this, ResId( NUM_COMPRESSION, *rPara.pResMgr ) ), - aCbxInterlaced ( this, ResId( CBX_INTERLACED, *rPara.pResMgr ) ), - aBtnOK ( this, ResId( BTN_OK, *rPara.pResMgr ) ), - aBtnCancel ( this, ResId( BTN_CANCEL, *rPara.pResMgr ) ), - aBtnHelp ( this, ResId( BTN_HELP, *rPara.pResMgr ) ), - pMgr ( rPara.pResMgr ) -{ - FreeResource(); - - // Config-Parameter lesen - sal_Int32 nCompression = ReadInt32( OUString( RTL_CONSTASCII_USTRINGPARAM( "Compression" ) ), 6 ); - if ( ( nCompression < 0 ) || ( nCompression > 9 ) ) - nCompression = 6; - aNumCompression.SetValue( nCompression ); - - sal_Int32 nInterlaced = ReadInt32( OUString( RTL_CONSTASCII_USTRINGPARAM( "Interlaced" ) ), 0 ); - sal_Bool bInterlaced = nInterlaced != 0; - aCbxInterlaced.Check( bInterlaced ); - - aBtnOK.SetClickHdl( LINK( this, DlgExportEPNG, OK ) ); -} - -/************************************************************************* -|* -|* Speichert eingestellte Werte in ini-Datei -|* -\************************************************************************/ - -IMPL_LINK( DlgExportEPNG, OK, void *, EMPTYARG ) -{ - // Config-Parameter schreiben - WriteInt32( OUString( RTL_CONSTASCII_USTRINGPARAM( "Compression" ) ), static_cast<sal_Int32>(aNumCompression.GetValue()) ); - sal_Int32 nInterlace = 0; - if ( aCbxInterlaced.IsChecked() ) - nInterlace++; - WriteInt32( OUString( RTL_CONSTASCII_USTRINGPARAM( "Interlaced" ) ), nInterlace ); - rFltCallPara.aFilterData = GetFilterData(); - EndDialog( RET_OK ); - - return 0; -} diff --git a/svtools/source/filter.vcl/filter/dlgepng.hrc b/svtools/source/filter.vcl/filter/dlgepng.hrc deleted file mode 100644 index b3ffaab3ab1e..000000000000 --- a/svtools/source/filter.vcl/filter/dlgepng.hrc +++ /dev/null @@ -1,35 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#include <svtools/svtools.hrc> - -#define BTN_OK 1 -#define BTN_CANCEL 1 -#define BTN_HELP 1 -#define GRP_COMPRESSION 1 -#define FI_COMPRESSION 1 -#define NUM_COMPRESSION 1 -#define CBX_INTERLACED 1 diff --git a/svtools/source/filter.vcl/filter/dlgepng.hxx b/svtools/source/filter.vcl/filter/dlgepng.hxx deleted file mode 100644 index 469985afee59..000000000000 --- a/svtools/source/filter.vcl/filter/dlgepng.hxx +++ /dev/null @@ -1,71 +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 _DLGEPNG_HXX_ -#define _DLGEPNG_HXX_ -#include <svtools/fltcall.hxx> -#include <vcl/dialog.hxx> -#include <vcl/button.hxx> -#include <vcl/fixed.hxx> -#include <vcl/field.hxx> -#include <svtools/stdctrl.hxx> -#include <svtools/FilterConfigItem.hxx> - - -/************************************************************************* -|* -|* Dialog zum Einstellen von Filteroptionen -|* -\************************************************************************/ - -class ResMgr; - -class DlgExportEPNG : public ModalDialog, FilterConfigItem -{ - - private: - - FltCallDialogParameter& rFltCallPara; - - FixedLine aGrpCompression; - FixedInfo aFiCompression; - NumericField aNumCompression; - CheckBox aCbxInterlaced; - OKButton aBtnOK; - CancelButton aBtnCancel; - HelpButton aBtnHelp; - ResMgr* pMgr; - - DECL_LINK( OK, void * ); - - public: - - DlgExportEPNG( FltCallDialogParameter& rPara ); -}; - -#endif // _DLGEPNG_HXX_ diff --git a/svtools/source/filter.vcl/filter/dlgepng.src b/svtools/source/filter.vcl/filter/dlgepng.src deleted file mode 100644 index aa778842dc48..000000000000 --- a/svtools/source/filter.vcl/filter/dlgepng.src +++ /dev/null @@ -1,119 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include "dlgepng.hrc" -ModalDialog DLG_EXPORT_EPNG -{ - OutputSize = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( 169 , 64 ) ; - Moveable = TRUE ; - Closeable = TRUE ; - Text [ en-US ] = "PNG Options" ; - OKButton BTN_OK - { - Pos = MAP_APPFONT ( 113 , 6 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - DefButton = TRUE ; - }; - CancelButton BTN_CANCEL - { - Pos = MAP_APPFONT ( 113 , 23 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - HelpButton BTN_HELP - { - Pos = MAP_APPFONT ( 113 , 43 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - FixedLine GRP_COMPRESSION - { - Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( 100 , 8 ) ; - Text[ en-US ] = "Mode"; - }; - FixedText FI_COMPRESSION - { - Pos = MAP_APPFONT ( 12 , 14 ) ; - Size = MAP_APPFONT ( 80 , 8 ) ; - Text[ en-US ] = "~Compression 0..9"; - }; - NumericField NUM_COMPRESSION - { - Border = TRUE ; - Pos = MAP_APPFONT ( 12 , 25 ) ; - Size = MAP_APPFONT ( 40 , 12 ) ; - TabStop = TRUE ; - Spin = TRUE ; - Minimum = 0 ; - Maximum = 9 ; - First = 0 ; - Last = 9 ; - StrictFormat = TRUE ; - Repeat = TRUE ; - }; - CheckBox CBX_INTERLACED - { - Pos = MAP_APPFONT ( 12 , 43 ) ; - Size = MAP_APPFONT ( 80 , 12 ) ; - TabStop = TRUE ; - Text [ en-US ] = "~Interlaced" ; - }; -}; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/svtools/source/filter.vcl/filter/dlgexpor.cxx b/svtools/source/filter.vcl/filter/dlgexpor.cxx deleted file mode 100644 index b4b7c0fc949d..000000000000 --- a/svtools/source/filter.vcl/filter/dlgexpor.cxx +++ /dev/null @@ -1,442 +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. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_svtools.hxx" - -#ifndef GCC -# pragma hdrstop -#endif - -#include <tools/ref.hxx> -#include <svtools/FilterConfigItem.hxx> -#include <com/sun/star/awt/Size.hpp> -#include <vcl/msgbox.hxx> -#include "dlgexpor.hxx" -#include "dlgexpor.hrc" -#include "strings.hrc" - -/************************************************************************* -|* -|* Ctor -|* -\************************************************************************/ - -DlgExportPix::DlgExportPix( FltCallDialogParameter& rPara ) : - ModalDialog ( rPara.pWindow, ResId( DLG_EXPORT_PIX, *rPara.pResMgr ) ), - rFltCallPara ( rPara ), - aBtnOK ( this, ResId( BTN_OK_PIX, *rPara.pResMgr ) ), - aBtnCancel ( this, ResId( BTN_CANCEL_PIX, *rPara.pResMgr ) ), - aBtnHelp ( this, ResId( BTN_HELP_PIX, *rPara.pResMgr ) ), - aLbColors ( this, ResId( LB_COLORS, *rPara.pResMgr ) ), - aCbxRLE ( this, ResId( CBX_RLE, *rPara.pResMgr ) ), - aGrpColors ( this, ResId( GRP_COLORS, *rPara.pResMgr ) ), - aRbOriginal ( this, ResId( RB_ORIGINAL_PIX, *rPara.pResMgr ) ), - aRbRes ( this, ResId( RB_RES_PIX, *rPara.pResMgr ) ), - aRbSize ( this, ResId( RB_SIZE_PIX, *rPara.pResMgr ) ), - aFtSizeX ( this, ResId( FT_SIZEX_PIX, *rPara.pResMgr ) ), - aMtfSizeX ( this, ResId( MTF_SIZEX_PIX, *rPara.pResMgr ) ), - aFtSizeY ( this, ResId( FT_SIZEY_PIX, *rPara.pResMgr ) ), - aMtfSizeY ( this, ResId( MTF_SIZEY_PIX, *rPara.pResMgr ) ), - aGrpMode ( this, ResId( GRP_MODE_PIX, *rPara.pResMgr ) ), - aCbbRes ( this, ResId( CBB_RES_PIX, *rPara.pResMgr ) ), - pMgr ( rPara.pResMgr ), - aExt ( rPara.aFilterExt ) -{ - aExt.ToUpperAscii(); - String aFilterConfigPath( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Filter/Graphic/Export/" ) ); - aFilterConfigPath.Append( aExt ); - pConfigItem = new FilterConfigItem( aFilterConfigPath, &rPara.aFilterData ); - - String aTitle( aExt ); - FreeResource(); - - aBtnOK.SetClickHdl( LINK( this, DlgExportPix, OK ) ); - aRbOriginal.SetClickHdl( LINK( this, DlgExportPix, ClickRbOriginal ) ); - aRbRes.SetClickHdl( LINK( this, DlgExportPix, ClickRbRes ) ); - aRbSize.SetClickHdl( LINK( this, DlgExportPix, ClickRbSize ) ); - aLbColors.SetSelectHdl( LINK( this, DlgExportPix, SelectLbColors ) ); - - aTitle.ToUpperAscii(); - aTitle += String( ResId( EXPORT_DIALOG_TITLE, *pMgr ) ); - SetText( aTitle ); - - // Config-Parameter lesen - sal_Int32 nColors = pConfigItem->ReadInt32( String( ResId( KEY_COLORS, *pMgr ) ), 0 ); - sal_Int32 nMode = pConfigItem->ReadInt32( String( ResId( KEY_MODE, *pMgr ) ), 0 ); - sal_Int32 nRes = pConfigItem->ReadInt32( String( ResId( KEY_RES, *pMgr ) ), 75 ); - sal_Bool bRleCoding = pConfigItem->ReadBool( String( ResId( KEY_RLE_CODING, *pMgr ) ), sal_True ); - - aLbColors.SelectEntryPos( Min( (sal_uInt16) 7, (sal_uInt16)nColors ) ); - - String aStrRes( String::CreateFromInt32( nRes ) ); - aStrRes.Append( String( RTL_CONSTASCII_USTRINGPARAM( " DPI" ) ) ); - aCbbRes.SetText( aStrRes ); - - ::com::sun::star::awt::Size aDefault( 10000, 10000 ); - ::com::sun::star::awt::Size aSize; - aSize = pConfigItem->ReadSize( String( ResId( KEY_SIZE, *pMgr ) ), aDefault ); - - aCbxRLE.Check( bRleCoding ); - - aMtfSizeX.SetDefaultUnit( FUNIT_MM ); - aMtfSizeY.SetDefaultUnit( FUNIT_MM ); - - aMtfSizeX.SetValue( aSize.Width ); - aMtfSizeY.SetValue( aSize.Height ); - - switch ( rPara.eFieldUnit ) - { -// case FUNIT_NONE : -// case FUNIT_KM : -// case FUNIT_PERCENT : -// case FUNIT_CUSTOM : -// case FUNIT_MILE : -// case FUNIT_FOOT : -// case FUNIT_M : - case FUNIT_MM : - case FUNIT_CM : - case FUNIT_TWIP : - case FUNIT_POINT : - case FUNIT_PICA : - case FUNIT_INCH : - case FUNIT_100TH_MM : - { - aMtfSizeX.SetUnit( rPara.eFieldUnit ); - aMtfSizeY.SetUnit( rPara.eFieldUnit ); - } - break; - - default: - break; // -Wall multiple values not handled. - } - - switch ( nMode ) - { - case 2 : - { - aRbSize.Check( TRUE ); - ClickRbSize( NULL ); - } - break; - case 1 : - { - aRbRes.Check( TRUE ); - ClickRbRes( NULL ); - } - break; - default : - { - aRbOriginal.Check( TRUE ); - ClickRbOriginal( NULL ); - } - break; - } - SelectLbColors( &aLbColors ); -} - -DlgExportPix::~DlgExportPix() -{ - delete pConfigItem; -} - - -/************************************************************************* -|* -|* Speichert eingestellte Werte in ini-Datei -|* -\************************************************************************/ - -IMPL_LINK( DlgExportPix, OK, void *, EMPTYARG ) -{ - // Config-Parameter schreiben - - sal_Int32 nRes = Max( Min( aCbbRes.GetText().ToInt32(), sal_Int32( 600 ) ), sal_Int32( 75 ) ); - ::com::sun::star::awt::Size aSize( - static_cast<long>(MetricField::ConvertDoubleValue( static_cast<double>(aMtfSizeX.GetValue()), 2, aMtfSizeX.GetUnit(), MAP_100TH_MM )), - static_cast<long>(MetricField::ConvertDoubleValue( static_cast<double>(aMtfSizeY.GetValue()), 2, aMtfSizeY.GetUnit(), MAP_100TH_MM )) ); - - sal_Int32 nMode; - if ( aRbRes.IsChecked() ) - nMode = 1; - else if ( aRbSize.IsChecked() ) - nMode = 2; - else - nMode = 0; - - pConfigItem->WriteInt32( String( ResId( KEY_MODE, *pMgr ) ), nMode ); - pConfigItem->WriteInt32( String( ResId( KEY_RES, *pMgr ) ), nRes ); - pConfigItem->WriteSize( String( ResId( KEY_SIZE, *pMgr ) ), aSize ); - pConfigItem->WriteInt32( String( ResId( KEY_COLORS, *pMgr ) ), (sal_Int32)aLbColors.GetSelectEntryPos() ); - pConfigItem->WriteBool( String( ResId( KEY_RLE_CODING, *pMgr ) ), aCbxRLE.IsChecked() ); - rFltCallPara.aFilterData = pConfigItem->GetFilterData(); - EndDialog( RET_OK ); - - return 0; -} - -/************************************************************************* -|* -|* Enabled/Disabled Controls -|* -\************************************************************************/ - -IMPL_LINK( DlgExportPix, ClickRbOriginal, void*, EMPTYARG ) -{ - aCbbRes.Disable(); - - aFtSizeX.Disable(); - aMtfSizeX.Disable(); - aFtSizeY.Disable(); - aMtfSizeY.Disable(); - - return 0; -} - - -/************************************************************************* -|* -|* Enabled/Disabled Controls -|* -\************************************************************************/ - -IMPL_LINK( DlgExportPix, ClickRbRes, void*, EMPTYARG ) -{ - aCbbRes.Enable(); - - aFtSizeX.Disable(); - aMtfSizeX.Disable(); - aFtSizeY.Disable(); - aMtfSizeY.Disable(); - - return 0; -} - - -/************************************************************************* -|* -|* Enabled/Disabled Controls -|* -\************************************************************************/ - -IMPL_LINK( DlgExportPix, ClickRbSize, void*, EMPTYARG ) -{ - aFtSizeX.Enable(); - aMtfSizeX.Enable(); - aFtSizeY.Enable(); - aMtfSizeY.Enable(); - - aCbbRes.Disable(); - - return 0; -} - - -/************************************************************************* -|* -|* Enabled/Disabled Controls -|* -\************************************************************************/ - -IMPL_LINK( DlgExportPix, SelectLbColors, void*, EMPTYARG ) -{ - const USHORT nLbPos = aLbColors.GetSelectEntryPos(); - - if ( ( nLbPos >= 3 ) && ( nLbPos <= 6 ) ) - aCbxRLE.Enable(); - else - aCbxRLE.Disable(); - - return 0L; -} - - -/******************************************************************************/ - - -/************************************************************************* -|* -|* Ctor -|* -\************************************************************************/ - -DlgExportVec::DlgExportVec( FltCallDialogParameter& rPara ) : - ModalDialog ( rPara.pWindow, ResId( DLG_EXPORT_VEC, *rPara.pResMgr ) ), - rFltCallPara ( rPara ), - aBtnOK ( this, ResId( BTN_OK_VEC, *rPara.pResMgr ) ), - aBtnCancel ( this, ResId( BTN_CANCEL_VEC, *rPara.pResMgr ) ), - aBtnHelp ( this, ResId( BTN_HELP_VEC, *rPara.pResMgr ) ), - aRbOriginal ( this, ResId( RB_ORIGINAL_VEC, *rPara.pResMgr ) ), - aRbSize ( this, ResId( RB_SIZE_VEC, *rPara.pResMgr ) ), - aGrpMode ( this, ResId( GRP_MODE_VEC, *rPara.pResMgr ) ), - aFtSizeX ( this, ResId( FT_SIZEX_VEC, *rPara.pResMgr ) ), - aMtfSizeX ( this, ResId( MTF_SIZEX_VEC, *rPara.pResMgr ) ), - aFtSizeY ( this, ResId( FT_SIZEY_VEC, *rPara.pResMgr ) ), - aMtfSizeY ( this, ResId( MTF_SIZEY_VEC, *rPara.pResMgr ) ), - aGrpSize ( this, ResId( GRP_SIZE_VEC, *rPara.pResMgr ) ), - pMgr ( rPara.pResMgr ), - aExt ( rPara.aFilterExt ) -{ - aExt.ToUpperAscii(); - String aFilterConfigPath( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Filter/Graphic/Export/" ) ); - aFilterConfigPath.Append( aExt ); - pConfigItem = new FilterConfigItem( aFilterConfigPath, &rPara.aFilterData ); - - String aTitle( aExt ); - FreeResource(); - - aBtnOK.SetClickHdl( LINK( this, DlgExportVec, OK ) ); - aRbOriginal.SetClickHdl( LINK( this, DlgExportVec, ClickRbOriginal ) ); - aRbSize.SetClickHdl( LINK( this, DlgExportVec, ClickRbSize ) ); - - aTitle.ToUpperAscii(); - aTitle += String( ResId( EXPORT_DIALOG_TITLE, *pMgr ) ); - SetText( aTitle ); - - // reading config-parameter - sal_Int32 nMode = pConfigItem->ReadInt32( String( ResId( KEY_MODE, *pMgr ) ), 0 ); - - ::com::sun::star::awt::Size aDefault( 10000, 10000 ); - ::com::sun::star::awt::Size aSize; - aSize = pConfigItem->ReadSize( String( ResId( KEY_SIZE, *pMgr ) ), aDefault ); - - aMtfSizeX.SetDefaultUnit( FUNIT_MM ); - aMtfSizeY.SetDefaultUnit( FUNIT_MM ); - aMtfSizeX.SetValue( aSize.Width ); - aMtfSizeY.SetValue( aSize.Height ); - - switch ( rPara.eFieldUnit ) - { -// case FUNIT_NONE : -// case FUNIT_KM : -// case FUNIT_PERCENT : -// case FUNIT_CUSTOM : -// case FUNIT_MILE : -// case FUNIT_FOOT : - case FUNIT_MM : - case FUNIT_CM : - case FUNIT_M : - case FUNIT_TWIP : - case FUNIT_POINT : - case FUNIT_PICA : - case FUNIT_INCH : - case FUNIT_100TH_MM : - { - aMtfSizeX.SetUnit( rPara.eFieldUnit ); - aMtfSizeY.SetUnit( rPara.eFieldUnit ); - } - break; - default: - break; // -Wall Multiple values not handled. - } - - switch ( nMode ) - { - case 1 : - { - aRbSize.Check( TRUE ); - ClickRbSize( NULL ); - } - break; - - default : - { - aRbOriginal.Check( TRUE ); - ClickRbOriginal( NULL ); - } - break; - } -} - -DlgExportVec::~DlgExportVec() -{ - delete pConfigItem; -} -/************************************************************************* -|* -|* Speichert eingestellte Werte in ini-Datei -|* -\************************************************************************/ - -IMPL_LINK( DlgExportVec, OK, void *, EMPTYARG ) -{ - // Config-Parameter schreiben - ::com::sun::star::awt::Size aSize( - static_cast<long>(MetricField::ConvertDoubleValue( static_cast<double>(aMtfSizeX.GetValue()), 2, aMtfSizeX.GetUnit(), MAP_100TH_MM )), - static_cast<long>(MetricField::ConvertDoubleValue( static_cast<double>(aMtfSizeY.GetValue()), 2, aMtfSizeY.GetUnit(), MAP_100TH_MM )) ); - - sal_Int32 nMode; - if ( aRbSize.IsChecked() ) - nMode = 1; - else - nMode = 0; - - pConfigItem->WriteInt32( String( ResId( KEY_MODE, *pMgr ) ), nMode ); - pConfigItem->WriteSize( String( ResId( KEY_SIZE, *pMgr ) ), aSize ); - rFltCallPara.aFilterData = pConfigItem->GetFilterData(); - EndDialog( RET_OK ); - - return 0; -} - -/************************************************************************* -|* -|* Enabled/Disabled Controls -|* -\************************************************************************/ - -IMPL_LINK( DlgExportVec, ClickRbOriginal, void*, EMPTYARG ) -{ - aGrpSize.Disable(); - aFtSizeX.Disable(); - aMtfSizeX.Disable(); - aFtSizeY.Disable(); - aMtfSizeY.Disable(); - - return 0; -} - - -/************************************************************************* -|* -|* Enabled/Disabled Controls -|* -\************************************************************************/ - -IMPL_LINK( DlgExportVec, ClickRbSize, void*, EMPTYARG ) -{ - aGrpSize.Enable(); - aFtSizeX.Enable(); - aMtfSizeX.Enable(); - aFtSizeY.Enable(); - aMtfSizeY.Enable(); - - return 0; -} - - - diff --git a/svtools/source/filter.vcl/filter/dlgexpor.hrc b/svtools/source/filter.vcl/filter/dlgexpor.hrc deleted file mode 100644 index 69870c9b00b0..000000000000 --- a/svtools/source/filter.vcl/filter/dlgexpor.hrc +++ /dev/null @@ -1,58 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#include <svtools/svtools.hrc> - -#define BTN_OK_PIX 1 -#define BTN_CANCEL_PIX 1 -#define BTN_HELP_PIX 1 -#define CBX_RES_PIX 1 -#define CBX_SIZE_PIX 2 -#define CBX_RLE 3 -#define CBB_RES_PIX 1 -#define LB_COLORS 1 -#define MTF_SIZEX_PIX 1 -#define MTF_SIZEY_PIX 2 -#define FT_SIZEX_PIX 1 -#define FT_SIZEY_PIX 2 -#define GRP_MODE_PIX 1 -#define GRP_COLORS 4 -#define RB_ORIGINAL_PIX 1 -#define RB_RES_PIX 2 -#define RB_SIZE_PIX 3 - -#define BTN_OK_VEC 1 -#define BTN_CANCEL_VEC 1 -#define BTN_HELP_VEC 1 -#define CBX_SIZE_VEC 2 -#define MTF_SIZEX_VEC 1 -#define MTF_SIZEY_VEC 2 -#define FT_SIZEX_VEC 1 -#define FT_SIZEY_VEC 2 -#define GRP_SIZE_VEC 1 -#define GRP_MODE_VEC 2 -#define RB_ORIGINAL_VEC 1 -#define RB_SIZE_VEC 2 diff --git a/svtools/source/filter.vcl/filter/dlgexpor.hxx b/svtools/source/filter.vcl/filter/dlgexpor.hxx deleted file mode 100644 index 8c7b2d462e70..000000000000 --- a/svtools/source/filter.vcl/filter/dlgexpor.hxx +++ /dev/null @@ -1,127 +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 _DLGEXPOR_HXX_ -#define _DLGEXPOR_HXX_ - -#include <svtools/fltcall.hxx> -#include <vcl/dialog.hxx> -#include <vcl/button.hxx> -#include <vcl/fixed.hxx> -#include <vcl/field.hxx> -#include <vcl/lstbox.hxx> - -/************************************************************************* -|* -|* Dialog zum Einstellen von Filteroptionen bei Pixelformaten -|* -\************************************************************************/ - -class FilterConfigItem; -class DlgExportPix : public ModalDialog -{ -private: - - FltCallDialogParameter& rFltCallPara; - - OKButton aBtnOK; - CancelButton aBtnCancel; - HelpButton aBtnHelp; - - ListBox aLbColors; - CheckBox aCbxRLE; - FixedLine aGrpColors; - - RadioButton aRbOriginal; - RadioButton aRbRes; - RadioButton aRbSize; - FixedText aFtSizeX; - MetricField aMtfSizeX; - FixedText aFtSizeY; - MetricField aMtfSizeY; - FixedLine aGrpMode; - ComboBox aCbbRes; - - FilterConfigItem* pConfigItem; - ResMgr* pMgr; - - String aExt; - - DECL_LINK( OK, void* p ); - DECL_LINK( ClickRbOriginal,void* p ); - DECL_LINK( ClickRbRes,void* p ); - DECL_LINK( ClickRbSize,void* p ); - DECL_LINK( SelectLbColors, void* p ); - -public: - DlgExportPix( FltCallDialogParameter& rPara ); - ~DlgExportPix(); -}; - - -/************************************************************************* -|* -|* Dialog zum Einstellen von Filteroptionen bei Vektorformaten -|* -\************************************************************************/ -class DlgExportVec : public ModalDialog -{ -private: - - FltCallDialogParameter& rFltCallPara; - - OKButton aBtnOK; - CancelButton aBtnCancel; - HelpButton aBtnHelp; - - RadioButton aRbOriginal; - RadioButton aRbSize; - FixedLine aGrpMode; - - FixedText aFtSizeX; - MetricField aMtfSizeX; - FixedText aFtSizeY; - MetricField aMtfSizeY; - FixedLine aGrpSize; - - FilterConfigItem* pConfigItem; - ResMgr* pMgr; - - String aExt; - - DECL_LINK( OK, void* p ); - DECL_LINK( ClickRbOriginal,void* p ); - DECL_LINK( ClickRbSize,void* p ); - -public: - DlgExportVec( FltCallDialogParameter& rPara ); - ~DlgExportVec(); -}; - -#endif // _DLGEXPOR_HXX_ - diff --git a/svtools/source/filter.vcl/filter/dlgexpor.src b/svtools/source/filter.vcl/filter/dlgexpor.src deleted file mode 100644 index 7573b394d72f..000000000000 --- a/svtools/source/filter.vcl/filter/dlgexpor.src +++ /dev/null @@ -1,315 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - - -#include "dlgexpor.hrc" - -ModalDialog DLG_EXPORT_PIX -{ - OutputSize = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( 178 , 135 ) ; - Moveable = TRUE ; - Closeable = TRUE ; - FixedLine GRP_COLORS - { - Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( 110 , 8 ) ; - Text [ en-US ] = "Color resolution" ; - }; - ListBox LB_COLORS - { - Pos = MAP_APPFONT ( 12 , 14 ) ; - Size = MAP_APPFONT ( 98 , 90 ) ; - TabStop = TRUE ; - DropDown = TRUE ; - AutoHScroll = TRUE ; - StringList [ en-US ] = - { - < "Original" ; Default ; > ; - < "1 Bit - Threshold Value" ; Default ; > ; - < "1 Bit - Dithering" ; Default ; > ; - < "4 Bit - Grayscale" ; Default ; > ; - < "4 Bit - Color Palette" ; Default ; > ; - < "8 Bit - Grayscales" ; Default ; > ; - < "8 Bit - Color Palette" ; Default ; > ; - < "24 Bit - True Colors" ; Default ; > ; - }; - }; - CheckBox CBX_RLE - { - Pos = MAP_APPFONT ( 12 , 31 ) ; - Size = MAP_APPFONT ( 98 , 12 ) ; - TabStop = TRUE ; - Text [ en-US ] = "RLE coding" ; - }; - FixedLine GRP_MODE_PIX - { - Pos = MAP_APPFONT ( 6 , 48 ) ; - Size = MAP_APPFONT ( 110 , 8 ) ; - Text [ en-US ] = "Mode" ; - }; - RadioButton RB_ORIGINAL_PIX - { - Pos = MAP_APPFONT ( 12 , 59 ) ; - Size = MAP_APPFONT ( 98 , 10 ) ; - TabStop = TRUE ; - Text [ en-US ] = "~Original" ; - }; - RadioButton RB_RES_PIX - { - Pos = MAP_APPFONT ( 12 , 73 ) ; - Size = MAP_APPFONT ( 55 , 10 ) ; - TabStop = TRUE ; - Text [ en-US ] = "~Resolution" ; - }; - ComboBox CBB_RES_PIX - { - Pos = MAP_APPFONT ( 70 , 73 ) ; - Size = MAP_APPFONT ( 40 , 50 ) ; - TabStop = TRUE ; - DropDown = TRUE ; - StringList = - { - "75 DPI" ; - "150 DPI" ; - "300 DPI" ; - "600 DPI" ; - }; - }; - RadioButton RB_SIZE_PIX - { - Pos = MAP_APPFONT ( 12 , 87 ) ; - Size = MAP_APPFONT ( 98 , 10 ) ; - TabStop = TRUE ; - Text [ en-US ] = "~Size" ; - }; - MetricField MTF_SIZEX_PIX - { - Border = TRUE ; - Pos = MAP_APPFONT ( 60 , 101 ) ; - Size = MAP_APPFONT ( 50 , 12 ) ; - TabStop = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - Minimum = 100 ; - Maximum = 99999 ; - StrictFormat = TRUE ; - DecimalDigits = 2 ; - Unit = FUNIT_MM ; - First = 100 ; - Last = 99999 ; - SpinSize = 100 ; - }; - FixedText FT_SIZEX_PIX - { - Pos = MAP_APPFONT ( 18 , 102 ) ; - Size = MAP_APPFONT ( 41 , 10 ) ; - Text [ en-US ] = "Width" ; - }; - MetricField MTF_SIZEY_PIX - { - Border = TRUE ; - Pos = MAP_APPFONT ( 60 , 117 ) ; - Size = MAP_APPFONT ( 50 , 12 ) ; - TabStop = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - Minimum = 100 ; - Maximum = 99999 ; - StrictFormat = TRUE ; - DecimalDigits = 2 ; - Unit = FUNIT_MM ; - First = 100 ; - Last = 99999 ; - SpinSize = 100 ; - }; - FixedText FT_SIZEY_PIX - { - Pos = MAP_APPFONT ( 18 , 118 ) ; - Size = MAP_APPFONT ( 41 , 10 ) ; - Text [ en-US ] = "Height" ; - }; - OKButton BTN_OK_PIX - { - Pos = MAP_APPFONT ( 122 , 6 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - DefButton = TRUE ; - }; - CancelButton BTN_CANCEL_PIX - { - Pos = MAP_APPFONT ( 122 , 23 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - HelpButton BTN_HELP_PIX - { - Pos = MAP_APPFONT ( 122 , 43 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; -}; -ModalDialog DLG_EXPORT_VEC -{ - OutputSize = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( 178 , 89 ) ; - Moveable = TRUE ; - Closeable = TRUE ; - - FixedLine GRP_MODE_VEC - { - Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( 110 , 8 ) ; - Text [ en-US ] = "Mode" ; - }; - RadioButton RB_ORIGINAL_VEC - { - Pos = MAP_APPFONT ( 12 , 14 ) ; - Size = MAP_APPFONT ( 98 , 10 ) ; - TabStop = TRUE ; - Text [ en-US ] = "~Original" ; - }; - RadioButton RB_SIZE_VEC - { - Pos = MAP_APPFONT ( 12 , 28 ) ; - Size = MAP_APPFONT ( 98 , 10 ) ; - TabStop = TRUE ; - Text [ en-US ] = "~Size" ; - }; - FixedLine GRP_SIZE_VEC - { - Pos = MAP_APPFONT ( 6 , 44 ) ; - Size = MAP_APPFONT ( 110 , 8 ) ; - Text [ en-US ] = "Size" ; - }; - FixedText FT_SIZEX_VEC - { - Pos = MAP_APPFONT ( 12 , 56 ) ; - Size = MAP_APPFONT ( 45 , 10 ) ; - Text [ en-US ] = "Width" ; - }; - MetricField MTF_SIZEX_VEC - { - Border = TRUE ; - Pos = MAP_APPFONT ( 60 , 55 ) ; - Size = MAP_APPFONT ( 50 , 12 ) ; - TabStop = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - Minimum = 100 ; - Maximum = 99999 ; - StrictFormat = TRUE ; - DecimalDigits = 2 ; - Unit = FUNIT_MM ; - First = 100 ; - Last = 99999 ; - SpinSize = 100 ; - }; - FixedText FT_SIZEY_VEC - { - Pos = MAP_APPFONT ( 12 , 72 ) ; - Size = MAP_APPFONT ( 45 , 10 ) ; - Text [ en-US ] = "Height" ; - }; - MetricField MTF_SIZEY_VEC - { - Border = TRUE ; - Pos = MAP_APPFONT ( 60 , 71 ) ; - Size = MAP_APPFONT ( 50 , 12 ) ; - TabStop = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - Minimum = 100 ; - Maximum = 99999 ; - StrictFormat = TRUE ; - DecimalDigits = 2 ; - Unit = FUNIT_MM ; - First = 100 ; - Last = 99999 ; - SpinSize = 100 ; - }; - OKButton BTN_OK_VEC - { - Pos = MAP_APPFONT ( 122 , 6 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - DefButton = TRUE ; - }; - CancelButton BTN_CANCEL_VEC - { - Pos = MAP_APPFONT ( 122 , 24 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - HelpButton BTN_HELP_VEC - { - Pos = MAP_APPFONT ( 122 , 43 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; -}; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/svtools/source/filter.vcl/filter/exportdialog.cxx b/svtools/source/filter.vcl/filter/exportdialog.cxx new file mode 100644 index 000000000000..20cc46a30ab5 --- /dev/null +++ b/svtools/source/filter.vcl/filter/exportdialog.cxx @@ -0,0 +1,1513 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_svtools.hxx" + +#ifndef GCC +# pragma hdrstop +#endif + +#include <tools/ref.hxx> +#include <tools/stream.hxx> +#include <svtools/filter.hxx> +#include <svtools/FilterConfigItem.hxx> +#include <com/sun/star/io/XStream.hpp> +#include <com/sun/star/awt/Size.hpp> +#include <com/sun/star/view/XSelectionSupplier.hpp> +#include <com/sun/star/frame/XModel.hpp> +#include <com/sun/star/frame/XController.hpp> +#include <com/sun/star/drawing/XDrawView.hpp> +#include <com/sun/star/lang/XMultiServiceFactory.hpp> +#include <com/sun/star/graphic/XPrimitiveFactory2D.hpp> +#include <com/sun/star/geometry/AffineMatrix2D.hpp> +#include <com/sun/star/document/XExporter.hpp> +#include <com/sun/star/document/XFilter.hpp> +#include <unotools/streamwrap.hxx> +#include <vcl/msgbox.hxx> +#include <vcl/svapp.hxx> +#include <vcl/outdev.hxx> +#include <vcl/graph.hxx> +#include <rtl/ustrbuf.hxx> +#include <basegfx/matrix/b2dhommatrix.hxx> +#include "exportdialog.hxx" +#include "exportdialog.hrc" + +#define FORMAT_UNKNOWN 0 +#define FORMAT_JPG 1 +#define FORMAT_PNG 2 +#define FORMAT_BMP 3 +#define FORMAT_GIF 4 +#define FORMAT_PBM 5 +#define FORMAT_PGM 6 +#define FORMAT_PPM 7 +#define FORMAT_PCT 8 +#define FORMAT_RAS 9 +#define FORMAT_TIF 10 +#define FORMAT_XPM 11 +#define FORMAT_WMF 12 +#define FORMAT_EMF 13 +#define FORMAT_EPS 14 +#define FORMAT_MET 15 +#define FORMAT_SVG 16 +#define FORMAT_SVM 17 + +#define UNIT_DEFAULT -1 +#define UNIT_INCH 0 +#define UNIT_CM 1 +#define UNIT_MM 2 +#define UNIT_POINT 3 +#define UNIT_PIXEL 4 +#define UNIT_MAX_ID UNIT_PIXEL + +using namespace ::com::sun::star; + +static sal_Int16 GetFilterFormat( String& rExt ) +{ + sal_Int16 nFormat = FORMAT_UNKNOWN; + ByteString aExt( rExt, RTL_TEXTENCODING_UTF8 ); + if ( aExt.Equals( "JPG" ) ) + nFormat = FORMAT_JPG; + else if ( aExt.Equals( "PNG" ) ) + nFormat = FORMAT_PNG; + else if ( aExt.Equals( "BMP" ) ) + nFormat = FORMAT_BMP; + else if ( aExt.Equals( "GIF" ) ) + nFormat = FORMAT_GIF; + else if ( aExt.Equals( "PBM" ) ) + nFormat = FORMAT_PBM; + else if ( aExt.Equals( "PGM" ) ) + nFormat = FORMAT_PGM; + else if ( aExt.Equals( "PPM" ) ) + nFormat = FORMAT_PPM; + else if ( aExt.Equals( "PCT" ) ) + nFormat = FORMAT_PCT; + else if ( aExt.Equals( "RAS" ) ) + nFormat = FORMAT_RAS; + else if ( aExt.Equals( "TIF" ) ) + nFormat = FORMAT_TIF; + else if ( aExt.Equals( "XPM" ) ) + nFormat = FORMAT_XPM; + else if ( aExt.Equals( "WMF" ) ) + nFormat = FORMAT_WMF; + else if ( aExt.Equals( "EMF" ) ) + nFormat = FORMAT_EMF; + else if ( aExt.Equals( "EPS" ) ) + nFormat = FORMAT_EPS; + else if ( aExt.Equals( "MET" ) ) + nFormat = FORMAT_MET; + else if ( aExt.Equals( "SVG" ) ) + nFormat = FORMAT_SVG; + else if ( aExt.Equals( "SVM" ) ) + nFormat = FORMAT_SVM; + return nFormat; +} + +static MapUnit GetMapUnit( sal_Int32 nUnit ) +{ + MapUnit aMapUnit( MAP_PIXEL ); + switch( nUnit ) + { + case UNIT_INCH : aMapUnit = MAP_INCH; break; + case UNIT_CM : aMapUnit = MAP_CM; break; + case UNIT_MM : aMapUnit = MAP_MM; break; + case UNIT_POINT : aMapUnit = MAP_POINT; break; + case UNIT_PIXEL : aMapUnit = MAP_PIXEL; break; + } + return aMapUnit; +} + +sal_Int32 ExportDialog::GetDefaultUnit() +{ + sal_Int32 nDefaultUnit = UNIT_CM; + switch( mrFltCallPara.eFieldUnit ) + { +// case FUNIT_NONE : +// case FUNIT_PERCENT : +// case FUNIT_CUSTOM : + default: nDefaultUnit = UNIT_CM; break; + + case FUNIT_MILE : // PASSTHROUGH INTENDED + case FUNIT_FOOT : + case FUNIT_TWIP : + case FUNIT_PICA : nDefaultUnit = UNIT_INCH; break; + + case FUNIT_KM : // PASSTHROUGH INTENDED + case FUNIT_M : + case FUNIT_100TH_MM : nDefaultUnit = UNIT_CM; break; + + case FUNIT_INCH : nDefaultUnit = UNIT_INCH; break; + case FUNIT_CM : nDefaultUnit = UNIT_CM; break; + case FUNIT_MM : nDefaultUnit = UNIT_MM; break; + case FUNIT_POINT : nDefaultUnit = UNIT_POINT; break; + } + return nDefaultUnit; +} + +static basegfx::B2DRange GetShapeRangeForXShape( const uno::Reference< drawing::XShape >& rxShape, + const uno::Reference< graphic::XPrimitiveFactory2D >& rxPrimitiveFactory2D, const uno::Sequence< beans::PropertyValue >& rViewInformation ) +{ + basegfx::B2DRange aShapeRange; + + const uno::Sequence< beans::PropertyValue > aParams; + const uno::Sequence< uno::Reference< graphic::XPrimitive2D > > aPrimitiveSequence( rxPrimitiveFactory2D->createPrimitivesFromXShape( rxShape, aParams ) ); + + const sal_Int32 nCount = aPrimitiveSequence.getLength(); + for( sal_Int32 nIndex = 0; nIndex < nCount; nIndex++ ) + { + const geometry::RealRectangle2D aRect( aPrimitiveSequence[ nIndex ]->getRange( rViewInformation ) ); + aShapeRange.expand( basegfx::B2DTuple( aRect.X1, aRect.Y1 ) ); + aShapeRange.expand( basegfx::B2DTuple( aRect.X2, aRect.Y2 ) ); + } + return aShapeRange; +} + +uno::Sequence< beans::PropertyValue > ExportDialog::GetFilterData( sal_Bool bUpdateConfig ) +{ + if ( bUpdateConfig ) + { + sal_Int32 nUnit = maLbSizeX.GetSelectEntryPos(); + if ( nUnit < 0 ) + nUnit = UNIT_CM; + + if ( ( mnInitialResolutionUnit == UNIT_DEFAULT ) && ( nUnit == GetDefaultUnit() ) ) + nUnit = UNIT_DEFAULT; + + // updating ui configuration + if ( mbIsPixelFormat ) + { + if ( nUnit > UNIT_MAX_ID ) + nUnit = UNIT_PIXEL; + + sal_Int32 nResolution = maNfResolution.GetValue(); + if ( nResolution < 1 ) + nResolution = 96; + + mpOptionsItem->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "PixelExportUnit" ) ), nUnit ); + mpOptionsItem->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "PixelExportResolution" ) ), nResolution ); + mpOptionsItem->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "PixelExportResolutionUnit" ) ), maLbResolution.GetSelectEntryPos() ); + } + else + { + if ( nUnit >= UNIT_PIXEL ) + nUnit = UNIT_CM; + + mpOptionsItem->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "VectorExportUnit" ) ), nUnit ); + } + } + + FilterConfigItem* pFilterOptions; + if ( bUpdateConfig ) + pFilterOptions = mpFilterOptionsItem; + else + { + uno::Sequence< beans::PropertyValue > aFilterData( mpFilterOptionsItem->GetFilterData() ); + pFilterOptions = new FilterConfigItem( &aFilterData ); + } + + const String sLogicalWidth( String( RTL_CONSTASCII_USTRINGPARAM( "LogicalWidth" ) ) ); + const String sLogicalHeight( String( RTL_CONSTASCII_USTRINGPARAM( "LogicalHeight" ) ) ); + if ( mbIsPixelFormat ) + { + pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "PixelWidth" ) ), static_cast< sal_Int32 >( maSize.Width ) ); + pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "PixelHeight" ) ), static_cast< sal_Int32 >( maSize.Height ) ); + if ( maResolution.Width && maResolution.Height ) + { + const double f100thmmPerPixelX = 100000.0 / maResolution.Width; + const double f100thmmPerPixelY = 100000.0 / maResolution.Height; + sal_Int32 nLogicalWidth = static_cast< sal_Int32 >( f100thmmPerPixelX * maSize.Width ); + sal_Int32 nLogicalHeight= static_cast< sal_Int32 >( f100thmmPerPixelY * maSize.Height ); + if ( nLogicalWidth && nLogicalHeight ) + { + pFilterOptions->WriteInt32( sLogicalWidth, nLogicalWidth ); + pFilterOptions->WriteInt32( sLogicalHeight, nLogicalHeight ); + } + } + } + else + { + pFilterOptions->WriteInt32( sLogicalWidth, static_cast< sal_Int32 >( maSize.Width ) ); + pFilterOptions->WriteInt32( sLogicalHeight, static_cast< sal_Int32 >( maSize.Height ) ); + } + switch ( mnFormat ) + { + case FORMAT_JPG : + { + sal_Int32 nColor = maLbColorDepth.GetSelectEntryPos(); + if ( nColor == 1 ) + nColor = 0; + else + nColor = 1; + pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "ColorMode" ) ), nColor ); + pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Quality" ) ), static_cast< sal_Int32 >( maSbCompression.GetThumbPos() ) ); + } + break; + + case FORMAT_PNG : + { + pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Compression" ) ), static_cast< sal_Int32 >( maSbCompression.GetThumbPos() ) ); + sal_Int32 nInterlace = 0; + if ( maCbInterlaced.IsChecked() ) + nInterlace++; + pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Interlaced" ) ), nInterlace ); + } + break; + + case FORMAT_BMP : + { + pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Color" ) ), maLbColorDepth.GetSelectEntryPos() + 1 ); + pFilterOptions->WriteBool( String( RTL_CONSTASCII_USTRINGPARAM( "RLE_Coding" ) ), maCbRLEEncoding.IsChecked() ); + } + break; + + case FORMAT_GIF : + { + sal_Int32 nValue = 0; + if ( maCbInterlaced.IsChecked() ) + nValue++; + pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Interlaced" ) ), nValue ); + + nValue = 0; + if ( maCbSaveTransparency.IsChecked() ) + nValue++; + pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Translucent" ) ), nValue ); + } + break; + + case FORMAT_PBM : + case FORMAT_PGM : + case FORMAT_PPM : + { + sal_Int32 nFormat = 0; + if ( maRbText.IsChecked() ) + nFormat++; + pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "FileFormat" ) ), nFormat ); + } + break; + + case FORMAT_EPS : + { + sal_Int32 nCheck = 0; + if ( maCbEPSPreviewTIFF.IsChecked() ) + nCheck++; + if ( maCbEPSPreviewEPSI.IsChecked() ) + nCheck += 2; + pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Preview" ) ), nCheck ); + + nCheck = 1; + if ( maRbEPSLevel2.IsChecked() ) + nCheck++; + pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Version" ) ), nCheck ); + + nCheck = 1; + if ( maRbEPSColorFormat2.IsChecked() ) + nCheck++; + pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "ColorFormat" ) ), nCheck ); + + nCheck = 1; + if ( maRbEPSCompressionNone.IsChecked() ) + nCheck++; + pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "CompressionMode" ) ), nCheck ); + } + break; + } + + uno::Sequence< beans::PropertyValue > aRet( pFilterOptions->GetFilterData() ); + if ( bUpdateConfig == sal_False ) + delete pFilterOptions; + return aRet; +} + +// +awt::Size ExportDialog::GetOriginalSize() +{ + basegfx::B2DRange aShapesRange; + + if ( mxPage.is () ) + { + uno::Reference< beans::XPropertySet > xPagePropSet( mxPage, uno::UNO_QUERY ); + if ( xPagePropSet.is() ) + { + sal_Int32 nWidth = 0; + sal_Int32 nHeight= 0; + com::sun::star::uno::Any aAny; + aAny = xPagePropSet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Width" ) ) ); + aAny >>= nWidth; + aAny = xPagePropSet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Height" ) ) ); + aAny >>= nHeight; + aShapesRange = basegfx::B2DRange( 0, 0, nWidth, nHeight ); + } + } + else + { + uno::Reference< graphic::XPrimitiveFactory2D > xPrimitiveFactory( + mxMgr->createInstance( String( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.graphic.PrimitiveFactory2D" ) ) ), uno::UNO_QUERY ); + if ( xPrimitiveFactory.is() ) + { + basegfx::B2DHomMatrix aViewTransformation( Application::GetDefaultDevice()->GetViewTransformation() ); + com::sun::star::geometry::AffineMatrix2D aTransformation; + aTransformation.m00 = aViewTransformation.get(0,0); + aTransformation.m01 = aViewTransformation.get(0,1); + aTransformation.m02 = aViewTransformation.get(0,2); + aTransformation.m10 = aViewTransformation.get(1,0); + aTransformation.m11 = aViewTransformation.get(1,1); + aTransformation.m12 = aViewTransformation.get(1,2); + + const rtl::OUString sViewTransformation( RTL_CONSTASCII_USTRINGPARAM( "ViewTransformation" ) ); + uno::Sequence< beans::PropertyValue > aViewInformation( 1 ); + aViewInformation[ 0 ].Value <<= aTransformation; + aViewInformation[ 0 ].Name = sViewTransformation; + + if ( mxShape.is() ) + aShapesRange = GetShapeRangeForXShape( mxShape, xPrimitiveFactory, aViewInformation ); + else if ( mxShapes.is() ) + { + const sal_Int32 nCount = mxShapes->getCount(); + for( sal_Int32 nIndex = 0; nIndex < nCount; nIndex++ ) + { + uno::Reference< drawing::XShape > xShape; + mxShapes->getByIndex( nIndex ) >>= xShape; + aShapesRange.expand( GetShapeRangeForXShape( xShape, xPrimitiveFactory, aViewInformation ) ); + } + } + } + } + return awt::Size( static_cast<sal_Int32>(aShapesRange.getWidth()), static_cast<sal_Int32>(aShapesRange.getHeight()) ); +} + +void ExportDialog::GetGraphicSource() +{ + if ( mxSourceDocument.is() ) + { + uno::Reference< frame::XModel > xModel( mxSourceDocument, uno::UNO_QUERY ); + if ( xModel.is() ) + { + uno::Reference< frame::XController > xController( xModel->getCurrentController() ); + if ( xController.is() ) + { + if ( mbExportSelection ) // check if there is a selection + { + uno::Reference< view::XSelectionSupplier > xSelectionSupplier( xController, uno::UNO_QUERY ); + if ( xSelectionSupplier.is() ) + { + uno::Any aAny( xSelectionSupplier->getSelection() ); + if ( ! ( aAny >>= mxShapes ) ) + aAny >>= mxShape; + } + } + if ( !mxShape.is() && !mxShapes.is() ) + { + uno::Reference< drawing::XDrawView > xDrawView( xController, uno::UNO_QUERY ); + if ( xDrawView.is() ) + { + uno::Reference< drawing::XDrawPage > xCurrentPage( xDrawView->getCurrentPage() ); + if ( xCurrentPage.is() ) + { + mxPage = xCurrentPage; // exporting whole page + } + } + } + } + } + } +} + +sal_Bool ExportDialog::GetGraphicStream() +{ + sal_Bool bRet = sal_False; + + if ( !IsTempExportAvailable() ) + { + delete mpTempStream, mpTempStream = new SvMemoryStream(); + maBitmap = Bitmap(); + return bRet; + } + + sal_Bool bRecreateOutputStream = mpTempStream->Tell() == 0; + + static uno::Sequence< beans::PropertyValue > aOldFilterData; + uno::Sequence< beans::PropertyValue > aNewFilterData( GetFilterData( sal_False ) ); + if ( aOldFilterData != aNewFilterData ) + { + aOldFilterData = aNewFilterData; + bRecreateOutputStream = sal_True; + } + try + { + if ( bRecreateOutputStream ) + { + delete mpTempStream, mpTempStream = new SvMemoryStream(); + maBitmap = Bitmap(); + + uno::Reference < io::XStream > xStream( new utl::OStreamWrapper( *mpTempStream ) ); + uno::Reference < io::XOutputStream > xOutputStream( xStream->getOutputStream() ); + + uno::Reference< document::XExporter > xGraphicExporter( + mxMgr->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.GraphicExportFilter") ) ), uno::UNO_QUERY_THROW ); + uno::Reference< document::XFilter > xFilter( xGraphicExporter, uno::UNO_QUERY_THROW ); + + sal_Int32 nProperties = 2; + uno::Sequence< beans::PropertyValue > aFilterData( nProperties ); + + + rtl::OUString sFormat( maExt ); + uno::Sequence< beans::PropertyValue > aDescriptor( 3 ); + aDescriptor[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("OutputStream") ); + aDescriptor[0].Value <<= xOutputStream; + aDescriptor[1].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FilterName") ); + aDescriptor[1].Value <<= sFormat; + aDescriptor[2].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FilterData") ); + aDescriptor[2].Value <<= aNewFilterData; + + uno::Reference< lang::XComponent > xSourceDoc; + if ( mxPage.is() ) + xSourceDoc = uno::Reference< lang::XComponent >( mxPage, uno::UNO_QUERY_THROW ); + else if ( mxShapes.is() ) + xSourceDoc = uno::Reference< lang::XComponent >( mxShapes, uno::UNO_QUERY_THROW ); + else if ( mxShape.is() ) + xSourceDoc = uno::Reference< lang::XComponent >( mxShape, uno::UNO_QUERY_THROW );; + if ( xSourceDoc.is() ) + { + xGraphicExporter->setSourceDocument( xSourceDoc ); + xFilter->filter( aDescriptor ); + bRet = sal_True; + + if ( mnFormat == FORMAT_JPG ) + { + mpTempStream->Seek( STREAM_SEEK_TO_BEGIN ); + maBitmap = GetGraphicBitmap( *mpTempStream ); + mpTempStream->Seek( STREAM_SEEK_TO_END ); + } + } + } + else + bRet = sal_True; + } + catch( uno::Exception& ) + { + + // ups + + } + return bRet; +} + +Bitmap ExportDialog::GetGraphicBitmap( SvStream& rInputStream ) +{ + Bitmap aRet; + Graphic aGraphic; + GraphicFilter aFilter( sal_False ); + if ( aFilter.ImportGraphic( aGraphic, String(), rInputStream, GRFILTER_FORMAT_NOTFOUND, NULL, 0, NULL ) == GRFILTER_OK ) + { + aRet = aGraphic.GetBitmap(); + } + return aRet; +} + +sal_uInt32 ExportDialog::GetRawFileSize() const +{ + sal_uInt64 nRawFileSize = 0; + if ( mbIsPixelFormat ) + { + sal_Int32 nBitsPerPixel = 24; + String aEntry( maLbColorDepth.GetSelectEntry() ); + if ( ms1BitTreshold == aEntry ) + nBitsPerPixel = 1; + else if ( ms1BitDithered == aEntry ) + nBitsPerPixel = 1; + else if ( ms4BitGrayscale == aEntry ) + nBitsPerPixel = 4; + else if ( ms4BitColorPalette == aEntry ) + nBitsPerPixel = 8; + else if ( ms8BitGrayscale == aEntry ) + nBitsPerPixel = 8; + else if ( ms8BitColorPalette == aEntry ) + nBitsPerPixel = 8; + else if ( ms24BitColor == aEntry ) + nBitsPerPixel = 24; + + if ( mbIsPixelFormat ) + { + nRawFileSize = ( maSize.Width * nBitsPerPixel + 7 ) &~ 7; // rounding up to 8 bits + nRawFileSize /= 8; // in bytes + nRawFileSize *= maSize.Height; + } + if ( nRawFileSize > SAL_MAX_UINT32 ) + nRawFileSize = 0; + } + return static_cast< sal_uInt32 >( nRawFileSize ); +} + +// checks if the source dimension/resolution is not too big +// to determine the exact graphic output size and preview for jpg +sal_Bool ExportDialog::IsTempExportAvailable() const +{ + return GetRawFileSize() < static_cast< sal_uInt32 >( mnMaxFilesizeForRealtimePreview ); +} + +ExportDialog::ExportDialog( FltCallDialogParameter& rPara, + const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > rxMgr, + const com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& rxSourceDocument, + sal_Bool bExportSelection, sal_Bool bIsPixelFormat ) : + ModalDialog ( rPara.pWindow, ResId( DLG_EXPORT, *rPara.pResMgr ) ), + mrFltCallPara ( rPara ), + mpMgr ( rPara.pResMgr ), + mxMgr ( rxMgr ), + mxSourceDocument ( rxSourceDocument ), + maFlExportSize ( this, ResId( FL_EXPORT_SIZE, *rPara.pResMgr ) ), + maFtSizeX ( this, ResId( FT_SIZEX, *rPara.pResMgr ) ), + maMfSizeX ( this, ResId( MF_SIZEX, *rPara.pResMgr ) ), + maLbSizeX ( this, ResId( LB_SIZEX, *rPara.pResMgr ) ), + maFtSizeY ( this, ResId( FT_SIZEY, *rPara.pResMgr ) ), + maMfSizeY ( this, ResId( MF_SIZEY, *rPara.pResMgr ) ), + maLbSizeY ( this, ResId( LB_SIZEY, *rPara.pResMgr ) ), + maFtResolution ( this, ResId( FT_RESOLUTION, *rPara.pResMgr ) ), + maNfResolution ( this, ResId( NF_RESOLUTION, *rPara.pResMgr ) ), + maLbResolution ( this, ResId( LB_RESOLUTION, *rPara.pResMgr ) ), + maFlColorDepth ( this, ResId( FL_COLOR_DEPTH, *rPara.pResMgr ) ), + maLbColorDepth ( this, ResId( LB_COLOR_DEPTH, *rPara.pResMgr ) ), + maFlJPGQuality ( this, ResId( FL_JPG_QUALITY, *rPara.pResMgr ) ), + maFlMode ( this, ResId( FL_MODE, *rPara.pResMgr ) ), + maFlPBMOptions ( this, ResId( FL_PBM_OPTIONS, *rPara.pResMgr ) ), + maSbCompression ( this, ResId( SB_COMPRESSION, *rPara.pResMgr ) ), + maNfCompression ( this, ResId( NF_COMPRESSION, *rPara.pResMgr ) ), + maFtJPGMin ( this, ResId( FT_JPG_MIN, *rPara.pResMgr ) ), + maFtJPGMax ( this, ResId( FT_JPG_MAX, *rPara.pResMgr ) ), + maFtPNGMin ( this, ResId( FT_PNG_MIN, *rPara.pResMgr ) ), + maFtPNGMax ( this, ResId( FT_PNG_MAX, *rPara.pResMgr ) ), + maCbJPGPreview ( this, ResId( CB_JPG_PREVIEW, *rPara.pResMgr ) ), + maCbInterlaced ( this, ResId( CB_INTERLACED, *rPara.pResMgr ) ), + maCbRLEEncoding ( this, ResId( CB_RLE_ENCODING, *rPara.pResMgr ) ), + maFlGIFDrawingObjects ( this, ResId( FL_GIF_DRAWING_OBJECTS, *rPara.pResMgr ) ), + maCbSaveTransparency ( this, ResId( CB_SAVE_TRANSPARENCY, *rPara.pResMgr ) ), + maRbBinary ( this, ResId( RB_BINARY, *rPara.pResMgr ) ), + maRbText ( this, ResId( RB_TEXT, *rPara.pResMgr ) ), + maFlEPSPreview ( this, ResId( FL_EPS_PREVIEW, *rPara.pResMgr ) ), + maCbEPSPreviewTIFF ( this, ResId( CB_EPS_PREVIEW_TIFF, *rPara.pResMgr ) ), + maCbEPSPreviewEPSI ( this, ResId( CB_EPS_PREVIEW_EPSI, *rPara.pResMgr ) ), + maFlEPSVersion ( this, ResId( FL_EPS_VERSION, *rPara.pResMgr ) ), + maRbEPSLevel1 ( this, ResId( RB_EPS_LEVEL1, *rPara.pResMgr ) ), + maRbEPSLevel2 ( this, ResId( RB_EPS_LEVEL2, *rPara.pResMgr ) ), + maFlEPSColorFormat ( this, ResId( FL_EPS_COLOR_FORMAT, *rPara.pResMgr ) ), + maRbEPSColorFormat1 ( this, ResId( RB_EPS_COLOR_FORMAT1, *rPara.pResMgr ) ), + maRbEPSColorFormat2 ( this, ResId( RB_EPS_COLOR_FORMAT2, *rPara.pResMgr ) ), + maFlCompression ( this, ResId( FL_COMPRESSION, *rPara.pResMgr ) ), + maRbEPSCompressionLZW ( this, ResId( RB_EPS_COMPRESSION_LZW, *rPara.pResMgr ) ), + maRbEPSCompressionNone ( this, ResId( RB_EPS_COMPRESSION_NONE, *rPara.pResMgr ) ), + maFlEstimatedSize ( this, ResId( FL_ESTIMATED_SIZE, *rPara.pResMgr ) ), + maFtEstimatedSize ( this, ResId( FT_ESTIMATED_SIZE, *rPara.pResMgr ) ), + msEstimatedSizePix1 ( ResId( STR_ESTIMATED_SIZE_PIX_1, *rPara.pResMgr ) ), + msEstimatedSizePix2 ( ResId( STR_ESTIMATED_SIZE_PIX_2, *rPara.pResMgr ) ), + msEstimatedSizeVec ( ResId( STR_ESTIMATED_SIZE_VEC, *rPara.pResMgr ) ), + maFlButtons ( this, ResId( FL_BUTTONS, *rPara.pResMgr ) ), + maFbJPGPreview ( this, ResId( FB_JPG_PREVIEW, *rPara.pResMgr ) ), + maSbZoom ( this, ResId( SB_ZOOM, *rPara.pResMgr ) ), + maNfZoom ( this, ResId( NF_ZOOM, *rPara.pResMgr ) ), + maSbJPGPreviewHorz ( this, ResId( SB_JPG_PREVIEW_HORZ, *rPara.pResMgr ) ), + maSbJPGPreviewVert ( this, ResId( SB_JPG_PREVIEW_VERT, *rPara.pResMgr ) ), + maBtnOK ( this, ResId( BTN_OK, *rPara.pResMgr ) ), + maBtnCancel ( this, ResId( BTN_CANCEL, *rPara.pResMgr ) ), + maBtnHelp ( this, ResId( BTN_HELP, *rPara.pResMgr ) ), + ms1BitTreshold ( ResId( STR_1BIT_THRESHOLD, *rPara.pResMgr ) ), + ms1BitDithered ( ResId( STR_1BIT_DITHERED, *rPara.pResMgr ) ), + ms4BitGrayscale ( ResId( STR_4BIT_GRAYSCALE, *rPara.pResMgr ) ), + ms4BitColorPalette ( ResId( STR_4BIT_COLOR_PALETTE, *rPara.pResMgr ) ), + ms8BitGrayscale ( ResId( STR_8BIT_GRAYSCALE, *rPara.pResMgr ) ), + ms8BitColorPalette ( ResId( STR_8BIT_COLOR_PALETTE, *rPara.pResMgr ) ), + ms24BitColor ( ResId( STR_24BIT_TRUE_COLOR, *rPara.pResMgr ) ), + maExt ( rPara.aFilterExt ), + mnFormat ( FORMAT_UNKNOWN ), + mnMaxFilesizeForRealtimePreview( 0 ), + mpTempStream ( new SvMemoryStream() ), + maOriginalSize ( awt::Size( 0, 0 ) ), + mbPreview ( sal_False ), + mbIsPixelFormat ( bIsPixelFormat ), + mbExportSelection ( bExportSelection ), + mbPreserveAspectRatio ( sal_True ) +{ + GetGraphicSource(); + + maExt.ToUpperAscii(); + + String aFilterConfigPath( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Filter/Graphic/Export/" ) ); + mpOptionsItem = new FilterConfigItem( aFilterConfigPath, &rPara.aFilterData ); + aFilterConfigPath.Append( maExt ); + mpFilterOptionsItem = new FilterConfigItem( aFilterConfigPath, &rPara.aFilterData ); + + mnInitialResolutionUnit = mbIsPixelFormat + ? mpOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "PixelExportUnit" ) ), UNIT_DEFAULT ) + : mpOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "VectorExportUnit" ) ), UNIT_DEFAULT ); + + mnMaxFilesizeForRealtimePreview = mpOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "MaxFilesizeForRealtimePreview" ) ), 0 ); + maFtEstimatedSize.SetText( String( RTL_CONSTASCII_USTRINGPARAM( " \n " ) ) ); + + String aTitle( maExt ); + aTitle += String( ResId( DLG_EXPORT_TITLE, *mpMgr ) ); + SetText( aTitle ); + + mnFormat = GetFilterFormat( maExt ); + + Size aResolution( Application::GetDefaultDevice()->LogicToPixel( Size( 100, 100 ), MAP_CM ) ); + maResolution.Width = aResolution.Width(); + maResolution.Height= aResolution.Height(); + maOriginalSize = GetOriginalSize(); + if ( bIsPixelFormat ) + { + double fPixelsPer100thmm = static_cast< double >( maResolution.Width ) / 100000.0; + maSize = awt::Size( static_cast< sal_Int32 >( ( fPixelsPer100thmm * maOriginalSize.Width ) + 0.5 ), + static_cast< sal_Int32 >( ( fPixelsPer100thmm * maOriginalSize.Height ) + 0.5 ) ); + } + else + { + maSize = maOriginalSize; + } + + // Size + maLbSizeX.SetSelectHdl( LINK( this, ExportDialog, UpdateHdl ) ); + + maSbCompression.SetScrollHdl( LINK( this, ExportDialog, SbCompressionUpdateHdl ) ); + maNfCompression.SetModifyHdl( LINK( this, ExportDialog, UpdateHdl ) ); + + maMfSizeX.SetModifyHdl( LINK( this, ExportDialog, UpdateHdlMtfSizeX ) ); + maMfSizeY.SetModifyHdl( LINK( this, ExportDialog, UpdateHdlMtfSizeY ) ); + + maNfResolution.SetModifyHdl( LINK( this, ExportDialog, UpdateHdlNfResolution ) ); + maLbResolution.SetSelectHdl( LINK( this, ExportDialog, UpdateHdl ) ); + + maLbColorDepth.SetSelectHdl( LINK( this, ExportDialog, UpdateHdl ) ); + + maCbInterlaced.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); + + maCbSaveTransparency.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); + + maCbEPSPreviewTIFF.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); + maCbEPSPreviewEPSI.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); + + maRbEPSCompressionLZW.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); + maRbEPSCompressionNone.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); + + maRbBinary.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); + maRbText.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); + + + // JPG Preview +// maCbJPGPreview.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); +maCbJPGPreview.Enable( sal_False ); + + maSbJPGPreviewVert.SetScrollHdl( LINK( this, ExportDialog, UpdateHdl ) ); + maSbJPGPreviewHorz.SetScrollHdl( LINK( this, ExportDialog, UpdateHdl ) ); + maSbZoom.SetScrollHdl( LINK( this, ExportDialog, UpdateHdl ) ); + + // BMP + maCbRLEEncoding.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); + + // EPS + maRbEPSLevel1.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); + maRbEPSLevel2.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); + + maBtnOK.SetClickHdl( LINK( this, ExportDialog, OK ) ); + + setupLayout(); + updateControls(); + + FreeResource(); +} + +void ExportDialog::createSizeControls( vcl::RowOrColumn& rLayout ) +{ + size_t nIndex; + Size aBorder( LogicToPixel( Size( 5, 5 ), MapMode( MAP_APPFONT ) ) ); + long nIndent = aBorder.Width(); + + // Size controls + rLayout.addWindow( &maFlExportSize ); + + Size aLbMax( maLbSizeX.GetSizePixel() ); + aLbMax.Width() = Max( aLbMax.Width(), maLbResolution.GetSizePixel().Width() ); + + boost::shared_ptr< vcl::LabelColumn > xSizeColumns( new vcl::LabelColumn( &rLayout ) ); + rLayout.addChild( xSizeColumns ); + + // row 1 + boost::shared_ptr< vcl::RowOrColumn > xColumn( new vcl::RowOrColumn( xSizeColumns.get(), false ) ); + xSizeColumns->addRow( &maFtSizeX, xColumn, nIndent ); + Size aMinSize( maMfSizeX.GetSizePixel() ); + nIndex = xColumn->addWindow( &maMfSizeX ); + xColumn->setMinimumSize( nIndex, aMinSize ); + nIndex = xColumn->addWindow( &maLbSizeX ); + xColumn->setMinimumSize( nIndex, aLbMax ); + + // row 2 + xColumn = boost::shared_ptr< vcl::RowOrColumn >( new vcl::RowOrColumn( xSizeColumns.get(), false ) ); + xSizeColumns->addRow( &maFtSizeY, xColumn, nIndent ); + nIndex = xColumn->addWindow( &maMfSizeY ); + xColumn->setMinimumSize( nIndex, aMinSize ); + nIndex = xColumn->addWindow( &maLbSizeY ); + xColumn->setMinimumSize( nIndex, aLbMax ); + + // row 3 + if ( mbIsPixelFormat ) // TODO: (metafileresolutionsupport) + { + xColumn = boost::shared_ptr< vcl::RowOrColumn >( new vcl::RowOrColumn( xSizeColumns.get(), false ) ); + xSizeColumns->addRow( &maFtResolution, xColumn, nIndent ); + nIndex = xColumn->addWindow( &maNfResolution ); + xColumn->setMinimumSize( nIndex, aMinSize ); + nIndex = xColumn->addWindow( &maLbResolution ); + xColumn->setMinimumSize( nIndex, aLbMax ); + } + + sal_Int32 nUnit = mnInitialResolutionUnit; + if ( nUnit == UNIT_DEFAULT ) + nUnit = GetDefaultUnit(); + + if ( !mbIsPixelFormat ) + { + maLbSizeX.RemoveEntry( UNIT_PIXEL ); // removing pixel + if ( nUnit >= UNIT_PIXEL ) + nUnit = UNIT_CM; + } + else if ( nUnit > UNIT_MAX_ID ) + nUnit = UNIT_PIXEL; + if ( nUnit < 0 ) + nUnit = UNIT_CM; + maLbSizeX.SelectEntryPos( static_cast< USHORT >( nUnit ) ); + + if ( mbIsPixelFormat ) // TODO: (metafileresolutionsupport) should be supported for vector formats also... this makes + { // sense eg for bitmap fillings in metafiles, to preserve high dpi output + // (atm without special vector support the bitmaps are rendered with 96dpi) + sal_Int32 nResolution = mpOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "PixelExportResolution" ) ), 96 ); + if ( nResolution < 1 ) + nResolution = 96; + maNfResolution.SetValue( nResolution ); + + sal_Int32 nResolutionUnit = mpOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "PixelExportResolutionUnit" ) ), 1 ); + if ( ( nResolutionUnit < 0 ) || ( nResolutionUnit > 2 ) ) + nResolutionUnit = 1; + maLbResolution.SelectEntryPos( static_cast< USHORT >( nResolutionUnit ) ); + } + + boost::shared_ptr< vcl::Spacer > xSpacer( new vcl::Spacer( &rLayout, 2 ) ); + rLayout.addChild( xSpacer ); +} + +void ExportDialog::createColorDepthControls( vcl::RowOrColumn& rLayout ) +{ + // Color Depth + Size aBorder( LogicToPixel( Size( 5, 5 ), MapMode( MAP_APPFONT ) ) ); + long nIndent = aBorder.Width(); + + boost::shared_ptr< vcl::RowOrColumn > xRow( new vcl::RowOrColumn( &rLayout, false ) ); + rLayout.addChild( xRow ); + xRow->addWindow( &maFlColorDepth ); + + xRow = boost::shared_ptr< vcl::RowOrColumn >( new vcl::RowOrColumn( &rLayout, false ) ); + rLayout.addChild( xRow ); + boost::shared_ptr< vcl::Indenter > xIndenter( new vcl::Indenter( &rLayout, nIndent ) ); + xRow->addChild( xIndenter ); + boost::shared_ptr< vcl::RowOrColumn > xRows( new vcl::RowOrColumn( &rLayout, true ) ); + xIndenter->setChild( xRows ); + xRows->addWindow( &maLbColorDepth ); + + boost::shared_ptr< vcl::Spacer > xSpacer( new vcl::Spacer( &rLayout, 2 ) ); + rLayout.addChild( xSpacer ); +} + +void ExportDialog::createScrollBar( vcl::RowOrColumn& rLayout ) +{ + boost::shared_ptr< vcl::RowOrColumn > xRow( new vcl::RowOrColumn( &rLayout, false ) ); + rLayout.addChild( xRow ); + + Size aMinSize( maSbCompression.GetSizePixel() ); + size_t nIndex = xRow->addWindow( &maSbCompression ); + xRow->setMinimumSize( nIndex, aMinSize ); + aMinSize = maNfCompression.GetSizePixel(); + nIndex = xRow->addWindow( &maNfCompression ); + xRow->setMinimumSize( nIndex, aMinSize ); +} + +void ExportDialog::createFilterOptions( vcl::RowOrColumn& rLayout ) +{ + Size aBorder( LogicToPixel( Size( 5, 5 ), MapMode( MAP_APPFONT ) ) ); + long nIndent = aBorder.Width(); + + switch( mnFormat ) + { + case FORMAT_JPG : + { + sal_Int32 nColor = mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "ColorMode" ) ), 0 ); + if ( nColor == 1 ) + nColor = 0; + else + nColor = 1; + maLbColorDepth.InsertEntry( ms8BitGrayscale ); + maLbColorDepth.InsertEntry( ms24BitColor ); + maLbColorDepth.SelectEntryPos( nColor ); + createColorDepthControls( maLayout ); + + rLayout.addWindow( &maFlJPGQuality ); + + // Quality + boost::shared_ptr< vcl::Indenter > xIndenter( new vcl::Indenter( &rLayout, nIndent ) ); + rLayout.addChild( xIndenter ); + boost::shared_ptr< vcl::RowOrColumn > xRows( new vcl::RowOrColumn( &rLayout, true ) ); + xIndenter->setChild( xRows ); + createScrollBar( *xRows.get() ); + xRows->addWindow( &maFtJPGMin ); + xRows->addWindow( &maFtJPGMax ); + if ( maCbJPGPreview.IsEnabled() ) + xRows->addWindow( &maCbJPGPreview ); + + boost::shared_ptr< vcl::Spacer > xSpacer( new vcl::Spacer( &rLayout, 2 ) ); + rLayout.addChild( xSpacer ); + + sal_Int32 nQuality = mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Quality" ) ), 75 ); + if ( ( nQuality < 1 ) || ( nQuality > 100 ) ) + nQuality = 75; + + maSbCompression.SetRangeMin( 1 ); + maSbCompression.SetRangeMax( 100 ); + maNfCompression.SetMin( 1 ); + maNfCompression.SetMax( 100 ); + maNfCompression.SetValue( nQuality ); + maNfCompression.SetStrictFormat( sal_True ); + if ( maCbJPGPreview.IsEnabled() ) + maCbJPGPreview.Check( sal_False ); + } + break; + case FORMAT_PNG : + { + rLayout.addWindow( &maFlCompression ); + + // Compression 1..9 + boost::shared_ptr< vcl::Indenter > xIndenter( new vcl::Indenter( &rLayout, nIndent ) ); + rLayout.addChild( xIndenter ); + boost::shared_ptr< vcl::RowOrColumn > xRows( new vcl::RowOrColumn( &rLayout, true ) ); + xIndenter->setChild( xRows ); + createScrollBar( *xRows.get() ); + xRows->addWindow( &maFtPNGMin ); + xRows->addWindow( &maFtPNGMax ); + boost::shared_ptr< vcl::Spacer > xSpacer( new vcl::Spacer( &rLayout, 2 ) ); + rLayout.addChild( xSpacer ); + + // Interlaced + rLayout.addWindow( &maFlMode ); + xIndenter.reset( new vcl::Indenter( &rLayout, nIndent ) ); + rLayout.addChild( xIndenter ); + xRows.reset( new vcl::RowOrColumn( &rLayout, true ) ); + xIndenter->setChild( xRows ); + xRows->addWindow( &maCbInterlaced ); + + xSpacer.reset( new vcl::Spacer( &rLayout, 2 ) ); + rLayout.addChild( xSpacer ); + + sal_Int32 nCompression = mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Compression" ) ), 6 ); + if ( ( nCompression < 1 ) || ( nCompression > 9 ) ) + nCompression = 6; + maSbCompression.SetRangeMin( 1 ); + maSbCompression.SetRangeMax( 9 ); + maNfCompression.SetMin( 1 ); + maNfCompression.SetMax( 9 ); + maNfCompression.SetValue( 9 ); + maNfCompression.SetStrictFormat( sal_True ); + + maCbInterlaced.Check( mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Interlaced" ) ), 0 ) != 0 ); + } + break; + case FORMAT_BMP : + { + sal_Int32 nColor = mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Color" ) ), 0 ); + if ( nColor == 0 ) + nColor = 6; + else + nColor--; + maLbColorDepth.InsertEntry( ms1BitTreshold ); + maLbColorDepth.InsertEntry( ms1BitDithered ); + maLbColorDepth.InsertEntry( ms4BitGrayscale ); + maLbColorDepth.InsertEntry( ms4BitColorPalette ); + maLbColorDepth.InsertEntry( ms8BitGrayscale ); + maLbColorDepth.InsertEntry( ms8BitColorPalette ); + maLbColorDepth.InsertEntry( ms24BitColor ); + maLbColorDepth.SelectEntryPos( nColor ); + createColorDepthControls( maLayout ); + + rLayout.addWindow( &maFlCompression ); + // RLE coding + boost::shared_ptr< vcl::Indenter > xIndenter( new vcl::Indenter( &rLayout, nIndent ) ); + rLayout.addChild( xIndenter ); + boost::shared_ptr< vcl::RowOrColumn > xRows( new vcl::RowOrColumn( &rLayout, true ) ); + xIndenter->setChild( xRows ); + xRows->addWindow( &maCbRLEEncoding ); + boost::shared_ptr< vcl::Spacer > xSpacer( new vcl::Spacer( &rLayout, 2 ) ); + rLayout.addChild( xSpacer ); + + maCbRLEEncoding.Check( mpFilterOptionsItem->ReadBool( String( RTL_CONSTASCII_USTRINGPARAM( "RLE_Coding" ) ), sal_True ) ); + } + break; + case FORMAT_GIF : + { + rLayout.addWindow( &maFlMode ); + boost::shared_ptr< vcl::Indenter > xIndenter( new vcl::Indenter( &rLayout, nIndent ) ); + rLayout.addChild( xIndenter ); + boost::shared_ptr< vcl::RowOrColumn > xRows( new vcl::RowOrColumn( &rLayout, true ) ); + xIndenter->setChild( xRows ); + xRows->addWindow( &maCbInterlaced ); + boost::shared_ptr< vcl::Spacer > xSpacer( new vcl::Spacer( &rLayout, 2 ) ); + rLayout.addChild( xSpacer ); + + rLayout.addWindow( &maFlGIFDrawingObjects ); + xIndenter = boost::shared_ptr< vcl::Indenter >( new vcl::Indenter( &rLayout, nIndent ) ); + rLayout.addChild( xIndenter ); + xRows = boost::shared_ptr< vcl::RowOrColumn >( new vcl::RowOrColumn( &rLayout, true ) ); + xIndenter->setChild( xRows ); + xRows->addWindow( &maCbSaveTransparency ); + xSpacer.reset( new vcl::Spacer( &rLayout, 2 ) ); + rLayout.addChild( xSpacer ); + + maCbInterlaced.Check( mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Interlaced" ) ), 1 ) != 0 ); + maCbSaveTransparency.Check( mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Translucent" ) ), 1 ) != 0 ); + } + break; + case FORMAT_PBM : + case FORMAT_PGM : + case FORMAT_PPM : + { + rLayout.addWindow( &maFlJPGQuality ); + + // RB Binary / Text + boost::shared_ptr< vcl::Indenter > xIndenter( new vcl::Indenter( &rLayout, nIndent ) ); + rLayout.addChild( xIndenter ); + boost::shared_ptr< vcl::RowOrColumn > xRows( new vcl::RowOrColumn( &rLayout, true ) ); + xIndenter->setChild( xRows ); + xRows->addWindow( &maRbBinary ); + xRows->addWindow( &maRbText ); + boost::shared_ptr< vcl::Spacer > xSpacer( new vcl::Spacer( &rLayout, 2 ) ); + rLayout.addChild( xSpacer ); + + sal_Int32 nFormat = mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "FileFormat" ) ), 1 ); + maRbBinary.Check( nFormat == 0 ); + maRbText.Check( nFormat != 0 ); + } + break; + case FORMAT_EPS : + { + boost::shared_ptr< vcl::RowOrColumn > xColumns( new vcl::RowOrColumn( &rLayout, false ) ); + rLayout.addChild( xColumns ); + boost::shared_ptr< vcl::RowOrColumn > xLeft( new vcl::RowOrColumn( &rLayout, true ) ); + xColumns->addChild( xLeft ); + + xLeft->addWindow( &maFlEPSPreview ); + boost::shared_ptr< vcl::Indenter > xIndenter( new vcl::Indenter( xLeft.get(), nIndent ) ); + xLeft->addChild( xIndenter ); + boost::shared_ptr< vcl::RowOrColumn > xRows( new vcl::RowOrColumn( xLeft.get(), true ) ); + xIndenter->setChild( xRows ); + xRows->addWindow( &maCbEPSPreviewTIFF ); + xRows->addWindow( &maCbEPSPreviewEPSI ); + boost::shared_ptr< vcl::Spacer > xSpacer( new vcl::Spacer( xLeft.get(), 2 ) ); + xLeft->addChild( xSpacer ); + + xLeft->addWindow( &maFlEPSVersion ); + xIndenter = boost::shared_ptr< vcl::Indenter >( new vcl::Indenter( xLeft.get(), nIndent ) ); + xLeft->addChild( xIndenter ); + xRows = boost::shared_ptr< vcl::RowOrColumn >( new vcl::RowOrColumn( xLeft.get(), true ) ); + xIndenter->setChild( xRows ); + xRows->addWindow( &maRbEPSLevel1 ); + xRows->addWindow( &maRbEPSLevel2 ); + xSpacer.reset( new vcl::Spacer( xLeft.get(), 2 ) ); + xLeft->addChild( xSpacer ); + + boost::shared_ptr< vcl::RowOrColumn > xRight( new vcl::RowOrColumn( &rLayout, true ) ); + xColumns->addChild( xRight ); + + xRight->addWindow( &maFlEPSColorFormat ); + xIndenter = boost::shared_ptr< vcl::Indenter >( new vcl::Indenter( xRight.get(), nIndent ) ); + xRight->addChild( xIndenter ); + xRows = boost::shared_ptr< vcl::RowOrColumn >( new vcl::RowOrColumn( xRight.get(), true ) ); + xIndenter->setChild( xRows ); + xRows->addWindow( &maRbEPSColorFormat1 ); + xRows->addWindow( &maRbEPSColorFormat2 ); + xSpacer.reset( new vcl::Spacer( xRight.get(), 2 ) ); + xRight->addChild( xSpacer ); + + xRight->addWindow( &maFlCompression ); + xIndenter = boost::shared_ptr< vcl::Indenter >( new vcl::Indenter( xRight.get(), nIndent ) ); + xRight->addChild( xIndenter ); + xRows = boost::shared_ptr< vcl::RowOrColumn >( new vcl::RowOrColumn( xRight.get(), true ) ); + xIndenter->setChild( xRows ); + xRows->addWindow( &maRbEPSCompressionLZW ); + xRows->addWindow( &maRbEPSCompressionNone ); + + xSpacer.reset( new vcl::Spacer( &rLayout, 2 ) ); + rLayout.addChild( xSpacer ); + + sal_Int32 nPreview = mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Preview" ) ), 0 ); + sal_Int32 nVersion = mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Version" ) ), 2 ); + sal_Int32 nColor = mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "ColorFormat" ) ), 0 ); + sal_Int32 nCompr = mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "CompressionMode" ) ), 2 ); + + mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "TextMode" ) ), 0 ); + + maCbEPSPreviewTIFF.Check( ( nPreview & 1 ) != 0 ); + maCbEPSPreviewEPSI.Check( ( nPreview & 2 ) != 0 ); + + maRbEPSLevel1.Check( nVersion == 1 ); + maRbEPSLevel2.Check( nVersion == 2 ); + + maRbEPSColorFormat1.Check( nColor == 1 ); + maRbEPSColorFormat2.Check( nColor != 1 ); + + maRbEPSCompressionLZW.Check( nCompr == 1 ); + maRbEPSCompressionNone.Check( nCompr != 1 ); + } + break; + } +} + +void ExportDialog::createButtons( vcl::RowOrColumn& rLayout ) +{ + rLayout.addWindow( &maFlButtons ); + boost::shared_ptr< vcl::Spacer > xSpacer( new vcl::Spacer( &rLayout, 2 ) ); + rLayout.addChild( xSpacer ); + + Size aBorder( LogicToPixel( Size( 5, 5 ), MapMode( MAP_APPFONT ) ) ); + + boost::shared_ptr< vcl::RowOrColumn > xButtons( new vcl::RowOrColumn( &rLayout, false ) ); + size_t nIndex = rLayout.addChild( xButtons ); + rLayout.setBorders( nIndex, aBorder.Width(), 0, aBorder.Width(), aBorder.Width() ); + + Size aMinSize( maBtnCancel.GetSizePixel() ); + // insert help button + xButtons->setMinimumSize( xButtons->addWindow( &maBtnHelp ), aMinSize ); + + // insert a spacer, cancel and OK buttons are right aligned + + xSpacer.reset( new vcl::Spacer( xButtons.get(), 2 ) ); + xButtons->addChild( xSpacer ); + xButtons->setMinimumSize( xButtons->addWindow( &maBtnOK ), aMinSize ); + xButtons->setMinimumSize( xButtons->addWindow( &maBtnCancel ), aMinSize ); +} + +void ExportDialog::setupLayout() +{ + Size aBorder( LogicToPixel( Size( 5, 5 ), MapMode( MAP_APPFONT ) ) ); + maLayout.setParentWindow( this ); + maLayout.setOuterBorder( aBorder.Width() ); + + createSizeControls( maLayout ); + createFilterOptions( maLayout ); + + if ( mnMaxFilesizeForRealtimePreview || mbIsPixelFormat ) + { + maLayout.addWindow( &maFlEstimatedSize ); + maLayout.addWindow( &maFtEstimatedSize ); + } + createButtons( maLayout ); + + maLayout.show(); + maDialogSize = maLayout.getOptimalSize( WINDOWSIZE_PREFERRED ); + maLayout.setManagedArea( Rectangle( Point(), maDialogSize ) ); + SetOutputSizePixel( Size( mbPreview ? maDialogSize.Width() * 2 : maDialogSize.Width(), maDialogSize.Height() ) ); + + maRectFlButtons = Rectangle( maFlButtons.GetPosPixel(), maFlButtons.GetSizePixel() ); + maRectBtnHelp = Rectangle( maBtnHelp.GetPosPixel(), maBtnHelp.GetSizePixel() ); + maRectBtnOK = Rectangle( maBtnOK.GetPosPixel(), maBtnOK.GetSizePixel() ); + maRectBtnCancel = Rectangle( maBtnCancel.GetPosPixel(), maBtnOK.GetSizePixel() ); + + maLbSizeY.Hide(); +} + +static rtl::OUString ImpValueOfInKB( const sal_Int64& rVal ) +{ + double fVal( static_cast<double>( rVal ) ); + fVal /= ( 1 << 10 ); + fVal += 0.05; + rtl::OUStringBuffer aVal( rtl::OUString::valueOf( fVal ) ); + sal_Int32 nX( rtl::OUString( aVal.getStr() ).indexOf( '.', 0 ) ); + if ( nX > 0 ) + aVal.setLength( nX + 2 ); + return aVal.makeStringAndClear(); +} + +sal_Int32 static GetZoomValueFromThumbPos( sal_Int32 nThumbPos ) +{ + sal_Int32 nProz = 0; + if ( nThumbPos <= 50 ) + nProz = nThumbPos * 2; // so a range of 50 represents 100% + else + nProz = ( ( nThumbPos - 50 ) * 60 ) + 100; // we want to scale up to 3000% + return nProz; +} + +void ExportDialog::updatePreview() +{ + // JPG +// maCbJPGPreview.Enable( IsTempExportAvailable() ); + +// if ( maCbJPGPreview.IsEnabled() && maCbJPGPreview.IsChecked() ) + if ( mbPreview ) + { + long nScrollBarSize = Application::GetSettings().GetStyleSettings().GetScrollBarSize(); + + Point aPreviewPos( maDialogSize.Width(), 0 ); + Size aPreviewSize( maDialogSize.Width(), maFlButtons.GetPosPixel().Y() ); + + Point aFixedBitmapPos( aPreviewPos ); + Size aFixedBitmapSize( aPreviewSize ); + + maSbZoom.Show( sal_False ); + maSbZoom.SetPosPixel( Point( aPreviewPos.X(), aPreviewPos.Y() ) ); + maSbZoom.SetSizePixel( Size( aPreviewSize.Width() / 4, nScrollBarSize ) ); + maNfZoom.Show( sal_False ); + maNfZoom.SetPosPixel( Point( aPreviewPos.X() + aPreviewSize.Width() / 4, aPreviewPos.Y() ) ); + maNfZoom.SetSizePixel( Size( aPreviewSize.Width() / 6, nScrollBarSize ) ); + maNfZoom.SetValue( GetZoomValueFromThumbPos( maSbZoom.GetThumbPos() ) ); + maFbJPGPreview.Show( sal_True ); + + sal_Int32 nZoom = GetZoomValueFromThumbPos( maSbZoom.GetThumbPos() ); + double fSizePixelX = static_cast< double >( maSize.Width * nZoom ) / 100.0; + double fSizePixelY = static_cast< double >( maSize.Height * nZoom ) / 100.0; + + double fXRatio = fSizePixelX / maSize.Width; // the size of each pixel + double fYRatio = fSizePixelY / maSize.Height; + + sal_Bool bHorzSb = fSizePixelX > aFixedBitmapSize.Width(); + sal_Bool bVertSb = fSizePixelY > aFixedBitmapSize.Height(); + if ( bHorzSb ) + { + aFixedBitmapSize.Height() -= nScrollBarSize; + + maSbJPGPreviewHorz.Show( sal_True ); + maSbJPGPreviewHorz.SetPosPixel( Point( aFixedBitmapPos.X(), aFixedBitmapPos.Y() + aFixedBitmapSize.Height() ) ); + maSbJPGPreviewHorz.SetSizePixel( Size( aFixedBitmapSize.Width(), nScrollBarSize ) ); + } + else + { + maSbJPGPreviewHorz.Show( sal_False ); + } + + + if ( bVertSb ) + { + aFixedBitmapSize.Width() -= nScrollBarSize; + + maSbJPGPreviewVert.Show( sal_True ); + maSbJPGPreviewVert.SetPosPixel( Point( aFixedBitmapPos.X() + aFixedBitmapSize.Width(), aFixedBitmapPos.Y() ) ); + maSbJPGPreviewVert.SetSizePixel( Size( nScrollBarSize, aFixedBitmapSize.Height() ) ); + } + else + { + maSbJPGPreviewVert.Show( sal_False ); + } + + Point aPos( 0, 0 ); + Size aSize; + if ( fXRatio > 1.0 ) + { + aSize.Width() = maSize.Width > aFixedBitmapSize.Width() ? maSize.Width : aFixedBitmapSize.Width(); + aSize.Width() /= static_cast<long int>(fXRatio); + } + else + { + aSize.Width() = maSize.Width < aFixedBitmapSize.Width() ? maSize.Width : aFixedBitmapSize.Width(); + aSize.Width() /= static_cast<long int>(fXRatio); + } + + if ( fYRatio > 1.0 ) + { + aSize.Height() = maSize.Height > aFixedBitmapSize.Height() ? maSize.Height : aFixedBitmapSize.Height(); + aSize.Height() /= static_cast<long int>(fYRatio); + } + else + { + aSize.Height() = maSize.Height < aFixedBitmapSize.Height() ? maSize.Height : aFixedBitmapSize.Height(); + aSize.Height() /= static_cast<long int>(fYRatio); + } + + if ( aSize.Width() < maSize.Width ) + { + sal_Int32 nXDiff = static_cast< sal_Int32 >( ( ( ( maSize.Width - aSize.Width() ) * maSbJPGPreviewHorz.GetThumbPos() ) / 100.0 ) ); + aPos.X() += nXDiff; + } + if ( aSize.Height() < maSize.Height ) + { + sal_Int32 nYDiff = static_cast< sal_Int32 >( ( ( ( maSize.Height - aSize.Height() ) * maSbJPGPreviewVert.GetThumbPos() ) / 100.0 ) ); + aPos.Y() += nYDiff; + } + + Bitmap aCroppedBitmap( maBitmap ); + aCroppedBitmap.Crop( Rectangle( aPos, aSize ) ); + aSize = aCroppedBitmap.GetSizePixel(); + aSize = Size( static_cast<long int>(aSize.Width() * fXRatio), static_cast<long int>(aSize.Height() * fYRatio) ); + aCroppedBitmap.Scale( aSize ); + + if ( aSize.Width() > aFixedBitmapSize.Width() ) + aSize.Width() = aFixedBitmapSize.Width(); + if ( aSize.Height() > aFixedBitmapSize.Height() ) + aSize.Height() = aFixedBitmapSize.Height(); + Point aPoint( aFixedBitmapPos ); + if ( aSize.Width() < aFixedBitmapSize.Width() ) + aPoint.X() += ( aFixedBitmapSize.Width() - aSize.Width() ) / 2; + if ( aSize.Height() < aFixedBitmapSize.Height() ) + aPoint.Y() += ( aFixedBitmapSize.Height() - aSize.Height() ) / 2; + + maFbJPGPreview.SetPosPixel( aPoint ); + maFbJPGPreview.SetSizePixel( aSize ); + maFbJPGPreview.SetBitmap( aCroppedBitmap ); + + SetOutputSizePixel( Size( maDialogSize.Width() * 2, maDialogSize.Height() ) ); + + maFlButtons.SetSizePixel( Size( maRectFlButtons.GetWidth() * 2, maRectFlButtons.GetHeight() ) ); + maBtnHelp.SetPosPixel( Point( maRectBtnHelp.Left() + maDialogSize.Width(), maRectBtnHelp.Top() ) ); + maBtnOK.SetPosPixel( Point( maRectBtnOK.Left() + maDialogSize.Width(), maRectBtnOK.Top() ) ); + maBtnCancel.SetPosPixel( Point( maRectBtnCancel.Left() + maDialogSize.Width(), maRectBtnCancel.Top() ) ); + } + else + { + maSbZoom.Show( sal_False ); + maNfZoom.Show( sal_False ); + maFbJPGPreview.Show( sal_False ); + maSbJPGPreviewHorz.Show( sal_False ); + maSbJPGPreviewVert.Show( sal_False ); + + SetOutputSizePixel( maDialogSize ); + + maFlButtons.SetSizePixel( Size( maRectFlButtons.GetWidth(), maRectFlButtons.GetHeight() ) ); + maBtnHelp.SetPosPixel( Point( maRectBtnHelp.Left(), maRectBtnHelp.Top() ) ); + maBtnOK.SetPosPixel( Point( maRectBtnOK.Left(), maRectBtnOK.Top() ) ); + maBtnCancel.SetPosPixel( Point( maRectBtnCancel.Left(), maRectBtnCancel.Top() ) ); + } +} + +void ExportDialog::updateControls() +{ + GetGraphicStream(); + + // Size Controls + if ( !mbIsPixelFormat ) + { + awt::Size aSize100thmm( maSize ); + Size aSize( LogicToLogic( Size( aSize100thmm.Width * 100, aSize100thmm.Height * 100 ), MAP_100TH_MM, + MapMode( GetMapUnit( maLbSizeX.GetSelectEntryPos() ) ) ) ); + maMfSizeX.SetValue( aSize.Width() ); + maMfSizeY.SetValue( aSize.Height() ); + } + else + { + MapUnit aMapUnit( GetMapUnit( maLbSizeX.GetSelectEntryPos() ) ); + if ( aMapUnit == MAP_PIXEL ) + { // calculating pixel count via resolution and original graphic size + maMfSizeX.SetDecimalDigits( 0 ); + maMfSizeY.SetDecimalDigits( 0 ); + maMfSizeX.SetValue( maSize.Width ); + maMfSizeY.SetValue( maSize.Height ); + } + else + { + maMfSizeX.SetDecimalDigits( 2 ); + maMfSizeY.SetDecimalDigits( 2 ); + double fRatio; + switch( GetMapUnit( maLbSizeX.GetSelectEntryPos() ) ) + { + case MAP_INCH : fRatio = static_cast< double >( maResolution.Width ) * 0.0254; break; + case MAP_MM : fRatio = static_cast< double >( maResolution.Width ) * 0.001; break; + case MAP_POINT :fRatio = ( static_cast< double >( maResolution.Width ) * 0.0254 ) / 72.0; break; + default: + case MAP_CM : fRatio = static_cast< double >( maResolution.Width ) * 0.01; break; + } + maMfSizeX.SetValue( static_cast< sal_Int32 >( ( static_cast< double >( maSize.Width * 100 ) / fRatio ) + 0.5 ) ); + maMfSizeY.SetValue( static_cast< sal_Int32 >( ( static_cast< double >( maSize.Height * 100 ) / fRatio ) + 0.5 ) ); + } + } + sal_Int32 nResolution = 0; + switch( maLbResolution.GetSelectEntryPos() ) + { + case 0 : nResolution = maResolution.Width / 100; break; // pixels / cm + case 2 : nResolution = maResolution.Width; break; // pixels / meter + default: + case 1 : nResolution = static_cast< sal_Int32 >(maResolution.Width * 0.0254); break; // pixels / inch + } + maNfResolution.SetValue( nResolution ); + + if ( maSbCompression.IsVisible() ) + maSbCompression.SetThumbPos( maNfCompression.GetValue() ); + + // updating estimated size + sal_Int64 nRealFileSize( mpTempStream->Tell() ); + if ( mbIsPixelFormat ) + { + String aEst( nRealFileSize ? msEstimatedSizePix2 : msEstimatedSizePix1 ); + sal_Int64 nRawFileSize( GetRawFileSize() ); + xub_StrLen nInd = aEst.Search( '%' ); + aEst.Replace( nInd, 2, ImpValueOfInKB( nRawFileSize ) ); + + if ( nRealFileSize ) + { + nInd = aEst.Search( '%', nInd ); + aEst.Replace( nInd, 2, ImpValueOfInKB( nRealFileSize ) ); + } + maFtEstimatedSize.SetText( aEst ); + } + else + { + if ( mnMaxFilesizeForRealtimePreview ) + { + String aEst( msEstimatedSizeVec ); + xub_StrLen nInd = aEst.Search( '%', 0 ); + aEst.Replace( nInd, 2, ImpValueOfInKB( nRealFileSize ) ); + maFtEstimatedSize.SetText( aEst ); + } + } + updatePreview(); + + // EPS + if ( maRbEPSLevel1.IsVisible() ) + { + sal_Bool bEnabled = maRbEPSLevel1.IsChecked() == sal_False; + maRbEPSColorFormat1.Enable( bEnabled ); + maRbEPSColorFormat2.Enable( bEnabled ); + maRbEPSCompressionLZW.Enable( bEnabled ); + maRbEPSCompressionNone.Enable( bEnabled ); + } +} + +ExportDialog::~ExportDialog() +{ + delete mpFilterOptionsItem; + delete mpOptionsItem; +} + + +/************************************************************************* +|* +|* Speichert eingestellte Werte in ini-Datei +|* +\************************************************************************/ +IMPL_LINK( ExportDialog, UpdateHdl, void *, EMPTYARG ) +{ + updateControls(); + return 0; +} + +IMPL_LINK( ExportDialog, UpdateHdlMtfSizeX, void *, EMPTYARG ) +{ + double fRatio = static_cast< double >( maOriginalSize.Height ) / maOriginalSize.Width; + + if ( mbIsPixelFormat ) + { + switch( GetMapUnit( maLbSizeX.GetSelectEntryPos() ) ) + { + case MAP_INCH : maSize.Width = static_cast< sal_Int32 >( static_cast< double >( maResolution.Width ) * 0.0254 * maMfSizeX.GetValue() / 100.0 + 0.5 ); break; + case MAP_CM : maSize.Width = static_cast< sal_Int32 >( static_cast< double >( maResolution.Width ) * 0.01 * maMfSizeX.GetValue() / 100.0 + 0.5 ); break; + case MAP_MM : maSize.Width = static_cast< sal_Int32 >( static_cast< double >( maResolution.Width ) * 0.001 * maMfSizeX.GetValue() / 100.0 + 0.5 ); break; + case MAP_POINT : maSize.Width = static_cast< sal_Int32 >( static_cast< double >( maResolution.Width ) * 0.0254 * maMfSizeX.GetValue() / 100.0 * 72 + 0.5 ); break; + default: + case MAP_PIXEL : maSize.Width = maMfSizeX.GetValue(); break; + } + maSize.Height = static_cast< sal_Int32 >( fRatio * maSize.Width + 0.5 ); + } + else + { + Fraction aFract( 1, 100 ); + sal_Int32 nWidth = maMfSizeX.GetValue(); + sal_Int32 nHeight= static_cast< sal_Int32 >( nWidth * fRatio ); + const Size aSource( static_cast< sal_Int32 >( nWidth ), static_cast< sal_Int32 >( nHeight ) ); + MapMode aSourceMapMode( GetMapUnit( maLbSizeX.GetSelectEntryPos() ),Point(), aFract, aFract ); + Size aDest( LogicToLogic( aSource, aSourceMapMode, MAP_100TH_MM ) ); + + maSize.Width = aDest.Width(); + if ( mbPreserveAspectRatio ) + maSize.Height = aDest.Height(); + } + updateControls(); + return 0; +} + +IMPL_LINK( ExportDialog, UpdateHdlMtfSizeY, void *, EMPTYARG ) +{ + double fRatio = static_cast< double >( maOriginalSize.Width ) / maOriginalSize.Height; + + if ( mbIsPixelFormat ) + { + switch( GetMapUnit( maLbSizeX.GetSelectEntryPos() ) ) + { + case MAP_INCH : maSize.Height = static_cast< sal_Int32 >( static_cast< double >( maResolution.Height ) * 0.0254 * maMfSizeY.GetValue() / 100.0 + 0.5 ); break; + case MAP_CM : maSize.Height = static_cast< sal_Int32 >( static_cast< double >( maResolution.Height ) * 0.01 * maMfSizeY.GetValue() / 100.0 + 0.5 ); break; + case MAP_MM : maSize.Height = static_cast< sal_Int32 >( static_cast< double >( maResolution.Height ) * 0.001 * maMfSizeY.GetValue() / 100.0 + 0.5 ); break; + case MAP_POINT : maSize.Height = static_cast< sal_Int32 >( static_cast< double >( maResolution.Height ) * 0.0254 * maMfSizeY.GetValue() / 100.0 * 72 + 0.5 ); break; + default: + case MAP_PIXEL : maSize.Height = maMfSizeY.GetValue(); break; + } + maSize.Width = static_cast< sal_Int32 >( fRatio * maSize.Height + 0.5 ); + } + else + { + Fraction aFract( 1, 100 ); + sal_Int32 nHeight= maMfSizeY.GetValue(); + sal_Int32 nWidth = static_cast< sal_Int32 >( nHeight * fRatio ); + const Size aSource( static_cast< sal_Int32 >( nWidth ), static_cast< sal_Int32 >( nHeight ) ); + MapMode aSourceMapMode( GetMapUnit( maLbSizeX.GetSelectEntryPos() ),Point(), aFract, aFract ); + Size aDest( LogicToLogic( aSource, aSourceMapMode, MAP_100TH_MM ) ); + + maSize.Height = aDest.Height(); + if ( mbPreserveAspectRatio ) + maSize.Width = aDest.Width(); + } + updateControls(); + return 0; +} + +IMPL_LINK( ExportDialog, UpdateHdlNfResolution, void *, EMPTYARG ) +{ + sal_Int32 nResolution = maNfResolution.GetValue(); + if ( maLbResolution.GetSelectEntryPos() == 0 ) // pixels / cm + nResolution *= 100; + else if ( maLbResolution.GetSelectEntryPos() == 1 ) // pixels / inch + nResolution = static_cast< sal_Int32 >( ( ( static_cast< double >( nResolution ) + 0.5 ) / 0.0254 ) ); + maResolution.Width = nResolution; + maResolution.Height= nResolution; + + updateControls(); + return 0; +} + +IMPL_LINK( ExportDialog, SbCompressionUpdateHdl, void *, EMPTYARG ) +{ + maNfCompression.SetValue( maSbCompression.GetThumbPos() ); + updateControls(); + return 0; +} + +IMPL_LINK( ExportDialog, OK, void *, EMPTYARG ) +{ + // writing config parameter + + + mrFltCallPara.aFilterData = GetFilterData( sal_True ); + EndDialog( RET_OK ); + + return 0; +} + diff --git a/svtools/source/filter.vcl/filter/exportdialog.hrc b/svtools/source/filter.vcl/filter/exportdialog.hrc new file mode 100644 index 000000000000..e230bcd2c5c3 --- /dev/null +++ b/svtools/source/filter.vcl/filter/exportdialog.hrc @@ -0,0 +1,99 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#include <svtools/svtools.hrc> + +#define BTN_OK 1 +#define BTN_CANCEL 1 +#define BTN_HELP 1 + +#define FL_EXPORT_SIZE 1 +#define FL_COLOR_DEPTH 2 +#define FL_JPG_QUALITY 3 +#define FL_COMPRESSION 4 +#define FL_MODE 5 +#define FL_GIF_DRAWING_OBJECTS 6 +#define FL_PBM_OPTIONS 7 +#define FL_EPS_PREVIEW 8 +#define FL_EPS_VERSION 9 +#define FL_EPS_COLOR_FORMAT 10 +#define FL_ESTIMATED_SIZE 11 +#define FL_BUTTONS 12 + +#define FT_SIZEX 1 +#define FT_SIZEY 2 +#define FT_RESOLUTION 3 +#define FT_JPG_MIN 4 +#define FT_JPG_MAX 5 +#define FT_PNG_MIN 6 +#define FT_PNG_MAX 7 +#define FT_ESTIMATED_SIZE 8 + +#define NF_RESOLUTION 1 +#define NF_COMPRESSION 2 +#define NF_ZOOM 3 + +#define MF_SIZEX 1 +#define MF_SIZEY 2 + +#define LB_SIZEX 1 +#define LB_SIZEY 2 +#define LB_RESOLUTION 3 +#define LB_COLOR_DEPTH 4 + +#define RB_BINARY 1 +#define RB_TEXT 2 +#define RB_EPS_LEVEL1 3 +#define RB_EPS_LEVEL2 4 +#define RB_EPS_COLOR_FORMAT1 5 +#define RB_EPS_COLOR_FORMAT2 6 +#define RB_EPS_COMPRESSION_LZW 7 +#define RB_EPS_COMPRESSION_NONE 8 + +#define CB_JPG_PREVIEW 1 +#define CB_INTERLACED 2 +#define CB_RLE_ENCODING 3 +#define CB_SAVE_TRANSPARENCY 4 +#define CB_EPS_PREVIEW_TIFF 5 +#define CB_EPS_PREVIEW_EPSI 6 + +#define FB_JPG_PREVIEW 1 + +#define SB_COMPRESSION 1 +#define SB_JPG_PREVIEW_HORZ 2 +#define SB_JPG_PREVIEW_VERT 3 +#define SB_ZOOM 4 + +#define STR_1BIT_THRESHOLD 1 +#define STR_1BIT_DITHERED 2 +#define STR_4BIT_GRAYSCALE 3 +#define STR_4BIT_COLOR_PALETTE 4 +#define STR_8BIT_GRAYSCALE 5 +#define STR_8BIT_COLOR_PALETTE 6 +#define STR_24BIT_TRUE_COLOR 7 +#define STR_ESTIMATED_SIZE_PIX_1 8 +#define STR_ESTIMATED_SIZE_PIX_2 9 +#define STR_ESTIMATED_SIZE_VEC 10 diff --git a/svtools/source/filter.vcl/filter/exportdialog.hxx b/svtools/source/filter.vcl/filter/exportdialog.hxx new file mode 100644 index 000000000000..20a9ac3ea832 --- /dev/null +++ b/svtools/source/filter.vcl/filter/exportdialog.hxx @@ -0,0 +1,216 @@ +/************************************************************************* + * + * 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 _EXPORTDIALOG_HXX_ +#define _EXPORTDIALOG_HXX_ + +#include <svtools/fltcall.hxx> +#include <vcl/dialog.hxx> +#include <vcl/button.hxx> +#include <vcl/fixed.hxx> +#include <vcl/field.hxx> +#include <vcl/lstbox.hxx> +#include <vcl/msgbox.hxx> +#include <vcl/arrange.hxx> +#include <vcl/scrbar.hxx> +#include <com/sun/star/document/XExporter.hpp> +#include <com/sun/star/drawing/XShape.hpp> +#include <com/sun/star/drawing/XShapes.hpp> +#include <com/sun/star/drawing/XDrawPage.hpp> + +/************************************************************************* +|* +|* Dialog zum Einstellen von Filteroptionen bei Pixelformaten +|* +\************************************************************************/ + +class FilterConfigItem; +class ExportDialog : public ModalDialog +{ +private: + + FltCallDialogParameter& + mrFltCallPara; + + ResMgr* mpMgr; + + const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > + mxMgr; + const com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& + mxSourceDocument; + + FixedLine maFlExportSize; + FixedText maFtSizeX; + MetricField maMfSizeX; + ListBox maLbSizeX; + FixedText maFtSizeY; + MetricField maMfSizeY; + ListBox maLbSizeY; + FixedText maFtResolution; + NumericField maNfResolution; + ListBox maLbResolution; + FixedLine maFlColorDepth; + ListBox maLbColorDepth; + FixedLine maFlJPGQuality; + FixedLine maFlMode; + FixedLine maFlPBMOptions; + ScrollBar maSbCompression; + NumericField maNfCompression; + FixedText maFtJPGMin; + FixedText maFtJPGMax; + FixedText maFtPNGMin; + FixedText maFtPNGMax; + CheckBox maCbJPGPreview; + CheckBox maCbInterlaced; + CheckBox maCbRLEEncoding; + FixedLine maFlGIFDrawingObjects; + CheckBox maCbSaveTransparency; + RadioButton maRbBinary; + RadioButton maRbText; + FixedLine maFlEPSPreview; + CheckBox maCbEPSPreviewTIFF; + CheckBox maCbEPSPreviewEPSI; + FixedLine maFlEPSVersion; + RadioButton maRbEPSLevel1; + RadioButton maRbEPSLevel2; + FixedLine maFlEPSColorFormat; + RadioButton maRbEPSColorFormat1; + RadioButton maRbEPSColorFormat2; + FixedLine maFlCompression; + RadioButton maRbEPSCompressionLZW; + RadioButton maRbEPSCompressionNone; + FixedLine maFlEstimatedSize; + FixedText maFtEstimatedSize; + String msEstimatedSizePix1; + String msEstimatedSizePix2; + String msEstimatedSizeVec; + FixedLine maFlButtons; + FixedBitmap maFbJPGPreview; + ScrollBar maSbZoom; + NumericField maNfZoom; + ScrollBar maSbJPGPreviewHorz; + ScrollBar maSbJPGPreviewVert; + OKButton maBtnOK; + CancelButton maBtnCancel; + HelpButton maBtnHelp; + + String ms1BitTreshold; + String ms1BitDithered; + String ms4BitGrayscale; + String ms4BitColorPalette; + String ms8BitGrayscale; + String ms8BitColorPalette; + String ms24BitColor; + + vcl::RowOrColumn maLayout; + Size maDialogSize; + + FilterConfigItem* mpOptionsItem; + FilterConfigItem* mpFilterOptionsItem; + + String maExt; + String maEstimatedSizeText; + sal_Int16 mnFormat; + sal_Int32 mnMaxFilesizeForRealtimePreview; + + Rectangle maRectFlButtons; + Rectangle maRectBtnHelp; + Rectangle maRectBtnOK; + Rectangle maRectBtnCancel; + + SvStream* mpTempStream; + Bitmap maBitmap; + + com::sun::star::awt::Size + maOriginalSize; // the original graphic size in 1/100mm + com::sun::star::awt::Size + maSize; // for vector graphics it always contains the logical size in 1/100mm + + sal_Bool mbPreview; + sal_Bool mbIsPixelFormat; + sal_Bool mbExportSelection; + sal_Bool mbPreserveAspectRatio; + + sal_Int32 mnInitialResolutionUnit; + + // for pixel graphics it always contains the pixel count + com::sun::star::awt::Size + maResolution; // it always contains the number of pixels per meter + + com::sun::star::uno::Reference< com::sun::star::drawing::XShape > + mxShape; + com::sun::star::uno::Reference< com::sun::star::drawing::XShapes > + mxShapes; + com::sun::star::uno::Reference< com::sun::star::drawing::XDrawPage > + mxPage; + + + DECL_LINK( UpdateHdl,void* p ); + DECL_LINK( UpdateHdlMtfSizeX,void* p ); + DECL_LINK( UpdateHdlMtfSizeY,void* p ); + DECL_LINK( UpdateHdlNfResolution,void* p ); + DECL_LINK( SbCompressionUpdateHdl,void* p ); + DECL_LINK( NfCompressionUpdateHdlX,void* p ); + + DECL_LINK( OK, void* p ); + + void createSizeControls( vcl::RowOrColumn& ); + void createColorDepthControls( vcl::RowOrColumn& ); + void createFilterOptions( vcl::RowOrColumn& ); + void createButtons( vcl::RowOrColumn& ); + void createScrollBar( vcl::RowOrColumn& ); + void setupLayout(); + void updatePreview(); + void updateControls(); + + void GetGraphicSource(); + sal_Bool GetGraphicStream(); + Bitmap GetGraphicBitmap( SvStream& rStream ); + ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > + GetFilterData( sal_Bool bUpdateConfig ); + + sal_uInt32 GetRawFileSize() const; + sal_Bool IsTempExportAvailable() const; + + com::sun::star::awt::Size + GetOriginalSize(); + + sal_Int32 GetDefaultUnit(); + +public: + ExportDialog( FltCallDialogParameter& rPara, + const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > rxMgr, + const com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& rxSourceDocument, + sal_Bool bExportSelection, sal_Bool bIsExportVectorFormat ); + ~ExportDialog(); +}; + + + +#endif // _EXPORTDIALOG_HXX_ + diff --git a/svtools/source/filter.vcl/filter/exportdialog.src b/svtools/source/filter.vcl/filter/exportdialog.src new file mode 100644 index 000000000000..c9e87989a314 --- /dev/null +++ b/svtools/source/filter.vcl/filter/exportdialog.src @@ -0,0 +1,529 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include "exportdialog.hrc" + +String DLG_EXPORT_TITLE +{ + Text [ en-US ] = " Options" ; +}; + +ModalDialog DLG_EXPORT +{ + HelpID = "svtools:ModalDialog:DLG_EXPORT"; + OutputSize = TRUE ; + SVLook = TRUE ; + Size = MAP_APPFONT ( 178 , 135 ) ; + Moveable = TRUE ; + Closeable = TRUE ; + + FixedLine FL_EXPORT_SIZE + { + Hide = TRUE; + Size = MAP_APPFONT ( 110 , 8 ) ; + Text [ en-US ] = "Size" ; + }; + FixedText FT_SIZEX + { + Hide = TRUE; + Size = MAP_APPFONT ( 41 , 10 ) ; + Text [ en-US ] = "Width:" ; + }; + MetricField MF_SIZEX + { + HelpID = "svtools:MetricField:DLG_EXPORT:MF_SIZEX"; + Hide = TRUE; + Border = TRUE; + Size = MAP_APPFONT ( 30, 12 ) ; + TabStop = TRUE; + Repeat = TRUE; + Spin = FALSE; + StrictFormat = TRUE; + DecimalDigits = 2; + Unit = FUNIT_NONE; + Maximum = 99999; + Last = 255; + }; + ListBox LB_SIZEX + { + HelpID = "svtools:ListBox:DLG_EXPORT:LB_SIZEX"; + Hide = TRUE; + Border = TRUE ; + Size = MAP_APPFONT ( 60, 80 ) ; + DropDown = TRUE ; + Sort = FALSE ; + StringList [ en-US ] = + { + < "inches" ; > ; + < "cm" ; Default ; > ; + < "mm" ; > ; + < "points" ; > ; + < "pixels" ; > ; + }; + }; + FixedText FT_SIZEY + { + Hide = TRUE; + Size = MAP_APPFONT ( 41 , 10 ) ; + Text [ en-US ] = "Height:" ; + }; + MetricField MF_SIZEY + { + HelpID = "svtools:MetricField:DLG_EXPORT:MF_SIZEY"; + Hide = TRUE; + Border = TRUE; + Size = MAP_APPFONT ( 30, 12 ); + TabStop = TRUE; + Repeat = TRUE; + Spin = FALSE; + StrictFormat = TRUE; + DecimalDigits = 2; + Unit = FUNIT_NONE; + Maximum = 99999; + Last = 255 ; + }; + ListBox LB_SIZEY + { + HelpID = "svtools:ListBox:DLG_EXPORT:LB_SIZEY"; + Hide = TRUE; + Border = TRUE ; + Size = MAP_APPFONT ( 60, 80 ) ; + DropDown = TRUE ; + Sort = FALSE ; + StringList [ en-US ] = + { + < "inches" ; > ; + < "cm" ; Default ; > ; + < "mm" ; > ; + < "points" ; > ; + < "pixels" ; > ; + }; + }; + FixedText FT_RESOLUTION + { + Hide = TRUE; + Size = MAP_APPFONT ( 41 , 10 ) ; + Text [ en-US ] = "Resolution:" ; + }; + NumericField NF_RESOLUTION + { + HelpID = "svtools:NumericField:DLG_EXPORT:NF_RESOLUTION"; + Hide = TRUE; + Border = TRUE ; + Size = MAP_APPFONT ( 30, 12 ) ; + TabStop = TRUE ; + Repeat = TRUE ; + Spin = FALSE ; + Maximum = 99999; + Last = 255 ; + }; + ListBox LB_RESOLUTION + { + HelpID = "svtools:ListBox:DLG_EXPORT:LB_RESOLUTION"; + Hide = TRUE; + Border = TRUE ; + Size = MAP_APPFONT ( 60, 80 ) ; + DropDown = TRUE ; + Sort = FALSE ; + StringList [ en-US ] = + { + < "pixels/cm" ; > ; + < "pixels/inch" ; Default ; > ; + < "pixels/meter" ; > ; + }; + }; + FixedLine FL_COLOR_DEPTH + { + Hide = TRUE; + Size = MAP_APPFONT ( 110 , 8 ) ; + Text [ en-US ] = "Color Depth" ; + }; + ListBox LB_COLOR_DEPTH + { + HelpID = "svtools:ListBox:DLG_EXPORT:LB_COLOR_DEPTH"; + Hide = TRUE; + Border = TRUE ; + Size = MAP_APPFONT ( 60, 80 ) ; + DropDown = TRUE ; + Sort = FALSE ; + }; + String STR_1BIT_THRESHOLD + { + Text [ en-US ] = "1 bit threshold"; + }; + String STR_1BIT_DITHERED + { + Text [ en-US ] = "1 bit dithered"; + }; + String STR_4BIT_GRAYSCALE + { + Text [ en-US ] = "4 bit grayscale"; + }; + String STR_4BIT_COLOR_PALETTE + { + Text [ en-US ] = "4 bit color"; + }; + String STR_8BIT_GRAYSCALE + { + Text [ en-US ] = "8 bit grayscale"; + }; + String STR_8BIT_COLOR_PALETTE + { + Text [ en-US ] = "8 bit color"; + }; + String STR_24BIT_TRUE_COLOR + { + Text [ en-US ] = "24 bit true color"; + }; + FixedLine FL_JPG_QUALITY + { + Hide = TRUE; + Size = MAP_APPFONT ( 110 , 8 ) ; + Text [ en-US ] = "Quality" ; + }; + FixedLine FL_COMPRESSION + { + Hide = TRUE; + Size = MAP_APPFONT ( 110 , 8 ) ; + Text [ en-US ] = "Compression" ; + }; + FixedLine FL_MODE + { + Hide = TRUE; + Size = MAP_APPFONT ( 110 , 8 ) ; + Text [ en-US ] = "Mode" ; + }; + FixedLine FL_PBM_OPTIONS + { + Hide = TRUE; + Size = MAP_APPFONT ( 110 , 8 ) ; + Text [ en-US ] = "File Format" ; + }; + ScrollBar SB_COMPRESSION + { + Hide = TRUE; + Size = MAP_APPFONT ( 48, 10 ) ; + VScroll = FALSE ; + HScroll = TRUE; + Drag = TRUE ; + }; + NumericField NF_COMPRESSION + { + HelpID = "svtools:NumericField:DLG_EXPORT:NF_COMPRESSION"; + Hide = TRUE; + Border = TRUE ; + Size = MAP_APPFONT ( 30, 12 ) ; + TabStop = TRUE ; + Repeat = TRUE ; + Spin = FALSE ; + Maximum = 99999; + Last = 255 ; + }; + FixedText FT_JPG_MIN + { + Hide = TRUE; + Size = MAP_APPFONT ( 41 , 10 ) ; + Text [ en-US ] = "1 is minimum Quality and smallest file size." ; + }; + FixedText FT_JPG_MAX + { + Hide = TRUE; + Size = MAP_APPFONT ( 41 , 10 ) ; + Text [ en-US ] = "100 is maximum Quality and biggest file size." ; + }; + FixedText FT_PNG_MIN + { + Hide = TRUE; + Size = MAP_APPFONT ( 41 , 10 ) ; + Text [ en-US ] = "0 is biggest file size and fastest loading." ; + }; + FixedText FT_PNG_MAX + { + Hide = TRUE; + Size = MAP_APPFONT ( 41 , 10 ) ; + Text [ en-US ] = "9 is smallest file size and slowest loading." ; + }; + CheckBox CB_JPG_PREVIEW + { + HelpID = "svtools:CheckBox:DLG_EXPORT:CB_JPG_PREVIEW"; + Hide = TRUE; + Size = MAP_APPFONT ( 60 , 10 ) ; + Text [ en-US ] = "Preview" ; + }; + CheckBox CB_INTERLACED + { + HelpID = "svtools:CheckBox:DLG_EXPORT:CB_INTERLACED"; + Hide = TRUE; + Size = MAP_APPFONT ( 60 , 10 ) ; + Text [ en-US ] = "Interlaced" ; + }; + CheckBox CB_RLE_ENCODING + { + HelpID = "svtools:CheckBox:DLG_EXPORT:CB_RLE_ENCODING"; + Hide = TRUE; + Size = MAP_APPFONT ( 60 , 10 ) ; + Text [ en-US ] = "RLE encoding" ; + }; + FixedLine FL_GIF_DRAWING_OBJECTS + { + Hide = TRUE; + Size = MAP_APPFONT ( 110 , 8 ) ; + Text [ en-US ] = "Drawing Objects" ; + }; + CheckBox CB_SAVE_TRANSPARENCY + { + HelpID = "svtools:CheckBox:DLG_EXPORT:CB_SAVE_TRANSPARENCY"; + Hide = TRUE; + Size = MAP_APPFONT ( 60 , 10 ) ; + Text [ en-US ] = "Save transparency" ; + }; + RadioButton RB_BINARY + { + HelpID = "svtools:RadioButton:DLG_EXPORT:RB_BINARY"; + Hide = TRUE; + Size = MAP_APPFONT ( 105 , 10 ) ; + Text [ en-US ] = "Binary" ; + }; + RadioButton RB_TEXT + { + HelpID = "svtools:RadioButton:DLG_EXPORT:RB_TEXT"; + Hide = TRUE; + Size = MAP_APPFONT ( 105 , 10 ) ; + Text [ en-US ] = "Text" ; + }; + FixedLine FL_EPS_PREVIEW + { + Hide = TRUE; + Size = MAP_APPFONT ( 110 , 8 ) ; + Text [ en-US ] = "Preview" ; + }; + CheckBox CB_EPS_PREVIEW_TIFF + { + HelpID = "svtools:CheckBox:DLG_EXPORT:CB_EPS_PREVIEW_TIFF"; + Hide = TRUE; + Size = MAP_APPFONT ( 60 , 10 ) ; + Text [ en-US ] = "Image Preview (TIFF)" ; + }; + CheckBox CB_EPS_PREVIEW_EPSI + { + HelpID = "svtools:CheckBox:DLG_EXPORT:CB_EPS_PREVIEW_EPSI"; + Hide = TRUE; + Size = MAP_APPFONT ( 60 , 10 ) ; + Text [ en-US ] = "Interchange (EPSI)" ; + }; + FixedLine FL_EPS_VERSION + { + Hide = TRUE; + Size = MAP_APPFONT ( 41 , 10 ) ; + Text [ en-US ] = "Version" ; + }; + RadioButton RB_EPS_LEVEL1 + { + HelpID = "svtools:RadioButton:DLG_EXPORT:RB_EPS_LEVEL1"; + Hide = TRUE; + Size = MAP_APPFONT ( 105 , 10 ) ; + Text [ en-US ] = "Level 1" ; + }; + RadioButton RB_EPS_LEVEL2 + { + HelpID = "svtools:RadioButton:DLG_EXPORT:RB_EPS_LEVEL2"; + Hide = TRUE; + Size = MAP_APPFONT ( 105 , 10 ) ; + Text [ en-US ] = "Level 2" ; + }; + FixedLine FL_EPS_COLOR_FORMAT + { + Hide = TRUE; + Size = MAP_APPFONT ( 41 , 10 ) ; + Text [ en-US ] = "Color format" ; + }; + RadioButton RB_EPS_COLOR_FORMAT1 + { + HelpID = "svtools:RadioButton:DLG_EXPORT:RB_EPS_COLOR_FORMAT1"; + Hide = TRUE; + Size = MAP_APPFONT ( 105 , 10 ) ; + Text [ en-US ] = "Color" ; + }; + RadioButton RB_EPS_COLOR_FORMAT2 + { + HelpID = "svtools:RadioButton:DLG_EXPORT:RB_EPS_COLOR_FORMAT2"; + Hide = TRUE; + Size = MAP_APPFONT ( 105 , 10 ) ; + Text [ en-US ] = "Grayscale" ; + }; + RadioButton RB_EPS_COMPRESSION_LZW + { + HelpID = "svtools:RadioButton:DLG_EXPORT:RB_EPS_COMPRESSION_LZW"; + Hide = TRUE; + Size = MAP_APPFONT ( 105 , 10 ) ; + Text [ en-US ] = "LZW encoding" ; + }; + RadioButton RB_EPS_COMPRESSION_NONE + { + HelpID = "svtools:RadioButton:DLG_EXPORT:RB_EPS_COMPRESSION_NONE"; + Hide = TRUE; + Size = MAP_APPFONT ( 105 , 10 ) ; + Text [ en-US ] = "None" ; + }; + FixedLine FL_ESTIMATED_SIZE + { + Hide = TRUE; + Size = MAP_APPFONT ( 41 , 10 ) ; + }; + FixedText FT_ESTIMATED_SIZE + { + Hide = TRUE; + Size = MAP_APPFONT ( 41 , 10 ) ; + }; + String STR_ESTIMATED_SIZE_PIX_1 + { + Text [ en-US ] = "The picture needs about %1 KB of memory."; + }; + String STR_ESTIMATED_SIZE_PIX_2 + { + Text [ en-US ] = "The picture needs about %1 KB of memory,\n the file size is %2 KB."; + }; + String STR_ESTIMATED_SIZE_VEC + { + Text [ en-US ] = "The file size is %1 KB."; + }; + FixedLine FL_BUTTONS + { + Hide = TRUE; + Size = MAP_APPFONT ( 41 , 10 ) ; + }; + FixedBitmap FB_JPG_PREVIEW + { + Hide = TRUE; + OutputSize = TRUE ; + Scale = TRUE; + Border = TRUE; + }; + ScrollBar SB_ZOOM + { + Hide = TRUE; + Size = MAP_APPFONT ( 48, 10 ); + VScroll = FALSE; + HScroll = TRUE; + Drag = TRUE; + MinPos = 5; + MaxPos = 100; + ThumbPos = 50; + }; + NumericField NF_ZOOM + { + HelpID = "svtools:NumericField:DLG_EXPORT:NF_ZOOM"; + Hide = TRUE; + Border = TRUE ; + Size = MAP_APPFONT ( 30, 12 ) ; + TabStop = TRUE ; + Repeat = TRUE ; + Spin = FALSE ; + Maximum = 3000; + Last = 255 ; + }; + ScrollBar SB_JPG_PREVIEW_HORZ + { + Hide = TRUE; + Size = MAP_APPFONT ( 48, 10 ); + VScroll = FALSE; + HScroll = TRUE; + Drag = TRUE; + MinPos = 0; + MaxPos = 100; + ThumbPos = 50; + }; + ScrollBar SB_JPG_PREVIEW_VERT + { + Hide = TRUE; + Size = MAP_APPFONT ( 48, 10 ); + VScroll = TRUE; + HScroll = FALSE; + Drag = TRUE; + MinPos = 0; + MaxPos = 100; + ThumbPos = 50; + }; + OKButton BTN_OK + { + Hide = TRUE; + Size = MAP_APPFONT ( 50 , 14 ) ; + TabStop = TRUE ; + DefButton = TRUE ; + }; + CancelButton BTN_CANCEL + { + Hide = TRUE; + Size = MAP_APPFONT ( 50 , 14 ) ; + TabStop = TRUE ; + }; + HelpButton BTN_HELP + { + Hide = TRUE; + Size = MAP_APPFONT ( 50 , 14 ) ; + TabStop = TRUE ; + }; +}; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/svtools/source/filter.vcl/filter/filter.cxx b/svtools/source/filter.vcl/filter/filter.cxx index c8a79d3a35cd..7e0729082841 100644 --- a/svtools/source/filter.vcl/filter/filter.cxx +++ b/svtools/source/filter.vcl/filter/filter.cxx @@ -52,7 +52,7 @@ #include "xbmread.hxx" #include "xpmread.hxx" #include <svl/solar.hrc> -#include "strings.hrc" +#include <svtools/svtools.hrc> #include "sgffilt.hxx" #include "osl/module.hxx" #include <com/sun/star/uno/Reference.h> @@ -79,7 +79,7 @@ #define PMGCHUNG_msOG 0x6d734f47 // Microsoft Office Animated GIF -#if defined WIN || (defined OS2 && !defined ICC) +#if (defined OS2 && !defined ICC) #define IMPORT_FUNCTION_NAME "_GraphicImport" #define EXPORT_FUNCTION_NAME "_GraphicExport" @@ -95,10 +95,6 @@ #endif -// Compilerfehler, wenn Optimierung bei WNT & MSC -#ifdef _MSC_VER -#pragma optimize( "", off ) -#endif // ----------- // - statics - @@ -552,16 +548,48 @@ static BOOL ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtension, B if( !bTest || ( rFormatExtension.CompareToAscii( "PCT", 3 ) == COMPARE_EQUAL ) ) { bSomethingTested = TRUE; - BYTE sBuf[4]; + BYTE sBuf[3]; + // store number format + sal_uInt16 oldNumberFormat = rStream.GetNumberFormatInt(); sal_uInt32 nOffset; // in ms documents the pict format is used without the first 512 bytes - for ( nOffset = 10; ( nOffset <= 522 ) && ( ( nStreamPos + nOffset + 3 ) <= nStreamLen ); nOffset += 512 ) + for ( nOffset = 0; ( nOffset <= 512 ) && ( ( nStreamPos + nOffset + 14 ) <= nStreamLen ); nOffset += 512 ) { - rStream.Seek( nStreamPos + nOffset ); + short y1,x1,y2,x2; + bool bdBoxOk = true; + + rStream.Seek( nStreamPos + nOffset); + // size of the pict in version 1 pict ( 2bytes) : ignored + rStream.SeekRel(2); + // bounding box (bytes 2 -> 9) + rStream.SetNumberFormatInt(NUMBERFORMAT_INT_BIGENDIAN); + rStream >> y1 >> x1 >> y2 >> x2; + rStream.SetNumberFormatInt(oldNumberFormat); // reset format + + if (x1 > x2 || y1 > y2 || // bad bdbox + (x1 == x2 && y1 == y2) || // 1 pixel picture + x2-x1 > 2048 || y2-y1 > 2048 ) // picture anormaly big + bdBoxOk = false; + + // read version op rStream.Read( sBuf,3 ); - if ( sBuf[ 0 ] == 0x00 && sBuf[ 1 ] == 0x11 && ( sBuf[ 2 ] == 0x01 || sBuf[ 2 ] == 0x02 ) ) + // see http://developer.apple.com/legacy/mac/library/documentation/mac/pdf/Imaging_With_QuickDraw/Appendix_A.pdf + // normal version 2 - page A23 and A24 + if ( sBuf[ 0 ] == 0x00 && sBuf[ 1 ] == 0x11 && sBuf[ 2 ] == 0x02) { - rFormatExtension = UniString::CreateFromAscii( "PCT", 3 ); - return TRUE; + rFormatExtension = UniString::CreateFromAscii( "PCT", 3 ); + return TRUE; + } + // normal version 1 - page A25 + else if (sBuf[ 0 ] == 0x11 && sBuf[ 1 ] == 0x01 && bdBoxOk) { + rFormatExtension = UniString::CreateFromAscii( "PCT", 3 ); + return TRUE; + } + // previous code kept in order to do not break any compatibility + // probably eroneous + else if ( sBuf[ 0 ] == 0x00 && sBuf[ 1 ] == 0x11 && sBuf[ 2 ] == 0x01 && bdBoxOk) + { + rFormatExtension = UniString::CreateFromAscii( "PCT", 3 ); + return TRUE; } } } @@ -752,7 +780,7 @@ static Graphic ImpGetScaledGraphic( const Graphic& rGraphic, FilterConfigItem& r if ( rGraphic.GetType() != GRAPHIC_NONE ) { - sal_Int32 nMode = rConfigItem.ReadInt32( String( ResId( KEY_MODE, *pResMgr ) ), -1 ); + sal_Int32 nMode = rConfigItem.ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "ExportMode" ) ), -1 ); if ( nMode == -1 ) // the property is not there, this is possible, if the graphic filter { // is called via UnoGraphicExporter and not from a graphic export Dialog @@ -782,7 +810,7 @@ static Graphic ImpGetScaledGraphic( const Graphic& rGraphic, FilterConfigItem& r Bitmap aBitmap( rGraphic.GetBitmap() ); MapMode aMap( MAP_100TH_INCH ); - sal_Int32 nDPI = rConfigItem.ReadInt32( String( ResId( KEY_RES, *pResMgr ) ), 75 ); + sal_Int32 nDPI = rConfigItem.ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Resolution" ) ), 75 ); Fraction aFrac( 1, Min( Max( nDPI, sal_Int32( 75 ) ), sal_Int32( 600 ) ) ); aMap.SetScaleX( aFrac ); @@ -806,7 +834,7 @@ static Graphic ImpGetScaledGraphic( const Graphic& rGraphic, FilterConfigItem& r else aGraphic = rGraphic; - sal_Int32 nColors = rConfigItem.ReadInt32( String( ResId( KEY_COLORS, *pResMgr ) ), 0 ); // #92767# + sal_Int32 nColors = rConfigItem.ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Color" ) ), 0 ); // #92767# if ( nColors ) // graphic conversion necessary ? { BitmapEx aBmpEx( aGraphic.GetBitmapEx() ); @@ -1771,7 +1799,7 @@ USHORT GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String& rPat aBmp = aGraphic.GetBitmap(); } ResMgr* pResMgr = CREATERESMGR( svt ); - sal_Bool bRleCoding = aConfigItem.ReadBool( String( ResId( KEY_RLE_CODING, *pResMgr ) ), sal_True ); + sal_Bool bRleCoding = aConfigItem.ReadBool( String( RTL_CONSTASCII_USTRINGPARAM( "RLE_Coding" ) ), sal_True ); // Wollen wir RLE-Kodiert speichern? aBmp.Write( rOStm, bRleCoding ); delete pResMgr; diff --git a/svtools/source/filter.vcl/filter/filter2.cxx b/svtools/source/filter.vcl/filter/filter2.cxx index de2bef64ba6e..d91ec1a19772 100644 --- a/svtools/source/filter.vcl/filter/filter2.cxx +++ b/svtools/source/filter.vcl/filter/filter2.cxx @@ -42,29 +42,6 @@ BYTE* ImplSearchEntry( BYTE* , BYTE* , ULONG , ULONG ); - -/************************************************************************* -|* -|* -|* -\************************************************************************/ - -GraphicDescriptor::GraphicDescriptor( const String* pPath ) : - pFileStm ( NULL ) -{ - ImpConstruct(); - - if ( pPath ) - { - INetURLObject aURL( *pPath, INET_PROT_FILE ); - aPathExt = aURL.GetFileExtension().toAsciiLowerCase(); - } - bLinked = TRUE; - bLinkChanged = FALSE; - bWideSearch = FALSE; -} - - /************************************************************************* |* |* @@ -73,19 +50,10 @@ GraphicDescriptor::GraphicDescriptor( const String* pPath ) : GraphicDescriptor::GraphicDescriptor( const INetURLObject& rPath ) : pFileStm( ::utl::UcbStreamHelper::CreateStream( rPath.GetMainURL( INetURLObject::NO_DECODE ), STREAM_READ ) ), - aPathExt( rPath.GetFileExtension().toAsciiLowerCase() ) + aPathExt( rPath.GetFileExtension().toAsciiLowerCase() ), + bOwnStream( TRUE ) { - if ( pFileStm ) - { - nStmPos = 0; - pFileStm->Seek( nStmPos ); - bDataReady = TRUE; - } - ImpConstruct(); - - if ( pFileStm && !pFileStm->GetError() ) - bDataReady = TRUE; } /************************************************************************* @@ -95,7 +63,8 @@ GraphicDescriptor::GraphicDescriptor( const INetURLObject& rPath ) : \************************************************************************/ GraphicDescriptor::GraphicDescriptor( SvStream& rInStream, const String* pPath) : - pFileStm ( NULL ) + pFileStm ( &rInStream ), + bOwnStream ( FALSE ) { ImpConstruct(); @@ -104,15 +73,8 @@ GraphicDescriptor::GraphicDescriptor( SvStream& rInStream, const String* pPath) INetURLObject aURL( *pPath ); aPathExt = aURL.GetFileExtension().toAsciiLowerCase(); } - nStmPos = rInStream.Tell(); - pBaseStm = &rInStream; - bBaseStm = TRUE; - - if ( !pBaseStm->GetError() ) - bDataReady = TRUE; } - /************************************************************************* |* |* @@ -121,10 +83,10 @@ GraphicDescriptor::GraphicDescriptor( SvStream& rInStream, const String* pPath) GraphicDescriptor::~GraphicDescriptor() { - delete pFileStm; + if ( bOwnStream ) + delete pFileStm; } - /************************************************************************* |* |* @@ -134,22 +96,9 @@ GraphicDescriptor::~GraphicDescriptor() BOOL GraphicDescriptor::Detect( BOOL bExtendedInfo ) { BOOL bRet = FALSE; - - // Link-Status ueberpruefen - if ( bLinked && bLinkChanged ) - { - DBG_ASSERT( aReqLink.IsSet(), "Wo ist der RequestHandler???" ); - pMemStm = (SvStream*) aReqLink.Call( this ); - if ( pMemStm ) - { - nStmPos = pMemStm->Tell(); - bDataReady = TRUE; - } - } - - if ( bDataReady ) + if ( pFileStm && !pFileStm->GetError() ) { - SvStream& rStm = GetSearchStream(); + SvStream& rStm = *pFileStm; UINT16 nOldFormat = rStm.GetNumberFormatInt(); if ( ImpDetectGIF( rStm, bExtendedInfo ) ) bRet = TRUE; @@ -175,96 +124,13 @@ BOOL GraphicDescriptor::Detect( BOOL bExtendedInfo ) else if ( ImpDetectTGA( rStm, bExtendedInfo ) ) bRet = TRUE; else if ( ImpDetectPSD( rStm, bExtendedInfo ) ) bRet = TRUE; else if ( ImpDetectEPS( rStm, bExtendedInfo ) ) bRet = TRUE; - - // diese Formate lassen sich nur bei WideSearch im gesamten - // Stream ermitteln - else if ( bWideSearch ) - { - if ( ImpDetectPCD( rStm, bExtendedInfo ) ) - bRet = TRUE; - } + else if ( ImpDetectPCD( rStm, bExtendedInfo ) ) bRet = TRUE; rStm.SetNumberFormatInt( nOldFormat ); - rStm.Seek( nStmPos ); } - return bRet; } - -/************************************************************************* -|* -|* -|* -\************************************************************************/ - -BOOL GraphicDescriptor::IsDataReady() const -{ - return bDataReady; -} - - -/************************************************************************* -|* -|* -|* -\************************************************************************/ - -BOOL GraphicDescriptor::IsWideSearch() const -{ - return bWideSearch; -} - - -/************************************************************************* -|* -|* -|* -\************************************************************************/ - -SvStream& GraphicDescriptor::GetSearchStream() const -{ - DBG_ASSERT( bDataReady, "Was laeuft hier falsch???" ); - - if ( bLinked ) - return *pMemStm; - else if ( bBaseStm ) - return *pBaseStm; - else - return *pFileStm; -} - - -/************************************************************************* -|* -|* -|* -\************************************************************************/ - -void GraphicDescriptor::SetRequestHdl( const Link& rRequestLink ) -{ - aReqLink = rRequestLink; - bLinkChanged = TRUE; -} - - -/************************************************************************* -|* -|* -|* -\************************************************************************/ - -ULONG GraphicDescriptor::GetRequestedByteCount() const -{ - return DATA_SIZE; -} - - -/******************************************************************************/ -/* IMP-Methoden */ -/* */ - - /************************************************************************* |* |* @@ -273,17 +139,10 @@ ULONG GraphicDescriptor::GetRequestedByteCount() const void GraphicDescriptor::ImpConstruct() { - if ( !pFileStm ) - pFileStm = new SvStream(); nFormat = GFF_NOT; nBitsPerPixel = 0; nPlanes = 0; bCompressed = FALSE; - bDataReady = FALSE; - bLinked = FALSE; - bWideSearch = TRUE; - bBaseStm = FALSE; - pMemStm = NULL; } @@ -297,10 +156,9 @@ BOOL GraphicDescriptor::ImpDetectBMP( SvStream& rStm, BOOL bExtendedInfo ) { UINT16 nTemp16; BOOL bRet = FALSE; + sal_Int32 nStmPos = rStm.Tell(); rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); - rStm.Seek( nStmPos ); - rStm >> nTemp16; // OS/2-BitmapArray @@ -364,7 +222,7 @@ BOOL GraphicDescriptor::ImpDetectBMP( SvStream& rStm, BOOL bExtendedInfo ) } } } - + rStm.Seek( nStmPos ); return bRet; } @@ -382,10 +240,10 @@ BOOL GraphicDescriptor::ImpDetectGIF( SvStream& rStm, BOOL bExtendedInfo ) BOOL bRet = FALSE; BYTE cByte; + sal_Int32 nStmPos = rStm.Tell(); rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); - rStm.Seek( nStmPos ); - rStm >> n32; + if ( n32 == 0x38464947 ) { rStm >> n16; @@ -412,7 +270,7 @@ BOOL GraphicDescriptor::ImpDetectGIF( SvStream& rStm, BOOL bExtendedInfo ) } } } - + rStm.Seek( nStmPos ); return bRet; } @@ -423,125 +281,188 @@ BOOL GraphicDescriptor::ImpDetectGIF( SvStream& rStm, BOOL bExtendedInfo ) |* \************************************************************************/ +// returns the next jpeg marker, a return value of 0 represents an error +sal_uInt8 ImpDetectJPG_GetNextMarker( SvStream& rStm ) +{ + sal_uInt8 nByte; + do + { + do + { + rStm >> nByte; + if ( rStm.IsEof() || rStm.GetError() ) // as 0 is not allowed as marker, + return 0; // we can use it as errorcode + } + while ( nByte != 0xff ); + do + { + rStm >> nByte; + if ( rStm.IsEof() || rStm.GetError() ) + return 0; + } + while( nByte == 0xff ); + } + while( nByte == 0 ); // 0xff00 represents 0xff and not a marker, + // the marker detection has to be restartet. + return nByte; +} + BOOL GraphicDescriptor::ImpDetectJPG( SvStream& rStm, BOOL bExtendedInfo ) { UINT32 nTemp32; BOOL bRet = FALSE; - BYTE cByte = 0; - BOOL bM_COM; - rStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); - rStm.Seek( nStmPos ); + sal_Int32 nStmPos = rStm.Tell(); + rStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); rStm >> nTemp32; - // compare upper 28 bits + // compare upper 24 bits if( 0xffd8ff00 == ( nTemp32 & 0xffffff00 ) ) { nFormat = GFF_JPG; - return TRUE; - } - - bM_COM = ( nTemp32 == 0xffd8fffe ); - if ( ( nTemp32 == 0xffd8ffe0 ) || bM_COM ) - { - if( !bM_COM ) - { - rStm.SeekRel( 2 ); - rStm >> nTemp32; - } + bRet = TRUE; - if( bM_COM || ( nTemp32 == 0x4a464946 ) ) + if ( bExtendedInfo ) { - nFormat = GFF_JPG; - bRet = TRUE; + rStm.SeekRel( -2 ); - if( bExtendedInfo ) - { - MapMode aMap; - UINT16 nTemp16; - ULONG nCount = 9; - ULONG nMax; - ULONG nResX; - ULONG nResY; - BYTE cUnit; - - // Groesse des verbleibenden Puffers ermitteln - if ( bLinked ) - nMax = static_cast< SvMemoryStream& >(rStm).GetEndOfData() - - 16; - else - nMax = DATA_SIZE - 16; - - // max. 8K - nMax = Min( nMax, (ULONG) 8192 ); + sal_uInt32 nError( rStm.GetError() ); - // Res-Unit ermitteln - rStm.SeekRel( 3 ); - rStm >> cUnit; - - // ResX ermitteln - rStm >> nTemp16; - nResX = nTemp16; + sal_Bool bScanFailure = sal_False; + sal_Bool bScanFinished = sal_False; - // ResY ermitteln - rStm >> nTemp16; - nResY = nTemp16; - - // SOF0/1-Marker finden, aber dabei - // nicht mehr als DATA_SIZE Pixel lesen, falls - // kein WideSearch - do + while( !bScanFailure && !bScanFinished && !rStm.IsEof() && !rStm.GetError() ) + { + sal_uInt8 nMarker = ImpDetectJPG_GetNextMarker( rStm ); + switch( nMarker ) { - while ( ( cByte != 0xff ) && - ( bWideSearch || ( nCount++ < nMax ) ) ) + // fixed size marker, not having a two byte length parameter + case 0xd0 : // RST0 + case 0xd1 : + case 0xd2 : + case 0xd3 : + case 0xd4 : + case 0xd5 : + case 0xd6 : + case 0xd7 : // RST7 + case 0x01 : // TEM + break; + + case 0xd8 : // SOI (has already been checked, there should not be a second one) + case 0x00 : // marker is invalid, we should stop now + bScanFailure = sal_True; + break; + + case 0xd9 : // EOI + bScanFinished = sal_True; + break; + + // per default we assume marker segments conaining a length parameter + default : { - rStm >> cByte; - } - - while ( ( cByte == 0xff ) && - ( bWideSearch || ( nCount++ < nMax ) ) ) - { - rStm >> cByte; - } - } - while ( ( cByte != 0xc0 ) && - ( cByte != 0xc1 ) && - ( bWideSearch || ( nCount < nMax ) ) ); - - // wir haben den SOF0/1-Marker - if ( ( cByte == 0xc0 ) || ( cByte == 0xc1 ) ) - { - // Hoehe einlesen - rStm.SeekRel( 3 ); - rStm >> nTemp16; - aPixSize.Height() = nTemp16; + sal_uInt16 nLength; + rStm >> nLength; - // Breite einlesen - rStm >> nTemp16; - aPixSize.Width() = nTemp16; - - // Bit/Pixel einlesen - rStm >> cByte; - nBitsPerPixel = ( cByte == 3 ? 24 : cByte == 1 ? 8 : 0 ); + if ( nLength < 2 ) + bScanFailure = sal_True; + else + { + sal_uInt32 nNextMarkerPos = rStm.Tell() + nLength - 2; + switch( nMarker ) + { + case 0xe0 : // APP0 Marker + { + if ( nLength == 16 ) + { + sal_Int32 nIdentifier; + rStm >> nIdentifier; + if ( nIdentifier == 0x4a464946 ) // JFIF Identifier + { + sal_uInt8 nStringTerminator; + sal_uInt8 nMajorRevision; + sal_uInt8 nMinorRevision; + sal_uInt8 nUnits; + sal_uInt16 nHorizontalResolution; + sal_uInt16 nVerticalResolution; + sal_uInt8 nHorzThumbnailPixelCount; + sal_uInt8 nVertThumbnailPixelCount; + + rStm >> nStringTerminator + >> nMajorRevision + >> nMinorRevision + >> nUnits + >> nHorizontalResolution + >> nVerticalResolution + >> nHorzThumbnailPixelCount + >> nVertThumbnailPixelCount; + + // setting the logical size + if ( nUnits && nHorizontalResolution && nVerticalResolution ) + { + MapMode aMap; + aMap.SetMapUnit( nUnits == 1 ? MAP_INCH : MAP_CM ); + aMap.SetScaleX( Fraction( 1, nHorizontalResolution ) ); + aMap.SetScaleY( Fraction( 1, nVerticalResolution ) ); + aLogSize = OutputDevice::LogicToLogic( aPixSize, aMap, MapMode( MAP_100TH_MM ) ); + } + } + } + } + break; - // logische Groesse setzen - if ( cUnit && nResX && nResY ) - { - aMap.SetMapUnit( cUnit == 1 ? MAP_INCH : MAP_CM ); - aMap.SetScaleX( Fraction( 1, nResX ) ); - aMap.SetScaleY( Fraction( 1, nResY ) ); - aLogSize = OutputDevice::LogicToLogic( aPixSize, aMap, - MapMode( MAP_100TH_MM ) ); + // Start of Frame Markers + case 0xc0 : // SOF0 + case 0xc1 : // SOF1 + case 0xc2 : // SOF2 + case 0xc3 : // SOF3 + case 0xc5 : // SOF5 + case 0xc6 : // SOF6 + case 0xc7 : // SOF7 + case 0xc9 : // SOF9 + case 0xca : // SOF10 + case 0xcb : // SOF11 + case 0xcd : // SOF13 + case 0xce : // SOF14 + case 0xcf : // SOF15 + { + sal_uInt8 nSamplePrecision; + sal_uInt16 nNumberOfLines; + sal_uInt16 nSamplesPerLine; + sal_uInt8 nNumberOfImageComponents; + sal_uInt8 nComponentsIdentifier; + sal_uInt8 nHorizontalSamplingFactor; + sal_uInt8 nVerticalSamplingFactor; + sal_uInt8 nQuantizationTableDestinationSelector; + rStm >> nSamplePrecision + >> nNumberOfLines + >> nSamplesPerLine + >> nNumberOfImageComponents + >> nComponentsIdentifier + >> nHorizontalSamplingFactor + >> nQuantizationTableDestinationSelector; + nVerticalSamplingFactor = nHorizontalSamplingFactor & 0xf; + nHorizontalSamplingFactor >>= 4; + + aPixSize.Height() = nNumberOfLines; + aPixSize.Width() = nSamplesPerLine; + nBitsPerPixel = ( nNumberOfImageComponents == 3 ? 24 : nNumberOfImageComponents == 1 ? 8 : 0 ); + nPlanes = 1; + + bScanFinished = sal_True; + } + break; + } + rStm.Seek( nNextMarkerPos ); + } } - - // Planes immer 1 - nPlanes = 1; + break; } } + rStm.SetError( nError ); } } - + rStm.Seek( nStmPos ); return bRet; } @@ -556,37 +477,26 @@ BOOL GraphicDescriptor::ImpDetectPCD( SvStream& rStm, BOOL ) { BOOL bRet = FALSE; + sal_Int32 nStmPos = rStm.Tell(); rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); - rStm.Seek( nStmPos ); - if ( bWideSearch ) - { - UINT32 nTemp32; - UINT16 nTemp16; - BYTE cByte; + UINT32 nTemp32; + UINT16 nTemp16; + BYTE cByte; - rStm.SeekRel( 2048 ); - rStm >> nTemp32; - rStm >> nTemp16; - rStm >> cByte; + rStm.SeekRel( 2048 ); + rStm >> nTemp32; + rStm >> nTemp16; + rStm >> cByte; - if ( ( nTemp32 == 0x5f444350 ) && - ( nTemp16 == 0x5049 ) && - ( cByte == 0x49 ) ) - { - nFormat = GFF_PCD; - bRet = TRUE; - } - } - else + if ( ( nTemp32 == 0x5f444350 ) && + ( nTemp16 == 0x5049 ) && + ( cByte == 0x49 ) ) { - bRet = aPathExt.CompareToAscii( "pcd", 3 ) == COMPARE_EQUAL; - if ( bRet ) - { - nFormat = GFF_PCD; - } + nFormat = GFF_PCD; + bRet = TRUE; } - + rStm.Seek( nStmPos ); return bRet; } @@ -608,10 +518,10 @@ BOOL GraphicDescriptor::ImpDetectPCX( SvStream& rStm, BOOL bExtendedInfo ) BOOL bRet = FALSE; BYTE cByte; + sal_Int32 nStmPos = rStm.Tell(); rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); - rStm.Seek( nStmPos ); - rStm >> cByte; + if ( cByte == 0x0a ) { nFormat = GFF_PCX; @@ -675,6 +585,7 @@ BOOL GraphicDescriptor::ImpDetectPCX( SvStream& rStm, BOOL bExtendedInfo ) } } + rStm.Seek( nStmPos ); return bRet; } @@ -690,10 +601,10 @@ BOOL GraphicDescriptor::ImpDetectPNG( SvStream& rStm, BOOL bExtendedInfo ) UINT32 nTemp32; BOOL bRet = FALSE; + sal_Int32 nStmPos = rStm.Tell(); rStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); - rStm.Seek( nStmPos ); - rStm >> nTemp32; + if ( nTemp32 == 0x89504e47 ) { rStm >> nTemp32; @@ -726,55 +637,52 @@ BOOL GraphicDescriptor::ImpDetectPNG( SvStream& rStm, BOOL bExtendedInfo ) nPlanes = 1; bCompressed = TRUE; - if ( bWideSearch ) - { - UINT32 nLen32; + UINT32 nLen32; - rStm.SeekRel( 8 ); + rStm.SeekRel( 8 ); - // so lange ueberlesen, bis wir den pHYs-Chunk haben oder - // den Anfang der Bilddaten + // so lange ueberlesen, bis wir den pHYs-Chunk haben oder + // den Anfang der Bilddaten + rStm >> nLen32; + rStm >> nTemp32; + while( ( nTemp32 != 0x70485973 ) && ( nTemp32 != 0x49444154 ) ) + { + rStm.SeekRel( 4 + nLen32 ); rStm >> nLen32; rStm >> nTemp32; - while( ( nTemp32 != 0x70485973 ) && ( nTemp32 != 0x49444154 ) ) - { - rStm.SeekRel( 4 + nLen32 ); - rStm >> nLen32; - rStm >> nTemp32; - } + } - if ( nTemp32 == 0x70485973 ) - { - ULONG nXRes; - ULONG nYRes; + if ( nTemp32 == 0x70485973 ) + { + ULONG nXRes; + ULONG nYRes; - // horizontale Aufloesung - rStm >> nTemp32; - nXRes = nTemp32; + // horizontale Aufloesung + rStm >> nTemp32; + nXRes = nTemp32; - // vertikale Aufloesung - rStm >> nTemp32; - nYRes = nTemp32; + // vertikale Aufloesung + rStm >> nTemp32; + nYRes = nTemp32; - // Unit einlesen - rStm >> cByte; + // Unit einlesen + rStm >> cByte; - if ( cByte ) - { - if ( nXRes ) - aLogSize.Width() = ( aPixSize.Width() * 100000 ) / - nTemp32; + if ( cByte ) + { + if ( nXRes ) + aLogSize.Width() = ( aPixSize.Width() * 100000 ) / + nTemp32; - if ( nYRes ) - aLogSize.Height() = ( aPixSize.Height() * 100000 ) / - nTemp32; - } + if ( nYRes ) + aLogSize.Height() = ( aPixSize.Height() * 100000 ) / + nTemp32; } } } } } - + rStm.Seek( nStmPos ); return bRet; } @@ -792,7 +700,7 @@ BOOL GraphicDescriptor::ImpDetectTIF( SvStream& rStm, BOOL bExtendedInfo ) BYTE cByte1; BYTE cByte2; - rStm.Seek( nStmPos ); + sal_Int32 nStmPos = rStm.Tell(); rStm >> cByte1; rStm >> cByte2; if ( cByte1 == cByte2 ) @@ -829,14 +737,14 @@ BOOL GraphicDescriptor::ImpDetectTIF( SvStream& rStm, BOOL bExtendedInfo ) rStm >> nTemp32; rStm.SeekRel( ( nCount = ( nTemp32 + 2 ) ) - 0x08 ); - if ( bWideSearch || ( nCount < nMax ) ) + if ( nCount < nMax ) { // Tag's lesen, bis wir auf Tag256 ( Width ) treffen // nicht mehr Bytes als DATA_SIZE lesen rStm >> nTemp16; while ( nTemp16 != 256 ) { - bOk = bWideSearch || ( nCount < nMax ); + bOk = nCount < nMax; if ( !bOk ) { break; @@ -912,7 +820,7 @@ BOOL GraphicDescriptor::ImpDetectTIF( SvStream& rStm, BOOL bExtendedInfo ) } } } - + rStm.Seek( nStmPos ); return bRet; } @@ -965,11 +873,12 @@ BOOL GraphicDescriptor::ImpDetectPBM( SvStream& rStm, BOOL ) bRet = TRUE; else { + sal_Int32 nStmPos = rStm.Tell(); BYTE nFirst, nSecond; - rStm.Seek( nStmPos ); rStm >> nFirst >> nSecond; if ( nFirst == 'P' && ( ( nSecond == '1' ) || ( nSecond == '4' ) ) ) bRet = TRUE; + rStm.Seek( nStmPos ); } if ( bRet ) @@ -992,11 +901,12 @@ BOOL GraphicDescriptor::ImpDetectPGM( SvStream& rStm, BOOL ) bRet = TRUE; else { - BYTE nFirst, nSecond; - rStm.Seek( nStmPos ); + BYTE nFirst, nSecond; + sal_Int32 nStmPos = rStm.Tell(); rStm >> nFirst >> nSecond; if ( nFirst == 'P' && ( ( nSecond == '2' ) || ( nSecond == '5' ) ) ) bRet = TRUE; + rStm.Seek( nStmPos ); } if ( bRet ) @@ -1020,10 +930,11 @@ BOOL GraphicDescriptor::ImpDetectPPM( SvStream& rStm, BOOL ) else { BYTE nFirst, nSecond; - rStm.Seek( nStmPos ); + sal_Int32 nStmPos = rStm.Tell(); rStm >> nFirst >> nSecond; if ( nFirst == 'P' && ( ( nSecond == '3' ) || ( nSecond == '6' ) ) ) bRet = TRUE; + rStm.Seek( nStmPos ); } if ( bRet ) @@ -1041,16 +952,17 @@ BOOL GraphicDescriptor::ImpDetectPPM( SvStream& rStm, BOOL ) BOOL GraphicDescriptor::ImpDetectRAS( SvStream& rStm, BOOL ) { UINT32 nMagicNumber; - rStm.Seek( nStmPos ); + BOOL bRet = FALSE; + sal_Int32 nStmPos = rStm.Tell(); rStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); rStm >> nMagicNumber; if ( nMagicNumber == 0x59a66a95 ) { nFormat = GFF_RAS; - return TRUE; + bRet = TRUE; } - else - return FALSE; + rStm.Seek( nStmPos ); + return bRet; } /************************************************************************* @@ -1079,7 +991,7 @@ BOOL GraphicDescriptor::ImpDetectPSD( SvStream& rStm, BOOL bExtendedInfo ) BOOL bRet = FALSE; UINT32 nMagicNumber; - rStm.Seek( nStmPos ); + sal_Int32 nStmPos = rStm.Tell(); rStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); rStm >> nMagicNumber; if ( nMagicNumber == 0x38425053 ) @@ -1123,6 +1035,7 @@ BOOL GraphicDescriptor::ImpDetectPSD( SvStream& rStm, BOOL bExtendedInfo ) if ( bRet ) nFormat = GFF_PSD; + rStm.Seek( nStmPos ); return bRet; } @@ -1139,8 +1052,9 @@ BOOL GraphicDescriptor::ImpDetectEPS( SvStream& rStm, BOOL ) sal_uInt32 nFirstLong; sal_uInt8 nFirstBytes[20]; + BOOL bRet = FALSE; - rStm.Seek( nStmPos ); + sal_Int32 nStmPos = rStm.Tell(); rStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); rStm >> nFirstLong; rStm.SeekRel( -4 ); @@ -1151,10 +1065,10 @@ BOOL GraphicDescriptor::ImpDetectEPS( SvStream& rStm, BOOL ) && ImplSearchEntry( &nFirstBytes[15], (sal_uInt8*)"EPS", 3, 3 ) ) ) { nFormat = GFF_EPS; - return TRUE; + bRet = TRUE; } - else - return FALSE; + rStm.Seek( nStmPos ); + return bRet; } /************************************************************************* @@ -1201,9 +1115,11 @@ BOOL GraphicDescriptor::ImpDetectPCT( SvStream& rStm, BOOL ) nFormat = GFF_PCT; else { + sal_Int32 nStmPos = rStm.Tell(); + BYTE sBuf[4]; - rStm.Seek( nStmPos + 522 ); + rStm.SeekRel( 522 ); rStm.Read( sBuf, 3 ); if( !rStm.GetError() ) @@ -1215,6 +1131,7 @@ BOOL GraphicDescriptor::ImpDetectPCT( SvStream& rStm, BOOL ) nFormat = GFF_PCT; } } + rStm.Seek( nStmPos ); } return bRet; @@ -1230,18 +1147,20 @@ BOOL GraphicDescriptor::ImpDetectPCT( SvStream& rStm, BOOL ) BOOL GraphicDescriptor::ImpDetectSGF( SvStream& rStm, BOOL ) { BOOL bRet = FALSE; - if( aPathExt.CompareToAscii( "sgf", 3 ) == COMPARE_EQUAL ) bRet = TRUE; else { + sal_Int32 nStmPos = rStm.Tell(); + BYTE nFirst, nSecond; - rStm.Seek( nStmPos ); rStm >> nFirst >> nSecond; if( nFirst == 'J' && nSecond == 'J' ) bRet = TRUE; + + rStm.Seek( nStmPos ); } if( bRet ) @@ -1279,9 +1198,8 @@ BOOL GraphicDescriptor::ImpDetectSVM( SvStream& rStm, BOOL bExtendedInfo ) BOOL bRet = FALSE; BYTE cByte; + sal_Int32 nStmPos = rStm.Tell(); rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); - rStm.Seek( nStmPos ); - rStm >> n32; if ( n32 == 0x44475653 ) { @@ -1342,7 +1260,7 @@ BOOL GraphicDescriptor::ImpDetectSVM( SvStream& rStm, BOOL bExtendedInfo ) } } } - + rStm.Seek( nStmPos ); return bRet; } @@ -1417,3 +1335,5 @@ String GraphicDescriptor::GetImportFormatShortName( sal_uInt16 nFormat ) return String( aKeyName, RTL_TEXTENCODING_ASCII_US ); } + + diff --git a/svtools/source/filter.vcl/filter/gradwrap.cxx b/svtools/source/filter.vcl/filter/gradwrap.cxx deleted file mode 100644 index be5dade03313..000000000000 --- a/svtools/source/filter.vcl/filter/gradwrap.cxx +++ /dev/null @@ -1,570 +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. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_svtools.hxx" - -#include <math.h> -#include <svgrad.hxx> -#include <svbmpacc.hxx> -#include <gradwrap.hxx> - -// ------------------- -// - GradientWrapper - -// ------------------- - -GradientWrapper::GradientWrapper(const Link& rDrawPolyRecordHdl, - const Link& rDrawPolyPolyRecordHdl, - const Link& rSetFillInBrushRecordHdl) : - aDrawPolyRecordHdl (rDrawPolyRecordHdl), - aDrawPolyPolyRecordHdl (rDrawPolyPolyRecordHdl), - aSetFillInBrushRecordHdl(rSetFillInBrushRecordHdl) -{ -} - -// ------------------------------------------------------------------------ - -GradientWrapper::~GradientWrapper() -{ -} - -// ------------------------------------------------------------------------ - -void GradientWrapper::WriteLinearGradient(const Rectangle& rRect, - const Gradient& rGradient) -{ - USHORT nStepCount = 100; - - Rectangle aRect = rRect; - aRect.Left()--; - aRect.Top()--; - aRect.Right()++; - aRect.Bottom()++; - - // rotiertes BoundRect ausrechnen - double fAngle = (rGradient.GetAngle() % 3600) * F_PI1800; - double fWidth = aRect.GetWidth(); - double fHeight = aRect.GetHeight(); - double fDX = fWidth * fabs( cos( fAngle ) ) + - fHeight * fabs( sin( fAngle ) ); - double fDY = fHeight * fabs( cos( fAngle ) ) + - fWidth * fabs( sin( fAngle ) ); - fDX = (fDX - fWidth) * 0.5 + 0.5; - fDY = (fDY - fHeight) * 0.5 + 0.5; - aRect.Left() -= (long)fDX; - aRect.Right() += (long)fDX; - aRect.Top() -= (long)fDY; - aRect.Bottom() += (long)fDY; - - // Rand berechnen und Rechteck neu setzen - Point aCenter = rRect.Center(); - Rectangle aFullRect = aRect; - long nBorder = (long)rGradient.GetBorder() * aRect.GetHeight() / 100; - BOOL bLinear; - - // Rand berechnen und Rechteck neu setzen fuer linearen Farbverlauf - if ( rGradient.GetStyle() == GRADIENT_LINEAR ) - { - bLinear = TRUE; - aRect.Top() += nBorder; - } - // Rand berechnen und Rechteck neu setzen fuer axiale Farbverlauf - else - { - bLinear = FALSE; - nBorder >>= 1; - - aRect.Top() += nBorder; - aRect.Bottom() -= nBorder; - } - - // Top darf nicht groesser als Bottom sein - aRect.Top() = Min( aRect.Top(), (long)(aRect.Bottom() - 1) ); - - long nMinRect = aRect.GetHeight(); - - // Anzahl der Schritte berechnen, falls nichts uebergeben wurde - if ( !nStepCount ) - { - long nInc = ((nMinRect >> 9) + 1) << 3; - - if ( !nInc ) - nInc = 1; - - nStepCount = (USHORT)(nMinRect / nInc); - } - // minimal drei Schritte - long nSteps = Max( nStepCount, (USHORT)3 ); - - // Falls axialer Farbverlauf, muss die Schrittanzahl ungerade sein - if ( !bLinear && !(nSteps & 1) ) - nSteps++; - - // Berechnung ueber Double-Addition wegen Genauigkeit - double fScanLine = aRect.Top(); - double fScanInc = (double)aRect.GetHeight() / (double)nSteps; - - // Intensitaeten von Start- und Endfarbe ggf. aendern und - // Farbschrittweiten berechnen - long nFactor; - const Color& rStartCol = rGradient.GetStartColor(); - const Color& rEndCol = rGradient.GetEndColor(); - long nRed = rStartCol.GetRed(); - long nGreen = rStartCol.GetGreen(); - long nBlue = rStartCol.GetBlue(); - long nEndRed = rEndCol.GetRed(); - long nEndGreen = rEndCol.GetGreen(); - long nEndBlue = rEndCol.GetBlue(); - nFactor = rGradient.GetStartIntensity(); - nRed = (nRed * nFactor) / 100; - nGreen = (nGreen * nFactor) / 100; - nBlue = (nBlue * nFactor) / 100; - nFactor = rGradient.GetEndIntensity(); - nEndRed = (nEndRed * nFactor) / 100; - nEndGreen = (nEndGreen * nFactor) / 100; - nEndBlue = (nEndBlue * nFactor) / 100; - long nStepRed = (nEndRed - nRed) / nSteps; - long nStepGreen = (nEndGreen - nGreen) / nSteps; - long nStepBlue = (nEndBlue - nBlue) / nSteps; - long nSteps2; - - if ( bLinear ) - { - // Um 1 erhoeht, um die Border innerhalb der Schleife - // zeichnen zu koennen - nSteps2 = nSteps + 1; - } - else - { - nStepRed <<= 1; - nStepGreen <<= 1; - nStepBlue <<= 1; - nRed = nEndRed; - nGreen = nEndGreen; - nBlue = nEndBlue; - - // Um 2 erhoeht, um die Border innerhalb der Schleife - // zeichnen zu koennen - nSteps2 = nSteps + 2; - } - Color aCol( (BYTE) nRed, (BYTE) nGreen, (BYTE) nBlue ); - - // GDI-Objekte sichern und setzen - aSetFillInBrushRecordHdl.Call(&aCol); - - // Startpolygon erzeugen (== Borderpolygon) - Polygon aPoly( 4 ); - Polygon aTempPoly( 2 ); - aPoly[0] = aFullRect.TopLeft(); - aPoly[1] = aFullRect.TopRight(); - aPoly[2] = aRect.TopRight(); - aPoly[3] = aRect.TopLeft(); - aPoly.Rotate( aCenter, rGradient.GetAngle() ); - - // Schleife, um rotierten Verlauf zu fuellen - for ( long i = 0; i < nSteps2; i++ ) - { - Polygon aTempPoly = aPoly; - aTempPoly.Clip( rRect ); - aDrawPolyRecordHdl.Call(&aTempPoly); - aTempPoly.SetSize( 2 ); - - // neues Polygon berechnen - aRect.Top() = (long)(fScanLine += fScanInc); - - // unteren Rand komplett fuellen - if ( i == nSteps ) - { - aTempPoly[0] = aFullRect.BottomLeft(); - aTempPoly[1] = aFullRect.BottomRight(); - } - else - { - aTempPoly[0] = aRect.TopLeft(); - aTempPoly[1] = aRect.TopRight(); - } - aTempPoly.Rotate( aCenter, rGradient.GetAngle() ); - - aPoly[0] = aPoly[3]; - aPoly[1] = aPoly[2]; - aPoly[2] = aTempPoly[1]; - aPoly[3] = aTempPoly[0]; - - // Farbintensitaeten aendern... - // fuer lineare FV - if ( bLinear ) - { - nRed += nStepRed; - nGreen += nStepGreen; - nBlue += nStepBlue; - } - // fuer radiale FV - else - { - if ( i <= (nSteps >> 1) ) - { - nRed -= nStepRed; - nGreen -= nStepGreen; - nBlue -= nStepBlue; - } - // genau die Mitte und hoeher - else - { - nRed += nStepRed; - nGreen += nStepGreen; - nBlue += nStepBlue; - } - } - - nRed = MinMax( nRed, 0, 255 ); - nGreen = MinMax( nGreen, 0, 255 ); - nBlue = MinMax( nBlue, 0, 255 ); - - // fuer lineare FV ganz normale Bestimmung der Farbe - if ( bLinear || (i <= nSteps) ) - { - aCol = Color( (BYTE) nRed, (BYTE) nGreen, (BYTE) nBlue ); - } - // fuer axiale FV muss die letzte Farbe der ersten - // Farbe entsprechen - else - { - aCol = Color( (BYTE) nEndRed, (BYTE) nEndGreen, (BYTE) nEndBlue ); - } - - aSetFillInBrushRecordHdl.Call(&aCol); - } -} - -// ------------------------------------------------------------------------ - -void GradientWrapper::WriteRadialGradient(const Rectangle& rRect, - const Gradient& rGradient) -{ - USHORT nStepCount = 100; - Rectangle aClipRect = rRect; - Rectangle aRect = rRect; - long nZWidth = aRect.GetWidth() * (long)rGradient.GetOfsX() / 100; - long nZHeight= aRect.GetHeight() * (long)rGradient.GetOfsY() / 100; - Size aSize = aRect.GetSize(); - Point aCenter( aRect.Left() + nZWidth, aRect.Top() + nZHeight ); - - // Radien-Berechnung fuer Kreisausgabe (Kreis schliesst Rechteck ein) - if ( rGradient.GetStyle() == GRADIENT_RADIAL ) - { - aSize.Width() = (long)(0.5 + sqrt((double)aSize.Width()*(double)aSize.Width() + - (double)aSize.Height()*(double)aSize.Height())); - aSize.Height() = aSize.Width(); - } - // Radien-Berechnung fuer Ellipse - else - { - aSize.Width() = (long)(0.5 + (double)aSize.Width() * 1.4142); - aSize.Height() = (long)(0.5 + (double)aSize.Height() * 1.4142); - } - - long nBorderX = (long)rGradient.GetBorder() * aSize.Width() / 100; - long nBorderY = (long)rGradient.GetBorder() * aSize.Height() / 100; - aSize.Width() -= nBorderX; - aSize.Height() -= nBorderY; - aRect.Left() = aCenter.X() - (aSize.Width() >> 1); - aRect.Top() = aCenter.Y() - (aSize.Height() >> 1); - aRect.SetSize( aSize ); - - long nMinRect = Min( aRect.GetWidth(), aRect.GetHeight() ); - - // Anzahl der Schritte berechnen, falls nichts uebergeben wurde - if ( !nStepCount ) - { - long nInc = ((nMinRect >> 9) + 1) << 3; - - if ( !nInc ) - nInc = 1; - - nStepCount = (USHORT)(nMinRect / nInc); - } - // minimal drei Schritte - long nSteps = Max( nStepCount, (USHORT)3 ); - - // Ausgabebegrenzungen und Schrittweite fuer jede Richtung festlegen - double fScanLeft = aRect.Left(); - double fScanTop = aRect.Top(); - double fScanRight = aRect.Right(); - double fScanBottom = aRect.Bottom(); - double fScanInc = (double)nMinRect / (double)nSteps * 0.5; - - // Intensitaeten von Start- und Endfarbe ggf. aendern und - // Farbschrittweiten berechnen - long nFactor; - const Color& rStartCol = rGradient.GetStartColor(); - const Color& rEndCol = rGradient.GetEndColor(); - long nRed = rStartCol.GetRed(); - long nGreen = rStartCol.GetGreen(); - long nBlue = rStartCol.GetBlue(); - long nEndRed = rEndCol.GetRed(); - long nEndGreen = rEndCol.GetGreen(); - long nEndBlue = rEndCol.GetBlue(); - nFactor = rGradient.GetStartIntensity(); - nRed = (nRed * nFactor) / 100; - nGreen = (nGreen * nFactor) / 100; - nBlue = (nBlue * nFactor) / 100; - nFactor = rGradient.GetEndIntensity(); - nEndRed = (nEndRed * nFactor) / 100; - nEndGreen = (nEndGreen * nFactor) / 100; - nEndBlue = (nEndBlue * nFactor) / 100; - long nStepRed = (nEndRed - nRed) / nSteps; - long nStepGreen = (nEndGreen - nGreen) / nSteps; - long nStepBlue = (nEndBlue - nBlue) / nSteps; - Color aCol( (BYTE) nRed, (BYTE) nGreen, (BYTE) nBlue ); - - // GDI-Objekte sichern und setzen - aSetFillInBrushRecordHdl.Call(&aCol); - - // Recteck erstmal ausgeben - PolyPolygon aPolyPoly( 2 ); - Polygon aPoly( rRect ); - - aPolyPoly.Insert( aPoly ); - aPoly = Polygon( aRect ); - aPoly.Rotate( aCenter, rGradient.GetAngle() ); - aPolyPoly.Insert( aPoly ); - - // erstes Polygon zeichnen (entspricht Rechteck) - PolyPolygon aTempPolyPoly = aPolyPoly; - aTempPolyPoly.Clip( aClipRect ); - aDrawPolyPolyRecordHdl.Call(&aTempPolyPoly); - - for ( long i = 0; i < nSteps; i++ ) - { - Color aCol( (BYTE) nRed, (BYTE) nGreen, (BYTE) nBlue ); - aSetFillInBrushRecordHdl.Call(&aCol); - - // neues Polygon berechnen - aRect.Left() = (long)(fScanLeft += fScanInc); - aRect.Top() = (long)(fScanTop += fScanInc); - aRect.Right() = (long)(fScanRight -= fScanInc); - aRect.Bottom() = (long)(fScanBottom -= fScanInc); - - if ( (aRect.GetWidth() < 2) || (aRect.GetHeight() < 2) ) - break; - - aPoly = Polygon( aRect.Center(), - aRect.GetWidth() >> 1, aRect.GetHeight() >> 1 ); - aPoly.Rotate( aCenter, rGradient.GetAngle() ); - - aPolyPoly.Replace( aPolyPoly.GetObject( 1 ), 0 ); - aPolyPoly.Replace( aPoly, 1 ); - - PolyPolygon aTempPolyPoly = aPolyPoly; - aTempPolyPoly.Clip( aClipRect ); - aDrawPolyPolyRecordHdl.Call(&aTempPolyPoly); - - // Farbe entsprechend anpassen - nRed += nStepRed; - nGreen += nStepGreen; - nBlue += nStepBlue; - - nRed = MinMax( nRed, 0, 0xFF ); - nGreen = MinMax( nGreen, 0, 0xFF ); - nBlue = MinMax( nBlue, 0, 0xFF ); - } - - // Falls PolyPolygon-Ausgabe, muessen wir noch ein letztes - // inneres Polygon zeichnen - aCol = Color( (BYTE) nRed, (BYTE) nGreen, (BYTE) nBlue ); - aSetFillInBrushRecordHdl.Call(&aCol); - - aPoly = aPolyPoly.GetObject( 1 ); - if ( !aPoly.GetBoundRect().IsEmpty() ) - { - aPoly.Clip( aClipRect ); - aDrawPolyRecordHdl.Call(&aPoly); - } -} - -// ------------------------------------------------------------------------ - -void GradientWrapper::WriteRectGradient(const Rectangle& rRect, - const Gradient& rGradient) -{ - USHORT nStepCount = 100; - Rectangle aClipRect = rRect; - Rectangle aRect = rRect; - - aRect.Left()--; - aRect.Top()--; - aRect.Right()++; - aRect.Bottom()++; - - // rotiertes BoundRect ausrechnen - double fAngle = (rGradient.GetAngle() % 3600) * F_PI1800; - double fWidth = aRect.GetWidth(); - double fHeight = aRect.GetHeight(); - double fDX = fWidth * fabs( cos( fAngle ) ) + - fHeight * fabs( sin( fAngle ) ); - double fDY = fHeight * fabs( cos( fAngle ) ) + - fWidth * fabs( sin( fAngle ) ); - fDX = (fDX - fWidth) * 0.5 + 0.5; - fDY = (fDY - fHeight) * 0.5 + 0.5; - aRect.Left() -= (long)fDX; - aRect.Right() += (long)fDX; - aRect.Top() -= (long)fDY; - aRect.Bottom() += (long)fDY; - - // Quadratisch machen, wenn angefordert; - Size aSize = aRect.GetSize(); - if ( rGradient.GetStyle() == GRADIENT_SQUARE ) - { - if ( aSize.Width() > aSize.Height() ) - aSize.Height() = aSize.Width(); - else - aSize.Width() = aSize.Height(); - } - - // neue Mittelpunkte berechnen - long nZWidth = aRect.GetWidth() * (long)rGradient.GetOfsX() / 100; - long nZHeight = aRect.GetHeight() * (long)rGradient.GetOfsY() / 100; - long nBorderX = (long)rGradient.GetBorder() * aSize.Width() / 100; - long nBorderY = (long)rGradient.GetBorder() * aSize.Height() / 100; - Point aCenter( aRect.Left() + nZWidth, aRect.Top() + nZHeight ); - - // Rand beruecksichtigen - aSize.Width() -= nBorderX; - aSize.Height() -= nBorderY; - - // Ausgaberechteck neu setzen - aRect.Left() = aCenter.X() - (aSize.Width() >> 1); - aRect.Top() = aCenter.Y() - (aSize.Height() >> 1); - aRect.SetSize( aSize ); - - long nMinRect = Min( aRect.GetWidth(), aRect.GetHeight() ); - - // Anzahl der Schritte berechnen, falls nichts uebergeben wurde - if ( !nStepCount ) - { - long nInc = ((nMinRect >> 9) + 1) << 3; - - if ( !nInc ) - nInc = 1; - - nStepCount = (USHORT)(nMinRect / nInc); - } - // minimal drei Schritte - long nSteps = Max( nStepCount, (USHORT)3 ); - - // Ausgabebegrenzungen und Schrittweite fuer jede Richtung festlegen - double fScanLeft = aRect.Left(); - double fScanTop = aRect.Top(); - double fScanRight = aRect.Right(); - double fScanBottom = aRect.Bottom(); - double fScanInc = (double)nMinRect / (double)nSteps * 0.5; - - // Intensitaeten von Start- und Endfarbe ggf. aendern und - // Farbschrittweiten berechnen - long nFactor; - const Color& rStartCol = rGradient.GetStartColor(); - const Color& rEndCol = rGradient.GetEndColor(); - long nRed = rStartCol.GetRed(); - long nGreen = rStartCol.GetGreen(); - long nBlue = rStartCol.GetBlue(); - long nEndRed = rEndCol.GetRed(); - long nEndGreen = rEndCol.GetGreen(); - long nEndBlue = rEndCol.GetBlue(); - nFactor = rGradient.GetStartIntensity(); - nRed = (nRed * nFactor) / 100; - nGreen = (nGreen * nFactor) / 100; - nBlue = (nBlue * nFactor) / 100; - nFactor = rGradient.GetEndIntensity(); - nEndRed = (nEndRed * nFactor) / 100; - nEndGreen = (nEndGreen * nFactor) / 100; - nEndBlue = (nEndBlue * nFactor) / 100; - long nStepRed = (nEndRed - nRed) / nSteps; - long nStepGreen = (nEndGreen - nGreen) / nSteps; - long nStepBlue = (nEndBlue - nBlue) / nSteps; - Color aCol( (BYTE) nRed, (BYTE) nGreen, (BYTE) nBlue ); - - // GDI-Objekte sichern und setzen - aSetFillInBrushRecordHdl.Call(&aCol); - - // Recteck erstmal ausgeben - PolyPolygon aPolyPoly( 2 ); - Polygon aPoly( rRect ); - - aPolyPoly.Insert( aPoly ); - aPoly = Polygon( aRect ); - aPoly.Rotate( aCenter, rGradient.GetAngle() ); - aPolyPoly.Insert( aPoly ); - - PolyPolygon aTempPolyPoly = aPolyPoly; - aTempPolyPoly.Clip( aClipRect ); - aDrawPolyPolyRecordHdl.Call(&aTempPolyPoly); - - // Schleife, um nacheinander die Polygone/PolyPolygone auszugeben - for ( long i = 0; i < nSteps; i++ ) - { - Color aCol( (BYTE) nRed, (BYTE) nGreen, (BYTE) nBlue ); - aSetFillInBrushRecordHdl.Call(&aCol); - - // neues Polygon berechnen - aRect.Left() = (long)(fScanLeft += fScanInc); - aRect.Top() = (long)(fScanTop += fScanInc); - aRect.Right() = (long)(fScanRight -= fScanInc); - aRect.Bottom() = (long)(fScanBottom-= fScanInc); - - if ( (aRect.GetWidth() < 2) || (aRect.GetHeight() < 2) ) - break; - - aPoly = Polygon( aRect ); - aPoly.Rotate( aCenter, rGradient.GetAngle() ); - - aPolyPoly.Replace( aPolyPoly.GetObject( 1 ), 0 ); - aPolyPoly.Replace( aPoly, 1 ); - - PolyPolygon aTempPolyPoly = aPolyPoly; - aTempPolyPoly.Clip( aClipRect ); - aDrawPolyPolyRecordHdl.Call(&aTempPolyPoly); - - // Farben aendern - nRed += nStepRed; - nGreen += nStepGreen; - nBlue += nStepBlue; - - nRed = MinMax( nRed, 0, 0xFF ); - nGreen = MinMax( nGreen, 0, 0xFF ); - nBlue = MinMax( nBlue, 0, 0xFF ); - } - - aCol = Color( (BYTE) nRed, (BYTE) nGreen, (BYTE) nBlue ); - aSetFillInBrushRecordHdl.Call(&aCol); - - aPoly = aPolyPoly.GetObject( 1 ); - if ( !aPoly.GetBoundRect().IsEmpty() ) - { - aPoly.Clip( aClipRect ); - aDrawPolyRecordHdl.Call(&aPoly); - } -} diff --git a/svtools/source/filter.vcl/filter/makefile.mk b/svtools/source/filter.vcl/filter/makefile.mk deleted file mode 100644 index 272bb9a76b03..000000000000 --- a/svtools/source/filter.vcl/filter/makefile.mk +++ /dev/null @@ -1,88 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=svtools -TARGET=filter -LIBTARGET=NO - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svt.pmk - -SOLARINC+=-I../../inc - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES= strings.src \ - dlgexpor.src \ - dlgepng.src \ - dlgejpg.src - -SLOFILES= $(SLO)$/filter.obj \ - $(SLO)$/filter2.obj \ - $(SLO)$/dlgexpor.obj \ - $(SLO)$/dlgejpg.obj \ - $(SLO)$/dlgepng.obj \ - $(SLO)$/sgfbram.obj \ - $(SLO)$/sgvmain.obj \ - $(SLO)$/sgvtext.obj \ - $(SLO)$/sgvspln.obj \ - $(SLO)$/FilterConfigItem.obj \ - $(SLO)$/FilterConfigCache.obj \ - $(SLO)$/SvFilterOptionsDialog.obj - -EXCEPTIONSNOOPTFILES= $(SLO)$/filter.obj \ - $(SLO)$/FilterConfigItem.obj \ - $(SLO)$/FilterConfigCache.obj \ - $(SLO)$/SvFilterOptionsDialog.obj - -LIB1TARGET= $(SLB)$/$(TARGET).uno.lib -LIB1OBJFILES= \ - $(SLO)$/dlgexpor.obj \ - $(SLO)$/dlgejpg.obj \ - $(SLO)$/dlgepng.obj \ - $(SLO)$/SvFilterOptionsDialog.obj - -LIB2TARGET= $(SLB)$/$(TARGET).lib -LIB2OBJFILES= \ - $(SLO)$/filter.obj \ - $(SLO)$/filter2.obj \ - $(SLO)$/sgfbram.obj \ - $(SLO)$/sgvmain.obj \ - $(SLO)$/sgvtext.obj \ - $(SLO)$/sgvspln.obj \ - $(SLO)$/FilterConfigItem.obj \ - $(SLO)$/FilterConfigCache.obj - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/svtools/source/filter.vcl/filter/sgfbram.cxx b/svtools/source/filter.vcl/filter/sgfbram.cxx index 43cf0fbbacd3..3d1a71f5a2db 100644 --- a/svtools/source/filter.vcl/filter/sgfbram.cxx +++ b/svtools/source/filter.vcl/filter/sgfbram.cxx @@ -37,10 +37,6 @@ #include "sgffilt.hxx" #include "sgfbram.hxx" -#if defined( WIN ) && defined( MSC ) -#pragma code_seg( "SVTOOLS_FILTER4", "SVTOOLS_CODE" ) -#endif - /************************************************************************* |* |* operator>>( SvStream&, SgfHeader& ) diff --git a/svtools/source/filter.vcl/filter/sgvmain.cxx b/svtools/source/filter.vcl/filter/sgvmain.cxx index e175380244b3..293c6dab7964 100644 --- a/svtools/source/filter.vcl/filter/sgvmain.cxx +++ b/svtools/source/filter.vcl/filter/sgvmain.cxx @@ -110,20 +110,11 @@ // //////////////////////////////////////////////////////////////////////////////////////////////////// -#if defined( WIN ) && defined( MSC ) -#pragma code_seg( "svtools", "AUTO_CODE" ) -#endif - //////////////////////////////////////////////////////////////////////////////////////////////////// // Fuer Fontuebersetzung /////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////// SgfFontLst* pSgfFonts = 0; -#if defined( WIN ) && defined( MSC ) -#pragma code_seg( "SVTOOLS_FILTER3", "SVTOOLS_CODE" ) -static void AntiMscBug() {} -#endif - //////////////////////////////////////////////////////////////////////////////////////////////////// // Fuer Kreisunterarten, Text und gedrehte Rechtecke /////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -1137,7 +1128,3 @@ for n:=0 to 63 do end; */ -#if defined( WIN ) && defined( MSC ) -#pragma code_seg( "svtools", "AUTO_CODE" ) -#endif - diff --git a/svtools/source/filter.vcl/filter/sgvspln.cxx b/svtools/source/filter.vcl/filter/sgvspln.cxx index 7a23e85f4dbe..d695e171a194 100644 --- a/svtools/source/filter.vcl/filter/sgvspln.cxx +++ b/svtools/source/filter.vcl/filter/sgvspln.cxx @@ -33,11 +33,6 @@ #include <tools/poly.hxx> -#if defined( WIN ) && defined( MSC ) -#pragma code_seg( "SVTOOLS_FILTER2", "SVTOOLS_CODE" ) -#pragma optimize( "", off ) -#endif - #if defined( PM2 ) && defined( __BORLANDC__ ) #pragma option -Od #endif diff --git a/svtools/source/filter.vcl/filter/sgvtext.cxx b/svtools/source/filter.vcl/filter/sgvtext.cxx index 4a0be80b55be..9a82cd486599 100644 --- a/svtools/source/filter.vcl/filter/sgvtext.cxx +++ b/svtools/source/filter.vcl/filter/sgvtext.cxx @@ -38,10 +38,6 @@ extern SgfFontLst* pSgfFonts; -#if defined( WIN ) && defined( MSC ) -#pragma code_seg( "SVTOOLS_FILTER1", "SVTOOLS_CODE" ) -#endif - #ifndef abs #define abs(x) ((x)<0 ? -(x) : (x)) #endif @@ -621,7 +617,7 @@ USHORT SetTextContext(OutputDevice& rOut, ObjTextType& Atr, BOOL Kapt, USHORT Dr switch (Atr.GetFont()) { case 92500: case 92501: case 92504: case 92505: { -#if defined(WIN) || defined(WNT) || defined(PM2) +#if defined(WNT) || defined(PM2) FNam=String::CreateFromAscii( "Times New Roman" ); // CG Times ist unter Windows und OS/2 Times New Roman #else FNam=String::CreateFromAscii( "Times" ); // ansonsten ist das einfach Times @@ -630,7 +626,7 @@ USHORT SetTextContext(OutputDevice& rOut, ObjTextType& Atr, BOOL Kapt, USHORT Dr aFont.SetFamily(FAMILY_ROMAN); } break; case 94021: case 94022: case 94023: case 94024: { -#if defined(WIN) || defined(WNT) +#if defined(WNT) FNam=String::CreateFromAscii( "Arial", 5 ); // Univers ist unter Windows Arial #else FNam=String::CreateFromAscii( "Helvetica" ); // und ansonsten Helvetica @@ -639,7 +635,7 @@ USHORT SetTextContext(OutputDevice& rOut, ObjTextType& Atr, BOOL Kapt, USHORT Dr StdBrei=47; } break; case 93950: case 93951: case 93952: case 93953: { -#if defined(WIN) || defined(WNT) +#if defined(WNT) FNam=String::CreateFromAscii( "Courier New" ); // Der Vector-Courierfont unter Windows heisst Courier New #else FNam=String::CreateFromAscii( "Courier" ); // ansonsten ist und bleibt Courier immer Courier diff --git a/svtools/source/filter.vcl/filter/strings.hrc b/svtools/source/filter.vcl/filter/strings.hrc deleted file mode 100644 index 0eea67fb2338..000000000000 --- a/svtools/source/filter.vcl/filter/strings.hrc +++ /dev/null @@ -1,27 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#include <svtools/svtools.hrc> diff --git a/svtools/source/filter.vcl/filter/strings.src b/svtools/source/filter.vcl/filter/strings.src deleted file mode 100644 index 60e628ee0b5c..000000000000 --- a/svtools/source/filter.vcl/filter/strings.src +++ /dev/null @@ -1,85 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include "strings.hrc" - -String EXPORT_DIALOG_TITLE -{ - Text [ en-US ] = " Options" ; -}; - -String KEY_MODE -{ - Text = "ExportMode" ; -}; - -String KEY_RES -{ - Text = "Resolution" ; -}; - -String KEY_SIZE -{ - Text = "Size" ; -}; - -String KEY_COLORS -{ - Text = "Color" ; -}; - -String KEY_RLE_CODING -{ - Text = "RLE_Coding" ; -}; - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/svtools/source/filter.vcl/igif/makefile.mk b/svtools/source/filter.vcl/igif/makefile.mk deleted file mode 100644 index 0821591e0178..000000000000 --- a/svtools/source/filter.vcl/igif/makefile.mk +++ /dev/null @@ -1,45 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=svtools -TARGET=igif - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svt.pmk -SOLARINC+=-I../../inc - -# --- Files -------------------------------------------------------- - -SLOFILES= $(SLO)$/gifread.obj \ - $(SLO)$/decode.obj - -.INCLUDE : target.mk - diff --git a/svtools/source/filter.vcl/jpeg/jpeg.h b/svtools/source/filter.vcl/jpeg/jpeg.h index deb06600474c..82a2f80a838c 100644 --- a/svtools/source/filter.vcl/jpeg/jpeg.h +++ b/svtools/source/filter.vcl/jpeg/jpeg.h @@ -51,11 +51,7 @@ struct JPEGCreateBitmapParam typedef struct my_error_mgr* my_error_ptr; typedef unsigned char BYTE; -#ifdef WIN -typedef unsigned char _huge* HPBYTE; -#else typedef unsigned char* HPBYTE; -#endif void* JPEGMalloc( size_t size ); void JPEGFree( void *ptr ); diff --git a/svtools/source/filter.vcl/jpeg/makefile.mk b/svtools/source/filter.vcl/jpeg/makefile.mk deleted file mode 100644 index c782c520324c..000000000000 --- a/svtools/source/filter.vcl/jpeg/makefile.mk +++ /dev/null @@ -1,45 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=svtools -TARGET=jpeg - -# --- Settings ----------------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svt.pmk - -SOLARINC+=-I../../inc - -# --- Files -------------------------------------------------------- - -SLOFILES= $(SLO)$/jpegc.obj \ - $(SLO)$/jpeg.obj - -.INCLUDE : target.mk diff --git a/svtools/source/filter.vcl/wmf/makefile.mk b/svtools/source/filter.vcl/wmf/makefile.mk deleted file mode 100644 index 5c9412bc8387..000000000000 --- a/svtools/source/filter.vcl/wmf/makefile.mk +++ /dev/null @@ -1,50 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=svtools -TARGET=wmf -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svt.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES= $(SLO)$/wmf.obj \ - $(SLO)$/winmtf.obj \ - $(SLO)$/winwmf.obj \ - $(SLO)$/enhwmf.obj \ - $(SLO)$/emfwr.obj \ - $(SLO)$/wmfwr.obj - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk diff --git a/svtools/source/filter.vcl/wmf/winmtf.cxx b/svtools/source/filter.vcl/wmf/winmtf.cxx index bf176015fd77..787e6522b890 100644 --- a/svtools/source/filter.vcl/wmf/winmtf.cxx +++ b/svtools/source/filter.vcl/wmf/winmtf.cxx @@ -2043,7 +2043,7 @@ void WinMtfOutput::ModifyWorldTransform( const XForm& rXForm, UINT32 nMode ) case MWT_IDENTITY : { maXForm.eM11 = maXForm.eM12 = maXForm.eM21 = maXForm.eM22 = 1.0f; - maXForm.eDx = maXForm.eDx = 0.0f; + maXForm.eDx = maXForm.eDy = 0.0f; } break; diff --git a/svtools/source/filter.vcl/wmf/winwmf.cxx b/svtools/source/filter.vcl/wmf/winwmf.cxx index f7c4f51ce1e2..cea1ab490b04 100644 --- a/svtools/source/filter.vcl/wmf/winwmf.cxx +++ b/svtools/source/filter.vcl/wmf/winwmf.cxx @@ -1081,6 +1081,8 @@ void WMFReader::ReadWMF() nEMFRec = 0; nEMFSize = 0; + sal_Bool bEMFAvailable = sal_False; + pOut->SetMapMode( MM_ANISOTROPIC ); pOut->SetWinOrg( Point() ); pOut->SetWinExt( Size( 1, 1 ) ); @@ -1117,50 +1119,53 @@ void WMFReader::ReadWMF() break; } - if( aBmpSaveList.Count() && - ( nFunction != W_META_STRETCHDIB ) && - ( nFunction != W_META_DIBBITBLT ) && - ( nFunction != W_META_DIBSTRETCHBLT ) ) - { - pOut->ResolveBitmapActions( aBmpSaveList ); - } - if ( !nSkipActions ) - ReadRecordParams( nFunction ); - else - nSkipActions--; - - if( pEMFStream && nEMFRecCount == nEMFRec ) + if ( !bEMFAvailable ) { - GDIMetaFile aMeta; - pEMFStream->Seek( 0 ); - EnhWMFReader* pEMFReader = new EnhWMFReader ( *pEMFStream, aMeta ); - BOOL bRead = pEMFReader->ReadEnhWMF(); - delete pEMFReader; // destroy first!!! - - if( bRead ) + if( aBmpSaveList.Count() && + ( nFunction != W_META_STRETCHDIB ) && + ( nFunction != W_META_DIBBITBLT ) && + ( nFunction != W_META_DIBSTRETCHBLT ) ) { - pOut->AddFromGDIMetaFile( aMeta ); - pOut->SetrclFrame( Rectangle(0, 0, aMeta.GetPrefSize().Width(), aMeta.GetPrefSize().Height() )); - // we have successfully read the embedded EMF data - // no need to process WMF data further - break; + pOut->ResolveBitmapActions( aBmpSaveList ); } + if ( !nSkipActions ) + ReadRecordParams( nFunction ); else + nSkipActions--; + + if( pEMFStream && nEMFRecCount == nEMFRec ) { - // something went wrong - // continue with WMF, don't try this again - delete pEMFStream; - pEMFStream = NULL; - } + GDIMetaFile aMeta; + pEMFStream->Seek( 0 ); + EnhWMFReader* pEMFReader = new EnhWMFReader ( *pEMFStream, aMeta ); + bEMFAvailable = pEMFReader->ReadEnhWMF(); + delete pEMFReader; // destroy first!!! + if( bEMFAvailable ) + { + pOut->AddFromGDIMetaFile( aMeta ); + pOut->SetrclFrame( Rectangle(0, 0, aMeta.GetPrefSize().Width(), aMeta.GetPrefSize().Height() )); + + // the stream needs to be set to the wmf end position, + // otherwise the GfxLink that is created will be incorrect + // (leading to graphic loss after swapout/swapin). + // so we will proceed normally, but are ignoring further wmf + // records + } + else + { + // something went wrong + // continue with WMF, don't try this again + delete pEMFStream; + pEMFStream = NULL; + } + } } - nPos += nRecSize * 2; if ( nPos <= nEndPos ) pWMF->Seek( nPos ); else pWMF->SetError( SVSTREAM_FILEFORMAT_ERROR ); - } } else diff --git a/svtools/source/graphic/makefile.mk b/svtools/source/graphic/makefile.mk deleted file mode 100644 index 37870b46b80b..000000000000 --- a/svtools/source/graphic/makefile.mk +++ /dev/null @@ -1,66 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=svtools -TARGET=graphic - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svt.pmk - -.IF "$(GUI)"=="WIN" -LINKFLAGS=$(LINKFLAGS) /PACKC:32768 -.ENDIF - -# --- Files -------------------------------------------------------- - -SLOFILES= \ - $(SLO)$/grfattr.obj \ - $(SLO)$/grfmgr.obj \ - $(SLO)$/grfmgr2.obj \ - $(SLO)$/grfcache.obj \ - $(SLO)$/descriptor.obj \ - $(SLO)$/provider.obj \ - $(SLO)$/graphic.obj \ - $(SLO)$/renderer.obj \ - $(SLO)$/graphicunofactory.obj \ - $(SLO)$/transformer.obj - -EXCEPTIONSFILES= \ - $(SLO)$/descriptor.obj \ - $(SLO)$/provider.obj \ - $(SLO)$/graphic.obj \ - $(SLO)$/renderer.obj \ - $(SLO)$/graphicunofactory.obj \ - $(SLO)$/transformer.obj - -# --- Target ------------------------------------------------------- - -.INCLUDE : target.mk diff --git a/svtools/source/graphic/provider.cxx b/svtools/source/graphic/provider.cxx index fbf95406a63a..f1674dcd7d4a 100644 --- a/svtools/source/graphic/provider.cxx +++ b/svtools/source/graphic/provider.cxx @@ -231,19 +231,19 @@ uno::Reference< ::graphic::XGraphic > GraphicProvider::implLoadStandardImage( co if( ( 0 == rResourceURL.getToken( 0, '/', nIndex ).compareToAscii( "private:standardimage" ) ) ) { rtl::OUString sImageName( rResourceURL.copy( nIndex ) ); - if ( sImageName.compareToAscii( "info" ) ) + if ( sImageName.equalsAscii( "info" ) ) { xRet = InfoBox::GetStandardImage().GetXGraphic(); } - else if ( sImageName.compareToAscii( "warning" ) ) + else if ( sImageName.equalsAscii( "warning" ) ) { xRet = WarningBox::GetStandardImage().GetXGraphic(); } - else if ( sImageName.compareToAscii( "error" ) ) + else if ( sImageName.equalsAscii( "error" ) ) { xRet = ErrorBox::GetStandardImage().GetXGraphic(); } - else if ( sImageName.compareToAscii( "query" ) ) + else if ( sImageName.equalsAscii( "query" ) ) { xRet = QueryBox::GetStandardImage().GetXGraphic(); } diff --git a/svtools/source/hatchwindow/hatchwindow.cxx b/svtools/source/hatchwindow/hatchwindow.cxx index 1b84206d6696..b26f7bbf091b 100644 --- a/svtools/source/hatchwindow/hatchwindow.cxx +++ b/svtools/source/hatchwindow/hatchwindow.cxx @@ -33,6 +33,8 @@ #include "ipwin.hxx" #include <toolkit/helper/convert.hxx> +#include <vos/mutex.hxx> +#include <vcl/svapp.hxx> using namespace ::com::sun::star; @@ -50,6 +52,8 @@ void VCLXHatchWindow::initializeWindow( const uno::Reference< awt::XWindowPeer > const awt::Rectangle& aBounds, const awt::Size& aSize ) { + ::vos::OGuard aGuard( Application::GetSolarMutex() ); + Window* pParent = NULL; VCLXWindow* pParentComponent = VCLXWindow::GetImplementation( xParent ); @@ -117,7 +121,7 @@ uno::Any SAL_CALL VCLXHatchWindow::queryInterface( const uno::Type & rType ) throw( uno::RuntimeException ) { // Attention: - // Don't use mutex or guard in this method!!! Is a method of XInterface. + // Don't use mutex or guard in this method!!! Is a method of XInterface. uno::Any aReturn( ::cppu::queryInterface( rType, static_cast< embed::XHatchWindow* >( this ) ) ); diff --git a/svtools/source/hatchwindow/hatchwindowfactory.component b/svtools/source/hatchwindow/hatchwindowfactory.component new file mode 100644 index 000000000000..153fc8796281 --- /dev/null +++ b/svtools/source/hatchwindow/hatchwindowfactory.component @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* 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. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.SharedLibrary" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.comp.embed.DocumentCloser"> + <service name="com.sun.star.embed.DocumentCloser"/> + </implementation> + <implementation name="com.sun.star.comp.embed.HatchWindowFactory"> + <service name="com.sun.star.comp.embed.HatchWindowFactory"/> + <service name="com.sun.star.embed.HatchWindowFactory"/> + </implementation> +</component> diff --git a/svtools/source/hatchwindow/hatchwindowfactory.cxx b/svtools/source/hatchwindow/hatchwindowfactory.cxx index f8dbddff3761..1222013372f7 100644 --- a/svtools/source/hatchwindow/hatchwindowfactory.cxx +++ b/svtools/source/hatchwindow/hatchwindowfactory.cxx @@ -31,6 +31,7 @@ #include "hatchwindowfactory.hxx" #include "hatchwindow.hxx" #include "cppuhelper/factory.hxx" +#include <vcl/svapp.hxx> #include "documentcloser.hxx" @@ -69,6 +70,7 @@ uno::Reference< embed::XHatchWindow > SAL_CALL OHatchWindowFactory::createHatchW if ( !xParent.is() ) throw lang::IllegalArgumentException(); // TODO + ::vos::OGuard aGuard( Application::GetSolarMutex() ); VCLXHatchWindow* pResult = new VCLXHatchWindow(); pResult->initializeWindow( xParent, aBounds, aHandlerSize ); return uno::Reference< embed::XHatchWindow >( static_cast< embed::XHatchWindow* >( pResult ) ); @@ -112,45 +114,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment ( *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo ( - void * /* pServiceManager */, void * pRegistryKey) -{ - if (pRegistryKey) - { - uno::Reference< registry::XRegistryKey> xRegistryKey ( - reinterpret_cast< registry::XRegistryKey* >(pRegistryKey)); - uno::Reference< registry::XRegistryKey> xNewKey; - - // OHatchWindowFactory registration - - xNewKey = xRegistryKey->createKey ( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) + - OHatchWindowFactory::impl_staticGetImplementationName() + - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") ) ); - - uno::Sequence< ::rtl::OUString > aServices = - OHatchWindowFactory::impl_staticGetSupportedServiceNames(); - for (sal_Int32 i = 0, n = aServices.getLength(); i < n; i++ ) - xNewKey->createKey( aServices.getConstArray()[i] ); - - - // ODocumentCloser registration - - xNewKey = xRegistryKey->createKey ( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) + - ODocumentCloser::impl_staticGetImplementationName() + - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") ) ); - - aServices = ODocumentCloser::impl_staticGetSupportedServiceNames(); - for (sal_Int32 i = 0, n = aServices.getLength(); i < n; i++ ) - xNewKey->createKey( aServices.getConstArray()[i] ); - - - return sal_True; - } - return sal_False; -} - SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory ( const sal_Char * pImplementationName, void * pServiceManager, void * /* pRegistryKey */) { diff --git a/svtools/source/hatchwindow/makefile.mk b/svtools/source/hatchwindow/makefile.mk deleted file mode 100644 index 316e4ab1bfe2..000000000000 --- a/svtools/source/hatchwindow/makefile.mk +++ /dev/null @@ -1,65 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. -PRJNAME=svtools -TARGET=hatchwindowfactory.uno -LIBTARGET=NO -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ---------------------------------- - -.INCLUDE : settings.mk -DLLPRE= - -# --- Files ------------------------------------- - -SLOFILES= \ - $(SLO)$/hatchwindow.obj\ - $(SLO)$/hatchwindowfactory.obj\ - $(SLO)$/documentcloser.obj\ - $(SLO)$/ipwin.obj - -SHL1TARGET= $(TARGET) -SHL1IMPLIB= i$(TARGET) -SHL1OBJS= $(SLOFILES) -SHL1STDLIBS=\ - $(TKLIB) \ - $(VCLLIB) \ - $(TOOLSLIB) \ - $(CPPUHELPERLIB) \ - $(CPPULIB) \ - $(SALLIB) - -SHL1VERSIONMAP=$(SOLARENV)/src/component.map -SHL1DEF= $(MISC)$/$(SHL1TARGET).def -DEF1NAME= $(SHL1TARGET) - -# --- Targets ---------------------------------- - -.INCLUDE : target.mk - diff --git a/svtools/source/inc/svimpbox.hxx b/svtools/source/inc/svimpbox.hxx index 92b9f960b65c..f9e4ee6951fb 100644 --- a/svtools/source/inc/svimpbox.hxx +++ b/svtools/source/inc/svimpbox.hxx @@ -153,7 +153,7 @@ private: USHORT nFlags; USHORT nCurTabPos; - WinBits nWinBits; + WinBits m_nStyle; ExtendedWinBits nExtendedWinBits; BOOL bSimpleTravel : 1; // ist TRUE bei SINGLE_SELECTION BOOL bUpdateMode : 1; @@ -264,7 +264,7 @@ public: ~SvImpLBox(); void Clear(); - void SetWindowBits( WinBits nWinStyle ); + void SetStyle( WinBits i_nWinStyle ); void SetExtendedWindowBits( ExtendedWinBits _nBits ); ExtendedWinBits GetExtendedWindowBits() const { return nExtendedWinBits; } void SetModel( SvLBoxTreeList* pModel ) { pTree = pModel;} @@ -340,7 +340,7 @@ public: const Size& GetOutputSize() const { return aOutputSize;} void KeyUp( BOOL bPageUp, BOOL bNotifyScroll = TRUE ); void KeyDown( BOOL bPageDown, BOOL bNotifyScroll = TRUE ); - bool Command( const CommandEvent& rCEvt ); + void Command( const CommandEvent& rCEvt ); void Invalidate(); void DestroyAnchor() { pAnchor=0; aSelEng.Reset(); } diff --git a/svtools/source/inc/svimpicn.hxx b/svtools/source/inc/svimpicn.hxx index 20f98d2bcbbd..7d5c2b1b41e3 100644 --- a/svtools/source/inc/svimpicn.hxx +++ b/svtools/source/inc/svimpicn.hxx @@ -96,7 +96,6 @@ class SvImpIconView nGridDY; long nHorSBarHeight, nVerSBarWidth; - WinBits nWinBits; int nViewMode; long nHorDist; long nVerDist; @@ -171,7 +170,7 @@ public: ~SvImpIconView(); void Clear( BOOL bInCtor = FALSE ); - void SetWindowBits( WinBits nWinStyle ); + void SetStyle( const WinBits i_nWinStyle ); void SetModel( SvLBoxTreeList* pTree, SvLBoxEntry* pParent ) { pModel = pTree; SetCurParent(pParent); } void EntryInserted( SvLBoxEntry*); diff --git a/svtools/source/inc/unoiface.hxx b/svtools/source/inc/unoiface.hxx index 5d34ea6f47ed..f15cb7c10d4c 100644 --- a/svtools/source/inc/unoiface.hxx +++ b/svtools/source/inc/unoiface.hxx @@ -39,7 +39,6 @@ #include <com/sun/star/awt/XTextLayoutConstrains.hpp> #include <svtools/svmedit.hxx> #include <svtools/fmtfield.hxx> -#include <com/sun/star/awt/XImageConsumer.hpp> #include <comphelper/uno3.hxx> @@ -243,7 +242,7 @@ struct RMItemData ::rtl::OUString Label; }; -typedef ::cppu::ImplInheritanceHelper3 < VCLXImageConsumer +typedef ::cppu::ImplInheritanceHelper3 < VCLXGraphicControl , ::com::sun::star::container::XContainerListener , ::com::sun::star::beans::XPropertyChangeListener , ::com::sun::star::awt::XItemEventBroadcaster @@ -288,7 +287,7 @@ public: protected: - // VCLXImageConsumer overridables + // VCLXGraphicControl overridables virtual void ImplSetNewImage(); static void ImplGetPropertyIds( std::list< sal_uInt16 > &aIds ); diff --git a/svtools/source/java/javainteractionhandler.cxx b/svtools/source/java/javainteractionhandler.cxx index ec34ed07f25d..a7420dbc388f 100644 --- a/svtools/source/java/javainteractionhandler.cxx +++ b/svtools/source/java/javainteractionhandler.cxx @@ -147,28 +147,10 @@ void SAL_CALL JavaInteractionHandler::handle( const Reference< XInteractionReque // No suitable JRE found vos::OGuard aSolarGuard( Application::GetSolarMutex() ); m_bJavaNotFound_Handled = true; - //We first try to get the patch resource svp680xxx.res - //If the resource is not found then svt680xxx.res is used - ResId idWBX = SvtResId(WARNINGBOX_JAVANOTFOUND); - SvpResId pidPatchWBX(WARNINGBOX_JAVANOTFOUND); - pidPatchWBX.SetRT(RSC_WARNINGBOX); - ResMgr *pMgrWB = pidPatchWBX.GetResMgr(); - if (pMgrWB && pMgrWB->IsAvailable(pidPatchWBX)) - idWBX = pidPatchWBX; - WarningBox aWarningBox( NULL, idWBX); - - String aTitle; - SvpResId pidString(STR_WARNING_JAVANOTFOUND); - pidString.SetRT(RSC_STRING); - ResMgr *pmgr = pidString.GetResMgr(); - if ( pmgr && pmgr->IsAvailable(pidString)) - aTitle = String(pidString); - else - aTitle = String( SvtResId( STR_WARNING_JAVANOTFOUND )); - + WarningBox aWarningBox( NULL, SvtResId( WARNINGBOX_JAVANOTFOUND ) ); + String aTitle( SvtResId( STR_WARNING_JAVANOTFOUND ) ); aWarningBox.SetText( aTitle ); nResult = aWarningBox.Execute(); - } else { @@ -182,25 +164,8 @@ void SAL_CALL JavaInteractionHandler::handle( const Reference< XInteractionReque // javavendors.xml was updated and Java has not been configured yet vos::OGuard aSolarGuard( Application::GetSolarMutex() ); m_bInvalidSettings_Handled = true; - //We first try to get the patch resource svp680xxx.res - //If the resource is not found then svt680xxx.res is used - ResId idWBX = SvtResId(WARNINGBOX_INVALIDJAVASETTINGS); - SvpResId pidPatchWBX(WARNINGBOX_INVALIDJAVASETTINGS); - pidPatchWBX.SetRT(RSC_WARNINGBOX); - ResMgr *pMgrWB = pidPatchWBX.GetResMgr(); - if (pMgrWB && pMgrWB->IsAvailable(pidPatchWBX)) - idWBX = pidPatchWBX; - WarningBox aWarningBox( NULL, idWBX); - - String aTitle; - SvpResId pidString(STR_WARNING_INVALIDJAVASETTINGS); - pidString.SetRT(RSC_STRING); - ResMgr *pmgr = pidString.GetResMgr(); - if ( pmgr && pmgr->IsAvailable(pidString)) - aTitle = String(pidString); - else - aTitle = String( SvtResId(STR_WARNING_INVALIDJAVASETTINGS)); - + WarningBox aWarningBox( NULL, SvtResId( WARNINGBOX_INVALIDJAVASETTINGS ) ); + String aTitle( SvtResId(STR_WARNING_INVALIDJAVASETTINGS)); aWarningBox.SetText( aTitle ); nResult = aWarningBox.Execute(); } @@ -216,28 +181,8 @@ void SAL_CALL JavaInteractionHandler::handle( const Reference< XInteractionReque vos::OGuard aSolarGuard( Application::GetSolarMutex() ); m_bJavaDisabled_Handled = true; // Java disabled. Give user a chance to enable Java inside Office. - //We first try to get the patch resource svp680xxx.res - //If the resource is not found then svt680xxx.res is used - ResId idQBX = SvtResId( QBX_JAVADISABLED ); - SvpResId pidPatchQBX(QBX_JAVADISABLED); - pidPatchQBX.SetRT(RSC_QUERYBOX); - ResMgr *pMgrQB = pidPatchQBX.GetResMgr(); - - if (pMgrQB && pMgrQB->IsAvailable(pidPatchQBX)) - idQBX = pidPatchQBX; - - QueryBox aQueryBox(NULL, idQBX); - - String aTitle; - - SvpResId pidString(STR_QUESTION_JAVADISABLED); - pidString.SetRT(RSC_STRING); - ResMgr *pmgr = pidString.GetResMgr(); - if ( pmgr && pmgr->IsAvailable(pidString)) - aTitle = String(pidString); - else - aTitle = String( SvtResId( STR_QUESTION_JAVADISABLED )); - + QueryBox aQueryBox( NULL, SvtResId( QBX_JAVADISABLED ) ); + String aTitle( SvtResId( STR_QUESTION_JAVADISABLED ) ); aQueryBox.SetText( aTitle ); nResult = aQueryBox.Execute(); if ( nResult == RET_YES ) @@ -260,25 +205,8 @@ void SAL_CALL JavaInteractionHandler::handle( const Reference< XInteractionReque // Java not correctly installed, or damaged vos::OGuard aSolarGuard( Application::GetSolarMutex() ); m_bVMCreationFailure_Handled = true; - //We first try to get the patch resource svp680xxx.res - //If the resource is not found then svt680xxx.res is used - ResId idEBX = SvtResId(ERRORBOX_JVMCREATIONFAILED); - SvpResId pidPatchEBX(ERRORBOX_JVMCREATIONFAILED); - pidPatchEBX.SetRT(RSC_ERRORBOX); - ResMgr *pMgrEB = pidPatchEBX.GetResMgr(); - if (pMgrEB && pMgrEB->IsAvailable(pidPatchEBX)) - idEBX = pidPatchEBX; - ErrorBox aErrorBox( NULL, idEBX); - - String aTitle; - SvpResId pidString(STR_ERROR_JVMCREATIONFAILED); - pidString.SetRT(RSC_STRING); - ResMgr *pmgr = pidString.GetResMgr(); - if ( pmgr && pmgr->IsAvailable(pidString)) - aTitle = String(pidString); - else - aTitle = String( SvtResId(STR_ERROR_JVMCREATIONFAILED)); - + ErrorBox aErrorBox( NULL, SvtResId( ERRORBOX_JVMCREATIONFAILED ) ); + String aTitle( SvtResId( STR_ERROR_JVMCREATIONFAILED ) ); aErrorBox.SetText( aTitle ); nResult = aErrorBox.Execute(); } @@ -295,25 +223,8 @@ void SAL_CALL JavaInteractionHandler::handle( const Reference< XInteractionReque //before it can be used. vos::OGuard aSolarGuard( Application::GetSolarMutex() ); m_bRestartRequired_Handled = true; - //We first try to get the patch resource svp680xxx.res - //If the resource is not found then svt680xxx.res is used - ResId idEBX = SvtResId(ERRORBOX_RESTARTREQUIRED); - SvpResId pidPatchEBX(ERRORBOX_RESTARTREQUIRED); - pidPatchEBX.SetRT(RSC_ERRORBOX); - ResMgr *pMgrEB = pidPatchEBX.GetResMgr(); - if (pMgrEB && pMgrEB->IsAvailable(pidPatchEBX)) - idEBX = pidPatchEBX; - ErrorBox aErrorBox(NULL, idEBX); - - String aTitle; - SvpResId pidString(STR_ERROR_RESTARTREQUIRED); - pidString.SetRT(RSC_STRING); - ResMgr *pmgr = pidString.GetResMgr(); - if ( pmgr && pmgr->IsAvailable(pidString)) - aTitle = String(pidString); - else - aTitle = String( SvtResId(STR_ERROR_RESTARTREQUIRED)); - + ErrorBox aErrorBox(NULL, SvtResId( ERRORBOX_RESTARTREQUIRED ) ); + String aTitle( SvtResId( STR_ERROR_RESTARTREQUIRED ) ); aErrorBox.SetText( aTitle ); nResult = aErrorBox.Execute(); } diff --git a/svtools/source/java/patchjavaerror.src b/svtools/source/java/patchjavaerror.src deleted file mode 100644 index d5990c05a663..000000000000 --- a/svtools/source/java/patchjavaerror.src +++ /dev/null @@ -1,93 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include <svtools/svtools.hrc> - -WarningBox WARNINGBOX_JAVANOTFOUND -{ - Buttons = WB_OK ; - DefButton = WB_DEF_OK ; - Message[ en-US ] ="%PRODUCTNAME requires a Java runtime environment (JRE) to perform this task. Please install a JRE and restart %PRODUCTNAME."; -}; - -WarningBox WARNINGBOX_INVALIDJAVASETTINGS -{ - Buttons = WB_OK ; - DefButton = WB_DEF_OK ; - Message[ en-US ] ="The %PRODUCTNAME configuration has been changed. Under Tools - Options - %PRODUCTNAME - Java, select the Java runtime environment you want to have used by %PRODUCTNAME."; -}; - -QueryBox QBX_JAVADISABLED -{ - Buttons = WB_YES_NO_CANCEL ; - DefButton = WB_DEF_YES ; - Message[ en-US ] = "%PRODUCTNAME requires a Java runtime environment (JRE) to perform this task. However, use of a JRE has been disabled. Do you want to enable the use of a JRE now?"; -}; - -ErrorBox ERRORBOX_JVMCREATIONFAILED -{ - Buttons = WB_OK; - DefButton = WB_DEF_OK ; - Message[ en-US ] = "%PRODUCTNAME requires a Java runtime environment (JRE) to perform this task. The selected JRE is defective. Please select another version or install a new JRE and select it under Tools - Options - %PRODUCTNAME - Java."; -}; - -ErrorBox ERRORBOX_RESTARTREQUIRED -{ - Buttons = WB_OK; - DefButton = WB_DEF_OK ; - Message[ en-US ] = "For the selected Java runtime environment to work properly, %PRODUCTNAME must be restarted. Please restart %PRODUCTNAME now."; -}; - - - -String STR_WARNING_JAVANOTFOUND -{ - Text[ en-US ] = "JRE Required" ; -}; - -String STR_WARNING_INVALIDJAVASETTINGS -{ - Text[ en-US ] = "Select JRE"; -}; - -String STR_ERROR_RESTARTREQUIRED -{ - Text[ en-US ] = "Restart Required"; -}; - -String STR_QUESTION_JAVADISABLED -{ - Text[ en-US ] = "Enable JRE" ; -}; - - -String STR_ERROR_JVMCREATIONFAILED -{ - Text[ en-US ] = "JRE is Defective" ; -}; - - diff --git a/svtools/source/misc/acceleratorexecute.cxx b/svtools/source/misc/acceleratorexecute.cxx index 6458e359a49c..b89f30997950 100644 --- a/svtools/source/misc/acceleratorexecute.cxx +++ b/svtools/source/misc/acceleratorexecute.cxx @@ -27,7 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#include "acceleratorexecute.hxx" +#include <svtools/acceleratorexecute.hxx> //=============================================== // includes diff --git a/svtools/source/misc/cliplistener.cxx b/svtools/source/misc/cliplistener.cxx index 8fb61a5a1cb9..a4e13be1d884 100644 --- a/svtools/source/misc/cliplistener.cxx +++ b/svtools/source/misc/cliplistener.cxx @@ -34,7 +34,7 @@ #include <vcl/window.hxx> #include <vos/mutex.hxx> -#include "cliplistener.hxx" +#include <svtools/cliplistener.hxx> #include <svtools/transfer.hxx> using namespace ::com::sun::star; diff --git a/svtools/source/misc/dialogclosedlistener.cxx b/svtools/source/misc/dialogclosedlistener.cxx index a08c8a3b6dd5..9e5b72989601 100644 --- a/svtools/source/misc/dialogclosedlistener.cxx +++ b/svtools/source/misc/dialogclosedlistener.cxx @@ -26,7 +26,7 @@ ************************************************************************/ #include "precompiled_svtools.hxx" -#include "dialogclosedlistener.hxx" +#include <svtools/dialogclosedlistener.hxx> //......................................................................... namespace svt diff --git a/svtools/source/misc/dialogcontrolling.cxx b/svtools/source/misc/dialogcontrolling.cxx index 7565dad731f7..2b33734c245f 100644 --- a/svtools/source/misc/dialogcontrolling.cxx +++ b/svtools/source/misc/dialogcontrolling.cxx @@ -27,7 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#include "dialogcontrolling.hxx" +#include <svtools/dialogcontrolling.hxx> #include <vcl/window.hxx> #include <algorithm> diff --git a/svtools/source/misc/ehdl.cxx b/svtools/source/misc/ehdl.cxx index bf9e87d33a74..5e20e2197fb7 100644 --- a/svtools/source/misc/ehdl.cxx +++ b/svtools/source/misc/ehdl.cxx @@ -30,7 +30,7 @@ #include <vos/mutex.hxx> #include <tools/debug.hxx> #include <tools/rcid.h> -#include <vcl/wintypes.hxx> +#include <tools/wintypes.hxx> #include <vcl/msgbox.hxx> #include <vcl/svapp.hxx> #if defined(OS2) @@ -43,7 +43,7 @@ #include <svtools/ehdl.hxx> #include <svtools/svtdata.hxx> #include <svtools/svtools.hrc> -#include "sfxecode.hxx" +#include <svtools/sfxecode.hxx> //========================================================================= @@ -64,7 +64,7 @@ static USHORT aWndFunc( { - NAMESPACE_VOS( OGuard ) aGuard( Application::GetSolarMutex() ); + vos:: OGuard aGuard( Application::GetSolarMutex() ); // aus den Flags die benoetigten WinBits ermitteln WinBits eBits=0; @@ -377,7 +377,7 @@ BOOL SfxErrorHandler::GetErrorString( */ { - NAMESPACE_VOS( OGuard ) aGuard( Application::GetSolarMutex() ); + vos:: OGuard aGuard( Application::GetSolarMutex() ); BOOL bRet = FALSE; rStr=String(SvtResId(RID_ERRHDL_CLASS)); @@ -454,7 +454,7 @@ BOOL SfxErrorContext::GetString(ULONG nErrId, String &rStr) } if( pMgr ) { - NAMESPACE_VOS( OGuard ) aGuard( Application::GetSolarMutex() ); + vos:: OGuard aGuard( Application::GetSolarMutex() ); ResId aResId( nResId, *pMgr ); diff --git a/svtools/source/misc/ehdl.src b/svtools/source/misc/ehdl.src index 436e06b7f3c5..2c2fab3e19b5 100644 --- a/svtools/source/misc/ehdl.src +++ b/svtools/source/misc/ehdl.src @@ -27,7 +27,8 @@ #define __RSC #include <svtools/svtools.hrc> -#include "sfxecode.hxx" +#include <svtools/sfxecode.hxx> + // pragma ---------------------------------------------------------------- String STR_ERR_HDLMESS diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx index 3aa0016c225e..a96067f95186 100644 --- a/svtools/source/misc/embedhlp.cxx +++ b/svtools/source/misc/embedhlp.cxx @@ -343,6 +343,7 @@ void EmbeddedObjectRef::Assign( const NS_UNO::Reference < NS_EMBED::XEmbeddedObj mpImp->xListener = EmbedEventListener_Impl::Create( this ); //#i103460# + if ( IsChart() ) { ::com::sun::star::uno::Reference < ::com::sun::star::chart2::XDefaultSizeTransmitter > xSizeTransmitter( xObj, uno::UNO_QUERY ); DBG_ASSERT( xSizeTransmitter.is(), "Object does not support XDefaultSizeTransmitter -> will cause #i103460#!" ); diff --git a/svtools/source/misc/embedtransfer.cxx b/svtools/source/misc/embedtransfer.cxx index cbf87f40b7fc..e49cf0ab62cf 100644 --- a/svtools/source/misc/embedtransfer.cxx +++ b/svtools/source/misc/embedtransfer.cxx @@ -36,7 +36,7 @@ #include <com/sun/star/embed/Aspects.hpp> #include <svtools/embedtransfer.hxx> -#include <vcl/mapunit.hxx> +#include <tools/mapunit.hxx> #include <vcl/outdev.hxx> #include <comphelper/storagehelper.hxx> #include <unotools/ucbstreamhelper.hxx> diff --git a/svtools/source/misc/errtxt.src b/svtools/source/misc/errtxt.src deleted file mode 100644 index 6c1a90ae6412..000000000000 --- a/svtools/source/misc/errtxt.src +++ /dev/null @@ -1,514 +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. - * - ************************************************************************/ - -#define __RSC -#include <svtools/svtools.hrc> -#include "sfxecode.hxx" - // pragma ---------------------------------------------------------------- -Resource RID_ERRCTX -{ - String ERRCTX_ERROR - { - Text [ en-US ] = "Error" ; - }; - String ERRCTX_WARNING - { - Text [ en-US ] = "Warning" ; - }; - String ERRCTX_SFX_LOADTEMPLATE - { - Text [ en-US ] = "$(ERR) loading the template $(ARG1)" ; - }; - String ERRCTX_SFX_SAVEDOC - { - Text [ en-US ] = "$(ERR) saving the document $(ARG1)"; - }; - String ERRCTX_SFX_SAVEASDOC - { - Text [ en-US ] = "$(ERR) saving the document $(ARG1)"; - }; - String ERRCTX_SFX_DOCINFO - { - Text [ en-US ] = "$(ERR) displaying doc. information for document $(ARG1)" ; - }; - String ERRCTX_SFX_DOCTEMPLATE - { - Text [ en-US ] = "$(ERR) writing document $(ARG1) as template" ; - }; - String ERRCTX_SFX_MOVEORCOPYCONTENTS - { - Text [ en-US ] = "$(ERR) copying or moving document contents" ; - }; - String ERRCTX_SFX_DOCMANAGER - { - Text [ en-US ] = "$(ERR) starting the Document Manager" ; - }; - String ERRCTX_SFX_OPENDOC - { - Text [ en-US ] = "$(ERR) loading document $(ARG1)" ; - }; - String ERRCTX_SFX_NEWDOCDIRECT - { - Text [ en-US ] = "$(ERR) creating a new document" ; - }; - String ERRCTX_SFX_NEWDOC - { - Text [ en-US ] = "$(ERR) creating a new document" ; - }; - String ERRCTX_SFX_CREATEOBJSH - { - Text [ en-US ] = "$(ERR) expanding entry" ; - }; - String ERRCTX_SFX_LOADBASIC - { - Text [ en-US ] = "$(ERR) loading BASIC of document $(ARG1)" ; - }; - String ERRCTX_SFX_SEARCHADDRESS - { - Text [ en-US ] = "$(ERR) searching for an address"; - }; -}; -Resource RID_ERRHDL -{ - String ERRCODE_CLASS_ABORT - { - Text [ en-US ] = "Abort" ; - }; - String ERRCODE_CLASS_NOTEXISTS - { - Text [ en-US ] = "Nonexistent object" ; - }; - String ERRCODE_CLASS_ALREADYEXISTS - { - Text [ en-US ] = "Object already exists" ; - }; - String ERRCODE_CLASS_ACCESS - { - Text [ en-US ] = "Object not accessible" ; - }; - String ERRCODE_CLASS_PATH - { - Text [ en-US ] = "Inadmissible path" ; - }; - String ERRCODE_CLASS_LOCKING - { - Text [ en-US ] = "Locking problem" ; - }; - String ERRCODE_CLASS_PARAMETER - { - Text [ en-US ] = "Wrong parameter" ; - }; - String ERRCODE_CLASS_SPACE - { - Text [ en-US ] = "Resource exhausted" ; - }; - String ERRCODE_CLASS_NOTSUPPORTED - { - Text [ en-US ] = "Action not supported" ; - }; - String ERRCODE_CLASS_READ - { - Text [ en-US ] = "Read-Error" ; - }; - String ERRCODE_CLASS_WRITE - { - Text [ en-US ] = "Write Error" ; - }; - String ERRCODE_CLASS_UNKNOWN - { - Text [ en-US ] = "unknown" ; - }; - String ERRCODE_CLASS_VERSION - { - Text [ en-US ] = "Version Incompatibility" ; - }; - String ERRCODE_CLASS_GENERAL - { - Text [ en-US ] = "General Error" ; - }; - String ERRCODE_CLASS_FORMAT - { - Text [ en-US ] = "Incorrect format" ; - }; - String ERRCODE_CLASS_CREATE - { - Text [ en-US ] = "Error creating object" ; - }; - String ERRCODE_CLASS_SBX - { - Text [ en-US ] = "Inadmissible value or data type" ; - }; - String ERRCODE_CLASS_RUNTIME - { - Text [ en-US ] = "BASIC runtime error" ; - }; - String ERRCODE_CLASS_COMPILER - { - Text [ en-US ] = "BASIC syntax error" ; - }; - String 1 - { - Text [ en-US ] = "General Error" ; - }; - String ERRCODE_IO_GENERAL - { - Text [ en-US ] = "General input/output error." ; - }; - String ERRCODE_IO_MISPLACEDCHAR - { - Text [ en-US ] = "Invalid file name." ; - }; - String ERRCODE_IO_NOTEXISTS - { - Text [ en-US ] = "Nonexistent file." ; - }; - String ERRCODE_IO_ALREADYEXISTS - { - Text [ en-US ] = "File already exists." ; - }; - String ERRCODE_IO_NOTADIRECTORY - { - Text [ en-US ] = "The object is not a directory." ; - }; - String ERRCODE_IO_NOTAFILE - { - Text [ en-US ] = "The object is not a file." ; - }; - String ERRCODE_IO_INVALIDDEVICE - { - Text [ en-US ] = "The specified device is invalid." ; - }; - String ERRCODE_IO_ACCESSDENIED - { - Text [ en-US ] = "The object cannot be accessed\ndue to insufficient user rights." ; - }; - String ERRCODE_IO_LOCKVIOLATION - { - Text [ en-US ] = "Sharing violation while accessing the object." ; - }; - String ERRCODE_IO_OUTOFSPACE - { - Text [ en-US ] = "No more space on device." ; - }; - String ERRCODE_IO_ISWILDCARD - { - Text [ en-US ] = "This operation cannot be run on\nfiles containing wildcards." ; - }; - String ERRCODE_IO_NOTSUPPORTED - { - Text [ en-US ] = "This operation is not supported on this operating system." ; - }; - String ERRCODE_IO_TOOMANYOPENFILES - { - Text [ en-US ] = "There are too many files open." ; - }; - String ERRCODE_IO_CANTREAD - { - Text [ en-US ] = "Data could not be read from the file." ; - }; - String ERRCODE_IO_CANTWRITE - { - Text [ en-US ] = "The file could not be written." ; - }; - String ERRCODE_IO_OUTOFMEMORY - { - Text [ en-US ] = "The operation could not be run due to insufficient memory." ; - }; - String ERRCODE_IO_CANTSEEK - { - Text [ en-US ] = "The seek operation could not be run." ; - }; - String ERRCODE_IO_CANTTELL - { - Text [ en-US ] = "The tell operation could not be run." ; - }; - String ERRCODE_IO_WRONGVERSION - { - Text [ en-US ] = "Incorrect file version." ; - }; - String ERRCODE_IO_WRONGFORMAT - { - Text [ en-US ] = "Incorrect file format." ; - }; - String ERRCODE_IO_INVALIDCHAR - { - Text [ en-US ] = "The file name contains invalid characters." ; - }; - String ERRCODE_IO_UNKNOWN - { - Text [ en-US ] = "An unknown I/O error has occurred." ; - }; - String ERRCODE_IO_INVALIDACCESS - { - Text [ en-US ] = "An invalid attempt was made to access the file." ; - }; - String ERRCODE_IO_CANTCREATE - { - Text [ en-US ] = "The file could not be created." ; - }; - String ERRCODE_IO_INVALIDPARAMETER - { - Text [ en-US ] = "The operation was started under an invalid parameter." ; - }; - String ERRCODE_IO_ABORT - { - Text [ en-US ] = "The operation on the file was aborted." ; - }; - String ERRCODE_IO_NOTEXISTSPATH - { - Text [ en-US ] = "Path to the file does not exist." ; - }; - String ERRCODE_IO_RECURSIVE - { - Text [ en-US ] = "An object cannot be copied into itself." ; - }; - String ERRCODE_SFX_NOSTDTEMPLATE - { - Text [ en-US ] = "The default template could not be opened." ; - }; - String ERRCODE_SFX_TEMPLATENOTFOUND - { - Text [ en-US ] = "The specified template could not be found." ; - }; - String ERRCODE_SFX_NOTATEMPLATE - { - Text [ en-US ] = "The file cannot be used as template." ; - }; - String ERRCODE_SFX_CANTREADDOCINFO - { - Text [ en-US ] = "Document information could not be read from the file because\nthe document information format is unknown or because document information does not\nexist." ; - }; - String ERRCODE_SFX_ALREADYOPEN - { - Text [ en-US ] = "This document has already been opened for editing." ; - }; - String ERRCODE_SFX_WRONGPASSWORD - { - Text [ en-US ] = "The wrong password has been entered." ; - }; - String ERRCODE_SFX_DOLOADFAILED - { - Text [ en-US ] = "Error reading file." ; - }; - String ERRCODE_SFX_DOCUMENTREADONLY - { - Text [ en-US ] = "The document was opened as read-only." ; - }; - String ERRCODE_SFX_OLEGENERAL - { - Text [ en-US ] = "General OLE Error." ; - }; - String ERRCODE_INET_NAME_RESOLVE - { - Text [ en-US ] = "The host name $(ARG1) could not be resolved." ; - }; - String ERRCODE_INET_CONNECT - { - Text [ en-US ] = "Could not establish Internet connection to $(ARG1)." ; - }; - String ERRCODE_INET_READ - { - Text [ en-US ] = "Error reading data from the Internet.\nServer error message: $(ARG1)." ; - }; - String ERRCODE_INET_WRITE - { - Text [ en-US ] = "Error transferring data to the Internet.\nServer error message: $(ARG1)." ; - }; - String ERRCODE_INET_GENERAL - { - Text [ en-US ] = "General Internet error has occurred." ; - }; - String ERRCODE_INET_OFFLINE - { - Text [ en-US ] = "The requested Internet data is not available in the cache and cannot be transmitted as the Online mode has not be activated." ; - }; - String ERRCODE_SFXMSG_STYLEREPLACE - { - ExtraData = ERRCODE_MSG_ERROR | ERRCODE_BUTTON_OK_CANCEL ; - Text [ en-US ] = "Should the $(ARG1) Style be replaced?" ; - }; - String ERRCODE_SFX_NOFILTER - { - Text [ en-US ] = "A filter has not been found." ; - }; - String ERRCODE_SFX_CANTFINDORIGINAL - { - Text [ en-US ] = "The original could not be determined." ; - }; - String ERRCODE_SFX_CANTCREATECONTENT - { - Text [ en-US ] = "The contents could not be created." ; - }; - String ERRCODE_SFX_CANTCREATELINK - { - Text [ en-US ] = "The link could not be created." ; - }; - String ERRCODE_SFX_WRONGBMKFORMAT - { - Text [ en-US ] = "The link format is invalid." ; - }; - String ERRCODE_SFX_WRONGICONFILE - { - Text [ en-US ] = "The configuration of the icon display is invalid." ; - }; - String ERRCODE_SFX_CANTWRITEICONFILE - { - Text [ en-US ] = "The configuration of the icon display can not be saved." ; - }; - String ERRCODE_SFX_CANTDELICONFILE - { - Text [ en-US ] = "The configuration of the icon display could not be deleted." ; - }; - String ERRCODE_SFX_CANTRENAMECONTENT - { - Text [ en-US ] = "Contents cannot be renamed." ; - }; - String ERRCODE_SFX_INVALIDBMKPATH - { - Text [ en-US ] = "The bookmark folder is invalid." ; - }; - String ERRCODE_SFX_CANTWRITEURLCFGFILE - { - Text [ en-US ] = "The configuration of the URLs to be saved locally could not be saved." ; - }; - String ERRCODE_SFX_WRONGURLCFGFORMAT - { - Text [ en-US ] = "The configuration format of the URLs to be saved locally is invalid." ; - }; - String ERRCODE_SFX_NODOCUMENT - { - Text [ en-US ] = "This action cannot be applied to a document that does not exist." ; - }; - String ERRCODE_SFX_INVALIDLINK - { - Text [ en-US ] = "The link refers to an invalid target." ; - }; - String ERRCODE_SFX_INVALIDTRASHPATH - { - Text [ en-US ] = "The Recycle Bin path is invalid." ; - }; - String ERRCODE_SFX_NOTRESTORABLE - { - Text [ en-US ] = "The entry could not be restored." ; - }; - String ERRCODE_IO_NAMETOOLONG - { - Text [ en-US ] = "The file name is too long for the target file system." ; - }; - String ERRCODE_SFX_CONSULTUSER - { - Text [ en-US ] = "The details for running the function are incomplete." ; - }; - String ERRCODE_SFX_INVALIDSYNTAX - { - Text [ en-US ] = "The input syntax is invalid." ; - }; - String ERRCODE_SFX_CANTCREATEFOLDER - { - Text [ en-US ] = "The input syntax is invalid." ; - }; - String ERRCODE_SFX_CANTRENAMEFOLDER - { - Text [ en-US ] = "The input syntax is invalid." ; - }; - String ERRCODE_SFX_WRONG_CDF_FORMAT - { - Text [ en-US ] = "The channel document has an invalid format." ; - }; - String ERRCODE_SFX_EMPTY_SERVER - { - Text [ en-US ] = "The server must not be empty." ; - }; - String ERRCODE_SFX_NO_ABOBOX - { - Text [ en-US ] = "A subscription folder is required to install a Channel." ; - }; - String ERRCODE_IO_NOTSTORABLEINBINARYFORMAT - { - Text [ en-US ] = "This document contains attributes that cannot be saved in the selected format.\nPlease save the document in a %PRODUCTNAME %PRODUCTVERSION file format."; - }; - String ERRCODE_SFX_TARGETFILECORRUPTED - { - Text [ en-US ] = "The file $(FILENAME) cannot be saved. Please check your system settings. You can find an automatically generated backup copy of this file in folder $(PATH) named $(BACKUPNAME)."; - }; - String ERRCODE_SFX_NOMOREDOCUMENTSALLOWED - { - Text [ en-US ] = "The maximum number of documents that can be opened at the same time has been reached. You need to close one or more documents before you can open a new document."; - }; - String ERRCODE_SFX_CANTCREATEBACKUP - { - Text [ en-US ] = "Could not create backup copy." ; - }; - String ERRCODE_SFX_MACROS_SUPPORT_DISABLED - { - Text [ en-US ] = "An attempt was made to execute a macro.\nFor security reasons, macro support is disabled."; - }; - String ERRCODE_SFX_DOCUMENT_MACRO_DISABLED - { - Text [ en-US ] = "This document contains macros.\n\nMacros may contain viruses. Execution of macros is disabled due to the current macro security setting in Tools - Options - %PRODUCTNAME - Security.\n\nTherefore, some functionality may not be available." ; - }; - String ERRCODE_SFX_BROKENSIGNATURE - { - Text [ en-US ] = "The digitally signed document content and/or macros do not match the current document signature.\n\nThis could be the result of document manipulation or of structural document damage due to data transmission.\n\nWe recommend that you do not trust the content of the current document.\nExecution of macros is disabled for this document.\n " ; - }; - String ERRCODE_SFX_INCOMPLETE_ENCRYPTION - { - Text [ en-US ] = "The encrypted document contains unexpected non-encrypted streams.\n\nThis could be the result of document manipulation.\n\nWe recommend that you do not trust the content of the current document.\nExecution of macros is disabled for this document.\n " ; - }; - - String ERRCODE_IO_INVALIDLENGTH - { - Text [ en-US ] = "Invalid data length." ; - }; - String ERRCODE_IO_CURRENTDIR - { - Text [ en-US ] = "Function not possible: path contains current directory." ; - }; - String ERRCODE_IO_NOTSAMEDEVICE - { - Text [ en-US ] = "Function not possible: device (drive) not identical." ; - }; - String ERRCODE_IO_DEVICENOTREADY - { - Text [ en-US ] = "Device (drive) not ready." ; - }; - String ERRCODE_IO_BADCRC - { - Text [ en-US ] = "Wrong check amount." ; - }; - String ERRCODE_IO_WRITEPROTECTED - { - Text [ en-US ] = "Function not possible: write protected." ; - }; - String ERRCODE_SFX_SHARED_NOPASSWORDCHANGE - { - Text [ en-US ] = "The password of a shared spreadsheet cannot be set or changed.\nDeactivate sharing mode first."; - }; -}; - -// eof ------------------------------------------------------------------------ - diff --git a/svtools/source/misc/helpagentwindow.cxx b/svtools/source/misc/helpagentwindow.cxx index 1d407bbdb611..a909c2f77ca9 100644 --- a/svtools/source/misc/helpagentwindow.cxx +++ b/svtools/source/misc/helpagentwindow.cxx @@ -27,20 +27,13 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#include "helpagentwindow.hxx" +#include <svtools/helpagentwindow.hxx> #include <osl/diagnose.h> -#ifndef _SV_BUTTON_HXX #include <vcl/button.hxx> -#endif #include <vcl/bitmap.hxx> #include <svtools/svtdata.hxx> - -#ifndef _SVTOOLS_HRC #include <svtools/svtools.hrc> -#endif -#ifndef _SVT_HELPID_HRC #include <svtools/helpid.hrc> -#endif #define WB_AGENT_STYLE 0 diff --git a/svtools/source/misc/imagemgr.cxx b/svtools/source/misc/imagemgr.cxx index c02ebc4477c6..4dbd132b9dc8 100644 --- a/svtools/source/misc/imagemgr.cxx +++ b/svtools/source/misc/imagemgr.cxx @@ -30,7 +30,7 @@ // includes -------------------------------------------------------------- -#include "imagemgr.hxx" +#include <svtools/imagemgr.hxx> #include <tools/urlobj.hxx> #include <tools/debug.hxx> #include <vcl/svapp.hxx> @@ -39,9 +39,7 @@ #include <sot/storage.hxx> #include <sot/clsids.hxx> #include <unotools/ucbhelper.hxx> -#ifndef _UNOTOOLS_PROCESSFACTORY_HXX #include <comphelper/processfactory.hxx> -#endif #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/container/XNameContainer.hpp> #include <com/sun/star/document/XTypeDetection.hpp> @@ -51,9 +49,8 @@ #include <tools/rcid.h> #include <rtl/logfile.hxx> #include <unotools/configmgr.hxx> - #include <svtools/svtools.hrc> -#include "imagemgr.hrc" +#include <svtools/imagemgr.hrc> #include <svtools/svtdata.hxx> #include <vos/mutex.hxx> diff --git a/svtools/source/misc/imagemgr.src b/svtools/source/misc/imagemgr.src index cdc9f8da1c87..03e68b3b30b7 100644 --- a/svtools/source/misc/imagemgr.src +++ b/svtools/source/misc/imagemgr.src @@ -27,7 +27,7 @@ // includes ****************************************************************** #include <svtools/svtools.hrc> -#include "imagemgr.hrc" +#include <svtools/imagemgr.hrc> // images ******************************************************************** diff --git a/svtools/source/misc/imageresourceaccess.cxx b/svtools/source/misc/imageresourceaccess.cxx index 436c3f721833..a4fd7e372880 100644 --- a/svtools/source/misc/imageresourceaccess.cxx +++ b/svtools/source/misc/imageresourceaccess.cxx @@ -28,9 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#ifndef SVTOOLS_SOURCE_MISC_IMAGERESOURCEACCESS_HXX -#include "imageresourceaccess.hxx" -#endif +#include <svtools/imageresourceaccess.hxx> /** === begin UNO includes === **/ #include <com/sun/star/io/NotConnectedException.hpp> diff --git a/svtools/source/misc/imap.cxx b/svtools/source/misc/imap.cxx index 25f23e2ef00b..4378e0acd234 100644 --- a/svtools/source/misc/imap.cxx +++ b/svtools/source/misc/imap.cxx @@ -57,10 +57,6 @@ UINT16 IMapObject::nActualTextEncoding = (UINT16) RTL_TEXTENCODING_DONTKNOW; /******************************************************************************/ -#ifdef WIN -#pragma optimize ( "", off ) -#endif - IMapObject::IMapObject() : bActive( false ) , nReadVersion( 0 ) @@ -1224,9 +1220,3 @@ void ImageMap::Read( SvStream& rIStm, const String& rBaseURL ) rIStm.SetNumberFormatInt( nOldFormat ); } - -#ifdef WIN -#pragma optimize ( "", on ) -#endif - - diff --git a/svtools/source/misc/imap2.cxx b/svtools/source/misc/imap2.cxx index 9834fe0fcb76..587a31d4f098 100644 --- a/svtools/source/misc/imap2.cxx +++ b/svtools/source/misc/imap2.cxx @@ -28,9 +28,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#ifdef WIN -#include <sysdep.hxx> -#endif #include <string.h> // #include <math.h> #include <vcl/svapp.hxx> @@ -48,9 +45,6 @@ #include <svtools/imapcirc.hxx> #include <svtools/imappoly.hxx> -#ifdef WIN -#include <sysdep.hxx> -#endif #include <string.h> #include <math.h> diff --git a/svtools/source/misc/itemdel.cxx b/svtools/source/misc/itemdel.cxx index 559d31cdeb1d..a161571daae7 100644 --- a/svtools/source/misc/itemdel.cxx +++ b/svtools/source/misc/itemdel.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#include "itemdel.hxx" +#include <svtools/itemdel.hxx> #include <vcl/svapp.hxx> #include <tools/errcode.hxx> #include <limits.h> diff --git a/svtools/source/misc/langtab.src b/svtools/source/misc/langtab.src index 1cb20d27fc12..067eb601a5af 100644 --- a/svtools/source/misc/langtab.src +++ b/svtools/source/misc/langtab.src @@ -319,6 +319,10 @@ StringArray STR_ARR_SVT_LANGUAGE_TABLE < "Sardinian, Logudorese" ; LANGUAGE_USER_SARDINIAN_LOGUDORESE ; > ; < "Sardinian, Sassarese" ; LANGUAGE_USER_SARDINIAN_SASSARESE ; > ; < "Bafia" ; LANGUAGE_USER_BAFIA ; > ; + < "Gikuyu" ; LANGUAGE_USER_GIKUYU ; > ; + < "Yoruba" ; LANGUAGE_YORUBA ; > ; + < "Rusyn (Ukraine)" ; LANGUAGE_USER_RUSYN_UKRAINE ; > ; + < "Rusyn (Slovakia)" ; LANGUAGE_USER_RUSYN_SLOVAKIA ; > ; }; }; diff --git a/svtools/source/misc/makefile.mk b/svtools/source/misc/makefile.mk deleted file mode 100644 index 65e43747a586..000000000000 --- a/svtools/source/misc/makefile.mk +++ /dev/null @@ -1,83 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. -PRJNAME=svtools -TARGET=misc - -ENABLE_EXCEPTIONS := TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svt.pmk - -# --- Files -------------------------------------------------------- - -#use local "bmp" as it may not yet be delivered - -SRS1NAME=misc -SRC1FILES=\ - ehdl.src \ - helpagent.src \ - imagemgr.src \ - langtab.src - -SRS2NAME=ehdl -SRC2FILES=\ - errtxt.src - -SLOFILES=\ - $(SLO)$/acceleratorexecute.obj \ - $(SLO)$/chartprettypainter.obj \ - $(SLO)$/cliplistener.obj \ - $(SLO)$/dialogclosedlistener.obj\ - $(SLO)$/dialogcontrolling.obj \ - $(SLO)$/ehdl.obj \ - $(SLO)$/embedhlp.obj \ - $(SLO)$/embedtransfer.obj \ - $(SLO)$/helpagentwindow.obj \ - $(SLO)$/imagemgr.obj \ - $(SLO)$/imageresourceaccess.obj \ - $(SLO)$/imap.obj \ - $(SLO)$/imap2.obj \ - $(SLO)$/imap3.obj \ - $(SLO)$/itemdel.obj \ - $(SLO)$/langtab.obj \ - $(SLO)$/stringtransfer.obj \ - $(SLO)$/svtaccessiblefactory.obj \ - $(SLO)$/svtdata.obj \ - $(SLO)$/templatefoldercache.obj \ - $(SLO)$/transfer.obj \ - $(SLO)$/transfer2.obj \ - $(SLO)$/unitconv.obj \ - $(SLO)$/wallitem.obj - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/svtools/source/misc/svtdata.cxx b/svtools/source/misc/svtdata.cxx index 65715f635883..495929bd89dc 100644 --- a/svtools/source/misc/svtdata.cxx +++ b/svtools/source/misc/svtdata.cxx @@ -61,25 +61,6 @@ ResMgr * ImpSvtData::GetResMgr() return GetResMgr(Application::GetSettings().GetUILocale()); } -ResMgr * ImpSvtData::GetPatchResMgr(const ::com::sun::star::lang::Locale& aLocale) -{ - if (!pPatchResMgr) - { - pPatchResMgr = ResMgr::CreateResMgr(CREATEVERSIONRESMGR_NAME(svp), aLocale); - } - return pPatchResMgr; -} - -ResMgr * ImpSvtData::GetPatchResMgr() -{ - return GetPatchResMgr(Application::GetSettings().GetUILocale()); -} - -SvpResId::SvpResId( USHORT nId ) : - ResId( nId, *ImpSvtData::GetSvtData().GetPatchResMgr() ) -{ -} - //============================================================================ // static ImpSvtData & ImpSvtData::GetSvtData() @@ -90,3 +71,8 @@ ImpSvtData & ImpSvtData::GetSvtData() return *static_cast<ImpSvtData *>(*pAppData); } +SvtResId::SvtResId(USHORT nId, const ::com::sun::star::lang::Locale aLocale): + ResId(nId, *ImpSvtData::GetSvtData().GetResMgr(aLocale)) {} + +SvtResId::SvtResId(USHORT nId): ResId(nId, *ImpSvtData::GetSvtData().GetResMgr()) {} + diff --git a/svtools/source/misc/templatefoldercache.cxx b/svtools/source/misc/templatefoldercache.cxx index 62f3ec39eb6f..a6c3617b50a7 100644 --- a/svtools/source/misc/templatefoldercache.cxx +++ b/svtools/source/misc/templatefoldercache.cxx @@ -27,7 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#include "templatefoldercache.hxx" +#include <svtools/templatefoldercache.hxx> #include <unotools/ucbstreamhelper.hxx> #include <unotools/localfilehelper.hxx> #include <com/sun/star/beans/XPropertySet.hpp> diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx index 268533ebb8c8..4e245ca50520 100644 --- a/svtools/source/misc/transfer.cxx +++ b/svtools/source/misc/transfer.cxx @@ -43,12 +43,8 @@ #include <rtl/memory.h> #include <rtl/uuid.h> #include <rtl/uri.hxx> -#ifndef DEBUG_HXX #include <tools/debug.hxx> -#endif -#ifndef URLOBJ_HXX #include <tools/urlobj.hxx> -#endif #include <unotools/ucbstreamhelper.hxx> #include <sot/exchange.hxx> #include <sot/storage.hxx> @@ -65,12 +61,8 @@ #include <comphelper/seqstream.hxx> #include <com/sun/star/datatransfer/clipboard/XClipboardNotifier.hpp> #include <com/sun/star/datatransfer/clipboard/XFlushableClipboard.hpp> -#ifndef _COM_SUN_STAR_DATATRANSFER_CLIPBOARD_XMIMECONTENTTYPEFACTORY_HPP_ #include <com/sun/star/datatransfer/XMimeContentTypeFactory.hpp> -#endif -#ifndef _COM_SUN_STAR_DATATRANSFER_CLIPBOARD_XMIMECONTENTTYPE_HPP_ #include <com/sun/star/datatransfer/XMimeContentType.hpp> -#endif #include <com/sun/star/frame/XDesktop.hpp> #include <com/sun/star/lang/XInitialization.hpp> diff --git a/svtools/source/misc/transfer2.cxx b/svtools/source/misc/transfer2.cxx index dcd0f81b2758..ea1b0174465e 100644 --- a/svtools/source/misc/transfer2.cxx +++ b/svtools/source/misc/transfer2.cxx @@ -28,12 +28,8 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" #include <vos/mutex.hxx> -#ifndef DEBUG_HXX #include <tools/debug.hxx> -#endif -#ifndef URLOBJ_HXX #include <tools/urlobj.hxx> -#endif #include <unotools/ucbstreamhelper.hxx> #include <sot/exchange.hxx> #include <sot/storage.hxx> @@ -43,12 +39,9 @@ #include <vcl/svapp.hxx> #include <vcl/window.hxx> #include <comphelper/processfactory.hxx> -#ifndef _COM_SUN_STAR_DATATRANSFER_DND_DROPTARGETDRAGCONTEXT_HPP_ #include <com/sun/star/datatransfer/dnd/XDropTargetDragContext.hpp> -#endif - #include "svl/urlbmk.hxx" -#include "inetimg.hxx" +#include <svtools/inetimg.hxx> #include <svtools/imap.hxx> #include <svtools/transfer.hxx> diff --git a/svtools/source/filter.vcl/filter/dlgejpg.hrc b/svtools/source/misc/undo.src index 90a3c1d162be..6f341741b112 100644 --- a/svtools/source/filter.vcl/filter/dlgejpg.hrc +++ b/svtools/source/misc/undo.src @@ -24,16 +24,21 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#include <svtools/svtools.hrc> -#define BTN_OK 1 -#define BTN_CANCEL 1 -#define BTN_HELP 1 -#define FI_DESCR 1 -#define NUM_FLD_QUALITY 1 -#define GRP_QUALITY 1 -#define GRP_COLORS 2 -#define RB_GRAY 1 -#define RB_RGB 2 + // include ------------------------------------------------------------------ + +#include <svtools/svtools.hrc> +String STR_UNDO +{ + Text [ en-US ] = "Undo: " ; +}; +String STR_REDO +{ + Text [ en-US ] = "Re~do: " ; +}; +String STR_REPEAT +{ + Text [ en-US ] = "~Repeat: " ; +}; diff --git a/svtools/source/misc/wallitem.cxx b/svtools/source/misc/wallitem.cxx index 505af52c9908..859958cea41c 100644 --- a/svtools/source/misc/wallitem.cxx +++ b/svtools/source/misc/wallitem.cxx @@ -48,7 +48,7 @@ #include <vcl/gradient.hxx> #include <vcl/cvtgrf.hxx> -#include "wallitem.hxx" +#include <svtools/wallitem.hxx> #include <svl/cntwall.hxx> // ----------------------------------------------------------------------- diff --git a/svtools/source/contnr/ctrdll.cxx b/svtools/source/misc/xwindowitem.cxx index 463c6ccc8b35..a382d8293617 100644 --- a/svtools/source/contnr/ctrdll.cxx +++ b/svtools/source/misc/xwindowitem.cxx @@ -28,52 +28,70 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#ifdef WIN -#include <svwin.h> +#include "svtools/xwindowitem.hxx" -#ifndef _SYSDEP_HXX -#include <sysdep.hxx> -#endif +#include <vcl/window.hxx> -// Statische DLL-Verwaltungs-Variablen -static HINSTANCE hDLLInst = 0; // HANDLE der DLL +using namespace ::com::sun::star; -/*************************************************************************** -|* -|* LibMain() -|* -|* Beschreibung Initialisierungsfunktion der DLL -|* Ersterstellung TH 05.05.93 -|* Letzte Aenderung TH 05.05.93 -|* -***************************************************************************/ +////////////////////////////////////////////////////////////////////// -extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR ) +TYPEINIT1_FACTORY( XWindowItem, SfxPoolItem, new XWindowItem ); + + +XWindowItem::XWindowItem() : + SfxPoolItem() { -#ifndef WNT - if ( nHeap ) - UnlockData( 0 ); -#endif +} - hDLLInst = hDLL; - return TRUE; +XWindowItem::XWindowItem( USHORT nWhichId, Window * pWin ) : + SfxPoolItem( nWhichId ) +{ + if (pWin) + { + m_xWin = uno::Reference< awt::XWindow >( pWin->GetComponentInterface(), uno::UNO_QUERY ); + // the assertion can't possibly fails since VCLXWindow implements XWindow... + DBG_ASSERT( m_xWin.is(), "failed to get XWindow" ); + } } -/*************************************************************************** -|* -|* WEP() -|* -|* Beschreibung DLL-Deinitialisierung -|* Ersterstellung TH 05.05.93 -|* Letzte Aenderung TH 05.05.93 -|* -***************************************************************************/ - -extern "C" int CALLBACK WEP( int ) + +XWindowItem::XWindowItem( USHORT nWhichId, uno::Reference< awt::XWindow > & rxWin ) : + SfxPoolItem( nWhichId ), + m_xWin( rxWin ) +{ +} + + +XWindowItem::XWindowItem( const XWindowItem &rItem ) : + SfxPoolItem( Which() ), + m_xWin( rItem.m_xWin ) +{ +} + + +XWindowItem::~XWindowItem() { - return 1; } -#endif + +SfxPoolItem * XWindowItem::Clone( SfxItemPool* /*pPool*/ ) const +{ + return new XWindowItem( *this ); +} + + +int XWindowItem::operator == ( const SfxPoolItem & rAttr ) const +{ + DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" ); + + const XWindowItem * pItem = dynamic_cast< const XWindowItem * >(&rAttr); + return pItem ? m_xWin == pItem->m_xWin : 0; +} + + +////////////////////////////////////////////////////////////////////// + + diff --git a/svtools/source/plugapp/commtest.cxx b/svtools/source/plugapp/commtest.cxx deleted file mode 100644 index 3a235afcc61b..000000000000 --- a/svtools/source/plugapp/commtest.cxx +++ /dev/null @@ -1,261 +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. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_svtools.hxx" -#include <vcl/svapp.hxx> -#include <vcl/wrkwin.hxx> -#include <vcl/toolbox.hxx> - - -#include <tools/simplecm.hxx> -#include "communi.hxx" -#include "brooker.hxx" -//#include <tools/bcst.hxx> - -#include "commtest.hrc" - - - -#define TCP_PORT 17612 - -#define CUniString( constAsciiStr ) UniString( RTL_CONSTASCII_USTRINGPARAM ( constAsciiStr ) ) - - -class PacketSender : public Timer -{ - SvStream* mpData; - CommunicationLinkRef mxCL; - -public: - PacketSender( ULONG nDelay, SvStream* pData, CommunicationLink* pCL ); - virtual void Timeout(); -}; - -PacketSender::PacketSender( ULONG nDelay, SvStream* pData, CommunicationLink* pCL ) -: mpData( pData ) -, mxCL( pCL ) -{ - SetTimeout( nDelay ); - Start(); -} - -void PacketSender::Timeout() -{ - mxCL->TransferDataStream( mpData ); - delete mpData; - delete this; -} - - - -class DelayedDeleter : public Timer -{ - CommunicationManager *mpManager; - -public: - DelayedDeleter( ULONG nDelay, CommunicationManager *pManager ); - virtual void Timeout(); -}; - -DelayedDeleter::DelayedDeleter( ULONG nDelay, CommunicationManager *pManager ) -: mpManager( pManager ) -{ - SetTimeout( nDelay ); - Start(); -} - -void DelayedDeleter::Timeout() -{ - delete mpManager; - delete this; -} - - - - -class CommunicationTester : public Application -{ - DECL_LINK( TBClick, ToolBox* ); - DECL_LINK( DataReceived, CommunicationLink* ); - DECL_LINK( ConnectionOpened, CommunicationLink* ); - DECL_LINK( ConnectionClosed, CommunicationLink* ); - - - CommunicationManager *pClientTcp, *pServerTcp; - InformationBroadcaster *pBCSTSend; - InformationBroadcaster *pBCSTListen; - InformationBrooker *pBCSTBrooker; -public: - CommunicationTester(); - - virtual void Main(); -}; - -CommunicationTester IchSelber; - -CommunicationTester::CommunicationTester() -: pClientTcp( NULL ) -, pServerTcp( NULL ) -, pBCSTSend( NULL ) -, pBCSTListen( NULL ) -, pBCSTBrooker( NULL ) -{} - -void CommunicationTester::Main() -{ - ResMgr *pRes = ResMgr::CreateResMgr( "commtest" ); - Resource::SetResManager( pRes ); - WorkWindow aWW( NULL, WB_APP | WB_STDWORK ); - aWW.Show(); - ToolBox aTB( &aWW, ResId( TBMenu ) ); - aTB.Show(); - aTB.RecalcItems(); - aTB.SetFloatingMode( TRUE ); - aTB.SetFloatingMode( FALSE ); - aTB.SetClickHdl( LINK( this, CommunicationTester, TBClick ) ); - - Execute(); -} - -#define SWITCH( pManager, ManagerClass ) \ -{ \ - if ( pManager ) \ - { \ - pManager->StopCommunication(); \ - new DelayedDeleter( 1000, pManager ); \ - pTB->SetItemState( pTB->GetCurItemId(), STATE_NOCHECK ); \ - pManager = NULL; \ - } \ - else \ - { \ - pManager = new ManagerClass; \ - pManager->SetConnectionOpenedHdl( LINK( this, CommunicationTester, ConnectionOpened ) );\ - pManager->SetConnectionClosedHdl( LINK( this, CommunicationTester, ConnectionClosed ) );\ - pManager->SetDataReceivedHdl( LINK( this, CommunicationTester, DataReceived ) );\ - pTB->SetItemState( pTB->GetCurItemId(), STATE_CHECK ); \ - } \ -} - - -IMPL_LINK( CommunicationTester, TBClick, ToolBox*, pTB ) -{ - switch ( pTB->GetCurItemId() ) - { - case SERVER_TCP: - { - SWITCH( pServerTcp, CommunicationManagerServerViaSocket( TCP_PORT, (USHORT) 32000 ) ); - if ( pServerTcp ) - pServerTcp->StartCommunication(); // Am Port horchen - } - break; - case CLIENT_TCP: - { - SWITCH( pClientTcp, CommunicationManagerClientViaSocket( "localhost", TCP_PORT ) ); - if ( pClientTcp ) - pClientTcp->StartCommunication(); // Eine Verbindung aufbauen - } - break; - case BCST_BROOKER: - { - if ( pBCSTBrooker ) - { - delete pBCSTBrooker; - pBCSTBrooker = NULL; - } - else - { - pBCSTBrooker = new InformationBrooker(); - } - } - break; - case BCST_LISTEN: - { - if ( pBCSTListen ) - { - delete pBCSTListen; - pBCSTListen = NULL; - } - else - { - pBCSTListen = new InformationBroadcaster(); - } - } - case BCST_SEND: - { - if ( pBCSTSend ) - { - pBCSTSend->Broadcast( BCST_CAT_PL2X, "Message: BCST_CAT_PL2X" ); - pBCSTSend->Broadcast( BCST_CAT_MINORCOPY, "Message: BCST_CAT_MINORCOPY" ); - pBCSTSend->Broadcast( BCST_CAT_DELIVER, "Message: BCST_CAT_DELIVER" ); - pBCSTSend->Broadcast( BCST_CAT_ALL, "Message: BCST_CAT_ALL" ); - } - else - { - pBCSTSend = new InformationBroadcaster(); - } - } - break; - } - return 0; -} - -IMPL_LINK( CommunicationTester, ConnectionOpened, CommunicationLink*, pCL ) -{ - SvStream *pData = pCL->GetBestCommunicationStream(); - while ( pData->Tell() < 70 ) *pData << 123; - - pCL->TransferDataStream( pData ); - return 0; -} - -IMPL_LINK( CommunicationTester, ConnectionClosed, CommunicationLink*, pCL ) -{ - return 0; -} - -IMPL_LINK( CommunicationTester, DataReceived, CommunicationLink*, pCL ) -{ - // Find Manager - CommunicationManager* pManager; - if ( pClientTcp && pClientTcp->IsLinkValid( pCL ) ) - { - pManager = pClientTcp; - } - if ( pServerTcp && pServerTcp->IsLinkValid( pCL ) ) - { - DBG_ASSERT( !pManager, "CommunicationLink bei mehreren Managern eingetragen"); - pManager = pServerTcp; - } - DBG_ASSERT( pCL->GetCommunicationManager() == pManager, "Manager des Link != Manager bei dem der Link Valid ist"); - - // Send Data Back (Echo) - new PacketSender( 1000, pCL->GetServiceData(), pCL ); - - return 0; -} - diff --git a/svtools/source/plugapp/commtest.hrc b/svtools/source/plugapp/commtest.hrc deleted file mode 100644 index f0f646b49bfc..000000000000 --- a/svtools/source/plugapp/commtest.hrc +++ /dev/null @@ -1,34 +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. - * - ************************************************************************/ -#define TBMenu 256 - - -#define SERVER_TCP 1 -#define CLIENT_TCP 2 -#define BCST_BROOKER 3 -#define BCST_LISTEN 4 -#define BCST_SEND 5 diff --git a/svtools/source/plugapp/commtest.src b/svtools/source/plugapp/commtest.src deleted file mode 100644 index 7073699f4956..000000000000 --- a/svtools/source/plugapp/commtest.src +++ /dev/null @@ -1,60 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#include "commtest.hrc" - -ToolBox TBMenu { - Border = TRUE; - SVLook = TRUE; - Dockable = TRUE; - Pos = MAP_APPFONT( 0, 0 ); - Size = MAP_APPFONT( 100, 20 ); - LineCount = 2; -// FloatingLines = 2; - ItemList = { - ToolBoxItem { - Identifier = SERVER_TCP; - Text = "Server TCP"; - }; - ToolBoxItem { - Identifier = CLIENT_TCP; - Text = "Client TCP"; - }; - ToolBoxItem { - Identifier = BCST_BROOKER; - Text = "BroadcastBrooker"; - }; - ToolBoxItem { - Identifier = BCST_SEND; - Text = "BroadcastClientSend"; - }; - ToolBoxItem { - Identifier = BCST_LISTEN; - Text = "BroadcastClientListen"; - }; - }; - Scroll = TRUE; -}; diff --git a/svtools/source/plugapp/makefile.mk b/svtools/source/plugapp/makefile.mk deleted file mode 100644 index f1dd0a4a8334..000000000000 --- a/svtools/source/plugapp/makefile.mk +++ /dev/null @@ -1,61 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/.. - -PRJNAME=svtools -TARGET=plugapp -LIBTARGET=NO - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svt.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/ttprops.obj - - -SRS2NAME=$(TARGET) -SRC2FILES= testtool.src - - -LIB1TARGET= $(SLB)$/plugapp.lib -LIB1OBJFILES= $(SLOFILES) - -######## Testapplikation ######### - -SRC1FILES= commtest.src -SRS1NAME= commtest - -######## Ende Testapplikation ######### - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/svtools/source/plugapp/testtool.src b/svtools/source/plugapp/testtool.src index 9cc52c58f013..e456200943f6 100644 --- a/svtools/source/plugapp/testtool.src +++ b/svtools/source/plugapp/testtool.src @@ -104,6 +104,7 @@ Bitmap TT_SHOW2 { }; WorkWindow TT_INLINE_TRANSLATION { + HelpID = "svtools:WorkWindow:TT_INLINE_TRANSLATION"; SVLook = TRUE; Size = MAP_APPFONT( 2*Control_Border + 4*ButtonWidth + 3*Button_Button, 120 ); Moveable = TRUE; @@ -116,6 +117,7 @@ WorkWindow TT_INLINE_TRANSLATION { Text[ en-US ] = "Translation"; }; Edit TT_E_NEW { + HelpID = "svtools:Edit:TT_INLINE_TRANSLATION:TT_E_NEW"; Disable = TRUE; Border = TRUE; Pos = MAP_APPFONT( 7, 16 ); @@ -134,6 +136,7 @@ WorkWindow TT_INLINE_TRANSLATION { Text[ en-US ] = "Comment"; }; Edit TT_E_COMMENT { + HelpID = "svtools:Edit:TT_INLINE_TRANSLATION:TT_E_COMMENT"; Disable = TRUE; Border = TRUE; Pos = MAP_APPFONT( 7, 64 ); @@ -142,12 +145,14 @@ WorkWindow TT_INLINE_TRANSLATION { Text[ en-US ] = "~Comment"; }; PushButton TT_PB_SELECT { + HelpID = "svtools:PushButton:TT_INLINE_TRANSLATION:TT_PB_SELECT"; Pos = MAP_APPFONT( Control_Border, 89 ); Size = MAP_APPFONT( ButtonWidth, 12 ); TabStop = TRUE; Text[ en-US ] = "~Select"; }; PushButton TT_PB_RESTORE { + HelpID = "svtools:PushButton:TT_INLINE_TRANSLATION:TT_PB_RESTORE"; Disable = TRUE; Pos = MAP_APPFONT( Control_Border + ButtonWidth + Button_Button, 89 ); Size = MAP_APPFONT( ButtonWidth, 12 ); @@ -155,6 +160,7 @@ WorkWindow TT_INLINE_TRANSLATION { Text[ en-US ] = "~Restore"; }; PushButton TT_PB_ACCEPT { + HelpID = "svtools:PushButton:TT_INLINE_TRANSLATION:TT_PB_ACCEPT"; Disable = TRUE; Pos = MAP_APPFONT( Control_Border + 2*(ButtonWidth + Button_Button), 89 ); Size = MAP_APPFONT( ButtonWidth, 12 ); @@ -162,6 +168,7 @@ WorkWindow TT_INLINE_TRANSLATION { Text[ en-US ] = "~Accept"; }; PushButton TT_PB_NEXT { + HelpID = "svtools:PushButton:TT_INLINE_TRANSLATION:TT_PB_NEXT"; Pos = MAP_APPFONT( Control_Border + 3*(ButtonWidth + Button_Button), 89 ); Size = MAP_APPFONT( ButtonWidth, 12 ); TabStop = TRUE; diff --git a/svtools/source/productregistration/makefile.mk b/svtools/source/productregistration/makefile.mk deleted file mode 100644 index a26e8feca753..000000000000 --- a/svtools/source/productregistration/makefile.mk +++ /dev/null @@ -1,78 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. -PRJNAME=svtools -TARGET=productregistration.uno -LIBTARGET=NO -ENABLE_EXCEPTIONS=TRUE -GEN_HID=TRUE - -# --- Settings ---------------------------------- - -.INCLUDE : settings.mk -DLLPRE= - -# --- Files ------------------------------------- - -SLOFILES= \ - $(SLO)$/productregistration.obj \ - $(SLO)$/registrationdlg.obj - -SHL1TARGET= $(TARGET) -SHL1IMPLIB= i$(TARGET) - -SHL1OBJS= \ - $(SLOFILES) - -SHL1STDLIBS=\ - $(TKLIB) \ - $(VCLLIB) \ - $(SVLLIB) \ - $(UNOTOOLSLIB) \ - $(TOOLSLIB) \ - $(CPPUHELPERLIB) \ - $(CPPULIB) \ - $(SALLIB) - -SHL1VERSIONMAP=$(SOLARENV)/src/component.map -SHL1DEF= $(MISC)$/$(SHL1TARGET).def -DEF1NAME= $(SHL1TARGET) - -SRS1NAME= productregistration -SRC1FILES= \ - registrationdlg.src - -RESLIB1NAME=productregistration -RESLIB1IMAGES=$(PRJ)$/res -RESLIB1SRSFILES=\ - $(SRS)$/productregistration.srs - -# --- Targets ---------------------------------- - -.INCLUDE : target.mk - diff --git a/svtools/source/productregistration/productregistration.cxx b/svtools/source/productregistration/productregistration.cxx index 39629f5c3f77..cb3a9b7a7702 100644 --- a/svtools/source/productregistration/productregistration.cxx +++ b/svtools/source/productregistration/productregistration.cxx @@ -461,25 +461,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment ( *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo ( - void * /* pServiceManager */, void * pRegistryKey) -{ - if (pRegistryKey) - { - Reference< XRegistryKey > xRegistryKey ( - reinterpret_cast< XRegistryKey* >( pRegistryKey )); - Reference< XRegistryKey > xNewKey; - - xNewKey = xRegistryKey->createKey( - OUString::createFromAscii( "/" PRODREG_IMPLNAME "/UNO/SERVICES" )); - xNewKey->createKey( - OUString::createFromAscii( PRODREG_SERVNAME )); - - return sal_True; - } - return sal_False; -} - SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory ( const sal_Char * pImplementationName, void * pServiceManager, void * /* pRegistryKey */) { diff --git a/svtools/source/productregistration/productregistration.uno.component b/svtools/source/productregistration/productregistration.uno.component new file mode 100644 index 000000000000..da2cfd37c483 --- /dev/null +++ b/svtools/source/productregistration/productregistration.uno.component @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* 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. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.SharedLibrary" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.comp.setup.ProductRegistration"> + <service name="com.sun.star.setup.ProductRegistration"/> + </implementation> +</component> diff --git a/svtools/source/productregistration/registrationdlg.src b/svtools/source/productregistration/registrationdlg.src index c4cdcbcbe3ec..64f1063f1ba3 100644 --- a/svtools/source/productregistration/registrationdlg.src +++ b/svtools/source/productregistration/registrationdlg.src @@ -72,6 +72,7 @@ ModalDialog DLG_REGISTRATION_REQUEST RadioButton RB_NOW { + HelpID = "svtools:RadioButton:DLG_REGISTRATION_REQUEST:RB_NOW"; Pos = MAP_APPFONT ( 33 , 41 ) ; Size = MAP_APPFONT ( 153 , 10 ) ; Text [ en-US ] = "Register now" ; @@ -79,18 +80,21 @@ ModalDialog DLG_REGISTRATION_REQUEST RadioButton RB_LATER { + HelpID = "svtools:RadioButton:DLG_REGISTRATION_REQUEST:RB_LATER"; Pos = MAP_APPFONT ( 33 , 54 ) ; Size = MAP_APPFONT ( 153 , 10 ) ; Text [ en-US ] = "Remind me to register later" ; }; RadioButton RB_NEVER { + HelpID = "svtools:RadioButton:DLG_REGISTRATION_REQUEST:RB_NEVER"; Pos = MAP_APPFONT ( 33 , 67 ) ; Size = MAP_APPFONT ( 153 , 10 ) ; Text [ en-US ] = "Never register" ; }; RadioButton RB_DONE { + HelpID = "svtools:RadioButton:DLG_REGISTRATION_REQUEST:RB_DONE"; Pos = MAP_APPFONT ( 33 , 80 ) ; Size = MAP_APPFONT ( 153 , 20 ) ; WordBreak = TRUE; diff --git a/svtools/source/svhtml/htmlkywd.cxx b/svtools/source/svhtml/htmlkywd.cxx index 96377a1b7efb..e966ccb2b5f6 100644 --- a/svtools/source/svhtml/htmlkywd.cxx +++ b/svtools/source/svhtml/htmlkywd.cxx @@ -34,8 +34,8 @@ #include <limits.h> #include <svtools/svparser.hxx> -#include "htmlkywd.hxx" -#include "htmltokn.h" +#include <svtools/htmlkywd.hxx> +#include <svtools/htmltokn.h> // die Tabelle muss noch sortiert werden struct HTML_TokenEntry diff --git a/svtools/source/svhtml/htmlout.cxx b/svtools/source/svhtml/htmlout.cxx index af0d0dff9667..33b8fd91a29f 100644 --- a/svtools/source/svhtml/htmlout.cxx +++ b/svtools/source/svhtml/htmlout.cxx @@ -36,7 +36,7 @@ #include <svl/zforlist.hxx> #include <svtools/htmlout.hxx> -#include "htmlkywd.hxx" +#include <svtools/htmlkywd.hxx> #include <svtools/imap.hxx> #include <svtools/imaprect.hxx> #include <svtools/imapcirc.hxx> diff --git a/svtools/source/svhtml/htmlsupp.cxx b/svtools/source/svhtml/htmlsupp.cxx index 4c08d9c41ec9..9227690c2995 100644 --- a/svtools/source/svhtml/htmlsupp.cxx +++ b/svtools/source/svhtml/htmlsupp.cxx @@ -37,8 +37,8 @@ #endif #include <svtools/parhtml.hxx> -#include "htmltokn.h" -#include "htmlkywd.hxx" +#include <svtools/htmltokn.h> +#include <svtools/htmlkywd.hxx> /* */ diff --git a/svtools/source/svhtml/makefile.mk b/svtools/source/svhtml/makefile.mk deleted file mode 100644 index 7a8552f2b672..000000000000 --- a/svtools/source/svhtml/makefile.mk +++ /dev/null @@ -1,51 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=svtools -TARGET=svhtml - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svt.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES=\ - $(SLO)$/htmlkywd.obj \ - $(SLO)$/htmlsupp.obj \ - $(SLO)$/htmlout.obj \ - $(SLO)$/parhtml.obj - -# ========================================================================== - -.INCLUDE : target.mk - diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx index 67fc5f619fdf..28df35a4bb2a 100644 --- a/svtools/source/svhtml/parhtml.cxx +++ b/svtools/source/svhtml/parhtml.cxx @@ -48,8 +48,8 @@ #include <com/sun/star/document/XDocumentProperties.hpp> #include <svtools/parhtml.hxx> -#include "htmltokn.h" -#include "htmlkywd.hxx" +#include <svtools/htmltokn.h> +#include <svtools/htmlkywd.hxx> using namespace ::com::sun::star; @@ -2118,11 +2118,7 @@ enum eHtmlMetas { }; // <META NAME=xxx> -#ifdef __MINGW32__ // for runtime pseudo reloc -static HTMLOptionEnum aHTMLMetaNameTable[] = -#else static HTMLOptionEnum __READONLY_DATA aHTMLMetaNameTable[] = -#endif { { OOO_STRING_SVTOOLS_HTML_META_author, HTML_META_AUTHOR }, { OOO_STRING_SVTOOLS_HTML_META_changed, HTML_META_CHANGED }, diff --git a/svtools/source/svrtf/makefile.mk b/svtools/source/svrtf/makefile.mk deleted file mode 100644 index 5ebb0e28c69e..000000000000 --- a/svtools/source/svrtf/makefile.mk +++ /dev/null @@ -1,49 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=svtools -TARGET=svrtf - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svt.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/svparser.obj \ - $(SLO)$/parrtf.obj \ - $(SLO)$/rtfout.obj \ - $(SLO)$/rtfkeywd.obj - -# ========================================================================== - -.INCLUDE : target.mk - diff --git a/svtools/source/svrtf/parrtf.cxx b/svtools/source/svrtf/parrtf.cxx index 1c578d160307..7e29dbc4598f 100644 --- a/svtools/source/svrtf/parrtf.cxx +++ b/svtools/source/svrtf/parrtf.cxx @@ -34,8 +34,8 @@ #include <rtl/tencinfo.h> #include <tools/stream.hxx> #include <tools/debug.hxx> -#include "rtftoken.h" -#include "rtfkeywd.hxx" +#include <svtools/rtftoken.h> +#include <svtools/rtfkeywd.hxx> #include <svtools/parrtf.hxx> const int MAX_STRING_LEN = 1024; @@ -44,8 +44,6 @@ const int MAX_TOKEN_LEN = 128; #define RTF_ISDIGIT( c ) (c >= '0' && c <= '9') #define RTF_ISALPHA( c ) ( (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') ) -SV_IMPL_VARARR( RtfParserStates_Impl, RtfParserState_Impl ) - SvRTFParser::SvRTFParser( SvStream& rIn, BYTE nStackSize ) : SvParser( rIn, nStackSize ), eUNICodeSet( RTL_TEXTENCODING_MS_1252 ), // default ist ANSI-CodeSet @@ -175,14 +173,13 @@ int SvRTFParser::_GetNextToken() nUCharOverread = (BYTE)nTokenValue; #if 1 //cmc: other ifdef breaks #i3584 - aParserStates[ aParserStates.Count()-1]. + aParserStates.top(). nUCharOverread = nUCharOverread; #else if( !nUCharOverread ) - nUCharOverread = aParserStates[ - aParserStates.Count()-1].nUCharOverread; + nUCharOverread = aParserStates.top().nUCharOverread; else - aParserStates[ aParserStates.Count()-1]. + aParserStates.top(). nUCharOverread = nUCharOverread; #endif } @@ -252,12 +249,12 @@ int SvRTFParser::_GetNextToken() if( 0 <= nOpenBrakets ) { RtfParserState_Impl aState( nUCharOverread, GetSrcEncoding() ); - aParserStates.Insert( - aState, sal::static_int_cast< USHORT >(nOpenBrakets) ); + aParserStates.push( aState ); } ++nOpenBrakets; - DBG_ASSERT( nOpenBrakets == aParserStates.Count(), - "ParserStateStack unequal to bracket count" ); + DBG_ASSERT( + static_cast<size_t>(nOpenBrakets) == aParserStates.size(), + "ParserStateStack unequal to bracket count" ); nRet = nNextCh; } break; @@ -266,12 +263,11 @@ int SvRTFParser::_GetNextToken() --nOpenBrakets; if( 0 <= nOpenBrakets ) { - aParserStates.Remove( - sal::static_int_cast< USHORT >(nOpenBrakets) ); - if( aParserStates.Count() ) + aParserStates.pop(); + if( !aParserStates.empty() ) { const RtfParserState_Impl& rRPS = - aParserStates[ aParserStates.Count() - 1 ]; + aParserStates.top(); nUCharOverread = rRPS.nUCharOverread; SetSrcEncoding( rRPS.eCodeSet ); } @@ -281,8 +277,9 @@ int SvRTFParser::_GetNextToken() SetSrcEncoding( GetCodeSet() ); } } - DBG_ASSERT( nOpenBrakets == aParserStates.Count(), - "ParserStateStack unequal to bracket count" ); + DBG_ASSERT( + static_cast<size_t>(nOpenBrakets) == aParserStates.size(), + "ParserStateStack unequal to bracket count" ); nRet = nNextCh; break; @@ -690,8 +687,8 @@ void SvRTFParser::SetEncoding( rtl_TextEncoding eEnc ) if (eEnc == RTL_TEXTENCODING_DONTKNOW) eEnc = GetCodeSet(); - if (aParserStates.Count()) - aParserStates[aParserStates.Count() - 1].eCodeSet = eEnc; + if (!aParserStates.empty()) + aParserStates.top().eCodeSet = eEnc; SetSrcEncoding(eEnc); } diff --git a/svtools/source/svrtf/rtfkey2.cxx b/svtools/source/svrtf/rtfkey2.cxx deleted file mode 100644 index 03a7667f48e2..000000000000 --- a/svtools/source/svrtf/rtfkey2.cxx +++ /dev/null @@ -1,1159 +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. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_svtools.hxx" - -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */ - -#include "rtfkeywd.hxx" - -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HEXCHAR, "\\'" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_IGNORE, "\\*" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OPTHYPH, "\\-" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SUBENTRY, "\\:" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ABSH, "\\absh" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ABSW, "\\absw" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ALT, "\\alt" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ANNOTATION, "\\annotation" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ANSI, "\\ansi" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ATNID, "\\atnid" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AUTHOR, "\\author" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_B, "\\b" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BGBDIAG, "\\bgbdiag" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BGCROSS, "\\bgcross" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BGDCROSS, "\\bgdcross" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BGDKBDIAG, "\\bgdkbdiag" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BGDKCROSS, "\\bgdkcross" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BGDKDCROSS, "\\bgdkdcross" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BGDKFDIAG, "\\bgdkfdiag" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BGDKHORIZ, "\\bgdkhoriz" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BGDKVERT, "\\bgdkvert" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BGFDIAG, "\\bgfdiag" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BGHORIZ, "\\bghoriz" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BGVERT, "\\bgvert" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BIN, "\\bin" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BINFSXN, "\\binfsxn" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BINSXN, "\\binsxn" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BKMKCOLF, "\\bkmkcolf" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BKMKCOLL, "\\bkmkcoll" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BKMKEND, "\\bkmkend" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BKMKSTART, "\\bkmkstart" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BLUE, "\\blue" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BOX, "\\box" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRB, "\\brdrb" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRBAR, "\\brdrbar" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRBTW, "\\brdrbtw" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRCF, "\\brdrcf" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRDB, "\\brdrdb" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRDOT, "\\brdrdot" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRHAIR, "\\brdrhair" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRL, "\\brdrl" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRR, "\\brdrr" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRS, "\\brdrs" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRSH, "\\brdrsh" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRT, "\\brdrt" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRTH, "\\brdrth" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRW, "\\brdrw" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRSP, "\\brsp" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BULLET, "\\bullet" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BUPTIM, "\\buptim" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BXE, "\\bxe" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CAPS, "\\caps" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CB, "\\cb" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CBPAT, "\\cbpat" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CELL, "\\cell" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CELLX, "\\cellx" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CF, "\\cf" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CFPAT, "\\cfpat" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CHATN, "\\chatn" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CHDATE, "\\chdate" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CHDPA, "\\chdpa" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CHDPL, "\\chdpl" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CHFTN, "\\chftn" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CHFTNSEP, "\\chftnsep" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CHFTNSEPC, "\\chftnsepc" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CHPGN, "\\chpgn" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CHTIME, "\\chtime" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLBGBDIAG, "\\clbgbdiag" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLBGCROSS, "\\clbgcross" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLBGDCROSS, "\\clbgdcross" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLBGDKBDIAG, "\\clbgdkbdiag" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLBGDKCROSS, "\\clbgdkcross" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLBGDKDCROSS, "\\clbgdkdcross" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLBGDKFDIAG, "\\clbgdkfdiag" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLBGDKHOR, "\\clbgdkhor" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLBGDKVERT, "\\clbgdkvert" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLBGFDIAG, "\\clbgfdiag" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLBGHORIZ, "\\clbghoriz" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLBGVERT, "\\clbgvert" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLBRDRB, "\\clbrdrb" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLBRDRL, "\\clbrdrl" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLBRDRR, "\\clbrdrr" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLBRDRT, "\\clbrdrt" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLCBPAT, "\\clcbpat" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLCFPAT, "\\clcfpat" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLMGF, "\\clmgf" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLMRG, "\\clmrg" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLSHDNG, "\\clshdng" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_COLNO, "\\colno" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_COLORTBL, "\\colortbl" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_COLS, "\\cols" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_COLSR, "\\colsr" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_COLSX, "\\colsx" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_COLUMN, "\\column" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_COLW, "\\colw" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_COMMENT, "\\comment" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CREATIM, "\\creatim" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CTRL, "\\ctrl" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DEFF, "\\deff" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DEFFORMAT, "\\defformat" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DEFLANG, "\\deflang" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DEFTAB, "\\deftab" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DELETED, "\\deleted" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DFRMTXTX, "\\dfrmtxtx" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DFRMTXTY, "\\dfrmtxty" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DIBITMAP, "\\dibitmap" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DN, "\\dn" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DOCCOMM, "\\doccomm" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DOCTEMP, "\\doctemp" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DROPCAPLI, "\\dropcapli" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DROPCAPT, "\\dropcapt" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ABSNOOVRLP, "\\absnoovrlp" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DXFRTEXT, "\\dxfrtext" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DY, "\\dy" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_EDMINS, "\\edmins" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_EMDASH, "\\emdash" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ENDASH, "\\endash" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ENDDOC, "\\enddoc" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ENDNHERE, "\\endnhere" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ENDNOTES, "\\endnotes" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_EXPND, "\\expnd" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_EXPNDTW, "\\expndtw" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_F, "\\f" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FACINGP, "\\facingp" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FACPGSXN, "\\facpgsxn" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FALT, "\\falt" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FCHARSET, "\\fcharset" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FDECOR, "\\fdecor" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FI, "\\fi" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FIELD, "\\field" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FLDDIRTY, "\\flddirty" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FLDEDIT, "\\fldedit" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FLDINST, "\\fldinst" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FLDLOCK, "\\fldlock" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FLDPRIV, "\\fldpriv" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FLDRSLT, "\\fldrslt" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FMODERN, "\\fmodern" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FN, "\\fn" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FNIL, "\\fnil" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FONTTBL, "\\fonttbl" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FOOTER, "\\footer" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FOOTERF, "\\footerf" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FOOTERL, "\\footerl" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FOOTERR, "\\footerr" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FOOTERY, "\\footery" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FOOTNOTE, "\\footnote" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FPRQ, "\\fprq" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FRACWIDTH, "\\fracwidth" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FROMAN, "\\froman" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FS, "\\fs" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FSCRIPT, "\\fscript" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FSWISS, "\\fswiss" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTECH, "\\ftech" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNBJ, "\\ftnbj" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNCN, "\\ftncn" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNRESTART, "\\ftnrestart" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNSEP, "\\ftnsep" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNSEPC, "\\ftnsepc" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNSTART, "\\ftnstart" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNTJ, "\\ftntj" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_GREEN, "\\green" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_GUTTER, "\\gutter" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_GUTTERSXN, "\\guttersxn" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HEADER, "\\header" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HEADERF, "\\headerf" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HEADERL, "\\headerl" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HEADERR, "\\headerr" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HEADERY, "\\headery" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HR, "\\hr" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HYPHHOTZ, "\\hyphhotz" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_I, "\\i" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ID, "\\id" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_INFO, "\\info" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_INTBL, "\\intbl" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_IXE, "\\ixe" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_KEEP, "\\keep" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_KEEPN, "\\keepn" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_KERNING, "\\kerning" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_KEYCODE, "\\keycode" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_KEYWORDS, "\\keywords" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LANDSCAPE, "\\landscape" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LANG, "\\lang" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LDBLQUOTE, "\\ldblquote" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LEVEL, "\\level" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LI, "\\li" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LIN, "\\lin" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LINE, "\\line" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LINEBETCOL, "\\linebetcol" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LINECONT, "\\linecont" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LINEMOD, "\\linemod" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LINEPPAGE, "\\lineppage" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LINERESTART, "\\linerestart" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LINESTART, "\\linestart" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LINESTARTS, "\\linestarts" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LINEX, "\\linex" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LNDSCPSXN, "\\lndscpsxn" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LQUOTE, "\\lquote" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_MAC, "\\mac" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_MACPICT, "\\macpict" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_MAKEBACKUP, "\\makebackup" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_MARGB, "\\margb" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_MARGBSXN, "\\margbsxn" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_MARGL, "\\margl" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_MARGLSXN, "\\marglsxn" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_MARGMIRROR, "\\margmirror" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_MARGR, "\\margr" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_MARGRSXN, "\\margrsxn" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_MARGT, "\\margt" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_MARGTSXN, "\\margtsxn" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_MIN, "\\min" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_MO, "\\mo" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_NEXTCSET, "\\nextcset" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_NEXTFILE, "\\nextfile" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_NOFCHARS, "\\nofchars" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_NOFPAGES, "\\nofpages" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_NOFWORDS, "\\nofwords" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_NOLINE, "\\noline" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_NOSUPERSUB, "\\nosupersub" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_NOWRAP, "\\nowrap" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OPERATOR, "\\operator" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OUTL, "\\outl" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PAGE, "\\page" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PAGEBB, "\\pagebb" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PAPERH, "\\paperh" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PAPERW, "\\paperw" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PAR, "\\par" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PARD, "\\pard" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PC, "\\pc" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PCA, "\\pca" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGHSXN, "\\pghsxn" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNCONT, "\\pgncont" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNDEC, "\\pgndec" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNLCLTR, "\\pgnlcltr" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNLCRM, "\\pgnlcrm" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNRESTART, "\\pgnrestart" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNSTART, "\\pgnstart" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNSTARTS, "\\pgnstarts" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNUCLTR, "\\pgnucltr" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNUCRM, "\\pgnucrm" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNX, "\\pgnx" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNY, "\\pgny" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGWSXN, "\\pgwsxn" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PHCOL, "\\phcol" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PHMRG, "\\phmrg" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PHPG, "\\phpg" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PICCROPB, "\\piccropb" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PICCROPL, "\\piccropl" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PICCROPR, "\\piccropr" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PICCROPT, "\\piccropt" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PICH, "\\pich" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PICHGOAL, "\\pichgoal" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PICSCALED, "\\picscaled" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PICSCALEX, "\\picscalex" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PICSCALEY, "\\picscaley" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PICT, "\\pict" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PICW, "\\picw" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PICWGOAL, "\\picwgoal" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PLAIN, "\\plain" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PMMETAFILE, "\\pmmetafile" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_POSNEGX, "\\posnegx" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_POSNEGY, "\\posnegy" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_POSX, "\\posx" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_POSXC, "\\posxc" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_POSXI, "\\posxi" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_POSXL, "\\posxl" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_POSXO, "\\posxo" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_POSXR, "\\posxr" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_POSY, "\\posy" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_POSYB, "\\posyb" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_POSYC, "\\posyc" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_POSYIL, "\\posyil" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_POSYT, "\\posyt" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PRINTIM, "\\printim" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PSOVER, "\\psover" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PVMRG, "\\pvmrg" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PVPARA, "\\pvpara" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PVPG, "\\pvpg" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_QC, "\\qc" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_QJ, "\\qj" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_QL, "\\ql" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_QR, "\\qr" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_RDBLQUOTE, "\\rdblquote" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_RED, "\\red" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_REVBAR, "\\revbar" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_REVISED, "\\revised" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_REVISIONS, "\\revisions" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_REVPROP, "\\revprop" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_REVTIM, "\\revtim" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_RI, "\\ri" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_RIN, "\\rin" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ROW, "\\row" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_RQUOTE, "\\rquote" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_RTF, "\\rtf" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_RXE, "\\rxe" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_S, "\\s" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SA, "\\sa" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SB, "\\sb" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SBASEDON, "\\sbasedon" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SBKCOL, "\\sbkcol" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SBKEVEN, "\\sbkeven" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SBKNONE, "\\sbknone" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SBKODD, "\\sbkodd" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SBKPAGE, "\\sbkpage" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SBYS, "\\sbys" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SCAPS, "\\scaps" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SECT, "\\sect" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SECTD, "\\sectd" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHAD, "\\shad" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHADING, "\\shading" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHIFT, "\\shift" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SL, "\\sl" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SNEXT, "\\snext" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_STRIKE, "\\strike" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_STYLESHEET, "\\stylesheet" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SUB, "\\sub" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SUBJECT, "\\subject" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SUPER, "\\super" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TAB, "\\tab" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TB, "\\tb" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TC, "\\tc" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TCF, "\\tcf" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TCL, "\\tcl" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TEMPLATE, "\\template" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TITLE, "\\title" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TITLEPG, "\\titlepg" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TLDOT, "\\tldot" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TLEQ, "\\tleq" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TLHYPH, "\\tlhyph" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TLTH, "\\tlth" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TLUL, "\\tlul" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TQC, "\\tqc" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TQDEC, "\\tqdec" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TQR, "\\tqr" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TQL, "\\tql" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TRGAPH, "\\trgaph" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TRLEFT, "\\trleft" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TROWD, "\\trowd" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TRQC, "\\trqc" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TRQL, "\\trql" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TRQR, "\\trqr" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TRRH, "\\trrh" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TX, "\\tx" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TXE, "\\txe" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_UL, "\\ul" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ULD, "\\uld" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ULDB, "\\uldb" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ULNONE, "\\ulnone" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ULW, "\\ulw" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_UP, "\\up" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_V, "\\v" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_VERN, "\\vern" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_VERSION, "\\version" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_VERTALB, "\\vertalb" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_VERTALC, "\\vertalc" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_VERTALJ, "\\vertalj" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_VERTALT, "\\vertalt" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_WBITMAP, "\\wbitmap" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_WBMBITSPIXEL, "\\wbmbitspixel" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_WBMPLANES, "\\wbmplanes" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_WBMWIDTHBYTES, "\\wbmwidthbytes" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_WIDOWCTRL, "\\widowctrl" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_WMETAFILE, "\\wmetafile" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_XE, "\\xe" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_YR, "\\yr" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_NOBRKHYPH, "\\_" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FORMULA, "\\|" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_NOBREAK, "\\~" ); - - -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AB, "\\ab" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ACAPS, "\\acaps" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ACF, "\\acf" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ADDITIVE, "\\additive" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ADN, "\\adn" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AENDDOC, "\\aenddoc" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AENDNOTES, "\\aendnotes" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AEXPND, "\\aexpnd" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AF, "\\af" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFS, "\\afs" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNBJ, "\\aftnbj" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNCN, "\\aftncn" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNNALC, "\\aftnnalc" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNNAR, "\\aftnnar" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNNAUC, "\\aftnnauc" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNNCHI, "\\aftnnchi" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNNRLC, "\\aftnnrlc" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNNRUC, "\\aftnnruc" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNRESTART, "\\aftnrestart" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNRSTCONT, "\\aftnrstcont" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNSEP, "\\aftnsep" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNSEPC, "\\aftnsepc" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNSTART, "\\aftnstart" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNTJ, "\\aftntj" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AI, "\\ai" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ALANG, "\\alang" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ALLPROT, "\\allprot" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ANNOTPROT, "\\annotprot" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AOUTL, "\\aoutl" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ASCAPS, "\\ascaps" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ASHAD, "\\ashad" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ASTRIKE, "\\astrike" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ATNAUTHOR, "\\atnauthor" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ATNICN, "\\atnicn" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ATNREF, "\\atnref" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ATNTIME, "\\atntime" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ATRFEND, "\\atrfend" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ATRFSTART, "\\atrfstart" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AUL, "\\aul" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AULD, "\\auld" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AULDB, "\\auldb" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AULNONE, "\\aulnone" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AULW, "\\aulw" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AUP, "\\aup" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BKMKPUB, "\\bkmkpub" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRDASH, "\\brdrdash" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRKFRM, "\\brkfrm" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CCHS, "\\cchs" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CPG, "\\cpg" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CS, "\\cs" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CVMME, "\\cvmme" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DATAFIELD, "\\datafield" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DO, "\\do" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DOBXCOLUMN, "\\dobxcolumn" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DOBXMARGIN, "\\dobxmargin" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DOBXPAGE, "\\dobxpage" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DOBYMARGIN, "\\dobymargin" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DOBYPAGE, "\\dobypage" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DOBYPARA, "\\dobypara" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DODHGT, "\\dodhgt" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DOLOCK, "\\dolock" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPAENDHOL, "\\dpaendhol" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPAENDL, "\\dpaendl" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPAENDSOL, "\\dpaendsol" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPAENDW, "\\dpaendw" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPARC, "\\dparc" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPARCFLIPX, "\\dparcflipx" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPARCFLIPY, "\\dparcflipy" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPASTARTHOL, "\\dpastarthol" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPASTARTL, "\\dpastartl" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPASTARTSOL, "\\dpastartsol" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPASTARTW, "\\dpastartw" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPCALLOUT, "\\dpcallout" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPCOA, "\\dpcoa" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPCOACCENT, "\\dpcoaccent" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPCOBESTFIT, "\\dpcobestfit" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPCOBORDER, "\\dpcoborder" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPCODABS, "\\dpcodabs" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPCODBOTTOM, "\\dpcodbottom" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPCODCENTER, "\\dpcodcenter" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPCODTOP, "\\dpcodtop" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPCOLENGTH, "\\dpcolength" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPCOMINUSX, "\\dpcominusx" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPCOMINUSY, "\\dpcominusy" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPCOOFFSET, "\\dpcooffset" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPCOSMARTA, "\\dpcosmarta" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPCOTDOUBLE, "\\dpcotdouble" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPCOTRIGHT, "\\dpcotright" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPCOTSINGLE, "\\dpcotsingle" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPCOTTRIPLE, "\\dpcottriple" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPCOUNT, "\\dpcount" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPELLIPSE, "\\dpellipse" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPENDGROUP, "\\dpendgroup" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPFILLBGCB, "\\dpfillbgcb" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPFILLBGCG, "\\dpfillbgcg" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPFILLBGCR, "\\dpfillbgcr" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPFILLBGGRAY, "\\dpfillbggray" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPFILLBGPAL, "\\dpfillbgpal" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPFILLFGCB, "\\dpfillfgcb" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPFILLFGCG, "\\dpfillfgcg" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPFILLFGCR, "\\dpfillfgcr" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPFILLFGGRAY, "\\dpfillfggray" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPFILLFGPAL, "\\dpfillfgpal" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPFILLPAT, "\\dpfillpat" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPGROUP, "\\dpgroup" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPLINE, "\\dpline" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPLINECOB, "\\dplinecob" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPLINECOG, "\\dplinecog" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPLINECOR, "\\dplinecor" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPLINEDADO, "\\dplinedado" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPLINEDADODO, "\\dplinedadodo" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPLINEDASH, "\\dplinedash" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPLINEDOT, "\\dplinedot" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPLINEGRAY, "\\dplinegray" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPLINEHOLLOW, "\\dplinehollow" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPLINEPAL, "\\dplinepal" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPLINESOLID, "\\dplinesolid" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPLINEW, "\\dplinew" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPPOLYCOUNT, "\\dppolycount" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPPOLYGON, "\\dppolygon" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPPOLYLINE, "\\dppolyline" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPPTX, "\\dpptx" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPPTY, "\\dppty" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPRECT, "\\dprect" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPROUNDR, "\\dproundr" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPSHADOW, "\\dpshadow" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPSHADX, "\\dpshadx" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPSHADY, "\\dpshady" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPTXBX, "\\dptxbx" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPTXBXMAR, "\\dptxbxmar" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPTXBXTEXT, "\\dptxbxtext" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPX, "\\dpx" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPXSIZE, "\\dpxsize" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPY, "\\dpy" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPYSIZE, "\\dpysize" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DS, "\\ds" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_EMSPACE, "\\emspace" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ENSPACE, "\\enspace" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FBIDI, "\\fbidi" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FET, "\\fet" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FID, "\\fid" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FILE, "\\file" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FILETBL, "\\filetbl" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FLDALT, "\\fldalt" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FNETWORK, "\\fnetwork" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FONTEMB, "\\fontemb" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FONTFILE, "\\fontfile" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FORMDISP, "\\formdisp" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FORMPROT, "\\formprot" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FORMSHADE, "\\formshade" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FOSNUM, "\\fosnum" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FRELATIVE, "\\frelative" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNALT, "\\ftnalt" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNIL, "\\ftnil" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNNALC, "\\ftnnalc" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNNAR, "\\ftnnar" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNNAUC, "\\ftnnauc" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNNCHI, "\\ftnnchi" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNNRLC, "\\ftnnrlc" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNNRUC, "\\ftnnruc" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNRSTCONT, "\\ftnrstcont" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNRSTPG, "\\ftnrstpg" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTTRUETYPE, "\\fttruetype" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FVALIDDOS, "\\fvaliddos" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FVALIDHPFS, "\\fvalidhpfs" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FVALIDMAC, "\\fvalidmac" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FVALIDNTFS, "\\fvalidntfs" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HYPHAUTO, "\\hyphauto" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HYPHCAPS, "\\hyphcaps" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HYPHCONSEC, "\\hyphconsec" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HYPHPAR, "\\hyphpar" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LINKSELF, "\\linkself" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LINKSTYLES, "\\linkstyles" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LTRCH, "\\ltrch" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LTRDOC, "\\ltrdoc" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LTRMARK, "\\ltrmark" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LTRPAR, "\\ltrpar" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LTRROW, "\\ltrrow" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LTRSECT, "\\ltrsect" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_NOCOLBAL, "\\nocolbal" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_NOEXTRASPRL, "\\noextrasprl" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_NOTABIND, "\\notabind" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_NOWIDCTLPAR, "\\nowidctlpar" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJALIAS, "\\objalias" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJALIGN, "\\objalign" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJAUTLINK, "\\objautlink" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJCLASS, "\\objclass" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJCROPB, "\\objcropb" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJCROPL, "\\objcropl" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJCROPR, "\\objcropr" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJCROPT, "\\objcropt" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJDATA, "\\objdata" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJECT, "\\object" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJEMB, "\\objemb" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJH, "\\objh" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJICEMB, "\\objicemb" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJLINK, "\\objlink" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJLOCK, "\\objlock" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJNAME, "\\objname" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJPUB, "\\objpub" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJSCALEX, "\\objscalex" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJSCALEY, "\\objscaley" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJSECT, "\\objsect" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJSETSIZE, "\\objsetsize" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJSUB, "\\objsub" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJTIME, "\\objtime" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJTRANSY, "\\objtransy" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJUPDATE, "\\objupdate" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJW, "\\objw" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OTBLRUL, "\\otblrul" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNHN, "\\pgnhn" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNHNSC, "\\pgnhnsc" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNHNSH, "\\pgnhnsh" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNHNSM, "\\pgnhnsm" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNHNSN, "\\pgnhnsn" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNHNSP, "\\pgnhnsp" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PICBMP, "\\picbmp" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PICBPP, "\\picbpp" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PN, "\\pn" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNACROSS, "\\pnacross" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNB, "\\pnb" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNCAPS, "\\pncaps" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNCARD, "\\pncard" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNCF, "\\pncf" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNDEC, "\\pndec" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNF, "\\pnf" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNFS, "\\pnfs" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNHANG, "\\pnhang" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNI, "\\pni" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNINDENT, "\\pnindent" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNLCLTR, "\\pnlcltr" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNLCRM, "\\pnlcrm" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNLVL, "\\pnlvl" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNLVLBLT, "\\pnlvlblt" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNLVLBODY, "\\pnlvlbody" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNLVLCONT, "\\pnlvlcont" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNNUMONCE, "\\pnnumonce" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNORD, "\\pnord" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNORDT, "\\pnordt" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNPREV, "\\pnprev" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNQC, "\\pnqc" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNQL, "\\pnql" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNQR, "\\pnqr" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNRESTART, "\\pnrestart" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNSCAPS, "\\pnscaps" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNSECLVL, "\\pnseclvl" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNSP, "\\pnsp" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNSTART, "\\pnstart" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNSTRIKE, "\\pnstrike" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNTEXT, "\\pntext" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNTXTA, "\\pntxta" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNTXTB, "\\pntxtb" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNUCLTR, "\\pnucltr" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNUCRM, "\\pnucrm" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNUL, "\\pnul" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNULD, "\\pnuld" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNULDB, "\\pnuldb" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNULNONE, "\\pnulnone" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNULW, "\\pnulw" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PRCOLBL, "\\prcolbl" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PRINTDATA, "\\printdata" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PSZ, "\\psz" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PUBAUTO, "\\pubauto" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_RESULT, "\\result" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_REVAUTH, "\\revauth" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_REVDTTM, "\\revdttm" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_REVPROT, "\\revprot" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_REVTBL, "\\revtbl" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_RSLTBMP, "\\rsltbmp" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_RSLTMERGE, "\\rsltmerge" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_RSLTPICT, "\\rsltpict" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_RSLTRTF, "\\rsltrtf" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_RSLTTXT, "\\rslttxt" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_RTLCH, "\\rtlch" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_RTLDOC, "\\rtldoc" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_RTLMARK, "\\rtlmark" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_RTLPAR, "\\rtlpar" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_RTLROW, "\\rtlrow" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_RTLSECT, "\\rtlsect" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SEC, "\\sec" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SECTNUM, "\\sectnum" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SECTUNLOCKED, "\\sectunlocked" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SLMULT, "\\slmult" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SOFTCOL, "\\softcol" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SOFTLHEIGHT, "\\softlheight" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SOFTLINE, "\\softline" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SOFTPAGE, "\\softpage" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SPRSSPBF, "\\sprsspbf" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SPRSTSP, "\\sprstsp" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SUBDOCUMENT, "\\subdocument" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SWPBDR, "\\swpbdr" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TCN, "\\tcn" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TRANSMF, "\\transmf" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TRBRDRB, "\\trbrdrb" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TRBRDRH, "\\trbrdrh" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TRBRDRL, "\\trbrdrl" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TRBRDRR, "\\trbrdrr" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TRBRDRT, "\\trbrdrt" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TRBRDRV, "\\trbrdrv" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TRHDR, "\\trhdr" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TRKEEP, "\\trkeep" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TRPADDB, "\\trpaddb" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TRPADDL, "\\trpaddl" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TRPADDR, "\\trpaddr" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TRPADDT, "\\trpaddt" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TRPADDFB, "\\trpaddfb" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TRPADDFL, "\\trpaddfl" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TRPADDFR, "\\trpaddfr" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TRPADDFT, "\\trpaddft" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_WRAPTRSP, "\\wraptrsp" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_XEF, "\\xef" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ZWJ, "\\zwj" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ZWNJ, "\\zwnj" ); - -// neue Tokens zur 1.5 -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ABSLOCK, "\\abslock" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ADJUSTRIGHT, "\\adjustright" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNNCHOSUNG, "\\aftnnchosung" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNNCNUM, "\\aftnncnum" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNNDBAR, "\\aftnndbar" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNNDBNUM, "\\aftnndbnum" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNNDBNUMD, "\\aftnndbnumd" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNNDBNUMK, "\\aftnndbnumk" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNNDBNUMT, "\\aftnndbnumt" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNNGANADA, "\\aftnnganada" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNNGBNUM, "\\aftnngbnum" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNNGBNUMD, "\\aftnngbnumd" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNNGBNUMK, "\\aftnngbnumk" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNNGBNUML, "\\aftnngbnuml" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNNZODIAC, "\\aftnnzodiac" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNNZODIACD, "\\aftnnzodiacd" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_AFTNNZODIACL, "\\aftnnzodiacl" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ANIMTEXT, "\\animtext" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ANSICPG, "\\ansicpg" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BACKGROUND, "\\background" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BDBFHDR, "\\bdbfhdr" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BLIPTAG, "\\bliptag" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BLIPUID, "\\blipuid" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BLIPUPI, "\\blipupi" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRART, "\\brdrart" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRDASHD, "\\brdrdashd" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRDASHDD, "\\brdrdashdd" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRDASHDOTSTR, "\\brdrdashdotstr" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRDASHSM, "\\brdrdashsm" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDREMBOSS, "\\brdremboss" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRENGRAVE, "\\brdrengrave" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRFRAME, "\\brdrframe" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRTHTNLG, "\\brdrthtnlg" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRTHTNMG, "\\brdrthtnmg" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRTHTNSG, "\\brdrthtnsg" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRTNTHLG, "\\brdrtnthlg" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRTNTHMG, "\\brdrtnthmg" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRTNTHSG, "\\brdrtnthsg" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRTNTHTNLG, "\\brdrtnthtnlg" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRTNTHTNMG, "\\brdrtnthtnmg" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRTNTHTNSG, "\\brdrtnthtnsg" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRTRIPLE, "\\brdrtriple" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRWAVY, "\\brdrwavy" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDRWAVYDB, "\\brdrwavydb" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CATEGORY, "\\category" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CGRID, "\\cgrid" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CHARSCALEX, "\\charscalex" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CHBGBDIAG, "\\chbgbdiag" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CHBGCROSS, "\\chbgcross" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CHBGDCROSS, "\\chbgdcross" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CHBGDKBDIAG, "\\chbgdkbdiag" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CHBGDKCROSS, "\\chbgdkcross" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CHBGDKDCROSS, "\\chbgdkdcross" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CHBGDKFDIAG, "\\chbgdkfdiag" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CHBGDKHORIZ, "\\chbgdkhoriz" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CHBGDKVERT, "\\chbgdkvert" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CHBGFDIAG, "\\chbgfdiag" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CHBGHORIZ, "\\chbghoriz" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CHBGVERT, "\\chbgvert" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CHBRDR, "\\chbrdr" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CHCBPAT, "\\chcbpat" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CHCFPAT, "\\chcfpat" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CHSHDNG, "\\chshdng" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLPADL, "\\clpadl" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLPADT, "\\clpadt" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLPADB, "\\clpadb" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLPADR, "\\clpadr" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLPADFL, "\\clpadfl" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLPADFT, "\\clpadft" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLPADFB, "\\clpadfb" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLPADFR, "\\clpadfr" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLTXLRTB, "\\cltxlrtb" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLTXTBRL, "\\cltxtbrl" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLVERTALB, "\\clvertalb" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLVERTALC, "\\clvertalc" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLVERTALT, "\\clvertalt" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLVMGF, "\\clvmgf" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLVMRG, "\\clvmrg" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLTXTBRLV, "\\cltxtbrlv" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLTXBTLR, "\\cltxbtlr" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CLTXLRTBV, "\\cltxlrtbv" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_COMPANY, "\\company" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CRAUTH, "\\crauth" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_CRDATE, "\\crdate" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DATE, "\\date" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DEFLANGFE, "\\deflangfe" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DFRAUTH, "\\dfrauth" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DFRDATE, "\\dfrdate" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DFRSTART, "\\dfrstart" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DFRSTOP, "\\dfrstop" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DFRXST, "\\dfrxst" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DGMARGIN, "\\dgmargin" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DNTBLNSBDB, "\\dntblnsbdb" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DOCTYPE, "\\doctype" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DOCVAR, "\\docvar" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DPCODESCENT, "\\dpcodescent" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_EMBO, "\\embo" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_EMFBLIP, "\\emfblip" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_EXPSHRTN, "\\expshrtn" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FAAUTO, "\\faauto" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FBIAS, "\\fbias" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FFDEFRES, "\\ffdefres" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FFDEFTEXT, "\\ffdeftext" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FFENTRYMCR, "\\ffentrymcr" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FFEXITMCR, "\\ffexitmcr" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FFFORMAT, "\\ffformat" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FFHASLISTBOX, "\\ffhaslistbox" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FFHELPTEXT, "\\ffhelptext" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FFHPS, "\\ffhps" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FFL, "\\ffl" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FFMAXLEN, "\\ffmaxlen" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FFNAME, "\\ffname" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FFOWNHELP, "\\ffownhelp" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FFOWNSTAT, "\\ffownstat" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FFPROT, "\\ffprot" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FFRECALC, "\\ffrecalc" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FFRES, "\\ffres" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FFSIZE, "\\ffsize" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FFSTATTEXT, "\\ffstattext" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FFTYPE, "\\fftype" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FFTYPETXT, "\\fftypetxt" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FLDTYPE, "\\fldtype" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FNAME, "\\fname" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FORMFIELD, "\\formfield" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FROMTEXT, "\\fromtext" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNNCHOSUNG, "\\ftnnchosung" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNNCNUM, "\\ftnncnum" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNNDBAR, "\\ftnndbar" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNNDBNUM, "\\ftnndbnum" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNNDBNUMD, "\\ftnndbnumd" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNNDBNUMK, "\\ftnndbnumk" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNNDBNUMT, "\\ftnndbnumt" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNNGANADA, "\\ftnnganada" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNNGBNUM, "\\ftnngbnum" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNNGBNUMD, "\\ftnngbnumd" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNNGBNUMK, "\\ftnngbnumk" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNNGBNUML, "\\ftnngbnuml" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNNZODIAC, "\\ftnnzodiac" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNNZODIACD, "\\ftnnzodiacd" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FTNNZODIACL, "\\ftnnzodiacl" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_G, "\\g" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_GCW, "\\gcw" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_GRIDTBL, "\\gridtbl" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HIGHLIGHT, "\\highlight" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HLFR, "\\hlfr" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HLINKBASE, "\\hlinkbase" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HLLOC, "\\hlloc" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HLSRC, "\\hlsrc" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ILVL, "\\ilvl" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_IMPR, "\\impr" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_JPEGBLIP, "\\jpegblip" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LEVELFOLLOW, "\\levelfollow" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LEVELINDENT, "\\levelindent" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LEVELJC, "\\leveljc" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LEVELLEGAL, "\\levellegal" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LEVELNFC, "\\levelnfc" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LEVELNORESTART, "\\levelnorestart" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LEVELNUMBERS, "\\levelnumbers" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LEVELOLD, "\\levelold" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LEVELPREV, "\\levelprev" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LEVELPREVSPACE, "\\levelprevspace" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LEVELSPACE, "\\levelspace" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LEVELSTARTAT, "\\levelstartat" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LEVELTEXT, "\\leveltext" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LINKVAL, "\\linkval" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LIST, "\\list" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LISTID, "\\listid" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LISTLEVEL, "\\listlevel" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LISTNAME, "\\listname" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LISTOVERRIDE, "\\listoverride" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LISTOVERRIDECOUNT, "\\listoverridecount" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LISTOVERRIDEFORMAT, "\\listoverrideformat" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LISTOVERRIDESTART, "\\listoverridestart" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LISTOVERRIDETABLE, "\\listoverridetable" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LISTRESTARTHDN, "\\listrestarthdn" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LISTSIMPLE, "\\listsimple" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LISTTABLE, "\\listtable" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LISTTEMPLATEID, "\\listtemplateid" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LISTTEXT, "\\listtext" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LS, "\\ls" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LYTEXCTTP, "\\lytexcttp" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LYTPRTMET, "\\lytprtmet" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_MANAGER, "\\manager" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_MSMCAP, "\\msmcap" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_NOFCHARSWS, "\\nofcharsws" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_NOLEAD, "\\nolead" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_NONSHPPICT, "\\nonshppict" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_NOSECTEXPAND, "\\nosectexpand" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_NOSNAPLINEGRID, "\\nosnaplinegrid" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_NOSPACEFORUL, "\\nospaceforul" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_NOULTRLSPC, "\\noultrlspc" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_NOXLATTOYEN, "\\noxlattoyen" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJATTPH, "\\objattph" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJHTML, "\\objhtml" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OBJOCX, "\\objocx" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OLDLINEWRAP, "\\oldlinewrap" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OUTLINELEVEL, "\\outlinelevel" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OVERLAY, "\\overlay" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PANOSE, "\\panose" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGBRDRB, "\\pgbrdrb" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGBRDRFOOT, "\\pgbrdrfoot" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGBRDRHEAD, "\\pgbrdrhead" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGBRDRL, "\\pgbrdrl" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGBRDROPT, "\\pgbrdropt" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGBRDRR, "\\pgbrdrr" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGBRDRSNAP, "\\pgbrdrsnap" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGBRDRT, "\\pgbrdrt" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNCHOSUNG, "\\pgnchosung" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNCNUM, "\\pgncnum" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNDBNUMK, "\\pgndbnumk" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNDBNUMT, "\\pgndbnumt" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNGANADA, "\\pgnganada" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNGBNUM, "\\pgngbnum" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNGBNUMD, "\\pgngbnumd" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNGBNUMK, "\\pgngbnumk" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNGBNUML, "\\pgngbnuml" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNZODIAC, "\\pgnzodiac" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNZODIACD, "\\pgnzodiacd" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGNZODIACL, "\\pgnzodiacl" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PICPROP, "\\picprop" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNAIUEO, "\\pnaiueo" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNAIUEOD, "\\pnaiueod" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNCHOSUNG, "\\pnchosung" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNDBNUMD, "\\pndbnumd" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNDBNUMK, "\\pndbnumk" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNDBNUML, "\\pndbnuml" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNDBNUMT, "\\pndbnumt" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNGANADA, "\\pnganada" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNGBLIP, "\\pngblip" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNGBNUM, "\\pngbnum" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNGBNUMD, "\\pngbnumd" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNGBNUMK, "\\pngbnumk" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNGBNUML, "\\pngbnuml" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNRAUTH, "\\pnrauth" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNRDATE, "\\pnrdate" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNRNFC, "\\pnrnfc" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNRNOT, "\\pnrnot" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNRPNBR, "\\pnrpnbr" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNRRGB, "\\pnrrgb" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNRSTART, "\\pnrstart" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNRSTOP, "\\pnrstop" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNRXST, "\\pnrxst" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNZODIAC, "\\pnzodiac" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNZODIACD, "\\pnzodiacd" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PNZODIACL, "\\pnzodiacl" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LFOLEVEL, "\\lfolevel" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_POSYIN, "\\posyin" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_POSYOUT, "\\posyout" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PRIVATE, "\\private" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PROPNAME, "\\propname" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PROPTYPE, "\\proptype" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_REVAUTHDEL, "\\revauthdel" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_REVDTTMDEL, "\\revdttmdel" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SAUTOUPD, "\\sautoupd" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SECTDEFAULTCL, "\\sectdefaultcl" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SECTEXPAND, "\\sectexpand" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SECTLINEGRID, "\\sectlinegrid" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SECTSPECIFYCL, "\\sectspecifycl" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SECTSPECIFYL, "\\sectspecifyl" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHIDDEN, "\\shidden" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHPBOTTOM, "\\shpbottom" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHPBXCOLUMN, "\\shpbxcolumn" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHPBXMARGIN, "\\shpbxmargin" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHPBXPAGE, "\\shpbxpage" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHPBYMARGIN, "\\shpbymargin" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHPBYPAGE, "\\shpbypage" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHPBYPARA, "\\shpbypara" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHPFBLWTXT, "\\shpfblwtxt" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHPFHDR, "\\shpfhdr" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHPGRP, "\\shpgrp" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHPLEFT, "\\shpleft" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHPLID, "\\shplid" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHPLOCKANCHOR, "\\shplockanchor" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHPPICT, "\\shppict" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHPRIGHT, "\\shpright" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHPRSLT, "\\shprslt" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHPTOP, "\\shptop" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHPTXT, "\\shptxt" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHPWRK, "\\shpwrk" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHPWR, "\\shpwr" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHPZ, "\\shpz" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SPRSBSP, "\\sprsbsp" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SPRSLNSP, "\\sprslnsp" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SPRSTSM, "\\sprstsm" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_STATICVAL, "\\staticval" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_STEXTFLOW, "\\stextflow" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_STRIKED, "\\striked" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SUBFONTBYSIZE, "\\subfontbysize" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TCELLD, "\\tcelld" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TIME, "\\time" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TRUNCATEFONTHEIGHT, "\\truncatefontheight" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_UC, "\\uc" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_UD, "\\ud" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ULDASH, "\\uldash" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ULDASHD, "\\uldashd" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ULDASHDD, "\\uldashdd" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ULTH, "\\ulth" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ULWAVE, "\\ulwave" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ULC, "\\ulc" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_U, "\\u" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_UPR, "\\upr" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_USERPROPS, "\\userprops" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_VIEWKIND, "\\viewkind" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_VIEWSCALE, "\\viewscale" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_VIEWZK, "\\viewzk" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_WIDCTLPAR, "\\widctlpar" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_WINDOWCAPTION, "\\windowcaption" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_WPEQN, "\\wpeqn" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_WPJST, "\\wpjst" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_WPSP, "\\wpsp" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_YXE, "\\yxe" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FRMTXLRTB, "\\frmtxlrtb" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FRMTXTBRL, "\\frmtxtbrl" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FRMTXBTLR, "\\frmtxbtlr" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FRMTXLRTBV, "\\frmtxlrtbv" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FRMTXTBRLV, "\\frmtxtbrlv" ); - -// MS-2000 Tokens -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ULTHD, "\\ulthd" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ULTHDASH, "\\ulthdash" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ULLDASH, "\\ulldash" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ULTHLDASH, "\\ulthldash" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ULTHDASHD, "\\ulthdashd" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ULTHDASHDD, "\\ulthdashdd" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ULHWAVE, "\\ulhwave" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ULULDBWAVE, "\\ululdbwave" ); - -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LOCH, "\\loch" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HICH, "\\hich" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DBCH, "\\dbch" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_LANGFE, "\\langfe" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ADEFLANG, "\\adeflang" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ADEFF, "\\adeff" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ACCNONE, "\\accnone" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ACCDOT, "\\accdot" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ACCCOMMA, "\\acccomma" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TWOINONE, "\\twoinone" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HORZVERT, "\\horzvert" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FAHANG, "\\fahang" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FAVAR, "\\favar" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FACENTER, "\\facenter" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FAROMAN, "\\faroman" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FAFIXED, "\\fafixed" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_NOCWRAP, "\\nocwrap" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_NOOVERFLOW,"\\nooverflow" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_ASPALPHA, "\\aspalpha" ); - -// SWG spezifische Attribute -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_GRFALIGNV, "\\grfalignv" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_GRFALIGNH, "\\grfalignh" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_GRFMIRROR, "\\grfmirror" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HEADERYB, "\\headeryb" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HEADERXL, "\\headerxl" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HEADERXR, "\\headerxr" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FOOTERYT, "\\footeryt" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FOOTERXL, "\\footerxl" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FOOTERXR, "\\footerxr" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HEADERYH, "\\headeryh" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FOOTERYH, "\\footeryh" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BALANCEDCOLUMN, "\\swcolmnblnc" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_UPDNPROP, "\\updnprop" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PRTDATA, "\\prtdata" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BKMKKEY, "\\bkmkkey" ); - -// Attribute fuer die freifliegenden Rahmen -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FLYPRINT, "\\flyprint" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FLYOPAQUE, "\\flyopaque" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FLYPRTCTD, "\\flyprtctd" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FLYMAINCNT, "\\flymaincnt" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FLYVERT, "\\flyvert" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FLYHORZ, "\\flyhorz" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DFRMTXTL, "\\dfrmtxtl" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DFRMTXTR, "\\dfrmtxtr" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DFRMTXTU, "\\dfrmtxtu" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_DFRMTXTW, "\\dfrmtxtw" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FLYANCHOR, "\\flyanchor" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FLYCNTNT, "\\flycntnt" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FLYCOLUMN, "\\flycolumn" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FLYPAGE, "\\flypage" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_FLYINPARA, "\\flyinpara" ); - -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDBOX, "\\brdbox" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDLNCOL, "\\brdlncol" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDLNIN, "\\brdlnin" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDLNOUT, "\\brdlnout" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_BRDLNDIST, "\\brdlndist" ); - -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHADOW, "\\shadow" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHDWDIST, "\\shdwdist" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHDWSTYLE, "\\shdwstyle" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHDWCOL, "\\shdwcol" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHDWFCOL, "\\shdwfcol" ); - - -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGDSCTBL, "\\pgdsctbl" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGDSC, "\\pgdsc" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGDSCUSE, "\\pgdscuse" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGDSCNXT, "\\pgdscnxt" ); - -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HYPHEN, "\\hyphen" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HYPHLEAD, "\\hyphlead" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HYPHTRAIL, "\\hyphtrail" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_HYPHMAX, "\\hyphmax" ); - -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_TLSWG, "\\tlswg" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGBRK, "\\pgbrk" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_PGDSCNO, "\\pgdscno" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SOUTLVL, "\\soutlvl" ); - -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHP, "\\shp" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SN, "\\sn" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SV, "\\sv" ); -/* -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHPLEFT, "\\shpleft" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHPTOP, "\\shptop" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHPBOTTOM, "\\shpbottom" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_SHPRIGHT, "\\shpright" ); -*/ - -// Support for overline attributes -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OL, "\\ol" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OLD, "\\old" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OLDB, "\\oldb" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OLNONE, "\\olnone" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OLW, "\\olw" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OLDASH, "\\oldash" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OLDASHD, "\\oldashd" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OLDASHDD, "\\oldashdd" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OLTH, "\\olth" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OLWAVE, "\\olwave" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OLC, "\\olc" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OLTHD, "\\olthd" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OLTHDASH, "\\olthdash" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OLLDASH, "\\olldash" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OLTHLDASH, "\\olthldash" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OLTHDASHD, "\\olthdashd" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OLTHDASHDD, "\\olthdashdd" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OLHWAVE, "\\olhwave" ); -sal_Char const SVTOOLS_CONSTASCII_DEF( sRTF_OLOLDBWAVE, "\\ololdbwave" ); - -/* vi:set tabstop=4 shiftwidth=4 expandtab: */ diff --git a/svtools/source/svrtf/rtfkeywd.cxx b/svtools/source/svrtf/rtfkeywd.cxx index 27ce3643f8cf..7422961c6881 100644 --- a/svtools/source/svrtf/rtfkeywd.cxx +++ b/svtools/source/svrtf/rtfkeywd.cxx @@ -30,8 +30,8 @@ /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */ -#include "rtfkeywd.hxx" -#include "rtftoken.h" +#include <svtools/rtfkeywd.hxx> +#include <svtools/rtftoken.h> #include "tools/string.hxx" #include <string.h> @@ -1160,6 +1160,7 @@ static RTF_TokenEntry __FAR_DATA aRTFTokenTab[] = { */ {{OOO_STRING_SVTOOLS_RTF_SN}, RTF_SN}, {{OOO_STRING_SVTOOLS_RTF_SV}, RTF_SV}, + {{OOO_STRING_SVTOOLS_RTF_SP}, RTF_SP}, // Support for overline attributes {{OOO_STRING_SVTOOLS_RTF_OL}, RTF_OL}, diff --git a/svtools/source/svrtf/rtfout.cxx b/svtools/source/svrtf/rtfout.cxx index d97e838d2450..670abfaf4b0c 100644 --- a/svtools/source/svrtf/rtfout.cxx +++ b/svtools/source/svrtf/rtfout.cxx @@ -32,8 +32,8 @@ #include <tools/string.hxx> #include <rtl/string.hxx> #include <rtl/ustrbuf.hxx> -#include <rtfkeywd.hxx> -#include <rtfout.hxx> +#include <svtools/rtfkeywd.hxx> +#include <svtools/rtfout.hxx> using namespace rtl; diff --git a/svtools/source/table/defaultinputhandler.cxx b/svtools/source/table/defaultinputhandler.cxx index ad8f7a7562d3..f6a58ad17efe 100644 --- a/svtools/source/table/defaultinputhandler.cxx +++ b/svtools/source/table/defaultinputhandler.cxx @@ -173,6 +173,7 @@ namespace svt { namespace table if ( ( pActions->nKeyCode == nKeyCode ) && ( pActions->nKeyModifier == rKeyCode.GetAllModifier() ) ) { bHandled = _rControl.dispatchAction( pActions->eAction ); + bHandled = true; // always handled issue #i114340 break; } } diff --git a/svtools/source/table/gridtablerenderer.cxx b/svtools/source/table/gridtablerenderer.cxx index a3f954e0bef5..8e5bd181a583 100644 --- a/svtools/source/table/gridtablerenderer.cxx +++ b/svtools/source/table/gridtablerenderer.cxx @@ -109,7 +109,10 @@ namespace svt { namespace table DBG_ASSERT( !!pColumn, "GridTableRenderer::PaintColumnHeader: invalid column model object!" ); if ( !!pColumn ) sHeaderText = pColumn->getName(); - _rDevice.SetTextColor(m_pImpl->rModel.getTextColor()); + if(m_pImpl->rModel.getTextColor() != 0x000000) + _rDevice.SetTextColor(m_pImpl->rModel.getTextColor()); + else + _rDevice.SetTextColor(_rStyle.GetFieldTextColor()); ULONG nHorFlag = TEXT_DRAW_LEFT; ULONG nVerFlag = TEXT_DRAW_TOP; if(m_pImpl->rModel.getVerticalAlign() == 1) @@ -146,6 +149,11 @@ namespace svt { namespace table Color aRowBackground = m_pImpl->rModel.getOddRowBackgroundColor(); Color line = m_pImpl->rModel.getLineColor(); Color aRowBackground2 = m_pImpl->rModel.getEvenRowBackgroundColor(); + Color fieldColor = _rStyle.GetFieldColor(); + if(aRowBackground == 0xFFFFFF) + aRowBackground = fieldColor; + if(aRowBackground2 == 0xFFFFFF) + aRowBackground2 = fieldColor; //if row is selected background color becomes blue, and lines should be also blue //if they aren't user defined if(_bSelected) @@ -161,7 +169,7 @@ namespace svt { namespace table //and set line color to be the same else { - if(aRowBackground2 != 0xFFFFFF && _nRow%2) + if(aRowBackground2 != fieldColor && _nRow%2) { aRowBackground = aRowBackground2; if(line == 0xFFFFFF) @@ -170,7 +178,7 @@ namespace svt { namespace table _rDevice.SetLineColor(line); } //fill the rows with alternating background colors if second background color is specified - else if(aRowBackground != 0xFFFFFF && line == 0xFFFFFF) + else if(aRowBackground != fieldColor && line == 0xFFFFFF) _rDevice.SetLineColor(aRowBackground); else { @@ -195,7 +203,10 @@ namespace svt { namespace table _rDevice.Push( PUSH_LINECOLOR); _rDevice.SetLineColor(_rStyle.GetSeparatorColor()); _rDevice.DrawLine( _rArea.BottomLeft(), _rArea.BottomRight() ); - _rDevice.SetTextColor(m_pImpl->rModel.getTextColor()); + if(m_pImpl->rModel.getTextColor() != 0x000000) + _rDevice.SetTextColor(m_pImpl->rModel.getTextColor()); + else + _rDevice.SetTextColor(_rStyle.GetFieldTextColor()); ULONG nHorFlag = TEXT_DRAW_LEFT; ULONG nVerFlag = TEXT_DRAW_TOP; if(m_pImpl->rModel.getVerticalAlign() == 1) @@ -221,44 +232,42 @@ namespace svt { namespace table void GridTableRenderer::PaintCellImage( ColPos _nColumn, bool _bSelected, bool _bActive, OutputDevice& _rDevice, const Rectangle& _rArea, const StyleSettings& _rStyle, Image* _pCellData ) { - _rDevice.Push( PUSH_LINECOLOR | PUSH_FILLCOLOR | PUSH_CLIPREGION); - _rDevice.IntersectClipRegion( _rArea ); - Color background1 = m_pImpl->rModel.getOddRowBackgroundColor(); - Color background2 = m_pImpl->rModel.getEvenRowBackgroundColor(); - Color line = m_pImpl->rModel.getLineColor(); - //if row is selected and line color isn't user specified, set it blue - if(_bSelected) - { - if(line == 0xFFFFFF) - _rDevice.SetLineColor(_rStyle.GetHighlightColor()); - else - _rDevice.SetLineColor(line); - } - //else set line color to the color of row background - else - { - if(background2 != 0xFFFFFF && m_pImpl->nCurrentRow%2) + _rDevice.Push( PUSH_LINECOLOR | PUSH_FILLCOLOR); + Color background1 = m_pImpl->rModel.getOddRowBackgroundColor(); + Color background2 = m_pImpl->rModel.getEvenRowBackgroundColor(); + Color line = m_pImpl->rModel.getLineColor(); + //if row is selected and line color isn't user specified, set it blue + if(_bSelected) { if(line == 0xFFFFFF) - _rDevice.SetLineColor(background2); + _rDevice.SetLineColor(_rStyle.GetHighlightColor()); else _rDevice.SetLineColor(line); } - else if(background1 != 0xFFFFFF && line == 0xFFFFFF) - _rDevice.SetLineColor(background1); + //else set line color to the color of row background else { - //if line color is set, then it was user defined and should be visible - //if it wasn't set, it'll be the same as the default background color, so lines still won't be visible - _rDevice.SetLineColor(line); + if(background2 != 0xFFFFFF && m_pImpl->nCurrentRow%2) + { + if(line == 0xFFFFFF) + _rDevice.SetLineColor(background2); + else + _rDevice.SetLineColor(line); + } + else if(background1 != 0xFFFFFF && line == 0xFFFFFF) + _rDevice.SetLineColor(background1); + else + { + //if line color is set, then it was user defined and should be visible + //if it wasn't set, it'll be the same as the default background color, so lines still won't be visible + _rDevice.SetLineColor(line); + } } - } - _rDevice.DrawLine( _rArea.BottomRight(), _rArea.TopRight() ); - { - // TODO: remove those temporary place holders - Rectangle aRect( _rArea ); - ++aRect.Left(); --aRect.Right(); - aRect.Top(); aRect.Bottom(); + _rDevice.DrawLine( _rArea.BottomRight(), _rArea.TopRight() ); + + Rectangle aRect( _rArea ); + ++aRect.Left(); --aRect.Right(); + aRect.Top(); aRect.Bottom(); Point imagePos(Point(aRect.Left(), aRect.Top())); Size imageSize = _pCellData->GetSizePixel(); if(aRect.GetWidth() > imageSize.Width()) @@ -281,8 +290,7 @@ namespace svt { namespace table imageSize.Height() = aRect.GetHeight()-1; Image& image (*_pCellData); _rDevice.DrawImage(imagePos, imageSize, image, 0); - } - _rDevice.Pop(); + _rDevice.Pop(); (void)_bActive; // no special painting for the active cell at the moment @@ -293,48 +301,47 @@ namespace svt { namespace table OutputDevice& _rDevice, const Rectangle& _rArea, const StyleSettings& _rStyle, rtl::OUString& _rText ) { _rDevice.Push( PUSH_LINECOLOR | PUSH_FILLCOLOR ); - Color background1 = m_pImpl->rModel.getOddRowBackgroundColor(); - Color background2 = m_pImpl->rModel.getEvenRowBackgroundColor(); - Color line = m_pImpl->rModel.getLineColor(); - //if row is selected and line color isn't user specified, set it blue - if(_bSelected) - { - if(line == 0xFFFFFF) - _rDevice.SetLineColor(_rStyle.GetHighlightColor()); - else - _rDevice.SetLineColor(line); - } - //else set line color to the color of row background - else - { - if(background2 != 0xFFFFFF && m_pImpl->nCurrentRow%2) + Color background1 = m_pImpl->rModel.getOddRowBackgroundColor(); + Color background2 = m_pImpl->rModel.getEvenRowBackgroundColor(); + Color line = m_pImpl->rModel.getLineColor(); + //if row is selected and line color isn't user specified, set it blue + if(_bSelected) { if(line == 0xFFFFFF) - _rDevice.SetLineColor(background2); + _rDevice.SetLineColor(_rStyle.GetHighlightColor()); else _rDevice.SetLineColor(line); } - else if(background1 != 0xFFFFFF && line == 0xFFFFFF) - _rDevice.SetLineColor(background1); + //else set line color to the color of row background else { - //if Line color is set, then it was user defined and should be visible - //if it wasn't set, it'll be the same as the default background color, so lines still won't be visible - _rDevice.SetLineColor(line); + if(background2 != 0xFFFFFF && m_pImpl->nCurrentRow%2) + { + if(line == 0xFFFFFF) + _rDevice.SetLineColor(background2); + else + _rDevice.SetLineColor(line); + } + else if(background1 != 0xFFFFFF && line == 0xFFFFFF) + _rDevice.SetLineColor(background1); + else + { + //if Line color is set, then it was user defined and should be visible + //if it wasn't set, it'll be the same as the default background color, so lines still won't be visible + _rDevice.SetLineColor(line); + } } - } - _rDevice.DrawLine( _rArea.BottomRight(), _rArea.TopRight() ); - { - // TODO: remove those temporary place holders - Rectangle aRect( _rArea ); - ++aRect.Left(); --aRect.Right(); - aRect.Top(); aRect.Bottom(); + _rDevice.DrawLine( _rArea.BottomRight(), _rArea.TopRight() ); + + Rectangle aRect( _rArea ); + ++aRect.Left(); --aRect.Right(); + aRect.Top(); aRect.Bottom(); if(_bSelected) - { _rDevice.SetTextColor(_rStyle.GetHighlightTextColor()); - } - else + else if(m_pImpl->rModel.getTextColor() != 0x000000) _rDevice.SetTextColor(m_pImpl->rModel.getTextColor()); + else + _rDevice.SetTextColor(_rStyle.GetFieldTextColor()); ULONG nHorFlag = TEXT_DRAW_LEFT; ULONG nVerFlag = TEXT_DRAW_TOP; if(m_pImpl->rModel.getVerticalAlign() == 1) @@ -348,8 +355,8 @@ namespace svt { namespace table Rectangle textRect(_rArea); textRect.Left()+=4; textRect.Right()-=4; textRect.Bottom()-=2; - _rDevice.DrawText( textRect, _rText, nHorFlag | nVerFlag | TEXT_DRAW_CLIP); - } + _rDevice.DrawText( textRect, _rText, nHorFlag | nVerFlag | TEXT_DRAW_CLIP); + _rDevice.Pop(); (void)_bActive; // no special painting for the active cell at the moment diff --git a/svtools/source/table/makefile.mk b/svtools/source/table/makefile.mk deleted file mode 100644 index cf1adc76fe92..000000000000 --- a/svtools/source/table/makefile.mk +++ /dev/null @@ -1,55 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -ENABLE_EXCEPTIONS=TRUE -PRJNAME=svtools -TARGET=table -#LIBTARGET=NO - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svt.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES=\ - $(SLO)$/tablecontrol.obj \ - $(SLO)$/tablecontrol_impl.obj \ - $(SLO)$/gridtablerenderer.obj \ - $(SLO)$/tablegeometry.obj \ - $(SLO)$/defaultinputhandler.obj \ - $(SLO)$/tabledatawindow.obj - -#LIB1TARGET= $(SLB)$/$(TARGET).lib -#LIB1OBJFILES= $(SLOFILES) - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/svtools/source/table/tablecontrol.cxx b/svtools/source/table/tablecontrol.cxx index 1770bfd7dd02..33c80e642118 100644 --- a/svtools/source/table/tablecontrol.cxx +++ b/svtools/source/table/tablecontrol.cxx @@ -70,6 +70,7 @@ namespace svt { namespace table :Control( _pParent, _nStyle ) ,m_pImpl( new TableControl_Impl( *this ) ) ,m_bSelectionChanged(false) + ,m_bTooltip(false) { TableDataWindow* aTableData = m_pImpl->getDataWindow(); aTableData->SetMouseButtonDownHdl( LINK( this, TableControl, ImplMouseButtonDownHdl ) ); @@ -306,7 +307,7 @@ namespace svt { namespace table aRetText = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ColumnHeaderBar" ) ); break; case TCTYPE_TABLECELL: - aRetText = GetRowName(_nRow); + aRetText = GetAccessibleCellText(_nRow, _nCol); break; case TCTYPE_ROWHEADERCELL: aRetText = GetRowName(_nRow); @@ -389,9 +390,9 @@ namespace svt { namespace table } // ----------------------------------------------------------------------------- -::rtl::OUString TableControl::GetAccessibleCellText( sal_Int32 _nRowPos, sal_Int32 _nColPos) +::rtl::OUString TableControl::GetAccessibleCellText( sal_Int32 _nRowPos, sal_Int32 _nColPos) const { - ::com::sun::star::uno::Any cellContent = GetCellContent(_nRowPos, _nColPos); + const ::com::sun::star::uno::Any cellContent = GetCellContent(_nRowPos, _nColPos); return m_pImpl->convertToString(cellContent); } // ----------------------------------------------------------------------------- @@ -589,6 +590,7 @@ void TableControl::setTooltip(const ::com::sun::star::uno::Sequence< ::rtl::OUSt { m_aText = aText; m_nCols = nCols; + m_bTooltip = true; } // ----------------------------------------------------------------------- void TableControl::selectionChanged(bool _bChanged) @@ -596,6 +598,11 @@ void TableControl::selectionChanged(bool _bChanged) m_bSelectionChanged = _bChanged; } // ----------------------------------------------------------------------- +bool TableControl::isTooltip() +{ + return m_bTooltip; +} +// ----------------------------------------------------------------------- IMPL_LINK( TableControl, ImplSelectHdl, void*, EMPTYARG ) { Select(); diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index 3288ab6a4284..6c58cb530330 100644 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -609,10 +609,10 @@ namespace svt { namespace table if(pColumn->getMinWidth() == 0 && bResizable) { pColumn->setMinWidth(1); - minColWithoutFixedSum+=m_rAntiImpl.LogicToPixel( Size( 1, 0 ), MAP_APPFONT ).Width(); + minColWithoutFixedSum+=m_rAntiImpl.PixelToLogic( Size( 1, 0 ), MAP_APPFONT ).Width(); } if(pColumn->getMaxWidth() == 0 && bResizable) - pColumn->setMaxWidth(m_rAntiImpl.LogicToPixel( Size( (int)gridWidth, 0 ), MAP_APPFONT ).Width()); + pColumn->setMaxWidth(m_rAntiImpl.PixelToLogic( Size( (int)gridWidth, 0 ), MAP_APPFONT ).Width()); if( colPrefWidth != 0) { if(m_bResizingGrid) @@ -884,6 +884,16 @@ namespace svt { namespace table // position it if ( m_pHScroll ) { + TableSize nVisibleUnits = lcl_getColumnsVisibleWithin( aDataCellPlayground, m_nLeftColumn, *this, false ); + int nRange = m_nColumnCount; + if( m_nLeftColumn + nVisibleUnits == nRange-1) + { + if(m_aAccColumnWidthsPixel[nRange-2] - m_aAccColumnWidthsPixel[m_nLeftColumn] + m_aColumnWidthsPixel[nRange-1]>aDataCellPlayground.GetWidth()) + { + m_pHScroll->SetVisibleSize( nVisibleUnits -1 ); + m_pHScroll->SetPageSize(nVisibleUnits -1); + } + } Rectangle aScrollbarArea( Point( 0, aDataCellPlayground.Bottom() + 1 ), Size( aDataCellPlayground.Right() + 1, nScrollbarMetrics ) @@ -938,8 +948,16 @@ namespace svt { namespace table //In the case that column headers are defined but data hasn't yet been set, //only column headers will be shown if(m_pModel->hasColumnHeaders()) + { if(m_nColHeaderHeightPixel>1) + { m_pDataWindow->SetSizePixel( m_rAntiImpl.GetOutputSizePixel()); + if(m_bResizingGrid) + //update column widths to fit in grid + impl_ni_updateColumnWidths(); + m_bResizingGrid = true; + } + } if(m_nColumnCount != 0) impl_ni_updateScrollbars(); } @@ -1000,7 +1018,6 @@ namespace svt { namespace table *m_pDataWindow, aCell.getRect(), rStyle ); } } - // the area occupied by the row header, if any Rectangle aRowHeaderArea; if ( m_pModel->hasRowHeaders() ) @@ -1014,12 +1031,13 @@ namespace svt { namespace table //to avoid double lines when scrolling vertically if(m_nTopRow != 0) --aRowHeaderArea.Top(); + --aRowHeaderArea.Right(); pRenderer->PaintHeaderArea(*m_pDataWindow, aRowHeaderArea, false, true, rStyle); // Note that strictly, aRowHeaderArea also contains the intersection between column // and row header area. However, below we go to paint this intersection, again, // so this hopefully doesn't hurt if we already paint it here. - if ( getModel()->hasColumnHeaders() ) + if ( m_pModel->hasColumnHeaders() ) { TableCellGeometry aIntersection( *this, Rectangle( Point( 0, 0 ), aAllCellsWithHeaders.BottomRight() ), COL_ROW_HEADERS, ROW_COL_HEADERS ); @@ -1030,6 +1048,7 @@ namespace svt { namespace table --aInters.Top(); --aInters.Bottom(); } + --aInters.Right(); pRenderer->PaintHeaderArea( *m_pDataWindow, aInters, true, true, rStyle ); @@ -1068,6 +1087,11 @@ namespace svt { namespace table --aRect.Top(); if(m_nLeftColumn != 0) --aRect.Left(); + else + { + if(m_pModel->hasRowHeaders()) + --aRect.Left(); + } // give the redenderer a chance to prepare the row pRenderer->PrepareRow( aRowIterator.getRow(), isActiveRow, isSelectedRow, *m_pDataWindow, aRect, rStyle ); @@ -1908,6 +1932,11 @@ namespace svt { namespace table return -1; } //------------------------------------------------------------------------------- + bool TableControl_Impl::isTooltipActive() + { + return m_rAntiImpl.isTooltip(); + } + //------------------------------------------------------------------------------- ::rtl::OUString& TableControl_Impl::setTooltip(const Point& rPoint ) { ::rtl::OUString aTooltipText; @@ -1990,8 +2019,11 @@ namespace svt { namespace table PColumnModel pColumn = m_pModel->getColumnModel(m_nCurColumn); impl_ni_getAccVisibleColWidths(); int newColWidth = m_aColumnWidthsPixel[m_nCurColumn]; + //make resize area for the separator wider + int nLeft = m_aVisibleColumnWidthsPixel[resizingColumn]-4; //subtract 1 from m_aAccColumnWidthPixel because right border should be part of the current cell - if(m_aVisibleColumnWidthsPixel[resizingColumn]-1 == rPoint.X() && pColumn->isResizable()) + int nRight = m_aVisibleColumnWidthsPixel[resizingColumn]-1; + if( rPoint.X()> nLeft && rPoint.X()<nRight && pColumn->isResizable()) aNewPointer = Pointer( POINTER_HSPLIT ); //MouseButton was pressed but not yet released, mouse is moving if(m_bResizing) @@ -2019,7 +2051,10 @@ namespace svt { namespace table m_bResizingGrid = false; m_nResizingColumn = m_nCurColumn; PColumnModel pColumn = m_pModel->getColumnModel(m_nResizingColumn); - if(m_aVisibleColumnWidthsPixel[m_nResizingColumn-m_nLeftColumn]-1 == rPoint.X() && pColumn->isResizable()) + //make resize area for the separator wider + int nLeft = m_aVisibleColumnWidthsPixel[m_nResizingColumn-m_nLeftColumn]-4; + int nRight = m_aVisibleColumnWidthsPixel[m_nResizingColumn-m_nLeftColumn]-1; + if(rPoint.X()> nLeft && rPoint.X()<nRight && pColumn->isResizable()) { m_pDataWindow->CaptureMouse(); m_bResizing = true; @@ -2033,8 +2068,8 @@ namespace svt { namespace table { m_pDataWindow->HideTracking(); PColumnModel pColumn = m_pModel->getColumnModel(m_nResizingColumn); - int maxWidth = pColumn->getMaxWidth(); - int minWidth = pColumn->getMinWidth(); + int maxWidth = m_rAntiImpl.LogicToPixel( Size( pColumn->getMaxWidth(), 0 ), MAP_APPFONT ).Width(); + int minWidth = m_rAntiImpl.LogicToPixel( Size( pColumn->getMinWidth(), 0 ), MAP_APPFONT ).Width(); int resizeCol = m_nResizingColumn-m_nLeftColumn; //new position of mouse int actX = rPoint.X(); @@ -2044,7 +2079,7 @@ namespace svt { namespace table int leftX = 0; if(m_nResizingColumn > m_nLeftColumn) leftX = m_aVisibleColumnWidthsPixel[resizeCol-1]; - else if(m_nResizingColumn == 0 && m_pModel->hasRowHeaders()) + else if(m_nResizingColumn == m_nLeftColumn && m_pModel->hasRowHeaders()) leftX = m_rAntiImpl.LogicToPixel( Size( m_pModel->getRowHeaderWidth(), 0 ), MAP_APPFONT ).Width(); int actWidth = actX - leftX; int newActWidth = 0; @@ -2057,7 +2092,7 @@ namespace svt { namespace table pColumn->setPreferredWidth(newActWidth); } else - pColumn->setPreferredWidth(minWidth); + pColumn->setPreferredWidth(pColumn->getMinWidth()); if(m_nLeftColumn != 0) impl_updateLeftColumn(); } @@ -2069,7 +2104,7 @@ namespace svt { namespace table pColumn->setPreferredWidth(newActWidth); } else - pColumn->setPreferredWidth(maxWidth); + pColumn->setPreferredWidth(pColumn->getMaxWidth()); } m_nCurColumn = m_nResizingColumn; impl_ni_updateColumnWidths(); diff --git a/svtools/source/table/tablecontrol_impl.hxx b/svtools/source/table/tablecontrol_impl.hxx index 12b518aa3578..053766d92841 100644 --- a/svtools/source/table/tablecontrol_impl.hxx +++ b/svtools/source/table/tablecontrol_impl.hxx @@ -210,6 +210,7 @@ namespace svt { namespace table virtual void showCursor(); virtual bool dispatchAction( TableControlAction _eAction ); virtual SelectionEngine* getSelEngine(); + virtual bool isTooltipActive(); virtual rtl::OUString& setTooltip(const Point& rPoint ); virtual void resizeColumn(const Point& rPoint); virtual bool startResizeColumn(const Point& rPoint); diff --git a/svtools/source/table/tabledatawindow.cxx b/svtools/source/table/tabledatawindow.cxx index 3245b7e84aac..bbd7f6829369 100644 --- a/svtools/source/table/tabledatawindow.cxx +++ b/svtools/source/table/tabledatawindow.cxx @@ -45,7 +45,6 @@ namespace svt { namespace table TableDataWindow::TableDataWindow( TableControl_Impl& _rTableControl ) :Window( &_rTableControl.getAntiImpl() ) ,m_rTableControl ( _rTableControl ) - ,m_nRowAlreadySelected( -1 ) { // by default, use the background as determined by the style settings const Color aWindowColor( GetSettings().GetStyleSettings().GetFieldColor() ); @@ -58,14 +57,33 @@ namespace svt { namespace table { m_rTableControl.doPaintContent( rUpdateRect ); } - + //-------------------------------------------------------------------- + void TableDataWindow::SetBackground( const Wallpaper& rColor ) + { + Window::SetBackground( rColor ); + } + //-------------------------------------------------------------------- + void TableDataWindow::SetControlBackground( const Color& rColor ) + { + Window::SetControlBackground( rColor ); + } + //-------------------------------------------------------------------- + void TableDataWindow::SetBackground() + { + Window::SetBackground(); + } + //-------------------------------------------------------------------- + void TableDataWindow::SetControlBackground() + { + Window::SetControlBackground(); + } //-------------------------------------------------------------------- void TableDataWindow::MouseMove( const MouseEvent& rMEvt ) { Point aPoint = rMEvt.GetPosPixel(); if ( !m_rTableControl.getInputHandler()->MouseMove( m_rTableControl, rMEvt ) ) { - if(m_rTableControl.getCurrentRow(aPoint)>=0 ) + if(m_rTableControl.getCurrentRow(aPoint)>=0 && m_rTableControl.isTooltipActive() ) { SetPointer(POINTER_ARROW); rtl::OUString& rHelpText = m_rTableControl.setTooltip(aPoint); @@ -91,23 +109,22 @@ namespace svt { namespace table { Point aPoint = rMEvt.GetPosPixel(); RowPos nCurRow = m_rTableControl.getCurrentRow(aPoint); + std::vector<RowPos> selectedRows(m_rTableControl.getSelectedRows()); if ( !m_rTableControl.getInputHandler()->MouseButtonDown( m_rTableControl, rMEvt ) ) Window::MouseButtonDown( rMEvt ); else { if(nCurRow >= 0 && m_rTableControl.getSelEngine()->GetSelectionMode() != NO_SELECTION) { - if( m_nRowAlreadySelected != nCurRow ) + bool found = std::find(selectedRows.begin(),selectedRows.end(), nCurRow) != selectedRows.end(); + + if( !found ) { - m_nRowAlreadySelected = nCurRow; m_aSelectHdl.Call( NULL ); } - else - m_aMouseButtonDownHdl.Call((MouseEvent*) &rMEvt); } - else - m_aMouseButtonDownHdl.Call((MouseEvent*) &rMEvt); } + m_aMouseButtonDownHdl.Call((MouseEvent*) &rMEvt); m_rTableControl.getAntiImpl().LoseFocus(); } //-------------------------------------------------------------------- @@ -115,8 +132,7 @@ namespace svt { namespace table { if ( !m_rTableControl.getInputHandler()->MouseButtonUp( m_rTableControl, rMEvt ) ) Window::MouseButtonUp( rMEvt ); - else - m_aMouseButtonUpHdl.Call((MouseEvent*) &rMEvt); + m_aMouseButtonUpHdl.Call((MouseEvent*) &rMEvt); m_rTableControl.getAntiImpl().GetFocus(); } //-------------------------------------------------------------------- diff --git a/svtools/source/toolpanel/drawerlayouter.cxx b/svtools/source/toolpanel/drawerlayouter.cxx index 040f33045fff..7fc7d05ea0c9 100644 --- a/svtools/source/toolpanel/drawerlayouter.cxx +++ b/svtools/source/toolpanel/drawerlayouter.cxx @@ -165,7 +165,7 @@ namespace svt OSL_PRECOND( i_nPosition <= m_aDrawers.size(), "DrawerDeckLayouter::PanelInserted: inconsistency!" ); PToolPanelDrawer pDrawer( new ToolPanelDrawer( m_rParentWindow, i_pPanel->GetDisplayName() ) ); - pDrawer->SetSmartHelpId( i_pPanel->GetHelpID() ); + pDrawer->SetHelpId( i_pPanel->GetHelpID() ); // proper Z-Order if ( i_nPosition == 0 ) { diff --git a/svtools/source/toolpanel/dummypanel.cxx b/svtools/source/toolpanel/dummypanel.cxx index 20f140a6e610..4de38b7f4bb3 100644 --- a/svtools/source/toolpanel/dummypanel.cxx +++ b/svtools/source/toolpanel/dummypanel.cxx @@ -80,9 +80,9 @@ namespace svt } //-------------------------------------------------------------------- - SmartId DummyPanel::GetHelpID() const + rtl::OString DummyPanel::GetHelpID() const { - return SmartId(); + return rtl::OString(); } //-------------------------------------------------------------------- diff --git a/svtools/source/toolpanel/dummypanel.hxx b/svtools/source/toolpanel/dummypanel.hxx index adb98e52077e..d2ca4480fce5 100644 --- a/svtools/source/toolpanel/dummypanel.hxx +++ b/svtools/source/toolpanel/dummypanel.hxx @@ -49,7 +49,7 @@ namespace svt // IToolPanel virtual ::rtl::OUString GetDisplayName() const; virtual Image GetImage() const; - virtual SmartId GetHelpID() const; + virtual rtl::OString GetHelpID() const; virtual void Activate( Window& i_rParentWindow ); virtual void Deactivate(); virtual void SetSizePixel( const Size& i_rPanelWindowSize ); diff --git a/svtools/source/toolpanel/makefile.mk b/svtools/source/toolpanel/makefile.mk deleted file mode 100755 index 58282056f529..000000000000 --- a/svtools/source/toolpanel/makefile.mk +++ /dev/null @@ -1,68 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2008 by Sun Microsystems, Inc. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.16 $ -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=svtools -TARGET=toolpanel - -# --- Settings ----------------------------------------------------- - -ENABLE_EXCEPTIONS=TRUE - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svt.pmk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES=\ - toolpanel.src - -SLOFILES=\ - $(SLO)$/drawerlayouter.obj \ - $(SLO)$/dummypanel.obj \ - $(SLO)$/paneldecklisteners.obj \ - $(SLO)$/paneltabbar.obj \ - $(SLO)$/paneltabbarpeer.obj \ - $(SLO)$/refbase.obj \ - $(SLO)$/tabbargeometry.obj \ - $(SLO)$/tablayouter.obj \ - $(SLO)$/toolpanel.obj \ - $(SLO)$/toolpanelcollection.obj \ - $(SLO)$/toolpaneldrawer.obj \ - $(SLO)$/toolpaneldrawerpeer.obj \ - $(SLO)$/toolpaneldeck.obj \ - $(SLO)$/toolpaneldeckpeer.obj \ - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/svtools/source/toolpanel/paneltabbar.cxx b/svtools/source/toolpanel/paneltabbar.cxx index 38aee00c8f55..23067d3ee5d0 100755 --- a/svtools/source/toolpanel/paneltabbar.cxx +++ b/svtools/source/toolpanel/paneltabbar.cxx @@ -296,19 +296,18 @@ namespace svt const ControlState nState( lcl_ItemToControlState( i_nItemFlags ) ); TabitemValue tiValue; - ImplControlValue aControlValue( (void*)(&tiValue) ); - Region aBoundingRegion, aContentRegion; + Rectangle aBoundingRegion, aContentRegion; bool bNativeOK = getTargetDevice().GetNativeControlRegion( CTRL_TAB_ITEM, PART_ENTIRE_CONTROL, i_rContentArea, nState, - aControlValue, ::rtl::OUString(), + tiValue, ::rtl::OUString(), aBoundingRegion, aContentRegion ); (void)bNativeOK; OSL_ENSURE( bNativeOK, "NWFTabItemRenderer::calculateDecorations: GetNativeControlRegion not implemented for CTRL_TAB_ITEM?!" ); - return aBoundingRegion.GetBoundRect(); + return aBoundingRegion; } //------------------------------------------------------------------------------------------------------------------ @@ -322,9 +321,8 @@ namespace svt if ( i_nItemFlags & ITEM_POSITION_LAST ) tiValue.mnAlignment |= TABITEM_LAST_IN_GROUP; - ImplControlValue aControlValue( (void *)(&tiValue) ); - bool bNativeOK = getTargetDevice().DrawNativeControl( CTRL_TAB_ITEM, PART_ENTIRE_CONTROL, i_rContentRect, nState, aControlValue, rtl::OUString() ); + bool bNativeOK = getTargetDevice().DrawNativeControl( CTRL_TAB_ITEM, PART_ENTIRE_CONTROL, i_rContentRect, nState, tiValue, rtl::OUString() ); (void)bNativeOK; OSL_ENSURE( bNativeOK, "NWFTabItemRenderer::preRenderItem: inconsistent NWF implementation!" ); // IsNativeControlSupported returned true, previously, otherwise we would not be here ... diff --git a/svtools/source/uno/addrtempuno.cxx b/svtools/source/uno/addrtempuno.cxx index 2f25a8f2f9b2..3ccf83a224f8 100644 --- a/svtools/source/uno/addrtempuno.cxx +++ b/svtools/source/uno/addrtempuno.cxx @@ -28,12 +28,8 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" #include "svtools/genericunodialog.hxx" -#ifndef _SVT_DOC_ADDRESSTEMPLATE_HXX_ -#include "addresstemplate.hxx" -#endif -#ifndef _CPPUHELPER_EXTRACT_HXX_ +#include <svtools/addresstemplate.hxx> #include <cppuhelper/extract.hxx> -#endif #include <cppuhelper/typeprovider.hxx> #include <comphelper/property.hxx> #include <com/sun/star/sdbc/XDataSource.hpp> diff --git a/svtools/source/uno/contextmenuhelper.cxx b/svtools/source/uno/contextmenuhelper.cxx index 9eb36cf18a45..5b7d7c709509 100644 --- a/svtools/source/uno/contextmenuhelper.cxx +++ b/svtools/source/uno/contextmenuhelper.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#include "contextmenuhelper.hxx" +#include <svtools/contextmenuhelper.hxx> #include <svtools/menuoptions.hxx> #include <svtools/miscopt.hxx> diff --git a/svtools/source/uno/framestatuslistener.cxx b/svtools/source/uno/framestatuslistener.cxx index 20176160b396..f7a0540f6eb4 100644 --- a/svtools/source/uno/framestatuslistener.cxx +++ b/svtools/source/uno/framestatuslistener.cxx @@ -27,7 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#include <framestatuslistener.hxx> +#include <svtools/framestatuslistener.hxx> #include <com/sun/star/frame/XDispatchProvider.hpp> #include <com/sun/star/lang/DisposedException.hpp> #include <vos/mutex.hxx> diff --git a/svtools/source/uno/makefile.mk b/svtools/source/uno/makefile.mk deleted file mode 100644 index 7c1c44006047..000000000000 --- a/svtools/source/uno/makefile.mk +++ /dev/null @@ -1,61 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=svtools -TARGET=unoiface -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svt.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES= \ - $(SLO)$/addrtempuno.obj \ - $(SLO)$/contextmenuhelper.obj \ - $(SLO)$/framestatuslistener.obj \ - $(SLO)$/generictoolboxcontroller.obj \ - $(SLO)$/genericunodialog.obj \ - $(SLO)$/miscservices.obj\ - $(SLO)$/statusbarcontroller.obj \ - $(SLO)$/toolboxcontroller.obj \ - $(SLO)$/treecontrolpeer.obj \ - $(SLO)$/unocontroltablemodel.obj \ - $(SLO)$/unoevent.obj \ - $(SLO)$/unoiface.obj \ - $(SLO)$/unoimap.obj \ - $(SLO)$/svtxgridcontrol.obj \ - $(SLO)$/popupwindowcontroller.obj \ - $(SLO)$/popupmenucontrollerbase.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/svtools/source/uno/miscservices.cxx b/svtools/source/uno/miscservices.cxx index e16a1ecb56dc..34984976bf07 100644 --- a/svtools/source/uno/miscservices.cxx +++ b/svtools/source/uno/miscservices.cxx @@ -101,55 +101,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment ( *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo ( - void * pServiceManager, void * _pRegistryKey ) -{ - if (_pRegistryKey) - { - Reference< XRegistryKey > xRegistryKey ( - reinterpret_cast< XRegistryKey* >( _pRegistryKey )); - Reference< XRegistryKey > xNewKey; - uno::Sequence< ::rtl::OUString > aServices; - - xNewKey = xRegistryKey->createKey ( - OUString::createFromAscii( "/com.sun.star.comp.svtools.OAddressBookSourceDialogUno/UNO/SERVICES" ) ); - xNewKey->createKey( - OUString::createFromAscii( "com.sun.star.ui.AddressBookSourceDialog" ) ); - - xNewKey = xRegistryKey->createKey ( - OUString::createFromAscii( "/com.sun.star.svtools.SvFilterOptionsDialog/UNO/SERVICES" ) ); - xNewKey->createKey ( - OUString::createFromAscii( "com.sun.star.ui.dialogs.FilterOptionsDialog" ) ); - - // GraphicProvider - xNewKey = reinterpret_cast< registry::XRegistryKey * >( _pRegistryKey )->createKey( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) + - GraphicProvider::getImplementationName_Static() + - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") ) ); - - aServices = GraphicProvider::getSupportedServiceNames_Static(); - int i; - for( i = 0; i < aServices.getLength(); i++ ) - xNewKey->createKey( aServices.getConstArray()[ i ] ); - - // GraphicRendererVCL - xNewKey = reinterpret_cast< registry::XRegistryKey * >( _pRegistryKey )->createKey( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) + - GraphicRendererVCL::getImplementationName_Static() + - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") ) ); - - aServices = ( GraphicRendererVCL::getSupportedServiceNames_Static() ); - for( i = 0; i < aServices.getLength(); i++ ) - xNewKey->createKey( aServices.getConstArray()[ i ] ); - - if ( !component_writeInfoHelper( reinterpret_cast< lang::XMultiServiceFactory* >( pServiceManager ), reinterpret_cast< registry::XRegistryKey* >( _pRegistryKey ), serviceDecl ) ) - return false; - - return ::cppu::component_writeInfoHelper( pServiceManager, _pRegistryKey, s_aServiceEntries ); - } - return sal_False; -} - SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory ( const sal_Char * pImplementationName, void * _pServiceManager, void * pRegistryKey) { diff --git a/svtools/source/uno/statusbarcontroller.cxx b/svtools/source/uno/statusbarcontroller.cxx index 14b802a1bf90..8dde75dc7fc3 100644 --- a/svtools/source/uno/statusbarcontroller.cxx +++ b/svtools/source/uno/statusbarcontroller.cxx @@ -27,7 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#include <statusbarcontroller.hxx> +#include <svtools/statusbarcontroller.hxx> #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/frame/XDispatchProvider.hpp> @@ -37,11 +37,9 @@ #include <vcl/svapp.hxx> #include <vcl/window.hxx> #include <vcl/status.hxx> -#include <imgdef.hxx> +#include <svtools/imgdef.hxx> #include <svtools/miscopt.hxx> -#ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_ #include <toolkit/unohlp.hxx> -#endif using namespace ::cppu; using namespace ::com::sun::star::awt; diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx index 99b36c390f23..f5bc837f60b0 100755..100644 --- a/svtools/source/uno/svtxgridcontrol.cxx +++ b/svtools/source/uno/svtxgridcontrol.cxx @@ -191,7 +191,7 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An } case BASEPROPERTY_GRID_HEADER_BACKGROUND: { - sal_Int32 colorHeader = 0x000000; + sal_Int32 colorHeader = 0xFFFFFF; if( aValue >>= colorHeader ) { m_pTableModel->setHeaderBackgroundColor(colorHeader); @@ -200,7 +200,7 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An } case BASEPROPERTY_GRID_LINE_COLOR: { - sal_Int32 colorLine = 0x000000; + sal_Int32 colorLine = 0xFFFFFF; if( aValue >>= colorLine ) { m_pTableModel->setLineColor(colorLine); @@ -209,7 +209,7 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An } case BASEPROPERTY_GRID_EVEN_ROW_BACKGROUND: { - sal_Int32 colorEvenRow = 0x000000; + sal_Int32 colorEvenRow = 0xFFFFFF; if( aValue >>= colorEvenRow ) { m_pTableModel->setEvenRowBackgroundColor(colorEvenRow); @@ -218,7 +218,7 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An } case BASEPROPERTY_GRID_ROW_BACKGROUND: { - sal_Int32 colorBackground = 0x000000; + sal_Int32 colorBackground = 0xFFFFFF; if( aValue >>= colorBackground ) { m_pTableModel->setOddRowBackgroundColor(colorBackground); @@ -227,7 +227,7 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An } case BASEPROPERTY_TEXTCOLOR: { - sal_Int32 colorText = 0xFFFFFF; + sal_Int32 colorText = 0x000000; if( aValue >>= colorText ) { m_pTableModel->setTextColor(colorText); @@ -673,10 +673,10 @@ void SAL_CALL SVTXGridControl::selectRows(const ::com::sun::star::uno::Sequence< if((start >= 0 && start < m_pTableModel->getRowCount()) && (end >= 0 && end < m_pTableModel->getRowCount())) { std::vector<RowPos>& selectedRows = pTable->GetSelectedRows(); - if(!selectedRows.empty()) - selectedRows.clear(); if(eSelMode == SINGLE_SELECTION) { + if(!selectedRows.empty()) + selectedRows.clear(); if(rangeOfRows.getLength() == 1) selectedRows.push_back(start); else @@ -685,7 +685,10 @@ void SAL_CALL SVTXGridControl::selectRows(const ::com::sun::star::uno::Sequence< else { for(int i=0;i<seqSize;i++) - selectedRows.push_back(rangeOfRows[i]); + { + if(!isSelectedIndex(rangeOfRows[i])) + selectedRows.push_back(rangeOfRows[i]); + } } pTable->selectionChanged(true); pTable->InvalidateDataWindow(start, end, false); @@ -713,24 +716,23 @@ void SAL_CALL SVTXGridControl::selectAllRows() throw (::com::sun::star::uno::Run SetSynthesizingVCLEvent( sal_False ); } } + void SAL_CALL SVTXGridControl::deselectRows(const ::com::sun::star::uno::Sequence< ::sal_Int32 >& rangeOfRows) throw (::com::sun::star::uno::RuntimeException) { TableControl* pTable = (TableControl*)GetWindow(); std::vector<RowPos>& selectedRows = pTable->GetSelectedRows(); std::vector<RowPos>::iterator itStart = selectedRows.begin(); std::vector<RowPos>::iterator itEnd = selectedRows.end(); - sal_Int32 start = rangeOfRows[0]; - sal_Int32 end = rangeOfRows[rangeOfRows.getLength()-1]; - if((start >= 0 && start < m_pTableModel->getRowCount()) && (end >= 0 && end < m_pTableModel->getRowCount())) + for(int i = 0; i < rangeOfRows.getLength(); i++ ) { - std::vector<RowPos>::iterator iter = std::find(itStart, itEnd, start); - selectedRows.erase(iter, iter+(end-start)+1); - pTable->selectionChanged(true); - pTable->InvalidateDataWindow(start, end, false); - SetSynthesizingVCLEvent( sal_True ); - pTable->Select(); - SetSynthesizingVCLEvent( sal_False ); + std::vector<RowPos>::iterator iter = std::find(itStart, itEnd, rangeOfRows[i]); + selectedRows.erase(iter); } + pTable->selectionChanged(true); + pTable->Invalidate(); + SetSynthesizingVCLEvent( sal_True ); + pTable->Select(); + SetSynthesizingVCLEvent( sal_False ); } void SAL_CALL SVTXGridControl::deselectAllRows() throw (::com::sun::star::uno::RuntimeException) @@ -869,7 +871,7 @@ void SVTXGridControl::ImplCallItemListeners() aEvent.Range = diff; } //selected row changed - else if(diff == 0) + else if(diff == 0 && actSelRowCount != 0) { aEvent.Row = selRows[actSelRowCount-1]; aEvent.Action = com::sun::star::awt::grid::SelectionEventType(2); diff --git a/svtools/source/uno/toolboxcontroller.cxx b/svtools/source/uno/toolboxcontroller.cxx index 92ae93f5080d..9e4c522dc8c4 100644 --- a/svtools/source/uno/toolboxcontroller.cxx +++ b/svtools/source/uno/toolboxcontroller.cxx @@ -35,12 +35,9 @@ #include <com/sun/star/frame/XLayoutManager.hpp> #include <vos/mutex.hxx> #include <vcl/svapp.hxx> -#include <imgdef.hxx> +#include <svtools/imgdef.hxx> #include <svtools/miscopt.hxx> - -#ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_ #include <toolkit/unohlp.hxx> -#endif #include <vcl/toolbox.hxx> //shizhobo #include <com/sun/star/beans/PropertyAttribute.hpp> @@ -806,7 +803,7 @@ sal_Bool SAL_CALL ToolboxController::convertFastPropertyValue( com::sun::star::u { case TOOLBARCONTROLLER_PROPHANDLE_SUPPORTSVISIABLE: { - sal_Bool aNewValue; + sal_Bool aNewValue(sal_False); aValue >>= aNewValue; if (aNewValue != m_bSupportVisiable) { diff --git a/svtools/source/uno/treecontrolpeer.cxx b/svtools/source/uno/treecontrolpeer.cxx index 7fb1a007960f..f37d5f80ed68 100644 --- a/svtools/source/uno/treecontrolpeer.cxx +++ b/svtools/source/uno/treecontrolpeer.cxx @@ -1322,6 +1322,21 @@ void TreeControlPeer::setProperty( const ::rtl::OUString& PropertyName, const An switch( GetPropertyId( PropertyName ) ) { + case BASEPROPERTY_HIDEINACTIVESELECTION: + { + sal_Bool bEnabled = sal_False; + if ( aValue >>= bEnabled ) + { + WinBits nStyle = rTree.GetStyle(); + if ( bEnabled ) + nStyle |= WB_HIDESELECTION; + else + nStyle &= ~WB_HIDESELECTION; + rTree.SetStyle( nStyle ); + } + } + break; + case BASEPROPERTY_TREE_SELECTIONTYPE: { SelectionType eSelectionType; @@ -1375,11 +1390,11 @@ void TreeControlPeer::setProperty( const ::rtl::OUString& PropertyName, const An sal_Bool bEnabled = false; if( aValue >>= bEnabled ) { - WinBits nBits = rTree.GetWindowBits() & (~WB_HASLINES); + WinBits nBits = rTree.GetStyle() & (~WB_HASLINES); if( bEnabled ) nBits |= WB_HASLINES; - if( nBits != rTree.GetWindowBits() ) - rTree.SetWindowBits( nBits ); + if( nBits != rTree.GetStyle() ) + rTree.SetStyle( nBits ); } break; } @@ -1388,11 +1403,11 @@ void TreeControlPeer::setProperty( const ::rtl::OUString& PropertyName, const An sal_Bool bEnabled = false; if( aValue >>= bEnabled ) { - WinBits nBits = rTree.GetWindowBits() & (~WB_HASLINESATROOT); + WinBits nBits = rTree.GetStyle() & (~WB_HASLINESATROOT); if( bEnabled ) nBits |= WB_HASLINESATROOT; - if( nBits != rTree.GetWindowBits() ) - rTree.SetWindowBits( nBits ); + if( nBits != rTree.GetStyle() ) + rTree.SetStyle( nBits ); } break; } @@ -1412,6 +1427,9 @@ Any TreeControlPeer::getProperty( const ::rtl::OUString& PropertyName ) throw(Ru UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow(); switch(nPropId) { + case BASEPROPERTY_HIDEINACTIVESELECTION: + return Any( ( rTree.GetStyle() & WB_HIDESELECTION ) != 0 ? sal_True : sal_False ); + case BASEPROPERTY_TREE_SELECTIONTYPE: { SelectionType eSelectionType; @@ -1438,9 +1456,9 @@ Any TreeControlPeer::getProperty( const ::rtl::OUString& PropertyName ) throw(Ru case BASEPROPERTY_TREE_ROOTDISPLAYED: return Any( mbIsRootDisplayed ); case BASEPROPERTY_TREE_SHOWSHANDLES: - return Any( (rTree.GetWindowBits() & WB_HASLINES) != 0 ? sal_True : sal_False ); + return Any( (rTree.GetStyle() & WB_HASLINES) != 0 ? sal_True : sal_False ); case BASEPROPERTY_TREE_SHOWSROOTHANDLES: - return Any( (rTree.GetWindowBits() & WB_HASLINESATROOT) != 0 ? sal_True : sal_False ); + return Any( (rTree.GetStyle() & WB_HASLINESATROOT) != 0 ? sal_True : sal_False ); } } return VCLXWindow::getProperty( PropertyName ); @@ -1509,7 +1527,7 @@ UnoTreeListBoxImpl::UnoTreeListBoxImpl( TreeControlPeer* pPeer, Window* pParent, : SvTreeListBox( pParent, nWinStyle ) , mxPeer( pPeer ) { - SetWindowBits( WB_BORDER | WB_HASLINES |WB_HASBUTTONS | WB_HASLINESATROOT | WB_HASBUTTONSATROOT | WB_HSCROLL ); + SetStyle( WB_BORDER | WB_HASLINES |WB_HASBUTTONS | WB_HASLINESATROOT | WB_HASBUTTONSATROOT | WB_HSCROLL ); SetNodeDefaultImages(); SetSelectHdl( LINK(this, UnoTreeListBoxImpl, OnSelectionChangeHdl) ); SetDeselectHdl( LINK(this, UnoTreeListBoxImpl, OnSelectionChangeHdl) ); diff --git a/svtools/source/uno/unoevent.cxx b/svtools/source/uno/unoevent.cxx index 526cdbb5d03a..0f8bc91d9927 100644 --- a/svtools/source/uno/unoevent.cxx +++ b/svtools/source/uno/unoevent.cxx @@ -28,15 +28,11 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP #include <com/sun/star/beans/PropertyValue.hpp> -#endif #include <rtl/ustrbuf.hxx> - - #include <tools/rtti.hxx> #include <tools/solar.h> -#include "unoevent.hxx" +#include <svtools/unoevent.hxx> #include <svl/macitem.hxx> using namespace ::com::sun::star; diff --git a/svtools/source/uno/unoiface.cxx b/svtools/source/uno/unoiface.cxx index f2090be1655f..9ff37fbc2af4 100644 --- a/svtools/source/uno/unoiface.cxx +++ b/svtools/source/uno/unoiface.cxx @@ -31,12 +31,11 @@ #define _SVT_UNOIFACE_CXX #include <tools/debug.hxx> #include <vcl/svapp.hxx> - #include <svtools/svmedit.hxx> #include <unoiface.hxx> -#include "filedlg.hxx" -#include "filectrl.hxx" -#include "roadmap.hxx" +#include <svtools/filedlg.hxx> +#include <svtools/filectrl.hxx> +#include <svtools/roadmap.hxx> #include <svtools/fixedhyper.hxx> #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/lang/XSingleServiceFactory.hpp> @@ -46,9 +45,8 @@ #include <toolkit/helper/property.hxx> #include <svtools/fmtfield.hxx> #include <svl/numuno.hxx> -#include <calendar.hxx> -#include <prgsbar.hxx> - +#include <svtools/calendar.hxx> +#include <svtools/prgsbar.hxx> #include <svtools/svtreebx.hxx> #include "treecontrolpeer.hxx" #include "svtxgridcontrol.hxx" @@ -1664,7 +1662,7 @@ void SVTXRoadmap::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) BASEPROPERTY_TEXT, 0); VCLXWindow::ImplGetPropertyIds( rIds, true ); - VCLXImageConsumer::ImplGetPropertyIds( rIds ); + VCLXGraphicControl::ImplGetPropertyIds( rIds ); } // ---------------------------------------------------- diff --git a/svtools/source/uno/unoimap.cxx b/svtools/source/uno/unoimap.cxx index 6b6e35482ae9..97482ed9d540 100644 --- a/svtools/source/uno/unoimap.cxx +++ b/svtools/source/uno/unoimap.cxx @@ -36,23 +36,17 @@ #include <com/sun/star/awt/Rectangle.hpp> #include <com/sun/star/awt/Point.hpp> #include <com/sun/star/drawing/PointSequence.hpp> - -#ifndef _COMPHELPER_SERVICEHELPER_HXX_ #include <comphelper/servicehelper.hxx> -#endif #include <comphelper/propertysethelper.hxx> #include <comphelper/propertysetinfo.hxx> #include <cppuhelper/weakagg.hxx> - #include <cppuhelper/implbase3.hxx> - #include <list> #include <rtl/uuid.h> #include <vos/mutex.hxx> #include <vcl/svapp.hxx> - -#include "unoevent.hxx" -#include "unoimap.hxx" +#include <svtools/unoevent.hxx> +#include <svtools/unoimap.hxx> #include <svtools/imap.hxx> #include <svtools/imapcirc.hxx> #include <svtools/imaprect.hxx> @@ -210,6 +204,8 @@ PropertySetInfo* SvUnoImageMapObject::createPropertySetInfo( UINT16 nType ) SvUnoImageMapObject::SvUnoImageMapObject( UINT16 nType, const SvEventDescription* pSupportedMacroItems ) : PropertySetHelper( createPropertySetInfo( nType ) ), mnType( nType ) +, mbIsActive( true ) +, mnRadius( 0 ) { mpEvents = new SvMacroTableEventDescriptor( pSupportedMacroItems ); mpEvents->acquire(); @@ -218,6 +214,8 @@ SvUnoImageMapObject::SvUnoImageMapObject( UINT16 nType, const SvEventDescription SvUnoImageMapObject::SvUnoImageMapObject( const IMapObject& rMapObject, const SvEventDescription* pSupportedMacroItems ) : PropertySetHelper( createPropertySetInfo( rMapObject.GetType() ) ), mnType( rMapObject.GetType() ) +, mbIsActive( true ) +, mnRadius( 0 ) { maURL = rMapObject.GetURL(); maAltText = rMapObject.GetAltText(); diff --git a/svtools/source/uno/wizard/makefile.mk b/svtools/source/uno/wizard/makefile.mk deleted file mode 100644 index 521496fc5d48..000000000000 --- a/svtools/source/uno/wizard/makefile.mk +++ /dev/null @@ -1,48 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=../../.. - -PRJNAME=svtools -TARGET=unowiz -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svt.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES= \ - $(SLO)$/unowizard.obj \ - $(SLO)$/wizardshell.obj \ - $(SLO)$/wizardpagecontroller.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/svtools/source/uno/wizard/unowizard.cxx b/svtools/source/uno/wizard/unowizard.cxx index 9440c0e69f26..ea147c5979d3 100644 --- a/svtools/source/uno/wizard/unowizard.cxx +++ b/svtools/source/uno/wizard/unowizard.cxx @@ -42,6 +42,7 @@ #include <rtl/strbuf.hxx> #include <vos/mutex.hxx> #include <vcl/svapp.hxx> +#include <tools/urlobj.hxx> //...................................................................................................................... namespace svt { namespace uno @@ -206,11 +207,32 @@ namespace svt { namespace uno m_bInitialized = true; } + static rtl::OString lcl_getHelpId( const ::rtl::OUString& _rHelpURL ) + { + INetURLObject aHID( _rHelpURL ); + if ( aHID.GetProtocol() == INET_PROT_HID ) + return rtl::OUStringToOString( aHID.GetURLPath(), RTL_TEXTENCODING_UTF8 ); + else + return rtl::OUStringToOString( _rHelpURL, RTL_TEXTENCODING_UTF8 ); + } + + //------------------------------------------------------------------------ + static ::rtl::OUString lcl_getHelpURL( const rtl::OString& sHelpId ) + { + ::rtl::OUStringBuffer aBuffer; + ::rtl::OUString aTmp( sHelpId, sHelpId.getLength(), RTL_TEXTENCODING_UTF8 ); + INetURLObject aHID( aTmp ); + if ( aHID.GetProtocol() == INET_PROT_NOT_VALID ) + aBuffer.appendAscii( INET_HID_SCHEME ); + aBuffer.append( aTmp.getStr() ); + return aBuffer.makeStringAndClear(); + } + //-------------------------------------------------------------------- Dialog* Wizard::createDialog( Window* i_pParent ) { WizardShell* pDialog( new WizardShell( i_pParent, this, m_xController, m_aWizardSteps ) ); - pDialog->SetSmartHelpId( SmartId( m_sHelpURL ) ); + pDialog->SetHelpId( lcl_getHelpId( m_sHelpURL ) ); pDialog->setTitleBase( m_sTitle ); return pDialog; } @@ -219,7 +241,7 @@ namespace svt { namespace uno void Wizard::destroyDialog() { if ( m_pDialog ) - m_sHelpURL = m_pDialog->GetSmartHelpId().GetStr(); + m_sHelpURL = lcl_getHelpURL( m_pDialog->GetHelpId() ); Wizard_Base::destroyDialog(); } @@ -279,8 +301,7 @@ namespace svt { namespace uno if ( !m_pDialog ) return m_sHelpURL; - const SmartId aSmartId( m_pDialog->GetSmartHelpId() ); - return aSmartId.GetStr(); + return lcl_getHelpURL( m_pDialog->GetHelpId() ); } //------------------------------------------------------------------------------------------------------------------ @@ -292,7 +313,7 @@ namespace svt { namespace uno if ( !m_pDialog ) m_sHelpURL = i_HelpURL; else - m_pDialog->SetSmartHelpId( SmartId( i_HelpURL ) ); + m_pDialog->SetHelpId( lcl_getHelpId( i_HelpURL ) ); } //------------------------------------------------------------------------------------------------------------------ @@ -414,7 +435,7 @@ namespace svt { namespace uno ::osl::MutexGuard aGuard( m_aMutex ); WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog ); - ENSURE_OR_RETURN_FALSE( pWizardImpl, "Wizard::getCurrentPage: invalid dialog implementation!" ); + ENSURE_OR_RETURN( pWizardImpl, "Wizard::getCurrentPage: invalid dialog implementation!", Reference< XWizardPage >() ); return pWizardImpl->getCurrentWizardPage(); } diff --git a/svtools/source/urlobj/inetimg.cxx b/svtools/source/urlobj/inetimg.cxx index 7e81f17209f2..695f3993d8b8 100644 --- a/svtools/source/urlobj/inetimg.cxx +++ b/svtools/source/urlobj/inetimg.cxx @@ -31,10 +31,7 @@ #include <sot/formats.hxx> #include <tools/stream.hxx> -#ifndef GCC -#endif - -#include "inetimg.hxx" +#include <svtools/inetimg.hxx> #define TOKEN_SEPARATOR '\001' diff --git a/svtools/source/urlobj/makefile.mk b/svtools/source/urlobj/makefile.mk deleted file mode 100644 index c75e592ea10b..000000000000 --- a/svtools/source/urlobj/makefile.mk +++ /dev/null @@ -1,46 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=svtools -TARGET=urlobj - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svt.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/inetimg.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/svtools/util/hidother.src b/svtools/util/hidother.src index 77dd98115221..03aea7ebdf7e 100644 --- a/svtools/util/hidother.src +++ b/svtools/util/hidother.src @@ -57,3 +57,23 @@ hidspecial HID_PRINTDIALOG_TOFILE { HelpID = HID_PRINTDIALOG_TOFIL hidspecial HID_WIZARD_NEXT { HelpID = HID_WIZARD_NEXT; }; hidspecial HID_WIZARD_PREVIOUS { HelpID = HID_WIZARD_PREVIOUS; }; +hidspecial HID_FILEDLG_LINK_CB { HelpID = HID_FILEDLG_LINK_CB; }; +hidspecial HID_FILEDLG_PREVIEW_CB { HelpID = HID_FILEDLG_PREVIEW_CB; }; +hidspecial HID_FILEDLG_FILE { HelpID = HID_FILEDLG_FILE; }; +hidspecial HID_FILEDLG_MANAGER { HelpID = HID_FILEDLG_MANAGER; }; +hidspecial HID_FILEDLG_READ_ONLY { HelpID = HID_FILEDLG_READ_ONLY; }; +hidspecial HID_FILEDLG_STANDARD { HelpID = HID_FILEDLG_STANDARD; }; +hidspecial HID_FILEDLG_URL { HelpID = HID_FILEDLG_URL; }; +hidspecial HID_FILEDLG_USE_PASSWD { HelpID = HID_FILEDLG_USE_PASSWD; }; +hidspecial HID_FILEDLG_AUTOCOMPLETEBOX { HelpID = HID_FILEDLG_AUTOCOMPLETEBOX; }; +hidspecial HID_FILEDLG_SAVE_BTN { HelpID = HID_FILEDLG_SAVE_BTN; }; +hidspecial HID_FILEDLG_SAVE_FILENAME { HelpID = HID_FILEDLG_SAVE_FILENAME; }; +hidspecial HID_FILEDLG_SAVE_FILETYPE { HelpID = HID_FILEDLG_SAVE_FILETYPE; }; +hidspecial HID_FILEDLG_INSERT_BTN { HelpID = HID_FILEDLG_INSERT_BTN; }; +hidspecial HID_FILEDLG_PATH_BTN { HelpID = HID_FILEDLG_PATH_BTN; }; +hidspecial HID_FILEDLG_PATH_FILENAME { HelpID = HID_FILEDLG_PATH_FILENAME; }; +hidspecial HID_FILEDLG_FOLDER_BTN { HelpID = HID_FILEDLG_FOLDER_BTN; }; +hidspecial HID_FILEDLG_FOLDER_FILENAME { HelpID = HID_FILEDLG_FOLDER_FILENAME; }; +hidspecial HID_FILEDLG_SRCHFOLDER_BTN { HelpID = HID_FILEDLG_SRCHFOLDER_BTN; }; +hidspecial HID_FILEDLG_EDIT_FAVORITES_LISTBOX { HelpID = HID_FILEDLG_EDIT_FAVORITES_LISTBOX; }; +hidspecial HID_FILEDLG_EDIT_FAVORITES_HEADERBAR { HelpID = HID_FILEDLG_EDIT_FAVORITES_HEADERBAR; }; diff --git a/svtools/util/makefile.mk b/svtools/util/makefile.mk deleted file mode 100644 index f9c14a540410..000000000000 --- a/svtools/util/makefile.mk +++ /dev/null @@ -1,192 +0,0 @@ -#************************************************************************* -#* -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=.. - -PRJNAME=svtools -TARGET=svtool -RESTARGET=svt -RESTARGETPATCH=svp -GEN_HID=TRUE -GEN_HID_OTHER=TRUE -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -USE_LDUMP2=TRUE - -# --- general section ---------------------------------------------------- - -.IF "$(GUI)"!="UNX" -LIB2TARGET= $(LB)$/svtool.lib -LIB2FILES= $(LB)$/_svt.lib -.ENDIF - -LIB1TARGET= $(SLB)/svt.lib -LIB1FILES= \ - $(SLB)/browse.lib \ - $(SLB)/config.lib \ - $(SLB)/svcontnr.lib \ - $(SLB)/ctrl.lib \ - $(SLB)/dialogs.lib \ - $(SLB)/edit.lib \ - $(SLB)/filter.lib \ - $(SLB)/filter.uno.lib \ - $(SLB)$/graphic.lib \ - $(SLB)/igif.lib \ - $(SLB)/jpeg.lib \ - $(SLB)/ixpm.lib \ - $(SLB)/ixbm.lib \ - $(SLB)/wmf.lib \ - $(SLB)/java.lib \ - $(SLB)/misc.lib \ - $(SLB)/plugapp.lib \ - $(SLB)/svhtml.lib \ - $(SLB)/svrtf.lib \ - $(SLB)/table.lib \ - $(SLB)/unoiface.lib \ - $(SLB)/unowiz.lib \ - $(SLB)/urlobj.lib \ - $(SLB)/toolpanel.lib - -# generation of resourcen-lib ---------------------------------------- - -RESLIB1NAME= $(RESTARGET) -RESLIB1IMAGES=$(PRJ)$/res -RESLIB1SRSFILES= \ - $(SRS)$/filter.srs \ - $(SRS)$/misc.srs \ - $(SRS)$/ctrl.srs \ - $(SRS)$/dialogs.srs \ - $(SRS)$/plugapp.srs \ - $(SRS)$/svcontnr.srs \ - $(SRS)$/browse.srs \ - $(SRS)$/toolpanel.srs \ - $(SRS)$/javaerror.srs - -RESLIB3NAME= $(RESTARGETPATCH) -RESLIB3SRSFILES= \ - $(SRS)$/patchjavaerror.srs - -# build the shared library -------------------------------------------------- - -SHL1TARGET= svt$(DLLPOSTFIX) -SHL1IMPLIB= _svt -SHL1USE_EXPORTS=name - -.IF "$(OS)"!="MACOSX" -# static libraries -SHL1STDLIBS+= $(JPEG3RDLIB) -.ENDIF - -# dynamic libraries -SHL1STDLIBS+= \ - $(TKLIB) \ - $(VCLLIB) \ - $(SVLLIB) \ - $(SOTLIB) \ - $(BASEGFXLIB) \ - $(UNOTOOLSLIB) \ - $(TOOLSLIB) \ - $(I18NISOLANGLIB) \ - $(I18NUTILLIB) \ - $(UCBHELPERLIB) \ - $(COMPHELPERLIB) \ - $(CPPUHELPERLIB) \ - $(CPPULIB) \ - $(VOSLIB) \ - $(SALLIB) \ - $(ICUUCLIB) \ - $(JVMFWKLIB) - -.IF "$(OS)"=="MACOSX" -# static libraries go at end -SHL1STDLIBS+= $(JPEG3RDLIB) -.ENDIF - -.IF "$(GUI)"=="WNT" -SHL1STDLIBS+= \ - $(UWINAPILIB) \ - $(ADVAPI32LIB) \ - $(GDI32LIB) \ - $(OLE32LIB) \ - $(UUIDLIB) \ - $(ADVAPI32LIB) \ - $(OLEAUT32LIB) -.ENDIF # WNT - -SHL1LIBS= \ - $(SLB)$/svt.lib - -SHL1DEF= $(MISC)$/$(SHL1TARGET).def - -DEF1NAME= $(SHL1TARGET) -DEFLIB1NAME =svt -DEF1DES =SvTools - - -# --- g2g application -------------------------------------------------- - -APP2TARGET = g2g -APP2BASE = 0x10000000 -APP2DEPN = $(SHL1TARGETN) $(SHL2TARGETN) - -APP2OBJS = $(OBJ)$/g2g.obj - -.IF "$(GUI)"!="UNX" -APP2STDLIBS+= $(SVTOOLLIB) -.ELSE -APP2STDLIBS+= -lsvt$(DLLPOSTFIX) -APP2STDLIBS+= -lsvl$(DLLPOSTFIX) -.ENDIF - -APP2STDLIBS+= $(VCLLIB) \ - $(TOOLSLIB) \ - $(VOSLIB) \ - $(SALLIB) - -# --- Targets ------------------------------------------------------ - -.IF "$(GUI)"=="UNX" -SVTTARGETS= $(LB)$/lib$(SHL1TARGET)$(DLLPOST) -.ELSE -SVTTARGETS= $(BIN)$/$(SHL1TARGET)$(DLLPOST) -.ENDIF - -# just a quick fix - has to be cleaned up some day... -.IF "$(L10N-framework)"=="" -ALL: $(SLB)$/svt.lib \ - $(MISC)$/$(SHL1TARGET).def \ - $(SVTTARGETS) \ - ALLTAR -.ENDIF # "$(L10N-framework)"=="" - -.INCLUDE : target.mk - - diff --git a/svtools/util/svt.component b/svtools/util/svt.component new file mode 100644 index 000000000000..e15970547a38 --- /dev/null +++ b/svtools/util/svt.component @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* 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. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.SharedLibrary" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.comp.graphic.GraphicProvider"> + <service name="com.sun.star.graphic.GraphicProvider"/> + </implementation> + <implementation name="com.sun.star.comp.graphic.GraphicRendererVCL"> + <service name="com.sun.star.graphic.GraphicRendererVCL"/> + </implementation> + <implementation name="com.sun.star.comp.svtools.OAddressBookSourceDialogUno"> + <service name="com.sun.star.ui.AddressBookSourceDialog"/> + </implementation> + <implementation name="com.sun.star.comp.svtools.uno.Wizard"> + <service name="com.sun.star.ui.dialogs.Wizard"/> + </implementation> + <implementation name="com.sun.star.graphic.GraphicObject"> + <service name="com.sun.star.graphic.GraphicObject"/> + </implementation> + <implementation name="com.sun.star.svtools.SvFilterOptionsDialog"> + <service name="com.sun.star.ui.dialogs.FilterOptionsDialog"/> + </implementation> +</component> diff --git a/svtools/workben/cui/makefile.mk b/svtools/workben/cui/makefile.mk deleted file mode 100644 index 2c7d06682c77..000000000000 --- a/svtools/workben/cui/makefile.mk +++ /dev/null @@ -1,60 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=svtools -TARGET=cuidem -LIBTARGET=NO - -TARGETTYPE=CUI - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Files -------------------------------------------------------- - -OBJFILES= $(OBJ)$/loadlib.obj - -APP4TARGET= dllver -APP4STDLIBS= \ - $(SVTOOLLIB) \ - $(SVLLIB) \ - $(VCLLIB) \ - $(TOOLSLIB) \ - $(VOSLIB) \ - $(SALLIB) -.IF "$(GUI)"=="WNT" || "$(COM)"=="GCC" -APP4STDLIBS+= $(CPPULIB) -.ENDIF -APP4OBJS= $(OBJ)$/loadlib.obj - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/svtools/workben/makefile.mk b/svtools/workben/makefile.mk deleted file mode 100644 index 9e50208b9ee9..000000000000 --- a/svtools/workben/makefile.mk +++ /dev/null @@ -1,69 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=.. - -PRJNAME=svtools -TARGET=svdem -LIBTARGET=NO -TARGETTYPE=GUI -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Files -------------------------------------------------------- - -OBJFILES= $(OBJ)$/svdem.obj - -APP1TARGET= $(TARGET) -APP1STDLIBS= $(SVTOOLLIB) \ - $(VCLLIB) \ - $(UNOTOOLSLIB) \ - $(COMPHELPERLIB) \ - $(TOOLSLIB) \ - $(SALLIB) \ - $(VOSLIB) \ - $(CPPUHELPERLIB) \ - $(CPPULIB) - -APP1OBJS= $(OBJ)$/svdem.obj - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - -ALLTAR : $(BIN)$/applicat.rdb - -$(BIN)$/applicat.rdb : makefile.mk $(UNOUCRRDB) - rm -f $@ - $(GNUCOPY) $(UNOUCRRDB) $@ - cd $(BIN) && \ - regcomp -register -r applicat.rdb \ - -c i18nsearch.uno$(DLLPOST) \ - -c i18npool.uno$(DLLPOST) diff --git a/svtools/workben/toolpanel/makefile.mk b/svtools/workben/toolpanel/makefile.mk deleted file mode 100644 index e64e3cd8eccd..000000000000 --- a/svtools/workben/toolpanel/makefile.mk +++ /dev/null @@ -1,110 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2008 by Sun Microsystems, Inc. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.16 $ -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=svtools -TARGET=toolpaneltest -TARGETTYPE=GUI -LIBTARGET=NO - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Files -------------------------------------------------------- - -CXXFILES= toolpaneltest.cxx - -OBJFILES= $(OBJ)$/toolpaneltest.obj - -APP1TARGET= $(TARGET) -APP1OBJS= $(OBJFILES) -APP1STDLIBS=\ - $(VCLLIB) \ - $(UCBHELPERLIB) \ - $(SALLIB) \ - $(TOOLSLIB) \ - $(COMPHELPERLIB) \ - $(CPPUHELPERLIB) \ - $(CPPULIB) \ - $(BASEGFXLIB) \ - $(SVTOOLLIB) \ - -APP1RAPTH=BRAND - -.IF "$(GUI)"!="UNX" -APP1DEF= $(MISC)$/$(TARGET).def -.ENDIF - -.IF "$(COM)"=="GCC" -ADDOPTFILES=$(OBJ)$/toolpaneltest.obj -add_cflagscxx="-frtti -fexceptions" -.ENDIF - - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - - -# ------------------------------------------------------------------ -# MAC -# ------------------------------------------------------------------ - -.IF "$(GUI)" == "MAC" - -$(MISC)$/$(TARGET).def: makefile - echo Kein Def-File fuer Applikationen auf Mac -.ENDIF - - -# ------------------------------------------------------------------ -# Windows -# ------------------------------------------------------------------ - -.IF "$(GUI)" == "WIN" - -$(MISC)$/$(TARGET).def: makefile - echo NAME $(TARGET) >$@ - echo DESCRIPTION 'ToolPanel - Testprogramm' >>$@ - echo EXETYPE WINDOWS >>$@ - echo STUB 'winSTUB.EXE' >>$@ - echo PROTMODE >>$@ - echo CODE PRELOAD MOVEABLE DISCARDABLE >>$@ - echo DATA PRELOAD MOVEABLE MULTIPLE >>$@ - echo HEAPSIZE 8192 >>$@ - echo STACKSIZE 32768 >>$@ - -.ENDIF - diff --git a/svtools/workben/toolpanel/toolpaneltest.cxx b/svtools/workben/toolpanel/toolpaneltest.cxx index 6d044cee7c93..6542fe826587 100755 --- a/svtools/workben/toolpanel/toolpaneltest.cxx +++ b/svtools/workben/toolpanel/toolpaneltest.cxx @@ -145,7 +145,7 @@ public: // IToolPanel virtual ::rtl::OUString GetDisplayName() const; virtual Image GetImage() const; - virtual SmartId GetHelpID() const; + virtual rtl::OString GetHelpID() const; virtual void Activate( Window& i_rParentWindow ); virtual void Deactivate(); virtual void SetSizePixel( const Size& i_rPanelWindowSize ); @@ -272,9 +272,9 @@ Image ColoredPanel::GetImage() const } //----------------------------------------------------------------------------- -SmartId ColoredPanel::GetHelpID() const +rtl::OString ColoredPanel::GetHelpID() const { - return SmartId(); + return rtl::OString(); } //============================================================================= diff --git a/svtools/workben/treecontrol/makefile.mk b/svtools/workben/treecontrol/makefile.mk deleted file mode 100644 index 2558ed2c9a94..000000000000 --- a/svtools/workben/treecontrol/makefile.mk +++ /dev/null @@ -1,91 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=svtools -TARGET=treetest -LIBTARGET=NO -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Files -------------------------------------------------------- - -APP1NOSAL= TRUE -APP1TARGET= treetest -APP1OBJS= $(OBJ)$/treetest.obj -APP1STDLIBS=$(SOTLIB) \ - $(COMPHELPERLIB) \ - $(CPPULIB) \ - $(CPPUHELPERLIB) \ - $(SALLIB) - -# $(SVTOOLLIB) \ - -APP2DEF= $(MISC)$/treetest.def - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - - -# ------------------------------------------------------------------ -# Windows -# ------------------------------------------------------------------ - -.IF "$(GUI)" == "WIN" - -$(MISC)$/treetest.def: makefile.mk - echo NAME treetest >$@ - echo DESCRIPTION 'StarView - Testprogramm' >>$@ - echo EXETYPE WINDOWS >>$@ - echo STUB 'winSTUB.EXE' >>$@ - echo PROTMODE >>$@ - echo CODE PRELOAD MOVEABLE DISCARDABLE >>$@ - echo DATA PRELOAD MOVEABLE MULTIPLE >>$@ - echo HEAPSIZE 8192 >>$@ - echo STACKSIZE 32768 >>$@ - -.ENDIF - -ALLTAR : $(BIN)$/treetest.rdb - -$(BIN)$/treetest.rdb : makefile.mk $(UNOUCRRDB) - rm -f $@ - $(GNUCOPY) $(UNOUCRRDB) $@ - +cd $(BIN) && \ - regcomp -register -r treetest.rdb \ - -c i18nsearch.uno$(DLLPOST) \ - -c i18npool.uno$(DLLPOST) \ - -c connector.uno$(DLLPOST) \ - -c remotebridge.uno$(DLLPOST) \ - -c bridgefac.uno$(DLLPOST) \ - -c uuresolver.uno$(DLLPOST) \ - -c $(DLLPRE)tk$(DLLPOSTFIX)$(DLLPOST) diff --git a/svtools/workben/unodialog/makefile.mk b/svtools/workben/unodialog/makefile.mk deleted file mode 100644 index f18feffce5c3..000000000000 --- a/svtools/workben/unodialog/makefile.mk +++ /dev/null @@ -1,90 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. -PRJINC=$(PRJ)/inc -PRJNAME=svtools -TARGET=udlg -USE_DEFFILE=TRUE - -ENABLE_EXCEPTIONS=TRUE -VISIBILITY_HIDDEN=TRUE - -# --- Settings ---------------------------------- - -.INCLUDE : settings.mk - -# --- Files ------------------------------------- - -# ... resource files ............................ - -SRS1NAME=$(TARGET) -SRC1FILES = \ - roadmapskeleton.src - -# ... object files ............................ -SLOFILES= $(SLO)$/unodialogsample.obj \ - $(SLO)$/roadmapskeleton.obj \ - $(SLO)$/roadmapskeletonpages.obj \ - $(SLO)$/udlg_module.obj \ - $(SLO)$/udlg_services.obj \ - -# --- library ----------------------------------- - -SHL1TARGET=$(TARGET)$(DLLPOSTFIX) -SHL1VERSIONMAP=$(SOLARENV)/src/component.map - -SHL1STDLIBS= \ - $(CPPULIB) \ - $(CPPUHELPERLIB) \ - $(COMPHELPERLIB) \ - $(UNOTOOLSLIB) \ - $(TOOLSLIB) \ - $(SALLIB) \ - $(SVTOOLLIB) \ - $(VCLLIB) - -SHL1LIBS= $(SLB)$/$(TARGET).lib -SHL1IMPLIB= i$(TARGET) -SHL1DEPN= $(SHL1LIBS) -SHL1DEF= $(MISC)$/$(SHL1TARGET).def - -DEF1NAME= $(SHL1TARGET) - -# --- .res files ------------------------------- - -RES1FILELIST=\ - $(SRS)$/$(TARGET).srs - -RESLIB1NAME=$(TARGET) -RESLIB1IMAGES=$(PRJ)$/res -RESLIB1SRSFILES=$(RES1FILELIST) - -# --- Targets ---------------------------------- - -.INCLUDE : target.mk - diff --git a/svtools/workben/unodialog/roadmapskeleton.src b/svtools/workben/unodialog/roadmapskeleton.src index 797490273b5f..33728c700df6 100644 --- a/svtools/workben/unodialog/roadmapskeleton.src +++ b/svtools/workben/unodialog/roadmapskeleton.src @@ -31,6 +31,7 @@ // ----------------------------------------------------------------------------- ModalDialog DLG_ROADMAP_SKELETON { + HelpID = "svtools:ModalDialog:DLG_ROADMAP_SKELETON"; OutputSize = TRUE ; Moveable = TRUE; Closeable = TRUE ; @@ -61,24 +62,28 @@ ModalDialog DLG_ROADMAP_SKELETON TabPage TP_WELCOME { + HelpID = "svtools:TabPage:TP_WELCOME"; Size = MAP_APPFONT( TAB_PAGE_WIDTH, TAB_PAGE_HEIGHT ); Hide = TRUE; }; TabPage TP_PREPARE { + HelpID = "svtools:TabPage:TP_PREPARE"; Size = MAP_APPFONT( TAB_PAGE_WIDTH, TAB_PAGE_HEIGHT ); Hide = TRUE; }; TabPage TP_SETUP { + HelpID = "svtools:TabPage:TP_SETUP"; Size = MAP_APPFONT( TAB_PAGE_WIDTH, TAB_PAGE_HEIGHT ); Hide = TRUE; }; TabPage TP_FINISH { + HelpID = "svtools:TabPage:TP_FINISH"; Size = MAP_APPFONT( TAB_PAGE_WIDTH, TAB_PAGE_HEIGHT ); Hide = TRUE; }; |