summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
Diffstat (limited to 'extensions')
-rw-r--r--extensions/inc/appsettings.hxx79
-rw-r--r--extensions/inc/extensio.hrc110
-rw-r--r--extensions/inc/ucbhelper/ext_content.hxx401
-rw-r--r--extensions/prj/d.lst7
-rw-r--r--extensions/source/bibliography/bib.hrc114
-rw-r--r--extensions/source/bibliography/bib.src187
-rw-r--r--extensions/source/bibliography/bibbeam.cxx309
-rw-r--r--extensions/source/bibliography/bibbeam.hxx169
-rw-r--r--extensions/source/bibliography/bibcont.cxx372
-rw-r--r--extensions/source/bibliography/bibcont.hxx158
-rw-r--r--extensions/source/bibliography/bibload.cxx881
-rw-r--r--extensions/source/bibliography/bibmod.cxx409
-rw-r--r--extensions/source/bibliography/bibmod.hxx113
-rw-r--r--extensions/source/bibliography/bibprop.hrc211
-rw-r--r--extensions/source/bibliography/bibresid.hxx80
-rw-r--r--extensions/source/bibliography/bibview.cxx193
-rw-r--r--extensions/source/bibliography/bibview.hxx112
-rw-r--r--extensions/source/bibliography/datman.cxx2127
-rw-r--r--extensions/source/bibliography/datman.hrc137
-rw-r--r--extensions/source/bibliography/datman.hxx253
-rw-r--r--extensions/source/bibliography/datman.src1276
-rw-r--r--extensions/source/bibliography/framectr.cxx629
-rw-r--r--extensions/source/bibliography/framectr.hxx198
-rw-r--r--extensions/source/bibliography/general.cxx803
-rw-r--r--extensions/source/bibliography/general.hxx225
-rw-r--r--extensions/source/bibliography/hidother.src95
-rw-r--r--extensions/source/bibliography/makefile.mk225
-rw-r--r--extensions/source/bibliography/menu.src594
-rw-r--r--extensions/source/bibliography/sections.hrc159
-rw-r--r--extensions/source/bibliography/sections.src1538
-rw-r--r--extensions/source/bibliography/toolbar.cxx566
-rw-r--r--extensions/source/bibliography/toolbar.hrc77
-rw-r--r--extensions/source/bibliography/toolbar.hxx234
-rw-r--r--extensions/source/bibliography/toolbar.src421
-rw-r--r--extensions/source/ole/comifaces.hxx90
-rw-r--r--extensions/source/ole/jscriptclasses.cxx350
-rw-r--r--extensions/source/ole/jscriptclasses.hxx177
-rw-r--r--extensions/source/ole/makefile.mk188
-rw-r--r--extensions/source/ole/ole2uno.hxx408
-rw-r--r--extensions/source/ole/oledll.cxx85
-rw-r--r--extensions/source/ole/oleobjw.cxx1581
-rw-r--r--extensions/source/ole/oleobjw.hxx241
-rw-r--r--extensions/source/ole/olethread.cxx109
-rw-r--r--extensions/source/ole/servprov.cxx898
-rw-r--r--extensions/source/ole/servprov.hxx308
-rw-r--r--extensions/source/ole/servreg.cxx154
-rw-r--r--extensions/source/ole/unoconversionutilities.hxx1574
-rw-r--r--extensions/source/ole/unoobjw.cxx2414
-rw-r--r--extensions/source/ole/unoobjw.hxx505
-rw-r--r--extensions/source/plugin/base/context.cxx364
-rw-r--r--extensions/source/plugin/base/evtlstnr.cxx95
-rw-r--r--extensions/source/plugin/base/makefile.mk159
-rw-r--r--extensions/source/plugin/base/manager.cxx316
-rw-r--r--extensions/source/plugin/base/multiplx.cxx391
-rw-r--r--extensions/source/plugin/base/nfuncs.cxx576
-rw-r--r--extensions/source/plugin/base/plcom.cxx90
-rw-r--r--extensions/source/plugin/base/plctrl.cxx373
-rw-r--r--extensions/source/plugin/base/plmodel.cxx243
-rw-r--r--extensions/source/plugin/base/service.cxx206
-rw-r--r--extensions/source/plugin/base/xplugin.cxx888
-rw-r--r--extensions/source/plugin/inc/plugin/impl.hxx478
-rw-r--r--extensions/source/plugin/inc/plugin/model.hxx187
-rw-r--r--extensions/source/plugin/inc/plugin/multiplx.hxx249
-rw-r--r--extensions/source/plugin/inc/plugin/plcom.hxx114
-rw-r--r--extensions/source/plugin/inc/plugin/plctrl.hxx276
-rw-r--r--extensions/source/plugin/inc/plugin/unx/sysplug.hxx111
-rw-r--r--extensions/source/plugin/inc/plugin/win/sysplug.hxx139
-rw-r--r--extensions/source/plugin/unx/makefile.mk84
-rw-r--r--extensions/source/plugin/unx/sysplug.cxx269
-rw-r--r--extensions/source/plugin/unx/unxmgr.cxx197
-rw-r--r--extensions/source/plugin/util/makefile.mk125
-rw-r--r--extensions/source/plugin/util/makefile.pmk69
-rw-r--r--extensions/source/plugin/win/makefile.mk96
-rw-r--r--extensions/source/plugin/win/sysplug.cxx300
-rw-r--r--extensions/source/plugin/win/winmgr.cxx392
-rw-r--r--extensions/source/resource/exports.dxp3
-rw-r--r--extensions/source/resource/makefile.mk133
-rw-r--r--extensions/source/resource/resource.cxx583
-rw-r--r--extensions/source/scanner/exports.dxp3
-rw-r--r--extensions/source/scanner/grid.cxx642
-rw-r--r--extensions/source/scanner/grid.hrc76
-rw-r--r--extensions/source/scanner/grid.hxx163
-rw-r--r--extensions/source/scanner/grid.src211
-rw-r--r--extensions/source/scanner/makefile.mk147
-rw-r--r--extensions/source/scanner/sane.cxx979
-rw-r--r--extensions/source/scanner/sane.hxx232
-rw-r--r--extensions/source/scanner/sanedlg.cxx1364
-rw-r--r--extensions/source/scanner/sanedlg.hrc116
-rw-r--r--extensions/source/scanner/sanedlg.hxx199
-rw-r--r--extensions/source/scanner/sanedlg.src700
-rw-r--r--extensions/source/scanner/scanner.cxx162
-rw-r--r--extensions/source/scanner/scanner.hxx172
-rw-r--r--extensions/source/scanner/scanunx.cxx305
-rw-r--r--extensions/source/scanner/scanwin.cxx852
-rw-r--r--extensions/source/scanner/scnserv.cxx138
-rw-r--r--extensions/source/scanner/twain.cxx563
-rw-r--r--extensions/source/scanner/twain.hxx132
-rw-r--r--extensions/source/svg/makefile.mk134
-rw-r--r--extensions/source/svg/svgaction.cxx1412
-rw-r--r--extensions/source/svg/svgaction.hxx196
-rw-r--r--extensions/source/svg/svgcom.hxx144
-rw-r--r--extensions/source/svg/svgprinter.cxx364
-rw-r--r--extensions/source/svg/svgprinter.hxx101
-rw-r--r--extensions/source/svg/svguno.cxx167
-rw-r--r--extensions/source/svg/svgwriter.cxx214
-rw-r--r--extensions/source/svg/svgwriter.hxx94
-rw-r--r--extensions/source/xmlextract/makefile.mk125
-rw-r--r--extensions/source/xmlextract/xmxcom.hxx111
-rw-r--r--extensions/source/xmlextract/xmxtrct.cxx221
-rw-r--r--extensions/source/xmlextract/xmxtrct.hxx88
-rw-r--r--extensions/source/xmlextract/xmxuno.cxx131
-rw-r--r--extensions/stardiv/fontest/fontest.idl145
-rw-r--r--extensions/stardiv/fontest/makefile.mk83
-rw-r--r--extensions/stardiv/oinstchk/makefile.mk82
-rw-r--r--extensions/stardiv/oinstchk/oinstchk.idl142
-rw-r--r--extensions/stardiv/pgp/makefile.mk88
-rw-r--r--extensions/test/ole/AxTestComponents/AxTestComponents.cpp131
-rw-r--r--extensions/test/ole/AxTestComponents/AxTestComponents.def9
-rw-r--r--extensions/test/ole/AxTestComponents/AxTestComponents.dsp323
-rw-r--r--extensions/test/ole/AxTestComponents/AxTestComponents.idl158
-rw-r--r--extensions/test/ole/AxTestComponents/AxTestComponents.rc198
-rw-r--r--extensions/test/ole/AxTestComponents/Basic.cpp523
-rw-r--r--extensions/test/ole/AxTestComponents/Basic.h160
-rw-r--r--extensions/test/ole/AxTestComponents/Basic.rgs26
-rw-r--r--extensions/test/ole/AxTestComponents/StdAfx.cpp69
-rw-r--r--extensions/test/ole/AxTestComponents/StdAfx.h87
-rw-r--r--extensions/test/ole/AxTestComponents/resource.h77
-rw-r--r--extensions/test/ole/JScriptNewStyle.htm1039
-rw-r--r--extensions/test/ole/OleClient/clientTest.cxx536
-rw-r--r--extensions/test/ole/OleClient/makefile.mk128
-rw-r--r--extensions/test/ole/OleClient/readme.txt7
-rw-r--r--extensions/test/ole/OleConverterVar1/convTest.cxx678
-rw-r--r--extensions/test/ole/OleConverterVar1/makefile.mk136
-rw-r--r--extensions/test/ole/OleConverterVar1/readme.txt2
-rw-r--r--extensions/test/ole/OleConverterVar1/smartarray.h267
-rw-r--r--extensions/test/ole/OleTest.htm943
-rw-r--r--extensions/test/ole/callUnoToJava.htm516
-rw-r--r--extensions/test/ole/cpnt/cpnt.cxx1545
-rw-r--r--extensions/test/ole/cpnt/exports.dxp3
-rw-r--r--extensions/test/ole/cpnt/makefile.mk146
-rw-r--r--extensions/test/ole/cpnt/readme.txt5
-rw-r--r--extensions/test/ole/cpptest/StdAfx.cpp68
-rw-r--r--extensions/test/ole/cpptest/StdAfx.h85
-rw-r--r--extensions/test/ole/cpptest/cpptest.cpp113
-rw-r--r--extensions/test/ole/cpptest/cpptest.dsp113
-rw-r--r--extensions/test/ole/cpptest/cpptest.dsw29
-rw-r--r--extensions/test/ole/idl/oletest.idl309
-rw-r--r--extensions/test/ole/unoTocomCalls/Test/StdAfx.cpp68
-rw-r--r--extensions/test/ole/unoTocomCalls/Test/StdAfx.h89
-rw-r--r--extensions/test/ole/unoTocomCalls/Test/Test.cpp277
-rw-r--r--extensions/test/ole/unoTocomCalls/Test/Test.dsp113
-rw-r--r--extensions/test/ole/unoTocomCalls/XCallback_Impl/Basic.rgs26
-rw-r--r--extensions/test/ole/unoTocomCalls/XCallback_Impl/BasicTest.rgs26
-rw-r--r--extensions/test/ole/unoTocomCalls/XCallback_Impl/Callback.cpp517
-rw-r--r--extensions/test/ole/unoTocomCalls/XCallback_Impl/Callback.h167
-rw-r--r--extensions/test/ole/unoTocomCalls/XCallback_Impl/Callback.rgs26
-rw-r--r--extensions/test/ole/unoTocomCalls/XCallback_Impl/Simple.cpp113
-rw-r--r--extensions/test/ole/unoTocomCalls/XCallback_Impl/Simple.h98
-rw-r--r--extensions/test/ole/unoTocomCalls/XCallback_Impl/Simple.rgs26
-rw-r--r--extensions/test/ole/unoTocomCalls/XCallback_Impl/StdAfx.cpp72
-rw-r--r--extensions/test/ole/unoTocomCalls/XCallback_Impl/StdAfx.h89
-rw-r--r--extensions/test/ole/unoTocomCalls/XCallback_Impl/XCallback_Impl.cpp134
-rw-r--r--extensions/test/ole/unoTocomCalls/XCallback_Impl/XCallback_Impl.dsp335
-rw-r--r--extensions/test/ole/unoTocomCalls/XCallback_Impl/XCallback_Impl.idl181
-rw-r--r--extensions/test/ole/unoTocomCalls/XCallback_Impl/XCallback_Impl.rc197
-rw-r--r--extensions/test/ole/unoTocomCalls/XCallback_Impl/resource.h79
-rw-r--r--extensions/test/ole/unoTocomCalls/readme.txt6
-rw-r--r--extensions/test/pgp/TestPGP.java180
-rw-r--r--extensions/test/pgp/makefile.mk161
-rw-r--r--extensions/test/pgp/readme.txt34
-rw-r--r--extensions/test/sax/exports.dxp2
-rw-r--r--extensions/test/sax/factory.hxx65
-rw-r--r--extensions/test/sax/makefile.mk102
-rw-r--r--extensions/test/sax/testsax.cxx951
-rw-r--r--extensions/test/sax/testwriter.cxx811
-rw-r--r--extensions/test/stm/datatest.cxx1108
-rw-r--r--extensions/test/stm/exports.dxp2
-rw-r--r--extensions/test/stm/makefile.mk99
-rw-r--r--extensions/test/stm/marktest.cxx718
-rw-r--r--extensions/test/stm/pipetest.cxx483
-rw-r--r--extensions/test/stm/testfactreg.cxx203
-rw-r--r--extensions/test/stm/testfactreg.hxx144
-rw-r--r--extensions/util/makefile.pmk85
-rw-r--r--extensions/util/target.pmk70
-rw-r--r--extensions/workben/makefile.mk247
-rw-r--r--extensions/workben/pythonautotest.cxx657
-rw-r--r--extensions/workben/pythontest.cxx591
-rw-r--r--extensions/workben/testcomponent.cxx261
-rw-r--r--extensions/workben/testframecontrol.cxx355
-rw-r--r--extensions/workben/testpgp.cxx918
-rw-r--r--extensions/workben/testresource.cxx125
-rw-r--r--extensions/workben/testresource.src64
192 files changed, 60752 insertions, 0 deletions
diff --git a/extensions/inc/appsettings.hxx b/extensions/inc/appsettings.hxx
new file mode 100644
index 000000000000..66c421327f3d
--- /dev/null
+++ b/extensions/inc/appsettings.hxx
@@ -0,0 +1,79 @@
+/*************************************************************************
+ *
+ * $RCSfile: appsettings.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:16:39 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _APPSETTINGS_HXX
+#define _APPSETTINGS_HXX
+
+#ifndef __STARDIV_UNO_UTIL_CONTAINR_HXX__
+#include <stardiv/uno/util/containr.hxx>
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+XNameContainer* getApplicationSettings();
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
diff --git a/extensions/inc/extensio.hrc b/extensions/inc/extensio.hrc
new file mode 100644
index 000000000000..7a25a4893cee
--- /dev/null
+++ b/extensions/inc/extensio.hrc
@@ -0,0 +1,110 @@
+/*************************************************************************
+ *
+ * $RCSfile: extensio.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:16:39 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef __EXTENSIONS_INC_EXTENSIO_HRC__
+#define __EXTENSIONS_INC_EXTENSIO_HRC__
+
+#include <svtools/solar.hrc>
+
+#define HID_PROTOCOLS HID_EXTENSIONS_START
+
+#define HID_BIB_CHANGESOURCE (HID_EXTENSIONS_START + 1)
+#define HID_BIB_MAPPINGDLG (HID_EXTENSIONS_START + 2)
+#define HID_BIB_TBX_TABLE (HID_EXTENSIONS_START + 3)
+#define HID_BIB_TBX_SEARCH (HID_EXTENSIONS_START + 4)
+#define HID_BIB_TBX_AUTOFILTER (HID_EXTENSIONS_START + 5)
+
+#define HID_BIB_IDENTIFIER_POS (HID_EXTENSIONS_START + 6)
+#define HID_BIB_AUTHORITYTYPE_POS (HID_EXTENSIONS_START + 7)
+#define HID_BIB_AUTHOR_POS (HID_EXTENSIONS_START + 8)
+#define HID_BIB_TITLE_POS (HID_EXTENSIONS_START + 9)
+#define HID_BIB_YEAR_POS (HID_EXTENSIONS_START + 10)
+#define HID_BIB_ISBN_POS (HID_EXTENSIONS_START + 11)
+#define HID_BIB_BOOKTITLE_POS (HID_EXTENSIONS_START + 12)
+#define HID_BIB_CHAPTER_POS (HID_EXTENSIONS_START + 13)
+#define HID_BIB_EDITION_POS (HID_EXTENSIONS_START + 14)
+#define HID_BIB_EDITOR_POS (HID_EXTENSIONS_START + 15)
+#define HID_BIB_HOWPUBLISHED_POS (HID_EXTENSIONS_START + 16)
+#define HID_BIB_INSTITUTION_POS (HID_EXTENSIONS_START + 17)
+#define HID_BIB_JOURNAL_POS (HID_EXTENSIONS_START + 18)
+#define HID_BIB_MONTH_POS (HID_EXTENSIONS_START + 19)
+#define HID_BIB_NOTE_POS (HID_EXTENSIONS_START + 20)
+#define HID_BIB_ANNOTE_POS (HID_EXTENSIONS_START + 21)
+#define HID_BIB_NUMBER_POS (HID_EXTENSIONS_START + 22)
+#define HID_BIB_ORGANIZATIONS_POS (HID_EXTENSIONS_START + 23)
+#define HID_BIB_PAGES_POS (HID_EXTENSIONS_START + 24)
+#define HID_BIB_PUBLISHER_POS (HID_EXTENSIONS_START + 25)
+#define HID_BIB_ADDRESS_POS (HID_EXTENSIONS_START + 26)
+#define HID_BIB_SCHOOL_POS (HID_EXTENSIONS_START + 27)
+#define HID_BIB_SERIES_POS (HID_EXTENSIONS_START + 28)
+#define HID_BIB_REPORTTYPE_POS (HID_EXTENSIONS_START + 29)
+#define HID_BIB_VOLUME_POS (HID_EXTENSIONS_START + 30)
+#define HID_BIB_URL_POS (HID_EXTENSIONS_START + 31)
+#define HID_BIB_CUSTOM1_POS (HID_EXTENSIONS_START + 32)
+#define HID_BIB_CUSTOM2_POS (HID_EXTENSIONS_START + 33)
+#define HID_BIB_CUSTOM3_POS (HID_EXTENSIONS_START + 34)
+#define HID_BIB_CUSTOM4_POS (HID_EXTENSIONS_START + 35)
+#define HID_BIB_CUSTOM5_POS (HID_EXTENSIONS_START + 36)
+
+#define HID_BIB_DB_TBX (HID_EXTENSIONS_START + 37)
+#define HID_BIB_DB_GRIDCTRL (HID_EXTENSIONS_START + 38)
+
+
+#endif
diff --git a/extensions/inc/ucbhelper/ext_content.hxx b/extensions/inc/ucbhelper/ext_content.hxx
new file mode 100644
index 000000000000..ccd20d621862
--- /dev/null
+++ b/extensions/inc/ucbhelper/ext_content.hxx
@@ -0,0 +1,401 @@
+/*************************************************************************
+ *
+ * $RCSfile: ext_content.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:16:39 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+
+#ifndef _UCBHELPER_CONTENT_HXX_
+#define _UCBHELPER_CONTENT_HXX_
+
+#include <rtl/string.hxx>
+#include <rtl/ustring>
+#include <osl/mutex.hxx>
+#include <osl/thread.h>
+
+#include <cppuhelper/weak.hxx>
+
+#ifndef _COM_SUN_STAR_UCB_XCOMMANDTASKPROCESSOR_HPP_
+#include <com/sun/star/ucb/XCommandTaskProcessor.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UCB_XCOMMANDINFO_HPP_
+#include <com/sun/star/ucb/XCommandInfo.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UCB_XCONTENT_HPP_
+#include <com/sun/star/ucb/XContent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UCB_XPROPERTYTASKPROCESSOR_HPP_
+#include <com/sun/star/ucb/XPropertyTaskProcessor.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UCB_XCONTENTIDENTIFIER_HPP_
+#include <com/sun/star/ucb/XContentIdentifier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTIESCHANGELISTENER_HPP_
+#include <com/sun/star/beans/XPropertiesChangeListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XCOMPONENT_HPP_
+#include <com/sun/star/lang/XComponent.hpp>
+#endif
+
+#include <list>
+#include <hash_map>
+
+#if defined(TF_TYPE) || (SUPD >= 564)
+using namespace cppu;
+#endif
+using namespace com::sun::star::ucb;
+using namespace com::sun::star::uno;
+using namespace com::sun::star::beans;
+using namespace com::sun::star::lang;
+using namespace std;
+using namespace rtl;
+using namespace osl;
+
+
+
+template <class Type> class safe_list : public osl::Mutex, public std::list< Type > {};
+
+class OSimpleContentIdentifier : public OWeakObject,
+ public XContentIdentifier
+{
+private:
+ OUString Identifier;
+ OUString ProviderScheme;
+
+public:
+ OSimpleContentIdentifier( const OUString& rIdentifier, const OUString& rProviderScheme );
+
+ // XInterface
+#if defined(TF_TYPE) || (SUPD >= 564)
+ virtual Any SAL_CALL queryInterface( const Type &type ) throw( RuntimeException );
+#else
+ virtual sal_Bool SAL_CALL queryInterface( const Uik& type, Any& ifc ) throw( RuntimeException );
+#endif
+ virtual void SAL_CALL acquire() throw(RuntimeException);
+ virtual void SAL_CALL release() throw(RuntimeException);
+
+ // XContentIdentifier
+ virtual OUString SAL_CALL getContentIdentifier() throw(RuntimeException);
+ virtual OUString SAL_CALL getContentProviderScheme() throw(RuntimeException);
+};
+
+
+//---------------------------------------------------------------------------
+//
+// FileSystemContent
+//
+//---------------------------------------------------------------------------
+
+class OContent :
+public OWeakObject,
+public XContent,
+public XCommandTaskProcessor,
+public XPropertyTaskProcessor,
+public XCommandInfo,
+public XPropertySetInfo,
+public XComponent
+{
+public:
+ struct PropertyChangeEventInfo
+ {
+ OUString Name;
+ long Handle;
+
+ PropertyChangeEventInfo() : Handle( -1 ) {}
+
+ inline int operator ==( const PropertyChangeEventInfo& crInfo ) const
+ { return Handle == crInfo.Handle && Handle > 0 || Name == crInfo.Name; }
+ #ifdef __SUNPRO_CC
+ inline int operator <( const PropertyChangeEventInfo& crInfo ) const
+ { return Handle != crInfo.Handle ? Handle < crInfo.Handle : Name < crInfo.Name; }
+ #endif
+ };
+
+ struct PropertyChangeListenerInfo
+ {
+ Reference< XPropertiesChangeListener > xListener;
+ list< PropertyChangeEventInfo > aEventInfos;
+
+ inline int operator ==( const PropertyChangeListenerInfo& crInfo ) const
+ { return xListener == crInfo.xListener; }
+ #ifdef __SUNPRO_CC
+ inline int operator <( const PropertyChangeListenerInfo& crInfo ) const
+ { return xListener < crInfo.xListener; }
+ #endif
+ };
+
+protected:
+ Sequence< PropertyChangeEvent > matchListenerEvents( const Sequence< PropertyChangeEvent >& crEvents, const PropertyChangeListenerInfo & crInfo );
+
+ safe_list< Reference< XContentEventListener > > m_aContentListeners;
+ safe_list< Reference< XEventListener > > m_aComponentListeners;
+ safe_list< PropertyChangeListenerInfo > m_aPropertyChangeListeners;
+public:
+ virtual ~OContent() {}
+
+ virtual void broadcastContentEvent( const ContentEvent & crEvent );
+ virtual void broadcastPropertiesChangeEvents( const Sequence< PropertyChangeEvent >& crEvents );
+
+ // To be implemented by inheritents
+ virtual Any doCommand( const Command & crCommand ) = 0;
+
+ // XInterface
+#if defined(TF_TYPE) || (SUPD >= 564)
+ virtual Any SAL_CALL queryInterface( const Type &type ) throw( RuntimeException );
+#else
+ virtual sal_Bool SAL_CALL queryInterface( const Uik& type, Any& ifc ) throw( RuntimeException );
+#endif
+
+ virtual void SAL_CALL acquire() throw(RuntimeException);
+ virtual void SAL_CALL release() throw(RuntimeException);
+
+ // XContent
+ virtual void SAL_CALL addContentEventListener( const Reference< XContentEventListener >& rListener ) throw();
+ virtual void SAL_CALL removeContentEventListener( const Reference< XContentEventListener >& rListener ) throw();
+
+ // XComponent
+ virtual void SAL_CALL dispose() throw();
+ virtual void SAL_CALL addEventListener( const Reference< XEventListener >& xListener ) throw();
+ virtual void SAL_CALL removeEventListener( const Reference< XEventListener >& xListener ) throw();
+
+ // XCommmandTaskProcessor
+ virtual Reference< XCommandInfo > SAL_CALL getCommandsInfo() throw();
+
+ // XCommandInfo
+ virtual CommandInfo SAL_CALL getCommandInfoByName( const OUString& rName ) throw( UnsupportedCommandException );
+ virtual CommandInfo SAL_CALL getCommandInfoByHandle( long nHandle ) throw( UnsupportedCommandException );
+ virtual sal_Bool SAL_CALL hasCommandByName( const OUString& rName ) throw();
+ virtual sal_Bool SAL_CALL hasCommandByHandle( long nHandle ) throw();
+
+ // XPropertyTaskProcessor
+ virtual Reference< XPropertySetInfo > SAL_CALL getPropertySetInfo() throw();
+
+ // XPropertySetInfo
+ virtual Property SAL_CALL getPropertyByName( const OUString& Name ) throw( UnknownPropertyException );
+ virtual sal_Bool SAL_CALL hasPropertyByName( const OUString& Name ) throw();
+ virtual void SAL_CALL addPropertiesChangeListener( const Sequence< OUString >& Names, const Reference< XPropertiesChangeListener >& xListener ) throw();
+ virtual void SAL_CALL removePropertiesChangeListener( const Sequence< OUString >& Names, const Reference< XPropertiesChangeListener >& xListener ) throw();
+};
+
+//---------------------------------------------------------------------------
+//
+// FolderContent
+//
+//---------------------------------------------------------------------------
+
+// supported Commands
+static const sal_Int32 OPEN = 0;
+static const sal_Int32 CLOSE = 1;
+
+class OFolderContent : public OContent
+{
+protected:
+ // Already provided children
+ safe_list< XContent > m_aChildList;
+
+ // OContent
+ virtual Any doCommand( const Command & crCommand );
+
+ // new methods, can be overloaded
+ virtual Any doOpenCommand();
+ virtual Any doCloseCommand();
+
+ // To be implemented by inheritants
+ virtual Sequence< XContent > getAllChildren() = 0;
+
+public:
+
+ // XCommmandTaskProcessor
+ virtual Reference< XCommandTask > SAL_CALL createCommandTask(const Command& rCommand, const Reference< XContentTaskEnvironment >& rEnvironment ) throw();
+
+ // XCommandInfo
+ virtual Sequence< CommandInfo > SAL_CALL getCommands() throw();
+};
+
+//---------------------------------------------------------------------------
+//
+// OContentTask
+//
+//---------------------------------------------------------------------------
+
+class OContentTask :
+public OWeakObject,
+public XContentTask
+{
+ Guard< OContent > m_aContentGuard;
+protected:
+ OContent *m_pContent;
+ Reference< XContentTaskEnvironment > m_xEnvironment;
+ ContentTaskStatus m_eStatus;
+ oslThread m_aThread;
+
+ static void executeWorker( void * );
+ virtual ContentTaskStatus setStatus( ContentTaskStatus eStatus );
+
+ // To be implemented by inheritants
+ virtual void doExecute() = 0;
+public:
+ OContentTask( const Reference< XContentTaskEnvironment >& xEnv, OContent *pContent );
+ virtual ~OContentTask();
+
+ // XInterface
+#if defined(TF_TYPE) || (SUPD >= 564)
+ virtual Any SAL_CALL queryInterface( const Type &type ) throw( RuntimeException );
+#else
+ virtual sal_Bool SAL_CALL queryInterface( const Uik& type, Any& ifc ) throw( RuntimeException );
+#endif
+
+ virtual void SAL_CALL acquire() throw(RuntimeException);
+ virtual void SAL_CALL release() throw(RuntimeException);
+
+ // XContentTask
+ virtual void SAL_CALL start() throw();
+ virtual void SAL_CALL execute() throw( Exception );
+ virtual void SAL_CALL abort() throw();
+ virtual ContentTaskStatus SAL_CALL getStatus() throw();
+ virtual Reference< XContentTaskEnvironment > SAL_CALL getEnvironment() throw();
+};
+
+//---------------------------------------------------------------------------
+//
+// OCommandTask
+//
+//---------------------------------------------------------------------------
+
+class OCommandTask :
+public OContentTask,
+public XCommandTask
+{
+protected:
+ Command m_aCommand;
+ Any m_aResult;
+
+public:
+ OCommandTask( const Reference< XContentTaskEnvironment >& xEnv, OContent *pContent, const Command& rCommand );
+ virtual ~OCommandTask();
+
+ virtual void doExecute();
+
+ // XInterface
+#if defined(TF_TYPE) || (SUPD >= 564)
+ virtual Any SAL_CALL queryInterface( const Type &type ) throw( RuntimeException );
+#else
+ virtual sal_Bool SAL_CALL queryInterface( const Uik& type, Any& ifc ) throw( RuntimeException );
+#endif
+ virtual void SAL_CALL acquire() throw(RuntimeException);
+ virtual void SAL_CALL release() throw(RuntimeException);
+
+ // XContentTask
+ virtual void SAL_CALL start() throw();
+ virtual void SAL_CALL execute() throw( Exception );
+ virtual void SAL_CALL abort() throw();
+ virtual ContentTaskStatus SAL_CALL getStatus() throw();
+ virtual Reference< XContentTaskEnvironment > SAL_CALL getEnvironment() throw();
+
+ // XCommandTask
+ virtual Command SAL_CALL getCommand() throw();
+ virtual Any SAL_CALL getResult() throw();
+};
+
+//---------------------------------------------------------------------------
+//
+// OPropertyTask
+//
+//---------------------------------------------------------------------------
+
+class OPropertyTask :
+public OContentTask,
+public XPropertyTask
+{
+protected:
+ Sequence< PropertyValueInfo > m_aProperties;
+ PropertyTaskType m_eType;
+public:
+ OPropertyTask(const Reference< XContentTaskEnvironment >& Environment, OContent *pContent, const Sequence< PropertyValue >& Properties, PropertyTaskType Type );
+ virtual ~OPropertyTask();
+
+ virtual void doExecute();
+
+ // To be implemented by inheritants
+ virtual Any setPropertyValue( PropertyValueInfo & rProperty ) = 0;
+ virtual void getPropertyValue( PropertyValueInfo & rProperty ) = 0;
+
+ // XInterface
+#if defined(TF_TYPE) || (SUPD >= 564)
+ virtual Any SAL_CALL queryInterface( const Type &type ) throw( RuntimeException );
+#else
+ virtual sal_Bool SAL_CALL queryInterface( const Uik& type, Any& ifc ) throw( RuntimeException );
+#endif
+ virtual void SAL_CALL acquire() throw(RuntimeException);
+ virtual void SAL_CALL release() throw(RuntimeException);
+
+ // XContentTask
+ virtual void SAL_CALL start() throw();
+ virtual void SAL_CALL execute() throw( Exception );
+ virtual void SAL_CALL abort() throw();
+ virtual ContentTaskStatus SAL_CALL getStatus() throw();
+ virtual Reference< XContentTaskEnvironment > SAL_CALL getEnvironment() throw();
+
+ // XPropertyTask
+ PropertyTaskType SAL_CALL getType() throw();
+ Sequence< PropertyValueInfo > SAL_CALL getProperties() throw();
+};
+
+#endif // _UCBHELPER_CONTENT_HXX_
+
+
diff --git a/extensions/prj/d.lst b/extensions/prj/d.lst
new file mode 100644
index 000000000000..23be9a44ac42
--- /dev/null
+++ b/extensions/prj/d.lst
@@ -0,0 +1,7 @@
+..\%__SRC%\bin\*.dll %_DEST%\bin%_EXT%\*.dll
+..\%__SRC%\class\*.jar %_DEST%\bin%_EXT%\*.jar
+..\%__SRC%\lib\*.so %_DEST%\lib%_EXT%\*.so
+..\%__SRC%\lib\*.sl %_DEST%\lib%_EXT%\*.sl
+..\%__SRC%\bin\*.bin %_DEST%\bin%_EXT%\*.bin
+..\%__SRC%\misc\*.hid %_DEST%\bin%_EXT%\*.hid
+..\%__SRC%\bin\*.res %_DEST%\bin%_EXT%\*.res
diff --git a/extensions/source/bibliography/bib.hrc b/extensions/source/bibliography/bib.hrc
new file mode 100644
index 000000000000..b2af8523b10e
--- /dev/null
+++ b/extensions/source/bibliography/bib.hrc
@@ -0,0 +1,114 @@
+/*************************************************************************
+ *
+ * $RCSfile: bib.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:16:44 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef BIB_HRC
+#define BIB_HRC
+
+#include <svtools/solar.hrc>
+
+#ifndef RID_BIB_START
+#define RID_BIB_START RID_EXTENSIONS_START
+#endif
+
+// ResIDs
+
+//Dialogs (100)
+#define RID_BIB_DIALOG (RID_BIB_START)
+#define RID_TP_GENERAL (RID_BIB_DIALOG)
+#define RID_DLG_MAPPING (RID_BIB_DIALOG + 1)
+#define RID_DLG_DBCHANGE (RID_BIB_DIALOG + 2)
+
+//Controls(100)
+#define RID_BIB_CONTROLS (RID_BIB_START + 100)
+#define RID_BIB_BMPEXPANDER (RID_BIB_CONTROLS)
+#define RID_BIB_TOOLBAR (RID_BIB_CONTROLS+ 1)
+
+//Menu(100)
+#define RID_BIB_MENU (RID_BIB_CONTROLS + 100)
+#define RID_MAIN_MENU (RID_BIB_MENU +1)
+//#define RID_MAIN_ME_HIERARCHICAL (RID_BIB_MENU +2)
+#define RID_MAIN_ME_NEWENTRY (RID_BIB_MENU +3)
+#define RID_MAIN_ME_CHANGEENTRY (RID_BIB_MENU +4)
+#define RID_MAIN_ME_REMOVEENTRY (RID_BIB_MENU +5)
+#define RID_MAIN_ME_SEARCH (RID_BIB_MENU +6)
+#define RID_MAIN_ME_FIELDDLG (RID_BIB_MENU +7)
+//#define RID_MAIN_ME_LAYOUT (RID_BIB_MENU +8)
+#define RID_MAIN_ME_MAPPING (RID_BIB_MENU +9)
+#define RID_MAIN_ME_DBSOURCE (RID_BIB_MENU +10)
+
+#define RID_POPUP_ME_VIEW (RID_BIB_MENU +50)
+
+// Strings (500)
+#define RID_BIB_STRING (RID_BIB_START + 200)
+#define RID_BIB_STR_SECTION (RID_BIB_STRING + 1)
+#define RID_BIB_STR_FIELDSELECTION (RID_BIB_STRING + 2)
+#define RID_BIB_STR_TABWIN_PREFIX (RID_BIB_STRING + 3)
+#define RID_BIB_STR_FRAME_TITLE (RID_BIB_STRING + 4)
+#define RID_MAP_QUESTION (RID_BIB_STRING + 5)
+
+// HelpIDs *** nicht bestaetigt ***
+#ifndef HID_BIB_START
+#define HID_BIB_START 5000
+#define HID_DLG_MAPPING (HID_BIB_START + 1)
+#define HID_DLG_DBCHANGE (HID_BIB_START + 2)
+#define HID_SELECTION_TLB (HID_BIB_START + 3)
+#endif
+
+#endif
diff --git a/extensions/source/bibliography/bib.src b/extensions/source/bibliography/bib.src
new file mode 100644
index 000000000000..ed37b2ad2f0f
--- /dev/null
+++ b/extensions/source/bibliography/bib.src
@@ -0,0 +1,187 @@
+/*************************************************************************
+ *
+ * $RCSfile: bib.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:16:44 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#include "bib.hrc"
+
+ImageList RID_BIB_BMPEXPANDER
+{
+ ImageBitmap = Bitmap { File = "expander.bmp" ; };
+ IdList = { 1 ; 2 ; 3 ; 4 ; 5 ; 6 ; 7 ; 8 ; 9 ; };
+ IdCount = { 9 ; };
+};
+
+String RID_BIB_STR_SECTION
+{
+ Text = "Abschnitt";
+ Text [ ENGLISH ] = "Section" ;
+ Text[ english_us ] = "Section";
+ Text[ portuguese ] = "Seco";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Sectie";
+ Text[ french ] = "Section";
+ Text[ spanish ] = "Seccin";
+ Text[ italian ] = "Sezione";
+ Text[ danish ] = "Sektion";
+ Text[ swedish ] = "Avsnitt";
+ Text[ polish ] = "Sekcja";
+ Text[ portuguese_brazilian ] = "Section";
+ Text[ japanese ] = "";
+ Text[ korean ] = "";
+ Text[ chinese_simplified ] = "";
+ Text[ chinese_traditional ] = "Ϭq";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Blm";
+};
+
+String RID_BIB_STR_FIELDSELECTION
+{
+ Text = "Feldauswahl:" ;
+ Text [ English ] = "Fieldselection:" ;
+ Text[ english_us ] = "Field selection:";
+ Text[ portuguese ] = "Seleco de campo:";
+ Text[ russian ] = " :";
+ Text[ greek ] = " :";
+ Text[ dutch ] = "Veldselectie:";
+ Text[ french ] = "Slection de champ :";
+ Text[ spanish ] = "Seleccin de campo:";
+ Text[ italian ] = "Selezione campo:";
+ Text[ danish ] = "Feltudvalg:";
+ Text[ swedish ] = "Flturval:";
+ Text[ polish ] = "Wybr pola:";
+ Text[ portuguese_brazilian ] = "Fieldselection:";
+ Text[ japanese ] = "̨ޑI:";
+ Text[ korean ] = "ʵ :";
+ Text[ chinese_simplified ] = "ѡ";
+ Text[ chinese_traditional ] = "G";
+ Text[ arabic ] = " :";
+ Text[ turkish ] = "Alan seimi:";
+ Text[ language_user1 ] = " ";
+};
+
+String RID_BIB_STR_TABWIN_PREFIX
+{
+ Text = "Tabelle;Abfrage;Sql;Sql [Native]" ;
+ Text [ English ] = "Table;Query;Sql;Sql [Native]" ;
+ Text[ english_us ] = "Table;Query;Sql;Sql [Native]";
+ Text[ portuguese ] = "Tabela; Consulta; Sql;Sql [Native]";
+ Text[ russian ] = ";;Sql;Sql [Native]";
+ Text[ greek ] = ";;Sql;Sql [Native]";
+ Text[ dutch ] = "Tabel;Query;Sql;Sql [Native]";
+ Text[ french ] = "Table;Requte;Sql;Sql [Natif]";
+ Text[ spanish ] = "Tabla;Consulta;Sql;Sql [Native]";
+ Text[ italian ] = "Tabella;Ricerca;Sql;Sql [native]";
+ Text[ danish ] = "Tabel;Foresprgsel;Sql;Sql [native]";
+ Text[ swedish ] = "Tabell;Skning;Sql;Sql [Native]";
+ Text[ polish ] = "Tabela;Kwerenda;Sql;Sql [Native]";
+ Text[ portuguese_brazilian ] = "Table;Query;Sql;Sql [Native]";
+ Text[ japanese ] = "ð;ذ;Sql;Sql [Native]";
+ Text[ korean ] = "̺;;Sql;Sql [Native]";
+ Text[ chinese_simplified ] = ";ѯ;Sql;Sql [Native]";
+ Text[ chinese_traditional ] = ";d;Sql;Sql [Native]";
+ Text[ arabic ] = ";;Sql;Sql [Native]";
+ Text[ turkish ] = "Tablo;Sorgu;Sql;Sql [Native]";
+};
+String RID_BIB_STR_FRAME_TITLE
+{
+ Text = "Literaturdatenbank" ;
+ Text [ English ] = "Bibliography database" ;
+ Text[ english_us ] = "Bibliography Database";
+ Text[ portuguese ] = "Base de dados bibliogrfica";
+ Text[ russian ] = " ";
+ Text[ greek ] = " ";
+ Text[ dutch ] = "Literatuurdatabase";
+ Text[ french ] = "Base de donnes bibliographique";
+ Text[ spanish ] = "Base de datos bibliogrfica";
+ Text[ italian ] = "Database bibliografico";
+ Text[ danish ] = "Litteraturdatabase";
+ Text[ swedish ] = "Litteraturdatabas";
+ Text[ polish ] = "Bibliograficzna baza danych";
+ Text[ portuguese_brazilian ] = "Bibliography database";
+ Text[ japanese ] = "Ǘްް";
+ Text[ korean ] = " ͺ̽";
+ Text[ chinese_simplified ] = "ݿ";
+ Text[ chinese_traditional ] = "mƮw";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Kaynaka veritaban";
+};
+String RID_MAP_QUESTION
+{
+ Text = "Mchten Sie die Spaltenzuordnung bearbeiten?" ;
+ Text [ English ] = "Dow you want to edit the column arrangement" ;
+ Text[ english_us ] = "Do you want to edit the column arrangement?";
+ Text[ portuguese ] = "Editar disposio de colunas?";
+ Text[ russian ] = " ?";
+ Text[ greek ] = " ;";
+ Text[ dutch ] = "Wilt u de kolomindeling veranderen?";
+ Text[ french ] = "Souhaitez-vous diter l'assignation des colonnes ?";
+ Text[ spanish ] = "Desea modificar el orden de las columnas?";
+ Text[ italian ] = "Volete modificare l'ordine delle colonne?";
+ Text[ danish ] = "Vil du redigere kolonnetildelingen?";
+ Text[ swedish ] = "Vill Du redigera kolumntilldelningen?";
+ Text[ polish ] = "Chcesz edytowa przyporzdkowanie kolumn?";
+ Text[ portuguese_brazilian ] = "Dow you want to edit the column arrangement";
+ Text[ japanese ] = "̕ނҏW܂?";
+ Text[ korean ] = " 迭 Ͻðڽϱ?";
+ Text[ chinese_simplified ] = "Ҫ༭е˳";
+ Text[ chinese_traditional ] = "znsH";
+ Text[ arabic ] = " Ͽ";
+ Text[ turkish ] = "Stunlar dzenlemek istiyor musunuz?";
+};
diff --git a/extensions/source/bibliography/bibbeam.cxx b/extensions/source/bibliography/bibbeam.cxx
new file mode 100644
index 000000000000..7848eab220b1
--- /dev/null
+++ b/extensions/source/bibliography/bibbeam.cxx
@@ -0,0 +1,309 @@
+/*************************************************************************
+ *
+ * $RCSfile: bibbeam.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:16:44 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _OSL_MUTEX_HXX_
+#include <osl/mutex.hxx>
+#endif
+#ifndef _URLOBJ_HXX
+#include <tools/urlobj.hxx>
+#endif
+#ifndef _TOOLKIT_UNOHLP_HXX
+#include <toolkit/helper/vclunohelper.hxx>
+#endif
+
+#ifndef _UNOTOOLS_PROCESSFACTORY_HXX_
+#include <unotools/processfactory.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_AWT_POSSIZE_HPP_
+#include <com/sun/star/awt/PosSize.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XDISPATCH_HPP_
+#include <com/sun/star/frame/XDispatch.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_XURLTRANSFORMER_HPP_
+#include <com/sun/star/util/XURLTransformer.hpp>
+#endif
+
+#include <svtools/iniprop.hxx>
+#include <svtools/iniman.hxx>
+#include <extensio.hrc>
+
+#ifndef _SV_LSTBOX_HXX //autogen wg. form::component::ListBox
+#include <vcl/lstbox.hxx>
+#endif
+
+#ifndef _SV_EDIT_HXX //autogen wg. Edit
+#include <vcl/edit.hxx>
+#endif
+
+#ifndef _TOOLS_DEBUG_HXX //autogen wg. DBG_ASSERT
+#include <tools/debug.hxx>
+#endif
+
+#include "bibbeam.hxx"
+#include "toolbar.hrc"
+#include "bibresid.hxx"
+#include "datman.hxx"
+
+using namespace rtl;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::awt;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::uno;
+
+#define C2U(cChar) OUString::createFromAscii(cChar)
+
+#define PROPERTY_FRAME 1
+#define ID_TOOLBAR 1
+#define ID_GRIDWIN 2
+#define ID_ALPHAWIN 3
+
+rtl::OUString gGridModelCommand( OUString::createFromAscii(".uno:Bib/newGridModel"));
+
+BibGridwin::BibGridwin(Window* pParent, WinBits nStyle):
+ DockingWindow(pParent,nStyle)
+{
+ aCtrContainer = VCLUnoHelper::CreateControlContainer(this);
+}
+
+BibGridwin::~BibGridwin()
+{
+}
+
+void BibGridwin::Resize()
+{
+ if(xGridWinRef.is())
+ {
+ ::Size aSize = GetOutputSizePixel();
+ xGridWinRef->setPosSize(0, 0, aSize.Width(),aSize.Height(), PosSize::SIZE);
+ }
+}
+void BibGridwin::createGridWin(const uno::Reference< XControlModel > & xGModel)
+{
+ xGridModel=xGModel;
+
+ if( aCtrContainer.is())
+ {
+ uno::Reference< lang::XMultiServiceFactory > xMgr = utl::getProcessServiceFactory();
+
+ if ( xGridModel.is() && xMgr.is())
+ {
+ uno::Reference< XPropertySet > xPropSet( xGridModel, UNO_QUERY );
+
+ if ( xPropSet.is() && xGridModel.is() )
+ {
+ uno::Any aAny = xPropSet->getPropertyValue( C2U("DefaultControl") );
+ rtl::OUString aControlName;
+ aAny >>= aControlName;
+
+ xControl=uno::Reference< XControl > (xMgr->createInstance( aControlName ), UNO_QUERY );
+ if ( xControl.is() )
+ {
+ xControl->setModel( xGridModel);
+ }
+ }
+
+ if ( xControl.is() )
+ {
+ // Peer als Child zu dem FrameWindow
+ aCtrContainer->addControl(C2U("Bla"), xControl);
+ xGridWinRef=uno::Reference< XWindow > (xControl, UNO_QUERY );
+ xGridWinRef->setVisible( sal_True );
+ xControl->setDesignMode(sal_False);
+ ::Size aSize = GetOutputSizePixel();
+ xGridWinRef->setPosSize(0, 0, aSize.Width(),aSize.Height(), PosSize::POSSIZE);
+// Window* pWindow = ::GetWindow( xGridWinRef );
+// pWindow->SetHelpId(HID_BIB_DB_GRIDCTRL);
+
+ }
+ }
+ }
+}
+
+void BibGridwin::disposeGridWin()
+{
+ if ( xControl.is() )
+ {
+ aCtrContainer->removeControl(xControl);
+ xControl->dispose();
+ }
+}
+
+void BibGridwin::changeGridModel(const uno::Reference< XControlModel > & xGModel)
+{
+ xGridModel=xGModel;
+
+ if ( xControl.is() )
+ {
+ xControl->setModel( xGridModel);
+ }
+}
+
+
+void BibGridwin::statusChanged(const frame::FeatureStateEvent& rEvt)throw( uno::RuntimeException )
+{
+ if(rEvt.FeatureURL.Complete == gGridModelCommand)
+ {
+ if(IsEnabled() != rEvt.IsEnabled) Enable(rEvt.IsEnabled);
+
+ uno::Any aModel=rEvt.State;
+ if(aModel.getValueType()==::getCppuType((Reference< XControlModel>*)0))
+ {
+ uno::Reference< XControlModel > xGModel=*(uno::Reference< XControlModel > *) aModel.getValue();
+ changeGridModel(xGModel);
+ }
+ }
+};
+
+
+
+
+BibBeamer::BibBeamer(Window* pParent,BibDataManager* pDM, WinBits nStyle):
+ SplitWindow(pParent,nStyle|WB_NOSPLITDRAW),
+ pDatMan(pDM),
+ pToolBar (NULL),
+ pGridWin (NULL),
+ pAlphaWin(NULL)
+{
+ createToolBar();
+ createGridWin();
+ createAlphaWin();
+ pDatMan->SetToolbar(pToolBar);
+ pDatMan->SetGridWin(pGridWin);
+}
+
+BibBeamer::~BibBeamer()
+{
+ if ( xToolBarRef.is() ) xToolBarRef->dispose();
+ if ( xGridRef.is() ) xGridRef->dispose();
+ if ( xAlphaRef.is() ) xAlphaRef->dispose();
+
+
+ if(pToolBar)
+ {
+ if(pDatMan)
+ {
+ pDatMan->SetToolbar(0);
+ pDatMan->SetGridWin(0);
+ }
+
+ delete pToolBar;
+ }
+
+ if(pGridWin)
+ {
+ pGridWin->disposeGridWin();
+// delete pGridWin;
+ xpGridWin = 0;
+ }
+
+ if(pAlphaWin) delete pAlphaWin;
+}
+
+void BibBeamer::createToolBar()
+{
+ pToolBar= new BibToolBar(this);
+ ::Size aSize=pToolBar->GetSizePixel();
+ InsertItem(ID_TOOLBAR, pToolBar, aSize.Height(), 0, 0, SWIB_FIXED );
+ if(xController.is()) pToolBar->SetXController(xController);
+}
+void BibBeamer::createGridWin()
+{
+ xpGridWin = pGridWin= new BibGridwin(this,0);
+
+ InsertItem(ID_GRIDWIN, pGridWin, 40, 1, 0, SWIB_RELATIVESIZE );
+
+
+ pGridWin->createGridWin(pDatMan->createGridModel());
+}
+
+void BibBeamer::createAlphaWin()
+{
+}
+
+void BibBeamer::SetXController(const uno::Reference< frame::XController > & xCtr)
+{
+ xController=xCtr;
+
+ if(xController.is())
+ {
+ uno::Reference< frame::XDispatch > xDisp(xController, UNO_QUERY);
+ uno::Reference< lang::XMultiServiceFactory > xMgr = utl::getProcessServiceFactory();
+ uno::Reference< util::XURLTransformer > xTrans ( xMgr->createInstance( C2U("com.sun.star.util.URLTransformer") ), UNO_QUERY );
+ if( xTrans.is() && xDisp.is())
+ {
+ util::URL aURL;
+ aURL.Complete =gGridModelCommand;
+
+ xTrans->parseStrict( aURL );
+ xDisp->addStatusListener(uno::Reference< frame::XStatusListener > (pGridWin),aURL);
+ }
+ }
+
+ if(pToolBar)
+ {
+ pToolBar->SetXController(xController);
+ }
+
+}
+
+
diff --git a/extensions/source/bibliography/bibbeam.hxx b/extensions/source/bibliography/bibbeam.hxx
new file mode 100644
index 000000000000..8fd7f4b81174
--- /dev/null
+++ b/extensions/source/bibliography/bibbeam.hxx
@@ -0,0 +1,169 @@
+/*************************************************************************
+ *
+ * $RCSfile: bibbeam.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:16:44 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef ADRBEAM_HXX
+#define ADRBEAM_HXX
+
+#ifndef _COM_SUN_STAR_AWT_XCONTROLCONTAINER_HPP_
+#include <com/sun/star/awt/XControlContainer.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_XCONTROL_HPP_
+#include <com/sun/star/awt/XControl.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_XCONTROLMODEL_HPP_
+#include <com/sun/star/awt/XControlModel.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FORM_XFORM_HPP_
+#include <com/sun/star/form/XForm.hpp>
+#endif
+
+
+#ifndef _CPPUHELPER_IMPLBASE1_HXX_
+#include <cppuhelper/implbase1.hxx> // helper for implementations
+#endif
+
+#ifndef _SV_SPLITWIN_HXX
+#include <vcl/splitwin.hxx>
+#endif
+
+
+#ifndef _BIB_TOOLBAR_HXX
+#include "toolbar.hxx"
+#endif
+
+extern rtl::OUString gGridModelCommand;
+
+class BibDataManager;
+
+class BibGridwin: public DockingWindow,
+ public cppu::WeakImplHelper1 < ::com::sun::star::frame::XStatusListener>
+{
+private:
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > xGridWinRef;
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > xForm;
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > xGridModel;
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > xControl;
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer > aCtrContainer;
+
+protected:
+
+ void Resize();
+
+public:
+
+ BibGridwin(Window* pParent, WinBits nStyle = 0 );
+ ~BibGridwin();
+
+ void createGridWin(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > & xDbForm);
+ void changeGridModel(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > & xGModel);
+ void disposeGridWin();
+
+ // ::com::sun::star::lang::XEventListener
+ // we do not hold References to dispatches, so there is nothing to do on disposal
+ virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source)
+ throw( ::com::sun::star::uno::RuntimeException ){};
+
+ // ::com::sun::star::frame::XStatusListener
+ virtual void SAL_CALL statusChanged(const ::com::sun::star::frame::FeatureStateEvent& Event)
+ throw( ::com::sun::star::uno::RuntimeException );
+
+};
+
+
+class BibBeamer: public SplitWindow
+{
+ private:
+
+ BibDataManager* pDatMan;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController > xController;
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > xForm;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xToolBarRef;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xGridRef;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xAlphaRef;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > xToolBarWinRef;
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > xGridWinRef;
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > xAlphaWinRef;
+
+ BibToolBar* pToolBar;
+ BibGridwin* pGridWin;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener> xpGridWin;
+ DockingWindow* pAlphaWin;
+
+ protected:
+
+ void createToolBar();
+ void createGridWin();
+ void createAlphaWin();
+
+ public:
+
+ BibBeamer(Window* pParent,BibDataManager* pDatMan, WinBits nStyle = 0 );
+ ~BibBeamer();
+
+ void SetXController(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController > &);
+};
+
+
+
+
+#endif
diff --git a/extensions/source/bibliography/bibcont.cxx b/extensions/source/bibliography/bibcont.cxx
new file mode 100644
index 000000000000..49dca576f05b
--- /dev/null
+++ b/extensions/source/bibliography/bibcont.cxx
@@ -0,0 +1,372 @@
+/*************************************************************************
+ *
+ * $RCSfile: bibcont.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:16:44 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include <osl/mutex.hxx>
+#include <tools/urlobj.hxx>
+#include <cppuhelper/weak.hxx>
+#ifndef _UNOTOOLS_PROCESSFACTORY_HXX_
+#include <unotools/processfactory.hxx>
+#endif
+#include <toolkit/helper/vclunohelper.hxx>
+#ifndef _COM_SUN_STAR_AWT_XWINDOW_HPP_
+#include <com/sun/star/awt/XWindow.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_XWINDOWPEER_HPP_
+#include <com/sun/star/awt/XWindowPeer.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XDISPATCHPROVIDER_HPP_
+#include <com/sun/star/frame/XDispatchProvider.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_FRAMESEARCHFLAG_HPP_
+#include <com/sun/star/frame/FrameSearchFlag.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_XURLTRANSFORMER_HPP_
+#include <com/sun/star/util/XURLTransformer.hpp>
+#endif
+
+
+#include <svtools/iniprop.hxx>
+#include <svtools/iniman.hxx>
+
+#include "datman.hxx"
+#include "bibcont.hxx"
+
+using namespace vos;
+using namespace osl;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::frame;
+using namespace ::rtl;
+
+#define C2U(cChar) OUString::createFromAscii(cChar)
+#define PROPERTY_FRAME 1
+
+
+BibWindowContainer::BibWindowContainer( Window* pParent,WinBits nStyle):
+ DockingWindow(pParent,nStyle),
+ pChild(NULL)
+{
+}
+
+BibWindowContainer::BibWindowContainer( Window* pParent,Window* pWin, WinBits nStyle):
+ DockingWindow(pParent,nStyle),
+ pChild(pWin)
+{
+ if(pChild!=NULL)
+ {
+ pChild->SetParent(this);
+ pChild->Show();
+ pChild->SetPosPixel(Point(0,0));
+ }
+}
+
+BibWindowContainer::~BibWindowContainer()
+{
+ if(pChild!=NULL) delete pChild;
+}
+
+void BibWindowContainer::Resize()
+{
+ ::Size aSize=GetOutputSizePixel();
+ if(pChild!=NULL) pChild->SetSizePixel(aSize);
+}
+
+void BibWindowContainer::SetChild(Window* pWin)
+{
+ pChild=pWin;
+ if(pChild!=NULL)
+ {
+ pChild->SetParent(this);
+ pChild->Show();
+ pChild->SetPosPixel(Point(0,0));
+ }
+}
+
+
+
+BibBookContainer::BibBookContainer(Window* pParent,BibDataManager* pDtMn, WinBits nStyle):
+ SplitWindow(pParent,nStyle),
+ pDatMan(pDtMn),
+ pTopWin(NULL),
+ pBottomWin(NULL),
+ bFirstTime(sal_True)
+{
+ pBibMod = OpenBibModul();
+ aTimer.SetTimeoutHdl(LINK( this, BibBookContainer, SplitHdl));
+ aTimer.SetTimeout(400);
+}
+
+BibBookContainer::~BibBookContainer()
+{
+ if ( xTopFrameRef.is() )
+ xTopFrameRef->dispose();
+ if ( xBottomFrameRef.is() )
+ xBottomFrameRef->dispose();
+
+ if(pTopWin)
+ delete pTopWin;
+ if(pBottomWin)
+ delete pBottomWin;
+ CloseBibModul(pBibMod);
+}
+
+void BibBookContainer::Split()
+{
+ aTimer.Start();
+}
+IMPL_LINK( BibBookContainer, SplitHdl, Timer*,pT)
+{
+ long nSize= GetItemSize( TOP_WINDOW);
+ pDatMan->setBeamerSize(nSize);
+ nSize= GetItemSize( BOTTOM_WINDOW);
+ pDatMan->setViewSize(nSize);
+ return 0;
+}
+
+
+uno::Reference < awt::XWindowPeer> BibBookContainer::GetTopComponentInterface( sal_Bool bCreate)
+{
+ return pTopWin->GetComponentInterface(bCreate);
+}
+void BibBookContainer::SetTopComponentInterface( awt::XWindowPeer* pIFace )
+{
+ pTopWin->SetComponentInterface(pIFace);
+}
+
+uno::Reference < awt::XWindowPeer > BibBookContainer::GetBottomComponentInterface( sal_Bool bCreate)
+{
+ return pBottomWin->GetComponentInterface(bCreate);
+}
+void BibBookContainer::SetBottomComponentInterface( awt::XWindowPeer* pIFace )
+{
+ pBottomWin->SetComponentInterface(pIFace);
+}
+
+/*VCLXWindow* BibBookContainer::GetTopWindowPeer()
+{
+ return pTopWin->GetWindowPeer();
+}
+*//*void BibBookContainer::SetTopWindowPeer( VCLXWindow* pPeer )
+{
+ pTopWin->SetWindowPeer(pPeer );
+}
+*/
+/*VCLXWindow* BibBookContainer::GetBottomWindowPeer()
+{
+ return pBottomWin->GetWindowPeer();
+}
+*//*void BibBookContainer::SetBottomWindowPeer( VCLXWindow* pPeer )
+{
+ pBottomWin->SetWindowPeer(pPeer );
+}
+*/
+
+void BibBookContainer::CreateTopWin()
+{
+ if ( xTopFrameRef.is() ) xTopFrameRef->dispose();
+
+ if(pTopWin)
+ {
+ RemoveItem(TOP_WINDOW);
+ delete pTopWin;
+ }
+
+ pTopWin= new DockingWindow(this,0);
+
+ long nSize=pDatMan->getBeamerSize();
+ InsertItem(TOP_WINDOW, pTopWin, nSize, 0, 0, SWIB_PERCENTSIZE );
+
+}
+
+void BibBookContainer::CreateBottomWin()
+{
+
+ if ( xBottomFrameRef.is() ) xBottomFrameRef->dispose();
+
+ if(pBottomWin)
+ {
+ RemoveItem(BOTTOM_WINDOW);
+ delete pBottomWin;
+ }
+
+ pBottomWin= new DockingWindow(this,0);
+ long nSize=pDatMan->getViewSize();
+ InsertItem(BOTTOM_WINDOW, pBottomWin, nSize, 1, 0, SWIB_PERCENTSIZE );
+
+}
+
+void BibBookContainer::createTopFrame(const ::rtl::OUString & rURL )
+{
+ uno::Reference< frame::XFrame > xNewFrame;
+
+ CreateTopWin();
+
+ xTopPeerRef=uno::Reference< awt::XWindow > (GetTopComponentInterface(), UNO_QUERY );
+
+ uno::Reference< lang::XMultiServiceFactory > xMgr = utl::getProcessServiceFactory();
+
+ xNewFrame = uno::Reference< frame::XFrame > ( xMgr->createInstance( C2U("com.sun.star.frame.Frame") ), UNO_QUERY );
+ uno::Reference< frame::XDispatchProvider > xDSP( xNewFrame, UNO_QUERY );
+ if( xDSP.is() )
+ {
+ xNewFrame->initialize( xTopPeerRef);
+
+ // optional:
+ //xFrame->setName( C2U("WhatYouWant") );
+
+ uno::Reference< util::XURLTransformer > xTrans ( xMgr->createInstance( C2U("com.sun.star.util.URLTransformer") ), UNO_QUERY );
+ if( xTrans.is() )
+ {
+ // Datei laden
+ util::URL aURL;
+ aURL.Complete = rURL;
+
+ xTrans->parseStrict( aURL );
+
+ uno::Reference< frame::XDispatch > xDisp = xDSP->queryDispatch( aURL, C2U("_self"), FrameSearchFlag::SELF );
+ if ( xDisp.is() )
+ xDisp->dispatch( aURL, uno::Sequence<beans::PropertyValue>() );
+ }
+ }
+
+ // set the frame
+ {
+ MutexGuard aGuard(Mutex::getGlobalMutex());
+ xTopFrameRef = xNewFrame;
+ }
+
+}
+
+void BibBookContainer::createBottomFrame(const ::rtl::OUString & rURL )
+{
+ uno::Reference< frame::XFrame > xNewFrame;
+
+ CreateBottomWin();
+
+ xBottomPeerRef=uno::Reference< awt::XWindow > (GetBottomComponentInterface(), UNO_QUERY );
+
+ uno::Reference< lang::XMultiServiceFactory > xMgr = utl::getProcessServiceFactory();
+
+ xNewFrame = uno::Reference< frame::XFrame > ( xMgr->createInstance( C2U("com.sun.star.frame.Frame") ), UNO_QUERY );
+ uno::Reference< frame::XDispatchProvider > xDSP( xNewFrame, UNO_QUERY );
+ if( xDSP.is() )
+ {
+ xNewFrame->initialize( xBottomPeerRef);
+
+ // optional:
+ //xFrame->setName( C2U("WhatYouWant") );
+
+ uno::Reference< util::XURLTransformer > xTrans ( xMgr->createInstance( C2U("com.sun.star.util.URLTransformer") ), UNO_QUERY );
+ if( xTrans.is() )
+ {
+ // Datei laden
+ util::URL aURL;
+ aURL.Complete = rURL;
+
+ xTrans->parseStrict( aURL );
+
+ uno::Reference< frame::XDispatch > xDisp = xDSP->queryDispatch( aURL, ::rtl::OUString(), FrameSearchFlag::SELF );
+ if ( xDisp.is() )
+ xDisp->dispatch( aURL, uno::Sequence<beans::PropertyValue>() );
+ }
+ }
+
+ // set the frame
+ {
+ MutexGuard aGuard(Mutex::getGlobalMutex());
+ xBottomFrameRef = xNewFrame;
+ }
+
+}
+
+void BibBookContainer::createTopFrame(Window* pWin)
+{
+ if ( xTopFrameRef.is() ) xTopFrameRef->dispose();
+
+ if(pTopWin)
+ {
+ RemoveItem(TOP_WINDOW);
+ delete pTopWin;
+ }
+ pTopWin=new BibWindowContainer(this,pWin);
+
+ long nSize=pDatMan->getBeamerSize();
+ InsertItem(TOP_WINDOW, pTopWin, nSize, 1, 0, SWIB_PERCENTSIZE );
+
+}
+
+void BibBookContainer::createBottomFrame(Window* pWin)
+{
+ if ( xBottomFrameRef.is() ) xBottomFrameRef->dispose();
+
+ if(pBottomWin)
+ {
+ RemoveItem(BOTTOM_WINDOW);
+ delete pBottomWin;
+ }
+
+ pBottomWin=new BibWindowContainer(this,pWin);
+
+ long nSize=pDatMan->getViewSize();
+ InsertItem(BOTTOM_WINDOW, pBottomWin, nSize, 1, 0, SWIB_PERCENTSIZE );
+
+}
+
diff --git a/extensions/source/bibliography/bibcont.hxx b/extensions/source/bibliography/bibcont.hxx
new file mode 100644
index 000000000000..4c10b15941c3
--- /dev/null
+++ b/extensions/source/bibliography/bibcont.hxx
@@ -0,0 +1,158 @@
+/*************************************************************************
+ *
+ * $RCSfile: bibcont.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:16:44 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef ADDRCONT_HXX
+#define ADDRCONT_HXX
+
+#ifndef _COM_SUN_STAR_FRAME_XFRAME_HPP_
+#include <com/sun/star/frame/XFrame.hpp>
+#endif
+
+#ifndef _SV_SPLITWIN_HXX
+#include <vcl/splitwin.hxx>
+#endif
+
+#ifndef _SV_TIMER_HXX //autogen wg. Timer
+#include <vcl/timer.hxx>
+#endif
+#include "bibmod.hxx"
+
+#define TOP_WINDOW 1
+#define BOTTOM_WINDOW 2
+
+class BibDataManager;
+
+class BibWindowContainer: public DockingWindow
+{
+ private:
+ Window* pChild;
+
+ protected:
+ virtual void Resize();
+
+ public:
+ BibWindowContainer( Window* pParent,WinBits nStyle = 0);
+ BibWindowContainer( Window* pParent,Window* pChild, WinBits nStyle = 0 );
+ ~BibWindowContainer();
+
+ Window* GetChild(){return pChild;}
+ void SetChild(Window* pWin);
+};
+
+
+class BibBookContainer: public SplitWindow
+{
+ private:
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xTopFrameRef;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xBottomFrameRef;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > xTopPeerRef;
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > xBottomPeerRef;
+ sal_Bool bFirstTime;
+
+ DockingWindow* pTopWin;
+ DockingWindow* pBottomWin;
+ BibDataManager* pDatMan;
+ HdlBibModul pBibMod;
+ Timer aTimer;
+
+ DECL_LINK( SplitHdl, Timer*);
+
+ protected:
+
+ virtual void Split();
+
+ void CreateTopWin();
+ void CreateBottomWin();
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > GetTopComponentInterface( sal_Bool bCreate = sal_True );
+ void SetTopComponentInterface( ::com::sun::star::awt::XWindowPeer* pIFace );
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > GetBottomComponentInterface( sal_Bool bCreate = sal_True );
+ void SetBottomComponentInterface( ::com::sun::star::awt::XWindowPeer* pIFace );
+
+// VCLXWindow* GetTopWindowPeer();
+// void SetTopWindowPeer( VCLXWindow* pPeer );
+
+// VCLXWindow* GetBottomWindowPeer();
+// void SetBottomWindowPeer( VCLXWindow* pPeer );
+
+ public:
+
+ BibBookContainer(Window* pParent,BibDataManager*, WinBits nStyle = 0 );
+ ~BibBookContainer();
+
+ DockingWindow* GetTopWin() {return pTopWin;}
+ DockingWindow* GetBottomWin() {return pBottomWin;}
+
+
+ void createTopFrame(const rtl::OUString & rURL );
+
+ void createBottomFrame(const rtl::OUString & rURL );
+
+ void createTopFrame(Window* pWin);
+
+ void createBottomFrame(Window* pWin);
+
+};
+
+
+#endif
diff --git a/extensions/source/bibliography/bibload.cxx b/extensions/source/bibliography/bibload.cxx
new file mode 100644
index 000000000000..d5f246c97bc9
--- /dev/null
+++ b/extensions/source/bibliography/bibload.cxx
@@ -0,0 +1,881 @@
+/*************************************************************************
+ *
+ * $RCSfile: bibload.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:16:44 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+
+#ifndef _OSL_MUTEX_HXX_
+#include <osl/mutex.hxx>
+#endif
+#ifndef _URLOBJ_HXX
+#include <tools/urlobj.hxx>
+#endif
+#ifndef _CPPUHELPER_WEAK_HXX_
+#include <cppuhelper/weak.hxx>
+#endif
+#ifndef _SFX_ITEMPROP_HXX
+#include <svtools/itemprop.hxx>
+#endif
+#ifndef _UNO_ENVIRONMENT_H_
+#include <uno/environment.h>
+#endif
+#ifndef SVTOOLS_URIHELPER_HXX
+#include <svtools/urihelper.hxx>
+#endif
+#ifndef _TOOLKIT_UNOHLP_HXX
+#include <toolkit/helper/vclunohelper.hxx>
+#endif
+#ifndef _UNOTOOLS_PROCESSFACTORY_HXX_
+#include <unotools/processfactory.hxx>
+#endif
+#ifndef _CPPUHELPER_FACTORY_HXX_
+#include <cppuhelper/factory.hxx> // helper for factories
+#endif
+#ifndef _COM_SUN_STAR_SDBC_RESULTSETTYPE_HPP_
+#include <com/sun/star/sdbc/ResultSetType.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBC_RESULTSETCONCURRENCY_HPP_
+#include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDB_XCOLUMN_HPP_
+#include <com/sun/star/sdb/XColumn.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_XURLTRANSFORMER_HPP_
+#include <com/sun/star/util/XURLTransformer.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBCX_XCOLUMNSSUPPLIER_HPP_
+#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBC_XROWSET_HPP_
+#include <com/sun/star/sdbc/XRowSet.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDB_COMMANDTYPE_HPP_
+#include <com/sun/star/sdb/CommandType.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XFRAMELOADER_HPP_
+#include <com/sun/star/frame/XFrameLoader.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XSINGLESERVICEFACTORY_HPP_
+#include <com/sun/star/lang/XSingleServiceFactory.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_
+#include <com/sun/star/beans/PropertyAttribute.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
+#include <com/sun/star/container/XNameAccess.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_BIBLIOGRAPHYDATAFIELD_HPP_
+#include <com/sun/star/text/BibliographyDataField.hpp>
+#endif
+
+#ifndef _SV_WINDOW_HXX
+#include <vcl/window.hxx>
+#endif
+#ifndef _SV_EDIT_HXX
+#include <vcl/edit.hxx>
+#endif
+#ifndef _SV_SVAPP_HXX
+#include <vcl/svapp.hxx>
+#endif
+
+#ifndef _SV_GROUP_HXX //autogen wg. form
+#include <vcl/group.hxx>
+#endif
+
+#ifndef _SFXINIPROP_HXX
+#include <svtools/iniprop.hxx>
+#endif
+#ifndef _SFXINIMGR_HXX
+#include <svtools/iniman.hxx>
+#endif
+#ifndef _SVEDIT_HXX
+#include <svtools/svmedit.hxx>
+#endif
+
+#ifndef BIB_HRC
+#include "bib.hrc"
+#endif
+#ifndef ADDRCONT_HXX
+#include "bibcont.hxx"
+#endif
+#ifndef ADRBEAM_HXX
+#include "bibbeam.hxx"
+#endif
+#ifndef ADDRMOD_HXX
+#include "bibmod.hxx"
+#endif
+#ifndef _BIB_VIEW_HXX
+#include "bibview.hxx"
+#endif
+#ifndef _BIB_FRAMECTR_HXX
+#include "framectr.hxx"
+#endif
+#ifndef _BIB_DATMAN_HXX
+#include "datman.hxx"
+#endif
+
+#ifndef _CPPUHELPER_IMPLBASE4_HXX_
+#include <cppuhelper/implbase4.hxx> // helper for implementations
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::sdb;
+using namespace ::com::sun::star::sdbc;
+
+#define C2U(cChar) OUString::createFromAscii(cChar)
+
+
+//-----------------------------------------------------------------------------
+
+#define PROPERTY_FRAME 1
+
+class BibliographyLoader : public cppu::WeakImplHelper4
+<
+ XServiceInfo,
+ container::XNameAccess,
+ XPropertySet,
+ frame::XFrameLoader
+>
+{
+ HdlBibModul pBibMod;
+ Reference< XPropertyChangeListener > xDatMan;
+ BibDataManager* pDatMan;
+ Reference< container::XNameAccess > xColumns;
+ Reference< XResultSet > xCursor;
+
+private:
+
+ void loadView(const Reference< frame::XFrame > & aFrame, const rtl::OUString& aURL,
+ const Sequence< PropertyValue >& aArgs,
+ const Reference< frame::XLoadEventListener > & aListener);
+
+ BibDataManager* GetDataManager()const;
+ Reference< container::XNameAccess > GetDataColumns() const;
+ Reference< XResultSet > GetDataCursor() const;
+ Reference< sdb::XColumn > GetIdentifierColumn() const;
+
+public:
+ BibliographyLoader();
+ ~BibliographyLoader();
+
+ // XServiceInfo
+ rtl::OUString SAL_CALL getImplementationName() throw( );
+ sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( );
+ Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( );
+ static rtl::OUString getImplementationName_Static() throw( )
+
+ {
+ //!
+ return C2U("com.sun.star.extensions.Bibliography");
+ //!
+ }
+
+ //XNameAccess
+ virtual Any SAL_CALL getByName(const rtl::OUString& aName) throw ( container::NoSuchElementException, WrappedTargetException, RuntimeException );
+ virtual Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw ( RuntimeException );
+ virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& aName) throw ( RuntimeException );
+
+ //XElementAccess
+ virtual Type SAL_CALL getElementType(void) throw ( RuntimeException );
+ virtual sal_Bool SAL_CALL hasElements(void) throw ( RuntimeException );
+
+ //XPropertySet
+ virtual Reference< XPropertySetInfo > SAL_CALL getPropertySetInfo(void) throw ( RuntimeException );
+ virtual void SAL_CALL setPropertyValue(const rtl::OUString& PropertyName, const Any& aValue) throw( UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException );
+ virtual Any SAL_CALL getPropertyValue(const rtl::OUString& PropertyName) throw ( UnknownPropertyException, WrappedTargetException, RuntimeException );
+ virtual void SAL_CALL addPropertyChangeListener(const rtl::OUString& PropertyName, const Reference< XPropertyChangeListener > & aListener) throw( UnknownPropertyException, WrappedTargetException, RuntimeException );
+ virtual void SAL_CALL removePropertyChangeListener(const rtl::OUString& PropertyName, const Reference< XPropertyChangeListener > & aListener) throw( UnknownPropertyException, WrappedTargetException, RuntimeException );
+ virtual void SAL_CALL addVetoableChangeListener(const rtl::OUString& PropertyName, const Reference< XVetoableChangeListener > & aListener) throw( UnknownPropertyException, WrappedTargetException, RuntimeException );
+ virtual void SAL_CALL removeVetoableChangeListener(const rtl::OUString& PropertyName, const Reference< XVetoableChangeListener > & aListener) throw( UnknownPropertyException, WrappedTargetException, RuntimeException );
+
+ static Sequence<rtl::OUString> SAL_CALL getSupportedServiceNames_Static(void) throw( );
+
+ friend Reference< XInterface > SAL_CALL BibliographyLoader_CreateInstance( const Reference< XMultiServiceFactory > & rSMgr ) throw( Exception );
+
+ // XLoader
+ virtual void SAL_CALL load(const Reference< frame::XFrame > & aFrame, const rtl::OUString& aURL,
+ const Sequence< PropertyValue >& aArgs,
+ const Reference< frame::XLoadEventListener > & aListener);
+ virtual void SAL_CALL cancel(void);
+};
+
+BibliographyLoader::BibliographyLoader() :
+ pBibMod(0),
+ pDatMan(0)
+{
+}
+
+BibliographyLoader::~BibliographyLoader()
+{
+ if(pBibMod)
+ CloseBibModul(pBibMod);
+}
+
+
+Reference< XInterface > SAL_CALL BibliographyLoader_CreateInstance( const Reference< XMultiServiceFactory > & rSMgr ) throw( Exception )
+{
+ return *(new BibliographyLoader);
+}
+
+
+// XServiceInfo
+rtl::OUString BibliographyLoader::getImplementationName() throw( )
+
+{
+ return getImplementationName_Static();
+}
+
+// XServiceInfo
+sal_Bool BibliographyLoader::supportsService(const rtl::OUString& ServiceName) throw( )
+{
+ Sequence< rtl::OUString > aSNL = getSupportedServiceNames();
+ const rtl::OUString * pArray = aSNL.getConstArray();
+ for( sal_Int32 i = 0; i < aSNL.getLength(); i++ )
+ if( pArray[i] == ServiceName )
+ return sal_True;
+ return sal_False;
+}
+
+// XServiceInfo
+Sequence< rtl::OUString > BibliographyLoader::getSupportedServiceNames(void) throw( )
+{
+ return getSupportedServiceNames_Static();
+}
+
+// ORegistryServiceManager_Static
+Sequence< rtl::OUString > BibliographyLoader::getSupportedServiceNames_Static(void) throw( )
+{
+ Sequence< rtl::OUString > aSNS( 2 );
+ aSNS.getArray()[0] = C2U("com.sun.star.frame.FrameLoader");
+ //!
+ aSNS.getArray()[1] = C2U("com.sun.star.frame.Bibliography");
+ //!
+ return aSNS;
+}
+
+extern "C"
+{
+ void SAL_CALL component_getImplementationEnvironment(
+ const sal_Char ** ppEnvTypeName, uno_Environment ** ppEnv )
+ {
+ *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
+ }
+
+ sal_Bool SAL_CALL component_writeInfo( void * //pServiceManager
+ , registry::XRegistryKey * pRegistryKey )
+ {
+ try
+ {
+ rtl::OUString sKey = rtl::OUString::createFromAscii("/");
+ sKey += BibliographyLoader::getImplementationName_Static();
+ //creates the impl key: /com.sun.star.extensions.Bibliography
+ Reference< registry::XRegistryKey > xImplKey = pRegistryKey->createKey(sKey);
+
+
+ //sKey += rtl::OUString::createFromAscii("/UNO/SERVICES");
+ Reference< registry::XRegistryKey > xNewKey = xImplKey->createKey( C2U("/UNO/SERVICES") );
+ Sequence< rtl::OUString > aServices = BibliographyLoader::getSupportedServiceNames_Static();
+ for( INT32 i = 0; i < aServices.getLength(); i++ )
+ xNewKey->createKey( aServices.getConstArray()[i]);
+ xNewKey = xImplKey->createKey( C2U("/UNO/Loader"));
+
+ Reference< registry::XRegistryKey > xPatternKey = xImplKey->createKey( C2U("/Loader/Pattern" ));
+ xPatternKey->setAsciiValue( C2U( ".component:Bibliography/*" ) );
+
+ return sal_True;
+ }
+ catch (Exception &)
+ {
+ return sal_False;
+ }
+ }
+
+
+ void * SAL_CALL component_getFactory(
+ const sal_Char * pImplName, XMultiServiceFactory * pServiceManager, void * /*pRegistryKey*/ )
+ {
+ void * pRet = 0;
+ if (!BibliographyLoader::getImplementationName_Static().compareToAscii( pImplName ) )
+ {
+ // create the factory
+ Reference< XSingleServiceFactory > xFactory =
+ cppu::createSingleFactory(
+ pServiceManager,
+ BibliographyLoader::getImplementationName_Static(),
+ BibliographyLoader_CreateInstance,
+ BibliographyLoader::getSupportedServiceNames_Static() );
+ // acquire, because we return an interface pointer instead of a reference
+ xFactory->acquire();
+ pRet = xFactory.get();
+ }
+ return pRet;
+ }
+
+}
+// -----------------------------------------------------------------------
+void BibliographyLoader::cancel(void)
+{
+ //!
+ //!
+}
+// -----------------------------------------------------------------------
+void BibliographyLoader::load(const Reference< frame::XFrame > & rFrame, const rtl::OUString& rURL,
+ const Sequence< PropertyValue >& rArgs,
+ const Reference< frame::XLoadEventListener > & rListener)
+{
+ //!
+
+ pBibMod = OpenBibModul();
+
+ String aURLStr( rURL );
+ String aPartName = aURLStr.GetToken( 1, '/' );
+
+ if(aPartName.EqualsAscii("View") || aPartName.EqualsAscii("View1"))
+ {
+ loadView(rFrame, rURL, rArgs, rListener);
+ }
+}
+
+// -----------------------------------------------------------------------
+void BibliographyLoader::loadView(const Reference< frame::XFrame > & rFrame, const rtl::OUString& rURL,
+ const Sequence< PropertyValue >& rArgs,
+ const Reference< frame::XLoadEventListener > & rListener)
+{
+ //!
+ if(!pBibMod)
+ pBibMod = OpenBibModul();
+
+ BibDataManager* pDatMan=(*pBibMod)->createDataManager();
+ xDatMan = pDatMan;
+ String sTableName;
+ rtl::OUString aBibUrl=BibModul::GetBibliographyURL(&sTableName);
+
+ Reference< form::XForm > xForm = pDatMan->createDatabaseForm(aBibUrl, OUString(sTableName));
+
+ if(xForm.is())
+ {
+ Reference< awt::XWindow > aWindow = rFrame->getContainerWindow();
+
+ Window* pParent = VCLUnoHelper::GetWindow( aWindow );
+
+ BibBookContainer *pMyWindow = new BibBookContainer( pParent, pDatMan );
+
+ BibView* pView = new BibView(pMyWindow,pDatMan,WB_SECTION_STYLE);
+ pDatMan->SetView(pView);
+
+ BibBeamer* pBeamer=new BibBeamer( pMyWindow,pDatMan);
+ pMyWindow->createTopFrame(pBeamer);
+
+ pMyWindow->createBottomFrame(pView);
+
+ Reference< awt::XWindow > xWin ( pMyWindow->GetComponentInterface(), UNO_QUERY );
+
+ Reference< frame::XController > xCtrRef(new BibFrameController_Impl( xWin,pDatMan));
+
+ xCtrRef->attachFrame(rFrame);
+ rFrame->setComponent( xWin, xCtrRef);
+ pBeamer->SetXController(xCtrRef);
+ //!
+
+ long nBeamerSize = pDatMan->getBeamerSize();
+
+ pDatMan->loadDatabase();
+
+ ResMgr* pResMgr = (*pBibMod)->GetResMgr();
+ INetURLObject aEntry( URIHelper::SmartRelToAbs(pResMgr->GetFileName()) );
+ String aResFile = String::CreateFromAscii(".component:");
+ ( aResFile += aEntry.GetName() ) += '/';
+ String aMenuRes = aResFile;
+ aMenuRes+=String::CreateFromInt32(RID_MAIN_MENU);
+
+ util::URL aURL;
+ aURL.Complete = aMenuRes;
+
+ Reference< XMultiServiceFactory > xMgr = utl::getProcessServiceFactory();
+ Reference< util::XURLTransformer > xTrans ( xMgr->createInstance( C2U("com.sun.star.util.URLTransformer") ), UNO_QUERY );
+ if( xTrans.is() )
+ {
+ // Datei laden
+ xTrans->parseStrict( aURL );
+
+ Reference< frame::XDispatchProvider > xProv( rFrame, UNO_QUERY );
+ if ( xProv.is() )
+ {
+ Reference< frame::XDispatch > aDisp = xProv->queryDispatch( aURL, C2U("_tool:_menubar"), 0 );
+ if ( aDisp.is() )
+ aDisp->dispatch( aURL, Sequence<PropertyValue>() );
+ }
+ }
+ if ( rListener.is() )
+ rListener->loadFinished( this );
+ }
+ else
+ {
+ if ( rListener.is() )
+ rListener->loadCancelled( this );
+ }
+}
+/* -----------------06.12.99 14:37-------------------
+
+ --------------------------------------------------*/
+BibDataManager* BibliographyLoader::GetDataManager()const
+{
+ if(!pDatMan)
+ {
+ if(!pBibMod)
+ ((BibliographyLoader*)this)->pBibMod = OpenBibModul();
+ ((BibliographyLoader*)this)->pDatMan = (*pBibMod)->createDataManager();
+ ((BibliographyLoader*)this)->xDatMan = pDatMan;
+ }
+ return pDatMan;
+}
+/* -----------------06.12.99 14:39-------------------
+
+ --------------------------------------------------*/
+Reference< container::XNameAccess > BibliographyLoader::GetDataColumns() const
+{
+ if (!xColumns.is())
+ {
+ Reference< XMultiServiceFactory > xMgr = utl::getProcessServiceFactory();
+ Reference< XRowSet > xRowSet(xMgr->createInstance(C2U("com.sun.star.sdb.RowSet")), UNO_QUERY);
+ Reference< XPropertySet > xResultSetProps(xRowSet, UNO_QUERY);
+ DBG_ASSERT(xResultSetProps.is() , "BibliographyLoader::GetDataCursor : invalid row set (no XResultSet or no XPropertySet) !");
+
+ String sTableName;
+ rtl::OUString aBibUrl = BibModul::GetBibliographyURL(&sTableName);
+
+ Any aBibUrlAny; aBibUrlAny <<= aBibUrl;
+ xResultSetProps->setPropertyValue(C2U("DataSourceName"), aBibUrlAny);
+ Any aCommandType; aCommandType <<= (sal_Int32)(CommandType::TABLE);
+ xResultSetProps->setPropertyValue(C2U("CommandType"), aCommandType);
+ Any aTableName; aTableName <<= OUString(sTableName);
+ xResultSetProps->setPropertyValue(C2U("Command"), aTableName);
+ Any aResultSetType; aResultSetType <<= (sal_Int32)(ResultSetType::SCROLL_INSENSITIVE);
+ xResultSetProps->setPropertyValue(C2U("ResultSetType"), aResultSetType);
+ Any aResultSetCurrency; aResultSetCurrency <<= (sal_Int32)(ResultSetConcurrency::UPDATABLE);
+ xResultSetProps->setPropertyValue(C2U("ResultSetConcurrency"), aResultSetCurrency);
+
+ sal_Bool bSuccess = sal_False;
+ try
+ {
+ xRowSet->execute();
+ bSuccess = sal_True;
+ }
+ catch(SQLException& e)
+ {
+#ifdef DBG_UTIL
+ // TODO : show a real error message
+ String sMsg(String::CreateFromAscii("BibliographyLoader::GetDataCursor : could not execute the result set (catched an SQL-exception"));
+ sMsg += String(e.Message);
+ sMsg.AppendAscii(") !");
+ DBG_ERROR( ByteString(sMsg, RTL_TEXTENCODING_ASCII_US ).GetBuffer());
+#endif
+ }
+ catch(...)
+ {
+ DBG_ERROR("BibliographyLoader::GetDataCursor : could not execute the result set !");
+ bSuccess = sal_False;
+ }
+
+ if (!bSuccess)
+ {
+ Reference< XComponent > xSetComp(xRowSet, UNO_QUERY);
+ if (xSetComp.is())
+ xSetComp->dispose();
+ xRowSet = NULL;
+ }
+ else
+ ((BibliographyLoader*)this)->xCursor = xRowSet.get();
+
+ Reference< sdbcx::XColumnsSupplier > xSupplyCols(xCursor, UNO_QUERY);
+ if (xSupplyCols.is())
+ ((BibliographyLoader*)this)->xColumns = xSupplyCols->getColumns();
+ }
+
+ return xColumns;
+}
+/* -----------------17.12.99 12:29-------------------
+
+ --------------------------------------------------*/
+Reference< sdb::XColumn > BibliographyLoader::GetIdentifierColumn() const
+{
+ BibDataManager* pDatMan = GetDataManager();
+ Reference< container::XNameAccess > xColumns = GetDataColumns();
+ rtl::OUString sIdentifierColumnName = pDatMan->GetIdentifierMapping();
+
+ Reference< sdb::XColumn > xReturn;
+ if (xColumns.is() && xColumns->hasByName(sIdentifierColumnName))
+ {
+ xReturn = Reference< XColumn > (*(Reference< XInterface > *)
+ xColumns->getByName(sIdentifierColumnName).getValue(), UNO_QUERY);
+ }
+ return xReturn;
+}
+
+/* -----------------06.12.99 15:05-------------------
+
+ --------------------------------------------------*/
+Reference< XResultSet > BibliographyLoader::GetDataCursor() const
+{
+ if (!xCursor.is())
+ GetDataColumns();
+ if (xCursor.is())
+ xCursor->first();
+ return xCursor;
+}
+
+/*-- 17.11.99 12:51:38---------------------------------------------------
+
+ -----------------------------------------------------------------------*/
+rtl::OUString lcl_AddProperty(Reference< container::XNameAccess > xColumns,
+ const Mapping* pMapping, const String& rColumnName)
+{
+ String sColumnName(rColumnName);
+ if(pMapping)
+ {
+ for(sal_uInt16 nEntry = 0; nEntry < COLUMN_COUNT; nEntry++)
+ {
+ if(pMapping->aColumnPairs[nEntry].sLogicalColumnName == rColumnName)
+ {
+ sColumnName = pMapping->aColumnPairs[nEntry].sRealColumnName;
+ break;
+ }
+ }
+ }
+ rtl::OUString uColumnName(sColumnName);
+ rtl::OUString uRet;
+ Reference< sdb::XColumn > xCol;
+ if (xColumns->hasByName(uColumnName))
+ xCol = Reference< sdb::XColumn > (*(Reference< XInterface > *)xColumns->getByName(uColumnName).getValue(), UNO_QUERY);
+ if (xCol.is())
+ uRet = xCol->getString();
+ return uRet;
+}
+//-----------------------------------------------------------------------------
+Any BibliographyLoader::getByName(const rtl::OUString& rName) throw
+ ( container::NoSuchElementException, WrappedTargetException, RuntimeException )
+{
+ Any aRet;
+ try
+ {
+ BibDataManager* pDatMan = ((BibliographyLoader*)this)->GetDataManager();
+ Reference< XResultSet > xCursor = GetDataCursor();
+ Reference< sdbcx::XColumnsSupplier > xSupplyCols(xCursor, UNO_QUERY);
+ Reference< container::XNameAccess > xColumns;
+ if (!xSupplyCols.is())
+ return aRet;
+ xColumns = xSupplyCols->getColumns();
+ DBG_ASSERT(xSupplyCols.is(), "BibliographyLoader::getByName : invalid columns returned by the data cursor (may be the result set is not alive ?) !");
+ if (!xColumns.is())
+ return aRet;
+
+ String sIdentifierMapping = pDatMan->GetIdentifierMapping();
+ rtl::OUString sId = sIdentifierMapping;
+ Reference< sdb::XColumn > xColumn;
+ if (xColumns->hasByName(sId))
+ xColumn = Reference< sdb::XColumn > (*(Reference< XInterface > *)xColumns->getByName(sId).getValue(), UNO_QUERY);
+ if (xColumn.is())
+ {
+ do
+ {
+ if ((rName == xColumn->getString()) && !xColumn->wasNull())
+ {
+ Sequence<PropertyValue> aPropSequ(COLUMN_COUNT);
+ PropertyValue* pValues = aPropSequ.getArray();
+ String sTableName;
+ rtl::OUString aBibUrl = BibModul::GetBibliographyURL(&sTableName);
+ const Mapping* pMapping = pDatMan->GetMapping(sTableName, &aBibUrl);
+ for(sal_uInt16 nEntry = 0; nEntry < COLUMN_COUNT; nEntry++)
+ {
+ const String sColName = pDatMan->GetDefColumnName(
+ nEntry);
+ pValues[nEntry].Name = sColName;
+ pValues[nEntry].Value <<= lcl_AddProperty(xColumns, pMapping, sColName);
+ }
+ aRet.setValue(&aPropSequ, ::getCppuType((Sequence<PropertyValue>*)0));
+
+ break;
+ }
+ }
+ while(xCursor->next());
+ }
+ }
+ catch(...)
+ {
+ DBG_ERROR("Exception in BibliographyLoader::getByName")
+ }
+ return aRet;
+}
+/*-- 17.11.99 12:51:39---------------------------------------------------
+
+ -----------------------------------------------------------------------*/
+Sequence< rtl::OUString > BibliographyLoader::getElementNames(void) throw ( RuntimeException )
+{
+ Sequence< rtl::OUString > aRet(10);
+ int nRealNameCount = 0;
+ try
+ {
+ BibDataManager* pDatMan = ((BibliographyLoader*)this)->GetDataManager();
+
+ Reference< XResultSet > xCursor(GetDataCursor());
+ Reference< sdb::XColumn > xIdColumn(GetIdentifierColumn());
+ if (xIdColumn.is()) // implies xCursor.is()
+ {
+ do
+ {
+ rtl::OUString sTemp = xIdColumn->getString();
+ if (sTemp.len() && !xIdColumn->wasNull())
+ {
+ int nLen = aRet.getLength();
+ if (nLen = nRealNameCount)
+ aRet.realloc(nLen + 10);
+ rtl::OUString* pArray = aRet.getArray();
+ pArray[nRealNameCount] = sTemp;
+ nRealNameCount++;
+ }
+ }
+ while (xCursor->next());
+ }
+ }
+ catch(...)
+ {
+ DBG_ERROR("Exception in BibliographyLoader::getElementNames")
+ }
+
+ aRet.realloc(nRealNameCount);
+ return aRet;
+}
+/*-- 17.11.99 12:51:39---------------------------------------------------
+
+ -----------------------------------------------------------------------*/
+sal_Bool BibliographyLoader::hasByName(const rtl::OUString& rName) throw ( RuntimeException )
+{
+ sal_Bool bRet = sal_False;
+ try
+ {
+ BibDataManager* pDatMan = GetDataManager();
+ Reference< XResultSet > xCursor = GetDataCursor();
+ Reference< sdb::XColumn > xIdColumn = GetIdentifierColumn();
+
+ if (xIdColumn.is()) // implies xCursor.is()
+ {
+ do
+ {
+ rtl::OUString sCurrentId = xIdColumn->getString();
+ if (!xIdColumn->wasNull() && (rName.compareTo(sCurrentId) == COMPARE_EQUAL))
+ {
+ bRet = sal_True;
+ break;
+ }
+ }
+ while(xCursor->next());
+ }
+ }
+ catch(...)
+ {
+ DBG_ERROR("Exception in BibliographyLoader::getElementNames")
+ }
+ return bRet;
+}
+/*-- 17.11.99 12:51:39---------------------------------------------------
+
+ -----------------------------------------------------------------------*/
+Type BibliographyLoader::getElementType(void) throw ( RuntimeException )
+{
+ return ::getCppuType((Sequence<PropertyValue>*)0);
+}
+/*-- 17.11.99 12:51:40---------------------------------------------------
+
+ -----------------------------------------------------------------------*/
+sal_Bool BibliographyLoader::hasElements(void) throw ( RuntimeException )
+{
+ Reference< XResultSet > xCursor = GetDataCursor();
+ Reference< container::XNameAccess > xColumns = GetDataColumns();
+ return xColumns.is() && (xColumns->getElementNames().getLength() != 0);
+}
+
+/*-- 07.12.99 14:28:39---------------------------------------------------
+
+ -----------------------------------------------------------------------*/
+Reference< XPropertySetInfo > BibliographyLoader::getPropertySetInfo(void) throw
+ ( RuntimeException )
+{
+ static SfxItemPropertyMap aBibProps_Impl[] =
+ {
+ { MAP_CHAR_LEN("BibliographyDataFieldNames"), 0, &::getCppuType((Sequence<PropertyValue>*)0), PropertyAttribute::READONLY, 0},
+ {0,0,0,0}
+ };
+ static Reference< XPropertySetInfo > xRet =
+ SfxItemPropertySet(aBibProps_Impl).getPropertySetInfo();
+ return xRet;
+}
+/*-- 07.12.99 14:28:39---------------------------------------------------
+
+ -----------------------------------------------------------------------*/
+void BibliographyLoader::setPropertyValue(const rtl::OUString& PropertyName,
+ const Any& aValue)
+ throw( UnknownPropertyException, PropertyVetoException,
+ IllegalArgumentException, WrappedTargetException, RuntimeException)
+{
+ throw UnknownPropertyException();
+ //no changeable properties
+}
+/*-- 07.12.99 14:28:39---------------------------------------------------
+
+ -----------------------------------------------------------------------*/
+Any BibliographyLoader::getPropertyValue(const rtl::OUString& rPropertyName)
+ throw( UnknownPropertyException, WrappedTargetException, RuntimeException )
+{
+ Any aRet;
+ static const sal_uInt16 aInternalMapping[] =
+ {
+ IDENTIFIER_POS , // BibliographyDataField_IDENTIFIER
+ AUTHORITYTYPE_POS , // BibliographyDataField_BIBILIOGRAPHIC_TYPE
+ ADDRESS_POS , // BibliographyDataField_ADDRESS
+ ANNOTE_POS , // BibliographyDataField_ANNOTE
+ AUTHOR_POS , // BibliographyDataField_AUTHOR
+ BOOKTITLE_POS , // BibliographyDataField_BOOKTITLE
+ CHAPTER_POS , // BibliographyDataField_CHAPTER
+ EDITION_POS , // BibliographyDataField_EDITION
+ EDITOR_POS , // BibliographyDataField_EDITOR
+ HOWPUBLISHED_POS , // BibliographyDataField_HOWPUBLISHED
+ INSTITUTION_POS , // BibliographyDataField_INSTITUTION
+ JOURNAL_POS , // BibliographyDataField_JOURNAL
+ MONTH_POS , // BibliographyDataField_MONTH
+ NOTE_POS , // BibliographyDataField_NOTE
+ NUMBER_POS , // BibliographyDataField_NUMBER
+ ORGANIZATIONS_POS , // BibliographyDataField_ORGANIZATIONS
+ PAGES_POS , // BibliographyDataField_PAGES
+ PUBLISHER_POS , // BibliographyDataField_PUBLISHER
+ SCHOOL_POS , // BibliographyDataField_SCHOOL
+ SERIES_POS , // BibliographyDataField_SERIES
+ TITLE_POS , // BibliographyDataField_TITLE
+ REPORTTYPE_POS , // BibliographyDataField_REPORT_TYPE
+ VOLUME_POS , // BibliographyDataField_VOLUME
+ YEAR_POS , // BibliographyDataField_YEAR
+ URL_POS , // BibliographyDataField_URL
+ CUSTOM1_POS , // BibliographyDataField_CUSTOM1
+ CUSTOM2_POS , // BibliographyDataField_CUSTOM2
+ CUSTOM3_POS , // BibliographyDataField_CUSTOM3
+ CUSTOM4_POS , // BibliographyDataField_CUSTOM4
+ CUSTOM5_POS , // BibliographyDataField_CUSTOM5
+ ISBN_POS //BibliographyDataField_ISBN
+ };
+ if(C2U("BibliographyDataFieldNames") == rPropertyName)
+ {
+ Sequence<PropertyValue> aSeq(COLUMN_COUNT);
+ PropertyValue* pArray = aSeq.getArray();
+ BibDataManager* pDatMan = GetDataManager();
+ for(sal_uInt16 i = 0; i <= text::BibliographyDataField::ISBN ; i++)
+ {
+ pArray[i].Name = pDatMan->GetDefColumnName(aInternalMapping[i]);
+ pArray[i].Value <<= (sal_Int16) i;
+ }
+ aRet.setValue(&aSeq, ::getCppuType((Sequence<PropertyValue>*)0));
+ }
+ else
+ throw UnknownPropertyException();
+ return aRet;
+}
+/*-- 07.12.99 14:28:40---------------------------------------------------
+
+ -----------------------------------------------------------------------*/
+void BibliographyLoader::addPropertyChangeListener(
+ const rtl::OUString& PropertyName, const Reference< XPropertyChangeListener > & aListener)
+ throw( UnknownPropertyException, WrappedTargetException, RuntimeException )
+{
+ //no bound properties
+}
+/*-- 07.12.99 14:28:40---------------------------------------------------
+
+ -----------------------------------------------------------------------*/
+void BibliographyLoader::removePropertyChangeListener(
+ const rtl::OUString& PropertyName, const Reference< XPropertyChangeListener > & aListener)
+ throw( UnknownPropertyException, WrappedTargetException, RuntimeException )
+{
+ //no bound properties
+}
+/*-- 07.12.99 14:28:40---------------------------------------------------
+
+ -----------------------------------------------------------------------*/
+void BibliographyLoader::addVetoableChangeListener(
+ const rtl::OUString& PropertyName, const Reference< XVetoableChangeListener > & aListener)
+ throw( UnknownPropertyException, WrappedTargetException, RuntimeException )
+{
+ //no vetoable properties
+}
+/*-- 07.12.99 14:28:40---------------------------------------------------
+
+ -----------------------------------------------------------------------*/
+void BibliographyLoader::removeVetoableChangeListener(
+ const rtl::OUString& PropertyName, const Reference< XVetoableChangeListener > & aListener)
+ throw( UnknownPropertyException, WrappedTargetException, RuntimeException )
+{
+ //no vetoable properties
+}
+
+
+
diff --git a/extensions/source/bibliography/bibmod.cxx b/extensions/source/bibliography/bibmod.cxx
new file mode 100644
index 000000000000..97cf120a2cd2
--- /dev/null
+++ b/extensions/source/bibliography/bibmod.cxx
@@ -0,0 +1,409 @@
+/*************************************************************************
+ *
+ * $RCSfile: bibmod.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:16:44 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+
+#include <tools/resmgr.hxx>
+#include <svtools/iniprop.hxx>
+#include <svtools/iniman.hxx>
+#ifndef _URLOBJ_HXX
+#include <tools/urlobj.hxx>
+#endif
+#ifndef SVTOOLS_URIHELPER_HXX
+#include <svtools/urihelper.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
+#include <com/sun/star/container/XNameAccess.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_XLOCALIZEDALIASES_HPP_
+#include <com/sun/star/util/XLocalizedAliases.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XLOCALIZABLE_HPP_
+#include <com/sun/star/lang/XLocalizable.hpp>
+#endif
+
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+
+#ifndef _UNOTOOLS_PROCESSFACTORY_HXX_
+#include <unotools/processfactory.hxx>
+#endif
+#include "bibmod.hxx"
+#include "bibresid.hxx"
+#include "registry.hxx"
+#include "datman.hxx"
+static PtrBibModul pBibModul=NULL;
+static nBibModulCount=0;
+
+#ifndef _UCBHELPER_CONTENT_HXX
+#include <ucbhelper/content.hxx>
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::util;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::ucb;
+
+#define C2U(cChar) OUString::createFromAscii(cChar)
+#define C2S(cChar) String::CreateFromAscii(cChar)
+
+HdlBibModul OpenBibModul()
+{
+ if(pBibModul==NULL)
+ {
+ pBibModul=new BibModul();
+ }
+ nBibModulCount++;
+ return &pBibModul;
+}
+
+void CloseBibModul(HdlBibModul ppBibModul)
+{
+ nBibModulCount--;
+ if(nBibModulCount==0 && ppBibModul!=NULL)
+ {
+ delete pBibModul;
+ pBibModul=NULL;
+ }
+}
+
+/*PtrBibModul GetBibModul()
+{
+ return pBibModul;
+} */
+
+BibResId::BibResId( sal_uInt16 nId ) :
+ ResId( nId, pBibModul->GetResMgr() )
+{
+}
+
+BibModul::BibModul()
+{
+ pResMgr = ResMgr::CreateResMgr( "bib" MAKE_NUMSTR(SUPD) );
+ pRegistry = new BibRegistry();
+ xRegistry = pRegistry;
+}
+
+BibModul::~BibModul()
+{
+ delete pResMgr;
+ xRegistry = 0;
+ //delete pRegistry;
+}
+
+BibDataManager* BibModul::createDataManager()
+{
+ return new BibDataManager(pRegistry);
+}
+//-----------------------------------------------------------------------------
+String BibModul::GetBibliographyURL(String* pTableName)
+{
+ String aURL;
+ SfxAppIniManagerProperty aProp;
+ GetpApp()->Property( aProp );
+ SfxIniManager* pIniMan = aProp.GetIniManager();
+ if( !pIniMan )
+ return String();
+
+ String aBib = pIniMan->Get( C2S(BIBLIOGRAPHY_INI_GROUP),
+ sal_False, sal_False,
+ C2S(BIBLIOGRAPHY_INI_CUR_NAME));
+ sal_Bool bCorrect = sal_False;
+ if(aBib.Len())
+ {
+ aURL = aBib.GetToken( 0, ';' );
+ aURL = pIniMan->SubstPathVars( aURL );
+ aURL = URIHelper::SmartRelToAbs(aURL);
+
+ INetURLObject aTmpURL(aURL);
+ BOOL bExist = FALSE;
+ if(aTmpURL.GetProtocol() == INET_PROT_FILE)
+ try
+ {
+ bExist = ::ucb::Content(
+ aTmpURL.GetMainURL(), uno::Reference< XCommandEnvironment >()).isDocument();
+ }
+ catch(...){}
+
+ if(bExist)
+ {
+ bCorrect = sal_True;
+ if(pTableName)
+ *pTableName = aBib.GetToken( 1, ';' );
+ }
+ }
+ if(!bCorrect)
+ {
+ //if there's no entry defined take the first *.sdb from the database favorites
+ try
+ {
+ uno::Reference< lang::XMultiServiceFactory > xMgr = utl::getProcessServiceFactory();
+ uno::Reference< container::XNameAccess > xDatabaseContext(xMgr->createInstance(
+ C2U("com.sun.star.sdb.DatabaseAccessContext") ), UNO_QUERY );
+// uno::Sequence<rtl::OUString> aFavorites;
+// if (xDatabaseContext.is())
+// aFavorites = xDatabaseContext->getElementNames();
+// if (aFavorites.getLength())
+// aURL = INetURLObject::SmartRelToAbs(U2S(aFavorites.getConstArray()[0]));
+ Reference<XLocalizedAliases> xAlias(xDatabaseContext, UNO_QUERY);
+ Reference<XLocalizable> xLocal(xDatabaseContext, UNO_QUERY);
+ Sequence< AliasProgrammaticPair > aAliasPairs =
+ xAlias->listAliases(xLocal->getLocale());
+ const AliasProgrammaticPair* pPairs = aAliasPairs.getConstArray();
+ for(INT32 nFav = 0; nFav < aAliasPairs.getLength(); nFav++)
+ {
+ String sURL = pPairs[nFav].ProgrammaticName;
+ aURL = URIHelper::SmartRelToAbs(sURL);
+ INetURLObject aTmpURL(aURL);
+ BOOL bExist = FALSE;
+ if(aTmpURL.GetProtocol() == INET_PROT_FILE)
+ try
+ {
+ bExist = ::ucb::Content(
+ aTmpURL.GetMainURL(), uno::Reference< XCommandEnvironment >()).isDocument();
+ }
+ catch(...){}
+
+ if(bExist)
+ break;
+ else
+ aURL.Erase();
+ }
+
+ }
+ catch(...)
+ {
+ DBG_ERROR("Exception in BibDataManager::DBChangeDialog_Impl::DBChangeDialog_Impl")
+ }
+
+ }
+ return aURL;
+}
+//-----------------------------------------------------------------------------
+void BibModul::SetBibliographyURL(const String& rURL, const String& rTable)
+{
+ SfxAppIniManagerProperty aProp;
+ GetpApp()->Property( aProp );
+ SfxIniManager* pIniMan = aProp.GetIniManager();
+ if( !pIniMan )
+ return;
+
+ String sEntry(rURL);
+ sEntry = pIniMan->UsePathVars( sEntry );
+
+ sEntry += ';';
+ sEntry += rTable;
+
+ pIniMan->WriteKey( C2S(BIBLIOGRAPHY_INI_GROUP),
+ C2S(BIBLIOGRAPHY_INI_CUR_NAME), sEntry);
+}
+
+// PropertyNames
+#define STATIC_USTRING(a,b) rtl::OUString a(b)
+STATIC_USTRING(FM_PROP_LABEL,C2U("Label"));
+STATIC_USTRING(FM_PROP_CONTROLSOURCE,C2U("DataField"));
+STATIC_USTRING(FM_PROP_NAME,C2U("Name"));
+STATIC_USTRING(FM_PROP_FORMATKEY,C2U("FormatKey"));
+#ifdef TF_SDBAPI
+#else // !TF_SDBAPI
+STATIC_USTRING(FM_PROP_EDITMODE,C2U("RecordMode"));
+STATIC_USTRING(FM_PROP_CURSORSOURCETYPE,C2U("DataSelectionType"));
+STATIC_USTRING(FM_PROP_CURSORSOURCE,C2U("DataSelection"));
+STATIC_USTRING(FM_PROP_DATASOURCE, C2U("DataSource"));
+#endif // !TF_SDBAPI
+STATIC_USTRING(FM_PROP_VALUE,C2U("Value"));
+STATIC_USTRING(FM_PROP_TEXT,C2U("Text"));
+/*
+
+STATIC_USTRING(FM_PROP_TABINDEX,C2U("TabIndex"));
+STATIC_USTRING(FM_PROP_TAG,C2U("Tag"));
+STATIC_USTRING(FM_PROP_CLASSID,C2U("ClassId"));
+STATIC_USTRING(FM_PROP_RECORDCOUNT,C2U("RecordCount"));
+STATIC_USTRING(FM_PROP_RECORDSTATUS,C2U("RecordStatus"));
+STATIC_USTRING(FM_PROP_RECORDCOUNTFINAL,C2U("IsRecordCountFinal"));
+STATIC_USTRING(FM_PROP_CANINSERT,C2U("CanInsert"));
+STATIC_USTRING(FM_PROP_CANUPDATE,C2U("CanUpdate"));
+STATIC_USTRING(FM_PROP_CANDELETE,C2U("CanDelete"));
+STATIC_USTRING(FM_PROP_NAVIGATION,C2U("NavigationBarMode"));
+STATIC_USTRING(FM_PROP_HASNAVIGATION,C2U("HasNavigationBar"));
+STATIC_USTRING(FM_PROP_CYCLE,C2U("Cycle"));
+STATIC_USTRING(FM_PROP_ENABLED,C2U("Enabled"));
+STATIC_USTRING(FM_PROP_READONLY,C2U("ReadOnly"));
+STATIC_USTRING(FM_PROP_ISREADONLY,C2U("IsReadOnly"));
+STATIC_USTRING(FM_PROP_FILTER_CRITERIA,C2U("Filter"));
+STATIC_USTRING(FM_PROP_SORT_CRITERIA,C2U("SortOrder"));
+STATIC_USTRING(FM_PROP_ISREQUIRED,C2U("IsRequired"));
+STATIC_USTRING(FM_PROP_AUTOINCREMENT,C2U("IsAutoIncrement"));
+STATIC_USTRING(FM_PROP_CACHESIZE,C2U("CacheSize"));
+STATIC_USTRING(FM_PROP_DATAENTRY,C2U("DataEntry"));
+STATIC_USTRING(FM_PROP_LASTDIRTY,C2U("LastUpdated"));
+STATIC_USTRING(FM_PROP_STATEMENT,C2U("Statement"));
+STATIC_USTRING(FM_PROP_WIDTH,C2U("Width"));
+STATIC_USTRING(FM_PROP_SEARCHINFO,C2U("SearchInfo"));
+STATIC_USTRING(FM_PROP_MULTILINE,C2U("MultiLine"));
+STATIC_USTRING(FM_PROP_TARGET_URL,C2U("TargetURL"));
+STATIC_USTRING(FM_PROP_TARGET_FRAME,C2U("TargetFrame"));
+STATIC_USTRING(FM_PROP_DEFAULTCONTROL,C2U("DefaultControl"));
+STATIC_USTRING(FM_PROP_MAXTEXTLEN,C2U("MaxTextLen"));
+STATIC_USTRING(FM_PROP_EDITMASK,C2U("EditMask"));
+STATIC_USTRING(FM_PROP_SIZE,C2U("Size"));
+STATIC_USTRING(FM_PROP_SPIN,C2U("Spin"));
+STATIC_USTRING(FM_PROP_DATE,C2U("Date"));
+STATIC_USTRING(FM_PROP_TIME,C2U("Time"));
+STATIC_USTRING(FM_PROP_STATE,C2U("State"));
+STATIC_USTRING(FM_PROP_TRISTATE,C2U("TriState"));
+STATIC_USTRING(FM_PROP_HIDDEN_VALUE, C2U("HiddenValue"));
+STATIC_USTRING(FM_PROP_BUTTONTYPE,C2U("ButtonType"));
+STATIC_USTRING(FM_PROP_STRINGITEMLIST,C2U("StringItemList"));
+STATIC_USTRING(FM_PROP_DEFAULT_TEXT,C2U("DefaultText"));
+STATIC_USTRING(FM_PROP_DEFAULTCHECKED,C2U("DefaultState"));
+STATIC_USTRING(FM_PROP_FORMATSSUPPLIER,C2U("FormatsSupplier"));
+STATIC_USTRING(FM_PROP_SUBMIT_ACTION,C2U("SubmitAction"));
+STATIC_USTRING(FM_PROP_SUBMIT_TARGET,C2U("SubmitTarget"));
+STATIC_USTRING(FM_PROP_SUBMIT_METHOD,C2U("SubmitMethod"));
+STATIC_USTRING(FM_PROP_SUBMIT_ENCODING,C2U("SubmitEncoding"));
+STATIC_USTRING(FM_PROP_IMAGE_URL,C2U("ImageURL"));
+STATIC_USTRING(FM_PROP_EMPTY_IS_NULL,C2U("ConvertEmptyToNull"));
+STATIC_USTRING(FM_PROP_LISTSOURCETYPE,C2U("ListSourceType"));
+STATIC_USTRING(FM_PROP_LISTSOURCE,C2U("ListSource"));
+STATIC_USTRING(FM_PROP_SELECT_SEQ,C2U("SelectedItems"));
+STATIC_USTRING(FM_PROP_VALUE_SEQ,C2U("SelectedValues"));
+STATIC_USTRING(FM_PROP_DEFAULT_SELECT_SEQ,C2U("DefaultSelection"));
+STATIC_USTRING(FM_PROP_MULTISELECTION,C2U("MultiSelection"));
+STATIC_USTRING(FM_PROP_ALIGN,C2U("Align"));
+STATIC_USTRING(FM_PROP_DEFAULT_DATE,C2U("DefaultDate"));
+STATIC_USTRING(FM_PROP_DEFAULT_TIME,C2U("DefaultTime"));
+STATIC_USTRING(FM_PROP_DEFAULT_VALUE,C2U("DefaultValue"));
+STATIC_USTRING(FM_PROP_DECIMAL_ACCURACY,C2U("DecimalAccuracy"));
+STATIC_USTRING(FM_PROP_FIELDTYPE,C2U("Type"));
+STATIC_USTRING(FM_PROP_DECIMALS,C2U("Decimals"));
+STATIC_USTRING(FM_PROP_REFVALUE,C2U("RefValue"));
+STATIC_USTRING(FM_PROP_VALUEMIN,C2U("ValueMin"));
+STATIC_USTRING(FM_PROP_VALUEMAX,C2U("ValueMax"));
+STATIC_USTRING(FM_PROP_STRICTFORMAT,C2U("StrictFormat"));
+STATIC_USTRING(FM_PROP_ALLOWADDITIONS,C2U("AllowInserts"));
+STATIC_USTRING(FM_PROP_ALLOWEDITS,C2U("AllowUpdates"));
+STATIC_USTRING(FM_PROP_ALLOWDELETIONS,C2U("AllowDeletes"));
+STATIC_USTRING(FM_PROP_MASTERFIELDS,C2U("MasterFields"));
+STATIC_USTRING(FM_PROP_SLAVEFIELDS,C2U("SlaveFields"));
+STATIC_USTRING(FM_PROP_ISPASSTHROUGH,C2U("IsPassThrough"));
+STATIC_USTRING(FM_PROP_QUERY,C2U("Query"));
+STATIC_USTRING(FM_PROP_LITERALMASK,C2U("LiteralMask"));
+STATIC_USTRING(FM_PROP_VALUESTEP,C2U("ValueStep"));
+STATIC_USTRING(FM_PROP_SHOWTHOUSANDSEP,C2U("ShowThousandsSeparator"));
+STATIC_USTRING(FM_PROP_CURRENCYSYMBOL,C2U("CurrencySymbol"));
+STATIC_USTRING(FM_PROP_DATEFORMAT,C2U("DateFormat"));
+STATIC_USTRING(FM_PROP_DATEMIN,C2U("DateMin"));
+STATIC_USTRING(FM_PROP_DATEMAX,C2U("DateMax"));
+STATIC_USTRING(FM_PROP_DATE_SHOW_CENTURY,C2U("DateShowCentury"));
+STATIC_USTRING(FM_PROP_TIMEFORMAT, C2U("TimeFormat"));
+STATIC_USTRING(FM_PROP_TIMEMIN, C2U("TimeMin"));
+STATIC_USTRING(FM_PROP_TIMEMAX,C2U("TimeMax"));
+STATIC_USTRING(FM_PROP_LINECOUNT,C2U("LineCount"));
+STATIC_USTRING(FM_PROP_BOUNDCOLUMN, C2U("BoundColumn"));
+STATIC_USTRING(FM_PROP_FONT,C2U("FontDescriptor"));
+STATIC_USTRING(FM_PROP_BACKGROUNDCOLOR,C2U("BackgroundColor"));
+STATIC_USTRING(FM_PROP_FILLCOLOR,C2U("FillColor"));
+STATIC_USTRING(FM_PROP_TEXTCOLOR,C2U("TextColor"));
+STATIC_USTRING(FM_PROP_LINECOLOR,C2U("LineColor"));
+STATIC_USTRING(FM_PROP_BORDER,C2U("Border"));
+STATIC_USTRING(FM_PROP_DROPDOWN,C2U("Dropdown"));
+STATIC_USTRING(FM_PROP_MULTI,C2U("Multi"));
+STATIC_USTRING(FM_PROP_HSCROLL,C2U("HScroll"));
+STATIC_USTRING(FM_PROP_VSCROLL,C2U("VScroll"));
+STATIC_USTRING(FM_PROP_TABSTOP,C2U("Tabstop"));
+STATIC_USTRING(FM_PROP_AUTOCOMPLETE,C2U("Autocomplete"));
+STATIC_USTRING(FM_PROP_HARDLINEBREAKS,C2U("HardLineBreaks"));
+STATIC_USTRING(FM_PROP_PRINTABLE,C2U("Printable"));
+STATIC_USTRING(FM_PROP_ECHO_CHAR,C2U("EchoChar"));
+STATIC_USTRING(FM_PROP_ROWHEIGHT,C2U("RowHeight"));
+STATIC_USTRING(FM_PROP_HELPTEXT, C2U("HelpText"));
+STATIC_USTRING(FM_PROP_FONT_NAME, C2U("FontName"));
+STATIC_USTRING(FM_PROP_FONT_STYLENAME, C2U("FontStyleName"));
+STATIC_USTRING(FM_PROP_FONT_FAMILY, C2U("FontFamily"));
+STATIC_USTRING(FM_PROP_FONT_CHARSET, C2U("FontCharset"));
+STATIC_USTRING(FM_PROP_FONT_HEIGHT, C2U("FontHeight"));
+STATIC_USTRING(FM_PROP_FONT_WEIGHT, C2U("FontWeight"));
+STATIC_USTRING(FM_PROP_FONT_SLANT, C2U("FontSlant"));
+STATIC_USTRING(FM_PROP_FONT_UNDERLINE, C2U("FontUnderline"));
+STATIC_USTRING(FM_PROP_FONT_STRIKEOUT, C2U("FontStrikeout"));
+STATIC_USTRING(FM_PROP_HELPURL, C2U("HelpURL"));
+STATIC_USTRING(FM_PROP_RECORDMARKER, C2U("HasRecordMarker"));
+STATIC_USTRING(FM_PROP_BOUNDFIELD, C2U("BoundField"));
+STATIC_USTRING(FM_PROP_TREATASNUMERIC, C2U("TreatAsNumber"));
+STATIC_USTRING(FM_PROP_EFFECTIVE_VALUE, C2U("EffectiveValue"));
+STATIC_USTRING(FM_PROP_EFFECTIVE_DEFAULT, C2U("EffectiveDefault"));
+STATIC_USTRING(FM_PROP_EFFECTIVE_MIN, C2U("EffectiveMin"));
+STATIC_USTRING(FM_PROP_EFFECTIVE_MAX, C2U("EffectiveMax"));
+STATIC_USTRING(FM_PROP_HIDDEN, C2U("Hidden"));
+STATIC_USTRING(FM_PROP_FILTERPROPOSAL, C2U("useFilterValueProposal"));
+STATIC_USTRING(FM_PROP_FIELDSOURCE, C2U("FieldSource"));
+STATIC_USTRING(FM_PROP_TABLENAME, C2U("TableName"));
+STATIC_USTRING(FM_PROP_FILTERSUPPLIER, C2U("FilterSupplier"));
+STATIC_USTRING(FM_PROP_CURRENTFILTER, C2U("CurrentFilter"));
+STATIC_USTRING(FM_PROP_SELECTED_FIELDS, C2U("SelectedFields"));
+STATIC_USTRING(FM_PROP_SELECTED_TABLES, C2U("SelectedTables"));
+STATIC_USTRING(FM_PROP_THREADSAFE, C2U("ThreadSafe"));
+*/
+
diff --git a/extensions/source/bibliography/bibmod.hxx b/extensions/source/bibliography/bibmod.hxx
new file mode 100644
index 000000000000..306ede67bb3b
--- /dev/null
+++ b/extensions/source/bibliography/bibmod.hxx
@@ -0,0 +1,113 @@
+/*************************************************************************
+ *
+ * $RCSfile: bibmod.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:16:44 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef ADDRMOD_HXX
+#define ADDRMOD_HXX
+
+
+#ifndef _COM_SUN_STAR_REGISTRY_MERGECONFLICTEXCEPTION_HPP_
+#include <com/sun/star/registry/MergeConflictException.hpp>
+#endif
+#ifndef _COM_SUN_STAR_REGISTRY_XSIMPLEREGISTRY_HPP_
+#include <com/sun/star/registry/XSimpleRegistry.hpp>
+#endif
+
+class ResMgr;
+class BibDataManager;
+class BibRegistry;
+
+#define BIBLIOGRAPHY_INI_GROUP "Bibliography"
+#define BIBLIOGRAPHY_INI_CUR_NAME "BibliographyCurrent"
+#define BIBLIOGRAPHY_INI_DB_ENTRY "Bibliography"
+#define BIBLIOGRAPHY_INI_MAPPING "BibliographyFields"
+#define BIBLIOGRAPHY_TYPE_NAMES "BibliographyTypeNames"
+
+class BibModul
+{
+ private:
+ ResMgr* pResMgr;
+ BibRegistry* pRegistry;
+ ::com::sun::star::uno::Reference< ::com::sun::star::registry::XSimpleRegistry > xRegistry;
+
+ public:
+ BibModul();
+ ~BibModul();
+
+ ResMgr* GetResMgr(){return pResMgr;}
+
+ static String GetBibliographyURL(String* pTableName);
+ static void SetBibliographyURL(const String& rURL, const String& rTable);
+
+ BibDataManager* createDataManager();
+
+};
+
+typedef BibModul* PtrBibModul;
+typedef PtrBibModul* HdlBibModul;
+
+HdlBibModul OpenBibModul();
+void CloseBibModul(HdlBibModul ppBibModul);
+
+//PtrBibModul GetBibModul();
+
+
+
+#endif
diff --git a/extensions/source/bibliography/bibprop.hrc b/extensions/source/bibliography/bibprop.hrc
new file mode 100644
index 000000000000..8d6919bd5b0a
--- /dev/null
+++ b/extensions/source/bibliography/bibprop.hrc
@@ -0,0 +1,211 @@
+/*************************************************************************
+ *
+ * $RCSfile: bibprop.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:16:44 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _BIB_FMPROP_HRC
+#define _BIB_FMPROP_HRC
+
+extern rtl::OUString FM_PROP_LABEL;
+extern rtl::OUString FM_PROP_NAME;
+extern rtl::OUString FM_PROP_CONTROLSOURCE;
+extern rtl::OUString FM_PROP_FORMATKEY;
+extern rtl::OUString FM_PROP_VALUE;
+#ifdef TF_SDBAPI
+#else // !TF_SDBAPI
+extern rtl::OUString FM_PROP_EDITMODE;
+extern rtl::OUString FM_PROP_DATASOURCE;
+extern rtl::OUString FM_PROP_CURSORSOURCE;
+extern rtl::OUString FM_PROP_CURSORSOURCETYPE;
+#endif // !TF_SDBAPI
+extern rtl::OUString FM_PROP_TEXT;
+/*
+extern rtl::OUString FM_PROP_TAG;
+extern rtl::OUString FM_PROP_TABINDEX;
+extern rtl::OUString FM_PROP_CLASSID;
+extern rtl::OUString FM_PROP_ALIGN;
+extern rtl::OUString FM_PROP_RECORDCOUNT;
+extern rtl::OUString FM_PROP_RECORDSTATUS;
+extern rtl::OUString FM_PROP_RECORDCOUNTFINAL;
+extern rtl::OUString FM_PROP_VALUEMIN;
+extern rtl::OUString FM_PROP_VALUEMAX;
+extern rtl::OUString FM_PROP_VALUESTEP;
+extern rtl::OUString FM_PROP_CANINSERT;
+extern rtl::OUString FM_PROP_CANUPDATE;
+extern rtl::OUString FM_PROP_CANDELETE;
+extern rtl::OUString FM_PROP_NAVIGATION;
+extern rtl::OUString FM_PROP_CYCLE;
+extern rtl::OUString FM_PROP_ENABLED;
+extern rtl::OUString FM_PROP_SPIN;
+extern rtl::OUString FM_PROP_READONLY;
+extern rtl::OUString FM_PROP_FILTER_CRITERIA;
+extern rtl::OUString FM_PROP_SORT_CRITERIA;
+extern rtl::OUString FM_PROP_AUTOINCREMENT;
+extern rtl::OUString FM_PROP_CACHESIZE;
+extern rtl::OUString FM_PROP_DATAENTRY;
+extern rtl::OUString FM_PROP_LASTDIRTY;
+extern rtl::OUString FM_PROP_STATEMENT;
+extern rtl::OUString FM_PROP_WIDTH;
+extern rtl::OUString FM_PROP_SEARCHINFO;
+extern rtl::OUString FM_PROP_MULTILINE;
+extern rtl::OUString FM_PROP_TARGET_URL;
+extern rtl::OUString FM_PROP_DEFAULTCONTROL;
+extern rtl::OUString FM_PROP_MAXTEXTLEN;
+extern rtl::OUString FM_PROP_SIZE;
+extern rtl::OUString FM_PROP_DATE;
+extern rtl::OUString FM_PROP_TIME;
+extern rtl::OUString FM_PROP_STATE;
+extern rtl::OUString FM_PROP_TRISTATE;
+extern rtl::OUString FM_PROP_HIDDEN_VALUE;
+extern rtl::OUString FM_PROP_TARGET_FRAME;
+extern rtl::OUString FM_PROP_BUTTONTYPE;
+extern rtl::OUString FM_PROP_STRINGITEMLIST;
+extern rtl::OUString FM_PROP_DEFAULT_TEXT;
+extern rtl::OUString FM_PROP_DEFAULTCHECKED;
+extern rtl::OUString FM_PROP_DEFAULT_DATE;
+extern rtl::OUString FM_PROP_DEFAULT_TIME;
+extern rtl::OUString FM_PROP_DEFAULT_VALUE;
+extern rtl::OUString FM_PROP_FORMATSSUPPLIER;
+extern rtl::OUString FM_PROP_SUBMIT_ACTION;
+extern rtl::OUString FM_PROP_SUBMIT_TARGET;
+extern rtl::OUString FM_PROP_SUBMIT_METHOD;
+extern rtl::OUString FM_PROP_SUBMIT_ENCODING;
+extern rtl::OUString FM_PROP_IMAGE_URL;
+extern rtl::OUString FM_PROP_EMPTY_IS_NULL;
+extern rtl::OUString FM_PROP_LISTSOURCETYPE;
+extern rtl::OUString FM_PROP_LISTSOURCE;
+extern rtl::OUString FM_PROP_SELECT_SEQ;
+extern rtl::OUString FM_PROP_VALUE_SEQ;
+extern rtl::OUString FM_PROP_DEFAULT_SELECT_SEQ;
+extern rtl::OUString FM_PROP_MULTISELECTION;
+extern rtl::OUString FM_PROP_DECIMAL_ACCURACY;
+extern rtl::OUString FM_PROP_EDITMASK;
+extern rtl::OUString FM_PROP_ISREADONLY;
+extern rtl::OUString FM_PROP_ISREQUIRED;
+extern rtl::OUString FM_PROP_FIELDTYPE;
+extern rtl::OUString FM_PROP_DECIMALS;
+extern rtl::OUString FM_PROP_REFVALUE;
+extern rtl::OUString FM_PROP_STRICTFORMAT;
+extern rtl::OUString FM_PROP_ALLOWADDITIONS;
+extern rtl::OUString FM_PROP_ALLOWEDITS;
+extern rtl::OUString FM_PROP_ALLOWDELETIONS;
+extern rtl::OUString FM_PROP_MASTERFIELDS;
+extern rtl::OUString FM_PROP_SLAVEFIELDS;
+extern rtl::OUString FM_PROP_ISPASSTHROUGH;
+extern rtl::OUString FM_PROP_QUERY;
+extern rtl::OUString FM_PROP_LITERALMASK;
+extern rtl::OUString FM_PROP_SHOWTHOUSANDSEP;
+extern rtl::OUString FM_PROP_CURRENCYSYMBOL;
+extern rtl::OUString FM_PROP_DATEFORMAT;
+extern rtl::OUString FM_PROP_DATEMIN;
+extern rtl::OUString FM_PROP_DATEMAX;
+extern rtl::OUString FM_PROP_DATE_SHOW_CENTURY;
+extern rtl::OUString FM_PROP_TIMEFORMAT;
+extern rtl::OUString FM_PROP_TIMEMIN;
+extern rtl::OUString FM_PROP_TIMEMAX;
+extern rtl::OUString FM_PROP_LINECOUNT;
+extern rtl::OUString FM_PROP_BOUNDCOLUMN;
+extern rtl::OUString FM_PROP_HASNAVIGATION;
+extern rtl::OUString FM_PROP_FONT;
+extern rtl::OUString FM_PROP_BACKGROUNDCOLOR;
+extern rtl::OUString FM_PROP_FILLCOLOR;
+extern rtl::OUString FM_PROP_TEXTCOLOR;
+extern rtl::OUString FM_PROP_LINECOLOR;
+extern rtl::OUString FM_PROP_BORDER;
+extern rtl::OUString FM_PROP_DROPDOWN;
+extern rtl::OUString FM_PROP_MULTI;
+extern rtl::OUString FM_PROP_HSCROLL;
+extern rtl::OUString FM_PROP_VSCROLL;
+extern rtl::OUString FM_PROP_TABSTOP;
+extern rtl::OUString FM_PROP_AUTOCOMPLETE;
+extern rtl::OUString FM_PROP_HARDLINEBREAKS;
+extern rtl::OUString FM_PROP_PRINTABLE;
+extern rtl::OUString FM_PROP_ECHO_CHAR;
+extern rtl::OUString FM_PROP_ROWHEIGHT;
+extern rtl::OUString FM_PROP_HELPTEXT;
+extern rtl::OUString FM_PROP_FONT_NAME;
+extern rtl::OUString FM_PROP_FONT_STYLENAME;
+extern rtl::OUString FM_PROP_FONT_FAMILY;
+extern rtl::OUString FM_PROP_FONT_CHARSET;
+extern rtl::OUString FM_PROP_FONT_HEIGHT;
+extern rtl::OUString FM_PROP_FONT_WEIGHT;
+extern rtl::OUString FM_PROP_FONT_SLANT;
+extern rtl::OUString FM_PROP_FONT_UNDERLINE;
+extern rtl::OUString FM_PROP_FONT_STRIKEOUT;
+extern rtl::OUString FM_PROP_HELPURL;
+extern rtl::OUString FM_PROP_RECORDMARKER;
+extern rtl::OUString FM_PROP_BOUNDFIELD;
+extern rtl::OUString FM_PROP_TREATASNUMERIC;
+extern rtl::OUString FM_PROP_EFFECTIVE_VALUE;
+extern rtl::OUString FM_PROP_EFFECTIVE_DEFAULT;
+extern rtl::OUString FM_PROP_EFFECTIVE_MIN;
+extern rtl::OUString FM_PROP_EFFECTIVE_MAX;
+extern rtl::OUString FM_PROP_HIDDEN;
+extern rtl::OUString FM_PROP_FILTERPROPOSAL;
+extern rtl::OUString FM_PROP_FIELDSOURCE;
+extern rtl::OUString FM_PROP_TABLENAME;
+extern rtl::OUString FM_PROP_FILTERSUPPLIER;
+extern rtl::OUString FM_PROP_CURRENTFILTER;
+extern rtl::OUString FM_PROP_SELECTED_FIELDS;
+extern rtl::OUString FM_PROP_SELECTED_TABLES;
+extern rtl::OUString FM_PROP_THREADSAFE;
+*/
+
+
+#endif // _SVX_FMPROP_HRC
+
diff --git a/extensions/source/bibliography/bibresid.hxx b/extensions/source/bibliography/bibresid.hxx
new file mode 100644
index 000000000000..53bd3756f6e7
--- /dev/null
+++ b/extensions/source/bibliography/bibresid.hxx
@@ -0,0 +1,80 @@
+/*************************************************************************
+ *
+ * $RCSfile: bibresid.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:16:44 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef ADRRESID_HXX
+#define ADRRESID_HXX
+
+#ifndef _TOOLS_RESID_HXX //autogen
+#include <tools/resid.hxx>
+#endif
+
+//===================================================================
+
+class BibResId : public ResId
+{
+ public:
+ BibResId( USHORT nId );
+};
+
+
+
+#endif // ADRRESID_HXX
+
diff --git a/extensions/source/bibliography/bibview.cxx b/extensions/source/bibliography/bibview.cxx
new file mode 100644
index 000000000000..c2f551d5d258
--- /dev/null
+++ b/extensions/source/bibliography/bibview.cxx
@@ -0,0 +1,193 @@
+/*************************************************************************
+ *
+ * $RCSfile: bibview.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:16:44 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "bib.hrc"
+#include "bibcont.hxx"
+#include "bibbeam.hxx"
+#include "bibmod.hxx"
+#include "general.hxx"
+#include "bibview.hxx"
+#include "datman.hxx"
+#include "bibresid.hxx"
+#include "bibmod.hxx"
+#include "sections.hrc"
+#include "viewsect.hxx"
+
+
+#ifndef _SV_SVAPP_HXX
+#include <vcl/svapp.hxx>
+#endif
+#ifndef _COM_SUN_STAR_SDBC_XRESULTSETUPDATE_HPP_
+#include <com/sun/star/sdbc/XResultSetUpdate.hpp>
+#endif
+#ifndef _SV_MSGBOX_HXX
+#include <vcl/msgbox.hxx>
+#endif
+
+#ifndef _TOOLS_DEBUG_HXX //autogen wg. DBG_ASSERT
+#include <tools/debug.hxx>
+#endif
+
+#define DEFAULT_SIZE 500
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::form;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::uno;
+using namespace ::rtl;
+#define C2U(cChar) OUString::createFromAscii(cChar)
+
+rtl::OUString gSectionSizes(C2U("TheSectionSizes"));
+rtl::OUString gSectionNames(C2U("TheSectionNames"));
+rtl::OUString gSectionExpander(C2U("TheSectionExpander"));
+rtl::OUString gSectionPos(C2U("TheSectionPosition"));
+// -----------------------------------------------------------------------
+BibView::BibView(Window* pParent, BibDataManager* pDM, WinBits nStyle):
+ Window(pParent,nStyle),
+ pDatMan(pDM),
+ xDatMan(pDM),
+ pGeneralPage(NULL),
+ nDefNameCount(0)
+{
+ String aDefName(BibResId(RID_BIB_STR_SECTION));
+ aDefaultName=aDefName;
+ UpdatePages();
+}
+
+BibView::~BibView()
+{
+ pGeneralPage->CommitActiveControl();
+ uno::Reference< XForm > xForm = pDatMan->getDatabaseForm();
+ uno::Reference< XPropertySet > xPrSet(xForm, UNO_QUERY);
+ if(xPrSet.is())
+ {
+ uno::Any aProp = xPrSet->getPropertyValue(C2U("IsModified"));
+ if(*(sal_Bool*)aProp.getValue())
+ {
+ uno::Any aNew = xPrSet->getPropertyValue(C2U("IsNew"));
+ uno::Reference< sdbc::XResultSetUpdate > xResUpd(xForm, UNO_QUERY);
+ if(*(sal_Bool*)aNew.getValue())
+ xResUpd->insertRow();
+ else
+ xResUpd->updateRow();
+ }
+ }
+ //delete pGeneralPage;
+ pGeneralPage->RemoveListeners();
+ xGeneralPage = 0;
+
+}
+/* -----------------16.11.99 13:13-------------------
+
+ --------------------------------------------------*/
+void BibView::UpdatePages()
+{
+ BOOL bResize = FALSE;
+ if(pGeneralPage)
+ {
+ bResize = TRUE;
+ pGeneralPage->Hide();
+// delete pGeneralPage;
+ pGeneralPage->RemoveListeners();
+ xGeneralPage = 0;
+ }
+// pGeneralPage = new BibGeneralPage(this, pDatMan);
+ xGeneralPage = pGeneralPage = new BibGeneralPage(this, pDatMan);
+ if(bResize)
+ Resize();
+ String sErrorString(pGeneralPage->GetErrorString());
+ if(sErrorString.Len())
+ {
+ sErrorString += '\n';
+ sErrorString += String(BibResId(RID_MAP_QUESTION));
+ QueryBox aQuery( this, WB_YES_NO, sErrorString );
+ if(RET_YES == aQuery.Execute())
+ {
+ Application::PostUserEvent( STATIC_LINK(
+ this, BibView, CallMappingHdl ) );
+
+ }
+ }
+
+}
+/* -----------------------------02.02.00 16:49--------------------------------
+
+ ---------------------------------------------------------------------------*/
+IMPL_STATIC_LINK(BibView, CallMappingHdl, BibView*, EMPTYARG)
+{
+ pThis->pDatMan->CreateMappingDialog(pThis);
+ return 0;
+}
+/* -----------------------------13.04.00 16:12--------------------------------
+
+ ---------------------------------------------------------------------------*/
+void BibView::Resize()
+{
+ if(pGeneralPage)
+ {
+ Size aSz(GetOutputSizePixel());
+ pGeneralPage->SetSizePixel(aSz);
+ }
+ Window::Resize();
+}
+
+
+
+
diff --git a/extensions/source/bibliography/bibview.hxx b/extensions/source/bibliography/bibview.hxx
new file mode 100644
index 000000000000..5b39ae096733
--- /dev/null
+++ b/extensions/source/bibliography/bibview.hxx
@@ -0,0 +1,112 @@
+/*************************************************************************
+ *
+ * $RCSfile: bibview.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:16:44 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _BIB_VIEW_HXX
+#define _BIB_VIEW_HXX
+
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
+#include <com/sun/star/beans/XPropertySet.hpp>
+#endif
+
+#ifndef _SV_SECTION_HXX
+#include <svtools/section.hxx>
+#endif
+
+#ifndef _SV_SECTCTR_HXX
+#include <svtools/sectctr.hxx>
+#endif
+
+class BibGeneralPage;
+class BibBusinessAddress;
+class BibBusinessPhone;
+class BibDataManager;
+
+namespace com{ namespace sun{ namespace star{ namespace awt{ class XFocusListener;}}}}
+// -----------------------------------------------------------------------
+class BibView: public Window//SvSectionControl
+{
+private:
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xViewSet;
+ BibDataManager* pDatMan;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener > xDatMan;
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener> xGeneralPage;
+ BibGeneralPage* pGeneralPage;
+ rtl::OUString aDefaultName;
+ sal_Int32 nDefNameCount;
+
+protected:
+
+// void InitPages();
+protected:
+ virtual void Resize();
+
+ DECL_STATIC_LINK(BibView, CallMappingHdl, BibView*);
+
+public:
+ BibView(Window* pParent,BibDataManager* pDatMan,WinBits nStyle=0);
+ ~BibView();
+
+ void UpdatePages();
+};
+
+#endif
+
+
diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx
new file mode 100644
index 000000000000..662881852b56
--- /dev/null
+++ b/extensions/source/bibliography/datman.cxx
@@ -0,0 +1,2127 @@
+/*************************************************************************
+ *
+ * $RCSfile: datman.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:16:44 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _OSL_MUTEX_HXX_
+#include <osl/mutex.hxx>
+#endif
+#ifndef _URLOBJ_HXX
+#include <tools/urlobj.hxx>
+#endif
+#ifndef _UNOTOOLS_PROCESSFACTORY_HXX_
+#include <unotools/processfactory.hxx>
+#endif
+#ifndef _COM_SUN_STAR_IO_XPERSISTOBJECT_HPP_
+#include <com/sun/star/io/XPersistObject.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_SDBC_RESULTSETTYPE_HPP_
+#include <com/sun/star/sdbc/ResultSetType.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBC_RESULTSETCONCURRENCY_HPP_
+#include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBC_XRESULTSETUPDATE_HPP_
+#include <com/sun/star/sdbc/XResultSetUpdate.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBCX_XROWLOCATE_HPP_
+#include <com/sun/star/sdbcx/XRowLocate.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBC_DATATYPE_HPP_
+#include <com/sun/star/sdbc/DataType.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDB_XSQLQUERYCOMPOSERFACTORY_HPP_
+#include <com/sun/star/sdb/XSQLQueryComposerFactory.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBC_XDATABASEMETADATA_HPP_
+#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDB_XDATABASEENVIRONMENT_HPP_
+#include <com/sun/star/sdb/XDatabaseEnvironment.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UNO_XNAMINGSERVICE_HPP_
+#include <com/sun/star/uno/XNamingService.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBC_XDATASOURCE_HPP_
+#include <com/sun/star/sdbc/XDataSource.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDB_COMMANDTYPE_HPP_
+#include <com/sun/star/sdb/CommandType.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBCX_XTABLESSUPPLIER_HPP_
+#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
+#include <com/sun/star/sdbc/XConnection.hpp>
+#endif
+#ifndef _COM_SUN_STAR_DATA_XDATABASEFAVORITES_HPP_
+#include <com/sun/star/data/XDatabaseFavorites.hpp> // TODO : this is obsolete ....
+#endif
+#ifndef _COM_SUN_STAR_FORM_XLOADABLE_HPP_
+#include <com/sun/star/form/XLoadable.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBCX_XCOLUMNSSUPPLIER_HPP_
+#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FORM_XGRIDCOLUMNFACTORY_HPP_
+#include <com/sun/star/form/XGridColumnFactory.hpp>
+#endif
+#ifndef _COM_SUN_STAR_IO_XDATAINPUTSTREAM_HPP_
+#include <com/sun/star/io/XDataInputStream.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
+#include <com/sun/star/container/XNameContainer.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_UCB_XCONTENTPROVIDER_HPP_
+#include <com/sun/star/ucb/XContentProvider.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UCB_XCONTENTACCESS_HPP_
+#include <com/sun/star/ucb/XContentAccess.hpp>
+#endif
+#ifndef _UCBHELPER_CONTENTBROKER_HXX
+#include <ucbhelper/contentbroker.hxx>
+#endif
+#ifndef _UCBHELPER_CONTENT_HXX
+#include <ucbhelper/content.hxx>
+#endif
+#ifndef _UCBHELPER_CONTENTIDENTIFIER_HXX
+#include <ucbhelper/contentidentifier.hxx>
+#endif
+
+#ifndef SVTOOLS_URIHELPER_HXX
+#include <svtools/urihelper.hxx>
+#endif
+#include <svtools/iniprop.hxx>
+#include <svtools/iniman.hxx>
+#ifndef _SVTABBX_HXX
+#include <svtools/svtabbx.hxx>
+#endif
+#ifndef _HEADBAR_HXX
+#include <svtools/headbar.hxx>
+#endif
+#ifndef _SVARRAY_HXX
+#include <svtools/svarray.hxx>
+#endif
+#ifndef _SV_DIALOG_HXX
+#include <vcl/dialog.hxx>
+#endif
+#ifndef _SV_BUTTON_HXX
+#include <vcl/button.hxx>
+#endif
+#ifndef _SV_LSTBOX_HXX
+#include <vcl/lstbox.hxx>
+#endif
+#ifndef _SV_FIXED_HXX
+#include <vcl/fixed.hxx>
+#endif
+#ifndef _SV_GROUP_HXX
+#include <vcl/group.hxx>
+#endif
+#ifndef _SV_LSTBOX_HXX //autogen wg. form::component::ListBox
+#include <vcl/lstbox.hxx>
+#endif
+#ifndef _SV_EDIT_HXX //autogen wg. Edit
+#include <vcl/edit.hxx>
+#endif
+#ifndef _SV_MSGBOX_HXX
+#include <vcl/msgbox.hxx>
+#endif
+
+#ifndef _TOOLS_DEBUG_HXX //autogen wg. DBG_ASSERT
+#include <tools/debug.hxx>
+#endif
+
+#ifndef _BIB_DATMAN_HXX
+#include "datman.hxx"
+#endif
+#ifndef ADRRESID_HXX
+#include "bibresid.hxx"
+#endif
+#ifndef ADDRMOD_HXX
+#include "bibmod.hxx"
+#endif
+#ifndef _BIB_VIEW_HXX
+#include "bibview.hxx"
+#endif
+#ifndef _BIB_REGISTRY_HXX
+#include "registry.hxx"
+#endif
+#ifndef _BIB_FMPROP_HRC
+#include "bibprop.hrc"
+#endif
+#ifndef _BIB_TOOLBAR_HXX
+#include "toolbar.hxx"
+#endif
+#ifndef ADRBEAM_HXX
+#include "bibbeam.hxx"
+#endif
+#ifndef BIB_HRC
+#include "bib.hrc"
+#endif
+#include "datman.hrc"
+#ifndef __EXTENSIONS_INC_EXTENSIO_HRC__
+#include "extensio.hrc"
+#endif
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::sdb;
+using namespace ::com::sun::star::sdbc;
+using namespace ::com::sun::star::form;
+using namespace ::com::sun::star::frame;
+using namespace ::com::sun::star::ucb;
+using namespace ::rtl;
+using namespace ::ucb;
+
+#define C2U(cChar) OUString::createFromAscii(cChar)
+#define C2S(cChar) String::CreateFromAscii(cChar)
+#define MAP_TOKEN ';'
+#define PAIR_TOKEN ':'
+
+/* -----------------11.11.99 14:34-------------------
+
+ --------------------------------------------------*/
+typedef Mapping* MappingPtr;
+SV_DECL_PTRARR_DEL(MappingArray, MappingPtr, 2, 2);
+SV_IMPL_PTRARR(MappingArray, MappingPtr);
+
+/* -----------------------------15.06.00 16:12--------------------------------
+
+ ---------------------------------------------------------------------------*/
+BOOL lcl_IsCaseSensitive(const String& rPathURL)
+{
+ BOOL bCaseSensitive = FALSE;
+#ifdef DBG_UTIL
+ static BOOL bFirstCall = TRUE;
+ if(bFirstCall)
+ {
+ DBG_ERROR("No case checking due to #76253#")
+ bFirstCall = FALSE;
+ }
+#endif
+/* Reference< lang::XMultiServiceFactory > xMSF = utl::getProcessServiceFactory();
+ INetURLObject aTempObj(rPathURL);
+ try
+ {
+ aTempObj.SetBase(aTempObj.GetBase().ToLowerAscii());
+ Reference<XContentIdentifier> xRef1 = new ::ucb::ContentIdentifier( xMSF, aTempObj.GetMainURL());
+ aTempObj.SetBase(aTempObj.GetBase().ToUpperAscii());
+ Reference<XContentIdentifier> xRef2 = new ::ucb::ContentIdentifier( xMSF, aTempObj.GetMainURL());
+
+ ContentBroker& rBroker = *ContentBroker::get();
+ Reference<XContentProvider > xProv = rBroker.getContentProviderInterface();
+ sal_Int32 nCompare = xProv->compareContentIds( xRef1, xRef2 );
+ bCaseSensitive = nCompare != 0;
+ }
+ catch(...){}
+*/ return bCaseSensitive;
+}
+/* -----------------17.01.00 14:38-------------------
+
+ --------------------------------------------------*/
+uno::Reference< sdbc::XConnection > getConnection(const rtl::OUString& _rURL)
+{
+ // first get the sdb::DataSource corresponding to the url
+ uno::Reference< sdbc::XDataSource > xDataSource;
+ // is it a favorite title ?
+ uno::Reference< lang::XMultiServiceFactory > xMgr = utl::getProcessServiceFactory();
+ uno::Reference< XNameAccess > xNamingContext(xMgr->createInstance(C2U("com.sun.star.sdb.DatabaseAccessContext")), UNO_QUERY);
+ if (xNamingContext.is() && xNamingContext->hasByName(_rURL))
+ {
+ DBG_ASSERT(uno::Reference< XNamingService > (xNamingContext, UNO_QUERY).is(), "::getDataSource : no uno::NamingService interface on the sdb::DatabaseAccessContext !");
+ xDataSource = uno::Reference< sdbc::XDataSource > (uno::Reference< XNamingService > (xNamingContext, UNO_QUERY)->getRegisteredObject(_rURL), UNO_QUERY);
+ }
+ if (!xDataSource.is())
+ {
+ // is it a file url ?
+ uno::Reference< XDatabaseEnvironment > xEnvironment(xMgr->createInstance(C2U("com.sun.star.sdb.DatabaseEnvironment")), UNO_QUERY);
+ if (xEnvironment.is())
+ {
+ try
+ {
+ xDataSource = uno::Reference< sdbc::XDataSource > (xEnvironment->getDatabaseAccess(_rURL), UNO_QUERY);
+ }
+ catch(sdbc::SQLException&)
+ {
+ xDataSource = NULL;
+ // TODO : a real error handling
+ }
+ catch(...)
+ {
+ xDataSource = NULL;
+ }
+ }
+ }
+
+ // build the connection from the data source
+ uno::Reference< sdbc::XConnection > xConn;
+ if (xDataSource.is())
+ {
+ // need user/pwd for this
+ rtl::OUString sUser, sPwd;
+ uno::Reference< XPropertySet > xDataSourceProps(xDataSource, UNO_QUERY);
+ uno::Reference< XPropertySetInfo > xInfo = xDataSourceProps.is() ? xDataSourceProps->getPropertySetInfo() : uno::Reference< XPropertySetInfo > ();
+ if (xInfo.is() && xInfo->hasPropertyByName(C2U("User")))
+ xDataSourceProps->getPropertyValue(C2U("User")) >>= sUser;
+ if (xInfo.is() && xInfo->hasPropertyByName(C2U("Password")))
+ xDataSourceProps->getPropertyValue(C2U("Password"))>>= sPwd;
+
+ try
+ {
+ xConn = xDataSource->getConnection(sUser, sPwd);
+ }
+ catch(sdbc::SQLException&)
+ {
+ // TODO : a real error handling
+ }
+ catch(...)
+ {
+ }
+
+ }
+ return xConn;
+}
+
+/* -----------------17.01.00 14:46-------------------
+
+ --------------------------------------------------*/
+uno::Reference< sdbc::XConnection > getConnection(const uno::Reference< XInterface > & xRowSet)
+{
+ uno::Reference< sdbc::XConnection > xConn;
+ try
+ {
+ uno::Reference< XPropertySet > xFormProps(xRowSet, UNO_QUERY);
+ if (!xFormProps.is())
+ return xConn;
+
+ xConn = uno::Reference< sdbc::XConnection > (*(uno::Reference< XInterface > *)xFormProps->getPropertyValue(C2U("ActiveConnection")).getValue(), UNO_QUERY);
+ if (!xConn.is())
+ {
+ OUString uTmp;
+ xFormProps->getPropertyValue(C2U("DataSourceName")) >>= uTmp;
+ xConn = getConnection(uTmp);
+ }
+ }
+ catch(...)
+ {
+ DBG_ERROR("exception in getConnection");
+ }
+
+ return xConn;
+}
+/* -----------------17.01.00 16:07-------------------
+
+ --------------------------------------------------*/
+uno::Reference< XNameAccess > getColumns(const uno::Reference< XForm > & xForm)
+{
+ uno::Reference< XNameAccess > xReturn;
+ // check if the form is alive
+ uno::Reference< sdbcx::XColumnsSupplier > xSupplyCols(xForm, UNO_QUERY);
+ if (xSupplyCols.is())
+ xReturn = xSupplyCols->getColumns();
+
+ if (!xReturn.is() || (xReturn->getElementNames().getLength() == 0))
+ { // no ....
+ xReturn = NULL;
+ // -> get the table the form is bound to and ask it for their columns
+ uno::Reference< sdbcx::XTablesSupplier > xSupplyTables(getConnection(xForm), UNO_QUERY);
+ uno::Reference< XPropertySet > xFormProps(xForm, UNO_QUERY);
+ if (xFormProps.is() && xSupplyTables.is())
+ {
+ try
+ {
+ DBG_ASSERT((*(sal_Int32*)xFormProps->getPropertyValue(C2U("CommandType")).getValue()) == CommandType::TABLE,
+ "::getColumns : invalid form (has no table as data source) !");
+ rtl::OUString sTable;
+ xFormProps->getPropertyValue(C2U("Command")) >>= sTable;
+ uno::Reference< XNameAccess > xTables = xSupplyTables->getTables();
+ if (xTables.is() && xTables->hasByName(sTable))
+ xSupplyCols = uno::Reference< sdbcx::XColumnsSupplier > (
+ *(uno::Reference< XInterface > *)xTables->getByName(sTable).getValue(), UNO_QUERY);
+ if (xSupplyCols.is())
+ xReturn = xSupplyCols->getColumns();
+ }
+#ifdef DBG_UTIL
+ catch(Exception& e )
+#else
+ catch(Exception&)
+#endif
+ {
+#ifdef DBG_UTIL
+ String sMsg(String::CreateFromAscii("::getColumns : catched an exception ("));
+ sMsg += String(e.Message);
+ sMsg.AppendAscii(") ...");
+ DBG_ERROR( ByteString(sMsg, RTL_TEXTENCODING_ASCII_US ).GetBuffer());
+#endif
+ }
+ catch(...)
+ {
+ DBG_ERROR("::getColumns : catched a strange exception (no uno::Exception) ...");
+ }
+
+ }
+ }
+ return xReturn;
+}
+
+/* -----------------11.11.99 15:54-------------------
+
+ --------------------------------------------------*/
+class MappingDialog_Impl : public ModalDialog
+{
+ OKButton aOKBT;
+ CancelButton aCancelBT;
+ HelpButton aHelpBT;
+
+ GroupBox aMapGB;
+ FixedText aIdentifierFT;
+ ListBox aIdentifierLB;
+ FixedText aAuthorityTypeFT;
+ ListBox aAuthorityTypeLB;
+ FixedText aAuthorFT;
+ ListBox aAuthorLB;
+ FixedText aTitleFT;
+ ListBox aTitleLB;
+ FixedText aMonthFT;
+ ListBox aMonthLB;
+ FixedText aYearFT;
+ ListBox aYearLB;
+ FixedText aISBNFT;
+ ListBox aISBNLB;
+ FixedText aBooktitleFT;
+ ListBox aBooktitleLB;
+ FixedText aChapterFT;
+ ListBox aChapterLB;
+ FixedText aEditionFT;
+ ListBox aEditionLB;
+ FixedText aEditorFT;
+ ListBox aEditorLB;
+ FixedText aHowpublishedFT;
+ ListBox aHowpublishedLB;
+ FixedText aInstitutionFT;
+ ListBox aInstitutionLB;
+ FixedText aJournalFT;
+ ListBox aJournalLB;
+ FixedText aNoteFT;
+ ListBox aNoteLB;
+ FixedText aAnnoteFT;
+ ListBox aAnnoteLB;
+ FixedText aNumberFT;
+ ListBox aNumberLB;
+ FixedText aOrganizationsFT;
+ ListBox aOrganizationsLB;
+ FixedText aPagesFT;
+ ListBox aPagesLB;
+ FixedText aPublisherFT;
+ ListBox aPublisherLB;
+ FixedText aAddressFT;
+ ListBox aAddressLB;
+ FixedText aSchoolFT;
+ ListBox aSchoolLB;
+ FixedText aSeriesFT;
+ ListBox aSeriesLB;
+ FixedText aReportTypeFT;
+ ListBox aReportTypeLB;
+ FixedText aVolumeFT;
+ ListBox aVolumeLB;
+ FixedText aURLFT;
+ ListBox aURLLB;
+ FixedText aCustom1FT;
+ ListBox aCustom1LB;
+ FixedText aCustom2FT;
+ ListBox aCustom2LB;
+ FixedText aCustom3FT;
+ ListBox aCustom3LB;
+ FixedText aCustom4FT;
+ ListBox aCustom4LB;
+ FixedText aCustom5FT;
+ ListBox aCustom5LB;
+
+ ListBox* aListBoxes[COLUMN_COUNT];
+ String sNone;
+
+ BibDataManager* pDatMan;
+
+ DECL_LINK(OkHdl, OKButton*);
+ DECL_LINK(ListBoxSelectHdl, ListBox*);
+
+public:
+ MappingDialog_Impl(Window* pParent, BibDataManager* pDatMan);
+ ~MappingDialog_Impl();
+
+};
+/* -----------------11.11.99 16:42-------------------
+
+ --------------------------------------------------*/
+sal_uInt16 lcl_FindLogicalName(BibDataManager* pDatMan,
+ const String& rLogicalColumnName)
+{
+ for(sal_uInt16 i = 0; i < COLUMN_COUNT; i++)
+ {
+ if(rLogicalColumnName == pDatMan->GetDefColumnName(i))
+ return i;
+ }
+ return USHRT_MAX;
+}
+//-----------------------------------------------------------------------------
+MappingDialog_Impl::MappingDialog_Impl(Window* pParent, BibDataManager* pMan) :
+ ModalDialog(pParent, BibResId(RID_DLG_MAPPING) ),
+ pDatMan(pMan),
+ aOKBT(this, ResId( BT_OK )),
+ aCancelBT(this, ResId( BT_CANCEL )),
+ aHelpBT(this, ResId( BT_HELP )),
+
+ aMapGB(this, ResId( GB_MAPPING )),
+
+ aIdentifierFT(this, ResId( FT_IDENTIFIER )),
+ aIdentifierLB(this, ResId( LB_IDENTIFIER )),
+ aAuthorityTypeFT(this, ResId( FT_AUTHORITYTYPE )),
+ aAuthorityTypeLB(this, ResId( LB_AUTHORITYTYPE )),
+ aAuthorFT(this, ResId( FT_AUTHOR )),
+ aAuthorLB(this, ResId( LB_AUTHOR )),
+ aTitleFT(this, ResId( FT_TITLE )),
+ aTitleLB(this, ResId( LB_TITLE )),
+ aMonthFT(this, ResId( FT_MONTH )),
+ aMonthLB(this, ResId( LB_MONTH )),
+ aYearFT(this, ResId( FT_YEAR )),
+ aYearLB(this, ResId( LB_YEAR )),
+ aISBNFT(this, ResId( FT_ISBN )),
+ aISBNLB(this, ResId( LB_ISBN )),
+ aBooktitleFT(this, ResId( FT_BOOKTITLE )),
+ aBooktitleLB(this, ResId( LB_BOOKTITLE )),
+ aChapterFT(this, ResId( FT_CHAPTER )),
+ aChapterLB(this, ResId( LB_CHAPTER )),
+ aEditionFT(this, ResId( FT_EDITION )),
+ aEditionLB(this, ResId( LB_EDITION )),
+ aEditorFT(this, ResId( FT_EDITOR )),
+ aEditorLB(this, ResId( LB_EDITOR )),
+ aHowpublishedFT(this, ResId( FT_HOWPUBLISHED )),
+ aHowpublishedLB(this, ResId( LB_HOWPUBLISHED )),
+ aInstitutionFT(this, ResId( FT_INSTITUTION )),
+ aInstitutionLB(this, ResId( LB_INSTITUTION )),
+ aJournalFT(this, ResId( FT_JOURNAL )),
+ aJournalLB(this, ResId( LB_JOURNAL )),
+ aNoteFT(this, ResId( FT_NOTE )),
+ aNoteLB(this, ResId( LB_NOTE )),
+ aAnnoteFT(this, ResId( FT_ANNOTE )),
+ aAnnoteLB(this, ResId( LB_ANNOTE )),
+ aNumberFT(this, ResId( FT_NUMBER )),
+ aNumberLB(this, ResId( LB_NUMBER )),
+ aOrganizationsFT(this, ResId( FT_ORGANIZATIONS )),
+ aOrganizationsLB(this, ResId( LB_ORGANIZATIONS )),
+ aPagesFT(this, ResId( FT_PAGES )),
+ aPagesLB(this, ResId( LB_PAGES )),
+ aPublisherFT(this, ResId( FT_PUBLISHER )),
+ aPublisherLB(this, ResId( LB_PUBLISHER )),
+ aAddressFT(this, ResId( FT_ADDRESS )),
+ aAddressLB(this, ResId( LB_ADDRESS )),
+ aSchoolFT(this, ResId( FT_SCHOOL )),
+ aSchoolLB(this, ResId( LB_SCHOOL )),
+ aSeriesFT(this, ResId( FT_SERIES )),
+ aSeriesLB(this, ResId( LB_SERIES )),
+ aReportTypeFT(this, ResId( FT_REPORTTYPE )),
+ aReportTypeLB(this, ResId( LB_REPORTTYPE )),
+ aVolumeFT(this, ResId( FT_VOLUME )),
+ aVolumeLB(this, ResId( LB_VOLUME )),
+ aURLFT(this, ResId( FT_URL )),
+ aURLLB(this, ResId( LB_URL )),
+ aCustom1FT(this, ResId( FT_CUSTOM1 )),
+ aCustom1LB(this, ResId( LB_CUSTOM1 )),
+ aCustom2FT(this, ResId( FT_CUSTOM2 )),
+ aCustom2LB(this, ResId( LB_CUSTOM2 )),
+ aCustom3FT(this, ResId( FT_CUSTOM3 )),
+ aCustom3LB(this, ResId( LB_CUSTOM3 )),
+ aCustom4FT(this, ResId( FT_CUSTOM4 )),
+ aCustom4LB(this, ResId( LB_CUSTOM4 )),
+ aCustom5FT(this, ResId( FT_CUSTOM5 )),
+ aCustom5LB(this, ResId( LB_CUSTOM5 )),
+ sNone(ResId(ST_NONE))
+{
+ FreeResource();
+
+ aOKBT.SetClickHdl(LINK(this, MappingDialog_Impl, OkHdl));
+ String sTitle = GetText();
+ sTitle.SearchAndReplace(C2S("%1"), pDatMan->getActiveDataTable(), 0);
+ SetText(sTitle);
+
+ aListBoxes[0] = &aIdentifierLB;
+ aListBoxes[1] = &aAuthorityTypeLB;
+ aListBoxes[2] = &aAuthorLB;
+ aListBoxes[3] = &aTitleLB;
+ aListBoxes[4] = &aYearLB;
+ aListBoxes[5] = &aISBNLB;
+ aListBoxes[6] = &aBooktitleLB;
+ aListBoxes[7] = &aChapterLB;
+ aListBoxes[8] = &aEditionLB;
+ aListBoxes[9] = &aEditorLB;
+ aListBoxes[10] = &aHowpublishedLB;
+ aListBoxes[11] = &aInstitutionLB;
+ aListBoxes[12] = &aJournalLB;
+ aListBoxes[13] = &aMonthLB;
+ aListBoxes[14] = &aNoteLB;
+ aListBoxes[15] = &aAnnoteLB;
+ aListBoxes[16] = &aNumberLB;
+ aListBoxes[17] = &aOrganizationsLB;
+ aListBoxes[18] = &aPagesLB;
+ aListBoxes[19] = &aPublisherLB;
+ aListBoxes[20] = &aAddressLB;
+ aListBoxes[21] = &aSchoolLB;
+ aListBoxes[22] = &aSeriesLB;
+ aListBoxes[23] = &aReportTypeLB;
+ aListBoxes[24] = &aVolumeLB;
+ aListBoxes[25] = &aURLLB;
+ aListBoxes[26] = &aCustom1LB;
+ aListBoxes[27] = &aCustom2LB;
+ aListBoxes[28] = &aCustom3LB;
+ aListBoxes[29] = &aCustom4LB;
+ aListBoxes[30] = &aCustom5LB;
+
+ aListBoxes[0]->InsertEntry(sNone);
+ uno::Reference< XNameAccess > xFields = getColumns(pDatMan->getDatabaseForm());
+ DBG_ASSERT(xFields.is(), "MappingDialog_Impl::MappingDialog_Impl : gave me an invalid form !");
+ uno::Sequence<rtl::OUString> aNames = xFields->getElementNames();
+ sal_Int32 nFieldsCount = aNames.getLength();
+ const rtl::OUString* pNames = aNames.getConstArray();
+
+ for(sal_Int32 nField = 0; nField < nFieldsCount; nField++)
+ aListBoxes[0]->InsertEntry(pNames[nField]);
+
+ Link aLnk = LINK(this, MappingDialog_Impl, ListBoxSelectHdl);
+
+ aListBoxes[0]->SelectEntryPos(0);
+ aListBoxes[0]->SetSelectHdl(aLnk);
+ for(sal_uInt16 i = 1; i < COLUMN_COUNT; i++)
+ {
+ for(sal_uInt16 j = 0; j < aListBoxes[0]->GetEntryCount();j++)
+ aListBoxes[i]->InsertEntry(aListBoxes[0]->GetEntry(j));
+ aListBoxes[i]->SelectEntryPos(0);
+ aListBoxes[i]->SetSelectHdl(aLnk);
+ }
+ const Mapping* pMapping = pDatMan->GetMapping(pDatMan->getActiveDataTable());
+ if(pMapping)
+ {
+ for(sal_uInt16 nEntry = 0; nEntry < COLUMN_COUNT; nEntry++)
+ {
+ sal_uInt16 nListBoxIndex = lcl_FindLogicalName(pDatMan,
+ pMapping->aColumnPairs[nEntry].sLogicalColumnName);
+ if(nListBoxIndex < COLUMN_COUNT)
+ {
+ aListBoxes[nListBoxIndex]->SelectEntry(pMapping->aColumnPairs[nEntry].sRealColumnName);
+ }
+ }
+ }
+}
+/* -----------------11.11.99 16:44-------------------
+
+ --------------------------------------------------*/
+MappingDialog_Impl::~MappingDialog_Impl()
+{}
+/* -----------------15.11.99 10:38-------------------
+
+ --------------------------------------------------*/
+IMPL_LINK(MappingDialog_Impl, ListBoxSelectHdl, ListBox*, pListBox)
+{
+ sal_uInt16 nEntryPos = pListBox->GetSelectEntryPos();
+ if(0 < nEntryPos)
+ {
+ for(sal_uInt16 i = 0; i < COLUMN_COUNT; i++)
+ {
+ if(pListBox != aListBoxes[i] && aListBoxes[i]->GetSelectEntryPos() == nEntryPos)
+ aListBoxes[i]->SelectEntryPos(0);
+ }
+ }
+ return 0;
+}
+/* -----------------12.11.99 14:50-------------------
+
+ --------------------------------------------------*/
+IMPL_LINK(MappingDialog_Impl, OkHdl, OKButton*, EMPTYARG)
+{
+ Mapping aNew;
+ aNew.sTableName = String(pDatMan->getActiveDataTable());
+ aNew.sURL = String(pDatMan->getActiveDataSource());
+
+ sal_uInt16 nWriteIndex = 0;
+ for(sal_uInt16 nEntry = 0; nEntry < COLUMN_COUNT; nEntry++)
+ {
+
+ String sSel = aListBoxes[nEntry]->GetSelectEntry();
+ if(sSel != sNone)
+ {
+ aNew.aColumnPairs[nWriteIndex].sRealColumnName = sSel;
+ aNew.aColumnPairs[nWriteIndex].sLogicalColumnName = pDatMan->GetDefColumnName(nEntry);
+ nWriteIndex++;
+ }
+ }
+ pDatMan->SetMapping(pDatMan->getActiveDataTable(), &aNew);
+ EndDialog(RET_OK);
+ return 0;
+}
+/* -----------------18.11.99 10:23-------------------
+
+ --------------------------------------------------*/
+class DBChangeDialog_Impl : public ModalDialog
+{
+ OKButton aOKBT;
+ CancelButton aCancelBT;
+ HelpButton aHelpBT;
+
+ GroupBox aSelectionGB;
+ SvTabListBox aSelectionLB;
+ HeaderBar aSelectionHB;
+
+ String aEntryST;
+ String aURLST;
+
+ BibDataManager* pDatMan;
+
+ DECL_LINK(EndDragHdl, HeaderBar*);
+ DECL_LINK(DoubleClickHdl, SvTabListBox*);
+public:
+ DBChangeDialog_Impl(Window* pParent, BibDataManager* pMan );
+ ~DBChangeDialog_Impl();
+
+ String GetCurrentURL()const;
+};
+
+/*-- 18.11.99 10:35:20---------------------------------------------------
+
+ -----------------------------------------------------------------------*/
+DBChangeDialog_Impl::DBChangeDialog_Impl(Window* pParent, BibDataManager* pMan ) :
+ ModalDialog(pParent, BibResId(RID_DLG_DBCHANGE) ),
+ aOKBT(this, ResId( BT_OK )),
+ aCancelBT(this, ResId( BT_CANCEL )),
+ aHelpBT(this, ResId( BT_HELP )),
+ aSelectionGB(this, ResId( GB_SELECTION )),
+ aSelectionLB(this, ResId( LB_SELECTION )),
+ aSelectionHB(this, ResId( HB_SELECTION )),
+ aEntryST(ResId(ST_ENTRY)),
+ aURLST( ResId(ST_URL)),
+ pDatMan(pMan)
+{
+ FreeResource();
+ aSelectionHB.SetEndDragHdl( LINK(this, DBChangeDialog_Impl, EndDragHdl));
+ aSelectionLB.SetDoubleClickHdl( LINK(this, DBChangeDialog_Impl, DoubleClickHdl));
+ try
+ {
+ uno::Reference< lang::XMultiServiceFactory > xMgr = utl::getProcessServiceFactory();
+ uno::Reference< data::XDatabaseFavorites > xFav(xMgr->createInstance( C2U("com.sun.star.data.DatabaseEngine") ), UNO_QUERY );
+ // TODO : XDatabaseFavorites is an obsolete interface, the whole dialog has to be based on
+ // the sdb::DatabaseAccessContext service
+
+ uno::Sequence< beans::PropertyValue > aFavs = xFav->getFavorites();
+ const beans::PropertyValue* pValues = aFavs.getConstArray();
+
+ Size aSize = aSelectionHB.GetSizePixel();
+ long nTabs[3];
+ nTabs[0] = 2;// Number of Tabs
+ nTabs[1] = 0;
+ nTabs[2] = aSize.Width() / 4;
+
+ aSelectionHB.SetStyle(aSelectionHB.GetStyle()|WB_STDHEADERBAR);
+ aSelectionHB.InsertItem( 1, aEntryST, nTabs[2]);
+ aSelectionHB.InsertItem( 2, aURLST, aSize.Width() - nTabs[2]);
+ aSelectionHB.SetSizePixel(aSelectionHB.CalcWindowSizePixel());
+ aSelectionHB.Show();
+
+ aSelectionLB.SetHelpId(HID_SELECTION_TLB);
+ aSelectionLB.SetTabs( &nTabs[0], MAP_PIXEL );
+ aSelectionLB.SetWindowBits(WB_CLIPCHILDREN|WB_SORT);
+ //aSelectionLB.SetSelectHdl(LINK(this, SwGlossaryGroupDlg, SelectHdl));
+ aSelectionLB.GetModel()->SetSortMode(SortAscending);
+
+ String sActiveURL = pDatMan->getActiveDataSource();
+ sActiveURL = URIHelper::SmartRelToAbs(sActiveURL);
+ for(int i = 0; i < aFavs.getLength(); i++)
+ {
+ String sTemp(pValues[i].Name);
+ sTemp += '\t';
+ String sSource = *(OUString*)pValues[i].Value.getValue();
+ sTemp += sSource;
+ SvLBoxEntry* pEntry = aSelectionLB.InsertEntry(sTemp);
+// String sTempPath = INetURLObject(sSource).PathToFileName();
+ sal_Bool bCaseSensitive = lcl_IsCaseSensitive(sSource);
+// sal_Bool bCaseSensitive = DirEntry(sTempPath).IsCaseSensitive();
+ if((bCaseSensitive && sActiveURL == sSource)||
+ !bCaseSensitive && COMPARE_EQUAL == sActiveURL.CompareTo(sSource))
+ {
+ aSelectionLB.Select(pEntry);
+ }
+ }
+ aSelectionLB.GetModel()->Resort();
+
+ }
+ catch(...)
+ {
+ DBG_ERROR("Exception in BibDataManager::DBChangeDialog_Impl::DBChangeDialog_Impl")
+ }
+
+
+}
+/* -----------------06.12.99 12:09-------------------
+
+ --------------------------------------------------*/
+IMPL_LINK(DBChangeDialog_Impl, DoubleClickHdl, SvTabListBox*, pLB)
+{
+ EndDialog(RET_OK);
+ return 0;
+}
+/* -----------------18.11.99 11:17-------------------
+
+ --------------------------------------------------*/
+IMPL_LINK(DBChangeDialog_Impl, EndDragHdl, HeaderBar*, pHB)
+{
+ long nTabs[3];
+ nTabs[0] = 2;// Number of Tabs
+ nTabs[1] = 0;
+ nTabs[2] = pHB->GetItemSize( 1 );
+ aSelectionLB.SetTabs( &nTabs[0], MAP_PIXEL );
+ return 0;
+};
+
+/*-- 18.11.99 10:35:20---------------------------------------------------
+
+ -----------------------------------------------------------------------*/
+DBChangeDialog_Impl::~DBChangeDialog_Impl()
+{
+}
+/* -----------------18.11.99 12:36-------------------
+
+ --------------------------------------------------*/
+String DBChangeDialog_Impl::GetCurrentURL()const
+{
+ String sRet;
+ SvLBoxEntry* pEntry = aSelectionLB.FirstSelected();
+ if(pEntry)
+ {
+ sRet = aSelectionLB.GetEntryText(pEntry, 1);
+ }
+ return sRet;
+}
+
+//-----------------------------------------------------------------------------
+#define STR_UID "uid"
+rtl::OUString gGridName(C2U("theGrid"));
+rtl::OUString gViewName(C2U("theView"));
+rtl::OUString gGlobalName(C2U("theGlobals"));
+rtl::OUString gBeamerSize(C2U("theBeamerSize"));
+rtl::OUString gViewSize(C2U("theViewSize"));
+
+BibDataManager::BibDataManager(BibRegistry * pRegistry) :
+ pMappingsArr(new MappingArray),
+ pToolbar(0),
+ pGridWin(0)
+{
+ //Names of the default columns
+ aColumnDefaults[0] = C2S("Identifier");
+ aColumnDefaults[1] = C2S("BibliographyType");
+ aColumnDefaults[2] = C2S("Author");
+ aColumnDefaults[3] = C2S("Title");
+ aColumnDefaults[4] = C2S("Year");
+ aColumnDefaults[5] = C2S("ISBN");
+ aColumnDefaults[6] = C2S("Booktitle");
+ aColumnDefaults[7] = C2S("Chapter");
+ aColumnDefaults[8] = C2S("Edition");
+ aColumnDefaults[9] = C2S("Editor");
+ aColumnDefaults[10] = C2S("Howpublished");
+ aColumnDefaults[11] = C2S("Institution");
+ aColumnDefaults[12] = C2S("Journal");
+ aColumnDefaults[13] = C2S("Month");
+ aColumnDefaults[14] = C2S("Note");
+ aColumnDefaults[15] = C2S("Annote");
+ aColumnDefaults[16] = C2S("Number");
+ aColumnDefaults[17] = C2S("Organizations");
+ aColumnDefaults[18] = C2S("Pages");
+ aColumnDefaults[19] = C2S("Publisher");
+ aColumnDefaults[20] = C2S("Address");
+ aColumnDefaults[21] = C2S("School");
+ aColumnDefaults[22] = C2S("Series");
+ aColumnDefaults[23] = C2S("ReportType");
+ aColumnDefaults[24] = C2S("Volume");
+ aColumnDefaults[25] = C2S("URL");
+ aColumnDefaults[26] = C2S("Custom1");
+ aColumnDefaults[27] = C2S("Custom2");
+ aColumnDefaults[28] = C2S("Custom3");
+ aColumnDefaults[29] = C2S("Custom4");
+ aColumnDefaults[30] = C2S("Custom5");
+
+// nEditMode = DatabaseRecordMode_STANDARD;
+ xRegistry = pRegistry;
+ xGlobalProps=createGlobalProperties();
+
+ SfxAppIniManagerProperty aProp;
+ GetpApp()->Property( aProp );
+
+ SfxIniManager* pIniMan = aProp.GetIniManager();
+ if(pIniMan)
+ {
+ String sBibMapping;
+ sal_uInt16 nIdx = USHRT_MAX;
+ String sEntry;
+ do
+ {
+ String sKey(C2S(BIBLIOGRAPHY_INI_DB_ENTRY));
+ String sMapKey = C2S(BIBLIOGRAPHY_INI_MAPPING);
+ if(USHRT_MAX != nIdx)
+ {
+ sKey += nIdx;
+ sMapKey += nIdx;
+ }
+
+ sEntry = pIniMan->ReadKey( C2S(BIBLIOGRAPHY_INI_GROUP),
+ sKey );
+ String sURL = sEntry.GetToken(0, ';');
+ sURL = pIniMan->SubstPathVars( sURL );
+
+ sURL = URIHelper::SmartRelToAbs(sURL);
+
+
+ String sTableName = sEntry.GetToken(1, ';');
+
+ sBibMapping = pIniMan->ReadKey( C2S(BIBLIOGRAPHY_INI_GROUP),
+ sMapKey );
+ if(sTableName.Len())
+ {
+ Mapping* pNew = new Mapping;
+ pNew->sTableName = sTableName;
+ pNew->sURL = sURL;
+ sal_uInt16 nMapTokens = sBibMapping.GetTokenCount(MAP_TOKEN);
+ for(sal_uInt16 i = 0; i < nMapTokens && i < COLUMN_COUNT; i++)
+ {
+ String sPair = sBibMapping.GetToken(i, MAP_TOKEN);
+ pNew->aColumnPairs[i].sLogicalColumnName = sPair.GetToken(0, PAIR_TOKEN);
+ pNew->aColumnPairs[i].sRealColumnName = sPair.GetToken(1, PAIR_TOKEN);
+ }
+ pMappingsArr->Insert(pNew, pMappingsArr->Count());
+ }
+ nIdx = USHRT_MAX == nIdx ? 0 : nIdx + 1;
+ }
+ while(sEntry.Len());
+ }
+}
+/* --------------------------------------------------
+
+ --------------------------------------------------*/
+BibDataManager::~BibDataManager()
+{
+ uno::Reference< XLoadable > xLoad(xForm, UNO_QUERY);
+ uno::Reference< lang::XComponent > xComp(xForm, UNO_QUERY);
+ if (xForm.is())
+ {
+ RemoveMeAsUidListener();
+ if (xLoad.is())
+ xLoad->unload();
+ if (xComp.is())
+ xComp->dispose();
+ xForm = NULL;
+ }
+ delete pMappingsArr;
+}
+//------------------------------------------------------------------------
+void BibDataManager::InsertFields(const uno::Reference< XFormComponent > & xGrid)
+{
+ if (!xGrid.is())
+ return;
+try
+{
+ uno::Reference< XNameAccess > xFields = getColumns(xForm);
+ if (!xFields.is())
+ return;
+
+ uno::Reference< XGridColumnFactory > xColFactory(xGrid, UNO_QUERY);
+ uno::Reference< XNameContainer > xColContainer(xGrid, UNO_QUERY);
+
+ uno::Reference< XPropertySet > xField;
+
+ uno::Sequence<rtl::OUString> aFields(xFields->getElementNames());
+ const rtl::OUString* pFields = aFields.getConstArray();
+ sal_Int32 nCount=aFields.getLength();
+ uno::Any aElement;
+ for( sal_Int32 i=0; i<nCount; i++ )
+ {
+ rtl::OUString aCurrentColName= pFields[i];
+
+ aElement = xFields->getByName(aCurrentColName);
+ xField = *(uno::Reference< XPropertySet > *)aElement.getValue();
+
+ sal_Int32 nFormatKey = *(sal_Int32*)xField->getPropertyValue(FM_PROP_FORMATKEY).getValue();
+
+ uno::Reference< XPropertySet > xCurrentCol = xColFactory->createColumn(getControlName(nFormatKey));
+
+ Any aColName; aColName <<= aCurrentColName;
+ xCurrentCol->setPropertyValue(FM_PROP_CONTROLSOURCE, aColName);
+ xCurrentCol->setPropertyValue(FM_PROP_LABEL, aColName);
+
+ xColContainer->insertByName(aCurrentColName, uno::Any(&xCurrentCol, ::getCppuType((Reference<XPropertySet>*)0)));
+ }
+}
+catch(...)
+{
+ DBG_ERROR("Exception in BibDataManager::InsertFields")
+}
+
+
+}
+/* --------------------------------------------------
+
+ --------------------------------------------------*/
+uno::Reference< awt::XControlModel > BibDataManager::createGridModel()
+{
+ return createGridModel(xForm);
+}
+/* --------------------------------------------------
+
+ --------------------------------------------------*/
+uno::Reference< awt::XControlModel > BibDataManager::createGridModel(const uno::Reference< XForm > & xDbForm)
+{
+ try
+ {
+ uno::Reference< XPropertySet > aFormPropSet( xDbForm, UNO_QUERY );
+ uno::Any aDbSource=aFormPropSet->getPropertyValue(C2U("Command"));
+ rtl::OUString aName=*(OUString*)aDbSource.getValue();
+
+ //xGridModel=loadGridModel(aName);
+ xGridModel=loadGridModel(gGridName);
+
+ uno::Reference< XNameContainer > xNameCont(xDbForm, UNO_QUERY);
+
+ if(xNameCont->hasByName(aName))
+ {
+ xNameCont->removeByName(aName);
+ }
+
+ xNameCont->insertByName(aName, uno::Any(&xGridModel, ::getCppuType((Reference<XFormComponent>*)0)));
+
+ }
+ catch(...)
+ {
+ DBG_ERROR("::createGridModel: something went wrong !");
+ }
+
+
+ return xGridModel;
+}
+/* --------------------------------------------------
+
+ --------------------------------------------------*/
+uno::Reference< XForm > BibDataManager::getDatabaseForm()
+{
+ return xForm;
+}
+/* --------------------------------------------------
+
+ --------------------------------------------------*/
+uno::Reference< XForm > BibDataManager::createDatabaseForm(const rtl::OUString& rURL, rtl::OUString& rTable)
+{
+ uno::Reference< XForm > xResult;
+ try
+ {
+ uno::Reference< lang::XMultiServiceFactory > xMgr = utl::getProcessServiceFactory();
+ xForm = uno::Reference< XForm > (xMgr->createInstance( C2U("com.sun.star.form.component.Form") ),
+ UNO_QUERY );
+
+ uno::Reference< XPropertySet > aPropertySet(xForm, UNO_QUERY );
+
+ aDataSourceURL = rURL;
+ if(aPropertySet.is())
+ {
+ Any aVal; aVal <<= rURL;
+ aPropertySet->setPropertyValue(C2U("DataSourceName"), aVal);
+ aVal <<= (sal_Int32)sdbc::ResultSetType::SCROLL_INSENSITIVE;
+ aPropertySet->setPropertyValue(C2U("ResultSetType"),aVal );
+ aVal <<= (sal_Int32)sdbc::ResultSetConcurrency::READ_ONLY;
+ aPropertySet->setPropertyValue(C2U("ResultSetConcurrency"), aVal);
+
+ //Caching for Performance
+ aVal <<= (sal_Int32)50;
+ aPropertySet->setPropertyValue(C2U("FetchSize"), aVal);
+
+ uno::Reference< sdbc::XConnection > xConnection = getConnection(rURL);
+ uno::Reference< sdbcx::XTablesSupplier > xSupplyTables(xConnection, UNO_QUERY);
+ uno::Reference< XNameAccess > xTables = xSupplyTables.is() ?
+ xSupplyTables->getTables() : uno::Reference< XNameAccess > ();
+
+ uno::Sequence<rtl::OUString> aTableNameSeq;
+ if (xTables.is())
+ aTableNameSeq = xTables->getElementNames();
+
+ if(aTableNameSeq.getLength() > 0)
+ {
+ const rtl::OUString* pTableNames = aTableNameSeq.getConstArray();
+ if(rTable.getLength())
+ aActiveDataTable = rTable;
+ else
+ rTable = aActiveDataTable = pTableNames[0];
+
+ uno::Reference< registry::XRegistryKey > xRoot = xRegistry->getRootKey();
+ uno::Reference< registry::XRegistryKey > xKey = xRoot->openKey(aActiveDataTable);
+ if(!xKey.is())
+ xKey = xRoot->createKey(aActiveDataTable);
+
+ xSourceProps=uno::Reference< XPropertySet > (xKey, UNO_QUERY);
+
+ aVal <<= aActiveDataTable;
+ aPropertySet->setPropertyValue(C2U("Command"), aVal);
+ aVal <<= (sal_Int32)CommandType::TABLE;
+ aPropertySet->setPropertyValue(C2U("CommandType"), aVal);
+
+
+ uno::Reference< sdbc::XDatabaseMetaData > xMetaData = xConnection->getMetaData();
+ aQuoteChar = xMetaData->getIdentifierQuoteString();
+
+ uno::Reference< sdb::XSQLQueryComposerFactory > xFactory(xConnection, UNO_QUERY);
+ xParser = xFactory->createQueryComposer();
+
+ rtl::OUString aString(C2U("SELECT * FROM "));
+ aString += aQuoteChar;
+ aString += aActiveDataTable;
+ aString += aQuoteChar;
+ xParser->setQuery(aString);
+ setQueryField(getQueryField());
+ startQueryWith(getQueryString());
+
+ xResult = xForm;
+ }
+ }
+ }
+ catch(...)
+ {
+ DBG_ERROR("::createDatabaseForm: something went wrong !");
+ }
+
+
+ return xResult;
+}
+//------------------------------------------------------------------------
+uno::Sequence<rtl::OUString> BibDataManager::getDataSources()
+{
+ uno::Sequence<rtl::OUString> aTableNameSeq;
+
+ try
+ {
+ uno::Reference< sdbcx::XTablesSupplier > xSupplyTables(getConnection(xForm), UNO_QUERY);
+ uno::Reference< XNameAccess > xTables;
+ if (xSupplyTables.is())
+ xTables = xSupplyTables->getTables();
+ if (xTables.is())
+ aTableNameSeq = xTables->getElementNames();
+ }
+ catch(...)
+ {
+ DBG_ERROR("::getDataSources: something went wrong !");
+ }
+
+
+ return aTableNameSeq;
+}
+//------------------------------------------------------------------------
+rtl::OUString BibDataManager::getActiveDataTable()
+{
+ return aActiveDataTable;
+}
+//------------------------------------------------------------------------
+uno::Reference< XSQLQueryComposer > BibDataManager::getParser()
+{
+ return xParser;
+}
+//------------------------------------------------------------------------
+void BibDataManager::setFilter(const rtl::OUString& rQuery)
+{
+ try
+ {
+ xParser->setFilter(rQuery);
+ rtl::OUString aQuery=xParser->getFilter();
+ uno::Reference< XPropertySet > aPropertySet(xForm, UNO_QUERY );
+ Any aVal; aVal <<= aQuery;
+ aPropertySet->setPropertyValue(C2U("Filter"), aVal);
+ BOOL bVal = sal_True;
+ aVal.setValue(&bVal, ::getBooleanCppuType());
+ aPropertySet->setPropertyValue(C2U("ApplyFilter"), aVal);
+ uno::Reference< XLoadable > xLoadable(xForm, UNO_QUERY );
+ xLoadable->reload();
+ }
+ catch(...)
+ {
+ DBG_ERROR("::setFilterOnActiveDataSource: something went wrong !");
+ }
+
+
+}
+//------------------------------------------------------------------------
+rtl::OUString BibDataManager::getFilter()
+{
+
+ rtl::OUString aQueryString;
+ try
+ {
+ uno::Reference< XPropertySet > aPropertySet(xForm, UNO_QUERY );
+ uno::Any aQuery=aPropertySet->getPropertyValue(C2U("Filter"));
+
+ if(aQuery.getValueType() == ::getCppuType((OUString*)0))
+ {
+ aQueryString=*(OUString*)aQuery.getValue();
+ }
+ }
+ catch(...)
+ {
+ DBG_ERROR("::getFilterOnActiveDataSource: something went wrong !");
+ }
+
+
+ return aQueryString;
+
+}
+//------------------------------------------------------------------------
+uno::Sequence<rtl::OUString> BibDataManager::getQueryFields()
+{
+ uno::Sequence<rtl::OUString> aFieldSeq;
+ uno::Reference< XNameAccess > xFields = getColumns(xForm);
+ if (xFields.is())
+ aFieldSeq = xFields->getElementNames();
+ return aFieldSeq;
+}
+//------------------------------------------------------------------------
+void BibDataManager::setQueryField(const rtl::OUString& rQuery)
+{
+ try
+ {
+ Any aQuery; aQuery <<= rQuery;
+ xSourceProps->setPropertyValue(C2U("QueryField"),aQuery);
+
+ }
+ catch(...)
+ {
+ DBG_ERROR("Exception in BibDataManager::setQueryField")
+ }
+
+}
+//------------------------------------------------------------------------
+rtl::OUString BibDataManager::getQueryField()
+{
+ rtl::OUString aFieldString;
+ try
+ {
+ uno::Any aField=xSourceProps->getPropertyValue(C2U("QueryField"));
+
+ if(aField.getValueType() == ::getVoidCppuType())
+ {
+ uno::Sequence<rtl::OUString> aSeq=getQueryFields();
+ const rtl::OUString* pFields = aSeq.getConstArray();
+ if(aSeq.getLength()>0)
+ {
+ aFieldString=pFields[0];
+ }
+ }
+ else
+ {
+ aFieldString = *(OUString*)aField.getValue();
+ }
+
+ }
+ catch(...)
+ {
+ DBG_ERROR("Exception in BibDataManager::getQueryField")
+ }
+
+
+ return aFieldString;
+}
+//------------------------------------------------------------------------
+void BibDataManager::startQueryWith(const OUString& rQuery)
+{
+ try
+ {
+ uno::Any aQuery;
+ aQuery <<= rQuery;
+ xSourceProps->setPropertyValue(C2U("QueryText"), aQuery);
+
+ rtl::OUString aQueryString;
+ if(rQuery.len()>0)
+ {
+ aQueryString=aQuoteChar;
+ aQueryString+=getQueryField();
+ aQueryString+=aQuoteChar;
+ aQueryString+=C2U(" like '");
+ String sQuery(rQuery);
+ sQuery.SearchAndReplaceAll('?','_');
+ sQuery.SearchAndReplaceAll('*','%');
+ aQueryString += sQuery;
+ aQueryString+=C2U("%'");
+ }
+ setFilter(aQueryString);
+
+ }
+ catch(...)
+ {
+ DBG_ERROR("Exception in BibDataManager::StartQueryWith")
+ }
+
+}
+//------------------------------------------------------------------------
+rtl::OUString BibDataManager::getQueryString()
+{
+ rtl::OUString aQueryString;
+ try
+ {
+ uno::Any aQuery=xSourceProps->getPropertyValue(C2U("QueryText"));
+ if(aQuery.getValueType() == ::getCppuType((OUString*)0))
+ {
+ aQueryString=*(OUString*)aQuery.getValue();
+ }
+ }
+ catch(...)
+ {
+ DBG_ERROR("Exception in BibDataManager::getQueryString")
+ }
+
+
+ return aQueryString;
+}
+/* -----------------03.12.99 15:05-------------------
+
+ --------------------------------------------------*/
+void BibDataManager::setActiveDataSource(const rtl::OUString& rURL)
+{
+ //unloadDatabase();
+ rtl::OUString uTable;
+ aDataSourceURL = rURL;
+ uno::Reference< XPropertySet > aPropertySet(xForm, UNO_QUERY );
+ if(aPropertySet.is())
+ {
+ Any aVal; aVal <<= rURL;
+ aPropertySet->setPropertyValue(C2U("DataSourceName"), aVal);
+ uno::Sequence<rtl::OUString> aTableNameSeq;
+ uno::Reference< sdbc::XConnection > xConnection = getConnection(xForm);
+ uno::Reference< sdbcx::XTablesSupplier > xSupplyTables(xConnection, UNO_QUERY);
+ if(xSupplyTables.is())
+ {
+ uno::Reference< XNameAccess > xAccess = xSupplyTables->getTables();
+ aTableNameSeq = xAccess->getElementNames();
+ }
+ if(aTableNameSeq.getLength() > 0)
+ {
+ const rtl::OUString* pTableNames = aTableNameSeq.getConstArray();
+ aActiveDataTable = pTableNames[0];
+ aVal <<= aActiveDataTable;
+ aPropertySet->setPropertyValue(C2U("Command"), aVal);
+ rtl::OUString aString(C2U("SELECT * FROM "));
+ aString+=aQuoteChar;
+ aString+=aActiveDataTable;
+ aString+=aQuoteChar;
+ xParser->setQuery(aString);
+ setQueryField(getQueryField());
+ startQueryWith(getQueryString());
+ setActiveDataTable(aActiveDataTable);
+ }
+ FeatureStateEvent aEvent;
+ util::URL aURL;
+ aEvent.IsEnabled = sal_True;
+ aEvent.Requery = sal_False;
+ //aEvent.Source = (XDispatch *) this;
+ aEvent.FeatureDescriptor = getActiveDataTable();
+
+ uno::Sequence<rtl::OUString> aStringSeq = getDataSources();
+ aEvent.State.setValue(&aStringSeq, ::getCppuType((uno::Sequence<rtl::OUString>*)0));
+
+ if(pToolbar)
+ {
+ aURL.Complete =C2U(".uno:Bib/source");
+ aEvent.FeatureURL = aURL;
+ pToolbar->statusChanged( aEvent );
+ }
+ if(pGridWin)
+ {
+ aURL.Complete =C2U(".uno:Bib/newGridModel");
+ aEvent.FeatureURL = aURL;
+ uno::Reference< awt::XControlModel > xModel = createGridModel();
+ aEvent.State.setValue(&xModel, ::getCppuType((Reference<awt::XControlModel>*)0));
+ pGridWin->statusChanged( aEvent );
+ }
+ }
+}
+/* --------------------------------------------------
+
+ --------------------------------------------------*/
+void BibDataManager::setActiveDataTable(const rtl::OUString& rTable)
+{
+ ResetIdentifierMapping();
+ try
+ {
+ sal_Bool bFlag=sal_False;
+ uno::Reference< XPropertySet > aPropertySet(xForm, UNO_QUERY );
+
+ if(aPropertySet.is())
+ {
+ uno::Reference< sdbc::XConnection > xConnection = getConnection(xForm);
+ uno::Reference< sdbcx::XTablesSupplier > xSupplyTables(xConnection, UNO_QUERY);
+ uno::Reference< XNameAccess > xAccess = xSupplyTables->getTables();
+ uno::Sequence<rtl::OUString> aTableNameSeq = xAccess->getElementNames();
+ sal_uInt32 nCount = aTableNameSeq.getLength();
+ const rtl::OUString* pTableNames = aTableNameSeq.getConstArray();
+
+ for(sal_Int32 i=0;i<nCount;i++)
+ {
+ if(rTable == pTableNames[i])
+ {
+ aActiveDataTable=rTable;
+ Any aVal; aVal <<= rTable;
+ aPropertySet->setPropertyValue(C2U("Command"), aVal);
+ bFlag=sal_True;
+ break;
+ }
+ }
+ if(bFlag)
+ {
+/* if(xGridModel.is())
+ {
+ saveGridModel(xGridModel);
+ }*/
+
+ uno::Reference< registry::XRegistryKey > xRoot = xRegistry->getRootKey();
+ uno::Reference< registry::XRegistryKey > xKey = xRoot->openKey(aActiveDataTable);
+
+ if(!xKey.is())
+ xKey = xRoot->createKey(aActiveDataTable);
+
+ xSourceProps=uno::Reference< XPropertySet > (xKey, UNO_QUERY);
+
+ uno::Reference< sdbc::XDatabaseMetaData > xMetaData = xConnection->getMetaData();
+ aQuoteChar = xMetaData->getIdentifierQuoteString();
+
+ uno::Reference< sdb::XSQLQueryComposerFactory > xFactory(xConnection, UNO_QUERY);
+ xParser = xFactory->createQueryComposer();
+
+ rtl::OUString aString(C2U("SELECT * FROM "));
+ aString+=aQuoteChar;
+ aString+=aActiveDataTable;
+ aString+=aQuoteChar;
+ xParser->setQuery(aString);
+
+ setQueryField(getQueryField());
+ startQueryWith(getQueryString());
+
+ BibModul::SetBibliographyURL(aDataSourceURL, aActiveDataTable);
+ }
+ if(pBibView)
+ pBibView->UpdatePages();
+ }
+ }
+ catch(...)
+ {
+ DBG_ERROR("::setActiveDataTable: something went wrong !");
+ }
+
+}
+//------------------------------------------------------------------------
+void BibDataManager::loadDatabase()
+{
+ if(xForm.is())
+ {
+ uno::Reference< XLoadable > xFormAsLoadable(xForm, UNO_QUERY );
+ DBG_ASSERT(xFormAsLoadable.is(), "BibDataManager::loadDatabase : invalid form !");
+ xFormAsLoadable->load();
+ xFormAsLoadable->reload(); // why ? may be very expensive !
+
+ SetMeAsUidListener();
+ }
+}
+//------------------------------------------------------------------------
+void BibDataManager::unloadDatabase()
+{
+ if(xForm.is())
+ {
+ RemoveMeAsUidListener();
+ uno::Reference< XLoadable > xFormAsLoadable(xForm, UNO_QUERY );
+ DBG_ASSERT(xFormAsLoadable.is(), "BibDataManager::unloadDatabase : invalid form !");
+ xFormAsLoadable->unload();
+ }
+}
+//------------------------------------------------------------------------
+uno::Reference< awt::XControlModel > BibDataManager::loadGridModel(const rtl::OUString& rName)
+{
+ uno::Reference< awt::XControlModel > xModel;
+
+ try
+ {
+ uno::Reference< lang::XMultiServiceFactory > xMgr = utl::getProcessServiceFactory();
+ uno::Reference< XInterface > xObject = xMgr->createInstance(C2U("com.sun.star.form.component.GridControl"));
+ xModel=uno::Reference< awt::XControlModel > ( xObject, UNO_QUERY );
+ uno::Reference< XPropertySet > xPropSet( xModel, UNO_QUERY );
+ uno::Any aDbSource; aDbSource <<= rName;
+ xPropSet->setPropertyValue( C2U("Name"),aDbSource);
+ rtl::OUString aControlName(C2U("com.sun.star.form.control.ExtendedGridControl"));
+ uno::Any aAny; aAny <<= aControlName;
+ xPropSet->setPropertyValue( C2U("DefaultControl"),aAny );
+
+ uno::Reference< XFormComponent > aFormComp(xModel,UNO_QUERY );
+ InsertFields(aFormComp);
+
+ rtl::OUString uProp(C2U("HelpURL"));
+ uno::Reference< XPropertySetInfo > xPropInfo = xPropSet->getPropertySetInfo();
+ if(xPropInfo->hasPropertyByName(uProp))
+ {
+ String sId(C2S("HID:"));
+ sId += HID_BIB_DB_GRIDCTRL;
+ uno::Any aVal; aVal <<= OUString(sId);
+ xPropSet->setPropertyValue(uProp, aVal);
+ }
+ }
+ catch(...)
+ {
+ DBG_ERROR("::loadGridModel: something went wrong !");
+ }
+
+
+ return xModel;
+}
+//------------------------------------------------------------------------
+/*void BibDataManager::saveGridModel(const uno::Reference< awt::XControlModel > & rGridModel)
+{
+ try
+ {
+ uno::Reference< XPersistObject > aPersistObject(rGridModel, UNO_QUERY );
+
+ uno::Any aGridModel(&aPersistObject, ::getCppuType((const XPersistObject*)0));
+
+ xSourceProps->setPropertyValue(gGridName,aGridModel);
+ }
+ catch(...)
+ {
+ DBG_ERROR("::saveGridModelData: something went wrong !");
+ }
+
+}*/
+//------------------------------------------------------------------------
+uno::Reference< XPropertySet > BibDataManager::createGlobalProperties()
+{
+ try
+ {
+ uno::Reference< registry::XRegistryKey > xRoot = xRegistry->getRootKey();
+ uno::Reference< registry::XRegistryKey > xKey = xRoot->openKey(gGlobalName);
+ if(!xKey.is())
+ xKey = xRoot->createKey(gGlobalName);
+
+ return uno::Reference< XPropertySet > (xKey, UNO_QUERY);
+ }
+
+ catch(...)
+ {
+ DBG_ERROR("::getViewProperties: something went wrong !");
+ }
+
+ return uno::Reference< XPropertySet > ();
+}
+//------------------------------------------------------------------------
+void BibDataManager::setViewSize(long nSize)
+{
+ try
+ {
+ uno::Any aViewSize; aViewSize <<= (sal_Int32) nSize;
+ xGlobalProps->setPropertyValue(gViewSize,aViewSize);
+ }
+ catch(...)
+ {
+ DBG_ERROR("::setViewSize: something went wrong !");
+ }
+
+}
+//------------------------------------------------------------------------
+long BibDataManager::getViewSize()
+{
+ long nSize=0;
+ try
+ {
+ uno::Any aViewSize=xGlobalProps->getPropertyValue(gViewSize);
+
+ if(aViewSize.getValueType() != ::getVoidCppuType())
+ {
+ aViewSize >>= nSize;
+ }
+ }
+ catch(...)
+ {
+ DBG_ERROR("::getViewSize: something went wrong !");
+ }
+ return nSize;
+}
+//------------------------------------------------------------------------
+void BibDataManager::setBeamerSize(long nSize)
+{
+ try
+ {
+ uno::Any aBeamerSize; aBeamerSize <<= (sal_Int32) nSize;
+ xGlobalProps->setPropertyValue(gBeamerSize,aBeamerSize);
+ }
+ catch(...)
+ {
+ DBG_ERROR("::setBeamerSize: something went wrong !");
+ }
+
+}
+//------------------------------------------------------------------------
+long BibDataManager::getBeamerSize()
+{
+ long nSize=0;
+ try
+ {
+ uno::Any aBeamerSize=xGlobalProps->getPropertyValue(gBeamerSize);
+
+ if(aBeamerSize.getValueType() != ::getVoidCppuType())
+ {
+ aBeamerSize >>= nSize;
+ }
+ }
+ catch(...)
+ {
+ DBG_ERROR("::getBeamerSize: something went wrong !");
+ }
+ return nSize;
+}
+//------------------------------------------------------------------------
+uno::Reference< XPropertySet > BibDataManager::getViewProperties()
+{
+ try
+ {
+ uno::Reference< registry::XRegistryKey > xKey = uno::Reference< registry::XRegistryKey > (xSourceProps, UNO_QUERY);
+ uno::Reference< registry::XRegistryKey > xViewKey=xKey->openKey(gViewName);
+ if(!xViewKey.is())
+ {
+ xViewKey=xKey->createKey(gViewName);
+ }
+ return uno::Reference< XPropertySet > (xViewKey, UNO_QUERY);
+ }
+ catch(...)
+ {
+ DBG_ERROR("::getViewProperties: something went wrong !");
+ }
+ return uno::Reference< XPropertySet > ();
+}
+//------------------------------------------------------------------------
+rtl::OUString BibDataManager::getControlName(sal_Int32 nFormatKey )
+{
+ rtl::OUString aResStr;
+ switch (nFormatKey)
+ {
+ case DataType::BIT:
+ aResStr=C2U("CheckBox");
+ break;
+ case DataType::TINYINT:
+ case DataType::SMALLINT:
+ case DataType::INTEGER:
+ aResStr=C2U("NumericField"); ;
+ break;
+ case DataType::REAL:
+ case DataType::DOUBLE:
+ case DataType::NUMERIC:
+ case DataType::DECIMAL:
+ aResStr=C2U("FormattedField");
+ break;
+ case DataType::TIMESTAMP:
+ aResStr=C2U("FormattedField");
+ break;
+ case DataType::DATE:
+ aResStr=C2U("DateField");
+ break;
+ case DataType::TIME:
+ aResStr=C2U("TimeField");
+ break;
+ case DataType::CHAR:
+ case DataType::VARCHAR:
+ case DataType::LONGVARCHAR:
+ default:
+ aResStr=C2U("TextField");
+ break;
+ }
+ return aResStr;
+}
+//------------------------------------------------------------------------
+uno::Reference< awt::XControlModel > BibDataManager::loadControlModel(const rtl::OUString& rName, sal_Bool bForceListBox)
+{
+ uno::Reference< awt::XControlModel > xModel;
+
+ rtl::OUString aName(C2U("View_"));
+ aName+=rName;
+
+ try
+ {
+ uno::Reference< io::XPersistObject > aObject;
+ uno::Any aControlModel=xSourceProps->getPropertyValue(aName);
+ if(aControlModel.getValueType() == ::getCppuType((Reference<io::XPersistObject>*)0))
+ {
+ aObject=*(uno::Reference< io::XPersistObject > *)aControlModel.getValue();
+ }
+
+ if(!aObject.is() )
+ {
+ uno::Reference< XNameAccess > xFields = getColumns(xForm);
+ if (!xFields.is())
+ return xModel;
+ uno::Reference< XPropertySet > xField;
+
+ uno::Any aElement;
+
+ if(xFields->hasByName(rName))
+ {
+ aElement = xFields->getByName(rName);
+ xField = *(uno::Reference< XPropertySet > *)aElement.getValue();
+ uno::Reference< XPropertySetInfo > xInfo = xField.is() ? xField->getPropertySetInfo() : uno::Reference< XPropertySetInfo > ();
+ sal_Int32 nFormatKey = 0;
+ if (xInfo.is() && xInfo->hasPropertyByName(FM_PROP_FORMATKEY))
+ xField->getPropertyValue(FM_PROP_FORMATKEY) >>= nFormatKey;
+
+ rtl::OUString aInstanceName(C2U("com.sun.star.form.component."));
+
+ if (bForceListBox)
+ aInstanceName += C2U("ListBox");
+ else
+ aInstanceName += getControlName(nFormatKey);
+
+ uno::Reference< lang::XMultiServiceFactory > xMgr = utl::getProcessServiceFactory();
+ uno::Reference< XInterface > xObject = xMgr->createInstance(aInstanceName);
+ xModel=uno::Reference< awt::XControlModel > ( xObject, UNO_QUERY );
+ uno::Reference< XPropertySet > xPropSet( xModel, UNO_QUERY );
+ uno::Any aFieldName; aFieldName <<= aName;
+ xPropSet->setPropertyValue( FM_PROP_NAME,aFieldName);
+
+ uno::Any aDbSource; aDbSource <<= rName;
+ xPropSet->setPropertyValue(FM_PROP_CONTROLSOURCE,aDbSource);
+
+ uno::Reference< XFormComponent > aFormComp(xModel,UNO_QUERY );
+
+ uno::Reference< XNameContainer > xNameCont(xForm, UNO_QUERY);
+ xNameCont->insertByName(aName, uno::Any(&xModel, ::getCppuType((Reference<XFormComponent>*)0)));
+ }
+ }
+ else
+ {
+ xModel=uno::Reference< awt::XControlModel > (aObject,UNO_QUERY );
+ }
+ }
+ catch(...)
+ {
+ DBG_ERROR("::loadControlModel: something went wrong !");
+ }
+ return xModel;
+}
+//------------------------------------------------------------------------
+void BibDataManager::saveCtrModel(const rtl::OUString& rName,const uno::Reference< awt::XControlModel > & rCtrModel)
+{
+ try
+ {
+ rtl::OUString aName(C2U("View_"));
+ aName+=rName;
+
+ uno::Reference< io::XPersistObject > aPersistObject(rCtrModel, UNO_QUERY );
+
+ uno::Any aModel(&aPersistObject, ::getCppuType((Reference<io::XPersistObject>*)0));
+
+ xSourceProps->setPropertyValue(aName,aModel);
+ }
+ catch(...)
+ {
+ DBG_ERROR("::saveCtrModel: something went wrong !");
+ }
+
+}
+//------------------------------------------------------------------------
+void BibDataManager::disposing( const lang::EventObject& Source )
+{
+ try
+ {
+// if ( xForm.is())
+// {
+// uno::Reference< XPropertySet > aPropSet(xForm, UNO_QUERY );
+// aPropSet->removePropertyChangeListener(FM_PROP_EDITMODE, this);
+// }
+ }
+ catch(...)
+ {
+ DBG_ERROR("::propertyChange: something went wrong !");
+ }
+
+
+
+}
+//------------------------------------------------------------------------
+void BibDataManager::propertyChange(const beans::PropertyChangeEvent& evt) throw( uno::RuntimeException )
+{
+ try
+ {
+ sal_Bool bFlag=sal_False;
+ if(evt.PropertyName == FM_PROP_VALUE)
+ {
+ if( evt.NewValue.getValueType() == ::getCppuType((Reference<io::XInputStream>*)0) )
+ {
+ uno::Reference< io::XDataInputStream > xStream(
+ *(const uno::Reference< io::XInputStream > *)evt.NewValue.getValue(), UNO_QUERY );
+ aUID <<= xStream->readUTF();
+ }
+ else
+ aUID = evt.NewValue;
+
+ uno::Reference< sdbcx::XRowLocate > xLocate(xBibCursor, UNO_QUERY);
+ DBG_ASSERT(xLocate.is(), "BibDataManager::propertyChange : invalid cursor !");
+ bFlag = xLocate->moveToBookmark(aUID);
+ }
+ }
+ catch(...)
+ {
+ DBG_ERROR("::propertyChange: something went wrong !");
+ }
+
+
+}
+//------------------------------------------------------------------------
+void BibDataManager::SetMeAsUidListener()
+{
+try
+{
+ uno::Reference< XNameAccess > xFields = getColumns(xForm);
+ if (!xFields.is())
+ return;
+
+ uno::Sequence<rtl::OUString> aFields(xFields->getElementNames());
+ const rtl::OUString* pFields = aFields.getConstArray();
+ sal_Int32 nCount=aFields.getLength();
+ String StrUID(C2S(STR_UID));
+ rtl::OUString theFieldName;
+ for( sal_Int32 i=0; i<nCount; i++ )
+ {
+ String aName= pFields[i];
+
+ if(aName.EqualsIgnoreCaseAscii(StrUID))
+ {
+ theFieldName=pFields[i];
+ break;
+ }
+ }
+
+ if(theFieldName.len()>0)
+ {
+ uno::Reference< XPropertySet > xPropSet;
+ uno::Any aElement;
+
+ aElement = xFields->getByName(theFieldName);
+ xPropSet = *(uno::Reference< XPropertySet > *)aElement.getValue();
+
+ xPropSet->addPropertyChangeListener(FM_PROP_VALUE, this);
+ }
+
+}
+catch(...)
+{
+ DBG_ERROR("Exception in BibDataManager::SetMeAsUidListener")
+}
+
+
+}
+//------------------------------------------------------------------------
+void BibDataManager::RemoveMeAsUidListener()
+{
+try
+{
+ uno::Reference< XNameAccess > xFields = getColumns(xForm);
+ if (!xFields.is())
+ return;
+
+
+ uno::Sequence<rtl::OUString> aFields(xFields->getElementNames());
+ const rtl::OUString* pFields = aFields.getConstArray();
+ sal_Int32 nCount=aFields.getLength();
+ String StrUID(C2S(STR_UID));
+ rtl::OUString theFieldName;
+ for( sal_Int32 i=0; i<nCount; i++ )
+ {
+ String aName= pFields[i];
+
+ if(aName.EqualsIgnoreCaseAscii(StrUID))
+ {
+ theFieldName=pFields[i];
+ break;
+ }
+ }
+
+ if(theFieldName.len()>0)
+ {
+ uno::Reference< XPropertySet > xPropSet;
+ uno::Any aElement;
+
+ aElement = xFields->getByName(theFieldName);
+ xPropSet = *(uno::Reference< XPropertySet > *)aElement.getValue();
+
+ xPropSet->removePropertyChangeListener(FM_PROP_VALUE, this);
+ }
+
+}
+catch(...)
+{
+ DBG_ERROR("Exception in BibDataManager::RemoveMeAsUidListener")
+}
+
+
+}
+/* -----------------02.11.99 16:11-------------------
+
+ --------------------------------------------------*/
+sal_Bool BibDataManager::moveRelative(sal_Int32 nCount)
+{
+ sal_Bool bRet = sal_False;
+ try
+ {
+ uno::Reference< XResultSet > xCursor(xForm, UNO_QUERY);
+ uno::Reference< XResultSetUpdate > xCursorUpdate(xForm, UNO_QUERY);
+ if (xCursor.is() && xCursorUpdate.is())
+ {
+ bRet = xCursor->relative(nCount);
+ if (xCursor->isAfterLast())
+ xCursorUpdate->moveToInsertRow();
+ }
+ }
+ catch(...)
+ {
+ DBG_ERROR("Exception in BibDataManager::moveRelative")
+ }
+
+ return bRet;
+}
+/* -----------------11.11.99 15:51-------------------
+
+ --------------------------------------------------*/
+void BibDataManager::CreateMappingDialog(Window* pParent)
+{
+ MappingDialog_Impl* pDlg = new MappingDialog_Impl(pParent, this);
+ if(RET_OK == pDlg->Execute() && pBibView)
+ {
+ unloadDatabase();
+ pBibView->UpdatePages();
+ loadDatabase();
+ }
+ delete pDlg;
+}
+/* --------------------------------------------------
+
+ --------------------------------------------------*/
+rtl::OUString BibDataManager::CreateDBChangeDialog(Window* pParent)
+{
+ rtl::OUString uRet;
+ DBChangeDialog_Impl * pDlg = new DBChangeDialog_Impl(pParent, this );
+ if(RET_OK == pDlg->Execute())
+ {
+ String sNewURL = pDlg->GetCurrentURL();
+ if(sNewURL != String(getActiveDataSource()))
+ {
+ uRet = sNewURL;
+ }
+ }
+ delete pDlg;
+ return uRet;
+}
+/* -----------------12.11.99 14:26-------------------
+
+ --------------------------------------------------*/
+const Mapping* BibDataManager::GetMapping(const rtl::OUString& rTableName, const rtl::OUString* pURL) const
+{
+ String sTable(rTableName);
+ String sURL(aDataSourceURL);
+ if(pURL)
+ sURL = String(*pURL);
+ for(sal_uInt16 i = 0; i < pMappingsArr->Count(); i++)
+ {
+ sal_Bool bCaseSensitive = sal_True;
+ INetURLObject aTempURL(sURL);
+ if(INET_PROT_FILE == aTempURL.GetProtocol())
+ {
+ sal_Bool bCaseSensitive = lcl_IsCaseSensitive(aTempURL.GetMainURL());
+// DirEntry aEnt(aTempURL.GetPath());
+// bCaseSensitive = aEnt.IsCaseSensitive();
+ }
+
+ const Mapping* pMapping = pMappingsArr->GetObject(i);
+ sal_Bool bURLEqual = bCaseSensitive ?
+ sURL.Equals(pMapping->sURL) :
+ sURL.EqualsIgnoreCaseAscii(pMapping->sURL);
+
+ if(sTable == pMapping->sTableName && bURLEqual)
+ return pMapping;
+ }
+ return 0;
+}
+/* -----------------12.11.99 14:26-------------------
+
+ --------------------------------------------------*/
+void BibDataManager::SetMapping(const rtl::OUString& rTableName, const Mapping* pSetMapping)
+{
+ ResetIdentifierMapping();
+ String sTable(rTableName);
+ const String sURL(aDataSourceURL);
+ for(sal_uInt16 i = 0; i < pMappingsArr->Count(); i++)
+ {
+ const Mapping* pMapping = pMappingsArr->GetObject(i);
+
+ sal_Bool bCaseSensitive = sal_True;
+ INetURLObject aTempURL(sURL);
+ if(INET_PROT_FILE == aTempURL.GetProtocol())
+ {
+ sal_Bool bCaseSensitive = lcl_IsCaseSensitive(aTempURL.GetMainURL());
+// DirEntry aEnt(aTempURL.GetPath());
+// bCaseSensitive = aEnt.IsCaseSensitive();
+ }
+
+ sal_Bool bURLEqual = bCaseSensitive ?
+ sURL.Equals(pMapping->sURL) :
+ sURL.EqualsIgnoreCaseAscii(pMapping->sURL);
+
+ if(sTable == pMapping->sTableName && bURLEqual)
+ {
+ pMappingsArr->DeleteAndDestroy(i, 1);
+ break;
+ }
+ }
+ Mapping* pNew = new Mapping(*pSetMapping);
+ pMappingsArr->Insert(pNew, pMappingsArr->Count());
+
+ SfxAppIniManagerProperty aProp;
+ GetpApp()->Property( aProp );
+ SfxIniManager* pIniMan = aProp.GetIniManager();
+ if(pIniMan)
+ {
+ //kill all old entries an rewrite all mappings
+ String sTempEntry;
+ sal_uInt16 nIdx = USHRT_MAX;
+ do
+ {
+ String sDBKey(C2S(BIBLIOGRAPHY_INI_DB_ENTRY));
+ String sMapKey = C2S(BIBLIOGRAPHY_INI_MAPPING);
+ if(USHRT_MAX != nIdx)
+ {
+ sDBKey += nIdx;
+ sMapKey += nIdx;
+ }
+ sTempEntry = pIniMan->ReadKey( C2S(BIBLIOGRAPHY_INI_GROUP),
+ sDBKey );
+ pIniMan->DeleteKey( C2S(BIBLIOGRAPHY_INI_GROUP), sDBKey);
+ pIniMan->DeleteKey( C2S(BIBLIOGRAPHY_INI_GROUP), sMapKey);
+ nIdx = USHRT_MAX == nIdx ? 0 : nIdx +1;
+ }while(sTempEntry.Len());
+
+ nIdx = USHRT_MAX;
+ for(sal_uInt16 i = 0; i < pMappingsArr->Count(); i++)
+ {
+ const Mapping* pMapping = pMappingsArr->GetObject(i);
+
+ String sDataTableEntry(pMapping->sURL);
+ sDataTableEntry = pIniMan->UsePathVars( sDataTableEntry );
+ sDataTableEntry += ';';
+ sDataTableEntry += pMapping->sTableName;
+
+ String sDBKey = C2S(BIBLIOGRAPHY_INI_DB_ENTRY);
+ String sMapKey = C2S(BIBLIOGRAPHY_INI_MAPPING);
+ if(USHRT_MAX != nIdx)
+ {
+ sDBKey += nIdx;
+ sMapKey += nIdx;
+ }
+ pIniMan->WriteKey( C2S(BIBLIOGRAPHY_INI_GROUP), sDBKey, sDataTableEntry );
+
+ String sEntry;
+ for(sal_uInt16 nColumn = 0; nColumn < COLUMN_COUNT; nColumn++)
+ {
+ if(!pMapping->aColumnPairs[nColumn].sLogicalColumnName.Len() ||
+ !pMapping->aColumnPairs[nColumn].sRealColumnName.Len())
+ break;
+ sEntry += pMapping->aColumnPairs[nColumn].sLogicalColumnName;
+ sEntry += PAIR_TOKEN;
+ sEntry += pMapping->aColumnPairs[nColumn].sRealColumnName;
+ sEntry += MAP_TOKEN;
+ }
+ pIniMan->WriteKey( C2S(BIBLIOGRAPHY_INI_GROUP), sMapKey, sEntry );
+
+ nIdx = USHRT_MAX == nIdx ? 0 : nIdx +1;
+ }
+ pIniMan->Flush();
+ }
+}
+/* -----------------06.12.99 15:11-------------------
+
+ --------------------------------------------------*/
+const String& BibDataManager::GetIdentifierMapping()
+{
+ if(!sIdentifierMapping.Len())
+ {
+ const Mapping* pMapping = GetMapping(getActiveDataTable());
+ sIdentifierMapping = GetDefColumnName(IDENTIFIER_POS);
+ if(pMapping)
+ {
+ for(sal_uInt16 nEntry = 0; nEntry < COLUMN_COUNT; nEntry++)
+ {
+ if(pMapping->aColumnPairs[nEntry].sLogicalColumnName == sIdentifierMapping)
+ {
+ sIdentifierMapping = pMapping->aColumnPairs[nEntry].sRealColumnName;
+ break;
+ }
+ }
+ }
+ }
+ return sIdentifierMapping;
+}
+
diff --git a/extensions/source/bibliography/datman.hrc b/extensions/source/bibliography/datman.hrc
new file mode 100644
index 000000000000..4122e7b5be3d
--- /dev/null
+++ b/extensions/source/bibliography/datman.hrc
@@ -0,0 +1,137 @@
+/*************************************************************************
+ *
+ * $RCSfile: datman.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:16:44 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+
+#define BT_OK 1
+#define BT_CANCEL 2
+#define BT_HELP 3
+#define GB_MAPPING 4
+#define FT_IDENTIFIER 5
+#define LB_IDENTIFIER 6
+#define ST_NONE 7
+
+#define FT_AUTHORITYTYPE 8
+#define LB_AUTHORITYTYPE 9
+#define FT_ADDRESS 10
+#define LB_ADDRESS 11
+#define FT_ANNOTE 12
+#define LB_ANNOTE 13
+#define FT_AUTHOR 14
+#define LB_AUTHOR 15
+#define FT_TITLE 16
+#define LB_TITLE 17
+#define FT_MONTH 18
+#define LB_MONTH 19
+#define FT_YEAR 20
+#define LB_YEAR 21
+#define FT_ISBN 22
+#define LB_ISBN 23
+#define FT_BOOKTITLE 24
+#define LB_BOOKTITLE 25
+#define FT_CHAPTER 26
+#define LB_CHAPTER 27
+#define FT_EDITION 28
+#define LB_EDITION 29
+#define FT_EDITOR 30
+#define LB_EDITOR 31
+#define FT_HOWPUBLISHED 32
+#define LB_HOWPUBLISHED 33
+#define FT_INSTITUTION 34
+#define LB_INSTITUTION 35
+#define FT_JOURNAL 36
+#define LB_JOURNAL 37
+#define FT_NOTE 38
+#define LB_NOTE 39
+#define FT_NUMBER 40
+#define LB_NUMBER 41
+#define FT_ORGANIZATIONS 42
+#define LB_ORGANIZATIONS 43
+#define FT_PAGES 44
+#define LB_PAGES 45
+#define FT_PUBLISHER 46
+#define LB_PUBLISHER 47
+#define FT_SCHOOL 48
+#define LB_SCHOOL 49
+#define FT_SERIES 50
+#define LB_SERIES 51
+#define FT_REPORTTYPE 52
+#define LB_REPORTTYPE 53
+#define FT_VOLUME 54
+#define LB_VOLUME 55
+#define FT_URL 56
+#define LB_URL 57
+#define FT_CUSTOM1 58
+#define LB_CUSTOM1 59
+#define FT_CUSTOM2 60
+#define LB_CUSTOM2 61
+#define FT_CUSTOM3 62
+#define LB_CUSTOM3 63
+#define FT_CUSTOM4 64
+#define LB_CUSTOM4 65
+#define FT_CUSTOM5 66
+#define LB_CUSTOM5 67
+
+#define GB_SELECTION 68
+#define ST_ENTRY 69
+#define ST_URL 70
+#define LB_SELECTION 71
+#define HB_SELECTION 72
+
diff --git a/extensions/source/bibliography/datman.hxx b/extensions/source/bibliography/datman.hxx
new file mode 100644
index 000000000000..130ebfae7403
--- /dev/null
+++ b/extensions/source/bibliography/datman.hxx
@@ -0,0 +1,253 @@
+/*************************************************************************
+ *
+ * $RCSfile: datman.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:16:44 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _BIB_DATMAN_HXX
+#define _BIB_DATMAN_HXX
+
+#ifndef _COM_SUN_STAR_AWT_XCONTROLMODEL_HPP_
+#include <com/sun/star/awt/XControlModel.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FORM_XFORM_HPP_
+#include <com/sun/star/form/XForm.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBC_XRESULTSET_HPP_
+#include <com/sun/star/sdbc/XResultSet.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDB_XSQLQUERYCOMPOSER_HPP_
+#include <com/sun/star/sdb/XSQLQueryComposer.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_REGISTRY_XSIMPLEREGISTRY_HPP_
+#include <com/sun/star/registry/XSimpleRegistry.hpp>
+#endif
+#ifndef _CPPUHELPER_IMPLBASE1_HXX_
+#include <cppuhelper/implbase1.hxx> // helper for implementations
+#endif
+
+class BibRegistry;
+class MappingArray;
+class Window;
+//-----------------------------------------------------------------------------
+#define COLUMN_COUNT 31
+#define IDENTIFIER_POS 0
+#define AUTHORITYTYPE_POS 1
+#define AUTHOR_POS 2
+#define TITLE_POS 3
+#define YEAR_POS 4
+#define ISBN_POS 5
+#define BOOKTITLE_POS 6
+#define CHAPTER_POS 7
+#define EDITION_POS 8
+#define EDITOR_POS 9
+#define HOWPUBLISHED_POS 10
+#define INSTITUTION_POS 11
+#define JOURNAL_POS 12
+#define MONTH_POS 13
+#define NOTE_POS 14
+#define ANNOTE_POS 15
+#define NUMBER_POS 16
+#define ORGANIZATIONS_POS 17
+#define PAGES_POS 18
+#define PUBLISHER_POS 19
+#define ADDRESS_POS 20
+#define SCHOOL_POS 21
+#define SERIES_POS 22
+#define REPORTTYPE_POS 23
+#define VOLUME_POS 24
+#define URL_POS 25
+#define CUSTOM1_POS 26
+#define CUSTOM2_POS 27
+#define CUSTOM3_POS 28
+#define CUSTOM4_POS 29
+#define CUSTOM5_POS 30
+
+//-----------------------------------------------------------------------------
+struct StringPair
+{
+ String sRealColumnName;
+ String sLogicalColumnName;
+};
+//-----------------------------------------------------------------------------
+struct Mapping
+{
+ String sTableName;
+ String sURL;
+ StringPair aColumnPairs[COLUMN_COUNT];
+};
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+class BibView;
+class BibToolBar;
+class BibGridwin;
+class BibDataManager : public cppu::WeakImplHelper1 < ::com::sun::star::beans::XPropertyChangeListener>
+{
+private:
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > xForm;
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > xGridModel;
+ ::com::sun::star::uno::Reference< ::com::sun::star::registry::XSimpleRegistry > xRegistry;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSourceProps;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xGlobalProps;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSQLQueryComposer > xParser;
+ ::rtl::OUString aActiveDataTable;
+ ::rtl::OUString aDataSourceURL;
+ ::rtl::OUString aQuoteChar;
+// sal_Bool bNew;
+// sal_Bool bModified;
+ ::com::sun::star::uno::Any aUID;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > xBibCursor;
+ MappingArray* pMappingsArr;
+
+ BibView* pBibView;
+ BibToolBar* pToolbar;
+ BibGridwin* pGridWin;
+
+ String aColumnDefaults[COLUMN_COUNT];
+ String sIdentifierMapping;
+protected:
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > createGlobalProperties();
+ void InsertFields(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > & xGrid);
+ void InitRegistry();
+ void SetMeAsUidListener();
+ void RemoveMeAsUidListener();
+
+ void UpdateAddressbookCursor(::rtl::OUString aSourceName);
+public:
+
+ BibDataManager(BibRegistry * pRegistry);
+ ~BibDataManager();
+
+ virtual void SAL_CALL propertyChange(const ::com::sun::star::beans::PropertyChangeEvent& evt)
+ throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source );
+
+
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > createDatabaseForm(const ::rtl::OUString& rURL, ::rtl::OUString& rTableName);
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > getDatabaseForm();
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > createGridModel(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > & xDbForm);
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > createGridModel();
+
+ void loadDatabase();
+ void unloadDatabase();
+
+ ::com::sun::star::uno::Sequence< ::rtl::OUString> getDataSources();
+
+ ::rtl::OUString getActiveDataSource() {return aDataSourceURL;}
+ void setActiveDataSource(const ::rtl::OUString& rURL);
+
+ ::rtl::OUString getActiveDataTable();
+ void setActiveDataTable(const ::rtl::OUString& rTable);
+
+ void setFilter(const ::rtl::OUString& rQuery);
+ ::rtl::OUString getFilter();
+
+ ::com::sun::star::uno::Sequence< ::rtl::OUString> getQueryFields();
+ void setQueryField(const ::rtl::OUString& rField);
+ ::rtl::OUString getQueryField();
+ void startQueryWith(const ::rtl::OUString& rQuery);
+ ::rtl::OUString getQueryString();
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSQLQueryComposer > getParser();
+
+// void saveGridModel(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > & xDbForm);
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > loadGridModel(const ::rtl::OUString& rName);
+
+ void setBeamerSize(long nSize);
+ long getBeamerSize();
+ void setViewSize(long nSize);
+ long getViewSize();
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > getViewProperties();
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > getChildViewProperties(const ::rtl::OUString& rName);
+
+ ::rtl::OUString getControlName(sal_Int32 nFormatKey );
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > loadControlModel(const ::rtl::OUString& rName,
+ sal_Bool bForceListBox = sal_False);
+ void saveCtrModel(const ::rtl::OUString& rName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > & rCtrModel);
+
+// sal_Bool isNew() { return bNew;}
+// sal_Bool isModified() { return bModified;}
+
+ sal_Bool moveRelative(long nMove);
+
+ void CreateMappingDialog(Window* pParent);
+ ::rtl::OUString CreateDBChangeDialog(Window* pParent);
+ const Mapping* GetMapping(const ::rtl::OUString& rTableName, const ::rtl::OUString* pURL = 0) const;
+ void SetMapping(const ::rtl::OUString& rTableName, const Mapping* pMapping);
+
+ const String& GetDefColumnName(sal_uInt16 nIndex) const
+ {return aColumnDefaults[nIndex];}
+
+ void SetView(BibView* pView) {pBibView = pView;}
+
+ void SetToolbar(BibToolBar* pSet) {pToolbar = pSet;}
+ void SetGridWin(BibGridwin* pSet) {pGridWin = pSet;}
+
+ const String& GetIdentifierMapping();
+ void ResetIdentifierMapping() {sIdentifierMapping.Erase();}
+};
+
+
+#endif
diff --git a/extensions/source/bibliography/datman.src b/extensions/source/bibliography/datman.src
new file mode 100644
index 000000000000..311968f03fcc
--- /dev/null
+++ b/extensions/source/bibliography/datman.src
@@ -0,0 +1,1276 @@
+/*************************************************************************
+ *
+ * $RCSfile: datman.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:16:44 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+//==================================================================
+// BibDataManager
+//
+//
+//
+// $Author: hr $ $Date: 2000-09-18 16:16:44 $ $Revision: 1.1.1.1 $
+// $Logfile: T:/sc/inc/scresid.hxv $ $Workfile: scresid.hxx $
+//------------------------------------------------------------------
+
+#include "bib.hrc"
+#include "datman.hrc"
+ModalDialog RID_DLG_MAPPING
+{
+ HelpID = HID_DLG_MAPPING;
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 391 , 181 ) ;
+ Moveable = TRUE ;
+ Text = "Spaltenzuordung fr Tabelle %1";
+ Text [ENGLISH] = "Column assignment for table %1";
+
+ OKButton BT_OK
+ {
+ Pos = MAP_APPFONT ( 338 , 3 ) ;
+ Size = MAP_APPFONT ( 50 , 12 ) ;
+ };
+ CancelButton BT_CANCEL
+ {
+ Pos = MAP_APPFONT ( 338 , 18 ) ;
+ Size = MAP_APPFONT ( 50 , 12 ) ;
+ };
+ HelpButton BT_HELP
+ {
+ Pos = MAP_APPFONT ( 338 , 36 ) ;
+ Size = MAP_APPFONT ( 50 , 12 ) ;
+ };
+ GroupBox GB_MAPPING
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 329 , 175 ) ;
+ Text = "Spaltennamen";
+ Text [ENGLISH] = "Column names";
+ Text[ english_us ] = "Column names";
+ Text[ portuguese ] = "Nomes de coluna";
+ Text[ russian ] = " ";
+ Text[ greek ] = " ";
+ Text[ dutch ] = "Kolomnamen";
+ Text[ french ] = "Noms des colonnes";
+ Text[ spanish ] = "Nombres de columna";
+ Text[ italian ] = "Nomi colonna";
+ Text[ danish ] = "Kolonnenavne";
+ Text[ swedish ] = "Kolumnnamn";
+ Text[ polish ] = "Nazwy kolumn";
+ Text[ portuguese_brazilian ] = "Column names";
+ Text[ japanese ] = "";
+ Text[ korean ] = " ̸";
+ Text[ chinese_simplified ] = "";
+ Text[ chinese_traditional ] = "W";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Stun adlar";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_IDENTIFIER
+ {
+ Pos = MAP_APPFONT ( 12 , 14 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "Krzel";
+ Text [ENGLISH] = "Identifier";
+ Text[ english_us ] = "Identifier";
+ Text[ portuguese ] = "Abreviatura";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Initialen";
+ Text[ french ] = "Abrviation";
+ Text[ spanish ] = "Abreviatura";
+ Text[ italian ] = "Sigla";
+ Text[ danish ] = "Genvej";
+ Text[ swedish ] = "Initialer";
+ Text[ polish ] = "Inicjay";
+ Text[ portuguese_brazilian ] = "Identifier";
+ Text[ japanese ] = "ȗ";
+ Text[ korean ] = "̴ϼ";
+ Text[ chinese_simplified ] = "ʶ";
+ Text[ chinese_traditional ] = "Yg";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Ksaltma";
+ };
+ ListBox LB_IDENTIFIER
+ {
+ Pos = MAP_APPFONT ( 65 , 13 ) ;
+ Size = MAP_APPFONT ( 50 , 60 ) ;
+ DropDown = TRUE;
+ };
+ FixedText FT_AUTHORITYTYPE
+ {
+ Pos = MAP_APPFONT ( 118 , 14 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "Literaturart";
+ Text [ENGLISH] = "Type of literature";
+ Text[ english_us ] = "Type of literature";
+ Text[ portuguese ] = "Tipo de literatura";
+ Text[ russian ] = "";
+ Text[ greek ] = " ";
+ Text[ dutch ] = "Soort literatuur";
+ Text[ french ] = "Genre";
+ Text[ spanish ] = "Tipo de literatura";
+ Text[ italian ] = "Tipo di letteratura";
+ Text[ danish ] = "Litteraturtype";
+ Text[ swedish ] = "Typ av litteratur";
+ Text[ polish ] = "Rodzaj literatury";
+ Text[ portuguese_brazilian ] = "Type of literature";
+ Text[ japanese ] = "{̕";
+ Text[ korean ] = " ";
+ Text[ chinese_simplified ] = "";
+ Text[ chinese_traditional ] = "m";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Kaynaka tr";
+ };
+ ListBox LB_AUTHORITYTYPE
+ {
+ Pos = MAP_APPFONT ( 171 , 13 ) ;
+ Size = MAP_APPFONT ( 50 , 60 ) ;
+ DropDown = TRUE;
+ };
+ FixedText FT_AUTHOR
+ {
+ Pos = MAP_APPFONT ( 229 , 14 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "Autor";
+ Text [ENGLISH] = "Author";
+ Text[ english_us ] = "Author";
+ Text[ portuguese ] = "Autor";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Auteur";
+ Text[ french ] = "Auteur";
+ Text[ spanish ] = "Autor";
+ Text[ italian ] = "Autore";
+ Text[ danish ] = "Forfatter";
+ Text[ swedish ] = "Frfattare";
+ Text[ polish ] = "Autor";
+ Text[ portuguese_brazilian ] = "Author";
+ Text[ japanese ] = "";
+ Text[ korean ] = "";
+ Text[ chinese_simplified ] = "";
+ Text[ chinese_traditional ] = "@";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Yazan";
+ };
+ ListBox LB_AUTHOR
+ {
+ Pos = MAP_APPFONT ( 282 , 13 ) ;
+ Size = MAP_APPFONT ( 50 , 60 ) ;
+ DropDown = TRUE;
+ };
+ FixedText FT_TITLE
+ {
+ Pos = MAP_APPFONT ( 12 , 29 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "Titel";
+ Text [ENGLISH] = "Title";
+ Text[ english_us ] = "Title";
+ Text[ portuguese ] = "Ttulo";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Titel";
+ Text[ french ] = "Titre";
+ Text[ spanish ] = "Ttulo";
+ Text[ italian ] = "Titolo";
+ Text[ danish ] = "Titel";
+ Text[ swedish ] = "Titel";
+ Text[ polish ] = "Tytu";
+ Text[ portuguese_brazilian ] = "Title";
+ Text[ japanese ] = "";
+ Text[ korean ] = "";
+ Text[ chinese_simplified ] = "";
+ Text[ chinese_traditional ] = "D";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Balk";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_TITLE
+ {
+ Pos = MAP_APPFONT ( 65 , 28 ) ;
+ Size = MAP_APPFONT ( 50 , 60 ) ;
+ DropDown = TRUE;
+ };
+ FixedText FT_MONTH
+ {
+ Pos = MAP_APPFONT ( 118 , 29 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "Monat";
+ Text [ENGLISH] = "Month";
+ Text[ english_us ] = "Month";
+ Text[ portuguese ] = "Ms";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Maand";
+ Text[ french ] = "Mois";
+ Text[ spanish ] = "Mes";
+ Text[ italian ] = "Mese";
+ Text[ danish ] = "Mned";
+ Text[ swedish ] = "Mnad";
+ Text[ polish ] = "Miesic";
+ Text[ portuguese_brazilian ] = "Month";
+ Text[ japanese ] = "";
+ Text[ korean ] = "";
+ Text[ chinese_simplified ] = "";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Ay";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_MONTH
+ {
+ Pos = MAP_APPFONT ( 171 , 28 ) ;
+ Size = MAP_APPFONT ( 50 , 60 ) ;
+ DropDown = TRUE;
+ };
+ FixedText FT_YEAR
+ {
+ Pos = MAP_APPFONT ( 229 , 29 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "Jahr";
+ Text [ENGLISH] = "Year";
+ Text[ english_us ] = "Year";
+ Text[ portuguese ] = "Ano";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Jaar";
+ Text[ french ] = "An";
+ Text[ spanish ] = "Ao";
+ Text[ italian ] = "Anno";
+ Text[ danish ] = "r";
+ Text[ swedish ] = "r";
+ Text[ polish ] = "Rok";
+ Text[ portuguese_brazilian ] = "Year";
+ Text[ japanese ] = "N";
+ Text[ korean ] = "";
+ Text[ chinese_simplified ] = "";
+ Text[ chinese_traditional ] = "~";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Yl";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_YEAR
+ {
+ Pos = MAP_APPFONT ( 282 , 28 ) ;
+ Size = MAP_APPFONT ( 50 , 60 ) ;
+ DropDown = TRUE;
+ };
+ FixedText FT_ISBN
+ {
+ Pos = MAP_APPFONT ( 12 , 44 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "ISBN";
+ Text [ENGLISH] = "ISBN";
+ Text[ english_us ] = "ISBN";
+ Text[ portuguese ] = "ISBN";
+ Text[ russian ] = "ISBN";
+ Text[ greek ] = "ISBN";
+ Text[ dutch ] = "ISBN";
+ Text[ french ] = "ISBN";
+ Text[ spanish ] = "ISBN";
+ Text[ italian ] = "ISBN";
+ Text[ danish ] = "ISBN";
+ Text[ swedish ] = "ISBN";
+ Text[ polish ] = "ISBN";
+ Text[ portuguese_brazilian ] = "ISBN";
+ Text[ japanese ] = "ISBN";
+ Text[ korean ] = "ISBN";
+ Text[ chinese_simplified ] = "ISBN";
+ Text[ chinese_traditional ] = "ISBN";
+ Text[ arabic ] = "ISBN";
+ Text[ turkish ] = "ISBN";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_ISBN
+ {
+ Pos = MAP_APPFONT ( 65 , 43 ) ;
+ Size = MAP_APPFONT ( 50 , 60 ) ;
+ DropDown = TRUE;
+ };
+ FixedText FT_BOOKTITLE
+ {
+ Pos = MAP_APPFONT ( 118 , 44 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "Buchtitel";
+ Text [ENGLISH] = "Book title";
+ Text[ english_us ] = "Book title";
+ Text[ portuguese ] = "Ttulo do livro";
+ Text[ russian ] = " ";
+ Text[ greek ] = " ";
+ Text[ dutch ] = "Boektitel";
+ Text[ french ] = "Titre du livre";
+ Text[ spanish ] = "Ttulo del libro";
+ Text[ italian ] = "Titolo del libro";
+ Text[ danish ] = "Bogtitel";
+ Text[ swedish ] = "Boktitel";
+ Text[ polish ] = "Tytu ksiki";
+ Text[ portuguese_brazilian ] = "Book title";
+ Text[ japanese ] = "";
+ Text[ korean ] = "å ";
+ Text[ chinese_simplified ] = "鼮";
+ Text[ chinese_traditional ] = "ѦW";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Kitap bal";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_BOOKTITLE
+ {
+ Pos = MAP_APPFONT ( 171, 43 ) ;
+ Size = MAP_APPFONT ( 50 , 60 ) ;
+ DropDown = TRUE;
+ };
+ FixedText FT_CHAPTER
+ {
+ Pos = MAP_APPFONT ( 229 , 44 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "Kapitel";
+ Text [ENGLISH] = "Chapter";
+ Text[ english_us ] = "Chapter";
+ Text[ portuguese ] = "Captulo";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Hoofdstuk";
+ Text[ french ] = "Chapitre";
+ Text[ spanish ] = "Captulo";
+ Text[ italian ] = "Capitolo";
+ Text[ danish ] = "Kapitel";
+ Text[ swedish ] = "Kapitel";
+ Text[ polish ] = "Rozdzia";
+ Text[ portuguese_brazilian ] = "Chapter";
+ Text[ japanese ] = "";
+ Text[ korean ] = "";
+ Text[ chinese_simplified ] = "";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Blm";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_CHAPTER
+ {
+ Pos = MAP_APPFONT ( 282 , 43 ) ;
+ Size = MAP_APPFONT ( 50 , 60 ) ;
+ DropDown = TRUE;
+ };
+ FixedText FT_EDITION
+ {
+ Pos = MAP_APPFONT ( 12 , 59 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "Ausgabe";
+ Text [ENGLISH] = "Edition";
+ Text[ english_us ] = "Edition";
+ Text[ portuguese ] = "Edio";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Editie";
+ Text[ french ] = "dition";
+ Text[ spanish ] = "Edicin";
+ Text[ italian ] = "Edizione";
+ Text[ danish ] = "Udgave";
+ Text[ swedish ] = "Utgva";
+ Text[ polish ] = "Wydanie";
+ Text[ portuguese_brazilian ] = "Edition";
+ Text[ japanese ] = "";
+ Text[ korean ] = "";
+ Text[ chinese_simplified ] = "汾";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Yaym";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_EDITION
+ {
+ Pos = MAP_APPFONT ( 65 , 58 ) ;
+ Size = MAP_APPFONT ( 50 , 60 ) ;
+ DropDown = TRUE;
+ };
+ FixedText FT_EDITOR
+ {
+ Pos = MAP_APPFONT ( 118 , 59 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "Herausgeber";
+ Text [ENGLISH] = "Editor";
+ Text[ english_us ] = "Editor";
+ Text[ portuguese ] = "Editor";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Uitgever";
+ Text[ french ] = "diteur";
+ Text[ spanish ] = "Editor";
+ Text[ italian ] = "Editore";
+ Text[ danish ] = "Udgiver";
+ Text[ swedish ] = "Utgivare";
+ Text[ polish ] = "Wydawca";
+ Text[ portuguese_brazilian ] = "Editor";
+ Text[ japanese ] = "ҏW";
+ Text[ korean ] = "";
+ Text[ chinese_simplified ] = "";
+ Text[ chinese_traditional ] = "X";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Yaymc";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_EDITOR
+ {
+ Pos = MAP_APPFONT ( 171, 58) ;
+ Size = MAP_APPFONT ( 50 , 60 ) ;
+ DropDown = TRUE;
+ };
+ FixedText FT_HOWPUBLISHED
+ {
+ Pos = MAP_APPFONT ( 229 , 59 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "Ausgabeart";
+ Text [ENGLISH] = "How published";
+ Text[ english_us ] = "Publication type";
+ Text[ portuguese ] = "Tipo de publicao";
+ Text[ russian ] = " ";
+ Text[ greek ] = " ";
+ Text[ dutch ] = "Wijze van publiceren";
+ Text[ french ] = "Mode de publication";
+ Text[ spanish ] = "Tipo de publicacin";
+ Text[ italian ] = "Tipo di edizione";
+ Text[ danish ] = "Udgivelsestype";
+ Text[ swedish ] = "Utgivningstyp";
+ Text[ polish ] = "Rodzaj publikacji";
+ Text[ portuguese_brazilian ] = "How published";
+ Text[ japanese ] = "ް";
+ Text[ korean ] = " ";
+ Text[ chinese_simplified ] = "зʽ";
+ Text[ chinese_traditional ] = "X";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Yaym tr";
+ };
+ ListBox LB_HOWPUBLISHED
+ {
+ Pos = MAP_APPFONT ( 282 , 58 ) ;
+ Size = MAP_APPFONT ( 50 , 60 ) ;
+ DropDown = TRUE;
+ };
+ FixedText FT_INSTITUTION
+ {
+ Pos = MAP_APPFONT ( 12 , 74 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "Institution";
+ Text [ENGLISH] = "Institution";
+ Text[ english_us ] = "Institution";
+ Text[ portuguese ] = "Instituio";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Instelling";
+ Text[ french ] = "Institution";
+ Text[ spanish ] = "Institucin";
+ Text[ italian ] = "Istituzione";
+ Text[ danish ] = "Institution";
+ Text[ swedish ] = "Institution";
+ Text[ polish ] = "Instytucja";
+ Text[ portuguese_brazilian ] = "Institution";
+ Text[ japanese ] = "@";
+ Text[ korean ] = "ȸ";
+ Text[ chinese_simplified ] = "";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Kurum";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_INSTITUTION
+ {
+ Pos = MAP_APPFONT ( 65 , 73 ) ;
+ Size = MAP_APPFONT ( 50 , 60 ) ;
+ DropDown = TRUE;
+ };
+ FixedText FT_JOURNAL
+ {
+ Pos = MAP_APPFONT ( 118 , 74 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "Zeitschrift";
+ Text [ENGLISH] = "Journal";
+ Text[ english_us ] = "Journal";
+ Text[ portuguese ] = "Revista";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Tijdschrift";
+ Text[ french ] = "Revue";
+ Text[ spanish ] = "Revista";
+ Text[ italian ] = "Rivista";
+ Text[ danish ] = "Tidsskrift";
+ Text[ swedish ] = "Tidskrift";
+ Text[ polish ] = "Czasopismo";
+ Text[ portuguese_brazilian ] = "Journal";
+ Text[ japanese ] = "G";
+ Text[ korean ] = "";
+ Text[ chinese_simplified ] = "־";
+ Text[ chinese_traditional ] = "x";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Dergi";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_JOURNAL
+ {
+ Pos = MAP_APPFONT ( 171 , 73 ) ;
+ Size = MAP_APPFONT ( 50 , 60 ) ;
+ DropDown = TRUE;
+ };
+ FixedText FT_NOTE
+ {
+ Pos = MAP_APPFONT ( 229 , 74 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "Notiz";
+ Text [ENGLISH] = "Note";
+ Text[ english_us ] = "Note";
+ Text[ portuguese ] = "Anotaes";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Aantekening";
+ Text[ french ] = "Note";
+ Text[ spanish ] = "Nota";
+ Text[ italian ] = "Nota";
+ Text[ danish ] = "Note";
+ Text[ swedish ] = "Anteckning";
+ Text[ polish ] = "Notatka";
+ Text[ portuguese_brazilian ] = "Note";
+ Text[ japanese ] = "";
+ Text[ korean ] = "޸";
+ Text[ chinese_simplified ] = "ע";
+ Text[ chinese_traditional ] = "O";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Not";
+ };
+ ListBox LB_NOTE
+ {
+ Pos = MAP_APPFONT ( 282 , 73 ) ;
+ Size = MAP_APPFONT ( 50 , 60 ) ;
+ DropDown = TRUE;
+ };
+ FixedText FT_ANNOTE
+ {
+ Pos = MAP_APPFONT ( 12, 89 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "Anmerkung";
+ Text [ENGLISH] = "Annotation";
+ Text[ english_us ] = "Annotation";
+ Text[ portuguese ] = "Anotaes";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Commentaar";
+ Text[ french ] = "Annotation";
+ Text[ spanish ] = "Anotacin";
+ Text[ italian ] = "Annotazione";
+ Text[ danish ] = "Anmrkning";
+ Text[ swedish ] = "Anmrkning";
+ Text[ polish ] = "Adnotacja";
+ Text[ portuguese_brazilian ] = "Annotation";
+ Text[ japanese ] = "";
+ Text[ korean ] = "ּ";
+ Text[ chinese_simplified ] = "˵";
+ Text[ chinese_traditional ] = "ƪ`";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Aklama";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_ANNOTE
+ {
+ Pos = MAP_APPFONT ( 65, 88 ) ;
+ Size = MAP_APPFONT ( 50 , 60 ) ;
+ DropDown = TRUE;
+ };
+ FixedText FT_NUMBER
+ {
+ Pos = MAP_APPFONT ( 118 , 89 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "Nummer";
+ Text [ENGLISH] = "No.";
+ Text[ english_us ] = "No.";
+ Text[ portuguese ] = "N.";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Nummer";
+ Text[ french ] = "No.";
+ Text[ spanish ] = "Nmero";
+ Text[ italian ] = "No.";
+ Text[ danish ] = "Nummer";
+ Text[ swedish ] = "Nummer";
+ Text[ polish ] = "Numer";
+ Text[ portuguese_brazilian ] = "No.";
+ Text[ japanese ] = "No.";
+ Text[ korean ] = "ȣ";
+ Text[ chinese_simplified ] = "";
+ Text[ chinese_traditional ] = "X";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Say";
+ };
+ ListBox LB_NUMBER
+ {
+ Pos = MAP_APPFONT ( 171 , 88 ) ;
+ Size = MAP_APPFONT ( 50 , 60 ) ;
+ DropDown = TRUE;
+ };
+ FixedText FT_ORGANIZATIONS
+ {
+ Pos = MAP_APPFONT ( 229 , 89 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "Organisation";
+ Text [ENGLISH] = "Organization";
+ Text[ english_us ] = "Organization";
+ Text[ portuguese ] = "Organizao";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Organisatie";
+ Text[ french ] = "Organisation";
+ Text[ spanish ] = "Organizacin";
+ Text[ italian ] = "Organizzazione";
+ Text[ danish ] = "Organisation";
+ Text[ swedish ] = "Organisation";
+ Text[ polish ] = "Organizacja";
+ Text[ portuguese_brazilian ] = "Organization";
+ Text[ japanese ] = "gDc";
+ Text[ korean ] = "ü";
+ Text[ chinese_simplified ] = "֯";
+ Text[ chinese_traditional ] = "´";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Organizasyon";
+ };
+ ListBox LB_ORGANIZATIONS
+ {
+ Pos = MAP_APPFONT ( 282, 88 ) ;
+ Size = MAP_APPFONT ( 50 , 60 ) ;
+ DropDown = TRUE;
+ };
+ FixedText FT_PAGES
+ {
+ Pos = MAP_APPFONT ( 12 , 104 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "Seite(n)";
+ Text [ENGLISH] = "Page(s)";
+ Text[ english_us ] = "Page(s)";
+ Text[ portuguese ] = "Pgina(s)";
+ Text[ russian ] = "()";
+ Text[ greek ] = "/-";
+ Text[ dutch ] = "Pagina(s)";
+ Text[ french ] = "Page(s)";
+ Text[ spanish ] = "Pgina(s)";
+ Text[ italian ] = "Pagina/e";
+ Text[ danish ] = "Side(r)";
+ Text[ swedish ] = "Sida(-or)";
+ Text[ polish ] = "Strona(y)";
+ Text[ portuguese_brazilian ] = "Page(s)";
+ Text[ japanese ] = "߰";
+ Text[ korean ] = " ";
+ Text[ chinese_simplified ] = "ҳ";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = " ()";
+ Text[ turkish ] = "Sayfa says";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_PAGES
+ {
+ Pos = MAP_APPFONT ( 65 , 103 ) ;
+ Size = MAP_APPFONT ( 50 , 60 ) ;
+ DropDown = TRUE;
+ };
+ FixedText FT_PUBLISHER
+ {
+ Pos = MAP_APPFONT ( 118 , 104 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "Verlag";
+ Text [ENGLISH] = "Publisher";
+ Text[ english_us ] = "Publisher";
+ Text[ portuguese ] = "Editora";
+ Text[ russian ] = "";
+ Text[ greek ] = " ";
+ Text[ dutch ] = "Uitgeverij";
+ Text[ french ] = "dition";
+ Text[ spanish ] = "Editorial";
+ Text[ italian ] = "Casa editrice";
+ Text[ danish ] = "Forlag";
+ Text[ swedish ] = "Frlag";
+ Text[ polish ] = "Wydawnictwo";
+ Text[ portuguese_brazilian ] = "Publisher";
+ Text[ japanese ] = "s";
+ Text[ korean ] = "ǻ";
+ Text[ chinese_simplified ] = "";
+ Text[ chinese_traditional ] = "X";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Yaym evi";
+ };
+ ListBox LB_PUBLISHER
+ {
+ Pos = MAP_APPFONT ( 171, 103 ) ;
+ Size = MAP_APPFONT ( 50 , 60 ) ;
+ DropDown = TRUE;
+ };
+ FixedText FT_ADDRESS
+ {
+ Pos = MAP_APPFONT ( 229 , 104 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "Adresse";
+ Text [ENGLISH] = "Address";
+ Text[ english_us ] = "Address";
+ Text[ portuguese ] = "Endereo";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Adres";
+ Text[ french ] = "Adresse";
+ Text[ spanish ] = "Direccin";
+ Text[ italian ] = "Indirizzo";
+ Text[ danish ] = "Adresse";
+ Text[ swedish ] = "Adress";
+ Text[ polish ] = "Adres";
+ Text[ portuguese_brazilian ] = "Address";
+ Text[ japanese ] = "Z";
+ Text[ korean ] = "ּ";
+ Text[ chinese_simplified ] = "ַ";
+ Text[ chinese_traditional ] = "a}";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Adres";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_ADDRESS
+ {
+ Pos = MAP_APPFONT ( 282 , 103 ) ;
+ Size = MAP_APPFONT ( 50 , 60 ) ;
+ DropDown = TRUE;
+ };
+ FixedText FT_SCHOOL
+ {
+ Pos = MAP_APPFONT ( 12 , 119 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "Hochschule";
+ Text [ENGLISH] = "School";
+ Text[ english_us ] = "University";
+ Text[ portuguese ] = "Universidade";
+ Text[ russian ] = "";
+ Text[ greek ] = ".../...";
+ Text[ dutch ] = "Hogeschool";
+ Text[ french ] = "cole suprieure";
+ Text[ spanish ] = "Universidad";
+ Text[ italian ] = "Scuola superiore";
+ Text[ danish ] = "Universitet";
+ Text[ swedish ] = "Hgskola";
+ Text[ polish ] = "Szkoa wysza";
+ Text[ portuguese_brazilian ] = "School";
+ Text[ japanese ] = "@";
+ Text[ korean ] = "б";
+ Text[ chinese_simplified ] = "ѧ";
+ Text[ chinese_traditional ] = "|";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "niversite";
+ };
+ ListBox LB_SCHOOL
+ {
+ Pos = MAP_APPFONT ( 65 , 118 ) ;
+ Size = MAP_APPFONT ( 50 , 60 ) ;
+ DropDown = TRUE;
+ };
+ FixedText FT_SERIES
+ {
+ Pos = MAP_APPFONT ( 118 , 119 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "Serie";
+ Text [ENGLISH] = "Series";
+ Text[ english_us ] = "Series";
+ Text[ portuguese ] = "Srie";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Serie";
+ Text[ french ] = "Srie";
+ Text[ spanish ] = "Serie";
+ Text[ italian ] = "Serie";
+ Text[ danish ] = "Serie";
+ Text[ swedish ] = "Serie";
+ Text[ polish ] = "Seria";
+ Text[ portuguese_brazilian ] = "Series";
+ Text[ japanese ] = "p";
+ Text[ korean ] = "ø";
+ Text[ chinese_simplified ] = "ϵ";
+ Text[ chinese_traditional ] = "tC";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Dizi";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_SERIES
+ {
+ Pos = MAP_APPFONT ( 171 , 118) ;
+ Size = MAP_APPFONT ( 50 , 60 ) ;
+ DropDown = TRUE;
+ };
+ FixedText FT_REPORTTYPE
+ {
+ Pos = MAP_APPFONT ( 229 , 119 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "Art des Reports";
+ Text [ENGLISH] = "Report type";
+ Text[ english_us ] = "Report type";
+ Text[ portuguese ] = "Tipo de relatrio";
+ Text[ russian ] = " ";
+ Text[ greek ] = " ";
+ Text[ dutch ] = "Soort bericht";
+ Text[ french ] = "Type de rapport";
+ Text[ spanish ] = "Tipo de informe";
+ Text[ italian ] = "Rapporto";
+ Text[ danish ] = "Rapporttype";
+ Text[ swedish ] = "Typ av rapport";
+ Text[ polish ] = "Rodzaj raportu";
+ Text[ portuguese_brazilian ] = "Report type";
+ Text[ japanese ] = "߰Ă̎";
+ Text[ korean ] = " ";
+ Text[ chinese_simplified ] = "";
+ Text[ chinese_traditional ] = "i";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Rapor tr";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_REPORTTYPE
+ {
+ Pos = MAP_APPFONT ( 282 , 118 ) ;
+ Size = MAP_APPFONT ( 50 , 60 ) ;
+ DropDown = TRUE;
+ };
+ FixedText FT_VOLUME
+ {
+ Pos = MAP_APPFONT ( 12 , 134 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "Band";
+ Text [ENGLISH] = "Volume";
+ Text[ english_us ] = "Volume";
+ Text[ portuguese ] = "Volume";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Deel";
+ Text[ french ] = "Volume";
+ Text[ spanish ] = "Tomo";
+ Text[ italian ] = "Volume";
+ Text[ danish ] = "Bind";
+ Text[ swedish ] = "Volym";
+ Text[ polish ] = "Tom";
+ Text[ portuguese_brazilian ] = "Volume";
+ Text[ japanese ] = "";
+ Text[ korean ] = "";
+ Text[ chinese_simplified ] = "";
+ Text[ chinese_traditional ] = "U";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Cilt";
+ };
+ ListBox LB_VOLUME
+ {
+ Pos = MAP_APPFONT ( 65 , 133) ;
+ Size = MAP_APPFONT ( 50 , 60 ) ;
+ DropDown = TRUE;
+ };
+ FixedText FT_URL
+ {
+ Pos = MAP_APPFONT ( 118 , 134 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "URL";
+ Text [ENGLISH] = "URL";
+ Text[ english_us ] = "URL";
+ Text[ portuguese ] = "URL";
+ Text[ russian ] = "URL";
+ Text[ greek ] = "URL";
+ Text[ dutch ] = "URL";
+ Text[ french ] = "URL";
+ Text[ spanish ] = "URL";
+ Text[ italian ] = "URL";
+ Text[ danish ] = "URL";
+ Text[ swedish ] = "URL";
+ Text[ polish ] = "URL";
+ Text[ portuguese_brazilian ] = "URL";
+ Text[ japanese ] = "URL";
+ Text[ korean ] = "URL";
+ Text[ chinese_simplified ] = "URL";
+ Text[ chinese_traditional ] = "URL";
+ Text[ arabic ] = "URL";
+ Text[ turkish ] = "URL";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_URL
+ {
+ Pos = MAP_APPFONT ( 171 , 133 ) ;
+ Size = MAP_APPFONT ( 50 , 60 ) ;
+ DropDown = TRUE;
+ };
+ FixedText FT_CUSTOM1
+ {
+ Pos = MAP_APPFONT ( 229 , 134 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "Benutzerfeld 1";
+ Text [ENGLISH] = "Custom field 1";
+ Text[ english_us ] = "User-defined 1";
+ Text[ portuguese ] = "Campo de utilizador 1";
+ Text[ russian ] = " 1";
+ Text[ greek ] = " 1";
+ Text[ dutch ] = "Gebruikersveld 1";
+ Text[ french ] = "Champ d'utilisateur 1";
+ Text[ spanish ] = "Campo de usuario 1";
+ Text[ italian ] = "Utente 1";
+ Text[ danish ] = "Brugerdefineret 1";
+ Text[ swedish ] = "Anvndarflt 1";
+ Text[ polish ] = "Pole uytkownika 1";
+ Text[ portuguese_brazilian ] = "Custom field 1";
+ Text[ japanese ] = "հް̨1";
+ Text[ korean ] = " ʵ 1";
+ Text[ chinese_simplified ] = "û 1";
+ Text[ chinese_traditional ] = "ۭq 1";
+ Text[ arabic ] = " 1";
+ Text[ turkish ] = "Kullanc alan 1";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_CUSTOM1
+ {
+ Pos = MAP_APPFONT ( 282 , 133 ) ;
+ Size = MAP_APPFONT ( 50 , 60 ) ;
+ DropDown = TRUE;
+ };
+ FixedText FT_CUSTOM2
+ {
+ Pos = MAP_APPFONT ( 12 , 149 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "Benutzerfeld 2";
+ Text [ENGLISH] = "Custom field 2";
+ Text[ english_us ] = "User-defined 2";
+ Text[ portuguese ] = "Campo de utilizador 2";
+ Text[ russian ] = " 2";
+ Text[ greek ] = " 2";
+ Text[ dutch ] = "Gebruikersveld 2";
+ Text[ french ] = "Champ d'tilisateur 2";
+ Text[ spanish ] = "Campo de usuario 2";
+ Text[ italian ] = "Utente 2";
+ Text[ danish ] = "Brugerdefineret 2";
+ Text[ swedish ] = "Anvndarflt 2";
+ Text[ polish ] = "Pole uytkownika 2";
+ Text[ portuguese_brazilian ] = "Custom field 2";
+ Text[ japanese ] = "հް̨2";
+ Text[ korean ] = " ʵ 2";
+ Text[ chinese_simplified ] = "û 2";
+ Text[ chinese_traditional ] = "ۭq 2";
+ Text[ arabic ] = " 2";
+ Text[ turkish ] = "Kullanc alan 2";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_CUSTOM2
+ {
+ Pos = MAP_APPFONT ( 65 , 148 ) ;
+ Size = MAP_APPFONT ( 50 , 60 ) ;
+ DropDown = TRUE;
+ };
+ FixedText FT_CUSTOM3
+ {
+ Pos = MAP_APPFONT ( 118 , 149 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "Benutzerfeld 3";
+ Text [ENGLISH] = "Custom field 3";
+ Text[ english_us ] = "User-defined 3";
+ Text[ portuguese ] = "Campo de utilizador 3";
+ Text[ russian ] = " 3";
+ Text[ greek ] = " 3";
+ Text[ dutch ] = "Gebruikersveld 3";
+ Text[ french ] = "Champ d'utilisateur 3";
+ Text[ spanish ] = "Campo de usuario 3";
+ Text[ italian ] = "Utente 3";
+ Text[ danish ] = "Brugerdefineret 3";
+ Text[ swedish ] = "Anvndarflt 3";
+ Text[ polish ] = "Pole uytkownika 3";
+ Text[ portuguese_brazilian ] = "Custom field 3";
+ Text[ japanese ] = "հް̨3";
+ Text[ korean ] = " ʵ 3";
+ Text[ chinese_simplified ] = "û 3";
+ Text[ chinese_traditional ] = "ۭq 3";
+ Text[ arabic ] = " 3";
+ Text[ turkish ] = "Kullanc alan 3";
+ };
+ ListBox LB_CUSTOM3
+ {
+ Pos = MAP_APPFONT ( 171 , 148 ) ;
+ Size = MAP_APPFONT ( 50 , 60 ) ;
+ DropDown = TRUE;
+ };
+ FixedText FT_CUSTOM4
+ {
+ Pos = MAP_APPFONT ( 229 , 149 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "Benutzerfeld 4";
+ Text [ENGLISH] = "Custom field 4";
+ Text[ english_us ] = "User-defined 4";
+ Text[ portuguese ] = "Campo de utilizador 4";
+ Text[ russian ] = " 4";
+ Text[ greek ] = " 4";
+ Text[ dutch ] = "Gebruikersveld 4";
+ Text[ french ] = "Champ d'utilisateur 4";
+ Text[ spanish ] = "Campo de usuario 4";
+ Text[ italian ] = "Utente 4";
+ Text[ danish ] = "Brugerdefineret 4";
+ Text[ swedish ] = "Anvndarflt 4";
+ Text[ polish ] = "Pole uytkownika 4";
+ Text[ portuguese_brazilian ] = "Custom field 4";
+ Text[ japanese ] = "հް̨4";
+ Text[ korean ] = " ʵ 4";
+ Text[ chinese_simplified ] = "û 4";
+ Text[ chinese_traditional ] = "ۭq 4";
+ Text[ arabic ] = " 4";
+ Text[ turkish ] = "Kullanc alan 4";
+ };
+ ListBox LB_CUSTOM4
+ {
+ Pos = MAP_APPFONT ( 282, 148 ) ;
+ Size = MAP_APPFONT ( 50 , 60 ) ;
+ DropDown = TRUE;
+ };
+ FixedText FT_CUSTOM5
+ {
+ Pos = MAP_APPFONT ( 12 , 164 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "Benutzerfeld 5";
+ Text [ENGLISH] = "Custom field 5";
+ Text[ english_us ] = "User-defined 5";
+ Text[ portuguese ] = "Campo de utilizador 5";
+ Text[ russian ] = " 5";
+ Text[ greek ] = " 5";
+ Text[ dutch ] = "Gebruikersveld 5";
+ Text[ french ] = "Champ d'utilisateur 5";
+ Text[ spanish ] = "Campo de usuario 5";
+ Text[ italian ] = "Utente 5";
+ Text[ danish ] = "Brugerdefineret 5";
+ Text[ swedish ] = "Anvndarflt 5";
+ Text[ polish ] = "Pole uytkownika 5";
+ Text[ portuguese_brazilian ] = "Custom field 5";
+ Text[ japanese ] = "հް̨5";
+ Text[ korean ] = " ʵ 5";
+ Text[ chinese_simplified ] = "û 5";
+ Text[ chinese_traditional ] = "ۭq 5";
+ Text[ arabic ] = " 5";
+ Text[ turkish ] = "Kullanc alan 5";
+ };
+ ListBox LB_CUSTOM5
+ {
+ Pos = MAP_APPFONT ( 65 , 163 ) ;
+ Size = MAP_APPFONT ( 50 , 60 ) ;
+ DropDown = TRUE;
+ };
+ String ST_NONE
+ {
+ Text = "<kein>";
+ Text [ENGLISH] = "<none>";
+ Text[ english_us ] = "<none>";
+ Text[ portuguese ] = "<nenhum>";
+ Text[ russian ] = "<>";
+ Text[ greek ] = "<>";
+ Text[ dutch ] = "<geen>";
+ Text[ french ] = "<aucun>";
+ Text[ spanish ] = "<ninguno>";
+ Text[ italian ] = "<nessuno>";
+ Text[ danish ] = "<ingen>";
+ Text[ swedish ] = "<ingen>";
+ Text[ polish ] = "<brak>";
+ Text[ portuguese_brazilian ] = "<none>";
+ Text[ japanese ] = "<Ȃ>";
+ Text[ korean ] = "<>";
+ Text[ chinese_simplified ] = "<>";
+ Text[ chinese_traditional ] = "<L>";
+ Text[ arabic ] = "<>";
+ Text[ turkish ] = "<Yok>";
+ Text[ language_user1 ] = " ";
+ };
+ Text[ english_us ] = "Column Layout for Table %1";
+ Text[ portuguese ] = "Atribuio de colunas para a tabela %1";
+ Text[ russian ] = " %1";
+ Text[ greek ] = " %1";
+ Text[ dutch ] = "Kolomindeling voor tabel %1";
+ Text[ french ] = "Assignation de colonnes pour la table %1";
+ Text[ spanish ] = "Asignacin de columnas para tabla %1";
+ Text[ italian ] = "Assegnazione colonne per la tabella %1";
+ Text[ danish ] = "Kolonnetildeling for tabel %1";
+ Text[ swedish ] = "Kolumntilldelning fr tabell %1";
+ Text[ polish ] = "Przyporzdkowanie kolumn tabeli %1";
+ Text[ portuguese_brazilian ] = "Column assignment for table %1";
+ Text[ japanese ] = "ð%1p̗̕";
+ Text[ korean ] = "̺ ̾ƿ %1";
+ Text[ chinese_simplified ] = "Ϊ %1 ";
+ Text[ chinese_traditional ] = "s %1 檺";
+ Text[ arabic ] = " %1";
+ Text[ turkish ] = "Tablo %1 iin stun dzeni";
+};
+ModalDialog RID_DLG_DBCHANGE
+{
+ HelpID = HID_DLG_DBCHANGE;
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 291 , 131 ) ;
+ Moveable = TRUE ;
+ Text = "Auswahl der Datenquelle";
+ Text [ENGLISH] = "Select data source";
+
+ OKButton BT_OK
+ {
+ Pos = MAP_APPFONT ( 238 , 3 ) ;
+ Size = MAP_APPFONT ( 50 , 12 ) ;
+ };
+ CancelButton BT_CANCEL
+ {
+ Pos = MAP_APPFONT ( 238 , 18 ) ;
+ Size = MAP_APPFONT ( 50 , 12 ) ;
+ };
+ HelpButton BT_HELP
+ {
+ Pos = MAP_APPFONT ( 238 , 36 ) ;
+ Size = MAP_APPFONT ( 50 , 12 ) ;
+ };
+ GroupBox GB_SELECTION
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 229 , 125 ) ;
+ Text = "Auswahl";
+ Text [ENGLISH] = "Selection";
+ Text[ english_us ] = "Selection";
+ Text[ portuguese ] = "Seleco";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Selectie";
+ Text[ french ] = "Slection";
+ Text[ spanish ] = "Seleccin";
+ Text[ italian ] = "Selezione";
+ Text[ danish ] = "Udvalg";
+ Text[ swedish ] = "Urval";
+ Text[ polish ] = "Wybr";
+ Text[ portuguese_brazilian ] = "Selection";
+ Text[ japanese ] = "I";
+ Text[ korean ] = "";
+ Text[ chinese_simplified ] = "ѡ";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Seim";
+ Text[ language_user1 ] = " ";
+ };
+ String ST_ENTRY
+ {
+ Text = "Eintrag";
+ Text [ENGLISH] = "Entry";
+ Text[ english_us ] = "Entry";
+ Text[ portuguese ] = "Entrada";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Item";
+ Text[ french ] = "Entre";
+ Text[ spanish ] = "Entrada";
+ Text[ italian ] = "Voce";
+ Text[ danish ] = "Element";
+ Text[ swedish ] = "Post";
+ Text[ polish ] = "Wpis";
+ Text[ portuguese_brazilian ] = "Entry";
+ Text[ japanese ] = "";
+ Text[ korean ] = "׸";
+ Text[ chinese_simplified ] = "Ŀ";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Giri";
+ };
+ String ST_URL
+ {
+ Text = "URL";
+ Text [ENGLISH] = "URL";
+ Text[ english_us ] = "URL";
+ Text[ portuguese ] = "URL";
+ Text[ russian ] = "URL";
+ Text[ greek ] = "URL";
+ Text[ dutch ] = "URL";
+ Text[ french ] = "URL";
+ Text[ spanish ] = "URL";
+ Text[ italian ] = "URL";
+ Text[ danish ] = "URL";
+ Text[ swedish ] = "URL";
+ Text[ polish ] = "URL";
+ Text[ portuguese_brazilian ] = "URL";
+ Text[ japanese ] = "URL";
+ Text[ korean ] = "URL";
+ Text[ chinese_simplified ] = "URL";
+ Text[ chinese_traditional ] = "URL";
+ Text[ arabic ] = "URL";
+ Text[ turkish ] = "URL";
+ Text[ language_user1 ] = " ";
+ };
+ Control LB_SELECTION
+ {
+ Pos = MAP_APPFONT ( 9 , 24 ) ;
+ Size = MAP_APPFONT ( 223 , 100 ) ;
+ Border = TRUE;
+ TabStop = TRUE;
+ };
+ Window HB_SELECTION
+ {
+ Pos = MAP_APPFONT ( 9 , 12 ) ;
+ Size = MAP_APPFONT ( 223 , 12 ) ;
+ Border = TRUE;
+ };
+ Text[ english_us ] = "Select Data Source";
+ Text[ portuguese ] = "Seleccionar fonte de dados";
+ Text[ russian ] = " ";
+ Text[ greek ] = " ";
+ Text[ dutch ] = "Kies gegevensbron";
+ Text[ french ] = "Slection de la source de donnes";
+ Text[ spanish ] = "Seleccin de la fuente de datos";
+ Text[ italian ] = "Selezione della sorgente dati";
+ Text[ danish ] = "Vlg datakilde";
+ Text[ swedish ] = "Urval av dataklla";
+ Text[ polish ] = "Wybr rda danych";
+ Text[ portuguese_brazilian ] = "Select data source";
+ Text[ japanese ] = "ް̑I";
+ Text[ korean ] = " ҽ ";
+ Text[ chinese_simplified ] = "ѡԴ";
+ Text[ chinese_traditional ] = "ܼu";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Veri kayna seimi";
+ Text[ language_user1 ] = " ";
+};
+
diff --git a/extensions/source/bibliography/framectr.cxx b/extensions/source/bibliography/framectr.cxx
new file mode 100644
index 000000000000..e8de5942814f
--- /dev/null
+++ b/extensions/source/bibliography/framectr.cxx
@@ -0,0 +1,629 @@
+/*************************************************************************
+ *
+ * $RCSfile: framectr.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:16:44 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SV_WAITOBJ_HXX //autogen wg. WaitObject
+#include <vcl/waitobj.hxx>
+#endif
+
+#ifndef _CPPUHELPER_INTERFACECONTAINER_HXX_
+#include <cppuhelper/interfacecontainer.hxx>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_URL_HPP_
+#include <com/sun/star/util/URL.hpp>
+#endif
+#ifndef _OSL_MUTEX_HXX_
+#include <osl/mutex.hxx>
+#endif
+//#ifndef _USR_ITERHLP_HXX
+//#include <usr/iterhlp.hxx>
+//#endif
+#ifndef _SV_MSGBOX_HXX
+#include <vcl/msgbox.hxx>
+#endif
+//#ifndef _TOOLKIT_UNOIFACE_HXX
+//#include <toolkit/unoiface.hxx>
+//#endif
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+
+#ifndef _BIB_FRAMECTR_HXX
+#include "framectr.hxx"
+#endif
+#ifndef _BIB_DATMAN_HXX
+#include "datman.hxx"
+#endif
+#ifndef _BIB_FIELDWIN_HXX
+#include "fieldwin.hxx"
+#endif
+#ifndef ADRRESID_HXX
+#include "bibresid.hxx"
+#endif
+#ifndef BIB_HRC
+#include "bib.hrc"
+#endif
+#ifndef _TOOLKIT_UNOHLP_HXX
+#include <toolkit/helper/vclunohelper.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_DATA_XDATABASEDIALOGS_HPP_
+#include <com/sun/star/data/XDatabaseDialogs.hpp>
+#endif
+#ifndef _CPPUHELPER_IMPLBASE1_HXX_
+#include <cppuhelper/implbase1.hxx> // helper for implementations
+#endif
+
+//using namespace vos;
+using namespace osl;
+using namespace cppu;
+using namespace rtl;
+using namespace com::sun::star::frame;
+using namespace com::sun::star::uno;
+using namespace com::sun::star;
+
+#define C2U(cChar) OUString::createFromAscii(cChar)
+extern rtl::OUString gGridModelCommand;
+
+SV_IMPL_PTRARR( BibStatusDispatchArr, BibStatusDispatchPtr );
+
+class BibFrameCtrl_Impl : public cppu::WeakImplHelper1 < XFrameActionListener >
+{
+public:
+ Mutex aMutex;
+ OMultiTypeInterfaceContainerHelper aLC;
+
+ BibFrameController_Impl* pController;
+
+ BibFrameCtrl_Impl()
+ : aLC( aMutex )
+ , pController(0)
+ {}
+
+ ~BibFrameCtrl_Impl();
+
+ virtual void SAL_CALL frameAction(const FrameActionEvent& aEvent) throw( RuntimeException );
+ virtual void SAL_CALL disposing( const lang::EventObject& Source );
+};
+
+
+BibFrameCtrl_Impl::~BibFrameCtrl_Impl()
+{
+}
+
+void BibFrameCtrl_Impl::frameAction(const FrameActionEvent& aEvent) throw( uno::RuntimeException )
+{
+ if ( pController && aEvent.Frame == pController->getFrame())
+ {
+ if(aEvent.Action == FrameAction_FRAME_ACTIVATED)
+ {
+ pController->activate();
+ }
+ else if(aEvent.Action == FrameAction_FRAME_DEACTIVATING)
+ {
+ pController->deactivate();
+ }
+ }
+}
+
+void BibFrameCtrl_Impl::disposing( const lang::EventObject& Source )
+{
+ if ( pController )
+ pController->getFrame()->removeFrameActionListener( this );
+}
+
+BibFrameController_Impl::BibFrameController_Impl( const uno::Reference< awt::XWindow > & xComponent):
+ xWindow( xComponent ),
+ pDatMan(NULL),
+ pFieldWin(NULL)
+
+{
+ pBibMod = OpenBibModul();
+ pDatMan = (*pBibMod)->createDataManager();
+ xDatman = pDatMan;
+ bDisposing=sal_False;
+ bHierarchical=sal_True;
+ pImp = new BibFrameCtrl_Impl;
+ pImp->pController = this;
+ pImp->acquire();
+}
+
+BibFrameController_Impl::BibFrameController_Impl( const uno::Reference< awt::XWindow > & xComponent,
+ BibDataManager* pDataManager):
+ xWindow( xComponent ),
+ pDatMan(pDataManager),
+ pFieldWin(NULL),
+ pBibMod(NULL)
+{
+ bDisposing=sal_False;
+ bHierarchical=sal_True;
+ pImp = new BibFrameCtrl_Impl;
+ pImp->pController = this;
+ pImp->acquire();
+}
+
+BibDataManager* BibFrameController_Impl::GetDataManager()
+{
+ return pDatMan;
+}
+
+BibFrameController_Impl::~BibFrameController_Impl()
+{
+ pImp->pController = NULL;
+ pImp->release();
+ delete pDatMan;
+ if(pBibMod)
+ CloseBibModul(pBibMod);
+}
+
+void BibFrameController_Impl::attachFrame( const uno::Reference< XFrame > & xArg )
+{
+ xFrame = xArg;
+ xFrame->addFrameActionListener( pImp );
+}
+
+sal_Bool BibFrameController_Impl::attachModel( const uno::Reference< XModel > & xModel )
+{
+ return sal_False;
+}
+
+sal_Bool BibFrameController_Impl::suspend( sal_Bool bSuspend )
+{
+ if ( bSuspend )
+ getFrame()->removeFrameActionListener( pImp );
+ else
+ getFrame()->addFrameActionListener( pImp );
+ return sal_True;
+}
+
+uno::Any BibFrameController_Impl::getViewData()
+{
+ return uno::Any();
+}
+
+void BibFrameController_Impl::restoreViewData( const uno::Any& Value )
+{
+}
+
+uno::Reference< XFrame > BibFrameController_Impl::getFrame()
+{
+ return xFrame;
+}
+
+uno::Reference< XModel > BibFrameController_Impl::getModel()
+{
+ return uno::Reference< XModel > ();
+}
+
+void BibFrameController_Impl::dispose()
+{
+ util::URL aURL;
+ aURL.Complete = C2U("0");
+ uno::Reference< XDispatchProvider > xProv( xFrame, UNO_QUERY );
+ if ( xProv.is() )
+ {
+ uno::Reference< XDispatch > aDisp = xProv->queryDispatch( aURL, C2U("_tool:_menubar"), 0 );
+ if ( aDisp.is() )
+ aDisp->dispatch( aURL, uno::Sequence<beans::PropertyValue>() );
+ }
+
+
+ delete pFieldWin;
+ bDisposing = sal_True;
+ lang::EventObject aObject;
+ aObject.Source = (XController*)this;
+ pImp->aLC.disposeAndClear(aObject);
+ xDatman = 0;
+ pDatMan = 0;
+ aStatusListeners.DeleteAndDestroy( 0, aStatusListeners.Count() );
+ }
+
+void BibFrameController_Impl::addEventListener( const uno::Reference< lang::XEventListener > & aListener )
+{
+ pImp->aLC.addInterface( ::getCppuType((const Reference< lang::XEventListener >*)0), aListener );
+}
+
+void BibFrameController_Impl::removeEventListener( const uno::Reference< lang::XEventListener > & aListener )
+{
+ pImp->aLC.removeInterface( ::getCppuType((const Reference< lang::XEventListener >*)0), aListener );
+}
+
+uno::Reference< frame::XDispatch > BibFrameController_Impl::queryDispatch( const util::URL& aURL, const rtl::OUString& aTarget, sal_Int32 nSearchFlags )
+{
+ if ( !bDisposing )
+ {
+ String aCommand( aURL.Path );
+ if ( aCommand.EqualsAscii("Undo") || aCommand.EqualsAscii("Cut") ||
+ aCommand.EqualsAscii("Copy") || aCommand.EqualsAscii("Paste") ||
+ aCommand.EqualsAscii("SelectAll") || aCommand.Copy(0,4).EqualsAscii("Bib/")||
+ aCommand.EqualsAscii("Title"))
+
+ return (frame::XDispatch*) this;
+ }
+
+ return uno::Reference< frame::XDispatch > ();
+}
+
+uno::Sequence<uno::Reference< XDispatch > > BibFrameController_Impl::queryDispatches( const uno::Sequence<DispatchDescriptor>& aDescripts )
+{
+ return uno::Sequence<uno::Reference< XDispatch > >();
+}
+
+//class XDispatch
+void BibFrameController_Impl::dispatch(const util::URL& aURL, const uno::Sequence< beans::PropertyValue >& aArgs)
+{
+ if ( !bDisposing )
+ {
+ WaitObject aWaitObject;
+
+ String aCommand( aURL.Path);
+ if(aCommand.EqualsAscii("Bib/Mapping"))
+ {
+ Window* pParent = VCLUnoHelper::GetWindow( xWindow );
+ pDatMan->CreateMappingDialog(pParent);
+ }
+ else if(aCommand.EqualsAscii("Bib/source"))
+ {
+ ChangeDataSource(aArgs);
+ }
+ else if(aCommand.EqualsAscii("Bib/sdbsource"))
+ {
+ Window* pParent = VCLUnoHelper::GetWindow( xWindow );
+ rtl::OUString aURL = pDatMan->CreateDBChangeDialog(pParent);
+ if(aURL.getLength())
+ {
+ uno::Sequence< beans::PropertyValue > aArgs(2);
+ beans::PropertyValue* pProps = aArgs.getArray();
+ pProps[0].Value <<= rtl::OUString();
+ pProps[1].Value <<= aURL;
+ ChangeDataSource(aArgs);
+ }
+ }
+ else if(aCommand.EqualsAscii("Bib/autoFilter"))
+ {
+ sal_uInt16 nCount = aStatusListeners.Count();
+ for ( sal_uInt16 n=0; n<nCount; n++ )
+ {
+ BibStatusDispatch *pObj = aStatusListeners[n];
+ if ( pObj->aURL.Path == C2U("Bib/removeFilter") )
+ {
+ FeatureStateEvent aEvent;
+ aEvent.FeatureURL = pObj->aURL;
+ aEvent.IsEnabled = sal_True;
+ aEvent.Requery = sal_False;
+ aEvent.Source = (XDispatch *) this;
+ pObj->xListener->statusChanged( aEvent );
+ //break; because there are more than one
+ }
+ }
+
+ const beans::PropertyValue* pPropertyValue = aArgs.getConstArray();
+ uno::Any aValue=pPropertyValue[0].Value;
+ rtl::OUString aQuery;
+ aValue >>= aQuery;
+
+ aValue=pPropertyValue[1].Value;
+ rtl::OUString aQueryField;
+ aValue >>= aQueryField;
+ pDatMan->setQueryField(aQueryField);
+ pDatMan->startQueryWith(aQuery);
+ }
+ else if(aCommand.EqualsAscii("Bib/standardFilter"))
+ {
+ sal_uInt16 nCount = aStatusListeners.Count();
+ for ( sal_uInt16 n=0; n<nCount; n++ )
+ {
+ BibStatusDispatch *pObj = aStatusListeners[n];
+ if ( pObj->aURL.Path == C2U("Bib/removeFilter") )
+ {
+ FeatureStateEvent aEvent;
+ aEvent.FeatureURL = pObj->aURL;
+ aEvent.IsEnabled = sal_True;
+ aEvent.Requery = sal_False;
+ aEvent.Source = (XDispatch *) this;
+ pObj->xListener->statusChanged( aEvent );
+ //break; because there are more than one
+ }
+ }
+
+ uno::Reference< sdb::XSQLQueryComposer > xParser=pDatMan->getParser();
+ uno::Reference< data::XDatabaseDialogs > xDlgs(xParser, UNO_QUERY);
+ if (xDlgs.is())
+ {
+ uno::Reference< container::XNamed > xField;
+ xDlgs->executeFilter(xField);
+ pDatMan->setFilter(xParser->getFilter());
+ }
+ }
+ else if(aCommand.EqualsAscii("Bib/removeFilter"))
+ {
+ RemoveFilter();
+ }
+ }
+}
+//-----------------------------------------------------------------------------
+void BibFrameController_Impl::addStatusListener(
+ const uno::Reference< frame::XStatusListener > & aListener,
+ const util::URL& aURL)
+{
+ // create a new Reference and insert into listener array
+ aStatusListeners.Insert( new BibStatusDispatch( aURL, aListener ), aStatusListeners.Count() );
+
+ // den ersten Status synchron zusenden
+ if ( aURL.Path == C2U("Bib/hierarchical") )
+ {
+ FeatureStateEvent aEvent;
+ aEvent.FeatureURL = aURL;
+ aEvent.IsEnabled = sal_True;
+ aEvent.Requery = sal_False;
+ aEvent.Source = (XDispatch *) this;
+ const char* pHier = bHierarchical? "" : "*" ;
+ aEvent.State <<= rtl::OUString::createFromAscii(pHier);
+ aListener->statusChanged( aEvent );
+ }
+ else if(aURL.Path == C2U("Bib/MenuFilter"))
+ {
+ FeatureStateEvent aEvent;
+ aEvent.FeatureURL = aURL;
+ aEvent.IsEnabled = sal_True;
+ aEvent.Requery = sal_False;
+ aEvent.Source = (XDispatch *) this;
+ aEvent.FeatureDescriptor=pDatMan->getQueryField();
+
+ uno::Sequence<rtl::OUString> aStringSeq=pDatMan->getQueryFields();
+ aEvent.State.setValue(&aStringSeq,::getCppuType((uno::Sequence<rtl::OUString>*)0));
+
+ aListener->statusChanged( aEvent );
+ }
+ else if ( aURL.Path == C2U("Bib/source"))
+ {
+ FeatureStateEvent aEvent;
+ aEvent.FeatureURL = aURL;
+ aEvent.IsEnabled = sal_True;
+ aEvent.Requery = sal_False;
+ aEvent.Source = (XDispatch *) this;
+ aEvent.FeatureDescriptor=pDatMan->getActiveDataTable();
+
+ uno::Sequence<rtl::OUString> aStringSeq=pDatMan->getDataSources();
+ aEvent.State.setValue(&aStringSeq,::getCppuType((uno::Sequence<rtl::OUString>*)0));
+ aListener->statusChanged( aEvent );
+ }
+ else if(aURL.Path == C2U("Bib/query"))
+ {
+ FeatureStateEvent aEvent;
+ aEvent.FeatureURL = aURL;
+ aEvent.IsEnabled = sal_True;
+ aEvent.Requery = sal_False;
+ aEvent.Source = (XDispatch *) this;
+ aEvent.State <<= pDatMan->getQueryString();
+ aListener->statusChanged( aEvent );
+ }
+ else if (aURL.Path == C2U("Bib/removeFilter") )
+ {
+ rtl::OUString aFilterStr=pDatMan->getFilter();
+ FeatureStateEvent aEvent;
+ aEvent.FeatureURL = aURL;
+ aEvent.IsEnabled = (aFilterStr.len() > 0);
+ aEvent.Requery = sal_False;
+ aEvent.Source = (XDispatch *) this;
+ aListener->statusChanged( aEvent );
+ //break; because there are more than one
+ }
+ else
+ {
+ FeatureStateEvent aEvent;
+ aEvent.FeatureURL = aURL;
+ aEvent.IsEnabled = sal_True;
+ aEvent.Requery = sal_False;
+ aEvent.Source = (XDispatch *) this;
+ aEvent.State <<= OUString(String(BibResId(RID_BIB_STR_FRAME_TITLE)));
+ aListener->statusChanged( aEvent );
+ }
+}
+//-----------------------------------------------------------------------------
+void BibFrameController_Impl::removeStatusListener(
+ const uno::Reference< frame::XStatusListener > & aObject, const util::URL& aURL)
+{
+ // search listener array for given listener
+ // for checking equality always "cast" to XInterface
+ if ( !bDisposing )
+ {
+ sal_uInt16 nCount = aStatusListeners.Count();
+ for ( sal_uInt16 n=0; n<nCount; n++ )
+ {
+ BibStatusDispatch *pObj = aStatusListeners[n];
+ sal_Bool bFlag=pObj->xListener.is();
+ if (!bFlag || (pObj->xListener == aObject &&
+ ( !aURL.Complete.len() || pObj->aURL.Path == aURL.Path )))
+ {
+ aStatusListeners.DeleteAndDestroy( n );
+ break;
+ }
+ }
+ }
+}
+//-----------------------------------------------------------------------------
+void BibFrameController_Impl::RemoveFilter()
+{
+ rtl::OUString aQuery;
+ pDatMan->startQueryWith(aQuery);
+
+ sal_uInt16 nCount = aStatusListeners.Count();
+ FeatureStateEvent aEvent;
+
+ sal_Bool bRemoveFilter=sal_False;
+ sal_Bool bQueryText=sal_False;
+
+ for ( sal_uInt16 n=0; n<nCount; n++ )
+ {
+ BibStatusDispatch *pObj = aStatusListeners[n];
+ if ( pObj->aURL.Path == C2U("Bib/removeFilter") )
+ {
+ FeatureStateEvent aEvent;
+ aEvent.FeatureURL = pObj->aURL;
+ aEvent.IsEnabled = sal_False;
+ aEvent.Requery = sal_False;
+ aEvent.Source = (XDispatch *) this;
+ pObj->xListener->statusChanged( aEvent );
+ bRemoveFilter=sal_True;
+ }
+ else if(pObj->aURL.Path == C2U("Bib/query"))
+ {
+ FeatureStateEvent aEvent;
+ aEvent.FeatureURL = pObj->aURL;
+ aEvent.IsEnabled = sal_True;
+ aEvent.Requery = sal_False;
+ aEvent.Source = (XDispatch *) this;
+ aEvent.State <<= aQuery;
+ pObj->xListener->statusChanged( aEvent );
+ bQueryText=sal_True;
+ }
+
+ if(bRemoveFilter && bQueryText)
+ break;
+
+ }
+}
+//-----------------------------------------------------------------------------
+void BibFrameController_Impl::ChangeDataSource(const uno::Sequence< beans::PropertyValue >& aArgs)
+{
+ const beans::PropertyValue* pPropertyValue = aArgs.getConstArray();
+ uno::Any aValue=pPropertyValue[0].Value;
+ rtl::OUString aDBTableName;
+ aValue >>= aDBTableName;
+
+ pDatMan->unloadDatabase();
+
+ if(aArgs.getLength() > 1)
+ {
+ uno::Any aDB = pPropertyValue[1].Value;
+ rtl::OUString aURL;
+ aDB >>= aURL;
+ pDatMan->setActiveDataSource(aURL);
+ aDBTableName = pDatMan->getActiveDataTable();
+ }
+ else
+ pDatMan->setActiveDataTable(aDBTableName);
+ uno::Reference< awt::XControlModel > xNewModel=pDatMan->createGridModel();
+
+ sal_uInt16 nCount = aStatusListeners.Count();
+ FeatureStateEvent aEvent;
+
+ sal_Bool bGridMod=sal_False;
+ sal_Bool bMenuFilter=sal_False;
+ sal_Bool bQueryText=sal_False;
+ for ( sal_uInt16 n=0; n<nCount; n++ )
+ {
+ BibStatusDispatch *pObj = aStatusListeners[n];
+ if ( COMPARE_EQUAL == pObj->aURL.Path.compareToAscii("Bib/newGridModel"))
+ {
+ aEvent.FeatureURL = pObj->aURL;
+ aEvent.IsEnabled = sal_True;
+ aEvent.Requery = sal_False;
+ aEvent.Source = (XDispatch *) this;
+
+ aEvent.State.setValue(&xNewModel, ::getCppuType((uno::Reference<awt::XControlModel>*)0));
+ pObj->xListener->statusChanged( aEvent );
+ bGridMod=sal_True;
+ }
+ else if(COMPARE_EQUAL == pObj->aURL.Path.compareToAscii("Bib/MenuFilter"))
+ {
+ aEvent.FeatureURL = pObj->aURL;
+ aEvent.IsEnabled = sal_True;
+ aEvent.Requery = sal_False;
+ aEvent.Source = (XDispatch *) this;
+ aEvent.FeatureDescriptor=pDatMan->getQueryField();
+
+ uno::Sequence<rtl::OUString> aStringSeq=pDatMan->getQueryFields();
+ aEvent.State.setValue(&aStringSeq,::getCppuType((uno::Sequence<rtl::OUString>*)0));
+
+ pObj->xListener->statusChanged( aEvent );
+ bMenuFilter=sal_True;
+ }
+ else if(COMPARE_EQUAL == pObj->aURL.Path.compareToAscii("Bib/query"))
+ {
+ FeatureStateEvent aEvent;
+ aEvent.FeatureURL = pObj->aURL;
+ aEvent.IsEnabled = sal_True;
+ aEvent.Requery = sal_False;
+ aEvent.Source = (XDispatch *) this;
+ aEvent.State <<= pDatMan->getQueryString();
+ pObj->xListener->statusChanged( aEvent );
+ bQueryText=sal_True;
+ }
+
+ if(bGridMod && bMenuFilter && bQueryText) break;
+
+ }
+ pDatMan->loadDatabase();
+ if(pFieldWin)
+ pFieldWin->Update(pDatMan->getDatabaseForm());
+}
+
+void BibFrameController_Impl::activate()
+{
+ if(pFieldWin) pFieldWin->Show();
+}
+void BibFrameController_Impl::deactivate()
+{
+ if(pFieldWin) pFieldWin->Hide();
+}
+
+
diff --git a/extensions/source/bibliography/framectr.hxx b/extensions/source/bibliography/framectr.hxx
new file mode 100644
index 000000000000..9709c5cc29f9
--- /dev/null
+++ b/extensions/source/bibliography/framectr.hxx
@@ -0,0 +1,198 @@
+/*************************************************************************
+ *
+ * $RCSfile: framectr.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:16:44 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _BIB_FRAMECTR_HXX
+#define _BIB_FRAMECTR_HXX
+//#ifndef _COM_SUN_STAR_FRAME_XCONTROLLER_HPP_
+//#include <com/sun/star/frame/XController.hpp>
+//#endif
+//#ifndef _COM_SUN_STAR_FRAME_XSTORABLE_HPP_
+//#include <com/sun/star/frame/XStorable.hpp>
+//#endif
+//#ifndef _COM_SUN_STAR_FRAME_XMODEL_HPP_
+//#include <com/sun/star/frame/XModel.hpp>
+//#endif
+//#ifndef _COM_SUN_STAR_FRAME_XFRAMEACTIONLISTENER_HPP_
+//#include <com/sun/star/frame/XFrameActionListener.hpp>
+//#endif
+//#ifndef _COM_SUN_STAR_FRAME_XCOMPONENTLOADER_HPP_
+//#include <com/sun/star/frame/XComponentLoader.hpp>
+//#endif
+//#ifndef _COM_SUN_STAR_FRAME_XFRAME_HPP_
+//#include <com/sun/star/frame/XFrame.hpp>
+//#endif
+//#ifndef _COM_SUN_STAR_FRAME_FRAMEACTIONEVENT_HPP_
+//#include <com/sun/star/frame/FrameActionEvent.hpp>
+//#endif
+//#ifndef _COM_SUN_STAR_FRAME_FRAMEACTION_HPP_
+//#include <com/sun/star/frame/FrameAction.hpp>
+//#endif
+//#ifndef _COM_SUN_STAR_UTIL_XURLTRANSFORMER_HPP_
+//#include <com/sun/star/util/XURLTransformer.hpp>
+//#endif
+//#ifndef _COM_SUN_STAR_AWT_XTOPWINDOW_HPP_
+//#include <com/sun/star/awt/XTopWindow.hpp>
+//#endif
+//#ifndef _COM_SUN_STAR_AWT_XWINDOW_HPP_
+//#include <com/sun/star/awt/XWindow.hpp>
+//#endif
+//#ifndef _COM_SUN_STAR_AWT_POSSIZE_HPP_
+//#include <com/sun/star/awt/PosSize.hpp>
+//#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYCHANGELISTENER_HPP_
+#include <com/sun/star/beans/XPropertyChangeListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XDISPATCHPROVIDER_HPP_
+#include <com/sun/star/frame/XDispatchProvider.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XDISPATCH_HPP_
+#include <com/sun/star/frame/XDispatch.hpp>
+#endif
+//#include <usr/uno.hxx>
+
+#ifndef _CPPUHELPER_IMPLBASE3_HXX_
+#include <cppuhelper/implbase3.hxx> // helper for implementations
+#endif
+
+#ifndef _SVARRAY_HXX
+#include <svtools/svarray.hxx>
+#endif
+
+#ifndef _BIB_FIELDWIN_HXX
+#include "fieldwin.hxx"
+#endif
+#include "bibmod.hxx"
+class BibDataManager;
+
+class BibStatusDispatch
+{
+public:
+ ::com::sun::star::util::URL aURL;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > xListener;
+ BibStatusDispatch( const ::com::sun::star::util::URL& rURL, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > xRef )
+ : aURL( rURL )
+ , xListener( xRef )
+ {}
+};
+
+typedef BibStatusDispatch* BibStatusDispatchPtr;
+SV_DECL_PTRARR_DEL( BibStatusDispatchArr, BibStatusDispatchPtr, 4, 4 );
+
+class BibFrameController_Impl : public cppu::WeakImplHelper3 <
+ ::com::sun::star::frame::XController,
+ ::com::sun::star::frame::XDispatch,
+ ::com::sun::star::frame::XDispatchProvider
+>
+{
+friend class BibFrameCtrl_Impl;
+ BibFrameCtrl_Impl* pImp;
+ BibStatusDispatchArr aStatusListeners;
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > xWindow;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xFrame;
+ sal_Bool bDisposing;
+ sal_Bool bHierarchical;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener > xDatman;
+ BibDataManager* pDatMan;
+ BibFieldWin* pFieldWin;
+ HdlBibModul pBibMod;
+
+public:
+ BibFrameController_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > & xComponent);
+ BibFrameController_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > & xComponent,
+ BibDataManager* pDatMan);
+ ~BibFrameController_Impl();
+
+
+ void activate();
+ void deactivate();
+
+ BibDataManager* GetDataManager();
+ void ChangeDataSource(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgs);
+ void RemoveFilter();
+
+
+ // ::com::sun::star::frame::XController
+ virtual void SAL_CALL attachFrame( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > & xFrame );
+ virtual sal_Bool SAL_CALL attachModel( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > & xModel );
+ virtual sal_Bool SAL_CALL suspend( sal_Bool bSuspend );
+ virtual ::com::sun::star::uno::Any SAL_CALL getViewData();
+ virtual void SAL_CALL restoreViewData( const ::com::sun::star::uno::Any& Value );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > SAL_CALL getFrame();
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > SAL_CALL getModel();
+
+ // ::com::sun::star::lang::XComponent
+ virtual void SAL_CALL dispose();
+ virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener );
+ virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener );
+
+ // ::com::sun::star::frame::XDispatchProvider
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > SAL_CALL queryDispatch( const ::com::sun::star::util::URL& aURL, const rtl::OUString& aTargetFrameName, sal_Int32 nSearchFlags);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > > SAL_CALL queryDispatches( const ::com::sun::star::uno::Sequence< ::com::sun::star::frame::DispatchDescriptor >& aDescripts);
+
+ //class ::com::sun::star::frame::XDispatch
+ virtual void SAL_CALL dispatch(const ::com::sun::star::util::URL& aURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgs);
+ virtual void SAL_CALL addStatusListener(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > & xControl, const ::com::sun::star::util::URL& aURL);
+ virtual void SAL_CALL removeStatusListener(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > & xControl, const ::com::sun::star::util::URL& aURL);
+
+};
+
+#endif
+
diff --git a/extensions/source/bibliography/general.cxx b/extensions/source/bibliography/general.cxx
new file mode 100644
index 000000000000..9a15129156d9
--- /dev/null
+++ b/extensions/source/bibliography/general.cxx
@@ -0,0 +1,803 @@
+/*************************************************************************
+ *
+ * $RCSfile: general.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:16:44 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#pragma hdrstop
+
+#ifndef _UNOTOOLS_PROCESSFACTORY_HXX_
+#include <unotools/processfactory.hxx>
+#endif
+#ifndef _COM_SUN_STAR_AWT_POSSIZE_HPP_
+#include <com/sun/star/awt/PosSize.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_SDBC_XROWSET_HPP_
+#include <com/sun/star/sdbc/XRowSet.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDB_XCOLUMN_HPP_
+#include <com/sun/star/sdb/XColumn.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBCX_XCOLUMNSSUPPLIER_HPP_
+#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FORM_LISTSOURCETYPE_HPP_
+#include <com/sun/star/form/ListSourceType.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_XWINDOW_HPP_
+#include <com/sun/star/awt/XWindow.hpp>
+#endif
+#ifndef _TOOLKIT_UNOHLP_HXX
+#include <toolkit/helper/vclunohelper.hxx>
+#endif
+
+#ifndef _CPPUHELPER_IMPLBASE1_HXX_
+#include <cppuhelper/implbase1.hxx> // helper for implementations
+#endif
+#ifndef _BIB_GENERAL_HXX
+#include "general.hxx"
+#endif
+#include "sections.hrc"
+#ifndef ADRRESID_HXX
+#include "bibresid.hxx"
+#endif
+#ifndef _BIB_DATMAN_HXX
+#include "datman.hxx"
+#endif
+#ifndef _BIB_FMPROP_HRC
+#include "bibprop.hrc"
+#endif
+//#ifndef _TOOLKIT_UNOIFACE_HXX
+//#include <toolkit/unoiface.hxx>
+//#endif
+#include <extensio.hrc>
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::form;
+using namespace ::rtl;
+
+#define C2U(cChar) OUString::createFromAscii(cChar)
+#define C2S(cChar) String::CreateFromAscii(cChar)
+
+Point lcl_MovePoint(const FixedText& rFixedText)
+{
+ Point aRet(rFixedText.GetPosPixel());
+ aRet.X() += rFixedText.GetSizePixel().Width();
+ aRet.X() += 5;
+ return aRet;
+}
+
+//-----------------------------------------------------------------------------
+String lcl_GetColumnName(BibDataManager* pDatMan, const Mapping* pMapping, sal_uInt16 nIndexPos)
+{
+ String sRet = pDatMan->GetDefColumnName(nIndexPos);
+ if(pMapping)
+ for(sal_uInt16 i = 0; i < COLUMN_COUNT; i++)
+ {
+ if(pMapping->aColumnPairs[i].sLogicalColumnName == sRet)
+ {
+ sRet = pMapping->aColumnPairs[i].sRealColumnName;
+ break;
+ }
+ }
+ return sRet;
+}
+/* -----------------------------04.01.00 10:54--------------------------------
+
+ ---------------------------------------------------------------------------*/
+class BibPosListener :public cppu::WeakImplHelper1 <sdbc::XRowSetListener>
+{
+ BibGeneralPage* pParentPage;
+public:
+ BibPosListener(BibGeneralPage* pParent);
+
+ //XPositioningListener
+ virtual void SAL_CALL cursorMoved(const lang::EventObject& event) throw( uno::RuntimeException );
+ virtual void SAL_CALL rowChanged(const lang::EventObject& event) throw( uno::RuntimeException ){ /* not interested in */ }
+ virtual void SAL_CALL rowSetChanged(const lang::EventObject& event) throw( uno::RuntimeException ){ /* not interested in */ }
+
+ //XEventListener
+ virtual void SAL_CALL disposing(const lang::EventObject& Source) throw( uno::RuntimeException );
+
+};
+/* -----------------------------04.01.00 10:57--------------------------------
+
+ ---------------------------------------------------------------------------*/
+BibPosListener::BibPosListener(BibGeneralPage* pParent) :
+ pParentPage(pParent)
+{
+}
+/* -----------------------------04.01.00 10:57--------------------------------
+
+ ---------------------------------------------------------------------------*/
+void BibPosListener::cursorMoved(const lang::EventObject& /*aEvent*/) throw( uno::RuntimeException )
+{
+ try
+ {
+ uno::Reference< form::XBoundComponent > xLstBox = pParentPage->GetTypeListBoxModel();
+ uno::Reference< beans::XPropertySet > xPropSet(xLstBox, UNO_QUERY);
+ if(xPropSet.is())
+ {
+ BibDataManager* pDatMan = pParentPage->GetDataManager();
+ const Mapping* pMapping = pDatMan->GetMapping(pDatMan->getActiveDataTable());
+ String sTypeMapping = pDatMan->GetDefColumnName(AUTHORITYTYPE_POS);
+ if(pMapping)
+ {
+ for(sal_uInt16 nEntry = 0; nEntry < COLUMN_COUNT; nEntry++)
+ {
+ if(pMapping->aColumnPairs[nEntry].sLogicalColumnName == sTypeMapping)
+ {
+ sTypeMapping = pMapping->aColumnPairs[nEntry].sRealColumnName;
+ break;
+ }
+ }
+ }
+ rtl::OUString uTypeMapping = sTypeMapping;
+
+ uno::Reference< form::XForm > xForm = pDatMan->getDatabaseForm();
+ uno::Reference< sdbcx::XColumnsSupplier > xSupplyCols(xForm, UNO_QUERY);
+ uno::Reference< container::XNameAccess > xValueAcc;
+ if (xSupplyCols.is())
+ xValueAcc = xSupplyCols->getColumns();
+
+ sal_Int16 nTempVal = -1;
+ if(xValueAcc.is() && xValueAcc->hasByName(uTypeMapping))
+ {
+ uno::Any aVal = xValueAcc->getByName(uTypeMapping);
+ uno::Reference< uno::XInterface > xInt = *(uno::Reference< uno::XInterface > *)aVal.getValue();
+ uno::Reference< sdb::XColumn > xCol(xInt, UNO_QUERY);
+ DBG_ASSERT(xCol.is(), "BibPosListener::positioned : invalid column (no sdb::XColumn) !");
+ if (xCol.is())
+ {
+ nTempVal = xCol->getShort();
+ // getShort returns zero if the value is not a number
+ if (!nTempVal || xCol->wasNull())
+ {
+ rtl::OUString sTempVal = xCol->getString();
+ if(sTempVal != rtl::OUString('0'))
+ nTempVal = -1;
+ }
+ }
+ }
+ if(nTempVal < 0 || nTempVal >= TYPE_COUNT)
+ {
+ uno::Any aSel;
+ uno::Sequence<sal_Int16> aSelSeq(1);
+ sal_Int16* pArr = aSelSeq.getArray();
+ pArr[0] = TYPE_COUNT;
+ aSel.setValue(&aSelSeq, ::getCppuType((Sequence<sal_Int16>*)0));
+ xPropSet->setPropertyValue(C2U("SelectedItems"), aSel);
+ }
+ }
+ }
+ catch(...)
+ {
+ DBG_ERROR("BibPosListener::positioned: something went wrong !");
+ }
+}
+/* -----------------------------04.01.00 11:28--------------------------------
+
+ ---------------------------------------------------------------------------*/
+void BibPosListener::disposing(const lang::EventObject& Source) throw( uno::RuntimeException )
+{
+}
+
+/* -----------------16.11.99 13:06-------------------
+
+ --------------------------------------------------*/
+BibGeneralPage::BibGeneralPage(Window* pParent, BibDataManager* pMan):
+ TabPage(pParent,BibResId(RID_TP_GENERAL)),
+ pDatMan(pMan),
+ aControlParentWin(this, WB_DIALOGCONTROL),
+ aIdentifierFT(&aControlParentWin, ResId(FT_IDENTIFIER )),
+ aAuthTypeFT(&aControlParentWin, ResId(FT_AUTHTYPE )),
+ aAuthorFT(&aControlParentWin, ResId(FT_AUTHOR )),
+ aMonthFT(&aControlParentWin, ResId(FT_MONTH )),
+ aYearFT(&aControlParentWin, ResId(FT_YEAR )),
+
+ aPublisherFT(&aControlParentWin, ResId(FT_PUBLISHER )),
+ aISBNFT(&aControlParentWin, ResId(FT_ISBN )),
+
+ aAddressFT(&aControlParentWin, ResId(FT_ADDRESS )),
+ aAnnoteFT(&aControlParentWin, ResId(FT_ANNOTE )),
+ aBooktitleFT(&aControlParentWin, ResId(FT_BOOKTITLE )),
+ aChapterFT(&aControlParentWin, ResId(FT_CHAPTER )),
+ aEditionFT(&aControlParentWin, ResId(FT_EDITION )),
+ aEditorFT(&aControlParentWin, ResId(FT_EDITOR )),
+ aHowpublishedFT(&aControlParentWin, ResId(FT_HOWPUBLISHED )),
+ aInstitutionFT(&aControlParentWin, ResId(FT_INSTITUTION )),
+ aJournalFT(&aControlParentWin, ResId(FT_JOURNAL )),
+ aNoteFT(&aControlParentWin, ResId(FT_NOTE )),
+ aNumberFT(&aControlParentWin, ResId(FT_NUMBER )),
+ aOrganizationsFT(&aControlParentWin, ResId(FT_ORGANIZATION )),
+ aPagesFT(&aControlParentWin, ResId(FT_PAGE )),
+ aSchoolFT(&aControlParentWin, ResId(FT_SCHOOL )),
+ aSeriesFT(&aControlParentWin, ResId(FT_SERIES )),
+ aTitleFT(&aControlParentWin, ResId(FT_TITLE )),
+ aReportTypeFT(&aControlParentWin, ResId(FT_REPORT )),
+ aVolumeFT(&aControlParentWin, ResId(FT_VOLUME )),
+ aURLFT(&aControlParentWin, ResId(FT_URL )),
+ aCustom1FT(&aControlParentWin, ResId(FT_CUSTOM1 )),
+ aCustom2FT(&aControlParentWin, ResId(FT_CUSTOM2 )),
+ aCustom3FT(&aControlParentWin, ResId(FT_CUSTOM3 )),
+ aCustom4FT(&aControlParentWin, ResId(FT_CUSTOM4 )),
+ aCustom5FT(&aControlParentWin, ResId(FT_CUSTOM5 )),
+ aHoriScroll(this, WB_HORZ),
+ aVertScroll(this, WB_VERT),
+ sErrorPrefix(ResId(ST_ERROR_PREFIX))
+{
+ aControlParentWin.Show();
+ aStdSize = GetOutputSizePixel();
+
+ aBibTypeArr[0] = String(ResId(ST_TYPE_ARTICLE));
+ aBibTypeArr[1] = String(ResId(ST_TYPE_BOOK));
+ aBibTypeArr[2] = String(ResId(ST_TYPE_BOOKLET));
+ aBibTypeArr[3] = String(ResId(ST_TYPE_CONFERENCE));
+ aBibTypeArr[4] = String(ResId(ST_TYPE_INBOOK ));
+ aBibTypeArr[5] = String(ResId(ST_TYPE_INCOLLECTION));
+ aBibTypeArr[6] = String(ResId(ST_TYPE_INPROCEEDINGS));
+ aBibTypeArr[7] = String(ResId(ST_TYPE_JOURNAL ));
+ aBibTypeArr[8] = String(ResId(ST_TYPE_MANUAL ));
+ aBibTypeArr[9] = String(ResId(ST_TYPE_MASTERSTHESIS));
+ aBibTypeArr[10] = String(ResId(ST_TYPE_MISC ));
+ aBibTypeArr[11] = String(ResId(ST_TYPE_PHDTHESIS ));
+ aBibTypeArr[12] = String(ResId(ST_TYPE_PROCEEDINGS ));
+ aBibTypeArr[13] = String(ResId(ST_TYPE_TECHREPORT ));
+ aBibTypeArr[14] = String(ResId(ST_TYPE_UNPUBLISHED ));
+ aBibTypeArr[15] = String(ResId(ST_TYPE_EMAIL ));
+ aBibTypeArr[16] = String(ResId(ST_TYPE_WWW ));
+ aBibTypeArr[17] = String(ResId(ST_TYPE_CUSTOM1 ));
+ aBibTypeArr[18] = String(ResId(ST_TYPE_CUSTOM2 ));
+ aBibTypeArr[19] = String(ResId(ST_TYPE_CUSTOM3 ));
+ aBibTypeArr[20] = String(ResId(ST_TYPE_CUSTOM4 ));
+ aBibTypeArr[21] = String(ResId(ST_TYPE_CUSTOM5 ));
+
+ FreeResource();
+
+ aBasePos = aIdentifierFT.GetPosPixel();
+ aFixedTexts[0] = &aIdentifierFT;
+ aFixedTexts[1] = &aAuthTypeFT;
+ aFixedTexts[2] = &aAuthorFT;
+ aFixedTexts[3] = &aMonthFT;
+ aFixedTexts[4] = &aYearFT;
+ aFixedTexts[5] = &aPublisherFT;
+ aFixedTexts[6] = &aISBNFT;
+ aFixedTexts[7] = &aAddressFT;
+ aFixedTexts[8] = &aAnnoteFT;
+ aFixedTexts[9] = &aBooktitleFT;
+ aFixedTexts[10] = &aChapterFT;
+ aFixedTexts[11] = &aEditionFT;
+ aFixedTexts[12] = &aEditorFT;
+ aFixedTexts[13] = &aHowpublishedFT;
+ aFixedTexts[14] = &aInstitutionFT;
+ aFixedTexts[15] = &aJournalFT;
+ aFixedTexts[16] = &aNoteFT;
+ aFixedTexts[17] = &aNumberFT;
+ aFixedTexts[18] = &aOrganizationsFT;
+ aFixedTexts[19] = &aPagesFT;
+ aFixedTexts[20] = &aSchoolFT;
+ aFixedTexts[21] = &aSeriesFT;
+ aFixedTexts[22] = &aTitleFT;
+ aFixedTexts[23] = &aReportTypeFT;
+ aFixedTexts[24] = &aVolumeFT;
+ aFixedTexts[25] = &aURLFT;
+ aFixedTexts[26] = &aCustom1FT;
+ aFixedTexts[27] = &aCustom2FT;
+ aFixedTexts[28] = &aCustom3FT;
+ aFixedTexts[29] = &aCustom4FT;
+ aFixedTexts[30] = &aCustom5FT;
+ for(USHORT i = 0; i < FIELD_COUNT; i++)
+ aControls[i] = 0;
+
+ AdjustScrollbars();
+ Link aScrollLnk(LINK(this, BibGeneralPage, ScrollHdl));
+ aHoriScroll.SetScrollHdl( aScrollLnk );
+ aVertScroll.SetScrollHdl( aScrollLnk );
+ aHoriScroll.SetLineSize(10);
+ aVertScroll.SetLineSize(10);
+ aHoriScroll.SetPageSize( aIdentifierFT.GetSizePixel().Width());
+ aVertScroll.SetPageSize(
+ aPublisherFT.GetPosPixel().Y() - aIdentifierFT.GetPosPixel().Y());
+ aHoriScroll.Show();
+ aVertScroll.Show();
+
+ const Mapping* pMapping = pDatMan->GetMapping(pDatMan->getActiveDataTable());
+
+ xCtrlContnr = VCLUnoHelper::CreateControlContainer(&aControlParentWin);
+
+ xMgr = utl::getProcessServiceFactory();
+
+ AddControlWithError(
+ lcl_GetColumnName(pDatMan, pMapping, IDENTIFIER_POS),
+ lcl_MovePoint(aIdentifierFT), aIdentifierFT.GetSizePixel(), sTableErrorString,
+ aIdentifierFT.GetText(), HID_BIB_IDENTIFIER_POS);
+
+ sTypeColumnName = lcl_GetColumnName(pDatMan, pMapping, AUTHORITYTYPE_POS);
+
+ AddControlWithError(
+ sTypeColumnName,
+ lcl_MovePoint(aAuthTypeFT ), aAuthTypeFT .GetSizePixel(), sTableErrorString, aAuthTypeFT.GetText(), HID_BIB_AUTHORITYTYPE_POS);
+
+
+ Point aYearPos = lcl_MovePoint(aYearFT);
+ AddControlWithError(
+ lcl_GetColumnName(pDatMan, pMapping, YEAR_POS),
+ aYearPos, aYearFT.GetSizePixel(), sTableErrorString, aYearFT.GetText(), HID_BIB_YEAR_POS);
+
+ AddControlWithError(
+ lcl_GetColumnName(pDatMan, pMapping, AUTHOR_POS),
+ lcl_MovePoint(aAuthorFT ), aAuthorFT .GetSizePixel(), sTableErrorString, aAuthorFT.GetText(), HID_BIB_AUTHOR_POS);
+
+ Point aTitlePos(lcl_MovePoint(aTitleFT));
+ Size aTitleSize = aTitleFT .GetSizePixel();
+ aTitleSize.Width() = aYearPos.X() + aYearFT.GetSizePixel().Width() - aTitlePos.X();
+ AddControlWithError(
+ lcl_GetColumnName(pDatMan, pMapping, TITLE_POS),
+ aTitlePos, aTitleSize, sTableErrorString, aTitleFT.GetText(), HID_BIB_TITLE_POS);
+ AddControlWithError(
+ lcl_GetColumnName(pDatMan, pMapping, PUBLISHER_POS),
+ lcl_MovePoint(aPublisherFT), aPublisherFT.GetSizePixel(), sTableErrorString, aPublisherFT.GetText(), HID_BIB_PUBLISHER_POS);
+ AddControlWithError(
+ lcl_GetColumnName(pDatMan, pMapping, ADDRESS_POS),
+ lcl_MovePoint(aAddressFT ), aAddressFT .GetSizePixel(), sTableErrorString, aAddressFT.GetText(), HID_BIB_ADDRESS_POS);
+ AddControlWithError(
+ lcl_GetColumnName(pDatMan, pMapping, ISBN_POS),
+ lcl_MovePoint(aISBNFT ), aISBNFT .GetSizePixel(), sTableErrorString, aISBNFT.GetText(), HID_BIB_ISBN_POS);
+ AddControlWithError(
+ lcl_GetColumnName(pDatMan, pMapping, CHAPTER_POS),
+ lcl_MovePoint(aChapterFT ), aChapterFT .GetSizePixel(), sTableErrorString, aChapterFT.GetText(), HID_BIB_CHAPTER_POS);
+ AddControlWithError(
+ lcl_GetColumnName(pDatMan, pMapping, PAGES_POS),
+ lcl_MovePoint(aPagesFT ), aPagesFT .GetSizePixel(), sTableErrorString, aPagesFT.GetText(), HID_BIB_PAGES_POS);
+ AddControlWithError(
+ lcl_GetColumnName(pDatMan, pMapping, EDITOR_POS),
+ lcl_MovePoint(aEditorFT ), aEditorFT .GetSizePixel(), sTableErrorString, aEditorFT.GetText(), HID_BIB_EDITOR_POS);
+ AddControlWithError(
+ lcl_GetColumnName(pDatMan, pMapping, EDITION_POS),
+ lcl_MovePoint(aEditionFT ), aEditionFT .GetSizePixel(), sTableErrorString, aEditionFT.GetText(), HID_BIB_EDITION_POS);
+ AddControlWithError(
+ lcl_GetColumnName(pDatMan, pMapping, BOOKTITLE_POS),
+ lcl_MovePoint(aBooktitleFT ), aBooktitleFT .GetSizePixel(), sTableErrorString, aBooktitleFT.GetText(), HID_BIB_BOOKTITLE_POS);
+ AddControlWithError(
+ lcl_GetColumnName(pDatMan, pMapping, VOLUME_POS),
+ lcl_MovePoint(aVolumeFT ), aVolumeFT .GetSizePixel(), sTableErrorString, aVolumeFT.GetText(), HID_BIB_VOLUME_POS);
+ AddControlWithError(
+ lcl_GetColumnName(pDatMan, pMapping, HOWPUBLISHED_POS),
+ lcl_MovePoint(aHowpublishedFT ), aHowpublishedFT .GetSizePixel(), sTableErrorString, aHowpublishedFT.GetText(), HID_BIB_HOWPUBLISHED_POS);
+ AddControlWithError(
+ lcl_GetColumnName(pDatMan, pMapping, ORGANIZATIONS_POS),
+ lcl_MovePoint(aOrganizationsFT), aOrganizationsFT.GetSizePixel(), sTableErrorString, aOrganizationsFT.GetText(), HID_BIB_ORGANIZATIONS_POS);
+ AddControlWithError(
+ lcl_GetColumnName(pDatMan, pMapping, INSTITUTION_POS),
+ lcl_MovePoint(aInstitutionFT ), aInstitutionFT .GetSizePixel(), sTableErrorString, aInstitutionFT.GetText(), HID_BIB_INSTITUTION_POS);
+ AddControlWithError(
+ lcl_GetColumnName(pDatMan, pMapping, SCHOOL_POS),
+ lcl_MovePoint(aSchoolFT ), aSchoolFT .GetSizePixel(), sTableErrorString, aSchoolFT.GetText(), HID_BIB_SCHOOL_POS);
+ AddControlWithError(
+ lcl_GetColumnName(pDatMan, pMapping, REPORTTYPE_POS),
+ lcl_MovePoint(aReportTypeFT ), aReportTypeFT .GetSizePixel(), sTableErrorString, aReportTypeFT.GetText(), HID_BIB_REPORTTYPE_POS);
+ AddControlWithError(
+ lcl_GetColumnName(pDatMan, pMapping, MONTH_POS),
+ lcl_MovePoint(aMonthFT), aMonthFT .GetSizePixel(), sTableErrorString, aMonthFT.GetText(), HID_BIB_MONTH_POS);
+ AddControlWithError(
+ lcl_GetColumnName(pDatMan, pMapping, JOURNAL_POS),
+ lcl_MovePoint(aJournalFT ), aJournalFT .GetSizePixel(), sTableErrorString, aJournalFT.GetText(), HID_BIB_JOURNAL_POS);
+ AddControlWithError(
+ lcl_GetColumnName(pDatMan, pMapping, NUMBER_POS),
+ lcl_MovePoint(aNumberFT ), aNumberFT .GetSizePixel(), sTableErrorString, aNumberFT.GetText(), HID_BIB_NUMBER_POS);
+ AddControlWithError(
+ lcl_GetColumnName(pDatMan, pMapping, SERIES_POS),
+ lcl_MovePoint(aSeriesFT ), aSeriesFT .GetSizePixel(), sTableErrorString, aSeriesFT.GetText(), HID_BIB_SERIES_POS);
+ AddControlWithError(
+ lcl_GetColumnName(pDatMan, pMapping, ANNOTE_POS),
+ lcl_MovePoint(aAnnoteFT ), aAnnoteFT .GetSizePixel(), sTableErrorString, aAnnoteFT.GetText(), HID_BIB_ANNOTE_POS);
+ AddControlWithError(
+ lcl_GetColumnName(pDatMan, pMapping, NOTE_POS),
+ lcl_MovePoint(aNoteFT ), aNoteFT .GetSizePixel(), sTableErrorString, aNoteFT.GetText(), HID_BIB_NOTE_POS);
+ AddControlWithError(
+ lcl_GetColumnName(pDatMan, pMapping, URL_POS),
+ lcl_MovePoint(aURLFT ), aURLFT .GetSizePixel(), sTableErrorString, aURLFT.GetText(), HID_BIB_URL_POS);
+ AddControlWithError(
+ lcl_GetColumnName(pDatMan, pMapping, CUSTOM1_POS),
+ lcl_MovePoint(aCustom1FT ), aCustom1FT.GetSizePixel(), sTableErrorString, aCustom1FT.GetText(), HID_BIB_CUSTOM1_POS);
+ AddControlWithError(
+ lcl_GetColumnName(pDatMan, pMapping, CUSTOM2_POS),
+ lcl_MovePoint(aCustom2FT ), aCustom2FT.GetSizePixel(), sTableErrorString, aCustom2FT.GetText(), HID_BIB_CUSTOM2_POS);
+ AddControlWithError(
+ lcl_GetColumnName(pDatMan, pMapping, CUSTOM3_POS),
+ lcl_MovePoint(aCustom3FT ), aCustom3FT.GetSizePixel(), sTableErrorString, aCustom3FT.GetText(), HID_BIB_CUSTOM3_POS);
+ AddControlWithError(
+ lcl_GetColumnName(pDatMan, pMapping, CUSTOM4_POS),
+ lcl_MovePoint(aCustom4FT ), aCustom4FT.GetSizePixel(), sTableErrorString, aCustom4FT.GetText(), HID_BIB_CUSTOM4_POS);
+ AddControlWithError(
+ lcl_GetColumnName(pDatMan, pMapping, CUSTOM5_POS),
+ lcl_MovePoint(aCustom5FT ), aCustom5FT.GetSizePixel(), sTableErrorString, aCustom5FT.GetText(), HID_BIB_CUSTOM5_POS);
+
+// AddXControl("", lcl_MovePoint(.GetPosPixel()), .GetSizePixel(), sTableErrorString);
+
+ xPosListener = new BibPosListener(this);
+ uno::Reference< sdbc::XRowSet > xRowSet(pDatMan->getDatabaseForm(), UNO_QUERY);
+ if(xRowSet.is())
+ xRowSet->addRowSetListener(xPosListener);
+ xFormCtrl = uno::Reference< form::XFormController > (
+ xMgr->createInstance(C2U("com.sun.star.form.controller.FormController")), UNO_QUERY);
+ xFormCtrl->setModel(uno::Reference< awt::XTabControllerModel > (pDatMan->getDatabaseForm(), UNO_QUERY));
+ xFormCtrl->setContainer(xCtrlContnr);
+ xFormCtrl->activateTabOrder();
+
+ if(sTableErrorString.Len())
+ sTableErrorString.Insert(sErrorPrefix, 0);
+}
+//-----------------------------------------------------------------------------
+BibGeneralPage::~BibGeneralPage()
+{
+ if (pDatMan && xPosListener.is())
+ {
+ uno::Reference< sdbc::XRowSet > xRowSet(pDatMan->getDatabaseForm(), UNO_QUERY);
+ if(xRowSet.is())
+ xRowSet->removeRowSetListener(xPosListener);
+ }
+}
+ /* -----------------------------14.04.00 13:11--------------------------------
+
+ ---------------------------------------------------------------------------*/
+ void BibGeneralPage::RemoveListeners()
+ {
+ for(USHORT i = 0; i < FIELD_COUNT; i++)
+ {
+ if(aControls[i].is())
+ {
+ uno::Reference< awt::XWindow > xCtrWin(aControls[i], uno::UNO_QUERY );
+ xCtrWin->removeFocusListener( this );
+ aControls[i] = 0;
+ }
+ }
+ }
+/* -----------------------------21.01.00 17:05--------------------------------
+
+ ---------------------------------------------------------------------------*/
+void BibGeneralPage::CommitActiveControl()
+{
+ uno::Reference< awt::XControl > xCurr = xFormCtrl->getCurrentControl();
+ if(xCurr.is())
+ {
+ uno::Reference< awt::XControlModel > xModel = xCurr->getModel();
+ uno::Reference< form::XBoundComponent > xBound(xModel, UNO_QUERY);
+ if(xBound.is())
+ xBound->commit();
+ }
+}
+//-----------------------------------------------------------------------------
+void BibGeneralPage::AddControlWithError(const String& rColumnName,
+ const Point& rPos,
+ const Size& rSize,
+ String& rErrorString,
+ String aColumnUIName,
+ sal_uInt16 nHelpId)
+{
+ uno::Reference< awt::XControlModel > xTmp = AddXControl(rColumnName, rPos, rSize, nHelpId);
+ if(!xTmp.is())
+ {
+ if(rErrorString.Len())
+ {
+ rErrorString += '\n';
+ }
+ aColumnUIName.EraseAllChars('~');
+ rErrorString += aColumnUIName;
+ }
+}
+//-----------------------------------------------------------------------------
+uno::Reference< awt::XControlModel > BibGeneralPage::AddXControl(
+ const String& rName,
+ Point rPos, Size rSize, sal_uInt16 nHelpId)
+{
+ uno::Reference< awt::XControlModel > xCtrModel;
+ try
+ {
+ sal_Bool bTypeListBox = sTypeColumnName == rName;
+ xCtrModel = pDatMan->loadControlModel(rName, bTypeListBox);
+ if ( xCtrModel.is() && xMgr.is())
+ {
+ uno::Reference< beans::XPropertySet > xPropSet( xCtrModel, UNO_QUERY );
+
+ if( xPropSet.is())
+ {
+ uno::Reference< beans::XPropertySetInfo > xPropInfo = xPropSet->getPropertySetInfo();
+
+ uno::Any aAny = xPropSet->getPropertyValue( C2U("DefaultControl") );
+ rtl::OUString aControlName;
+ aAny >>= aControlName;
+
+ rtl::OUString uProp(C2U("HelpURL"));
+ if(xPropInfo->hasPropertyByName(uProp))
+ {
+ String sId(C2S("HID:"));
+ sId += nHelpId;
+ rtl::OUString uId(sId) ;
+ uno::Any aVal; aVal <<= uId;
+ xPropSet->setPropertyValue(uProp, aVal);
+ }
+
+ if(bTypeListBox)
+ {
+ //uno::Reference< beans::XPropertySet > xPropSet(xControl, UNO_QUERY);
+ uno::Any aAny;
+ aAny <<= (sal_Int16)1;
+ xPropSet->setPropertyValue(C2U("BoundColumn"), aAny);
+ // ListSourceType eSet = ListSourceType_SQL;
+ ListSourceType eSet = ListSourceType_VALUELIST;
+ aAny.setValue( &eSet, ::getCppuType((const ListSourceType*)0) );
+ xPropSet->setPropertyValue(C2U("ListSourceType"), aAny);
+
+ uno::Sequence<rtl::OUString> aListSource(TYPE_COUNT);
+ rtl::OUString* pListSourceArr = aListSource.getArray();
+ //pListSourceArr[0] = C2U("select TypeName, TypeIndex from TypeNms");
+ for(sal_uInt16 i = 0; i < TYPE_COUNT; i++)
+ pListSourceArr[i] = String::CreateFromInt32(i);
+ aAny.setValue(&aListSource, ::getCppuType((uno::Sequence<rtl::OUString>*)0));
+
+ xPropSet->setPropertyValue(C2U("ListSource"), aAny);
+
+ uno::Sequence<rtl::OUString> aValues(TYPE_COUNT + 1);
+ rtl::OUString* pValuesArr = aValues.getArray();
+ for(sal_uInt16 j = 0; j < TYPE_COUNT; j++)
+ pValuesArr[j] = aBibTypeArr[j];
+ // empty string if an invalid value no values is set
+ pValuesArr[TYPE_COUNT] = rtl::OUString();
+
+ aAny.setValue(&aValues, ::getCppuType((uno::Sequence<rtl::OUString>*)0));
+
+ xPropSet->setPropertyValue(C2U("StringItemList"), aAny);
+
+ BOOL bTrue = sal_True;
+ aAny.setValue( &bTrue, ::getBooleanCppuType() );
+ xPropSet->setPropertyValue( C2U("Dropdown"), aAny );
+
+ aControlName = C2U("com.sun.star.form.control.ListBox");
+ xLBModel = Reference< form::XBoundComponent >(xCtrModel, UNO_QUERY);
+
+ }
+
+ uno::Reference< awt::XControl > xControl(xMgr->createInstance( aControlName ), UNO_QUERY );
+ if ( xControl.is() )
+ {
+ xControl->setModel( xCtrModel);
+
+ // Peer als Child zu dem FrameWindow
+ xCtrlContnr->addControl(rName, xControl);
+ uno::Reference< awt::XWindow > xCtrWin(xControl, UNO_QUERY );
+ xCtrWin->addFocusListener( this );
+ for(USHORT i = 0; i < FIELD_COUNT; i++)
+ if(!aControls[i].is())
+ {
+ aControls[i] = xCtrWin;
+ break;
+ }
+ xCtrWin->setVisible( sal_True );
+ xControl->setDesignMode(sal_False);
+
+ xCtrWin->setPosSize(rPos.X(), rPos.Y(), rSize.Width(),
+ rSize.Height(), awt::PosSize::POSSIZE);
+ }
+ }
+ }
+ }
+ catch(...)
+ {
+ DBG_ERROR("BibGeneralPage::AddXControl: something went wrong !");
+ }
+ return xCtrModel;
+}
+/* -----------------------------14.04.00 11:15--------------------------------
+
+ ---------------------------------------------------------------------------*/
+void BibGeneralPage::AdjustScrollbars()
+{
+ long nVertScrollWidth = aVertScroll.GetSizePixel().Width();
+ long nHoriScrollHeight = aHoriScroll.GetSizePixel().Height();
+ Size aOutSize(GetOutputSizePixel());
+ BOOL bHoriVisible = aOutSize.Width() <= aStdSize.Width();
+ BOOL bVertVisible = (aOutSize.Height()-(bHoriVisible ? nHoriScrollHeight : 0)) <= (aStdSize.Height());
+ aHoriScroll.Show(bHoriVisible);
+ aVertScroll.Show(bVertVisible);
+
+ if(bHoriVisible)
+ {
+ Size aHoriSize(aOutSize.Width() - (bVertVisible ? nVertScrollWidth : 0),
+ nHoriScrollHeight);
+ aHoriScroll.SetSizePixel(aHoriSize);
+ aHoriScroll.SetRange( Range(0, aStdSize.Width()));
+ aHoriScroll.SetVisibleSize( aHoriSize.Width() - (bVertVisible ? nVertScrollWidth : 0));
+ }
+ if(bVertVisible)
+ {
+ Size aVertSize(nHoriScrollHeight, aOutSize.Height() -
+ (bHoriVisible ? nHoriScrollHeight : 0));
+ aVertScroll.SetSizePixel(aVertSize);
+ aVertScroll.SetRange( Range(0, aStdSize.Height()));
+ aVertScroll.SetVisibleSize( aVertSize.Height() );
+ }
+
+ Size aSize(8, 8);
+ aSize = LogicToPixel(aSize, MapMode(MAP_APPFONT));
+ Size aScrollSize(aOutSize.Width() - aSize.Height(), aSize.Height());
+ Point aScrollPos(0, aOutSize.Height() - aSize.Height());
+ aHoriScroll.SetPosSizePixel(aScrollPos, aScrollSize);
+
+ aScrollPos.X() = aOutSize.Width() - aSize.Width();
+ aScrollPos.Y() = 0;
+ aScrollSize.Width() = aSize.Width();
+ aScrollSize.Height() = aOutSize.Height() - aSize.Height();
+ aVertScroll.SetPosSizePixel(aScrollPos, aScrollSize);
+
+ Size aControlParentWinSz(aOutSize);
+ if(bHoriVisible)
+ aControlParentWinSz.Height() -= aSize.Height();
+ if(bVertVisible)
+ aControlParentWinSz.Width() -= aSize.Width();
+ aControlParentWin.SetSizePixel(aControlParentWinSz);
+}
+/* -----------------------------13.04.00 16:54--------------------------------
+
+ ---------------------------------------------------------------------------*/
+void BibGeneralPage::Resize()
+{
+ AdjustScrollbars();
+ ScrollHdl(&aVertScroll);
+ ScrollHdl(&aHoriScroll);
+ Window::Resize();
+}
+/* -----------------------------14.04.00 11:18--------------------------------
+
+ ---------------------------------------------------------------------------*/
+IMPL_LINK(BibGeneralPage, ScrollHdl, ScrollBar*, pScroll)
+{
+ BOOL bVertical = &aVertScroll == pScroll;
+ long nOffset = 0;
+ if(bVertical)
+ {
+ long nCurrentOffset = aFixedTexts[0]->GetPosPixel().Y() - aBasePos.Y();
+ nOffset = pScroll->GetThumbPos() + nCurrentOffset;
+ }
+ else
+ {
+ long nCurrentOffset = aFixedTexts[0]->GetPosPixel().X() - aBasePos.X();
+ nOffset = pScroll->GetThumbPos() + nCurrentOffset;
+ }
+
+ for(USHORT i = 0; i < FIELD_COUNT; i++)
+ {
+ Point aPos = aFixedTexts[i]->GetPosPixel();
+ if(bVertical)
+ aPos.Y() -= nOffset;
+ else
+ aPos.X() -= nOffset;
+ aFixedTexts[i]->SetPosPixel(aPos);
+ if(aControls[i].is())
+ {
+ awt::Rectangle aRect = aControls[i]->getPosSize();
+ long nX = aRect.X;
+ long nY = aRect.Y;
+ if(bVertical)
+ nY -= nOffset;
+ else
+ nX -= nOffset;
+ aControls[i]->setPosSize(nX, nY, 0, 0, awt::PosSize::POS);
+ }
+ }
+ return 0;
+}
+/* -----------------------------14.04.00 12:49--------------------------------
+
+ ---------------------------------------------------------------------------*/
+void BibGeneralPage::focusGained(const awt::FocusEvent& rEvent) throw( uno::RuntimeException )
+{
+ Reference<awt::XWindow> xCtrWin(rEvent.Source, UNO_QUERY );
+ if(xCtrWin.is())
+ {
+ Size aOutSize = aControlParentWin.GetOutputSizePixel();
+ awt::Rectangle aRect = xCtrWin->getPosSize();
+ long nX = aRect.X;
+ if(nX < 0)
+ {
+ // left of the visible area
+ aHoriScroll.SetThumbPos(aHoriScroll.GetThumbPos() + nX);
+ ScrollHdl(&aHoriScroll);
+ }
+ else if(nX > aOutSize.Width())
+ {
+ // right of the visible area
+ aHoriScroll.SetThumbPos(aHoriScroll.GetThumbPos() + nX - aOutSize.Width() + aFixedTexts[0]->GetSizePixel().Width());
+ ScrollHdl(&aHoriScroll);
+ }
+ long nY = aRect.Y;
+ if(nY < 0)
+ {
+ // below the visible area
+ aVertScroll.SetThumbPos(aVertScroll.GetThumbPos() + nY);
+ ScrollHdl(&aVertScroll);
+ }
+ else if(nY > aOutSize.Height())
+ {
+ // over the visible area
+ aVertScroll.SetThumbPos(aVertScroll.GetThumbPos() + nY - aOutSize.Height()+ aFixedTexts[0]->GetSizePixel().Height());
+ ScrollHdl(&aVertScroll);
+ }
+ }
+}
+/* -----------------------------14.04.00 12:49--------------------------------
+
+ ---------------------------------------------------------------------------*/
+void BibGeneralPage::focusLost(const awt::FocusEvent& ) throw( uno::RuntimeException )
+{
+}
+/* -----------------------------14.04.00 12:52--------------------------------
+
+ ---------------------------------------------------------------------------*/
+void BibGeneralPage::disposing(const lang::EventObject& Source) throw( uno::RuntimeException )
+{
+}
+
+
+
+
diff --git a/extensions/source/bibliography/general.hxx b/extensions/source/bibliography/general.hxx
new file mode 100644
index 000000000000..6145bea8432c
--- /dev/null
+++ b/extensions/source/bibliography/general.hxx
@@ -0,0 +1,225 @@
+/*************************************************************************
+ *
+ * $RCSfile: general.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:16:45 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _BIB_GENERAL_HXX
+#define _BIB_GENERAL_HXX
+
+#ifndef _COM_SUN_STAR_AWT_XFOCUSLISTENER_HPP_
+#include <com/sun/star/awt/XFocusListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_XCONTROLCONTAINER_HPP_
+#include <com/sun/star/awt/XControlContainer.hpp>
+#endif
+//#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
+//#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+//#endif
+#ifndef _COM_SUN_STAR_FORM_XBOUNDCOMPONENT_HPP_
+#include <com/sun/star/form/XBoundComponent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FORM_XFORMCONTROLLER_HPP_
+#include <com/sun/star/form/XFormController.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBC_XROWSETLISTENER_HPP_
+#include <com/sun/star/sdbc/XRowSetListener.hpp>
+#endif
+
+#ifndef _STDCTRL_HXX //autogen
+#include <svtools/stdctrl.hxx>
+#endif
+
+#ifndef _LSTBOX_HXX //autogen
+#include <vcl/lstbox.hxx>
+#endif
+
+#ifndef _SV_GROUP_HXX //autogen
+#include <vcl/group.hxx>
+#endif
+
+#ifndef _SVEDIT_HXX //autogen
+#include <svtools/svmedit.hxx>
+#endif
+
+#ifndef _SV_TABPAGE_HXX //autogen
+#include <vcl/tabpage.hxx>
+#endif
+
+#ifndef _SV_COMBOBOX_HXX //
+#include <vcl/combobox.hxx>
+#endif
+#ifndef _SV_SCRBAR_HXX
+#include <vcl/scrbar.hxx>
+#endif
+#ifndef _CPPUHELPER_IMPLBASE1_HXX_
+#include <cppuhelper/implbase1.hxx> // helper for implementations
+#endif
+
+
+class BibDataManager;
+#define TYPE_COUNT 22
+#define FIELD_COUNT 31
+
+typedef cppu::WeakAggImplHelper1
+<
+ ::com::sun::star::awt::XFocusListener
+> BibGeneralPageBaseClass;
+
+class BibGeneralPage:
+ public BibGeneralPageBaseClass,
+ public TabPage
+{
+ Window aControlParentWin;
+ FixedText aIdentifierFT;
+ FixedText aAuthTypeFT;
+
+ FixedText aAuthorFT;
+ FixedText aMonthFT;
+ FixedText aYearFT;
+
+ FixedText aPublisherFT;
+ FixedText aISBNFT;
+
+ FixedText aAddressFT;
+ FixedText aAnnoteFT;
+ FixedText aBooktitleFT;
+ FixedText aChapterFT;
+ FixedText aEditionFT;
+ FixedText aEditorFT;
+ FixedText aHowpublishedFT;
+ FixedText aInstitutionFT;
+ FixedText aJournalFT;
+ FixedText aNoteFT;
+ FixedText aNumberFT;
+ FixedText aOrganizationsFT;
+ FixedText aPagesFT;
+ FixedText aSchoolFT;
+ FixedText aSeriesFT;
+ FixedText aTitleFT;
+ FixedText aReportTypeFT;
+ FixedText aVolumeFT;
+ FixedText aURLFT;
+ FixedText aCustom1FT;
+ FixedText aCustom2FT;
+ FixedText aCustom3FT;
+ FixedText aCustom4FT;
+ FixedText aCustom5FT;
+
+ ScrollBar aHoriScroll;
+ ScrollBar aVertScroll;
+
+ FixedText* aFixedTexts[FIELD_COUNT];
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow> aControls[FIELD_COUNT];
+
+ Size aStdSize;
+ Point aBasePos;
+
+ String aBibTypeArr[TYPE_COUNT];
+ String sErrorPrefix;
+ String sTableErrorString;
+
+ String sTypeColumnName;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer > xCtrlContnr;
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > xFormCtrl;
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMgr;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XBoundComponent > xCurrentBoundComponent;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XBoundComponent > xLBModel;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSetListener > xPosListener;
+
+
+ BibDataManager* pDatMan;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > AddXControl(const String& rName, Point aPos, Size aSize, sal_uInt16 nHelpId);
+
+ void AddControlWithError(const String& rColumnName,
+ const Point& rPos, const Size& rSize, String& rErrorString,
+ String aColumnUIName, sal_uInt16 nHelpId);
+
+ void AdjustScrollbars();
+ DECL_LINK(ScrollHdl, ScrollBar*);
+
+protected:
+ virtual void Resize();
+public:
+ BibGeneralPage(Window* pParent, BibDataManager* pDatMan);
+ virtual ~BibGeneralPage();
+
+ const String& GetErrorString() const {return sTableErrorString;}
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XBoundComponent > GetTypeListBoxModel() {return xLBModel;}
+ BibDataManager* GetDataManager() {return pDatMan;}
+
+ void CommitActiveControl();
+
+ virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw( com::sun::star::uno::RuntimeException );
+
+ void SAL_CALL focusGained(const ::com::sun::star::awt::FocusEvent& e) throw( com::sun::star::uno::RuntimeException );
+ void SAL_CALL focusLost(const ::com::sun::star::awt::FocusEvent& e) throw( com::sun::star::uno::RuntimeException );
+
+ void RemoveListeners();
+};
+
+
+#endif
+
+
diff --git a/extensions/source/bibliography/hidother.src b/extensions/source/bibliography/hidother.src
new file mode 100644
index 000000000000..3582d93b0af4
--- /dev/null
+++ b/extensions/source/bibliography/hidother.src
@@ -0,0 +1,95 @@
+/*************************************************************************
+ *
+ * $RCSfile: hidother.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:16:45 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#include "..\..\inc\extensio.hrc" // HID_FUNC_XXX
+//#include "hidother.hrc"
+
+hidspecial HID_BIB_IDENTIFIER_POS { HelpID = HID_BIB_IDENTIFIER_POS ; };
+hidspecial HID_BIB_AUTHORITYTYPE_POS { HelpID = HID_BIB_AUTHORITYTYPE_POS ; };
+hidspecial HID_BIB_AUTHOR_POS { HelpID = HID_BIB_AUTHOR_POS ; };
+hidspecial HID_BIB_TITLE_POS { HelpID = HID_BIB_TITLE_POS ; };
+hidspecial HID_BIB_YEAR_POS { HelpID = HID_BIB_YEAR_POS ; };
+hidspecial HID_BIB_ISBN_POS { HelpID = HID_BIB_ISBN_POS ; };
+hidspecial HID_BIB_BOOKTITLE_POS { HelpID = HID_BIB_BOOKTITLE_POS ; };
+hidspecial HID_BIB_CHAPTER_POS { HelpID = HID_BIB_CHAPTER_POS ; };
+hidspecial HID_BIB_EDITION_POS { HelpID = HID_BIB_EDITION_POS ; };
+hidspecial HID_BIB_EDITOR_POS { HelpID = HID_BIB_EDITOR_POS ; };
+hidspecial HID_BIB_HOWPUBLISHED_POS { HelpID = HID_BIB_HOWPUBLISHED_POS ; };
+hidspecial HID_BIB_INSTITUTION_POS { HelpID = HID_BIB_INSTITUTION_POS ; };
+hidspecial HID_BIB_JOURNAL_POS { HelpID = HID_BIB_JOURNAL_POS ; };
+hidspecial HID_BIB_MONTH_POS { HelpID = HID_BIB_MONTH_POS ; };
+hidspecial HID_BIB_NOTE_POS { HelpID = HID_BIB_NOTE_POS ; };
+hidspecial HID_BIB_ANNOTE_POS { HelpID = HID_BIB_ANNOTE_POS ; };
+hidspecial HID_BIB_NUMBER_POS { HelpID = HID_BIB_NUMBER_POS ; };
+hidspecial HID_BIB_ORGANIZATIONS_POS { HelpID = HID_BIB_ORGANIZATIONS_POS ; };
+hidspecial HID_BIB_PAGES_POS { HelpID = HID_BIB_PAGES_POS ; };
+hidspecial HID_BIB_PUBLISHER_POS { HelpID = HID_BIB_PUBLISHER_POS ; };
+hidspecial HID_BIB_ADDRESS_POS { HelpID = HID_BIB_ADDRESS_POS ; };
+hidspecial HID_BIB_SCHOOL_POS { HelpID = HID_BIB_SCHOOL_POS ; };
+hidspecial HID_BIB_SERIES_POS { HelpID = HID_BIB_SERIES_POS ; };
+hidspecial HID_BIB_REPORTTYPE_POS { HelpID = HID_BIB_REPORTTYPE_POS ; };
+hidspecial HID_BIB_VOLUME_POS { HelpID = HID_BIB_VOLUME_POS ; };
+hidspecial HID_BIB_URL_POS { HelpID = HID_BIB_URL_POS ; };
+hidspecial HID_BIB_CUSTOM1_POS { HelpID = HID_BIB_CUSTOM1_POS ; };
+hidspecial HID_BIB_CUSTOM2_POS { HelpID = HID_BIB_CUSTOM2_POS ; };
+hidspecial HID_BIB_CUSTOM3_POS { HelpID = HID_BIB_CUSTOM3_POS ; };
+hidspecial HID_BIB_CUSTOM4_POS { HelpID = HID_BIB_CUSTOM4_POS ; };
+hidspecial HID_BIB_CUSTOM5_POS { HelpID = HID_BIB_CUSTOM5_POS ; };
+hidspecial HID_BIB_DB_GRIDCTRL { HelpID = HID_BIB_DB_GRIDCTRL ; };
diff --git a/extensions/source/bibliography/makefile.mk b/extensions/source/bibliography/makefile.mk
new file mode 100644
index 000000000000..1781f8fa1805
--- /dev/null
+++ b/extensions/source/bibliography/makefile.mk
@@ -0,0 +1,225 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 16:16:45 $
+#
+# The Contents of this file are made available subject to the terms of
+# either of the following licenses
+#
+# - GNU Lesser General Public License Version 2.1
+# - Sun Industry Standards Source License Version 1.1
+#
+# Sun Microsystems Inc., October, 2000
+#
+# GNU Lesser General Public License Version 2.1
+# =============================================
+# Copyright 2000 by Sun Microsystems, Inc.
+# 901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License version 2.1, as published by the Free Software Foundation.
+#
+# This library 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 for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+#
+# Sun Industry Standards Source License Version 1.1
+# =================================================
+# The contents of this file are subject to the Sun Industry Standards
+# Source License Version 1.1 (the "License"); You may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at http://www.openoffice.org/license.html.
+#
+# Software provided under this License is provided on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+# See the License for the specific provisions governing your rights and
+# obligations concerning the Software.
+#
+# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+#
+# Copyright: 2000 by Sun Microsystems, Inc.
+#
+# All Rights Reserved.
+#
+# Contributor(s): _______________________________________
+#
+#
+#
+#*************************************************************************
+PRJ=..$/..
+
+PRJNAME=bib
+TARGET=bib
+GEN_HID=TRUE
+ENABLE_EXCEPTIONS=TRUE
+USE_DEFFILE=TRUE
+NO_BSYMBOLIC=TRUE
+
+# --- Settings -----------------------------------------------------
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+
+# --- Files --------------------------------------------------------
+
+CXXFILES= bibcont.cxx \
+ bibload.cxx \
+ bibmod.cxx \
+ general.cxx \
+ framectr.cxx \
+ bibview.cxx \
+ bibbeam.cxx \
+ toolbar.cxx \
+ datman.cxx \
+ registry.cxx \
+ bibexch.cxx \
+ fieldwin.cxx \
+ viewsect.cxx
+
+
+SLOFILES= $(SLO)$/bibcont.obj \
+ $(SLO)$/bibload.obj \
+ $(SLO)$/bibmod.obj \
+ $(SLO)$/general.obj \
+ $(SLO)$/framectr.obj \
+ $(SLO)$/bibview.obj \
+ $(SLO)$/bibbeam.obj \
+ $(SLO)$/toolbar.obj \
+ $(SLO)$/datman.obj \
+ $(SLO)$/registry.obj \
+ $(SLO)$/bibexch.obj \
+ $(SLO)$/fieldwin.obj\
+ $(SLO)$/viewsect.obj
+
+
+SRCFILES= bib.src \
+ datman.src \
+ sections.src \
+ menu.src \
+ toolbar.src
+
+RESLIB1NAME=bib
+RESLIB1SRSFILES= $(SRS)/bib.srs
+RESLIB1DEPN= bib.src bib.hrc
+
+SHL1TARGET= $(TARGET)$(UPD)$(DLLPOSTFIX)
+
+# $(UNOLIB) \
+
+SHL1STDLIBS= \
+ $(CPPULIB) \
+ $(CPPUHELPERLIB) \
+ $(VOSLIB) \
+ $(TOOLSLIB) \
+ $(SO2LIB) \
+ $(VCLLIB) \
+ $(TKLIB) \
+ $(SVTOOLLIB)\
+ $(SVLLIB) \
+ $(OSLLIB) \
+ $(SALLIB) \
+ $(UNOTOOLSLIB) \
+ $(SOTLIB) \
+ $(UCBHELPERLIB)
+
+#Create UNO Header files
+UNOUCROUT=$(OUT)$/inc$/$(PRJNAME)
+INCPRE+=$(UNOUCROUT)
+
+UNOUCRDEP= $(SOLARBINDIR)$/applicat.rdb
+UNOUCRRDB= $(SOLARBINDIR)$/applicat.rdb
+
+UNOTYPES=\
+ com.sun.star.awt.PosSize \
+ com.sun.star.awt.XPointer \
+ com.sun.star.awt.XControl \
+ com.sun.star.awt.XControlContainer \
+ com.sun.star.awt.XControlModel \
+ com.sun.star.awt.XWindowPeer \
+ com.sun.star.beans.PropertyAttribute \
+ com.sun.star.beans.PropertyValue \
+ com.sun.star.beans.PropertyValues \
+ com.sun.star.data.XDatabaseDialogs \
+ com.sun.star.data.XDatabaseFavorites \
+ com.sun.star.form.XBoundComponent \
+ com.sun.star.form.XLoadable \
+ com.sun.star.form.XGridColumnFactory \
+ com.sun.star.form.ListSourceType \
+ com.sun.star.form.XForm \
+ com.sun.star.form.XFormController \
+ com.sun.star.frame.XComponentLoader \
+ com.sun.star.frame.XDispatchProvider \
+ com.sun.star.frame.XFilterDetect\
+ com.sun.star.frame.FrameSearchFlag \
+ com.sun.star.io.XPersistObject \
+ com.sun.star.io.XDataInputStream \
+ com.sun.star.io.XActiveDataSource \
+ com.sun.star.io.XMarkableStream \
+ com.sun.star.io.XActiveDataSink \
+ com.sun.star.lang.XLocalizable \
+ com.sun.star.lang.XServiceName \
+ com.sun.star.registry.XSimpleRegistry \
+ com.sun.star.sdb.CommandType\
+ com.sun.star.sdb.XDatabaseEnvironment \
+ com.sun.star.sdb.XColumn\
+ com.sun.star.sdb.XSQLQueryComposerFactory\
+ com.sun.star.sdbc.DataType \
+ com.sun.star.sdbc.ResultSetType \
+ com.sun.star.sdbc.ResultSetConcurrency \
+ com.sun.star.sdbc.XConnection \
+ com.sun.star.sdbc.XDataSource \
+ com.sun.star.sdbc.XResultSetUpdate \
+ com.sun.star.sdbcx.XTablesSupplier \
+ com.sun.star.sdbcx.XColumnsSupplier \
+ com.sun.star.sdbcx.XRowLocate \
+ com.sun.star.sdb.XSQLQueryComposer\
+ com.sun.star.sdbc.XResultSet \
+ com.sun.star.sdbc.ResultSetType \
+ com.sun.star.sdbc.XRowSet\
+ com.sun.star.text.BibliographyDataField \
+ com.sun.star.uno.XNamingService\
+ com.sun.star.util.XLocalizedAliases\
+ com.sun.star.util.XURLTransformer
+
+#END
+
+SHL1LIBS= $(SLB)$/$(TARGET).lib
+SHL1IMPLIB= i$(TARGET)
+SHL1DEPN= $(SHL1LIBS)
+SHL1DEF= $(MISC)$/$(SHL1TARGET).def
+
+DEF1NAME= $(SHL1TARGET)
+DEF1EXPORTFILE= exports.dxp
+
+ALL:\
+ $(do_build) \
+ $(SRS)$/hidother.hid\
+ ALLTAR
+
+$(SRS)$/hidother.hid: hidother.src
+.IF "$(GUI)" =="WNT"
+ @+echo
+ @+echo NO HIDS!
+ @+echo
+ +copy ..\..\inc\extensio.hrc .
+ +mhids hidother.src ..$/..$/$(INPATH)$/srs bib hidother
+ +del extensio.hrc
+.ELSE
+ @echo wnt only
+.ENDIF
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk
+
diff --git a/extensions/source/bibliography/menu.src b/extensions/source/bibliography/menu.src
new file mode 100644
index 000000000000..d6981a339ca9
--- /dev/null
+++ b/extensions/source/bibliography/menu.src
@@ -0,0 +1,594 @@
+/*************************************************************************
+ *
+ * $RCSfile: menu.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:16:45 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include <svtools/solar.hrc>
+#include <sfx2/sfxsids.hrc>
+#ifndef _GLOBLMN_HRC
+#include <svx/globlmn.hrc>
+#endif
+#ifndef _GLOBALACC_SRC
+#include <svx/globlac.hrc>
+#endif
+#include <offmgr/ofaids.hrc>
+#include <offmgr/sbasltid.hrc>
+#include <extensio.hrc>
+
+#include "bib.hrc"
+
+#define MN_EDIT 20
+#define MN_VIEW 21
+#define MN_EXTRA 22
+#define MN_WIN 30
+#define MN_HELP 31
+
+Menu RID_MAIN_MENU
+{
+ ItemList =
+ {
+ MenuItem
+ {
+ ITEM_FILE_PICKLIST
+ SubMenu = Menu
+ {
+ ItemList =
+ {
+ MenuItem
+ {
+ ITEM_FILE_NEWDOC
+ };
+ MenuItem
+ {
+ ITEM_FILE_OPENDOC
+ };
+ ITEM_FILE_AUTOPILOT
+ MenuItem
+ {
+ Separator = TRUE ;
+ };
+ MenuItem
+ {
+ ITEM_FILE_CLOSEDOC
+ };
+ /*
+ MenuItem
+ {
+ ITEM_FILE_SAVEDOC
+ };
+ MenuItem
+ {
+ ITEM_FILE_SAVEASDOC
+ };
+ */
+ MenuItem
+ {
+ ITEM_FILE_SAVEDOCS //!!muss fuer andere geoeffnete Tasks drinbleiben
+ };
+ MenuItem
+ {
+ Command = ".uno:ss/sendasemail" ;
+ Identifier = 369;
+ Text = "Als E-Mail ~versenden..." ;
+ Text[ English ] = "Send as EMail...";
+ Text [ english_us ] = "Send as ~E-mail..." ;
+ Text[ portuguese ] = "~Enviar como e-mail...";
+ Text[ russian ] = " ...";
+ Text[ dutch ] = "Als ~e-mail verzenden...";
+ Text[ french ] = "~Envoyer par e-mail...";
+ Text[ spanish ] = "Enviar como ~mensaje electrnico...";
+ Text[ italian ] = "~Invia come eMail...";
+ Text[ danish ] = "Send som e-mail...";
+ Text[ swedish ] = "~Skicka som e-post...";
+ Text[ polish ] = "Wylij jako e-mail...";
+ Text[ portuguese_brazilian ] = "Send Even~t as EMail...";
+ Text[ japanese ] = "E-mailƂđM(~E)...";
+ Text[ chinese_simplified ] = "ʼķ(~E)...";
+ Text[ chinese_traditional ] = "@qlloe(~E)...";
+ Text[ arabic ] = " ...";
+ Text[ greek ] = " ~ E-mail...";
+ Text[ korean ] = "ڿ (~E)...";
+ Text[ turkish ] = "E-posta olarak gnder...";
+ Text[ language_user1 ] = " ";
+ };
+ /*
+ MenuItem
+ {
+ ITEM_FILE_MAIL_SENDDOC
+ };
+ */
+ MenuItem
+ {
+ Separator = TRUE ;
+ };
+ MenuItem
+ {
+ ITEM_FILE_PRINTDOC
+ };
+ MenuItem
+ {
+ ITEM_FILE_SETUPPRINTER
+ };
+ MenuItem
+ {
+ Separator = TRUE ;
+ };
+ MenuItem
+ {
+ ITEM_FILE_QUITAPP
+ };
+ };
+ };
+ };
+ MenuItem
+ {
+ Identifier = MN_EDIT ;
+ HelpID = MN_EDIT ;
+ Text = "~Bearbeiten" ;
+ Text [ English ] = "~Edit" ;
+ Text [ norwegian ] = "~Rediger" ;
+ Text [ italian ] = "~Modifica" ;
+ Text [ portuguese_brazilian ] = "~Editar" ;
+ Text [ portuguese ] = "~Editar" ;
+ Text [ finnish ] = "~Muokkaa" ;
+ Text [ danish ] = "~Rediger" ;
+ Text [ french ] = "~dition" ;
+ Text [ swedish ] = "R~edigera" ;
+ Text [ dutch ] = "Be~werken" ;
+ Text [ spanish ] = "~Editar" ;
+ Text [ english_us ] = "~Edit" ;
+ SubMenu = Menu
+ {
+ ItemList =
+ {
+/* MenuItem
+ {
+ ITEM_EDIT_UNDO
+ Command = ".uno:Bib/undo" ;
+ };
+ MenuItem
+ {
+ ITEM_EDIT_REDO
+ };
+ MenuItem
+ {
+ ITEM_EDIT_REPEAT
+ };
+ MenuItem
+ {
+ Separator = TRUE ;
+ };*/
+ MenuItem
+ {
+ ITEM_EDIT_CUT
+ };
+ MenuItem
+ {
+ ITEM_EDIT_COPY
+ };
+ MenuItem
+ {
+ ITEM_EDIT_PASTE
+ };
+ MenuItem
+ {
+ ITEM_EDIT_SELECTALL
+ };
+ MenuItem
+ {
+ Separator = TRUE ;
+ };
+ MenuItem
+ {
+ HelpId = HID_BIB_MAPPINGDLG;
+ Text = "~Spaltenzuordnung..." ;
+ Text[ English ] = "~Column assignment..." ;
+ Command = ".uno:Bib/Mapping" ;
+ Identifier = RID_MAIN_ME_MAPPING ;
+ Checkable=TRUE;
+ Text[ english_us ] = "~Column Arrangement...";
+ Text[ portuguese ] = "~Dispor colunas...";
+ Text[ russian ] = "~ ...";
+ Text[ greek ] = " ~...";
+ Text[ dutch ] = "~Kolomindeling...";
+ Text[ french ] = "~Assignation de colonnes...";
+ Text[ spanish ] = "~Asignacin de columnas...";
+ Text[ italian ] = "A~ssegnazione colonne...";
+ Text[ danish ] = "Kolonnetildeling...";
+ Text[ swedish ] = "~Kolumntilldelning...";
+ Text[ polish ] = "Przyporzdkowanie kolumn...";
+ Text[ portuguese_brazilian ] = "~Column assignment...";
+ Text[ japanese ] = "̕(~C)...";
+ Text[ korean ] = " (~C)...";
+ Text[ chinese_simplified ] = "(~C)...";
+ Text[ chinese_traditional ] = "s(~C)...";
+ Text[ arabic ] = " ...";
+ Text[ turkish ] = "~Stun dzeni...";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ HelpId = HID_BIB_CHANGESOURCE;
+ Text = "~Datenquelle..." ;
+ Text[ English ] = "~Data source..." ;
+ Command = ".uno:Bib/sdbsource" ;
+ Identifier = RID_MAIN_ME_DBSOURCE;
+ Checkable=TRUE;
+ Text[ english_us ] = "~Data Source...";
+ Text[ portuguese ] = "~Fonte de dados...";
+ Text[ russian ] = "~ ...";
+ Text[ greek ] = " ~...";
+ Text[ dutch ] = "~Gegevensbron...";
+ Text[ french ] = "~Source de donnes...";
+ Text[ spanish ] = "~Fuente de datos...";
+ Text[ italian ] = "Sorgente ~dati...";
+ Text[ danish ] = "Datakilde...";
+ Text[ swedish ] = "~Dataklla...";
+ Text[ polish ] = "rdo danych...";
+ Text[ portuguese_brazilian ] = "~Data source...";
+ Text[ japanese ] = "ް(~D)...";
+ Text[ korean ] = " ҽ(~D)...";
+ Text[ chinese_simplified ] = "Դ(~D)...";
+ Text[ chinese_traditional ] = "u(~D)...";
+ Text[ arabic ] = " ...";
+ Text[ turkish ] = "~Veri kayna...";
+ Text[ language_user1 ] = " ";
+ };
+/* MenuItem
+ {
+ Separator = TRUE ;
+ };
+ MenuItem
+ {
+ Text = "~Layout" ;
+ Text[ English ] = "~Layout" ;
+ Command = ".uno:Bib/Layout" ;
+ Identifier = RID_MAIN_ME_LAYOUT;
+ Checkable=TRUE;
+ };
+
+ MenuItem
+ {
+ Separator = TRUE ;
+ };
+ MenuItem
+ {
+ ITEM_EDIT_SEARCH_DLG
+ };
+ MenuItem
+ {
+ ITEM_EDIT_SBA_ADDRPI
+ };
+ MenuItem
+ {
+ Separator = TRUE ;
+ };
+ MenuItem
+ {
+ ITEM_EDIT_EDIT_FRAMESET
+ };
+ */
+ };
+ };
+ Text[ russian ] = "~";
+ Text[ polish ] = "~Edytuj";
+ Text[ japanese ] = "ҏW(~E)";
+ Text[ chinese_simplified ] = "༭(~E)";
+ Text[ chinese_traditional ] = "s(~E)";
+ Text[ arabic ] = "~";
+ Text[ greek ] = "~";
+ Text[ korean ] = "(~E)";
+ Text[ turkish ] = "~Dzenle";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = MN_VIEW ;
+ HelpID = MN_VIEW ;
+ Text = "~Ansicht" ;
+ Text [ English ] = "~View" ;
+ Text [ norwegian ] = "~Vis" ;
+ Text [ italian ] = "~Visualizza" ;
+ Text [ portuguese_brazilian ] = "~Ver" ;
+ Text [ portuguese ] = "~Ver" ;
+ Text [ finnish ] = "~Nyt" ;
+ Text [ danish ] = "~Vis" ;
+ Text [ french ] = "~Affichage" ;
+ Text [ swedish ] = "Vi~sa" ;
+ Text [ dutch ] = "Beel~d" ;
+ Text [ spanish ] = "~Ver" ;
+ Text [ english_us ] = "~View" ;
+ SubMenu = Menu
+ {
+ ItemList =
+ {
+ MenuItem
+ {
+ ITEM_VIEW_EXPLORER
+ };
+ MenuItem
+ {
+ ITEM_VIEW_BROWSER
+ };
+ MenuItem
+ {
+ Separator = TRUE ;
+ };
+ MenuItem
+ {
+ Identifier = 22 ;
+ HelpID = 22 ;
+ Text = "S~ymbolleisten" ;
+ Text [ English ] = "Toolbars" ;
+ Text [ english_us ] = "~Toolbars" ;
+ Text [ swedish ] = "S~ymbollister" ;
+ Text [ danish ] = "Ikonlin~jer" ;
+ Text [ italian ] = "Barr~e dei simboli" ;
+ Text [ spanish ] = "Barras de ~smbolos" ;
+ Text [ french ] = "Barres d'~outils" ;
+ Text [ dutch ] = "We~rkbalken" ;
+ Text [ portuguese ] = "Barras de ~ferramentas" ;
+ Text [ portuguese_brazilian ] = "Symbolleisten" ;
+ SubMenu = Menu
+ {
+ ItemList =
+ {
+ MenuItem
+ {
+ ITEM_VIEW_TOGGLEFUNCTIONBAR
+ };
+ MenuItem
+ {
+ ITEM_VIEW_TOGGLEOBJECTBAR
+ };
+ MenuItem
+ {
+ ITEM_INSERT_HYPERLINK_INSERT
+ };
+ /*
+ MenuItem
+ {
+ Separator = TRUE ;
+ };
+ MenuItem
+ {
+ Identifier = SID_CUSTOMIZETOOLBOX ;
+ HelpID = SID_CUSTOMIZETOOLBOX ;
+ Text = "~Bearbeiten..." ;
+ Text [ English ] = "~Customize..." ;
+ Text [ english_us ] = "~Customize..." ;
+ Text [ swedish ] = "~Redigera..." ;
+ Text [ danish ] = "~Rediger..." ;
+ Text [ italian ] = "~Modifica..." ;
+ Text [ spanish ] = "~Personalizar..." ;
+ Text [ french ] = "~Personnaliser..." ;
+ Text [ dutch ] = "~Bewerken..." ;
+ Text [ portuguese ] = "~Personalizar..." ;
+ Text [ portuguese_brazilian ] = "~Bearbeiten..." ;
+ };
+ */
+ };
+ };
+ Text[ russian ] = " ";
+ Text[ polish ] = "Paski symboli";
+ Text[ japanese ] = "°ް(~T)";
+ Text[ chinese_simplified ] = "ͼ(~T)";
+ Text[ chinese_traditional ] = "uC(~T)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ~";
+ Text[ korean ] = "(~T)";
+ Text[ turkish ] = "Ara ubuklar";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ ITEM_VIEW_TOGGLESTATUSBAR
+ };
+/* MenuItem
+ {
+ Separator = TRUE ;
+ };
+ MenuItem
+ {
+ Text = "Hierarchisch" ;
+ Text[ English ] = "Hierarchical" ;
+ Command = ".uno:Bib/hierarchical" ;
+ Identifier = RID_MAIN_ME_HIERARCHICAL;
+ Checkable=TRUE;
+ };
+*/ MenuItem
+ {
+ Separator = TRUE ;
+ };
+ ITEM_VIEW_SCREENMODE
+ };
+ };
+ Text[ russian ] = "~";
+ Text[ greek ] = "~";
+ Text[ polish ] = "~Widok";
+ Text[ japanese ] = "\\(~V)";
+ Text[ korean ] = "(~V)";
+ Text[ chinese_simplified ] = "ͼ(~V)";
+ Text[ chinese_traditional ] = "˵(~V)";
+ Text[ arabic ] = "~";
+ Text[ turkish ] = "Grnm";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = MN_EXTRA ;
+ HelpID = MN_EXTRA ;
+ Text = "E~xtras" ;
+ Text [ English ] = "T~ools" ;
+ Text [ norwegian ] = "Verk~ty" ;
+ Text [ italian ] = "~Strumenti" ;
+ Text [ portuguese_brazilian ] = "F~erramentas" ;
+ Text [ portuguese ] = "~Ferramentas" ;
+ Text [ finnish ] = "~Tykalut" ;
+ Text [ danish ] = "Fun~ktioner" ;
+ Text [ french ] = "~Outils" ;
+ Text [ swedish ] = "~Verktyg" ;
+ Text [ dutch ] = "E~xtra" ;
+ Text [ spanish ] = "~Herramientas" ;
+ Text [ english_us ] = "~Tools" ;
+ SubMenu = Menu
+ {
+ ItemList =
+ {
+/* MenuItem
+ {
+ Text = "Neue Adresse" ;
+ Text [ English ] = "New Address" ;
+ Command = ".uno:Bib/newEntry" ;
+ Identifier = RID_MAIN_ME_NEWENTRY;
+ };
+ MenuItem
+ {
+ Text = "Adresse ndern" ;
+ Text [ English ] = "Change Address" ;
+ Command = ".uno:Bib/changeEntry" ;
+ Identifier = RID_MAIN_ME_CHANGEENTRY;
+ };
+ MenuItem
+ {
+ Text = "Adresse lschen" ;
+ Text [ English ] = "Remove Address" ;
+ Command = ".uno:Bib/removeEntry" ;
+ Identifier = RID_MAIN_ME_REMOVEENTRY;
+ };
+
+ MenuItem
+ {
+ Separator = TRUE ;
+ };
+
+*/ MenuItem
+ {
+ Command = ".uno:Bib/standardFilter" ;
+ Identifier = RID_MAIN_ME_SEARCH;
+ Text = "~Filtern...";
+ Text[ English ] = "Filter..." ;
+ Text[ english_us ] = "~Filter...";
+ Text[ portuguese ] = "~Filtrar...";
+ Text[ russian ] = "...";
+ Text[ greek ] = "...";
+ Text[ dutch ] = "~Filteren...";
+ Text[ french ] = "~Filtrer...";
+ Text[ spanish ] = "~Filtrar...";
+ Text[ italian ] = "~Filtra...";
+ Text[ danish ] = "Filtrer...";
+ Text[ swedish ] = "~Filtrera...";
+ Text[ polish ] = "Filtruj...";
+ Text[ portuguese_brazilian ] = "Filter...";
+ Text[ japanese ] = "̨(~F)...";
+ Text[ korean ] = "(~F)...";
+ Text[ chinese_simplified ] = "ɸѡ(~F)...";
+ Text[ chinese_traditional ] = "z(~F)...";
+ Text[ arabic ] = "...";
+ Text[ turkish ] = "~Filtrele...";
+ Text[ language_user1 ] = " ";
+ };
+/* MenuItem
+ {
+ Separator = TRUE ;
+ };
+ MenuItem
+ {
+ Command = ".uno:Bib/InsertFieldDlg" ;
+ Identifier = RID_MAIN_ME_FIELDDLG;
+ Text = "Felder ~einfgen...";
+ Text[ English ] = "Insert Fields..." ;
+ };
+*/ MenuItem
+ {
+ Separator = TRUE ;
+ };
+
+
+ MenuItem
+ {
+ ITEM_TOOLS_BASICCHOOSER
+ };
+
+
+ /*
+ MenuItem
+ {
+ ITEM_TOOLS_CONFIG
+ };
+ */
+ ITEM_MN_OPTIONS
+ };
+ };
+ Text[ russian ] = "~";
+ Text[ greek ] = "~";
+ Text[ polish ] = "~Narzdzia";
+ Text[ japanese ] = "°(~T)";
+ Text[ korean ] = "(~T)";
+ Text[ chinese_simplified ] = "(~T)";
+ Text[ chinese_traditional ] = "u(~T)";
+ Text[ arabic ] = "~";
+ Text[ turkish ] = "~Aralar";
+ Text[ language_user1 ] = " ";
+ };
+ ITEM_WINDOW_MENU
+ ITEM_HELP_MENU
+ };
+};
+
diff --git a/extensions/source/bibliography/sections.hrc b/extensions/source/bibliography/sections.hrc
new file mode 100644
index 000000000000..9f695c34c786
--- /dev/null
+++ b/extensions/source/bibliography/sections.hrc
@@ -0,0 +1,159 @@
+/*************************************************************************
+ *
+ * $RCSfile: sections.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:16:45 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "bib.hrc"
+
+//General
+/*#define FT_FIRST_MIDDLE 1
+#define ED_FIRST 2
+#define ED_MIDDLE 3
+#define FT_NAME_SUFFIX 4
+#define ED_NAME 5
+#define CB_SUFFIX 6
+#define ED_INITIALS 8
+#define FT_COMPANY 9
+#define ED_COMPANY 10
+#define FT_DEPARTMENT 11
+#define ED_DEPARTMENT 12
+#define FT_SALUTATION 13
+#define CB_SALUTATION 14
+#define FT_SHOWNNAME 15
+#define ED_SHOWNNAME 16*/
+#define FT_IDENTIFIER 1
+#define FT_AUTHTYPE 2
+#define FT_AUTHOR 3
+#define FT_YEAR 4
+#define FT_ISBN 5
+
+#define FT_MONTH 6
+
+#define FT_PUBLISHER 8
+
+#define FT_ADDRESS 9
+#define FT_ANNOTE 10
+#define FT_BOOKTITLE 11
+#define FT_CHAPTER 12
+#define FT_EDITION 13
+#define FT_EDITOR 14
+#define FT_HOWPUBLISHED 15
+#define FT_INSTITUTION 16
+#define FT_JOURNAL 17
+#define FT_NOTE 18
+#define FT_NUMBER 19
+#define FT_ORGANIZATION 20
+#define FT_PAGE 21
+#define FT_SCHOOL 22
+#define FT_SERIES 23
+#define FT_TITLE 24
+#define FT_REPORT 25
+#define FT_VOLUME 26
+#define FT_URL 27
+#define FT_CUSTOM1 28
+#define FT_CUSTOM2 29
+#define FT_CUSTOM3 30
+#define FT_CUSTOM4 31
+#define FT_CUSTOM5 32
+#define ST_ERROR_PREFIX 33
+
+//Business Address
+#define FT_OFFICE 1
+#define FT_STREET 2
+#define FT_CITY 3
+#define FT_STATE 4
+#define FT_COUNTRY 5
+#define FT_ZIP 6
+#define ED_OFFICE 7
+#define ED_STREET 8
+#define ED_CITY 9
+#define ED_STATE 10
+#define ED_COUNTRY 11
+#define ED_ZIP 12
+#define ED_POBOX 13
+
+
+//Popup SectionControl
+#define PU_INSERT 1
+#define PU_REMOVE 2
+#define PU_CHG_NAME 3
+
+#define ST_TYPE_ARTICLE 40
+#define ST_TYPE_BOOK 41
+#define ST_TYPE_BOOKLET 42
+#define ST_TYPE_CONFERENCE 43
+#define ST_TYPE_INBOOK 44
+#define ST_TYPE_INCOLLECTION 45
+#define ST_TYPE_INPROCEEDINGS 46
+#define ST_TYPE_JOURNAL 47
+#define ST_TYPE_MANUAL 48
+#define ST_TYPE_MASTERSTHESIS 49
+#define ST_TYPE_MISC 50
+#define ST_TYPE_PHDTHESIS 51
+#define ST_TYPE_PROCEEDINGS 52
+#define ST_TYPE_TECHREPORT 53
+#define ST_TYPE_UNPUBLISHED 54
+#define ST_TYPE_EMAIL 55
+#define ST_TYPE_WWW 56
+#define ST_TYPE_CUSTOM1 57
+#define ST_TYPE_CUSTOM2 58
+#define ST_TYPE_CUSTOM3 59
+#define ST_TYPE_CUSTOM4 60
+#define ST_TYPE_CUSTOM5 61
+
diff --git a/extensions/source/bibliography/sections.src b/extensions/source/bibliography/sections.src
new file mode 100644
index 000000000000..9f78026010af
--- /dev/null
+++ b/extensions/source/bibliography/sections.src
@@ -0,0 +1,1538 @@
+/*************************************************************************
+ *
+ * $RCSfile: sections.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:16:45 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+//#pragma CHARSET_ANSI
+
+#include "sections.hrc"
+
+#define FT_POS 6
+#define FTSIZE_LEFT 65
+#define ED_POS_LEFT FT_POS+FTSIZE_LEFT+1
+#define ED_SIZE 65
+#define BTN_SIZE 12
+#define ED_POS_LEFT2 ED_POS_LEFT + ED_SIZE +1
+#define FT_POS_MIDDLE ED_POS_LEFT2 + 5
+#define FT_POS_RIGHT FT_POS_MIDDLE + FT_POS_MIDDLE - FT_POS
+
+TabPage RID_TP_GENERAL
+{
+ Size = MAP_APPFONT( 452, 195 );
+ Text = "Allgemein";
+ Text[English]= "General";
+
+ FixedText FT_IDENTIFIER
+ {
+ Pos = MAP_APPFONT( FT_POS, 6 );
+ Size = MAP_APPFONT( FTSIZE_LEFT, 10 );
+ Text = "~Kurzbezeichnung";
+ Text[English]= "Identifier";
+ Text[ english_us ] = "Short ~name";
+ Text[ portuguese ] = "~Abreviatura";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "~Beknopte aanduiding";
+ Text[ french ] = "~Abrg";
+ Text[ spanish ] = "~Abreviatura";
+ Text[ italian ] = "Abbreviazione";
+ Text[ danish ] = "Kort betegnelse";
+ Text[ swedish ] = "~Kort beteckning";
+ Text[ polish ] = "Skrt";
+ Text[ portuguese_brazilian ] = "Identifier";
+ Text[ japanese ] = "ID(~N)";
+ Text[ korean ] = "Ī(~N)";
+ Text[ chinese_simplified ] = "(~N)";
+ Text[ chinese_traditional ] = "ѧO(~N)";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "~Ksa ad";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_AUTHTYPE
+ {
+ Pos = MAP_APPFONT( FT_POS_MIDDLE, 6 );
+ Size = MAP_APPFONT( FTSIZE_LEFT, 10 );
+ Text = "~Art";
+ Text[English]= "Type";
+ Text[ english_us ] = "~Type";
+ Text[ portuguese ] = "~Tipo";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "~Type";
+ Text[ french ] = "T~ype";
+ Text[ spanish ] = "~Tipo";
+ Text[ italian ] = "Tipo";
+ Text[ danish ] = "Type";
+ Text[ swedish ] = "Typ";
+ Text[ polish ] = "Typ";
+ Text[ portuguese_brazilian ] = "Type";
+ Text[ japanese ] = "{̕(~T)";
+ Text[ korean ] = "(~T)";
+ Text[ chinese_simplified ] = "(~T)";
+ Text[ chinese_traditional ] = "(~T)";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "~Tr";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_YEAR
+ {
+ Pos = MAP_APPFONT( FT_POS_RIGHT, 6 );
+ Size = MAP_APPFONT( FTSIZE_LEFT, 10 );
+ Text = "~Jahr";
+ Text[English]= "Year";
+ Text[ english_us ] = "~Year";
+ Text[ portuguese ] = "A~no";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "~Jaar";
+ Text[ french ] = "A~nne";
+ Text[ spanish ] = "~Ao";
+ Text[ italian ] = "Anno";
+ Text[ danish ] = "r";
+ Text[ swedish ] = "r";
+ Text[ polish ] = "Rok";
+ Text[ portuguese_brazilian ] = "Year";
+ Text[ japanese ] = "N(~Y)";
+ Text[ korean ] = "(~Y)";
+ Text[ chinese_simplified ] = "(~Y)";
+ Text[ chinese_traditional ] = "~";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Yl";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_AUTHOR
+ {
+ Pos = MAP_APPFONT( FT_POS, 20 );
+ Size = MAP_APPFONT( FTSIZE_LEFT, 10 );
+ Text = "A~utor";
+ Text[English]= "Author";
+ Text[ english_us ] = "~Author";
+ Text[ portuguese ] = "A~utor";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "~Auteur";
+ Text[ french ] = "A~uteur";
+ Text[ spanish ] = "A~utor";
+ Text[ italian ] = "A~utore";
+ Text[ danish ] = "Forfatter";
+ Text[ swedish ] = "Frfattare";
+ Text[ polish ] = "Autor";
+ Text[ portuguese_brazilian ] = "Author";
+ Text[ japanese ] = "(~A)";
+ Text[ korean ] = "(~A)";
+ Text[ chinese_simplified ] = "(~A)";
+ Text[ chinese_traditional ] = "@(~A)";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Yazar";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_TITLE
+ {
+ Pos = MAP_APPFONT( FT_POS_MIDDLE, 20 );
+ Size = MAP_APPFONT( FTSIZE_LEFT, 10 );
+ Text = "Tite~l";
+ Text[English]= "Title";
+ Text[ english_us ] = "Tit~le";
+ Text[ portuguese ] = "Ttu~lo";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "~Titel";
+ Text[ french ] = "Tit~re";
+ Text[ spanish ] = "Ttu~lo";
+ Text[ italian ] = "Tito~lo";
+ Text[ danish ] = "Titel";
+ Text[ swedish ] = "Titel";
+ Text[ polish ] = "Tytu";
+ Text[ portuguese_brazilian ] = "Title";
+ Text[ japanese ] = "薼(~L)";
+ Text[ korean ] = "(~L)";
+ Text[ chinese_simplified ] = "(~L)";
+ Text[ chinese_traditional ] = "D(~L)";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Balk";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_PUBLISHER
+ {
+ Pos = MAP_APPFONT( FT_POS, 34 );
+ Size = MAP_APPFONT( FTSIZE_LEFT, 10 );
+ Text = "~Verlag";
+ Text[English]= "Publisher";
+ Text[ english_us ] = "~Publisher";
+ Text[ portuguese ] = "~Editora";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "~Uitgeverij";
+ Text[ french ] = "diti~on";
+ Text[ spanish ] = "~Editorial";
+ Text[ italian ] = "Casa editrice";
+ Text[ danish ] = "Forlag";
+ Text[ swedish ] = "Frlag";
+ Text[ polish ] = "Wydawnictwo";
+ Text[ portuguese_brazilian ] = "Publisher";
+ Text[ japanese ] = "oŎЖ(~P)";
+ Text[ korean ] = "ǻ(~P)";
+ Text[ chinese_simplified ] = "(~P)";
+ Text[ chinese_traditional ] = "X(~P)";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Yaynevi";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_ADDRESS
+ {
+ Pos = MAP_APPFONT( FT_POS_MIDDLE, 34 );
+ Size = MAP_APPFONT( FTSIZE_LEFT, 10 );
+ Text = "A~dresse";
+ Text[English]= "Address";
+ Text[ english_us ] = "A~ddress";
+ Text[ portuguese ] = "En~dereo";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "A~dres";
+ Text[ french ] = "A~dresse";
+ Text[ spanish ] = "~Direccin";
+ Text[ italian ] = "Indirizzo";
+ Text[ danish ] = "Adresse";
+ Text[ swedish ] = "Adress";
+ Text[ polish ] = "Adres";
+ Text[ portuguese_brazilian ] = "Address";
+ Text[ japanese ] = "Z(~D)";
+ Text[ korean ] = "ּ(~D)";
+ Text[ chinese_simplified ] = "ַ(~D)";
+ Text[ chinese_traditional ] = "a}(~D)";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Adres";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_ISBN
+ {
+ Pos = MAP_APPFONT( FT_POS_RIGHT, 34 );
+ Size = MAP_APPFONT( FTSIZE_LEFT, 10 );
+ Text = "~ISBN";
+ Text[English]= "ISBN";
+ Text[ english_us ] = "~ISBN";
+ Text[ portuguese ] = "~ISBN";
+ Text[ russian ] = "ISBN";
+ Text[ greek ] = "ISBN";
+ Text[ dutch ] = "~ISBN";
+ Text[ french ] = "~ISBN";
+ Text[ spanish ] = "I~SBN";
+ Text[ italian ] = "~ISBN";
+ Text[ danish ] = "ISBN";
+ Text[ swedish ] = "ISBN";
+ Text[ polish ] = "ISBN";
+ Text[ portuguese_brazilian ] = "ISBN";
+ Text[ japanese ] = "ISBN(~I)";
+ Text[ korean ] = "ISBN(~I)";
+ Text[ chinese_simplified ] = "ISBN(~I)";
+ Text[ chinese_traditional ] = "ISBN(~I)";
+ Text[ arabic ] = "ISBN";
+ Text[ turkish ] = "~ISBN";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_CHAPTER
+ {
+ Pos = MAP_APPFONT( FT_POS, 48 );
+ Size = MAP_APPFONT( FTSIZE_LEFT, 10 );
+ Text = "~Kapitel";
+ Text[English]= "Chapter";
+ Text[ english_us ] = "~Chapter";
+ Text[ portuguese ] = "~Captulo";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "~Hoofdstuk";
+ Text[ french ] = "~Chapitre";
+ Text[ spanish ] = "~Captulo";
+ Text[ italian ] = "Capitolo";
+ Text[ danish ] = "Kapitel";
+ Text[ swedish ] = "Kapitel";
+ Text[ polish ] = "Rozdzia";
+ Text[ portuguese_brazilian ] = "Chapter";
+ Text[ japanese ] = "(~C)";
+ Text[ korean ] = "(~C)";
+ Text[ chinese_simplified ] = "(~C)";
+ Text[ chinese_traditional ] = "(~C)";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Blm";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_PAGE
+ {
+ Pos = MAP_APPFONT( FT_POS_MIDDLE, 48 );
+ Size = MAP_APPFONT( FTSIZE_LEFT, 10 );
+ Text = "Seite~(n)";
+ Text[English]= "Page(s)";
+ Text[ english_us ] = "Pa~ge(s)";
+ Text[ portuguese ] = "P~gina(s)";
+ Text[ russian ] = "()";
+ Text[ greek ] = "/-";
+ Text[ dutch ] = "~Pagina's";
+ Text[ french ] = "~Page(s)";
+ Text[ spanish ] = "~Pgina(s)";
+ Text[ italian ] = "Pagina/e";
+ Text[ danish ] = "Side(r)";
+ Text[ swedish ] = "Sida(-or)";
+ Text[ polish ] = "Strona(y)";
+ Text[ portuguese_brazilian ] = "Page(s)";
+ Text[ japanese ] = "߰ސ(~G)";
+ Text[ korean ] = "(~G)";
+ Text[ chinese_simplified ] = "ҳ(~G)";
+ Text[ chinese_traditional ] = "(~G)";
+ Text[ arabic ] = " ()";
+ Text[ turkish ] = "Sayfa(lar)";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_EDITOR
+ {
+ Pos = MAP_APPFONT( FT_POS, 69 );
+ Size = MAP_APPFONT( FTSIZE_LEFT, 10 );
+ Text = "~Herausgeber";
+ Text[English]= "Editor";
+ Text[ english_us ] = "Editor";
+ Text[ portuguese ] = "Edi~tor";
+ Text[ russian ] = " ";
+ Text[ greek ] = "~";
+ Text[ dutch ] = "Uit~gever";
+ Text[ french ] = "diteu~r";
+ Text[ spanish ] = "~Editor";
+ Text[ italian ] = "Editore";
+ Text[ danish ] = "Udgiver";
+ Text[ swedish ] = "Utgivare";
+ Text[ polish ] = "Wydawca";
+ Text[ portuguese_brazilian ] = "Editor";
+ Text[ japanese ] = "Ҏ";
+ Text[ korean ] = "";
+ Text[ chinese_simplified ] = "";
+ Text[ chinese_traditional ] = "XH";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Yayma hazrlayan";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_EDITION
+ {
+ Pos = MAP_APPFONT( FT_POS_MIDDLE, 67 );
+ Size = MAP_APPFONT( FTSIZE_LEFT, 10 );
+ Text = "Aus~gabe";
+ Text[English]= "Edition";
+ Text[ english_us ] = "Ed~ition";
+ Text[ portuguese ] = "~Edio";
+ Text[ russian ] = "";
+ Text[ greek ] = "~";
+ Text[ dutch ] = "E~ditie";
+ Text[ french ] = "~dition";
+ Text[ spanish ] = "~Edicin";
+ Text[ italian ] = "Edizione";
+ Text[ danish ] = "Udgave";
+ Text[ swedish ] = "Utgva";
+ Text[ polish ] = "Wydanie";
+ Text[ portuguese_brazilian ] = "Edition";
+ Text[ japanese ] = "(~I)";
+ Text[ korean ] = "(~I)";
+ Text[ chinese_simplified ] = "汾(~I)";
+ Text[ chinese_traditional ] = "(~I)";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Yaym";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_BOOKTITLE
+ {
+ Pos = MAP_APPFONT( FT_POS, 83 );
+ Size = MAP_APPFONT( FTSIZE_LEFT, 10 );
+ Text = "Bu~chtitel";
+ Text[English]= "Book title";
+ Text[ english_us ] = "~Book title";
+ Text[ portuguese ] = "~Ttulo do livro";
+ Text[ russian ] = " ";
+ Text[ greek ] = " ";
+ Text[ dutch ] = "Bo~ektitel";
+ Text[ french ] = "~Titre du livre";
+ Text[ spanish ] = "~Ttulo del libro";
+ Text[ italian ] = "Titolo libro";
+ Text[ danish ] = "Bogtitel";
+ Text[ swedish ] = "Boktitel";
+ Text[ polish ] = "Tytu ksiki";
+ Text[ portuguese_brazilian ] = "Book title";
+ Text[ japanese ] = "(~B)";
+ Text[ korean ] = "å (~B)";
+ Text[ chinese_simplified ] = "鼮(~B)";
+ Text[ chinese_traditional ] = "ѦW(~B)";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Kitap ad";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_VOLUME
+ {
+ Pos = MAP_APPFONT( FT_POS_MIDDLE, 83 );
+ Size = MAP_APPFONT( FTSIZE_LEFT, 10 );
+ Text = "Buch Nummer";
+ Text[English]= "Volume";
+ Text[ english_us ] = "Volume";
+ Text[ portuguese ] = "Volume";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Deel nummer";
+ Text[ french ] = "Volume";
+ Text[ spanish ] = "Tomo";
+ Text[ italian ] = "Numero libro";
+ Text[ danish ] = "Bind";
+ Text[ swedish ] = "Volym";
+ Text[ polish ] = "Tom";
+ Text[ portuguese_brazilian ] = "Volume";
+ Text[ japanese ] = "";
+ Text[ korean ] = "";
+ Text[ chinese_simplified ] = "鼮";
+ Text[ chinese_traditional ] = "Ѹ";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Kitap no.";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_HOWPUBLISHED
+ {
+ Pos = MAP_APPFONT( FT_POS_RIGHT, 83 );
+ Size = MAP_APPFONT( FTSIZE_LEFT, 10 );
+ Text = "Au~sgabeart";
+ Text[English]= "How published";
+ Text[ english_us ] = "Publication t~ype";
+ Text[ portuguese ] = "Ti~po de publicao";
+ Text[ russian ] = " ";
+ Text[ greek ] = "~ ";
+ Text[ dutch ] = "Wijze van ~publiceren";
+ Text[ french ] = "Mode de ~publication";
+ Text[ spanish ] = "Tip~o de publicacin";
+ Text[ italian ] = "Tipo di edizione";
+ Text[ danish ] = "Udgivelsestype";
+ Text[ swedish ] = "Utgivningstyp";
+ Text[ polish ] = "Rodzaj publikacji";
+ Text[ portuguese_brazilian ] = "How published";
+ Text[ japanese ] = "ް(~Y)";
+ Text[ korean ] = "(~Y)";
+ Text[ chinese_simplified ] = "зʽ(~Y)";
+ Text[ chinese_traditional ] = "(~Y)";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Yaym tr";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_ORGANIZATION
+ {
+ Pos = MAP_APPFONT( FT_POS, 97 );
+ Size = MAP_APPFONT( FTSIZE_LEFT, 10 );
+ Text = "~Organisation";
+ Text[English]= "Organization";
+ Text[ english_us ] = "Organi~zation";
+ Text[ portuguese ] = "~Organizao";
+ Text[ russian ] = "";
+ Text[ greek ] = "~";
+ Text[ dutch ] = "~Organisatie";
+ Text[ french ] = "Or~ganisation";
+ Text[ spanish ] = "~Organizacin";
+ Text[ italian ] = "~Organizzazione";
+ Text[ danish ] = "Organisation";
+ Text[ swedish ] = "Organisation";
+ Text[ polish ] = "Organizacja";
+ Text[ portuguese_brazilian ] = "Organization";
+ Text[ japanese ] = "gDc(~Z)";
+ Text[ korean ] = "(~Z)";
+ Text[ chinese_simplified ] = "֯(~Z)";
+ Text[ chinese_traditional ] = "´(~Z)";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Organizasyon";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_INSTITUTION
+ {
+ Pos = MAP_APPFONT( FT_POS_MIDDLE, 97 );
+ Size = MAP_APPFONT( FTSIZE_LEFT, 10 );
+ Text = "~Institution";
+ Text[English]= "Institution";
+ Text[ english_us ] = "Instit~ution";
+ Text[ portuguese ] = "~Instituio";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "~Instelling";
+ Text[ french ] = "~Institution";
+ Text[ spanish ] = "I~nstitucin";
+ Text[ italian ] = "~Istituzione";
+ Text[ danish ] = "Institution";
+ Text[ swedish ] = "Institution";
+ Text[ polish ] = "Instytucja";
+ Text[ portuguese_brazilian ] = "Institution";
+ Text[ japanese ] = "@(~U)";
+ Text[ korean ] = "(~U)";
+ Text[ chinese_simplified ] = "(~U)";
+ Text[ chinese_traditional ] = "(~U)";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Kurum";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_SCHOOL
+ {
+ Pos = MAP_APPFONT( FT_POS_RIGHT, 97 );
+ Size = MAP_APPFONT( FTSIZE_LEFT, 10 );
+ Text = "Universit~t/Hochschule";
+ Text[English]= "University";
+ Text[ english_us ] = "Unive~rsity";
+ Text[ portuguese ] = "~Universidade/Escola Sup.";
+ Text[ russian ] = "";
+ Text[ greek ] = ".../...";
+ Text[ dutch ] = "~Universeit/Hogeschool";
+ Text[ french ] = "~Universit/cole suprieure";
+ Text[ spanish ] = "~Universidad";
+ Text[ italian ] = "Universit";
+ Text[ danish ] = "Universitet/lreanstalt";
+ Text[ swedish ] = "Universitet/hgskola";
+ Text[ polish ] = "Uniwersytet/Szkoa wysza";
+ Text[ portuguese_brazilian ] = "University";
+ Text[ japanese ] = "w(~R)";
+ Text[ korean ] = "б(~R)";
+ Text[ chinese_simplified ] = "ѧ(~R)";
+ Text[ chinese_traditional ] = "|(~R)";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "niversite/yksek okul";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_REPORT
+ {
+ Pos = MAP_APPFONT( FT_POS, 111);
+ Size = MAP_APPFONT( FTSIZE_LEFT, 10 );
+ Text = "Re~port";
+ Text[English]= "Report";
+ Text[ english_us ] = "Re~port";
+ Text[ portuguese ] = "~Relatrio";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "~Reportage";
+ Text[ french ] = "Rapport";
+ Text[ spanish ] = "I~nforme";
+ Text[ italian ] = "Relazione";
+ Text[ danish ] = "Rapport";
+ Text[ swedish ] = "Rapport";
+ Text[ polish ] = "Raport";
+ Text[ portuguese_brazilian ] = "Report";
+ Text[ japanese ] = "߰(~P)";
+ Text[ korean ] = "Ʈ(~P)";
+ Text[ chinese_simplified ] = "(~P)";
+ Text[ chinese_traditional ] = "i(~P)";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Rapor";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_MONTH
+ {
+ Pos = MAP_APPFONT( FT_POS_MIDDLE, 111 );
+ Size = MAP_APPFONT( FTSIZE_LEFT, 10 );
+ Text = "~Monat";
+ Text[English]= "Month";
+ Text[ english_us ] = "~Month";
+ Text[ portuguese ] = "~Ms";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "~Maand";
+ Text[ french ] = "~Mois";
+ Text[ spanish ] = "~Mes";
+ Text[ italian ] = "~Mese";
+ Text[ danish ] = "Mned";
+ Text[ swedish ] = "Mnad";
+ Text[ polish ] = "Miesic";
+ Text[ portuguese_brazilian ] = "Month";
+ Text[ japanese ] = "(~M)";
+ Text[ korean ] = "(~M)";
+ Text[ chinese_simplified ] = "(~M)";
+ Text[ chinese_traditional ] = "(~M)";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Ay";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_JOURNAL
+ {
+ Pos = MAP_APPFONT( FT_POS, 132 );
+ Size = MAP_APPFONT( FTSIZE_LEFT, 10 );
+ Text = "Zeitschri~ft";
+ Text[English]= "Journal";
+ Text[ english_us ] = "~Journal";
+ Text[ portuguese ] = "~Revista";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "~Tijdschrift";
+ Text[ french ] = "~Journal";
+ Text[ spanish ] = "~Revista";
+ Text[ italian ] = "Rivista";
+ Text[ danish ] = "Tidsskrift";
+ Text[ swedish ] = "Tidskrift";
+ Text[ polish ] = "Czasopismo";
+ Text[ portuguese_brazilian ] = "Journal";
+ Text[ japanese ] = "G(~J)";
+ Text[ korean ] = "(~J)";
+ Text[ chinese_simplified ] = "־(~J)";
+ Text[ chinese_traditional ] = "x(~J)";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Dergi";
+ Text[ language_user1 ] = " ";
+ };
+
+ FixedText FT_NUMBER
+ {
+ Pos = MAP_APPFONT( FT_POS_MIDDLE, 132 );
+ Size = MAP_APPFONT( FTSIZE_LEFT, 10 );
+ Text = "Numm~er";
+ Text[English]= "Number";
+ Text[ english_us ] = "Numb~er";
+ Text[ portuguese ] = "Nm~ero";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "~Nummer";
+ Text[ french ] = "Nu~mro";
+ Text[ spanish ] = "~Nmero";
+ Text[ italian ] = "Num~ero";
+ Text[ danish ] = "Nummer";
+ Text[ swedish ] = "Nummer";
+ Text[ polish ] = "Numer";
+ Text[ portuguese_brazilian ] = "Number";
+ Text[ japanese ] = "ԍ(~E)";
+ Text[ korean ] = "ȣ(~E)";
+ Text[ chinese_simplified ] = "(~E)";
+ Text[ chinese_traditional ] = "(~E)";
+ Text[ arabic ] = "";
+ Text[ language_user1 ] = "\"Say\" burada istisna (dergi iin)";
+ Text[ turkish ] = "Say";
+ };
+ FixedText FT_SERIES
+ {
+ Pos = MAP_APPFONT( FT_POS_RIGHT, 132 );
+ Size = MAP_APPFONT( FTSIZE_LEFT, 10 );
+ Text = "Ser~ie";
+ Text[English]= "Series";
+ Text[ english_us ] = "Se~ries";
+ Text[ portuguese ] = "~Srie";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "~Serie";
+ Text[ french ] = "Sr~ie";
+ Text[ spanish ] = "~Serie";
+ Text[ italian ] = "Ser~ie";
+ Text[ danish ] = "Serie";
+ Text[ swedish ] = "Serie";
+ Text[ polish ] = "Seria";
+ Text[ portuguese_brazilian ] = "Series";
+ Text[ japanese ] = "p(~R)";
+ Text[ korean ] = "ø(~R)";
+ Text[ chinese_simplified ] = "ϵ(~R)";
+ Text[ chinese_traditional ] = "tC(~R)";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Dizi";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_ANNOTE
+ {
+ Pos = MAP_APPFONT( FT_POS, 146 );
+ Size = MAP_APPFONT( FTSIZE_LEFT, 10 );
+ Text = "A~nmerkung";
+ Text[English]= "Annotation";
+ Text[ english_us ] = "Ann~otation";
+ Text[ portuguese ] = "A~notaes";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "~Commentaar";
+ Text[ french ] = "Ann~otation";
+ Text[ spanish ] = "A~notacin";
+ Text[ italian ] = "A~nnotazione";
+ Text[ danish ] = "Anmrkning";
+ Text[ swedish ] = "Anmrkning";
+ Text[ polish ] = "Adnotacja";
+ Text[ portuguese_brazilian ] = "Annotation";
+ Text[ japanese ] = "l(~O)";
+ Text[ korean ] = "ּ(~O)";
+ Text[ chinese_simplified ] = "˵(~O)";
+ Text[ chinese_traditional ] = "ƪ`(~O)";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Aklama";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_NOTE
+ {
+ Pos = MAP_APPFONT( FT_POS_MIDDLE, 146 );
+ Size = MAP_APPFONT( FTSIZE_LEFT, 10 );
+ Text = "Noti~z";
+ Text[English]= "Note";
+ Text[ english_us ] = "~Note";
+ Text[ portuguese ] = "~Anotao";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "~Aantekening";
+ Text[ french ] = "N~ote";
+ Text[ spanish ] = "~Nota";
+ Text[ italian ] = "Nota";
+ Text[ danish ] = "Note";
+ Text[ swedish ] = "Anteckning";
+ Text[ polish ] = "Notatka";
+ Text[ portuguese_brazilian ] = "Note";
+ Text[ japanese ] = "(~N)";
+ Text[ korean ] = "޸(~N)";
+ Text[ chinese_simplified ] = "ע(~N)";
+ Text[ chinese_traditional ] = "O(~N)";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Not";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_URL
+ {
+ Pos = MAP_APPFONT( FT_POS_RIGHT, 146 );
+ Size = MAP_APPFONT( FTSIZE_LEFT, 10 );
+ Text = "URL";
+ Text[English]= "URL";
+ Text[ english_us ] = "URL";
+ Text[ portuguese ] = "URL";
+ Text[ russian ] = "URL";
+ Text[ greek ] = "URL";
+ Text[ dutch ] = "URL";
+ Text[ french ] = "URL";
+ Text[ spanish ] = "URL";
+ Text[ italian ] = "URL";
+ Text[ danish ] = "URL";
+ Text[ swedish ] = "URL";
+ Text[ polish ] = "URL";
+ Text[ portuguese_brazilian ] = "URL";
+ Text[ japanese ] = "URL";
+ Text[ korean ] = "URL";
+ Text[ chinese_simplified ] = "URL";
+ Text[ chinese_traditional ] = "URL";
+ Text[ arabic ] = "URL";
+ Text[ turkish ] = "URL";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_CUSTOM1
+ {
+ Pos = MAP_APPFONT( FT_POS, 167 );
+ Size = MAP_APPFONT( FTSIZE_LEFT, 10 );
+ Text = "Benutzerfeld ~1";
+ Text[English]= "Custom field 1";
+ Text[ english_us ] = "User-defined field ~1";
+ Text[ portuguese ] = "Campo personalizado ~1";
+ Text[ russian ] = " 1";
+ Text[ greek ] = " 1";
+ Text[ dutch ] = "Gebruikerveld ~1";
+ Text[ french ] = "Champ d'utilisateur ~1";
+ Text[ spanish ] = "Campo de usuario ~1";
+ Text[ italian ] = "Campo utente ~1";
+ Text[ danish ] = "Brugerdefineret ~1";
+ Text[ swedish ] = "Anvndarflt 1";
+ Text[ polish ] = "Pole uytkownika ~1";
+ Text[ portuguese_brazilian ] = "Custom field 1";
+ Text[ japanese ] = "հް̨ 1";
+ Text[ korean ] = "ʵ1(~ 1)";
+ Text[ chinese_simplified ] = "û 1";
+ Text[ chinese_traditional ] = "ۭq ~1";
+ Text[ arabic ] = " 1";
+ Text[ turkish ] = "Kullanc alan ~1";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_CUSTOM2
+ {
+ Pos = MAP_APPFONT( FT_POS_MIDDLE, 167 );
+ Size = MAP_APPFONT( FTSIZE_LEFT, 10 );
+ Text = "Benutzerfeld ~2";
+ Text[English]= "Custom field 2";
+ Text[ english_us ] = "User-defined field ~2";
+ Text[ portuguese ] = "Campo personalizado ~2";
+ Text[ russian ] = " 2";
+ Text[ greek ] = " 2";
+ Text[ dutch ] = "Gebruikerveld ~2";
+ Text[ french ] = "Champ d'utilisateur ~2";
+ Text[ spanish ] = "Campo de usuario ~2";
+ Text[ italian ] = "Campo utente ~2";
+ Text[ danish ] = "Brugerdefineret ~2";
+ Text[ swedish ] = "Anvndarflt 2";
+ Text[ polish ] = "Pole uytkownika ~2";
+ Text[ portuguese_brazilian ] = "Custom field 2";
+ Text[ japanese ] = "հް̨ 2";
+ Text[ korean ] = "ʵ 2(~2)";
+ Text[ chinese_simplified ] = "û 2";
+ Text[ chinese_traditional ] = "ۭq ~2";
+ Text[ arabic ] = " 2";
+ Text[ turkish ] = "Kullanc alan ~2";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_CUSTOM3
+ {
+ Pos = MAP_APPFONT( FT_POS_RIGHT, 167 );
+ Size = MAP_APPFONT( FTSIZE_LEFT, 10 );
+ Text = "Benutzerfeld ~3";
+ Text[English]= "Custom field 3";
+ Text[ english_us ] = "User-defined field ~3";
+ Text[ portuguese ] = "Campo personalizado ~3";
+ Text[ russian ] = " 3";
+ Text[ greek ] = " 3";
+ Text[ dutch ] = "Gebruikerveld ~3";
+ Text[ french ] = "Champ d'utilisateur ~3";
+ Text[ spanish ] = "Campo de usuario ~3";
+ Text[ italian ] = "Campo utente ~3";
+ Text[ danish ] = "Brugerdefineret ~3";
+ Text[ swedish ] = "Anvndarflt 3";
+ Text[ polish ] = "Pole uytkownika ~3";
+ Text[ portuguese_brazilian ] = "Custom field 3";
+ Text[ japanese ] = "հް̨ 3";
+ Text[ korean ] = "ʵ 3(~3)";
+ Text[ chinese_simplified ] = "û 3";
+ Text[ chinese_traditional ] = "ۭq ~3";
+ Text[ arabic ] = " 3";
+ Text[ turkish ] = "Kullanc alan ~3";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_CUSTOM4
+ {
+ Pos = MAP_APPFONT( FT_POS, 181 );
+ Size = MAP_APPFONT( FTSIZE_LEFT, 10 );
+ Text = "Benutzerfeld ~4";
+ Text[English]= "Custom field 4";
+ Text[ english_us ] = "User-defined field ~4";
+ Text[ portuguese ] = "Campo personalizado ~4";
+ Text[ russian ] = " 4";
+ Text[ greek ] = " 4";
+ Text[ dutch ] = "Gebruikerveld ~4";
+ Text[ french ] = "Champ d'utilisateur ~4";
+ Text[ spanish ] = "Campo de usuario ~4";
+ Text[ italian ] = "Campo utente ~4";
+ Text[ danish ] = "Brugerdefineret ~4";
+ Text[ swedish ] = "Anvndarflt 4";
+ Text[ polish ] = "Pole uytkownika ~4";
+ Text[ portuguese_brazilian ] = "Custom field 4";
+ Text[ japanese ] = "հް̨ 4";
+ Text[ korean ] = "ʵ 4(~4)";
+ Text[ chinese_simplified ] = "û 4";
+ Text[ chinese_traditional ] = "ۭq ~4";
+ Text[ arabic ] = " 4";
+ Text[ turkish ] = "Kullanc alan ~4";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_CUSTOM5
+ {
+ Pos = MAP_APPFONT( FT_POS_MIDDLE, 181 );
+ Size = MAP_APPFONT( FTSIZE_LEFT, 10 );
+ Text = "Benutzerfeld ~5";
+ Text[English]= "Custom field 5";
+ Text[ english_us ] = "User-defined field ~5";
+ Text[ portuguese ] = "Campo personalizado ~5";
+ Text[ russian ] = " 5";
+ Text[ greek ] = " 5";
+ Text[ dutch ] = "Gebruikerveld ~5";
+ Text[ french ] = "Champ d'utilisateur ~5";
+ Text[ spanish ] = "Campo de usuario ~5";
+ Text[ italian ] = "Campo utente ~5";
+ Text[ danish ] = "Brugerdefineret ~5";
+ Text[ swedish ] = "Anvndarflt 5";
+ Text[ polish ] = "Pole uytkownika ~5";
+ Text[ portuguese_brazilian ] = "Custom field 5";
+ Text[ japanese ] = "հް̨ 5";
+ Text[ korean ] = "ʵ 5(~5)";
+ Text[ chinese_simplified ] = "û 5";
+ Text[ chinese_traditional ] = "ۭq ~5";
+ Text[ arabic ] = " 5";
+ Text[ turkish ] = "Kullanc alan ~5";
+ Text[ language_user1 ] = " ";
+ };
+ String ST_ERROR_PREFIX
+ {
+ Text = "Die folgenden Spaltennamen konnten nicht zugeordnet werden:\n" ;
+ Text [ English ] = "The following column names could not be assigned:\n" ;
+ Text[ english_us ] = "The following column names could not be assigned:\n";
+ Text[ portuguese ] = "Foi impossvel atribuir os seguintes nomes de coluna:\n";
+ Text[ russian ] = " :\n";
+ Text[ greek ] = " :\n";
+ Text[ dutch ] = "De volgende kolomnaam kon niet worden toegewezen:\n";
+ Text[ french ] = "Impossible d'assigner les noms de colonnes :\n";
+ Text[ spanish ] = "No se pudieron asignar los siguientes nombres de columnas:\n";
+ Text[ italian ] = "Non stato possibile assegnare i nomi seguenti delle colonne:\n";
+ Text[ danish ] = "Det var ikke muligt at tildele de flgende kolonnenavne:\n";
+ Text[ swedish ] = "Fljande kolumnnamn kunde inte tilldelas:\n";
+ Text[ polish ] = "Nie mona byo przypisa nastpujcej nazwy kolumny:\n";
+ Text[ portuguese_brazilian ] = "The following column names could not be assigned:\n";
+ Text[ japanese ] = "ȉ̗񖼂͕ނł܂ł:\n";
+ Text[ korean ] = " ܸĪ ϴ :\n";
+ Text[ chinese_simplified ] = "޷ƣ\n";
+ Text[ chinese_traditional ] = "LkwUCWG\n";
+ Text[ arabic ] = " :\n";
+ Text[ turkish ] = "u stun adlar atanamad:\n";
+ };
+ String ST_TYPE_ARTICLE
+ {
+ Text = "Artikel" ;
+ Text [ English ] = "Article" ;
+ Text[ english_us ] = "Article";
+ Text[ portuguese ] = "Artigo";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Artikel";
+ Text[ french ] = "Article";
+ Text[ spanish ] = "Artculo";
+ Text[ italian ] = "Articolo";
+ Text[ danish ] = "Artikel";
+ Text[ swedish ] = "Artikel";
+ Text[ polish ] = "Artyku";
+ Text[ portuguese_brazilian ] = "Article";
+ Text[ japanese ] = "è";
+ Text[ korean ] = "׸";
+ Text[ chinese_simplified ] = "";
+ Text[ chinese_traditional ] = "峹";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Makale";
+ Text[ language_user1 ] = " ";
+ };
+ String ST_TYPE_BOOK
+ {
+ Text = "Buch" ;
+ Text [ English ] = "Book" ;
+ Text[ english_us ] = "Book";
+ Text[ portuguese ] = "Livro";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Boek";
+ Text[ french ] = "Livre";
+ Text[ spanish ] = "Libro";
+ Text[ italian ] = "Libro";
+ Text[ danish ] = "Bog";
+ Text[ swedish ] = "Bok";
+ Text[ polish ] = "Ksika";
+ Text[ portuguese_brazilian ] = "Book";
+ Text[ japanese ] = "{";
+ Text[ korean ] = "å";
+ Text[ chinese_simplified ] = "鼮";
+ Text[ chinese_traditional ] = "y";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Kitap";
+ Text[ language_user1 ] = " ";
+ };
+ String ST_TYPE_BOOKLET
+ {
+ Text = "Broschre" ;
+ Text [ English ] = "Booklet" ;
+ Text[ english_us ] = "Brochures";
+ Text[ portuguese ] = "Brochura";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Brochure";
+ Text[ french ] = "Brochure";
+ Text[ spanish ] = "Folleto";
+ Text[ italian ] = "Dpliant";
+ Text[ danish ] = "Brochure";
+ Text[ swedish ] = "Broschyr";
+ Text[ polish ] = "Broszura";
+ Text[ portuguese_brazilian ] = "Booklet";
+ Text[ japanese ] = "گ";
+ Text[ korean ] = "ȳå";
+ Text[ chinese_simplified ] = "С";
+ Text[ chinese_traditional ] = "pU";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Bror";
+ Text[ language_user1 ] = " ";
+ };
+ String ST_TYPE_CONFERENCE
+ {
+ Text = "Konferenzbericht" ;
+ Text [ English ] = "Conference report" ;
+ Text[ english_us ] = "Conference report";
+ Text[ portuguese ] = "Relatrio sobre conferncia";
+ Text[ russian ] = " ";
+ Text[ greek ] = " ";
+ Text[ dutch ] = "Conferentiebericht";
+ Text[ french ] = "Rapport de confrence";
+ Text[ spanish ] = "Informe de conferencia";
+ Text[ italian ] = "Rapporto sulla conferenza";
+ Text[ danish ] = "Konferencerapport";
+ Text[ swedish ] = "Konferensrapport";
+ Text[ polish ] = "Sprawozdanie z konferencji";
+ Text[ portuguese_brazilian ] = "Conference report";
+ Text[ japanese ] = "c";
+ Text[ korean ] = "ȸǺ";
+ Text[ chinese_simplified ] = "ۻᱨ";
+ Text[ chinese_traditional ] = "|ͳi";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Toplant tutana";
+ Text[ language_user1 ] = " ";
+ };
+ String ST_TYPE_INBOOK
+ {
+ Text = "Buchauszug" ;
+ Text [ English ] = "Book excerpt" ;
+ Text[ english_us ] = "Book excerpt";
+ Text[ portuguese ] = "Excerto de livro";
+ Text[ russian ] = " ";
+ Text[ greek ] = " ";
+ Text[ dutch ] = "Uittreksel";
+ Text[ french ] = "Extrait de livre";
+ Text[ spanish ] = "Extracto de libro";
+ Text[ italian ] = "Brano";
+ Text[ danish ] = "Boguddrag";
+ Text[ swedish ] = "Bokutdrag";
+ Text[ polish ] = "Wycig z ksiki";
+ Text[ portuguese_brazilian ] = "Book excerpt";
+ Text[ japanese ] = "{̔";
+ Text[ korean ] = "å ";
+ Text[ chinese_simplified ] = "鼮ժ¼";
+ Text[ chinese_traditional ] = "y峹Kn";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Kitap zeti";
+ Text[ language_user1 ] = " ";
+ };
+ String ST_TYPE_INCOLLECTION
+ {
+ Text = "Buchauszug mit Titel" ;
+ Text [ English ] = "Book excerpt with title" ;
+ Text[ english_us ] = "Book excerpt with title";
+ Text[ portuguese ] = "Excerto de livro com ttulo";
+ Text[ russian ] = " ";
+ Text[ greek ] = " ";
+ Text[ dutch ] = "Uittreksel met titel";
+ Text[ french ] = "Extrait de livre avec titre";
+ Text[ spanish ] = "Extracto de libro con ttulo";
+ Text[ italian ] = "Brano con titolo";
+ Text[ danish ] = "Boguddrag med titel";
+ Text[ swedish ] = "Bokutdrag med titel";
+ Text[ polish ] = "Wycig z ksiki z tytuem";
+ Text[ portuguese_brazilian ] = "Book excerpt with title";
+ Text[ japanese ] = "{̔itj";
+ Text[ korean ] = " ִ å ";
+ Text[ chinese_simplified ] = "ע鼮ժ¼";
+ Text[ chinese_traditional ] = "tDy峹Kn";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Balkl kitap zeti";
+ Text[ language_user1 ] = " ";
+ };
+ String ST_TYPE_INPROCEEDINGS
+ {
+ Text = "Tagungsbericht" ;
+ Text [ English ] = "Conference proceedings";
+ Text[ english_us ] = "Conference proceedings";
+ Text[ portuguese ] = "Relatrio de congresso";
+ Text[ russian ] = " ";
+ Text[ greek ] = " ";
+ Text[ dutch ] = "Conferentiebericht";
+ Text[ french ] = "Rapport de congrs";
+ Text[ spanish ] = "Informe de congreso";
+ Text[ italian ] = "Rapporto sulla conferenza";
+ Text[ danish ] = "Kongresberetning";
+ Text[ swedish ] = "Konferensrapport";
+ Text[ polish ] = "Sprawozdanie z obrady";
+ Text[ portuguese_brazilian ] = "Conference proceedings";
+ Text[ japanese ] = "";
+ Text[ korean ] = "ȸǷ";
+ Text[ chinese_simplified ] = "鱨";
+ Text[ chinese_traditional ] = "|iji";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Konferans raporu";
+ Text[ language_user1 ] = " ";
+ };
+ String ST_TYPE_JOURNAL
+ {
+ Text = "Zeitschrift" ;
+ Text [ English ] = "Journal" ;
+ Text[ english_us ] = "Journal";
+ Text[ portuguese ] = "Revista";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Tijdschrift";
+ Text[ french ] = "Revue";
+ Text[ spanish ] = "Revista";
+ Text[ italian ] = "Rivista";
+ Text[ danish ] = "Tidsskrift";
+ Text[ swedish ] = "Tidskrift";
+ Text[ polish ] = "Czasopismo";
+ Text[ portuguese_brazilian ] = "Journal";
+ Text[ japanese ] = "G";
+ Text[ korean ] = "";
+ Text[ chinese_simplified ] = "־";
+ Text[ chinese_traditional ] = "x";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Dergi";
+ Text[ language_user1 ] = " ";
+ };
+ String ST_TYPE_MANUAL
+ {
+ Text = "Techn. Dokumentation" ;
+ Text [ English ] = "Manual" ;
+ Text[ english_us ] = "Manual";
+ Text[ portuguese ] = "Documentao tcnica";
+ Text[ russian ] = " ";
+ Text[ greek ] = "E";
+ Text[ dutch ] = "Techn. documentatie";
+ Text[ french ] = "Documentation technique";
+ Text[ spanish ] = "Documentacin tcnica";
+ Text[ italian ] = "Documentazione tec.";
+ Text[ danish ] = "Teknisk dokumentation";
+ Text[ swedish ] = "Manual";
+ Text[ polish ] = "Dokumentacja techn.";
+ Text[ portuguese_brazilian ] = "Manual";
+ Text[ japanese ] = "ƭ";
+ Text[ korean ] = "Ŵ";
+ Text[ chinese_simplified ] = "";
+ Text[ chinese_traditional ] = "޳N";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Teknik dokmantasyon";
+ Text[ language_user1 ] = " ";
+ };
+ String ST_TYPE_MASTERSTHESIS
+ {
+ Text = "Diplomarbeit" ;
+ Text [ English ] = "Thesis" ;
+ Text[ english_us ] = "Thesis";
+ Text[ portuguese ] = "Tese";
+ Text[ russian ] = " ";
+ Text[ greek ] = " ";
+ Text[ dutch ] = "Scriptie";
+ Text[ french ] = "Mmoire";
+ Text[ spanish ] = "Trabajo de diplomatura";
+ Text[ italian ] = "Tesi di laurea";
+ Text[ danish ] = "Eksamensopgave";
+ Text[ swedish ] = "Examensarbete";
+ Text[ polish ] = "Praca dyplomowa";
+ Text[ portuguese_brazilian ] = "Thesis";
+ Text[ japanese ] = "Ƙ_";
+ Text[ korean ] = "";
+ Text[ chinese_simplified ] = "ѧҵ";
+ Text[ chinese_traditional ] = "~פ";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Tez";
+ Text[ language_user1 ] = " ";
+ };
+ String ST_TYPE_MISC
+ {
+ Text = "Verschiedenes" ;
+ Text [ ENGLISH ] = "Miscellaneous" ;
+ Text[ english_us ] = "Miscellaneous";
+ Text[ portuguese ] = "Miscelnea";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Diverse";
+ Text[ french ] = "Divers";
+ Text[ spanish ] = "Diversos";
+ Text[ italian ] = "Varie";
+ Text[ danish ] = "Forskelligt";
+ Text[ swedish ] = "Diverse";
+ Text[ polish ] = "Rne";
+ Text[ portuguese_brazilian ] = "Miscellaneous";
+ Text[ japanese ] = "l";
+ Text[ korean ] = " ";
+ Text[ chinese_simplified ] = "";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Dier";
+ Text[ language_user1 ] = " ";
+ };
+ String ST_TYPE_PHDTHESIS
+ {
+ Text = "Dissertation" ;
+ Text [ ENGLISH ] = "Dissertation";
+ Text[ english_us ] = "Dissertation";
+ Text[ portuguese ] = "Dissertao";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Dissertatie";
+ Text[ french ] = "Thse de doctorat";
+ Text[ spanish ] = "Tesis doctoral";
+ Text[ italian ] = "Dottorato di ricerca";
+ Text[ danish ] = "Doktorafhandling";
+ Text[ swedish ] = "Avhandling";
+ Text[ polish ] = "Praca doktorska";
+ Text[ portuguese_brazilian ] = "Dissertation";
+ Text[ japanese ] = "m_";
+ Text[ korean ] = "ڻ";
+ Text[ chinese_simplified ] = "ʿ";
+ Text[ chinese_traditional ] = "դhפ";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Disertasyon";
+ Text[ language_user1 ] = " ";
+ };
+ String ST_TYPE_PROCEEDINGS
+ {
+ Text = "Tagungsbericht" ;
+ Text [ English ] = "Conference proceedings";
+ Text[ english_us ] = "Conference proceedings";
+ Text[ portuguese ] = "Relatrio de congresso";
+ Text[ russian ] = " ";
+ Text[ greek ] = " ";
+ Text[ dutch ] = "Conferentiebericht";
+ Text[ french ] = "Rapport de congrs";
+ Text[ spanish ] = "Informe de congreso";
+ Text[ italian ] = "Rapporto sulla conferenza";
+ Text[ danish ] = "Kongresberetning";
+ Text[ swedish ] = "Konferensrapport";
+ Text[ polish ] = "Sprawozdanie z obrady";
+ Text[ portuguese_brazilian ] = "Conference proceedings";
+ Text[ japanese ] = "";
+ Text[ korean ] = "ȸǷ";
+ Text[ chinese_simplified ] = "鱨";
+ Text[ chinese_traditional ] = "|iji";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Konferans raporu";
+ Text[ language_user1 ] = " ";
+ };
+ String ST_TYPE_TECHREPORT
+ {
+ Text = "Forschungsbericht" ;
+ Text [ English ] = "Research report";
+ Text[ english_us ] = "Research report";
+ Text[ portuguese ] = "Relatrio de investigao";
+ Text[ russian ] = " ";
+ Text[ greek ] = " ";
+ Text[ dutch ] = "Onderzoeksbericht";
+ Text[ french ] = "Rapport de recherche";
+ Text[ spanish ] = "Informe de investigacin";
+ Text[ italian ] = "Rapporto di ricerca";
+ Text[ danish ] = "Forskningsrapport";
+ Text[ swedish ] = "Forskningsrapport";
+ Text[ polish ] = "Sprawozdanie z badania naukow.";
+ Text[ portuguese_brazilian ] = "Research report";
+ Text[ japanese ] = "";
+ Text[ korean ] = "";
+ Text[ chinese_simplified ] = "б";
+ Text[ chinese_traditional ] = "si";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Aratrma raporu";
+ Text[ language_user1 ] = " ";
+ };
+ String ST_TYPE_UNPUBLISHED
+ {
+ Text = "Unverffentlicht" ;
+ Text [ ENGLISH ] = "Unpublished" ;
+ Text[ english_us ] = "Unpublished";
+ Text[ portuguese ] = "Indito";
+ Text[ russian ] = " ";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Niet gepubliceerd";
+ Text[ french ] = "Non publi";
+ Text[ spanish ] = "Indito";
+ Text[ italian ] = "Non pubblicato";
+ Text[ danish ] = "Ikke offentliggjort";
+ Text[ swedish ] = "Opublicerad";
+ Text[ polish ] = "Nieopublikowane";
+ Text[ portuguese_brazilian ] = "Unpublished";
+ Text[ japanese ] = "\\";
+ Text[ korean ] = "";
+ Text[ chinese_simplified ] = "δ";
+ Text[ chinese_traditional ] = "|o";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Yaymlanmam";
+ Text[ language_user1 ] = " ";
+ };
+ String ST_TYPE_EMAIL
+ {
+ Text = "e-Mail" ;
+ Text [ English ] = "e-mail" ;
+ Text[ english_us ] = "e-mail";
+ Text[ portuguese ] = "e-mail";
+ Text[ russian ] = "e-mail";
+ Text[ greek ] = "e-mail";
+ Text[ dutch ] = "e-mail";
+ Text[ french ] = "E-mail";
+ Text[ spanish ] = "Mensaje electrnico";
+ Text[ italian ] = "eMail";
+ Text[ danish ] = "E-mail";
+ Text[ swedish ] = "e-post";
+ Text[ polish ] = "e-mail";
+ Text[ portuguese_brazilian ] = "e-mail";
+ Text[ japanese ] = "E-mail";
+ Text[ korean ] = "ڿ";
+ Text[ chinese_simplified ] = "ʼ";
+ Text[ chinese_traditional ] = "qll";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "e-posta";
+ Text[ language_user1 ] = " ";
+ };
+ String ST_TYPE_WWW
+ {
+ Text = "WWW-Dokument" ;
+ Text [ ENGLISH ] = "WWW document" ;
+ Text[ english_us ] = "WWW document";
+ Text[ portuguese ] = "Documento WWW";
+ Text[ russian ] = " WWW";
+ Text[ greek ] = " WWW";
+ Text[ dutch ] = "WWW document";
+ Text[ french ] = "Document WWW";
+ Text[ spanish ] = "Documento WWW";
+ Text[ italian ] = "Documento Web";
+ Text[ danish ] = "WWW-dokument";
+ Text[ swedish ] = "WWW-dokument";
+ Text[ polish ] = "Dokument WWW";
+ Text[ portuguese_brazilian ] = "WWW document";
+ Text[ japanese ] = "WWW ޷";
+ Text[ korean ] = "WWW ";
+ Text[ chinese_simplified ] = "άĵ";
+ Text[ chinese_traditional ] = "WWW ";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "WWW belgesi";
+ Text[ language_user1 ] = " ";
+ };
+ String ST_TYPE_CUSTOM1
+ {
+ Text = "Benutzertyp1" ;
+ Text [ English ] = "User-defined1";
+ Text[ english_us ] = "User-defined1";
+ Text[ portuguese ] = "Tipo personalizado1";
+ Text[ russian ] = " 1";
+ Text[ greek ] = " 1";
+ Text[ dutch ] = "Gebruikerstype1";
+ Text[ french ] = "Utilisateur1";
+ Text[ spanish ] = "Definido por usuario 1";
+ Text[ italian ] = "Utente1";
+ Text[ danish ] = "Brugerdefineret1";
+ Text[ swedish ] = "Anvndartyp1";
+ Text[ polish ] = "Typ uytkownika1";
+ Text[ portuguese_brazilian ] = "User-defined1";
+ Text[ japanese ] = "հް 1";
+ Text[ korean ] = "1";
+ Text[ chinese_simplified ] = "û1";
+ Text[ chinese_traditional ] = "ۭq 1";
+ Text[ arabic ] = " 1";
+ Text[ turkish ] = "Kullanc tanml1";
+ Text[ language_user1 ] = " ";
+ };
+ String ST_TYPE_CUSTOM2
+ {
+ Text = "Benutzertyp2" ;
+ Text [ English ] = "User-defined2";
+ Text[ english_us ] = "User-defined2";
+ Text[ portuguese ] = "Tipo personalizado2";
+ Text[ russian ] = " 2";
+ Text[ greek ] = " 2";
+ Text[ dutch ] = "Gebruikerstype2";
+ Text[ french ] = "Utilisateur2";
+ Text[ spanish ] = "Definido por usuario 2";
+ Text[ italian ] = "Utente2";
+ Text[ danish ] = "Brugerdefineret2";
+ Text[ swedish ] = "Anvndartyp2";
+ Text[ polish ] = "Typ uytkownika2";
+ Text[ portuguese_brazilian ] = "User-defined2";
+ Text[ japanese ] = "ϲ2";
+ Text[ korean ] = "2";
+ Text[ chinese_simplified ] = "û2";
+ Text[ chinese_traditional ] = "ۭq 2";
+ Text[ arabic ] = " 2";
+ Text[ turkish ] = "Kullanc tanml2";
+ Text[ language_user1 ] = " ";
+ };
+ String ST_TYPE_CUSTOM3
+ {
+ Text = "Benutzertyp3" ;
+ Text [ English ] = "User-defined3";
+ Text[ english_us ] = "User-defined3";
+ Text[ portuguese ] = "Tipo personalizado3";
+ Text[ russian ] = " 3";
+ Text[ greek ] = " 3";
+ Text[ dutch ] = "Gebruikerstype3";
+ Text[ french ] = "Utilisateur3";
+ Text[ spanish ] = "Definido por usuario 3";
+ Text[ italian ] = "Utente3";
+ Text[ danish ] = "Brugerdefineret3";
+ Text[ swedish ] = "Anvndartyp3";
+ Text[ polish ] = "Typ uytkownika3";
+ Text[ portuguese_brazilian ] = "User-defined3";
+ Text[ japanese ] = "ϲ3";
+ Text[ korean ] = "3";
+ Text[ chinese_simplified ] = "û 3";
+ Text[ chinese_traditional ] = "ۭq 3";
+ Text[ arabic ] = " 3";
+ Text[ turkish ] = "Kullanc tanml3";
+ Text[ language_user1 ] = " ";
+ };
+ String ST_TYPE_CUSTOM4
+ {
+ Text = "Benutzertyp4" ;
+ Text [ English ] = "User-defined4";
+ Text[ english_us ] = "User-defined4";
+ Text[ portuguese ] = "Tipo personalizado4";
+ Text[ russian ] = " 4";
+ Text[ greek ] = " 4";
+ Text[ dutch ] = "Gebruikerstype4";
+ Text[ french ] = "Utilisateur4";
+ Text[ spanish ] = "Definido por usuario 4";
+ Text[ italian ] = "Utente4";
+ Text[ danish ] = "Brugerdefineret4";
+ Text[ swedish ] = "Anvndartyp4";
+ Text[ polish ] = "Typ uytkownika4";
+ Text[ portuguese_brazilian ] = "User-defined4";
+ Text[ japanese ] = "ϲ4";
+ Text[ korean ] = "4";
+ Text[ chinese_simplified ] = "û 4";
+ Text[ chinese_traditional ] = "ۭq 4";
+ Text[ arabic ] = " 4";
+ Text[ turkish ] = "Kullanc tanml4";
+ Text[ language_user1 ] = " ";
+ };
+ String ST_TYPE_CUSTOM5
+ {
+ Text = "Benutzertyp5" ;
+ Text [ English ] = "User-defined5";
+ Text[ english_us ] = "User-defined5";
+ Text[ portuguese ] = "Tipo personalizado5";
+ Text[ russian ] = " 5";
+ Text[ greek ] = " 5";
+ Text[ dutch ] = "Gebruikerstype5";
+ Text[ french ] = "Utilisateur5";
+ Text[ spanish ] = "Definido por usuario 5";
+ Text[ italian ] = "Utente5";
+ Text[ danish ] = "Brugerdefineret5";
+ Text[ swedish ] = "Anvndartyp5";
+ Text[ polish ] = "Typ uytkownika5";
+ Text[ portuguese_brazilian ] = "User-defined5";
+ Text[ japanese ] = "ϲ5";
+ Text[ korean ] = "5";
+ Text[ chinese_simplified ] = "û 5";
+ Text[ chinese_traditional ] = "ۭq 5";
+ Text[ arabic ] = " 5";
+ Text[ turkish ] = "Kullanc tanml5";
+ Text[ language_user1 ] = " ";
+ };
+ Text[ english_us ] = "General";
+ Text[ portuguese ] = "Geral";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Algemeen";
+ Text[ french ] = "Gnral";
+ Text[ spanish ] = "General";
+ Text[ italian ] = "Generale";
+ Text[ danish ] = "Generel";
+ Text[ swedish ] = "Allmn";
+ Text[ polish ] = "Oglne";
+ Text[ portuguese_brazilian ] = "General";
+ Text[ japanese ] = "S";
+ Text[ korean ] = "Ϲ";
+ Text[ chinese_simplified ] = "";
+ Text[ chinese_traditional ] = "@";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Genel";
+ Text[ language_user1 ] = " ";
+};
+Menu RID_POPUP_ME_VIEW
+{
+ ItemList =
+ {
+ MenuItem
+ {
+ Text = "Abschnitt einfgen..." ;
+ Text [ English ] = "Insert Section..." ;
+ Identifier = PU_INSERT;
+ Text[ english_us ] = "Insert Section...";
+ Text[ portuguese ] = "Inserir seco...";
+ Text[ russian ] = " ...";
+ Text[ greek ] = " ...";
+ Text[ dutch ] = "Sectie invoegen...";
+ Text[ french ] = "Insrer une section...";
+ Text[ spanish ] = "Insertar seccin...";
+ Text[ italian ] = "Inserisci sezione...";
+ Text[ danish ] = "Indst sektion...";
+ Text[ swedish ] = "Infoga avsnitt...";
+ Text[ polish ] = "Wstaw sekcj...";
+ Text[ portuguese_brazilian ] = "Insert Section...";
+ Text[ japanese ] = "ڂ̑}...";
+ Text[ korean ] = " ...";
+ Text[ chinese_simplified ] = "...";
+ Text[ chinese_traditional ] = "Jq...";
+ Text[ arabic ] = " ...";
+ Text[ turkish ] = "Blm ekle...";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Text = "Abschnitt lschen..." ;
+ Text [ English ] = "Remove Section..." ;
+ Identifier = PU_REMOVE;
+ Text[ english_us ] = "Delete Section...";
+ Text[ portuguese ] = "Eliminar seco...";
+ Text[ russian ] = " ...";
+ Text[ greek ] = " ...";
+ Text[ dutch ] = "Sectie wissen...";
+ Text[ french ] = "Supprimer une section...";
+ Text[ spanish ] = "Eliminar seccin...";
+ Text[ italian ] = "Elimina sezione...";
+ Text[ danish ] = "Slet sektion...";
+ Text[ swedish ] = "Radera avsnitt...";
+ Text[ polish ] = "Usu sekcj...";
+ Text[ portuguese_brazilian ] = "Remove Section...";
+ Text[ japanese ] = "ڂ̍폜...";
+ Text[ korean ] = " ...";
+ Text[ chinese_simplified ] = "ɾ...";
+ Text[ chinese_traditional ] = "Rq...";
+ Text[ arabic ] = " ...";
+ Text[ turkish ] = "Blm sil...";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Text = "Namen ndern..." ;
+ Text [ English ] = "Remove Address..." ;
+ Identifier = PU_CHG_NAME;
+ Text[ english_us ] = "Modify Name...";
+ Text[ portuguese ] = "Modificar nome...";
+ Text[ russian ] = " ...";
+ Text[ greek ] = " ...";
+ Text[ dutch ] = "Adres wissen...";
+ Text[ french ] = "Corriger un nom...";
+ Text[ spanish ] = "Modificar nombre...";
+ Text[ italian ] = "Cambia indirizzo...";
+ Text[ danish ] = "Modificer navn...";
+ Text[ swedish ] = "ndra namn...";
+ Text[ polish ] = "Modyfikuj nazw...";
+ Text[ portuguese_brazilian ] = "Remove Address...";
+ Text[ japanese ] = "O̕ύX...";
+ Text[ korean ] = "ּ ...";
+ Text[ chinese_simplified ] = "...";
+ Text[ chinese_traditional ] = "ܧW...";
+ Text[ arabic ] = " ...";
+ Text[ turkish ] = "Ad deitir...";
+ Text[ language_user1 ] = " ";
+ };
+ };
+};
diff --git a/extensions/source/bibliography/toolbar.cxx b/extensions/source/bibliography/toolbar.cxx
new file mode 100644
index 000000000000..5f026ea18ab5
--- /dev/null
+++ b/extensions/source/bibliography/toolbar.cxx
@@ -0,0 +1,566 @@
+/*************************************************************************
+ *
+ * $RCSfile: toolbar.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:16:45 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include <osl/mutex.hxx>
+#include <tools/urlobj.hxx>
+#ifndef _UNOTOOLS_PROCESSFACTORY_HXX_
+#include <unotools/processfactory.hxx>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XDISPATCH_HPP_
+#include <com/sun/star/frame/XDispatch.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XDISPATCHPROVIDER_HPP_
+#include <com/sun/star/frame/XDispatchProvider.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_XURLTRANSFORMER_HPP_
+#include <com/sun/star/util/XURLTransformer.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_FRAMESEARCHFLAG_HPP_
+#include <com/sun/star/frame/FrameSearchFlag.hpp>
+#endif
+
+
+#include <svtools/iniprop.hxx>
+#include <svtools/iniman.hxx>
+
+#ifndef _TOOLS_DEBUG_HXX //autogen wg. DBG_ASSERT
+#include <tools/debug.hxx>
+#endif
+
+#include "bibbeam.hxx"
+#include "toolbar.hrc"
+#include "bibresid.hxx"
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::beans;
+#define C2U(cChar) OUString::createFromAscii(cChar)
+
+
+// Konstanten -------------------------------------------------------------
+
+
+BibToolBarListener::BibToolBarListener(BibToolBar *pTB,rtl::OUString aStr,sal_uInt16 nId):
+ pToolBar(pTB),
+ nIndex(nId),
+ aCommand(aStr)
+{
+}
+
+BibToolBarListener::~BibToolBarListener()
+{
+}
+
+void BibToolBarListener::statusChanged(const ::com::sun::star::frame::FeatureStateEvent& rEvt)throw( ::com::sun::star::uno::RuntimeException )
+{
+ if(rEvt.FeatureURL.Complete == aCommand)
+ {
+ pToolBar->EnableItem(nIndex,rEvt.IsEnabled);
+
+ ::com::sun::star::uno::Any aState=rEvt.State;
+ if(aState.getValueType()==::getBooleanCppuType())
+ {
+ sal_Bool bChecked= *(sal_Bool*)aState.getValue();
+ pToolBar->CheckItem(nIndex, bChecked);
+ }
+
+ /*
+ rtl::OUString FeatureDescriptor;
+ sal_Bool Requery;
+ ::com::sun::star::uno::Any State;*/
+ }
+};
+
+sal_uInt16 BibToolBarListener::GetIndex()
+{
+ return nIndex;
+}
+void BibToolBarListener::SetIndex(sal_uInt16 nId)
+{
+ nIndex=nId;
+}
+
+rtl::OUString BibToolBarListener::GetCommand()
+{
+ return aCommand;
+}
+void BibToolBarListener::SetCommand(const rtl::OUString& aStr)
+{
+ aCommand=aStr;
+}
+
+BibTBListBoxListener::BibTBListBoxListener(BibToolBar *pTB,rtl::OUString aStr,sal_uInt16 nId):
+ BibToolBarListener(pTB,aStr,nId)
+{
+}
+
+BibTBListBoxListener::~BibTBListBoxListener()
+{
+}
+
+void BibTBListBoxListener::statusChanged(const ::com::sun::star::frame::FeatureStateEvent& rEvt)throw( ::com::sun::star::uno::RuntimeException )
+{
+ if(rEvt.FeatureURL.Complete == GetCommand())
+ {
+ pToolBar->EnableSourceList(rEvt.IsEnabled);
+
+ Any aState = rEvt.State;
+ if(aState.getValueType() == ::getCppuType((Sequence<rtl::OUString>*)0))
+ {
+ pToolBar->UpdateSourceList(sal_False);
+ pToolBar->ClearSourceList();
+
+ Sequence<rtl::OUString>* pStringSeq = (Sequence<rtl::OUString>*)aState.getValue();
+ const rtl::OUString* pStringArray = (const rtl::OUString*)pStringSeq->getConstArray();
+
+ sal_uInt32 nCount = pStringSeq->getLength();
+ XubString aEntry;
+ for( sal_uInt32 i=0; i<nCount; i++ )
+ {
+ aEntry = String(pStringArray[i]);
+ pToolBar->InsertSourceEntry(aEntry);
+ }
+ pToolBar->UpdateSourceList(sal_True);
+ }
+
+ XubString aStr = String(rEvt.FeatureDescriptor);
+ pToolBar->SelectSourceEntry(aStr);
+ }
+};
+
+BibTBQueryMenuListener::BibTBQueryMenuListener(BibToolBar *pTB,rtl::OUString aStr,sal_uInt16 nId):
+ BibToolBarListener(pTB,aStr,nId)
+{
+}
+
+BibTBQueryMenuListener::~BibTBQueryMenuListener()
+{
+}
+
+void BibTBQueryMenuListener::statusChanged(const frame::FeatureStateEvent& rEvt)throw( uno::RuntimeException )
+{
+ if(rEvt.FeatureURL.Complete == GetCommand())
+ {
+ pToolBar->EnableSourceList(rEvt.IsEnabled);
+
+ uno::Any aState=rEvt.State;
+ if(aState.getValueType()==::getCppuType((Sequence<rtl::OUString>*)0))
+ {
+ pToolBar->ClearFilterMenu();
+
+ Sequence<rtl::OUString>* pStringSeq = (Sequence<rtl::OUString>*) aState.getValue();
+ const rtl::OUString* pStringArray = (const rtl::OUString*)pStringSeq->getConstArray();
+
+ sal_uInt32 nCount = pStringSeq->getLength();
+ for( sal_uInt32 i=0; i<nCount; i++ )
+ {
+ sal_uInt16 nID=pToolBar->InsertFilterItem(String(pStringArray[i]));
+ if(pStringArray[i]==rEvt.FeatureDescriptor)
+ {
+// XubString aStr = rEvt.FeatureDescriptor;
+ pToolBar->SelectFilterItem(nID);
+ }
+ }
+ }
+ }
+};
+
+BibTBEditListener::BibTBEditListener(BibToolBar *pTB,rtl::OUString aStr,sal_uInt16 nId):
+ BibToolBarListener(pTB,aStr,nId)
+{
+}
+
+BibTBEditListener::~BibTBEditListener()
+{
+}
+
+void BibTBEditListener::statusChanged(const frame::FeatureStateEvent& rEvt)throw( uno::RuntimeException )
+{
+ if(rEvt.FeatureURL.Complete == GetCommand())
+ {
+ pToolBar->EnableQuery(rEvt.IsEnabled);
+
+ uno::Any aState=rEvt.State;
+ if(aState.getValueType()==::getCppuType((const OUString*)0))
+ {
+ String aStr = String(*(OUString*) aState.getValue());
+ pToolBar->SetQueryString(aStr);
+ }
+ }
+}
+
+SV_IMPL_PTRARR( BibToolBarListenerArr, BibToolBarListenerPtr);
+
+BibToolBar::BibToolBar(Window* pParent, WinBits nStyle):
+ ToolBox(pParent,BibResId(RID_BIB_TOOLBAR)),
+ aFtSource(this,WB_VCENTER),
+ aLBSource(this,WB_DROPDOWN),
+ aFtQuery(this,WB_VCENTER),
+ aEdQuery(this),
+ nSelMenuItem(0),
+ nMenuId(0)
+{
+ SetStyle(GetStyle()|nStyle);
+ SetOutStyle(TOOLBOX_STYLE_FLAT);
+ Size aSize=GetSizePixel();
+ Size a2Size(GetOutputSizePixel());
+ a2Size.Width()=100;
+ aLBSource.SetSizePixel(a2Size);
+ aLBSource.SetDropDownLineCount(9);
+ aLBSource.Show();
+ aLBSource.SetSelectHdl(LINK( this, BibToolBar, SelHdl));
+
+ aTimer.SetTimeoutHdl(LINK( this, BibToolBar, SendSelHdl));
+ aTimer.SetTimeout(400);
+
+ aMenuTimer.SetTimeoutHdl(LINK( this, BibToolBar, MenuHdl));
+ aMenuTimer.SetTimeout(300);
+
+ aEdQuery.SetSizePixel(aLBSource.GetSizePixel());
+ aEdQuery.Show();
+
+ XubString aStr=GetItemText(TBC_FT_SOURCE);
+ Rectangle aRect=GetItemRect(TBC_FT_SOURCE);
+ aFtSource.SetText(aStr);
+ aFtSource.SetSizePixel(aRect.GetSize());
+
+ aStr=GetItemText(TBC_FT_QUERY);
+ aRect=GetItemRect(TBC_FT_QUERY);
+ aFtQuery.SetText(aStr);
+ aFtQuery.SetSizePixel(aRect.GetSize());
+
+ SetItemWindow(TBC_FT_SOURCE,&aFtSource);
+ SetItemWindow(TBC_LB_SOURCE,&aLBSource);
+ SetItemWindow(TBC_FT_QUERY ,&aFtQuery);
+ SetItemWindow(TBC_ED_QUERY ,&aEdQuery);
+
+
+}
+
+BibToolBar::~BibToolBar()
+{
+}
+void BibToolBar::InitListener()
+{
+ sal_uInt16 nCount=GetItemCount();
+
+ uno::Reference< lang::XMultiServiceFactory > xMgr = utl::getProcessServiceFactory();
+ uno::Reference< frame::XDispatch > xDisp(xController,UNO_QUERY);
+
+ uno::Reference< util::XURLTransformer > xTrans ( xMgr->createInstance( C2U("com.sun.star.util.URLTransformer") ), UNO_QUERY );
+ if( xTrans.is() )
+ {
+ util::URL aQueryURL;
+ aQueryURL.Complete = C2U(".uno:Bib/MenuFilter");
+ xTrans->parseStrict( aQueryURL);
+ BibToolBarListener* pQuery=new BibTBQueryMenuListener(this,aQueryURL.Complete,TBC_BT_AUTOFILTER);
+ xDisp->addStatusListener(uno::Reference< frame::XStatusListener > (pQuery),aQueryURL);
+
+ for(sal_uInt16 nPos=0;nPos<nCount;nPos++)
+ {
+ sal_uInt16 nId=GetItemId(nPos);
+ if(nId==TBC_FT_SOURCE || nId==TBC_FT_QUERY) continue;
+
+ util::URL aURL;
+ aURL.Complete = GetItemCommand(nId);
+
+ xTrans->parseStrict( aURL );
+
+ BibToolBarListener* pListener=NULL;
+ if(nId==TBC_LB_SOURCE)
+ {
+ pListener=new BibTBListBoxListener(this,aURL.Complete,nId);
+ }
+ else if(nId==TBC_ED_QUERY)
+ {
+ pListener=new BibTBEditListener(this,aURL.Complete,nId);
+ }
+ else
+ {
+ pListener=new BibToolBarListener(this,aURL.Complete,nId);
+ }
+
+ BibToolBarListenerPtr pxInsert = new Reference<frame::XStatusListener>;
+ (*pxInsert) = pListener;
+ aListenerArr.Insert( pxInsert, aListenerArr.Count() );
+ xDisp->addStatusListener(uno::Reference< frame::XStatusListener > (pListener),aURL);
+ }
+ }
+}
+
+void BibToolBar::SetXController(const uno::Reference< frame::XController > & xCtr)
+{
+ xController=xCtr;
+ InitListener();
+
+}
+
+void BibToolBar::Select()
+{
+ sal_uInt16 nId=GetCurItemId();
+
+ if(nId!=TBC_BT_AUTOFILTER)
+ {
+ SendDispatch(nId,Sequence<PropertyValue>() );
+ }
+ else
+ {
+ Sequence<PropertyValue> aPropVal(2);
+ PropertyValue* pPropertyVal = (PropertyValue*)aPropVal.getConstArray();
+ pPropertyVal[0].Name=C2U("QueryText");
+ rtl::OUString aSelection = aEdQuery.GetText();
+ pPropertyVal[0].Value <<= aSelection;
+
+ pPropertyVal[1].Name=C2U("QueryField");
+ pPropertyVal[1].Value <<= aQueryField;
+ SendDispatch(nId,aPropVal);
+ }
+}
+
+void BibToolBar::SendDispatch(sal_uInt16 nId, const Sequence< PropertyValue >& rArgs)
+{
+ rtl::OUString aCommand = GetItemCommand(nId);
+
+ uno::Reference< frame::XDispatchProvider > xDSP( xController, UNO_QUERY );
+
+ if( xDSP.is() && aCommand.len())
+ {
+ uno::Reference< lang::XMultiServiceFactory > xMgr = utl::getProcessServiceFactory();
+
+ uno::Reference< util::XURLTransformer > xTrans ( xMgr->createInstance( C2U("com.sun.star.util.URLTransformer") ), UNO_QUERY );
+ if( xTrans.is() )
+ {
+ // Datei laden
+ util::URL aURL;
+ aURL.Complete = aCommand;
+
+ xTrans->parseStrict( aURL );
+
+ uno::Reference< frame::XDispatch > xDisp = xDSP->queryDispatch( aURL, rtl::OUString(), frame::FrameSearchFlag::SELF );
+
+ if ( xDisp.is() )
+ xDisp->dispatch( aURL, rArgs);
+ }
+ }
+
+}
+
+void BibToolBar::Click()
+{
+ sal_uInt16 nId=GetCurItemId();
+
+ if(nId==TBC_BT_AUTOFILTER)
+ {
+ aMenuTimer.Start();
+ }
+}
+
+void BibToolBar::ClearFilterMenu()
+{
+ aPopupMenu.Clear();
+ nMenuId=0;
+}
+sal_uInt16 BibToolBar::InsertFilterItem(const XubString& aMenuEntry)
+{
+ nMenuId++;
+ aPopupMenu.InsertItem(nMenuId,aMenuEntry);
+
+ return nMenuId;
+}
+void BibToolBar::SelectFilterItem(sal_uInt16 nId)
+{
+ aPopupMenu.CheckItem(nId);
+ nSelMenuItem=nId;
+ aQueryField = aPopupMenu.GetItemText(nId).EraseAllChars( '~' );
+}
+
+void BibToolBar::EnableSourceList(sal_Bool bFlag)
+{
+ aFtSource.Enable(bFlag);
+ aLBSource.Enable(bFlag);
+}
+
+void BibToolBar::ClearSourceList()
+{
+ aLBSource.Clear();
+}
+
+void BibToolBar::UpdateSourceList(sal_Bool bFlag)
+{
+ aLBSource.SetUpdateMode(bFlag);
+}
+
+void BibToolBar::InsertSourceEntry(const XubString& aEntry, sal_uInt16 nPos)
+{
+ aLBSource.InsertEntry(aEntry, nPos);
+}
+
+void BibToolBar::SelectSourceEntry(const XubString& aStr)
+{
+ aLBSource.SelectEntry(aStr);
+}
+
+void BibToolBar::EnableQuery(sal_Bool bFlag)
+{
+ aFtQuery.Enable(bFlag);
+ aEdQuery.Enable(bFlag);
+}
+
+void BibToolBar::SetQueryString(const XubString& aStr)
+{
+ aEdQuery.SetText(aStr);
+}
+
+
+long BibToolBar::PreNotify( NotifyEvent& rNEvt )
+{
+ long nResult=sal_True;
+
+ sal_uInt16 nSwitch=rNEvt.GetType();
+ if(aEdQuery.HasFocus() && nSwitch==EVENT_KEYINPUT)// || nSwitch==EVENT_KEYUP)
+ {
+ const KeyCode& aKeyCode=rNEvt.GetKeyEvent()->GetKeyCode();
+ sal_uInt16 nKey = aKeyCode.GetCode();
+ if(nKey == KEY_RETURN)
+ {
+ Sequence<PropertyValue> aPropVal(2);
+ PropertyValue* pPropertyVal = (PropertyValue*)aPropVal.getConstArray();
+ pPropertyVal[0].Name = C2U("QueryText");
+ rtl::OUString aSelection = aEdQuery.GetText();
+ pPropertyVal[0].Value <<= aSelection;
+ pPropertyVal[1].Name=C2U("QueryField");
+ pPropertyVal[1].Value <<= aQueryField;
+ SendDispatch(TBC_BT_AUTOFILTER,aPropVal);
+ return nResult;
+ }
+
+ }
+
+ nResult=ToolBox::PreNotify(rNEvt);
+
+ return nResult;
+}
+
+IMPL_LINK( BibToolBar, SelHdl, ListBox*, pLb )
+{
+ aTimer.Start();
+ return 0;
+}
+
+IMPL_LINK( BibToolBar, SendSelHdl, Timer*,pT)
+{
+ Sequence<PropertyValue> aPropVal(1);
+ PropertyValue* pPropertyVal = (PropertyValue*)aPropVal.getConstArray();
+ pPropertyVal[0].Name = C2U("DataSourceName");
+ String aEntry( aLBSource.GetSelectEntry().EraseAllChars( '~' ) );
+ rtl::OUString aSelection = aEntry;
+ pPropertyVal[0].Value <<= aSelection;
+ SendDispatch(TBC_LB_SOURCE,aPropVal);
+
+ return 0;
+}
+//-----------------------------------------------------------------------------
+IMPL_LINK( BibToolBar, MenuHdl, Timer*,pT)
+{
+ if(IsItemDown(TBC_BT_AUTOFILTER))
+ {
+ EndSelection(); // vor SetDropMode (SetDropMode ruft SetItemImage)
+
+ SetItemDown(TBC_BT_AUTOFILTER,sal_True);
+ sal_uInt16 nId = aPopupMenu.Execute(this, GetItemRect(TBC_BT_AUTOFILTER));
+
+
+ if(nId>0)
+ {
+ aPopupMenu.CheckItem(nSelMenuItem,sal_False);
+ aPopupMenu.CheckItem(nId);
+ nSelMenuItem=nId;
+ aQueryField = aPopupMenu.GetItemText(nId).EraseAllChars( '~' );
+ Sequence<PropertyValue> aPropVal(2);
+ PropertyValue* pPropertyVal = (PropertyValue*)aPropVal.getConstArray();
+ pPropertyVal[0].Name = C2U("QueryText");
+ rtl::OUString aSelection = aEdQuery.GetText();
+ pPropertyVal[0].Value <<= aSelection;
+ pPropertyVal[1].Name=C2U("QueryField");
+ pPropertyVal[1].Value <<= aQueryField;
+ SendDispatch(TBC_BT_AUTOFILTER,aPropVal);
+ }
+
+ Point aPoint;
+ MouseEvent aLeave( aPoint, 0, MOUSE_LEAVEWINDOW | MOUSE_SYNTHETIC );
+ MouseMove( aLeave );
+ SetItemDown(TBC_BT_AUTOFILTER,sal_False);
+
+
+ }
+ return 0;
+}
+//-----------------------------------------------------------------------------
+void BibToolBar::statusChanged(const frame::FeatureStateEvent& rEvent)
+ throw( uno::RuntimeException )
+{
+ for(sal_uInt16 i = 0; i < aListenerArr.Count(); i++)
+ {
+ BibToolBarListenerPtr pListener = aListenerArr.GetObject(i);
+ (*pListener)->statusChanged(rEvent);
+ }
+}
diff --git a/extensions/source/bibliography/toolbar.hrc b/extensions/source/bibliography/toolbar.hrc
new file mode 100644
index 000000000000..95596b4ed7fd
--- /dev/null
+++ b/extensions/source/bibliography/toolbar.hrc
@@ -0,0 +1,77 @@
+/*************************************************************************
+ *
+ * $RCSfile: toolbar.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:16:45 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#include "bib.hrc"
+
+#define TBC_FT_SOURCE 1
+#define TBC_LB_SOURCE 2
+#define TBC_FT_QUERY 3
+#define TBC_ED_QUERY 4
+#define TBC_BT_AUTOFILTER 5
+#define TBC_BT_FILTERCRIT 6
+#define TBC_BT_REMOVEFILTER 7
+#define TBC_BT_NEWCARD 8
+#define TBC_BT_EDITCARD 9
+#define TBC_BT_REMOVECARD 10
+#define TBC_BT_INSERT 11
+#define TBC_BT_UPDATE 12
+#define TBC_BT_MAIL 13
+#define TBC_BT_URL 14
+
diff --git a/extensions/source/bibliography/toolbar.hxx b/extensions/source/bibliography/toolbar.hxx
new file mode 100644
index 000000000000..223a73ba1c05
--- /dev/null
+++ b/extensions/source/bibliography/toolbar.hxx
@@ -0,0 +1,234 @@
+/*************************************************************************
+ *
+ * $RCSfile: toolbar.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:16:45 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _BIB_TOOLBAR_HXX
+#define _BIB_TOOLBAR_HXX
+
+#ifndef _COM_SUN_STAR_FRAME_XCONTROLLER_HPP_
+#include <com/sun/star/frame/XController.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XSTATUSLISTENER_HPP_
+#include <com/sun/star/frame/XStatusListener.hpp>
+#endif
+
+
+
+#ifndef _SV_TOOLBOX_HXX //autogen wg. ToolBox
+#include <vcl/toolbox.hxx>
+#endif
+
+#ifndef _SV_LSTBOX_HXX //autogen wg. ::com::sun::star::form
+#include <vcl/lstbox.hxx>
+#endif
+
+#ifndef _SV_EDIT_HXX //autogen wg. Edit
+#include <vcl/edit.hxx>
+#endif
+
+#ifndef _SV_FIXED_HXX //autogen wg. FixedText
+#include <vcl/fixed.hxx>
+#endif
+
+#ifndef _SVARRAY_HXX
+#include <svtools/svarray.hxx>
+#endif
+
+#ifndef _SV_TIMER_HXX //autogen wg. Timer
+#include <vcl/timer.hxx>
+#endif
+#ifndef _CPPUHELPER_IMPLBASE1_HXX_
+#include <cppuhelper/implbase1.hxx> // helper for implementations
+#endif
+
+
+class BibToolBar;
+
+class BibToolBarListener: public cppu::WeakImplHelper1 < ::com::sun::star::frame::XStatusListener>
+{
+private:
+
+ sal_uInt16 nIndex;
+ rtl::OUString aCommand;
+
+protected:
+
+ BibToolBar *pToolBar;
+
+public:
+
+ BibToolBarListener(BibToolBar *pTB,rtl::OUString aStr,sal_uInt16 nId);
+ ~BibToolBarListener();
+
+ rtl::OUString GetCommand();
+ void SetCommand(const rtl::OUString& aStr);
+
+ sal_uInt16 GetIndex();
+ void SetIndex(sal_uInt16 nIndex);
+
+ // ::com::sun::star::lang::XEventListener
+ // we do not hold References to dispatches, so there is nothing to do on disposal
+ virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source)
+ throw( ::com::sun::star::uno::RuntimeException ){};
+
+ // ::com::sun::star::frame::XStatusListener
+ virtual void SAL_CALL statusChanged(const ::com::sun::star::frame::FeatureStateEvent& Event)
+ throw( ::com::sun::star::uno::RuntimeException );
+
+};
+
+class BibTBListBoxListener: public BibToolBarListener
+{
+public:
+
+ BibTBListBoxListener(BibToolBar *pTB,rtl::OUString aStr,sal_uInt16 nId);
+ ~BibTBListBoxListener();
+
+ virtual void SAL_CALL statusChanged(const ::com::sun::star::frame::FeatureStateEvent& Event)
+ throw( ::com::sun::star::uno::RuntimeException );
+
+};
+
+class BibTBEditListener: public BibToolBarListener
+{
+public:
+
+ BibTBEditListener(BibToolBar *pTB,rtl::OUString aStr,sal_uInt16 nId);
+ ~BibTBEditListener();
+
+ virtual void SAL_CALL statusChanged(const ::com::sun::star::frame::FeatureStateEvent& Event)
+ throw( ::com::sun::star::uno::RuntimeException );
+
+};
+
+class BibTBQueryMenuListener: public BibToolBarListener
+{
+public:
+
+ BibTBQueryMenuListener(BibToolBar *pTB,rtl::OUString aStr,sal_uInt16 nId);
+ ~BibTBQueryMenuListener();
+
+ virtual void SAL_CALL statusChanged(const ::com::sun::star::frame::FeatureStateEvent& Event)
+ throw( ::com::sun::star::uno::RuntimeException );
+
+};
+
+
+typedef ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener>* BibToolBarListenerPtr;
+SV_DECL_PTRARR_DEL( BibToolBarListenerArr, BibToolBarListenerPtr, 4, 4 );
+
+class BibToolBar: public ToolBox
+{
+ private:
+
+ BibToolBarListenerArr aListenerArr;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController > xController;
+ Timer aTimer;
+ Timer aMenuTimer;
+
+ FixedText aFtSource;
+ ListBox aLBSource;
+ FixedText aFtQuery;
+ Edit aEdQuery;
+ PopupMenu aPopupMenu;
+ sal_uInt16 nMenuId;
+ sal_uInt16 nSelMenuItem;
+ rtl::OUString aQueryField;
+ DECL_LINK( SelHdl, ListBox* );
+ DECL_LINK( SendSelHdl, Timer* );
+ DECL_LINK( MenuHdl, Timer* );
+
+ protected:
+
+ void InitListener();
+ virtual void Select();
+ virtual void Click();
+ void SendDispatch(sal_uInt16 nId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rArgs);
+ long PreNotify( NotifyEvent& rNEvt );
+
+
+ public:
+
+ BibToolBar(Window* pParent, WinBits nStyle = 0 );
+ ~BibToolBar();
+
+ void SetXController(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController > &);
+
+ void ClearSourceList();
+ void UpdateSourceList(sal_Bool bFlag=sal_True);
+ void EnableSourceList(sal_Bool bFlag=sal_True);
+ void InsertSourceEntry(const XubString&,sal_uInt16 nPos=LISTBOX_APPEND );
+ void SelectSourceEntry(const XubString& );
+
+ void EnableQuery(sal_Bool bFlag=sal_True);
+ void SetQueryString(const XubString& );
+
+ void ClearFilterMenu();
+ sal_uInt16 InsertFilterItem(const XubString& );
+ void SelectFilterItem(sal_uInt16 nId);
+
+ void statusChanged(const ::com::sun::star::frame::FeatureStateEvent& Event)
+ throw( ::com::sun::star::uno::RuntimeException );
+};
+
+
+
+
+#endif
diff --git a/extensions/source/bibliography/toolbar.src b/extensions/source/bibliography/toolbar.src
new file mode 100644
index 000000000000..3b7fa7a8b975
--- /dev/null
+++ b/extensions/source/bibliography/toolbar.src
@@ -0,0 +1,421 @@
+/*************************************************************************
+ *
+ * $RCSfile: toolbar.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:16:45 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#include <offmgr/sba.hrc>
+#include "extensio.hrc"
+#include "toolbar.hrc"
+
+ToolBox RID_BIB_TOOLBAR
+{
+ HelpId = HID_BIB_DB_TBX;
+ Sizeable = TRUE ;
+ HideWhenDeactivate = TRUE ;
+ LineSpacing = TRUE ;
+ Border = TRUE ;
+ SVLook = TRUE ;
+ Pos = MAP_APPFONT ( 0 , 0 ) ;
+ Size = MAP_APPFONT ( 200 , 16 ) ;
+ ButtonType = BUTTON_SYMBOL ;
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ Identifier = TBC_FT_SOURCE;
+ //HelpID = SID_SBA_BRW_INSERT ;
+ Text = "Tabelle" ;
+ Text [ ENGLISH ] = "Table" ;
+ Text[ english_us ] = "Table";
+ Text[ portuguese ] = "Tabela";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Tabel";
+ Text[ french ] = "Table";
+ Text[ spanish ] = "Tabla";
+ Text[ italian ] = "Tabella";
+ Text[ danish ] = "Tabel";
+ Text[ swedish ] = "Tabell";
+ Text[ polish ] = "Tabela";
+ Text[ portuguese_brazilian ] = "Data source";
+ Text[ japanese ] = "ð";
+ Text[ korean ] = " ҽ";
+ Text[ chinese_simplified ] = "";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Tablo";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ Identifier = TBC_LB_SOURCE;
+ HelpID = HID_BIB_TBX_TABLE;
+ Command = ".uno:Bib/source" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SEPARATOR ;
+ };
+
+ ToolBoxItem
+ {
+ Identifier = TBC_FT_QUERY;
+ //HelpID = SID_SBA_BRW_INSERT ;
+ Text = "Suchbegriff" ;
+ Text [ ENGLISH ] = "Search key" ;
+ Text[ english_us ] = "Search Key";
+ Text[ portuguese ] = "Expresso procurada";
+ Text[ russian ] = " ";
+ Text[ greek ] = " ";
+ Text[ dutch ] = "Zoekbegrip";
+ Text[ french ] = "lment recherch";
+ Text[ spanish ] = "Expresin de bsqueda";
+ Text[ italian ] = "Termine ricercato";
+ Text[ danish ] = "Sgeord";
+ Text[ swedish ] = "Skord";
+ Text[ polish ] = "Szukane haso";
+ Text[ portuguese_brazilian ] = "Search key";
+ Text[ japanese ] = "";
+ Text[ korean ] = "˻ Ű";
+ Text[ chinese_simplified ] = "Ѱ";
+ Text[ chinese_traditional ] = "jMr";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Arama lt";
+ };
+ ToolBoxItem
+ {
+ Identifier = TBC_ED_QUERY;
+ HelpID = HID_BIB_TBX_SEARCH;
+ Command = ".uno:Bib/query" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SEPARATOR ;
+ };
+
+ ToolBoxItem
+ {
+ Identifier = TBC_BT_AUTOFILTER ;
+ HelpID = HID_BIB_TBX_AUTOFILTER;
+ ItemBitmap = Bitmap { File = "sc10716.bmp" ; };
+ DropDown = TRUE ;
+ Text = "AutoFilter" ;
+ Text [ ENGLISH ] = "AutoFilter" ;
+ Command = ".uno:Bib/autoFilter" ;
+ Text[ english_us ] = "AutoFilter";
+ Text[ portuguese ] = "AutoFiltro";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "AutoFilter";
+ Text[ french ] = "AutoFiltre";
+ Text[ spanish ] = "AutoFiltro";
+ Text[ italian ] = "Filtro automatico";
+ Text[ danish ] = "AutoFilter";
+ Text[ swedish ] = "AutoFilter";
+ Text[ polish ] = "Autofiltr";
+ Text[ portuguese_brazilian ] = "AutoFilter";
+ Text[ japanese ] = "̨";
+ Text[ korean ] = "ڵ";
+ Text[ chinese_simplified ] = "Զɸѡ";
+ Text[ chinese_traditional ] = "ۭqz";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Otomatik filtre";
+ Text[ language_user1 ] = " ";
+ };
+
+ ToolBoxItem
+ {
+ Identifier = TBC_BT_FILTERCRIT ;
+ HelpID = SID_SBA_QRY_FILTERCRIT ;
+ ItemBitmap = Bitmap { File = "sc10715.bmp" ; };
+ Text = "Standard Filter" ;
+ Text [ ENGLISH ] = "Standard Filter" ;
+ Command = ".uno:Bib/standardFilter" ;
+ Text[ english_us ] = "Standard Filter";
+ Text[ portuguese ] = "Filtro padro";
+ Text[ russian ] = " ";
+ Text[ greek ] = " ";
+ Text[ dutch ] = "Standaardfilter";
+ Text[ french ] = "Filtre par dfaut";
+ Text[ spanish ] = "Filtro estndar";
+ Text[ italian ] = "Filtro standard";
+ Text[ danish ] = "Standardfilter";
+ Text[ swedish ] = "Standardfilter";
+ Text[ polish ] = "Filtr standardowy";
+ Text[ portuguese_brazilian ] = "Standard Filter";
+ Text[ japanese ] = "W̨";
+ Text[ korean ] = "⺻ ";
+ Text[ chinese_simplified ] = "׼ɸѡ";
+ Text[ chinese_traditional ] = "Эz";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Standart filtre";
+ Text[ language_user1 ] = " ";
+ };
+
+ ToolBoxItem
+ {
+ Identifier = TBC_BT_REMOVEFILTER ;
+ HelpID = SID_SBA_QRY_REMOVEFILTER ;
+ ItemBitmap = Bitmap { File = "sc10711.bmp" ; };
+ Text = "Filter entfernen" ;
+ Text [ ENGLISH ] = "Remove Filter" ;
+ Command = ".uno:Bib/removeFilter" ;
+ Text[ english_us ] = "Remove Filter";
+ Text[ portuguese ] = "Eliminar filtro";
+ Text[ russian ] = " ";
+ Text[ greek ] = " ";
+ Text[ dutch ] = "Filter verwijderen";
+ Text[ french ] = "Supprimer le filtre";
+ Text[ spanish ] = "Eliminar filtro";
+ Text[ italian ] = "Rimuovi filtro";
+ Text[ danish ] = "Fjern filter";
+ Text[ swedish ] = "Ta bort filter";
+ Text[ polish ] = "Usu filtr";
+ Text[ portuguese_brazilian ] = "Remove Filter";
+ Text[ japanese ] = "̨̉";
+ Text[ korean ] = " ";
+ Text[ chinese_simplified ] = "ɾɸѡ";
+ Text[ chinese_traditional ] = "Rz";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Filtreyi kaldr";
+ Text[ language_user1 ] = " ";
+ };
+/*
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SEPARATOR ;
+ };
+
+ ToolBoxItem
+ {
+ Identifier = TBC_BT_NEWCARD ;
+ //HelpID = SID_SBA_QRY_REMOVEFILTER ;
+ Command = ".uno:Bib/newEntry" ;
+ ItemBitmap = Bitmap { File = "newcard.bmp" ; };
+ Text = "Neue Adresse" ;
+ Text [ ENGLISH ] = "New Address" ;
+ Text[ english_us ] = "New Address";
+ Text[ portuguese ] = "Novo endereo";
+ Text[ russian ] = " ";
+ Text[ greek ] = "New Address";
+ Text[ dutch ] = "Nieuw adres";
+ Text[ french ] = "Nouvelle adresse";
+ Text[ spanish ] = "Nueva direccin";
+ Text[ italian ] = "Nuovo indirizzo";
+ Text[ danish ] = "Ny adresse";
+ Text[ swedish ] = "Ny adress";
+ Text[ polish ] = "Nowy adres";
+ Text[ portuguese_brazilian ] = "New Address";
+ Text[ japanese ] = "VZ";
+ Text[ korean ] = "New Address";
+ Text[ chinese_simplified ] = "µַ";
+ Text[ chinese_traditional ] = "sa}";
+ Text[ arabic ] = " ";
+ };
+
+ ToolBoxItem
+ {
+ Identifier = TBC_BT_EDITCARD ;
+ //HelpID = SID_SBA_QRY_REMOVEFILTER ;
+ Command = ".uno:Bib/changeEntry" ;
+ ItemBitmap = Bitmap { File = "modcard.bmp" ; };
+ Text = "Adresse bearbeiten" ;
+ Text [ ENGLISH ] = "Edit address" ;
+ Text[ english_us ] = "Edit Address";
+ Text[ portuguese ] = "Editar endereo";
+ Text[ russian ] = " ";
+ Text[ greek ] = "Edit address";
+ Text[ dutch ] = "Adres wijzigen";
+ Text[ french ] = "diter une adresse";
+ Text[ spanish ] = "Editar direccin";
+ Text[ italian ] = "Modifica indirizzo";
+ Text[ danish ] = "Rediger adresse";
+ Text[ swedish ] = "Redigera adress";
+ Text[ polish ] = "Edytuj adres";
+ Text[ portuguese_brazilian ] = "Edit address";
+ Text[ japanese ] = "ڽ̕ҏW";
+ Text[ korean ] = "Edit address";
+ Text[ chinese_simplified ] = "༭ַ";
+ Text[ chinese_traditional ] = "sa}";
+ Text[ arabic ] = " ";
+ };
+
+ ToolBoxItem
+ {
+ Identifier = TBC_BT_REMOVECARD ;
+ //HelpID = SID_SBA_QRY_REMOVEFILTER ;
+ Command = ".uno:Bib/removeEntry" ;
+ ItemBitmap = Bitmap { File = "remcard.bmp" ; };
+ Text = "Adresse lschen" ;
+ Text [ ENGLISH ] = "Remove address" ;
+ Text[ english_us ] = "Remove Address";
+ Text[ portuguese ] = "Eliminar endereo";
+ Text[ russian ] = " ";
+ Text[ greek ] = " ";
+ Text[ dutch ] = "Adres wissen";
+ Text[ french ] = "Supprimer une adresse";
+ Text[ spanish ] = "Eliminar direccin";
+ Text[ italian ] = "Elimina indirizzo";
+ Text[ danish ] = "Slet adresse";
+ Text[ swedish ] = "Ta bort adress";
+ Text[ polish ] = "Usu adres";
+ Text[ portuguese_brazilian ] = "Remove address";
+ Text[ japanese ] = "ڽ̍폜";
+ Text[ korean ] = "Remove address";
+ Text[ chinese_simplified ] = "ɾַ";
+ Text[ chinese_traditional ] = "Ra}";
+ Text[ arabic ] = " ";
+ };
+
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SEPARATOR ;
+ };
+
+ ToolBoxItem
+ {
+ Identifier = TBC_BT_INSERT ;
+ HelpID = SID_SBA_BRW_INSERT ;
+ ItemBitmap = Bitmap { File = "sc12202.bmp" ; };
+ Text = "Daten in Text" ;
+ Text [ ENGLISH ] = "Insert" ;
+ Text[ english_us ] = "Data into Text";
+ Text[ portuguese ] = "Dados no texto";
+ Text[ russian ] = " ";
+ Text[ greek ] = " ";
+ Text[ dutch ] = "Gegevens in tekst";
+ Text[ french ] = "Donnes dans le texte";
+ Text[ spanish ] = "Datos en texto";
+ Text[ italian ] = "Dati nel testo";
+ Text[ danish ] = "Data i tekst";
+ Text[ swedish ] = "Data i text";
+ Text[ polish ] = "Dane w tekcie";
+ Text[ portuguese_brazilian ] = "Insert";
+ Text[ japanese ] = "ް";
+ Text[ korean ] = "Insert";
+ Text[ chinese_simplified ] = "ı";
+ Text[ chinese_traditional ] = "uഫr";
+ Text[ arabic ] = " ";
+ };
+ ToolBoxItem
+ {
+ Identifier = TBC_BT_UPDATE ;
+ HelpID = SID_SBA_BRW_UPDATE ;
+ ItemBitmap = Bitmap { File = "sc12201.bmp" ; };
+ Text = "Daten in Felder" ;
+ };
+
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SEPARATOR ;
+ };
+
+ ToolBoxItem
+ {
+ Identifier = TBC_BT_MAIL ;
+ //HelpID = HID_ADDRPI_AUTOMAIL ;
+ ItemBitmap = Bitmap { File = "sc06305.bmp" ; };
+ Text = "AutoMail" ;
+ Text [ ENGLISH ] = "AutoMail" ;
+ Text[ english_us ] = "AutoMail";
+ Text[ portuguese ] = "AutoMail";
+ Text[ russian ] = "AutoMail";
+ Text[ greek ] = "AutoMail";
+ Text[ dutch ] = "AutoMail";
+ Text[ french ] = "AutoMail";
+ Text[ spanish ] = "AutoMail";
+ Text[ italian ] = "Mail automatica";
+ Text[ danish ] = "AutoPost";
+ Text[ swedish ] = "AutoMail";
+ Text[ polish ] = "AutoMail";
+ Text[ portuguese_brazilian ] = "AutoMail";
+ Text[ japanese ] = "Ұ";
+ Text[ korean ] = "AutoMail";
+ Text[ chinese_simplified ] = "Զʼ";
+ Text[ chinese_traditional ] = "۰ʹqll";
+ Text[ arabic ] = " ";
+ };
+ ToolBoxItem
+ {
+ Identifier = TBC_BT_URL ;
+ //HelpID = HID_ADDRPI_AUTOBROWSE ;
+ ItemBitmap = Bitmap { File = "sc06304.bmp" ; };
+ Text = "AutoBrowse" ;
+ Text [ ENGLISH ] = "AutoBrowse" ;
+ Text[ english_us ] = "AutoBrowse";
+ Text[ portuguese ] = "AutoBrowse";
+ Text[ russian ] = "";
+ Text[ greek ] = "AutoBrowse";
+ Text[ dutch ] = "AutoBrowse";
+ Text[ french ] = "AutoBrowse";
+ Text[ spanish ] = "AutoBrowse";
+ Text[ italian ] = "Browse automatico";
+ Text[ danish ] = "AutoBrowse";
+ Text[ swedish ] = "AutoBrowse";
+ Text[ polish ] = "AutoBrowse";
+ Text[ portuguese_brazilian ] = "AutoBrowse";
+ Text[ japanese ] = "׳";
+ Text[ korean ] = "AutoBrowse";
+ Text[ chinese_simplified ] = "Զ";
+ Text[ chinese_traditional ] = "۰s";
+ Text[ arabic ] = " ";
+ };*/
+ };
+ Scroll = TRUE ;
+};
+
diff --git a/extensions/source/ole/comifaces.hxx b/extensions/source/ole/comifaces.hxx
new file mode 100644
index 000000000000..e3f0f4e95490
--- /dev/null
+++ b/extensions/source/ole/comifaces.hxx
@@ -0,0 +1,90 @@
+/*************************************************************************
+ *
+ * $RCSfile: comifaces.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:16:40 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef __COMIFACES_HXX
+#define __COMIFACES_HXX
+
+#include <com/sun/star/uno/XInterface.hpp>
+
+using namespace com::sun::star::uno;
+
+MIDL_INTERFACE("e40a2331-3bc1-11d4-8321-005004526ab4")
+IJScriptValueObject: public IUnknown
+{
+ STDMETHOD( Set)( VARIANT type, VARIANT value)= 0;
+ STDMETHOD( Get)( VARIANT *val)= 0;
+ STDMETHOD( InitOutParam)()= 0;
+ STDMETHOD( InitInOutParam)( VARIANT type, VARIANT value)= 0;
+ STDMETHOD( IsOutParam)( VARIANT_BOOL * flag)= 0;
+ STDMETHOD( IsInOutParam)( VARIANT_BOOL * flag)= 0;
+ STDMETHOD( GetValue)( BSTR* type, VARIANT *value)= 0;
+
+};
+
+MIDL_INTERFACE("7B5C3410-66FA-11d4-832A-005004526AB4")
+IUnoObjectWrapper: public IUnknown
+{
+ STDMETHOD( getWrapperXInterface)( Reference<XInterface>* pInt)=0;
+ STDMETHOD( getOriginalUnoObject)( Reference<XInterface>* pInt)=0;
+ STDMETHOD( getOriginalUnoStruct)( Any * pStruct)=0;
+
+};
+
+#endif
diff --git a/extensions/source/ole/jscriptclasses.cxx b/extensions/source/ole/jscriptclasses.cxx
new file mode 100644
index 000000000000..bf549243e412
--- /dev/null
+++ b/extensions/source/ole/jscriptclasses.cxx
@@ -0,0 +1,350 @@
+/*************************************************************************
+ *
+ * $RCSfile: jscriptclasses.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:16:40 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#include "jscriptclasses.hxx"
+
+//========================================================================
+// JScriptValue
+//========================================================================
+JScriptValue::JScriptValue(): m_bOutParam(0), m_bInOutParam(0)
+{
+}
+
+JScriptValue::~JScriptValue()
+{
+}
+
+
+// JScriptValue, IDispatch --------------------------------------------
+STDMETHODIMP JScriptValue::GetTypeInfoCount(UINT *pctinfo)
+{
+ return E_NOTIMPL;
+}
+
+// JScriptValue, IDispatch --------------------------------------------
+STDMETHODIMP JScriptValue::GetTypeInfo( UINT iTInfo,
+ LCID lcid,
+ ITypeInfo **ppTInfo)
+{
+ return E_NOTIMPL;
+}
+
+// JScriptValue, IDispatch --------------------------------------------
+STDMETHODIMP JScriptValue::GetIDsOfNames( REFIID riid,
+ LPOLESTR *rgszNames,
+ UINT cNames,
+ LCID lcid,
+ DISPID *rgDispId)
+{
+ if( !rgDispId)
+ return E_POINTER;
+
+
+ HRESULT ret= S_OK;
+ CComBSTR name(*rgszNames);
+ name.ToLower();
+
+ if( name == CComBSTR( L"set") )
+ *rgDispId= 1;
+ else if( name == CComBSTR( L"get") )
+ *rgDispId= 2;
+ else if( name == CComBSTR( L"initoutparam") )
+ *rgDispId= 3;
+ else if( name == CComBSTR( L"initinoutparam") )
+ *rgDispId= 4;
+ else
+ ret= DISP_E_UNKNOWNNAME;
+
+ return ret;
+}
+
+// JScriptValue, IDispatch --------------------------------------------
+STDMETHODIMP JScriptValue::Invoke( DISPID dispIdMember,
+ REFIID riid,
+ LCID lcid,
+ WORD wFlags,
+ DISPPARAMS *pDispParams,
+ VARIANT *pVarResult,
+ EXCEPINFO *pExcepInfo,
+ UINT *puArgErr)
+{
+ if( pDispParams->cNamedArgs)
+ return DISP_E_NONAMEDARGS;
+
+
+ HRESULT ret= S_OK;
+ switch( dispIdMember)
+ {
+ case 0: // DISPID_VALUE
+ if( wFlags & DISPATCH_PROPERTYGET && pVarResult)
+ {
+ if( FAILED( VariantCopy( pVarResult, &m_varValue)))
+ ret= E_FAIL;
+ }
+ else
+ ret= E_POINTER;
+ break;
+ case 1:
+ if( wFlags & DISPATCH_METHOD)
+ ret= Set( pDispParams->rgvarg[1], pDispParams->rgvarg[0]);
+ if( FAILED( ret))
+ ret= DISP_E_EXCEPTION;
+ break;
+ case 2:
+ if( wFlags & DISPATCH_METHOD)
+ ret= Get( pVarResult);
+ if( FAILED( ret))
+ ret= DISP_E_EXCEPTION;
+ break;
+ case 3:
+ if( wFlags & DISPATCH_METHOD)
+ ret= InitOutParam();
+ if( FAILED( ret))
+ ret= DISP_E_EXCEPTION;
+ break;
+ case 4:
+ if( wFlags & DISPATCH_METHOD)
+ ret= InitInOutParam( pDispParams->rgvarg[1], pDispParams->rgvarg[0]);
+ if( FAILED( ret))
+ ret= DISP_E_EXCEPTION;
+ break;
+ default:
+ ret= DISP_E_MEMBERNOTFOUND;
+ break;
+ }
+
+ return ret;
+}
+
+// JScriptValue, IScriptOutParam-----------------------
+STDMETHODIMP JScriptValue::Set( VARIANT type, VARIANT value)
+{
+ Lock();
+ HRESULT hr= S_OK;
+ m_varValue= value;
+ VARIANT var;
+ VariantInit( &var);
+ if( SUCCEEDED( hr= VariantChangeType( &var, &type, 0, VT_BSTR)))
+ m_bstrType= var.bstrVal;
+ Unlock();
+ return hr;
+}
+// JScriptValue, IScriptOutParam-----------------------
+STDMETHODIMP JScriptValue::Get( VARIANT *val)
+{
+ Lock();
+ if( !val)
+ return E_POINTER;
+ HRESULT hr= VariantCopy( val, &m_varValue);
+ Unlock();
+ return hr;
+}
+
+STDMETHODIMP JScriptValue::InitOutParam()
+{
+ Lock();
+ m_bOutParam= true;
+ m_bInOutParam= false;
+ Unlock();
+ return S_OK;
+}
+
+STDMETHODIMP JScriptValue::InitInOutParam( VARIANT type, VARIANT value)
+{
+ Lock();
+ m_bInOutParam= true;
+ m_bOutParam= false;
+ Unlock();
+ return Set( type, value);
+}
+
+STDMETHODIMP JScriptValue::IsOutParam( VARIANT_BOOL * flag)
+{
+ Lock();
+ if( !flag)
+ return E_POINTER;
+ *flag= m_bOutParam ? VARIANT_TRUE : VARIANT_FALSE;
+ Unlock();
+ return S_OK;
+}
+
+STDMETHODIMP JScriptValue::IsInOutParam( VARIANT_BOOL * flag)
+{
+ Lock();
+ if( !flag)
+ return E_POINTER;
+ *flag= m_bInOutParam ? VARIANT_TRUE : VARIANT_FALSE;
+ Unlock();
+ return S_OK;
+}
+
+STDMETHODIMP JScriptValue::GetValue( BSTR* type, VARIANT *value)
+{
+ Lock();
+ if( !type || !value)
+ return E_POINTER;
+ HRESULT hr;
+ if( SUCCEEDED( hr= m_bstrType.CopyTo( type)))
+ hr= VariantCopy( value, &m_varValue);
+ Unlock();
+ return hr;
+}
+
+//##########################################################################################
+// JScriptOutValue
+//##########################################################################################
+
+JScriptOutParam::JScriptOutParam()
+{
+}
+
+JScriptOutParam::~JScriptOutParam()
+{
+}
+
+
+// JScriptOutParam, IDispatch --------------------------------------------
+STDMETHODIMP JScriptOutParam::GetTypeInfoCount(UINT *pctinfo)
+{
+ return E_NOTIMPL;
+}
+
+// JScriptOutParam, IDispatch --------------------------------------------
+STDMETHODIMP JScriptOutParam::GetTypeInfo( UINT iTInfo,
+ LCID lcid,
+ ITypeInfo **ppTInfo)
+{
+ return E_NOTIMPL;
+}
+
+// JScriptOutParam, IDispatch --------------------------------------------
+STDMETHODIMP JScriptOutParam::GetIDsOfNames( REFIID riid,
+ LPOLESTR *rgszNames,
+ UINT cNames,
+ LCID lcid,
+ DISPID *rgDispId)
+{
+ if( !rgDispId)
+ return E_POINTER;
+
+
+ HRESULT ret= S_OK;
+ CComBSTR name(*rgszNames);
+ name.ToLower();
+
+ if( name == CComBSTR( L"0") )
+ *rgDispId= 1;
+ else
+ ret= DISP_E_UNKNOWNNAME;
+
+ return ret;
+}
+
+// JScriptOutParam, IDispatch --------------------------------------------
+STDMETHODIMP JScriptOutParam::Invoke( DISPID dispIdMember,
+ REFIID riid,
+ LCID lcid,
+ WORD wFlags,
+ DISPPARAMS *pDispParams,
+ VARIANT *pVarResult,
+ EXCEPINFO *pExcepInfo,
+ UINT *puArgErr)
+{
+ HRESULT ret= S_OK;
+ switch( dispIdMember)
+ {
+ case 0: // DISPID_VALUE
+ if( wFlags & DISPATCH_PROPERTYGET && pVarResult)
+ {
+ if( FAILED( VariantCopy( pVarResult, &m_varValue)))
+ ret= E_FAIL;
+ }
+ else if( wFlags & DISPATCH_PROPERTYPUT || wFlags & DISPATCH_PROPERTYPUTREF)
+ {
+ m_varValue.Clear();
+ if( FAILED( VariantCopyInd( &m_varValue, &pDispParams->rgvarg[0])))
+ ret= E_FAIL;
+ }
+ else
+ ret= E_POINTER;
+ break;
+ case 1: //
+ if( wFlags & DISPATCH_PROPERTYGET && pVarResult)
+ {
+ if( FAILED( VariantCopy( pVarResult, &m_varValue)))
+ ret= E_FAIL;
+ }
+ else if( wFlags & DISPATCH_PROPERTYPUT || wFlags & DISPATCH_PROPERTYPUTREF)
+ {
+ m_varValue.Clear();
+ if( FAILED( VariantCopyInd( &m_varValue, &pDispParams->rgvarg[0])))
+ ret= E_FAIL;
+ }
+ else
+ ret= E_POINTER;
+ break;
+
+ default:
+ ret= DISP_E_MEMBERNOTFOUND;
+ break;
+ }
+
+ return ret;
+}
diff --git a/extensions/source/ole/jscriptclasses.hxx b/extensions/source/ole/jscriptclasses.hxx
new file mode 100644
index 000000000000..13371a21318a
--- /dev/null
+++ b/extensions/source/ole/jscriptclasses.hxx
@@ -0,0 +1,177 @@
+/*************************************************************************
+ *
+ * $RCSfile: jscriptclasses.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:16:40 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef __JSCRIPTCLASSES_HXX
+#define __JSCRIPTCLASSES_HXX
+#include <tools/presys.h>
+#include "stdafx.h"
+#include <tools/postsys.h>
+
+#include "comifaces.hxx"
+
+
+
+// Sequences are represented by prepending "[]", e.g. []char, [][]byte, [][][]object, etc.
+
+// To make a JScriptValue object to an out parameter, call
+// "InitOutParam" and to make it a in/out parameter call
+// "InitInOutParam"
+
+// If the object represents an out parameter then the value can after the call
+// be retrived by "Get".
+
+// From JavaScript the functions Get, Set, InitOutParam and InitInOutParam are
+// used, that is they are accessible through IDispatch. The functions are used
+// by the bridge.
+
+class JScriptValue:
+ public CComObjectRootEx<CComMultiThreadModel>,
+ public IJScriptValueObject,
+ public IDispatch
+{
+public:
+ JScriptValue();
+ virtual ~JScriptValue();
+
+ BEGIN_COM_MAP(JScriptValue)
+ COM_INTERFACE_ENTRY(IDispatch)
+ COM_INTERFACE_ENTRY(IJScriptValueObject)
+ END_COM_MAP()
+
+ // IDispatch -------------------------------------------
+ STDMETHOD( GetTypeInfoCount)(UINT *pctinfo);
+
+ STDMETHOD( GetTypeInfo)( UINT iTInfo,
+ LCID lcid,
+ ITypeInfo **ppTInfo);
+
+ STDMETHOD( GetIDsOfNames)( REFIID riid,
+ LPOLESTR *rgszNames,
+ UINT cNames,
+ LCID lcid,
+ DISPID *rgDispId);
+
+ STDMETHOD( Invoke)( DISPID dispIdMember,
+ REFIID riid,
+ LCID lcid,
+ WORD wFlags,
+ DISPPARAMS *pDispParams,
+ VARIANT *pVarResult,
+ EXCEPINFO *pExcepInfo,
+ UINT *puArgErr);
+ // IJScriptOutParam --------------------------------------
+
+ STDMETHOD( Set)( VARIANT type, VARIANT value);
+ STDMETHOD( Get)( VARIANT *val);
+ STDMETHOD( InitOutParam)();
+ STDMETHOD( InitInOutParam)( VARIANT type, VARIANT value);
+ STDMETHOD( IsOutParam)( VARIANT_BOOL * flag);
+ STDMETHOD( IsInOutParam)( VARIANT_BOOL * flag);
+ STDMETHOD( GetValue)( BSTR* type, VARIANT *value);
+
+
+ CComVariant m_varValue;
+ CComBSTR m_bstrType;
+ unsigned m_bOutParam: 1;
+ unsigned m_bInOutParam: 1;
+
+};
+
+// If a class is implemented in JScript, then its method
+class JScriptOutParam:
+ public CComObjectRootEx<CComMultiThreadModel>,
+ public IDispatch
+{
+public:
+ JScriptOutParam();
+ virtual ~JScriptOutParam();
+
+ BEGIN_COM_MAP(JScriptOutParam)
+ COM_INTERFACE_ENTRY(IDispatch)
+ END_COM_MAP()
+
+ // IDispatch -------------------------------------------
+ STDMETHOD( GetTypeInfoCount)(UINT *pctinfo);
+
+ STDMETHOD( GetTypeInfo)( UINT iTInfo,
+ LCID lcid,
+ ITypeInfo **ppTInfo);
+
+ STDMETHOD( GetIDsOfNames)( REFIID riid,
+ LPOLESTR *rgszNames,
+ UINT cNames,
+ LCID lcid,
+ DISPID *rgDispId);
+
+ STDMETHOD( Invoke)( DISPID dispIdMember,
+ REFIID riid,
+ LCID lcid,
+ WORD wFlags,
+ DISPPARAMS *pDispParams,
+ VARIANT *pVarResult,
+ EXCEPINFO *pExcepInfo,
+ UINT *puArgErr);
+
+
+private:
+ CComVariant m_varValue;
+};
+
+#endif
diff --git a/extensions/source/ole/makefile.mk b/extensions/source/ole/makefile.mk
new file mode 100644
index 000000000000..d7c68e2c45e5
--- /dev/null
+++ b/extensions/source/ole/makefile.mk
@@ -0,0 +1,188 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 16:16:40 $
+#
+# The Contents of this file are made available subject to the terms of
+# either of the following licenses
+#
+# - GNU Lesser General Public License Version 2.1
+# - Sun Industry Standards Source License Version 1.1
+#
+# Sun Microsystems Inc., October, 2000
+#
+# GNU Lesser General Public License Version 2.1
+# =============================================
+# Copyright 2000 by Sun Microsystems, Inc.
+# 901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License version 2.1, as published by the Free Software Foundation.
+#
+# This library 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 for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+#
+# Sun Industry Standards Source License Version 1.1
+# =================================================
+# The contents of this file are subject to the Sun Industry Standards
+# Source License Version 1.1 (the "License"); You may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at http://www.openoffice.org/license.html.
+#
+# Software provided under this License is provided on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+# See the License for the specific provisions governing your rights and
+# obligations concerning the Software.
+#
+# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+#
+# Copyright: 2000 by Sun Microsystems, Inc.
+#
+# All Rights Reserved.
+#
+# Contributor(s): _______________________________________
+#
+#
+#
+#*************************************************************************
+PRJ=..$/..
+# from cppumaker --------------------------------------------------
+UNOUCRDEP= $(SOLARBINDIR)$/applicat.rdb
+UNOUCRRDB= $(SOLARBINDIR)$/applicat.rdb
+
+UNOUCRRDB= $(SOLARBINDIR)$/applicat.rdb
+.IF "$(BOOTSTRAP_SERVICE)" == "TRUE"
+UNOUCROUT= $(OUT)$/inc$/comprehensive
+INCPRE+= $(OUT)$/inc$/comprehensive
+CPPUMAKERFLAGS += -C
+.ELSE
+UNOUCROUT= $(OUT)$/inc
+INCPRE+= $(OUT)$/inc
+.ENDIF
+
+# -----------------------------------------------------------------
+
+PRJNAME=extensions
+TARGET=olebrdg
+
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+
+LIBTARGET=NO
+USE_DEFFILE=YES
+
+USE_DEFFILE=TRUE
+INCPRE+= -I$(SOLARINCDIR)$/external$/atl
+
+.IF "$(PRODUCT)"=="" || "$(debug)"!=""
+LIBCMT=msvcrtd.lib
+.ENDIF
+# --- Settings -----------------------------------------------------
+
+ENABLE_EXCEPTIONS=TRUE
+
+
+#----------------------------------------------------------------
+#.INCLUDE: .$/cppumaker.mk
+
+
+UNOTYPES= \
+ com.sun.star.lang.XMultiServiceFactory \
+ com.sun.star.lang.XSingleServiceFactory \
+ com.sun.star.lang.XEventListener \
+ com.sun.star.lang.XUnoTunnel \
+ com.sun.star.lang.XInitialization \
+ com.sun.star.uno.TypeClass \
+ com.sun.star.script.FinishEngineEvent \
+ com.sun.star.script.XInvocation \
+ com.sun.star.script.XInvocation \
+ com.sun.star.script.XLibraryAccess \
+ com.sun.star.script.XAllListener \
+ com.sun.star.script.FailReason \
+ com.sun.star.script.XEventAttacher \
+ com.sun.star.script.XEventAttacherManager \
+ com.sun.star.script.XAllListenerAdapterService \
+ com.sun.star.script.XInvocationAdapterFactory \
+ com.sun.star.script.XInvocationAdapterFactory2 \
+ com.sun.star.registry.InvalidValueException \
+ com.sun.star.registry.RegistryKeyType \
+ com.sun.star.registry.XRegistryKey \
+ com.sun.star.registry.RegistryValueType \
+ com.sun.star.registry.InvalidRegistryException \
+ com.sun.star.loader.XImplementationLoader \
+ com.sun.star.loader.CannotActivateFactoryException \
+ com.sun.star.bridge.XBridgeSupplier \
+ com.sun.star.bridge.XBridgeSupplier2 \
+ com.sun.star.bridge.ModelDependent \
+ com.sun.star.reflection.InvocationTargetException \
+ com.sun.star.beans.UnknownPropertyException \
+ com.sun.star.beans.MethodConcept \
+ com.sun.star.beans.PropertyConcept \
+ com.sun.star.beans.XExactName \
+ com.sun.star.beans.XMaterialHolder \
+ com.sun.star.uno.Exception \
+ com.sun.star.uno.XWeak \
+ com.sun.star.uno.XAggregation \
+ com.sun.star.reflection.XIdlReflection
+
+# com.sun.star.beans.XMaterialHolder \
+
+
+.IF "$(GUI)"=="WNT"
+
+
+
+
+SLOFILES= \
+ $(SLO)$/servreg.obj \
+ $(SLO)$/servprov.obj \
+ $(SLO)$/unoobjw.obj \
+ $(SLO)$/oleobjw.obj \
+ $(SLO)$/oleclassw.obj \
+ $(SLO)$/olethread.obj \
+ $(SLO)$/oledll.obj \
+ $(SLO)$/StdAfx.obj \
+ $(SLO)$/jscriptclasses.obj
+
+
+SHL1TARGET=$(TARGET)
+SHL1STDLIBS=\
+ $(SALLIB) \
+ $(VOSLIB) \
+ $(CPPULIB) \
+ $(CPPUHELPERLIB) \
+ $(LIBCIMT) \
+ ole32.lib \
+ uuid.lib \
+ oleaut32.lib
+
+#SHL1LIBS = $(SLB)$/$(TARGET).lib
+SHL1LIBS=
+SHL1OBJS=$(SLOFILES)
+#SHL1DEF=$(MISC)$/$(SHL1TARGET).def
+#SHL1DEF=$(TARGET).def
+
+DEF1NAME=$(SHL1TARGET)
+DEF1EXPORTFILE=$(SHL1TARGET).dxp
+
+.ENDIF
+
+#----------------------------------------------------------------
+
+.INCLUDE : target.mk
+
+#.INCLUDE : $(PRJ)$/util$/target.pmk
+
diff --git a/extensions/source/ole/ole2uno.hxx b/extensions/source/ole/ole2uno.hxx
new file mode 100644
index 000000000000..5eeb8ea29d68
--- /dev/null
+++ b/extensions/source/ole/ole2uno.hxx
@@ -0,0 +1,408 @@
+/*************************************************************************
+ *
+ * $RCSfile: ole2uno.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:16:40 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _OLE2UNO_HXX
+#define _OLE2UNO_HXX
+
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#define STRICT
+#ifndef _WIN32_WINNT
+#define _WIN32_WINNT 0x0400
+#endif
+
+#define _WIN32_DCOM
+#ifdef _DEBUG
+//#define _ATL_DEBUG_INTERFACES
+#endif
+
+//#include <atlbase.h>
+//You may derive a class from CComModule and use it if you want to override
+//something, but do not change the name of _Module
+
+#include <tools/prewin.h>
+//#include <stdlib.h>
+//#include <malloc.h>
+//#include <ole2.h>
+//#include <oleauto.h>
+//#include <oaidl.h>
+//#include <ocidl.h>
+#include <tchar.h>
+//#include <objbase.h>
+//#include <atlbase.h>
+//extern CComModule _Module;
+//#include <atlcom.h>
+#if _MSC_VER >= 1200
+#include <dispex.h>
+//#include <winbase.h>
+#endif
+#include <tools/postwin.h>
+
+#include <tools/presys.h>
+#include <list>
+#include <hash_map>
+#include <tools/postsys.h>
+
+#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XSINGLESERVICEFACTORY_HPP_
+#include <com/sun/star/lang/XSingleServiceFactory.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SCRIPT_XTYPECONVERTER_HPP_
+#include <com/sun/star/script/XTypeConverter.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SCRIPT_FINISHENGINEEVENT_HPP_
+#include <com/sun/star/script/FinishEngineEvent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SCRIPT_INTERRUPTREASON_HPP_
+#include <com/sun/star/script/InterruptReason.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SCRIPT_XENGINELISTENER_HPP_
+#include <com/sun/star/script/XEngineListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SCRIPT_XDEBUGGING_HPP__
+#include <com/sun/star/script/XDebugging.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SCRIPT_XINVOCATION_HPP_
+#include <com/sun/star/script/XInvocation.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SCRIPT_CONTEXTINFORMATION_HPP_
+#include <com/sun/star/script/ContextInformation.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SCRIPT_FINISHREASON_HPP_
+#include <com/sun/star/script/FinishReason.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SCRIPT_XENGINE_HPP_
+#include <com/sun/star/script/XEngine.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SCRIPT_INTERRUPTENGINEEVENT_HPP_
+#include <com/sun/star/script/InterruptEngineEvent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SCRIPT_XLIBRARYACCESS_HXX_
+#include <com/sun/star/script/XLibraryAccess.hpp>
+#endif
+#ifndef _COM_SUN_STAR_REGISTRY_INVALIDVALUEEXCEPTION_HPP_
+#include <com/sun/star/registry/InvalidValueException.hpp>
+#endif
+#ifndef _COM_SUN_STAR_REGISTRY_REGISTRYKEYTYPE_HPP_
+#include <com/sun/star/registry/RegistryKeyType.hpp>
+#endif
+#ifndef _COM_SUN_STAR_REGISTRY_XREGISTRYKEY_HPP_
+#include <com/sun/star/registry/XRegistryKey.hpp>
+#endif
+#ifndef _COM_SUN_STAR_REGISTRY_REGISTRYVALUETYPE_HPP_
+#include <com/sun/star/registry/RegistryValueType.hpp>
+#endif
+#ifndef _COM_SUN_STAR_REGISTRY_INVALIDREGISTRYEXCEPTION_HPP_
+#include <com/sun/star/registry/InvalidRegistryException.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LOADER_XIMPLEMENTATIONLOADER_HPP_
+#include <com/sun/star/loader/XImplementationLoader.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LOADER_CANNOTACTIVATEFACTORYEXCEPTION_HPP_
+#include <com/sun/star/loader/CannotActivateFactoryException.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BRIDGE_XBRIDGESUPPLIER_HPP_
+#include <com/sun/star/bridge/XBridgeSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BRIDGE_XBRIDGESUPPLIER2_HPP_
+#include <com/sun/star/bridge/XBridgeSupplier2.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BRIDGE_MODELDEPENDENT_HPP_
+#include <com/sun/star/bridge/ModelDependent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_REFLECTION_INVOCATIONTARGETEXCEPTION_HPP_
+#include <com/sun/star/reflection/InvocationTargetException.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UNO_EXCEPTION_HPP_
+#include <com/sun/star/uno/Exception.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_UNKNOWNPROPERTYEXCEPTION_HPP_
+#include <com/sun/star/beans/UnknownPropertyException.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XUNOTUNNEL_HPP_
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#endif
+#ifndef _CPPUHELPER_IMPLBASE2_HXX_
+#include <cppuhelper/implbase2.hxx>
+#endif
+#ifndef _CPPUHELPER_IMPLBASE1_HXX_
+#include <cppuhelper/implbase1.hxx>
+#endif
+#ifndef _CPPUHELPER_TYPEPROVIDER_HXX_
+#include <cppuhelper/typeprovider.hxx>
+#endif
+#ifndef _CPPUHELPER_FACTORY_HXX_
+#include <cppuhelper/factory.hxx>
+#endif
+
+#ifndef _SAL_TYPES_H_
+#include <sal/types.h>
+#endif
+
+#ifndef _TYPELIB_TYPECLASS_H_
+#include <typelib/typeclass.h>
+#endif
+
+#ifndef _UNO_DISPATCHER_H_
+#include <uno/dispatcher.h>
+#endif
+
+#ifndef _UNO_MAPPING_H_
+#include <uno/mapping.hxx>
+#endif
+
+#ifndef _OSL_DIAGNOSE_H_
+#include <osl/diagnose.h>
+#endif
+
+#ifndef _OSL_MUTEX_HXX_
+#include <osl/mutex.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_UNO_REFERENCE_H_
+#include <com/sun/star/uno/Reference.h>
+#endif
+
+#ifndef _RTL_PROCESS_H_
+#include <rtl/process.h>
+#endif
+
+#ifndef _RTL_UUID_H_
+#include <rtl/uuid.h>
+#endif
+
+#define UNO_2_OLE_EXCEPTIONCODE 1001
+
+using namespace com::sun::star::uno;
+using namespace com::sun::star::lang;
+using namespace com::sun::star::script;
+using namespace com::sun::star::registry;
+using namespace com::sun::star::reflection;
+using namespace com::sun::star::beans;
+using namespace osl;
+using namespace rtl;
+using namespace std;
+
+
+
+namespace ole_adapter
+{
+// function shared in this component
+Reference<XSingleServiceFactory> o2u_getConverterProvider2(const Reference<XMultiServiceFactory>& xMan, const Reference<XRegistryKey>& xKey);
+Reference<XSingleServiceFactory> o2u_getConverterProviderVar1(const Reference<XMultiServiceFactory>& xMan, const Reference<XRegistryKey>& xKey);
+Reference<XSingleServiceFactory> o2u_getClientProvider(const Reference<XMultiServiceFactory>& xMan, const Reference<XRegistryKey>& xKey);
+Reference<XSingleServiceFactory> o2u_getServerProvider(const Reference<XMultiServiceFactory>& xMan, const Reference<XRegistryKey>& xKey);
+
+Reference<XMultiServiceFactory> o2u_getMultiServiceFactory();
+Reference<XRegistryKey> o2u_getRegistryKey();
+const VARTYPE getVarType( const Any& val);
+Type getType( BSTR type);
+
+
+Uik o2u_uikFromGUID(GUID* pGuid);
+void o2u_attachCurrentThread();
+
+struct equalOUString_Impl
+{
+ bool operator()(const OUString & s1, const OUString & s2) const
+ {
+ return s1 == s2;
+ }
+};
+
+struct hashOUString_Impl
+{
+ size_t operator()(const OUString & rName) const
+ {
+ return rName.hashCode();
+ }
+};
+
+
+
+
+// ask the object for XBridgeSupplier2 and on success bridges
+// the uno object to IDispatch.
+template < class T >
+sal_Bool convertSelfToIDispatch( T& unoInterface, IDispatch** ppDisp)
+{
+ OSL_ASSERT( ppDisp);
+ *ppDisp= NULL;
+
+ Reference< XInterface > xInt( unoInterface, UNO_QUERY);
+ if( xInt.is())
+ {
+ Reference< XBridgeSupplier2 > xSupplier( xInt, UNO_QUERY);
+ if( xSupplier.is())
+ {
+ sal_Int8 arId[16];
+ rtl_getGlobalProcessId( (sal_uInt8*)arId);
+ Sequence<sal_Int8> seqId( arId, 16);
+ Any anySource;
+ anySource <<= xInt;
+ Any anyDisp= xSupplier->createBridge( anySource, seqId, UNO, OLE);
+ if( anyDisp.getValueTypeClass() == TypeClass_UNSIGNED_LONG)
+ {
+ VARIANT* pvar= *(VARIANT**)anyDisp.getValue();
+ if( pvar->vt == VT_DISPATCH)
+ {
+ *ppDisp= pvar->pdispVal;
+ (*ppDisp)->AddRef();
+ }
+ VariantClear( pvar);
+ CoTaskMemFree( pvar);
+ }
+ }
+ }
+ return *ppDisp ? sal_True : sal_False;
+}
+// ----------------------------------------------------------------------
+// see the overloaded getCppuType function in this file
+//class IUnknownWrapper: public XInterface
+//{
+//public:
+//
+// virtual Any invokeWithDispId(DISPID dispID, const Sequence< Any >& Params, Sequence< sal_Int16 >& OutParamIndex, Sequence< Any >& OutParam) throw ( IllegalArgumentException, CannotConvertException, InvocationTargetException, Exception ) = 0;
+// virtual void setValueWithDispId(DISPID dispID, const Any& Value) throw( UnknownPropertyException, CannotConvertException, InvocationTargetException, Exception) = 0;
+// virtual Any getValueWithDispId(DISPID dispID) throw( UnknownPropertyException, Exception) = 0;
+//};
+//-----------------------------------------------------------------------
+
+
+
+/* ref class to hold IUnknown pointer
+*/
+template <class UnknownClass> class OleRef
+{
+public:
+
+ typedef OleRef<UnknownClass> self;
+
+ OleRef()
+ : m_pUnknown(NULL)
+ {}
+
+ OleRef(const self& copy)
+ : m_pUnknown(copy.m_pUnknown)
+ {
+ if (m_pUnknown) m_pUnknown->AddRef();
+ }
+
+ OleRef(UnknownClass* pUnknown)
+ : m_pUnknown(pUnknown)
+ {
+ if (m_pUnknown) m_pUnknown->AddRef();
+ }
+
+ ~OleRef()
+ {
+ if (m_pUnknown) m_pUnknown->Release();
+ }
+
+ self& operator = (const self& copy)
+ {
+ if (m_pUnknown) m_pUnknown->Release();
+ m_pUnknown = copy.m_pUnknown;
+ if (m_pUnknown) m_pUnknown->AddRef();
+
+ return *this;
+ }
+
+ self& operator = (UnknownClass* pUnknown)
+ {
+ if (m_pUnknown) m_pUnknown->Release();
+ m_pUnknown = pUnknown;
+ if (m_pUnknown) m_pUnknown->AddRef();
+ return *this;
+ }
+
+ UnknownClass* get() { return m_pUnknown; }
+
+ UnknownClass* operator->() { return m_pUnknown; }
+
+ const UnknownClass* operator->() const { return m_pUnknown; }
+
+ Boolean is() { return (m_pUnknown != NULL); }
+
+protected:
+
+ UnknownClass* m_pUnknown;
+};
+
+inline sal_Bool operator == (const Uik & uik1, const Uik & uik2)
+{
+ if( ! memcmp( &uik1, &uik2, sizeof( Uik)))
+ return sal_True;
+ else
+ return sal_False;
+}
+
+} // end namespace
+
+
+
+#endif _OLE2UNO_HXX
+
diff --git a/extensions/source/ole/oledll.cxx b/extensions/source/ole/oledll.cxx
new file mode 100644
index 000000000000..e75309e86516
--- /dev/null
+++ b/extensions/source/ole/oledll.cxx
@@ -0,0 +1,85 @@
+/*************************************************************************
+ *
+ * $RCSfile: oledll.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:16:40 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#include "stdafx.h"
+
+CComModule _Module;
+
+BEGIN_OBJECT_MAP(ObjectMap)
+END_OBJECT_MAP()
+
+/////////////////////////////////////////////////////////////////////////////
+// DLL Entry Point
+
+extern "C"
+BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/)
+{
+ if (dwReason == DLL_PROCESS_ATTACH)
+ {
+ _Module.Init(ObjectMap, hInstance, NULL);
+ DisableThreadLibraryCalls(hInstance);
+ }
+ else if (dwReason == DLL_PROCESS_DETACH)
+ {
+ _Module.Term();
+ }
+ return TRUE; // ok
+}
+
diff --git a/extensions/source/ole/oleobjw.cxx b/extensions/source/ole/oleobjw.cxx
new file mode 100644
index 000000000000..30ac9e1ac49f
--- /dev/null
+++ b/extensions/source/ole/oleobjw.cxx
@@ -0,0 +1,1581 @@
+/*************************************************************************
+ *
+ * $RCSfile: oleobjw.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:16:40 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "ole2uno.hxx"
+
+#ifndef _OSL_MUTEX_HXX_
+#include <osl/mutex.hxx>
+#endif
+#include <osl/diagnose.h>
+
+#ifndef _COM_SUN_STAR_SCRIPT_FAILREASON_HPP_
+#include <com/sun/star/script/FailReason.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XMATERIALHOLDER_HPP_
+#include <com/sun/star/beans/XMaterialHolder.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SCRIPT_XTYPECONVERTER_HPP_
+#include <com/sun/star/script/XTypeConverter.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SCRIPT_FINISHENGINEEVENT_HPP_
+#include <com/sun/star/script/FinishEngineEvent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SCRIPT_INTERRUPTREASON_HPP_
+#include <com/sun/star/script/InterruptReason.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SCRIPT_XENGINELISTENER_HPP_
+#include <com/sun/star/script/XEngineListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SCRIPT_XDEBUGGING_HPP_
+#include <com/sun/star/script/XDebugging.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SCRIPT_XINVOCATION_HPP_
+#include <com/sun/star/script/XInvocation.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SCRIPT_CONTEXTINFORMATION_HPP_
+#include <com/sun/star/script/ContextInformation.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SCRIPT_FINISHREASON_HPP_
+#include <com/sun/star/script/FinishReason.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SCRIPT_XENGINE_HPP_
+#include <com/sun/star/script/XEngine.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SCRIPT_INTERRUPTENGINEEVENT_HPP_
+#include <com/sun/star/script/InterruptEngineEvent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SCRIPT_XLIBRARYACCESS_HPP_
+#include <com/sun/star/script/XLibraryAccess.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BRIDGE_XBRIDGESUPPLIER_HPP_
+#include <com/sun/star/bridge/XBridgeSupplier.hpp>
+#endif
+//#ifndef _COM_SUN_STAR_LANG_XUNOTUNNEL_HPP_
+//#include <com/sun/star/lang/XUnoTunnel.hpp>
+//#endif
+
+#ifndef _COM_SUN_STAR_BRIDGE_MODELDEPENDENT_HPP_
+#include <com/sun/star/bridge/ModelDependent.hpp>
+#endif
+
+#include <typelib/typedescription.hxx>
+#include <rtl/uuid.h>
+#include <rtl/memory.h>
+#ifndef _RTL_USTRING_
+#include <rtl/ustring>
+#endif
+
+//#include <tools/presys.h>
+
+#include "jscriptclasses.hxx"
+//#include <tools/postsys.h>
+
+#include "oleobjw.hxx"
+#include "unoobjw.hxx"
+
+using namespace std;
+using namespace osl;
+using namespace rtl;
+using namespace cppu;
+using namespace com::sun::star::lang;
+using namespace com::sun::star::bridge;
+using namespace com::sun::star::bridge::ModelDependent;
+
+#define JSCRIPT_ID_PROPERTY L"_environment"
+#define JSCRIPT_ID L"jscript"
+namespace ole_adapter
+{
+
+
+
+
+
+// key: XInterface pointer created by Invocation Adapter Factory
+// value: XInterface pointer to the wrapper class.
+// Entries to the map are made within
+// Any createOleObjectWrapper(IUnknown* pUnknown, const Type& aType);
+// Entries are being deleted if the wrapper class's destructor has been
+// called.
+// Before UNO object is wrapped to COM object this map is checked
+// to see if the UNO object is already a wrapper.
+hash_map<sal_uInt32,sal_uInt32> AdapterToWrapperMap;
+// key: XInterface of the wrapper object.
+// value: XInterface of the Interface created by the Invocation Adapter Factory.
+// A COM wrapper is responsible for removing the corresponding entry
+// in AdapterToWrappperMap if it is being destroyed. Because the wrapper does not
+// know about its adapted interface it uses WrapperToAdapterMap to get the
+// adapted interface which is then used to locate the entry in AdapterToWrapperMap.
+hash_map<sal_uInt32,sal_uInt32> WrapperToAdapterMap;
+
+
+/*****************************************************************************
+
+ class implementation IUnknownWrapper_Impl
+
+*****************************************************************************/
+
+IUnknownWrapper_Impl::IUnknownWrapper_Impl( Reference<XMultiServiceFactory>& xFactory,
+ sal_uInt8 unoWrapperClass, sal_uInt8 comWrapperClass):
+ UnoConversionUtilities<IUnknownWrapper_Impl>( xFactory, unoWrapperClass, comWrapperClass),
+ m_pxIdlClass( NULL), m_pDispatch(NULL), m_eJScript( JScriptUndefined)
+{
+}
+
+
+IUnknownWrapper_Impl::~IUnknownWrapper_Impl()
+{
+ OGuard guard( globalWrapperMutex);
+ acquire(); // make sure we don't delete us twice
+ Reference<XInterface> xInt( static_cast<XWeak*>(this), UNO_QUERY);
+
+ // remove entries in global maps
+ typedef hash_map<sal_uInt32, sal_uInt32>::iterator _IT;
+ _IT it= WrapperToAdapterMap.find( (sal_uInt32) xInt.get());
+ if( it != WrapperToAdapterMap.end())
+ {
+ sal_uInt32 adapter= it->second;
+
+ AdapterToWrapperMap.erase( adapter);
+ WrapperToAdapterMap.erase( it);
+ }
+
+ o2u_attachCurrentThread();
+
+ m_pUnknown->Release();
+ if (m_pDispatch)
+ {
+ m_pDispatch->Release();
+ }
+
+}
+
+
+
+Reference<XIntrospectionAccess> SAL_CALL IUnknownWrapper_Impl::getIntrospection(void)
+ throw (RuntimeException )
+{
+ Reference<XIntrospectionAccess> ret;
+
+ return ret;
+}
+
+DispIdMap::iterator IUnknownWrapper_Impl::getDispIdEntry(const OUString& name)
+{
+
+ DispIdMap::iterator iter = m_dispIdMap.find(name);
+
+ if (iter == m_dispIdMap.end())
+ {
+ unsigned int flags = 0;
+ HRESULT result;
+ DISPID dispId;
+ OLECHAR* oleNames[1];
+
+ oleNames[0] = (OLECHAR*)name.getStr();
+
+ result = m_pDispatch->GetIDsOfNames(IID_NULL,
+ oleNames,
+ 1,
+ LOCALE_SYSTEM_DEFAULT,
+ &dispId);
+
+ if (result == NOERROR)
+ {
+ flags |= DISPATCH_METHOD;
+ flags |= DISPATCH_PROPERTYPUT;
+ flags |= DISPATCH_PROPERTYPUTREF;
+
+ DISPPARAMS dispparams;
+ VARIANT varResult;
+ EXCEPINFO excepinfo;
+ unsigned int uArgErr;
+
+ VariantInit(&varResult);
+
+ // converting UNO parameters to OLE variants
+ dispparams.rgdispidNamedArgs = NULL;
+ dispparams.cArgs = 0;
+ dispparams.cNamedArgs = 0;
+ dispparams.rgvarg = NULL;
+
+ // try to invoke PROPERTY_GET to evaluate if this name denotes a property
+ result = m_pDispatch->Invoke(dispId,
+ IID_NULL,
+ LOCALE_SYSTEM_DEFAULT,
+ DISPATCH_PROPERTYGET,
+ &dispparams,
+ &varResult,
+ &excepinfo,
+ &uArgErr);
+
+ if (result == S_OK)
+ {
+ flags |= DISPATCH_PROPERTYGET;
+ }
+
+ // freeing allocated OLE parameters
+ VariantClear(&varResult);
+
+ if (flags != 0)
+ {
+ iter = ((DispIdMap&)m_dispIdMap).insert(
+ DispIdMap::value_type(name, pair<DISPID, unsigned short>(dispId, flags))).first;
+ }
+ }
+ }
+
+ return iter;
+}
+
+
+Any SAL_CALL IUnknownWrapper_Impl::invoke( const OUString& aFunctionName,
+ const Sequence< Any >& aParams, Sequence< sal_Int16 >& aOutParamIndex,
+ Sequence< Any >& aOutParam )
+ throw(IllegalArgumentException, CannotConvertException, InvocationTargetException,
+ RuntimeException)
+{
+ setCurrentInvokeCall( aFunctionName);
+
+ Any ret;
+
+ DispIdMap::iterator iter = getDispIdEntry(aFunctionName);
+
+ if ((iter != m_dispIdMap.end()) && (((*iter).second.second & DISPATCH_METHOD) != 0))
+ {
+ TypeDescription methodDesc;
+ getMethodInfo( methodDesc );
+ if( methodDesc.is())
+ ret = in