diff options
author | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2010-12-23 10:01:58 +0100 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2010-12-23 10:01:58 +0100 |
commit | 48de44881b95b2ce90759e0485d3a96fe1c1f4db (patch) | |
tree | 9616f3de0aa7b09e04de84f07534ccc05ef412de /sfx2 | |
parent | eb77ace518782bcbc0ac29c03b58ca3811e25cf8 (diff) | |
parent | 794c821e4d48c34aa376cdc7b6ab2cb029d9574d (diff) |
undoapi: merged after pulling DEV300_m96. Most probably still not buildable:A number of changes which happened in the CWS need to be redone due to the new build system
Diffstat (limited to 'sfx2')
155 files changed, 1753 insertions, 3743 deletions
diff --git a/sfx2/AllLangResTarget_sfx2.mk b/sfx2/AllLangResTarget_sfx2.mk new file mode 100644 index 000000000000..aa3270e08a07 --- /dev/null +++ b/sfx2/AllLangResTarget_sfx2.mk @@ -0,0 +1,79 @@ +#************************************************************************* +# +# 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,sfx)) + +$(eval $(call gb_AllLangResTarget_set_reslocation,sfx,sfx2)) + +$(eval $(call gb_AllLangResTarget_add_srs,sfx,\ + sfx/res \ +)) + +$(eval $(call gb_SrsTarget_SrsTarget,sfx/res)) + +$(eval $(call gb_SrsTarget_set_include,sfx/res,\ + $$(INCLUDE) \ + -I$(OUTDIR)/inc \ + -I$(WORKDIR)/inc \ + -I$(SRCDIR)/sfx2/source/dialog \ + -I$(SRCDIR)/sfx2/source/inc \ + -I$(SRCDIR)/sfx2/inc/ \ + -I$(SRCDIR)/sfx2/inc/sfx \ +)) + +$(eval $(call gb_SrsTarget_add_files,sfx/res,\ + sfx2/source/appl/app.src \ + sfx2/source/appl/dde.src \ + sfx2/source/appl/newhelp.src \ + sfx2/source/appl/sfx.src \ + sfx2/source/bastyp/bastyp.src \ + sfx2/source/bastyp/fltfnc.src \ + sfx2/source/dialog/alienwarn.src \ + sfx2/source/dialog/dialog.src \ + sfx2/source/dialog/dinfdlg.src \ + sfx2/source/dialog/dinfedt.src \ + sfx2/source/dialog/filedlghelper.src \ + sfx2/source/dialog/mailwindow.src \ + sfx2/source/dialog/mgetempl.src \ + sfx2/source/dialog/newstyle.src \ + sfx2/source/dialog/passwd.src \ + sfx2/source/dialog/printopt.src \ + sfx2/source/dialog/recfloat.src \ + sfx2/source/dialog/srchdlg.src \ + sfx2/source/dialog/templdlg.src \ + sfx2/source/dialog/versdlg.src \ + sfx2/source/doc/doc.src \ + sfx2/source/doc/doctdlg.src \ + sfx2/source/doc/doctempl.src \ + sfx2/source/doc/docvor.src \ + sfx2/source/doc/graphhelp.src \ + sfx2/source/doc/new.src \ + sfx2/source/menu/menu.src \ + sfx2/source/view/view.src \ +)) + + diff --git a/sfx2/Library_qstart.mk b/sfx2/Library_qstart.mk new file mode 100755 index 000000000000..6ed99271d353 --- /dev/null +++ b/sfx2/Library_qstart.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,qstart_gtk)) + +$(eval $(call gb_Library_set_include,qstart_gtk,\ + $$(INCLUDE) \ + -I$(SRCDIR)/sfx2/inc \ + -I$(SRCDIR)/sfx2/inc/sfx2 \ + -I$(SRCDIR)/sfx2/inc/pch \ + -I$(OUTDIR)/inc/offuh \ + -I$(OUTDIR)/inc \ + $(filter -I%,$(GTK_CFLAGS)) \ +)) + +$(eval $(call gb_Library_set_defs,qstart_gtk,\ + $$(DEFS) \ + -DDLL_NAME=$(notdir $(call gb_Library_get_target,sfx2)) \ + -DENABLE_QUICKSTART_APPLET \ +)) + +$(eval $(call gb_Library_set_cflags,qstart_gtk,\ + $$(CFLAGS) \ + $(filter-out -I%,$(GTK_CFLAGS)) \ +)) + +$(eval $(call gb_Library_set_ldflags,qstart_gtk,\ + $$(LDFLAGS) \ + $(GTK_LIBS) \ +)) + +$(eval $(call gb_Library_add_linked_libs,qstart_gtk,\ + comphelper \ + cppu \ + cppuhelper \ + fwe \ + i18nisolang1 \ + sal \ + sax \ + sb \ + sot \ + stl \ + svl \ + svt \ + tk \ + tl \ + ucbhelper \ + utl \ + vcl \ + vos3 \ + xml2 \ + eggtray \ + sfx \ +)) + +$(eval $(call gb_Library_add_linked_system_libs,qstart_gtk,\ + dl \ + icuuc \ + m \ + pthread \ +)) + +$(eval $(call gb_Library_add_exception_objects,qstart_gtk,\ + sfx2/source/appl/shutdowniconunx \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/sfx2/Library_sfx.mk b/sfx2/Library_sfx.mk new file mode 100755 index 000000000000..ed941d5b9a9f --- /dev/null +++ b/sfx2/Library_sfx.mk @@ -0,0 +1,309 @@ +#************************************************************************* +# +# 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,sfx)) + +$(eval $(call gb_Library_add_package_headers,sfx,\ + sfx2_inc \ + sfx2_sdi \ +)) + +$(eval $(call gb_Library_add_precompiled_header,sfx,$(SRCDIR)/sfx2/inc/pch/precompiled_sfx2)) + +$(eval $(call gb_Library_add_sdi_headers,sfx,sfx2/sdi/sfxslots)) + +$(eval $(call gb_Library_set_componentfile,sfx,sfx2/util/sfx)) + +$(eval $(call gb_Library_set_include,sfx,\ + -I$(SRCDIR)/sfx2/inc \ + -I$(SRCDIR)/sfx2/inc/sfx2 \ + -I$(SRCDIR)/sfx2/source/inc \ + -I$(SRCDIR)/sfx2/inc/pch \ + -I$(WORKDIR)/SdiTarget/sfx2/sdi \ + -I$(WORKDIR)/inc/ \ + $$(INCLUDE) \ + -I$(OUTDIR)/inc/offuh \ + -I$(OUTDIR)/inc \ + $(LIBXML_CFLAGS) \ +)) + +$(eval $(call gb_Library_set_defs,sfx,\ + $$(DEFS) \ + -DSFX2_DLLIMPLEMENTATION \ + -DABOUTBMPNAMES="$(ABOUTBITMAPS)" \ +)) + +$(eval $(call gb_Library_add_linked_libs,sfx,\ + comphelper \ + cppu \ + cppuhelper \ + fwe \ + i18nisolang1 \ + sal \ + sax \ + sb \ + sot \ + stl \ + svl \ + svt \ + tk \ + tl \ + ucbhelper \ + utl \ + vcl \ + vos3 \ + xml2 \ +)) + +$(eval $(call gb_Library_add_linked_system_libs,sfx,\ + icuuc \ + dl \ + m \ + pthread \ +)) + +$(eval $(call gb_Library_add_exception_objects,sfx,\ + sfx2/source/appl/app \ + sfx2/source/appl/appbas \ + sfx2/source/appl/appbaslib \ + sfx2/source/appl/appcfg \ + sfx2/source/appl/appchild \ + sfx2/source/appl/appdata \ + sfx2/source/appl/appdde \ + sfx2/source/appl/appinit \ + sfx2/source/appl/appmain \ + sfx2/source/appl/appmisc \ + sfx2/source/appl/appopen \ + sfx2/source/appl/appquit \ + sfx2/source/appl/appreg \ + sfx2/source/appl/appserv \ + sfx2/source/appl/appuno \ + sfx2/source/appl/childwin \ + sfx2/source/appl/fileobj \ + sfx2/source/appl/fwkhelper \ + sfx2/source/appl/helpdispatch \ + sfx2/source/appl/helpinterceptor \ + sfx2/source/appl/imagemgr \ + sfx2/source/appl/imestatuswindow \ + sfx2/source/appl/impldde \ + sfx2/source/appl/linkmgr2 \ + sfx2/source/appl/linksrc \ + sfx2/source/appl/lnkbase2 \ + sfx2/source/appl/module \ + sfx2/source/appl/newhelp \ + sfx2/source/appl/opengrf \ + sfx2/source/appl/sfxhelp \ + sfx2/source/appl/sfxpicklist \ + sfx2/source/appl/shutdownicon \ + sfx2/source/appl/workwin \ + sfx2/source/appl/xpackcreator \ + sfx2/source/bastyp/bitset \ + sfx2/source/bastyp/fltfnc \ + sfx2/source/bastyp/fltlst \ + sfx2/source/bastyp/frmhtml \ + sfx2/source/bastyp/frmhtmlw \ + sfx2/source/bastyp/helper \ + sfx2/source/bastyp/mieclip \ + sfx2/source/bastyp/minarray \ + sfx2/source/bastyp/misc \ + sfx2/source/bastyp/progress \ + sfx2/source/bastyp/sfxhtml \ + sfx2/source/bastyp/sfxresid \ + sfx2/source/config/evntconf \ + sfx2/source/control/bindings \ + sfx2/source/control/ctrlitem \ + sfx2/source/control/dispatch \ + sfx2/source/control/macrconf \ + sfx2/source/control/macro \ + sfx2/source/control/minfitem \ + sfx2/source/control/msg \ + sfx2/source/control/msgpool \ + sfx2/source/control/objface \ + sfx2/source/control/querystatus \ + sfx2/source/control/request \ + sfx2/source/control/sfxstatuslistener \ + sfx2/source/control/shell \ + sfx2/source/control/sorgitm \ + sfx2/source/control/statcach \ + sfx2/source/control/unoctitm \ + sfx2/source/dialog/about \ + sfx2/source/dialog/alienwarn \ + sfx2/source/dialog/basedlgs \ + sfx2/source/dialog/dinfdlg \ + sfx2/source/dialog/dinfedt \ + sfx2/source/dialog/dockwin \ + sfx2/source/dialog/filedlghelper \ + sfx2/source/dialog/filtergrouping \ + sfx2/source/dialog/intro \ + sfx2/source/dialog/itemconnect \ + sfx2/source/dialog/mailmodel \ + sfx2/source/dialog/mgetempl \ + sfx2/source/dialog/navigat \ + sfx2/source/dialog/newstyle \ + sfx2/source/dialog/partwnd \ + sfx2/source/dialog/passwd \ + sfx2/source/dialog/printopt \ + sfx2/source/dialog/recfloat \ + sfx2/source/dialog/securitypage \ + sfx2/source/dialog/sfxdlg \ + sfx2/source/dialog/splitwin \ + sfx2/source/dialog/srchdlg \ + sfx2/source/dialog/styfitem \ + sfx2/source/dialog/styledlg \ + sfx2/source/dialog/tabdlg \ + sfx2/source/dialog/taskpane \ + sfx2/source/dialog/templdlg \ + sfx2/source/dialog/titledockwin \ + sfx2/source/dialog/tplcitem \ + sfx2/source/dialog/tplpitem \ + sfx2/source/dialog/versdlg \ + sfx2/source/doc/DocumentMetadataAccess \ + sfx2/source/doc/Metadatable \ + sfx2/source/doc/QuerySaveDocument \ + sfx2/source/doc/SfxDocumentMetaData \ + sfx2/source/doc/docfac \ + sfx2/source/doc/docfile \ + sfx2/source/doc/docfilt \ + sfx2/source/doc/docinf \ + sfx2/source/doc/docinsert \ + sfx2/source/doc/docmacromode \ + sfx2/source/doc/docstoragemodifylistener \ + sfx2/source/doc/doctdlg \ + sfx2/source/doc/doctempl \ + sfx2/source/doc/doctemplates \ + sfx2/source/doc/doctemplateslocal \ + sfx2/source/doc/docvor \ + sfx2/source/doc/frmdescr \ + sfx2/source/doc/graphhelp \ + sfx2/source/doc/guisaveas \ + sfx2/source/doc/iframe \ + sfx2/source/doc/new \ + sfx2/source/doc/objcont \ + sfx2/source/doc/objembed \ + sfx2/source/doc/objitem \ + sfx2/source/doc/objmisc \ + sfx2/source/doc/objserv \ + sfx2/source/doc/objstor \ + sfx2/source/doc/objuno \ + sfx2/source/doc/objxtor \ + sfx2/source/doc/oleprops \ + sfx2/source/doc/ownsubfilterservice \ + sfx2/source/doc/plugin \ + sfx2/source/doc/printhelper \ + sfx2/source/doc/querytemplate \ + sfx2/source/doc/sfxbasemodel \ + sfx2/source/doc/sfxmodelfactory \ + sfx2/source/doc/syspath \ + sfx2/source/explorer/nochaos \ + sfx2/source/inet/inettbc \ + sfx2/source/menu/mnuitem \ + sfx2/source/menu/mnumgr \ + sfx2/source/menu/objmnctl \ + sfx2/source/menu/thessubmenu \ + sfx2/source/menu/virtmenu \ + sfx2/source/notify/eventsupplier \ + sfx2/source/notify/hintpost \ + sfx2/source/statbar/stbitem \ + sfx2/source/toolbox/imgmgr \ + sfx2/source/toolbox/tbxitem \ + sfx2/source/view/frame \ + sfx2/source/view/frame2 \ + sfx2/source/view/frmload \ + sfx2/source/view/ipclient \ + sfx2/source/view/orgmgr \ + sfx2/source/view/printer \ + sfx2/source/view/sfxbasecontroller \ + sfx2/source/view/userinputinterception \ + sfx2/source/view/viewfac \ + sfx2/source/view/viewfrm \ + sfx2/source/view/viewfrm2 \ + sfx2/source/view/viewprn \ + sfx2/source/view/viewsh \ +)) + +$(eval $(call gb_SdiTarget_SdiTarget,sfx2/sdi/sfxslots,sfx2/sdi/sfx)) + +$(eval $(call gb_SdiTarget_set_include,sfx2/sdi/sfxslots,\ + $$(INCLUDE) \ + -I$(SRCDIR)/sfx2/inc/sfx2 \ + -I$(SRCDIR)/sfx2/inc \ + -I$(SRCDIR)/sfx2/sdi \ +)) + +ifeq ($(OS),$(filter WNT MACOSX,$(OS))) +$(eval $(call gb_Library_set_defs,sfx,\ + $$(DEFS) \ + -DENABLE_QUICKSTART_APPLET \ +)) +endif + +ifeq ($(OS),OS2) +$(eval $(call gb_Library_add_exception_objects,sfx,\ + sfx2/source/appl/shutdowniconOs2.ob \ +)) +endif +ifeq ($(OS),MACOSX) +$(eval $(call gb_Library_add_objcxxobjects,sfx,\ + sfx2/source/appl/shutdowniconaqua \ +)) +$(eval $(call gb_Library_add_linked_libs,sfx,\ + objc \ + Cocoa \ +)) +endif +ifeq ($(OS),WNT) +# workaround: disable PCH for these objects to avoid redeclaration +# errors - needs to be fixed in module tools +$(eval $(call gb_Library_add_cxxobjects,sfx,\ + sfx2/source/appl/shutdowniconw32 \ + sfx2/source/doc/sfxacldetect \ + sfx2/source/doc/syspathw32 \ + , $(gb_LinkTarget_EXCEPTIONFLAGS) -nologo -UPRECOMPILED_HEADERS \ +)) + +$(eval $(call gb_Library_add_linked_libs,sfx,\ + advapi32 \ + gdi32 \ + kernel32 \ + msvcrt \ + oldnames \ + ole32 \ + shell32 \ + user32 \ + uuid \ + uwinapi \ +)) +else +$(eval $(call gb_Library_add_cxxobjects,sfx,\ + sfx2/source/appl/shutdowniconw32 \ + sfx2/source/doc/sfxacldetect \ + , $(gb_LinkTarget_EXCEPTIONFLAGS) \ +)) + +endif +# vim: set noet sw=4 ts=4: + diff --git a/sfx2/source/inet/makefile.mk b/sfx2/Makefile index 9347e68a2cdb..a79aff831024 100644 --- a/sfx2/source/inet/makefile.mk +++ b/sfx2/Makefile @@ -25,24 +25,14 @@ # #************************************************************************* -PRJ=..$/.. +ifeq ($(strip $(SOLARENV)),) +$(error No environment set!) +endif -PRJNAME=sfx2 -TARGET=inet -ENABLE_EXCEPTIONS=TRUE +gb_PARTIALBUILD := T +GBUILDDIR := $(SOLARENV)/gbuild +include $(GBUILDDIR)/gbuild.mk -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - - -SLOFILES = \ - $(SLO)$/inettbc.obj - -# --- Targets ------------------------------------------------------- - -.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/sfx2/inc/makefile.mk b/sfx2/Module_sfx2.mk index b7aa547e2c79..f6ac7c4c053e 100644..100755 --- a/sfx2/inc/makefile.mk +++ b/sfx2/Module_sfx2.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,42 @@ # # 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=sfx2 -TARGET=inc +$(eval $(call gb_Module_Module,sfx2)) -# --- Settings ----------------------------------------------------- +$(eval $(call gb_Module_add_targets,sfx2,\ + AllLangResTarget_sfx2 \ + Library_sfx \ + Package_inc \ + Package_sdi \ +)) -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk +ifeq ($(OS),LINUX) +ifeq ($(ENABLE_SYSTRAY_GTK),TRUE) +$(eval $(call gb_Module_add_targets,sfx2,\ + Library_qstart \ +)) +endif +endif -# --- Files -------------------------------------------------------- -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - -.IF "$(ENABLE_PCH)"!="" -ALLTAR : \ - $(SLO)$/precompiled.pch \ - $(SLO)$/precompiled_ex.pch - -.ENDIF # "$(ENABLE_PCH)"!="" +#todo: map file? +#todo: source/appl ohne Optimierung? +#todo: source/control ohne Optimierung? +#todo: source/dialog BUILD_VER_STRING +#todo: source/doc SYSTEM_LIBXML2 +#todo: noopt for acldetect.cxx? +#todo: ENABLE_LAYOUT +#todo: quickstarter +#todo: link against cocoa on Mac +# vim: set noet sw=4 ts=4: diff --git a/sfx2/Package_inc.mk b/sfx2/Package_inc.mk new file mode 100644 index 000000000000..6ad8b0209c4e --- /dev/null +++ b/sfx2/Package_inc.mk @@ -0,0 +1,138 @@ +#************************************************************************* +# +# 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,sfx2_inc,$(SRCDIR)/sfx2/inc)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/DocumentMetadataAccess.hxx,sfx2/DocumentMetadataAccess.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/Metadatable.hxx,sfx2/Metadatable.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/QuerySaveDocument.hxx,sfx2/QuerySaveDocument.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/XmlIdRegistry.hxx,sfx2/XmlIdRegistry.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/app.hxx,sfx2/app.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/app.hxx,sfx2/app.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/appuno.hxx,sfx2/appuno.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/basedlgs.hxx,sfx2/basedlgs.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/basmgr.hxx,sfx2/basmgr.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/bindings.hxx,sfx2/bindings.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/brokenpackageint.hxx,sfx2/brokenpackageint.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/chalign.hxx,sfx2/chalign.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/childwin.hxx,sfx2/childwin.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/cntids.hrc,sfx2/cntids.hrc)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/controlwrapper.hxx,sfx2/controlwrapper.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/ctrlitem.hxx,sfx2/ctrlitem.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/dialogs.hrc,sfx2/dialogs.hrc)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/dinfdlg.hxx,sfx2/dinfdlg.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/dinfedt.hxx,sfx2/dinfedt.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/dispatch.hxx,sfx2/dispatch.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/dllapi.h,sfx2/dllapi.h)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/docfac.hxx,sfx2/docfac.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/docfile.hxx,sfx2/docfile.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/docfilt.hxx,sfx2/docfilt.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/docinf.hxx,sfx2/docinf.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/docinsert.hxx,sfx2/docinsert.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/dockwin.hxx,sfx2/dockwin.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/docmacromode.hxx,sfx2/docmacromode.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/docstoragemodifylistener.hxx,sfx2/docstoragemodifylistener.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/doctdlg.hxx,sfx2/doctdlg.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/doctempl.hxx,sfx2/doctempl.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/event.hxx,sfx2/event.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/evntconf.hxx,sfx2/evntconf.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/fcontnr.hxx,sfx2/fcontnr.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/filedlghelper.hxx,sfx2/filedlghelper.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/frame.hxx,sfx2/frame.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/frmdescr.hxx,sfx2/frmdescr.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/frmhtml.hxx,sfx2/frmhtml.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/frmhtmlw.hxx,sfx2/frmhtmlw.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/genlink.hxx,sfx2/genlink.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/hintpost.hxx,sfx2/hintpost.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/htmlmode.hxx,sfx2/htmlmode.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/imagemgr.hxx,sfx2/imagemgr.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/imgdef.hxx,sfx2/imgdef.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/imgmgr.hxx,sfx2/imgmgr.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/ipclient.hxx,sfx2/ipclient.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/itemconnect.hxx,sfx2/itemconnect.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/itemwrapper.hxx,sfx2/itemwrapper.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/layout-post.hxx,sfx2/layout-post.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/layout-pre.hxx,sfx2/layout-pre.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/layout-tabdlg.hxx,sfx2/layout-tabdlg.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/layout.hxx,sfx2/layout.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/linkmgr.hxx,sfx2/linkmgr.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/linksrc.hxx,sfx2/linksrc.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/lnkbase.hxx,sfx2/lnkbase.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/macrconf.hxx,sfx2/macrconf.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/mailmodelapi.hxx,sfx2/mailmodelapi.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/mgetempl.hxx,sfx2/mgetempl.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/mieclip.hxx,sfx2/mieclip.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/minarray.hxx,sfx2/minarray.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/minfitem.hxx,sfx2/minfitem.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/minstack.hxx,sfx2/minstack.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/mnuitem.hxx,sfx2/mnuitem.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/mnumgr.hxx,sfx2/mnumgr.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/module.hxx,sfx2/module.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/msg.hxx,sfx2/msg.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/msgpool.hxx,sfx2/msgpool.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/navigat.hxx,sfx2/navigat.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/new.hxx,sfx2/new.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/newstyle.hxx,sfx2/newstyle.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/objface.hxx,sfx2/objface.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/objitem.hxx,sfx2/objitem.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/objsh.hxx,sfx2/objsh.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/opengrf.hxx,sfx2/opengrf.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/passwd.hxx,sfx2/passwd.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/printer.hxx,sfx2/printer.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/printopt.hxx,sfx2/printopt.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/prnmon.hxx,sfx2/prnmon.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/progress.hxx,sfx2/progress.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/querystatus.hxx,sfx2/querystatus.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/request.hxx,sfx2/request.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfx.hrc,sfx2/sfx.hrc)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxbasecontroller.hxx,sfx2/sfxbasecontroller.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxbasemodel.hxx,sfx2/sfxbasemodel.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxcommands.h,sfx2/sfxcommands.h)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxdefs.hxx,sfx2/sfxdefs.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxdlg.hxx,sfx2/sfxdlg.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxhelp.hxx,sfx2/sfxhelp.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxhtml.hxx,sfx2/sfxhtml.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxmodelfactory.hxx,sfx2/sfxmodelfactory.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxresid.hxx,sfx2/sfxresid.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxsids.hrc,sfx2/sfxsids.hrc)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxstatuslistener.hxx,sfx2/sfxstatuslistener.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/sfxuno.hxx,sfx2/sfxuno.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/shell.hxx,sfx2/shell.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/signaturestate.hxx,sfx2/signaturestate.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/stbitem.hxx,sfx2/stbitem.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/styfitem.hxx,sfx2/styfitem.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/styledlg.hxx,sfx2/styledlg.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/tabdlg.hxx,sfx2/tabdlg.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/taskpane.hxx,sfx2/taskpane.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/tbxctrl.hxx,sfx2/tbxctrl.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/templdlg.hxx,sfx2/templdlg.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/titledockwin.hxx,sfx2/titledockwin.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/tplpitem.hxx,sfx2/tplpitem.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/unoctitm.hxx,sfx2/unoctitm.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/userinputinterception.hxx,sfx2/userinputinterception.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/viewfac.hxx,sfx2/viewfac.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/viewfrm.hxx,sfx2/viewfrm.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/viewsh.hxx,sfx2/viewsh.hxx)) diff --git a/sfx2/source/explorer/makefile.mk b/sfx2/Package_sdi.mk index 75a15ebdb862..63f2138adf4f 100644 --- a/sfx2/source/explorer/makefile.mk +++ b/sfx2/Package_sdi.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,34 +14,17 @@ # # 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=sfx2 -TARGET=explorer -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/nochaos.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - +$(eval $(call gb_Package_Package,sfx2_sdi,$(SRCDIR)/sfx2/sdi)) +$(eval $(call gb_Package_add_file,sfx2_sdi,inc/sfx2/sfx.sdi,sfx.sdi)) +$(eval $(call gb_Package_add_file,sfx2_sdi,inc/sfx2/sfxitems.sdi,sfxitems.sdi)) diff --git a/sfx2/inc/brokenpackageint.hxx b/sfx2/inc/brokenpackageint.hxx deleted file mode 100755 index 16f332480cf6..000000000000 --- a/sfx2/inc/brokenpackageint.hxx +++ /dev/null @@ -1,101 +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 "sal/config.h" -#include "sfx2/dllapi.h" -#include <com/sun/star/document/BrokenPackageRequest.hpp> -#include <com/sun/star/task/XInteractionApprove.hpp> -#include <com/sun/star/task/XInteractionDisapprove.hpp> -#include <framework/interaction.hxx> - -using namespace ::framework; -typedef ContinuationBase< ::com::sun::star::task::XInteractionApprove > SfxContinuationApprove; -typedef ContinuationBase< ::com::sun::star::task::XInteractionDisapprove > SfxContinuationDisapprove; - -class SFX2_DLLPUBLIC RequestPackageReparation : - public ::com::sun::star::task::XInteractionRequest, - public ::cppu::OWeakObject -{ - ::com::sun::star::uno::Any m_aRequest; - - ::com::sun::star::uno::Sequence< - ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > - > m_lContinuations; - - SfxContinuationApprove* m_pApprove; - SfxContinuationDisapprove* m_pDisapprove; - -public: - RequestPackageReparation( ::rtl::OUString aName ); - - // XInterface / OWeakObject - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL acquire( ) throw (); - virtual void SAL_CALL release( ) throw (); - - sal_Bool isApproved() { return m_pApprove->isSelected(); } - - virtual ::com::sun::star::uno::Any SAL_CALL getRequest() - throw( ::com::sun::star::uno::RuntimeException ); - - virtual ::com::sun::star::uno::Sequence< - ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > - > SAL_CALL getContinuations() - throw( ::com::sun::star::uno::RuntimeException ); -}; - -class SFX2_DLLPUBLIC NotifyBrokenPackage : - public ::com::sun::star::task::XInteractionRequest, - public ::cppu::OWeakObject -{ - ::com::sun::star::uno::Any m_aRequest; - - ::com::sun::star::uno::Sequence< - ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > - > m_lContinuations; - - ContinuationAbort* m_pAbort; - -public: - NotifyBrokenPackage( ::rtl::OUString aName ); - - // XInterface / OWeakObject - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL acquire( ) throw (); - virtual void SAL_CALL release( ) throw (); - - sal_Bool isAborted() { return m_pAbort->isSelected(); } - - virtual ::com::sun::star::uno::Any SAL_CALL getRequest() - throw( ::com::sun::star::uno::RuntimeException ); - - virtual ::com::sun::star::uno::Sequence< - ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > - > SAL_CALL getContinuations() - throw( ::com::sun::star::uno::RuntimeException ); -}; - diff --git a/sfx2/inc/guisaveas.hxx b/sfx2/inc/guisaveas.hxx index a317b5796232..b10ed6c90819 100644 --- a/sfx2/inc/guisaveas.hxx +++ b/sfx2/inc/guisaveas.hxx @@ -79,12 +79,6 @@ public: ::rtl::OUString aUserSelectedName, sal_uInt16 nDocumentSignatureState = SIGNATURESTATE_NOSIGNATURES ); - static ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SearchForFilter( - const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerQuery >& xFilterQuery, - const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& aSearchRequest, - sal_Int32 nMustFlags, - sal_Int32 nDontFlags ); - static sal_Bool CheckFilterOptionsAppearence( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& xFilterCFG, const ::rtl::OUString& aFilterName ); diff --git a/sfx2/inc/QuerySaveDocument.hxx b/sfx2/inc/sfx2/QuerySaveDocument.hxx index e25d1a23082c..e25d1a23082c 100644 --- a/sfx2/inc/QuerySaveDocument.hxx +++ b/sfx2/inc/sfx2/QuerySaveDocument.hxx diff --git a/sfx2/inc/basmgr.hxx b/sfx2/inc/sfx2/basmgr.hxx index 7156be8f8327..0227ad6515ec 100644 --- a/sfx2/inc/basmgr.hxx +++ b/sfx2/inc/sfx2/basmgr.hxx @@ -28,8 +28,7 @@ #ifndef _SFX_BASMGR_HXX #define _SFX_BASMGR_HXX -#ifndef _BASMGR_HXX_ #include <basic/basmgr.hxx> -#endif +#include <svtools/svtools.hrc> #endif //_SFX_BASMGR_HXX diff --git a/sfx2/inc/sfx2/brokenpackageint.hxx b/sfx2/inc/sfx2/brokenpackageint.hxx new file mode 100755 index 000000000000..5186e875a6ea --- /dev/null +++ b/sfx2/inc/sfx2/brokenpackageint.hxx @@ -0,0 +1,55 @@ +/************************************************************************* + * + * 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 "sal/config.h" +#include "sfx2/dllapi.h" +#include <com/sun/star/document/BrokenPackageRequest.hpp> +#include <com/sun/star/task/XInteractionApprove.hpp> +#include <com/sun/star/task/XInteractionDisapprove.hpp> + +class RequestPackageReparation_Impl; +class SFX2_DLLPUBLIC RequestPackageReparation +{ + RequestPackageReparation_Impl* pImp; +public: + RequestPackageReparation( ::rtl::OUString aName ); + ~RequestPackageReparation(); + sal_Bool isApproved(); + com::sun::star::uno::Reference < ::com::sun::star::task::XInteractionRequest > GetRequest(); +}; + +class NotifyBrokenPackage_Impl; +class SFX2_DLLPUBLIC NotifyBrokenPackage +{ + NotifyBrokenPackage_Impl* pImp; +public: + NotifyBrokenPackage( ::rtl::OUString aName ); + ~NotifyBrokenPackage(); + sal_Bool isAborted(); + com::sun::star::uno::Reference < ::com::sun::star::task::XInteractionRequest > GetRequest(); +}; + diff --git a/sfx2/inc/dinfedt.hxx b/sfx2/inc/sfx2/dinfedt.hxx index 64ad32cb1337..64ad32cb1337 100644 --- a/sfx2/inc/dinfedt.hxx +++ b/sfx2/inc/sfx2/dinfedt.hxx diff --git a/sfx2/inc/sfx2/docfilt.hxx b/sfx2/inc/sfx2/docfilt.hxx index f024fdb07c06..83bad4d1d01c 100644 --- a/sfx2/inc/sfx2/docfilt.hxx +++ b/sfx2/inc/sfx2/docfilt.hxx @@ -37,42 +37,7 @@ #include <com/sun/star/uno/RuntimeException.hpp> #include <tools/wldcrd.hxx> -// TODO/LATER: The flags should be part of the UNO specification -#define SFX_FILTER_IMPORT 0x00000001L -#define SFX_FILTER_EXPORT 0x00000002L -#define SFX_FILTER_TEMPLATE 0x00000004L -#define SFX_FILTER_INTERNAL 0x00000008L -#define SFX_FILTER_TEMPLATEPATH 0x00000010L -#define SFX_FILTER_OWN 0x00000020L -#define SFX_FILTER_ALIEN 0x00000040L -#define SFX_FILTER_USESOPTIONS 0x00000080L - -#define SFX_FILTER_DEFAULT 0x00000100L -#define SFX_FILTER_EXECUTABLE 0x00000200L -#define SFX_FILTER_SUPPORTSSELECTION 0x00000400L -#define SFX_FILTER_MAPTOAPPPLUG 0x00000800L -#define SFX_FILTER_NOTINFILEDLG 0x00001000L -#define SFX_FILTER_NOTINCHOOSER 0x00002000L -#define SFX_FILTER_ASYNC 0x00004000L -// Legt Objekt nur an, kein Laden -#define SFX_FILTER_CREATOR 0x00008000L -#define SFX_FILTER_OPENREADONLY 0x00010000L -#define SFX_FILTER_MUSTINSTALL 0x00020000L -#define SFX_FILTER_CONSULTSERVICE 0x00040000L - -#define SFX_FILTER_STARONEFILTER 0x00080000L -#define SFX_FILTER_PACKED 0x00100000L -#define SFX_FILTER_SILENTEXPORT 0x00200000L - -#define SFX_FILTER_BROWSERPREFERED 0x00400000L - -#define SFX_FILTER_ENCRYPTION 0x01000000L -#define SFX_FILTER_PASSWORDTOMODIFY 0x02000000L - -#define SFX_FILTER_PREFERED 0x10000000L - -#define SFX_FILTER_VERSION_NONE 0 -#define SFX_FILTER_NOTINSTALLED SFX_FILTER_MUSTINSTALL | SFX_FILTER_CONSULTSERVICE +#include <comphelper/documentconstants.hxx> #include <sfx2/sfxdefs.hxx> diff --git a/sfx2/inc/docinsert.hxx b/sfx2/inc/sfx2/docinsert.hxx index c4e4be12185e..c4e4be12185e 100644 --- a/sfx2/inc/docinsert.hxx +++ b/sfx2/inc/sfx2/docinsert.hxx diff --git a/sfx2/inc/sfx2/event.hxx b/sfx2/inc/sfx2/event.hxx index 71ae9c182fb3..b9beb12bfeff 100644 --- a/sfx2/inc/sfx2/event.hxx +++ b/sfx2/inc/sfx2/event.hxx @@ -36,6 +36,7 @@ #include <com/sun/star/uno/Sequence.hxx> #include <com/sun/star/beans/PropertyValue.hpp> +#include <com/sun/star/frame/XController2.hpp> class SfxObjectShell; @@ -67,6 +68,29 @@ public: //------------------------------------------------------------------- +class SFX2_DLLPUBLIC SfxViewEventHint : public SfxEventHint +{ + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController2 > xViewController; + +public: + TYPEINFO(); + + SfxViewEventHint( USHORT nId, const ::rtl::OUString& aName, SfxObjectShell *pObj, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController >& xController ) + : SfxEventHint( nId, aName, pObj ) + , xViewController( xController, ::com::sun::star::uno::UNO_QUERY ) + {} + + SfxViewEventHint( USHORT nId, const ::rtl::OUString& aName, SfxObjectShell *pObj, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController2 >& xController ) + : SfxEventHint( nId, aName, pObj ) + , xViewController( xController ) + {} + + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController2 > GetController() const + { return xViewController; } +}; + +//------------------------------------------------------------------- + class SfxNamedHint : public SfxHint { String _aEventName; diff --git a/sfx2/inc/imagemgr.hxx b/sfx2/inc/sfx2/imagemgr.hxx index 79dc724210c4..79dc724210c4 100644 --- a/sfx2/inc/imagemgr.hxx +++ b/sfx2/inc/sfx2/imagemgr.hxx diff --git a/sfx2/inc/imgmgr.hxx b/sfx2/inc/sfx2/imgmgr.hxx index ae1f8a23ddc9..ae1f8a23ddc9 100644 --- a/sfx2/inc/imgmgr.hxx +++ b/sfx2/inc/sfx2/imgmgr.hxx diff --git a/sfx2/inc/mailmodelapi.hxx b/sfx2/inc/sfx2/mailmodelapi.hxx index fa9086f2623b..fa9086f2623b 100644 --- a/sfx2/inc/mailmodelapi.hxx +++ b/sfx2/inc/sfx2/mailmodelapi.hxx diff --git a/sfx2/inc/mieclip.hxx b/sfx2/inc/sfx2/mieclip.hxx index 562bca7940e2..562bca7940e2 100644 --- a/sfx2/inc/mieclip.hxx +++ b/sfx2/inc/sfx2/mieclip.hxx diff --git a/sfx2/inc/minfitem.hxx b/sfx2/inc/sfx2/minfitem.hxx index 29edf6b3e8cb..29edf6b3e8cb 100644 --- a/sfx2/inc/minfitem.hxx +++ b/sfx2/inc/sfx2/minfitem.hxx diff --git a/sfx2/inc/sfx2/passwd.hxx b/sfx2/inc/sfx2/passwd.hxx index 5a3a48445c0f..6ca9d5212a57 100644 --- a/sfx2/inc/sfx2/passwd.hxx +++ b/sfx2/inc/sfx2/passwd.hxx @@ -28,14 +28,12 @@ #define _SFX_PASSWD_HXX #include "sal/config.h" -#include "sfx2/dllapi.h" - -#ifndef _SV_BUTTON_HXX +#include <sfx2/dllapi.h> #include <vcl/button.hxx> -#endif #include <vcl/dialog.hxx> #include <vcl/edit.hxx> #include <vcl/fixed.hxx> +#include <sfx2/app.hxx> // defines --------------------------------------------------------------- diff --git a/sfx2/inc/sfx2/sfx.hrc b/sfx2/inc/sfx2/sfx.hrc index 498cdcdaef55..dfc2dec2f5ff 100755 --- a/sfx2/inc/sfx2/sfx.hrc +++ b/sfx2/inc/sfx2/sfx.hrc @@ -332,9 +332,6 @@ #define RID_SFXQB_SET_LANGUAGE (RID_OPTIONS_START + 10) #define RID_SFXPAGE_PRINTOPTIONS (RID_OPTIONS_START + 12) -#define STR_UNDO (RID_SFX_VIEW_START+11) -#define STR_REDO (RID_SFX_VIEW_START+12) -#define STR_REPEAT (RID_SFX_VIEW_START+13) #define RID_STR_NEW_TASK (RID_SFX_DOC_START+ 76) // Member-Ids ------------------------------------------------------------ diff --git a/sfx2/inc/sfx2/sfxbasemodel.hxx b/sfx2/inc/sfx2/sfxbasemodel.hxx index 2ba73f4034fc..3a70da8a4e74 100644 --- a/sfx2/inc/sfx2/sfxbasemodel.hxx +++ b/sfx2/inc/sfx2/sfxbasemodel.hxx @@ -39,7 +39,7 @@ #include <com/sun/star/container/XChild.hpp> #include <com/sun/star/container/XNameContainer.hpp> #include <com/sun/star/container/XNameReplace.hpp> -#include <com/sun/star/frame/XController.hpp> +#include <com/sun/star/frame/XController2.hpp> #include <com/sun/star/document/XDocumentInfo.hpp> #include <com/sun/star/document/XDocumentInfoSupplier.hpp> #include <com/sun/star/document/XDocumentPropertiesSupplier.hpp> @@ -49,6 +49,7 @@ #include <com/sun/star/rdf/XDocumentMetadataAccess.hpp> #include <com/sun/star/document/XEventBroadcaster.hpp> +#include <com/sun/star/document/XDocumentEventBroadcaster.hpp> #include <com/sun/star/document/XEventListener.hpp> #include <com/sun/star/document/XEventsSupplier.hpp> #include <com/sun/star/document/XEmbeddedScripts.hpp> @@ -144,6 +145,7 @@ #define XDOCUMENTINFO ::com::sun::star::document::XDocumentInfo #define XDOCUMENTINFOSUPPLIER ::com::sun::star::document::XDocumentInfoSupplier #define XEVENTBROADCASTER ::com::sun::star::document::XEventBroadcaster +#define XDOCUMENTEVENTBROADCASTER ::com::sun::star::document::XDocumentEventBroadcaster #define XEVENTSSUPPLIER ::com::sun::star::document::XEventsSupplier #define XEMBEDDEDSCRIPTS ::com::sun::star::document::XEmbeddedScripts #define XSCRIPTINVOCATIONCONTEXT ::com::sun::star::document::XScriptInvocationContext @@ -245,6 +247,7 @@ typedef ::comphelper::WeakImplHelper31 < XCHILD , ::com::sun::star::document::XDocumentRecovery , ::com::sun::star::document::XUndoManagerSupplier , XEVENTBROADCASTER + , XDOCUMENTEVENTBROADCASTER , XEVENTLISTENER , XEVENTSSUPPLIER , XEMBEDDEDSCRIPTS @@ -1251,6 +1254,18 @@ public: virtual void SAL_CALL removeEventListener( const REFERENCE< XDOCEVENTLISTENER >& xListener ) throw( RUNTIMEEXCEPTION ); + //____________________________________________________________________________________________________ + // XDocumentEventBroadcaster + //____________________________________________________________________________________________________ + + virtual void SAL_CALL addDocumentEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::document::XDocumentEventListener >& _Listener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeDocumentEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::document::XDocumentEventListener >& _Listener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL notifyDocumentEvent( const ::rtl::OUString& _EventName, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController2 >& _ViewController, const ::com::sun::star::uno::Any& _Supplement ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException); + + //____________________________________________________________________________________________________ + // XUnoTunnel + //____________________________________________________________________________________________________ + virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException); // css.frame.XModule @@ -1525,7 +1540,9 @@ private: SAL_DLLPRIVATE void impl_store( const OUSTRING& sURL , const SEQUENCE< PROPERTYVALUE >& seqArguments , sal_Bool bSaveTo ) ; - SAL_DLLPRIVATE void postEvent_Impl( ::rtl::OUString ); + + SAL_DLLPRIVATE void postEvent_Impl( const ::rtl::OUString& aName, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController2 >& xController = ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController2 >() ); + SAL_DLLPRIVATE String getEventName_Impl( long nID ); SAL_DLLPRIVATE void NotifyStorageListeners_Impl(); SAL_DLLPRIVATE bool QuerySaveSizeExceededModules( const com::sun::star::uno::Reference< com::sun::star::task::XInteractionHandler >& xHandler ); diff --git a/sfx2/inc/sfxhelp.hxx b/sfx2/inc/sfx2/sfxhelp.hxx index 17589c7cd399..17589c7cd399 100644 --- a/sfx2/inc/sfxhelp.hxx +++ b/sfx2/inc/sfx2/sfxhelp.hxx diff --git a/sfx2/inc/sfxresid.hxx b/sfx2/inc/sfx2/sfxresid.hxx index ceea5452a0d5..2dfdb48afef4 100644 --- a/sfx2/inc/sfxresid.hxx +++ b/sfx2/inc/sfx2/sfxresid.hxx @@ -28,12 +28,10 @@ #define _SFX_SFXRESID_HXX #include <tools/string.hxx> - -#ifndef _RESID_HXX //autogen +#include "sfx2/dllapi.h" #include <tools/resid.hxx> -#endif -class SfxResId: public ResId +class SFX2_DLLPUBLIC SfxResId: public ResId { public: SfxResId( USHORT nId ); diff --git a/sfx2/inc/stbitem.hxx b/sfx2/inc/sfx2/stbitem.hxx index 977ba869750d..977ba869750d 100644 --- a/sfx2/inc/stbitem.hxx +++ b/sfx2/inc/sfx2/stbitem.hxx diff --git a/sfx2/inc/tplpitem.hxx b/sfx2/inc/sfx2/tplpitem.hxx index 38198e0ff7ee..38198e0ff7ee 100644 --- a/sfx2/inc/tplpitem.hxx +++ b/sfx2/inc/sfx2/tplpitem.hxx diff --git a/sfx2/inc/viewfac.hxx b/sfx2/inc/sfx2/viewfac.hxx index b0f0abdba3b3..420a44440aae 100644 --- a/sfx2/inc/viewfac.hxx +++ b/sfx2/inc/sfx2/viewfac.hxx @@ -30,9 +30,7 @@ #include "sal/config.h" #include "sfx2/dllapi.h" #include <tools/string.hxx> -#ifndef _RESID_HXX //autogen #include <tools/resid.hxx> -#endif class SfxViewFrame; class SfxViewShell; @@ -51,7 +49,6 @@ public: SfxViewShell *CreateInstance(SfxViewFrame *pViewFrame, SfxViewShell *pOldSh); void InitFactory(); - USHORT GetOrdinal() const { return nOrd; } /// returns a legacy view name. This is "view" with an appended ordinal/ID. diff --git a/sfx2/inc/sfx2/viewsh.hxx b/sfx2/inc/sfx2/viewsh.hxx index d19b5b04b04d..9c932c6700cc 100644 --- a/sfx2/inc/sfx2/viewsh.hxx +++ b/sfx2/inc/sfx2/viewsh.hxx @@ -37,6 +37,7 @@ #include <svl/lstner.hxx> #include <com/sun/star/ui/XContextMenuInterceptor.hpp> #include <com/sun/star/datatransfer/clipboard/XClipboardListener.hpp> +#include <com/sun/star/datatransfer/clipboard/XClipboardNotifier.hpp> #include <cppuhelper/interfacecontainer.hxx> #include "shell.hxx" #include <tools/gen.hxx> @@ -294,6 +295,7 @@ public: void ExecPrint( const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >&, sal_Bool, sal_Bool ); void AddRemoveClipboardListener( const com::sun::star::uno::Reference < com::sun::star::datatransfer::clipboard::XClipboardListener>&, BOOL ); + ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboardNotifier > GetClipboardNotifier(); #if _SOLAR__PRIVATE SAL_DLLPRIVATE SfxInPlaceClient* GetUIActiveIPClient_Impl() const; @@ -381,4 +383,3 @@ inline SfxViewFrame* SfxViewShell::GetViewFrame() const #endif // #ifndef _SFXVIEWSH_HXX - diff --git a/sfx2/prj/build.lst b/sfx2/prj/build.lst index f8e01c7bcf05..56d3917be93a 100644 --- a/sfx2/prj/build.lst +++ b/sfx2/prj/build.lst @@ -1,26 +1,10 @@ -sf sfx2 : l10n idl basic xmlscript framework readlicense_oo shell setup_native sax SYSTRAY_GTK:libegg LIBXML2:libxml2 test NULL -sf sfx2 usr1 - all sf_mkout NULL -sf sfx2\inc nmake - all sf_inc NULL -sf sfx2\prj get - all sf_prj NULL -sf sfx2\mac\res get - all sf_mres NULL -sf sfx2\source\inc get - all sf_sinc NULL -sf sfx2\sdi nmake - all sf_sdi NULL -sf sfx2\source\appl nmake - all sf_appl sf_sdi sf_inc NULL -sf sfx2\source\view nmake - all sf_view sf_sdi sf_inc NULL -sf sfx2\source\bastyp nmake - all sf_bast sf_sdi sf_inc NULL -sf sfx2\source\config nmake - all sf_cnfg sf_sdi sf_inc NULL -sf sfx2\source\control nmake - all sf_ctrl sf_sdi sf_inc NULL -sf sfx2\source\dialog nmake - all sf_dlg sf_sdi sf_inc NULL -sf sfx2\source\doc nmake - all sf_doc sf_sdi sf_inc NULL -sf sfx2\source\layout nmake - all sf_layout sf_sdi sf_inc NULL -sf sfx2\source\menu nmake - all sf_menu sf_sdi sf_inc NULL -sf sfx2\source\notify nmake - all sf_noti sf_sdi sf_inc NULL -sf sfx2\source\statbar nmake - all sf_sbar sf_sdi sf_inc NULL -sf sfx2\source\toolbox nmake - all sf_tbox sf_sdi sf_inc NULL -sf sfx2\source\inet nmake - all sf_inet sf_sdi sf_inc NULL -sf sfx2\source\explorer nmake - all sf_expl sf_sdi sf_inc NULL -sf sfx2\workben\custompanel nmake - all sf_wb_custompanel NULL -sf sfx2\util nmake - all sf_util sf_appl sf_bast sf_cnfg sf_ctrl sf_dlg sf_doc sf_expl sf_inet sf_menu sf_layout sf_noti sf_sbar sf_tbox sf_view NULL -sf sfx2\qa\unoapi nmake - all sf_qa_unoapi NULL -sf sfx2\qa\cppunit nmake - all sf_qa_cppunit sf_util NULL -sf sfx2\qa\complex\sfx2 nmake - all sf_qa_complex_docinfo sf_util NULL +sf sfx2 : l10n idl basic xmlscript framework readlicense_oo shell setup_native sax SYSTRAY_GTK:libegg LIBXML2:libxml2 LIBXSLT:libxslt NULL +sf sfx2 usr1 - all sf_mkout NULL +sf sfx2\prj nmake - all sf_prj NULL + + +# fails on unxsoli4 +# sf sfx2\qa\complex\standalonedocumentinfo nmake - all sf_qa_complex_standalonedocumentinfo sf_util NULL + +# sf sfx2\qa\complex\framework nmake - all sf_qa_complex_framework sf_qa_complex_framework_dochelper NULL +# sf sfx2\qa\complex\docinfo nmake - all sf_qa_complex_docinfo sf_util NULL diff --git a/sfx2/prj/d.lst b/sfx2/prj/d.lst index 0768000425eb..e69de29bb2d1 100644 --- a/sfx2/prj/d.lst +++ b/sfx2/prj/d.lst @@ -1,47 +0,0 @@ -mkdir: %COMMON_DEST%\bin%_EXT%\hid -mkdir: %COMMON_DEST%\res%_EXT% -mkdir: %_DEST%\inc%_EXT%\sfx2 - -..\%COMMON_OUTDIR%\misc\*.hid %COMMON_DEST%\bin%_EXT%\hid\*.hid -..\%__SRC%\lib\sfx.lib %_DEST%\lib%_EXT%\sfx.lib -..\%__SRC%\lib\lib*.so %_DEST%\lib%_EXT% -..\%__SRC%\lib\*.a %_DEST%\lib%_EXT%\*.a -..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib -..\%__SRC%\slb\sfx.lib %_DEST%\lib%_EXT%\xsfx.lib -..\%__SRC%\lib\isfx.lib %_DEST%\lib%_EXT%\isfx.lib -..\%__SRC%\lib\debug.lib %_DEST%\lib%_EXT%\sfxdebug.lib -..\%__SRC%\bin\sfx?????.sym %_DEST%\bin%_EXT%\sfx?????.sym -..\%__SRC%\bin\sfx?????.dll %_DEST%\bin%_EXT%\sfx?????.dll -..\%__SRC%\bin\sfx*.res %_DEST%\bin%_EXT%\sfx*.res -..\%__SRC%\bin\sfx?????.sym %_DEST%\bin%_EXT%\sfx?????.sym -..\%__SRC%\misc\sfx?????.map %_DEST%\bin%_EXT%\sfx?????.map -..\%__SRC%\bin\elc?????.dll %_DEST%\bin%_EXT%\elc?????.dll -..\%__SRC%\srs\sfx.srs %_DEST%\res%_EXT%\sfx.srs -..\%COMMON_OUTDIR%\srs\sfx_srs.hid %COMMON_DEST%\res%_EXT%\sfx_srs.hid -..\%__SRC%\srs\sfxslots.srs %_DEST%\res%_EXT%\sfxslots.srs -..\%COMMON_OUTDIR%\srs\sfxslots_srs.hid %COMMON_DEST%\res%_EXT%\sfxslots_srs.hid -..\util\sfx.xml %_DEST%\xml%_EXT%\sfx.xml -..\%__SRC%\misc\sfx2.csv %_DEST%\inc%_EXT%\sfx2.csv - -..\inc\sfx2\*.h %_DEST%\inc%_EXT%\sfx2\*.h -..\inc\sfx2\*.hxx %_DEST%\inc%_EXT%\sfx2\*.hxx -..\inc\sfx2\*.hrc %_DEST%\inc%_EXT%\sfx2\*.hrc - -..\sdi\sfx.sdi %_DEST%\inc%_EXT%\sfx2\sfx.sdi -..\sdi\sfxitems.sdi %_DEST%\inc%_EXT%\sfx2\sfxitems.sdi -..\inc\brokenpackageint.hxx %_DEST%\inc%_EXT%\sfx2\brokenpackageint.hxx -..\inc\dinfedt.hxx %_DEST%\inc%_EXT%\sfx2\dinfedt.hxx -..\inc\imgmgr.hxx %_DEST%\inc%_EXT%\sfx2\imgmgr.hxx -..\inc\mieclip.hxx %_DEST%\inc%_EXT%\sfx2\mieclip.hxx -..\inc\minfitem.hxx %_DEST%\inc%_EXT%\sfx2\minfitem.hxx -..\inc\sfxhelp.hxx %_DEST%\inc%_EXT%\sfx2\sfxhelp.hxx -..\inc\stbitem.hxx %_DEST%\inc%_EXT%\sfx2\stbitem.hxx -..\inc\tplpitem.hxx %_DEST%\inc%_EXT%\sfx2\tplpitem.hxx -..\inc\viewfac.hxx %_DEST%\inc%_EXT%\sfx2\viewfac.hxx -..\inc\basmgr.hxx %_DEST%\inc%_EXT%\sfx2\basmgr.hxx -..\inc\imagemgr.hxx %_DEST%\inc%_EXT%\sfx2\imagemgr.hxx -..\inc\QuerySaveDocument.hxx %_DEST%\inc%_EXT%\sfx2\QuerySaveDocument.hxx -..\inc\mailmodelapi.hxx %_DEST%\inc%_EXT%\sfx2\mailmodelapi.hxx -..\inc\docinsert.hxx %_DEST%\inc%_EXT%\sfx2\docinsert.hxx - -..\%__SRC%\misc\sfx.component %_DEST%\xml%_EXT%\sfx.component diff --git a/sfx2/source/config/makefile.mk b/sfx2/prj/makefile.mk index d090babd1505..c73a3d944bbf 100644 --- a/sfx2/source/config/makefile.mk +++ b/sfx2/prj/makefile.mk @@ -25,23 +25,16 @@ # #************************************************************************* -PRJ=..$/.. +PRJ=.. +TARGET=prj -PRJNAME=sfx2 -TARGET=config -ENABLE_EXCEPTIONS=TRUE +.INCLUDE : settings.mk -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/evntconf.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk +.IF "$(VERBOSE)"!="" +VERBOSEFLAG := +.ELSE +VERBOSEFLAG := -s +.ENDIF +all: + cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) diff --git a/sfx2/qa/cppunit/makefile.mk b/sfx2/qa/cppunit/makefile.mk deleted file mode 100644 index b53a04ec43f9..000000000000 --- a/sfx2/qa/cppunit/makefile.mk +++ /dev/null @@ -1,86 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -.IF "$(OOO_SUBSEQUENT_TESTS)" == "" -nothing .PHONY: -.ELSE - -PRJ=../.. -PRJNAME=sfx2 -TARGET=qa_cppunit - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -#building with stlport, but cppunit was not built with stlport -.IF "$(USE_SYSTEM_STL)"!="YES" -.IF "$(SYSTEM_CPPUNIT)"=="YES" -CFLAGSCXX+=-DADAPT_EXT_STL -.ENDIF -.ENDIF - -CFLAGSCXX += $(CPPUNIT_CFLAGS) -DLLPRE = # no leading "lib" on .so files - -# --- Libs --------------------------------------------------------- - -SHL1OBJS= \ - $(SLO)/test_metadatable.obj \ - - -SHL1STDLIBS= \ - $(CPPUNITLIB) \ - $(SALLIB) \ - $(CPPULIB) \ - $(CPPUHELPERLIB) \ - $(VCLLIB) \ - $(SFXLIB) \ - - -SHL1TARGET= test_metadatable -SHL1RPATH = NONE -SHL1IMPLIB= i$(SHL1TARGET) -# SHL1DEF= $(MISC)/$(SHL1TARGET).def -DEF1NAME=$(SHL1TARGET) -# DEF1EXPORTFILE= export.exp -SHL1VERSIONMAP= version.map - -# --- All object files --------------------------------------------- - -SLOFILES= \ - $(SHL1OBJS) \ - - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk -.INCLUDE : _cppunit.mk - -.END diff --git a/sfx2/qa/unoapi/makefile.mk b/sfx2/qa/unoapi/makefile.mk deleted file mode 100644 index ea91ba4d1c44..000000000000 --- a/sfx2/qa/unoapi/makefile.mk +++ /dev/null @@ -1,48 +0,0 @@ -#************************************************************************* -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -#***********************************************************************/ - -.IF "$(OOO_SUBSEQUENT_TESTS)" == "" -nothing .PHONY: -.ELSE - -PRJ = ../.. -PRJNAME = sfx2 -TARGET = qa_unoapi - -.IF "$(OOO_JUNIT_JAR)" != "" -PACKAGE = org/openoffice/sfx2/qa/unoapi -JAVATESTFILES = Test.java -JAVAFILES = $(JAVATESTFILES) -JARFILES = OOoRunner.jar ridl.jar test.jar -EXTRAJARFILES = $(OOO_JUNIT_JAR) -.END - -.INCLUDE: settings.mk -.INCLUDE: target.mk -.INCLUDE: installationtest.mk - -ALLTAR : javatest - -.END diff --git a/sfx2/sdi/makefile.mk b/sfx2/sdi/makefile.mk deleted file mode 100644 index c02e51eb6998..000000000000 --- a/sfx2/sdi/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=sfx2 -TARGET=sfxslots - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -.IF "$(L10N_framework)"=="" - -SDI1NAME=$(TARGET) -SDI1EXPORT=sfx -#SIDHRCNAME=sfx.hrc unused??? - -.ENDIF -# --- Files -------------------------------------------------------- - -SVSDI1DEPEND= \ - $(PRJ)$/inc$/sfx2$/sfxsids.hrc \ - sfx.sdi \ - appslots.sdi \ - sfxslots.sdi \ - docslots.sdi \ - viwslots.sdi \ - frmslots.sdi - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx index 1d71e1747bd1..2ff43f893de3 100644 --- a/sfx2/source/appl/app.cxx +++ b/sfx2/source/appl/app.cxx @@ -45,14 +45,10 @@ #include <basic/sbmod.hxx> #include <svtools/asynclink.hxx> #include <svl/stritem.hxx> -#ifndef _SOUND_HXX //autogen #include <vcl/sound.hxx> -#endif #include <svl/eitem.hxx> #include <svl/urlbmk.hxx> -#ifndef _MSGBOX_HXX //autogen #include <vcl/msgbox.hxx> -#endif #include <svtools/sfxecode.hxx> #include <svtools/ehdl.hxx> @@ -60,8 +56,6 @@ #include <tools/urlobj.hxx> #include <unotools/tempfile.hxx> #include <osl/file.hxx> -#ifndef GCC -#endif #define _SVSTDARR_STRINGSDTOR #include <svl/svstdarr.hxx> @@ -80,23 +74,18 @@ #include <com/sun/star/frame/XFramesSupplier.hpp> #include <com/sun/star/container/XIndexAccess.hpp> #include <com/sun/star/beans/XPropertySet.hpp> -#ifndef _UNOTOOLS_PROCESSFACTORY_HXX #include <comphelper/processfactory.hxx> -#endif #include <com/sun/star/uri/XUriReferenceFactory.hpp> #include <com/sun/star/uri/XVndSunStarScriptUrl.hpp> - #include <basic/basmgr.hxx> #include <toolkit/helper/vclunohelper.hxx> #include <vcl/svapp.hxx> - #include <rtl/logfile.hxx> - #include <sfx2/appuno.hxx> -#include "sfxhelp.hxx" +#include "sfx2/sfxhelp.hxx" #include <sfx2/request.hxx> #include "sfxtypes.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "arrdecl.hxx" #include <sfx2/progress.hxx> #include <sfx2/objsh.hxx> @@ -122,9 +111,10 @@ #include <sfx2/module.hxx> #include <sfx2/tbxctrl.hxx> #include <sfx2/sfxdlg.hxx> -#include "stbitem.hxx" +#include "sfx2/stbitem.hxx" #include "eventsupplier.hxx" #include <sfx2/dockwin.hxx> +#include <tools/svlibrary.hxx> #ifdef DBG_UTIL #include <sfx2/tbxctrl.hxx> @@ -293,7 +283,7 @@ void SfxPropertyHandler::Property( ApplicationProperty& rProp ) #include <framework/imageproducer.hxx> #include <framework/acceleratorinfo.hxx> #include <framework/sfxhelperfunctions.hxx> -#include "imagemgr.hxx" +#include "sfx2/imagemgr.hxx" #include "fwkhelper.hxx" ::osl::Mutex SfxApplication::gMutex; @@ -495,7 +485,7 @@ void SfxApplication::SetViewFrame_Impl( SfxViewFrame *pFrame ) if ( pOldContainerFrame ) { if ( bTaskActivate ) - NotifyEvent( SfxEventHint( SFX_EVENT_DEACTIVATEDOC, GlobalEventConfig::GetEventName(STR_EVENT_DEACTIVATEDOC), pOldContainerFrame->GetObjectShell() ) ); + NotifyEvent( SfxViewEventHint( SFX_EVENT_DEACTIVATEDOC, GlobalEventConfig::GetEventName(STR_EVENT_DEACTIVATEDOC), pOldContainerFrame->GetObjectShell(), pOldContainerFrame->GetFrame().GetController() ) ); pOldContainerFrame->DoDeactivate( bTaskActivate, pFrame ); if( pOldContainerFrame->GetProgress() ) @@ -519,7 +509,7 @@ void SfxApplication::SetViewFrame_Impl( SfxViewFrame *pFrame ) if ( bTaskActivate && pNewContainerFrame->GetObjectShell() ) { pNewContainerFrame->GetObjectShell()->PostActivateEvent_Impl( pNewContainerFrame ); - NotifyEvent(SfxEventHint(SFX_EVENT_ACTIVATEDOC, GlobalEventConfig::GetEventName(STR_EVENT_ACTIVATEDOC), pNewContainerFrame->GetObjectShell() ) ); + NotifyEvent(SfxViewEventHint(SFX_EVENT_ACTIVATEDOC, GlobalEventConfig::GetEventName(STR_EVENT_ACTIVATEDOC), pNewContainerFrame->GetObjectShell(), pNewContainerFrame->GetFrame().GetController() ) ); } SfxProgress *pProgress = pNewContainerFrame->GetProgress(); @@ -738,9 +728,7 @@ extern "C" { static void SAL_CALL thisModule() {} } IMPL_LINK( SfxApplication, GlobalBasicErrorHdl_Impl, StarBASIC*, pStarBasic ) { // get basctl dllname - String sLibName = String::CreateFromAscii( STRING( DLL_NAME ) ); - sLibName.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "sfx" ) ), String( RTL_CONSTASCII_USTRINGPARAM( "basctl" ) ) ); - ::rtl::OUString aLibName( sLibName ); + static ::rtl::OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( SVLIBRARY( "basctl" ) ) ); // load module oslModule handleMod = osl_loadModuleRelative( @@ -829,9 +817,7 @@ SfxApplication::ChooseScript() void SfxApplication::MacroOrganizer( INT16 nTabId ) { // get basctl dllname - String sLibName = String::CreateFromAscii( STRING( DLL_NAME ) ); - sLibName.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "sfx" ) ), String( RTL_CONSTASCII_USTRINGPARAM( "basctl" ) ) ); - ::rtl::OUString aLibName( sLibName ); + static ::rtl::OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( SVLIBRARY( "basctl" ) ) ); // load module oslModule handleMod = osl_loadModuleRelative( diff --git a/sfx2/source/appl/app.src b/sfx2/source/appl/app.src index 02552a1a5ec1..fa5a1fc1c335 100644 --- a/sfx2/source/appl/app.src +++ b/sfx2/source/appl/app.src @@ -31,6 +31,45 @@ #include "app.hrc" #include "helpid.hrc" +String STR_NONAME +{ + Text [ en-US ] = "Untitled" ; +}; +String STR_CLOSE +{ + Text [ en-US ] = "Close" ; +}; +String STR_STYLE_FILTER_AUTO +{ + Text [ en-US ] = "Automatic" ; +}; +String STR_STANDARD_SHORTCUT +{ + Text [ en-US ] = "Standard" ; +}; +String STR_BYTES +{ + Text [ en-US ] = "Bytes" ; +}; +String STR_KB +{ + Text [ en-US ] = "KB" ; +}; +String STR_MB +{ + Text [ en-US ] = "MB" ; +}; +String STR_GB +{ + Text [ en-US ] = "GB" ; +}; +QueryBox MSG_QUERY_LASTVERSION +{ + Buttons = WB_YES_NO ; + DefButton = WB_DEF_NO ; + Message [ en-US ] = "Cancel all changes?" ; +}; + InfoBox RID_DOCALREADYLOADED_DLG { Message [ en-US ] = "Document already open." ; @@ -421,19 +460,37 @@ String RID_XMLSEC_DOCUMENTSIGNED Text [ en-US ] = " (Signed)" ; }; +String STR_STANDARD +{ + Text [ en-US ] = "Standard" ; +}; + String RID_SVXSTR_FILELINK { Text [ en-US ] = "Document" ; }; + +String STR_NONE +{ + Text [ en-US ] = "- None -" ; +}; String RID_SVXSTR_GRAFIKLINK { Text [ en-US ] = "Graphic" ; }; +String STR_SFX_FILTERNAME_ALL +{ + Text [ en-US ] = "All files (*.*)" ; +}; String RID_SVXSTR_EDITGRFLINK { Text [ en-US ] = "Link graphics" ; }; - +// i66948 used in project scripting +String STR_ERRUNOEVENTBINDUNG +{ + Text [ en-US ] = "An appropriate component method %1\ncould not be found.\n\nCheck spelling of method name."; +}; String RID_SVXSTR_GRFILTER_OPENERROR { Text [ en-US ] = "Graphics file cannot be opened" ; diff --git a/sfx2/source/appl/appbas.cxx b/sfx2/source/appl/appbas.cxx index 099dc12654a1..3dfe8c6a855b 100644 --- a/sfx2/source/appl/appbas.cxx +++ b/sfx2/source/appl/appbas.cxx @@ -60,7 +60,7 @@ #include "arrdecl.hxx" #include <sfx2/app.hxx> #include "sfxtypes.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/msg.hxx> #include <sfx2/msgpool.hxx> #include <sfx2/progress.hxx> @@ -69,16 +69,16 @@ #include <sfx2/viewfrm.hxx> #include <sfx2/viewsh.hxx> #include <sfx2/dispatch.hxx> -#include "tplpitem.hxx" -#include "minfitem.hxx" +#include "sfx2/tplpitem.hxx" +#include "sfx2/minfitem.hxx" #include "app.hrc" #include <sfx2/evntconf.hxx> #include <sfx2/request.hxx> #include <sfx2/dinfdlg.hxx> #include "appdata.hxx" #include "appbas.hxx" -#include "sfxhelp.hxx" -#include "basmgr.hxx" +#include "sfx2/sfxhelp.hxx" +#include "sfx2/basmgr.hxx" #include "sorgitm.hxx" #include "appbaslib.hxx" #include <basic/basicmanagerrepository.hxx> diff --git a/sfx2/source/appl/appbaslib.cxx b/sfx2/source/appl/appbaslib.cxx index 96c998b2674d..7f4e8cedb637 100644..100755 --- a/sfx2/source/appl/appbaslib.cxx +++ b/sfx2/source/appl/appbaslib.cxx @@ -25,6 +25,9 @@ * ************************************************************************/ +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_sfx2.hxx" + #include "appbaslib.hxx" #include <sfx2/sfxuno.hxx> diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx index 4eba8285fd75..e94635063727 100644 --- a/sfx2/source/appl/appcfg.cxx +++ b/sfx2/source/appl/appcfg.cxx @@ -78,7 +78,7 @@ #include <sfx2/app.hxx> #include <sfx2/docfile.hxx> #include <sfx2/viewfrm.hxx> -#include "sfxhelp.hxx" +#include "sfx2/sfxhelp.hxx" #include "sfxtypes.hxx" #include <sfx2/dispatch.hxx> #include <sfx2/objsh.hxx> @@ -90,7 +90,7 @@ #include "workwin.hxx" #include "helper.hxx" // SfxContentHelper::... #include "app.hrc" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "shutdownicon.hxx" using namespace ::com::sun::star::uno; diff --git a/sfx2/source/appl/appdata.cxx b/sfx2/source/appl/appdata.cxx index 002a785542d4..ce0dda051886 100644 --- a/sfx2/source/appl/appdata.cxx +++ b/sfx2/source/appl/appdata.cxx @@ -57,7 +57,7 @@ #include <sfx2/request.hxx> #include "referers.hxx" #include "app.hrc" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "objshimp.hxx" #include <sfx2/appuno.hxx> #include "imestatuswindow.hxx" diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx index fbd30a9bf42d..a3d25de8ee61 100644 --- a/sfx2/source/appl/appinit.cxx +++ b/sfx2/source/appl/appinit.cxx @@ -65,9 +65,6 @@ #include <rtl/logfile.hxx> #include <vcl/edit.hxx> -#ifndef GCC -#endif - #include <sfx2/unoctitm.hxx> #include "app.hrc" #include "sfxlocal.hrc" @@ -80,14 +77,15 @@ #include <sfx2/mnumgr.hxx> #include <sfx2/msgpool.hxx> #include <sfx2/progress.hxx> -#include "sfxhelp.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxhelp.hxx" +#include "sfx2/sfxresid.hxx" #include "sfxtypes.hxx" #include <sfx2/viewsh.hxx> #include "nochaos.hxx" #include <sfx2/fcontnr.hxx> #include "helper.hxx" // SfxContentHelper::Kill() #include "sfxpicklist.hxx" +#include <tools/svlibrary.hxx> #ifdef UNX #define stricmp(a,b) strcmp(a,b) @@ -214,10 +212,7 @@ String GetSpecialCharsForEdit(Window* pParent, const Font& rFont) { bDetermineFunction = true; - String sLibName = String::CreateFromAscii( STRING( DLL_NAME ) ); - sLibName.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "sfx" ) ), String( RTL_CONSTASCII_USTRINGPARAM( "cui" ) ) ); - - rtl::OUString aLibName( sLibName ); + static ::rtl::OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( SVLIBRARY( "cui" ) ) ); oslModule handleMod = osl_loadModuleRelative( &thisModule, aLibName.pData, 0 ); diff --git a/sfx2/source/appl/appmain.cxx b/sfx2/source/appl/appmain.cxx index cf097b900b52..546b6b1c6558 100644 --- a/sfx2/source/appl/appmain.cxx +++ b/sfx2/source/appl/appmain.cxx @@ -53,7 +53,7 @@ #include <sfx2/app.hxx> #include "arrdecl.hxx" #include <sfx2/dispatch.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/fcontnr.hxx> #include <sfx2/viewsh.hxx> #include "intro.hxx" diff --git a/sfx2/source/appl/appmisc.cxx b/sfx2/source/appl/appmisc.cxx index 70147e8d9146..94b921f8122e 100644 --- a/sfx2/source/appl/appmisc.cxx +++ b/sfx2/source/appl/appmisc.cxx @@ -64,12 +64,12 @@ #include <unotools/moduleoptions.hxx> #include <osl/file.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/app.hxx> #include "appdata.hxx" #include "arrdecl.hxx" #include <sfx2/tbxctrl.hxx> -#include "stbitem.hxx" +#include "sfx2/stbitem.hxx" #include <sfx2/mnuitem.hxx> #include <sfx2/docfac.hxx> #include <sfx2/docfile.hxx> diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx index 807834ca41a5..0f4c1f651082 100644 --- a/sfx2/source/appl/appopen.cxx +++ b/sfx2/source/appl/appopen.cxx @@ -98,7 +98,7 @@ #include <sfx2/passwd.hxx> #include "referers.hxx" #include <sfx2/request.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/viewsh.hxx> #include "app.hrc" #include <sfx2/viewfrm.hxx> diff --git a/sfx2/source/appl/appquit.cxx b/sfx2/source/appl/appquit.cxx index e0516201bf03..2a5456989aa7 100644 --- a/sfx2/source/appl/appquit.cxx +++ b/sfx2/source/appl/appquit.cxx @@ -51,7 +51,7 @@ #include <sfx2/dispatch.hxx> #include <sfx2/printer.hxx> #include "arrdecl.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/event.hxx> #include <sfx2/mnumgr.hxx> #include <sfx2/templdlg.hxx> diff --git a/sfx2/source/appl/appreg.cxx b/sfx2/source/appl/appreg.cxx index addace134362..9fd2dfc696d3 100644 --- a/sfx2/source/appl/appreg.cxx +++ b/sfx2/source/appl/appreg.cxx @@ -36,11 +36,11 @@ #include <sfx2/app.hxx> #include "appdata.hxx" #include "arrdecl.hxx" -#include "sfxhelp.hxx" +#include "sfx2/sfxhelp.hxx" #include <sfx2/templdlg.hxx> #include "objmnctl.hxx" #include "inettbc.hxx" -#include "stbitem.hxx" +#include "sfx2/stbitem.hxx" #include <sfx2/navigat.hxx> #include <sfx2/taskpane.hxx> #include <sfx2/module.hxx> diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index 01258ac7a56b..d90e68d6c764 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -28,9 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sfx2.hxx" #include <com/sun/star/uno/Reference.hxx> -#ifndef _COM_SUN_STAR_LANG_XMultiServiceFactory_HPP_ #include <com/sun/star/lang/XMultiServiceFactory.hpp> -#endif #include <com/sun/star/lang/IllegalArgumentException.hpp> #include <com/sun/star/frame/DispatchResultEvent.hpp> #include <com/sun/star/frame/DispatchResultState.hpp> @@ -40,9 +38,7 @@ #include <com/sun/star/frame/XDispatchHelper.hpp> #include <com/sun/star/frame/XFramesSupplier.hpp> #include <com/sun/star/util/XCloseable.hpp> -#ifndef _COM_SUN_STAR_UTIL_CloseVetoException_HPP_ #include <com/sun/star/util/CloseVetoException.hpp> -#endif #include <com/sun/star/frame/XLayoutManager.hpp> #include <com/sun/star/document/XEmbeddedScripts.hpp> #include <com/sun/star/embed/XStorage.hpp> @@ -117,11 +113,11 @@ #include <sfx2/sfx.hrc> #include "app.hrc" #include <sfx2/passwd.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "arrdecl.hxx" #include <sfx2/childwin.hxx> #include "appdata.hxx" -#include "minfitem.hxx" +#include "sfx2/minfitem.hxx" #include <sfx2/event.hxx> #include <sfx2/module.hxx> #include <sfx2/viewfrm.hxx> @@ -130,7 +126,8 @@ #include <sfx2/sfxdlg.hxx> #include <sfx2/dialogs.hrc> #include "sorgitm.hxx" -#include "sfxhelp.hxx" +#include "sfx2/sfxhelp.hxx" +#include <tools/svlibrary.hxx> using namespace ::com::sun::star; using namespace ::com::sun::star::beans; @@ -747,9 +744,7 @@ extern "C" { static void SAL_CALL thisModule() {} } ::rtl::OUString ChooseMacro( const Reference< XModel >& rxLimitToDocument, BOOL bChooseOnly, const ::rtl::OUString& rMacroDesc = ::rtl::OUString() ) { // get basctl dllname - String sLibName = String::CreateFromAscii( STRING( DLL_NAME ) ); - sLibName.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "sfx" ) ), String( RTL_CONSTASCII_USTRINGPARAM( "basctl" ) ) ); - ::rtl::OUString aLibName( sLibName ); + static ::rtl::OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( SVLIBRARY( "basctl" ) ) ); // load module oslModule handleMod = osl_loadModuleRelative( @@ -769,9 +764,7 @@ extern "C" { static void SAL_CALL thisModule() {} } void MacroOrganizer( INT16 nTabId ) { // get basctl dllname - String sLibName = String::CreateFromAscii( STRING( DLL_NAME ) ); - sLibName.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "sfx" ) ), String( RTL_CONSTASCII_USTRINGPARAM( "basctl" ) ) ); - ::rtl::OUString aLibName( sLibName ); + static ::rtl::OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( SVLIBRARY( "basctl" ) ) ); // load module oslModule handleMod = osl_loadModuleRelative( diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx index 7f038ec4a1d1..9d2025d1e23e 100644 --- a/sfx2/source/appl/appuno.cxx +++ b/sfx2/source/appl/appuno.cxx @@ -52,9 +52,7 @@ #include <basic/sbxobj.hxx> #include <basic/sberrors.hxx> #include <basic/basmgr.hxx> -#ifndef _BASIC_SBUNO_HXX #include <basic/sbuno.hxx> -#endif #include <basic/sbxcore.hxx> #include <svl/ownlist.hxx> @@ -98,6 +96,7 @@ #include <comphelper/sequence.hxx> #include <framework/documentundoguard.hxx> #include <rtl/ustrbuf.hxx> +#include <comphelper/interaction.hxx> using namespace ::com::sun::star; using namespace ::com::sun::star::ucb; @@ -107,9 +106,6 @@ using namespace ::com::sun::star::frame; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::io; -#ifndef GCC -#endif - #include "sfxtypes.hxx" #include <sfx2/sfxuno.hxx> #include <sfx2/app.hxx> @@ -131,7 +127,7 @@ using namespace ::com::sun::star::io; #include "fltoptint.hxx" #include <sfx2/docfile.hxx> #include <sfx2/sfxbasecontroller.hxx> -#include "brokenpackageint.hxx" +#include <sfx2/brokenpackageint.hxx> #include "eventsupplier.hxx" #include "xpackcreator.hxx" #include "plugin.hxx" @@ -139,7 +135,6 @@ using namespace ::com::sun::star::io; #include <ownsubfilterservice.hxx> #include "SfxDocumentMetaData.hxx" - #define FRAMELOADER_SERVICENAME "com.sun.star.frame.FrameLoader" #define PROTOCOLHANDLER_SERVICENAME "com.sun.star.frame.ProtocolHandler" @@ -2237,18 +2232,18 @@ RequestFilterOptions::RequestFilterOptions( ::com::sun::star::uno::Reference< :: ::rtl::OUString temp; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > temp2; ::com::sun::star::document::FilterOptionsRequest aOptionsRequest( temp, - temp2, + temp2, rModel, rProperties ); - m_aRequest <<= aOptionsRequest; + m_aRequest <<= aOptionsRequest; - m_pAbort = new ContinuationAbort; - m_pOptions = new FilterOptionsContinuation; + m_pAbort = new comphelper::OInteractionAbort; + m_pOptions = new FilterOptionsContinuation; - m_lContinuations.realloc( 2 ); - m_lContinuations[0] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pAbort ); - m_lContinuations[1] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pOptions ); + m_lContinuations.realloc( 2 ); + m_lContinuations[0] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pAbort ); + m_lContinuations[1] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pOptions ); } ::com::sun::star::uno::Any SAL_CALL RequestFilterOptions::getRequest() @@ -2265,107 +2260,139 @@ RequestFilterOptions::RequestFilterOptions( ::com::sun::star::uno::Reference< :: } //========================================================================= +class RequestPackageReparation_Impl : public ::cppu::WeakImplHelper1< ::com::sun::star::task::XInteractionRequest > +{ + ::com::sun::star::uno::Any m_aRequest; + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > m_lContinuations; + comphelper::OInteractionApprove* m_pApprove; + comphelper::OInteractionDisapprove* m_pDisapprove; -RequestPackageReparation::RequestPackageReparation( ::rtl::OUString aName ) +public: + RequestPackageReparation_Impl( ::rtl::OUString aName ); + sal_Bool isApproved(); + virtual ::com::sun::star::uno::Any SAL_CALL getRequest() throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > SAL_CALL getContinuations() + throw( ::com::sun::star::uno::RuntimeException ); +}; + +RequestPackageReparation_Impl::RequestPackageReparation_Impl( ::rtl::OUString aName ) { ::rtl::OUString temp; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > temp2; ::com::sun::star::document::BrokenPackageRequest aBrokenPackageRequest( temp, - temp2, - aName ); - - m_aRequest <<= aBrokenPackageRequest; + temp2, + aName ); + m_aRequest <<= aBrokenPackageRequest; + m_pApprove = new comphelper::OInteractionApprove; + m_pDisapprove = new comphelper::OInteractionDisapprove; + m_lContinuations.realloc( 2 ); + m_lContinuations[0] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pApprove ); + m_lContinuations[1] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pDisapprove ); +} - m_pApprove = new ContinuationApprove; - m_pDisapprove = new ContinuationDisapprove; +sal_Bool RequestPackageReparation_Impl::isApproved() +{ + return m_pApprove->wasSelected(); +} - m_lContinuations.realloc( 2 ); - m_lContinuations[0] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pApprove ); - m_lContinuations[1] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pDisapprove ); +::com::sun::star::uno::Any SAL_CALL RequestPackageReparation_Impl::getRequest() + throw( ::com::sun::star::uno::RuntimeException ) +{ + return m_aRequest; } -/*uno::*/Any SAL_CALL RequestPackageReparation::queryInterface( const /*uno::*/Type& rType ) throw (RuntimeException) +::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > + SAL_CALL RequestPackageReparation_Impl::getContinuations() + throw( ::com::sun::star::uno::RuntimeException ) { - return ::cppu::queryInterface ( rType, - // OWeakObject interfaces - dynamic_cast< XInterface* > ( (XInteractionRequest *) this ), - static_cast< XWeak* > ( this ), - // my own interfaces - static_cast< XInteractionRequest* > ( this ) ); + return m_lContinuations; } -void SAL_CALL RequestPackageReparation::acquire( ) throw () +RequestPackageReparation::RequestPackageReparation( ::rtl::OUString aName ) { - OWeakObject::acquire(); + pImp = new RequestPackageReparation_Impl( aName ); + pImp->acquire(); } -void SAL_CALL RequestPackageReparation::release( ) throw () +RequestPackageReparation::~RequestPackageReparation() { - OWeakObject::release(); + pImp->release(); } -::com::sun::star::uno::Any SAL_CALL RequestPackageReparation::getRequest() - throw( ::com::sun::star::uno::RuntimeException ) +sal_Bool RequestPackageReparation::isApproved() { - return m_aRequest; + return pImp->isApproved(); } -::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > - SAL_CALL RequestPackageReparation::getContinuations() - throw( ::com::sun::star::uno::RuntimeException ) +com::sun::star::uno::Reference < ::com::sun::star::task::XInteractionRequest > RequestPackageReparation::GetRequest() { - return m_lContinuations; + return com::sun::star::uno::Reference < ::com::sun::star::task::XInteractionRequest >(pImp); } //========================================================================= +class NotifyBrokenPackage_Impl : public ::cppu::WeakImplHelper1< ::com::sun::star::task::XInteractionRequest > +{ + ::com::sun::star::uno::Any m_aRequest; + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > m_lContinuations; + comphelper::OInteractionAbort* m_pAbort; -NotifyBrokenPackage::NotifyBrokenPackage( ::rtl::OUString aName ) +public: + NotifyBrokenPackage_Impl( ::rtl::OUString aName ); + sal_Bool isAborted(); + virtual ::com::sun::star::uno::Any SAL_CALL getRequest() throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > SAL_CALL getContinuations() + throw( ::com::sun::star::uno::RuntimeException ); +}; + +NotifyBrokenPackage_Impl::NotifyBrokenPackage_Impl( ::rtl::OUString aName ) { ::rtl::OUString temp; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > temp2; ::com::sun::star::document::BrokenPackageRequest aBrokenPackageRequest( temp, - temp2, - aName ); - - m_aRequest <<= aBrokenPackageRequest; - - m_pAbort = new ContinuationAbort; + temp2, + aName ); + m_aRequest <<= aBrokenPackageRequest; + m_pAbort = new comphelper::OInteractionAbort; + m_lContinuations.realloc( 1 ); + m_lContinuations[0] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pAbort ); +} - m_lContinuations.realloc( 1 ); - m_lContinuations[0] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pAbort ); +sal_Bool NotifyBrokenPackage_Impl::isAborted() +{ + return m_pAbort->wasSelected(); } -/*uno::*/Any SAL_CALL NotifyBrokenPackage::queryInterface( const /*uno::*/Type& rType ) throw (RuntimeException) +::com::sun::star::uno::Any SAL_CALL NotifyBrokenPackage_Impl::getRequest() + throw( ::com::sun::star::uno::RuntimeException ) { - return ::cppu::queryInterface ( rType, - // OWeakObject interfaces - dynamic_cast< XInterface* > ( (XInteractionRequest *) this ), - static_cast< XWeak* > ( this ), - // my own interfaces - static_cast< XInteractionRequest* > ( this ) ); + return m_aRequest; } -void SAL_CALL NotifyBrokenPackage::acquire( ) throw () +::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > + SAL_CALL NotifyBrokenPackage_Impl::getContinuations() + throw( ::com::sun::star::uno::RuntimeException ) { - OWeakObject::acquire(); + return m_lContinuations; } -void SAL_CALL NotifyBrokenPackage::release( ) throw () +NotifyBrokenPackage::NotifyBrokenPackage( ::rtl::OUString aName ) { - OWeakObject::release(); + pImp = new NotifyBrokenPackage_Impl( aName ); + pImp->acquire(); } -::com::sun::star::uno::Any SAL_CALL NotifyBrokenPackage::getRequest() - throw( ::com::sun::star::uno::RuntimeException ) +NotifyBrokenPackage::~NotifyBrokenPackage() { - return m_aRequest; + pImp->release(); } -::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > - SAL_CALL NotifyBrokenPackage::getContinuations() - throw( ::com::sun::star::uno::RuntimeException ) +sal_Bool NotifyBrokenPackage::isAborted() { - return m_lContinuations; + return pImp->isAborted(); } +com::sun::star::uno::Reference < ::com::sun::star::task::XInteractionRequest > NotifyBrokenPackage::GetRequest() +{ + return com::sun::star::uno::Reference < ::com::sun::star::task::XInteractionRequest >(pImp); +} diff --git a/sfx2/source/appl/fileobj.cxx b/sfx2/source/appl/fileobj.cxx index 294d6ef17da5..cb53305e4b01 100644 --- a/sfx2/source/appl/fileobj.cxx +++ b/sfx2/source/appl/fileobj.cxx @@ -48,7 +48,7 @@ #include <comphelper/processfactory.hxx> #include <sfx2/linkmgr.hxx> #include <sfx2/opengrf.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "fileobj.hxx" #include "app.hrc" diff --git a/sfx2/source/appl/imagemgr.cxx b/sfx2/source/appl/imagemgr.cxx index 3b26eae1858d..b9f4404d5555 100644 --- a/sfx2/source/appl/imagemgr.cxx +++ b/sfx2/source/appl/imagemgr.cxx @@ -27,7 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sfx2.hxx" -#include "imagemgr.hxx" +#include "sfx2/imagemgr.hxx" #include <com/sun/star/frame/XController.hpp> #include <com/sun/star/ui/XImageManager.hpp> #include <com/sun/star/frame/XModuleManager.hpp> @@ -41,7 +41,7 @@ #include <rtl/ustring.hxx> #include <rtl/logfile.hxx> -#include "imgmgr.hxx" +#include "sfx2/imgmgr.hxx" #include <sfx2/app.hxx> #include <sfx2/unoctitm.hxx> #include <sfx2/dispatch.hxx> diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx index 20b7abb5d087..479e8ddea745 100644 --- a/sfx2/source/appl/impldde.cxx +++ b/sfx2/source/appl/impldde.cxx @@ -45,7 +45,7 @@ #include "dde.hrc" #include <sfx2/lnkbase.hxx> #include <sfx2/linkmgr.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <com/sun/star/uno/Any.hxx> #include <com/sun/star/uno/Sequence.hxx> diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx index ce69ba225157..934b4051a638 100644 --- a/sfx2/source/appl/linkmgr2.cxx +++ b/sfx2/source/appl/linkmgr2.cxx @@ -50,7 +50,7 @@ #include "fileobj.hxx" #include "impldde.hxx" #include "app.hrc" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #define _SVSTDARR_STRINGSDTOR #include <svl/svstdarr.hxx> diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx index 314832e2249d..6a51783a8a04 100644 --- a/sfx2/source/appl/lnkbase2.cxx +++ b/sfx2/source/appl/lnkbase2.cxx @@ -37,7 +37,7 @@ #include <sfx2/linkmgr.hxx> #include <vcl/svapp.hxx> #include "app.hrc" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/filedlghelper.hxx> #include <tools/debug.hxx> #include <svl/svdde.hxx> diff --git a/sfx2/source/appl/makefile.mk b/sfx2/source/appl/makefile.mk deleted file mode 100644 index 30f74355077a..000000000000 --- a/sfx2/source/appl/makefile.mk +++ /dev/null @@ -1,158 +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=sfx2 -TARGET=appl -ENABLE_EXCEPTIONS=TRUE -LIBTARGET=NO - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# w.g. compilerbugs -.IF "$(GUI)"=="WNT" -.IF "$(COM)"!="GCC" -CFLAGS+=-Od -CFLAGS+=-DENABLE_QUICKSTART_APPLET -.ENDIF -.ENDIF - -.IF "$(GUIBASE)"=="aqua" -CFLAGS+=-DENABLE_QUICKSTART_APPLET -.ENDIF - -.IF "$(GUI)"=="UNX" - CDEFS+=-DDLL_NAME=libsfx$(DLLPOSTFIX)$(DLLPOST) -.IF "$(ENABLE_SYSTRAY_GTK)"=="TRUE" - PKGCONFIG_MODULES=gtk+-2.0 - .INCLUDE: pkg_config.mk - CFLAGS+=$(PKGCONFIG_CFLAGS) - CFLAGS+=-DENABLE_QUICKSTART_APPLET - CDEFS+=-DPLUGIN_NAME=libqstart_gtk$(DLLPOSTFIX)$(DLLPOST) -.ENDIF # "$(ENABLE_SYSTRAY_GTK)"=="TRUE" -.ELSE - CDEFS+=-DDLL_NAME=sfx$(DLLPOSTFIX)$(DLLPOST) -.ENDIF - -# --- Files -------------------------------------------------------- - -SRS1NAME=appl -SRC1FILES = \ - app.src newhelp.src dde.src - -SRS2NAME=sfx -SRC2FILES = \ - sfx.src - -SFX_OBJECTS = \ - $(SLO)$/app.obj \ - $(SLO)$/appbas.obj \ - $(SLO)$/appcfg.obj \ - $(SLO)$/appchild.obj \ - $(SLO)$/appdata.obj \ - $(SLO)$/appdde.obj \ - $(SLO)$/appinit.obj \ - $(SLO)$/appmain.obj \ - $(SLO)$/appmisc.obj \ - $(SLO)$/appopen.obj \ - $(SLO)$/appquit.obj \ - $(SLO)$/appreg.obj \ - $(SLO)$/appserv.obj \ - $(SLO)$/appuno.obj \ - $(SLO)$/appbaslib.obj \ - $(SLO)$/childwin.obj \ - $(SLO)$/fileobj.obj \ - $(SLO)$/helpdispatch.obj \ - $(SLO)$/helpinterceptor.obj \ - $(SLO)$/imagemgr.obj\ - $(SLO)$/imestatuswindow.obj \ - $(SLO)$/impldde.obj \ - $(SLO)$/linkmgr2.obj \ - $(SLO)$/linksrc.obj \ - $(SLO)$/lnkbase2.obj \ - $(SLO)$/module.obj \ - $(SLO)$/newhelp.obj \ - $(SLO)$/opengrf.obj \ - $(SLO)$/sfxhelp.obj \ - $(SLO)$/sfxpicklist.obj \ - $(SLO)$/shutdownicon.obj \ - $(SLO)$/shutdowniconw32.obj \ - $(SLO)$/workwin.obj \ - $(SLO)$/xpackcreator.obj \ - $(SLO)$/fwkhelper.obj - -.IF "$(GUI)"=="OS2" -SFX_OBJECTS += $(SLO)$/shutdowniconOs2.obj -.ENDIF - -.IF "$(GUIBASE)"=="aqua" -SFX_OBJECTS += $(SLO)$/shutdowniconaqua.obj -.ENDIF - -SLOFILES = $(SFX_OBJECTS) -LIB1TARGET= $(SLB)$/$(TARGET).lib -LIB1OBJFILES= $(SFX_OBJECTS) - -.IF "$(ENABLE_SYSTRAY_GTK)"=="TRUE" -QUICKSTART_OBJECTS = $(SLO)$/shutdowniconunx.obj -SLOFILES += $(QUICKSTART_OBJECTS) - -LIB2TARGET= $(SLB)$/quickstart.lib -LIB2OBJFILES= $(QUICKSTART_OBJECTS) -.ENDIF - -.IF "$(GUI)"=="OS2" -SLOFILES += $(SLO)$/shutdowniconOs2.obj -.ENDIF - -EXCEPTIONSFILES=\ - $(SLO)$/imagemgr.obj \ - $(SLO)$/appopen.obj \ - $(SLO)$/appmain.obj \ - $(SLO)$/appmisc.obj \ - $(SLO)$/appinit.obj \ - $(SLO)$/appcfg.obj \ - $(SLO)$/fileobj.obj \ - $(SLO)$/helpinterceptor.obj \ - $(SLO)$/newhelp.obj \ - $(SLO)$/opengrf.obj \ - $(SLO)$/sfxhelp.obj \ - $(SLO)$/shutdownicon.obj \ - $(SLO)$/shutdowniconw32.obj \ - $(SLO)$/sfxpicklist.obj \ - $(SLO)$/helpdispatch.obj \ - $(SLO)$/xpackcreator.obj - - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sfx2/source/appl/module.cxx b/sfx2/source/appl/module.cxx index 895263ef4783..ba91d9c1117b 100644 --- a/sfx2/source/appl/module.cxx +++ b/sfx2/source/appl/module.cxx @@ -38,10 +38,10 @@ #include <sfx2/module.hxx> #include <sfx2/app.hxx> #include "arrdecl.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/msgpool.hxx> #include <sfx2/tbxctrl.hxx> -#include "stbitem.hxx" +#include "sfx2/stbitem.hxx" #include <sfx2/mnuitem.hxx> #include <sfx2/childwin.hxx> #include <sfx2/mnumgr.hxx> diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index 1d79b89a776d..96f4c6b91f5b 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -30,16 +30,16 @@ #include "newhelp.hxx" #include <sfx2/sfxuno.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "helpinterceptor.hxx" #include "helper.hxx" #include <sfx2/msgpool.hxx> #include <sfx2/app.hxx> #include "sfxtypes.hxx" #include "panelist.hxx" -#include "imgmgr.hxx" +#include "sfx2/imgmgr.hxx" #include "srchdlg.hxx" -#include "sfxhelp.hxx" +#include "sfx2/sfxhelp.hxx" #include "app.hrc" #include "newhelp.hrc" diff --git a/sfx2/source/appl/opengrf.cxx b/sfx2/source/appl/opengrf.cxx index fd2043a9a431..328bca2522b5 100644 --- a/sfx2/source/appl/opengrf.cxx +++ b/sfx2/source/appl/opengrf.cxx @@ -54,7 +54,7 @@ #include <unotools/pathoptions.hxx> #include <sfx2/opengrf.hxx> #include "app.hrc" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" //----------------------------------------------------------------------------- diff --git a/sfx2/source/appl/sfx.src b/sfx2/source/appl/sfx.src index 7d4bb0db1726..c3b734e327de 100644 --- a/sfx2/source/appl/sfx.src +++ b/sfx2/source/appl/sfx.src @@ -27,107 +27,16 @@ #include <sfx2/sfx.hrc> -String STR_NONAME -{ - Text [ en-US ] = "Untitled" ; -}; - -String STR_NONE -{ - Text [ en-US ] = "- None -" ; -}; - -String STR_CLOSE -{ - Text [ en-US ] = "Close" ; -}; - -String STR_STYLE_FILTER_AUTO -{ - Text [ en-US ] = "Automatic" ; -}; - String STR_STYLE_FILTER_USED { Text [ en-US ] = "Applied Styles" ; }; - - - String STR_STYLE_FILTER_USERDEF { Text [ en-US ] = "Custom Styles" ; }; - String STR_STYLE_FILTER_ALL { Text [ en-US ] = "All Styles" ; }; -String STR_STANDARD -{ - Text [ en-US ] = "Standard" ; -}; -String STR_STANDARD_SHORTCUT -{ - Text [ en-US ] = "Standard" ; -}; - -String STR_SFX_FILTERNAME_ALL -{ - Text [ en-US ] = "All files (*.*)" ; -}; - -String STR_BYTES -{ - Text [ en-US ] = "Bytes" ; -}; - -String STR_KB -{ - Text [ en-US ] = "KB" ; -}; - -String STR_MB -{ - Text [ en-US ] = "MB" ; -}; - - -String STR_GB -{ - Text [ en-US ] = "GB" ; -}; - -String STR_UNDO -{ - Text [ en-US ] = "Undo: " ; -}; - -String STR_REDO -{ - Text [ en-US ] = "Re~do: " ; -}; - -String STR_REPEAT -{ - Text [ en-US ] = "~Repeat: " ; -}; - -String RID_STR_NEW_TASK -{ - Text [ en-US ] = "New task"; -}; -QueryBox MSG_QUERY_LASTVERSION -{ - Buttons = WB_YES_NO ; - DefButton = WB_DEF_NO ; - Message [ en-US ] = "Cancel all changes?" ; -}; - -// i66948 used in project scripting -String STR_ERRUNOEVENTBINDUNG -{ - Text [ en-US ] = "An appropriate component method %1\ncould not be found.\n\nCheck spelling of method name."; -}; - diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx index a12ced237f55..bab37281cb05 100644 --- a/sfx2/source/appl/sfxhelp.cxx +++ b/sfx2/source/appl/sfxhelp.cxx @@ -28,7 +28,8 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sfx2.hxx" -#include "sfxhelp.hxx" +#include "sfx2/sfxhelp.hxx" + #include <set> #include <algorithm> #include <com/sun/star/uno/Reference.h> @@ -70,7 +71,9 @@ #include <svl/svstdarr.hxx> #include "newhelp.hxx" -#include "sfxresid.hxx" +#include <sfx2/objsh.hxx> +#include <sfx2/docfac.hxx> +#include "sfx2/sfxresid.hxx" #include "helper.hxx" #include "app.hrc" #include <sfx2/sfxuno.hxx> diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx index 3fce25e7e0d6..3c323b05fd72 100644 --- a/sfx2/source/appl/shutdownicon.cxx +++ b/sfx2/source/appl/shutdownicon.cxx @@ -69,7 +69,7 @@ #endif #include <vcl/timer.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" using namespace ::com::sun::star::uno; using namespace ::com::sun::star::frame; @@ -80,7 +80,11 @@ using namespace ::com::sun::star::beans; using namespace ::com::sun::star::util; using namespace ::com::sun::star::ui::dialogs; using namespace ::vos; +#ifdef WNT +using ::rtl::OUString; +#else using namespace ::rtl; +#endif using namespace ::sfx2; #ifdef ENABLE_QUICKSTART_APPLET @@ -89,6 +93,10 @@ extern "C" { static void SAL_CALL thisModule() {} } # endif #endif +#if defined(UNX) && defined(ENABLE_SYSTRAY_GTK) +#define PLUGIN_NAME "libqstart_gtkli.so" +#endif + class SfxNotificationListener_Impl : public cppu::WeakImplHelper1< XDispatchResultListener > { public: diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx index f9a388deee5c..2224643bc88f 100644 --- a/sfx2/source/appl/workwin.cxx +++ b/sfx2/source/appl/workwin.cxx @@ -47,7 +47,7 @@ #include <sfx2/viewsh.hxx> #include "splitwin.hxx" #include <sfx2/msgpool.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/objsh.hxx> #include <sfx2/request.hxx> // SFX_ITEMSET_SET #include <vcl/taskpanelist.hxx> diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx index ad26958036c1..06e17e232041 100644 --- a/sfx2/source/bastyp/fltfnc.cxx +++ b/sfx2/source/bastyp/fltfnc.cxx @@ -110,7 +110,7 @@ using namespace ::vos; #include <svtools/sfxecode.hxx> #include <unotools/syslocale.hxx> -#include "sfxhelp.hxx" +#include "sfx2/sfxhelp.hxx" #include <sfx2/docfilt.hxx> #include <sfx2/docfac.hxx> #include "sfxtypes.hxx" @@ -119,7 +119,7 @@ using namespace ::vos; #include <sfx2/progress.hxx> #include "openflag.hxx" #include "bastyp.hrc" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/doctempl.hxx> #include <sfx2/frame.hxx> #include <sfx2/dispatch.hxx> diff --git a/sfx2/source/bastyp/frmhtmlw.cxx b/sfx2/source/bastyp/frmhtmlw.cxx index df81eb3f4039..e17151c6e322 100644 --- a/sfx2/source/bastyp/frmhtmlw.cxx +++ b/sfx2/source/bastyp/frmhtmlw.cxx @@ -46,7 +46,7 @@ #include <sfx2/app.hxx> #include <sfx2/viewfrm.hxx> #include <sfx2/docfile.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/objsh.hxx> #include <sfx2/sfx.hrc> #include "bastyp.hrc" diff --git a/sfx2/source/bastyp/makefile.mk b/sfx2/source/bastyp/makefile.mk deleted file mode 100644 index 75c0cace40d6..000000000000 --- a/sfx2/source/bastyp/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=sfx2 -TARGET=bastyp -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES =\ - $(SLO)$/sfxhtml.obj \ - $(SLO)$/frmhtml.obj \ - $(SLO)$/frmhtmlw.obj \ - $(SLO)$/misc.obj \ - $(SLO)$/progress.obj \ - $(SLO)$/sfxresid.obj \ - $(SLO)$/bitset.obj \ - $(SLO)$/minarray.obj \ - $(SLO)$/fltfnc.obj \ - $(SLO)$/mieclip.obj \ - $(SLO)$/fltlst.obj \ - $(SLO)$/helper.obj - -SRS1NAME=$(TARGET) -SRC1FILES =\ - fltfnc.src \ - bastyp.src - -EXCEPTIONSFILES =\ - $(SLO)$/helper.obj - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sfx2/source/bastyp/mieclip.cxx b/sfx2/source/bastyp/mieclip.cxx index ee2b15d34ab9..4154ddc6301b 100644 --- a/sfx2/source/bastyp/mieclip.cxx +++ b/sfx2/source/bastyp/mieclip.cxx @@ -33,7 +33,7 @@ #include <sot/storage.hxx> #include <sot/formats.hxx> -#include <mieclip.hxx> +#include <sfx2/mieclip.hxx> #include <sfx2/sfxuno.hxx> MSE40HTMLClipFormatObj::~MSE40HTMLClipFormatObj() diff --git a/sfx2/source/bastyp/progress.cxx b/sfx2/source/bastyp/progress.cxx index 3af0ba2b0a6f..9650c8155d84 100644 --- a/sfx2/source/bastyp/progress.cxx +++ b/sfx2/source/bastyp/progress.cxx @@ -51,7 +51,7 @@ #include "sfxtypes.hxx" #include <sfx2/docfile.hxx> #include "workwin.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "bastyp.hrc" #include <sfx2/msg.hxx> diff --git a/sfx2/source/bastyp/sfxresid.cxx b/sfx2/source/bastyp/sfxresid.cxx index 11ab5a724099..cf1cd983f76e 100644 --- a/sfx2/source/bastyp/sfxresid.cxx +++ b/sfx2/source/bastyp/sfxresid.cxx @@ -32,7 +32,7 @@ #endif #include <tools/simplerm.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/app.hxx> // ----------------------------------------------------------------------- diff --git a/sfx2/source/config/evntconf.cxx b/sfx2/source/config/evntconf.cxx index f474bfb0838c..f2f3b5c50dcb 100644 --- a/sfx2/source/config/evntconf.cxx +++ b/sfx2/source/config/evntconf.cxx @@ -28,26 +28,19 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sfx2.hxx" #include <vcl/msgbox.hxx> -#ifndef _SV_RESARY_HXX #include <tools/resary.hxx> -#endif #include <svl/lstner.hxx> #include <basic/basmgr.hxx> #include <basic/sbmod.hxx> #include <tools/urlobj.hxx> #include <basic/sbx.hxx> - -#include <sot/storage.hxx> + #include <sot/storage.hxx> #include <unotools/securityoptions.hxx> -#ifndef _RTL_USTRING_ #include <rtl/ustring.h> -#endif - #include <com/sun/star/uno/Any.hxx> #include <framework/eventsconfiguration.hxx> #include <comphelper/processfactory.hxx> - #include <sfx2/evntconf.hxx> #include <sfx2/docfile.hxx> @@ -55,7 +48,7 @@ #include <sfx2/objsh.hxx> #include <sfx2/dispatch.hxx> #include "config.hrc" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "eventsupplier.hxx" #include <com/sun/star/beans/PropertyValue.hpp> @@ -67,6 +60,7 @@ // ----------------------------------------------------------------------- TYPEINIT1(SfxEventHint, SfxHint); TYPEINIT1(SfxEventNamesItem, SfxPoolItem); +TYPEINIT1(SfxViewEventHint, SfxHint); using namespace com::sun::star; diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index f184e65b930f..ddf3422744cb 100755 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -57,7 +57,7 @@ // wg. nAutoPageID #include "appdata.hxx" -#include "sfxhelp.hxx" +#include "sfx2/sfxhelp.hxx" #include <sfx2/dispatch.hxx> #include <sfx2/minstack.hxx> #include <sfx2/msg.hxx> diff --git a/sfx2/source/control/makefile.mk b/sfx2/source/control/makefile.mk deleted file mode 100644 index 7211bc409ca3..000000000000 --- a/sfx2/source/control/makefile.mk +++ /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. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=sfx2 -TARGET=control -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# w.g. compilerbugs -.IF "$(GUI)"=="WNT" -.IF "$(COM)"!="GCC" -CFLAGS+=-Od -.ENDIF -.ENDIF - -.IF "$(COM)"=="GCC" -CFLAGS+=-O0 -.ENDIF - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/bindings.obj \ - $(SLO)$/ctrlitem.obj \ - $(SLO)$/dispatch.obj \ - $(SLO)$/macro.obj \ - $(SLO)$/minfitem.obj \ - $(SLO)$/msg.obj \ - $(SLO)$/msgpool.obj \ - $(SLO)$/objface.obj \ - $(SLO)$/querystatus.obj \ - $(SLO)$/request.obj \ - $(SLO)$/sfxstatuslistener.obj \ - $(SLO)$/shell.obj \ - $(SLO)$/sorgitm.obj \ - $(SLO)$/statcach.obj \ - $(SLO)$/unoctitm.obj - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sfx2/source/control/minfitem.cxx b/sfx2/source/control/minfitem.cxx index 0c0c0124b612..b0cdd58d2645 100644 --- a/sfx2/source/control/minfitem.cxx +++ b/sfx2/source/control/minfitem.cxx @@ -30,10 +30,7 @@ // INCLUDE --------------------------------------------------------------- -#ifndef GCC -#endif - -#include "minfitem.hxx" +#include "sfx2/minfitem.hxx" // STATIC DATA ----------------------------------------------------------- diff --git a/sfx2/source/control/msgpool.cxx b/sfx2/source/control/msgpool.cxx index f9cd25331329..9d3661ef1bc1 100644 --- a/sfx2/source/control/msgpool.cxx +++ b/sfx2/source/control/msgpool.cxx @@ -40,7 +40,7 @@ #include <sfx2/app.hxx> #include <sfx2/objface.hxx> #include "sfxtypes.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "arrdecl.hxx" #include <sfx2/module.hxx> diff --git a/sfx2/source/control/objface.cxx b/sfx2/source/control/objface.cxx index 0692b99b8adb..d0ce2abae773 100644 --- a/sfx2/source/control/objface.cxx +++ b/sfx2/source/control/objface.cxx @@ -39,7 +39,7 @@ #include <sfx2/msg.hxx> #include <sfx2/app.hxx> #include <sfx2/msgpool.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/minarray.hxx> #include <sfx2/objsh.hxx> diff --git a/sfx2/source/control/querystatus.cxx b/sfx2/source/control/querystatus.cxx index 8688740ce0fb..bee4a5c87675 100644 --- a/sfx2/source/control/querystatus.cxx +++ b/sfx2/source/control/querystatus.cxx @@ -44,7 +44,7 @@ #include <com/sun/star/frame/status/ItemState.hpp> #include <com/sun/star/frame/status/Visibility.hpp> -using namespace ::rtl; +using ::rtl::OUString; using namespace ::cppu; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::frame; diff --git a/sfx2/source/control/sfxstatuslistener.cxx b/sfx2/source/control/sfxstatuslistener.cxx index f6bb2b2c3004..c2cf5f164e7c 100644 --- a/sfx2/source/control/sfxstatuslistener.cxx +++ b/sfx2/source/control/sfxstatuslistener.cxx @@ -50,7 +50,7 @@ #include <sfx2/unoctitm.hxx> #include <sfx2/msgpool.hxx> -using namespace ::rtl; +using ::rtl::OUString; using namespace ::cppu; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::frame; diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index e53f1766b7b9..f85d0d8e9e49 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -463,7 +463,7 @@ void SfxOfficeDispatch::SetMasterUnoCommand( sal_Bool bSet ) sal_Bool SfxOfficeDispatch::IsMasterUnoCommand() const { if ( pControllerItem ) - pControllerItem->isMasterSlaveCommand(); + return pControllerItem->isMasterSlaveCommand(); return sal_False; } diff --git a/sfx2/source/dialog/about.cxx b/sfx2/source/dialog/about.cxx index 7d868eb97362..ea7b0a2bb0bd 100644 --- a/sfx2/source/dialog/about.cxx +++ b/sfx2/source/dialog/about.cxx @@ -29,7 +29,6 @@ #include "precompiled_sfx2.hxx" // include --------------------------------------------------------------- -#include <aboutbmpnames.hxx> #ifndef _SV_APP_HXX #include <vcl/svapp.hxx> @@ -114,7 +113,7 @@ Image SfxApplication::GetApplicationLogo() { Image aAppLogo; - rtl::OUString aAbouts( RTL_CONSTASCII_USTRINGPARAM( ABOUT_BITMAP_STRINGLIST ) ); + rtl::OUString aAbouts; bool bLoaded = false; sal_Int32 nIndex = 0; do diff --git a/sfx2/source/dialog/alienwarn.cxx b/sfx2/source/dialog/alienwarn.cxx index 6fd765dcb616..13a0433b7be5 100644 --- a/sfx2/source/dialog/alienwarn.cxx +++ b/sfx2/source/dialog/alienwarn.cxx @@ -29,7 +29,7 @@ #include "precompiled_sfx2.hxx" #include "alienwarn.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/sfxuno.hxx> #include "alienwarn.hrc" diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx index df1f13155513..5a7f8a1fd900 100644 --- a/sfx2/source/dialog/basedlgs.cxx +++ b/sfx2/source/dialog/basedlgs.cxx @@ -47,9 +47,9 @@ #include <sfx2/dispatch.hxx> #include <sfx2/childwin.hxx> #include <sfx2/viewsh.hxx> -#include "sfxhelp.hxx" +#include "sfx2/sfxhelp.hxx" #include "workwin.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "dialog.hrc" using namespace ::com::sun::star::uno; diff --git a/sfx2/source/dialog/dinfedt.cxx b/sfx2/source/dialog/dinfedt.cxx index 85f9f955e355..5c250f7cc912 100644 --- a/sfx2/source/dialog/dinfedt.cxx +++ b/sfx2/source/dialog/dinfedt.cxx @@ -31,8 +31,8 @@ #ifndef GCC #endif -#include "dinfedt.hxx" -#include "sfxresid.hxx" +#include "sfx2/dinfedt.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/sfx.hrc> #include "dinfedt.hrc" diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx index 0864b0e18c2b..4f55dfde21a7 100644 --- a/sfx2/source/dialog/dockwin.cxx +++ b/sfx2/source/dialog/dockwin.cxx @@ -44,7 +44,7 @@ #include "workwin.hxx" #include "splitwin.hxx" #include <sfx2/viewsh.hxx> -#include "sfxhelp.hxx" +#include "sfx2/sfxhelp.hxx" #include <sfx2/objsh.hxx> #include <sfx2/msgpool.hxx> diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index 5045f1e9d75c..b740453cf5ff 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -91,7 +91,7 @@ #include <sfx2/docfac.hxx> #include "openflag.hxx" #include <sfx2/passwd.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/sfxsids.hrc> #include "filedlghelper.hrc" #include "filtergrouping.hxx" @@ -1892,7 +1892,16 @@ void FileDialogHelper_Impl::addFilters( sal_Int64 nFlags, sQuery.appendAscii(":eflags=" ); sQuery.append (::rtl::OUString::valueOf((sal_Int32)m_nDontFlags)); - uno::Reference< XEnumeration > xResult = xFilterCont->createSubSetEnumerationByQuery(sQuery.makeStringAndClear()); + uno::Reference< XEnumeration > xResult; + try + { + xResult = xFilterCont->createSubSetEnumerationByQuery(sQuery.makeStringAndClear()); + } + catch( uno::Exception& ) + { + DBG_ERRORFILE( "Could not get filters from the configuration!" ); + } + TSortedFilterList aIter (xResult); // no matcher any longer used ... diff --git a/sfx2/source/dialog/filtergrouping.cxx b/sfx2/source/dialog/filtergrouping.cxx index ea2429be8157..ab75d777c5ff 100644 --- a/sfx2/source/dialog/filtergrouping.cxx +++ b/sfx2/source/dialog/filtergrouping.cxx @@ -32,7 +32,7 @@ #include <sfx2/filedlghelper.hxx> #include <sfx2/sfx.hrc> #include <sfx2/docfac.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <osl/thread.h> #include <com/sun/star/ui/dialogs/XFilterGroupManager.hpp> #include <com/sun/star/beans/StringPair.hpp> diff --git a/sfx2/source/dialog/mailmodel.cxx b/sfx2/source/dialog/mailmodel.cxx index dfd099f6cf45..8c05fa424263 100644 --- a/sfx2/source/dialog/mailmodel.cxx +++ b/sfx2/source/dialog/mailmodel.cxx @@ -47,9 +47,7 @@ #include <com/sun/star/frame/XStorable.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/security/CertificateValidity.hpp> -#ifndef _COM_SUN_STAR_SECURITY_DOCUMENTSIGNATURESINFORMATION_HPP_ #include <com/sun/star/security/DocumentSignatureInformation.hpp> -#endif #include <com/sun/star/security/XDocumentDigitalSignatures.hpp> #include <com/sun/star/frame/XDispatchProvider.hpp> #include <com/sun/star/frame/XDispatch.hpp> @@ -57,15 +55,15 @@ #include <com/sun/star/ucb/InsertCommandArgument.hpp> #include <com/sun/star/ui/dialogs/XExecutableDialog.hpp> #include <com/sun/star/document/XExporter.hpp> - +#include <rtl/textenc.h> #include <rtl/uri.h> #include <rtl/uri.hxx> #include <rtl/ustrbuf.hxx> #include <vcl/msgbox.hxx> -#include <mailmodelapi.hxx> +#include <sfx2/mailmodelapi.hxx> #include "sfxtypes.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/sfxsids.hrc> #include "dialog.hrc" diff --git a/sfx2/source/dialog/mailmodelapi.cxx b/sfx2/source/dialog/mailmodelapi.cxx deleted file mode 100644 index 223807d37b11..000000000000 --- a/sfx2/source/dialog/mailmodelapi.cxx +++ /dev/null @@ -1,693 +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_sfx2.hxx" -// includes -------------------------------------------------------------- -#include <com/sun/star/beans/PropertyValue.hpp> -#include <com/sun/star/frame/XFrame.hpp> -#include <com/sun/star/io/XActiveDataSink.hpp> -#include <com/sun/star/lang/XMultiServiceFactory.hpp> -#include <com/sun/star/mozilla/XPluginInstance.hpp> -#include <com/sun/star/ucb/XDataContainer.hpp> -#include <com/sun/star/ucb/CommandAbortedException.hpp> -#include <com/sun/star/uno/Reference.h> -#include <com/sun/star/util/XURLTransformer.hpp> -#include <com/sun/star/frame/XStorable.hpp> -#include <com/sun/star/frame/XDispatchProvider.hpp> -#include <com/sun/star/frame/XDispatch.hpp> -#include <com/sun/star/util/XModifiable.hpp> -#include <com/sun/star/system/XSimpleMailClientSupplier.hpp> -#include <com/sun/star/system/SimpleMailClientFlags.hpp> -#include <com/sun/star/frame/XModuleManager.hpp> -#ifndef _RTL_TEXTENC_H -#include <rtl/textench.h> -#endif -#include <vos/mutex.hxx> -#include <rtl/uri.h> -#include <rtl/uri.hxx> -#include <rtl/ustrbuf.hxx> -#include <unotools/streamhelper.hxx> -#include <unotools/configitem.hxx> -#include <comphelper/mediadescriptor.hxx> -#include <vos/thread.hxx> -#include <vcl/msgbox.hxx> - -#include "mailmodelapi.hxx" -#include <sfx2/docfilt.hxx> -#include <sfx2/docfac.hxx> -#include "sfxtypes.hxx" - -#include "dialog.hrc" -#include "sfxresid.hxx" -#include <sfx2/sfxuno.hxx> -#include <sfx2/fcontnr.hxx> -#include "guisaveas.hxx" - -#include <unotools/tempfile.hxx> -#include <vcl/svapp.hxx> -#include <svl/stritem.hxx> -#include <svl/eitem.hxx> -#include <unotools/useroptions.hxx> -#include <comphelper/processfactory.hxx> -#include <comphelper/extract.hxx> -#include <ucbhelper/content.hxx> -#include <toolkit/helper/vclunohelper.hxx> -#include <tools/urlobj.hxx> - -// -------------------------------------------------------------- -using namespace ::com::sun::star::beans; -using namespace ::com::sun::star::frame; -using namespace ::com::sun::star::frame; -using namespace ::com::sun::star::io; -using namespace ::com::sun::star::lang; -using namespace ::com::sun::star::mozilla; -using namespace ::com::sun::star::ucb; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::util; -using namespace ::com::sun::star::system; -using namespace ::rtl; - -namespace -{ - // functions ------------------------------------------------------------- - - BOOL CreateFromAddress_Impl( String& rFrom ) - - /* [Beschreibung] - - Diese Funktion versucht mit Hilfe des IniManagers eine From-Adresse - zu erzeugen. daf"ur werden die Felder 'Vorname', 'Name' und 'EMail' - aus der Applikations-Ini-Datei ausgelesen. Sollten diese Felder - nicht gesetzt sein, wird FALSE zur"uckgegeben. - - [R"uckgabewert] - - TRUE: Adresse konnte erzeugt werden. - FALSE: Adresse konnte nicht erzeugt werden. - */ - - { - SvtUserOptions aUserCFG; - String aName = aUserCFG.GetLastName (); - String aFirstName = aUserCFG.GetFirstName (); - if ( aFirstName.Len() || aName.Len() ) - { - if ( aFirstName.Len() ) - { - rFrom = TRIM( aFirstName ); - - if ( aName.Len() ) - rFrom += ' '; - } - rFrom += TRIM( aName ); - // unerlaubte Zeichen entfernen - rFrom.EraseAllChars( '<' ); - rFrom.EraseAllChars( '>' ); - rFrom.EraseAllChars( '@' ); - } - String aEmailName = aUserCFG.GetEmail(); - // unerlaubte Zeichen entfernen - aEmailName.EraseAllChars( '<' ); - aEmailName.EraseAllChars( '>' ); - - if ( aEmailName.Len() ) - { - if ( rFrom.Len() ) - rFrom += ' '; - ( ( rFrom += '<' ) += TRIM( aEmailName ) ) += '>'; - } - else - rFrom.Erase(); - return ( rFrom.Len() > 0 ); - } - -} - -// class OThread -class OMailSendThreadImpl : public ::vos::OThread -{ - public: - OMailSendThreadImpl( - Reference< XSimpleMailClient > xSimpleMailClient, - Reference< XSimpleMailMessage > xSimpleMailMessage, - const Reference< XFrame >& _xCurrentFrame, - long nSendFlags ) : - m_nSendFlags( nSendFlags ), - m_bSend( sal_False ), - m_xSimpleMailClient( xSimpleMailClient ), - m_xSimpleMailMessage( xSimpleMailMessage ), - m_xCurrentFrame(_xCurrentFrame) {} - - virtual ~OMailSendThreadImpl(); - - virtual void SAL_CALL run(); - virtual void SAL_CALL onTerminated(); - - private: - long m_nSendFlags; - sal_Bool m_bSend; - Reference< XSimpleMailClient > m_xSimpleMailClient; - Reference< XSimpleMailMessage > m_xSimpleMailMessage; - Reference< XFrame > m_xCurrentFrame; -}; - -OMailSendThreadImpl::~OMailSendThreadImpl() -{ -} - -void SAL_CALL OMailSendThreadImpl::run() -{ - try - { - m_xSimpleMailClient->sendSimpleMailMessage( m_xSimpleMailMessage, m_nSendFlags ); - m_bSend = sal_True; - } - catch ( IllegalArgumentException& ) - { - m_bSend = sal_False; - } - catch ( Exception& ) - { - m_bSend = sal_False; - } - - if ( m_bSend == sal_False ) - { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); - Reference< ::com::sun::star::awt::XWindow > xParentWindow = m_xCurrentFrame->getContainerWindow(); - Window* pParentWindow = VCLUnoHelper::GetWindow( xParentWindow ); - - ErrorBox aBox( pParentWindow, SfxResId( RID_ERRBOX_MAIL_CONFIG )); - aBox.Execute(); - } -} - -void SAL_CALL OMailSendThreadImpl::onTerminated() -{ - delete this; -} - -// class AddressList_Impl ------------------------------------------------ - -typedef String* AddressItemPtr_Impl; -DECLARE_LIST( AddressList_Impl, AddressItemPtr_Impl ) - -// class SfxMailModel ----------------------------------------------- - -void SfxMailModel::ClearList( AddressList_Impl* pList ) -{ - if ( pList ) - { - ULONG i, nCount = pList->Count(); - for ( i = 0; i < nCount; ++i ) - delete pList->GetObject(i); - pList->Clear(); - } -} - -void SfxMailModel::MakeValueList( AddressList_Impl* pList, String& rValueList ) -{ - rValueList.Erase(); - if ( pList ) - { - ULONG i, nCount = pList->Count(); - for ( i = 0; i < nCount; ++i ) - { - if ( rValueList.Len() > 0 ) - rValueList += ','; - rValueList += *pList->GetObject(i); - } - } -} -namespace -{ - String lcl_getFactoryName(const Reference<XInterface>& _xModel) - { - rtl::OUString sModuleIdentifier; - rtl::OUString sFactoryShortName; - Reference < XModuleManager > xModuleManager( ::comphelper::getProcessServiceFactory()->createInstance( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.ModuleManager")) ), UNO_QUERY ); - - if ( _xModel.is() ) - { - try - { - sModuleIdentifier = xModuleManager->identify( _xModel ); - } - catch ( ::com::sun::star::frame::UnknownModuleException& ) - { - DBG_WARNING( "SfxHelp::GetHelpModuleName_Impl(): unknown module (help in help?)" ); - } - catch ( Exception& ) - { - DBG_ERRORFILE( "SfxHelp::GetHelpModuleName_Impl(): exception of XModuleManager::identif y()" ); - } - } - - return sModuleIdentifier; - } - - String lcl_createTempFileName(const Reference < XModel >& _xModel,const ::rtl::OUString& _sAttachmentTitle) - { - // create temp file name with leading chars and extension - Reference < XStorable > xStor( _xModel, UNO_QUERY ); - String aLeadingStr; - if ( xStor.is() ) - { - sal_Bool bHasName = xStor->hasLocation(); - - if ( !bHasName ) - { - if ( _sAttachmentTitle.getLength() ) - aLeadingStr = _sAttachmentTitle; - else - aLeadingStr = String( DEFINE_CONST_UNICODE("noname") ); - } - else - { - INetURLObject aFileObj(_xModel->getURL()); - if ( aFileObj.hasExtension() ) - { - aFileObj.removeExtension(); - if ( _sAttachmentTitle.getLength() ) - aLeadingStr = _sAttachmentTitle; - else - aLeadingStr = aFileObj.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET ); - aLeadingStr += String::CreateFromAscii( "_" ); - } - else - { - if ( _sAttachmentTitle.getLength() ) - aLeadingStr = _sAttachmentTitle; - else - aLeadingStr = aFileObj.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET ); - aLeadingStr += String::CreateFromAscii( "_" ); - } - } - } - return aLeadingStr; - } - -} -SfxMailModel::SaveResult SfxMailModel::SaveDocument( const ::rtl::OUString& _sAttachmentTitle - , const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& _xModel - , String& rFileName) -{ - SaveResult eRet = SAVE_CANCELLED; - try - { - Reference<XModifiable> xMod(_xModel,UNO_QUERY); - - // save the document - if ( xMod.is() ) - { - // detect filter - const SfxFilter* pFilter = SfxFilter::GetDefaultFilter(lcl_getFactoryName(_xModel)); -// sal_Bool bHasFilter = pFilter != NULL; - - sal_Bool bRet = sal_False; - // create temp file name with leading chars and extension - Reference < XStorable > xStor( _xModel, UNO_QUERY ); - if ( xStor.is() ) - { - String* pExt = NULL; - INetURLObject aFileObj(_xModel->getURL()); - if ( aFileObj.hasExtension() ) - pExt = new String( String::CreateFromAscii( "." ) + (OUString) aFileObj.getExtension() ); - - String aLeadingStr = lcl_createTempFileName(_xModel,_sAttachmentTitle); - - if ( pFilter && !pExt ) - { - pExt = new String( pFilter->GetWildcard()().GetToken(0) ); - // erase the '*' from the extension (e.g. "*.sdw") - pExt->Erase( 0, 1 ); - } - - { - ::utl::TempFile aTempFile( aLeadingStr, pExt ); - rFileName = aTempFile.GetURL(); - } - delete pExt; - // save document to temp file - - // save document to temp file - Sequence < PropertyValue > aArgs( _xModel->getArgs() ); - ::comphelper::MediaDescriptor aMedia(aArgs); - - if ( pFilter ) - { - ::rtl::OUString sFilter(pFilter->GetFilterName()); - ::rtl::OUString sFilterName(RTL_CONSTASCII_USTRINGPARAM("FilterName")); - if ( !aMedia.createItemIfMissing(sFilterName,sFilter) ) - aMedia[sFilterName] <<= sFilter; - } - - ::rtl::OUString sURL(RTL_CONSTASCII_USTRINGPARAM("URL")); - if ( !aMedia.createItemIfMissing(sURL,::rtl::OUString(rFileName)) ) - aMedia[sURL] <<= ::rtl::OUString(rFileName); - - ::rtl::OUString sSaveTo(RTL_CONSTASCII_USTRINGPARAM("SaveTo")); - if ( !aMedia.createItemIfMissing(sSaveTo,sal_True) ) - aMedia[sSaveTo] <<= sal_True; - - ::rtl::OUString sReadOnly(RTL_CONSTASCII_USTRINGPARAM("ReadOnly")); - if ( !aMedia.createItemIfMissing(sReadOnly,sal_False) ) - aMedia[sReadOnly] <<= sal_False; - - aMedia >> aArgs; - - try - { - Reference < XMultiServiceFactory > xMgr = ::comphelper::getProcessServiceFactory(); - SfxStoringHelper aHelper(xMgr); - aHelper.GUIStoreModel(_xModel,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SaveAs")),aArgs, sal_False, ::rtl::OUString() ); - // xStor->storeToURL(rFileName,aArgs); - bRet = sal_True; - } - catch(Exception&) - { - } - } - - // restore old settings -/* TODO - if ( !bModified && xDocShell->IsEnableSetModified() ) - xDocShell->SetModified( FALSE ); -*/ - eRet = bRet ? SAVE_SUCCESSFULL : SAVE_ERROR; - } - } - catch(Exception&) - { - OSL_ENSURE(0,"Exception catched!"); - } - - return eRet; -} -SfxMailModel::SaveResult SfxMailModel::SaveDocAsPDF( const ::rtl::OUString& _sAttachmentTitle - , const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& _xModel - , String& rFileName) -{ - SaveResult eRet = SAVE_CANCELLED; - try - { - Reference<XModifiable> xMod(_xModel,UNO_QUERY); - - // save the document - if ( xMod.is() ) - { - // Get PDF Filter from document - ::rtl::OUString sPDFMediaType(RTL_CONSTASCII_USTRINGPARAM("application/pdf")); - - sal_Bool bRet = sal_False; - // create temp file name with leading chars and extension - Reference < XStorable > xStor( _xModel, UNO_QUERY ); - if ( xStor.is() ) - { - String aLeadingStr = lcl_createTempFileName(_xModel,_sAttachmentTitle); - String aPDFExtension = String::CreateFromAscii( ".pdf" ); - ::utl::TempFile aTempFile( aLeadingStr, &aPDFExtension ); - - rFileName = aTempFile.GetURL(); - - // save document to temp file - Sequence < PropertyValue > aArgs( _xModel->getArgs() ); - ::comphelper::MediaDescriptor aMedia(aArgs); - - ::rtl::OUString sMediaType(RTL_CONSTASCII_USTRINGPARAM("MediaType")); - if ( !aMedia.createItemIfMissing(sMediaType,sPDFMediaType) ) - aMedia[sMediaType] <<= sPDFMediaType; - - ::rtl::OUString sURL(RTL_CONSTASCII_USTRINGPARAM("URL")); - if ( !aMedia.createItemIfMissing(sURL,::rtl::OUString(rFileName)) ) - aMedia[sURL] <<= ::rtl::OUString(rFileName); - aMedia >> aArgs; - - try - { - Reference < XMultiServiceFactory > xMgr = ::comphelper::getProcessServiceFactory(); - SfxStoringHelper aHelper(xMgr); - aHelper.GUIStoreModel(_xModel,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ExportToPDF")),aArgs, sal_False, ::rtl::OUString); - // xStor->storeToURL(rFileName,aArgs); - bRet = sal_True; - } - catch(Exception&) - { - } - - eRet = bRet ? SAVE_SUCCESSFULL : SAVE_CANCELLED; - - // restore old settings - /* TODO - if ( !bModified && xDocShell->IsEnableSetModified() ) - xDocShell->SetModified( FALSE ); - */ - } - } - } - catch(Exception&) - { - OSL_ENSURE(0,"Exception catched!"); - } - - return eRet; -} -// ----------------------------------------------------------------------------- -SfxMailModel::SendMailResult SfxMailModel::AttachDocument( MailDocType _eMailDocType - , const Reference< XModel >& _xModel - , const ::rtl::OUString& _sAttachmentTitle) -{ - SaveResult eSaveResult; - String aFileName; - -// sal_Bool bSuccessfull = sal_False; - if ( _eMailDocType == TYPE_SELF ) - eSaveResult = SaveDocument( _sAttachmentTitle,_xModel,aFileName); - else - eSaveResult = SaveDocAsPDF( _sAttachmentTitle,_xModel,aFileName); - - if ( eSaveResult == SAVE_SUCCESSFULL && aFileName.Len() ) - maAttachedDocuments.push_back(aFileName); - return eSaveResult == SAVE_SUCCESSFULL ? SEND_MAIL_OK : SEND_MAIL_ERROR; -} -// ----------------------------------------------------------------------------- - -IMPL_LINK_INLINE_START( SfxMailModel, DoneHdl, void*, EMPTYARG ) -{ - mbLoadDone = sal_True; - return 0; -} -// ----------------------------------------------------------------------------- -IMPL_LINK_INLINE_END( SfxMailModel, DoneHdl, void*, EMPTYARG ) - -SfxMailModel::SfxMailModel( const Reference< XFrame >& _xFrame) : - - mpToList ( NULL ), - mpCcList ( NULL ), - mpBccList ( NULL ), - m_xCurrentFrame ( _xFrame ), - mePriority ( PRIO_NORMAL ), - mbLoadDone ( sal_True ) - -{ -} - -SfxMailModel::~SfxMailModel() -{ - ClearList( mpToList ); - delete mpToList; - ClearList( mpCcList ); - delete mpCcList; - ClearList( mpBccList ); - delete mpBccList; -} - -void SfxMailModel::AddAddress( const String& rAddress, AddressRole eRole ) -{ - // don't add a empty address - if ( rAddress.Len() > 0 ) - { - AddressList_Impl* pList = NULL; - if ( ROLE_TO == eRole ) - { - if ( !mpToList ) - // create the list - mpToList = new AddressList_Impl; - pList = mpToList; - } - else if ( ROLE_CC == eRole ) - { - if ( !mpCcList ) - // create the list - mpCcList = new AddressList_Impl; - pList = mpCcList; - } - else if ( ROLE_BCC == eRole ) - { - if ( !mpBccList ) - // create the list - mpBccList = new AddressList_Impl; - pList = mpBccList; - } - else - { - DBG_ERRORFILE( "invalid address role" ); - } - - if ( pList ) - { - // add address to list - AddressItemPtr_Impl pAddress = new String( rAddress ); - pList->Insert( pAddress, LIST_APPEND ); - } - } -} - -SfxMailModel::SendMailResult SfxMailModel::Send( ) -{ - OSL_ENSURE(!maAttachedDocuments.empty(),"No document added!"); - SendMailResult eResult = SEND_MAIL_ERROR; - if ( !maAttachedDocuments.empty() ) - { - - Reference < XMultiServiceFactory > xMgr = ::comphelper::getProcessServiceFactory(); - if ( xMgr.is() ) - { - Reference< XSimpleMailClientSupplier > xSimpleMailClientSupplier; - - // Prefer the SimpleSystemMail service if available - xSimpleMailClientSupplier = Reference< XSimpleMailClientSupplier >( - xMgr->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.system.SimpleSystemMail" ))), - UNO_QUERY ); - - if ( ! xSimpleMailClientSupplier.is() ) - { - xSimpleMailClientSupplier = Reference< XSimpleMailClientSupplier >( - xMgr->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.system.SimpleCommandMail" ))), - UNO_QUERY ); - } - - if ( xSimpleMailClientSupplier.is() ) - { - Reference< XSimpleMailClient > xSimpleMailClient = xSimpleMailClientSupplier->querySimpleMailClient(); - - if ( !xSimpleMailClient.is() ) - { - // no mail client support => message box! - return SEND_MAIL_ERROR; - } - - // we have a simple mail client - Reference< XSimpleMailMessage > xSimpleMailMessage = xSimpleMailClient->createSimpleMailMessage(); - if ( xSimpleMailMessage.is() ) - { - sal_Int32 nSendFlags = SimpleMailClientFlags::DEFAULTS; - if ( maFromAddress.Len() == 0 ) - { - // from address not set, try figure out users e-mail address - CreateFromAddress_Impl( maFromAddress ); - } - xSimpleMailMessage->setOriginator( maFromAddress ); - - sal_Int32 nToCount = mpToList ? mpToList->Count() : 0; - sal_Int32 nCcCount = mpCcList ? mpCcList->Count() : 0; - sal_Int32 nCcSeqCount = nCcCount; - - // set recipient (only one) for this simple mail server!! - if ( nToCount > 1 ) - { - nCcSeqCount = nToCount - 1 + nCcCount; - xSimpleMailMessage->setRecipient( *mpToList->GetObject( 0 )); - nSendFlags = SimpleMailClientFlags::NO_USER_INTERFACE; - } - else if ( nToCount == 1 ) - { - xSimpleMailMessage->setRecipient( *mpToList->GetObject( 0 )); - nSendFlags = SimpleMailClientFlags::NO_USER_INTERFACE; - } - - // all other recipient must be handled with CC recipients! - if ( nCcSeqCount > 0 ) - { - sal_Int32 nIndex = 0; - Sequence< OUString > aCcRecipientSeq; - - aCcRecipientSeq.realloc( nCcSeqCount ); - if ( nCcSeqCount > nCcCount ) - { - for ( sal_Int32 i = 1; i < nToCount; ++i ) - { - aCcRecipientSeq[nIndex++] = *mpToList->GetObject(i); - } - } - - for ( sal_Int32 i = 0; i < nCcCount; i++ ) - { - aCcRecipientSeq[nIndex++] = *mpCcList->GetObject(i); - } - xSimpleMailMessage->setCcRecipient( aCcRecipientSeq ); - } - - sal_Int32 nBccCount = mpBccList ? mpBccList->Count() : 0; - if ( nBccCount > 0 ) - { - Sequence< OUString > aBccRecipientSeq( nBccCount ); - for ( sal_Int32 i = 0; i < nBccCount; ++i ) - { - aBccRecipientSeq[i] = *mpBccList->GetObject(i); - } - xSimpleMailMessage->setBccRecipient( aBccRecipientSeq ); - } - - Sequence< OUString > aAttachmentSeq(&(maAttachedDocuments[0]),maAttachedDocuments.size()); - - xSimpleMailMessage->setSubject( maSubject ); - xSimpleMailMessage->setAttachement( aAttachmentSeq ); - - // Bugfix: #95743# - // Due to the current clipboard implementation we cannot stop the main thread - // because the clipboard implementation calls the main thread from another thread - // and this would result in a deadlock! - // Currently we create a thread to send a message and process all remaining error - // handling in this thread!! - - OMailSendThreadImpl* pMailSendThread = new OMailSendThreadImpl( xSimpleMailClient, xSimpleMailMessage, m_xCurrentFrame,nSendFlags ); - pMailSendThread->create(); - - // Return always true as the real error handling occurss in the OMailSendThreadImpl-implementation! - eResult = SEND_MAIL_OK; - } - } - } - } - else - eResult = SEND_MAIL_CANCELLED; - - return eResult; -} diff --git a/sfx2/source/dialog/makefile.mk b/sfx2/source/dialog/makefile.mk deleted file mode 100644 index 572053557e00..000000000000 --- a/sfx2/source/dialog/makefile.mk +++ /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. -# -#************************************************************************* -PRJ=..$/.. - -PRJNAME=sfx2 -TARGET=dialog - -# --- Settings ----------------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------------- - -EXCEPTIONSFILES=\ - $(SLO)$/filedlghelper.obj \ - $(SLO)$/filtergrouping.obj \ - $(SLO)$/itemconnect.obj \ - $(SLO)$/mailmodel.obj \ - $(SLO)$/partwnd.obj \ - $(SLO)$/recfloat.obj \ - $(SLO)$/templdlg.obj \ - $(SLO)$/dinfdlg.obj \ - $(SLO)$/dockwin.obj \ - $(SLO)$/passwd.obj \ - $(SLO)$/taskpane.obj - -SLOFILES =\ - $(EXCEPTIONSFILES) \ - $(SLO)$/about.obj \ - $(SLO)$/alienwarn.obj \ - $(SLO)$/basedlgs.obj \ - $(SLO)$/dinfedt.obj \ - $(SLO)$/intro.obj \ - $(SLO)$/mgetempl.obj \ - $(SLO)$/navigat.obj \ - $(SLO)$/newstyle.obj \ - $(SLO)$/printopt.obj \ - $(SLO)$/sfxdlg.obj \ - $(SLO)$/splitwin.obj \ - $(SLO)$/srchdlg.obj \ - $(SLO)$/styfitem.obj \ - $(SLO)$/styledlg.obj \ - $(SLO)$/tabdlg.obj \ - $(SLO)$/tplcitem.obj \ - $(SLO)$/tplpitem.obj \ - $(SLO)$/versdlg.obj \ - $(SLO)$/securitypage.obj \ - $(SLO)$/titledockwin.obj - -SRS1NAME=$(TARGET) -SRC1FILES =\ - recfloat.src \ - alienwarn.src \ - dialog.src \ - dinfdlg.src \ - dinfedt.src \ - filedlghelper.src \ - mailwindow.src \ - mgetempl.src \ - newstyle.src \ - passwd.src \ - templdlg.src \ - versdlg.src \ - printopt.src \ - srchdlg.src \ - securitypage.src \ - titledockwin.src \ - taskpane.src - -.IF "$(BUILD_VER_STRING)"!="" -.IF "$(GUI)"=="UNX" -CFLAGS+=-DBUILD_VER_STRING='"$(BUILD_VER_STRING)"' -.ELSE # "$(GUI)"=="UNX" -CFLAGS+=-DBUILD_VER_STRING="$(subst,",\" "$(BUILD_VER_STRING)")" -.ENDIF # "$(GUI)"=="UNX" -.ENDIF - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - -$(INCCOM)$/cuilib.hxx: makefile.mk -.IF "$(GUI)"=="UNX" - $(RM) $@ - @echo \#define DLL_NAME \"libcui$(DLLPOSTFIX)$(DLLPOST)\" >$@ -.ELSE - @echo $(EMQ)#define DLL_NAME $(EMQ)"cui$(DLLPOSTFIX)$(DLLPOST)$(EMQ)" >$@ -.ENDIF - -$(SLO)$/sfxdlg.obj : $(INCCOM)$/cuilib.hxx - -$(SLO)$/about.obj : $(INCCOM)$/aboutbmpnames.hxx - -.INCLUDE .IGNORE : $(MISC)$/about_bmp_names.mk - -.IF "$(ABOUT_BITMAPS:f)"!="$(LASTTIME_ABOUT_BITMAPS)" -DO_PHONY=.PHONY -.ENDIF # "$(ABOUT_BITMAPS:f)"!="$(LASTTIME_ABOUT_BITMAPS)" - -$(INCCOM)$/aboutbmpnames.hxx $(DO_PHONY): - echo const char ABOUT_BITMAP_STRINGLIST[]=$(EMQ)"$(ABOUT_BITMAPS:f:t",")$(EMQ)"$(EMQ); > $@ - echo LASTTIME_ABOUT_BITMAPS=$(ABOUT_BITMAPS:f) > $(MISC)$/about_bmp_names.mk diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx index 1666916b0c0b..d97847f5b6e0 100644 --- a/sfx2/source/dialog/mgetempl.cxx +++ b/sfx2/source/dialog/mgetempl.cxx @@ -46,7 +46,7 @@ #include <sfx2/mgetempl.hxx> #include <sfx2/objsh.hxx> #include "sfxtypes.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/module.hxx> #include <sfx2/sfx.hrc> diff --git a/sfx2/source/dialog/navigat.cxx b/sfx2/source/dialog/navigat.cxx index d7f258e7ccb3..290886528e24 100644 --- a/sfx2/source/dialog/navigat.cxx +++ b/sfx2/source/dialog/navigat.cxx @@ -36,7 +36,7 @@ #include <sfx2/navigat.hxx> #include <sfx2/sfx.hrc> #include <sfx2/app.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "helpid.hrc" SFX_IMPL_DOCKINGWINDOW( SfxNavigatorWrapper , SID_NAVIGATOR ); diff --git a/sfx2/source/dialog/newstyle.cxx b/sfx2/source/dialog/newstyle.cxx index 7193129838b2..8235333857d5 100644 --- a/sfx2/source/dialog/newstyle.cxx +++ b/sfx2/source/dialog/newstyle.cxx @@ -36,7 +36,7 @@ #include <sfx2/newstyle.hxx> #include "dialog.hrc" #include "newstyle.hrc" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" // PRIVATE METHODES ------------------------------------------------------ diff --git a/sfx2/source/dialog/passwd.cxx b/sfx2/source/dialog/passwd.cxx index 52c6acedd4ea..455479b9d125 100644 --- a/sfx2/source/dialog/passwd.cxx +++ b/sfx2/source/dialog/passwd.cxx @@ -35,7 +35,7 @@ #include <sfx2/passwd.hxx> #include "sfxtypes.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "dialog.hrc" #include "passwd.hrc" diff --git a/sfx2/source/dialog/printopt.cxx b/sfx2/source/dialog/printopt.cxx index 80902204fa88..6b26cf9fb504 100644 --- a/sfx2/source/dialog/printopt.cxx +++ b/sfx2/source/dialog/printopt.cxx @@ -38,7 +38,7 @@ #include "printopt.hrc" #include "dialog.hrc" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/viewsh.hxx> #include <sfx2/printopt.hxx> diff --git a/sfx2/source/dialog/recfloat.cxx b/sfx2/source/dialog/recfloat.cxx index c678cfdffb6e..aaabdd3e5d74 100644 --- a/sfx2/source/dialog/recfloat.cxx +++ b/sfx2/source/dialog/recfloat.cxx @@ -42,13 +42,13 @@ #include "recfloat.hxx" #include "dialog.hrc" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/app.hxx> #include <sfx2/bindings.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/viewfrm.hxx> #include <sfx2/viewsh.hxx> -#include "imagemgr.hxx" +#include "sfx2/imagemgr.hxx" using namespace ::com::sun::star; diff --git a/sfx2/source/dialog/sfxdlg.cxx b/sfx2/source/dialog/sfxdlg.cxx index d62ed70b8490..becab5097ec3 100755 --- a/sfx2/source/dialog/sfxdlg.cxx +++ b/sfx2/source/dialog/sfxdlg.cxx @@ -29,7 +29,7 @@ #include "precompiled_sfx2.hxx" #include <sfx2/sfxdlg.hxx> -#include "cuilib.hxx" +//#include "cuilib.hxx" #include <osl/module.hxx> #include <tools/string.hxx> diff --git a/sfx2/source/dialog/splitwin.cxx b/sfx2/source/dialog/splitwin.cxx index f6e5f96cf0bd..d4cc7950612f 100644 --- a/sfx2/source/dialog/splitwin.cxx +++ b/sfx2/source/dialog/splitwin.cxx @@ -49,7 +49,7 @@ #include <sfx2/dockwin.hxx> #include <sfx2/app.hxx> #include "dialog.hrc" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/mnumgr.hxx> #include "virtmenu.hxx" #include <sfx2/msgpool.hxx> diff --git a/sfx2/source/dialog/srchdlg.cxx b/sfx2/source/dialog/srchdlg.cxx index 0134b8d58bfa..f4d2392c9017 100644 --- a/sfx2/source/dialog/srchdlg.cxx +++ b/sfx2/source/dialog/srchdlg.cxx @@ -29,7 +29,7 @@ #include "precompiled_sfx2.hxx" #include "srchdlg.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/sfxuno.hxx> #include "srchdlg.hrc" diff --git a/sfx2/source/dialog/styledlg.cxx b/sfx2/source/dialog/styledlg.cxx index ff6406f0d5d3..e1d01de94955 100644 --- a/sfx2/source/dialog/styledlg.cxx +++ b/sfx2/source/dialog/styledlg.cxx @@ -39,7 +39,7 @@ #include <sfx2/styledlg.hxx> #include <sfx2/mgetempl.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/sfxuno.hxx> #include "dialog.hrc" diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx index 3c7a58cd09f9..d149bea792dc 100644 --- a/sfx2/source/dialog/tabdlg.cxx +++ b/sfx2/source/dialog/tabdlg.cxx @@ -42,8 +42,8 @@ #include <sfx2/tabdlg.hxx> #include <sfx2/viewfrm.hxx> #include <sfx2/app.hxx> -#include "sfxresid.hxx" -#include "sfxhelp.hxx" +#include "sfx2/sfxresid.hxx" +#include "sfx2/sfxhelp.hxx" #include <sfx2/ctrlitem.hxx> #include <sfx2/bindings.hxx> #include <sfx2/sfxdlg.hxx> diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index 88801d95f0d5..b10e634be231 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -48,7 +48,7 @@ #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/frame/XModuleManager.hpp> -#include "sfxhelp.hxx" +#include "sfx2/sfxhelp.hxx" #include <sfx2/app.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/bindings.hxx> @@ -60,8 +60,8 @@ #include <sfx2/objsh.hxx> #include <sfx2/viewsh.hxx> #include <sfx2/newstyle.hxx> -#include "tplpitem.hxx" -#include "sfxresid.hxx" +#include "sfx2/tplpitem.hxx" +#include "sfx2/sfxresid.hxx" #include "templdlg.hrc" #include <sfx2/sfx.hrc> @@ -73,7 +73,7 @@ #include "docvor.hxx" #include <sfx2/doctempl.hxx> #include <sfx2/module.hxx> -#include "imgmgr.hxx" +#include "sfx2/imgmgr.hxx" #include "helpid.hrc" #include "appdata.hxx" #include <sfx2/viewfrm.hxx> diff --git a/sfx2/source/dialog/tplcitem.cxx b/sfx2/source/dialog/tplcitem.cxx index 5d7569300cf8..0e03106b0d5e 100644 --- a/sfx2/source/dialog/tplcitem.cxx +++ b/sfx2/source/dialog/tplcitem.cxx @@ -33,12 +33,9 @@ #include <svl/intitem.hxx> #include <vcl/svapp.hxx> -#ifndef GCC -#endif - #include <sfx2/templdlg.hxx> #include <sfx2/bindings.hxx> -#include "tplpitem.hxx" +#include "sfx2/tplpitem.hxx" #include "tplcitem.hxx" #include "templdgi.hxx" diff --git a/sfx2/source/dialog/tplpitem.cxx b/sfx2/source/dialog/tplpitem.cxx index 7b81fb54cdbd..566c379df508 100644 --- a/sfx2/source/dialog/tplpitem.cxx +++ b/sfx2/source/dialog/tplpitem.cxx @@ -30,10 +30,7 @@ // INCLUDE --------------------------------------------------------------- -#ifndef GCC -#endif - -#include "tplpitem.hxx" +#include "sfx2/tplpitem.hxx" #include <com/sun/star/frame/status/Template.hpp> diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx index a050e07da5ae..f2a0cf2790f3 100644 --- a/sfx2/source/dialog/versdlg.cxx +++ b/sfx2/source/dialog/versdlg.cxx @@ -46,7 +46,7 @@ #include "versdlg.hrc" #include "versdlg.hxx" #include <sfx2/viewfrm.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/docfile.hxx> #include <sfx2/objsh.hxx> #include <sfx2/sfxsids.hrc> diff --git a/sfx2/source/doc/QuerySaveDocument.cxx b/sfx2/source/doc/QuerySaveDocument.cxx index 642fe3c21af8..1907e54246ab 100644 --- a/sfx2/source/doc/QuerySaveDocument.cxx +++ b/sfx2/source/doc/QuerySaveDocument.cxx @@ -27,15 +27,14 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sfx2.hxx" -#include "QuerySaveDocument.hxx" +#include "sfx2/QuerySaveDocument.hxx" #include <sfx2/sfx.hrc> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/sfxuno.hxx> #include "doc.hrc" -#ifndef _MSGBOX_HXX //autogen #include <vcl/msgbox.hxx> -#endif + // ----------------------------------------------------------------------------- short ExecuteQuerySaveDocument(Window* _pParent,const String& _rTitle) { diff --git a/sfx2/source/doc/docfac.cxx b/sfx2/source/doc/docfac.cxx index 4311559f94af..ff0a15e20088 100644 --- a/sfx2/source/doc/docfac.cxx +++ b/sfx2/source/doc/docfac.cxx @@ -47,13 +47,13 @@ #include <sfx2/sfx.hrc> #include <sfx2/docfilt.hxx> #include <sfx2/docfac.hxx> -#include "viewfac.hxx" +#include "sfx2/viewfac.hxx" #include "fltfnc.hxx" #include "arrdecl.hxx" #include <sfx2/app.hxx> #include <sfx2/module.hxx> #include <sfx2/mnumgr.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/sfxuno.hxx> #include "syspath.hxx" #include <osl/file.hxx> diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index 6b9afa136e46..434553bdb226 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -81,6 +81,7 @@ #include <unotools/tempfile.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/componentcontext.hxx> +#include <comphelper/interaction.hxx> #include <framework/interaction.hxx> #include <unotools/streamhelper.hxx> #include <unotools/localedatawrapper.hxx> @@ -144,7 +145,7 @@ using namespace ::com::sun::star::io; #include <sfx2/docfac.hxx> // GetFilterContainer #include "doc.hrc" #include "openflag.hxx" // SFX_STREAM_READONLY etc. -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/appuno.hxx> //#include "xmlversion.hxx" @@ -3783,19 +3784,17 @@ sal_Bool SfxMedium::CallApproveHandler( const uno::Reference< task::XInteraction { uno::Sequence< uno::Reference< task::XInteractionContinuation > > aContinuations( bAllowAbort ? 2 : 1 ); - ::rtl::Reference< ::framework::ContinuationApprove > pApprove( new ::framework::ContinuationApprove() ); + ::rtl::Reference< ::comphelper::OInteractionApprove > pApprove( new ::comphelper::OInteractionApprove ); aContinuations[ 0 ] = pApprove.get(); if ( bAllowAbort ) { - ::rtl::Reference< ::framework::ContinuationAbort > pAbort( new ::framework::ContinuationAbort() ); + ::rtl::Reference< ::comphelper::OInteractionAbort > pAbort( new ::comphelper::OInteractionAbort ); aContinuations[ 1 ] = pAbort.get(); } - uno::Reference< task::XInteractionRequest > xRequest( new ::framework::InteractionRequest( aRequest, aContinuations ) ); - xHandler->handle( xRequest ); - - bResult = pApprove->isSelected(); + xHandler->handle(::framework::InteractionRequest::CreateRequest (aRequest,aContinuations)); + bResult = pApprove->wasSelected(); } catch( const Exception& ) { diff --git a/sfx2/source/doc/docinsert.cxx b/sfx2/source/doc/docinsert.cxx index 2dcca2eadf56..360854dc3dbf 100644 --- a/sfx2/source/doc/docinsert.cxx +++ b/sfx2/source/doc/docinsert.cxx @@ -29,7 +29,7 @@ #include "precompiled_sfx2.hxx" #include <sfx2/app.hxx> -#include "docinsert.hxx" +#include "sfx2/docinsert.hxx" #include <sfx2/docfile.hxx> #include <sfx2/fcontnr.hxx> #include <sfx2/filedlghelper.hxx> diff --git a/sfx2/source/doc/doctdlg.cxx b/sfx2/source/doc/doctdlg.cxx index 7a5fea18004f..e6726e97e96d 100644 --- a/sfx2/source/doc/doctdlg.cxx +++ b/sfx2/source/doc/doctdlg.cxx @@ -37,7 +37,7 @@ #include <sfx2/doctdlg.hxx> #include "docvor.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "sfxtypes.hxx" #include <sfx2/dispatch.hxx> #include <sfx2/app.hxx> diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx index db6f2a2d133f..f5ea04e5e08d 100644 --- a/sfx2/source/doc/doctempl.cxx +++ b/sfx2/source/doc/doctempl.cxx @@ -94,7 +94,7 @@ using namespace ::ucbhelper; #include <sfx2/objsh.hxx> #include "sfxtypes.hxx" #include <sfx2/app.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "doc.hrc" #include <sfx2/fcontnr.hxx> #include <svtools/templatefoldercache.hxx> diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx index 71f3683c0006..8644e79f611d 100644 --- a/sfx2/source/doc/doctemplates.cxx +++ b/sfx2/source/doc/doctemplates.cxx @@ -65,7 +65,7 @@ #include <unotools/configmgr.hxx> #include <unotools/ucbhelper.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "sfxurlrelocator.hxx" #include "doctemplateslocal.hxx" #include <sfx2/docfac.hxx> diff --git a/sfx2/source/doc/docvor.cxx b/sfx2/source/doc/docvor.cxx index 719dc5b8d223..6367f2a65d76 100644 --- a/sfx2/source/doc/docvor.cxx +++ b/sfx2/source/doc/docvor.cxx @@ -64,7 +64,7 @@ #include "sfxtypes.hxx" #include <sfx2/app.hxx> #include <sfx2/dispatch.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "doc.hrc" #include <sfx2/sfx.hrc> #include "docvor.hrc" diff --git a/sfx2/source/doc/graphhelp.cxx b/sfx2/source/doc/graphhelp.cxx index 388d85cefc25..eff1554526ea 100644 --- a/sfx2/source/doc/graphhelp.cxx +++ b/sfx2/source/doc/graphhelp.cxx @@ -78,7 +78,7 @@ #include <comphelper/processfactory.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "graphhelp.hxx" #include "doc.hrc" diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index 6b2b5dcb8c0b..bceb7477a61e 100644 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -71,13 +71,14 @@ #include <tools/urlobj.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/configurationhelper.hxx> +#include <comphelper/mimeconfighelper.hxx> #include <vcl/msgbox.hxx> #include <vcl/window.hxx> #include <toolkit/awt/vclxwindow.hxx> #include <sfx2/sfxsids.hrc> #include <doc.hrc> -#include <sfxresid.hxx> +#include <sfx2/sfxresid.hxx> #include <sfx2/docfilt.hxx> #include <sfx2/filedlghelper.hxx> #include <sfx2/app.hxx> @@ -507,7 +508,7 @@ uno::Sequence< beans::PropertyValue > ModelData_Impl::GetDocServiceAnyFilter( sa aSearchRequest[0].Name = ::rtl::OUString::createFromAscii( "DocumentService" ); aSearchRequest[0].Value <<= GetDocServiceName(); - return SfxStoringHelper::SearchForFilter( m_pOwner->GetFilterQuery(), aSearchRequest, nMust, nDont ); + return ::comphelper::MimeConfigurationHelper::SearchForFilter( m_pOwner->GetFilterQuery(), aSearchRequest, nMust, nDont ); } //------------------------------------------------------------------------- @@ -527,7 +528,7 @@ uno::Sequence< beans::PropertyValue > ModelData_Impl::GetPreselectedFilter_Impl( aSearchRequest[1].Name = ::rtl::OUString::createFromAscii( "DocumentService" ); aSearchRequest[1].Value <<= GetDocServiceName(); - aFilterProps = SfxStoringHelper::SearchForFilter( m_pOwner->GetFilterQuery(), aSearchRequest, nMust, nDont ); + aFilterProps = ::comphelper::MimeConfigurationHelper::SearchForFilter( m_pOwner->GetFilterQuery(), aSearchRequest, nMust, nDont ); } else { @@ -1650,47 +1651,6 @@ sal_Bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >& //------------------------------------------------------------------------- // static -uno::Sequence< beans::PropertyValue > SfxStoringHelper::SearchForFilter( - const uno::Reference< container::XContainerQuery >& xFilterQuery, - const uno::Sequence< beans::NamedValue >& aSearchRequest, - sal_Int32 nMustFlags, - sal_Int32 nDontFlags ) -{ - uno::Sequence< beans::PropertyValue > aFilterProps; - uno::Reference< container::XEnumeration > xFilterEnum = - xFilterQuery->createSubSetEnumerationByProperties( aSearchRequest ); - - // the first default filter will be taken, - // if there is no filter with flag default the first acceptable filter will be taken - if ( xFilterEnum.is() ) - { - while ( xFilterEnum->hasMoreElements() ) - { - uno::Sequence< beans::PropertyValue > aProps; - if ( xFilterEnum->nextElement() >>= aProps ) - { - ::comphelper::SequenceAsHashMap aPropsHM( aProps ); - sal_Int32 nFlags = aPropsHM.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii( "Flags" ), - (sal_Int32)0 ); - if ( ( ( nFlags & nMustFlags ) == nMustFlags ) && !( nFlags & nDontFlags ) ) - { - if ( ( nFlags & SFX_FILTER_DEFAULT ) == SFX_FILTER_DEFAULT ) - { - aFilterProps = aProps; - break; - } - else if ( !aFilterProps.getLength() ) - aFilterProps = aProps; - } - } - } - } - - return aFilterProps; -} - -//------------------------------------------------------------------------- -// static sal_Bool SfxStoringHelper::CheckFilterOptionsAppearence( const uno::Reference< container::XNameAccess >& xFilterCFG, const ::rtl::OUString& aFilterName ) diff --git a/sfx2/source/doc/makefile.mk b/sfx2/source/doc/makefile.mk deleted file mode 100644 index 5adf2320f13b..000000000000 --- a/sfx2/source/doc/makefile.mk +++ /dev/null @@ -1,104 +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=sfx2 -TARGET=doc -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -.IF "$(SYSTEM_LIBXML)" == "YES" -CFLAGS+=-DSYSTEM_LIBXML $(LIBXML_CFLAGS) -.ENDIF - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - doc.src new.src doctdlg.src docvor.src doctempl.src graphhelp.src - -SLOFILES = \ - $(SLO)$/printhelper.obj \ - $(SLO)$/docinf.obj \ - $(SLO)$/oleprops.obj \ - $(SLO)$/iframe.obj \ - $(SLO)$/plugin.obj \ - $(SLO)$/docfile.obj \ - $(SLO)$/objuno.obj \ - $(SLO)$/frmdescr.obj \ - $(SLO)$/objxtor.obj \ - $(SLO)$/objmisc.obj \ - $(SLO)$/objstor.obj \ - $(SLO)$/objcont.obj \ - $(SLO)$/objserv.obj \ - $(SLO)$/objitem.obj \ - $(SLO)$/ownsubfilterservice.obj \ - $(SLO)$/docfac.obj \ - $(SLO)$/docfilt.obj \ - $(SLO)$/doctempl.obj \ - $(SLO)$/doctemplates.obj \ - $(SLO)$/doctemplateslocal.obj \ - $(SLO)$/docvor.obj \ - $(SLO)$/new.obj \ - $(SLO)$/doctdlg.obj \ - $(SLO)$/sfxbasemodel.obj \ - $(SLO)$/guisaveas.obj\ - $(SLO)$/objembed.obj\ - $(SLO)$/graphhelp.obj \ - $(SLO)$/QuerySaveDocument.obj \ - $(SLO)$/docinsert.obj \ - $(SLO)$/docmacromode.obj \ - $(SLO)$/SfxDocumentMetaData.obj \ - $(SLO)$/DocumentMetadataAccess.obj \ - $(SLO)$/Metadatable.obj \ - $(SLO)$/sfxmodelfactory.obj \ - $(SLO)$/sfxacldetect.obj \ - $(SLO)$/docstoragemodifylistener.obj \ - $(SLO)$/querytemplate.obj \ - $(SLO)$/syspath.obj \ - $(SLO)$/syspathw32.obj \ - $(SLO)$/docundomanager.obj - -.IF "$(GUI)" == "WNT" - -#HACK TO DISABLE PCH -NOOPTFILES= \ - $(SLO)$/sfxacldetect.obj \ - $(SLO)$/syspathw32.obj -.ENDIF - - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - - diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx index d3235b1c7a7f..932f6f10ecb0 100644 --- a/sfx2/source/doc/new.cxx +++ b/sfx2/source/doc/new.cxx @@ -31,9 +31,7 @@ #include <vcl/gdimtf.hxx> #include <vcl/msgbox.hxx> #include <vcl/morebtn.hxx> -#ifndef _SVMEDIT_HXX #include <svtools/svmedit.hxx> -#endif #include <svl/itemset.hxx> #include <svl/eitem.hxx> #include <svtools/sfxecode.hxx> @@ -42,9 +40,7 @@ #include <unotools/localfilehelper.hxx> #include "new.hrc" -#ifndef _SFX_DOC_HRC #include "doc.hrc" -#endif #include <sfx2/sfx.hrc> #include "helpid.hrc" #include "sfxtypes.hxx" @@ -54,8 +50,8 @@ #include <sfx2/objsh.hxx> #include "fltfnc.hxx" #include <sfx2/viewsh.hxx> -#include "viewfac.hxx" -#include "sfxresid.hxx" +#include "sfx2/viewfac.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/docfile.hxx> #include "preview.hxx" #include <sfx2/printer.hxx> diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx index e0e63da04bb8..91f5842c1fb7 100644 --- a/sfx2/source/doc/objcont.cxx +++ b/sfx2/source/doc/objcont.cxx @@ -62,7 +62,7 @@ #include <vcl/oldprintadaptor.hxx> #include <sfx2/app.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "appdata.hxx" #include <sfx2/dinfdlg.hxx> #include "fltfnc.hxx" @@ -71,11 +71,11 @@ #include <sfx2/objsh.hxx> #include "objshimp.hxx" #include <sfx2/evntconf.hxx> -#include "sfxhelp.hxx" +#include "sfx2/sfxhelp.hxx" #include <sfx2/dispatch.hxx> #include <sfx2/printer.hxx> +#include "sfx2/basmgr.hxx" #include <sfx2/viewfrm.hxx> -#include "basmgr.hxx" #include <sfx2/doctempl.hxx> #include "doc.hrc" #include <sfx2/sfxbasemodel.hxx> diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx index 7278baf816ee..3b27db855e39 100644 --- a/sfx2/source/doc/objmisc.cxx +++ b/sfx2/source/doc/objmisc.cxx @@ -119,6 +119,7 @@ using namespace ::com::sun::star::container; #include <vcl/svapp.hxx> #include <framework/interaction.hxx> #include <framework/documentundoguard.hxx> +#include <comphelper/interaction.hxx> #include <comphelper/storagehelper.hxx> #include <comphelper/documentconstants.hxx> @@ -127,7 +128,7 @@ using namespace ::com::sun::star::container; #include "appdata.hxx" #include <sfx2/request.hxx> #include <sfx2/bindings.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/docfile.hxx> #include <sfx2/docfilt.hxx> #include <sfx2/objsh.hxx> @@ -1162,9 +1163,9 @@ void SfxObjectShell::PostActivateEvent_Impl( SfxViewFrame* pFrame ) sal_uInt16 nId = pImp->nEventId; pImp->nEventId = 0; if ( nId == SFX_EVENT_OPENDOC ) - pSfxApp->NotifyEvent(SfxEventHint( nId, GlobalEventConfig::GetEventName(STR_EVENT_OPENDOC), this ), sal_False); + pSfxApp->NotifyEvent(SfxViewEventHint( nId, GlobalEventConfig::GetEventName(STR_EVENT_OPENDOC), this, pFrame->GetFrame().GetController() ), sal_False); else if (nId == SFX_EVENT_CREATEDOC ) - pSfxApp->NotifyEvent(SfxEventHint( nId, GlobalEventConfig::GetEventName(STR_EVENT_CREATEDOC), this ), sal_False); + pSfxApp->NotifyEvent(SfxViewEventHint( nId, GlobalEventConfig::GetEventName(STR_EVENT_CREATEDOC), this, pFrame->GetFrame().GetController() ), sal_False); } } } @@ -2114,8 +2115,8 @@ sal_Bool SfxObjectShell::UseInteractionToHandleError( { uno::Any aInteraction; uno::Sequence< uno::Reference< task::XInteractionContinuation > > lContinuations(2); - ::framework::ContinuationAbort* pAbort = new ::framework::ContinuationAbort(); - ::framework::ContinuationApprove* pApprove = new ::framework::ContinuationApprove(); + ::comphelper::OInteractionAbort* pAbort = new ::comphelper::OInteractionAbort(); + ::comphelper::OInteractionApprove* pApprove = new ::comphelper::OInteractionApprove(); lContinuations[0] = uno::Reference< task::XInteractionContinuation >( static_cast< task::XInteractionContinuation* >( pAbort ), uno::UNO_QUERY ); lContinuations[1] = uno::Reference< task::XInteractionContinuation >( @@ -2124,14 +2125,8 @@ sal_Bool SfxObjectShell::UseInteractionToHandleError( task::ErrorCodeRequest aErrorCode; aErrorCode.ErrCode = nError; aInteraction <<= aErrorCode; - - ::framework::InteractionRequest* pRequest = new ::framework::InteractionRequest(aInteraction,lContinuations); - uno::Reference< task::XInteractionRequest > xRequest( - static_cast< task::XInteractionRequest* >( pRequest ), - uno::UNO_QUERY); - - xHandler->handle(xRequest); - bResult = pAbort->isSelected(); + xHandler->handle(::framework::InteractionRequest::CreateRequest (aInteraction,lContinuations)); + bResult = pAbort->wasSelected(); } catch( uno::Exception& ) {} diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index ad80ec11895a..e53e7148e561 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -69,7 +69,7 @@ #include <sfx2/app.hxx> #include <sfx2/signaturestate.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/event.hxx> #include <sfx2/request.hxx> #include <sfx2/printer.hxx> @@ -91,7 +91,7 @@ #include <sfx2/docfac.hxx> #include <sfx2/fcontnr.hxx> #include <sfx2/filedlghelper.hxx> -#include "sfxhelp.hxx" +#include "sfx2/sfxhelp.hxx" #include <sfx2/msgpool.hxx> #include <sfx2/objface.hxx> diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index c3f532ad1ba6..0575660877a3 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -111,7 +111,7 @@ #include <sfx2/objsh.hxx> #include <sfx2/childwin.hxx> #include <sfx2/request.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/docfile.hxx> #include "fltfnc.hxx" #include <sfx2/docfilt.hxx> diff --git a/sfx2/source/doc/objuno.cxx b/sfx2/source/doc/objuno.cxx index 466f8dd43104..32d50de40d51 100644 --- a/sfx2/source/doc/objuno.cxx +++ b/sfx2/source/doc/objuno.cxx @@ -68,7 +68,7 @@ #include <vector> #include <algorithm> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "doc.hrc" using namespace ::com::sun::star; diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx index b7567b89f02f..693911f0404c 100644 --- a/sfx2/source/doc/objxtor.cxx +++ b/sfx2/source/doc/objxtor.cxx @@ -54,7 +54,7 @@ #include <svl/eitem.hxx> #include <tools/rtti.hxx> #include <svl/lstner.hxx> -#include <sfxhelp.hxx> +#include <sfx2/sfxhelp.hxx> #include <basic/sbstar.hxx> #include <svl/stritem.hxx> #include <basic/sbx.hxx> @@ -96,7 +96,7 @@ #include <sfx2/dispatch.hxx> #include <sfx2/viewsh.hxx> #include <sfx2/viewfrm.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "objshimp.hxx" #include "appbas.hxx" #include "sfxtypes.hxx" @@ -107,8 +107,8 @@ #include "appdata.hxx" #include <sfx2/appuno.hxx> #include <sfx2/sfxsids.hrc> -#include "basmgr.hxx" -#include "QuerySaveDocument.hxx" +#include "sfx2/basmgr.hxx" +#include "sfx2/QuerySaveDocument.hxx" #include "helpid.hrc" #include <sfx2/msg.hxx> #include "appbaslib.hxx" @@ -805,11 +805,33 @@ void SfxObjectShell::InitBasicManager_Impl() */ { + /* #163556# (DR) - Handling of recursive calls while creating the Bacic + manager. + + It is possible that (while creating the Basic manager) the code that + imports the Basic storage wants to access the Basic manager again. + Especially in VBA compatibility mode, there is code that wants to + access the "VBA Globals" object which is stored as global UNO constant + in the Basic manager. + + To achieve correct handling of the recursive calls of this function + from lcl_getBasicManagerForDocument(), the implementation of the + function BasicManagerRepository::getDocumentBasicManager() has been + changed to return the Basic manager currently under construction, when + called repeatedly. + + The variable pImp->bBasicInitialized will be set to TRUE after + construction now, to ensure that the recursive call of the function + lcl_getBasicManagerForDocument() will be routed into this function too. + + Calling BasicManagerHolder::reset() twice is not a big problem, as it + does not take ownership but stores only the raw pointer. Owner of all + Basic managers is the global BasicManagerRepository instance. + */ DBG_ASSERT( !pImp->bBasicInitialized && !pImp->pBasicManager->isValid(), "Lokaler BasicManager bereits vorhanden"); - pImp->bBasicInitialized = TRUE; - pImp->pBasicManager->reset( BasicManagerRepository::getDocumentBasicManager( GetModel() ) ); DBG_ASSERT( pImp->pBasicManager->isValid(), "SfxObjectShell::InitBasicManager_Impl: did not get a BasicManager!" ); + pImp->bBasicInitialized = TRUE; } //-------------------------------------------------------------------- diff --git a/sfx2/source/doc/querytemplate.cxx b/sfx2/source/doc/querytemplate.cxx index 3e6a529bc67e..a2adce45d239 100644 --- a/sfx2/source/doc/querytemplate.cxx +++ b/sfx2/source/doc/querytemplate.cxx @@ -29,7 +29,7 @@ #include "precompiled_sfx2.hxx" #include "querytemplate.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "doc.hrc" #include "helpid.hrc" #include <vcl/svapp.hxx> diff --git a/sfx2/source/doc/sfxacldetect.cxx b/sfx2/source/doc/sfxacldetect.cxx index de6528794e20..ded9d3000fc8 100644 --- a/sfx2/source/doc/sfxacldetect.cxx +++ b/sfx2/source/doc/sfxacldetect.cxx @@ -25,6 +25,10 @@ * ************************************************************************/ +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_sfx2.hxx" + + #ifdef WNT // necessary to include system headers without warnings diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 5d1c54c8fe37..15195b3efefc 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -102,7 +102,7 @@ //________________________________________________________________________________________________________ #include <sfx2/sfxbasecontroller.hxx> -#include "viewfac.hxx" +#include "sfx2/viewfac.hxx" #include "workwin.hxx" #include <sfx2/signaturestate.hxx> #include <sfx2/sfxuno.hxx> @@ -114,7 +114,7 @@ #include <sfx2/request.hxx> #include <sfx2/objuno.hxx> #include <sfx2/printer.hxx> -#include <basmgr.hxx> +#include <sfx2/basmgr.hxx> #include <sfx2/event.hxx> #include <eventsupplier.hxx> #include <sfx2/evntconf.hxx> @@ -125,13 +125,13 @@ #include <sfx2/docfac.hxx> #include <sfx2/fcontnr.hxx> #include "sfx2/docstoragemodifylistener.hxx" -#include "brokenpackageint.hxx" +#include "sfx2/brokenpackageint.hxx" #include "graphhelp.hxx" #include "docundomanager.hxx" #include <sfx2/msgpool.hxx> #include <sfx2/DocumentMetadataAccess.hxx> -#include <sfxresid.hxx> +#include <sfx2/sfxresid.hxx> //________________________________________________________________________________________________________ // const @@ -1890,10 +1890,9 @@ void SAL_CALL SfxBaseModel::load( const uno::Sequence< beans::PropertyValue >& SFX_ITEMSET_ARG( pMedium->GetItemSet(), pRepairItem, SfxBoolItem, SID_REPAIRPACKAGE, FALSE ); if ( !pRepairItem || !pRepairItem->GetValue() ) { - RequestPackageReparation* pRequest = new RequestPackageReparation( aDocName ); - com::sun::star::uno::Reference< com::sun::star::task::XInteractionRequest > xRequest ( pRequest ); - xHandler->handle( xRequest ); - if( pRequest->isApproved() ) + RequestPackageReparation aRequest( aDocName ); + xHandler->handle( aRequest.GetRequest() ); + if( aRequest.isApproved() ) { // broken package: try second loading and allow repair pMedium->GetItemSet()->Put( SfxBoolItem( SID_REPAIRPACKAGE, sal_True ) ); @@ -1913,9 +1912,8 @@ void SAL_CALL SfxBaseModel::load( const uno::Sequence< beans::PropertyValue >& if ( nError == ERRCODE_IO_BROKENPACKAGE ) { // repair either not allowed or not successful - NotifyBrokenPackage* pNotifyRequest = new NotifyBrokenPackage( aDocName ); - com::sun::star::uno::Reference< com::sun::star::task::XInteractionRequest > xRequest ( pNotifyRequest ); - xHandler->handle( xRequest ); + NotifyBrokenPackage aRequest( aDocName ); + xHandler->handle( aRequest.GetRequest() ); } } } @@ -2470,6 +2468,32 @@ void SAL_CALL SfxBaseModel::removeEventListener( const uno::Reference< XDOCEVENT m_pData->m_aInterfaceContainer.removeInterface( ::getCppuType((const uno::Reference< XDOCEVENTLISTENER >*)0), aListener ); } +//-------------------------------------------------------------------------------------------------------- +// XDocumentEventBroadcaster +//-------------------------------------------------------------------------------------------------------- +// --------------------------------- +void SAL_CALL SfxBaseModel::addDocumentEventListener( const uno::Reference< document::XDocumentEventListener >& aListener ) + throw ( uno::RuntimeException ) +{ + SfxModelGuard aGuard( *this, SfxModelGuard::E_INITIALIZING ); + m_pData->m_aInterfaceContainer.addInterface( ::getCppuType((const uno::Reference< document::XDocumentEventListener >*)0), aListener ); +} + +// --------------------------------- +void SAL_CALL SfxBaseModel::removeDocumentEventListener( const uno::Reference< document::XDocumentEventListener >& aListener ) + throw ( uno::RuntimeException ) +{ + SfxModelGuard aGuard( *this ); + m_pData->m_aInterfaceContainer.removeInterface( ::getCppuType((const uno::Reference< document::XDocumentEventListener >*)0), aListener ); +} + +// --------------------------------- +void SAL_CALL SfxBaseModel::notifyDocumentEvent( const ::rtl::OUString&, const uno::Reference< frame::XController2 >&, const uno::Any& ) + throw ( lang::IllegalArgumentException, lang::NoSupportException, uno::RuntimeException ) +{ + throw lang::NoSupportException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SfxBaseModel controlls all the sent notifications itself!" ) ), uno::Reference< uno::XInterface >() ); +} + //________________________________________________________________________________________________________ // SfxListener //________________________________________________________________________________________________________ @@ -2613,7 +2637,9 @@ void SfxBaseModel::Notify( SfxBroadcaster& rBC , break; } - postEvent_Impl( pNamedHint->GetEventName() ); + + SfxViewEventHint* pViewHint = PTR_CAST( SfxViewEventHint, &rHint ); + postEvent_Impl( pNamedHint->GetEventName(), pViewHint ? pViewHint->GetController() : uno::Reference< frame::XController2 >() ); } if ( pSimpleHint ) @@ -2958,8 +2984,32 @@ void SfxBaseModel::impl_store( const ::rtl::OUString& sURL } //******************************************************************************************************** +namespace { +template< typename ListenerT, typename EventT > +class NotifySingleListenerIgnoreRE +{ +private: + typedef void ( SAL_CALL ListenerT::*NotificationMethod )( const EventT& ); + NotificationMethod m_pMethod; + const EventT& m_rEvent; +public: + NotifySingleListenerIgnoreRE( NotificationMethod method, const EventT& event ) : m_pMethod( method ), m_rEvent( event ) { } -void SfxBaseModel::postEvent_Impl( ::rtl::OUString aName ) + void operator()( const uno::Reference<ListenerT>& listener ) const + { + try + { + (listener.get()->*m_pMethod)( m_rEvent ); + } + catch( uno::RuntimeException& ) + { + // this exception is ignored to avoid problems with invalid listeners, the listener should be probably thrown away in future + } + } +}; +} // anonymous namespace + +void SfxBaseModel::postEvent_Impl( const ::rtl::OUString& aName, const uno::Reference< frame::XController2 >& xController ) { // object already disposed? if ( impl_isDisposed() ) @@ -2969,34 +3019,41 @@ void SfxBaseModel::postEvent_Impl( ::rtl::OUString aName ) if (!aName.getLength()) return; - ::cppu::OInterfaceContainerHelper* pIC = m_pData->m_aInterfaceContainer.getContainer( - ::getCppuType((const uno::Reference< XDOCEVENTLISTENER >*)0) ); - if( pIC ) + ::cppu::OInterfaceContainerHelper* pIC = + m_pData->m_aInterfaceContainer.getContainer( ::getCppuType( (const uno::Reference< document::XDocumentEventListener >*)0 ) ); + if ( pIC ) + { +#ifdef DBG_UTIL + ByteString aTmp( "SfxDocumentEvent: " ); + aTmp += ByteString( String(aName), RTL_TEXTENCODING_UTF8 ); + DBG_TRACE( aTmp.GetBuffer() ); +#endif + + document::DocumentEvent aDocumentEvent( (frame::XModel*)this, aName, xController, uno::Any() ); + + pIC->forEach< document::XDocumentEventListener, NotifySingleListenerIgnoreRE< document::XDocumentEventListener, document::DocumentEvent > >( + NotifySingleListenerIgnoreRE< document::XDocumentEventListener, document::DocumentEvent >( + &document::XDocumentEventListener::documentEventOccured, + aDocumentEvent ) ); + } + pIC = m_pData->m_aInterfaceContainer.getContainer( ::getCppuType( (const uno::Reference< document::XEventListener >*)0 ) ); + if ( pIC ) { #ifdef DBG_UTIL - ByteString aTmp( "SfxEvent: "); + ByteString aTmp( "SfxEvent: " ); aTmp += ByteString( String(aName), RTL_TEXTENCODING_UTF8 ); DBG_TRACE( aTmp.GetBuffer() ); #endif - document::EventObject aEvent( (frame::XModel *)this, aName ); - ::cppu::OInterfaceContainerHelper aIC( m_aMutex ); - uno::Sequence < uno::Reference < uno::XInterface > > aElements = pIC->getElements(); - for ( sal_Int32 nElem=0; nElem<aElements.getLength(); nElem++ ) - aIC.addInterface( aElements[nElem] ); - ::cppu::OInterfaceIteratorHelper aIt( aIC ); - while( aIt.hasMoreElements() ) - { - try - { - ((XDOCEVENTLISTENER *)aIt.next())->notifyEvent( aEvent ); - } - catch( uno::RuntimeException& ) - { - aIt.remove(); - } - } + + document::EventObject aEvent( (frame::XModel*)this, aName ); + + pIC->forEach< document::XEventListener, NotifySingleListenerIgnoreRE< document::XEventListener, document::EventObject > >( + NotifySingleListenerIgnoreRE< document::XEventListener, document::EventObject >( + &document::XEventListener::notifyEvent, + aEvent ) ); } + } uno::Reference < container::XIndexAccess > SAL_CALL SfxBaseModel::getViewData() throw(::com::sun::star::uno::RuntimeException) @@ -3373,7 +3430,7 @@ uno::Reference< ui::XUIConfigurationManager > SAL_CALL SfxBaseModel::getUIConfig uno::Reference< lang::XMultiServiceFactory > xServiceMgr( ::comphelper::getProcessServiceFactory() ); uno::Sequence< uno::Reference< container::XIndexContainer > > rToolbars; - sal_Bool bImported = UIConfigurationImporterOOo1x::ImportCustomToolbars( + sal_Bool bImported = framework::UIConfigurationImporterOOo1x::ImportCustomToolbars( xNewUIConfMan, rToolbars, xServiceMgr, xOOo1ConfigStorage ); if ( bImported ) { diff --git a/sfx2/source/doc/syspathw32.cxx b/sfx2/source/doc/syspathw32.cxx index c0a163bed39c..167dadea2e38 100644..100755 --- a/sfx2/source/doc/syspathw32.cxx +++ b/sfx2/source/doc/syspathw32.cxx @@ -28,6 +28,10 @@ * ************************************************************************/ +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_sfx2.hxx" + + #ifdef WNT #ifdef _MSC_VER #pragma warning(disable:4917) diff --git a/sfx2/source/inc/fltoptint.hxx b/sfx2/source/inc/fltoptint.hxx index b4aed7ccdd99..d674c7620d54 100644 --- a/sfx2/source/inc/fltoptint.hxx +++ b/sfx2/source/inc/fltoptint.hxx @@ -24,15 +24,17 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ +#ifndef SFX2_FLTOPTINT_HXX +#define SFX2_FLTOPTINT_HXX #include <com/sun/star/document/FilterOptionsRequest.hpp> #include <com/sun/star/document/XInteractionFilterOptions.hpp> #include <com/sun/star/frame/XModel.hpp> -#include <framework/interaction.hxx> +#include <comphelper/interaction.hxx> -using namespace ::framework; +//using namespace ::framework; -class FilterOptionsContinuation : public ContinuationBase< ::com::sun::star::document::XInteractionFilterOptions > +class FilterOptionsContinuation : public comphelper::OInteraction< ::com::sun::star::document::XInteractionFilterOptions > { ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > rProperties; @@ -49,7 +51,7 @@ class RequestFilterOptions : public ::cppu::WeakImplHelper1< ::com::sun::star::t ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > m_lContinuations; - ContinuationAbort* m_pAbort; + comphelper::OInteractionAbort* m_pAbort; FilterOptionsContinuation* m_pOptions; @@ -57,7 +59,7 @@ public: RequestFilterOptions( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > rModel, ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > rProperties ); - sal_Bool isAbort() { return m_pAbort->isSelected(); } + sal_Bool isAbort() { return m_pAbort->wasSelected(); } ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > getFilterOptions() { @@ -73,3 +75,4 @@ public: throw( ::com::sun::star::uno::RuntimeException ); }; +#endif diff --git a/sfx2/source/layout/makefile.mk b/sfx2/source/layout/makefile.mk deleted file mode 100644 index a11ba76a15bd..000000000000 --- a/sfx2/source/layout/makefile.mk +++ /dev/null @@ -1,56 +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=sfx2 -TARGET=layout -ENABLE_EXCEPTIONS=true - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -.IF "$(ENABLE_LAYOUT)" == "TRUE" - -SLOFILES = \ - $(SLO)$/sfxdialog.obj -# - -SLOFILES += $(SLO)$/sfxtabdialog.obj \ - $(SLO)$/factory.obj \ - $(SLO)$/sfxtabpage.obj - -.ENDIF # ENABLE_LAYOUT == TRUE - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sfx2/source/layout/sfxtabdialog.cxx b/sfx2/source/layout/sfxtabdialog.cxx index 782e890d81be..7909d404b524 100644 --- a/sfx2/source/layout/sfxtabdialog.cxx +++ b/sfx2/source/layout/sfxtabdialog.cxx @@ -42,8 +42,8 @@ #include <sfx2/tabdlg.hxx> #include <sfx2/viewfrm.hxx> #include <sfx2/app.hxx> -#include "sfxresid.hxx" -#include "sfxhelp.hxx" +#include "sfx2/sfxresid.hxx" +#include "sfx2/sfxhelp.hxx" #include <sfx2/ctrlitem.hxx> #include <sfx2/bindings.hxx> #include <sfx2/sfxdlg.hxx> diff --git a/sfx2/source/menu/makefile.mk b/sfx2/source/menu/makefile.mk deleted file mode 100644 index 8b55bd0840ea..000000000000 --- a/sfx2/source/menu/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=..$/.. - - -PRJNAME=sfx2 -TARGET=menu -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = menu.src - -SLOFILES = \ - $(SLO)$/mnuitem.obj \ - $(SLO)$/mnumgr.obj \ - $(SLO)$/objmnctl.obj \ - $(SLO)$/thessubmenu.obj \ - $(SLO)$/virtmenu.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sfx2/source/menu/mnuitem.cxx b/sfx2/source/menu/mnuitem.cxx index 6c62bc1fa88f..3d2f2db47def 100644 --- a/sfx2/source/menu/mnuitem.cxx +++ b/sfx2/source/menu/mnuitem.cxx @@ -71,9 +71,9 @@ #include <sfx2/module.hxx> #include <sfx2/unoctitm.hxx> #include <sfx2/viewfrm.hxx> -#include "imgmgr.hxx" -#include "imagemgr.hxx" -#include "sfxresid.hxx" +#include "sfx2/imgmgr.hxx" +#include "sfx2/imagemgr.hxx" +#include "sfx2/sfxresid.hxx" #include "../doc/doc.hrc" using namespace ::com::sun::star::uno; diff --git a/sfx2/source/menu/mnumgr.cxx b/sfx2/source/menu/mnumgr.cxx index dfad7e1a7132..f1eadf744863 100755 --- a/sfx2/source/menu/mnumgr.cxx +++ b/sfx2/source/menu/mnumgr.cxx @@ -76,7 +76,7 @@ #include "sfxtypes.hxx" #include <sfx2/bindings.hxx> #include "mnucfga.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/msgpool.hxx> #include <sfx2/sfx.hrc> #include "menu.hrc" diff --git a/sfx2/source/menu/virtmenu.cxx b/sfx2/source/menu/virtmenu.cxx index fd8da1c11e8a..b60681e95afa 100644 --- a/sfx2/source/menu/virtmenu.cxx +++ b/sfx2/source/menu/virtmenu.cxx @@ -36,14 +36,9 @@ #include <com/sun/star/frame/XDesktop.hpp> #include <com/sun/star/frame/XFramesSupplier.hpp> #include <comphelper/processfactory.hxx> -#ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_ #include <toolkit/unohlp.hxx> -#endif #include <tools/urlobj.hxx> -#ifndef GCC -#endif - #include "virtmenu.hxx" #include <sfx2/msgpool.hxx> #include "statcach.hxx" @@ -59,9 +54,9 @@ #include <sfx2/sfx.hrc> #include <sfx2/viewsh.hxx> #include "sfxpicklist.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "menu.hrc" -#include "imagemgr.hxx" +#include "sfx2/imagemgr.hxx" #include <sfx2/viewfrm.hxx> #include <sfx2/objsh.hxx> #include <framework/addonsoptions.hxx> diff --git a/sfx2/source/notify/eventsupplier.cxx b/sfx2/source/notify/eventsupplier.cxx index e37f66ee6f20..9ffc2200cfe8 100644 --- a/sfx2/source/notify/eventsupplier.cxx +++ b/sfx2/source/notify/eventsupplier.cxx @@ -52,7 +52,7 @@ #include "eventsupplier.hxx" #include <sfx2/app.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/sfxsids.hrc> #include "sfxlocal.hrc" diff --git a/sfx2/source/notify/makefile.mk b/sfx2/source/notify/makefile.mk deleted file mode 100644 index e2ddde40f936..000000000000 --- a/sfx2/source/notify/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=sfx2 -TARGET=notify - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/eventsupplier.obj \ - $(SLO)$/hintpost.obj - -EXCEPTIONSFILES = \ - $(SLO)$/eventsupplier.obj -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sfx2/source/statbar/makefile.mk b/sfx2/source/statbar/makefile.mk deleted file mode 100644 index f99c8fcdaa1e..000000000000 --- a/sfx2/source/statbar/makefile.mk +++ /dev/null @@ -1,47 +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=sfx2 -TARGET=statbar -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/stbitem.obj - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sfx2/source/statbar/stbitem.cxx b/sfx2/source/statbar/stbitem.cxx index e5de57d835c3..68d855cbf6c6 100644 --- a/sfx2/source/statbar/stbitem.cxx +++ b/sfx2/source/statbar/stbitem.cxx @@ -41,7 +41,7 @@ #include <vcl/status.hxx> #include <sfx2/app.hxx> -#include "stbitem.hxx" +#include "sfx2/stbitem.hxx" #include "sfxtypes.hxx" #include <sfx2/msg.hxx> #include "arrdecl.hxx" diff --git a/sfx2/source/toolbox/imgmgr.cxx b/sfx2/source/toolbox/imgmgr.cxx index 7694932d44c4..231baa76fc76 100644 --- a/sfx2/source/toolbox/imgmgr.cxx +++ b/sfx2/source/toolbox/imgmgr.cxx @@ -31,10 +31,10 @@ #include <stdio.h> #include <hash_map> -#include "imgmgr.hxx" +#include "sfx2/imgmgr.hxx" #include <sfx2/sfx.hrc> #include <sfx2/app.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/bindings.hxx> #include "statcach.hxx" #include <sfx2/module.hxx> diff --git a/sfx2/source/toolbox/makefile.mk b/sfx2/source/toolbox/makefile.mk deleted file mode 100644 index ce4f011e6044..000000000000 --- a/sfx2/source/toolbox/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=sfx2 -TARGET=toolbox -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/tbxitem.obj \ - $(SLO)$/imgmgr.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx index dc4527665471..6bf2dc26edd6 100644 --- a/sfx2/source/toolbox/tbxitem.cxx +++ b/sfx2/source/toolbox/tbxitem.cxx @@ -91,7 +91,7 @@ #include "arrdecl.hxx" #include "sfxtypes.hxx" #include <sfx2/genlink.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/sfx.hrc> #include <sfx2/module.hxx> #include <sfx2/docfile.hxx> @@ -102,11 +102,11 @@ #include <sfx2/unoctitm.hxx> #include "helpid.hrc" #include "workwin.hxx" -#include "imgmgr.hxx" +#include "sfx2/imgmgr.hxx" #include "virtmenu.hxx" #include <sfx2/viewfrm.hxx> #include <sfx2/module.hxx> -#include "imagemgr.hxx" +#include "sfx2/imagemgr.hxx" #include <comphelper/uieventslogger.hxx> #include <com/sun/star/frame/XModuleManager.hpp> diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx index 090e94ecb63f..49deab951843 100644 --- a/sfx2/source/view/frame.cxx +++ b/sfx2/source/view/frame.cxx @@ -234,7 +234,7 @@ sal_uInt16 SfxFrame::PrepareClose_Impl( sal_Bool bUI, sal_Bool bForBrowsing ) bOther = ( &pFrame->GetFrame() != this ); } - SFX_APP()->NotifyEvent( SfxEventHint(SFX_EVENT_PREPARECLOSEVIEW, GlobalEventConfig::GetEventName( STR_EVENT_PREPARECLOSEVIEW ), pCur) ); + SFX_APP()->NotifyEvent( SfxViewEventHint(SFX_EVENT_PREPARECLOSEVIEW, GlobalEventConfig::GetEventName( STR_EVENT_PREPARECLOSEVIEW ), pCur, GetController() ) ); if ( bOther ) // if there are other views only the current view of this frame must be asked diff --git a/sfx2/source/view/frame2.cxx b/sfx2/source/view/frame2.cxx index 36edd34c973d..ef963b36d7bb 100644 --- a/sfx2/source/view/frame2.cxx +++ b/sfx2/source/view/frame2.cxx @@ -30,7 +30,7 @@ #include "impframe.hxx" #include "objshimp.hxx" -#include "sfxhelp.hxx" +#include "sfx2/sfxhelp.hxx" #include "workwin.hxx" #include "sfx2/app.hxx" diff --git a/sfx2/source/view/frmload.cxx b/sfx2/source/view/frmload.cxx index df252b831803..a4707f03d364 100644 --- a/sfx2/source/view/frmload.cxx +++ b/sfx2/source/view/frmload.cxx @@ -30,7 +30,6 @@ #include "frmload.hxx" #include "objshimp.hxx" -#include "viewfac.hxx" #include "sfx2/app.hxx" #include "sfx2/dispatch.hxx" #include "sfx2/docfac.hxx" @@ -45,6 +44,7 @@ #include "sfx2/sfxuno.hxx" #include "sfx2/viewfrm.hxx" #include "sfx2/viewsh.hxx" +#include "sfx2/viewfac.hxx" /** === begin UNO includes === **/ #include <com/sun/star/container/XContainerQuery.hpp> @@ -216,11 +216,10 @@ const SfxFilter* SfxFrameLoader_Impl::impl_getFilterFromServiceName_nothrow( con ::rtl::OUString sFilterName; try { - ::framework::RequestFilterSelect* pRequest = new ::framework::RequestFilterSelect( i_rDocumentURL ); - Reference< XInteractionRequest > xRequest ( pRequest ); - i_rxHandler->handle( xRequest ); - if( !pRequest->isAbort() ) - sFilterName = pRequest->getFilter(); + ::framework::RequestFilterSelect aRequest( i_rDocumentURL ); + i_rxHandler->handle( aRequest.GetRequest() ); + if( !aRequest.isAbort() ) + sFilterName = aRequest.getFilter(); } catch( const Exception& ) { diff --git a/sfx2/source/view/makefile.mk b/sfx2/source/view/makefile.mk deleted file mode 100644 index 9c257f4c9f75..000000000000 --- a/sfx2/source/view/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= sfx2 -TARGET= view -ENABLE_EXCEPTIONS= TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - view.src - -SLOFILES = \ - $(SLO)$/ipclient.obj \ - $(SLO)$/viewsh.obj \ - $(SLO)$/frmload.obj \ - $(SLO)$/frame.obj \ - $(SLO)$/frame2.obj \ - $(SLO)$/printer.obj \ - $(SLO)$/viewprn.obj \ - $(SLO)$/viewfac.obj \ - $(SLO)$/orgmgr.obj \ - $(SLO)$/viewfrm.obj \ - $(SLO)$/viewfrm2.obj \ - $(SLO)$/sfxbasecontroller.obj \ - $(SLO)$/userinputinterception.obj - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sfx2/source/view/orgmgr.cxx b/sfx2/source/view/orgmgr.cxx index b15392372b19..6c92cd448adf 100644 --- a/sfx2/source/view/orgmgr.cxx +++ b/sfx2/source/view/orgmgr.cxx @@ -53,7 +53,7 @@ #include "docvor.hxx" #include "orgmgr.hxx" #include "sfxtypes.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "view.hrc" #include <sfx2/docfilt.hxx> #include "fltfnc.hxx" diff --git a/sfx2/source/view/printer.cxx b/sfx2/source/view/printer.cxx index 46a96bafab9a..310c1a58a578 100644 --- a/sfx2/source/view/printer.cxx +++ b/sfx2/source/view/printer.cxx @@ -44,7 +44,7 @@ #include <sfx2/prnmon.hxx> #include <sfx2/viewsh.hxx> #include <sfx2/tabdlg.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "view.hrc" #ifdef MSC diff --git a/sfx2/source/view/prnmon.cxx b/sfx2/source/view/prnmon.cxx deleted file mode 100644 index a4e96ab1065e..000000000000 --- a/sfx2/source/view/prnmon.cxx +++ /dev/null @@ -1,495 +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_sfx2.hxx" -#include <com/sun/star/view/PrintableState.hpp> -#include <com/sun/star/util/XCloseable.hpp> -#include <com/sun/star/util/XCloseBroadcaster.hpp> -#include <com/sun/star/util/XCloseListener.hpp> -#include <com/sun/star/util/CloseVetoException.hpp> -#include <vcl/fixed.hxx> -#include <vcl/msgbox.hxx> -#include <svtools/asynclink.hxx> - -#include <unotools/printwarningoptions.hxx> -#include <svl/eitem.hxx> - -#ifndef GCC -#endif - -#include <sfx2/prnmon.hxx> -#include <sfx2/viewsh.hxx> -#include <sfx2/viewfrm.hxx> -#include <sfx2/objsh.hxx> -#include <sfx2/docfile.hxx> -#include "sfxtypes.hxx" -#include <sfx2/progress.hxx> -#include <sfx2/bindings.hxx> -#include "sfxresid.hxx" -#include <sfx2/event.hxx> -#include <sfx2/request.hxx> -#include <sfx2/app.hxx> - -#include "view.hrc" - -//------------------------------------------------------------------------ - -#define SFX_TITLE_MAXLEN_PRINTMONITOR 22 - -//------------------------------------------------------------------------ - -struct SfxPrintMonitor_Impl: public ModelessDialog -{ - - SfxPrintMonitor_Impl( Window *pParent, SfxViewShell *rpViewShell ); - virtual BOOL Close(); - - SfxViewShell* pViewShell; - FixedText aDocName; - FixedText aPrinting; - FixedText aPrinter; - FixedText aPrintInfo; - CancelButton aCancel; -}; - -//------------------------------------------------------------------------- - -struct SfxPrintProgress_Impl : public SfxListener -{ - SfxPrintMonitor_Impl* pMonitor; - SfxViewShell* pViewShell; - SfxPrinter* pPrinter; - SfxPrinter* pOldPrinter; - USHORT nLastPage; - BOOL bRunning; - BOOL bCancel; - BOOL bDeleteOnEndPrint; - BOOL bShow; - BOOL bCallbacks; - BOOL bOldEnablePrintFile; - BOOL bOldFlag; - BOOL bRestoreFlag; - BOOL bAborted; - svtools::AsynchronLink aDeleteLink; - Link aCancelHdl; - -private: - DECL_LINK( CancelHdl, Button * ); - DECL_STATIC_LINK( SfxPrintProgress_Impl, DeleteHdl, SfxPrintProgress * ); - -public: - SfxPrintProgress_Impl( SfxViewShell* pTheViewShell, SfxPrinter* pThePrinter ); - ~SfxPrintProgress_Impl(); - - void Delete( SfxPrintProgress* pAntiImpl ) { aDeleteLink.Call( pAntiImpl ); } - SfxViewShell* GetViewShell() const { return pViewShell; } - BOOL SetPage( USHORT nPage, const String &rPage ); - void CreateMonitor(); - virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); -}; - -void SfxPrintProgress_Impl::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) -{ - SfxPrintingHint* pPrintHint = PTR_CAST( SfxPrintingHint, &rHint ); - if ( pPrintHint ) - { - if ( pPrintHint->GetWhich() == -2 ) - CancelHdl(0); - } -} - -//------------------------------------------------------------------------ - -SfxPrintMonitor_Impl::SfxPrintMonitor_Impl( Window* pParent, SfxViewShell* rpViewShell ) : - ModelessDialog( pParent, SfxResId( DLG_PRINTMONITOR ) ), - pViewShell ( rpViewShell ), - aDocName ( this, SfxResId( FT_DOCNAME ) ), - aPrinting ( this, SfxResId( FT_PRINTING ) ), - aPrinter ( this, SfxResId( FT_PRINTER ) ), - aPrintInfo ( this, SfxResId( FT_PRINTINFO ) ), - aCancel ( this, SfxResId( PB_CANCELPRNMON ) ) -{ - if( rpViewShell->GetPrinter()->GetCapabilities( PRINTER_CAPABILITIES_EXTERNALDIALOG ) != 0 ) - { - String aPrep( SfxResId( STR_FT_PREPARATION ) ); - aPrinting.SetText( aPrep ); - aPrinter.Show( FALSE ); - } - FreeResource(); -} - -//------------------------------------------------------------------------ - -IMPL_STATIC_LINK_NOINSTANCE( SfxPrintProgress_Impl, DeleteHdl, SfxPrintProgress*, pAntiImpl ) -{ - delete pAntiImpl; - return 0; -} - -void actualizePrintCancelState(CancelButton& rButton, const SfxObjectShell* pShell) -{ - sal_Bool bEnableCancelButton = sal_True; - if (pShell) - bEnableCancelButton = pShell->Stamp_GetPrintCancelState(); - - if (!bEnableCancelButton) - rButton.Disable(); - else - rButton.Enable(); -} - -//------------------------------------------------------------------------ - -SfxPrintProgress_Impl::SfxPrintProgress_Impl( SfxViewShell* pTheViewShell, - SfxPrinter* pThePrinter ) : - - pMonitor ( 0 ), - pViewShell ( pTheViewShell ), - pPrinter ( pThePrinter ), - pOldPrinter ( NULL ), - nLastPage ( 0 ), - bRunning ( TRUE ), - bCancel ( FALSE ), - bDeleteOnEndPrint ( FALSE ), - bShow ( FALSE ), - bCallbacks ( FALSE ), - bOldEnablePrintFile ( FALSE ), - bOldFlag ( TRUE ), - bRestoreFlag ( FALSE ), - bAborted ( FALSE ), - aDeleteLink ( STATIC_LINK( this, SfxPrintProgress_Impl, DeleteHdl ) ) -{ - StartListening( *pViewShell->GetObjectShell() ); -} - -void SfxPrintProgress_Impl::CreateMonitor() -{ - // mark monitor to been shown in first status indication - bShow = TRUE; - - if ( !pMonitor ) - { - Window* pParent = pViewShell->GetWindow(); - pMonitor = new SfxPrintMonitor_Impl( pParent, pViewShell ); - pMonitor->aDocName.SetText( pViewShell->GetObjectShell()->GetTitle( SFX_TITLE_MAXLEN_PRINTMONITOR ) ); - pMonitor->aPrinter.SetText( pViewShell->GetPrinter()->GetName() ); - - // Stampit enable/dsiable cancel button - actualizePrintCancelState( pMonitor->aCancel, pViewShell->GetObjectShell() ); - pMonitor->aCancel.SetClickHdl( LINK( this, SfxPrintProgress_Impl, CancelHdl ) ); - } -} - -//------------------------------------------------------------------------ - -SfxPrintProgress_Impl::~SfxPrintProgress_Impl() -{ -} - -//------------------------------------------------------------------------ - -BOOL SfxPrintProgress_Impl::SetPage( USHORT nPage, const String &rPage ) -{ - // wurde der Druckauftrag abgebrochen? - if ( bCancel || !pMonitor ) - return FALSE; - - // Stampit enable/dsiable cancel button - actualizePrintCancelState(pMonitor->aCancel, pViewShell->GetObjectShell()); - - nLastPage = nPage; - String aStrPrintInfo = String( SfxResId( STR_PAGE ) ); - if ( !rPage.Len() ) - aStrPrintInfo += String::CreateFromInt32( nLastPage ); - else - aStrPrintInfo += rPage; - pMonitor->aPrintInfo.SetText( aStrPrintInfo ); - pMonitor->Update(); - return TRUE; -} - -//------------------------------------------------------------------------ - -IMPL_LINK( SfxPrintProgress_Impl, CancelHdl, Button *, EMPTYARG ) -{ - if ( !pViewShell->GetPrinter()->IsJobActive() && pViewShell->GetPrinter()->IsPrinting() ) - // we are still in StartJob, cancelling now might lead to a crash - return 0; - - if ( pMonitor ) - pMonitor->Hide(); - - pViewShell->GetObjectShell()->Broadcast( SfxPrintingHint( com::sun::star::view::PrintableState_JOB_ABORTED, NULL, NULL ) ); - pViewShell->GetPrinter()->AbortJob(); - bCancel = TRUE; - - if ( aCancelHdl.IsSet() ) - aCancelHdl.Call( this ); - - bAborted = TRUE; - return 0; -} - -BOOL SfxPrintMonitor_Impl::Close() -{ - BOOL bAgree = pViewShell ? pViewShell->GetObjectShell()->Stamp_GetPrintCancelState() : TRUE; - if (!bAgree) - return FALSE; - else - return ModelessDialog::Close(); -} - -//-------------------------------------------------------------------- - -SfxPrintProgress::SfxPrintProgress( SfxViewShell* pViewSh, FASTBOOL bShow ) -: SfxProgress( pViewSh->GetViewFrame()->GetObjectShell(), - String(SfxResId(STR_PRINTING)), 1, FALSE ), - pImp( new SfxPrintProgress_Impl( pViewSh, pViewSh->GetPrinter() ) ) -{ - #if 0 - pImp->pPrinter->SetEndPrintHdl( LINK( this, SfxPrintProgress, EndPrintNotify ) ); - pImp->pPrinter->SetErrorHdl( LINK( this, SfxPrintProgress, PrintErrorNotify ) ); - pImp->pPrinter->SetStartPrintHdl( LINK( this, SfxPrintProgress, StartPrintNotify ) ); - pImp->bCallbacks = TRUE; - #endif - - SfxObjectShell* pDoc = pViewSh->GetObjectShell(); - SFX_ITEMSET_ARG( pDoc->GetMedium()->GetItemSet(), pItem, SfxBoolItem, SID_HIDDEN, FALSE ); - if ( pItem && pItem->GetValue() ) - bShow = FALSE; - - if ( bShow ) - pImp->CreateMonitor(); - - Lock(); - if ( !SvtPrintWarningOptions().IsModifyDocumentOnPrintingAllowed() ) - { - pImp->bRestoreFlag = TRUE; - pImp->bOldFlag = pDoc->IsEnableSetModified(); - if ( pImp->bOldFlag ) - pDoc->EnableSetModified( FALSE ); - } -} - -//-------------------------------------------------------------------- - -SfxPrintProgress::~SfxPrintProgress() -{ - // k"onnte auch schon weg sein (in EndPrintNotify) - DELETEZ(pImp->pMonitor); - - // ggf. Callbacks entfermen - if ( pImp->bCallbacks ) - { - // pImp->pPrinter->SetEndPrintHdl( Link() ); - pImp->pPrinter->SetErrorHdl( Link() ); - pImp->bCallbacks = FALSE; - } - - // ggf. vorherigen Drucker wieder einsetzen - if ( pImp->pOldPrinter ) - pImp->pViewShell->SetPrinter( pImp->pOldPrinter, SFX_PRINTER_PRINTER ); - else - // ggf. vorherigen Print-To-File-Status zuruecksetzen - pImp->pViewShell->GetPrinter()->EnablePrintFile( pImp->bOldEnablePrintFile ); - - // EndPrint-Notification an Frame - //pImp->pViewShell->GetViewFrame()->GetFrame().Lock_Impl(FALSE); - pImp->EndListening( *(pImp->pViewShell->GetObjectShell()) ); - - // the following call might destroy the view or even the document - pImp->pViewShell->CheckOwnerShip_Impl(); - delete pImp; -} - -//-------------------------------------------------------------------- - -BOOL SfxPrintProgress::SetState( ULONG nValue, ULONG nNewRange ) -{ - if ( pImp->bShow ) - { - pImp->bShow = FALSE; - if ( pImp->pMonitor ) - { - pImp->pMonitor->Show(); - pImp->pMonitor->Update(); - } - } - - return pImp->SetPage( (USHORT)nValue, GetStateText_Impl() ) && - SfxProgress::SetState( nValue, nNewRange ); -} - -//-------------------------------------------------------------------- - -void SfxPrintProgress::SetText( const String& rText ) -{ - if ( pImp->pMonitor ) - { - pImp->pMonitor->SetText( rText ); - pImp->pMonitor->Update(); - } - SfxProgress::SetText( rText ); -} - -//------------------------------------------------------------------------ - -IMPL_LINK_INLINE_START( SfxPrintProgress, PrintErrorNotify, void *, EMPTYARG ) -{ - if ( pImp->pMonitor ) - pImp->pMonitor->Hide(); - // AbortJob calls EndPrint hdl, so do not delete pImp just now - BOOL bWasDeleteOnEndPrint = pImp->bDeleteOnEndPrint; - pImp->bDeleteOnEndPrint = FALSE; - pImp->pPrinter->AbortJob(); - InfoBox( pImp->GetViewShell()->GetWindow(), - String( SfxResId(STR_ERROR_PRINT) ) ).Execute(); - if ( pImp->bRestoreFlag && pImp->pViewShell->GetObjectShell()->IsEnableSetModified() != pImp->bOldFlag ) - pImp->pViewShell->GetObjectShell()->EnableSetModified( pImp->bOldFlag ); - pImp->GetViewShell()->GetObjectShell()->Broadcast( SfxPrintingHint( com::sun::star::view::PrintableState_JOB_FAILED, NULL, NULL ) ); - // now we can clean up like normally EndPrint hdl does - if( bWasDeleteOnEndPrint ) - { - DELETEZ(pImp->pMonitor); - delete this; - } - return 0; -} -IMPL_LINK_INLINE_END( SfxPrintProgress, PrintErrorNotify, void *, EMPTYARG ) - -//------------------------------------------------------------------------ - -IMPL_LINK( SfxPrintProgress, StartPrintNotify, void *, EMPTYARG ) -{ - SfxObjectShell *pObjShell = pImp->pViewShell->GetObjectShell(); - SFX_APP()->NotifyEvent(SfxEventHint(SFX_EVENT_PRINTDOC, GlobalEventConfig::GetEventName( STR_EVENT_PRINTDOC ), pObjShell)); - pObjShell->Broadcast( SfxPrintingHint( com::sun::star::view::PrintableState_JOB_STARTED, NULL, NULL ) ); - return 0; -} - -IMPL_LINK( SfxPrintProgress, EndPrintNotify, void *, EMPTYARG ) -{ - if ( pImp->pMonitor ) - pImp->pMonitor->Hide(); - - SfxViewShell* pViewShell = pImp->pViewShell; - - // Slots enablen - pViewShell->Invalidate( SID_PRINTDOC ); - pViewShell->Invalidate( SID_PRINTDOCDIRECT ); - pViewShell->Invalidate( SID_SETUPPRINTER ); - - // . . . falls der Printer im System umgestellt wurde, hier Aenderung - // nachziehen. - //! if( pMDI->IsPrinterChanged() ) pMDI->Changed( 0L ); - - // Callbacks rausnehmen - // pImp->pPrinter->SetEndPrintHdl( Link() ); - pImp->pPrinter->SetErrorHdl( Link() ); - pImp->bCallbacks = FALSE; - - // ggf. alten Printer wieder einsetzen - if ( pImp->pOldPrinter ) - { - // Fix #59613#: niemals den aktuellen Printer synchron abschiessen ! - // Da sowieso immer bDeleteOnEndPrint gesetzt wird, wird der der Drucker im - // dtor vom Printprogress ( dann aber asynchron !! ) zur"uckgesetzt. -/* - pImp->pViewShell->SetPrinter( pImp->pOldPrinter, SFX_PRINTER_PRINTER ); - pImp->pOldPrinter = 0; - pImp->pPrinter = 0; - */ - } - else - // ggf. vorherigen Print-To-File-Status zuruecksetzen - pViewShell->GetPrinter()->EnablePrintFile( pImp->bOldEnablePrintFile ); - - // it is possible that after printing the document or view is deleted (because the VieShell got the ownership) - // so first clean up - if ( pImp->bRestoreFlag && pViewShell->GetObjectShell()->IsEnableSetModified() != pImp->bOldFlag ) - pViewShell->GetObjectShell()->EnableSetModified( TRUE ); - - pViewShell->GetObjectShell()->Broadcast( SfxPrintingHint( com::sun::star::view::PrintableState_JOB_COMPLETED, NULL, NULL ) ); - if ( pImp->bDeleteOnEndPrint ) - { - DELETEZ(pImp->pMonitor); - delete this; - } - else - { - DBG_ASSERT( !pImp->pOldPrinter, "Unable to restore printer!" ); - pImp->bRunning = FALSE; - } - - return 0; -} - -//------------------------------------------------------------------------ - -void SfxPrintProgress::DeleteOnEndPrint() -{ - UnLock(); // jetzt schon, wg. Drucken im Thread -#ifndef WNT - // da das Drucken im 'Thread' unter Windows zu undefiniert ist bleibt der - // Print-Monitor dort stehen, auf den anderen Plattformen kann man dann - // weiterarbeiten, also kommt das Teil weg - DELETEZ( pImp->pMonitor ); -#endif - - pImp->bDeleteOnEndPrint = TRUE; - if ( !pImp->bRunning ) - delete this; -} - -//------------------------------------------------------------------------ - -void SfxPrintProgress::RestoreOnEndPrint( SfxPrinter *pOldPrinter, - BOOL bOldEnablePrintFile ) -{ - pImp->pOldPrinter = pOldPrinter; - pImp->bOldEnablePrintFile = bOldEnablePrintFile; -} - -//------------------------------------------------------------------------ - -void SfxPrintProgress::RestoreOnEndPrint( SfxPrinter *pOldPrinter ) -{ - RestoreOnEndPrint( pOldPrinter, FALSE ); -} - -//------------------------------------------------------------------------ - -void SfxPrintProgress::SetCancelHdl( const Link& aCancelHdl ) -{ - pImp->aCancelHdl = aCancelHdl; -} - -BOOL SfxPrintProgress::IsAborted() const -{ - return pImp->bAborted; -} diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx index 19aa4b75ee0f..b8ad1cfc61f7 100644 --- a/sfx2/source/view/sfxbasecontroller.cxx +++ b/sfx2/source/view/sfxbasecontroller.cxx @@ -93,7 +93,7 @@ #include <hash_map> #include <sfx2/event.hxx> -#include "viewfac.hxx" +#include "sfx2/viewfac.hxx" #define OMULTITYPEINTERFACECONTAINERHELPER ::cppu::OMultiTypeInterfaceContainerHelper #define OINTERFACECONTAINERHELPER ::cppu::OInterfaceContainerHelper @@ -639,7 +639,7 @@ void SAL_CALL SfxBaseController::attachFrame( const REFERENCE< XFRAME >& xFrame ConnectSfxFrame_Impl( E_CONNECT ); // attaching the frame to the controller is the last step in the creation of a new view, so notify this - SfxEventHint aHint( SFX_EVENT_VIEWCREATED, GlobalEventConfig::GetEventName( STR_EVENT_VIEWCREATED ), m_pData->m_pViewShell->GetObjectShell() ); + SfxViewEventHint aHint( SFX_EVENT_VIEWCREATED, GlobalEventConfig::GetEventName( STR_EVENT_VIEWCREATED ), m_pData->m_pViewShell->GetObjectShell(), uno::Reference< frame::XController2 >( this ) ); SFX_APP()->NotifyEvent( aHint ); } } @@ -1069,7 +1069,7 @@ void SAL_CALL SfxBaseController::dispose() throw( ::com::sun::star::uno::Runtime pView = SfxViewFrame::GetNext( *pView, pDoc ); } - SFX_APP()->NotifyEvent( SfxEventHint(SFX_EVENT_CLOSEVIEW, GlobalEventConfig::GetEventName( STR_EVENT_CLOSEVIEW ), pDoc ) ); + SFX_APP()->NotifyEvent( SfxViewEventHint(SFX_EVENT_CLOSEVIEW, GlobalEventConfig::GetEventName( STR_EVENT_CLOSEVIEW ), pDoc, uno::Reference< frame::XController2 >( this ) ) ); if ( !pView ) SFX_APP()->NotifyEvent( SfxEventHint(SFX_EVENT_CLOSEDOC, GlobalEventConfig::GetEventName( STR_EVENT_CLOSEDOC ), pDoc) ); diff --git a/sfx2/source/view/view.hrc b/sfx2/source/view/view.hrc index 243dcd56e4c8..3dce1ec795bb 100644 --- a/sfx2/source/view/view.hrc +++ b/sfx2/source/view/view.hrc @@ -41,12 +41,6 @@ #define STR_NOSTARTPRINTER (RID_SFX_VIEW_START+ 9) #define STR_PRINTING (RID_SFX_VIEW_START+10) -#ifndef STR_UNDO -#define STR_UNDO (RID_SFX_VIEW_START+11) -#define STR_REDO (RID_SFX_VIEW_START+12) -#define STR_REPEAT (RID_SFX_VIEW_START+13) -#endif - #define DLG_PRINTMONITOR (RID_SFX_VIEW_START) #define FT_DOCNAME 1 #define FT_PRINTING 2 diff --git a/sfx2/source/view/viewfac.cxx b/sfx2/source/view/viewfac.cxx index f9469e8a9f88..3eed678420dd 100644 --- a/sfx2/source/view/viewfac.cxx +++ b/sfx2/source/view/viewfac.cxx @@ -30,8 +30,8 @@ // INCLUDE --------------------------------------------------------------- #include <sfx2/app.hxx> +#include "sfx2/viewfac.hxx" #include <rtl/ustrbuf.hxx> -#include "viewfac.hxx" // STATIC DATA ----------------------------------------------------------- diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 8e63753b00b5..4dcd4bb4709e 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -36,12 +36,8 @@ #include <com/sun/star/frame/XLayoutManager.hpp> #include <com/sun/star/frame/XComponentLoader.hpp> -#ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_ #include <toolkit/unohlp.hxx> -#endif -#ifndef _SPLITWIN_HXX //autogen #include <vcl/splitwin.hxx> -#endif #include <unotools/moduleoptions.hxx> #include <svl/intitem.hxx> #include <svl/visitem.hxx> @@ -50,9 +46,7 @@ #include <svl/slstitm.hxx> #include <svl/whiter.hxx> #include <svl/undo.hxx> -#ifndef _MSGBOX_HXX //autogen #include <vcl/msgbox.hxx> -#endif #include <svtools/sfxecode.hxx> #include <svtools/ehdl.hxx> #include <tools/diagnose_ex.h> @@ -98,6 +92,8 @@ #include <comphelper/storagehelper.hxx> #include <svtools/asynclink.hxx> #include <svl/sharecontrolfile.hxx> +#include <svtools/svtools.hrc> +#include <svtools/svtdata.hxx> #include <framework/framelistanalyzer.hxx> #include <boost/optional.hpp> @@ -113,9 +109,6 @@ using ::com::sun::star::document::XViewDataSupplier; using ::com::sun::star::container::XIndexContainer; namespace css = ::com::sun::star; -#ifndef GCC -#endif - // wg. ViewFrame::Current #include "appdata.hxx" #include <sfx2/taskpane.hxx> @@ -132,10 +125,10 @@ namespace css = ::com::sun::star; #include <sfx2/request.hxx> #include <sfx2/docfac.hxx> #include <sfx2/ipclient.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "appbas.hxx" #include <sfx2/objitem.hxx> -#include "viewfac.hxx" +#include "sfx2/viewfac.hxx" #include <sfx2/event.hxx> #include "fltfnc.hxx" #include <sfx2/docfile.hxx> @@ -152,7 +145,7 @@ namespace css = ::com::sun::star; #include "workwin.hxx" #include "helper.hxx" #include "macro.hxx" -#include "minfitem.hxx" +#include "sfx2/minfitem.hxx" #include "../appl/app.hrc" #include "impviewframe.hxx" @@ -1030,8 +1023,8 @@ void SfxViewFrame::StateHistory_Impl( SfxItemSet &rSet ) if ( pShUndoMgr && pShUndoMgr->GetUndoActionCount() ) { - String aTmp( SfxResId( STR_UNDO ) ); - aTmp += pShUndoMgr->GetUndoActionComment(0); + String aTmp( SvtResId( STR_UNDO ) ); + aTmp+= pShUndoMgr->GetUndoActionComment(0); rSet.Put( SfxStringItem( SID_UNDO, aTmp ) ); } else @@ -1039,7 +1032,7 @@ void SfxViewFrame::StateHistory_Impl( SfxItemSet &rSet ) if ( pShUndoMgr && pShUndoMgr->GetRedoActionCount() ) { - String aTmp( SfxResId(STR_REDO) ); + String aTmp( SvtResId(STR_REDO) ); aTmp += pShUndoMgr->GetRedoActionComment(0); rSet.Put( SfxStringItem( SID_REDO, aTmp ) ); } @@ -1049,7 +1042,7 @@ void SfxViewFrame::StateHistory_Impl( SfxItemSet &rSet ) if ( pShUndoMgr && pTarget && pShUndoMgr->GetRepeatActionCount() && pShUndoMgr->CanRepeat(*pTarget) ) { - String aTmp( SfxResId(STR_REPEAT) ); + String aTmp( SvtResId(STR_REPEAT) ); aTmp += pShUndoMgr->GetRepeatActionComment(*pTarget); rSet.Put( SfxStringItem( SID_REPEAT, aTmp ) ); } diff --git a/sfx2/source/view/viewfrm2.cxx b/sfx2/source/view/viewfrm2.cxx index 480b5307df2e..05ce981a51b6 100644 --- a/sfx2/source/view/viewfrm2.cxx +++ b/sfx2/source/view/viewfrm2.cxx @@ -30,7 +30,7 @@ #include "impviewframe.hxx" #include "statcach.hxx" -#include "viewfac.hxx" +#include "sfx2/viewfac.hxx" #include "workwin.hxx" #include "sfx2/app.hxx" diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx index d1cfd8c2d181..4ef4244f28e6 100644 --- a/sfx2/source/view/viewprn.cxx +++ b/sfx2/source/view/viewprn.cxx @@ -50,7 +50,7 @@ #include "viewimp.hxx" #include <sfx2/viewfrm.hxx> #include <sfx2/prnmon.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/request.hxx> #include <sfx2/objsh.hxx> #include "sfxtypes.hxx" diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 968d0cbe8676..ca3452e24168 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -44,7 +44,6 @@ #include <com/sun/star/system/SystemShellExecuteFlags.hpp> #include <com/sun/star/container/XContainerQuery.hpp> #include <com/sun/star/frame/XStorable.hpp> -#include <com/sun/star/datatransfer/clipboard/XClipboardNotifier.hpp> #include <com/sun/star/datatransfer/clipboard/XClipboard.hpp> #include <cppuhelper/implbase1.hxx> @@ -70,7 +69,7 @@ #include "view.hrc" #include <sfx2/viewsh.hxx> #include "viewimp.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/request.hxx> #include <sfx2/templdlg.hxx> #include <sfx2/printer.hxx> @@ -81,8 +80,8 @@ #include "view.hrc" #include "sfxlocal.hrc" #include <sfx2/sfxbasecontroller.hxx> +#include "sfx2/mailmodelapi.hxx" #include <sfx2/viewfrm.hxx> -#include "mailmodelapi.hxx" #include <sfx2/event.hxx> #include <sfx2/fcontnr.hxx> #include <sfx2/ipclient.hxx> @@ -115,7 +114,9 @@ DBG_NAME(SfxViewShell) class SfxClipboardChangeListener : public ::cppu::WeakImplHelper1< datatransfer::clipboard::XClipboardListener > { - SfxViewShell* pViewShell; +public: + SfxClipboardChangeListener( SfxViewShell* pView, const uno::Reference< datatransfer::clipboard::XClipboardNotifier >& xClpbrdNtfr ); + virtual ~SfxClipboardChangeListener(); // XEventListener virtual void SAL_CALL disposing( const lang::EventObject& rEventObject ) @@ -125,21 +126,46 @@ class SfxClipboardChangeListener : public ::cppu::WeakImplHelper1< virtual void SAL_CALL changedContents( const datatransfer::clipboard::ClipboardEvent& rEventObject ) throw ( uno::RuntimeException ); -public: - SfxClipboardChangeListener( SfxViewShell* pView ); - virtual ~SfxClipboardChangeListener(); + void DisconnectViewShell() { m_pViewShell = NULL; } + void ChangedContents(); + + enum AsyncExecuteCmd + { + ASYNCEXECUTE_CMD_DISPOSING, + ASYNCEXECUTE_CMD_CHANGEDCONTENTS + }; - void DisconnectViewShell() { pViewShell = NULL; } + struct AsyncExecuteInfo + { + AsyncExecuteInfo( AsyncExecuteCmd eCmd, uno::Reference< datatransfer::clipboard::XClipboardListener > xThis, SfxClipboardChangeListener* pListener ) : + m_eCmd( eCmd ), m_xThis( xThis ), m_pListener( pListener ) {} + + AsyncExecuteCmd m_eCmd; + uno::Reference< datatransfer::clipboard::XClipboardListener > m_xThis; + SfxClipboardChangeListener* m_pListener; + }; + +private: + SfxViewShell* m_pViewShell; + uno::Reference< datatransfer::clipboard::XClipboardNotifier > m_xClpbrdNtfr; + uno::Reference< lang::XComponent > m_xCtrl; + + DECL_STATIC_LINK( SfxClipboardChangeListener, AsyncExecuteHdl_Impl, AsyncExecuteInfo* ); }; -SfxClipboardChangeListener::SfxClipboardChangeListener( SfxViewShell* pView ) -: pViewShell( 0 ) +SfxClipboardChangeListener::SfxClipboardChangeListener( SfxViewShell* pView, const uno::Reference< datatransfer::clipboard::XClipboardNotifier >& xClpbrdNtfr ) + : m_pViewShell( 0 ), m_xClpbrdNtfr( xClpbrdNtfr ) { - uno::Reference < lang::XComponent > xCtrl( pView->GetController(), uno::UNO_QUERY ); - if ( xCtrl.is() ) + m_xCtrl = uno::Reference < lang::XComponent >( pView->GetController(), uno::UNO_QUERY ); + if ( m_xCtrl.is() ) + { + m_xCtrl->addEventListener( uno::Reference < lang::XEventListener > ( static_cast < lang::XEventListener* >( this ) ) ); + m_pViewShell = pView; + } + if ( m_xClpbrdNtfr.is() ) { - xCtrl->addEventListener( uno::Reference < lang::XEventListener > ( static_cast < lang::XEventListener* >( this ) ) ); - pViewShell = pView; + m_xClpbrdNtfr->addClipboardListener( uno::Reference< datatransfer::clipboard::XClipboardListener >( + static_cast< datatransfer::clipboard::XClipboardListener* >( this ))); } } @@ -147,34 +173,68 @@ SfxClipboardChangeListener::~SfxClipboardChangeListener() { } -void SAL_CALL SfxClipboardChangeListener::disposing( const lang::EventObject& /*rEventObject*/ ) -throw ( uno::RuntimeException ) +void SfxClipboardChangeListener::ChangedContents() { - // either clipboard or ViewShell is going to be destroyed -> no interest in listening anymore const ::vos::OGuard aGuard( Application::GetSolarMutex() ); - if ( pViewShell ) + if( m_pViewShell ) { - uno::Reference < lang::XComponent > xCtrl( pViewShell->GetController(), uno::UNO_QUERY ); - if ( xCtrl.is() ) - xCtrl->removeEventListener( uno::Reference < lang::XEventListener > ( static_cast < lang::XEventListener* >( this ) ) ); - pViewShell->AddRemoveClipboardListener( uno::Reference < datatransfer::clipboard::XClipboardListener > (this), FALSE ); - pViewShell = 0; + SfxBindings& rBind = m_pViewShell->GetViewFrame()->GetBindings(); + rBind.Invalidate( SID_PASTE ); + rBind.Invalidate( SID_PASTE_SPECIAL ); + rBind.Invalidate( SID_CLIPBOARD_FORMAT_ITEMS ); } } -void SAL_CALL SfxClipboardChangeListener::changedContents( const datatransfer::clipboard::ClipboardEvent& ) - throw ( RuntimeException ) +IMPL_STATIC_LINK_NOINSTANCE( SfxClipboardChangeListener, AsyncExecuteHdl_Impl, AsyncExecuteInfo*, pAsyncExecuteInfo ) { - const ::vos::OGuard aGuard( Application::GetSolarMutex() ); - if( pViewShell ) + if ( pAsyncExecuteInfo ) { - SfxBindings& rBind = pViewShell->GetViewFrame()->GetBindings(); - rBind.Invalidate( SID_PASTE ); - rBind.Invalidate( SID_PASTE_SPECIAL ); - rBind.Invalidate( SID_CLIPBOARD_FORMAT_ITEMS ); + uno::Reference< datatransfer::clipboard::XClipboardListener > xThis( pAsyncExecuteInfo->m_xThis ); + if ( pAsyncExecuteInfo->m_pListener ) + { + if ( pAsyncExecuteInfo->m_eCmd == ASYNCEXECUTE_CMD_DISPOSING ) + pAsyncExecuteInfo->m_pListener->DisconnectViewShell(); + else if ( pAsyncExecuteInfo->m_eCmd == ASYNCEXECUTE_CMD_CHANGEDCONTENTS ) + pAsyncExecuteInfo->m_pListener->ChangedContents(); + } } + delete pAsyncExecuteInfo; + + return 0; +} + +void SAL_CALL SfxClipboardChangeListener::disposing( const lang::EventObject& /*rEventObject*/ ) +throw ( uno::RuntimeException ) +{ + // Either clipboard or ViewShell is going to be destroyed -> no interest in listening anymore + uno::Reference< lang::XComponent > xCtrl( m_xCtrl ); + uno::Reference< datatransfer::clipboard::XClipboardNotifier > xNotify( m_xClpbrdNtfr ); + + uno::Reference< datatransfer::clipboard::XClipboardListener > xThis( static_cast< datatransfer::clipboard::XClipboardListener* >( this )); + if ( xCtrl.is() ) + xCtrl->removeEventListener( uno::Reference < lang::XEventListener > ( static_cast < lang::XEventListener* >( this ))); + if ( xNotify.is() ) + xNotify->removeClipboardListener( xThis ); + + // Make asynchronous call to avoid locking SolarMutex which is the + // root for many deadlocks, especially in conjuction with the "Windows" + // based single thread apartment clipboard code! + AsyncExecuteInfo* pInfo = new AsyncExecuteInfo( ASYNCEXECUTE_CMD_DISPOSING, xThis, this ); + Application::PostUserEvent( STATIC_LINK( 0, SfxClipboardChangeListener, AsyncExecuteHdl_Impl ), pInfo ); +} + +void SAL_CALL SfxClipboardChangeListener::changedContents( const datatransfer::clipboard::ClipboardEvent& ) + throw ( RuntimeException ) +{ + // Make asynchronous call to avoid locking SolarMutex which is the + // root for many deadlocks, especially in conjuction with the "Windows" + // based single thread apartment clipboard code! + uno::Reference< datatransfer::clipboard::XClipboardListener > xThis( static_cast< datatransfer::clipboard::XClipboardListener* >( this )); + AsyncExecuteInfo* pInfo = new AsyncExecuteInfo( ASYNCEXECUTE_CMD_CHANGEDCONTENTS, xThis, this ); + Application::PostUserEvent( STATIC_LINK( 0, SfxClipboardChangeListener, AsyncExecuteHdl_Impl ), pInfo ); } +//========================================================================= static ::rtl::OUString RetrieveLabelFromCommand( const ::rtl::OUString& rCommandURL, @@ -260,7 +320,7 @@ SfxViewShell_Impl::SfxViewShell_Impl(USHORT const nFlags) //========================================================================= SFX_IMPL_INTERFACE(SfxViewShell,SfxShell,SfxResId(0)) { - SFX_CHILDWINDOW_REGISTRATION( SID_MAIL_CHILDWIN ); + SFX_CHILDWINDOW_REGISTRATION( SID_MAIL_CHILDWIN ); } TYPEINIT2(SfxViewShell,SfxShell,SfxListener); @@ -379,27 +439,27 @@ enum ETypeFamily void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq ) { - const USHORT nId = rReq.GetSlot(); - switch( nId ) - { - case SID_STYLE_FAMILY : + const USHORT nId = rReq.GetSlot(); + switch( nId ) { - SFX_REQUEST_ARG(rReq, pItem, SfxUInt16Item, nId, FALSE); - if (pItem) + case SID_STYLE_FAMILY : + { + SFX_REQUEST_ARG(rReq, pItem, SfxUInt16Item, nId, FALSE); + if (pItem) { pImp->m_nFamily = pItem->GetValue(); } - break; - } + break; + } - case SID_STYLE_CATALOG: - { - SfxTemplateCatalog aCatalog( - SFX_APP()->GetTopWindow(), &GetViewFrame()->GetBindings()); - aCatalog.Execute(); + case SID_STYLE_CATALOG: + { + SfxTemplateCatalog aCatalog( + SFX_APP()->GetTopWindow(), &GetViewFrame()->GetBindings()); + aCatalog.Execute(); rReq.Ignore(); - break; - } + break; + } case SID_ACTIVATE_STYLE_APPLY: { com::sun::star::uno::Reference< com::sun::star::frame::XFrame > xFrame( @@ -459,85 +519,85 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq ) rReq.Done(); } break; - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - case SID_MAIL_SENDDOCASMS: - case SID_MAIL_SENDDOCASOOO: - case SID_MAIL_SENDDOCASPDF: - case SID_MAIL_SENDDOC: + case SID_MAIL_SENDDOCASMS: + case SID_MAIL_SENDDOCASOOO: + case SID_MAIL_SENDDOCASPDF: + case SID_MAIL_SENDDOC: case SID_MAIL_SENDDOCASFORMAT: - { - SfxObjectShell* pDoc = GetObjectShell(); - if ( pDoc && pDoc->QueryHiddenInformation( - WhenSaving, &GetViewFrame()->GetWindow() ) != RET_YES ) - break; + { + SfxObjectShell* pDoc = GetObjectShell(); + if ( pDoc && pDoc->QueryHiddenInformation( + WhenSaving, &GetViewFrame()->GetWindow() ) != RET_YES ) + break; - if ( SvtInternalOptions().MailUIEnabled() ) + if ( SvtInternalOptions().MailUIEnabled() ) { GetViewFrame()->SetChildWindow( SID_MAIL_CHILDWIN, TRUE ); } else { - SfxMailModel aModel; + SfxMailModel aModel; rtl::OUString aDocType; - SFX_REQUEST_ARG(rReq, pMailSubject, SfxStringItem, SID_MAIL_SUBJECT, FALSE ); - if ( pMailSubject ) - aModel.SetSubject( pMailSubject->GetValue() ); + SFX_REQUEST_ARG(rReq, pMailSubject, SfxStringItem, SID_MAIL_SUBJECT, FALSE ); + if ( pMailSubject ) + aModel.SetSubject( pMailSubject->GetValue() ); - SFX_REQUEST_ARG(rReq, pMailRecipient, SfxStringItem, SID_MAIL_RECIPIENT, FALSE ); - if ( pMailRecipient ) - { - String aRecipient( pMailRecipient->GetValue() ); - String aMailToStr( String::CreateFromAscii( "mailto:" )); + SFX_REQUEST_ARG(rReq, pMailRecipient, SfxStringItem, SID_MAIL_RECIPIENT, FALSE ); + if ( pMailRecipient ) + { + String aRecipient( pMailRecipient->GetValue() ); + String aMailToStr( String::CreateFromAscii( "mailto:" )); - if ( aRecipient.Search( aMailToStr ) == 0 ) - aRecipient = aRecipient.Erase( 0, aMailToStr.Len() ); - aModel.AddAddress( aRecipient, SfxMailModel::ROLE_TO ); - } + if ( aRecipient.Search( aMailToStr ) == 0 ) + aRecipient = aRecipient.Erase( 0, aMailToStr.Len() ); + aModel.AddAddress( aRecipient, SfxMailModel::ROLE_TO ); + } SFX_REQUEST_ARG(rReq, pMailDocType, SfxStringItem, SID_TYPE_NAME, FALSE ); if ( pMailDocType ) aDocType = pMailDocType->GetValue(); uno::Reference < frame::XFrame > xFrame( pFrame->GetFrame().GetFrameInterface() ); - SfxMailModel::SendMailResult eResult = SfxMailModel::SEND_MAIL_ERROR; + SfxMailModel::SendMailResult eResult = SfxMailModel::SEND_MAIL_ERROR; if ( nId == SID_MAIL_SENDDOC ) - eResult = aModel.SaveAndSend( xFrame, rtl::OUString() ); - else - if ( nId == SID_MAIL_SENDDOCASPDF ) + eResult = aModel.SaveAndSend( xFrame, rtl::OUString() ); + else + if ( nId == SID_MAIL_SENDDOCASPDF ) eResult = aModel.SaveAndSend( xFrame, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "pdf_Portable_Document_Format" ))); else - if ( nId == SID_MAIL_SENDDOCASMS ) + if ( nId == SID_MAIL_SENDDOCASMS ) { aDocType = impl_searchFormatTypeForApp(xFrame, E_MS_DOC); if (aDocType.getLength() > 0) eResult = aModel.SaveAndSend( xFrame, aDocType ); } else - if ( nId == SID_MAIL_SENDDOCASOOO ) + if ( nId == SID_MAIL_SENDDOCASOOO ) { aDocType = impl_searchFormatTypeForApp(xFrame, E_OOO_DOC); if (aDocType.getLength() > 0) eResult = aModel.SaveAndSend( xFrame, aDocType ); } - if ( eResult == SfxMailModel::SEND_MAIL_ERROR ) - { - InfoBox aBox( SFX_APP()->GetTopWindow(), SfxResId( MSG_ERROR_SEND_MAIL )); - aBox.Execute(); + if ( eResult == SfxMailModel::SEND_MAIL_ERROR ) + { + InfoBox aBox( SFX_APP()->GetTopWindow(), SfxResId( MSG_ERROR_SEND_MAIL )); + aBox.Execute(); rReq.Ignore(); - } + } else rReq.Done(); - } + } - break; - } + break; + } - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - case SID_WEBHTML: - { + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + case SID_WEBHTML: + { static const char HTML_DOCUMENT_TYPE[] = "writer_web_HTML"; static const char HTML_GRAPHIC_TYPE[] = "graphic_HTML"; const sal_Int32 FILTERFLAG_EXPORT = 0x00000002; @@ -657,25 +717,25 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq ) ::rtl::OUString::createFromAscii( "com.sun.star.system.SystemShellExecute" )), css::uno::UNO_QUERY ); - BOOL bRet( TRUE ); + BOOL bRet( TRUE ); if ( xSystemShellExecute.is() ) { try { - xSystemShellExecute->execute( - aFileURL, ::rtl::OUString(), SystemShellExecuteFlags::DEFAULTS ); + xSystemShellExecute->execute( + aFileURL, ::rtl::OUString(), SystemShellExecuteFlags::DEFAULTS ); } catch ( uno::Exception& ) { - vos::OGuard aGuard( Application::GetSolarMutex() ); + vos::OGuard aGuard( Application::GetSolarMutex() ); Window *pParent = SFX_APP()->GetTopWindow(); - ErrorBox( pParent, SfxResId( MSG_ERROR_NO_WEBBROWSER_FOUND )).Execute(); + ErrorBox( pParent, SfxResId( MSG_ERROR_NO_WEBBROWSER_FOUND )).Execute(); bRet = FALSE; } } rReq.Done(bRet); - break; + break; } else { @@ -685,97 +745,97 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq ) } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - case SID_PLUGINS_ACTIVE: - { - SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, nId, FALSE); + case SID_PLUGINS_ACTIVE: + { + SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, nId, FALSE); bool const bActive = (pShowItem) ? pShowItem->GetValue() : !pImp->m_bPlugInsActive; - // ggf. recorden - if ( !rReq.IsAPI() ) - rReq.AppendItem( SfxBoolItem( nId, bActive ) ); + // ggf. recorden + if ( !rReq.IsAPI() ) + rReq.AppendItem( SfxBoolItem( nId, bActive ) ); - // Jetzt schon DONE aufrufen, da die Argumente evtl. einen Pool - // benutzen, der demn"achst weg ist - rReq.Done(TRUE); + // Jetzt schon DONE aufrufen, da die Argumente evtl. einen Pool + // benutzen, der demn"achst weg ist + rReq.Done(TRUE); - // ausfuehren + // ausfuehren if (!pShowItem || (bActive != pImp->m_bPlugInsActive)) - { - SfxFrame* pTopFrame = &GetFrame()->GetTopFrame(); - if ( pTopFrame != &GetFrame()->GetFrame() ) - { - // FramesetDocument - SfxViewShell *pShell = pTopFrame->GetCurrentViewFrame()->GetViewShell(); - if ( pShell->GetInterface()->GetSlot( nId ) ) - pShell->ExecuteSlot( rReq ); - break; - } - - SfxFrameIterator aIter( *pTopFrame ); - while ( pTopFrame ) - { - if ( pTopFrame->GetCurrentViewFrame() ) - { - SfxViewShell *pView = pTopFrame->GetCurrentViewFrame()->GetViewShell(); - if ( pView ) { + SfxFrame* pTopFrame = &GetFrame()->GetTopFrame(); + if ( pTopFrame != &GetFrame()->GetFrame() ) + { + // FramesetDocument + SfxViewShell *pShell = pTopFrame->GetCurrentViewFrame()->GetViewShell(); + if ( pShell->GetInterface()->GetSlot( nId ) ) + pShell->ExecuteSlot( rReq ); + break; + } + + SfxFrameIterator aIter( *pTopFrame ); + while ( pTopFrame ) + { + if ( pTopFrame->GetCurrentViewFrame() ) + { + SfxViewShell *pView = pTopFrame->GetCurrentViewFrame()->GetViewShell(); + if ( pView ) + { pView->pImp->m_bPlugInsActive = bActive; Rectangle aVisArea = GetObjectShell()->GetVisArea(); VisAreaChanged(aVisArea); - // the plugins might need change in their state - SfxInPlaceClientList *pClients = pView->GetIPClientList_Impl(FALSE); - if ( pClients ) - { - for (USHORT n=0; n < pClients->Count(); n++) - { - SfxInPlaceClient* pIPClient = pClients->GetObject(n); - if ( pIPClient ) - pView->CheckIPClient_Impl( pIPClient, aVisArea ); + // the plugins might need change in their state + SfxInPlaceClientList *pClients = pView->GetIPClientList_Impl(FALSE); + if ( pClients ) + { + for (USHORT n=0; n < pClients->Count(); n++) + { + SfxInPlaceClient* pIPClient = pClients->GetObject(n); + if ( pIPClient ) + pView->CheckIPClient_Impl( pIPClient, aVisArea ); + } + } + } + } + + if ( !pTopFrame->GetParentFrame() ) + pTopFrame = aIter.FirstFrame(); + else + pTopFrame = aIter.NextFrame( *pTopFrame ); } - } } - } - if ( !pTopFrame->GetParentFrame() ) - pTopFrame = aIter.FirstFrame(); - else - pTopFrame = aIter.NextFrame( *pTopFrame ); + break; } - } - - break; } - } } //-------------------------------------------------------------------- void SfxViewShell::GetState_Impl( SfxItemSet &rSet ) { - DBG_CHKTHIS(SfxViewShell, 0); + DBG_CHKTHIS(SfxViewShell, 0); - SfxWhichIter aIter( rSet ); - for ( USHORT nSID = aIter.FirstWhich(); nSID; nSID = aIter.NextWhich() ) - { - switch ( nSID ) + SfxWhichIter aIter( rSet ); + for ( USHORT nSID = aIter.FirstWhich(); nSID; nSID = aIter.NextWhich() ) { - case SID_STYLE_CATALOG: - { + switch ( nSID ) + { + case SID_STYLE_CATALOG: + { if ( !GetViewFrame()->KnowsChildWindow( SID_STYLE_DESIGNER ) ) - rSet.DisableItem( nSID ); - break; - } + rSet.DisableItem( nSID ); + break; + } - // Printer-Funktionen - case SID_PRINTDOC: - case SID_PRINTDOCDIRECT: - case SID_SETUPPRINTER: - case SID_PRINTER_NAME: - { + // Printer-Funktionen + case SID_PRINTDOC: + case SID_PRINTDOCDIRECT: + case SID_SETUPPRINTER: + case SID_PRINTER_NAME: + { bool bEnabled = pImp->m_bCanPrint && !pImp->m_nPrinterLocks; - bEnabled = bEnabled && !Application::GetSettings().GetMiscSettings().GetDisablePrinting(); + bEnabled = bEnabled && !Application::GetSettings().GetMiscSettings().GetDisablePrinting(); if ( bEnabled ) { SfxPrinter *pPrinter = GetPrinter(FALSE); @@ -804,68 +864,68 @@ void SfxViewShell::GetState_Impl( SfxItemSet &rSet ) } bEnabled = !pPrinter || !pPrinter->IsPrinting(); } - if ( !bEnabled ) - { - // will now be handled by requeing the request - /* rSet.DisableItem( SID_PRINTDOC ); - rSet.DisableItem( SID_PRINTDOCDIRECT ); - rSet.DisableItem( SID_SETUPPRINTER ); */ - } - break; - } + if ( !bEnabled ) + { + // will now be handled by requeing the request + /* rSet.DisableItem( SID_PRINTDOC ); + rSet.DisableItem( SID_PRINTDOCDIRECT ); + rSet.DisableItem( SID_SETUPPRINTER ); */ + } + break; + } - // Mail-Funktionen - case SID_MAIL_SENDDOCASPDF: - case SID_MAIL_SENDDOC: + // Mail-Funktionen + case SID_MAIL_SENDDOCASPDF: + case SID_MAIL_SENDDOC: case SID_MAIL_SENDDOCASFORMAT: - { + { BOOL bEnable = !GetViewFrame()->HasChildWindow( SID_MAIL_CHILDWIN ); - if ( !bEnable ) - rSet.DisableItem( nSID ); - break; - } + if ( !bEnable ) + rSet.DisableItem( nSID ); + break; + } - // PlugIns running - case SID_PLUGINS_ACTIVE: - { + // PlugIns running + case SID_PLUGINS_ACTIVE: + { rSet.Put( SfxBoolItem( SID_PLUGINS_ACTIVE, !pImp->m_bPlugInsActive) ); - break; - } + break; + } /* - // SelectionText - case SID_SELECTION_TEXT: - { - rSet.Put( SfxStringItem( SID_SELECTION_TEXT, GetSelectionText() ) ); - break; - } + // SelectionText + case SID_SELECTION_TEXT: + { + rSet.Put( SfxStringItem( SID_SELECTION_TEXT, GetSelectionText() ) ); + break; + } - // SelectionTextExt - case SID_SELECTION_TEXT_EXT: - { - rSet.Put( SfxStringItem( SID_SELECTION_TEXT_EXT, GetSelectionText(TRUE) ) ); - break; - } + // SelectionTextExt + case SID_SELECTION_TEXT_EXT: + { + rSet.Put( SfxStringItem( SID_SELECTION_TEXT_EXT, GetSelectionText(TRUE) ) ); + break; + } */ - case SID_STYLE_FAMILY : - { + case SID_STYLE_FAMILY : + { rSet.Put( SfxUInt16Item( SID_STYLE_FAMILY, pImp->m_nFamily ) ); - break; - } + break; + } + } } - } } //-------------------------------------------------------------------- void SfxViewShell::SetZoomFactor( const Fraction &rZoomX, - const Fraction &rZoomY ) + const Fraction &rZoomY ) { - DBG_ASSERT( GetWindow(), "no window" ); - MapMode aMap( GetWindow()->GetMapMode() ); - aMap.SetScaleX( rZoomX ); - aMap.SetScaleY( rZoomY ); - GetWindow()->SetMapMode( aMap ); + DBG_ASSERT( GetWindow(), "no window" ); + MapMode aMap( GetWindow()->GetMapMode() ); + aMap.SetScaleX( rZoomX ); + aMap.SetScaleY( rZoomY ); + GetWindow()->SetMapMode( aMap ); } //-------------------------------------------------------------------- @@ -873,37 +933,37 @@ ErrCode SfxViewShell::DoVerb(long /*nVerb*/) /* [Beschreibung] - Virtuelle Methode, um am selektierten Objekt ein Verb auszuf"uhren. + Virtuelle Methode, um am selektierten Objekt ein Verb auszuf"uhren. Da dieses Objekt nur den abgeleiteten Klassen bekannt ist, muss DoVerb dort "uberschrieben werden. */ { - return ERRCODE_SO_NOVERBS; + return ERRCODE_SO_NOVERBS; } //-------------------------------------------------------------------- void SfxViewShell::OutplaceActivated( sal_Bool bActive, SfxInPlaceClient* /*pClient*/ ) { - if ( !bActive ) - GetFrame()->GetFrame().Appear(); + if ( !bActive ) + GetFrame()->GetFrame().Appear(); } //-------------------------------------------------------------------- void SfxViewShell::InplaceActivating( SfxInPlaceClient* /*pClient*/ ) { - // TODO/LATER: painting of the bitmap can be stopped, it is required if CLIPCHILDREN problem #i25788# is not solved, - // but may be the bug will not affect the real office vcl windows, then it is not required + // TODO/LATER: painting of the bitmap can be stopped, it is required if CLIPCHILDREN problem #i25788# is not solved, + // but may be the bug will not affect the real office vcl windows, then it is not required } //-------------------------------------------------------------------- void SfxViewShell::InplaceDeactivated( SfxInPlaceClient* /*pClient*/ ) { - // TODO/LATER: paint the replacement image in normal way if the painting was stopped + // TODO/LATER: paint the replacement image in normal way if the painting was stopped } //-------------------------------------------------------------------- @@ -943,26 +1003,26 @@ SfxInPlaceClient* SfxViewShell::FindIPClient ) const { SfxInPlaceClientList *pClients = GetIPClientList_Impl(FALSE); - if ( !pClients ) - return 0; + if ( !pClients ) + return 0; - if( !pObjParentWin ) - pObjParentWin = GetWindow(); - for (USHORT n=0; n < pClients->Count(); n++) - { - SfxInPlaceClient *pIPClient = (SfxInPlaceClient*) pClients->GetObject(n); + if( !pObjParentWin ) + pObjParentWin = GetWindow(); + for (USHORT n=0; n < pClients->Count(); n++) + { + SfxInPlaceClient *pIPClient = (SfxInPlaceClient*) pClients->GetObject(n); if ( pIPClient->GetObject() == xObj && pIPClient->GetEditWin() == pObjParentWin ) - return pIPClient; - } + return pIPClient; + } - return 0; + return 0; } //-------------------------------------------------------------------- SfxInPlaceClient* SfxViewShell::GetIPClient() const { - return GetUIActiveClient(); + return GetUIActiveClient(); } //-------------------------------------------------------------------- @@ -971,15 +1031,15 @@ SfxInPlaceClient* SfxViewShell::GetUIActiveIPClient_Impl() const { // this method is needed as long as SFX still manages the border space for ChildWindows (see SfxFrame::Resize) SfxInPlaceClientList *pClients = GetIPClientList_Impl(FALSE); - if ( !pClients ) - return 0; + if ( !pClients ) + return 0; - for (USHORT n=0; n < pClients->Count(); n++) - { + for (USHORT n=0; n < pClients->Count(); n++) + { SfxInPlaceClient* pIPClient = pClients->GetObject(n); if ( pIPClient->IsUIActive() ) return pIPClient; - } + } return NULL; } @@ -987,15 +1047,15 @@ SfxInPlaceClient* SfxViewShell::GetUIActiveIPClient_Impl() const SfxInPlaceClient* SfxViewShell::GetUIActiveClient() const { SfxInPlaceClientList *pClients = GetIPClientList_Impl(FALSE); - if ( !pClients ) - return 0; + if ( !pClients ) + return 0; - for (USHORT n=0; n < pClients->Count(); n++) - { + for (USHORT n=0; n < pClients->Count(); n++) + { SfxInPlaceClient* pIPClient = pClients->GetObject(n); if ( pIPClient->IsObjectUIActive() ) return pIPClient; - } + } return NULL; } @@ -1004,34 +1064,34 @@ SfxInPlaceClient* SfxViewShell::GetUIActiveClient() const void SfxViewShell::Activate( BOOL bMDI ) { - DBG_CHKTHIS(SfxViewShell, 0); - if ( bMDI ) - { - SfxObjectShell *pSh = GetViewFrame()->GetObjectShell(); - if ( pSh->GetModel().is() ) - pSh->GetModel()->setCurrentController( GetViewFrame()->GetFrame().GetController() ); + DBG_CHKTHIS(SfxViewShell, 0); + if ( bMDI ) + { + SfxObjectShell *pSh = GetViewFrame()->GetObjectShell(); + if ( pSh->GetModel().is() ) + pSh->GetModel()->setCurrentController( GetViewFrame()->GetFrame().GetController() ); SetCurrentDocument(); - } + } } //-------------------------------------------------------------------- void SfxViewShell::Deactivate(BOOL /*bMDI*/) { - DBG_CHKTHIS(SfxViewShell, 0); + DBG_CHKTHIS(SfxViewShell, 0); } //-------------------------------------------------------------------- void SfxViewShell::AdjustPosSizePixel ( - const Point& /*rToolOffset*/,// linke obere Ecke der Tools im Frame-Window - const Size& /*rSize*/ // gesamte zur Verf"ugung stehende Gr"o\se + const Point& /*rToolOffset*/,// linke obere Ecke der Tools im Frame-Window + const Size& /*rSize*/ // gesamte zur Verf"ugung stehende Gr"o\se ) { - DBG_CHKTHIS(SfxViewShell, 0); + DBG_CHKTHIS(SfxViewShell, 0); } //-------------------------------------------------------------------- @@ -1040,18 +1100,18 @@ void SfxViewShell::Move() /* [Beschreibung] - Diese virtuelle Methode wird gerufen, wenn das Fenster, in dem die - SfxViewShell dargestellt wird eine StarView-Move() Nachricht erh"alt. + Diese virtuelle Methode wird gerufen, wenn das Fenster, in dem die + SfxViewShell dargestellt wird eine StarView-Move() Nachricht erh"alt. - Die Basisimplementierung braucht nicht gerufen zu werden. + Die Basisimplementierung braucht nicht gerufen zu werden. - [Anmerkung] + [Anmerkung] - Diese Methode kann dazu verwendet werden, eine Selektion abzubrechen, - um durch das Moven des Fensters erzeugte Maus-Bewegungen anzufangen. + Diese Methode kann dazu verwendet werden, eine Selektion abzubrechen, + um durch das Moven des Fensters erzeugte Maus-Bewegungen anzufangen. - Zur Zeit funktioniert die Benachrichtigung nicht In-Place. + Zur Zeit funktioniert die Benachrichtigung nicht In-Place. */ { @@ -1061,102 +1121,102 @@ void SfxViewShell::Move() void SfxViewShell::OuterResizePixel ( - const Point& /*rToolOffset*/,// linke obere Ecke der Tools im Frame-Window - const Size& /*rSize*/ // gesamte zur Verf"ugung stehende Gr"o\se + const Point& /*rToolOffset*/,// linke obere Ecke der Tools im Frame-Window + const Size& /*rSize*/ // gesamte zur Verf"ugung stehende Gr"o\se ) /* [Beschreibung] Diese Methode muss ueberladen werden, um auf "Anderungen der Groesse - der View zu reagieren. Dabei definieren wir die View als das Edit-Window - zuz"uglich der um das Edit-Window angeordnenten Tools (z.B. Lineale). + der View zu reagieren. Dabei definieren wir die View als das Edit-Window + zuz"uglich der um das Edit-Window angeordnenten Tools (z.B. Lineale). - Das Edit-Window darf weder in Gr"o\se noch Position ver"andert werden. + Das Edit-Window darf weder in Gr"o\se noch Position ver"andert werden. - Die Vis-Area der SfxObjectShell, dessen Skalierung und Position - d"urfen hier ver"andert werden. Der Hauptanwendungsfall ist dabei, - das Ver"andern der Gr"o\se der Vis-Area. + Die Vis-Area der SfxObjectShell, dessen Skalierung und Position + d"urfen hier ver"andert werden. Der Hauptanwendungsfall ist dabei, + das Ver"andern der Gr"o\se der Vis-Area. - "Andert sich durch die neue Berechnung der Border, so mu\s dieser - mit <SfxViewShell::SetBorderPixel(const SvBorder&)> gesetzt werden. - Erst nach Aufruf von 'SetBorderPixel' ist das Positionieren von - Tools erlaubt. + "Andert sich durch die neue Berechnung der Border, so mu\s dieser + mit <SfxViewShell::SetBorderPixel(const SvBorder&)> gesetzt werden. + Erst nach Aufruf von 'SetBorderPixel' ist das Positionieren von + Tools erlaubt. - [Beispiel] + [Beispiel] - void AppViewSh::OuterViewResizePixel( const Point &rOfs, const Size &rSz ) - { - // Tool-Positionen und Gr"o\sen von au\sen berechnen, NICHT setzen! - // (wegen folgender Border-Berechnung) - Point aHLinPos...; Size aHLinSz...; - ... - - // Border f"ur Tools passend zu rSize berechnen und setzen - SvBorder aBorder... - SetBorderPixel( aBorder ); // ab jetzt sind Positionierungen erlaubt - - // Tools anordnen - pHLin->SetPosSizePixel( aHLinPos, aHLinSz ); - ... - } + void AppViewSh::OuterViewResizePixel( const Point &rOfs, const Size &rSz ) + { + // Tool-Positionen und Gr"o\sen von au\sen berechnen, NICHT setzen! + // (wegen folgender Border-Berechnung) + Point aHLinPos...; Size aHLinSz...; + ... + + // Border f"ur Tools passend zu rSize berechnen und setzen + SvBorder aBorder... + SetBorderPixel( aBorder ); // ab jetzt sind Positionierungen erlaubt + + // Tools anordnen + pHLin->SetPosSizePixel( aHLinPos, aHLinSz ); + ... + } - [Querverweise] + [Querverweise] - <SfxViewShell::InnerResizePixel(const Point&,const Size& rSize)> + <SfxViewShell::InnerResizePixel(const Point&,const Size& rSize)> */ { - DBG_CHKTHIS(SfxViewShell, 0); - SetBorderPixel( SvBorder() ); + DBG_CHKTHIS(SfxViewShell, 0); + SetBorderPixel( SvBorder() ); } //-------------------------------------------------------------------- void SfxViewShell::InnerResizePixel ( - const Point& /*rToolOffset*/,// linke obere Ecke der Tools im Frame-Window - const Size& /*rSize*/ // dem Edit-Win zur Verf"ugung stehende Gr"o\se + const Point& /*rToolOffset*/,// linke obere Ecke der Tools im Frame-Window + const Size& /*rSize*/ // dem Edit-Win zur Verf"ugung stehende Gr"o\se ) /* [Beschreibung] Diese Methode muss ueberladen werden, um auf "Anderungen der Groesse - des Edit-Windows zu reagieren. + des Edit-Windows zu reagieren. - Das Edit-Window darf weder in Gr"o\se noch Position ver"andert werden. - Weder die Vis-Area der SfxObjectShell noch dessen Skalierung oder - Position d"urfen ver"andert werden. + Das Edit-Window darf weder in Gr"o\se noch Position ver"andert werden. + Weder die Vis-Area der SfxObjectShell noch dessen Skalierung oder + Position d"urfen ver"andert werden. - "Andert sich durch die neue Berechnung der Border, so mu\s dieser - mit <SfxViewShell::SetBorderPixel(const SvBorder&)> gesetzt werden. - Erst nach Aufruf von 'SetBorderPixel' ist das Positionieren von - Tools erlaubt. + "Andert sich durch die neue Berechnung der Border, so mu\s dieser + mit <SfxViewShell::SetBorderPixel(const SvBorder&)> gesetzt werden. + Erst nach Aufruf von 'SetBorderPixel' ist das Positionieren von + Tools erlaubt. - [Beispiel] + [Beispiel] - void AppViewSh::InnerViewResizePixel( const Point &rOfs, const Size &rSz ) - { - // Tool-Positionen und Gr"o\sen von innen berechnen, NICHT setzen! - // (wegen folgender Border-Berechnung) - Point aHLinPos...; Size aHLinSz...; - ... - - // Border f"ur Tools passend zu rSz berechnen und setzen - SvBorder aBorder... - SetBorderPixel( aBorder ); // ab jetzt sind Positionierungen erlaubt - - // Tools anordnen - pHLin->SetPosSizePixel( aHLinPos, aHLinSz ); - ... - } + void AppViewSh::InnerViewResizePixel( const Point &rOfs, const Size &rSz ) + { + // Tool-Positionen und Gr"o\sen von innen berechnen, NICHT setzen! + // (wegen folgender Border-Berechnung) + Point aHLinPos...; Size aHLinSz...; + ... + + // Border f"ur Tools passend zu rSz berechnen und setzen + SvBorder aBorder... + SetBorderPixel( aBorder ); // ab jetzt sind Positionierungen erlaubt + + // Tools anordnen + pHLin->SetPosSizePixel( aHLinPos, aHLinSz ); + ... + } - [Querverweise] + [Querverweise] - <SfxViewShell::OuterResizePixel(const Point&,const Size& rSize)> + <SfxViewShell::OuterResizePixel(const Point&,const Size& rSize)> */ { @@ -1216,11 +1276,11 @@ void SfxViewShell::SetWindow /* [Beschreibung] - Mit dieser Methode wird der SfxViewShell das Datenfenster mitgeteilt. - Dieses wird f"ur den In-Place-Container und f"ur das korrekte - Wiederherstellen des Focus ben"otigt. + Mit dieser Methode wird der SfxViewShell das Datenfenster mitgeteilt. + Dieses wird f"ur den In-Place-Container und f"ur das korrekte + Wiederherstellen des Focus ben"otigt. - Selbst In-Place-aktiv ist das Umsetzen des ViewPort-Windows verboten. + Selbst In-Place-aktiv ist das Umsetzen des ViewPort-Windows verboten. */ { @@ -1245,9 +1305,9 @@ void SfxViewShell::SetWindow if ( bHadFocus && pWindow ) pWindow->GrabFocus(); - //TODO/CLEANUP - //brauchen wir die Methode doch noch?! - //SFX_APP()->GrabFocus( pWindow ); + //TODO/CLEANUP + //brauchen wir die Methode doch noch?! + //SFX_APP()->GrabFocus( pWindow ); } //-------------------------------------------------------------------- @@ -1262,18 +1322,17 @@ Size SfxViewShell::GetOptimalSizePixel() const SfxViewShell::SfxViewShell ( - SfxViewFrame* pViewFrame, /* <SfxViewFrame>, in dem diese View - dargestellt wird */ + SfxViewFrame* pViewFrame, /* <SfxViewFrame>, in dem diese View dargestellt wird */ USHORT nFlags /* siehe <SfxViewShell-Flags> */ ) : SfxShell(this) , pImp( new SfxViewShell_Impl(nFlags) ) - ,pIPClientList( 0 ) - ,pFrame(pViewFrame) - ,pSubShell(0) - ,pWindow(0) - ,bNoNewWindow( 0 != (nFlags & SFX_VIEW_NO_NEWWINDOW) ) + ,pIPClientList( 0 ) + ,pFrame(pViewFrame) + ,pSubShell(0) + ,pWindow(0) + ,bNoNewWindow( 0 != (nFlags & SFX_VIEW_NO_NEWWINDOW) ) { DBG_CTOR(SfxViewShell, 0); @@ -1382,12 +1441,12 @@ SfxViewShell* SfxViewShell::Get( const Reference< XController>& i_rController ) SdrView* SfxViewShell::GetDrawView() const -/* [Beschreibung] +/* [Beschreibung] - Diese virtuelle Methode mu\s von den Subklassen "uberladen werden, wenn - der Property-Editor zur Verf"ugung stehen soll. + Diese virtuelle Methode mu\s von den Subklassen "uberladen werden, wenn + der Property-Editor zur Verf"ugung stehen soll. - Die Default-Implementierung liefert immer 0. + Die Default-Implementierung liefert immer 0. */ { @@ -1398,27 +1457,27 @@ SdrView* SfxViewShell::GetDrawView() const String SfxViewShell::GetSelectionText ( - BOOL /*bCompleteWords*/ /* FALSE (default) - Nur der tats"achlich selektierte Text wird - zur"uckgegeben. - - TRUE - Der selektierte Text wird soweit erweitert, - da\s nur ganze W"orter zur"uckgegeben werden. - Als Worttrenner gelten White-Spaces und die + BOOL /*bCompleteWords*/ /* FALSE (default) + Nur der tats"achlich selektierte Text wird + zur"uckgegeben. + + TRUE + Der selektierte Text wird soweit erweitert, + da\s nur ganze W"orter zur"uckgegeben werden. + Als Worttrenner gelten White-Spaces und die Satzzeichen ".,;" sowie einfache und doppelte - Anf"uhrungszeichen. - */ + Anf"uhrungszeichen. + */ ) /* [Beschreibung] - Diese Methode kann von Anwendungsprogrammierer "uberladen werden, - um einen Text zur"uckzuliefern, der in der aktuellen Selektion - steht. Dieser wird z.B. beim Versenden (email) verwendet. + Diese Methode kann von Anwendungsprogrammierer "uberladen werden, + um einen Text zur"uckzuliefern, der in der aktuellen Selektion + steht. Dieser wird z.B. beim Versenden (email) verwendet. Mit "CompleteWords == TRUE" ger"ufen, reicht z.B. auch der Cursor, - der in einer URL steht, um die gesamte URL zu liefern. + der in einer URL steht, um die gesamte URL zu liefern. */ { @@ -1431,9 +1490,9 @@ BOOL SfxViewShell::HasSelection( BOOL ) const /* [Beschreibung] - Mit dieser virtuellen Methode kann z.B. ein Dialog abfragen, ob in der - aktuellen View etwas selektiert ist. Wenn der Parameter <BOOL> TRUE ist, - wird abgefragt, ob Text selektiert ist. + Mit dieser virtuellen Methode kann z.B. ein Dialog abfragen, ob in der + aktuellen View etwas selektiert ist. Wenn der Parameter <BOOL> TRUE ist, + wird abgefragt, ob Text selektiert ist. */ { @@ -1446,16 +1505,16 @@ void SfxViewShell::SetSubShell( SfxShell *pShell ) /* [Beschreibung] - Mit dieser Methode kann eine Selektions- oder Cursor-Shell angemeldet - werden, die automatisch unmittelbar nach der SfxViewShell auf den - SfxDispatcher gepusht wird, und automatisch umittelbar vor ihr - gepoppt wird. + Mit dieser Methode kann eine Selektions- oder Cursor-Shell angemeldet + werden, die automatisch unmittelbar nach der SfxViewShell auf den + SfxDispatcher gepusht wird, und automatisch umittelbar vor ihr + gepoppt wird. - Ist die SfxViewShell-Instanz bereits gepusht, dann wird pShell - sofort ebenfalls gepusht. Wird mit SetSubShell eine andere SfxShell - Instanz angemeldet, als vorher angemeldet war, wird die zuvor angemeldete - ggf. automatisch gepoppt. Mit pShell==0 kann daher die aktuelle - Sub-Shell abgemeldet werden. + Ist die SfxViewShell-Instanz bereits gepusht, dann wird pShell + sofort ebenfalls gepusht. Wird mit SetSubShell eine andere SfxShell + Instanz angemeldet, als vorher angemeldet war, wird die zuvor angemeldete + ggf. automatisch gepoppt. Mit pShell==0 kann daher die aktuelle + Sub-Shell abgemeldet werden. */ { @@ -1557,6 +1616,7 @@ void SfxViewShell::ReadUserData(const String&, BOOL ) void SfxViewShell::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool ) { } + void SfxViewShell::WriteUserDataSequence ( ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool ) { } @@ -1567,8 +1627,8 @@ void SfxViewShell::WriteUserDataSequence ( ::com::sun::star::uno::Sequence < ::c SfxViewShell* SfxViewShell::GetFirst ( - const TypeId* pType, - BOOL bOnlyVisible + const TypeId* pType, + BOOL bOnlyVisible ) { // search for a SfxViewShell of the specified type @@ -1702,24 +1762,24 @@ FASTBOOL SfxViewShell::KeyInput( const KeyEvent &rKeyEvent ) /* [Beschreibung] - Diese Methode f"uhrt das KeyEvent 'rKeyEvent' "uber die an dieser - SfxViewShell direkt oder indirekt (z.B. via Applikation) konfigurierten - Tasten (Accelerator) aus. + Diese Methode f"uhrt das KeyEvent 'rKeyEvent' "uber die an dieser + SfxViewShell direkt oder indirekt (z.B. via Applikation) konfigurierten + Tasten (Accelerator) aus. - [R"uckgabewert] + [R"uckgabewert] - FASTBOOL TRUE - die Taste ist konfiguriert, der betreffende - Handler wurde gerufen + FASTBOOL TRUE + die Taste ist konfiguriert, der betreffende + Handler wurde gerufen - FALSE - die Taste ist nicht konfiguriert, es konnte - also kein Handler gerufen werden + FALSE + die Taste ist nicht konfiguriert, es konnte + also kein Handler gerufen werden - [Querverweise] - <SfxApplication::KeyInput(const KeyEvent&)> + [Querverweise] + <SfxApplication::KeyInput(const KeyEvent&)> */ { return ExecKey_Impl(rKeyEvent); @@ -1736,9 +1796,9 @@ void SfxViewShell::ShowCursor( FASTBOOL /*bOn*/ ) /* [Beschreibung] - Diese Methode mu\s von Subklassen "uberladen werden, damit vom SFx - aus der Cursor ein- und ausgeschaltet werden kann. Dies geschieht - z.B. bei laufendem <SfxProgress>. + Diese Methode mu\s von Subklassen "uberladen werden, damit vom SFx + aus der Cursor ein- und ausgeschaltet werden kann. Dies geschieht + z.B. bei laufendem <SfxProgress>. */ { @@ -1750,15 +1810,15 @@ void SfxViewShell::GotFocus() const /* [Beschreibung] - Diese Methode mu\s vom Applikationsentwickler gerufen werden, wenn - das Edit-Window den Focus erhalten hat. Der SFx hat so z.B. die - M"oglichkeit, den Accelerator einzuschalten. + Diese Methode mu\s vom Applikationsentwickler gerufen werden, wenn + das Edit-Window den Focus erhalten hat. Der SFx hat so z.B. die + M"oglichkeit, den Accelerator einzuschalten. - [Anmerkung] + [Anmerkung] - <StarView> liefert leider keine M"oglichkeit, solche Events - 'von der Seite' einzuh"angen. + <StarView> liefert leider keine M"oglichkeit, solche Events + 'von der Seite' einzuh"angen. */ { @@ -1838,10 +1898,10 @@ void SfxViewShell::CheckIPClient_Impl( SfxInPlaceClient *pIPClient, const Rectan // this method is called when either a client is created or the "Edit/Plugins" checkbox is checked if ( !pIPClient->IsObjectInPlaceActive() && pImp->m_bPlugInsActive ) { - // object in client is currently not active - // check if the object wants to be activated always or when it becomes at least partially visible - // TODO/LATER: maybe we should use the scaled area instead of the ObjArea?! - if ( bAlwaysActive || (bActiveWhenVisible && rVisArea.IsOver(pIPClient->GetObjArea())) ) + // object in client is currently not active + // check if the object wants to be activated always or when it becomes at least partially visible + // TODO/LATER: maybe we should use the scaled area instead of the ObjArea?! + if ( bAlwaysActive || (bActiveWhenVisible && rVisArea.IsOver(pIPClient->GetObjArea())) ) { try { @@ -1854,11 +1914,11 @@ void SfxViewShell::CheckIPClient_Impl( SfxInPlaceClient *pIPClient, const Rectan } else if (!pImp->m_bPlugInsActive) { - // object in client is currently active and "Edit/Plugins" checkbox is selected - // check if the object wants to be activated always or when it becomes at least partially visible + // object in client is currently active and "Edit/Plugins" checkbox is selected + // check if the object wants to be activated always or when it becomes at least partially visible // in this case selecting of the "Edit/Plugin" checkbox should let such objects deactivate - if ( bAlwaysActive || bActiveWhenVisible ) - pIPClient->GetObject()->changeState( embed::EmbedStates::RUNNING ); + if ( bAlwaysActive || bActiveWhenVisible ) + pIPClient->GetObject()->changeState( embed::EmbedStates::RUNNING ); } } @@ -1874,9 +1934,9 @@ void SfxViewShell::DiscardClients_Impl() /* [Beschreibung] - Diese Methode dient dazu, vor dem Schlie\sen eines Dokuments das - Speichern der Objekte zu verhindern, wenn der Benutzer Schlie\en ohne - Speichern gew"ahlt hatte. + Diese Methode dient dazu, vor dem Schlie\sen eines Dokuments das + Speichern der Objekte zu verhindern, wenn der Benutzer Schlie\en ohne + Speichern gew"ahlt hatte. */ { @@ -1982,9 +2042,9 @@ void SfxViewShell::JumpToMark( const String& rMark ) { SfxStringItem aMarkItem( SID_JUMPTOMARK, rMark ); GetViewFrame()->GetDispatcher()->Execute( - SID_JUMPTOMARK, - SFX_CALLMODE_SYNCHRON|SFX_CALLMODE_RECORD, - &aMarkItem, 0L ); + SID_JUMPTOMARK, + SFX_CALLMODE_SYNCHRON|SFX_CALLMODE_RECORD, + &aMarkItem, 0L ); } //------------------------------------------------------------------------ @@ -2005,8 +2065,7 @@ void SfxViewShell::SetController( SfxBaseController* pController ) if ( pImp->xClipboardListener.is() ) pImp->xClipboardListener->DisconnectViewShell(); - pImp->xClipboardListener = new SfxClipboardChangeListener( this ); - AddRemoveClipboardListener( pImp->xClipboardListener.get(), TRUE ); + pImp->xClipboardListener = new SfxClipboardChangeListener( this, GetClipboardNotifier() ); } Reference < XController > SfxViewShell::GetController() @@ -2072,19 +2131,19 @@ void Change( Menu* pMenu, SfxViewShell* pView ) } -BOOL SfxViewShell::TryContextMenuInterception( Menu& rIn, const ::rtl::OUString& rMenuIdentifier, Menu*& rpOut, ::com::sun::star::ui::ContextMenuExecuteEvent aEvent ) +BOOL SfxViewShell::TryContextMenuInterception( Menu& rIn, const ::rtl::OUString& rMenuIdentifier, Menu*& rpOut, ui::ContextMenuExecuteEvent aEvent ) { rpOut = NULL; BOOL bModified = FALSE; // create container from menu - // #110897# + // #110897# // aEvent.ActionTriggerContainer = ::framework::ActionTriggerHelper::CreateActionTriggerContainerFromMenu( &rIn ); aEvent.ActionTriggerContainer = ::framework::ActionTriggerHelper::CreateActionTriggerContainerFromMenu( ::comphelper::getProcessServiceFactory(), &rIn, &rMenuIdentifier ); // get selection from controller - aEvent.Selection = ::com::sun::star::uno::Reference < ::com::sun::star::view::XSelectionSupplier > ( GetController(), ::com::sun::star::uno::UNO_QUERY ); + aEvent.Selection = uno::Reference < view::XSelectionSupplier > ( GetController(), uno::UNO_QUERY ); // call interceptors ::cppu::OInterfaceIteratorHelper aIt( pImp->aInterceptorContainer ); @@ -2092,22 +2151,22 @@ BOOL SfxViewShell::TryContextMenuInterception( Menu& rIn, const ::rtl::OUString& { try { - ::com::sun::star::ui::ContextMenuInterceptorAction eAction = - ((::com::sun::star::ui::XContextMenuInterceptor*)aIt.next())->notifyContextMenuExecute( aEvent ); + ui::ContextMenuInterceptorAction eAction = + ((ui::XContextMenuInterceptor*)aIt.next())->notifyContextMenuExecute( aEvent ); switch ( eAction ) { - case ::com::sun::star::ui::ContextMenuInterceptorAction_CANCELLED : + case ui::ContextMenuInterceptorAction_CANCELLED : // interceptor does not want execution return FALSE; - case ::com::sun::star::ui::ContextMenuInterceptorAction_EXECUTE_MODIFIED : + case ui::ContextMenuInterceptorAction_EXECUTE_MODIFIED : // interceptor wants his modified menu to be executed bModified = TRUE; break; - case ::com::sun::star::ui::ContextMenuInterceptorAction_CONTINUE_MODIFIED : + case ui::ContextMenuInterceptorAction_CONTINUE_MODIFIED : // interceptor has modified menu, but allows for calling other interceptors bModified = TRUE; continue; - case ::com::sun::star::ui::ContextMenuInterceptorAction_IGNORED : + case ui::ContextMenuInterceptorAction_IGNORED : // interceptor is indifferent continue; default: @@ -2115,7 +2174,7 @@ BOOL SfxViewShell::TryContextMenuInterception( Menu& rIn, const ::rtl::OUString& continue; } } - catch( ::com::sun::star::uno::RuntimeException& ) + catch( uno::RuntimeException& ) { aIt.remove(); } @@ -2154,8 +2213,8 @@ void SfxViewShell::CheckOwnerShip_Impl() BOOL bSuccess = FALSE; if (pImp->m_bGotOwnership) { - com::sun::star::uno::Reference < com::sun::star::util::XCloseable > xModel( - GetObjectShell()->GetModel(), com::sun::star::uno::UNO_QUERY ); + uno::Reference < util::XCloseable > xModel( + GetObjectShell()->GetModel(), uno::UNO_QUERY ); if ( xModel.is() ) { try @@ -2164,7 +2223,7 @@ void SfxViewShell::CheckOwnerShip_Impl() xModel->close( sal_True ); bSuccess = TRUE; } - catch ( com::sun::star::util::CloseVetoException& ) + catch ( util::CloseVetoException& ) { } } @@ -2173,15 +2232,15 @@ void SfxViewShell::CheckOwnerShip_Impl() if (!bSuccess && pImp->m_bGotFrameOwnership) { // document couldn't be closed or it shouldn't, now try at least to close the frame - com::sun::star::uno::Reference < com::sun::star::util::XCloseable > xFrame( - GetViewFrame()->GetFrame().GetFrameInterface(), com::sun::star::uno::UNO_QUERY ); + uno::Reference < util::XCloseable > xFrame( + GetViewFrame()->GetFrame().GetFrameInterface(), com::sun::star::uno::UNO_QUERY ); if ( xFrame.is() ) { try { xFrame->close( sal_True ); } - catch ( com::sun::star::util::CloseVetoException& ) + catch ( util::CloseVetoException& ) { } } @@ -2191,9 +2250,7 @@ void SfxViewShell::CheckOwnerShip_Impl() long SfxViewShell::HandleNotifyEvent_Impl( NotifyEvent& rEvent ) { if (pImp->m_pController.is()) - { return pImp->m_pController->HandleEvent_Impl( rEvent ); - } return 0; } @@ -2212,7 +2269,7 @@ BOOL SfxViewShell::HasMouseClickListeners_Impl() void SfxViewShell::SetAdditionalPrintOptions( const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >& rOpts ) { pImp->aPrintOpts = rOpts; -// GetObjectShell()->Broadcast( SfxPrintingHint( -3, NULL, NULL, rOpts ) ); +// GetObjectShell()->Broadcast( SfxPrintingHint( -3, NULL, NULL, rOpts ) ); } BOOL SfxViewShell::Escape() @@ -2228,11 +2285,20 @@ Reference< view::XRenderable > SfxViewShell::GetRenderable() { Reference< frame::XModel > xModel( pObj->GetModel() ); if( xModel.is() ) - xRender = Reference< view::XRenderable >( xModel, UNO_QUERY ); + xRender = Reference< view::XRenderable >( xModel, UNO_QUERY ); } return xRender; } +uno::Reference< datatransfer::clipboard::XClipboardNotifier > SfxViewShell::GetClipboardNotifier() +{ + uno::Reference< datatransfer::clipboard::XClipboardNotifier > xClipboardNotifier; + if ( GetViewFrame() ) + xClipboardNotifier = uno::Reference< datatransfer::clipboard::XClipboardNotifier >( GetViewFrame()->GetWindow().GetClipboard(), uno::UNO_QUERY ); + + return xClipboardNotifier; +} + void SfxViewShell::AddRemoveClipboardListener( const uno::Reference < datatransfer::clipboard::XClipboardListener >& rClp, BOOL bAdd ) { try diff --git a/sfx2/util/makefile.mk b/sfx2/util/makefile.mk deleted file mode 100644 index f520e2097e7e..000000000000 --- a/sfx2/util/makefile.mk +++ /dev/null @@ -1,172 +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=sfx2 -TARGET=sfx -#sfx.hid generieren -GEN_HID=TRUE -GEN_HID_OTHER=TRUE -USE_DEFFILE=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Allgemein ---------------------------------------------------- - -LIB1TARGET= $(SLB)$/$(TARGET).lib -LIB1FILES= $(SLB)$/appl.lib \ - $(SLB)$/explorer.lib \ - $(SLB)$/doc.lib \ - $(SLB)$/view.lib \ - $(SLB)$/control.lib \ - $(SLB)$/notify.lib \ - $(SLB)$/menu.lib \ - $(SLB)$/inet.lib \ - $(SLB)$/toolbox.lib \ - $(SLB)$/statbar.lib \ - $(SLB)$/dialog.lib \ - $(SLB)$/bastyp.lib \ - $(SLB)$/config.lib - -.IF "$(ENABLE_LAYOUT)" == "TRUE" -LIB1FILES += $(SLB)$/layout.lib -.ENDIF # ENABLE_LAYOUT == TRUE - -HELPIDFILES=\ - ..\inc\sfx2\sfxsids.hrc \ - ..\source\inc\helpid.hrc - -.IF "$(GUI)"!="UNX" -LIB2TARGET= $(LB)$/$(TARGET).lib -LIB2FILES= $(LB)$/isfx.lib -LIB2DEPN=$(SHL1TARGETN) -.ENDIF - -SHL1TARGET= sfx$(DLLPOSTFIX) -SHL1IMPLIB= isfx -SHL1USE_EXPORTS=name - -SHL1STDLIBS+=\ - $(FWELIB) \ - $(BASICLIB) \ - $(SVTOOLLIB) \ - $(TKLIB) \ - $(VCLLIB) \ - $(SVLLIB) \ - $(SOTLIB) \ - $(UNOTOOLSLIB) \ - $(TOOLSLIB) \ - $(I18NISOLANGLIB) \ - $(SAXLIB) \ - $(COMPHELPERLIB) \ - $(UCBHELPERLIB) \ - $(CPPUHELPERLIB) \ - $(CPPULIB) \ - $(VOSLIB) \ - $(SALLIB) \ - $(LIBXML2LIB) \ - - -.IF "$(GUI)"=="WNT" - -SHL1STDLIBS+=\ - $(UWINAPILIB) \ - $(ADVAPI32LIB) \ - $(SHELL32LIB) \ - $(GDI32LIB) \ - $(OLE32LIB) \ - $(UUIDLIB) -.ELSE # WNT -.IF "$(OS)" == "MACOSX" -SHL1STDLIBS+= -framework Cocoa -.ENDIF # MACOSX -.ENDIF # WNT - - -SHL1DEPN += $(shell @$(FIND) $(SLO) -type f -name "*.OBJ" -print) - -SHL1LIBS= $(LIB1TARGET) - -#SHL1OBJS= $(SLO)$/sfxdll.obj - -SHL1DEF= $(MISC)$/$(SHL1TARGET).def - -DEF1NAME =$(SHL1TARGET) -DEFLIB1NAME =sfx -DEF1DES =Sfx - -SFXSRSLIST=\ - $(SRS)$/appl.srs \ - $(SRS)$/sfx.srs \ - $(SRS)$/doc.srs \ - $(SRS)$/view.srs \ - $(SRS)$/menu.srs \ - $(SRS)$/dialog.srs \ - $(SRS)$/bastyp.srs - -RESLIB1NAME=$(TARGET) -RESLIB1IMAGES=$(PRJ)$/res -RESLIB1SRSFILES=$(SFXSRSLIST) - -# gtk quick-starter -.IF "$(GUI)"=="UNX" -.IF "$(ENABLE_SYSTRAY_GTK)"=="TRUE" -PKGCONFIG_MODULES=gtk+-2.0 -.INCLUDE: pkg_config.mk -CFLAGS+=$(PKGCONFIG_CFLAGS) - -SHL3TARGET=qstart_gtk$(DLLPOSTFIX) -SHL3LIBS=$(SLB)$/quickstart.lib -SHL3DEPN=$(SHL1IMPLIBN) $(SHL1TARGETN) -# libs for gtk plugin -SHL3STDLIBS=$(SHL1STDLIBS) $(SFX2LIB) $(EGGTRAYLIB) -SHL3STDLIBS+=$(PKGCONFIG_LIBS:s/ -lpangoxft-1.0//) -# hack for faked SO environment -.IF "$(PKGCONFIG_ROOT)"!="" -SHL3SONAME+=-z nodefs -SHL3NOCHECK=TRUE -.ENDIF # "$(PKGCONFIG_ROOT)"!="" -.ENDIF # "$(ENABLE_SYSTRAY_GTK)"=="TRUE" -.ENDIF # "$(GUI)"=="UNX" - -# --- Targets ------------------------------------------------------ - - -.INCLUDE : target.mk - -ALLTAR : $(MISC)/sfx.component - -$(MISC)/sfx.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ - sfx.component - $(XSLTPROC) --nonet --stringparam uri \ - '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ - $(SOLARENV)/bin/createcomponent.xslt sfx.component diff --git a/sfx2/workben/custompanel/makefile.mk b/sfx2/workben/custompanel/makefile.mk deleted file mode 100644 index 2a4704af499a..000000000000 --- a/sfx2/workben/custompanel/makefile.mk +++ /dev/null @@ -1,120 +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=sfx2 - -TARGET=custompanel -ENABLE_EXCEPTIONS=TRUE -LIBTARGET=NO -EXTENSIONNAME:=custom-tool-panel - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -#------------------------------------------------------------------- - -#---- extension version -EXTENSION_VERSION_BASE=0.1 -.IF ( "$(CWS_WORK_STAMP)" == "" ) || ( "$(UPDATER)" == "YES" ) - EXTENSION_VERSION=$(EXTENSION_VERSION_BASE) -.ELSE - EXTENSION_VERSION=$(EXTENSION_VERSION_BASE).cws.$(CWS_WORK_STAMP) -.ENDIF - -#---- extension title package name -EXTENSION_TITLE=Custom Tool Panel Example -EXTENSION_ZIPNAME=$(EXTENSIONNAME)-$(EXTENSION_VERSION_BASE)-$(RTL_OS:l)-$(RTL_ARCH:l) - -#-------------------------------------------------- - -SHL1DLLPRE= -SHL1TARGET=$(TARGET).uno -LIB1TARGET=$(SLB)/$(SHL1TARGET).lib -LIB1OBJFILES= \ - $(SLO)/ctp_factory.obj \ - $(SLO)/ctp_services.obj \ - $(SLO)/ctp_panel.obj - -SHL1STDLIBS= \ - $(CPPULIB) \ - $(SALLIB) \ - $(SALHELPERLIB) \ - $(CPPUHELPERLIB) - -SHL1VERSIONMAP=$(SOLARSRC)/solenv/src/reg-component.map -SHL1LIBS= $(LIB1TARGET) -SHL1DEF= $(MISC)/$(SHL1TARGET).def -SHL1RPATH= OXT -DEF1NAME= $(SHL1TARGET) - -# create Extension ----------------------------- - -COMPONENT_CONFIGDEST=. - -COMPONENT_XCU = \ - $(EXTENSIONDIR)/WriterWindowState.xcu \ - $(EXTENSIONDIR)/CalcWindowState.xcu \ - $(EXTENSIONDIR)/DrawWindowState.xcu \ - $(EXTENSIONDIR)/ImpressWindowState.xcu \ - $(EXTENSIONDIR)/Factories.xcu - -COMPONENT_LIBRARIES = \ - $(EXTENSIONDIR)/$(SHL1TARGET)$(DLLPOST) - -COMPONENT_IMAGES= \ - $(EXTENSIONDIR)/panel.png - -# ........ dependencies for packaging the extension ........ -EXTENSION_PACKDEPS=makefile.mk $(COMPONENT_IMAGES) - -# --- Targets ------------------------------------------------------ -.INCLUDE : extension_pre.mk -.INCLUDE : target.mk -.INCLUDE : extension_post.mk - -$(EXTENSIONDIR)/%.png : ./%.png - @@-$(MKDIRHIER) $(@:d) - @$(COPY) $< $@ > $(NULLDEV) - -$(EXTENSIONDIR)/WriterWindowState.xcu: ./WriterWindowState.xcu - @@-$(MKDIRHIER) $(@:d) - $(COMMAND_ECHO)$(TYPE) ./WriterWindowState.xcu | sed s/UPDATED_IDENTIFIER/$(IMPLEMENTATION_IDENTIFIER)/ > $(EXTENSIONDIR)/WriterWindowState.xcu - -$(EXTENSIONDIR)/CalcWindowState.xcu: ./CalcWindowState.xcu - @@-$(MKDIRHIER) $(@:d) - $(COMMAND_ECHO)$(TYPE) ./CalcWindowState.xcu | sed s/UPDATED_IDENTIFIER/$(IMPLEMENTATION_IDENTIFIER)/ > $(EXTENSIONDIR)/CalcWindowState.xcu - -$(EXTENSIONDIR)/DrawWindowState.xcu: ./DrawWindowState.xcu - @@-$(MKDIRHIER) $(@:d) - $(COMMAND_ECHO)$(TYPE) ./DrawWindowState.xcu | sed s/UPDATED_IDENTIFIER/$(IMPLEMENTATION_IDENTIFIER)/ > $(EXTENSIONDIR)/DrawWindowState.xcu - -$(EXTENSIONDIR)/ImpressWindowState.xcu: ./ImpressWindowState.xcu - @@-$(MKDIRHIER) $(@:d) - $(COMMAND_ECHO)$(TYPE) ./ImpressWindowState.xcu | sed s/UPDATED_IDENTIFIER/$(IMPLEMENTATION_IDENTIFIER)/ > $(EXTENSIONDIR)/ImpressWindowState.xcu - |