summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
Diffstat (limited to 'svl')
-rw-r--r--svl/AllLangResTarget_svl.mk (renamed from svl/inc/makefile.mk)37
-rw-r--r--svl/Library_fsstorage.mk93
-rw-r--r--svl/Library_passwordcontainer.mk89
-rw-r--r--svl/Library_svl.mk203
-rw-r--r--svl/Makefile (renamed from svl/unx/source/svdde/makefile.mk)24
-rw-r--r--svl/Module_svl.mk (renamed from svl/source/filerec/makefile.mk)34
-rw-r--r--svl/Package_inc.mk129
-rw-r--r--svl/inc/svl/PasswordHelper.hxx (renamed from svl/inc/PasswordHelper.hxx)0
-rw-r--r--svl/inc/svl/adrparse.hxx (renamed from svl/inc/adrparse.hxx)0
-rw-r--r--svl/inc/svl/broadcast.hxx (renamed from svl/inc/broadcast.hxx)0
-rw-r--r--svl/inc/svl/cancel.hxx142
-rw-r--r--svl/inc/svl/cnclhint.hxx48
-rw-r--r--svl/inc/svl/cntnrsrt.hxx (renamed from svl/inc/cntnrsrt.hxx)0
-rw-r--r--svl/inc/svl/cntwids.hrc (renamed from svl/inc/cntwids.hrc)0
-rw-r--r--svl/inc/svl/converter.hxx (renamed from svl/inc/converter.hxx)0
-rw-r--r--svl/inc/svl/filenotation.hxx (renamed from svl/inc/filenotation.hxx)0
-rw-r--r--svl/inc/svl/folderrestriction.hxx (renamed from svl/inc/folderrestriction.hxx)0
-rw-r--r--svl/inc/svl/fstathelper.hxx (renamed from svl/inc/fstathelper.hxx)0
-rw-r--r--svl/inc/svl/inetdef.hxx (renamed from svl/inc/inetdef.hxx)0
-rw-r--r--svl/inc/svl/inetmsg.hxx (renamed from svl/inc/inetmsg.hxx)0
-rw-r--r--svl/inc/svl/inetstrm.hxx (renamed from svl/inc/inetstrm.hxx)0
-rw-r--r--svl/inc/svl/instrm.hxx (renamed from svl/inc/instrm.hxx)0
-rw-r--r--svl/inc/svl/itempool.hxx8
-rw-r--r--svl/inc/svl/listener.hxx (renamed from svl/inc/listener.hxx)0
-rw-r--r--svl/inc/svl/listeneriter.hxx (renamed from svl/inc/listeneriter.hxx)0
-rw-r--r--svl/inc/svl/lngmisc.hxx (renamed from svl/inc/lngmisc.hxx)3
-rw-r--r--svl/inc/svl/nfsymbol.hxx (renamed from svl/inc/nfsymbol.hxx)0
-rw-r--r--svl/inc/svl/numuno.hxx (renamed from svl/inc/numuno.hxx)0
-rw-r--r--svl/inc/svl/outstrm.hxx (renamed from svl/inc/outstrm.hxx)0
-rw-r--r--svl/inc/svl/pickerhelper.hxx (renamed from svl/inc/pickerhelper.hxx)0
-rw-r--r--svl/inc/svl/pickerhistory.hxx (renamed from svl/inc/pickerhistory.hxx)0
-rw-r--r--svl/inc/svl/pickerhistoryaccess.hxx (renamed from svl/inc/pickerhistoryaccess.hxx)0
-rw-r--r--svl/inc/svl/poolcach.hxx (renamed from svl/inc/poolcach.hxx)13
-rw-r--r--svl/inc/svl/poolitem.hxx5
-rw-r--r--svl/inc/svl/strmadpt.hxx (renamed from svl/inc/strmadpt.hxx)0
-rw-r--r--svl/inc/svl/stylepool.hxx (renamed from svl/inc/stylepool.hxx)0
-rw-r--r--svl/inc/svl/svarray.hxx264
-rw-r--r--svl/inc/svl/svstdarr.hxx36
-rw-r--r--svl/inc/svl/urihelper.hxx (renamed from svl/inc/urihelper.hxx)0
-rw-r--r--svl/inc/svl/urlbmk.hxx (renamed from svl/inc/urlbmk.hxx)0
-rw-r--r--svl/inc/svl/whiter.hxx (renamed from svl/inc/whiter.hxx)0
-rw-r--r--svl/inc/svl/xmlement.hxx (renamed from svl/inc/xmlement.hxx)0
-rw-r--r--svl/inc/svl/zforlist.hxx9
-rw-r--r--svl/prj/build.lst24
-rw-r--r--svl/prj/d.lst22
-rw-r--r--svl/prj/makefile.mk (renamed from svl/source/memtools/makefile.mk)26
-rw-r--r--svl/qa/complex/ConfigItems/CheckConfigItems.java129
-rw-r--r--svl/qa/complex/ConfigItems/helper/ConfigItemTest.cxx28
-rw-r--r--svl/qa/complex/ConfigItems/helper/makefile.mk73
-rw-r--r--svl/qa/complex/ConfigItems/makefile.mk83
-rw-r--r--svl/qa/complex/passwordcontainer/MasterPasswdHandler.java8
-rw-r--r--svl/qa/complex/passwordcontainer/PasswordContainerUnitTest.java81
-rw-r--r--svl/qa/complex/passwordcontainer/Test01.java10
-rw-r--r--svl/qa/complex/passwordcontainer/Test02.java11
-rw-r--r--svl/qa/complex/passwordcontainer/Test03.java12
-rw-r--r--svl/qa/complex/passwordcontainer/TestHelper.java14
-rw-r--r--svl/qa/complex/passwordcontainer/makefile.mk137
-rw-r--r--svl/qa/makefile.mk101
-rw-r--r--svl/source/config/makefile.mk52
-rw-r--r--svl/source/filepicker/makefile.mk47
-rw-r--r--svl/source/filepicker/pickerhelper.cxx99
-rw-r--r--svl/source/filepicker/pickerhistory.cxx4
-rw-r--r--svl/source/fsstor/fsfactory.cxx24
-rw-r--r--svl/source/fsstor/fsstorage.component35
-rw-r--r--svl/source/fsstor/makefile.mk66
-rw-r--r--svl/source/inc/poolio.hxx19
-rw-r--r--svl/source/items/itempool.cxx89
-rw-r--r--svl/source/items/itemset.cxx5
-rw-r--r--svl/source/items/makefile.mk84
-rw-r--r--svl/source/items/poolcach.cxx22
-rw-r--r--svl/source/items/poolio.cxx153
-rw-r--r--svl/source/items/stylepool.cxx2
-rw-r--r--svl/source/items/whassert.hxx2
-rw-r--r--svl/source/items/whiter.cxx4
-rw-r--r--svl/source/memtools/svarray.cxx14
-rw-r--r--svl/source/misc/PasswordHelper.cxx5
-rw-r--r--svl/source/misc/adrparse.cxx2
-rw-r--r--svl/source/misc/filenotation.cxx2
-rw-r--r--svl/source/misc/folderrestriction.cxx2
-rw-r--r--svl/source/misc/fstathelper.cxx3
-rw-r--r--svl/source/misc/lngmisc.cxx35
-rw-r--r--svl/source/misc/makefile.mk70
-rw-r--r--svl/source/misc/strmadpt.cxx6
-rw-r--r--svl/source/misc/svldata.cxx2
-rw-r--r--svl/source/misc/urihelper.cxx2
-rw-r--r--svl/source/notify/broadcast.cxx6
-rw-r--r--svl/source/notify/cancel.cxx201
-rw-r--r--svl/source/notify/listener.cxx11
-rw-r--r--svl/source/notify/listenerbase.cxx11
-rw-r--r--svl/source/notify/listeneriter.cxx8
-rw-r--r--svl/source/notify/makefile.mk62
-rw-r--r--svl/source/numbers/makefile.mk74
-rw-r--r--svl/source/numbers/nbdll.cxx79
-rw-r--r--svl/source/numbers/numfmuno.cxx2
-rw-r--r--svl/source/numbers/numuno.cxx2
-rw-r--r--svl/source/numbers/supservs.cxx4
-rw-r--r--svl/source/numbers/supservs.hxx2
-rw-r--r--svl/source/numbers/zforlist.cxx52
-rw-r--r--svl/source/numbers/zformat.cxx10
-rw-r--r--svl/source/numbers/zforscan.cxx2
-rw-r--r--svl/source/numbers/zforscan.hxx2
-rw-r--r--svl/source/passwordcontainer/makefile.mk62
-rw-r--r--svl/source/passwordcontainer/passwordcontainer.component34
-rw-r--r--svl/source/passwordcontainer/passwordcontainer.cxx18
-rw-r--r--svl/source/svdde/ddedata.cxx10
-rw-r--r--svl/source/svdde/ddedll.cxx64
-rw-r--r--svl/source/svdde/ddeml1.cxx2658
-rw-r--r--svl/source/svdde/ddeml2.cxx1011
-rw-r--r--svl/source/svdde/ddemldeb.cxx280
-rw-r--r--svl/source/svdde/ddemldeb.hxx66
-rw-r--r--svl/source/svdde/ddemlimp.hxx433
-rw-r--r--svl/source/svdde/ddemlos2.h374
-rw-r--r--svl/source/svdde/ddestrg.cxx4
-rw-r--r--svl/source/svdde/makefile.mk60
-rw-r--r--svl/source/svsql/converter.cxx2
-rw-r--r--svl/source/svsql/makefile.mk46
-rw-r--r--svl/source/undo/makefile.mk47
-rw-r--r--svl/source/uno/makefile.mk47
-rw-r--r--svl/source/uno/registerservices.cxx31
-rw-r--r--svl/util/makefile.mk122
-rw-r--r--svl/util/svl.component40
121 files changed, 1256 insertions, 7427 deletions
diff --git a/svl/inc/makefile.mk b/svl/AllLangResTarget_svl.mk
index a99cf8acc0d2..6759202a5fa4 100644
--- a/svl/inc/makefile.mk
+++ b/svl/AllLangResTarget_svl.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,36 @@
#
# 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=svl
-TARGET=inc
+$(eval $(call gb_AllLangResTarget_AllLangResTarget,svl))
-# --- Settings -----------------------------------------------------
+$(eval $(call gb_AllLangResTarget_add_srs,svl,\
+ svl/res \
+))
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/svl.pmk
+$(eval $(call gb_SrsTarget_SrsTarget,svl/res))
-# --- Files --------------------------------------------------------
-# --- Targets -------------------------------------------------------
+$(eval $(call gb_SrsTarget_set_include,svl/res,\
+ $$(INCLUDE) \
+ -I$(WORKDIR)/inc \
+ -I$(SRCDIR)/svl/source/inc \
+ -I$(SRCDIR)/svl/inc/ \
+ -I$(SRCDIR)/svl/inc/svl \
+))
-.INCLUDE : target.mk
+$(eval $(call gb_SrsTarget_add_files,svl/res,\
+ svl/source/misc/mediatyp.src \
+ svl/source/items/cstitem.src \
+))
-.IF "$(ENABLE_PCH)"!=""
-ALLTAR : \
- $(SLO)$/precompiled.pch \
- $(SLO)$/precompiled_ex.pch
-
-.ENDIF # "$(ENABLE_PCH)"!=""
diff --git a/svl/Library_fsstorage.mk b/svl/Library_fsstorage.mk
new file mode 100644
index 000000000000..93ca50a2d9f4
--- /dev/null
+++ b/svl/Library_fsstorage.mk
@@ -0,0 +1,93 @@
+#*************************************************************************
+#
+# 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,fsstorage))
+
+$(eval $(call gb_Library_set_componentfile,fsstorage,svl/source/fsstor/fsstorage))
+
+$(eval $(call gb_Library_set_include,fsstorage,\
+ $$(SOLARINC) \
+ -I$(WORKDIR)/inc/svl \
+ -I$(WORKDIR)/inc/ \
+ -I$(SRCDIR)/svl/inc \
+ -I$(SRCDIR)/svl/inc/svl \
+ -I$(SRCDIR)/svl/source/inc \
+ -I$(SRCDIR)/svl/inc/pch \
+ -I$(OUTDIR)/inc/offuh \
+ -I$(OUTDIR)/inc \
+))
+
+$(eval $(call gb_Library_add_linked_libs,fsstorage,\
+ comphelper \
+ cppu \
+ cppuhelper \
+ sal \
+ stl \
+ tl \
+ ucbhelper \
+ utl \
+))
+
+$(eval $(call gb_Library_add_linked_system_libs,fsstorage,\
+ dl \
+ icuuc \
+ m \
+ pthread \
+))
+
+$(eval $(call gb_Library_add_exception_objects,fsstorage,\
+ svl/source/fsstor/fsfactory \
+ svl/source/fsstor/fsstorage \
+ svl/source/fsstor/oinputstreamcontainer \
+ svl/source/fsstor/ostreamcontainer \
+))
+
+ifeq ($(OS),WNT)
+ifneq ($(USE_MINGW),)
+$(eval $(call gb_Library_add_linked_libs,fsstorage,\
+ mingwthrd \
+ $(gb_MINGW_LIBSTDCPP) \
+ mingw32 \
+ $(gb_MINGW_LIBGCC) \
+ uwinapi \
+ moldname \
+ mingwex \
+ kernel32 \
+ msvcrt \
+ user32 \
+))
+else
+$(eval $(call gb_Library_add_linked_libs,fsstorage,\
+ kernel32 \
+ msvcrt \
+ oldnames \
+ user32 \
+ uwinapi \
+))
+endif
+endif
+# vim: set noet sw=4 ts=4:
diff --git a/svl/Library_passwordcontainer.mk b/svl/Library_passwordcontainer.mk
new file mode 100644
index 000000000000..a0fbe88be93d
--- /dev/null
+++ b/svl/Library_passwordcontainer.mk
@@ -0,0 +1,89 @@
+#*************************************************************************
+#
+# 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,passwordcontainer))
+
+$(eval $(call gb_Library_set_componentfile,passwordcontainer,svl/source/passwordcontainer/passwordcontainer))
+
+$(eval $(call gb_Library_set_include,passwordcontainer,\
+ $$(SOLARINC) \
+ -I$(WORKDIR)/inc/svl \
+ -I$(WORKDIR)/inc/ \
+ -I$(SRCDIR)/svl/inc \
+ -I$(SRCDIR)/svl/inc/svl \
+ -I$(SRCDIR)/svl/source/inc \
+ -I$(SRCDIR)/svl/inc/pch \
+ -I$(OUTDIR)/inc/offuh \
+ -I$(OUTDIR)/inc \
+))
+
+$(eval $(call gb_Library_add_linked_libs,passwordcontainer,\
+ cppu \
+ cppuhelper \
+ sal \
+ stl \
+ ucbhelper \
+ utl \
+))
+
+$(eval $(call gb_Library_add_linked_system_libs,passwordcontainer,\
+ icuuc \
+ dl \
+ m \
+ pthread \
+))
+
+$(eval $(call gb_Library_add_exception_objects,passwordcontainer,\
+ svl/source/passwordcontainer/passwordcontainer \
+ svl/source/passwordcontainer/syscreds \
+))
+
+ifeq ($(OS),WNT)
+ifneq ($(USE_MINGW),)
+$(eval $(call gb_Library_add_linked_libs,passwordcontainer,\
+ mingwthrd \
+ $(gb_MINGW_LIBSTDCPP) \
+ mingw32 \
+ $(gb_MINGW_LIBGCC) \
+ uwinapi \
+ moldname \
+ mingwex \
+ kernel32 \
+ msvcrt \
+ user32 \
+))
+else
+$(eval $(call gb_Library_add_linked_libs,passwordcontainer,\
+ kernel32 \
+ msvcrt \
+ oldnames \
+ user32 \
+ uwinapi \
+))
+endif
+endif
+# vim: set noet sw=4 ts=4:
diff --git a/svl/Library_svl.mk b/svl/Library_svl.mk
new file mode 100644
index 000000000000..5181983b8bc1
--- /dev/null
+++ b/svl/Library_svl.mk
@@ -0,0 +1,203 @@
+#*************************************************************************
+#
+# 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,svl))
+
+$(eval $(call gb_Library_add_package_headers,svl,svl_inc))
+
+$(eval $(call gb_Library_add_precompiled_header,svl,$(SRCDIR)/svl/inc/pch/precompiled_svl))
+
+$(eval $(call gb_Library_set_componentfile,svl,svl/util/svl))
+
+$(eval $(call gb_Library_set_include,svl,\
+ $$(SOLARINC) \
+ -I$(WORKDIR)/inc/svl \
+ -I$(WORKDIR)/inc/ \
+ -I$(SRCDIR)/svl/inc \
+ -I$(SRCDIR)/svl/source/inc \
+ -I$(SRCDIR)/svl/inc/pch \
+ -I$(OUTDIR)/inc/offuh \
+ -I$(OUTDIR)/inc \
+))
+
+$(eval $(call gb_Library_set_defs,svl,\
+ $$(DEFS) \
+ -DSVL_DLLIMPLEMENTATION \
+))
+
+$(eval $(call gb_Library_add_linked_libs,svl,\
+ basegfx \
+ comphelper \
+ cppu \
+ cppuhelper \
+ i18nisolang1 \
+ i18nutil \
+ jvmfwk \
+ sal \
+ sot \
+ stl \
+ tl \
+ ucbhelper \
+ utl \
+ vos3 \
+))
+
+$(eval $(call gb_Library_add_linked_system_libs,svl,\
+ dl \
+ icuuc \
+ m \
+ pthread \
+))
+
+
+$(eval $(call gb_Library_add_exception_objects,svl,\
+ svl/inc/pch/precompiled_svl \
+ svl/source/config/asiancfg \
+ svl/source/config/cjkoptions \
+ svl/source/config/ctloptions \
+ svl/source/config/itemholder2 \
+ svl/source/config/languageoptions \
+ svl/source/config/srchcfg \
+ svl/source/filepicker/pickerhistory \
+ svl/source/filerec/filerec \
+ svl/source/items/aeitem \
+ svl/source/items/cenumitm \
+ svl/source/items/cintitem \
+ svl/source/items/cntwall \
+ svl/source/items/ctypeitm \
+ svl/source/items/custritm \
+ svl/source/items/dateitem \
+ svl/source/items/eitem \
+ svl/source/items/flagitem \
+ svl/source/items/globalnameitem \
+ svl/source/items/ilstitem \
+ svl/source/items/imageitm \
+ svl/source/items/intitem \
+ svl/source/items/itemiter \
+ svl/source/items/itempool \
+ svl/source/items/itemprop \
+ svl/source/items/itemset \
+ svl/source/items/lckbitem \
+ svl/source/items/macitem \
+ svl/source/items/poolcach \
+ svl/source/items/poolio \
+ svl/source/items/poolitem \
+ svl/source/items/ptitem \
+ svl/source/items/rectitem \
+ svl/source/items/rngitem \
+ svl/source/items/sfontitm \
+ svl/source/items/sitem \
+ svl/source/items/slstitm \
+ svl/source/items/srchitem \
+ svl/source/items/stritem \
+ svl/source/items/style \
+ svl/source/items/stylepool \
+ svl/source/items/szitem \
+ svl/source/items/visitem \
+ svl/source/items/whiter \
+ svl/source/memtools/svarray \
+ svl/source/misc/PasswordHelper \
+ svl/source/misc/adrparse \
+ svl/source/misc/documentlockfile \
+ svl/source/misc/filenotation \
+ svl/source/misc/folderrestriction \
+ svl/source/misc/fstathelper \
+ svl/source/misc/inethist \
+ svl/source/misc/inettype \
+ svl/source/misc/lngmisc \
+ svl/source/misc/lockfilecommon \
+ svl/source/misc/ownlist \
+ svl/source/misc/restrictedpaths \
+ svl/source/misc/sharecontrolfile \
+ svl/source/misc/strmadpt \
+ svl/source/misc/svldata \
+ svl/source/misc/urihelper \
+ svl/source/notify/brdcst \
+ svl/source/notify/broadcast \
+ svl/source/notify/hint \
+ svl/source/notify/isethint \
+ svl/source/notify/listener \
+ svl/source/notify/listenerbase \
+ svl/source/notify/listeneriter \
+ svl/source/notify/lstner \
+ svl/source/notify/smplhint \
+ svl/source/numbers/numfmuno \
+ svl/source/numbers/numhead \
+ svl/source/numbers/numuno \
+ svl/source/numbers/supservs \
+ svl/source/numbers/zforfind \
+ svl/source/numbers/zforlist \
+ svl/source/numbers/zformat \
+ svl/source/numbers/zforscan \
+ svl/source/svsql/converter \
+ svl/source/undo/undo \
+ svl/source/uno/pathservice \
+ svl/source/uno/registerservices \
+))
+
+ifeq ($(OS),WNT)
+$(eval $(call gb_Library_add_exception_objects,svl,\
+ svl/source/svdde/ddecli \
+ svl/source/svdde/ddedata \
+ svl/source/svdde/ddeinf \
+ svl/source/svdde/ddestrg \
+ svl/source/svdde/ddesvr \
+ svl/source/svdde/ddewrap \
+))
+
+ifneq ($(USE_MINGW),)
+$(eval $(call gb_Library_add_linked_libs,svl,\
+ mingwthrd \
+ $(gb_MINGW_LIBSTDCPP) \
+ mingw32 \
+ $(gb_MINGW_LIBGCC) \
+ uwinapi \
+ mingwex \
+ advapi32 \
+ kernel32 \
+ gdi32 \
+ msvcrt \
+ shell32 \
+ user32 \
+))
+else
+$(eval $(call gb_Library_add_linked_libs,svl,\
+ advapi32 \
+ kernel32 \
+ gdi32 \
+ msvcrt \
+ shell32 \
+ user32 \
+ uwinapi \
+))
+endif
+else
+$(eval $(call gb_Library_add_exception_objects,svl,\
+ svl/unx/source/svdde/ddedummy \
+))
+endif
+# vim: set noet sw=4 ts=4:
diff --git a/svl/unx/source/svdde/makefile.mk b/svl/Makefile
index 3d2ae4308821..a79aff831024 100644
--- a/svl/unx/source/svdde/makefile.mk
+++ b/svl/Makefile
@@ -25,22 +25,14 @@
#
#*************************************************************************
-PRJ=..$/..$/..
+ifeq ($(strip $(SOLARENV)),)
+$(error No environment set!)
+endif
-PRJNAME=svl
-TARGET=svdde
+gb_PARTIALBUILD := T
+GBUILDDIR := $(SOLARENV)/gbuild
+include $(GBUILDDIR)/gbuild.mk
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/svl.pmk
-
-# --- Files --------------------------------------------------------
-
-SLOFILES = \
- $(SLO)$/ddedummy.obj
-
-# --- Tagets -------------------------------------------------------
-
-.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/svl/source/filerec/makefile.mk b/svl/Module_svl.mk
index ea2b88d8d493..6bba7a0836f7 100644
--- a/svl/source/filerec/makefile.mk
+++ b/svl/Module_svl.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,33 +14,29 @@
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
+# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
#*************************************************************************
-PRJ=..$/..
+$(eval $(call gb_Module_Module,svl))
-PRJNAME=svl
-TARGET=filerec
+$(eval $(call gb_Module_add_targets,svl,\
+ AllLangResTarget_svl \
+ Library_fsstorage \
+ Library_passwordcontainer \
+ Library_svl \
+ Package_inc \
+))
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/svl.pmk
-
-# --- Files --------------------------------------------------------
-
-SLOFILES = \
- $(SLO)$/filerec.obj
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
+#todo: dde platform dependent
+#todo: package_inc
+#todo: map file
+# vim: set noet ts=4 sw=4:
diff --git a/svl/Package_inc.mk b/svl/Package_inc.mk
new file mode 100644
index 000000000000..888cdc38cfa6
--- /dev/null
+++ b/svl/Package_inc.mk
@@ -0,0 +1,129 @@
+#*************************************************************************
+#
+# 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,svl_inc,$(SRCDIR)/svl/inc))
+
+
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/PasswordHelper.hxx,svl/PasswordHelper.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/adrparse.hxx,svl/adrparse.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/aeitem.hxx,svl/aeitem.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/asiancfg.hxx,svl/asiancfg.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/brdcst.hxx,svl/brdcst.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/broadcast.hxx,svl/broadcast.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/broadcast.hxx,svl/broadcast.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/cenumitm.hxx,svl/cenumitm.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/cintitem.hxx,svl/cintitem.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/cjkoptions.hxx,svl/cjkoptions.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/cntnrsrt.hxx,svl/cntnrsrt.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/cntwall.hxx,svl/cntwall.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/cntwids.hrc,svl/cntwids.hrc))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/converter.hxx,svl/converter.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/ctloptions.hxx,svl/ctloptions.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/ctypeitm.hxx,svl/ctypeitm.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/custritm.hxx,svl/custritm.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/dateitem.hxx,svl/dateitem.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/documentlockfile.hxx,svl/documentlockfile.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/eitem.hxx,svl/eitem.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/filenotation.hxx,svl/filenotation.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/filerec.hxx,svl/filerec.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/flagitem.hxx,svl/flagitem.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/folderrestriction.hxx,svl/folderrestriction.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/fstathelper.hxx,svl/fstathelper.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/globalnameitem.hxx,svl/globalnameitem.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/hint.hxx,svl/hint.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/httpcook.hxx,svl/httpcook.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/ilstitem.hxx,svl/ilstitem.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/imageitm.hxx,svl/imageitm.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/inetdef.hxx,svl/inetdef.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/inethist.hxx,svl/inethist.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/inetmsg.hxx,svl/inetmsg.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/inetstrm.hxx,svl/inetstrm.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/inettype.hxx,svl/inettype.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/instrm.hxx,svl/instrm.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/intitem.hxx,svl/intitem.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/isethint.hxx,svl/isethint.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/itemiter.hxx,svl/itemiter.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/itempool.hxx,svl/itempool.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/itemprop.hxx,svl/itemprop.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/itemset.hxx,svl/itemset.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/languageoptions.hxx,svl/languageoptions.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/lckbitem.hxx,svl/lckbitem.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/listener.hxx,svl/listener.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/listeneriter.hxx,svl/listeneriter.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/lngmisc.hxx,svl/lngmisc.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/lockfilecommon.hxx,svl/lockfilecommon.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/lstner.hxx,svl/lstner.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/macitem.hxx,svl/macitem.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/mailenum.hxx,svl/mailenum.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/memberid.hrc,svl/memberid.hrc))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/metitem.hxx,svl/metitem.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/nfkeytab.hxx,svl/nfkeytab.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/nfsymbol.hxx,svl/nfsymbol.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/nfversi.hxx,svl/nfversi.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/nranges.hxx,svl/nranges.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/numuno.hxx,svl/numuno.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/ondemand.hxx,svl/ondemand.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/outstrm.hxx,svl/outstrm.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/ownlist.hxx,svl/ownlist.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/pickerhelper.hxx,svl/pickerhelper.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/pickerhistory.hxx,svl/pickerhistory.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/pickerhistoryaccess.hxx,svl/pickerhistoryaccess.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/poolcach.hxx,svl/poolcach.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/poolitem.hxx,svl/poolitem.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/ptitem.hxx,svl/ptitem.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/rectitem.hxx,svl/rectitem.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/restrictedpaths.hxx,svl/restrictedpaths.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/rngitem.hxx,svl/rngitem.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/sfontitm.hxx,svl/sfontitm.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/sharecontrolfile.hxx,svl/sharecontrolfile.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/slstitm.hxx,svl/slstitm.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/smplhint.hxx,svl/smplhint.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/solar.hrc,svl/solar.hrc))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/srchcfg.hxx,svl/srchcfg.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/srchdefs.hxx,svl/srchdefs.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/srchitem.hxx,svl/srchitem.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/stritem.hxx,svl/stritem.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/strmadpt.hxx,svl/strmadpt.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/style.hrc,svl/style.hrc))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/style.hxx,svl/style.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/stylepool.hxx,svl/stylepool.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/svarray.hxx,svl/svarray.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/svdde.hxx,svl/svdde.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/svl.hrc,svl/svl.hrc))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/svldata.hxx,svl/svldata.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/svldllapi.h,svl/svldllapi.h))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/svstdarr.hxx,svl/svstdarr.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/szitem.hxx,svl/szitem.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/undo.hxx,svl/undo.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/urihelper.hxx,svl/urihelper.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/urlbmk.hxx,svl/urlbmk.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/urlfilter.hxx,svl/urlfilter.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/visitem.hxx,svl/visitem.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/whiter.hxx,svl/whiter.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/xmlement.hxx,svl/xmlement.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/zforlist.hxx,svl/zforlist.hxx))
+$(eval $(call gb_Package_add_file,svl_inc,inc/svl/zformat.hxx,svl/zformat.hxx))
diff --git a/svl/inc/PasswordHelper.hxx b/svl/inc/svl/PasswordHelper.hxx
index da9bc5da99ea..da9bc5da99ea 100644
--- a/svl/inc/PasswordHelper.hxx
+++ b/svl/inc/svl/PasswordHelper.hxx
diff --git a/svl/inc/adrparse.hxx b/svl/inc/svl/adrparse.hxx
index f2a85b9cacd5..f2a85b9cacd5 100644
--- a/svl/inc/adrparse.hxx
+++ b/svl/inc/svl/adrparse.hxx
diff --git a/svl/inc/broadcast.hxx b/svl/inc/svl/broadcast.hxx
index 2acddb5e4f6b..2acddb5e4f6b 100644
--- a/svl/inc/broadcast.hxx
+++ b/svl/inc/svl/broadcast.hxx
diff --git a/svl/inc/svl/cancel.hxx b/svl/inc/svl/cancel.hxx
deleted file mode 100644
index d268044a611d..000000000000
--- a/svl/inc/svl/cancel.hxx
+++ /dev/null
@@ -1,142 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#ifndef _SFXCANCEL_HXX
-#define _SFXCANCEL_HXX
-
-#include "svl/svldllapi.h"
-#include <tools/string.hxx>
-#include <tools/ref.hxx>
-#include <svl/brdcst.hxx>
-#include <svl/smplhint.hxx>
-
-class SfxCancellable;
-
-#ifdef _SFX_CANCEL_CXX
-#include <svl/svarray.hxx>
-
-SV_DECL_PTRARR( SfxCancellables_Impl, SfxCancellable*, 0, 4 )
-
-#else
-
-typedef SvPtrarr SfxCancellables_Impl;
-
-#endif
-
-//-------------------------------------------------------------------------
-
-class SVL_DLLPUBLIC SfxCancelManager: public SfxBroadcaster
-, public SvWeakBase
-
-/* [Beschreibung]
-
- An Instanzen dieser Klasse k"onnen nebenl"aufige Prozesse angemeldet
- werden, um vom Benutzer abbrechbar zu sein. Werden abbrechbare
- Prozesse (Instanzen von <SfxCancellable>) an- oder abgemeldet, wird
- dies durch einen <SfxSimpleHint> mit dem Flag SFX_HINT_CANCELLABLE
- gebroadcastet.
-
- SfxCancelManager k"onnen hierarchisch angeordnet werden, so k"onnen
- z.B. Dokument-lokale Prozesse getrennt gecancelt werden.
-
- [Beispiel]
-
- SfxCancelManager *pMgr = new SfxCancelManager;
- StartListening( pMgr );
- pMailSystem->SetCancelManager( pMgr )
-*/
-
-{
- SfxCancelManager* _pParent;
- SfxCancellables_Impl _aJobs;
-
-public:
- SfxCancelManager( SfxCancelManager *pParent = 0 );
- ~SfxCancelManager();
-
- BOOL CanCancel() const;
- void Cancel( BOOL bDeep );
- SfxCancelManager* GetParent() const { return _pParent; }
-
- void InsertCancellable( SfxCancellable *pJob );
- void RemoveCancellable( SfxCancellable *pJob );
- USHORT GetCancellableCount() const
- { return _aJobs.Count(); }
- SfxCancellable* GetCancellable( USHORT nPos ) const
- { return (SfxCancellable*) _aJobs[nPos]; }
-};
-
-SV_DECL_WEAK( SfxCancelManager )
-//-------------------------------------------------------------------------
-
-class SVL_DLLPUBLIC SfxCancellable
-
-/* [Beschreibung]
-
- Instanzen dieser Klasse werden immer an einem Cancel-Manager angemeldet,
- der dadurch dem Benutzer signalisieren kann, ob abbrechbare Prozesse
- vorhanden sind und der die SfxCancellable-Instanzen auf 'abgebrochen'
- setzen kann.
-
- Die im Ctor "ubergebene <SfxCancelManger>-Instanz mu\s die Instanz
- dieser Klasse "uberleben!
-
- [Beispiel]
-
- {
- SfxCancellable aCancel( pCancelMgr );
- while ( !aCancel && GetData() )
- Reschedule();
- }
-
-*/
-
-{
- SfxCancelManager* _pMgr;
- BOOL _bCancelled;
- String _aTitle;
-
-public:
- SfxCancellable( SfxCancelManager *pMgr,
- const String &rTitle )
- : _pMgr( pMgr ),
- _bCancelled( FALSE ),
- _aTitle( rTitle )
- { pMgr->InsertCancellable( this ); }
-
- virtual ~SfxCancellable();
-
- void SetManager( SfxCancelManager *pMgr );
- SfxCancelManager* GetManager() const { return _pMgr; }
-
- virtual void Cancel();
- BOOL IsCancelled() const { return _bCancelled; }
- operator BOOL() const { return _bCancelled; }
- const String& GetTitle() const { return _aTitle; }
-};
-
-#endif
-
diff --git a/svl/inc/svl/cnclhint.hxx b/svl/inc/svl/cnclhint.hxx
deleted file mode 100644
index 17a6627f31b6..000000000000
--- a/svl/inc/svl/cnclhint.hxx
+++ /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.
- *
- ************************************************************************/
-#ifndef _SFXCNCLHINT_HXX
-#define _SFXCNCLHINT_HXX
-
-#include <svl/hint.hxx>
-#include <svl/cancel.hxx>
-#include <tools/rtti.hxx>
-
-#define SFXCANCELHINT_REMOVED 1
-
-class SfxCancelHint: public SfxHint
-{
-private:
- SfxCancellable* pCancellable;
- USHORT nAction;
-public:
- TYPEINFO();
- SfxCancelHint( SfxCancellable*, USHORT nAction );
- USHORT GetAction() const { return nAction; }
- const SfxCancellable& GetCancellable() const { return *pCancellable; }
-};
-
-#endif
diff --git a/svl/inc/cntnrsrt.hxx b/svl/inc/svl/cntnrsrt.hxx
index 48ebef50ea58..48ebef50ea58 100644
--- a/svl/inc/cntnrsrt.hxx
+++ b/svl/inc/svl/cntnrsrt.hxx
diff --git a/svl/inc/cntwids.hrc b/svl/inc/svl/cntwids.hrc
index 01a965c38652..01a965c38652 100644
--- a/svl/inc/cntwids.hrc
+++ b/svl/inc/svl/cntwids.hrc
diff --git a/svl/inc/converter.hxx b/svl/inc/svl/converter.hxx
index 062feafe6f29..062feafe6f29 100644
--- a/svl/inc/converter.hxx
+++ b/svl/inc/svl/converter.hxx
diff --git a/svl/inc/filenotation.hxx b/svl/inc/svl/filenotation.hxx
index 65f28659e056..65f28659e056 100644
--- a/svl/inc/filenotation.hxx
+++ b/svl/inc/svl/filenotation.hxx
diff --git a/svl/inc/folderrestriction.hxx b/svl/inc/svl/folderrestriction.hxx
index 66a99a4d49d1..66a99a4d49d1 100644
--- a/svl/inc/folderrestriction.hxx
+++ b/svl/inc/svl/folderrestriction.hxx
diff --git a/svl/inc/fstathelper.hxx b/svl/inc/svl/fstathelper.hxx
index 17fa62c5bbeb..17fa62c5bbeb 100644
--- a/svl/inc/fstathelper.hxx
+++ b/svl/inc/svl/fstathelper.hxx
diff --git a/svl/inc/inetdef.hxx b/svl/inc/svl/inetdef.hxx
index 533530838700..533530838700 100644
--- a/svl/inc/inetdef.hxx
+++ b/svl/inc/svl/inetdef.hxx
diff --git a/svl/inc/inetmsg.hxx b/svl/inc/svl/inetmsg.hxx
index bcfc4ad714ad..bcfc4ad714ad 100644
--- a/svl/inc/inetmsg.hxx
+++ b/svl/inc/svl/inetmsg.hxx
diff --git a/svl/inc/inetstrm.hxx b/svl/inc/svl/inetstrm.hxx
index efb6c35a1b68..efb6c35a1b68 100644
--- a/svl/inc/inetstrm.hxx
+++ b/svl/inc/svl/inetstrm.hxx
diff --git a/svl/inc/instrm.hxx b/svl/inc/svl/instrm.hxx
index d7585c13c3b7..d7585c13c3b7 100644
--- a/svl/inc/instrm.hxx
+++ b/svl/inc/svl/instrm.hxx
diff --git a/svl/inc/svl/itempool.hxx b/svl/inc/svl/itempool.hxx
index cbc6b7c4dd11..daaa2b481ba3 100644
--- a/svl/inc/svl/itempool.hxx
+++ b/svl/inc/svl/itempool.hxx
@@ -104,7 +104,7 @@ class SVL_DLLPUBLIC SfxItemPool
*/
{
- SVL_DLLPRIVATE void readTheItems(SvStream & rStream, USHORT nCount, USHORT nVersion,
+ SVL_DLLPRIVATE void readTheItems(SvStream & rStream, sal_uInt32 nCount, USHORT nVersion,
SfxPoolItem * pDefItem, SfxPoolItemArray_Impl ** pArr);
UniString aName;
@@ -208,9 +208,9 @@ public:
const SfxPoolItem &rItem,
FASTBOOL bDirect = FALSE ) const;
- USHORT GetSurrogate(const SfxPoolItem *) const;
- const SfxPoolItem * GetItem(USHORT nWhich, USHORT nSurrogate) const;
- USHORT GetItemCount(USHORT nWhich) const;
+ sal_uInt32 GetSurrogate(const SfxPoolItem *) const;
+ const SfxPoolItem * GetItem2(USHORT nWhich, sal_uInt32 nSurrogate) const;
+ sal_uInt32 GetItemCount2(USHORT nWhich) const;
const SfxPoolItem* LoadSurrogate(SvStream& rStream,
USHORT &rWhich, USHORT nSlotId,
const SfxItemPool* pRefPool = 0 );
diff --git a/svl/inc/listener.hxx b/svl/inc/svl/listener.hxx
index 3107f5ceee56..3107f5ceee56 100644
--- a/svl/inc/listener.hxx
+++ b/svl/inc/svl/listener.hxx
diff --git a/svl/inc/listeneriter.hxx b/svl/inc/svl/listeneriter.hxx
index 3bfb6380acaa..3bfb6380acaa 100644
--- a/svl/inc/listeneriter.hxx
+++ b/svl/inc/svl/listeneriter.hxx
diff --git a/svl/inc/lngmisc.hxx b/svl/inc/svl/lngmisc.hxx
index d85de673c4c9..5143d147227d 100644
--- a/svl/inc/lngmisc.hxx
+++ b/svl/inc/svl/lngmisc.hxx
@@ -32,6 +32,7 @@
#include <tools/solar.h>
#include <sal/types.h>
#include <rtl/ustring.hxx>
+#include <tools/string.hxx>
///////////////////////////////////////////////////////////////////////////
@@ -68,6 +69,8 @@ SVL_DLLPUBLIC BOOL RemoveControlChars( rtl::OUString &rTxt );
SVL_DLLPUBLIC BOOL ReplaceControlChars( rtl::OUString &rTxt, sal_Char aRplcChar = ' ' );
+SVL_DLLPUBLIC String GetThesaurusReplaceText( const String &rText );
+
} // namespace linguistic
#endif
diff --git a/svl/inc/nfsymbol.hxx b/svl/inc/svl/nfsymbol.hxx
index 8886f0e47f85..8886f0e47f85 100644
--- a/svl/inc/nfsymbol.hxx
+++ b/svl/inc/svl/nfsymbol.hxx
diff --git a/svl/inc/numuno.hxx b/svl/inc/svl/numuno.hxx
index 425cff60763d..425cff60763d 100644
--- a/svl/inc/numuno.hxx
+++ b/svl/inc/svl/numuno.hxx
diff --git a/svl/inc/outstrm.hxx b/svl/inc/svl/outstrm.hxx
index f80f6f2c9616..f80f6f2c9616 100644
--- a/svl/inc/outstrm.hxx
+++ b/svl/inc/svl/outstrm.hxx
diff --git a/svl/inc/pickerhelper.hxx b/svl/inc/svl/pickerhelper.hxx
index 307031b578d1..307031b578d1 100644
--- a/svl/inc/pickerhelper.hxx
+++ b/svl/inc/svl/pickerhelper.hxx
diff --git a/svl/inc/pickerhistory.hxx b/svl/inc/svl/pickerhistory.hxx
index af282e72513d..af282e72513d 100644
--- a/svl/inc/pickerhistory.hxx
+++ b/svl/inc/svl/pickerhistory.hxx
diff --git a/svl/inc/pickerhistoryaccess.hxx b/svl/inc/svl/pickerhistoryaccess.hxx
index 1a4e8ced8381..1a4e8ced8381 100644
--- a/svl/inc/pickerhistoryaccess.hxx
+++ b/svl/inc/svl/pickerhistoryaccess.hxx
diff --git a/svl/inc/poolcach.hxx b/svl/inc/svl/poolcach.hxx
index 949c0aee5bad..78bdca8177e6 100644
--- a/svl/inc/poolcach.hxx
+++ b/svl/inc/svl/poolcach.hxx
@@ -29,13 +29,24 @@
#include "svl/svldllapi.h"
#include <tools/solar.h>
+#include <vector>
+
+//------------------------------------------------------------------------
-class SfxItemModifyArr_Impl;
class SfxItemPool;
class SfxItemSet;
class SfxPoolItem;
class SfxSetItem;
+struct SfxItemModifyImpl
+{
+ const SfxSetItem *pOrigItem;
+ SfxSetItem *pPoolItem;
+};
+
+typedef std::vector<SfxItemModifyImpl> SfxItemModifyArr_Impl;
+
+
class SVL_DLLPUBLIC SfxItemPoolCache
{
SfxItemPool *pPool;
diff --git a/svl/inc/svl/poolitem.hxx b/svl/inc/svl/poolitem.hxx
index c0cf53fb6ded..d78e32877440 100644
--- a/svl/inc/svl/poolitem.hxx
+++ b/svl/inc/svl/poolitem.hxx
@@ -50,8 +50,9 @@ class IntlWrapper;
namespace com { namespace sun { namespace star { namespace uno { class Any; } } } }
-#define SFX_ITEMS_DIRECT 0xffff
-#define SFX_ITEMS_NULL 0xfff0 // anstelle StoreSurrogate
+static const sal_uInt32 SFX_ITEMS_DIRECT= 0xffffffff;
+static const sal_uInt32 SFX_ITEMS_NULL= 0xfffffff0; // instead StoreSurrogate
+static const sal_uInt32 SFX_ITEMS_DEFAULT= 0xfffffffe;
#define SFX_ITEMS_POOLDEFAULT 0xffff
#define SFX_ITEMS_STATICDEFAULT 0xfffe
diff --git a/svl/inc/strmadpt.hxx b/svl/inc/svl/strmadpt.hxx
index 76ecf0223543..76ecf0223543 100644
--- a/svl/inc/strmadpt.hxx
+++ b/svl/inc/svl/strmadpt.hxx
diff --git a/svl/inc/stylepool.hxx b/svl/inc/svl/stylepool.hxx
index b820c9442229..b820c9442229 100644
--- a/svl/inc/stylepool.hxx
+++ b/svl/inc/svl/stylepool.hxx
diff --git a/svl/inc/svl/svarray.hxx b/svl/inc/svl/svarray.hxx
index 99b2901b95f9..d48998247eeb 100644
--- a/svl/inc/svl/svarray.hxx
+++ b/svl/inc/svl/svarray.hxx
@@ -39,12 +39,6 @@
* enthaelt. (Sie werden im Speicher verschoben, koennen also
* z.B. keine String sein)
*
-* SV_DECL_OBJARR(nm, AE, IS, GS)
-* SV_IMPL_OBJARR( nm, AE )
-* definiere/implementiere ein Array das Objecte enthaelt.
-* (Hier koennen es auch Strings sein)
-*
-*
* SV_DECL_PTRARR(nm, AE, IS, GS)
* SV_IMPL_PTRARR(nm, AE)
* definiere/implementiere ein Array das Pointer haelt. Diese
@@ -86,10 +80,6 @@
* Basiert auf einem VARARR.
* Sortierung mit Hilfe der Object-operatoren "<" und "=="
*
-* JP 23.12.94 neu:
-* SV_DECL_PTRARR_STACK(nm, AE, IS, GS)
-* ein Stack mit einem PtrArray als Grundlage.
-*
* JP 09.10.96: vordefinierte Arrays:
* VarArr: SvBools, SvULongs, SvUShorts, SvLongs, SvShorts
* PtrArr: SvStrings, SvStringsDtor
@@ -207,8 +197,6 @@ public:\
#define _SV_DECL_VARARR(nm, AE, IS, GS ) \
_SV_DECL_VARARR_GEN(nm, AE, IS, GS, AE & )
-#define _SV_DECL_VARARR_PLAIN(nm, AE, IS, GS ) \
-_SV_DECL_VARARR_GEN(nm, AE, IS, GS, AE )
#define SV_DECL_VARARR_GEN(nm, AE, IS, GS, AERef, vis )\
_SV_DECL_VARARR_GEN(nm, AE, IS, GS, AERef, vis )\
@@ -219,15 +207,10 @@ nm& operator=( const nm& );\
#define SV_DECL_VARARR(nm, AE, IS, GS ) \
SV_DECL_VARARR_GEN(nm, AE, IS, GS, AE &, )
-#define SV_DECL_VARARR_PLAIN(nm, AE, IS, GS ) \
-SV_DECL_VARARR_GEN(nm, AE, IS, GS, AE, )
#define SV_DECL_VARARR_VISIBILITY(nm, AE, IS, GS, vis ) \
SV_DECL_VARARR_GEN(nm, AE, IS, GS, AE &, vis )
-#define SV_DECL_VARARR_PLAIN_VISIBILITY(nm, AE, IS, GS, vis ) \
-SV_DECL_VARARR_GEN(nm, AE, IS, GS, AE, vis )
-
#define SV_IMPL_VARARR_GEN( nm, AE, AERef )\
nm::nm( USHORT nInit, BYTE )\
: pData (0),\
@@ -329,192 +312,6 @@ _SVVARARR_IMPL_GET_OP_INLINE(nm, AE )\
#define SV_IMPL_VARARR( nm, AE ) \
SV_IMPL_VARARR_GEN( nm, AE, AE & )
-#define SV_IMPL_VARARR_PLAIN( nm, AE ) \
-SV_IMPL_VARARR_GEN( nm, AE, AE )
-
-#if defined(PRODUCT)
-
-#define _SVOBJARR_DEF_GET_OP_INLINE( nm,ArrElem )\
-ArrElem& operator[](USHORT nP) const { return *(pData+nP); }\
-\
-void Insert( const nm *pI, USHORT nP,\
- USHORT nS = 0, USHORT nE = USHRT_MAX )\
-{\
- if( USHRT_MAX == nE ) \
- nE = pI->nA; \
- if( nS < nE ) \
- Insert( (const ArrElem*)pI->pData+nS, (USHORT)nE-nS, nP );\
-}
-
-#define _SVOBJARR_IMPL_GET_OP_INLINE( nm, ArrElem )
-
-#else
-
-#define _SVOBJARR_DEF_GET_OP_INLINE( nm,ArrElem ) \
-ArrElem& operator[](USHORT nP) const;\
-void Insert( const nm *pI, USHORT nP,\
- USHORT nS = 0, USHORT nE = USHRT_MAX );
-
-#define _SVOBJARR_IMPL_GET_OP_INLINE( nm, ArrElem )\
-ArrElem& nm::operator[](USHORT nP) const\
-{\
- DBG_ASSERT( pData && nP < nA,"Op[]");\
- return *(pData+nP);\
-}\
-void nm::Insert( const nm *pI, USHORT nP, USHORT nStt, USHORT nE )\
-{\
- DBG_ASSERT( nP <= nA,"Ins,Ar[Start.End]");\
- if( USHRT_MAX == nE ) \
- nE = pI->nA; \
- if( nStt < nE ) \
- Insert( (const ArrElem*)pI->pData+nStt, (USHORT)nE-nStt, nP );\
-}
-
-#endif
-
-#define _SV_DECL_OBJARR(nm, AE, IS, GS)\
-typedef BOOL (*FnForEach_##nm)( const AE&, void* );\
-class nm\
-{\
-protected:\
- AE *pData;\
- USHORT nFree;\
- USHORT nA;\
-\
- void _resize(size_t n);\
- void _destroy();\
-\
-public:\
- nm( USHORT= IS, BYTE= GS );\
- ~nm() { _destroy(); }\
-\
- _SVOBJARR_DEF_GET_OP_INLINE(nm,AE)\
- AE& GetObject(USHORT nP) const { return (*this)[nP]; } \
-\
- void Insert( const AE &aE, USHORT nP );\
- void Insert( const AE *pE, USHORT nL, USHORT nP );\
- void Remove( USHORT nP, USHORT nL = 1 );\
- USHORT Count() const { return nA; }\
- const AE* GetData() const { return (const AE*)pData; }\
-\
- void ForEach( CONCAT( FnForEach_, nm ) fnForEach, void* pArgs = 0 )\
- {\
- _ForEach( 0, nA, fnForEach, pArgs );\
- }\
- void ForEach( USHORT nS, USHORT nE, \
- CONCAT( FnForEach_, nm ) fnForEach, void* pArgs = 0 )\
- {\
- _ForEach( nS, nE, fnForEach, pArgs );\
- }\
-\
- void _ForEach( USHORT nStt, USHORT nE, \
- CONCAT( FnForEach_, nm ) fnCall, void* pArgs = 0 );\
-\
-
-#define SV_DECL_OBJARR(nm, AE, IS, GS)\
-_SV_DECL_OBJARR(nm, AE, IS, GS)\
-private:\
-nm( const nm& );\
-nm& operator=( const nm& );\
-};
-
-#define SV_IMPL_OBJARR( nm, AE )\
-nm::nm( USHORT nInit, BYTE )\
- : pData (0),\
- nFree (nInit),\
- nA (0)\
-{\
- if( nInit )\
- {\
- pData = (AE*)(rtl_allocateMemory(sizeof(AE) * nInit));\
- DBG_ASSERT( pData, "CTOR, allocate");\
- }\
-}\
-\
-void nm::_destroy()\
-{\
- if(pData)\
- {\
- AE* pTmp=pData;\
- for(USHORT n=0; n < nA; n++,pTmp++ )\
- {\
- pTmp->~AE();\
- }\
- rtl_freeMemory(pData);\
- pData = 0;\
- }\
-}\
-\
-void nm::_resize (size_t n)\
-{\
- USHORT nL = ((n < USHRT_MAX) ? USHORT(n) : USHRT_MAX);\
- AE* pE = (AE*)(rtl_reallocateMemory (pData, sizeof(AE) * nL));\
- if ((pE != 0) || (nL == 0))\
- {\
- pData = pE;\
- nFree = nL - nA;\
- }\
-}\
-\
-void nm::Insert( const AE &aE, USHORT nP )\
-{\
- DBG_ASSERT( nP <= nA && nA < USHRT_MAX,"Ins 1");\
- if (nFree < 1)\
- _resize (nA + ((nA > 1) ? nA : 1));\
- if( pData && nP < nA )\
- memmove( pData+nP+1, pData+nP, (nA-nP) * sizeof( AE ));\
- AE* pTmp = pData+nP;\
- new( (DummyType*) pTmp ) AE( (AE&)aE );\
- ++nA; --nFree;\
-}\
-\
-void nm::Insert( const AE* pE, USHORT nL, USHORT nP )\
-{\
- DBG_ASSERT(nP<=nA && ((long)nA+nL) < USHRT_MAX, "Ins n");\
- if (nFree < nL)\
- _resize (nA + ((nA > nL) ? nA : nL));\
- if( pData && nP < nA )\
- memmove( pData+nP+nL, pData+nP, (nA-nP) * sizeof( AE ));\
- if( pE )\
- {\
- AE* pTmp = pData+nP;\
- for( USHORT n = 0; n < nL; n++, pTmp++, pE++)\
- {\
- new( (DummyType*) pTmp ) AE( (AE&)*pE );\
- }\
- }\
- nA = nA + nL; nFree = nFree - nL;\
-}\
-\
-void nm::Remove( USHORT nP, USHORT nL )\
-{\
- if( !nL )\
- return;\
- DBG_ASSERT( nP < nA && nP + nL <= nA,"Del");\
- AE* pTmp=pData+nP;\
- USHORT nCtr = nP;\
- for(USHORT n=0; n < nL; n++,pTmp++,nCtr++)\
- {\
- if( nCtr < nA )\
- pTmp->~AE();\
- }\
- if( pData && nP+1 < nA )\
- memmove( pData+nP, pData+nP+nL, (nA-nP-nL) * sizeof( AE ));\
- nA = nA - nL; nFree = nFree + nL;\
- if (nFree > nA) \
- _resize (nA);\
-}\
-\
-void nm::_ForEach( USHORT nStt, USHORT nE, \
- CONCAT( FnForEach_, nm ) fnCall, void* pArgs )\
-{\
- if( nStt >= nE || nE > nA )\
- return;\
- for( ; nStt < nE && (*fnCall)( *(pData+nStt), pArgs ); nStt++)\
- ;\
-}\
-\
-_SVOBJARR_IMPL_GET_OP_INLINE(nm, AE)\
#define _SV_DECL_PTRARR_DEF_GEN( nm, AE, IS, GS, AERef, vis )\
_SV_DECL_VARARR_GEN( nm, AE, IS, GS, AERef, vis)\
@@ -523,8 +320,6 @@ USHORT GetPos( const AERef aE ) const;\
#define _SV_DECL_PTRARR_DEF( nm, AE, IS, GS, vis )\
_SV_DECL_PTRARR_DEF_GEN( nm, AE, IS, GS, AE &, vis )
-#define _SV_DECL_PTRARR_DEF_PLAIN( nm, AE, IS, GS, vis )\
-_SV_DECL_PTRARR_DEF_GEN( nm, AE, IS, GS, AE, vis )
#define SV_DECL_PTRARR_GEN(nm, AE, IS, GS, Base, AERef, VPRef, vis )\
typedef BOOL (*FnForEach_##nm)( const AERef, void* );\
@@ -580,13 +375,9 @@ private:\
#define SV_DECL_PTRARR(nm, AE, IS, GS )\
SV_DECL_PTRARR_GEN(nm, AE, IS, GS, SvPtrarr, AE &, VoidPtr &, )
-#define SV_DECL_PTRARR_PLAIN(nm, AE, IS, GS )\
-SV_DECL_PTRARR_GEN(nm, AE, IS, GS, SvPtrarrPlain, AE, VoidPtr, )
#define SV_DECL_PTRARR_VISIBILITY(nm, AE, IS, GS, vis )\
SV_DECL_PTRARR_GEN(nm, AE, IS, GS, SvPtrarr, AE &, VoidPtr &, vis )
-#define SV_DECL_PTRARR_PLAIN_VISIBILITY(nm, AE, IS, GS, vis )\
-SV_DECL_PTRARR_GEN(nm, AE, IS, GS, SvPtrarrPlain, AE, VoidPtr, vis )
#define SV_DECL_PTRARR_DEL_GEN(nm, AE, IS, GS, Base, AERef, VPRef, vis )\
typedef BOOL (*FnForEach_##nm)( const AERef, void* );\
@@ -643,13 +434,9 @@ private:\
#define SV_DECL_PTRARR_DEL(nm, AE, IS, GS )\
SV_DECL_PTRARR_DEL_GEN(nm, AE, IS, GS, SvPtrarr, AE &, VoidPtr &, )
-#define SV_DECL_PTRARR_DEL_PLAIN(nm, AE, IS, GS )\
-SV_DECL_PTRARR_DEL_GEN(nm, AE, IS, GS, SvPtrarrPlain, AE, VoidPtr, )
#define SV_DECL_PTRARR_DEL_VISIBILITY(nm, AE, IS, GS, vis )\
SV_DECL_PTRARR_DEL_GEN(nm, AE, IS, GS, SvPtrarr, AE &, VoidPtr &, vis)
-#define SV_DECL_PTRARR_DEL_PLAIN_VISIBILITY(nm, AE, IS, GS, vis )\
-SV_DECL_PTRARR_DEL_GEN(nm, AE, IS, GS, SvPtrarrPlain, AE, VoidPtr, vis)
#define SV_IMPL_PTRARR_GEN(nm, AE, Base)\
void nm::DeleteAndDestroy( USHORT nP, USHORT nL )\
@@ -664,12 +451,9 @@ void nm::DeleteAndDestroy( USHORT nP, USHORT nL )\
#define SV_IMPL_PTRARR(nm, AE )\
SV_IMPL_PTRARR_GEN(nm, AE, SvPtrarr )
-#define SV_IMPL_PTRARR_PLAIN(nm, AE )\
-SV_IMPL_PTRARR_GEN(nm, AE, SvPtrarrPlain )
typedef void* VoidPtr;
_SV_DECL_PTRARR_DEF( SvPtrarr, VoidPtr, 0, 1, SVL_DLLPUBLIC )
-_SV_DECL_PTRARR_DEF_PLAIN( SvPtrarrPlain, VoidPtr, 0, 1, SVL_DLLPUBLIC )
// SORTARR - Begin
@@ -983,69 +767,21 @@ SV_IMPL_VARARR(nm##_SAR, AE)\
_SV_IMPL_SORTAR_ALG( nm,AE )\
_SV_SEEK_OBJECT( nm,AE )
-#define SV_DECL_PTRARR_STACK(nm, AE, IS, GS)\
-class nm: private SvPtrarr \
-{\
-public:\
- nm( USHORT nIni=IS, BYTE nG=GS )\
- : SvPtrarr(nIni,nG) {}\
- void Insert( const nm *pI, USHORT nP,\
- USHORT nS = 0, USHORT nE = USHRT_MAX ) {\
- SvPtrarr::Insert( pI, nP, nS, nE ); \
- }\
- void Remove( USHORT nP, USHORT nL = 1 ) {\
- SvPtrarr::Remove( nP, nL ); \
- }\
- void Push( const AE &aE ) {\
- SvPtrarr::Insert( (const VoidPtr &)aE, SvPtrarr::Count() );\
- }\
- USHORT Count() const { return SvPtrarr::Count(); }\
- AE operator[](USHORT nP) const {\
- return (AE)SvPtrarr::operator[]( nP );\
- }\
- AE GetObject(USHORT nP) const {\
- return (AE)SvPtrarr::GetObject( nP );\
- }\
- AE Pop(){\
- AE pRet = 0;\
- if( SvPtrarr::Count() ){\
- pRet = GetObject( SvPtrarr::Count()-1 );\
- SvPtrarr::Remove(Count()-1);\
- }\
- return pRet;\
- }\
- AE Top() const {\
- AE pRet = 0;\
- if( SvPtrarr::Count() )\
- pRet = GetObject( SvPtrarr::Count()-1 ); \
- return pRet;\
- }\
-};
-
#if defined (C40) || defined (C41) || defined (C42) || defined(C50) || defined(C52)
#define C40_INSERT( c, p, n) Insert( (c const *) p, n )
-#define C40_PUSH( c, p) Push( (c const *) p )
#define C40_PTR_INSERT( c, p) Insert( (c const *) p )
-#define C40_REMOVE( c, p ) Remove( (c const *) p )
#define C40_REPLACE( c, p, n) Replace( (c const *) p, n )
-#define C40_PTR_REPLACE( c, p) Replace( (c const *) p )
#define C40_GETPOS( c, r) GetPos( (c const *)r )
#else
#if defined WTC || defined ICC || defined HPUX || (defined GCC && __GNUC__ >= 3) || (defined(WNT) && _MSC_VER >= 1400)
#define C40_INSERT( c, p, n ) Insert( (c const *&) p, n )
-#define C40_PUSH( c, p) Push( (c const *&) p )
#define C40_PTR_INSERT( c, p ) Insert( (c const *&) p )
-#define C40_REMOVE( c, p ) Remove( (c const *&) p )
#define C40_REPLACE( c, p, n ) Replace( (c const *&) p, n )
-#define C40_PTR_REPLACE( c, p ) Replace( (c const *&) p )
#define C40_GETPOS( c, r) GetPos( (c const *&) r )
#else
#define C40_INSERT( c, p, n ) Insert( p, n )
-#define C40_PUSH( c, p) Push( p )
#define C40_PTR_INSERT( c, p ) Insert( p )
-#define C40_REMOVE( c, p) Remove( p )
#define C40_REPLACE( c, p, n ) Replace( p, n )
-#define C40_PTR_REPLACE( c, p ) Replace( p )
#define C40_GETPOS( c, r) GetPos( r )
#endif
#endif
diff --git a/svl/inc/svl/svstdarr.hxx b/svl/inc/svl/svstdarr.hxx
index fa3c94034256..608705dca43d 100644
--- a/svl/inc/svl/svstdarr.hxx
+++ b/svl/inc/svl/svstdarr.hxx
@@ -42,20 +42,11 @@
#include "svl/svldllapi.h"
#include <svl/svarray.hxx>
+#include <deque>
-//#ifdef _SVSTDARR_BOOLS
-#ifndef _SVSTDARR_BOOLS_DECL
-SV_DECL_VARARR_VISIBILITY( SvBools, BOOL, 1, 1, SVL_DLLPUBLIC )
-#define _SVSTDARR_BOOLS_DECL
-#endif
-//#endif
+typedef std::deque< BOOL > SvBools;
-//#ifdef _SVSTDARR_BYTES
-#ifndef _SVSTDARR_BYTES_DECL
-SV_DECL_VARARR_VISIBILITY( SvBytes, BYTE, 1, 1, SVL_DLLPUBLIC )
-#define _SVSTDARR_BYTES_DECL
-#endif
-//#endif
+typedef std::deque< BYTE > SvBytes;
//#ifdef _SVSTDARR_ULONGS
#ifndef _SVSTDARR_ULONGS_DECL
@@ -139,12 +130,7 @@ SV_DECL_VARARR_SORT_VISIBILITY( SvLongsSort, long, 1, 1, SVL_DLLPUBLIC )
#endif
//#endif
-//#ifdef _SVSTDARR_SHORTS
-#ifndef _SVSTDARR_SHORTS_DECL
-SV_DECL_VARARR_VISIBILITY( SvShorts, short, 1, 1, SVL_DLLPUBLIC )
-#define _SVSTDARR_SHORTS_DECL
-#endif
-//#endif
+typedef std::deque< short > SvShorts;
/*
form here all Arrays for Strings, ByteString and then
@@ -255,17 +241,5 @@ SV_DECL_PTRARR_SORT_DEL_VISIBILITY( SvByteStringsISortDtor, ByteStringPtr, 1, 1,
#endif
//#endif
-//#ifdef _SVSTDARR_XUB_STRLEN
-#ifndef _SVSTDARR_XUB_STRLEN_DECL
-SV_DECL_VARARR_VISIBILITY( SvXub_StrLens, xub_StrLen, 1, 1, SVL_DLLPUBLIC )
-#define _SVSTDARR_XUB_STRLEN_DECL
-#endif
-//#endif
-
-//#ifdef _SVSTDARR_XUB_STRLENSORT
-#ifndef _SVSTDARR_XUB_STRLENSORT_DECL
-SV_DECL_VARARR_SORT_VISIBILITY( SvXub_StrLensSort, xub_StrLen, 1, 1, SVL_DLLPUBLIC )
-#define _SVSTDARR_XUB_STRLENSORT_DECL
-#endif
-//#endif
+typedef std::deque< xub_StrLen > SvXub_StrLens;
diff --git a/svl/inc/urihelper.hxx b/svl/inc/svl/urihelper.hxx
index ab2ae5878cc2..ab2ae5878cc2 100644
--- a/svl/inc/urihelper.hxx
+++ b/svl/inc/svl/urihelper.hxx
diff --git a/svl/inc/urlbmk.hxx b/svl/inc/svl/urlbmk.hxx
index 9a37184c8ec1..9a37184c8ec1 100644
--- a/svl/inc/urlbmk.hxx
+++ b/svl/inc/svl/urlbmk.hxx
diff --git a/svl/inc/whiter.hxx b/svl/inc/svl/whiter.hxx
index 83a3e21e2b0e..83a3e21e2b0e 100644
--- a/svl/inc/whiter.hxx
+++ b/svl/inc/svl/whiter.hxx
diff --git a/svl/inc/xmlement.hxx b/svl/inc/svl/xmlement.hxx
index d2680fbbf404..d2680fbbf404 100644
--- a/svl/inc/xmlement.hxx
+++ b/svl/inc/svl/xmlement.hxx
diff --git a/svl/inc/svl/zforlist.hxx b/svl/inc/svl/zforlist.hxx
index 598295797ea6..5492759d4d36 100644
--- a/svl/inc/svl/zforlist.hxx
+++ b/svl/inc/svl/zforlist.hxx
@@ -520,6 +520,15 @@ public:
String& sOutString, Color** ppColor,
LanguageType eLnge = LANGUAGE_DONTKNOW );
+ /** Format a string according to a format code string to be scanned.
+ @return
+ <FALSE/> if format code contains an error
+ <TRUE/> else, in which case the string and color are returned.
+ */
+ BOOL GetPreviewString( const String& sFormatString, const String& sPreviewString,
+ String& sOutString, Color** ppColor,
+ LanguageType eLnge = LANGUAGE_DONTKNOW );
+
/** Test whether the format code string is already present in container
@return
NUMBERFORMAT_ENTRY_NOT_FOUND if not found, else the format index.
diff --git a/svl/prj/build.lst b/svl/prj/build.lst
index f2d4bf324d01..09acc768cb13 100644
--- a/svl/prj/build.lst
+++ b/svl/prj/build.lst
@@ -1,22 +1,4 @@
-sl svl : l10n rsc offuh ucbhelper unotools cppu cppuhelper comphelper sal sot NULL
+sl svl : l10n rsc offuh ucbhelper unotools cppu cppuhelper comphelper sal sot LIBXSLT:libxslt NULL
sl svl usr1 - all svl_mkout NULL
-sl svl\inc nmake - all svl_inc NULL
-sl svl\unx\source\svdde nmake - u svl_usdde svl_inc NULL
-sl svl\unx\source\svdde nmake - p svl_psdde svl_inc NULL
-sl svl\source\config nmake - all svl_conf svl_inc NULL
-sl svl\source\filepicker nmake - all svl_filepick svl_inc NULL
-sl svl\source\filerec nmake - all svl_file svl_inc NULL
-sl svl\source\items nmake - all svl__item svl_inc NULL
-sl svl\source\memtools nmake - all svl_mem svl_inc NULL
-sl svl\source\misc nmake - all svl__misc svl_inc NULL
-sl svl\source\notify nmake - all svl_not svl_inc NULL
-sl svl\source\numbers nmake - all svl_num svl_inc NULL
-sl svl\source\svdde nmake - all svl__dde svl_inc NULL
-sl svl\source\svsql nmake - all svl_sql svl_inc NULL
-sl svl\source\undo nmake - all svl_undo svl_inc NULL
-sl svl\source\uno nmake - all svl_uno svl_inc NULL
-sl svl\util nmake - all svl_util svl_usdde.u svl_psdde.p svl_conf svl_filepick svl_file svl__item svl_mem svl__misc svl_not svl_num svl__dde svl_sql svl_undo svl_uno NULL
-sl svl\source\fsstor nmake - all svl_fsstor svl_inc NULL
-sl svl\source\passwordcontainer nmake - all svl_passcont svl_inc NULL
-
-
+sl svl\prj nmake - all svl_prj NULL
+sl svl\qa\complex\passwordcontainer nmake - all svl_qa_complex_passwordcontainer NULL
diff --git a/svl/prj/d.lst b/svl/prj/d.lst
index a5c2564e81cd..e69de29bb2d1 100644
--- a/svl/prj/d.lst
+++ b/svl/prj/d.lst
@@ -1,22 +0,0 @@
-mkdir: %COMMON_DEST%\bin%_EXT%\hid
-mkdir: %COMMON_DEST%\res%_EXT%
-mkdir: %_DEST%\inc%_EXT%\svl
-
-..\%COMMON_OUTDIR%\misc\*.hid %COMMON_DEST%\bin%_EXT%\hid\*.hid
-..\%__SRC%\lib\isvl.lib %_DEST%\lib%_EXT%\isvl.lib
-..\%__SRC%\bin\*.dll %_DEST%\bin%_EXT%\*
-..\%__SRC%\bin\*.res %_DEST%\bin%_EXT%\*
-..\%__SRC%\lib\*.so %_DEST%\lib%_EXT%\*
-..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*
-
-..\inc\svl\*.hrc %_DEST%\inc%_EXT%\svl\*.hrc
-..\inc\svl\*.hxx %_DEST%\inc%_EXT%\svl\*.hxx
-..\inc\svl\*.h %_DEST%\inc%_EXT%\svl\*.h
-..\inc\*.hrc %_DEST%\inc%_EXT%\svl\*.hrc
-..\inc\*.hxx %_DEST%\inc%_EXT%\svl\*.hxx
-..\inc\*.h %_DEST%\inc%_EXT%\svl\*.h
-
-dos: sh -c "if test %OS% = MACOSX; then macosx-create-bundle %_DEST%\bin%_EXT%\bmp=%__PRJROOT%\%__SRC%\bin%_EXT%; fi"
-
-*.xml %_DEST%\xml%_EXT%\*.xml
-
diff --git a/svl/source/memtools/makefile.mk b/svl/prj/makefile.mk
index e19667214d13..c73a3d944bbf 100644
--- a/svl/source/memtools/makefile.mk
+++ b/svl/prj/makefile.mk
@@ -25,22 +25,16 @@
#
#*************************************************************************
-PRJ=..$/..
+PRJ=..
+TARGET=prj
-PRJNAME=svl
-TARGET=svarray
+.INCLUDE : settings.mk
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/svl.pmk
-
-# --- Files --------------------------------------------------------
-
-SLOFILES=\
- $(SLO)$/svarray.obj
-
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
+.IF "$(VERBOSE)"!=""
+VERBOSEFLAG :=
+.ELSE
+VERBOSEFLAG := -s
+.ENDIF
+all:
+ cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET)
diff --git a/svl/qa/complex/ConfigItems/CheckConfigItems.java b/svl/qa/complex/ConfigItems/CheckConfigItems.java
index 4afa2bf33f55..78141b6b20d4 100644
--- a/svl/qa/complex/ConfigItems/CheckConfigItems.java
+++ b/svl/qa/complex/ConfigItems/CheckConfigItems.java
@@ -27,20 +27,25 @@
package complex.ConfigItems;
-import com.sun.star.beans.*;
-import com.sun.star.lang.*;
-import com.sun.star.uno.*;
-import com.sun.star.task.*;
+import com.sun.star.beans.NamedValue;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.task.XJob;
+import com.sun.star.uno.UnoRuntime;
-import complexlib.*;
-import java.lang.*;
-import java.util.*;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openoffice.test.OfficeConnection;
+// import static org.junit.Assert.*;
//-----------------------------------------------
/** @short todo document me
+ * @deprecated this tests seems no longer work as expected.
*/
-public class CheckConfigItems extends ComplexTestCase
+public class CheckConfigItems
{
//-------------------------------------------
// some const
@@ -64,43 +69,44 @@ public class CheckConfigItems extends ComplexTestCase
@return All test methods.
@todo Think about selection of tests from outside ...
*/
- public String[] getTestMethodNames()
- {
- return new String[]
- {
- "checkPicklist",
- "checkURLHistory",
- "checkHelpBookmarks",
- "checkPrintOptions",
- "checkAccessibilityOptions",
- "checkUserOptions"
- };
- }
+// public String[] getTestMethodNames()
+// {
+// return new String[]
+// {
+// "checkPicklist",
+// "checkURLHistory",
+// "checkHelpBookmarks",
+// "checkPrintOptions",
+// "checkAccessibilityOptions",
+// "checkUserOptions"
+// };
+// }
//-------------------------------------------
/** @short Create the environment for following tests.
- @descr Use either a component loader from desktop or
+ * @throws java.lang.Exception
+ * @descr Use either a component loader from desktop or
from frame
*/
- public void before()
+ @Before public void before()
throws java.lang.Exception
{
// get uno service manager from global test environment
- m_xSmgr = (XMultiServiceFactory)param.getMSF();
+ m_xSmgr = getMSF();
// TODO register helper service
// create module manager
- m_xTest = (XJob)UnoRuntime.queryInterface(
- XJob.class,
- m_xSmgr.createInstance("com.sun.star.comp.svl.ConfigItemTest"));
+ m_xTest = UnoRuntime.queryInterface(XJob.class, m_xSmgr.createInstance("com.sun.star.comp.svl.ConfigItemTest"));
}
//-------------------------------------------
- /** @short close the environment.
+ /**
+ * @throws java.lang.Exception
+ * @short close the environment.
*/
- public void after()
+ @After public void after()
throws java.lang.Exception
{
// TODO deregister helper service
@@ -110,54 +116,66 @@ public class CheckConfigItems extends ComplexTestCase
}
//-------------------------------------------
- /** @todo document me
+ /**
+ * @throws java.lang.Exception
+ * @todo document me
*/
- public void checkPicklist()
+ @Test public void checkPicklist()
throws java.lang.Exception
{
impl_triggerTest("checkPicklist");
}
//-------------------------------------------
- /** @todo document me
+ /**
+ * @throws java.lang.Exception
+ * @todo document me
*/
- public void checkURLHistory()
+ @Test public void checkURLHistory()
throws java.lang.Exception
{
impl_triggerTest("checkURLHistory");
}
//-------------------------------------------
- /** @todo document me
+ /**
+ * @throws java.lang.Exception
+ * @todo document me
*/
- public void checkHelpBookmarks()
+ @Test public void checkHelpBookmarks()
throws java.lang.Exception
{
impl_triggerTest("checkHelpBookmarks");
}
//-------------------------------------------
- /** @todo document me
+ /**
+ * @throws java.lang.Exception
+ * @todo document me
*/
- public void checkPrintOptions()
- throws java.lang.Exception
- {
- impl_triggerTest("checkPrintOptions");
- }
+// @Test public void checkPrintOptions()
+// throws java.lang.Exception
+// {
+// impl_triggerTest("checkPrintOptions");
+// }
//-------------------------------------------
- /** @todo document me
+ /**
+ * @throws java.lang.Exception
+ * @todo document me
*/
- public void checkAccessibilityOptions()
+ @Test public void checkAccessibilityOptions()
throws java.lang.Exception
{
impl_triggerTest("checkAccessibilityOptions");
}
//-------------------------------------------
- /** @todo document me
+ /**
+ * @throws java.lang.Exception
+ * @todo document me
*/
- public void checkUserOptions()
+ @Test public void checkUserOptions()
throws java.lang.Exception
{
impl_triggerTest("checkUserOptions");
@@ -175,4 +193,27 @@ public class CheckConfigItems extends ComplexTestCase
lArgs[0].Value = sTest;
m_xTest.execute(lArgs);
}
+
+
+ private XMultiServiceFactory getMSF()
+ {
+ final XMultiServiceFactory xMSF1 = UnoRuntime.queryInterface(XMultiServiceFactory.class, connection.getComponentContext().getServiceManager());
+ return xMSF1;
+ }
+
+ // setup and close connections
+ @BeforeClass public static void setUpConnection() throws Exception {
+ System.out.println("setUpConnection()");
+ connection.setUp();
+ }
+
+ @AfterClass public static void tearDownConnection()
+ throws InterruptedException, com.sun.star.uno.Exception
+ {
+ System.out.println("tearDownConnection()");
+ connection.tearDown();
+ }
+
+ private static final OfficeConnection connection = new OfficeConnection();
+
}
diff --git a/svl/qa/complex/ConfigItems/helper/ConfigItemTest.cxx b/svl/qa/complex/ConfigItems/helper/ConfigItemTest.cxx
index f9840605a6d5..b342eff7ff76 100644
--- a/svl/qa/complex/ConfigItems/helper/ConfigItemTest.cxx
+++ b/svl/qa/complex/ConfigItems/helper/ConfigItemTest.cxx
@@ -26,8 +26,8 @@
************************************************************************/
#include "HistoryOptTest.hxx"
-#include "AccessibilityOptTest.hxx"
-#include "PrintOptTest.hxx"
+// #include "AccessibilityOptTest.hxx"
+// #include "PrintOptTest.hxx"
#include "UserOptTest.hxx"
#include <com/sun/star/uno/XComponentContext.hpp>
@@ -50,8 +50,8 @@ static const ::rtl::OUString PROP_TEST = ::rtl::OUString::creat
static const ::rtl::OUString TEST_PICKLIST = ::rtl::OUString::createFromAscii("checkPicklist");
static const ::rtl::OUString TEST_URLHISTORY = ::rtl::OUString::createFromAscii("checkURLHistory");
static const ::rtl::OUString TEST_HELPBOOKMARKS = ::rtl::OUString::createFromAscii("checkHelpBookmarks");
-static const ::rtl::OUString TEST_ACCESSIBILITYOPTIONS = ::rtl::OUString::createFromAscii("checkAccessibilityOptions");
-static const ::rtl::OUString TEST_PRINTOPTIONS = ::rtl::OUString::createFromAscii("checkPrintOptions");
+// static const ::rtl::OUString TEST_ACCESSIBILITYOPTIONS = ::rtl::OUString::createFromAscii("checkAccessibilityOptions");
+// static const ::rtl::OUString TEST_PRINTOPTIONS = ::rtl::OUString::createFromAscii("checkPrintOptions");
static const ::rtl::OUString TEST_USEROPTIONS = ::rtl::OUString::createFromAscii("checkUserOptions");
//=============================================================================
@@ -136,16 +136,16 @@ css::uno::Any SAL_CALL ConfigItemTest::execute(const css::uno::Sequence< css::be
HistoryOptTest aOptTest;
aOptTest.checkHelpBookmarks();
}
- else if (sTest.equals(TEST_ACCESSIBILITYOPTIONS))
- {
- AccessibilityOptTest aOptTest;
- aOptTest.impl_checkAccessibilityOptions();
- }
- else if (sTest.equals(TEST_PRINTOPTIONS))
- {
- PrintOptTest aOptTest;
- aOptTest.impl_checkPrint();
- }
+// else if (sTest.equals(TEST_ACCESSIBILITYOPTIONS))
+// {
+// AccessibilityOptTest aOptTest;
+// aOptTest.impl_checkAccessibilityOptions();
+// }
+// else if (sTest.equals(TEST_PRINTOPTIONS))
+// {
+// PrintOptTest aOptTest;
+// aOptTest.impl_checkPrint();
+// }
else if (sTest.equals(TEST_USEROPTIONS))
{
UserOptTest aOptTest;
diff --git a/svl/qa/complex/ConfigItems/helper/makefile.mk b/svl/qa/complex/ConfigItems/helper/makefile.mk
deleted file mode 100644
index 13ea12106792..000000000000
--- a/svl/qa/complex/ConfigItems/helper/makefile.mk
+++ /dev/null
@@ -1,73 +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= svl
-TARGET= ConfigItemTest
-USE_DEFFILE= TRUE
-ENABLE_EXCEPTIONS= TRUE
-NO_BSYMBOLIC= TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-# --- Generate -----------------------------------------------------
-
-INCPOST += $(PRJ)$/source$/inc
-
-# --- light services library ----------------------------------------------------
-
-SHL1TARGET= svt_$(TARGET)
-
-SHL1OBJS= \
- $(SLO)$/UserOptTest.obj \
- $(SLO)$/PrintOptTest.obj \
- $(SLO)$/AccessibilityOptTest.obj \
- $(SLO)$/HistoryOptTest.obj \
- $(SLO)$/ConfigItemTest.obj
-
-SHL1STDLIBS= \
- $(SVLIB) \
- $(SVLLIB) \
- $(UNOTOOLSLIB) \
- $(COMPHELPERLIB) \
- $(CPPUHELPERLIB) \
- $(CPPULIB) \
- $(SALLIB)
-
-SHL1DEF= $(MISC)$/$(SHL1TARGET).def
-#SHL1DEPN= $(SHL1IMPLIBN) $(SHL1TARGETN)
-
-DEF1NAME= $(SHL1TARGET)
-
-SHL1VERSIONMAP= $(SOLARENV)/src/component.map
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/svl/qa/complex/ConfigItems/makefile.mk b/svl/qa/complex/ConfigItems/makefile.mk
deleted file mode 100644
index 6838cc79a660..000000000000
--- a/svl/qa/complex/ConfigItems/makefile.mk
+++ /dev/null
@@ -1,83 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-PRJ = ..$/..$/..
-TARGET = CheckConfigItems
-PRJNAME = svl
-PACKAGE = complex$/ConfigItems
-
-# --- Settings -----------------------------------------------------
-.INCLUDE: settings.mk
-
-
-#----- compile .java files -----------------------------------------
-
-JARFILES = mysql.jar ridl.jar unoil.jar jurt.jar juh.jar jut.jar java_uno.jar \
- OOoRunner.jar
-
-JAVAFILES = CheckConfigItems.java
-
-JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
-
-SUBDIRS = helper
-
-#----- make a jar from compiled files ------------------------------
-
-MAXLINELENGTH = 100000
-
-JARCLASSDIRS = $(PACKAGE)
-JARTARGET = $(TARGET).jar
-JARCOMPRESS = TRUE
-
-# --- Parameters for the test --------------------------------------
-
-# start an office if the parameter is set for the makefile
-.IF "$(OFFICE)" == ""
-CT_APPEXECCOMMAND =
-.ELSE
-CT_APPEXECCOMMAND = -AppExecutionCommand "$(OFFICE)$/soffice -accept=socket,host=localhost,port=8100;urp;"
-.ENDIF
-
-# test base is java complex
-CT_TESTBASE = -TestBase java_complex
-
-# test looks something like the.full.package.TestName
-CT_TEST = -o $(PACKAGE:s\$/\.\).$(JAVAFILES:b)
-
-# start the runner application
-CT_APP = org.openoffice.Runner
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
-RUN: run
-
-run:
- java -cp $(CLASSPATH) $(CT_APP) $(CT_TESTBASE) $(CT_APPEXECCOMMAND) $(CT_TEST)
-
-
-
diff --git a/svl/qa/complex/passwordcontainer/MasterPasswdHandler.java b/svl/qa/complex/passwordcontainer/MasterPasswdHandler.java
index bf6159ee38c5..8e886f0b8269 100644
--- a/svl/qa/complex/passwordcontainer/MasterPasswdHandler.java
+++ b/svl/qa/complex/passwordcontainer/MasterPasswdHandler.java
@@ -36,12 +36,16 @@ public class MasterPasswdHandler extends WeakBase
XInteractionSupplyAuthentication xAuthentication = null;
for( int i = 0; i < xContinuations.length; ++i ) {
- xAuthentication = (XInteractionSupplyAuthentication)UnoRuntime.queryInterface( XInteractionSupplyAuthentication.class, xContinuations[i]);
+ xAuthentication = UnoRuntime.queryInterface(XInteractionSupplyAuthentication.class, xContinuations[i]);
if( xAuthentication != null )
+ {
break;
+ }
}
if( xAuthentication.canSetPassword() )
- xAuthentication.setPassword( "abcdefghijklmnopqrstuvwxyz123456" );
+ {
+ xAuthentication.setPassword("abcdefghijklmnopqrstuvwxyz123456");
+ }
xAuthentication.select();
}
} else {
diff --git a/svl/qa/complex/passwordcontainer/PasswordContainerUnitTest.java b/svl/qa/complex/passwordcontainer/PasswordContainerUnitTest.java
index 2e3bada4d1bc..ac5c79d134dc 100644
--- a/svl/qa/complex/passwordcontainer/PasswordContainerUnitTest.java
+++ b/svl/qa/complex/passwordcontainer/PasswordContainerUnitTest.java
@@ -27,47 +27,78 @@
package complex.passwordcontainer;
-import complexlib.ComplexTestCase;
import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.uno.UnoRuntime;
-public class PasswordContainerUnitTest extends ComplexTestCase {
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openoffice.test.OfficeConnection;
+import static org.junit.Assert.*;
+
+public class PasswordContainerUnitTest {
private XMultiServiceFactory m_xMSF = null;
- public String[] getTestMethodNames() {
- return new String[] {
- "ExecuteTest01",
- "ExecuteTest02",
- "ExecuteTest03"};
- }
- public String getTestObjectName() {
- return "PasswordContainerUnitTest";
- }
+//// public String[] getTestMethodNames() {
+//// return new String[] {
+//// "ExecuteTest01",
+//// "ExecuteTest02",
+//// "ExecuteTest03"};
+//// }
+// public String getTestObjectName() {
+// return "PasswordContainerUnitTest";
+// }
- public void before() {
+ @Before public void before() {
try {
- m_xMSF = (XMultiServiceFactory) param.getMSF();
+ m_xMSF = getMSF();
} catch (Exception e) {
- failed ("Cannot create service factory!");
+ fail ("Cannot create service factory!");
}
if (m_xMSF == null) {
- failed ("Cannot create service factory!");
+ fail ("Cannot create service factory!");
}
}
- public void after() {
+ @After public void after() {
m_xMSF = null;
}
- public void ExecuteTest01() {
- PasswordContainerTest aTest = new Test01(m_xMSF, log);
- assure("Test01 failed!", aTest.test());
+ @Test public void ExecuteTest01()
+ {
+ PasswordContainerTest aTest = new Test01(m_xMSF);
+ assertTrue("Test01 failed!", aTest.test());
}
- public void ExecuteTest02() {
- PasswordContainerTest aTest = new Test02(m_xMSF, log);
- assure("Test02 failed!", aTest.test());
+ @Test public void ExecuteTest02() {
+ PasswordContainerTest aTest = new Test02(m_xMSF);
+ assertTrue("Test02 failed!", aTest.test());
}
- public void ExecuteTest03() {
- PasswordContainerTest aTest = new Test03(m_xMSF, log);
- assure("Test03 failed!", aTest.test());
+ @Test public void ExecuteTest03() {
+ PasswordContainerTest aTest = new Test03(m_xMSF);
+ assertTrue("Test03 failed!", aTest.test());
}
+
+ private XMultiServiceFactory getMSF()
+ {
+ final XMultiServiceFactory xMSF1 = UnoRuntime.queryInterface(XMultiServiceFactory.class, connection.getComponentContext().getServiceManager());
+ return xMSF1;
+ }
+
+ // setup and close connections
+ @BeforeClass public static void setUpConnection() throws Exception {
+ System.out.println("setUpConnection()");
+ connection.setUp();
+ }
+
+ @AfterClass public static void tearDownConnection()
+ throws InterruptedException, com.sun.star.uno.Exception
+ {
+ System.out.println("tearDownConnection()");
+ connection.tearDown();
+ }
+
+ private static final OfficeConnection connection = new OfficeConnection();
+
}
diff --git a/svl/qa/complex/passwordcontainer/Test01.java b/svl/qa/complex/passwordcontainer/Test01.java
index 1ca17c922669..9367fea4eb7b 100644
--- a/svl/qa/complex/passwordcontainer/Test01.java
+++ b/svl/qa/complex/passwordcontainer/Test01.java
@@ -36,17 +36,17 @@ import com.sun.star.task.XMasterPasswordHandling;
import com.sun.star.uno.UnoRuntime;
-import share.LogWriter;
+// import share.LogWriter;
public class Test01 implements PasswordContainerTest {
XMultiServiceFactory m_xMSF = null;
XPasswordContainer m_xPasswordContainer = null;
TestHelper m_aTestHelper = null;
- public Test01 ( XMultiServiceFactory xMSF, LogWriter aLogWriter )
+ public Test01 ( XMultiServiceFactory xMSF )
{
m_xMSF = xMSF;
- m_aTestHelper = new TestHelper (aLogWriter, "Test01: ");
+ m_aTestHelper = new TestHelper ( "Test01: ");
}
public boolean test() {
@@ -68,9 +68,9 @@ public class Test01 implements PasswordContainerTest {
}
try {
Object oPasswordContainer = m_xMSF.createInstance( "com.sun.star.task.PasswordContainer" );
- XPasswordContainer xContainer = (XPasswordContainer)UnoRuntime.queryInterface(XPasswordContainer.class, oPasswordContainer);
+ XPasswordContainer xContainer = UnoRuntime.queryInterface(XPasswordContainer.class, oPasswordContainer);
Object oHandler = m_xMSF.createInstance( "com.sun.star.task.InteractionHandler" );
- XInteractionHandler xHandler = (XInteractionHandler)UnoRuntime.queryInterface(XInteractionHandler.class, oHandler);
+ XInteractionHandler xHandler = UnoRuntime.queryInterface(XInteractionHandler.class, oHandler);
MasterPasswdHandler aMHandler = new MasterPasswdHandler( xHandler );
// add a set of users and passwords for the same URL for runtime
diff --git a/svl/qa/complex/passwordcontainer/Test02.java b/svl/qa/complex/passwordcontainer/Test02.java
index b77b0fe9bf48..3d0123de3179 100644
--- a/svl/qa/complex/passwordcontainer/Test02.java
+++ b/svl/qa/complex/passwordcontainer/Test02.java
@@ -36,17 +36,16 @@ import com.sun.star.task.UserRecord;
import com.sun.star.uno.UnoRuntime;
-import share.LogWriter;
public class Test02 implements PasswordContainerTest {
XMultiServiceFactory m_xMSF = null;
XPasswordContainer m_xPasswordContainer = null;
TestHelper m_aTestHelper = null;
- public Test02 ( XMultiServiceFactory xMSF, LogWriter aLogWriter )
+ public Test02 ( XMultiServiceFactory xMSF )
{
m_xMSF = xMSF;
- m_aTestHelper = new TestHelper (aLogWriter, "Test02: ");
+ m_aTestHelper = new TestHelper ( "Test02: ");
}
public boolean test() {
@@ -69,11 +68,11 @@ public class Test02 implements PasswordContainerTest {
try {
Object oPasswordContainer = m_xMSF.createInstance("com.sun.star.task.PasswordContainer");
- XPasswordContainer xContainer = (XPasswordContainer)UnoRuntime.queryInterface(XPasswordContainer.class, oPasswordContainer);
+ XPasswordContainer xContainer = UnoRuntime.queryInterface(XPasswordContainer.class, oPasswordContainer);
Object oHandler = m_xMSF.createInstance("com.sun.star.task.InteractionHandler");
- XInteractionHandler xHandler = (XInteractionHandler)UnoRuntime.queryInterface(XInteractionHandler.class, oHandler);
+ XInteractionHandler xHandler = UnoRuntime.queryInterface(XInteractionHandler.class, oHandler);
MasterPasswdHandler aMHandler = new MasterPasswdHandler(xHandler);
- XMasterPasswordHandling xMHandling = (XMasterPasswordHandling)UnoRuntime.queryInterface(XMasterPasswordHandling.class, oPasswordContainer);
+ XMasterPasswordHandling xMHandling = UnoRuntime.queryInterface(XMasterPasswordHandling.class, oPasswordContainer);
// allow the storing of the passwords
xMHandling.allowPersistentStoring(true);
diff --git a/svl/qa/complex/passwordcontainer/Test03.java b/svl/qa/complex/passwordcontainer/Test03.java
index 9e38a55893e0..cf2b3d45cbb0 100644
--- a/svl/qa/complex/passwordcontainer/Test03.java
+++ b/svl/qa/complex/passwordcontainer/Test03.java
@@ -36,17 +36,17 @@ import com.sun.star.task.XInteractionHandler;
import com.sun.star.uno.UnoRuntime;
-import share.LogWriter;
+
public class Test03 implements PasswordContainerTest {
XMultiServiceFactory m_xMSF = null;
XPasswordContainer m_xPasswordContainer = null;
TestHelper m_aTestHelper = null;
- public Test03 ( XMultiServiceFactory xMSF, LogWriter aLogWriter )
+ public Test03 ( XMultiServiceFactory xMSF )
{
m_xMSF = xMSF;
- m_aTestHelper = new TestHelper (aLogWriter, "Test03: ");
+ m_aTestHelper = new TestHelper ( "Test03: ");
}
public boolean test() {
@@ -68,11 +68,11 @@ public class Test03 implements PasswordContainerTest {
try {
Object oPasswordContainer = m_xMSF.createInstance("com.sun.star.task.PasswordContainer");
- XPasswordContainer xContainer = (XPasswordContainer)UnoRuntime.queryInterface(XPasswordContainer.class, oPasswordContainer);
+ XPasswordContainer xContainer = UnoRuntime.queryInterface(XPasswordContainer.class, oPasswordContainer);
Object oHandler = m_xMSF.createInstance("com.sun.star.task.InteractionHandler");
- XInteractionHandler xHandler = (XInteractionHandler)UnoRuntime.queryInterface(XInteractionHandler.class, oHandler);
+ XInteractionHandler xHandler = UnoRuntime.queryInterface(XInteractionHandler.class, oHandler);
MasterPasswdHandler aMHandler = new MasterPasswdHandler(xHandler);
- XMasterPasswordHandling xMHandling = (XMasterPasswordHandling)UnoRuntime.queryInterface(XMasterPasswordHandling.class, oPasswordContainer);
+ XMasterPasswordHandling xMHandling = UnoRuntime.queryInterface(XMasterPasswordHandling.class, oPasswordContainer);
// allow the storing of the passwords
xMHandling.allowPersistentStoring(true);
diff --git a/svl/qa/complex/passwordcontainer/TestHelper.java b/svl/qa/complex/passwordcontainer/TestHelper.java
index 1971b61098f5..c91401e74c91 100644
--- a/svl/qa/complex/passwordcontainer/TestHelper.java
+++ b/svl/qa/complex/passwordcontainer/TestHelper.java
@@ -29,23 +29,23 @@ package complex.passwordcontainer;
import com.sun.star.task.UserRecord;
-import share.LogWriter;
+// import share.LogWriter;
public class TestHelper {
- LogWriter m_aLogWriter;
+ // LogWriter m_aLogWriter;
String m_sTestPrefix;
- public TestHelper( LogWriter aLogWriter, String sTestPrefix ) {
- m_aLogWriter = aLogWriter;
+ public TestHelper( String sTestPrefix ) {
+ // m_aLogWriter = aLogWriter;
m_sTestPrefix = sTestPrefix;
}
public void Error( String sError ) {
- m_aLogWriter.println( m_sTestPrefix + "Error: " + sError );
+ System.out.println( m_sTestPrefix + "Error: " + sError );
}
public void Message( String sMessage ) {
- m_aLogWriter.println( m_sTestPrefix + sMessage );
+ System.out.println( m_sTestPrefix + sMessage );
}
public boolean sameLists(UserRecord aUserList1[], UserRecord aUserList2[]) {
@@ -60,7 +60,9 @@ public class TestHelper {
int j;
for(j = 0; j < aUserList2.length; j++) {
if(!aUserList1[i].UserName.equals(aUserList2[j].UserName))
+ {
continue;
+ }
if(aUserList1[i].Passwords[0].equals(aUserList2[j].Passwords[0])) {
break;
}
diff --git a/svl/qa/complex/passwordcontainer/makefile.mk b/svl/qa/complex/passwordcontainer/makefile.mk
index 57fd4d560f8d..625404682761 100644
--- a/svl/qa/complex/passwordcontainer/makefile.mk
+++ b/svl/qa/complex/passwordcontainer/makefile.mk
@@ -25,63 +25,110 @@
#
#*************************************************************************
-PRJ = ..$/..$/..
-TARGET = PasswordContainerUnitTest
-PRJNAME=svl
-PACKAGE = complex$/passwordcontainer
-
-# --- Settings -----------------------------------------------------
-.INCLUDE: settings.mk
-
-
-#----- compile .java files -----------------------------------------
-
-JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar
-
-JAVAFILES =\
- PasswordContainerUnitTest.java\
- PasswordContainerTest.java\
- TestHelper.java\
- Test01.java\
- Test02.java\
- Test03.java\
- MasterPasswdHandler.java
-
-JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
+.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
+nothing .PHONY:
+.ELSE
-#----- make a jar from compiled files ------------------------------
+PRJ = ../../..
+PRJNAME = svl
+TARGET = qa_complex_passwordcontainer
-MAXLINELENGTH = 100000
+.IF "$(OOO_JUNIT_JAR)" != ""
+PACKAGE = complex/passwordcontainer
-JARCLASSDIRS = $(PACKAGE)
-JARTARGET = $(TARGET).jar
-JARCOMPRESS = TRUE
+# here store only Files which contain a @Test
+JAVATESTFILES = \
+ PasswordContainerUnitTest.java
-# --- Parameters for the test --------------------------------------
-# start an office if the parameter is set for the makefile
-.IF "$(OFFICE)" == ""
-CT_APPEXECCOMMAND =
-.ELSE
-CT_APPEXECCOMMAND = -AppExecutionCommand "$(OFFICE)$/soffice -accept=socket,host=localhost,port=8100;urp;"
-.ENDIF
+# put here all other files
+JAVAFILES = $(JAVATESTFILES) \
+ PasswordContainerTest.java\
+ Test01.java\
+ Test02.java\
+ Test03.java\
+ TestHelper.java\
+ MasterPasswdHandler.java
-# test base is java complex
-CT_TESTBASE = -TestBase java_complex
-# test looks something like the.full.package.TestName
-CT_TEST = -o $(PACKAGE:s\$/\.\).$(JAVAFILES:b)
+JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar
+EXTRAJARFILES = $(OOO_JUNIT_JAR)
-# start the runner application
-CT_APP = org.openoffice.Runner
+# Sample how to debug
+# JAVAIFLAGS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=9003,suspend=y
-# --- Targets ------------------------------------------------------
+.END
+.INCLUDE: settings.mk
.INCLUDE: target.mk
+.INCLUDE: installationtest.mk
-RUN: run
+ALLTAR : javatest
-run:
- +java -cp $(CLASSPATH) $(CT_APP) $(CT_TESTBASE) $(CT_APPEXECCOMMAND) $(CT_TEST)
+.END
+#
+#
+#
+#
+# PRJ = ..$/..$/..
+# TARGET = PasswordContainerUnitTest
+# PRJNAME=svl
+# PACKAGE = complex$/passwordcontainer
+#
+# # --- Settings -----------------------------------------------------
+# .INCLUDE: settings.mk
+#
+#
+# #----- compile .java files -----------------------------------------
+#
+# JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar
+#
+# JAVAFILES =\
+# PasswordContainerUnitTest.java\
+# PasswordContainerTest.java\
+# TestHelper.java\
+# Test01.java\
+# Test02.java\
+# Test03.java\
+# MasterPasswdHandler.java
+#
+# JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
+#
+# #----- make a jar from compiled files ------------------------------
+#
+# MAXLINELENGTH = 100000
+#
+# JARCLASSDIRS = $(PACKAGE)
+# JARTARGET = $(TARGET).jar
+# JARCOMPRESS = TRUE
+#
+# # --- Parameters for the test --------------------------------------
+#
+# # start an office if the parameter is set for the makefile
+# .IF "$(OFFICE)" == ""
+# CT_APPEXECCOMMAND =
+# .ELSE
+# CT_APPEXECCOMMAND = -AppExecutionCommand "$(OFFICE)$/soffice -accept=socket,host=localhost,port=8100;urp;"
+# .ENDIF
+#
+# # test base is java complex
+# CT_TESTBASE = -TestBase java_complex
+#
+# # test looks something like the.full.package.TestName
+# CT_TEST = -o $(PACKAGE:s\$/\.\).$(JAVAFILES:b)
+#
+# # start the runner application
+# CT_APP = org.openoffice.Runner
+#
+# # --- Targets ------------------------------------------------------
+#
+# .INCLUDE: target.mk
+#
+# RUN: run
+#
+# run:
+# +java -cp $(CLASSPATH) $(CT_APP) $(CT_TESTBASE) $(CT_APPEXECCOMMAND) $(CT_TEST)
+#
+#
diff --git a/svl/qa/makefile.mk b/svl/qa/makefile.mk
deleted file mode 100644
index 7e8c7ee795cc..000000000000
--- a/svl/qa/makefile.mk
+++ /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.
-#
-#*************************************************************************
-
-PRJ = ..
-PRJNAME=svl
-TARGET = qa
-
-ENABLE_EXCEPTIONS = true
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-CFLAGSCXX += $(CPPUNIT_CFLAGS)
-
-# BEGIN ----------------------------------------------------------------
-# auto generated Target:job by codegen.pl
-SHL1OBJS= \
- $(SLO)$/test_URIHelper.obj
-
-SHL1TARGET= URIHelper
-SHL1STDLIBS=\
- $(CPPULIB) \
- $(CPPUHELPERLIB) \
- $(SALLIB) \
- $(SVLLIB) \
- $(TOOLSLIB) \
- $(UNOTOOLSLIB) \
- $(TESTSHL2LIB) \
- $(CPPUNITLIB)
-
-SHL1IMPLIB= i$(SHL1TARGET)
-DEF1NAME =$(SHL1TARGET)
-SHL1VERSIONMAP= export.map
-# auto generated Target:job
-# END ------------------------------------------------------------------
-
-#------------------------------- All object files -------------------------------
-# do this here, so we get right dependencies
-# SLOFILES=$(SHL1OBJS)
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-.INCLUDE : _cppunit.mk
-
-# LLA: old stuff
-# USE_DEFFILE = true
-#
-# .INCLUDE: settings.mk
-#
-# .IF "$(OS)" == "WNT"
-# REGEXP = "s/^[\#].*$$//"
-# .ELSE # OS, WNT
-# REGEXP = 's/^[\#].*$$//'
-# .ENDIF # OS, WNT
-#
-# SHL1TARGET = URIHelper
-# SHL1OBJS = \
-# $(SLO)$/test_URIHelper.obj
-# SHL1STDLIBS = \
-# $(CPPULIB) \
-# $(CPPUHELPERLIB) \
-# $(SALLIB) \
-# $(SVTOOLLIB) \
-# $(TOOLSLIB) \
-# $(UNOTOOLSLIB)
-#
-# DEF1NAME = $(SHL1TARGET)
-# DEF1EXPORTFILE = $(MISC)$/$(SHL1TARGET).dxp
-#
-# .INCLUDE: target.mk
-#
-# $(MISC)$/$(SHL1TARGET).dxp: sce$/$(SHL1TARGET).sce
-# + $(TYPE) $< | sed $(REGEXP) > $@
-# + $(TYPE) $@ | sed "s/^/test_/" > $(MISC)$/$(SHL1TARGET).tst
-# + $(TYPE) $(MISC)$/$(SHL1TARGET).tst | sed "/test_./ w $@"
diff --git a/svl/source/config/makefile.mk b/svl/source/config/makefile.mk
deleted file mode 100644
index beb696c0feaf..000000000000
--- a/svl/source/config/makefile.mk
+++ /dev/null
@@ -1,52 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-PRJ=..$/..
-
-PRJNAME=svl
-TARGET=config
-
-ENABLE_EXCEPTIONS := TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/svl.pmk
-
-# --- Files --------------------------------------------------------
-
-SLOFILES= \
- $(SLO)$/asiancfg.obj \
- $(SLO)$/cjkoptions.obj \
- $(SLO)$/ctloptions.obj \
- $(SLO)$/srchcfg.obj \
- $(SLO)$/itemholder2.obj \
- $(SLO)$/languageoptions.obj
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/svl/source/filepicker/makefile.mk b/svl/source/filepicker/makefile.mk
deleted file mode 100644
index a4c97ea41aa1..000000000000
--- a/svl/source/filepicker/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=svl
-TARGET=filepicker
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings -----------------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/svl.pmk
-
-# --- Files --------------------------------------------------------------
-
-SLOFILES =\
- $(SLO)$/pickerhelper.obj \
- $(SLO)$/pickerhistory.obj
-
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/svl/source/filepicker/pickerhelper.cxx b/svl/source/filepicker/pickerhelper.cxx
deleted file mode 100644
index 72096c1bc56a..000000000000
--- a/svl/source/filepicker/pickerhelper.cxx
+++ /dev/null
@@ -1,99 +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_svl.hxx"
-
-#include "pickerhelper.hxx"
-#include "rtl/ustring.hxx"
-#include "com/sun/star/ui/dialogs/XFilePicker.hpp"
-#include "com/sun/star/ui/dialogs/XFolderPicker.hpp"
-#include "com/sun/star/beans/XPropertySet.hpp"
-#include "com/sun/star/beans/XPropertySetInfo.hpp"
-#include "com/sun/star/uno/Any.hxx"
-#include "tools/debug.hxx"
-
-namespace css = com::sun::star;
-
-using css::uno::Reference;
-using rtl::OUString;
-
-namespace svt
-{
- void SetDialogHelpId(
- Reference < css::ui::dialogs::XFilePicker > _mxFileDlg, sal_Int32 _nHelpId )
- {
- try
- {
- // does the dialog haver a help URL property?
- Reference< css::beans::XPropertySet > xDialogProps( _mxFileDlg, css::uno::UNO_QUERY );
- Reference< css::beans::XPropertySetInfo > xInfo;
- if( xDialogProps.is() )
- xInfo = xDialogProps->getPropertySetInfo( );
-
- const OUString sHelpURLPropertyName( RTL_CONSTASCII_USTRINGPARAM( "HelpURL" ) );
-
- if( xInfo.is() && xInfo->hasPropertyByName( sHelpURLPropertyName ) )
- { // yep
- OUString sId( RTL_CONSTASCII_USTRINGPARAM( "HID:" ) );
- sId += OUString::valueOf( _nHelpId );
- xDialogProps->setPropertyValue( sHelpURLPropertyName, css::uno::makeAny( sId ) );
- }
- }
- catch( const css::uno::Exception& )
- {
- DBG_ERROR( "svt::SetDialogHelpId(): caught an exception while setting the help id!" );
- }
- }
-
- void SetDialogHelpId(
- Reference< css::ui::dialogs::XFolderPicker > _mxFileDlg, sal_Int32 _nHelpId )
- {
- try
- {
- // does the dialog haver a help URL property?
- Reference< css::beans::XPropertySet > xDialogProps( _mxFileDlg, css::uno::UNO_QUERY );
- Reference< css::beans::XPropertySetInfo > xInfo;
- if( xDialogProps.is() )
- xInfo = xDialogProps->getPropertySetInfo( );
-
- const OUString sHelpURLPropertyName( RTL_CONSTASCII_USTRINGPARAM( "HelpURL" ) );
-
- if( xInfo.is() && xInfo->hasPropertyByName( sHelpURLPropertyName ) )
- { // yep
- OUString sId( RTL_CONSTASCII_USTRINGPARAM( "HID:" ) );
- sId += OUString::valueOf( _nHelpId );
- xDialogProps->setPropertyValue( sHelpURLPropertyName, css::uno::makeAny( sId ) );
- }
- }
- catch( const css::uno::Exception& )
- {
- DBG_ERROR( "svt::SetDialogHelpId(): caught an exception while setting the help id!" );
- }
- }
-}
-
diff --git a/svl/source/filepicker/pickerhistory.cxx b/svl/source/filepicker/pickerhistory.cxx
index 4c372c48163d..27a217f1688c 100644
--- a/svl/source/filepicker/pickerhistory.cxx
+++ b/svl/source/filepicker/pickerhistory.cxx
@@ -27,8 +27,8 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svl.hxx"
-#include "pickerhistory.hxx"
-#include "pickerhistoryaccess.hxx"
+#include <svl/pickerhistory.hxx>
+#include <svl/pickerhistoryaccess.hxx>
#include <cppuhelper/weakref.hxx>
#include <vector>
diff --git a/svl/source/fsstor/fsfactory.cxx b/svl/source/fsstor/fsfactory.cxx
index 298b6f555e2a..62fc88f6053a 100644
--- a/svl/source/fsstor/fsfactory.cxx
+++ b/svl/source/fsstor/fsfactory.cxx
@@ -240,30 +240,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment (
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
-SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo (
- void * /* pServiceManager */, void * pRegistryKey)
-{
- if (pRegistryKey)
- {
- uno::Reference< registry::XRegistryKey > xRegistryKey (
- reinterpret_cast< registry::XRegistryKey*>(pRegistryKey));
-
- uno::Reference< registry::XRegistryKey > xNewKey;
- xNewKey = xRegistryKey->createKey(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) +
- FSStorageFactory::impl_staticGetImplementationName() +
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES")));
-
- const uno::Sequence< ::rtl::OUString > aServices (
- FSStorageFactory::impl_staticGetSupportedServiceNames());
- for( sal_Int32 i = 0; i < aServices.getLength(); i++ )
- xNewKey->createKey( aServices.getConstArray()[i] );
-
- return sal_True;
- }
- return sal_False;
-}
-
SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory (
const sal_Char * pImplementationName, void * pServiceManager, void * /* pRegistryKey */)
{
diff --git a/svl/source/fsstor/fsstorage.component b/svl/source/fsstor/fsstorage.component
new file mode 100644
index 000000000000..3ef0be825972
--- /dev/null
+++ b/svl/source/fsstor/fsstorage.component
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.embed.FileSystemStorageFactory">
+ <service name="com.sun.star.comp.embed.FileSystemStorageFactory"/>
+ <service name="com.sun.star.embed.FileSystemStorageFactory"/>
+ </implementation>
+</component>
diff --git a/svl/source/fsstor/makefile.mk b/svl/source/fsstor/makefile.mk
deleted file mode 100644
index dc91814772f9..000000000000
--- a/svl/source/fsstor/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=svl
-TARGET=fsstorage.uno
-LIBTARGET=NO
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings ----------------------------------
-
-.INCLUDE : settings.mk
-DLLPRE=
-
-# --- Files -------------------------------------
-
-SLOFILES=\
- $(SLO)$/fsfactory.obj \
- $(SLO)$/fsstorage.obj \
- $(SLO)$/oinputstreamcontainer.obj \
- $(SLO)$/ostreamcontainer.obj
-
-SHL1TARGET= $(TARGET)
-SHL1IMPLIB= i$(TARGET)
-SHL1OBJS= $(SLOFILES)
-SHL1STDLIBS=\
- $(UNOTOOLSLIB) \
- $(TOOLSLIB) \
- $(COMPHELPERLIB) \
- $(UCBHELPERLIB) \
- $(CPPUHELPERLIB) \
- $(CPPULIB) \
- $(SALLIB)
-
-SHL1VERSIONMAP=$(SOLARENV)/src/component.map
-SHL1DEF= $(MISC)$/$(SHL1TARGET).def
-DEF1NAME= $(SHL1TARGET)
-
-# --- Targets ----------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/svl/source/inc/poolio.hxx b/svl/source/inc/poolio.hxx
index 70122a5b1998..79cbbc463700 100644
--- a/svl/source/inc/poolio.hxx
+++ b/svl/source/inc/poolio.hxx
@@ -25,7 +25,8 @@
*
************************************************************************/
#include <svl/brdcst.hxx>
-
+#include <boost/shared_ptr.hpp>
+#include <deque>
#ifndef DELETEZ
#define DELETEZ(pPtr) { delete pPtr; pPtr = 0; }
@@ -53,16 +54,17 @@ struct SfxPoolVersion_Impl
{}
};
-SV_DECL_PTRARR( SfxPoolItemArrayBase_Impl, SfxPoolItem*, 0, 5 )
-SV_DECL_PTRARR_DEL( SfxPoolVersionArr_Impl, SfxPoolVersion_Impl*, 0, 2 )
+typedef std::deque<SfxPoolItem*> SfxPoolItemArrayBase_Impl;
+
+typedef boost::shared_ptr< SfxPoolVersion_Impl > SfxPoolVersion_ImplPtr;
+typedef std::deque< SfxPoolVersion_ImplPtr > SfxPoolVersionArr_Impl;
struct SfxPoolItemArray_Impl: public SfxPoolItemArrayBase_Impl
{
- USHORT nFirstFree;
+ size_t nFirstFree;
- SfxPoolItemArray_Impl (USHORT nInitSize = 0)
- : SfxPoolItemArrayBase_Impl( nInitSize ),
- nFirstFree( 0 )
+ SfxPoolItemArray_Impl ()
+ : nFirstFree( 0 )
{}
};
@@ -96,7 +98,8 @@ struct SfxItemPool_Impl
void DeleteItems()
{
- delete[] ppPoolItems; ppPoolItems = 0;
+ delete[] ppPoolItems;
+ ppPoolItems = 0;
}
};
diff --git a/svl/source/items/itempool.cxx b/svl/source/items/itempool.cxx
index 5c5f106a1c36..d8bdeb330776 100644
--- a/svl/source/items/itempool.cxx
+++ b/svl/source/items/itempool.cxx
@@ -38,14 +38,6 @@
#include <svl/brdcst.hxx>
#include <svl/smplhint.hxx>
#include "poolio.hxx"
-#include <algorithm>
-
-// STATIC DATA -----------------------------------------------------------
-
-
-//========================================================================
-
-SV_IMPL_PTRARR( SfxPoolVersionArr_Impl, SfxPoolVersion_Impl* );
//========================================================================
@@ -275,13 +267,12 @@ SfxItemPool::SfxItemPool
(*( ppPoolDefaults + n ))->SetKind( SFX_ITEMS_POOLDEFAULT );
}
- // Version-Map kopieren
- USHORT nVerCount = rPool.pImp->aVersions.Count();
- for ( USHORT nVer = 0; nVer < nVerCount; ++nVer )
+ // Copy Version-Map
+ for ( size_t nVer = 0; nVer < rPool.pImp->aVersions.size(); ++nVer )
{
- const SfxPoolVersion_Impl *pOld = rPool.pImp->aVersions.GetObject(nVer);
- const SfxPoolVersion_Impl *pNew = new SfxPoolVersion_Impl( *pOld );
- pImp->aVersions.Insert( pNew, nVer );
+ const SfxPoolVersion_ImplPtr pOld = rPool.pImp->aVersions[nVer];
+ SfxPoolVersion_ImplPtr pNew = SfxPoolVersion_ImplPtr( new SfxPoolVersion_Impl( *pOld ) );
+ pImp->aVersions.push_back( pNew );
}
// Verkettung wiederherstellen
@@ -454,9 +445,8 @@ void SfxItemPool::SetSecondaryPool( SfxItemPool *pPool )
pSecondary->pImp->ppPoolItems + n;
if ( *ppItemArr )
{
- SfxPoolItem** ppHtArr =
- (SfxPoolItem**)(*ppItemArr)->GetData();
- for( USHORT i = (*ppItemArr)->Count(); i; ++ppHtArr, --i )
+ SfxPoolItemArrayBase_Impl::iterator ppHtArr = (*ppItemArr)->begin();
+ for( size_t i = (*ppItemArr)->size(); i; ++ppHtArr, --i )
if ( !(*ppHtArr) )
{
DBG_ERROR( "old secondary pool must be empty" );
@@ -582,8 +572,8 @@ void SfxItemPool::Delete()
{
if ( *ppItemArr )
{
- SfxPoolItem** ppHtArr = (SfxPoolItem**)(*ppItemArr)->GetData();
- for ( USHORT n = (*ppItemArr)->Count(); n; --n, ++ppHtArr )
+ SfxPoolItemArrayBase_Impl::iterator ppHtArr = (*ppItemArr)->begin();
+ for ( size_t n = (*ppItemArr)->size(); n; --n, ++ppHtArr )
if (*ppHtArr)
{
#ifdef DBG_UTIL
@@ -614,8 +604,8 @@ void SfxItemPool::Delete()
{
if ( *ppItemArr )
{
- SfxPoolItem** ppHtArr = (SfxPoolItem**)(*ppItemArr)->GetData();
- for ( USHORT n = (*ppItemArr)->Count(); n; --n, ++ppHtArr )
+ SfxPoolItemArrayBase_Impl::iterator ppHtArr = (*ppItemArr)->begin();
+ for ( size_t n = (*ppItemArr)->size(); n; --n, ++ppHtArr )
if (*ppHtArr)
{
#ifdef DBG_UTIL
@@ -663,8 +653,8 @@ void SfxItemPool::Cleanup()
((*ppDefaultItem && (*ppDefaultItem)->ISA(SfxSetItem)) ||
(*ppStaticDefaultItem)->ISA(SfxSetItem)) )
{
- SfxPoolItem** ppHtArr = (SfxPoolItem**)(*ppItemArr)->GetData();
- for ( USHORT n = (*ppItemArr)->Count(); n; --n, ++ppHtArr )
+ SfxPoolItemArrayBase_Impl::iterator ppHtArr = (*ppItemArr)->begin();
+ for ( size_t n = (*ppItemArr)->size(); n; --n, ++ppHtArr )
if ( *ppHtArr && !(*ppHtArr)->GetRefCount() )
{
DELETEZ(*ppHtArr);
@@ -681,8 +671,8 @@ void SfxItemPool::Cleanup()
{
if ( *ppItemArr )
{
- SfxPoolItem** ppHtArr = (SfxPoolItem**)(*ppItemArr)->GetData();
- for ( USHORT n = (*ppItemArr)->Count(); n; --n, ++ppHtArr )
+ SfxPoolItemArrayBase_Impl::iterator ppHtArr = (*ppItemArr)->begin();
+ for ( size_t n = (*ppItemArr)->size(); n; --n, ++ppHtArr )
if ( *ppHtArr && !(*ppHtArr)->GetRefCount() )
DELETEZ( *ppHtArr );
}
@@ -782,15 +772,16 @@ const SfxPoolItem& SfxItemPool::Put( const SfxPoolItem& rItem, USHORT nWhich )
if( !*ppItemArr )
*ppItemArr = new SfxPoolItemArray_Impl;
- SfxPoolItem **ppFree = 0;
- SfxPoolItem** ppHtArray = (SfxPoolItem**)(*ppItemArr)->GetData();
+ SfxPoolItemArrayBase_Impl::iterator ppFree;
+ BOOL ppFreeIsSet = FALSE;
+ SfxPoolItemArrayBase_Impl::iterator ppHtArray = (*ppItemArr)->begin();
if ( IsItemFlag_Impl( nIndex, SFX_ITEM_POOLABLE ) )
{
// wenn es ueberhaupt gepoolt ist, koennte es schon drin sein
if ( IsPooledItem(&rItem) )
{
// 1. Schleife: teste ob der Pointer vorhanden ist.
- for( USHORT n = (*ppItemArr)->Count(); n; ++ppHtArray, --n )
+ for( size_t n = (*ppItemArr)->size(); n; ++ppHtArray, --n )
if( &rItem == (*ppHtArray) )
{
AddRef( **ppHtArray );
@@ -799,8 +790,8 @@ const SfxPoolItem& SfxItemPool::Put( const SfxPoolItem& rItem, USHORT nWhich )
}
// 2. Schleife: dann muessen eben die Attribute verglichen werden
- USHORT n;
- for ( n = (*ppItemArr)->Count(), ppHtArray = (SfxPoolItem**)(*ppItemArr)->GetData();
+ size_t n;
+ for ( n = (*ppItemArr)->size(), ppHtArray = (*ppItemArr)->begin();
n; ++ppHtArray, --n )
{
if ( *ppHtArray )
@@ -812,22 +803,26 @@ const SfxPoolItem& SfxItemPool::Put( const SfxPoolItem& rItem, USHORT nWhich )
}
}
else
- if ( !ppFree )
+ if ( ppFreeIsSet == FALSE )
+ {
ppFree = ppHtArray;
+ ppFreeIsSet = TRUE;
+ }
}
}
else
{
// freien Platz suchen
- SfxPoolItem** ppHtArr;
- USHORT n, nCount = (*ppItemArr)->Count();
+ SfxPoolItemArrayBase_Impl::iterator ppHtArr;
+ size_t n, nCount = (*ppItemArr)->size();
for ( n = (*ppItemArr)->nFirstFree,
- ppHtArr = (SfxPoolItem**)(*ppItemArr)->GetData() + n;
+ ppHtArr = (*ppItemArr)->begin() + n;
n < nCount;
++ppHtArr, ++n )
if ( !*ppHtArr )
{
ppFree = ppHtArr;
+ ppFreeIsSet = TRUE;
break;
}
@@ -853,9 +848,9 @@ const SfxPoolItem& SfxItemPool::Put( const SfxPoolItem& rItem, USHORT nWhich )
#endif
#endif
AddRef( *pNewItem, pImp->nInitRefCount );
- const SfxPoolItem* pTemp = pNewItem;
- if ( !ppFree )
- (*ppItemArr)->Insert( pTemp, (*ppItemArr)->Count() );
+ SfxPoolItem* pTemp = pNewItem;
+ if ( ppFreeIsSet == FALSE )
+ (*ppItemArr)->push_back( pTemp );
else
{
DBG_ASSERT( *ppFree == 0, "using surrogate in use" );
@@ -915,8 +910,8 @@ void SfxItemPool::Remove( const SfxPoolItem& rItem )
// Item im eigenen Pool suchen
SfxPoolItemArray_Impl** ppItemArr = (pImp->ppPoolItems + nIndex);
SFX_ASSERT( *ppItemArr, rItem.Which(), "removing Item not in Pool" );
- SfxPoolItem** ppHtArr = (SfxPoolItem**)(*ppItemArr)->GetData();
- for( USHORT n = (*ppItemArr)->Count(); n; ++ppHtArr, --n )
+ SfxPoolItemArrayBase_Impl::iterator ppHtArr = (*ppItemArr)->begin();
+ for( size_t n = (*ppItemArr)->size(); n; ++ppHtArr, --n )
if( *ppHtArr == &rItem )
{
if ( (*ppHtArr)->GetRefCount() ) //!
@@ -928,7 +923,7 @@ void SfxItemPool::Remove( const SfxPoolItem& rItem )
}
// ggf. kleinstmoegliche freie Position merken
- USHORT nPos = (*ppItemArr)->Count() - n;
+ size_t nPos = (*ppItemArr)->size() - n;
if ( (*ppItemArr)->nFirstFree > nPos )
(*ppItemArr)->nFirstFree = nPos;
@@ -1009,24 +1004,24 @@ void SfxItemPool::FillItemIdRanges_Impl( USHORT*& pWhichRanges ) const
// -----------------------------------------------------------------------
-const SfxPoolItem *SfxItemPool::GetItem(USHORT nWhich, USHORT nOfst) const
+const SfxPoolItem *SfxItemPool::GetItem2(USHORT nWhich, sal_uInt32 nOfst) const
{
DBG_CHKTHIS(SfxItemPool, 0);
if ( !IsInRange(nWhich) )
{
if ( pSecondary )
- return pSecondary->GetItem( nWhich, nOfst );
+ return pSecondary->GetItem2( nWhich, nOfst );
SFX_ASSERT( 0, nWhich, "unknown Which-Id - cannot resolve surrogate" );
return 0;
}
// dflt-Attribut?
- if ( nOfst == SFX_ITEMS_STATICDEFAULT )
+ if ( nOfst == SFX_ITEMS_DEFAULT )
return *(ppStaticDefaults + GetIndex_Impl(nWhich));
SfxPoolItemArray_Impl* pItemArr = *(pImp->ppPoolItems + GetIndex_Impl(nWhich));
- if( pItemArr && nOfst < pItemArr->Count() )
+ if( pItemArr && nOfst < pItemArr->size() )
return (*pItemArr)[nOfst];
return 0;
@@ -1034,21 +1029,21 @@ const SfxPoolItem *SfxItemPool::GetItem(USHORT nWhich, USHORT nOfst) const
// -----------------------------------------------------------------------
-USHORT SfxItemPool::GetItemCount(USHORT nWhich) const
+sal_uInt32 SfxItemPool::GetItemCount2(USHORT nWhich) const
{
DBG_CHKTHIS(SfxItemPool, 0);
if ( !IsInRange(nWhich) )
{
if ( pSecondary )
- return pSecondary->GetItemCount( nWhich );
+ return pSecondary->GetItemCount2( nWhich );
SFX_ASSERT( 0, nWhich, "unknown Which-Id - cannot resolve surrogate" );
return 0;
}
SfxPoolItemArray_Impl* pItemArr = *(pImp->ppPoolItems + GetIndex_Impl(nWhich));
if ( pItemArr )
- return pItemArr->Count();
+ return pItemArr->size();
return 0;
}
diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx
index a79e5195187a..540db537be46 100644
--- a/svl/source/items/itemset.cxx
+++ b/svl/source/items/itemset.cxx
@@ -34,9 +34,6 @@
#include <cstdarg>
#endif
-#ifndef GCC
-#endif
-
#define _SVSTDARR_USHORTS
#define _SVSTDARR_ULONGS
@@ -44,7 +41,7 @@
#include <svl/itemset.hxx>
#include <svl/itempool.hxx>
#include <svl/itemiter.hxx>
-#include "whiter.hxx"
+#include <svl/whiter.hxx>
#include <svl/nranges.hxx>
#include "whassert.hxx"
diff --git a/svl/source/items/makefile.mk b/svl/source/items/makefile.mk
deleted file mode 100644
index da602391239a..000000000000
--- a/svl/source/items/makefile.mk
+++ /dev/null
@@ -1,84 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..
-PRJNAME=svl
-TARGET=items
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/svl.pmk
-
-# --- Files --------------------------------------------------------
-
-SLOFILES=\
- $(SLO)$/aeitem.obj \
- $(SLO)$/cenumitm.obj \
- $(SLO)$/cintitem.obj \
- $(SLO)$/cntwall.obj \
- $(SLO)$/ctypeitm.obj \
- $(SLO)$/custritm.obj \
- $(SLO)$/dateitem.obj \
- $(SLO)$/eitem.obj \
- $(SLO)$/flagitem.obj \
- $(SLO)$/globalnameitem.obj \
- $(SLO)$/ilstitem.obj \
- $(SLO)$/imageitm.obj \
- $(SLO)$/intitem.obj \
- $(SLO)$/itemiter.obj \
- $(SLO)$/itempool.obj \
- $(SLO)$/itemprop.obj \
- $(SLO)$/itemset.obj \
- $(SLO)$/lckbitem.obj \
- $(SLO)$/macitem.obj \
- $(SLO)$/poolcach.obj \
- $(SLO)$/poolio.obj \
- $(SLO)$/poolitem.obj \
- $(SLO)$/ptitem.obj \
- $(SLO)$/rectitem.obj \
- $(SLO)$/rngitem.obj \
- $(SLO)$/sfontitm.obj \
- $(SLO)$/sitem.obj \
- $(SLO)$/slstitm.obj \
- $(SLO)$/srchitem.obj \
- $(SLO)$/stritem.obj \
- $(SLO)$/style.obj \
- $(SLO)$/stylepool.obj \
- $(SLO)$/szitem.obj \
- $(SLO)$/visitem.obj \
- $(SLO)$/whiter.obj
-
-SRS1NAME=$(TARGET)
-SRC1FILES=\
- cstitem.src
-
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/svl/source/items/poolcach.cxx b/svl/source/items/poolcach.cxx
index b918add10f0f..ab2bdfb91c84 100644
--- a/svl/source/items/poolcach.cxx
+++ b/svl/source/items/poolcach.cxx
@@ -35,24 +35,12 @@
#include <svl/itempool.hxx>
#include <svl/itemset.hxx>
-#include "poolcach.hxx"
+#include <svl/poolcach.hxx>
// STATIC DATA -----------------------------------------------------------
DBG_NAME(SfxItemPoolCache)
-
-//------------------------------------------------------------------------
-
-struct SfxItemModifyImpl
-{
- const SfxSetItem *pOrigItem;
- SfxSetItem *pPoolItem;
-};
-
-SV_DECL_VARARR( SfxItemModifyArr_Impl, SfxItemModifyImpl, 8, 8 )
-SV_IMPL_VARARR( SfxItemModifyArr_Impl, SfxItemModifyImpl);
-
//------------------------------------------------------------------------
SfxItemPoolCache::SfxItemPoolCache( SfxItemPool *pItemPool,
@@ -84,7 +72,7 @@ SfxItemPoolCache::SfxItemPoolCache( SfxItemPool *pItemPool,
SfxItemPoolCache::~SfxItemPoolCache()
{
DBG_DTOR(SfxItemPoolCache, 0);
- for ( USHORT nPos = 0; nPos < pCache->Count(); ++nPos ) {
+ for ( size_t nPos = 0; nPos < pCache->size(); ++nPos ) {
pPool->Remove( *(*pCache)[nPos].pPoolItem );
pPool->Remove( *(*pCache)[nPos].pOrigItem );
}
@@ -103,8 +91,8 @@ const SfxSetItem& SfxItemPoolCache::ApplyTo( const SfxSetItem &rOrigItem, BOOL b
DBG_ASSERT( IsDefaultItem( &rOrigItem ) || IsPooledItem( &rOrigItem ),
"original not in pool" );
- // Suchen, ob diese Transformations schon einmal vorkam
- for ( USHORT nPos = 0; nPos < pCache->Count(); ++nPos )
+ // Find whether this Transformations ever occurred
+ for ( size_t nPos = 0; nPos < pCache->size(); ++nPos )
{
SfxItemModifyImpl &rMapEntry = (*pCache)[nPos];
if ( rMapEntry.pOrigItem == &rOrigItem )
@@ -143,7 +131,7 @@ const SfxSetItem& SfxItemPoolCache::ApplyTo( const SfxSetItem &rOrigItem, BOOL b
SfxItemModifyImpl aModify;
aModify.pOrigItem = &rOrigItem;
aModify.pPoolItem = (SfxSetItem*) pNewPoolItem;
- pCache->Insert( aModify, pCache->Count() );
+ pCache->push_back( aModify );
DBG_ASSERT( !pItemToPut ||
&pNewPoolItem->GetItemSet().Get( pItemToPut->Which() ) == pItemToPut,
diff --git a/svl/source/items/poolio.cxx b/svl/source/items/poolio.cxx
index 6aeb64d76d1a..a3d87ca76e5d 100644
--- a/svl/source/items/poolio.cxx
+++ b/svl/source/items/poolio.cxx
@@ -178,10 +178,10 @@ SvStream &SfxItemPool::Store(SvStream &rStream) const
// Version-Maps
{
SfxMultiVarRecordWriter aVerRec( &rStream, SFX_ITEMPOOL_REC_VERSIONMAP, 0 );
- for ( USHORT nVerNo = 0; nVerNo < pImp->aVersions.Count(); ++nVerNo )
+ for ( size_t nVerNo = 0; nVerNo < pImp->aVersions.size(); ++nVerNo )
{
aVerRec.NewContent();
- SfxPoolVersion_Impl *pVer = pImp->aVersions[nVerNo];
+ SfxPoolVersion_ImplPtr pVer = pImp->aVersions[nVerNo];
rStream << pVer->_nVer << pVer->_nStart << pVer->_nEnd;
USHORT nCount = pVer->_nEnd - pVer->_nStart + 1;
USHORT nNewWhich = 0;
@@ -207,7 +207,7 @@ SvStream &SfxItemPool::Store(SvStream &rStream) const
SfxPoolItemArray_Impl **pArr = pImp->ppPoolItems;
SfxPoolItem **ppDefItem = ppStaticDefaults;
const USHORT nSize = GetSize_Impl();
- for ( USHORT i = 0; i < nSize && !rStream.GetError(); ++i, ++pArr, ++ppDefItem )
+ for ( size_t i = 0; i < nSize && !rStream.GetError(); ++i, ++pArr, ++ppDefItem )
{
// Version des Items feststellen
USHORT nItemVersion = (*ppDefItem)->GetVersion( _nFileFormatVersion );
@@ -229,19 +229,19 @@ SvStream &SfxItemPool::Store(SvStream &rStream) const
aWhichIdsRec.NewContent(nSlotId, 0);
rStream << (*ppDefItem)->Which();
rStream << nItemVersion;
- const USHORT nCount = (*pArr)->Count();
- DBG_ASSERT(nCount, "ItemArr ist leer");
+ const sal_uInt32 nCount = ::std::min<size_t>( (*pArr)->size(), SAL_MAX_UINT32 );
+ DBG_ASSERT(nCount, "ItemArr is empty");
rStream << nCount;
// Items an sich schreiben
SfxMultiMixRecordWriter aItemsRec( &rStream, SFX_ITEMPOOL_REC_ITEMS, 0 );
- for ( USHORT j = 0; j < nCount; ++j )
+ for ( size_t j = 0; j < nCount; ++j )
{
// Item selbst besorgen
- const SfxPoolItem *pItem = (*pArr)->GetObject(j);
+ const SfxPoolItem *pItem = (*pArr)->operator[](j);
if ( pItem && pItem->GetRefCount() ) //! siehe anderes MI-REF
{
- aItemsRec.NewContent(j, 'X' );
+ aItemsRec.NewContent((USHORT)j, 'X' );
if ( pItem->GetRefCount() == SFX_ITEMS_SPECIAL )
rStream << (USHORT) pItem->GetKind();
@@ -353,8 +353,8 @@ void SfxItemPool::LoadCompleted()
if ( *ppItemArr )
{
// "uber alle Items mit dieser Which-Id iterieren
- SfxPoolItem** ppHtArr = (SfxPoolItem**)(*ppItemArr)->GetData();
- for( USHORT n = (*ppItemArr)->Count(); n; --n, ++ppHtArr )
+ SfxPoolItemArrayBase_Impl::iterator ppHtArr = (*ppItemArr)->begin();
+ for( size_t n = (*ppItemArr)->size(); n; --n, ++ppHtArr )
if (*ppHtArr)
{
#ifdef DBG_UTIL
@@ -382,15 +382,15 @@ void SfxItemPool::LoadCompleted()
//============================================================================
// This had to be moved to a method of its own to keep Solaris GCC happy:
void SfxItemPool::readTheItems (
- SvStream & rStream, USHORT nItemCount, USHORT nVersion,
+ SvStream & rStream, sal_uInt32 nItemCount, USHORT nVersion,
SfxPoolItem * pDefItem, SfxPoolItemArray_Impl ** ppArr)
{
SfxMultiRecordReader aItemsRec( &rStream, SFX_ITEMPOOL_REC_ITEMS );
- SfxPoolItemArray_Impl *pNewArr = new SfxPoolItemArray_Impl( nItemCount );
+ SfxPoolItemArray_Impl *pNewArr = new SfxPoolItemArray_Impl();
SfxPoolItem *pItem = 0;
- USHORT n, nLastSurrogate = USHORT(-1);
+ ULONG n, nLastSurrogate = ULONG(-1);
while (aItemsRec.GetContent())
{
// n"achstes Surrogat holen
@@ -400,7 +400,7 @@ void SfxItemPool::readTheItems (
// fehlende auff"ullen
for ( pItem = 0, n = nLastSurrogate+1; n < nSurrogate; ++n )
- pNewArr->C40_INSERT(SfxPoolItem, pItem, n);
+ pNewArr->push_back( (SfxPoolItem*) pItem );
nLastSurrogate = nSurrogate;
// Ref-Count und Item laden
@@ -408,7 +408,7 @@ void SfxItemPool::readTheItems (
rStream >> nRef;
pItem = pDefItem->Create(rStream, nVersion);
- pNewArr->C40_INSERT(SfxPoolItem, pItem, nSurrogate);
+ pNewArr->push_back( (SfxPoolItem*) pItem );
if ( !bPersistentRefCounts )
// bis <SfxItemPool::LoadCompleted()> festhalten
@@ -424,33 +424,32 @@ void SfxItemPool::readTheItems (
// fehlende auff"ullen
for ( pItem = 0, n = nLastSurrogate+1; n < nItemCount; ++n )
- pNewArr->C40_INSERT(SfxPoolItem, pItem, n);
+ pNewArr->push_back( (SfxPoolItem*) pItem );
SfxPoolItemArray_Impl *pOldArr = *ppArr;
*ppArr = pNewArr;
// die Items merken, die schon im Pool sind
- int bEmpty = TRUE;
+ bool bEmpty = true;
if ( 0 != pOldArr )
- for ( n = 0; bEmpty && n < pOldArr->Count(); ++n )
- bEmpty = pOldArr->GetObject(n) == 0;
+ for ( n = 0; bEmpty && n < pOldArr->size(); ++n )
+ bEmpty = pOldArr->operator[](n) == 0;
DBG_ASSERTWARNING( bEmpty, "loading non-empty pool" );
if ( !bEmpty )
{
// f"ur alle alten suchen, ob ein gleiches neues existiert
- for ( USHORT nOld = 0; nOld < pOldArr->Count(); ++nOld )
+ for ( size_t nOld = 0; nOld < pOldArr->size(); ++nOld )
{
SfxPoolItem *pOldItem = (*pOldArr)[nOld];
if ( pOldItem )
{
- USHORT nFree = USHRT_MAX;
- int bFound = FALSE;
- USHORT nCount = (*ppArr)->Count();
- for ( USHORT nNew = nCount; !bFound && nNew--; )
+ sal_uInt32 nFree = SAL_MAX_UINT32;
+ bool bFound = false;
+ for ( size_t nNew = (*ppArr)->size(); nNew--; )
{
// geladenes Item
SfxPoolItem *&rpNewItem =
- (SfxPoolItem*&)(*ppArr)->GetData()[nNew];
+ (SfxPoolItem*&)(*ppArr)->operator[](nNew);
// surrogat unbenutzt?
if ( !rpNewItem )
@@ -464,17 +463,18 @@ void SfxItemPool::readTheItems (
SetRefCount( *rpNewItem, 0 );
delete rpNewItem;
rpNewItem = pOldItem;
- bFound = TRUE;
+ bFound = true;
+ break;
}
}
// vorhervorhandene, nicht geladene uebernehmen
if ( !bFound )
{
- if ( nFree != USHRT_MAX )
- (SfxPoolItem*&)(*ppArr)->GetData()[nFree] = pOldItem;
+ if ( nFree != SAL_MAX_UINT32 )
+ (SfxPoolItem*&)(*ppArr)->operator[](nFree) = pOldItem;
else
- (*ppArr)->C40_INSERT( SfxPoolItem, pOldItem, nCount );
+ (*ppArr)->push_back( (SfxPoolItem*) pOldItem );
}
}
}
@@ -495,14 +495,14 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
// "uber alle Which-Werte iterieren
SfxPoolItemArray_Impl** ppItemArr = pImp->ppPoolItems;
- for( USHORT nArrCnt = GetSize_Impl(); nArrCnt; --nArrCnt, ++ppItemArr )
+ for( size_t nArrCnt = GetSize_Impl(); nArrCnt; --nArrCnt, ++ppItemArr )
{
// ist "uberhaupt ein Item mit dem Which-Wert da?
if ( *ppItemArr )
{
// "uber alle Items mit dieser Which-Id iterieren
- SfxPoolItem** ppHtArr = (SfxPoolItem**)(*ppItemArr)->GetData();
- for( USHORT n = (*ppItemArr)->Count(); n; --n, ++ppHtArr )
+ SfxPoolItemArrayBase_Impl::iterator ppHtArr = (*ppItemArr)->begin();
+ for( size_t n = (*ppItemArr)->size(); n; --n, ++ppHtArr )
if (*ppHtArr)
{
#ifdef DBG_UTIL
@@ -611,10 +611,10 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
rStream >> nVersion >> nHStart >> nHEnd;
USHORT nCount = nHEnd - nHStart + 1;
- // Version neuer als bekannt?
- if ( nVerNo >= pImp->aVersions.Count() )
+ // Is new version is known?
+ if ( nVerNo >= pImp->aVersions.size() )
{
- // neue Version hinzufuegen
+ // Add new Version
USHORT *pMap = new USHORT[nCount];
for ( USHORT n = 0; n < nCount; ++n )
rStream >> pMap[n];
@@ -632,7 +632,8 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
while ( aWhichIdsRec.GetContent() )
{
// SlotId, Which-Id und Item-Version besorgen
- USHORT nCount, nVersion, nWhich;
+ sal_uInt32 nCount;
+ USHORT nVersion, nWhich;
//!USHORT nSlotId = aWhichIdsRec.GetContentTag();
rStream >> nWhich;
if ( pImp->nLoadingVersion != pImp->nVersion )
@@ -799,10 +800,10 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
USHORT nCount = nHEnd - nHStart + 1;
USHORT nBytes = (nCount)*sizeof(USHORT);
- // Version neuer als bekannt?
- if ( nVerNo >= pImp->aVersions.Count() )
+ // Is new version is known?
+ if ( nVerNo >= pImp->aVersions.size() )
{
- // neue Version hinzufuegen
+ // Add new Version
USHORT *pMap = new USHORT[nCount];
for ( USHORT n = 0; n < nCount; ++n )
rStream >> pMap[n];
@@ -849,7 +850,7 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
USHORT nIndex = GetIndex_Impl(nWhich);
ppArr = pImp->ppPoolItems + nIndex;
- pNewArr = new SfxPoolItemArray_Impl( nCount );
+ pNewArr = new SfxPoolItemArray_Impl();
pDefItem = *(ppStaticDefaults + nIndex);
}
@@ -897,8 +898,8 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
AddRef(*pItem, nRef);
}
}
-
- pNewArr->C40_INSERT( SfxPoolItem, pItem, j);
+ //pNewArr->insert( pItem, j );
+ pNewArr->push_back( (SfxPoolItem*) pItem );
// restliche gespeicherte Laenge skippen (neueres Format)
nLastPos = rStream.Tell();
@@ -924,24 +925,23 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
// die Items merken, die schon im Pool sind
int bEmpty = TRUE;
if ( 0 != pOldArr )
- for ( USHORT n = 0; bEmpty && n < pOldArr->Count(); ++n )
- bEmpty = pOldArr->GetObject(n) == 0;
+ for ( size_t n = 0; bEmpty && n < pOldArr->size(); ++n )
+ bEmpty = pOldArr->operator[](n) == 0;
DBG_ASSERTWARNING( bEmpty, "loading non-empty pool" );
if ( !bEmpty )
{
// f"ur alle alten suchen, ob ein gleiches neues existiert
- for ( USHORT nOld = 0; nOld < pOldArr->Count(); ++nOld )
+ for ( size_t nOld = 0; nOld < pOldArr->size(); ++nOld )
{
SfxPoolItem *pOldItem = (*pOldArr)[nOld];
if ( pOldItem )
{
- int bFound = FALSE;
- for ( USHORT nNew = 0;
- !bFound && nNew < (*ppArr)->Count();
- ++nNew )
+ bool bFound = false;
+ for ( size_t nNew = 0;
+ nNew < (*ppArr)->size(); ++nNew )
{
SfxPoolItem *&rpNewItem =
- (SfxPoolItem*&)(*ppArr)->GetData()[nNew];
+ (SfxPoolItem*&)(*ppArr)->operator[](nNew);
if ( rpNewItem && *rpNewItem == *pOldItem )
{
@@ -949,11 +949,11 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
SetRefCount( *rpNewItem, 0 );
delete rpNewItem;
rpNewItem = pOldItem;
- bFound = TRUE;
+ bFound = true;
SFX_TRACE( "reusing item", pOldItem );
+ break;
}
}
- //! DBG_ASSERT( bFound, "old-item not found in file" );
if ( !bFound )
{
SFX_TRACE( "item not found: ", pOldItem );
@@ -1039,7 +1039,7 @@ const SfxPoolItem* SfxItemPool::LoadSurrogate
L"adt Surrogat aus 'rStream' und liefert das dadurch in 'rRefPool'
repr"asentierte SfxPoolItem zu"ruck. Ist das im Stream befindliche
Surrogat == SFX_ITEMS_DIRECT (!SFX_ITEM_POOLABLE) wird 0 zur"uckgegeben,
- das Item ist direkt aus dem Stream zu laden. Bei 0xfff0 (SFX_ITEMS_NULL)
+ das Item ist direkt aus dem Stream zu laden. Bei 0xfffffff0 (SFX_ITEMS_NULL)
wird auch 0 zurueckgegeben und rWhich auf 0 gesetzt, das Item ist nicht
verfuegbar.
@@ -1071,15 +1071,15 @@ const SfxPoolItem* SfxItemPool::LoadSurrogate
*/
{
- // erstmal das Surrogat lesen
- USHORT nSurrogat;
+ // Read the first surrogate
+ sal_uInt32 nSurrogat;
rStream >> nSurrogat;
- // direkt gespeichertes Item?
+ // Is item stored directly?
if ( SFX_ITEMS_DIRECT == nSurrogat )
return 0;
- // nicht vorhandenes Item?
+ // Item does not exist?
if ( SFX_ITEMS_NULL == nSurrogat )
{
rWhich = 0;
@@ -1114,13 +1114,13 @@ const SfxPoolItem* SfxItemPool::LoadSurrogate
if ( pTarget->IsInRange(rWhich) )
{
// dflt-Attribut?
- if ( SFX_ITEMS_STATICDEFAULT == nSurrogat )
+ if ( SFX_ITEMS_DEFAULT == nSurrogat )
return *(pTarget->ppStaticDefaults +
pTarget->GetIndex_Impl(rWhich));
SfxPoolItemArray_Impl* pItemArr = *(pTarget->pImp->ppPoolItems +
pTarget->GetIndex_Impl(rWhich));
- pItem = pItemArr && nSurrogat < pItemArr->Count()
+ pItem = pItemArr && nSurrogat < pItemArr->size()
? (*pItemArr)[nSurrogat]
: 0;
if ( !pItem )
@@ -1184,17 +1184,17 @@ FASTBOOL SfxItemPool::StoreSurrogate
FASTBOOL bRealSurrogate = IsItemFlag(*pItem, SFX_ITEM_POOLABLE);
rStream << ( bRealSurrogate
? GetSurrogate( pItem )
- : (UINT16) SFX_ITEMS_DIRECT );
+ : SFX_ITEMS_DIRECT );
return bRealSurrogate;
}
- rStream << (UINT16) SFX_ITEMS_NULL;
+ rStream << SFX_ITEMS_NULL;
return TRUE;
}
// -----------------------------------------------------------------------
-USHORT SfxItemPool::GetSurrogate(const SfxPoolItem *pItem) const
+sal_uInt32 SfxItemPool::GetSurrogate(const SfxPoolItem *pItem) const
{
DBG_CHKTHIS(SfxItemPool, 0);
DBG_ASSERT( pItem, "no 0-Pointer Surrogate" );
@@ -1210,18 +1210,18 @@ USHORT SfxItemPool::GetSurrogate(const SfxPoolItem *pItem) const
// Pointer auf static- oder pool-dflt-Attribut?
if( IsStaticDefaultItem(pItem) || IsPoolDefaultItem(pItem) )
- return SFX_ITEMS_STATICDEFAULT;
+ return SFX_ITEMS_DEFAULT;
SfxPoolItemArray_Impl* pItemArr = *(pImp->ppPoolItems + GetIndex_Impl(pItem->Which()));
- DBG_ASSERT(pItemArr, "ItemArr nicht vorhanden");
- const USHORT nCount = pItemArr->Count();
- for ( USHORT i = 0; i < nCount; ++i )
+ DBG_ASSERT(pItemArr, "ItemArr is not available");
+
+ for ( size_t i = 0; i < pItemArr->size(); ++i )
{
const SfxPoolItem *p = (*pItemArr)[i];
if ( p == pItem )
return i;
}
- SFX_ASSERT( 0, pItem->Which(), "Item nicht im Pool");
+ SFX_ASSERT( 0, pItem->Which(), "Item not in the pool");
return SFX_ITEMS_NULL;
}
@@ -1326,10 +1326,10 @@ void SfxItemPool::SetVersionMap
*/
{
- // neuen Map-Eintrag erzeugen und einf"ugen
- const SfxPoolVersion_Impl *pVerMap = new SfxPoolVersion_Impl(
- nVer, nOldStart, nOldEnd, pOldWhichIdTab );
- pImp->aVersions.Insert( pVerMap, pImp->aVersions.Count() );
+ // create new map entry to insert
+ const SfxPoolVersion_ImplPtr pVerMap = SfxPoolVersion_ImplPtr( new SfxPoolVersion_Impl(
+ nVer, nOldStart, nOldEnd, pOldWhichIdTab ) );
+ pImp->aVersions.push_back( pVerMap );
DBG_ASSERT( nVer > pImp->nVersion, "Versions not sorted" );
pImp->nVersion = nVer;
@@ -1398,9 +1398,9 @@ USHORT SfxItemPool::GetNewWhich
if ( nDiff > 0 )
{
// von der Top-Version bis runter zur File-Version stufenweise mappen
- for ( USHORT nMap = pImp->aVersions.Count(); nMap > 0; --nMap )
+ for ( size_t nMap = pImp->aVersions.size(); nMap > 0; --nMap )
{
- SfxPoolVersion_Impl *pVerInfo = pImp->aVersions[nMap-1];
+ SfxPoolVersion_ImplPtr pVerInfo = pImp->aVersions[nMap-1];
if ( pVerInfo->_nVer > pImp->nVersion )
{ USHORT nOfs;
USHORT nCount = pVerInfo->_nEnd - pVerInfo->_nStart + 1;
@@ -1424,9 +1424,9 @@ USHORT SfxItemPool::GetNewWhich
else if ( nDiff < 0 )
{
// von der File-Version bis zur aktuellen Version stufenweise mappen
- for ( USHORT nMap = 0; nMap < pImp->aVersions.Count(); ++nMap )
+ for ( size_t nMap = 0; nMap < pImp->aVersions.size(); ++nMap )
{
- SfxPoolVersion_Impl *pVerInfo = pImp->aVersions[nMap];
+ SfxPoolVersion_ImplPtr pVerInfo = pImp->aVersions[nMap];
if ( pVerInfo->_nVer > pImp->nLoadingVersion )
{
DBG_ASSERT( nFileWhich >= pVerInfo->_nStart &&
@@ -1637,7 +1637,8 @@ const SfxPoolItem* SfxItemPool::LoadItem( SvStream &rStream, FASTBOOL bDirect,
else
{
// WID in der Version nicht vorhanden => ueberspringen
- USHORT nSurro, nVersion, nLen;
+ sal_uInt32 nSurro;
+ USHORT nVersion, nLen;
rStream >> nSurro;
if ( SFX_ITEMS_DIRECT == nSurro )
{
diff --git a/svl/source/items/stylepool.cxx b/svl/source/items/stylepool.cxx
index 8a9f16052a8a..6d8799967650 100644
--- a/svl/source/items/stylepool.cxx
+++ b/svl/source/items/stylepool.cxx
@@ -34,7 +34,7 @@
#include <vector>
#include <map>
-#include "stylepool.hxx"
+#include <svl/stylepool.hxx>
#include <svl/itemiter.hxx>
#include <svl/itempool.hxx>
diff --git a/svl/source/items/whassert.hxx b/svl/source/items/whassert.hxx
index 9933294b4d86..237cf73f6c7f 100644
--- a/svl/source/items/whassert.hxx
+++ b/svl/source/items/whassert.hxx
@@ -42,7 +42,7 @@
ByteString aMsg( sMessage ); \
aMsg.Append(RTL_CONSTASCII_STRINGPARAM("\nwith Id/Pos: ")); \
aMsg += ByteString::CreateFromInt32( nId ); \
- DbgOut( aMsg.GetBuffer(), DBG_OUT_ERROR, __FILE__, __LINE__); \
+ DbgError( aMsg.GetBuffer(), __FILE__, __LINE__); \
} \
} \
}
diff --git a/svl/source/items/whiter.cxx b/svl/source/items/whiter.cxx
index ec0e10d8e3d7..b50d9bc32a79 100644
--- a/svl/source/items/whiter.cxx
+++ b/svl/source/items/whiter.cxx
@@ -28,10 +28,8 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svl.hxx"
// INCLUDE ---------------------------------------------------------------
-#ifndef GCC
-#endif
-#include "whiter.hxx"
+#include <svl/whiter.hxx>
#include <svl/itemset.hxx>
DBG_NAME(SfxWhichIter)
diff --git a/svl/source/memtools/svarray.cxx b/svl/source/memtools/svarray.cxx
index b2184442ea0e..622533dceae2 100644
--- a/svl/source/memtools/svarray.cxx
+++ b/svl/source/memtools/svarray.cxx
@@ -61,7 +61,6 @@
#include <tools/debug.hxx>
SV_IMPL_VARARR(SvPtrarr,VoidPtr)
-SV_IMPL_VARARR_PLAIN(SvPtrarrPlain,VoidPtr)
USHORT SvPtrarr::GetPos( const VoidPtr& aElement ) const
{ USHORT n;
@@ -69,25 +68,12 @@ USHORT SvPtrarr::GetPos( const VoidPtr& aElement ) const
return ( n >= nA ? USHRT_MAX : n );
}
-USHORT SvPtrarrPlain::GetPos( const VoidPtr aElement ) const
-{ USHORT n;
- for( n=0; n < nA && *(GetData()+n) != aElement; ) n++;
- return ( n >= nA ? USHRT_MAX : n );
-}
-
-
-SV_IMPL_VARARR( SvBools, BOOL )
-SV_IMPL_VARARR( SvBytes, BYTE )
SV_IMPL_VARARR( SvULongs, ULONG )
SV_IMPL_VARARR( SvUShorts, USHORT )
SV_IMPL_VARARR( SvLongs, long)
-SV_IMPL_VARARR( SvShorts, short )
SV_IMPL_VARARR_SORT( SvULongsSort, ULONG )
SV_IMPL_VARARR_SORT( SvLongsSort, long )
-SV_IMPL_VARARR_SORT( SvXub_StrLensSort, xub_StrLen )
-
-SV_IMPL_VARARR( SvXub_StrLens, xub_StrLen )
SV_IMPL_PTRARR( SvStrings, StringPtr )
SV_IMPL_PTRARR( SvStringsDtor, StringPtr )
diff --git a/svl/source/misc/PasswordHelper.cxx b/svl/source/misc/PasswordHelper.cxx
index 05e9e8a65897..73e1c6c050a0 100644
--- a/svl/source/misc/PasswordHelper.cxx
+++ b/svl/source/misc/PasswordHelper.cxx
@@ -28,10 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svl.hxx"
-
-#ifndef GCC
-#endif
-#include "PasswordHelper.hxx"
+#include <svl/PasswordHelper.hxx>
#include <rtl/digest.h>
#include <tools/string.hxx>
diff --git a/svl/source/misc/adrparse.cxx b/svl/source/misc/adrparse.cxx
index fc230856ef7d..1a349e47d9bf 100644
--- a/svl/source/misc/adrparse.cxx
+++ b/svl/source/misc/adrparse.cxx
@@ -28,7 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svl.hxx"
#include <tools/inetmime.hxx>
-#include <adrparse.hxx>
+#include <svl/adrparse.hxx>
namespace unnamed_svl_adrparse {}
using namespace unnamed_svl_adrparse;
diff --git a/svl/source/misc/filenotation.cxx b/svl/source/misc/filenotation.cxx
index abec6bb310fc..61c98bf5a851 100644
--- a/svl/source/misc/filenotation.cxx
+++ b/svl/source/misc/filenotation.cxx
@@ -27,7 +27,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svl.hxx"
-#include "filenotation.hxx"
+#include <svl/filenotation.hxx>
#include <osl/file.h>
#include <osl/diagnose.h>
#include <tools/urlobj.hxx>
diff --git a/svl/source/misc/folderrestriction.cxx b/svl/source/misc/folderrestriction.cxx
index ae50ed3cd55a..e854b64b7830 100644
--- a/svl/source/misc/folderrestriction.cxx
+++ b/svl/source/misc/folderrestriction.cxx
@@ -28,7 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svl.hxx"
-#include "folderrestriction.hxx"
+#include <svl/folderrestriction.hxx>
#include "osl/process.h"
#include "tools/urlobj.hxx"
#include "unotools/localfilehelper.hxx"
diff --git a/svl/source/misc/fstathelper.cxx b/svl/source/misc/fstathelper.cxx
index 329912f9d997..f39093f2e311 100644
--- a/svl/source/misc/fstathelper.cxx
+++ b/svl/source/misc/fstathelper.cxx
@@ -32,8 +32,7 @@
#include <tools/string.hxx>
#include <ucbhelper/content.hxx>
#include <com/sun/star/util/DateTime.hpp>
-
-#include <fstathelper.hxx>
+#include <svl/fstathelper.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
diff --git a/svl/source/misc/lngmisc.cxx b/svl/source/misc/lngmisc.cxx
index 2203cc08458e..1324a8fa842c 100644
--- a/svl/source/misc/lngmisc.cxx
+++ b/svl/source/misc/lngmisc.cxx
@@ -27,14 +27,13 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svl.hxx"
-#include <lngmisc.hxx>
+#include <svl/lngmisc.hxx>
#include <tools/solar.h>
#include <tools/string.hxx>
#include <tools/debug.hxx>
#include <rtl/ustrbuf.hxx>
#include <rtl/ustring.hxx>
-
using namespace rtl;
namespace linguistic
@@ -132,6 +131,38 @@ BOOL ReplaceControlChars( rtl::OUString &rTxt, sal_Char /*aRplcChar*/ )
return bModified;
}
+
+String GetThesaurusReplaceText( const String &rText )
+{
+ // The strings for synonyms returned by the thesaurus sometimes have some
+ // explanation text put in between '(' and ')' or a trailing '*'.
+ // These parts should not be put in the ReplaceEdit Text that may get
+ // inserted into the document. Thus we strip them from the text.
+
+ String aText( rText );
+
+ xub_StrLen nPos = aText.Search( sal_Unicode('(') );
+ while (STRING_NOTFOUND != nPos)
+ {
+ xub_StrLen nEnd = aText.Search( sal_Unicode(')'), nPos );
+ if (STRING_NOTFOUND != nEnd)
+ aText.Erase( nPos, nEnd-nPos+1 );
+ else
+ break;
+ nPos = aText.Search( sal_Unicode('(') );
+ }
+
+ nPos = aText.Search( sal_Unicode('*') );
+ if (STRING_NOTFOUND != nPos)
+ aText.Erase( nPos );
+
+ // remove any possible remaining ' ' that may confuse the thesaurus
+ // when it gets called with the text
+ aText.EraseLeadingAndTrailingChars( sal_Unicode(' ') );
+
+ return aText;
+}
+
///////////////////////////////////////////////////////////////////////////
} // namespace linguistic
diff --git a/svl/source/misc/makefile.mk b/svl/source/misc/makefile.mk
deleted file mode 100644
index a68cb396f22c..000000000000
--- a/svl/source/misc/makefile.mk
+++ /dev/null
@@ -1,70 +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=svl
-TARGET=misc
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/svl.pmk
-
-# --- Files --------------------------------------------------------
-
-EXCEPTIONSFILES=\
- $(SLO)$/documentlockfile.obj \
- $(SLO)$/folderrestriction.obj \
- $(SLO)$/fstathelper.obj \
- $(SLO)$/lockfilecommon.obj \
- $(SLO)$/ownlist.obj \
- $(SLO)$/restrictedpaths.obj \
- $(SLO)$/sharecontrolfile.obj \
- $(SLO)$/strmadpt.obj \
- $(SLO)$/svldata.obj \
- $(SLO)$/urihelper.obj
-
-SLOFILES=\
- $(EXCEPTIONSFILES) \
- $(SLO)$/adrparse.obj \
- $(SLO)$/filenotation.obj \
- $(SLO)$/inethist.obj \
- $(SLO)$/inettype.obj \
- $(SLO)$/lngmisc.obj \
- $(SLO)$/PasswordHelper.obj
-
-SRS1NAME=$(TARGET)
-SRC1FILES=\
- mediatyp.src
-
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
-
-
-
diff --git a/svl/source/misc/strmadpt.cxx b/svl/source/misc/strmadpt.cxx
index 9811618eb571..c2347ef6fc0c 100644
--- a/svl/source/misc/strmadpt.cxx
+++ b/svl/source/misc/strmadpt.cxx
@@ -35,9 +35,9 @@
#include <set>
#include <rtl/alloc.h>
#include <rtl/memory.h>
-#include <instrm.hxx>
-#include <outstrm.hxx>
-#include <strmadpt.hxx>
+#include <svl/instrm.hxx>
+#include <svl/outstrm.hxx>
+#include <svl/strmadpt.hxx>
using namespace com::sun::star;
diff --git a/svl/source/misc/svldata.cxx b/svl/source/misc/svldata.cxx
index 35c9fca3aef2..f4eae26d2276 100644
--- a/svl/source/misc/svldata.cxx
+++ b/svl/source/misc/svldata.cxx
@@ -75,7 +75,7 @@ SimpleResMgr* ImpSvlData::GetSimpleRM(const ::com::sun::star::lang::Locale& rLoc
= (*static_cast< SimpleResMgrMap * >(m_pThreadsafeRMs))[aISOcode];
if (!rResMgr)
{
- rResMgr = new SimpleResMgr(CREATEVERSIONRESMGR_NAME(svs), rLocale );
+ rResMgr = new SimpleResMgr(CREATEVERSIONRESMGR_NAME(svl), rLocale );
}
return rResMgr;
}
diff --git a/svl/source/misc/urihelper.cxx b/svl/source/misc/urihelper.cxx
index 46063564193d..656000fceae3 100644
--- a/svl/source/misc/urihelper.cxx
+++ b/svl/source/misc/urihelper.cxx
@@ -27,7 +27,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svl.hxx"
-#include <urihelper.hxx>
+#include <svl/urihelper.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include "com/sun/star/lang/WrappedTargetRuntimeException.hpp"
#include "com/sun/star/lang/XMultiComponentFactory.hpp"
diff --git a/svl/source/notify/broadcast.cxx b/svl/source/notify/broadcast.cxx
index 0179ceaebc34..e6a76132be6a 100644
--- a/svl/source/notify/broadcast.cxx
+++ b/svl/source/notify/broadcast.cxx
@@ -32,9 +32,9 @@
#endif
#include <tools/debug.hxx>
-#include "listener.hxx"
-#include "listeneriter.hxx"
-#include "broadcast.hxx"
+#include <svl/listener.hxx>
+#include <svl/listeneriter.hxx>
+#include <svl/broadcast.hxx>
#include <svl/smplhint.hxx>
diff --git a/svl/source/notify/cancel.cxx b/svl/source/notify/cancel.cxx
deleted file mode 100644
index ffa5c87a26be..000000000000
--- a/svl/source/notify/cancel.cxx
+++ /dev/null
@@ -1,201 +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_svl.hxx"
-#define _SFX_CANCEL_CXX
-#include <svl/cancel.hxx>
-
-#include <vos/mutex.hxx>
-#include <tools/debug.hxx>
-
-#include <svl/smplhint.hxx>
-#include <svl/cnclhint.hxx>
-#include <rtl/instance.hxx>
-
-namespace { struct lclMutex : public rtl::Static< ::vos::OMutex, lclMutex >{}; }
-
-//=========================================================================
-
-SfxCancelManager::SfxCancelManager( SfxCancelManager *pParent )
-: _pParent( pParent )
-{
-}
-
-//-------------------------------------------------------------------------
-
-SfxCancelManager::~SfxCancelManager()
-{
- DBG_ASSERT( _pParent || !_aJobs.Count(), "deleting SfxCancelManager in use" );
- for ( USHORT n = _aJobs.Count(); n--; )
- _aJobs.GetObject(n)->SetManager( _pParent );
-}
-
-//-------------------------------------------------------------------------
-
-BOOL SfxCancelManager::CanCancel() const
-
-/* [Beschreibung]
-
- Liefert TRUE wenn an diesem CancelManager oder an einem Parent
- ein Job l"auft.
-*/
-
-{
- ::vos::OGuard aGuard( lclMutex::get() );
- return _aJobs.Count() > 0 || ( _pParent && _pParent->CanCancel() );
-}
-
-//-------------------------------------------------------------------------
-
-void SfxCancelManager::Cancel( BOOL bDeep )
-
-/* [Beschreibung]
-
- Diese Methode markiert alle angemeldeten <SfxCancellable>-Instanzen
- als suspendiert.
-*/
-
-{
- ::vos::OGuard aGuard( lclMutex::get() );
- SfxCancelManagerWeak xWeak( this );
- for ( USHORT n = _aJobs.Count(); n-- && xWeak.Is(); )
- if ( n < _aJobs.Count() )
- _aJobs.GetObject(n)->Cancel();
- if ( xWeak.Is() && _pParent )
- _pParent->Cancel( bDeep );
-}
-
-//-------------------------------------------------------------------------
-
-void SfxCancelManager::InsertCancellable( SfxCancellable *pJob )
-
-/* [Beschreibung]
-
- Diese interne Methode tr"agt 'pJob' in die Liste der unterbrechbaren
- Jobs ein und Broadcastet dies. Jeder <SfxCancellable> darf nur
- maximal einmal angemeldet sein, dies geschiet in seinem Ctor.
-*/
-
-{
-#ifdef GPF_ON_EMPTY_TITLE
- if ( !pJob->GetTitle() )
- {
- DBG_ERROR( "SfxCancellable: empty titles not allowed (Vermummungsverbot)" )
- *(int*)0 = 0;
- }
-#endif
-
- ::vos::OClearableGuard aGuard( lclMutex::get() );
- _aJobs.C40_INSERT( SfxCancellable, pJob, _aJobs.Count() );
-
- aGuard.clear();
- Broadcast( SfxSimpleHint( SFX_HINT_CANCELLABLE ) );
-}
-
-//-------------------------------------------------------------------------
-
-
-void SfxCancelManager::RemoveCancellable( SfxCancellable *pJob )
-
-/* [Beschreibung]
-
- Diese interne Methode tr"agt 'pJob' aus die Liste der unterbrechbaren
- Jobs aus und Broadcastet dies. Dieser Aufruf mu\s paarig nach einem
- <InsertCancellable> erfolgen und wird im Dtor des <SfxCancellable>
- ausgel"ost.
-*/
-
-{
- ::vos::OClearableGuard aGuard( lclMutex::get() );
- const SfxCancellable *pTmp = pJob;
- USHORT nPos = _aJobs.GetPos( pTmp );
- if ( nPos != 0xFFFF )
- {
- _aJobs.Remove( nPos , 1 );
- aGuard.clear();
- Broadcast( SfxSimpleHint( SFX_HINT_CANCELLABLE ) );
- Broadcast( SfxCancelHint( pJob, SFXCANCELHINT_REMOVED ) );
- }
-}
-
-//-------------------------------------------------------------------------
-
-SfxCancellable::~SfxCancellable()
-{
- SfxCancelManager* pMgr = _pMgr;
- if ( pMgr )
- pMgr->RemoveCancellable( this );
-}
-
-//-------------------------------------------------------------------------
-
-void SfxCancellable::Cancel()
-
-/* [Description]
-
- This virtual function is called when the user hits the cancel-button.
- If you overload it, you can stop your activities. Please always call
- 'SfxCancellable::Cancel()'.
-*/
-
-{
-#ifdef GFP_ON_NO_CANCEL
- if ( _bCancelled < 5 )
- ++_bCancelled;
- else
- {
- delete this;
- }
-#else
- _bCancelled = TRUE;
-#endif
-}
-
-//-------------------------------------------------------------------------
-
-void SfxCancellable::SetManager( SfxCancelManager *pMgr )
-{
- SfxCancelManager* pTmp = _pMgr;
- if ( pTmp )
- pTmp->RemoveCancellable( this );
- _pMgr = pMgr;
- if ( pMgr )
- pMgr->InsertCancellable( this );
-}
-
-//-------------------------------------------------------------------------
-
-TYPEINIT1(SfxCancelHint, SfxHint);
-
-SfxCancelHint::SfxCancelHint( SfxCancellable* pJob, USHORT _nAction )
-{
- pCancellable = pJob;
- nAction = _nAction;
-}
-
-
diff --git a/svl/source/notify/listener.cxx b/svl/source/notify/listener.cxx
index 0269894bff81..44e3e187ff38 100644
--- a/svl/source/notify/listener.cxx
+++ b/svl/source/notify/listener.cxx
@@ -27,17 +27,12 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svl.hxx"
-#ifndef GCC
-#endif
-#ifndef DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-
-#include "broadcast.hxx"
-#include "listener.hxx"
+#include <svl/broadcast.hxx>
+#include <svl/listener.hxx>
#include "listenerbase.hxx"
-#include "listeneriter.hxx"
+#include <svl/listeneriter.hxx>
//====================================================================
diff --git a/svl/source/notify/listenerbase.cxx b/svl/source/notify/listenerbase.cxx
index ec899ee9d70b..4dedd24cbe0e 100644
--- a/svl/source/notify/listenerbase.cxx
+++ b/svl/source/notify/listenerbase.cxx
@@ -27,17 +27,12 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svl.hxx"
-#ifndef GCC
-#endif
-#ifndef DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-
#include "listenerbase.hxx"
-#include "listeneriter.hxx"
-#include "listener.hxx"
-#include "broadcast.hxx"
+#include <svl/listeneriter.hxx>
+#include <svl/listener.hxx>
+#include <svl/broadcast.hxx>
SvtListenerBase::SvtListenerBase( SvtListener& rLst,
diff --git a/svl/source/notify/listeneriter.cxx b/svl/source/notify/listeneriter.cxx
index 5dda8d0433b4..2078393822cb 100644
--- a/svl/source/notify/listeneriter.cxx
+++ b/svl/source/notify/listeneriter.cxx
@@ -27,14 +27,12 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svl.hxx"
-#ifndef GCC
-#endif
#include <tools/debug.hxx>
#include "listenerbase.hxx"
-#include "listeneriter.hxx"
-#include "broadcast.hxx"
-#include "listener.hxx"
+#include <svl/listeneriter.hxx>
+#include <svl/broadcast.hxx>
+#include <svl/listener.hxx>
SvtListenerIter* SvtListenerIter::pListenerIters = 0;
diff --git a/svl/source/notify/makefile.mk b/svl/source/notify/makefile.mk
deleted file mode 100644
index c2e6648907e5..000000000000
--- a/svl/source/notify/makefile.mk
+++ /dev/null
@@ -1,62 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..
-
-PRJNAME=svl
-TARGET=notify
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/svl.pmk
-
-# --- Files --------------------------------------------------------
-
-SLOFILES = \
- $(SLO)$/smplhint.obj \
- $(SLO)$/hint.obj \
- $(SLO)$/lstner.obj \
- $(SLO)$/isethint.obj \
- $(SLO)$/brdcst.obj \
- $(SLO)$/listener.obj \
- $(SLO)$/listenerbase.obj \
- $(SLO)$/listeneriter.obj \
- $(SLO)$/broadcast.obj
-
-HXX1TARGET= notify
-HXX1EXT= hxx
-HXX1FILES= $(INC)$/hint.hxx \
- $(INC)$/smplhint.hxx \
- $(INC)$/lstner.hxx \
- $(INC)$/brdcst.hxx
-HXX1EXCL= -E:*include*
-
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/svl/source/numbers/makefile.mk b/svl/source/numbers/makefile.mk
deleted file mode 100644
index 87a367566a8b..000000000000
--- a/svl/source/numbers/makefile.mk
+++ /dev/null
@@ -1,74 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..
-
-PRJNAME=svl
-TARGET=numbers
-LIBTARGET=NO
-
-PROJECTPCH=
-PROJECTPCHSOURCE=
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/svl.pmk
-
-# --- Files --------------------------------------------------------
-
-EXCEPTIONSFILES= \
- $(SLO)$/numuno.obj \
- $(SLO)$/numfmuno.obj \
- $(SLO)$/supservs.obj \
- $(SLO)$/zforlist.obj
-
-SLOFILES = \
- $(EXCEPTIONSFILES) \
- $(SLO)$/zforfind.obj \
- $(SLO)$/zformat.obj \
- $(SLO)$/zforscan.obj \
- $(SLO)$/numhead.obj
-
-LIB1TARGET= $(SLB)$/$(TARGET).uno.lib
-LIB1OBJFILES= \
- $(SLO)$/numfmuno.obj \
- $(SLO)$/supservs.obj
-
-LIB2TARGET= $(SLB)$/$(TARGET).lib
-LIB2OBJFILES= \
- $(SLO)$/zforfind.obj \
- $(SLO)$/zforlist.obj \
- $(SLO)$/zformat.obj \
- $(SLO)$/zforscan.obj \
- $(SLO)$/numuno.obj \
- $(SLO)$/numhead.obj
-
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/svl/source/numbers/nbdll.cxx b/svl/source/numbers/nbdll.cxx
deleted file mode 100644
index b93eda3e7f37..000000000000
--- a/svl/source/numbers/nbdll.cxx
+++ /dev/null
@@ -1,79 +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_svl.hxx"
-
-#ifdef WIN
-#include <svwin.h>
-
-#ifndef _SYSDEP_HXX
-#include <sysdep.hxx>
-#endif
-
-// Statische DLL-Verwaltungs-Variablen
-static HINSTANCE hDLLInst = 0; // HANDLE der DLL
-
-
-/***************************************************************************
-|*
-|* LibMain()
-|*
-|* Beschreibung Initialisierungsfunktion der DLL
-|* Ersterstellung TH 05.05.93
-|* Letzte Aenderung TH 05.05.93
-|*
-***************************************************************************/
-
-extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
-{
-#ifndef WNT
- if ( nHeap )
- UnlockData( 0 );
-#endif
-
- hDLLInst = hDLL;
-
- return TRUE;
-}
-
-/***************************************************************************
-|*
-|* WEP()
-|*
-|* Beschreibung DLL-Deinitialisierung
-|* Ersterstellung TH 05.05.93
-|* Letzte Aenderung TH 05.05.93
-|*
-***************************************************************************/
-
-extern "C" int CALLBACK WEP( int )
-{
- return 1;
-}
-
-#endif
diff --git a/svl/source/numbers/numfmuno.cxx b/svl/source/numbers/numfmuno.cxx
index f40b367ae2af..6aea37653633 100644
--- a/svl/source/numbers/numfmuno.cxx
+++ b/svl/source/numbers/numfmuno.cxx
@@ -40,7 +40,7 @@
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include "numfmuno.hxx"
-#include "numuno.hxx"
+#include <svl/numuno.hxx>
#include <svl/zforlist.hxx>
#include <svl/zformat.hxx>
#include <svl/itemprop.hxx>
diff --git a/svl/source/numbers/numuno.cxx b/svl/source/numbers/numuno.cxx
index a6208657406e..94f535c48b02 100644
--- a/svl/source/numbers/numuno.cxx
+++ b/svl/source/numbers/numuno.cxx
@@ -38,7 +38,7 @@
#include <osl/mutex.hxx>
#include <rtl/uuid.h>
-#include "numuno.hxx"
+#include <svl/numuno.hxx>
#include "numfmuno.hxx"
#include <svl/zforlist.hxx>
diff --git a/svl/source/numbers/supservs.cxx b/svl/source/numbers/supservs.cxx
index 90d41977e974..93e6051a21ce 100644
--- a/svl/source/numbers/supservs.cxx
+++ b/svl/source/numbers/supservs.cxx
@@ -34,8 +34,8 @@
#include <tools/debug.hxx>
#include <vos/mutex.hxx>
#include <tools/stream.hxx>
-#include <strmadpt.hxx>
-#include "instrm.hxx"
+#include <svl/strmadpt.hxx>
+#include <svl/instrm.hxx>
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
diff --git a/svl/source/numbers/supservs.hxx b/svl/source/numbers/supservs.hxx
index 45f6b3a8e285..85c5456beb01 100644
--- a/svl/source/numbers/supservs.hxx
+++ b/svl/source/numbers/supservs.hxx
@@ -28,7 +28,7 @@
#ifndef _SVTOOLS_NUMBERS_SUPPLIERSERVICE_HXX_
#define _SVTOOLS_NUMBERS_SUPPLIERSERVICE_HXX_
-#include "numuno.hxx"
+#include <svl/numuno.hxx>
#include <svl/zforlist.hxx>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index cb66a75558c2..7343a0a9c0e6 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -1697,6 +1697,58 @@ BOOL SvNumberFormatter::GetPreviewStringGuess( const String& sFormatString,
return FALSE;
}
+BOOL SvNumberFormatter::GetPreviewString( const String& sFormatString,
+ const String& sPreviewString,
+ String& sOutString,
+ Color** ppColor,
+ LanguageType eLnge )
+{
+ if (sFormatString.Len() == 0) // no empty string
+ return FALSE;
+
+ xub_StrLen nCheckPos = STRING_NOTFOUND;
+ sal_uInt32 nKey;
+ if (eLnge == LANGUAGE_DONTKNOW)
+ eLnge = IniLnge;
+ ChangeIntl(eLnge); // switch if needed
+ eLnge = ActLnge;
+ String sTmpString = sFormatString;
+ SvNumberformat* p_Entry = new SvNumberformat( sTmpString,
+ pFormatScanner,
+ pStringScanner,
+ nCheckPos,
+ eLnge);
+ if (nCheckPos == 0) // String ok
+ {
+ String aNonConstPreview( sPreviewString);
+ // May have to create standard formats for this locale.
+ sal_uInt32 CLOffset = ImpGenerateCL(eLnge);
+ nKey = ImpIsEntry( p_Entry->GetFormatstring(), CLOffset, eLnge);
+ if (nKey != NUMBERFORMAT_ENTRY_NOT_FOUND) // already present
+ GetOutputString( aNonConstPreview, nKey, sOutString, ppColor);
+ else
+ {
+ // If the format is valid but not a text format and does not
+ // include a text subformat, an empty string would result. Same as
+ // in SvNumberFormatter::GetOutputString()
+ if (p_Entry->IsTextFormat() || p_Entry->HasTextFormat())
+ p_Entry->GetOutputString( aNonConstPreview, sOutString, ppColor);
+ else
+ {
+ *ppColor = NULL;
+ sOutString = sPreviewString;
+ }
+ }
+ delete p_Entry;
+ return TRUE;
+ }
+ else
+ {
+ delete p_Entry;
+ return FALSE;
+ }
+}
+
sal_uInt32 SvNumberFormatter::TestNewString(const String& sFormatString,
LanguageType eLnge)
{
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 707b2362f0ed..3d943fef230c 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -47,13 +47,13 @@
#define _ZFORMAT_CXX
#include <svl/zformat.hxx>
-#include "zforscan.hxx"
+#include <zforscan.hxx>
#include "zforfind.hxx"
#include <svl/zforlist.hxx>
#include "numhead.hxx"
#include <unotools/digitgroupingiterator.hxx>
-#include "nfsymbol.hxx"
+#include <svl/nfsymbol.hxx>
#include <cmath>
@@ -2057,7 +2057,7 @@ BOOL SvNumberformat::GetOutputString(double fNumber,
OutString = rScan.GetFalseString();
return FALSE;
}
- if (eType & NUMBERFORMAT_TEXT && bStandard)
+ if (eType & NUMBERFORMAT_TEXT)
{
ImpGetOutputStandard(fNumber, OutString);
return FALSE;
@@ -2086,7 +2086,9 @@ BOOL SvNumberformat::GetOutputString(double fNumber,
if (!nLen)
return false;
- if (nLen > 11)
+ // #i112250# With the 10-decimal limit, small numbers are formatted as "0".
+ // Switch to scientific in that case, too:
+ if (nLen > 11 || (OutString.EqualsAscii("0") && fNumber != 0.0))
{
sal_uInt16 nStandardPrec = rScan.GetStandardPrec();
nStandardPrec = ::std::min(nStandardPrec, static_cast<sal_uInt16>(14)); // limits to 14 decimals
diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx
index fb59e4289ad1..ab68d8309159 100644
--- a/svl/source/numbers/zforscan.cxx
+++ b/svl/source/numbers/zforscan.cxx
@@ -45,7 +45,7 @@
#define _ZFORSCAN_CXX
#include "zforscan.hxx"
#undef _ZFORSCAN_CXX
-#include "nfsymbol.hxx"
+#include <svl/nfsymbol.hxx>
using namespace svt;
const sal_Unicode cNonBreakingSpace = 0xA0;
diff --git a/svl/source/numbers/zforscan.hxx b/svl/source/numbers/zforscan.hxx
index d623a3f50026..176da84b652e 100644
--- a/svl/source/numbers/zforscan.hxx
+++ b/svl/source/numbers/zforscan.hxx
@@ -32,7 +32,7 @@
#include <i18npool/lang.h>
#include <tools/color.hxx>
#include <svl/nfkeytab.hxx>
-#include "nfsymbol.hxx"
+#include <svl/nfsymbol.hxx>
class SvNumberFormatter;
struct ImpSvNumberformatInfo;
diff --git a/svl/source/passwordcontainer/makefile.mk b/svl/source/passwordcontainer/makefile.mk
deleted file mode 100644
index d9eb9615cf80..000000000000
--- a/svl/source/passwordcontainer/makefile.mk
+++ /dev/null
@@ -1,62 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..
-PRJNAME=svl
-TARGET=passwordcontainer.uno
-LIBTARGET=NO
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings ----------------------------------
-
-.INCLUDE : settings.mk
-DLLPRE=
-
-# --- Files -------------------------------------
-
-SLOFILES= \
- $(SLO)$/passwordcontainer.obj\
- $(SLO)$/syscreds.obj
-
-SHL1TARGET= $(TARGET)
-SHL1IMPLIB= i$(TARGET)
-SHL1OBJS= $(SLOFILES)
-SHL1STDLIBS=\
- $(UNOTOOLSLIB) \
- $(UCBHELPERLIB) \
- $(CPPUHELPERLIB) \
- $(CPPULIB) \
- $(SALLIB)
-
-SHL1VERSIONMAP=$(SOLARENV)/src/component.map
-SHL1DEF= $(MISC)$/$(SHL1TARGET).def
-DEF1NAME= $(SHL1TARGET)
-
-# --- Targets ----------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/svl/source/passwordcontainer/passwordcontainer.component b/svl/source/passwordcontainer/passwordcontainer.component
new file mode 100644
index 000000000000..42eb47cf14dd
--- /dev/null
+++ b/svl/source/passwordcontainer/passwordcontainer.component
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="stardiv.svl.PasswordContainer">
+ <service name="com.sun.star.task.PasswordContainer"/>
+ </implementation>
+</component>
diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx
index 7db18c65db1f..6e92d390eea9 100644
--- a/svl/source/passwordcontainer/passwordcontainer.cxx
+++ b/svl/source/passwordcontainer/passwordcontainer.cxx
@@ -1543,24 +1543,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment (
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
-SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo (
- void * /* pServiceManager */, void * pRegistryKey)
-{
- if (pRegistryKey)
- {
- Reference< XRegistryKey > xRegistryKey (
- reinterpret_cast< XRegistryKey* >( pRegistryKey ));
- Reference< XRegistryKey > xNewKey;
-
- xNewKey = xRegistryKey->createKey(
- ::rtl::OUString::createFromAscii( "/stardiv.svl.PasswordContainer/UNO/SERVICES" ));
- xNewKey->createKey( ::rtl::OUString::createFromAscii("com.sun.star.task.PasswordContainer"));
-
- return sal_True;
- }
- return sal_False;
-}
-
SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory (
const sal_Char * pImplementationName, void * pServiceManager, void * /* pRegistryKey */)
{
diff --git a/svl/source/svdde/ddedata.cxx b/svl/source/svdde/ddedata.cxx
index ba67d451be34..369306c22874 100644
--- a/svl/source/svdde/ddedata.cxx
+++ b/svl/source/svdde/ddedata.cxx
@@ -41,10 +41,6 @@
#include <osl/thread.h>
-#if defined( WIN ) && defined( MSC )
-#pragma code_seg( "SVDDE_MISC_CODE" )
-#endif
-
// --- DdeData::DdeData() ------------------------------------------
DdeData::DdeData()
@@ -164,10 +160,10 @@ ULONG DdeData::GetExternalFormat( ULONG nFmt )
default:
{
-#if defined(WNT) || defined(WIN) || defined( PM2 )
+#if defined(WNT) || defined( PM2 )
String aName( SotExchange::GetFormatName( nFmt ) );
-#if defined(WNT) || defined(WIN)
+#if defined(WNT)
if( aName.Len() )
nFmt = RegisterClipboardFormat( reinterpret_cast<LPCWSTR>(aName.GetBuffer()) );
@@ -203,7 +199,7 @@ ULONG DdeData::GetInternalFormat( ULONG nFmt )
break;
default:
-#if defined(WIN) || defined(WNT)
+#if defined(WNT)
if( nFmt >= CF_MAX )
{
TCHAR szName[ 256 ];
diff --git a/svl/source/svdde/ddedll.cxx b/svl/source/svdde/ddedll.cxx
deleted file mode 100644
index a71662dd5e63..000000000000
--- a/svl/source/svdde/ddedll.cxx
+++ /dev/null
@@ -1,64 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_svl.hxx"
-#ifdef WIN
-
-
-#include <sysdep.hxx> // included svwin.h
-
-// Statische DLL-Verwaltungs-Variablen
-static HINSTANCE hDLLInst = 0; // HANDLE der DLL
-
-/***************************************************************************
-|* LibMain()
-|* Beschreibung Initialisierungsfunktion der DLL
-***************************************************************************/
-extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
-{
-#ifndef WNT
- if ( nHeap )
- UnlockData( 0 );
-#endif
-
- hDLLInst = hDLL;
-
- return TRUE;
-}
-
-/***************************************************************************
-|* WEP()
-|* Beschreibung DLL-Deinitialisierung
-***************************************************************************/
-extern "C" int CALLBACK WEP( int )
-{
- return 1;
-}
-
-#endif
-
diff --git a/svl/source/svdde/ddeml1.cxx b/svl/source/svdde/ddeml1.cxx
deleted file mode 100644
index dd9cc2abdaa7..000000000000
--- a/svl/source/svdde/ddeml1.cxx
+++ /dev/null
@@ -1,2658 +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_svl.hxx"
-
-/*
- ToDo / Bugs:
-
- - DdeInitiate: Eigener Thread?
- - Timeout bei Disconnects (IBM:nicht auf Ack warten!)
- - Konzept Errorhandling (globale/lokale Fehler)
- - Bedeutung/Anwendung Conversation-Contexte
- - Bei Zugriffen auf ConversationHandles WindowHandles checken
- - Namen der Partner-App ermitteln
- - Codepage-Geraffel
-*/
-#define INCL_DOSPROCESS
-
-#include "ddemlimp.hxx"
-
-#define LOGFILE
-#define STATUSFILE
-#define DDEDATAFILE
-#include "ddemldeb.hxx"
-
-
-#if defined (OS2) && defined (__BORLANDC__)
-#pragma option -w-par
-#endif
-
-// static
-inline BOOL ImpDdeMgr::MyWinDdePostMsg( HWND hWndTo, HWND hWndFrom,
- USHORT nMsg, PDDESTRUCT pData, ULONG nFlags )
-{
- BOOL bSuccess = WinDdePostMsg( hWndTo,hWndFrom,nMsg,pData,nFlags);
- if( !bSuccess )
- {
- WRITELOG("WinDdePostMsg:Failed!")
- if ( !(nFlags & DDEPM_NOFREE) )
- {
- MyDosFreeMem( pData,"MyWinDdePostMsg" );
- }
- }
- return bSuccess;
-}
-
-
-// *********************************************************************
-// ImpDdeMgr
-// *********************************************************************
-
-USHORT ImpDdeMgr::nLastErrInstance = 0;
-
-//
-// Conversation-WndProc
-// Steuert Transaktionen eines Conversationhandles
-//
-MRESULT EXPENTRY ConvWndProc(HWND hWnd,ULONG nMsg,MPARAM nPar1,MPARAM nPar2)
-{
-#if defined(DBG_UTIL) && defined(OV_DEBUG)
- if( nMsg >= WM_DDE_FIRST && nMsg <= WM_DDE_LAST)
- {
- ////WRITELOG("::ConvWndProc:DDE-Msg received")
- }
-#endif
- ImpConvWndData* pObj = (ImpConvWndData*)WinQueryWindowULong( hWnd, 0 );
- return pObj->pThis->ConvWndProc( hWnd, nMsg, nPar1, nPar2 );
-}
-
-//
-// Server-WndProc
-// DDE-Server-Window der App
-//
-MRESULT EXPENTRY ServerWndProc(HWND hWnd,ULONG nMsg,MPARAM nPar1,MPARAM nPar2)
-{
-#if defined(DBG_UTIL) && defined(OV_DEBUG)
- if( nMsg >= WM_DDE_FIRST && nMsg <= WM_DDE_LAST)
- {
- ////WRITELOG("::ServerWndProc:DDE-Msg received")
- }
-#endif
- ImpDdeMgr* pObj = (ImpDdeMgr*)WinQueryWindowULong( hWnd, 0 );
- return pObj->SrvWndProc( hWnd, nMsg, nPar1, nPar2 );
-}
-
-
-inline HDDEDATA ImpDdeMgr::Callback( USHORT nTransactionType,
- USHORT nClipboardFormat, HCONV hConversationHandle, HSZ hsz1,
- HSZ hsz2, HDDEDATA hData, ULONG nData1, ULONG nData2 )
-{
- HDDEDATA hRet = (HDDEDATA)0;
- if( pCallback )
- hRet = (*pCallback)(nTransactionType, nClipboardFormat,
- hConversationHandle, hsz1, hsz2, hData, nData1, nData2);
- return hRet;
-}
-
-
-
-ImpDdeMgr::ImpDdeMgr()
-{
- nLastErrInstance = DMLERR_NO_ERROR;
- pCallback = 0;
- nTransactFilter = 0;
- nServiceCount = 0;
- pServices = 0;
- pAppTable = 0;
- pConvTable = 0;
- pTransTable = 0;
- bServFilterOn = TRUE;
- bInSyncTrans = FALSE;
-
- CreateServerWnd();
- pData = InitAll();
- if ( !pData )
- nLastErrInstance = DMLERR_MEMORY_ERROR;
- else
- RegisterDDEMLApp();
-}
-
-ImpDdeMgr::~ImpDdeMgr()
-{
- CleanUp();
- DestroyServerWnd();
-// Named Shared Mem vom BS loeschen lassen, da nicht bekannt ist,
-// wieviele DDEML-Instanzen die App erzeugt hat, und OS/2
-// keinen App-Referenzzaehler fuer shared mem fuehrt.
-// if ( pData )
-// DosFreeMem( pData );
-}
-
-
-BOOL ImpDdeMgr::IsSameInstance( HWND hWnd )
-{
- TID tid; PID pid;
- WinQueryWindowProcess( hWnd, &pid, &tid );
- return (BOOL)(pid == pidThis);
-}
-
-HSZ ImpDdeMgr::GetAppName( HWND hWnd )
-{
- return 0;
-}
-
-// static
-ImpDdeMgr* ImpDdeMgr::GetImpDdeMgrInstance( HWND hWnd )
-{
- ImpDdeMgrData* pData = ImpDdeMgr::AccessMgrData();
- if( !pData )
- return 0;
-
- ImpDdeMgr* pResult = 0;
- TID tid; PID pidApp;
- WinQueryWindowProcess( hWnd, &pidApp, &tid );
- HWND* pApp = ImpDdeMgr::GetAppTable( pData );
- USHORT nCurApp = 0;
- while( nCurApp < pData->nMaxAppCount )
- {
- HWND hCurWin = *pApp;
- if( hCurWin )
- {
- PID pidCurApp;
- WinQueryWindowProcess( hCurWin, &pidCurApp, &tid );
- if( pidCurApp == pidApp )
- {
- pResult = (ImpDdeMgr*)WinQueryWindowULong( hCurWin, 0 );
- break;
- }
- }
- pApp++;
- nCurApp++;
- }
- return pResult;
-}
-
-
-
-
-
-void ImpDdeMgr::CleanUp()
-{
- DisconnectAll();
- ImpService* pPtr = pServices;
- if( pPtr )
- {
- for( USHORT nIdx = 0; nIdx < nServiceCount; nIdx++, pPtr++ )
- {
- HSZ hStr = pPtr->hBaseServName;
- if( hStr )
- DdeFreeStringHandle( hStr );
- hStr = pPtr->hInstServName;
- if( hStr )
- DdeFreeStringHandle( hStr );
- }
- nServiceCount = 0;
- delete pServices;
- pServices = 0;
- }
- bServFilterOn = TRUE; // default setting DDEML
- UnregisterDDEMLApp();
-}
-
-void ImpDdeMgr::RegisterDDEMLApp()
-{
- HWND* pPtr = pAppTable;
- HWND hCur;
- USHORT nPos = 0;
- while( nPos < pData->nMaxAppCount )
- {
- hCur = *pPtr;
- if (hCur == (HWND)0 )
- {
- // in Tabelle stellen
- *pPtr = hWndServer;
- break;
- }
- nPos++;
- pPtr++;
- }
-}
-
-void ImpDdeMgr::UnregisterDDEMLApp()
-{
- HWND* pPtr = pAppTable;
- USHORT nPos = 0;
- while( nPos < pData->nMaxAppCount )
- {
- if (*pPtr == hWndServer )
- {
- *pPtr = 0;
- break;
- }
- nPos++;
- pPtr++;
- }
-}
-
-// static
-ImpDdeMgrData* ImpDdeMgr::AccessMgrData()
-{
- ImpDdeMgrData* pData = 0;
- APIRET nRet = DosGetNamedSharedMem((PPVOID)&pData,DDEMLDATA,PAG_READ|PAG_WRITE);
- DBG_ASSERT(!nRet,"DDE:AccessMgrData failed");
- return pData;
-}
-
-USHORT ImpDdeMgr::DdeGetLastError()
-{
- USHORT nErr;
- if ( !pData )
- nErr = DMLERR_DLL_NOT_INITIALIZED;
- else if ( nLastErrInstance )
- nErr = nLastErrInstance;
- else
- nErr = pData->nLastErr;
-
- nLastErrInstance = 0;
- pData->nLastErr = 0;
- return nErr;
-}
-
-
-
-USHORT ImpDdeMgr::DdeInitialize( PFNCALLBACK pCallbackProc, ULONG nTransactionFilter )
-{
- if ( !nLastErrInstance )
- {
- if ( !pCallbackProc )
- {
- nLastErrInstance = DMLERR_INVALIDPARAMETER;
- return nLastErrInstance;
- }
- pCallback = pCallbackProc;
- nTransactFilter = nTransactionFilter;
- nTransactFilter |= CBF_FAIL_SELFCONNECTIONS;
- }
- return nLastErrInstance;
-}
-
-
-// static
-HWND ImpDdeMgr::NextFrameWin( HENUM hEnum )
-{
- char aBuf[ 10 ];
-
- HWND hWnd = WinGetNextWindow( hEnum );
- while( hWnd )
- {
- WinQueryClassName( hWnd, sizeof(aBuf)-1, (PCH)aBuf );
- // Frame-Window ?
- if( !strcmp( aBuf, "#1" ) ) // #define WC_FRAME ((PSZ)0xffff0001L)
- break;
- hWnd = WinGetNextWindow( hEnum );
- }
- return hWnd;
-}
-
-
-HCONV ImpDdeMgr::DdeConnectImp( HSZ hszService,HSZ hszTopic,CONVCONTEXT* pCC)
-{
- hCurConv = 0;
- if( !pCC )
- pCC = &aDefaultContext;
-
- ULONG nBufLen;
- PSZ pService = AllocAtomName( (ATOM)hszService, nBufLen );
- PSZ pTopic = AllocAtomName( (ATOM)hszTopic, nBufLen );
-#if 0 && defined(OV_DEBUG)
- String aStr("DdeConnectImp Service:");
- aStr += pService;
- aStr += " Topic:";
- aStr += pTopic;
- WRITELOG((char*)(const char*)aStr)
-#endif
-
-#if defined(OV_DEBUG)
- if( !strcmp(pService,"oliver voeltz") )
- {
- WRITESTATUS("Table of connections");
- MyDosFreeMem( pTopic,"DdeConnectImp" );
- MyDosFreeMem( pService,"DdeConnectImp" );
- return 0;
- }
-#endif
-
-#if 0
- // original pm-fkt benutzen
- HWND hWndCurClient = CreateConversationWnd();
- WinDdeInitiate( hWndCurClient, pService, pTopic, pCC );
- if( GetConversationWndRefCount(hWndCurClient) == 0)
- DestroyConversationWnd( hWndCurClient );
-#else
- // eigener Verbindungsaufbau
- HENUM hEnum = WinBeginEnumWindows( HWND_DESKTOP );
- HWND hWndCurSrv = NextFrameWin( hEnum );
- HWND hWndCurClient = CreateConversationWnd();
- while( hWndCurSrv && !hCurConv )
- {
- if( hWndCurSrv != hWndServer ||
- ((nTransactFilter & CBF_FAIL_SELFCONNECTIONS)==0 ))
- {
- // pro DDE-Server ein Conversation-Window erzeugen
- if( GetConversationWndRefCount(hWndCurClient) >= 2)
- {
- DestroyConversationWnd( hWndCurClient );
- hWndCurClient = CreateConversationWnd();
- }
- MyInitiateDde(hWndCurSrv,hWndCurClient,hszService,hszTopic,pCC);
- if( !bListConnect && hCurConv )
- break;
- }
- hWndCurSrv = NextFrameWin( hEnum );
- }
-
- if( GetConversationWndRefCount(hWndCurClient) == 0)
- DestroyConversationWnd( hWndCurClient );
- WinEndEnumWindows( hEnum );
-#endif
-
- if( !hCurConv )
- nLastErrInstance = DMLERR_NO_CONV_ESTABLISHED;
-
-#if 0 && defined(OV_DEBUG)
- String aCStr( "DdeConnectImp:End ");
- if( nLastErrInstance != DMLERR_NO_CONV_ESTABLISHED )
- aCStr += "(Success)";
- else
- aCStr += "(Failed)";
- WRITELOG((char*)aCStr.GetStr())
-#endif
-
- MyDosFreeMem( pTopic,"DdeConnectImp" );
- MyDosFreeMem( pService,"DdeConnectImp" );
- return hCurConv;
-}
-
-HCONV ImpDdeMgr::DdeConnect( HSZ hszService, HSZ hszTopic, CONVCONTEXT* pCC)
-{
- ////WRITELOG("DdeConnect:Start")
- bListConnect = FALSE;
- HCONV hResult = DdeConnectImp( hszService, hszTopic, pCC );
- ////WRITELOG("DdeConnect:End")
- ////WRITESTATUS("DdeConnect:End")
- return hResult;
-}
-
-
-HCONVLIST ImpDdeMgr::DdeConnectList( HSZ hszService, HSZ hszTopic,
- HCONVLIST hConvList, CONVCONTEXT* pCC )
-{
- nPrevConv = 0;
- ////WRITESTATUS("Before DdeConnectList")
- if( hConvList )
- {
- HCONV hLastConvInList;
-
- hCurListId = hConvList;
- ImpHCONV* pConv = pConvTable;
- pConv += (USHORT)hConvList;
- if( (USHORT)hConvList >= pData->nMaxConvCount ||pConv->hWndThis==0 )
- {
- nLastErrInstance = DMLERR_INVALIDPARAMETER;
- return 0;
- }
- GetLastServer(pData, hConvList, hLastConvInList);
- nPrevConv = (USHORT)hLastConvInList;
- }
- else
- hCurListId = (HCONVLIST)WinCreateWindow( HWND_OBJECT, WC_FRAME,
- CONVLISTNAME, 0,0,0,0,0, HWND_DESKTOP, HWND_BOTTOM, 0,0,0);
-
- bListConnect = TRUE;
- DdeConnectImp( hszService, hszTopic, pCC );
-#if 0 && defined(OV_DEBUG)
- WRITELOG("DdeConnectList:ConnectionList:")
- HCONV hDebug = 0;
- do
- {
- hDebug = DdeQueryNextServer( hCurListId, hDebug);
- String aStr( (ULONG)hDebug );
- WRITELOG((char*)(const char*)aStr)
- } while( hDebug );
-#endif
- ////WRITESTATUS("After DdeConnectList")
- return (HCONVLIST)hCurListId;
-}
-
-DDEINIT* ImpDdeMgr::CreateDDEInitData( HWND hWndDestination, HSZ hszService,
- HSZ hszTopic, CONVCONTEXT* pCC )
-{
- ULONG nLen1 = 0, nLen2 = 0;
- HATOMTBL hAtomTable = WinQuerySystemAtomTable();
-
- if( hszService )
- nLen1 = WinQueryAtomLength( hAtomTable, hszService );
- if( hszTopic )
- nLen2 = WinQueryAtomLength( hAtomTable, hszTopic );
- nLen1++; nLen2++;
-
- DDEINIT* pBuf = 0;
-
- ULONG nLen = sizeof(DDEINIT) + nLen1+ nLen2 + sizeof(CONVCONTEXT);
- if( !(MyDosAllocSharedMem((PPVOID)&pBuf, NULL, nLen,
- PAG_COMMIT | PAG_READ | PAG_WRITE | OBJ_GIVEABLE | OBJ_ANY,
- "CreateDDEInitData")))
- {
- memset( pBuf, 0, nLen );
-
- /*
- PID pid; TID tid;
- WinQueryWindowProcess( hWndDestination, &pid, &tid );
- APIRET nRet = DosGiveSharedMem( pBuf, pid, PAG_READ | PAG_WRITE );
- */
-
- pBuf->cb = nLen;
- pBuf->offConvContext = sizeof( DDEINIT );
- char* pBase = (char*)pBuf;
- pBase += sizeof(DDEINIT);
- if( pCC )
- memcpy( pBase, pCC, sizeof(CONVCONTEXT) );
- pBase += sizeof(CONVCONTEXT);
- pBuf->pszAppName = pBase;
- if( hszService )
- WinQueryAtomName( hAtomTable, hszService, pBase, nLen1 );
- pBase += nLen1;
- pBuf->pszTopic = pBase;
- if( hszTopic )
- WinQueryAtomName( hAtomTable, hszTopic, pBase, nLen2 );
- }
- return pBuf;
-}
-
-
-
-void ImpDdeMgr::MyInitiateDde( HWND hWndSrv, HWND hWndClient,
- HSZ hszService, HSZ hszTopic, CONVCONTEXT* pCC )
-{
- DDEINIT* pBuf = CreateDDEInitData( hWndSrv, hszService, hszTopic, pCC );
- if( pBuf )
- {
- PID pid; TID tid;
- WinQueryWindowProcess( hWndSrv, &pid, &tid );
- APIRET nRet = DosGiveSharedMem( pBuf, pid, PAG_READ | PAG_WRITE );
- WinSendMsg( hWndSrv,WM_DDE_INITIATE,(MPARAM)hWndClient,(MPARAM)pBuf);
- MyDosFreeMem( pBuf,"MyInitiateDde" );
- }
-}
-
-// static
-ImpHCONV* ImpDdeMgr::GetFirstServer(ImpDdeMgrData* pData, HCONVLIST hConvList,
- HCONV& rhConv )
-{
- ImpHCONV* pPtr = GetConvTable( pData );
- HCONV hConv;
- if( !rhConv )
- {
- pPtr++;
- hConv = 1;
- }
- else
- {
- // Startposition
- pPtr += (USHORT)rhConv;
- hConv = rhConv;
- pPtr++; hConv++; // auf den naechsten
- }
- while( hConv < pData->nMaxConvCount )
- {
- if( pPtr->hConvList == hConvList )
- {
- rhConv = hConv;
- return pPtr;
- }
- pPtr++;
- hConv++;
- }
- rhConv = 0;
- return 0;
-}
-
-// static
-ImpHCONV* ImpDdeMgr::GetLastServer(ImpDdeMgrData* pData, HCONVLIST hConvList,
- HCONV& rhConv )
-{
- ImpHCONV* pPtr = GetConvTable( pData );
- pPtr += pData->nMaxConvCount;
- pPtr--;
- HCONV hConv = pData->nMaxConvCount;
- hConv--;
- while( hConv > 0 )
- {
- if( pPtr->hConvList == hConvList )
- {
- rhConv = hConv;
- return pPtr;
- }
- pPtr--;
- hConv--;
- }
- rhConv = 0;
- return 0;
-}
-
-// static
-BOOL ImpDdeMgr::CheckConvListId( HCONVLIST hConvListId )
-{
- HAB hAB = WinQueryAnchorBlock( (HWND)hConvListId );
- if( hAB )
- return WinIsWindow( hAB, (HWND)hConvListId );
- return FALSE;
- /*
- HAB hAB = WinQueryAnchorBlock( (HWND)hConvListId );
- if( hAB )
- {
- char aBuf[ 16 ];
- WinQueryWindowText( (HWND)hConvListId, sizeof(aBuf), aBuf );
- if( strcmp(aBuf, CONVLISTNAME ) == 0 )
- return TRUE;
- }
- return FALSE;
- */
-}
-
-// static
-HCONV ImpDdeMgr::DdeQueryNextServer(HCONVLIST hConvList, HCONV hConvPrev)
-{
- if( !CheckConvListId( hConvList ) )
- return (HCONV)0;
- ImpDdeMgrData* pData = ImpDdeMgr::AccessMgrData();
- GetFirstServer( pData, hConvList, hConvPrev );
- return hConvPrev;
-}
-
-// static
-
-// Idee: DisconnectAll uebergibt das ServerWindow. Zu jedem HCONV
-// wird das Creator-Server-Wnd gespeichert. Disconnect braucht
-// dann nur noch die Window-Handles zu vergleichen
-BOOL ImpDdeMgr::DdeDisconnect( HCONV hConv )
-{
- WRITELOG("DdeDisconnect:Start")
- ////WRITESTATUS("DdeDisconnect:Start")
-
- ImpDdeMgrData* pData = ImpDdeMgr::AccessMgrData();
- if ( !pData )
- {
- ImpDdeMgr::nLastErrInstance = DMLERR_DLL_NOT_INITIALIZED;
- return FALSE;
- }
- ImpHCONV* pConv = GetConvTable(pData) + (USHORT)hConv;
-
- if( (USHORT)hConv >= pData->nMaxConvCount || pConv->hWndThis==0 )
- {
- nLastErrInstance = DMLERR_NO_CONV_ESTABLISHED;
- return FALSE;
- }
-
- PID pidApp; TID tid;
- HWND hWndDummy = WinCreateWindow( HWND_OBJECT, WC_FRAME,
- "Bla", 0, 0,0,0,0, HWND_DESKTOP, HWND_BOTTOM, 0, 0, 0 );
- WinQueryWindowProcess( hWndDummy, &pidApp, &tid );
- WinDestroyWindow( hWndDummy );
- PID pidThis; PID pidPartner;
-
- HWND hWndThis = pConv->hWndThis;
- HWND hWndPartner = pConv->hWndPartner;
-
- WinQueryWindowProcess( hWndThis, &pidThis, &tid );
- WinQueryWindowProcess( hWndPartner, &pidPartner, &tid );
- if( pidApp != pidThis && pidApp != pidPartner )
- return TRUE; // gehoert nicht der App -> ueberspringen
-
- HCONV hConvPartner = pConv->hConvPartner;
-
- // die App benachrichtigen, dass alle offenen Advise-Loops
- // beendet werden, egal ob sie vom Server oder Client
- // initiiert wurden. Die Dinger aber nicht loeschen, da sie evtl.
- // noch vom Partner gebraucht werden.
- ImpConvWndData* pObj =
- (ImpConvWndData*)WinQueryWindowULong( pConv->hWndThis, 0 );
- ImpDdeMgr* pThis = pObj->pThis;
- pThis->SendUnadvises( hConv, 0, FALSE ); // alle Formate & NICHT loeschen
- pThis->SendUnadvises( hConvPartner, 0, FALSE ); // alle Formate & NICHT loeschen
-
- pConv->nStatus |= ST_TERMINATED;
-
- HAB hAB = WinQueryAnchorBlock( pConv->hWndThis );
- // um die MessageQueue inne Gaenge zu halten
- ULONG nTimerId = WinStartTimer( hAB, 0, 0, 50 );
-
- /*
- Die Partner-App muss ein DDE_TERMINATE posten, auf das
- wir warten muessen, um alle Messages zu bearbeiten, die
- _vor_ dem DdeDisconnect von der Partner-App gepostet
- wurden.
- */
- WRITELOG("DdeDisconnect:Waiting for acknowledge...")
- WinDdePostMsg( hWndPartner, hWndThis, WM_DDE_TERMINATE,
- (PDDESTRUCT)0,DDEPM_RETRY);
-
- QMSG aQueueMsg;
- BOOL bContinue = TRUE;
- while( bContinue )
- {
- if( WinGetMsg( hAB, &aQueueMsg, 0, 0, 0 ))
- {
- WinDispatchMsg( hAB, &aQueueMsg );
- if( (!WinIsWindow( hAB, hWndPartner)) ||
- (pConv->nStatus & ST_TERMACKREC) )
- {
- bContinue = FALSE;
- if( pConv->nStatus & ST_TERMACKREC )
- {
- WRITELOG("DdeDisconnect: TermAck received")
- }
- else
- {
- WRITELOG("DdeDisconnect: Partner died")
- }
- }
- }
- else
- bContinue = FALSE;
- }
-
- WinStopTimer( hAB, 0, nTimerId );
-
- // WRITELOG("DdeDisconnect:Freeing data")
- // Transaktionstabelle aufraeumen
- FreeTransactions( pData, hConv );
- if( hConvPartner )
- FreeTransactions( pData, hConvPartner );
-
- FreeConvHandle( pData, hConv );
-
- WRITELOG("DdeDisconnect:End")
- //WRITESTATUS("DdeDisconnect:End")
- return TRUE;
-}
-
-// static
-BOOL ImpDdeMgr::DdeDisconnectList( HCONVLIST hConvList )
-{
- if( !CheckConvListId( hConvList ) )
- {
- ImpDdeMgr::nLastErrInstance = DMLERR_INVALIDPARAMETER;
- return FALSE;
- }
-
- ImpDdeMgrData* pData = ImpDdeMgr::AccessMgrData();
- if ( !pData )
- {
- ImpDdeMgr::nLastErrInstance = DMLERR_DLL_NOT_INITIALIZED;
- return FALSE;
- }
- HCONV hConv = 0;
- GetFirstServer( pData, hConvList, hConv );
- while( hConv )
- {
- DdeDisconnect( hConv );
- GetFirstServer( pData, hConvList, hConv );
- }
- WinDestroyWindow( (HWND)hConvList );
- return TRUE;
-}
-
-
-
-// static
-HCONV ImpDdeMgr::DdeReconnect(HCONV hConv)
-{
- ImpDdeMgrData* pData = ImpDdeMgr::AccessMgrData();
- if ( !pData )
- {
- ImpDdeMgr::nLastErrInstance = DMLERR_DLL_NOT_INITIALIZED;
- return 0;
- }
- return 0;
-}
-
-// static
-USHORT ImpDdeMgr::DdeQueryConvInfo(HCONV hConv, ULONG nTransId, CONVINFO* pCI)
-{
- if( !pCI || pCI->nSize == 0)
- return 0;
- ImpDdeMgrData* pData = ImpDdeMgr::AccessMgrData();
- if ( !pData )
- {
- ImpDdeMgr::nLastErrInstance = DMLERR_DLL_NOT_INITIALIZED;
- return 0;
- }
- Transaction* pTrans;
- if( nTransId != QID_SYNC )
- {
- pTrans = ImpDdeMgr::GetTransTable( pData );
- pTrans += nTransId;
- if( nTransId >= pData->nMaxTransCount || pTrans->hConvOwner == 0 )
- {
- ImpDdeMgr::nLastErrInstance = DMLERR_UNFOUND_QUEUE_ID;
- return 0;
- }
- }
- else
- pTrans = 0;
-
- ImpHCONV* pConv = ImpDdeMgr::GetConvTable( pData );
- pConv += (ULONG)hConv;
- if( hConv >= pData->nMaxConvCount || pConv->hWndThis == 0 )
- {
- ImpDdeMgr::nLastErrInstance = DMLERR_NO_CONV_ESTABLISHED;
- return 0;
- }
-
- USHORT nSize = pCI->nSize;
- if( nSize > sizeof(CONVINFO) )
- nSize = sizeof(CONVINFO);
- CONVINFO aTempInfo;
- memset( &aTempInfo, 0, sizeof(CONVINFO) );
- aTempInfo.nSize = pCI->nSize;
- aTempInfo.hConvPartner = pConv->hConvPartner;
- aTempInfo.hszPartner = pConv->hszPartner;
- aTempInfo.hszServiceReq = pConv->hszServiceReq;
- aTempInfo.hszTopic = pConv->hszTopic;
- aTempInfo.nStatus = pConv->nStatus;
- aTempInfo.hConvList = pConv->hConvList;
- aTempInfo.aConvCtxt = pConv->aConvContext;
- if( pTrans )
- {
- aTempInfo.nUser = pTrans->nUser;
- aTempInfo.hszItem = pTrans->hszItem;
- aTempInfo.nFormat = pTrans->nFormat;
- aTempInfo.nType = pTrans->nType;
- aTempInfo.nConvst = pTrans->nConvst;
- aTempInfo.nLastError= pTrans->nLastError;
- }
- memcpy( pCI, &aTempInfo, nSize );
-
- return nSize;
-}
-
-// static
-BOOL ImpDdeMgr::DdeSetUserHandle(HCONV hConv, ULONG nTransId, ULONG hUser)
-{
- ImpDdeMgrData* pData = ImpDdeMgr::AccessMgrData();
- if ( !pData )
- {
- ImpDdeMgr::nLastErrInstance = DMLERR_DLL_NOT_INITIALIZED;
- return FALSE;
- }
- Transaction* pTrans = GetTransTable( pData );
- pTrans += nTransId;
- if( !nTransId || !hConv || nTransId >= pData->nMaxTransCount ||
- pTrans->hConvOwner != hConv )
- {
- ImpDdeMgr::nLastErrInstance = DMLERR_INVALIDPARAMETER;
- return FALSE;
- }
- if( !pTrans->hConvOwner)
- {
- ImpDdeMgr::nLastErrInstance = DMLERR_UNFOUND_QUEUE_ID;
- return FALSE;
- }
- pTrans->nUser = hUser;
- return TRUE;
-}
-
-BOOL ImpDdeMgr::DdeAbandonTransaction( HCONV hConv, ULONG nTransId )
-{
- ////WRITELOG("DdeAbandonTransaction:Start")
- if( !pData )
- {
- nLastErrInstance = DMLERR_DLL_NOT_INITIALIZED;
- return FALSE;
- }
- ImpHCONV* pConv = pConvTable;
- pConv += (USHORT)hConv;
- if( nTransId < 1 || nTransId >= pData->nMaxTransCount ||
- hConv < 1 || hConv >= pData->nMaxConvCount || !pConv->hWndThis)
- {
- nLastErrInstance = DMLERR_INVALIDPARAMETER;
- return FALSE;
- }
- if( !hConv )
- {
- DBG_ASSERT(0,"DdeAbandonTransaction:NULL-hConv not supported");
- nLastErrInstance = DMLERR_INVALIDPARAMETER;
- return FALSE;
- }
- Transaction* pTrans = pTransTable;
- pTrans += (USHORT)nTransId;
- if( pTrans->hConvOwner != hConv )
- {
- nLastErrInstance = DMLERR_UNFOUND_QUEUE_ID;
- return FALSE;
- }
-
- if( bInSyncTrans && nTransId == nSyncTransId )
- {
- bSyncAbandonTrans = TRUE;
- return TRUE;
- }
- USHORT nTempType = pTrans->nType;
- nTempType &= (~XTYPF_MASK);
- if( nTempType == (XTYP_ADVREQ & ~(XTYPF_NOBLOCK)))
- {
- ////WRITELOG("DdeAbandTrans:Advise Loop")
-
-// ----------------------------------------------------------------------
-// Der von der Deutschen Bank eingesetzte DDE-Server
-// "Invision V2.71 Build 36 Mar 12 1999 V4.8.2" hat einen Bug, der
-// dazu fuehrt, dass auf per WM_DDE_TERMINATE geschlossene Verbindungen
-// nicht mit einem WM_DDE_TERMINATE geantwortet wird, wenn der
-// entsprechende Link vorher per WM_DDE_UNADVISE beendet wurde. Dieser
-// Bug tritt ab zwei parallel laufenden Links auf. Auf Wunsch der DB
-// wurde das folgende Workaround eingebaut.
-// ----------------------------------------------------------------------
-#define DEUTSCHE_BANK
-#ifndef DEUTSCHE_BANK
-
-// Acknowledge ist beim Unadvise nicht ueblich
-//#define SO_DDE_ABANDON_TRANSACTION_WAIT_ACK
-#ifdef SO_DDE_ABANDON_TRANSACTION_WAIT_ACK
- DDESTRUCT* pOutDDEData = MakeDDEObject( pConv->hWndPartner,
- pTrans->hszItem, DDE_FACKREQ, 0 /*pTrans->nFormat*/, 0, 0);
-#else
- DDESTRUCT* pOutDDEData = MakeDDEObject( pConv->hWndPartner,
- pTrans->hszItem, 0, 0 /*pTrans->nFormat*/, 0, 0);
-#endif
- WRITELOG("DdeAbandTrans:Waiting for acknowledge...")
- pTrans->nConvst = XST_UNADVSENT;
- if ( !MyWinDdePostMsg( pConv->hWndPartner, pConv->hWndThis,
- WM_DDE_UNADVISE, pOutDDEData, DDEPM_RETRY ) )
- {
- WRITELOG("DdeAbandTrans:PostMsg Failed")
- return FALSE;
- }
-#ifdef SO_DDE_ABANDON_TRANSACTION_WAIT_ACK
- WaitTransState( pTrans, nTransId, XST_UNADVACKRCVD, 0 );
-#else
- pTrans->nConvst = XST_UNADVACKRCVD;
-#endif
-
-#endif // DEUTSCHE_BANK
-
- WRITELOG("DdeAbandTrans:Ack received->Freeing transaction")
- FreeTransaction( pData, nTransId );
- }
- WRITELOG("DdeAbandonTransaction:End")
- return TRUE;
-}
-
-// wird von einem Server aufgerufen, wenn sich die Daten des
-// Topic/Item-Paars geaendert haben. Diese Funktion fordert
-// dann den Server auf, die Daten zu rendern (bei Hotlinks) und
-// benachrichtigt die Clients
-BOOL ImpDdeMgr::DdePostAdvise( HSZ hszTopic, HSZ hszItem)
-{
- ////WRITELOG("DdePostAdvise:Start")
- ////WRITESTATUS("DdePostAdvise:Start")
-
-#if 0 && defined( OV_DEBUG )
- String aDebStr("DdePostAdvise:Item ");
- aDebStr += (ULONG)hszItem;
- WRITELOG((char*)(const char*)aDebStr)
-#endif
-
- Transaction* pTrans = pTransTable;
- pTrans++;
- USHORT nCurTrans = 1;
- USHORT nUsedTransactions = pData->nCurTransCount;
- while( nUsedTransactions && nCurTrans < pData->nMaxTransCount )
- {
- HCONV hOwner = pTrans->hConvOwner;
- if( hOwner )
- {
- nUsedTransactions--;
- USHORT nTempType = pTrans->nType;
- nTempType &= (~XTYPF_MASK);
- if( nTempType == (XTYP_ADVREQ & (~XTYPF_NOBLOCK) ) )
- {
- ImpHCONV* pConv = pConvTable;
- pConv += (USHORT)hOwner;
- if(hszItem == pTrans->hszItem && pConv->hszTopic == hszTopic)
- {
- if( pConv->hConvPartner )
- {
- // Transaktionen werden immer vom Client erzeugt
- // -> auf Server-HCONV umschalten
- hOwner = pConv->hConvPartner;
- pConv = pConvTable;
- pConv += (USHORT)hOwner;
- }
- HWND hWndClient = pConv->hWndPartner;
- HWND hWndServer = pConv->hWndThis;
-#if 0 && defined( OV_DEBUG )
- String aDebStr("DdePostAdvise: Server:");
- aDebStr += (ULONG)hWndServer;
- aDebStr += " Client:";
- aDebStr += (ULONG)hWndClient;
- WRITELOG((char*)(const char*)aDebStr)
-#endif
- DDESTRUCT* pOutDDEData;
- if ( pTrans->nType & XTYPF_NODATA )
- {
- // Warm link
- ////WRITELOG("DdePostAdvise:Warm link found")
- pOutDDEData = MakeDDEObject( hWndClient, hszItem,
- DDE_FNODATA, pTrans->nFormat, 0, 0 );
- }
- else
- {
- // Hot link
- ////WRITELOG("DdePostAdvise:Hot link found")
- pOutDDEData = Callback( XTYP_ADVREQ,
- pTrans->nFormat, hOwner, hszTopic,
- hszItem, (HDDEDATA)0, 1, 0 );
- }
- if( pOutDDEData )
- {
- // todo: FACK_REQ in Out-Data setzen, wenn pTrans->nType & XTYPF_ACKREQ
- ////WRITELOG("DdePostAdvise:Sending data/notification")
- BOOL bSuccess = MyWinDdePostMsg( hWndClient,
- hWndServer,WM_DDE_DATA, pOutDDEData, DDEPM_RETRY);
- if( bSuccess )
- {
- // auf Acknowledge des Partners warten ?
- if( pTrans->nType & XTYPF_ACKREQ )
- {
- pTrans->nConvst = XST_ADVDATASENT;
- // Impl. ist falsch! => korrekt: XST_ADVDATAACKRCVD
- WaitTransState(pTrans, nCurTrans,
- XST_UNADVACKRCVD, 0);
- }
- }
- else
- {
- ////WRITELOG("DdePostAdvise:PostMsg failed")
- nLastErrInstance = DMLERR_POSTMSG_FAILED;
- }
- }
- else
- {
- ////WRITELOG("DdePostAdvise:No data to send")
- }
- }
- }
- }
- nCurTrans++;
- pTrans++;
- }
- ////WRITELOG("DdePostAdvise:End")
- return TRUE;
-}
-
-BOOL ImpDdeMgr::DdeEnableCallback( HCONV hConv, USHORT wCmd)
-{
- return FALSE;
-}
-
-// Rueckgabe: 0==Service nicht registriert; sonst Pointer auf Service-Eintrag
-ImpService* ImpDdeMgr::GetService( HSZ hszService )
-{
- ImpService* pPtr = pServices;
- if( !pPtr || !hszService )
- return 0;
- for( ULONG nIdx = 0; nIdx < nServiceCount; nIdx++, pPtr++ )
- {
- if(( hszService == pPtr->hBaseServName ) ||
- ( hszService == pPtr->hInstServName ) )
- return pPtr;
- }
- return 0;
-}
-
-
-// legt Service in Service-Tabelle ab. Tabelle wird ggf. expandiert
-ImpService* ImpDdeMgr::PutService( HSZ hszService )
-{
- if( !pServices )
- {
- DBG_ASSERT(nServiceCount==0,"DDE:Bad ServiceCount");
- pServices = new ImpService[ DDEMLSERVICETABLE_INISIZE ];
- memset( pServices, 0, DDEMLSERVICETABLE_INISIZE* sizeof(ImpService));
- nServiceCount = DDEMLSERVICETABLE_INISIZE;
- }
- ImpService* pPtr = pServices;
- USHORT nCurPos = 0;
- while( pPtr )
- {
- if( pPtr->hBaseServName == 0 )
- break;
- nCurPos++;
- if( nCurPos < nServiceCount )
- pPtr++;
- else
- pPtr = 0;
- }
- if( !pPtr )
- {
- // Tabelle vergroessern
- pPtr = new ImpService[ nServiceCount + DDEMLSERVICETABLE_INISIZE ];
- memset( pPtr, 0, DDEMLSERVICETABLE_INISIZE* sizeof(ImpService));
- memcpy( pPtr, pServices, nServiceCount * sizeof(ImpService) );
-#ifdef DBG_UTIL
- memset( pServices, 0, nServiceCount * sizeof(ImpService) );
-#endif
- delete pServices;
- pServices = pPtr;
- pPtr += nServiceCount; // zeigt auf erste neue Position
- nServiceCount += DDEMLSERVICETABLE_INISIZE;
- }
- DBG_ASSERT(pPtr->hBaseServName==0,"DDE:Service not empty");
- DBG_ASSERT(pPtr->hInstServName==0,"DDE:Service not empty");
-
- DdeKeepStringHandle( hszService );
-
- USHORT nStrLen = (USHORT)DdeQueryString( hszService, 0, 0, 0);
- char* pBuf = new char[ nStrLen + 1 ];
- DdeQueryString(hszService, pBuf, nStrLen, 850 /* CodePage*/ );
- pBuf[ nStrLen ] = 0;
- String aStr( (ULONG)hWndServer );
- aStr += pBuf;
- HSZ hszInstServ = DdeCreateStringHandle( (PSZ)(const char*)pBuf, 850 );
- delete [] pBuf;
-
- pPtr->hBaseServName = hszService;
- pPtr->hInstServName = hszInstServ;
- return pPtr;
-}
-
-void ImpDdeMgr::BroadcastService( ImpService* pService, BOOL bRegistered )
-{
- DBG_ASSERT(pService,"DDE:No Service");
- if( !pService )
- return;
- MPARAM aMp1 = (MPARAM)(pService->hBaseServName);
- MPARAM aMp2 = (MPARAM)(pService->hInstServName);
- ULONG nMsg;
- if( bRegistered )
- nMsg = WM_DDEML_REGISTER;
- else
- nMsg = WM_DDEML_UNREGISTER;
-
- HWND* pPtr = pAppTable;
- for( USHORT nPos = 0; nPos < pData->nMaxAppCount; nPos++, pPtr++ )
- {
- HWND hWndCurWin = *pPtr;
- if ( hWndCurWin && hWndCurWin != hWndServer )
- WinSendMsg( hWndCurWin, nMsg, aMp1, aMp2 );
- }
-}
-
-HDDEDATA ImpDdeMgr::DdeNameService( HSZ hszService, USHORT afCmd )
-{
- HDDEDATA hRet = (HDDEDATA)1;
-
- if( afCmd & DNS_FILTERON )
- bServFilterOn = TRUE;
- else if( afCmd & DNS_FILTEROFF )
- bServFilterOn = FALSE;
- ImpService* pService = GetService( hszService );
- BOOL bRegister = (BOOL)(afCmd & DNS_REGISTER);
- if( bRegister )
- {
- if( !pService )
- {
- pService = PutService( hszService );
- BroadcastService( pService, TRUE );
- }
- }
- else
- {
- if( pService )
- {
- BroadcastService( pService, FALSE );
- DdeFreeStringHandle( pService->hBaseServName );
- pService->hBaseServName = 0;
- DdeFreeStringHandle( pService->hInstServName );
- pService->hInstServName = 0;
- }
- hRet = (HDDEDATA)0; // Service nicht gefunden
- }
- return hRet;
-}
-
-
-// static
-HDDEDATA ImpDdeMgr::DdeClientTransaction(void* pDdeData, ULONG cbData,
- HCONV hConv, HSZ hszItem, USHORT nFormat, USHORT nType,
- ULONG nTimeout, ULONG* pResult)
-{
- //WRITELOG("DdeClientTransaction:Start")
-
-#if 0 && defined(OV_DEBUG)
- if( nType == XTYP_REQUEST )
- {
- WRITELOG("Start XTYP_REQUEST");
- WinMessageBox(HWND_DESKTOP,HWND_DESKTOP,
- "Start XTYP_REQUEST","DdeClientTransaction",
- HWND_DESKTOP,MB_OK);
- }
-#endif
-
- if( pResult )
- *pResult = 0;
-
- ImpDdeMgrData* pData = ImpDdeMgr::AccessMgrData();
- if ( !pData )
- {
- ImpDdeMgr::nLastErrInstance = DMLERR_DLL_NOT_INITIALIZED;
- return (HDDEDATA)0;
- }
-
- BOOL bIsDdeHandle = (BOOL)(pDdeData && cbData==0xffffffff);
- BOOL bAppOwnsHandle = (BOOL)( bIsDdeHandle &&
- (((DDESTRUCT*)pDdeData)->fsStatus & IMP_HDATAAPPOWNED) );
-
- BOOL bNoData = (BOOL)(nType & XTYPF_NODATA)!=0;
- BOOL bAckReq = (BOOL)(nType & XTYPF_ACKREQ)!=0;
- USHORT nTypeFlags = nType & XTYPF_MASK;
- nType &= (~XTYPF_MASK);
-
- BOOL bSync = (BOOL)( nTimeout != TIMEOUT_ASYNC ) != 0;
- if( nType == XTYP_ADVSTART )
- bSync = TRUE;
-
- // Mapping transaction -> OS/2-Message
- USHORT nTimeoutErr, nMsg;
- switch ( nType )
- {
- case XTYP_ADVSTART:
- nMsg = WM_DDE_ADVISE;
- nTimeoutErr = DMLERR_ADVACKTIMEOUT;
-{
- nTimeout = 60000;
-#if 0 && defined(OV_DEBUG)
- char aBuf[ 128 ];
- ImpDdeMgr::DdeQueryString( hszItem,aBuf,127,850);
- String aXXStr("Establishing hotlink ");
- aXXStr += aBuf;
- WRITELOG((char*)aXXStr.GetStr());
-#endif
-
-}
- break;
-
- case XTYP_ADVSTOP:
- nMsg = WM_DDE_UNADVISE;
- nTimeoutErr = DMLERR_UNADVACKTIMEOUT;
- break;
-
- case XTYP_REQUEST:
- nMsg = WM_DDE_REQUEST;
- nTimeoutErr = DMLERR_DATAACKTIMEOUT;
- break;
-
- case XTYP_POKE:
- nMsg = WM_DDE_POKE;
- nTimeoutErr = DMLERR_POKEACKTIMEOUT;
- break;
-
- case XTYP_EXECUTE:
- nMsg = WM_DDE_EXECUTE;
- nTimeoutErr = DMLERR_EXECACKTIMEOUT;
- break;
-
- default:
- nMsg = 0;
- }
- if(!hConv || (USHORT)hConv>= pData->nMaxConvCount || !nType || !nMsg ||
- (nType != XTYP_EXECUTE && (!hszItem || !nFormat)) )
- {
- WRITELOG("DdeClientTransaction:Invalid parameter")
- ImpDdeMgr::nLastErrInstance = DMLERR_INVALIDPARAMETER;
- if( bIsDdeHandle && !bAppOwnsHandle )
- DdeFreeDataHandle( (HDDEDATA)pDdeData );
- return (HDDEDATA)0;
- }
-
- // ueber den Conversation handle das ImpDdeMgr-Objekt holen
- ImpHCONV* pConv = GetConvTable( pData );
- pConv += (USHORT)hConv;
- ImpConvWndData* pObj =
- (ImpConvWndData*)WinQueryWindowULong( pConv->hWndThis, 0 );
- ImpDdeMgr* pThis = pObj->pThis;
-
- if( bSync && pThis->bInSyncTrans )
- {
- WRITELOG("DdeClientTransaction:Already in sync. transaction")
- ImpDdeMgr::nLastErrInstance = DMLERR_REENTRANCY;
- if( bIsDdeHandle && !bAppOwnsHandle )
- DdeFreeDataHandle( (HDDEDATA)pDdeData );
- return (HDDEDATA)0;
- }
-
- Transaction* pTrans;
-
- BOOL bReqOnAdvLoop = FALSE;
- ULONG nTransId = GetTransaction( pData, hConv, hszItem, nFormat );
- if( nTransId )
- {
- // WRITELOG("DdeClientTransaction:Transaction found")
- pTrans = GetTransTable( pData );
- pTrans += (USHORT)nTransId;
- USHORT nTransType = pTrans->nType;
- nTransType &= (~XTYPF_MASK);
- if( (nType != XTYP_REQUEST && nTransType == nType) ||
- // wird Advise-Loop schon zum requesten missbraucht ?
- (nType == XTYP_REQUEST &&
- nTransType == XTYP_ADVREQ &&
- pTrans->nConvst == XST_WAITING_REQDATA))
- {
- // dieser Kanal ist dicht!
- WRITELOG("DdeClientTransaction:Transaction already used")
- ImpDdeMgr::nLastErrInstance = DMLERR_REENTRANCY;
- if( bIsDdeHandle && !bAppOwnsHandle )
- DdeFreeDataHandle( (HDDEDATA)pDdeData );
- return (HDDEDATA)0;
- }
- else if( nTransType == XTYP_ADVREQ )
- {
- switch( nType )
- {
- case XTYP_ADVSTOP:
- //WRITELOG("DdeClientTransaction:Stopping advise trans")
- pTrans->nType = XTYP_ADVSTOP;
- break;
-
- case XTYP_ADVSTART:
- //WRITELOG("DdeClientTransaction:Adj. Advise-Params")
- pTrans->nType = XTYP_ADVREQ;
- if( bNoData )
- pTrans->nType |= XTYPF_NODATA;
- if( bAckReq )
- pTrans->nType |= XTYPF_ACKREQ;
- if( pResult )
- *pResult = nTransId;
- return (HDDEDATA)TRUE;
-
- case XTYP_REQUEST:
- // WRITELOG("DdeClientTransaction:Using adv trans for req")
- // nConvst wird unten auf XST_WAITING_REQDATA gesetzt
- bReqOnAdvLoop = TRUE;
- break;
-
- default:
- WRITELOG("DdeClientTransaction:Invalid parameter")
- ImpDdeMgr::nLastErrInstance = DMLERR_INVALIDPARAMETER;
- if( bIsDdeHandle && !bAppOwnsHandle )
- DdeFreeDataHandle( (HDDEDATA)pDdeData );
- return (HDDEDATA)FALSE;
- }
- }
- }
- else
- {
- // WRITELOG("DdeClientTransaction:Creating transaction")
- nTransId = CreateTransaction(pData, hConv, hszItem, nFormat, nType);
- }
-
- pTrans = GetTransTable( pData );
- pTrans += (USHORT)nTransId;
- pTrans->nConvst = XST_WAITING_ACK;
- if( nType == XTYP_REQUEST )
- pTrans->nConvst = XST_WAITING_REQDATA;
-
- HWND hWndServer = pConv->hWndPartner;
- HWND hWndClient = pConv->hWndThis;
-
- HDDEDATA pOutDDEData;
- if( bIsDdeHandle )
- {
- if( bAppOwnsHandle )
- {
- // wir muessen leider leider duplizieren, da uns OS/2
- // keine Chance laesst, diesen Status im Datenobjekt
- // zu versenken.
- ////WRITELOG("DdeClientTransaction:Copying handle")
- HDDEDATA pNew;
- HDDEDATA pData = (HDDEDATA)pDdeData;
- if( !(MyDosAllocSharedMem((PPVOID)&pNew, NULL, pData->cbData,
- PAG_COMMIT | PAG_READ | PAG_WRITE | OBJ_GIVEABLE | OBJ_ANY,
- "MakeDDEObject")))
- {
- memcpy( pNew, pData, pData->cbData );
- pOutDDEData = pNew;
- }
- else
- {
- WRITELOG("DdeClientTransaction:No Memory")
- ImpDdeMgr::nLastErrInstance = DMLERR_LOW_MEMORY;
- return (HDDEDATA)0;
- }
- }
- else
- pOutDDEData = (HDDEDATA)pDdeData;
- }
- else
- pOutDDEData=MakeDDEObject(hWndServer,hszItem,0,nFormat,pDdeData,cbData);
-
- pOutDDEData->fsStatus |= nTypeFlags;
-
- HDDEDATA pDDEInData = 0;
- if( bSync )
- {
- if( nType != XTYP_REQUEST )
- pOutDDEData->fsStatus |= DDE_FACKREQ;
-
- // WRITELOG("DdeClientTransaction:Starting sync. trans.")
- pThis->hSyncResponseData = (HDDEDATA)0;
- pThis->nSyncResponseMsg = 0;
- pThis->bInSyncTrans = TRUE;
- pThis->nSyncTransId = nTransId;
- pThis->bSyncAbandonTrans = FALSE;
-
- if ( !MyWinDdePostMsg( hWndServer, hWndClient, nMsg, pOutDDEData,
- DDEPM_RETRY) )
- {
- WRITELOG("DdeClientTransaction:PostMsg failed")
- nLastErrInstance = DMLERR_POSTMSG_FAILED;
- if( !bReqOnAdvLoop )
- FreeTransaction( pData, nTransId );
- else
- {
- DBG_ASSERT(pTrans->nType==XTYP_ADVREQ,"DDE:Error!")
- pTrans->nConvst = 0;
- }
- return FALSE;
- }
- HAB hAB = WinQueryAnchorBlock( hWndClient );
- ULONG nDummyTimer = WinStartTimer( hAB, 0, 0, 50 );
- ULONG nTimeoutId = TID_USERMAX - nTransId;
- WinStartTimer( hAB, hWndClient, nTimeoutId, nTimeout );
- QMSG aQueueMsg;
- BOOL bLoop = TRUE;
- while( bLoop )
- {
- if( pThis->nSyncResponseMsg )
- bLoop = FALSE;
- else
- {
- if( WinGetMsg(hAB,&aQueueMsg,0,0,0 ))
- {
- WinDispatchMsg( hAB, &aQueueMsg );
- }
- else
- bLoop = FALSE;
- }
- }
-
- WinStopTimer( hAB, hWndClient, nTimeoutId );
- WinStopTimer( hAB, 0, nDummyTimer );
-
- //
- // Der Speicherblock pOutDDEData muss vom Server geloescht worden sein!
- // Ueberlegen: Nochmal loeschen, falls Server buggy ist, ansonsten
- // platzt uns bald der Adressraum!
- //
- if( !pThis->nSyncResponseMsg )
- {
- // unsere App wurde beendet
- ////WRITELOG("DdeClientTransaction:App terminated")
- return 0;
- }
- pDDEInData = pThis->hSyncResponseData;
- nMsg = pThis->nSyncResponseMsg;
- pThis->hSyncResponseData= 0;
- pThis->nSyncResponseMsg = 0;
- pThis->bInSyncTrans = FALSE;
- pThis->nSyncTransId = 0;
- if( !pDDEInData && nMsg != WM_TIMER )
- {
- DBG_ASSERT(0,"Dde:No data!");
- WRITELOG("DdeClientTransaction: No Data!")
- return (HDDEDATA)0;
- }
- switch( nMsg )
- {
- case WM_TIMER:
- WRITELOG("DdeClientTransaction:Timeout!")
- nLastErrInstance = nTimeoutErr;
- if( bReqOnAdvLoop )
- // auf normalen Loop-Betrieb zurueckschalten
- pTrans->nConvst = XST_WAITING_ADVDATA;
- break;
-
- case WM_DDE_ACK:
- {
- // WRITELOG("DdeClientTransaction:Ack received")
- BOOL bPositive = (BOOL)(pDDEInData->fsStatus & DDE_FACK);
- MyDosFreeMem( pDDEInData,"DdeClientTransaction" );
- pDDEInData = (HDDEDATA)bPositive;
- if( nType == XTYP_ADVSTART && pDDEInData )
- {
-
-#if 0 && defined(OV_DEBUG)
- char aBuf[ 128 ];
- ImpDdeMgr::DdeQueryString( pTrans->hszItem,aBuf,128,850);
- String aXXStr("Hotlink ");
-#endif
-
- if( bPositive )
- {
- pTrans->nType = XTYP_ADVREQ;
- // Hot/Warmlink, Ack
- pTrans->nType |= nTypeFlags;
- // XST_WAITING_ACK ==> XST_WAITING_ADVDATA
- pTrans->nConvst = XST_WAITING_ADVDATA;
-
-#if 0 && defined(OV_DEBUG)
- aXXStr += "established ";
- aXXStr += aBuf;
-#endif
-
- }
-
-#if 0 && defined(OV_DEBUG)
- else
- {
- aXXStr += "failed ";
- aXXStr += aBuf;
- }
- WRITELOG((char*)aXXStr.GetStr());
-#endif
-
- }
- }
- break;
-
- case WM_DDE_DATA:
- // WRITELOG("DdeClientTransaction:Data received")
- // WRITEDATA(pDDEInData)
- if( bReqOnAdvLoop )
- {
- DBG_ASSERT(pTrans->nConvst==XST_WAITING_REQDATA,"DDE:Bad state");
- DBG_ASSERT(pTrans->nType==XTYP_ADVREQ,"DDE:Bad state");
- // auf Loop-Betrieb umschalten
- pTrans->nConvst = XST_WAITING_ADVDATA;
- }
- break;
-
- default:
- WRITELOG("DdeClientTransaction:Unexpected msg")
- MyDosFreeMem( pDDEInData,"DdeClientTransaction" );
- pDDEInData = 0;
- }
- pThis->bSyncAbandonTrans = FALSE;
- pThis->bInSyncTrans = FALSE;
- if( pThis->bSyncAbandonTrans && bReqOnAdvLoop )
- pThis->DdeAbandonTransaction( hConv, nTransId );
- }
- else
- {
- // WRITELOG("DdeClientTransaction:Starting async. trans.")
- pDDEInData = (HDDEDATA)MyWinDdePostMsg( hWndServer, hWndClient, nMsg,
- pOutDDEData, DDEPM_RETRY);
- if( !pDDEInData )
- {
- WRITELOG("DdeClientTransaction:PostMsg failed")
- nLastErrInstance = DMLERR_POSTMSG_FAILED;
- if( !bReqOnAdvLoop )
- FreeTransaction( pData, nTransId );
- else
- {
- DBG_ASSERT(pTrans->nType==XTYP_ADVREQ,"DDE:Error!")
- pTrans->nConvst = 0;
- }
- }
- else
- {
- // WRITELOG("DdeClientTransaction:Async trans. success")
- if( pResult )
- *pResult = nTransId;
- }
- }
-#if 0 && defined( OV_DEBUG )
- if( nType == XTYP_REQUEST )
- {
- WRITELOG("End XTYP_REQUEST");
- WinMessageBox(HWND_DESKTOP,HWND_DESKTOP,
- "End XTYP_REQUEST","DdeClientTransaction",
- HWND_DESKTOP,MB_OK);
- }
-#endif
- //WRITELOG("DdeClientTransaction:End")
- //WRITESTATUS("DdeClientTransaction:End")
- return pDDEInData;
-}
-
-MRESULT ImpDdeMgr::DdeRegister( ImpWndProcParams* pParams )
-{
- MRESULT nRet = (MRESULT)0;
- if ( !(nTransactFilter & CBF_SKIP_REGISTRATIONS) )
- {
- HSZ hSBaseName = (HSZ)pParams->nPar1;
- HSZ hIBaseName = (HSZ)pParams->nPar2;
- nRet=(MRESULT)Callback(XTYP_REGISTER,0,0,hSBaseName,hIBaseName,0,0,0);
- }
- return nRet;
-}
-
-MRESULT ImpDdeMgr::DdeUnregister( ImpWndProcParams* pParams )
-{
- MRESULT nRet = (MRESULT)0;
- if ( !(nTransactFilter & CBF_SKIP_UNREGISTRATIONS) )
- {
- HSZ hSBaseName = (HSZ)pParams->nPar1;
- HSZ hIBaseName = (HSZ)pParams->nPar2;
- nRet=(MRESULT)Callback(XTYP_UNREGISTER,0,0,hSBaseName,hIBaseName,0,0,0);
- }
- return nRet;
-}
-
-MRESULT ImpDdeMgr::DdeTimeout( ImpWndProcParams* pParams )
-{
- ////WRITELOG("DdeTimeout:Received")
- if( nSyncResponseMsg )
- {
- ////WRITELOG("DdeTimeout:Trans already processed->ignoring timeout")
- return (MRESULT)1;
- }
- ULONG nTimerId = (ULONG)pParams->nPar1;
- ULONG nTransId = TID_USERMAX - nTimerId;
- Transaction* pTrans = pTransTable;
- pTrans += (USHORT)nTransId;
- if( nTransId < 1 || nTransId >= pData->nMaxTransCount ||
- pTrans->hConvOwner == 0 )
- {
- DBG_ASSERT(0,"DdeTimeout:Invalid TransactionId");
- return (MRESULT)1;
- }
- if( bInSyncTrans && nTransId == nSyncTransId )
- {
- USHORT nTempType = pTrans->nType;
- nTempType &= (~XTYPF_MASK);
- // advise-loops koennen nur innerhalb synchroner
- // requests timeouts bekommen. die transaktion wird
- // in diesem fall nicht geloescht.
- if( nTempType != (XTYP_ADVREQ & (~XTYPF_NOBLOCK) ))
- {
- ////WRITELOG("DdeTimeout:Freeing transaction")
- FreeTransaction( pData, nTransId );
- }
- nSyncResponseMsg = WM_TIMER;
-#if 0 && defined( OV_DEBUG )
- String aMsg("DdeTimeout:Transaction=");
- aMsg += nTransId;
- WRITELOG((char*)(const char*)aMsg)
-#endif
- }
- else
- {
- ////WRITELOG("DdeTimeout:Async transaction timed out")
- pTrans->nConvst = XST_TIMEOUT;
- }
- return (MRESULT)1;
-}
-
-
-
-MRESULT ImpDdeMgr::DdeTerminate( ImpWndProcParams* pParams )
-{
- WRITELOG("DdeTerminate:Received")
- HWND hWndThis = pParams->hWndReceiver;
- HWND hWndPartner = (HWND)(pParams->nPar1);
-
- HCONV hConv = GetConvHandle( pData, hWndThis, hWndPartner );
-#if 0 && defined( OV_DEBUG )
- String strDebug("DdeTerminate:ConvHandle=");
- strDebug += (USHORT)hConv;
- WRITELOG((char*)(const char*)strDebug)
-#endif
- ImpHCONV* pConv = pConvTable + (USHORT)hConv;
- if( hConv )
- {
- // warten wir auf ein DDE_TERMINATE Acknowledge ?
- if( pConv->nStatus & ST_TERMINATED )
- {
- ////WRITELOG("DdeTerminate:TERMINATE-Ack received")
- pConv->nStatus |= ST_TERMACKREC;
- return (MRESULT)0; // DdeDisconnect raeumt jetzt auf
- }
-
- // sind wir Server?, wenn ja: die App benachrichtigen,
- // dass die Advise loops gestoppt wurden und die
- // Transaktionen loeschen
-
- // OV 26.07.96: Die das TERMINATE empfangende App muss
- // die Transaction-Tabelle abraeumen, egal ob Server oder Client!!
- // Es muessen alle Trans geloescht werden, die als Owner den
- // Client oder den Server haben!
- // if( !(pConv->nStatus & ST_CLIENT ) )
- SendUnadvises( hConv, 0, FALSE ); // alle Formate & nicht loeschen
- SendUnadvises( pConv->hConvPartner, 0, FALSE );
-
- // wir werden von draussen gekillt
- if ( !(nTransactFilter & CBF_SKIP_DISCONNECTS) )
- {
- Callback( XTYP_DISCONNECT, 0, hConv, 0, 0, 0,
- 0, (ULONG)IsSameInstance(hWndPartner));
- }
-
- // kann unsere Partner-App DDEML ?
- if( !(pConv->hConvPartner) )
- {
- // nein, deshalb Transaktionstabelle selbst loeschen
- ////WRITELOG("DdeTerminate:Freeing transactions")
- FreeTransactions( pData, hConv );
- }
- }
- else
- nLastErrInstance = DMLERR_NO_CONV_ESTABLISHED;
-
-#if 0 && defined(OV_DEBUG)
- if( !WinIsWindow(0,hWndPartner))
- {
- WRITELOG("DdeTerminate:hWndPartner not valid")
- }
- if(!WinIsWindow(0,hWndThis))
- {
- WRITELOG("DdeTerminate:hWndThis not valid")
- }
-#endif
-
- if( hConv )
- {
- // hWndThis nicht loeschen, da wir den Handle noch fuer
- // das Acknowledge brauchen
- ////WRITELOG("DdeTerminate:Freeing conversation")
- FreeConvHandle( pData, hConv, FALSE );
- }
-
- ////WRITELOG("DdeTerminate:Acknowledging DDE_TERMINATE")
-
-#ifdef OV_DEBUG
- DBG_ASSERT(WinIsWindow( 0, hWndThis ),"hWndThis not valid");
-#endif
-
- if( !WinDdePostMsg( hWndPartner, hWndThis, WM_DDE_TERMINATE, 0, DDEPM_RETRY ))
- {
- ////WRITELOG("DdeTerminate:Acknowledging DDE_TERMINATE failed")
- }
- // jetzt hWndThis loeschen
- DestroyConversationWnd( hWndThis );
-
- return (MRESULT)0;
-}
-
-
-/*
- Zuordnung des Conversationhandles:
-
- Verbindungsaufbau:
- Client: DdeInitiate( HWNDClient )
- Server: Post( WM_DDE_INITIATEACK( HWNDServer ))
- Client: CreateConvHandle( HWNDClient, HWNDServer )
-
- Datenaustausch:
- Server: Post(WM_DDE_ACK( HWNDSender ))
- Client: GetConvHandle( HWNDClient, HWNDSender )
-*/
-
-MRESULT ImpDdeMgr::ConvWndProc( HWND hWnd,ULONG nMsg,MPARAM nPar1,MPARAM nPar2 )
-{
- ImpWndProcParams aParams;
-
- MRESULT nRet = (MRESULT)0;
- aParams.hWndReceiver= hWnd;
- aParams.nPar1 = nPar1;
- aParams.nPar2 = nPar2;
-
- switch( nMsg )
- {
-
-#ifdef DBG_UTIL
- case WM_DDE_INITIATE :
- DBG_ASSERT(0,"dde:unexpected msg");
- nRet = (MRESULT)TRUE;
- break;
-#endif
-
- case WM_DDE_INITIATEACK : nRet = DdeInitiateAck(&aParams); break;
- case WM_DDE_ACK : nRet = DdeAck( &aParams ); break;
- case WM_DDE_ADVISE : nRet = DdeAdvise( &aParams ); break;
- case WM_DDE_DATA : nRet = DdeData( &aParams ); break;
- case WM_DDE_EXECUTE : nRet = DdeExecute( &aParams ); break;
- case WM_DDE_POKE : nRet = DdePoke( &aParams ); break;
- case WM_DDE_REQUEST : nRet = DdeRequest( &aParams ); break;
- case WM_DDE_TERMINATE : nRet = DdeTerminate( &aParams ); break;
- case WM_DDE_UNADVISE : nRet = DdeUnadvise( &aParams ); break;
- case WM_TIMER : nRet = DdeTimeout( &aParams ); break;
- }
- return nRet;
-}
-
-MRESULT ImpDdeMgr::SrvWndProc( HWND hWnd,ULONG nMsg,MPARAM nPar1,MPARAM nPar2 )
-{
- MRESULT nRet = (MRESULT)0;
-
- ImpWndProcParams aParams;
- aParams.hWndReceiver= hWnd;
- aParams.nPar1 = nPar1;
- aParams.nPar2 = nPar2;
-
- switch( nMsg )
- {
-#ifdef DBG_UTIL
- case WM_DDE_ACK :
- case WM_DDE_ADVISE :
- case WM_DDE_EXECUTE :
- case WM_DDE_POKE :
- case WM_DDE_REQUEST :
- case WM_DDE_UNADVISE :
- case WM_DDE_DATA :
- case WM_DDE_INITIATEACK :
- DBG_ASSERT(0,"dde:unexpected msg");
- nRet = (MRESULT)TRUE;
- break;
-#endif
-
- case WM_DDE_TERMINATE :
- break; // DDE_INITIATE wurde im DDE_INITIATEACK terminiert
-
- // ein Client will was von uns
- case WM_DDE_INITIATE :
- nRet = DdeInitiate( &aParams );
- break;
-
- // eine ddeml-faehige App. hat einen Service (typ. AppName) [de]reg.
- case WM_DDEML_REGISTER :
- nRet = DdeRegister( &aParams );
- break;
-
- case WM_DDEML_UNREGISTER :
- nRet = DdeUnregister( &aParams );
- break;
- };
- return nRet;
-}
-
-
-MRESULT ImpDdeMgr::DdeAck( ImpWndProcParams* pParams )
-{
- //WRITELOG("DdeAck:Start")
- HSZ hszItem;
- DDESTRUCT* pInDDEData = (DDESTRUCT*)(pParams->nPar2);
- if( pInDDEData )
- {
- BOOL bPositive = (BOOL)(pInDDEData->fsStatus & DDE_FACK ) != 0;
- BOOL bBusy = bPositive ? FALSE : (BOOL)(pInDDEData->fsStatus & DDE_FBUSY ) != 0;
- BOOL bNotProcessed = (BOOL)(pInDDEData->fsStatus & DDE_NOTPROCESSED ) != 0;
-#if 0 && defined( OV_DEBUG )
- String aDebStr("DdeAck:Received ");
- if( bPositive )
- aDebStr += "(positive)";
- else
- aDebStr += "(negative)";
- if( bBusy )
- aDebStr += "(busy)";
- if( bNotProcessed )
- aDebStr += "(not processed)";
- WRITELOG((char*)(const char*)aDebStr)
-#endif
- // ein DDE_ACK niemals bestaetigen (um endlosschleifen zu vermeiden)
- pInDDEData->fsStatus &= (~DDE_FACKREQ);
- }
- else
- {
- //WRITELOG("DdeAck:Received (no data!)")
- return (MRESULT)0;
- }
-
- HCONV hConv = CheckIncoming(pParams, 0, hszItem);
-#ifdef OV_DEBUG
- if( !hConv )
- {
- WRITELOG("DdeAck:HCONV not found")
- }
-#endif
- ULONG nTransId=GetTransaction(pData,hConv,hszItem,pInDDEData->usFormat);
- if( !nTransId )
- {
- WRITELOG("DdeAck:Transaction not found")
- MyDosFreeMem( pInDDEData,"DdeAck" );
- return (MRESULT)0;
- }
-
- BOOL bThisIsSync = (BOOL)( bInSyncTrans && nTransId == nSyncTransId );
-#if 0 && defined( OV_DEBUG )
- if( bThisIsSync)
- WRITELOG("DdeAck: sync transaction")
- else
- WRITELOG("DdeAck: async transaction")
-#endif
- // pruefen, ob die Transaktion abgeschlossen ist.
- Transaction* pTrans = pTransTable;
- pTrans += (USHORT)nTransId;
- ImpHCONV* pConv = pConvTable;
- pConv += (USHORT)hConv;
-
- if( pTrans->nConvst == XST_UNADVSENT )
- {
- //WRITELOG("DdeAck:Unadvise-Ack received")
- pTrans->nConvst = XST_UNADVACKRCVD;
- MyDosFreeMem( pInDDEData,"DdeAck" );
- DdeFreeStringHandle( hszItem );
- return (MRESULT)0;
- }
- if( pTrans->nConvst == XST_ADVDATASENT )
- {
- //WRITELOG("DdeAck:AdvData-Ack received")
- pTrans->nConvst = XST_ADVDATAACKRCVD;
- MyDosFreeMem( pInDDEData,"DdeAck" );
- DdeFreeStringHandle( hszItem );
- return (MRESULT)0;
- }
-
- USHORT nType = pTrans->nType;
- nType &= (~XTYPF_MASK);
- // beginn einer advise-loop oder request auf advise-loop ?
- // wenn ja: transaktion nicht loeschen
- BOOL bFinished = (BOOL)(nType != XTYP_ADVSTART &&
- nType != (XTYP_ADVREQ & (~XTYPF_NOBLOCK)) );
- if( bFinished )
- {
- if( !bThisIsSync )
- {
- ////WRITELOG("DdeAck:Transaction completed")
- Callback( XTYP_XACT_COMPLETE, pInDDEData->usFormat, hConv,
- pConv->hszTopic, hszItem, (HDDEDATA)0, nTransId, 0 );
- }
- ////WRITELOG("DdeAck:Freeing transaction")
- FreeTransaction( pData, nTransId );
- }
-
- if( bThisIsSync )
- {
- hSyncResponseData = pInDDEData;
- nSyncResponseMsg = WM_DDE_ACK;
- }
- else
- {
- MyDosFreeMem( pInDDEData,"DdeAck" );
- }
-
- DdeFreeStringHandle( hszItem );
-
- return (MRESULT)0;
-}
-
-
-USHORT ImpDdeMgr::SendUnadvises(HCONV hConvServer,USHORT nFormat,BOOL bFree)
-{
- USHORT nTransFound = 0;
- BOOL bCallApp = (BOOL)(!(nTransactFilter & CBF_FAIL_ADVISES));
-#if 0 && defined( OV_DEBUG )
- String aStr("Unadvising transactions for HCONV=");
- aStr += (ULONG)hConvServer;
- aStr += " CallApp:"; aStr += (USHORT)bCallApp;
- WRITELOG((char*)aStr.GetStr())
-#endif
-
-
- // wenn wir weder loeschen noch die App benachrichtigen sollen,
- // koennen wir gleich wieder returnen
- if( !hConvServer || ( !bFree && !bCallApp ) )
- return 0;
-
- ImpHCONV* pConvSrv = pConvTable;
- pConvSrv += (USHORT)hConvServer;
- HSZ hszTopic = pConvSrv->hszTopic;
-
- Transaction* pTrans = pTransTable;
- pTrans++;
- USHORT nCurTransId = 1;
- USHORT nCurTransactions = pData->nCurTransCount;
- while( nCurTransactions && nCurTransId < pData->nMaxTransCount )
- {
- if( pTrans->hConvOwner )
- nCurTransactions--;
- if( pTrans->hConvOwner == hConvServer &&
- (pTrans->nType & XTYP_ADVREQ) )
- {
- if( !nFormat || (nFormat == pTrans->nFormat) )
- {
- nTransFound++;
- if( bCallApp )
- {
- //WRITELOG("SendUnadvises:Notifying App")
- Callback( XTYP_ADVSTOP, pTrans->nFormat, hConvServer,
- hszTopic, pTrans->hszItem, 0,0,0 );
- }
- if( bFree )
- FreeTransaction( pData, (ULONG)nCurTransId );
- }
- }
- nCurTransId++;
- pTrans++;
- }
- return nTransFound;
-}
-
-
-
-HCONV ImpDdeMgr::CheckIncoming( ImpWndProcParams* pParams, ULONG nTransMask,
- HSZ& rhszItem )
-{
-// ////WRITELOG("CheckIncoming")
- rhszItem = 0;
- DDESTRUCT* pInDDEData = (DDESTRUCT*)(pParams->nPar2);
- if( !pInDDEData )
- {
- // ////WRITELOG("CheckIncoming:PDDESTRUCT==0")
- return (HCONV)0;
- }
-
- HWND hWndThis = pParams->hWndReceiver;
- HWND hWndClient = (HWND)pParams->nPar1;
-
- BOOL bReject = (BOOL)(nTransactFilter & nTransMask);
- HCONV hConv;
- if( !bReject )
- hConv = GetConvHandle( pData, hWndThis, hWndClient );
- if ( bReject || !hConv )
- return (HCONV)0;
-
- rhszItem = DdeCreateStringHandle(
- ((char*)(pInDDEData)+pInDDEData->offszItemName), 850 );
-
- // ////WRITELOG("CheckIncoming:OK");
- return hConv;
-}
-
-
-MRESULT ImpDdeMgr::DdeAdvise( ImpWndProcParams* pParams )
-{
- ////WRITELOG("DdeAdvise:Received")
- HSZ hszItem;
- HCONV hConv = CheckIncoming(pParams, CBF_FAIL_ADVISES, hszItem);
- DDESTRUCT* pInDDEData = (DDESTRUCT*)(pParams->nPar2);
- HWND hWndThis = pParams->hWndReceiver;
- HWND hWndClient = (HWND)pParams->nPar1;
- if( !hConv )
- {
- ////WRITELOG("DdeAdvise:Conversation not found")
- pInDDEData->fsStatus &= (~DDE_FACK);
- MyWinDdePostMsg(hWndClient,hWndThis,WM_DDE_ACK,pInDDEData,DDEPM_RETRY);
- DdeFreeStringHandle( hszItem );
- return (MRESULT)0;
- }
-
- Transaction* pTrans = pTransTable;
- ImpHCONV* pConv = pConvTable;
- pConv += (USHORT)hConv;
-
- // existiert schon ein Link auf Topic/Item/Format-Vektor ?
-
- ULONG nTransId=GetTransaction(pData,hConv,hszItem,pInDDEData->usFormat);
- if( nTransId )
- {
- ////WRITELOG("DdeAdvise:Transaction already exists")
- pTrans += (USHORT)nTransId;
- // ist es eine AdviseLoop ?
- USHORT nTempType = pTrans->nType;
- nTempType &= (~XTYPF_MASK);
- if( nTempType == XTYP_ADVREQ )
- {
- // Flags der laufenden Advise-Loop aktualisieren
- ////WRITELOG("DdeAdvise:Adjusting Advise-Params")
- pTrans->nType = XTYP_ADVREQ;
- if( pInDDEData->fsStatus & DDE_FNODATA )
- pTrans->nType |= XTYPF_NODATA;
- if( pInDDEData->fsStatus & DDE_FACKREQ )
- pTrans->nType |= XTYPF_ACKREQ;
- pInDDEData->fsStatus |= DDE_FACK;
- MyWinDdePostMsg(hWndClient,hWndThis,WM_DDE_ACK,pInDDEData,DDEPM_RETRY);
- DdeFreeStringHandle( hszItem );
- return (MRESULT)0;
- }
- else if( nTempType != XTYP_ADVSTART )
- {
- ////WRITELOG("DdeAdvise:Not a advise transaction")
- pInDDEData->fsStatus &= (~DDE_FACK);
- MyWinDdePostMsg(hWndClient,hWndThis,WM_DDE_ACK,pInDDEData,DDEPM_RETRY);
- DdeFreeStringHandle( hszItem );
- return (MRESULT)0;
- }
- }
-
- if( !nTransId )
- {
- ////WRITELOG("DdeAdvise:Creating Transaction")
- ////WRITESTATUS("DdeAdvise:Creating Transaction")
- nTransId = CreateTransaction( pData, hConv, hszItem,
- pInDDEData->usFormat, XTYP_ADVREQ );
- ////WRITESTATUS("DdeAdvise:Created Transaction")
- }
- if( nTransId )
- {
- pTrans = pTransTable;
- pTrans += (USHORT)nTransId;
- if( pInDDEData->fsStatus & DDE_FNODATA )
- pTrans->nType |= XTYPF_NODATA;
- if( pInDDEData->fsStatus & DDE_FACKREQ )
- pTrans->nType |= XTYPF_ACKREQ;
- }
- else
- {
- ////WRITELOG("DdeAdvise:Cannot create Transaction")
- pInDDEData->fsStatus &= (~DDE_FACK);
- MyWinDdePostMsg(hWndClient,hWndThis,WM_DDE_ACK,pInDDEData,DDEPM_RETRY);
- DdeFreeStringHandle( hszItem );
- return (MRESULT)0;
- }
-
- ////WRITELOG("DdeAdvise:Calling Server")
-
- if ( Callback( XTYP_ADVSTART, pInDDEData->usFormat,
- hConv, pConv->hszTopic, hszItem, (HDDEDATA)0, 0, 0 ) )
- {
- //
- // ServerApp erlaubt AdviseLoop
- //
- ////WRITELOG("DdeAdvise:Advise loop established")
- pInDDEData->fsStatus |= DDE_FACK;
- MyWinDdePostMsg(hWndClient,hWndThis,WM_DDE_ACK,pInDDEData,DDEPM_RETRY);
- }
- else
- {
- ////WRITELOG("DdeAdvise:Advise loop not established")
- FreeTransaction( pData, nTransId );
- pInDDEData->fsStatus &= (~DDE_FACK); // DDE_FNOTPROCESSED;
- MyWinDdePostMsg(hWndClient,hWndThis,WM_DDE_ACK,pInDDEData,DDEPM_RETRY);
- }
- ////WRITESTATUS("DdeAdvise:End")
- ////WRITELOG("DdeAdvise:End")
- DdeFreeStringHandle( hszItem );
- return (MRESULT)0;
-}
-
-MRESULT ImpDdeMgr::DdeData( ImpWndProcParams* pParams )
-{
- WRITELOG("DdeData:Received")
- HSZ hszItem;
- HCONV hConv = CheckIncoming(pParams, 0, hszItem);
- HWND hWndThis = pParams->hWndReceiver;
- HWND hWndClient = (HWND)pParams->nPar1;
- DDESTRUCT* pInDDEData = (DDESTRUCT*)(pParams->nPar2);
-#if 0 && defined( OV_DEBUG )
- {
- String aStr("DdeData Address:");
- aStr += (ULONG)pInDDEData;
- WRITELOG((char*)aStr.GetStr())
- }
-#endif
-
- BOOL bSendAck;
- if( pInDDEData && (pInDDEData->fsStatus & DDE_FACKREQ ))
- {
- WRITELOG("DdeData: Ackn requested")
- bSendAck = TRUE;
- }
- else
- {
- WRITELOG("DdeData: Ackn not requested")
- bSendAck = FALSE;
- }
-
- ULONG nTransId = GetTransaction(pData,hConv,hszItem,pInDDEData->usFormat);
- if( !nTransId )
- {
- WRITELOG("DdeData:Transaction not found")
- WRITEDATA(pInDDEData)
- if( bSendAck )
- {
- WRITELOG("DdeData: Posting Ackn")
- pInDDEData->fsStatus &= (~DDE_FACK); // NOTPROCESSED;
- MyWinDdePostMsg(hWndClient,hWndThis,WM_DDE_ACK,pInDDEData,DDEPM_RETRY);
- }
- else
- {
- MyDosFreeMem( pInDDEData,"DdeData" );
- }
- return (MRESULT)0;
- }
-
-#if 0 && defined( OV_DEBUG )
- if( pInDDEData )
- {
- WRITEDATA(pInDDEData)
- }
-#endif
-
- BOOL bThisIsSync = (BOOL)( bInSyncTrans && nTransId == nSyncTransId );
-
- // pruefen, ob die Transaktion abgeschlossen ist.
- Transaction* pTrans = pTransTable;
- pTrans += (USHORT)nTransId;
-
- if( pTrans->nConvst == XST_WAITING_ACK )
- {
- // dieser Fall kann eintreten, wenn ein Server innerhalb
- // einer WM_DDE_ADVISE-Msg. oder bevor beim Client das
- // Ack eintrifft, Advise-Daten sendet.
- WRITELOG("DdeData:Ignoring unexpected data")
- if( bSendAck )
- {
- WRITELOG("DdeData: Posting Ackn")
- pInDDEData->fsStatus &= (~DDE_FACK); // NOTPROCESSED;
- MyWinDdePostMsg(hWndClient,hWndThis,WM_DDE_ACK,pInDDEData,DDEPM_RETRY);
- }
- else
- {
- MyDosFreeMem( pInDDEData,"DdeData" );
- }
- return (MRESULT)0;
- }
-
- ImpHCONV* pConv = pConvTable;
- pConv += (USHORT)hConv;
-
- USHORT nType = pTrans->nType;
- nType &= (~XTYPF_MASK);
- BOOL bNotAdviseLoop = (BOOL)(nType != (XTYP_ADVREQ & (~XTYPF_NOBLOCK)));
- if( !bThisIsSync )
- {
- // WRITELOG("DdeData:Is async transaction")
- if( bNotAdviseLoop )
- {
- // WRITELOG("DdeData:Transaction completed -> calling client")
- Callback( XTYP_XACT_COMPLETE, pInDDEData->usFormat, hConv,
- pConv->hszTopic, hszItem, pInDDEData, nTransId, 0 );
- // WRITELOG("DdeData:Freeing transaction")
- FreeTransaction( pData, nTransId );
- }
- else
- {
- WRITELOG("DdeData:Advise-Loop -> calling client")
- HDDEDATA pToSend = pInDDEData;
- if( pTrans->nType & XTYPF_NODATA )
- {
- pToSend = 0;
- // WRITELOG("DdeData:Is warm link")
- }
- Callback( XTYP_ADVDATA, pInDDEData->usFormat, hConv,
- pConv->hszTopic, hszItem, pToSend, nTransId, 0 );
- }
- if( bSendAck )
- {
- WRITELOG("DdeData: Posting Ackn")
- pInDDEData->fsStatus = DDE_FACK;
- MyWinDdePostMsg(hWndClient,hWndThis,WM_DDE_ACK,pInDDEData,DDEPM_RETRY);
- }
- else
- MyDosFreeMem( pInDDEData,"DdeData" );
- }
- else // synchrone Transaktion (Datenhandle nicht freigeben!)
- {
- // WRITELOG("DdeData:Is sync transaction")
- hSyncResponseData = pInDDEData;
- nSyncResponseMsg = WM_DDE_DATA;
- if( bSendAck )
- {
- pInDDEData->fsStatus |= DDE_FACK;
- WRITELOG("DdeData: Posting Ackn")
- MyWinDdePostMsg(hWndClient,hWndThis,WM_DDE_ACK,pInDDEData,
- DDEPM_RETRY | DDEPM_NOFREE );
- }
- }
-
- DdeFreeStringHandle( hszItem );
- // WRITELOG("DdeData:End")
- return (MRESULT)0;
-}
-
-MRESULT ImpDdeMgr::DdeExecute( ImpWndProcParams* pParams )
-{
- ////WRITELOG("DdeExecute:Received")
- DDESTRUCT* pInDDEData = (DDESTRUCT*)(pParams->nPar2);
- HSZ hszItem;
- HCONV hConv = CheckIncoming(pParams, 0, hszItem);
- BOOL bSuccess = FALSE;
- ImpHCONV* pConv = pConvTable;
- pConv += (USHORT)hConv;
- if ( hConv && !(nTransactFilter & CBF_FAIL_EXECUTES) && pInDDEData )
- {
- if ( Callback( XTYP_EXECUTE, pInDDEData->usFormat, hConv,
- pConv->hszTopic, hszItem, pInDDEData, 0, 0 )
- == (DDESTRUCT*)DDE_FACK )
- bSuccess = TRUE;
- }
- else
- {
- ////WRITELOG("DdeExecute:Not processed")
- }
- if( pInDDEData )
- {
- if( bSuccess )
- pInDDEData->fsStatus |= DDE_FACK;
- else
- pInDDEData->fsStatus &= (~DDE_FACK);
- MyWinDdePostMsg( pConv->hWndPartner, pConv->hWndThis, WM_DDE_ACK,
- pInDDEData, DDEPM_RETRY );
- }
- DdeFreeStringHandle( hszItem );
- return (MRESULT)0;
-}
-
-HCONV ImpDdeMgr::ConnectWithClient( HWND hWndClient,
- HSZ hszPartner, HSZ hszService, HSZ hszTopic, BOOL bSameInst,
- DDEINIT* pDDEData, CONVCONTEXT* pCC )
-{
- ////WRITELOG("ConnectWithClient:Start")
- HWND hWndSrv = CreateConversationWnd();
- IncConversationWndRefCount( hWndSrv );
- HCONV hConv = CreateConvHandle( pData, pidThis, hWndSrv, hWndClient,
- hszPartner, hszService, hszTopic );
- if(!hConv )
- return 0;
- BOOL bFreeDdeData = FALSE;
- if( !pDDEData )
- {
- bFreeDdeData = TRUE;
- pDDEData = CreateDDEInitData( hWndClient,hszService,hszTopic, pCC );
- PID pid; TID tid;
- WinQueryWindowProcess( hWndClient, &pid, &tid );
- DosGiveSharedMem( pDDEData, pid, PAG_READ | PAG_WRITE);
- }
- HAB hAB = WinQueryAnchorBlock( hWndSrv );
- WinGetLastError( hAB ); // fehlercode zuruecksetzen
- WinSendMsg(hWndClient,WM_DDE_INITIATEACK,(MPARAM)hWndSrv,(MPARAM)pDDEData);
- if( WinGetLastError( hAB ) )
- {
- // ////WRITELOG("DdeConnectWithClient:Client died")
- if( bFreeDdeData )
- {
- MyDosFreeMem( pDDEData,"ConnectWithClient" );
- }
- FreeConvHandle( pData, hConv );
- return (HCONV)0;
- }
-
- if( !(nTransactFilter & CBF_SKIP_CONNECT_CONFIRMS) )
- {
- Callback( XTYP_CONNECT_CONFIRM, 0, hConv, hszTopic, hszService,
- 0, 0, (ULONG)bSameInst );
- }
-
- if( bFreeDdeData )
- {
- MyDosFreeMem( pDDEData,"ConnectWithClient" );
- }
- // HCONV der PartnerApp suchen & bei uns eintragen
- ImpHCONV* pConv = pConvTable;
- pConv += (USHORT)hConv;
- pConv->hConvPartner = GetConvHandle( pData, hWndClient, hWndSrv );
-#if 0 && defined(OV_DEBUG)
- if( !pConv->hConvPartner )
- {
- WRITELOG("DdeConnectWithClient:Partner not found")
- }
-#endif
- pConv->nStatus = ST_CONNECTED;
- //WRITESTATUS("Server:Connected with client")
- //WRITELOG("ConnectWithClient:End")
- return hConv;
-}
-
-MRESULT ImpDdeMgr::DdeInitiate( ImpWndProcParams* pParams )
-{
- ////WRITELOG("DdeInitiate:Received")
- HWND hWndClient = (HWND)(pParams->nPar1);
-// BOOL bSameInst = IsSameInstance( hWndClient );
- BOOL bSameInst = (BOOL)(hWndClient==hWndServer);
- DDEINIT* pDDEData = (DDEINIT*)pParams->nPar2;
-
- if ( ( nTransactFilter & (CBF_FAIL_CONNECTIONS | APPCMD_CLIENTONLY)) ||
- (( nTransactFilter & CBF_FAIL_SELFCONNECTIONS) && bSameInst )
- )
- {
- MyDosFreeMem( pDDEData,"DdeInitiate" );
- return (MRESULT)FALSE; // narda
- }
-
- HSZ hszService = (HSZ)0;
- if( *(pDDEData->pszAppName) != '\0' )
- {
- hszService = DdeCreateStringHandle( pDDEData->pszAppName, 850 );
- ////WRITELOG(pDDEData->pszAppName);
- }
- HSZ hszTopic = (HSZ)0;
- if( *(pDDEData->pszTopic) != '\0' )
- {
- hszTopic = DdeCreateStringHandle( pDDEData->pszTopic, 850 );
- ////WRITELOG(pDDEData->pszTopic);
- }
- HSZ hszPartner = GetAppName( hWndClient );
-
- // nur weitermachen, wenn Service registriert oder
- // Service-Name-Filtering ausgeschaltet.
- if( !bServFilterOn || GetService(hszService) )
- {
- // XTYP_CONNECT-Transaktionen erfolgen nur mit
- // Services & Topics ungleich 0!
- if( hszService && hszTopic )
- {
- if( IsConvHandleAvailable(pData) && Callback( XTYP_CONNECT,
- 0, 0, hszTopic,hszService, 0, 0, (ULONG)bSameInst))
- {
- // App erlaubt Verbindung mit Client
- ConnectWithClient( hWndClient, hszPartner,
- hszService, hszTopic, bSameInst, pDDEData );
- }
- }
- else
- {
- // ** Wildcard-Connect **
- ////WRITELOG("DdeInitiate:Wildconnect")
- // vom Server eine Liste aller Service/Topic-Paare anfordern
- CONVCONTEXT* pCC=(CONVCONTEXT*)(pDDEData+pDDEData->offConvContext);
- DDESTRUCT* hList = Callback( XTYP_WILDCONNECT, 0, (HCONV)0,
- hszTopic,hszService, (HDDEDATA)0, (ULONG)pCC, (ULONG)bSameInst );
- if( hList )
- {
- HSZPAIR* pPairs = (HSZPAIR*)((char*)hList+hList->offabData);
- while( pPairs->hszSvc )
- {
- ////WRITELOG("DdeInitiate:Wildconnect.Connecting")
- ConnectWithClient( hWndClient, hszPartner,
- pPairs->hszSvc, pPairs->hszTopic, bSameInst, 0, pCC);
- // Stringhandles gehoeren der App! (nicht free-en)
- pPairs++;
- }
- DdeFreeDataHandle( hList );
- }
- }
- }
-#if 0 && defined(OV_DEBUG)
- else
- {
- WRITELOG("DdeInitiate:Service filtered")
- }
-#endif
- DdeFreeStringHandle( hszTopic );
- DdeFreeStringHandle( hszService );
- DdeFreeStringHandle( hszPartner );
- MyDosFreeMem( pDDEData,"DdeInitiate" );
- ////WRITELOG("DdeInitiate:End")
- return (MRESULT)TRUE;
-}
-
-MRESULT ImpDdeMgr::DdeInitiateAck( ImpWndProcParams* pParams )
-{
- ////WRITELOG("DdeInitiateAck:Received")
- DDEINIT* pDDEData = (DDEINIT*)(pParams->nPar2);
-
- if( !bListConnect && hCurConv )
- {
- ////WRITELOG("DdeInitiateAck:Already connected")
- MyDosFreeMem( pDDEData,"DdeInitiateAck" );
- WinPostMsg( hWndServer, WM_DDE_TERMINATE, (MPARAM)hWndServer, 0 );
- return (MRESULT)FALSE;
- }
-
- HWND hWndThis = pParams->hWndReceiver;
- // Referenz-Count unseres Client-Windows inkrementieren
- IncConversationWndRefCount( hWndThis );
-
- HWND hWndSrv = (HWND)(pParams->nPar1);
- HSZ hszService = DdeCreateStringHandle( pDDEData->pszAppName, 850 );
- HSZ hszTopic = DdeCreateStringHandle( pDDEData->pszTopic, 850 );
- HSZ hszPartnerApp = GetAppName( hWndSrv );
-
- hCurConv = CreateConvHandle( pData, pidThis, hWndThis, hWndSrv,
- hszPartnerApp, hszService, hszTopic, 0 );
-
- ImpHCONV* pConv = pConvTable;
- pConv += (USHORT)hCurConv;
-
- // HCONV der PartnerApp suchen & bei uns eintragen
- pConv->hConvPartner = GetConvHandle( pData, hWndSrv, hWndThis );
- // nicht asserten, da ja non-ddeml-Partner moeglich
- // DBG_ASSERT(pConv->hConvPartner,"DDE:Partner not found");
- pConv->nStatus = ST_CONNECTED | ST_CLIENT;
-
- if( bListConnect )
- {
- ////WRITELOG("DdeInitiateAck:ListConnect/Connecting hConvs")
- // Status setzen & verketten
- pConv->hConvList = hCurListId;
- pConv->nPrevHCONV = nPrevConv;
- pConv->nStatus |= ST_INLIST;
- if( nPrevConv )
- {
- pConv = pConvTable;
- pConv += nPrevConv;
- pConv->nNextHCONV = (USHORT)hCurConv;
- }
- nPrevConv = (USHORT)hCurConv;
- }
-
- DdeFreeStringHandle( hszService );
- DdeFreeStringHandle( hszTopic );
- DdeFreeStringHandle( hszPartnerApp );
- MyDosFreeMem( pDDEData,"DdeInitiateAck" );
- ////WRITESTATUS("After DdeInitiateAck")
- ////WRITELOG("DdeInitiateAck:End")
- return (MRESULT)TRUE;
-}
-
-MRESULT ImpDdeMgr::DdePoke( ImpWndProcParams* pParams )
-{
- ////WRITELOG("DdePoke:Received")
- HSZ hszItem = 0;
- DDESTRUCT* pInDDEData = (DDESTRUCT*)(pParams->nPar2);
- HCONV hConv = CheckIncoming( pParams, CBF_FAIL_REQUESTS, hszItem );
- BOOL bSuccess =FALSE;
- ImpHCONV* pConv = pConvTable;
- pConv += (USHORT)hConv;
- if ( hConv && !(nTransactFilter & CBF_FAIL_POKES) && pInDDEData )
- {
- if( Callback( XTYP_POKE, pInDDEData->usFormat, hConv,
- pConv->hszTopic, hszItem, pInDDEData, 0, 0 )
- == (DDESTRUCT*)DDE_FACK )
- bSuccess = TRUE;
- }
-#if 0 && defined( OV_DEBUG )
- else
- {
- WRITELOG("DdePoke:Not processed")
- }
-#endif
- if( pInDDEData )
- {
- if( bSuccess )
- pInDDEData->fsStatus |= DDE_FACK;
- else
- pInDDEData->fsStatus &= (~DDE_FACK);
-
- MyWinDdePostMsg( pConv->hWndPartner, pConv->hWndThis, WM_DDE_ACK,
- pInDDEData, DDEPM_RETRY );
- }
- DdeFreeStringHandle( hszItem );
- return (MRESULT)0;
-}
-
-MRESULT ImpDdeMgr::DdeRequest( ImpWndProcParams* pParams )
-{
- ////WRITELOG("DdeRequest:Received")
- HSZ hszItem = 0;
- DDESTRUCT* pInDDEData = (DDESTRUCT*)(pParams->nPar2);
- if( pInDDEData )
- // ist fuer Requests nicht definiert
- pInDDEData->fsStatus = 0;
- HCONV hConv = CheckIncoming( pParams, CBF_FAIL_REQUESTS, hszItem );
- HWND hWndThis = pParams->hWndReceiver;
- HWND hWndClient = (HWND)pParams->nPar1;
- if( hConv )
- {
- ImpHCONV* pConv = pConvTable;
- pConv += (USHORT)hConv;
-
- DDESTRUCT* pOutDDEData = Callback( XTYP_REQUEST, pInDDEData->usFormat,
- hConv, pConv->hszTopic, hszItem, (HDDEDATA)0, 0, 0 );
-
- if ( !pOutDDEData )
- {
- ////WRITELOG("DdeRequest:Not processed")
- pInDDEData->fsStatus &= (~DDE_FACK);
- MyWinDdePostMsg(hWndClient,hWndThis,WM_DDE_ACK,pInDDEData,DDEPM_RETRY);
- }
- else
- {
- ////WRITELOG("DdeRequest:Success")
- MyDosFreeMem( pInDDEData,"DdeRequest" );
- pOutDDEData->fsStatus |= DDE_FRESPONSE;
- MyWinDdePostMsg(hWndClient,hWndThis,WM_DDE_DATA,pOutDDEData,DDEPM_RETRY);
- }
- }
- else
- {
- pInDDEData->fsStatus &= (~DDE_FACK);
- MyWinDdePostMsg(hWndClient,hWndThis,WM_DDE_ACK,pInDDEData,DDEPM_RETRY);
- }
-
- DdeFreeStringHandle( hszItem );
- ////WRITELOG("DdeRequest:End")
- return (MRESULT)0;
-}
-
-
-MRESULT ImpDdeMgr::DdeUnadvise( ImpWndProcParams* pParams )
-{
- ////WRITELOG("DdeUnadvise:Received")
-
- HSZ hszItem;
- HCONV hConv = CheckIncoming( pParams, 0, hszItem );
- DDESTRUCT* pInDDEData = (DDESTRUCT*)(pParams->nPar2);
- HWND hWndThis = pParams->hWndReceiver;
- HWND hWndClient = (HWND)pParams->nPar1;
- USHORT nClosedTransactions = 0;
- if( hConv )
- {
- USHORT nFormat = pInDDEData->usFormat;
- // alle Transaktionen des HCONVs loeschen ?
- if( !hszItem )
- {
- // App benachrichtigen & Transaktionen loeschen
- nClosedTransactions = SendUnadvises( hConv, nFormat, TRUE );
- }
- else
- {
- ULONG nTransId = GetTransaction(pData, hConv, hszItem, nFormat);
- if( nTransId )
- {
- ////WRITELOG("DdeUnadvise:Transaction found")
- Transaction* pTrans = pTransTable;
- pTrans += (USHORT)nTransId;
- ImpHCONV* pConv = pConvTable;
- pConv += (USHORT)hConv;
- nClosedTransactions = 1;
- if( !(nTransactFilter & CBF_FAIL_ADVISES) )
- Callback( XTYP_ADVSTOP, nFormat, hConv,
- pConv->hszTopic, hszItem, 0, 0, 0 );
- if( !pConv->hConvPartner )
- FreeTransaction( pData, nTransId );
- }
-#if defined(OV_DEBUG)
- else
- {
- WRITELOG("DdeUnadvise:Transaction not found")
- }
-#endif
- }
- }
-#if defined(OV_DEBUG)
- else
- {
- WRITELOG("DdeUnadvise:Conversation not found")
- }
-#endif
-
- if( !nClosedTransactions )
- pInDDEData->fsStatus &= (~DDE_FACK);
- else
- pInDDEData->fsStatus |= DDE_FACK;
-
- MyWinDdePostMsg(hWndClient,hWndThis,WM_DDE_ACK,pInDDEData,DDEPM_RETRY);
- DdeFreeStringHandle( hszItem );
- return (MRESULT)0;
-}
-
-BOOL ImpDdeMgr::WaitTransState( Transaction* pTrans, ULONG nTransId,
- USHORT nNewState, ULONG nTimeout )
-{
- ////WRITELOG("WaitTransState:Start")
- ImpHCONV* pConv = pConvTable;
- pConv += pTrans->hConvOwner;
- HAB hAB = WinQueryAnchorBlock( pConv->hWndThis );
- ULONG nTimerId = WinStartTimer( hAB, 0, 0, 50 );
- QMSG aQueueMsg;
-
-// while( WinGetMsg( hAB, &aQueueMsg, 0, 0, 0 ) &&
-// WinIsWindow( hAB, pConv->hWndPartner) &&
-// pTrans->nConvst != nNewState )
-// {
-// WinDispatchMsg( hAB, &aQueueMsg );
-// }
-
- BOOL bContinue = TRUE;
- while( bContinue )
- {
- if( WinGetMsg( hAB, &aQueueMsg, 0, 0, 0 ))
- {
- WinDispatchMsg( hAB, &aQueueMsg );
- if( (!WinIsWindow( hAB, pConv->hWndPartner)) ||
- (pTrans->nConvst == nNewState) )
- {
- bContinue = FALSE;
- }
- }
- else
- bContinue = FALSE;
- }
-
- WinStopTimer( hAB, 0, nTimerId );
- ////WRITELOG("WaitTransState:End")
- return TRUE;
-}
-
-
-
-
diff --git a/svl/source/svdde/ddeml2.cxx b/svl/source/svdde/ddeml2.cxx
deleted file mode 100644
index 7de4602d12ff..000000000000
--- a/svl/source/svdde/ddeml2.cxx
+++ /dev/null
@@ -1,1011 +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_svl.hxx"
-
-#define INCL_DOS
-#include <stdlib.h>
-
-#include "ddemlimp.hxx"
-#define LOGFILE
-#define STATUSFILE
-#define DDEDATAFILE
-#include "ddemldeb.hxx"
-
-#if defined (OS2) && defined (__BORLANDC__)
-#pragma option -w-par
-#endif
-
-
-// ************************************************************************
-// Hilfsfunktionen Speicherverwaltung
-// ************************************************************************
-
-//
-// AllocAtomName
-//
-
-PSZ ImpDdeMgr::AllocAtomName( ATOM hString, ULONG& rBufLen )
-{
- HATOMTBL hAtomTable = WinQuerySystemAtomTable();
- ULONG nLen = WinQueryAtomLength( hAtomTable, hString );
- nLen++;
- PSZ pBuf = 0;
- if ( !MyDosAllocMem( (PPVOID)&pBuf, nLen, PAG_READ|PAG_WRITE|PAG_COMMIT | OBJ_ANY,"Atom" ) )
- {
- WinQueryAtomName( hAtomTable, hString, pBuf, nLen );
- rBufLen = nLen;
- }
- return pBuf;
-}
-
-
-//
-// MakeDDEObject
-//
-
-PDDESTRUCT ImpDdeMgr::MakeDDEObject( HWND hwnd, ATOM hItemName,
- USHORT fsStatus, USHORT usFormat, PVOID pabData, ULONG usDataLen )
-{
- PDDESTRUCT pddes = 0;
- ULONG usItemLen;
- PULONG pulSharedObj;
- //WRITELOG("MakeDDEObject: Start")
-
- PSZ pItemName = 0;
- if( hItemName != NULL )
- pItemName = AllocAtomName( hItemName, usItemLen );
- else
- usItemLen = 1;
-
- ULONG nTotalSize = sizeof(DDESTRUCT) + usItemLen + usDataLen;
-
- if( !(MyDosAllocSharedMem((PPVOID)&pulSharedObj, NULL,
- nTotalSize,
- PAG_COMMIT | PAG_READ | PAG_WRITE | OBJ_GETTABLE | OBJ_GIVEABLE | OBJ_ANY,
- "MakeDDEObject")))
- {
- pddes = (PDDESTRUCT) pulSharedObj;
- // siehe "Glenn Puchtel, DDE for OS/2" p.60
- pddes->cbData = (ULONG)usDataLen;
- pddes->fsStatus = fsStatus;
- pddes->usFormat = usFormat;
- pddes->offszItemName = sizeof( DDESTRUCT );
- if( (usDataLen) && (pabData != NULL ) )
- pddes->offabData = sizeof(DDESTRUCT) + usItemLen;
- else
- pddes->offabData = 0;
-
- if( pItemName != NULL )
- memcpy(DDES_PSZITEMNAME(pddes), pItemName, usItemLen );
- else
- *(DDES_PSZITEMNAME(pddes)) = '\0';
-
- if( pabData != NULL )
- memcpy( DDES_PABDATA(pddes), pabData, usDataLen );
- }
-
- if ( pItemName )
- {
- MyDosFreeMem( pItemName,"MakeDDEObject" );
- }
- return pddes;
-}
-
-//
-// AllocNamedSharedMem
-//
-
-APIRET ImpDdeMgr::AllocNamedSharedMem( PPVOID ppBaseAddress, PSZ pName,
- ULONG nElementSize, ULONG nElementCount )
-{
- ULONG nObjSize = (ULONG)(nElementSize * nElementCount );
- nObjSize += sizeof( ULONG ); // fuer ElementCount am Anfang des Blocks
-
- *ppBaseAddress = 0;
- APIRET nRet = MyDosAllocSharedMem( ppBaseAddress, pName, nObjSize,
- PAG_READ | PAG_WRITE | PAG_COMMIT | OBJ_ANY,
- "AllocNamedSharedMem" );
- if ( !nRet )
- {
- memset( *ppBaseAddress, 0, nObjSize );
- ULONG* pULONG = (ULONG*)*ppBaseAddress;
- *pULONG = nObjSize;
- }
- return nRet;
-}
-
-void ImpDdeMgr::CreateServerWnd()
-{
- hWndServer = WinCreateWindow( HWND_DESKTOP, WC_FRAME, "DDEServer", 0,
- 0,0,0,0, HWND_DESKTOP, HWND_BOTTOM, 0, 0, 0 );
- WinSetWindowULong( hWndServer, 0, (ULONG)this );
- WinSubclassWindow( hWndServer, ::ServerWndProc );
- TID tidDummy;
- WinQueryWindowProcess( hWndServer, &pidThis, &tidDummy );
-}
-
-void ImpDdeMgr::DestroyServerWnd()
-{
- WinDestroyWindow( hWndServer );
- hWndServer = NULLHANDLE;
-}
-
-HWND ImpDdeMgr::CreateConversationWnd()
-{
- HWND hWnd = WinCreateWindow( HWND_OBJECT, WC_FRAME, "DDEConvWnd", 0,
- 0,0,0,0, HWND_DESKTOP, HWND_BOTTOM, 0, 0, 0 );
- if ( hWnd )
- {
- ImpConvWndData* pWndData = new ImpConvWndData;
- pWndData->pThis = this;
- pWndData->nRefCount = 0;
- WinSetWindowULong( hWnd, 0, (ULONG)pWndData );
- WinSubclassWindow( hWnd, ::ConvWndProc );
-#if 0 && defined( OV_DEBUG )
- String aStr("ConvWnd created:");
- aStr += (ULONG)hWnd;
- WRITELOG((char*)aStr.GetStr())
-#endif
- }
- else
- nLastErrInstance = DMLERR_SYS_ERROR;
-
- return hWnd;
-}
-
-// static
-void ImpDdeMgr::DestroyConversationWnd( HWND hWnd )
-{
- ImpConvWndData* pObj = (ImpConvWndData*)WinQueryWindowULong( hWnd, 0 );
- if( pObj )
- {
- pObj->nRefCount--;
- if( pObj->nRefCount == 0
- // auch Windows mit Refcount vonm loeschen, da dieser in initial
- // auf 0 gesetzt wird
- || pObj->nRefCount == (USHORT)-1 )
- {
- delete pObj;
- WinDestroyWindow( hWnd );
-#if 0 && defined( OV_DEBUG )
- String aStr("ConvWnd destroyed:");
- aStr += (ULONG)hWnd;
- WRITELOG((char*)aStr.GetStr())
-#endif
- }
- else
- {
-#if 0 && defined( OV_DEBUG )
- String aStr("ConvWnd not destroyed (Refcount=");
- aStr += pObj->nRefCount;
- aStr += ") "; aStr += (ULONG)hWnd;
- WRITELOG((char*)aStr.GetStr())
-#endif
- }
- }
-#if defined( OV_DEBUG )
- else
- {
- WRITELOG("DestroyCnvWnd:Already destroyed/No win data/Partner died")
- }
-#endif
-}
-
-// static
-USHORT ImpDdeMgr::GetConversationWndRefCount( HWND hWnd )
-{
- ImpConvWndData* pObj = (ImpConvWndData*)WinQueryWindowULong( hWnd, 0 );
- DBG_ASSERT(pObj,"Dde:ConvWnd has no data");
- if( pObj )
- return pObj->nRefCount;
- return 0;
-}
-
-// static
-USHORT ImpDdeMgr::IncConversationWndRefCount( HWND hWnd )
-{
-#if 0 && defined( OV_DEBUG )
- String aStr("IncConversationWndRefCount ");
- aStr += (ULONG)hWnd;
- WRITELOG((char*)aStr.GetStr())
-#endif
- ImpConvWndData* pObj = (ImpConvWndData*)WinQueryWindowULong( hWnd, 0 );
- DBG_ASSERT(pObj,"Dde:ConvWnd has no data");
- if( pObj )
- {
- pObj->nRefCount++;
- return pObj->nRefCount;
- }
- return 0;
-}
-
-ImpDdeMgrData* ImpDdeMgr::InitAll()
-{
- ImpDdeMgrData* pBase = 0;
- // nur dann neu anlegen, wenn die Tabelle nicht existiert
- APIRET nRet=DosGetNamedSharedMem((PPVOID)&pBase,DDEMLDATA,PAG_READ| PAG_WRITE);
- if ( nRet )
- {
- if ( nRet == 2 ) // ERROR_FILE_NOT_FOUND )
- {
- // DDECONVERSATIONCOUNT=4096
- USHORT nConvTransCount = 128;
- PSZ pResult;
- nRet = DosScanEnv( "SOMAXDDECONN", (const char**)&pResult );
- if( !nRet )
- {
- int nTemp = 0;
- nTemp = atoi( pResult );
- nTemp++; // der nullte Eintrag wird nicht benutzt
- if( nTemp > 128 )
- nConvTransCount = (USHORT)nTemp;
- }
- ULONG nSize = sizeof(ImpDdeMgrData);
- nSize += sizeof(ImpHCONV) * nConvTransCount;
- nSize += sizeof(Transaction) * nConvTransCount;
- nSize += sizeof(HWND) * DDEMLAPPCOUNT;
-
- nRet = ImpDdeMgr::AllocNamedSharedMem( (PPVOID)&pBase,
- DDEMLDATA, nSize, 1 );
- if ( !nRet )
- {
- pBase->nTotalSize = nSize;
- ULONG nAppTable = (ULONG)&(pBase->aAppTable);
- ULONG nCharBase = (ULONG)pBase;
- pBase->nOffsAppTable = nAppTable - nCharBase;
- pBase->nOffsConvTable = pBase->nOffsAppTable;
- pBase->nOffsConvTable += sizeof(HWND) * DDEMLAPPCOUNT;
- pBase->nOffsTransTable = pBase->nOffsConvTable;
- pBase->nOffsTransTable += sizeof(ImpHCONV) * nConvTransCount;
-
- pBase->nMaxAppCount = DDEMLAPPCOUNT;
- pBase->nMaxConvCount = nConvTransCount;
- pBase->nMaxTransCount = nConvTransCount;
- }
- }
- }
-
- if( pBase )
- {
- pConvTable = ImpDdeMgr::GetConvTable( pBase );
- pTransTable = ImpDdeMgr::GetTransTable( pBase );
- pAppTable = ImpDdeMgr::GetAppTable( pBase );
- }
-
- memset( &aDefaultContext, 0, sizeof(CONVCONTEXT) );
- aDefaultContext.cb = sizeof(CONVCONTEXT);
- aDefaultContext.idCountry = 49; // ??
- aDefaultContext.usCodepage = 850; // ??
-
- return pBase;
-}
-
-// static
-HCONV ImpDdeMgr::CreateConvHandle( ImpDdeMgrData* pData,
- PID pidOwner,
- HWND hWndMe, HWND hWndPartner,
- HSZ hszPartner, HSZ hszServiceReq, HSZ hszTopic,
- HCONV hPrevHCONV )
-{
- DBG_ASSERT(pData,"DDE:Invalid data");
- if( !pData )
- return (HCONV)0;
-
- ImpHCONV* pPtr = ImpDdeMgr::GetConvTable( pData );
- USHORT nCount = pData->nMaxConvCount;
- pPtr++;
- nCount--; // ersten Handle (NULLHANDLE) ueberspringen
- USHORT nIdx = 1;
- DBG_ASSERT(pPtr,"No ConvTable");
- if( !pPtr )
- return (HCONV)0;
-
- while( nCount && pPtr->hWndThis != (HWND)NULL )
- {
- nCount--;
- pPtr++;
- nIdx++;
- }
- if( !nCount )
- return (HCONV)0;
-
- DdeKeepStringHandle( hszPartner );
- DdeKeepStringHandle( hszServiceReq );
- DdeKeepStringHandle( hszTopic );
- pPtr->hszPartner = hszPartner;
- pPtr->hszServiceReq = hszServiceReq;
- pPtr->hszTopic = hszTopic;
-
- pPtr->hWndThis = hWndMe;
- pPtr->hWndPartner = hWndPartner;
- pPtr->pidOwner = pidOwner;
- pPtr->hConvPartner = (HCONV)0;
- pPtr->nPrevHCONV = (USHORT)hPrevHCONV;
- pPtr->nNextHCONV = 0;
- pPtr->nStatus = ST_CONNECTED;
-
- pData->nCurConvCount++;
-
- return (HCONV)nIdx;
-}
-
-// static
-void ImpDdeMgr::FreeConvHandle( ImpDdeMgrData* pBase, HCONV hConv,
- BOOL bDestroyHWndThis )
-{
- DBG_ASSERT(pBase,"DDE:No data");
-#if 0 && defined( OV_DEBUG )
- String aStr("FreeConvHandle: Start ");
- aStr += (ULONG)hConv;
- aStr += " Destroy: "; aStr += (USHORT)bDestroyHWndThis;
- WRITELOG((char*)aStr.GetStr());
- WRITESTATUS("FreeConvHandle: Start");
-#endif
- if( !pBase )
- {
- WRITELOG("FreeConvHandle: FAIL");
- return;
- }
- DBG_ASSERT(hConv&&hConv<pBase->nMaxConvCount,"DDE:Invalid Conv-Handle");
- if( hConv && hConv < pBase->nMaxConvCount )
- {
- ImpHCONV* pTable = ImpDdeMgr::GetConvTable( pBase );
- ImpHCONV* pPtr = pTable + (USHORT)hConv;
- if( pPtr->nStatus & ST_INLIST )
- {
- // Verkettung umsetzen
- USHORT nPrev = pPtr->nPrevHCONV;
- USHORT nNext = pPtr->nNextHCONV;
- if( nPrev )
- {
- pPtr = pTable + nPrev;
- pPtr->nNextHCONV = nNext;
- }
- if( nNext )
- {
- pPtr = pTable + nNext;
- pPtr->nPrevHCONV = nPrev;
- }
- pPtr = pTable + (USHORT)hConv;
- }
-
- DdeFreeStringHandle( pPtr->hszPartner );
- DdeFreeStringHandle( pPtr->hszServiceReq );
- DdeFreeStringHandle( pPtr->hszTopic );
- if( bDestroyHWndThis )
- DestroyConversationWnd( pPtr->hWndThis );
- memset( pPtr, 0, sizeof(ImpHCONV) );
- DBG_ASSERT(pBase->nCurConvCount,"Dde:Invalid Trans. count");
- pBase->nCurConvCount--;
- }
-#if defined(OV_DEBUG)
- else
- {
- WRITELOG("FreeConvHandle: FAIL");
- }
-#endif
- //WRITELOG("FreeConvHandle: END");
- //WRITESTATUS("FreeConvHandle: End");
-}
-
-// static
-HCONV ImpDdeMgr::IsConvHandleAvailable( ImpDdeMgrData* pBase )
-{
- DBG_ASSERT(pBase,"DDE:No data");
- if( !pBase )
- return 0;
-
- ImpHCONV* pPtr = ImpDdeMgr::GetConvTable( pBase );
- USHORT nCurPos = pBase->nMaxConvCount - 1;
- pPtr += nCurPos; // von hinten aufrollen
- while( nCurPos >= 1 )
- {
- if( pPtr->hWndThis == 0 )
- return TRUE;
- pPtr--;
- nCurPos--;
- }
- return FALSE;
-}
-
-// static
-HCONV ImpDdeMgr::GetConvHandle( ImpDdeMgrData* pBase, HWND hWndThis,
- HWND hWndPartner )
-{
- DBG_ASSERT(pBase,"DDE:No data");
- if( !pBase )
- return 0;
- ImpHCONV* pPtr = ImpDdeMgr::GetConvTable( pBase );
- USHORT nCurPos = 1;
- pPtr++; // ersten Handle ueberspringen
- USHORT nCurConvCount = pBase->nCurConvCount;
- while( nCurConvCount && nCurPos < pBase->nMaxConvCount )
- {
- if( pPtr->hWndThis )
- {
- if(pPtr->hWndThis == hWndThis && pPtr->hWndPartner == hWndPartner)
- return (HCONV)nCurPos;
- nCurConvCount--;
- if( !nCurConvCount )
- return (HCONV)0;
- }
- nCurPos++;
- pPtr++;
- }
- return (HCONV)0;
-}
-
-
-
-// static
-ULONG ImpDdeMgr::CreateTransaction( ImpDdeMgrData* pBase, HCONV hOwner,
- HSZ hszItem, USHORT nFormat, USHORT nTransactionType )
-{
- DBG_ASSERT(pBase,"DDE:No Data");
- DBG_ASSERT(hOwner!=0,"DDE:No Owner");
-
- if( pBase && hOwner )
- {
- Transaction* pPtr = ImpDdeMgr::GetTransTable( pBase );
- DBG_ASSERT(pPtr->hConvOwner==0,"DDE:Data corrupted");
- USHORT nId = 1;
- pPtr++;
- while( nId < pBase->nMaxTransCount )
- {
- if( pPtr->hConvOwner == (HCONV)0 )
- {
- pPtr->hConvOwner = hOwner;
- DdeKeepStringHandle( hszItem );
- pPtr->hszItem = hszItem;
- pPtr->nType = nTransactionType;
- pPtr->nConvst = XST_CONNECTED;
- pPtr->nFormat = nFormat;
- pBase->nCurTransCount++;
- return (ULONG)nId;
- }
- nId++;
- pPtr++;
- }
- }
- return 0;
-}
-
-// static
-void ImpDdeMgr::FreeTransaction( ImpDdeMgrData* pBase, ULONG nTransId )
-{
- DBG_ASSERT(pBase,"DDE:No Data");
- if( !pBase )
- return;
-
- DBG_ASSERT(nTransId<pBase->nMaxTransCount,"DDE:Invalid TransactionId");
- if( nTransId >= pBase->nMaxTransCount )
- return;
-
- Transaction* pPtr = ImpDdeMgr::GetTransTable( pBase );
- pPtr += nTransId;
- DBG_ASSERT(pPtr->hConvOwner!=0,"DDE:TransId has no owner");
- if( pPtr->hConvOwner )
- {
- //WRITELOG("Freeing transaction");
- DdeFreeStringHandle( pPtr->hszItem );
- memset( pPtr, 0, sizeof(Transaction) );
- DBG_ASSERT(pBase->nCurTransCount,"Dde:Invalid Trans. count");
- pBase->nCurTransCount--;
- }
-}
-
-// static
-ULONG ImpDdeMgr::GetTransaction( ImpDdeMgrData* pBase,
- HCONV hOwner, HSZ hszItem, USHORT nFormat )
-{
- DBG_ASSERT(pBase,"DDE:No Data");
- if( !pBase || !hOwner )
- return 0;
-
- Transaction* pTrans = ImpDdeMgr::GetTransTable( pBase );
- DBG_ASSERT(pTrans,"DDE:No TransactionTable");
- if( !pTrans )
- return 0;
- pTrans++; // NULLHANDLE ueberspringen
-
- ImpHCONV* pConv = ImpDdeMgr::GetConvTable( pBase );
- pConv += (USHORT)hOwner;
- HCONV hConvPartner = pConv->hConvPartner;
-
- USHORT nCurTransCount = pBase->nCurTransCount;
- for( USHORT nTrans=1; nTrans< pBase->nMaxTransCount; nTrans++, pTrans++ )
- {
- if( pTrans->hConvOwner )
- {
- if(( pTrans->hConvOwner == hOwner ||
- pTrans->hConvOwner == hConvPartner) &&
- pTrans->nFormat == nFormat &&
- pTrans->hszItem == hszItem )
- {
- // gefunden!
- return (ULONG)nTrans;
- }
- nCurTransCount--;
- if( !nCurTransCount )
- return 0;
- }
- }
- return 0; // narda
-}
-
-// static
-HSZ ImpDdeMgr::DdeCreateStringHandle( PSZ pszString, int iCodePage)
-{
- if( !pszString || *pszString == '\0' )
- return (HSZ)0;
- // Atom-Table beachtet Gross/Kleinschreibung, DDEML aber nicht
-
- // OV 12.4.96: Services,Topics,Items case-sensitiv!!!
- // (Grosskundenanforderung (Reuter-DDE))
- //strlwr( pszString );
- //*pszString = (char)toupper(*pszString);
-
- HATOMTBL hAtomTable = WinQuerySystemAtomTable();
- ATOM aAtom = WinAddAtom( hAtomTable, pszString );
- return (HSZ)aAtom;
-}
-
-// static
-ULONG ImpDdeMgr::DdeQueryString( HSZ hszStr, PSZ pszStr, ULONG cchMax, int iCodePage)
-{
- HATOMTBL hAtomTable = WinQuerySystemAtomTable();
- if ( !pszStr )
- return WinQueryAtomLength( hAtomTable, (ATOM)hszStr);
- else
- {
- *pszStr = 0;
- return WinQueryAtomName( hAtomTable, (ATOM)hszStr, pszStr, cchMax );
- }
-}
-
-// static
-BOOL ImpDdeMgr::DdeFreeStringHandle( HSZ hsz )
-{
- if( !hsz )
- return FALSE;
- ATOM aResult = WinDeleteAtom( WinQuerySystemAtomTable(),(ATOM)hsz );
- return (BOOL)(aResult==0);
-}
-
-// static
-BOOL ImpDdeMgr::DdeKeepStringHandle( HSZ hsz )
-{
- if( !hsz )
- return TRUE;
- HATOMTBL hAtomTable = WinQuerySystemAtomTable();
-#ifdef DBG_UTIL
- ULONG nUsageCount=WinQueryAtomUsage(hAtomTable,(ATOM)hsz);
-#endif
- ULONG nAtom = 0xFFFF0000;
- ULONG nPar = (ULONG)hsz;
- nAtom |= nPar;
- ATOM aAtom = WinAddAtom( hAtomTable, (PSZ)nAtom );
-#ifdef DBG_UTIL
- if ( aAtom )
- DBG_ASSERT(WinQueryAtomUsage(hAtomTable,(ATOM)hsz)==nUsageCount+1,"Keep failed");
-#endif
- return (BOOL)(aAtom!=0);
-}
-
-
-// static
-int ImpDdeMgr::DdeCmpStringHandles(HSZ hsz1, HSZ hsz2)
-{
- if ( hsz1 == hsz2 )
- return 0;
- if ( hsz1 < hsz2 )
- return -1;
- return 1;
-}
-
-HDDEDATA ImpDdeMgr::DdeCreateDataHandle( void* pSrc, ULONG cb,
- ULONG cbOff, HSZ hszItem, USHORT wFmt, USHORT afCmd)
-{
- char* pData = (char*)pSrc;
- pData += cbOff;
- USHORT nStatus;
- if( afCmd & HDATA_APPOWNED )
- nStatus = IMP_HDATAAPPOWNED;
- else
- nStatus = 0;
- PDDESTRUCT hData=MakeDDEObject(0,(ATOM)hszItem,nStatus,wFmt,pData,cb);
-// WRITEDATA(hData)
- if ( !hData )
- ImpDdeMgr::nLastErrInstance = DMLERR_INVALIDPARAMETER;
- return (HDDEDATA)hData;
-}
-
-// static
-BYTE* ImpDdeMgr::DdeAccessData(HDDEDATA hData, ULONG* pcbDataSize)
-{
- BYTE* pRet = 0;
- *pcbDataSize = 0;
- if ( hData )
- {
- pRet = (BYTE*)hData;
- pRet += hData->offabData;
- ULONG nLen = hData->cbData;
- // nLen -= hData->offabData;
- *pcbDataSize = nLen;
- }
- else
- ImpDdeMgr::nLastErrInstance = DMLERR_INVALIDPARAMETER;
- return pRet;
-}
-
-// static
-BOOL ImpDdeMgr::DdeUnaccessData(HDDEDATA hData)
-{
- return TRUE; // nothing to do for us
-}
-
-// static
-BOOL ImpDdeMgr::DdeFreeDataHandle(HDDEDATA hData)
-{
- DdeUnaccessData( hData );
- MyDosFreeMem( (PSZ)hData, "DdeFreeDataHandle" );
- return TRUE;
-}
-
-// static
-HDDEDATA ImpDdeMgr::DdeAddData(HDDEDATA hData,void* pSrc,ULONG cb,ULONG cbOff)
-{
- return (HDDEDATA)0;
-}
-
-// static
-ULONG ImpDdeMgr::DdeGetData(HDDEDATA hData,void* pDst,ULONG cbMax,ULONG cbOff)
-{
- return 0;
-}
-
-BOOL ImpDdeMgr::DisconnectAll()
-{
- //WRITESTATUS("Before DisconnectAll()")
- USHORT nCurConvCount = pData->nCurConvCount;
- if( !nCurConvCount )
- return TRUE;
-
- BOOL bRet = TRUE;
- ImpHCONV* pPtr = pConvTable;
- pPtr++;
-
- for( USHORT nPos=1; nPos < pData->nMaxConvCount; nPos++, pPtr++ )
- {
- if( pPtr->hWndThis )
- {
- if( !DdeDisconnect( (HCONV)nPos ) )
- bRet = FALSE;
- nCurConvCount--;
- if( !nCurConvCount )
- break;
- }
- }
- //WRITESTATUS("After DisconnectAll()")
- return bRet;
-}
-
-// static
-void ImpDdeMgr::FreeTransactions( ImpDdeMgrData* pData,HWND hWndThis,
- HWND hWndPartner )
-{
- USHORT nCurTransCount = pData->nCurTransCount;
- if( !nCurTransCount )
- return;
-
- Transaction* pTrans = GetTransTable( pData );
- ImpHCONV* pConvTable = GetConvTable( pData );
- pTrans++;
- for( USHORT nPos=1; nPos < pData->nMaxTransCount; nPos++, pTrans++ )
- {
- if( pTrans->hConvOwner )
- {
- ImpHCONV* pConv = pConvTable + (USHORT)(pTrans->hConvOwner);
- if((pConv->hWndThis==hWndThis&& pConv->hWndPartner==hWndPartner)||
- (pConv->hWndThis==hWndPartner && pConv->hWndPartner==hWndThis))
- {
- FreeTransaction( pData, (ULONG)nPos );
- }
- nCurTransCount--;
- if( !nCurTransCount )
- return;
- }
- }
-}
-
-// static
-void ImpDdeMgr::FreeTransactions( ImpDdeMgrData* pData, HCONV hConvOwner )
-{
- USHORT nCurTransCount = pData->nCurTransCount;
- if( !nCurTransCount )
- return;
-
- Transaction* pTrans = GetTransTable( pData );
-// ImpHCONV* pConvTable = GetConvTable( pData );
- pTrans++;
- for( USHORT nPos=1; nPos < pData->nMaxTransCount; nPos++, pTrans++ )
- {
- if( pTrans->hConvOwner == hConvOwner )
- {
- FreeTransaction( pData, (ULONG)nPos );
- nCurTransCount--;
- if( !nCurTransCount )
- return;
- }
- }
-}
-
-// static
-void ImpDdeMgr::FreeConversations( ImpDdeMgrData* pData, HWND hWndThis,
- HWND hWndPartner )
-{
- USHORT nCurCount = pData->nCurConvCount;
- if( !nCurCount )
- return;
-
- ImpHCONV* pPtr = GetConvTable( pData );
- pPtr++;
- for( USHORT nPos=1; nPos < pData->nMaxConvCount; nPos++, pPtr++ )
- {
- if( pPtr->hWndThis )
- {
- if( hWndThis && pPtr->hWndPartner==hWndPartner )
- FreeConvHandle( pData, (HCONV)nPos );
- nCurCount--;
- if( !nCurCount )
- return;
- }
- }
-}
-
-
-BOOL ImpDdeMgr::OwnsConversationHandles()
-{
- //WRITESTATUS("OwnsConversationHandles()");
-#if 0 && defined( OV_DEBUG )
- String aStr("OwnsConversationHandles Server:");
- aStr += (ULONG)hWndServer;
- WRITELOG((char*)aStr.GetStr())
-#endif
- ImpHCONV* pPtr = GetConvTable( pData );
- for( USHORT nCur = 1; nCur < pData->nMaxConvCount; nCur++, pPtr++ )
- {
- if( pPtr->hWndThis && pPtr->pidOwner == pidThis )
- {
- //WRITELOG("OwnsConversationHandles: TRUE");
- return TRUE;
- }
- }
- // WRITELOG("OwnsConversationHandles: FALSE");
- return FALSE;
-}
-
-
-
-// *********************************************************************
-// *********************************************************************
-// *********************************************************************
-
-USHORT DdeInitialize(ULONG* pidInst, PFNCALLBACK pfnCallback,
- ULONG afCmd, ULONG ulRes)
-{
- if( (*pidInst)!=0 )
- {
- // Reinitialize wird noch nicht unterstuetzt
- DBG_ASSERT(0,"DDEML:Reinitialize not supported");
- return DMLERR_INVALIDPARAMETER;
- }
-
- ImpDdeMgr* pMgr = new ImpDdeMgr;
- *pidInst = (ULONG)pMgr;
- return pMgr->DdeInitialize( pfnCallback, afCmd );
-}
-
-BOOL DdeUninitialize(ULONG idInst)
-{
- if( !idInst )
- return FALSE;
- ImpDdeMgr* pMgr = (ImpDdeMgr*)idInst;
- // nur loeschen, wenn wir nicht mehr benutzt werden!
- if( !pMgr->OwnsConversationHandles() )
- {
- WRITELOG("DdeUninitialize: TRUE");
- delete pMgr;
- return TRUE;
- }
- WRITELOG("DdeUninitialize: FALSE");
- return FALSE;
-}
-
-
-HCONVLIST DdeConnectList(ULONG idInst, HSZ hszService, HSZ hszTopic,
- HCONVLIST hConvList, CONVCONTEXT* pCC)
-{
- if( !idInst )
- return 0;
- return ((ImpDdeMgr*)idInst)->DdeConnectList(hszService,hszTopic,
- hConvList, pCC );
-}
-
-HCONV DdeQueryNextServer(HCONVLIST hConvList, HCONV hConvPrev)
-{
- return ImpDdeMgr::DdeQueryNextServer( hConvList, hConvPrev );
-}
-
-BOOL DdeDisconnectList(HCONVLIST hConvList)
-{
- return ImpDdeMgr::DdeDisconnectList( hConvList );
-}
-
-HCONV DdeConnect(ULONG idInst, HSZ hszService, HSZ hszTopic,
- CONVCONTEXT* pCC)
-{
- if( !idInst )
- return 0;
- return ((ImpDdeMgr*)idInst)->DdeConnect( hszService, hszTopic, pCC );
-}
-
-BOOL DdeDisconnect(HCONV hConv)
-{
- return ImpDdeMgr::DdeDisconnect( hConv );
-}
-
-HCONV DdeReconnect(HCONV hConv)
-{
- return ImpDdeMgr::DdeReconnect( hConv );
-}
-
-
-USHORT DdeQueryConvInfo(HCONV hConv, ULONG idTransact, CONVINFO* pCI )
-{
- return ImpDdeMgr::DdeQueryConvInfo( hConv, idTransact, pCI );
-}
-
-BOOL DdeSetUserHandle(HCONV hConv, ULONG id, ULONG hUser)
-{
- return ImpDdeMgr::DdeSetUserHandle( hConv, id, hUser );
-}
-
-BOOL DdeAbandonTransaction(ULONG idInst, HCONV hConv, ULONG idTransaction)
-{
- if( !idInst )
- return FALSE;
- return ((ImpDdeMgr*)idInst)->DdeAbandonTransaction(hConv,idTransaction);
-}
-
-BOOL DdePostAdvise(ULONG idInst, HSZ hszTopic, HSZ hszItem)
-{
- if( !idInst )
- return FALSE;
- return ((ImpDdeMgr*)idInst)->DdePostAdvise( hszTopic, hszItem );
-}
-
-BOOL DdeEnableCallback(ULONG idInst, HCONV hConv, USHORT wCmd)
-{
- if( !idInst )
- return FALSE;
- return ((ImpDdeMgr*)idInst)->DdeEnableCallback( hConv, wCmd );
-}
-
-HDDEDATA DdeClientTransaction(void* pData, ULONG cbData,
- HCONV hConv, HSZ hszItem, USHORT wFmt, USHORT wType,
- ULONG dwTimeout, ULONG* pdwResult)
-{
- return ImpDdeMgr::DdeClientTransaction( pData, cbData,
- hConv, hszItem, wFmt, wType, dwTimeout, pdwResult );
-}
-
-HDDEDATA DdeCreateDataHandle(ULONG idInst, void* pSrc, ULONG cb,
- ULONG cbOff, HSZ hszItem, USHORT wFmt, USHORT afCmd)
-{
- if( !idInst )
- return 0;
- return ((ImpDdeMgr*)idInst)->DdeCreateDataHandle( pSrc, cb,
- cbOff, hszItem, wFmt, afCmd );
-}
-
-HDDEDATA DdeAddData(HDDEDATA hData, void* pSrc, ULONG cb, ULONG cbOff)
-{
- return ImpDdeMgr::DdeAddData( hData, pSrc, cb, cbOff );
-}
-
-ULONG DdeGetData(HDDEDATA hData, void* pDst, ULONG cbMax, ULONG cbOff)
-{
- return ImpDdeMgr::DdeGetData( hData, pDst, cbMax, cbOff );
-}
-
-BYTE* DdeAccessData(HDDEDATA hData, ULONG* pcbDataSize)
-{
- return ImpDdeMgr::DdeAccessData( hData, pcbDataSize );
-}
-
-BOOL DdeUnaccessData(HDDEDATA hData)
-{
- return ImpDdeMgr::DdeUnaccessData( hData );
-}
-
-BOOL DdeFreeDataHandle(HDDEDATA hData)
-{
- return ImpDdeMgr::DdeFreeDataHandle( hData );
-}
-
-USHORT DdeGetLastError(ULONG idInst)
-{
- if( !idInst )
- return DMLERR_DLL_NOT_INITIALIZED;
- return ((ImpDdeMgr*)idInst)->DdeGetLastError();
-}
-
-HSZ DdeCreateStringHandle(ULONG idInst, PSZ pszString,int iCodePage )
-{
- if( !idInst )
- return 0;
- return ((ImpDdeMgr*)idInst)->DdeCreateStringHandle(pszString,iCodePage);
-}
-
-ULONG DdeQueryString( ULONG idInst, HSZ hsz, PSZ pBuf,
- ULONG cchMax, int iCodePage )
-{
- if( !idInst )
- return 0;
- return ((ImpDdeMgr*)idInst)->DdeQueryString( hsz,pBuf,cchMax,iCodePage);
-}
-
-BOOL DdeFreeStringHandle( ULONG idInst, HSZ hsz)
-{
- if( !idInst )
- return FALSE;
- return ((ImpDdeMgr*)idInst)->DdeFreeStringHandle( hsz );
-}
-
-BOOL DdeKeepStringHandle( ULONG idInst, HSZ hsz )
-{
- if( !idInst )
- return FALSE;
- return ((ImpDdeMgr*)idInst)->DdeKeepStringHandle( hsz );
-}
-
-int DdeCmpStringHandles(HSZ hsz1, HSZ hsz2)
-{
- return ImpDdeMgr::DdeCmpStringHandles( hsz1, hsz2 );
-}
-
-HDDEDATA DdeNameService( ULONG idInst, HSZ hsz1, HSZ hszRes, USHORT afCmd )
-{
- if( !idInst )
- return 0;
- return ((ImpDdeMgr*)idInst)->DdeNameService( hsz1, afCmd );
-}
-
-
diff --git a/svl/source/svdde/ddemldeb.cxx b/svl/source/svdde/ddemldeb.cxx
deleted file mode 100644
index f921e93d2e9c..000000000000
--- a/svl/source/svdde/ddemldeb.cxx
+++ /dev/null
@@ -1,280 +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_svl.hxx"
-
-#include "ddemlimp.hxx"
-
-#ifdef OV_DEBUG
-#include <svgen.hxx>
-#endif
-
-#if defined(OV_DEBUG)
-
-void ImpAddHSZ( HSZ hszString, String& rStr )
-{
- char aBuf[ 128 ];
- ImpDdeMgr::DdeQueryString( hszString,aBuf,sizeof(aBuf),850);
- rStr += " (\""; rStr += aBuf; rStr += "\",";
- HATOMTBL hAtomTable = WinQuerySystemAtomTable();
- ULONG nRefCount = 0;
- if( hszString )
- nRefCount = WinQueryAtomUsage(hAtomTable, (ATOM)hszString );
- rStr += nRefCount; rStr += ')';
-}
-
-
-void ImpWriteDdeStatus(char* aFilename, char* pAppContext)
-{
- char aBuf[ 128 ];
- USHORT nCtr;
- HWND* pAppPtr;
- ImpHCONV* pConvPtr;
- Transaction* pTransPtr;
-
- ImpDdeMgrData* pData = ImpDdeMgr::AccessMgrData();
- if( !pData )
- return;
- SvFileStream aStrm(aFilename, STREAM_READWRITE );
- String aLine;
- aStrm.Seek( STREAM_SEEK_TO_END );
- aStrm << endl;
- aStrm.WriteLine("********************** DDEML-Log ***********************");
- aStrm << endl;
- if( pAppContext )
- {
- aLine = Application::GetAppName();
- aLine += ':';
- aLine += "App-Context:"; aLine += pAppContext;
- aStrm.WriteLine( aLine ); aStrm << endl;
- }
- aStrm.WriteLine("----------------- ImpDdeMgrData -------------------");
- aStrm << endl;
- aLine= "TotalSize :"; aLine+= pData->nTotalSize; aStrm.WriteLine(aLine);
- aLine= "nOffsAppTable :"; aLine+= pData->nOffsAppTable; aStrm.WriteLine(aLine);
- aLine= "nOffsConvTable :"; aLine+= pData->nOffsConvTable; aStrm.WriteLine(aLine);
- aLine= "nOffsTransTable:"; aLine+= pData->nOffsTransTable; aStrm.WriteLine(aLine);
- aLine= "nMaxAppCount :"; aLine+= pData->nMaxAppCount; aStrm.WriteLine(aLine);
- aLine= "nMaxConvCount :"; aLine+= pData->nMaxConvCount; aStrm.WriteLine(aLine);
- aLine= "nMaxTransCount :"; aLine+= pData->nMaxTransCount; aStrm.WriteLine(aLine);
- aLine= "nLastErr :"; aLine+= pData->nLastErr; aStrm.WriteLine(aLine);
- aLine= "nCurConvCount :"; aLine+= pData->nCurConvCount; aStrm.WriteLine(aLine);
- aLine= "nCurTransCount :"; aLine+= pData->nCurTransCount; aStrm.WriteLine(aLine);
- aStrm << endl;
- aStrm.WriteLine("---------- Registered DDEML-Applications -----------");
- aStrm << endl;
- pAppPtr = ImpDdeMgr::GetAppTable( pData );
- for( nCtr = 0; nCtr < pData->nMaxAppCount; nCtr++, pAppPtr++ )
- {
- if( *pAppPtr )
- {
- aLine = "App."; aLine += nCtr; aLine += " HWND:";
- aLine += (ULONG)*pAppPtr; aStrm.WriteLine(aLine);
- }
- }
-
- aStrm << endl;
- aStrm.WriteLine("-------------- Conversation handles ----------------");
- aStrm << endl;
-
- USHORT nCurCount = pData->nCurConvCount;
-
- if( nCurCount )
- {
- pConvPtr = ImpDdeMgr::GetConvTable( pData );
- for( nCtr = 0; nCtr < pData->nMaxConvCount; nCtr++, pConvPtr++ )
- {
- if( pConvPtr->hWndThis )
- {
- aLine = "HCONV:"; aLine += nCtr;
- aLine += " HCONVpartner: "; aLine += (USHORT)pConvPtr->hConvPartner;
- if( !pConvPtr->hConvPartner ) aLine += "(Non-DDEML-App)";
- aLine += " hszPartner: "; aLine += (USHORT)pConvPtr->hszPartner;
- ImpAddHSZ( pConvPtr->hszPartner, aLine );
- aStrm.WriteLine( aLine );
-
- aLine = "hszService: "; aLine += (USHORT)pConvPtr->hszServiceReq;
- ImpAddHSZ( pConvPtr->hszServiceReq, aLine );
- aLine += " hszTopic: "; aLine += (USHORT)pConvPtr->hszTopic;
- ImpAddHSZ( pConvPtr->hszTopic, aLine );
- aStrm.WriteLine( aLine );
-
- aLine= "Status: "; aLine+= pConvPtr->nStatus;
- if( pConvPtr->nStatus & ST_CLIENT ) aLine += " (Client)";
- if( pConvPtr->nStatus & ST_INLIST ) aLine += " (Inlist)";
- aStrm.WriteLine(aLine);
-
- aLine = "pidOwner: "; aLine += (ULONG)pConvPtr->pidOwner;
- aStrm.WriteLine( aLine );
- aLine = "hWndThis: "; aLine += (ULONG)pConvPtr->hWndThis;
- aStrm.WriteLine( aLine );
- aLine = "hWndPartner: "; aLine += (ULONG)pConvPtr->hWndPartner;
- aStrm.WriteLine( aLine );
-
- aLine = "hConvList: "; aLine += (ULONG)pConvPtr->hConvList;
- aLine += " Prev: "; aLine += pConvPtr->nPrevHCONV;
- aLine += " Next: "; aLine += pConvPtr->nNextHCONV;
- aStrm.WriteLine( aLine );
- aStrm.WriteLine("----------------------------------------------------");
-
- nCurCount--;
- if( !nCurCount )
- break;
- }
- }
- }
-
- aStrm.WriteLine("----------------- Transaction Ids ------------------");
-
- nCurCount = pData->nCurTransCount;
- if( nCurCount )
- {
- pTransPtr = ImpDdeMgr::GetTransTable( pData );
- for( nCtr = 0; nCtr < pData->nMaxTransCount; nCtr++, pTransPtr++ )
- {
-
- if( pTransPtr->hConvOwner )
- {
- aLine = "TransactionId:"; aLine += nCtr;
- aLine += " hConvOwner: "; aLine += (USHORT)pTransPtr->hConvOwner;
- aStrm.WriteLine( aLine );
- aLine = "Item: "; aLine += (USHORT)pTransPtr->hszItem;
- ImpAddHSZ( pTransPtr->hszItem, aLine );
- aLine += " Format: "; aLine += pTransPtr->nFormat;
- aStrm.WriteLine( aLine );
- aLine = "TransactionType: "; aLine += pTransPtr->nType;
- aLine += " Convst: "; aLine += pTransPtr->nConvst;
- aLine += " LastErr: "; aLine += pTransPtr->nLastError;
- aLine += " Userhandle: "; aLine += pTransPtr->nUser;
- aStrm.WriteLine( aLine );
- aStrm.WriteLine("--------------------------------------------------");
-
- nCurCount--;
- if( !nCurCount )
- break;
- }
- }
- }
- aStrm << endl;
- aStrm.WriteLine("******************* End of DDEML-Log *******************");
-}
-
-void ImpWriteDdeData(char* aFilename, DDESTRUCT* pData)
-{
- char aBuf[ 128 ];
- USHORT nCtr;
- SvFileStream aStrm(aFilename, STREAM_READWRITE );
- aStrm.Seek( STREAM_SEEK_TO_END );
- String aLine;
- aStrm << endl;
- aLine = "cbData:"; aLine += pData->cbData; aStrm.WriteLine( aLine );
- aLine = "fsStatus:"; aLine += pData->fsStatus; aStrm.WriteLine( aLine );
- aLine = "usFormat:"; aLine += pData->usFormat; aStrm.WriteLine( aLine );
- aLine = "ItemName:"; aLine += (char*)((char*)pData+pData->offszItemName);
- aStrm.WriteLine( aLine );
- aLine = "offabData:"; aLine += pData->offabData; aStrm.WriteLine(aLine);
- char* pBuf = (char*)pData+pData->offabData;
- USHORT nLen = pData->cbData; // - pData->offabData;
- while( nLen )
- {
- aStrm << *pBuf;
- nLen--;
- pBuf++;
- }
- aStrm << endl;
-}
-
-void ImpWriteLogFile(char* pFilename, char* pStr)
-{
- SvFileStream aStrm(pFilename, STREAM_READWRITE );
- aStrm.Seek( STREAM_SEEK_TO_END );
- String aStr( Application::GetAppName() );
- aStr += ':'; aStr += pStr;
- aStrm.WriteLine( (char*)aStr.GetStr() );
-}
-
-#else
-
-void ImpWriteDdeStatus(char*, char* ) {}
-void ImpWriteDdeData(char*, DDESTRUCT*) {}
-void ImpWriteLogFile(char*, char*) {}
-
-#endif
-
-APIRET MyDosAllocSharedMem(void** ppBaseAddress, char* pszName, unsigned long ulObjectSize,
- unsigned long ulFlags, char* pContextStr )
-{
- APIRET nRet = DosAllocSharedMem(ppBaseAddress,pszName,ulObjectSize,ulFlags );
-#if 0 && defined(OV_DEBUG) && defined(LOGFILE)
- String aStr("DosAllocSharedMem:");
- aStr += pContextStr;
- aStr += ": ";
- aStr += ulObjectSize;
- aStr += " (";
- aStr += (ULONG)*((char**)ppBaseAddress);
- aStr += ')';
- ImpWriteLogFile("\\ddeml.mem", (char*)aStr.GetStr() );
-#endif
- return nRet;
-}
-
-APIRET MyDosAllocMem(void** ppBaseAddress, unsigned long ulObjectSize,
- unsigned long ulFlags, char* pContextStr )
-{
- APIRET nRet = DosAllocMem(ppBaseAddress, ulObjectSize,ulFlags );
-#if 0 && defined(OV_DEBUG) && defined(LOGFILE)
- String aStr("DosAllocMem:");
- aStr += pContextStr;
- aStr += ": ";
- aStr += ulObjectSize;
- aStr += " (";
- aStr += (ULONG)*((char**)ppBaseAddress);
- aStr += ')';
- ImpWriteLogFile("\\ddeml.mem", (char*)aStr.GetStr() );
-#endif
- return nRet;
-}
-
-
-APIRET MyDosFreeMem( void* pBaseAddress, char* pContextStr )
-{
- APIRET nRet = DosFreeMem( pBaseAddress );
-#if 0 && defined(OV_DEBUG) && defined(LOGFILE)
- String aStr("DosFreeMem:");
- aStr += pContextStr;
- aStr += ": ";
- aStr += (ULONG)pBaseAddress;
- ImpWriteLogFile("\\ddeml.mem", (char*)aStr.GetStr());
-#endif
- return nRet;
-}
-
-
-
-
-
diff --git a/svl/source/svdde/ddemldeb.hxx b/svl/source/svdde/ddemldeb.hxx
deleted file mode 100644
index 8654bbd3ca65..000000000000
--- a/svl/source/svdde/ddemldeb.hxx
+++ /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.
- *
- ************************************************************************/
-
-#if defined(OV_DEBUG)
-
-void ImpWriteLogFile(char*,char*);
-void ImpAddHSZ( HSZ, String& );
-void ImpWriteDdeStatus(char*, char* );
-void ImpWriteDdeData(char*, DDESTRUCT*);
-
-#ifdef LOGFILE
-#define WRITELOG(aString) ImpWriteLogFile("\\ddeml.log",aString);
-#else
-#define WRITELOG(bla)
-#endif
-#ifdef STATUSFILE
-#define WRITESTATUS(aContext) ImpWriteDdeStatus("\\ddeml.sts",aContext);
-#else
-#define WRITESTATUS(bla)
-#endif
-#ifdef DDEDATAFILE
-#define WRITEDATA(data) ImpWriteDdeData("\\ddeml.dat",data);
-#else
-#define WRITEDATA(bla)
-#endif
-
-#else
-
-#define WRITELOG(bla)
-#define WRITESTATUS(bla)
-#define WRITEDATA(bla)
-
-#endif
-
-APIRET MyDosAllocSharedMem(void** ppBaseAddress, char* pszName, unsigned long ulObjectSize,
- unsigned long ulFlags, char* pContextStr );
-
-APIRET MyDosAllocMem(void** ppBaseAddress, unsigned long ulObjectSize,
- unsigned long ulFlags, char* pContextStr );
-
-APIRET MyDosFreeMem( void* pBaseAddress, char* pContextStr );
-
diff --git a/svl/source/svdde/ddemlimp.hxx b/svl/source/svdde/ddemlimp.hxx
deleted file mode 100644
index 28c4bf248bbe..000000000000
--- a/svl/source/svdde/ddemlimp.hxx
+++ /dev/null
@@ -1,433 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _DDEMLIMP_HXX
-#define _DDEMLIMP_HXX
-
-
-#include <string.h>
-#include <ctype.h>
-#include "ddemlos2.h"
-
-#define DDEMLSERVICETABLE_INISIZE 8
-
-// Bezeichner der systemglobalen DDEML-Tabelle
-#define DDEMLDATA "\\SHAREMEM\\OV_DDEML.DAT"
-
-// vorlaeufig konstante Tabellengroessen
-#define CONVTABLECOUNT 2048 /* max count conversations */
-#define TRANSTABLECOUNT 2048 /* transactions */
-#define DDEMLAPPCOUNT 16 /* max count simultaniously running */
- /* ddeml (StarDivision) applications */
-
-#define ST_TERMACKREC 0x8000 /* wird im Conversationhandle gesetzt, */
- /* wenn die Partner-App DDE_TERMINATE */
- /* bestaetigt hat */
-
-#define XST_TIMEOUT 17 /* Trans. hat Timeout ueberschritten */
-#define XST_WAITING_ACK 18 /* Trans. wartet auf Acknowledge */
-#define XST_WAITING_ADVDATA 19 /* Trans. wartet auf Advise-Daten */
-#define XST_WAITING_REQDATA 20 /* Trans. wartet auf angeforderte Daten */
-
-
-/* User-Flags DDESTRUCT */
-#define IMP_HDATAAPPOWNED 0x8000
-
-#define CONVLISTNAME "DdeConvListId"
-
-#define XTYPF_MASK (XTYPF_NOBLOCK | XTYPF_NODATA | XTYPF_ACKREQ)
-
-//
-// DDEML-Messages; werden nur an registrierte DDEML-Apps gesendet
-//
-
-// Msg: WM_DDEML_REGISTER
-// Empfaenger: wird allen DDEML-Applikationen nach Registrierung
-// eines neuen Services gesendet
-// Params: nPar1: hszBaseServName
-// nPar2: hszInstServName
-#define WM_DDEML_REGISTER WM_USER+1
-
-// Msg: WM_DDEML_UNREGISTER
-// Empfaenger: wird allen DDEML-Applikationen nach Deregistrierung
-// eines Services gesendet
-// Params: nPar1: hszBaseServName
-// nPar2: hszInstServName
-#define WM_DDEML_UNREGISTER WM_USER+2
-
-//
-//
-//
-
-struct ImpHCONV
-{
- HCONV hConvPartner;
- HSZ hszPartner; // Name of partner application
- HSZ hszServiceReq; // Service name
- HSZ hszTopic; // Topic name
- USHORT nStatus; // ST_* of conversation
- HCONVLIST hConvList; // ConvListId , wenn in ConvList
- CONVCONTEXT aConvContext; // Conversation context
-
- // private
- HWND hWndThis; // 0 == Handle not used
- HWND hWndPartner;
- PID pidOwner; // PID des DdeManagers, der
- // den Conv-Handle erzeugt hat.
- USHORT nPrevHCONV; // 0 == no previous hConv or not in list
- USHORT nNextHCONV; // 0 == no next hconv or not in list
-};
-
-struct Transaction
-{
- HSZ hszItem; // Item name
- USHORT nFormat; // Data format
- USHORT nType; // Transaction type (XTYP_*)
- // XTYP_ADVREQ [|XTYPF_NODATA] == Advise-Loop
- // [|XTYPF_ACKREQ]
- // XTYP_EXECUTE == laufendes Execute
- // XTYP_REQUEST
- // XTYP_POKE
- // XTYP_ADVSTOP
- // XTYP_ADVSTART
- USHORT nConvst; // Conversation state (XST_*)
- // 0 == idle
- // XST_REQSENT (fuer XTYP_ADVREQ)
- // XST_TIMEOUT (fuer alle Typen!)
- // XST_WAITING (alle ausser XTYP_ADVREQ)
- USHORT nLastError; // last err in transaction
- ULONG nUser; // Userhandle
- // private
- HCONV hConvOwner; // 0 == Transaction not used
-};
-
-
-struct ImpWndProcParams
-{
- HWND hWndReceiver;
- MPARAM nPar1;
- MPARAM nPar2;
-};
-
-struct ImpService
-{
- HSZ hBaseServName; // Basis-Name des Service
- HSZ hInstServName; // Basis-Name + DDEML-Server-HWND der App
-};
-
-class ImpDdeMgr;
-
-// Daten eines Conversation-Windows
-struct ImpConvWndData
-{
- ImpDdeMgr* pThis;
- USHORT nRefCount; // Zahl Conversations auf diesem Window
-};
-
-
-// systemglobale Daten der Library (liegen in named shared memory)
-struct ImpDdeMgrData
-{
- ULONG nTotalSize;
- ULONG nOffsAppTable;
- ULONG nOffsConvTable;
- ULONG nOffsTransTable;
- USHORT nMaxAppCount;
- USHORT nMaxConvCount;
- USHORT nMaxTransCount;
- USHORT nLastErr;
- USHORT nReserved;
- USHORT nCurTransCount;
- USHORT nCurConvCount;
- HWND aAppTable[ 1 ]; // fuer Broadcast-Messages
- ImpHCONV aConvTable[ 1 ];
- Transaction aTransTable[ 1 ];
-};
-
-
-
-class ImpDdeMgr
-{
- friend MRESULT EXPENTRY ConvWndProc(HWND hWnd,ULONG nMsg,MPARAM nPar1,MPARAM nPar2);
- friend MRESULT EXPENTRY ServerWndProc(HWND hWnd,ULONG nMsg,MPARAM nPar1,MPARAM nPar2);
- friend void ImpWriteDdeStatus(char*,char*);
- friend void ImpAddHSZ( HSZ, String& );
-
- static PSZ AllocAtomName( ATOM hString, ULONG& rBufLen );
- static PDDESTRUCT MakeDDEObject( HWND hwnd, ATOM hItemName,
- USHORT fsStatus, USHORT usFormat, PVOID pabData, ULONG usDataLen );
- static APIRET AllocNamedSharedMem( PPVOID ppBaseAddress, PSZ pName,
- ULONG nElementSize, ULONG nElementCount );
-
- HWND hWndServer;
- PID pidThis;
- PFNCALLBACK pCallback;
- ULONG nTransactFilter;
- CONVCONTEXT aDefaultContext;
- ImpDdeMgrData* pData;
- ImpService* pServices;
- USHORT nServiceCount;
-
- ImpHCONV* pConvTable; // liegt in pData (nicht deleten!)
- Transaction* pTransTable; // liegt in pData (nicht deleten!)
- HWND* pAppTable; // liegt in pData (nicht deleten!)
-
- static ImpHCONV* GetConvTable( ImpDdeMgrData* );
- static Transaction* GetTransTable( ImpDdeMgrData* );
- static HWND* GetAppTable( ImpDdeMgrData* );
-
-
- static HWND NextFrameWin( HENUM hEnum );
- void CreateServerWnd();
- void DestroyServerWnd();
- HWND CreateConversationWnd();
- // Fktn. duerfen nur fuer HCONVs aufgerufen werden, die
- // in der eigenen Applikation erzeugt wurden
- static void DestroyConversationWnd( HWND hWndConv );
- static USHORT GetConversationWndRefCount( HWND hWndConv );
- static USHORT IncConversationWndRefCount( HWND hWndConv );
-
- MRESULT SrvWndProc(HWND hWnd,ULONG nMsg,MPARAM nPar1,MPARAM nPar2);
- MRESULT ConvWndProc(HWND hWnd,ULONG nMsg,MPARAM nPar1,MPARAM nPar2);
- void RegisterDDEMLApp();
- void UnregisterDDEMLApp();
- void CleanUp();
- ImpDdeMgrData* InitAll();
- static BOOL MyWinDdePostMsg( HWND, HWND, USHORT, PDDESTRUCT, ULONG );
- void MyInitiateDde( HWND hWndServer, HWND hWndClient,
- HSZ hszService, HSZ hszTopic, CONVCONTEXT* pCC );
- DDEINIT* CreateDDEInitData( HWND hWndDest, HSZ hszService,
- HSZ hszTopic, CONVCONTEXT* pCC );
- // wenn pDDEData==0, muss pCC gesetzt sein
- HCONV ConnectWithClient( HWND hWndClient, HSZ hszPartner,
- HSZ hszService, HSZ hszTopic, BOOL bSameInst,
- DDEINIT* pDDEData, CONVCONTEXT* pCC = 0);
-
- HCONV CheckIncoming( ImpWndProcParams*, ULONG nTransMask,
- HSZ& rhszItem );
- // fuer Serverbetrieb. Ruft Callback-Fkt fuer alle offenen Advises
- // auf, deren Owner der uebergebene HCONV ist.
- // bFreeTransactions==TRUE: loescht die Transaktionen
- // gibt Anzahl der getrennten Transaktionen zurueck
- USHORT SendUnadvises( HCONV hConv,
- USHORT nFormat, // 0==alle
- BOOL bFreeTransactions );
-
- BOOL WaitTransState(
- Transaction* pTrans, ULONG nTransId,
- USHORT nNewState,
- ULONG nTimeout );
-
- // DDEML ruft Callback mit XTYP_CONNECT-Transaction nur auf,
- // wenn die App den angeforderten Service registriert hat
- // Standardeinstellung: TRUE
- BOOL bServFilterOn;
-
- // Fehlercode muss noch systemglobal werden (Atom o. ae.)
- static USHORT nLastErrInstance; // wenn 0, dann gilt globaler Fehlercode
-
- static ImpDdeMgrData* AccessMgrData();
-
- static HCONV CreateConvHandle( ImpDdeMgrData* pBase,
- PID pidOwner,
- HWND hWndThis, HWND hWndPartner,
- HSZ hszPartner, HSZ hszServiceReq, HSZ hszTopic,
- HCONV hPrevHCONV = 0 );
-
- static HCONV IsConvHandleAvailable( ImpDdeMgrData* pBase );
- static HCONV GetConvHandle( ImpDdeMgrData* pBase,
- HWND hWndThis, HWND hWndPartner );
- static void FreeConvHandle( ImpDdeMgrData*, HCONV,
- BOOL bDestroyHWndThis = TRUE );
-
- static ULONG CreateTransaction( ImpDdeMgrData* pBase,
- HCONV hOwner, HSZ hszItem, USHORT nFormat,
- USHORT nTransactionType );
- static ULONG GetTransaction( ImpDdeMgrData* pBase,
- HCONV hOwner, HSZ hszItem, USHORT nFormat );
-
- static void FreeTransaction( ImpDdeMgrData*, ULONG nTransId );
-
- BOOL DisconnectAll();
- // Transaktionen muessen _vor_ den Konversationen geloescht werden!
- static void FreeTransactions( ImpDdeMgrData*, HWND hWndThis,
- HWND hWndPartner );
- static void FreeTransactions( ImpDdeMgrData*, HCONV hConvOwner );
-
- static void FreeConversations( ImpDdeMgrData*,HWND hWndThis,
- HWND hWndPartner );
-
- ImpService* GetService( HSZ hszService );
- ImpService* PutService( HSZ hszService );
- void BroadcastService( ImpService*, BOOL bRegistered );
-
- // rh: Startposition(!) & gefundener Handle
- static ImpHCONV* GetFirstServer( ImpDdeMgrData*, HCONVLIST, HCONV& rh);
- static ImpHCONV* GetLastServer( ImpDdeMgrData*, HCONVLIST, HCONV& );
- static BOOL CheckConvListId( HCONVLIST hConvListId );
-
- BOOL IsSameInstance( HWND hWnd );
- HSZ GetAppName( HWND hWnd );
-
-
- // Transactions
- MRESULT DdeAck( ImpWndProcParams* pParams );
- MRESULT DdeAdvise( ImpWndProcParams* pParams );
- MRESULT DdeData( ImpWndProcParams* pParams );
- MRESULT DdeExecute( ImpWndProcParams* pParams );
- MRESULT DdeInitiate( ImpWndProcParams* pParams );
- MRESULT DdeInitiateAck( ImpWndProcParams* pParams );
- MRESULT DdePoke( ImpWndProcParams* pParams );
- MRESULT DdeRequest( ImpWndProcParams* pParams );
- MRESULT DdeTerminate( ImpWndProcParams* pParams );
- MRESULT DdeUnadvise( ImpWndProcParams* pParams );
- MRESULT DdeRegister( ImpWndProcParams* pParams );
- MRESULT DdeUnregister( ImpWndProcParams* pParams );
- MRESULT DdeTimeout( ImpWndProcParams* pParams );
-
- HDDEDATA Callback(
- USHORT nTransactionType,
- USHORT nClipboardFormat,
- HCONV hConversationHandle,
- HSZ hsz1,
- HSZ hsz2,
- HDDEDATA hData,
- ULONG nData1,
- ULONG nData2 );
-
- HCONV DdeConnectImp( HSZ hszService,HSZ hszTopic,CONVCONTEXT* pCC);
-
- // connection data
- HCONV hCurConv; // wird im DdeInitiateAck gesetzt
- HCONVLIST hCurListId; // fuer DdeConnectList
- USHORT nPrevConv; // .... "" ....
- BOOL bListConnect;
-
- // synchr. transaction data
- BOOL bInSyncTrans;
- ULONG nSyncTransId;
- HDDEDATA hSyncResponseData;
- ULONG nSyncResponseMsg; // WM_DDE_ACK, WM_DDE_DATA, WM_TIMER
- // TRUE==nach Ende der synchronen Transaktion eine evtl. benutzte
- // asynchrone Transaktion beenden (typisch synchroner Request auf
- // Advise-Loop)
- BOOL bSyncAbandonTrans;
-
-public:
- ImpDdeMgr();
- ~ImpDdeMgr();
-
- USHORT DdeInitialize( PFNCALLBACK pCallbackProc, ULONG nTransactionFilter );
- USHORT DdeGetLastError();
-
- HCONV DdeConnect( HSZ hszService, HSZ hszTopic, CONVCONTEXT* );
- HCONVLIST DdeConnectList( HSZ hszService, HSZ hszTopic,
- HCONVLIST hConvList, CONVCONTEXT* );
- static BOOL DdeDisconnect( HCONV hConv );
- static BOOL DdeDisconnectList( HCONVLIST hConvList );
- static HCONV DdeReconnect(HCONV hConv);
- static HCONV DdeQueryNextServer(HCONVLIST hConvList, HCONV hConvPrev);
- static USHORT DdeQueryConvInfo(HCONV hConv, ULONG idTrans,CONVINFO* pCI);
- static BOOL DdeSetUserHandle(HCONV hConv, ULONG id, ULONG hUser);
- BOOL DdeAbandonTransaction( HCONV hConv, ULONG idTransaction);
-
- BOOL DdePostAdvise( HSZ hszTopic, HSZ hszItem);
- BOOL DdeEnableCallback( HCONV hConv, USHORT wCmd);
-
- HDDEDATA DdeNameService( HSZ hszService, USHORT afCmd);
-
- static HDDEDATA DdeClientTransaction(void* pData, ULONG cbData,
- HCONV hConv, HSZ hszItem, USHORT wFmt, USHORT wType,
- ULONG dwTimeout, ULONG* pdwResult);
-
- // Data handles
-
- HDDEDATA DdeCreateDataHandle( void* pSrc, ULONG cb, ULONG cbOff,
- HSZ hszItem, USHORT wFmt, USHORT afCmd);
- static BYTE* DdeAccessData(HDDEDATA hData, ULONG* pcbDataSize);
- static BOOL DdeUnaccessData(HDDEDATA hData);
- static BOOL DdeFreeDataHandle(HDDEDATA hData);
- static HDDEDATA DdeAddData(HDDEDATA hData,void* pSrc,ULONG cb,ULONG cbOff);
- static ULONG DdeGetData(HDDEDATA hData,void* pDst,ULONG cbMax,ULONG cbOff);
-
- // String handles
-
- static HSZ DdeCreateStringHandle( PSZ pStr, int iCodePage);
- static ULONG DdeQueryString(HSZ hsz,PSZ pStr,ULONG cchMax,int iCPage);
- static BOOL DdeFreeStringHandle( HSZ hsz );
- static BOOL DdeKeepStringHandle( HSZ hsz );
- static int DdeCmpStringHandles(HSZ hsz1, HSZ hsz2);
-
- // mit dieser Funktion kann geprueft werden, ob eine
- // Applikation schon eine DDEML-Instanz angelegt hat.
- // Die aktuelle Impl. unterstuetzt nur eine DDEML-Instanz
- // pro Applikation (wg. synchroner Transaktionen)
- static ImpDdeMgr* GetImpDdeMgrInstance( HWND hWnd );
-
- // gibt TRUE zurueck, wenn mind. ein lebender HCONV
- // von diesem DdeMgr erzeugt wurde
- BOOL OwnsConversationHandles();
-};
-
-// static
-inline ImpHCONV* ImpDdeMgr::GetConvTable( ImpDdeMgrData* pData )
-{
- ImpHCONV* pRet;
- if( pData )
- pRet = (ImpHCONV*)((ULONG)(pData) + pData->nOffsConvTable);
- else
- pRet = 0;
- return pRet;
-}
-
-// static
-inline Transaction* ImpDdeMgr::GetTransTable( ImpDdeMgrData* pData )
-{
- Transaction* pRet;
- if( pData )
- pRet = (Transaction*)((ULONG)(pData) + pData->nOffsTransTable);
- else
- pRet = 0;
- return pRet;
-}
-
-// static
-inline HWND* ImpDdeMgr::GetAppTable( ImpDdeMgrData* pData )
-{
- HWND* pRet;
- if( pData )
- pRet = (HWND*)((ULONG)(pData) + pData->nOffsAppTable);
- else
- pRet = 0;
- return pRet;
-}
-
-
-
-
-#endif
-
diff --git a/svl/source/svdde/ddemlos2.h b/svl/source/svdde/ddemlos2.h
deleted file mode 100644
index bdd31e470bcd..000000000000
--- a/svl/source/svdde/ddemlos2.h
+++ /dev/null
@@ -1,374 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#ifndef _DDEML_H
-#define _DDEML_H
-
-#define INCL_OS2
-#define INCL_WIN
-
-#include <tools/svpm.h>
-#include <tools/solar.h>
-#include <tools/debug.hxx>
-#include <tools/stream.hxx>
-
-typedef LHANDLE HSTR;
-
-#ifndef CALLBACK
-#define CALLBACK
-#endif
-
-
-typedef ULONG HCONVLIST;
-typedef ULONG HCONV;
-typedef ATOM HSZ;
-typedef DDESTRUCT* HDDEDATA;
-
-struct CONVINFO
-{
- USHORT nSize; // sizeof(CONVINFO)
- ULONG nUser; // Userhandle
- HCONV hConvPartner; //
- HSZ hszPartner; // Name der Partnerapp
- HSZ hszServiceReq; // Name des angeforderten Services
- HSZ hszTopic; // -- " -- Topics
- HSZ hszItem; // -- " -- Items
- USHORT nFormat; // Datenformat der akt. Transaktion
- USHORT nType; // Typ der akt. Transaktion (XTYP_*)
- USHORT nStatus; // ST_* der Konversation
- USHORT nConvst; // XST_* der akt. Transaktion
- USHORT nLastError; // letzter Fehler der Transaktion
- HCONVLIST hConvList; // ConvListId , wenn in ConvList
- CONVCONTEXT aConvCtxt; // conversation context
-};
-
-/* the following structure is for use with XTYP_WILDCONNECT processing. */
-
-struct HSZPAIR
-{
- HSZ hszSvc;
- HSZ hszTopic;
-};
-typedef HSZPAIR *PHSZPAIR;
-
-/***** conversation states (usState) *****/
-
-#define XST_NULL 0 /* quiescent states */
-#define XST_INCOMPLETE 1
-#define XST_CONNECTED 2
-#define XST_INIT1 3 /* mid-initiation states */
-#define XST_INIT2 4
-#define XST_REQSENT 5 /* active conversation states */
-#define XST_DATARCVD 6
-#define XST_POKESENT 7
-#define XST_POKEACKRCVD 8
-#define XST_EXECSENT 9
-#define XST_EXECACKRCVD 10
-#define XST_ADVSENT 11
-#define XST_UNADVSENT 12
-#define XST_ADVACKRCVD 13
-#define XST_UNADVACKRCVD 14
-#define XST_ADVDATASENT 15
-#define XST_ADVDATAACKRCVD 16
-
-/* used in LOWORD(dwData1) of XTYP_ADVREQ callbacks... */
-#define CADV_LATEACK 0xFFFF
-
-/***** conversation status bits (fsStatus) *****/
-
-#define ST_CONNECTED 0x0001
-#define ST_ADVISE 0x0002
-#define ST_ISLOCAL 0x0004
-#define ST_BLOCKED 0x0008
-#define ST_CLIENT 0x0010
-#define ST_TERMINATED 0x0020
-#define ST_INLIST 0x0040
-#define ST_BLOCKNEXT 0x0080
-#define ST_ISSELF 0x0100
-
-
-/* DDE constants for wStatus field */
-
-//#define DDE_FACK 0x8000
-//#define DDE_FBUSY 0x4000
-//#define DDE_FDEFERUPD 0x4000
-//#define DDE_FACKREQ 0x8000
-//#define DDE_FRELEASE 0x2000
-//#define DDE_FREQUESTED 0x1000
-//#define DDE_FACKRESERVED 0x3ff0
-//#define DDE_FADVRESERVED 0x3fff
-//#define DDE_FDATRESERVED 0x4fff
-//#define DDE_FPOKRESERVED 0xdfff
-//#define DDE_FAPPSTATUS 0x00ff
-#define DDE_FNOTPROCESSED 0x0000
-
-/***** message filter hook types *****/
-
-#define MSGF_DDEMGR 0x8001
-
-/***** codepage constants ****/
-
-#define CP_WINANSI 1004 /* default codepage for windows & old DDE convs. */
-
-/***** transaction types *****/
-
-#define XTYPF_NOBLOCK 0x0002 /* CBR_BLOCK will not work */
-#define XTYPF_NODATA 0x0004 /* DDE_FDEFERUPD */
-#define XTYPF_ACKREQ 0x0008 /* DDE_FACKREQ */
-
-#define XCLASS_MASK 0xFC00
-#define XCLASS_BOOL 0x1000
-#define XCLASS_DATA 0x2000
-#define XCLASS_FLAGS 0x4000
-#define XCLASS_NOTIFICATION 0x8000
-
-#define XTYP_ERROR (0x0000 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK )
-#define XTYP_ADVDATA (0x0010 | XCLASS_FLAGS )
-#define XTYP_ADVREQ (0x0020 | XCLASS_DATA | XTYPF_NOBLOCK )
-#define XTYP_ADVSTART (0x0030 | XCLASS_BOOL )
-#define XTYP_ADVSTOP (0x0040 | XCLASS_NOTIFICATION)
-#define XTYP_EXECUTE (0x0050 | XCLASS_FLAGS )
-#define XTYP_CONNECT (0x0060 | XCLASS_BOOL | XTYPF_NOBLOCK)
-#define XTYP_CONNECT_CONFIRM (0x0070 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK)
-#define XTYP_XACT_COMPLETE (0x0080 | XCLASS_NOTIFICATION )
-#define XTYP_POKE (0x0090 | XCLASS_FLAGS )
-#define XTYP_REGISTER (0x00A0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK)
-#define XTYP_REQUEST (0x00B0 | XCLASS_DATA )
-#define XTYP_DISCONNECT (0x00C0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK)
-#define XTYP_UNREGISTER (0x00D0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK)
-#define XTYP_WILDCONNECT (0x00E0 | XCLASS_DATA | XTYPF_NOBLOCK)
-
-#define XTYP_MASK 0x00F0
-#define XTYP_SHIFT 4 /* shift to turn XTYP_ into an index */
-
-/***** Timeout constants *****/
-
-#define TIMEOUT_ASYNC -1L
-
-/***** Transaction ID constants *****/
-
-#define QID_SYNC -1L
-
-/****** public strings used in DDE ******/
-
-#define SZDDESYS_TOPIC "System"
-#define SZDDESYS_ITEM_TOPICS "Topics"
-#define SZDDESYS_ITEM_SYSITEMS "SysItems"
-#define SZDDESYS_ITEM_RTNMSG "ReturnMessage"
-#define SZDDESYS_ITEM_STATUS "Status"
-#define SZDDESYS_ITEM_FORMATS "Formats"
-#define SZDDESYS_ITEM_HELP "Help"
-#define SZDDE_ITEM_ITEMLIST "TopicItemList"
-
-
-/****** API entry points ******/
-
-typedef HDDEDATA CALLBACK FNCALLBACK(USHORT wType, USHORT wFmt, HCONV hConv,
- HSZ hsz1, HSZ hsz2, HDDEDATA hData, ULONG dwData1, ULONG dwData2);
-typedef FNCALLBACK* PFNCALLBACK;
-
-#define CBR_BLOCK 0xffffffffL
-
-/* DLL registration functions */
-
-USHORT DdeInitialize(ULONG* pidInst, PFNCALLBACK pfnCallback,
- ULONG afCmd, ULONG ulRes);
-
-/*
- * Callback filter flags for use with standard apps.
- */
-
-#define CBF_FAIL_SELFCONNECTIONS 0x00001000
-#define CBF_FAIL_CONNECTIONS 0x00002000
-#define CBF_FAIL_ADVISES 0x00004000
-#define CBF_FAIL_EXECUTES 0x00008000
-#define CBF_FAIL_POKES 0x00010000
-#define CBF_FAIL_REQUESTS 0x00020000
-#define CBF_FAIL_ALLSVRXACTIONS 0x0003f000
-
-#define CBF_SKIP_CONNECT_CONFIRMS 0x00040000
-#define CBF_SKIP_REGISTRATIONS 0x00080000
-#define CBF_SKIP_UNREGISTRATIONS 0x00100000
-#define CBF_SKIP_DISCONNECTS 0x00200000
-#define CBF_SKIP_ALLNOTIFICATIONS 0x003c0000
-
-/*
- * Application command flags
- */
-#define APPCMD_CLIENTONLY 0x00000010L
-#define APPCMD_FILTERINITS 0x00000020L
-#define APPCMD_MASK 0x00000FF0L
-
-/*
- * Application classification flags
- */
-#define APPCLASS_STANDARD 0x00000000L
-#define APPCLASS_MASK 0x0000000FL
-
-
-BOOL DdeUninitialize(ULONG idInst);
-
-/* conversation enumeration functions */
-
-HCONVLIST DdeConnectList(ULONG idInst, HSZ hszService, HSZ hszTopic,
- HCONVLIST hConvList, CONVCONTEXT* pCC);
-HCONV DdeQueryNextServer(HCONVLIST hConvList, HCONV hConvPrev);
-BOOL DdeDisconnectList(HCONVLIST hConvList);
-
-/* conversation control functions */
-
-HCONV DdeConnect(ULONG idInst, HSZ hszService, HSZ hszTopic,
- CONVCONTEXT* pCC);
-BOOL DdeDisconnect(HCONV hConv);
-HCONV DdeReconnect(HCONV hConv);
-
-USHORT DdeQueryConvInfo(HCONV hConv, ULONG idTransaction, CONVINFO* pConvInfo);
-BOOL DdeSetUserHandle(HCONV hConv, ULONG id, ULONG hUser);
-
-BOOL DdeAbandonTransaction(ULONG idInst, HCONV hConv, ULONG idTransaction);
-
-
-/* app server interface functions */
-
-BOOL DdePostAdvise(ULONG idInst, HSZ hszTopic, HSZ hszItem);
-BOOL DdeEnableCallback(ULONG idInst, HCONV hConv, USHORT wCmd);
-
-#define EC_ENABLEALL 0
-#define EC_ENABLEONE ST_BLOCKNEXT
-#define EC_DISABLE ST_BLOCKED
-#define EC_QUERYWAITING 2
-
-HDDEDATA DdeNameService(ULONG idInst, HSZ hsz1, HSZ hsz2, USHORT afCmd);
-
-#define DNS_REGISTER 0x0001
-#define DNS_UNREGISTER 0x0002
-#define DNS_FILTERON 0x0004
-#define DNS_FILTEROFF 0x0008
-
-/* app client interface functions */
-
-HDDEDATA DdeClientTransaction(void* pData, ULONG cbData,
- HCONV hConv, HSZ hszItem, USHORT wFmt, USHORT wType,
- ULONG dwTimeout, ULONG* pdwResult);
-
-/* data transfer functions */
-
-HDDEDATA DdeCreateDataHandle(ULONG idInst, void* pSrc, ULONG cb,
- ULONG cbOff, HSZ hszItem, USHORT wFmt, USHORT afCmd);
-// HDDEDATA DdeAddData(HDDEDATA hData, void* pSrc, ULONG cb, ULONG cbOff);
-ULONG DdeGetData(HDDEDATA hData, void* pDst, ULONG cbMax, ULONG cbOff);
-BYTE* DdeAccessData(HDDEDATA hData, ULONG* pcbDataSize);
-BOOL DdeUnaccessData(HDDEDATA hData);
-BOOL DdeFreeDataHandle(HDDEDATA hData);
-
-#define HDATA_APPOWNED 0x0001
-
-USHORT DdeGetLastError(ULONG idInst);
-
-#define DMLERR_NO_ERROR 0 /* must be 0 */
-
-#define DMLERR_FIRST 0x4000
-
-#define DMLERR_ADVACKTIMEOUT 0x4000
-#define DMLERR_BUSY 0x4001
-#define DMLERR_DATAACKTIMEOUT 0x4002
-#define DMLERR_DLL_NOT_INITIALIZED 0x4003
-#define DMLERR_DLL_USAGE 0x4004
-#define DMLERR_EXECACKTIMEOUT 0x4005
-#define DMLERR_INVALIDPARAMETER 0x4006
-#define DMLERR_LOW_MEMORY 0x4007
-#define DMLERR_MEMORY_ERROR 0x4008
-#define DMLERR_NOTPROCESSED 0x4009
-#define DMLERR_NO_CONV_ESTABLISHED 0x400a
-#define DMLERR_POKEACKTIMEOUT 0x400b
-#define DMLERR_POSTMSG_FAILED 0x400c
-#define DMLERR_REENTRANCY 0x400d
-#define DMLERR_SERVER_DIED 0x400e
-#define DMLERR_SYS_ERROR 0x400f
-#define DMLERR_UNADVACKTIMEOUT 0x4010
-#define DMLERR_UNFOUND_QUEUE_ID 0x4011
-
-#define DMLERR_LAST 0x4011
-
-HSZ DdeCreateStringHandle(ULONG idInst, PSZ pStr, int iCodePage);
-ULONG DdeQueryString(ULONG idInst, HSZ hsz, PSZ pStr, ULONG cchMax,
- int iCodePage);
-BOOL DdeFreeStringHandle(ULONG idInst, HSZ hsz);
-BOOL DdeKeepStringHandle(ULONG idInst, HSZ hsz);
-int DdeCmpStringHandles(HSZ hsz1, HSZ hsz2);
-
-
-
-/* von OS/2 nicht unterstuetzte Win3.1 Clipboard-Formate */
-
-#define CF_NOTSUPPORTED_BASE 0xff00
-
-#ifndef CF_DIB
-#define CF_DIB CF_NOTSUPPORTED_BASE+1
-#endif
-
-#ifndef CF_DIF
-#define CF_DIF CF_NOTSUPPORTED_BASE+2
-#endif
-
-#ifndef CF_DSPMETAFILEPICT
-#define CF_DSPMETAFILEPICT CF_NOTSUPPORTED_BASE+3
-#endif
-
-#ifndef CF_METAFILEPICT
-#define CF_METAFILEPICT CF_NOTSUPPORTED_BASE+4
-#endif
-
-#ifndef CF_OEMTEXT
-#define CF_OEMTEXT CF_NOTSUPPORTED_BASE+5
-#endif
-
-#ifndef CF_OWNERDISPLAY
-#define CF_OWNERDISPLAY CF_NOTSUPPORTED_BASE+6
-#endif
-
-#ifndef CF_PENDATA
-#define CF_PENDATA CF_NOTSUPPORTED_BASE+7
-#endif
-
-#ifndef CF_RIFF
-#define CF_RIFF CF_NOTSUPPORTED_BASE+8
-#endif
-
-#ifndef CF_SYLK
-#define CF_SYLK CF_NOTSUPPORTED_BASE+9
-#endif
-
-#ifndef CF_TIFF
-#define CF_TIFF CF_NOTSUPPORTED_BASE+10
-#endif
-
-#ifndef CF_WAVE
-#define CF_WAVE CF_NOTSUPPORTED_BASE+11
-#endif
-
-
-#endif /* _DDEML_HXX */
diff --git a/svl/source/svdde/ddestrg.cxx b/svl/source/svdde/ddestrg.cxx
index 4f0e2464a276..007c9f56c544 100644
--- a/svl/source/svdde/ddestrg.cxx
+++ b/svl/source/svdde/ddestrg.cxx
@@ -33,10 +33,6 @@
#include "ddeimp.hxx"
#include <svl/svdde.hxx>
-#if defined( WIN ) && defined( MSC )
-#pragma code_seg( "SVDDE_MISC_CODE" )
-#endif
-
// --- DdeString::DdeString() --------------------------------------
DdeString::DdeString( DWORD hDdeInst, const sal_Unicode* p ) :
diff --git a/svl/source/svdde/makefile.mk b/svl/source/svdde/makefile.mk
deleted file mode 100644
index d7f0a790486b..000000000000
--- a/svl/source/svdde/makefile.mk
+++ /dev/null
@@ -1,60 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-
-.IF "$(GUIBASE)"=="WIN"
-
-PRJ=..$/..
-
-PRJNAME=svl
-TARGET=svdde
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/svl.pmk
-
-# --- Files --------------------------------------------------------
-
-
-SLOFILES= $(SLO)$/ddecli.obj \
- $(SLO)$/ddesvr.obj \
- $(SLO)$/ddedata.obj \
- $(SLO)$/ddestrg.obj \
- $(SLO)$/ddewrap.obj \
- $(SLO)$/ddeinf.obj
-
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
-.ELSE
-dummy:
- @echo GUI == "$(GUI)" - nothing to do
-
-.ENDIF
-
diff --git a/svl/source/svsql/converter.cxx b/svl/source/svsql/converter.cxx
index ee36914289a3..3b162cecadee 100644
--- a/svl/source/svsql/converter.cxx
+++ b/svl/source/svsql/converter.cxx
@@ -27,7 +27,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svl.hxx"
-#include "converter.hxx"
+#include <svl/converter.hxx>
INT32 SvDbaseConverter::ConvertPrecisionToDbase(INT32 _nLen, INT32 _nScale)
{
diff --git a/svl/source/svsql/makefile.mk b/svl/source/svsql/makefile.mk
deleted file mode 100644
index e837d022fb1e..000000000000
--- a/svl/source/svsql/makefile.mk
+++ /dev/null
@@ -1,46 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..
-
-PRJNAME=svl
-TARGET=svsql
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/svl.pmk
-
-# --- Files --------------------------------------------------------
-
-SLOFILES = \
- $(SLO)$/converter.obj
-
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/svl/source/undo/makefile.mk b/svl/source/undo/makefile.mk
deleted file mode 100644
index 8a615d97a03b..000000000000
--- a/svl/source/undo/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=svl
-TARGET=undo
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/svl.pmk
-
-# --- Files --------------------------------------------------------
-
-SLOFILES = \
- $(SLO)$/undo.obj
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/svl/source/uno/makefile.mk b/svl/source/uno/makefile.mk
deleted file mode 100644
index 3414871305d5..000000000000
--- a/svl/source/uno/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=svl
-TARGET=unoiface
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/svl.pmk
-
-# --- Files --------------------------------------------------------
-
-SLOFILES= \
- $(SLO)$/registerservices.obj\
- $(SLO)$/pathservice.obj
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
diff --git a/svl/source/uno/registerservices.cxx b/svl/source/uno/registerservices.cxx
index ab01d308c2da..8edbccc2d435 100644
--- a/svl/source/uno/registerservices.cxx
+++ b/svl/source/uno/registerservices.cxx
@@ -60,37 +60,6 @@ SVL_DLLPUBLIC void SAL_CALL component_getImplementationEnvironment (
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
-SVL_DLLPUBLIC sal_Bool SAL_CALL component_writeInfo (
- void * /* _pServiceManager */, void * _pRegistryKey)
-{
- if (_pRegistryKey)
- {
- Reference< css::registry::XRegistryKey > xRegistryKey (
- reinterpret_cast< css::registry::XRegistryKey* >(_pRegistryKey));
- Reference< css::registry::XRegistryKey > xNewKey;
-
- xNewKey = xRegistryKey->createKey (
- OUString::createFromAscii(
- "/com.sun.star.uno.util.numbers.SvNumberFormatsSupplierServiceObject/UNO/SERVICES" ) );
- xNewKey->createKey (
- OUString::createFromAscii( "com.sun.star.util.NumberFormatsSupplier" ) );
-
- xNewKey = xRegistryKey->createKey (
- OUString::createFromAscii(
- "/com.sun.star.uno.util.numbers.SvNumberFormatterServiceObject/UNO/SERVICES" ) );
- xNewKey->createKey (
- OUString::createFromAscii( "com.sun.star.util.NumberFormatter" ) );
-
- xNewKey = xRegistryKey->createKey(
- OUString::createFromAscii( "/com.sun.star.comp.svl.PathService/UNO/SERVICES" ) );
- xNewKey->createKey (
- OUString::createFromAscii( "com.sun.star.config.SpecialConfigManager" ) );
-
- return sal_True;
- }
- return sal_False;
-}
-
SVL_DLLPUBLIC void* SAL_CALL component_getFactory (
const sal_Char * pImplementationName, void * _pServiceManager, void * /* _pRegistryKey*/)
{
diff --git a/svl/util/makefile.mk b/svl/util/makefile.mk
deleted file mode 100644
index 3cb87dcd33ad..000000000000
--- a/svl/util/makefile.mk
+++ /dev/null
@@ -1,122 +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=svl
-TARGET=svl
-RESTARGETSIMPLE=svs
-GEN_HID=TRUE
-# GEN_HID_OTHER=TRUE
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-# --- general section ----------------------------------------------------
-
-.IF "$(GUI)"!="UNX"
-LIB2TARGET= $(LB)$/isvl.lib
-LIB2FILES= $(LB)$/_isvl.lib
-.ENDIF
-
-LIB1TARGET= $(SLB)$/svl.lib
-LIB1FILES= \
- $(SLB)$/config.lib \
- $(SLB)$/svdde.lib \
- $(SLB)$/undo.lib \
- $(SLB)$/numbers.lib \
- $(SLB)$/numbers.uno.lib \
- $(SLB)$/filerec.lib \
- $(SLB)$/filepicker.lib \
- $(SLB)$/items.lib \
- $(SLB)$/misc.lib \
- $(SLB)$/notify.lib \
- $(SLB)$/unoiface.lib \
- $(SLB)$/svarray.lib \
- $(SLB)$/svsql.lib
-
-# generation of resourcen-lib ----------------------------------------
-
-RESLIB1NAME= $(RESTARGETSIMPLE)
-RESLIB1SRSFILES=\
- $(SRS)$/items.srs \
- $(SRS)$/misc.srs
-
-# build the shared library --------------------------------------------------
-
-SHL1TARGET= svl$(DLLPOSTFIX)
-SHL1IMPLIB= _isvl
-SHL1USE_EXPORTS=name
-#Do not link with VCL or any other library that links with VCL
-SHL1STDLIBS= \
- $(UNOTOOLSLIB) \
- $(TOOLSLIB) \
- $(I18NISOLANGLIB) \
- $(UCBHELPERLIB) \
- $(COMPHELPERLIB) \
- $(CPPUHELPERLIB) \
- $(CPPULIB) \
- $(VOSLIB) \
- $(SOTLIB) \
- $(SALLIB)
-
-.IF "$(GUI)"=="WNT"
-SHL1STDLIBS+= \
- $(UWINAPILIB) \
- $(ADVAPI32LIB) \
- $(GDI32LIB)
-.ENDIF # WNT
-
-SHL1LIBS= $(SLB)$/svl.lib
-
-SHL1DEF= $(MISC)$/$(SHL1TARGET).def
-
-DEF1NAME= $(SHL1TARGET)
-DEF1DEPN= $(SLB)$/svl.lib
-DEFLIB1NAME=svl
-DEF1DES =SvTools lite
-
-# --- Targets ------------------------------------------------------
-
-.IF "$(GUI)"=="UNX"
-SVTTARGETS= $(LB)$/lib$(SHL1TARGET)$(DLLPOST)
-.ELSE
-SVTTARGETS= $(LB)$/isvl.lib
-.ENDIF
-
-# just a quick fix - has to be cleaned up some day...
-.IF "$(L10N-framework)"==""
-ALL: $(SLB)$/svl.lib \
- $(MISC)$/$(SHL1TARGET).def \
- $(SVTTARGETS) \
- ALLTAR
-.ENDIF # "$(L10N-framework)"==""
-
-.INCLUDE : target.mk
-
diff --git a/svl/util/svl.component b/svl/util/svl.component
new file mode 100644
index 000000000000..4af1a31f5782
--- /dev/null
+++ b/svl/util/svl.component
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.svl.PathService">
+ <service name="com.sun.star.config.SpecialConfigManager"/>
+ </implementation>
+ <implementation name="com.sun.star.uno.util.numbers.SvNumberFormatsSupplierServiceObject">
+ <service name="com.sun.star.util.NumberFormatsSupplier"/>
+ </implementation>
+ <implementation name="com.sun.star.uno.util.numbers.SvNumberFormatterServiceObject">
+ <service name="com.sun.star.util.NumberFormatter"/>
+ </implementation>
+</component>