summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorsb <sb@openoffice.org>2010-04-14 17:21:13 +0200
committersb <sb@openoffice.org>2010-04-14 17:21:13 +0200
commitcd6cdc2be3b081a80c8500a3b71a1ae12dd6bc9a (patch)
tree9e021ac079e52180ca0b8ec4a5057b58d5b7598b /shell
parentd5436f22776a63a56bd90b44b06eb9bbfc39607f (diff)
parentb0818f8883618cbfcb18f839ce9bf8709b23fcb6 (diff)
sb118: merged in backout
Diffstat (limited to 'shell')
-rw-r--r--shell/inc/internal/basereader.hxx7
-rw-r--r--shell/inc/internal/columninfo.hxx5
-rw-r--r--shell/inc/internal/config.hxx5
-rw-r--r--shell/inc/internal/contentreader.hxx7
-rw-r--r--shell/inc/internal/dbgmacros.hxx5
-rw-r--r--shell/inc/internal/fileextensions.hxx5
-rw-r--r--shell/inc/internal/global.hxx5
-rw-r--r--shell/inc/internal/i_xml_parser_event_handler.hxx5
-rw-r--r--shell/inc/internal/infotips.hxx5
-rw-r--r--shell/inc/internal/iso8601_converter.hxx5
-rw-r--r--shell/inc/internal/metainforeader.hxx7
-rw-r--r--shell/inc/internal/propertyhdl.hxx126
-rw-r--r--shell/inc/internal/propsheets.hxx5
-rw-r--r--shell/inc/internal/registry.hxx5
-rw-r--r--shell/inc/internal/shlxthdl.hxx5
-rw-r--r--shell/inc/internal/stream_helper.hxx35
-rw-r--r--shell/inc/internal/thumbviewer.hxx5
-rw-r--r--shell/inc/internal/types.hxx9
-rw-r--r--shell/inc/internal/utilities.hxx5
-rw-r--r--shell/inc/internal/xml_parser.hxx5
-rw-r--r--shell/inc/internal/zipfile.hxx17
-rw-r--r--shell/inc/kde_headers.h5
-rw-r--r--shell/inc/makefile.mk6
-rw-r--r--shell/inc/pch/precompiled_shell.cxx5
-rw-r--r--shell/inc/pch/precompiled_shell.hxx5
-rw-r--r--shell/prj/build.lst4
-rwxr-xr-xshell/prj/d.lst1
-rw-r--r--shell/qa/i_xml_parser_event_handler.hxx5
-rwxr-xr-xshell/qa/makefile.mk10
-rwxr-xr-xshell/qa/recent_docs.cxx5
-rwxr-xr-xshell/source/all/makefile.mk10
-rw-r--r--shell/source/all/ooofilereader/autostyletag.cxx5
-rw-r--r--shell/source/all/ooofilereader/autostyletag.hxx5
-rw-r--r--shell/source/all/ooofilereader/basereader.cxx21
-rw-r--r--shell/source/all/ooofilereader/contentreader.cxx47
-rw-r--r--shell/source/all/ooofilereader/dummytag.hxx5
-rw-r--r--shell/source/all/ooofilereader/itag.hxx5
-rw-r--r--shell/source/all/ooofilereader/keywordstag.cxx5
-rw-r--r--shell/source/all/ooofilereader/keywordstag.hxx5
-rw-r--r--shell/source/all/ooofilereader/makefile.mk10
-rw-r--r--shell/source/all/ooofilereader/metainforeader.cxx89
-rw-r--r--shell/source/all/ooofilereader/simpletag.cxx5
-rw-r--r--shell/source/all/ooofilereader/simpletag.hxx5
-rw-r--r--shell/source/all/xml_parser.cxx5
-rw-r--r--shell/source/all/zipfile/makefile.mk12
-rw-r--r--shell/source/all/zipfile/zipexcptn.cxx5
-rw-r--r--shell/source/all/zipfile/zipfile.cxx37
-rw-r--r--shell/source/backends/desktopbe/desktopbackend.cxx290
-rw-r--r--shell/source/backends/desktopbe/desktopbe.xml37
-rw-r--r--shell/source/backends/desktopbe/desktopbe1-ucd.txt3
-rw-r--r--shell/source/backends/desktopbe/desktopbecdef.cxx205
-rw-r--r--shell/source/backends/desktopbe/exports.map10
-rw-r--r--shell/source/backends/desktopbe/makefile.mk64
-rw-r--r--shell/source/backends/gconfbe/exports.map10
-rw-r--r--shell/source/backends/gconfbe/gconfaccess.cxx (renamed from shell/source/backends/gconfbe/gconflayer.cxx)589
-rw-r--r--shell/source/backends/gconfbe/gconfaccess.hxx119
-rw-r--r--shell/source/backends/gconfbe/gconfbackend.cxx1181
-rw-r--r--shell/source/backends/gconfbe/gconfbackend.hxx226
-rw-r--r--shell/source/backends/gconfbe/gconfbe.xml35
-rw-r--r--shell/source/backends/gconfbe/gconfbecdef.cxx151
-rw-r--r--shell/source/backends/gconfbe/gconflayer.hxx133
-rw-r--r--shell/source/backends/gconfbe/makefile.mk15
-rw-r--r--shell/source/backends/gconfbe/orbit.h5
-rw-r--r--shell/source/backends/kde4be/exports.map10
-rw-r--r--shell/source/backends/kde4be/kde4access.cxx319
-rw-r--r--shell/source/backends/kde4be/kde4access.hxx47
-rw-r--r--shell/source/backends/kde4be/kde4backend.cxx340
-rw-r--r--shell/source/backends/kde4be/kde4backend.hxx123
-rw-r--r--shell/source/backends/kde4be/kde4be.xml35
-rw-r--r--shell/source/backends/kde4be/kde4becdef.cxx143
-rw-r--r--shell/source/backends/kde4be/kde4commonlayer.cxx157
-rw-r--r--shell/source/backends/kde4be/kde4commonlayer.hxx51
-rw-r--r--shell/source/backends/kde4be/kde4inetlayer.cxx255
-rw-r--r--shell/source/backends/kde4be/kde4inetlayer.hxx59
-rw-r--r--shell/source/backends/kde4be/kde4pathslayer.cxx124
-rw-r--r--shell/source/backends/kde4be/kde4pathslayer.hxx82
-rw-r--r--shell/source/backends/kde4be/kde4vcllayer.cxx115
-rw-r--r--shell/source/backends/kde4be/kde4vcllayer.hxx53
-rw-r--r--shell/source/backends/kde4be/makefile.mk23
-rw-r--r--shell/source/backends/kdebe/exports.map10
-rw-r--r--shell/source/backends/kdebe/kdeaccess.cxx315
-rw-r--r--shell/source/backends/kdebe/kdeaccess.hxx47
-rw-r--r--shell/source/backends/kdebe/kdebackend.cxx340
-rw-r--r--shell/source/backends/kdebe/kdebackend.hxx128
-rw-r--r--shell/source/backends/kdebe/kdebe.xml35
-rw-r--r--shell/source/backends/kdebe/kdebecdef.cxx143
-rw-r--r--shell/source/backends/kdebe/kdecommonlayer.cxx153
-rw-r--r--shell/source/backends/kdebe/kdecommonlayer.hxx56
-rw-r--r--shell/source/backends/kdebe/kdeinetlayer.cxx254
-rwxr-xr-xshell/source/backends/kdebe/kdeinetlayer.hxx62
-rw-r--r--shell/source/backends/kdebe/kdepathslayer.cxx121
-rw-r--r--shell/source/backends/kdebe/kdepathslayer.hxx86
-rw-r--r--shell/source/backends/kdebe/kdevcllayer.cxx116
-rw-r--r--shell/source/backends/kdebe/kdevcllayer.hxx56
-rw-r--r--shell/source/backends/kdebe/makefile.mk23
-rw-r--r--shell/source/backends/localebe/exports.map10
-rw-r--r--shell/source/backends/localebe/localebackend.cxx120
-rw-r--r--shell/source/backends/localebe/localebackend.hxx99
-rw-r--r--shell/source/backends/localebe/localebe.xml1
-rw-r--r--shell/source/backends/localebe/localebecdef.cxx49
-rw-r--r--shell/source/backends/localebe/localelayer.cxx88
-rw-r--r--shell/source/backends/localebe/localelayer.hxx64
-rw-r--r--shell/source/backends/localebe/makefile.mk13
-rw-r--r--shell/source/backends/macbe/exports.map10
-rw-r--r--shell/source/backends/macbe/macbackend.cxx452
-rw-r--r--shell/source/backends/macbe/macbackend.hxx91
-rw-r--r--shell/source/backends/macbe/macbe.xml1
-rw-r--r--shell/source/backends/macbe/macbecdef.cxx48
-rw-r--r--shell/source/backends/macbe/macbelayer.cxx443
-rw-r--r--shell/source/backends/macbe/macbelayer.hxx104
-rw-r--r--shell/source/backends/macbe/makefile.mk11
-rw-r--r--shell/source/backends/wininetbe/exports.map10
-rw-r--r--shell/source/backends/wininetbe/makefile.mk13
-rw-r--r--shell/source/backends/wininetbe/wininetbackend.cxx367
-rw-r--r--shell/source/backends/wininetbe/wininetbackend.hxx123
-rw-r--r--shell/source/backends/wininetbe/wininetbe.xml1
-rw-r--r--shell/source/backends/wininetbe/wininetbecdef.cxx48
-rw-r--r--shell/source/backends/wininetbe/wininetlayer.cxx377
-rw-r--r--shell/source/backends/wininetbe/wininetlayer.hxx73
-rwxr-xr-xshell/source/cmdmail/cmdmailentry.cxx5
-rwxr-xr-xshell/source/cmdmail/cmdmailmsg.cxx5
-rw-r--r--shell/source/cmdmail/cmdmailmsg.hxx5
-rwxr-xr-xshell/source/cmdmail/cmdmailsuppl.cxx5
-rw-r--r--shell/source/cmdmail/cmdmailsuppl.hxx5
-rw-r--r--shell/source/cmdmail/exports.map10
-rw-r--r--shell/source/cmdmail/makefile.mk8
-rw-r--r--shell/source/tools/lngconvex/cmdline.cxx5
-rw-r--r--shell/source/tools/lngconvex/lngconvex.cxx8
-rw-r--r--shell/source/tools/lngconvex/makefile.mk6
-rw-r--r--shell/source/tools/regsvrex/makefile.mk6
-rw-r--r--shell/source/tools/regsvrex/regsvrex.cxx5
-rw-r--r--shell/source/unix/exec/exports.map10
-rw-r--r--shell/source/unix/exec/makefile.mk8
-rw-r--r--shell/source/unix/exec/shellexec.cxx5
-rw-r--r--shell/source/unix/exec/shellexec.hxx5
-rw-r--r--shell/source/unix/exec/shellexecentry.cxx5
-rw-r--r--shell/source/unix/exec/urltest.cxx5
-rw-r--r--shell/source/unix/misc/gnome-open-url.c5
-rw-r--r--shell/source/unix/misc/makefile.mk6
-rw-r--r--shell/source/unix/misc/open-url.c2
-rw-r--r--shell/source/unix/misc/senddoc.c2
-rw-r--r--shell/source/unix/misc/uri-encode.c5
-rw-r--r--shell/source/unix/sysshell/makefile.mk6
-rw-r--r--shell/source/unix/sysshell/recently_used_file.cxx5
-rw-r--r--shell/source/unix/sysshell/recently_used_file.hxx5
-rw-r--r--shell/source/unix/sysshell/recently_used_file_handler.cxx5
-rwxr-xr-xshell/source/unix/sysshell/recfile.map2
-rw-r--r--shell/source/win32/SysShExec.cxx5
-rw-r--r--shell/source/win32/SysShExec.hxx5
-rw-r--r--shell/source/win32/SysShentry.cxx5
-rw-r--r--shell/source/win32/makefile.mk8
-rw-r--r--shell/source/win32/shlxthandler/classfactory.cxx5
-rw-r--r--shell/source/win32/shlxthandler/classfactory.hxx5
-rw-r--r--shell/source/win32/shlxthandler/columninfo/columninfo.cxx5
-rw-r--r--shell/source/win32/shlxthandler/columninfo/makefile.mk8
-rw-r--r--shell/source/win32/shlxthandler/infotips/infotips.cxx5
-rw-r--r--shell/source/win32/shlxthandler/infotips/makefile.mk9
-rw-r--r--shell/source/win32/shlxthandler/makefile.mk29
-rw-r--r--shell/source/win32/shlxthandler/ooofilt/makefile.mk27
-rw-r--r--shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx299
-rw-r--r--shell/source/win32/shlxthandler/ooofilt/ooofilt.hxx52
-rw-r--r--shell/source/win32/shlxthandler/ooofilt/propspec.cxx5
-rw-r--r--shell/source/win32/shlxthandler/ooofilt/propspec.hxx5
-rw-r--r--shell/source/win32/shlxthandler/ooofilt/proxy/exports.dxp4
-rw-r--r--shell/source/win32/shlxthandler/ooofilt/proxy/makefile.mk92
-rw-r--r--shell/source/win32/shlxthandler/ooofilt/proxy/ooofiltproxy.cxx166
-rw-r--r--shell/source/win32/shlxthandler/ooofilt/stream_helper.cxx181
-rw-r--r--shell/source/win32/shlxthandler/prophdl/exports.dxp2
-rw-r--r--shell/source/win32/shlxthandler/prophdl/makefile.mk142
-rw-r--r--shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx463
-rw-r--r--shell/source/win32/shlxthandler/propsheets/document_statistic.cxx5
-rw-r--r--shell/source/win32/shlxthandler/propsheets/document_statistic.hxx5
-rw-r--r--shell/source/win32/shlxthandler/propsheets/listviewbuilder.cxx5
-rw-r--r--shell/source/win32/shlxthandler/propsheets/listviewbuilder.hxx5
-rw-r--r--shell/source/win32/shlxthandler/propsheets/makefile.mk19
-rw-r--r--shell/source/win32/shlxthandler/propsheets/propsheets.cxx60
-rw-r--r--shell/source/win32/shlxthandler/res/makefile.mk6
-rw-r--r--shell/source/win32/shlxthandler/shlxthdl.cxx14
-rw-r--r--shell/source/win32/shlxthandler/thumbviewer/makefile.mk8
-rw-r--r--shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx5
-rw-r--r--shell/source/win32/shlxthandler/util/dbgmacros.cxx5
-rw-r--r--shell/source/win32/shlxthandler/util/fileextensions.cxx5
-rw-r--r--shell/source/win32/shlxthandler/util/iso8601_converter.cxx9
-rw-r--r--shell/source/win32/shlxthandler/util/makefile.mk8
-rw-r--r--shell/source/win32/shlxthandler/util/registry.cxx5
-rw-r--r--shell/source/win32/shlxthandler/util/utilities.cxx5
-rw-r--r--shell/source/win32/simplemail/makefile.mk6
-rw-r--r--shell/source/win32/simplemail/senddoc.cxx5
-rw-r--r--shell/source/win32/simplemail/simplemapi.cxx5
-rw-r--r--shell/source/win32/simplemail/simplemapi.hxx5
-rw-r--r--shell/source/win32/simplemail/smplmailclient.cxx5
-rw-r--r--shell/source/win32/simplemail/smplmailclient.hxx5
-rw-r--r--shell/source/win32/simplemail/smplmailentry.cxx5
-rw-r--r--shell/source/win32/simplemail/smplmailmsg.cxx5
-rw-r--r--shell/source/win32/simplemail/smplmailmsg.hxx5
-rw-r--r--shell/source/win32/simplemail/smplmailsuppl.cxx5
-rw-r--r--shell/source/win32/simplemail/smplmailsuppl.hxx5
-rw-r--r--shell/source/win32/workbench/TestProxySet.cxx5
-rw-r--r--shell/source/win32/workbench/TestSmplMail.cxx5
-rw-r--r--shell/source/win32/workbench/TestSysShExec.cxx5
-rw-r--r--shell/source/win32/workbench/makefile.mk6
201 files changed, 4601 insertions, 7496 deletions
diff --git a/shell/inc/internal/basereader.hxx b/shell/inc/internal/basereader.hxx
index 4da8b7fa95be..fcdf1cdd7dff 100644
--- a/shell/inc/internal/basereader.hxx
+++ b/shell/inc/internal/basereader.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: basereader.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -50,7 +47,7 @@ public:
protected: // protected because its only an implementation relevant class
CBaseReader( const std::string& DocumentName );
- CBaseReader( void* stream, zlib_filefunc_def* fa );
+ CBaseReader( void* stream, zlib_filefunc_def* fa );
virtual void start_document();
diff --git a/shell/inc/internal/columninfo.hxx b/shell/inc/internal/columninfo.hxx
index e08babffe04b..4e392dd76f4d 100644
--- a/shell/inc/internal/columninfo.hxx
+++ b/shell/inc/internal/columninfo.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: columninfo.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/inc/internal/config.hxx b/shell/inc/internal/config.hxx
index e9b3e0fd59ac..3c10e7db26a7 100644
--- a/shell/inc/internal/config.hxx
+++ b/shell/inc/internal/config.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: config.hxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/inc/internal/contentreader.hxx b/shell/inc/internal/contentreader.hxx
index d8b2d77d28c0..63b0c550c534 100644
--- a/shell/inc/internal/contentreader.hxx
+++ b/shell/inc/internal/contentreader.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: contentreader.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -43,7 +40,7 @@ public:
//CContentReader( const std::string& DocumentName );
CContentReader( const std::string& DocumentName, LocaleSet_t const & DocumentLocale );
- CContentReader( void* stream, LocaleSet_t const & DocumentLocale, zlib_filefunc_def* fa );
+ CContentReader( void* stream, LocaleSet_t const & DocumentLocale, zlib_filefunc_def* fa );
/** Get the chunkbuffer.
diff --git a/shell/inc/internal/dbgmacros.hxx b/shell/inc/internal/dbgmacros.hxx
index b7a0c2eab747..fbab023664ac 100644
--- a/shell/inc/internal/dbgmacros.hxx
+++ b/shell/inc/internal/dbgmacros.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dbgmacros.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/inc/internal/fileextensions.hxx b/shell/inc/internal/fileextensions.hxx
index e23e30a665a3..48d6f283ea1d 100644
--- a/shell/inc/internal/fileextensions.hxx
+++ b/shell/inc/internal/fileextensions.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: fileextensions.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/inc/internal/global.hxx b/shell/inc/internal/global.hxx
index a4596b428e69..ebf3305934bd 100644
--- a/shell/inc/internal/global.hxx
+++ b/shell/inc/internal/global.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: global.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/inc/internal/i_xml_parser_event_handler.hxx b/shell/inc/internal/i_xml_parser_event_handler.hxx
index 72b854ded738..5164f2236522 100644
--- a/shell/inc/internal/i_xml_parser_event_handler.hxx
+++ b/shell/inc/internal/i_xml_parser_event_handler.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: i_xml_parser_event_handler.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/inc/internal/infotips.hxx b/shell/inc/internal/infotips.hxx
index eb1c148411ea..8193615a505f 100644
--- a/shell/inc/internal/infotips.hxx
+++ b/shell/inc/internal/infotips.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: infotips.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/inc/internal/iso8601_converter.hxx b/shell/inc/internal/iso8601_converter.hxx
index ad4ddb08189e..f7f00bbe1c53 100644
--- a/shell/inc/internal/iso8601_converter.hxx
+++ b/shell/inc/internal/iso8601_converter.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: iso8601_converter.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/inc/internal/metainforeader.hxx b/shell/inc/internal/metainforeader.hxx
index 1e004b5a3727..ea29dff07c80 100644
--- a/shell/inc/internal/metainforeader.hxx
+++ b/shell/inc/internal/metainforeader.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: metainforeader.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -46,7 +43,7 @@ public:
CMetaInfoReader( const std::string& DocumentName );
- CMetaInfoReader( void* stream, zlib_filefunc_def* fa);
+ CMetaInfoReader( void* stream, zlib_filefunc_def* fa);
/** check if the Tag is in the target meta.xml file.
diff --git a/shell/inc/internal/propertyhdl.hxx b/shell/inc/internal/propertyhdl.hxx
new file mode 100644
index 000000000000..6379fdf0137b
--- /dev/null
+++ b/shell/inc/internal/propertyhdl.hxx
@@ -0,0 +1,126 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: PropertyHdl.hxx,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef PROPERTYHDL_HXX_INCLUDED
+#define PROPERTYHDL_HXX_INCLUDED
+
+#if defined _MSC_VER
+#pragma warning(push, 1)
+#pragma warning(disable:4917)
+#endif
+#include <shlobj.h>
+#if defined _MSC_VER
+#pragma warning(pop)
+#endif
+
+// {AE424E85-F6DF-4910-A6A9-438797986431}
+const CLSID CLSID_PROPERTY_HANDLER =
+{ 0xae424e85, 0xf6df, 0x4910, { 0xa6, 0xa9, 0x43, 0x87, 0x97, 0x98, 0x64, 0x31 } };
+
+class CMetaInfoReader;
+
+class CPropertyHdl : public IPropertyStore,
+ public IPropertyStoreCapabilities,
+ public IInitializeWithStream
+{
+public:
+ CPropertyHdl(long RefCnt = 1);
+ virtual ~CPropertyHdl();
+
+ //-----------------------------
+ // IUnknown methods
+ //-----------------------------
+ virtual HRESULT STDMETHODCALLTYPE QueryInterface(
+ REFIID riid,
+ void __RPC_FAR *__RPC_FAR *ppvObject );
+ virtual ULONG STDMETHODCALLTYPE AddRef( void );
+ virtual ULONG STDMETHODCALLTYPE Release( void );
+
+ //-----------------------------
+ // IPropertyStore
+ //-----------------------------
+ virtual HRESULT STDMETHODCALLTYPE GetCount( DWORD *pcProps );
+ virtual HRESULT STDMETHODCALLTYPE GetAt( DWORD iProp, PROPERTYKEY *pkey );
+ virtual HRESULT STDMETHODCALLTYPE GetValue( REFPROPERTYKEY key, PROPVARIANT *pPropVar );
+ virtual HRESULT STDMETHODCALLTYPE SetValue( REFPROPERTYKEY key, REFPROPVARIANT propVar );
+ virtual HRESULT STDMETHODCALLTYPE Commit();
+
+ //-----------------------------
+ // IPropertyStoreCapabilities
+ //-----------------------------
+ virtual HRESULT STDMETHODCALLTYPE IsPropertyWritable( REFPROPERTYKEY key );
+
+ //-----------------------------
+ // IInitializeWithStream
+ //-----------------------------
+ virtual HRESULT STDMETHODCALLTYPE Initialize(IStream *pStream, DWORD grfMode);
+
+private:
+ void LoadProperties( CMetaInfoReader *pMetaInfoReader );
+ HRESULT GetItemData( CMetaInfoReader *pMetaInfoReader, UINT nIndex, PROPVARIANT *pVarData );
+
+private:
+ long m_RefCnt;
+ IPropertyStoreCache* m_pCache;
+};
+
+class CClassFactory : public IClassFactory
+{
+public:
+ CClassFactory( const CLSID& clsid );
+ virtual ~CClassFactory();
+
+ //-----------------------------
+ // IUnknown methods
+ //-----------------------------
+ virtual HRESULT STDMETHODCALLTYPE QueryInterface(
+ REFIID riid,
+ void __RPC_FAR *__RPC_FAR *ppvObject);
+ virtual ULONG STDMETHODCALLTYPE AddRef( void );
+ virtual ULONG STDMETHODCALLTYPE Release( void );
+
+ //-----------------------------
+ // IClassFactory methods
+ //-----------------------------
+ virtual HRESULT STDMETHODCALLTYPE CreateInstance(
+ IUnknown __RPC_FAR *pUnkOuter,
+ REFIID riid,
+ void __RPC_FAR *__RPC_FAR *ppvObject);
+
+ virtual HRESULT STDMETHODCALLTYPE LockServer( BOOL fLock );
+ static bool IsLocked();
+
+private:
+ long m_RefCnt;
+ CLSID m_Clsid;
+ static long s_ServerLocks;
+};
+
+#endif
diff --git a/shell/inc/internal/propsheets.hxx b/shell/inc/internal/propsheets.hxx
index 0ebafcf0aa3a..0159379e3127 100644
--- a/shell/inc/internal/propsheets.hxx
+++ b/shell/inc/internal/propsheets.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: propsheets.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/inc/internal/registry.hxx b/shell/inc/internal/registry.hxx
index 81ccdc157305..25f1749a6a3c 100644
--- a/shell/inc/internal/registry.hxx
+++ b/shell/inc/internal/registry.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: registry.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/inc/internal/shlxthdl.hxx b/shell/inc/internal/shlxthdl.hxx
index 782212f6dc5b..b13a142b6e2c 100644
--- a/shell/inc/internal/shlxthdl.hxx
+++ b/shell/inc/internal/shlxthdl.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: shlxthdl.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/inc/internal/stream_helper.hxx b/shell/inc/internal/stream_helper.hxx
new file mode 100644
index 000000000000..2ef4529b54ce
--- /dev/null
+++ b/shell/inc/internal/stream_helper.hxx
@@ -0,0 +1,35 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2010 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef STREAM_HELPER_HXX_INCLUDED
+#define STREAM_HELPER_HXX_INCLUDED
+
+#include "internal/types.hxx"
+
+IStream* PrepareIStream( IStream* pStream, zlib_filefunc_def &zFileFunc );
+
+#endif
diff --git a/shell/inc/internal/thumbviewer.hxx b/shell/inc/internal/thumbviewer.hxx
index 174048ff0cca..8c4a8979a181 100644
--- a/shell/inc/internal/thumbviewer.hxx
+++ b/shell/inc/internal/thumbviewer.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: thumbviewer.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/inc/internal/types.hxx b/shell/inc/internal/types.hxx
index 730263060041..c11692912aec 100644
--- a/shell/inc/internal/types.hxx
+++ b/shell/inc/internal/types.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: types.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -36,8 +33,8 @@
#include <utility>
#include <vector>
#include <stack>
-#include <external/zlib/zlib.h>
-#include <external/zlib/ioapi.h>
+#include <external/zlib/zlib.h>
+#include <external/zlib/ioapi.h>
typedef std::vector<std::wstring> StringList_t;
diff --git a/shell/inc/internal/utilities.hxx b/shell/inc/internal/utilities.hxx
index 4da6d6ce1eca..4701a2682446 100644
--- a/shell/inc/internal/utilities.hxx
+++ b/shell/inc/internal/utilities.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: utilities.hxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/inc/internal/xml_parser.hxx b/shell/inc/internal/xml_parser.hxx
index ff9842c18208..57e8a4fd6d88 100644
--- a/shell/inc/internal/xml_parser.hxx
+++ b/shell/inc/internal/xml_parser.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: xml_parser.hxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/inc/internal/zipfile.hxx b/shell/inc/internal/zipfile.hxx
index 2a860bb4c6cd..a3e3575082c0 100644
--- a/shell/inc/internal/zipfile.hxx
+++ b/shell/inc/internal/zipfile.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: zipfile.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -35,9 +32,9 @@
#define _WINDOWS
#endif
-
-#include <external/zlib/unzip.h>
-
+
+#include <external/zlib/unzip.h>
+
#include <string>
#include <vector>
@@ -71,7 +68,7 @@ public:
*/
static bool IsZipFile(const std::string& FileName);
- static bool IsZipFile(void* stream);
+ static bool IsZipFile(void* stream);
/** Returns wheter the version of the specified zip file may be uncompressed with the
@@ -91,7 +88,7 @@ public:
*/
static bool IsValidZipFileVersionNumber(const std::string& FileName);
- static bool IsValidZipFileVersionNumber(void* stream);
+ static bool IsValidZipFileVersionNumber(void* stream);
public:
@@ -109,7 +106,7 @@ public:
*/
ZipFile(const std::string& FileName);
- ZipFile(void* stream, zlib_filefunc_def* fa);
+ ZipFile(void* stream, zlib_filefunc_def* fa);
/** Destroys a zip file
diff --git a/shell/inc/kde_headers.h b/shell/inc/kde_headers.h
index ccbffc99cb99..772a5382fe81 100644
--- a/shell/inc/kde_headers.h
+++ b/shell/inc/kde_headers.h
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: kde_headers.h,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/inc/makefile.mk b/shell/inc/makefile.mk
index ae070770d882..c297cb4f77e9 100644
--- a/shell/inc/makefile.mk
+++ b/shell/inc/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.3 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/inc/pch/precompiled_shell.cxx b/shell/inc/pch/precompiled_shell.cxx
index 76b567ae566e..778ff4e4578e 100644
--- a/shell/inc/pch/precompiled_shell.cxx
+++ b/shell/inc/pch/precompiled_shell.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: precompiled_shell.cxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/inc/pch/precompiled_shell.hxx b/shell/inc/pch/precompiled_shell.hxx
index 8371985ebd82..a3ea4e27b4bb 100644
--- a/shell/inc/pch/precompiled_shell.hxx
+++ b/shell/inc/pch/precompiled_shell.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: precompiled_shell.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/prj/build.lst b/shell/prj/build.lst
index 0fdf02409682..9a5bf35dde3f 100644
--- a/shell/prj/build.lst
+++ b/shell/prj/build.lst
@@ -22,7 +22,8 @@ sl shell\source\win32\shlxthandler\propsheets nmake - w sl_win32_shlx
sl shell\source\win32\shlxthandler\infotips nmake - w sl_win32_shlxthandler_infotips sl_inc NULL
sl shell\source\win32\shlxthandler\columninfo nmake - w sl_win32_shlxthandler_columninfo sl_inc NULL
sl shell\source\win32\shlxthandler\thumbviewer nmake - w sl_win32_shlxthandler_thumbviewer sl_inc NULL
-sl shell\source\win32\shlxthandler nmake - w sl_win32_shlxthandler sl_win32_lngconv.w sl_win32_shlxthandler_res.w sl_win32_shlxthandler_util.w sl_all_zipfile.w sl_all_ooofilereader.w sl_win32_shlxthandler_propsheets.w sl_win32_shlxthandler_infotips.w sl_win32_shlxthandler_columninfo.w sl_win32_shlxthandler_thumbviewer.w sl_inc NULL
+sl shell\source\win32\shlxthandler\prophdl nmake - w sl_win32_shlxthandler_prophdl sl_win32_shlxthandler_ooofilt.w sl_inc NULL
+sl shell\source\win32\shlxthandler nmake - w sl_win32_shlxthandler sl_win32_lngconv.w sl_win32_shlxthandler_res.w sl_win32_shlxthandler_util.w sl_all_zipfile.w sl_all_ooofilereader.w sl_win32_shlxthandler_propsheets.w sl_win32_shlxthandler_infotips.w sl_win32_shlxthandler_columninfo.w sl_win32_shlxthandler_thumbviewer.w sl_win32_shlxthandler_prophdl.w sl_inc sl_win32_shlxthandler_ooofilt.w NULL
sl shell\source\backends\localebe nmake - all sl_backends_localebe sl_inc NULL
sl shell\source\backends\wininetbe nmake - w sl_backends_wininetbe sl_inc NULL
sl shell\source\backends\macbe nmake - u sl_backends_macbe sl_inc NULL
@@ -31,4 +32,3 @@ sl shell\source\backends\kdebe nmake - u sl_backends_k
sl shell\source\backends\kde4be nmake - u sl_backends_kde4be sl_inc NULL
sl shell\source\backends\desktopbe nmake - u sl_backends_desktopbe sl_inc NULL
sl shell\source\win32\shlxthandler\ooofilt nmake - w sl_win32_shlxthandler_ooofilt sl_all_zipfile.w sl_all_ooofilereader.w sl_win32_shlxthandler_util.w sl_all sl_inc NULL
-sl shell\source\win32\shlxthandler\ooofilt\proxy nmake - w sl_win32_ooofiltproxy sl_inc NULL
diff --git a/shell/prj/d.lst b/shell/prj/d.lst
index eee13ef34fe9..ea8be0bbaf04 100755
--- a/shell/prj/d.lst
+++ b/shell/prj/d.lst
@@ -7,6 +7,7 @@
..\%__SRC%\bin\x64\shlxthdl.dll %_DEST%\bin%_EXT%\shlxthdl_x64.dll
..\%__SRC%\bin\x64\ooofiltproxy.dll %_DEST%\bin%_EXT%\ooofiltproxy_x64.dll
..\%__SRC%\bin\x64\ooofilt.dll %_DEST%\bin%_EXT%\ooofilt_x64.dll
+..\%__SRC%\bin\x64\propertyhdl.dll %_DEST%\bin%_EXT%\propertyhdl_x64.dll
..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib
..\%__SRC%\lib\*.a %_DEST%\lib%_EXT%\*.a
diff --git a/shell/qa/i_xml_parser_event_handler.hxx b/shell/qa/i_xml_parser_event_handler.hxx
index d95493fdd25f..1758e2075b55 100644
--- a/shell/qa/i_xml_parser_event_handler.hxx
+++ b/shell/qa/i_xml_parser_event_handler.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: i_xml_parser_event_handler.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/qa/makefile.mk b/shell/qa/makefile.mk
index e935abd1c0d6..cc91a6b1ad5c 100755
--- a/shell/qa/makefile.mk
+++ b/shell/qa/makefile.mk
@@ -1,15 +1,11 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2008 by Sun Microsystems, Inc.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.4 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
@@ -41,6 +37,8 @@ ENABLE_EXCEPTIONS=TRUE
.INCLUDE : settings.mk
+CFLAGSCXX += $(CPPUNIT_CFLAGS)
+
# BEGIN ----------------------------------------------------------------
# auto generated Target:testjob by codegen.pl
diff --git a/shell/qa/recent_docs.cxx b/shell/qa/recent_docs.cxx
index 5936c8c033b1..b4408e2f7737 100755
--- a/shell/qa/recent_docs.cxx
+++ b/shell/qa/recent_docs.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: recent_docs.cxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/all/makefile.mk b/shell/source/all/makefile.mk
index 623aad6d69c1..66b185132fa6 100755
--- a/shell/source/all/makefile.mk
+++ b/shell/source/all/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.9 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
@@ -69,5 +65,9 @@ SLOFILES_X64=$(SLO_X64)$/xml_parser.obj
.INCLUDE : set_wntx64.mk
.INCLUDE : target.mk
+.IF "$(OS)" == "WNT"
+INCLUDE!:=$(subst,/stl, $(INCLUDE))
+.EXPORT : INCLUDE
+.ENDIF
.INCLUDE : tg_wntx64.mk
diff --git a/shell/source/all/ooofilereader/autostyletag.cxx b/shell/source/all/ooofilereader/autostyletag.cxx
index 57084491f6f1..6d51259345df 100644
--- a/shell/source/all/ooofilereader/autostyletag.cxx
+++ b/shell/source/all/ooofilereader/autostyletag.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: autostyletag.cxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/all/ooofilereader/autostyletag.hxx b/shell/source/all/ooofilereader/autostyletag.hxx
index 2b51f19125a4..3957dd1b09b8 100644
--- a/shell/source/all/ooofilereader/autostyletag.hxx
+++ b/shell/source/all/ooofilereader/autostyletag.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: autostyletag.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/all/ooofilereader/basereader.cxx b/shell/source/all/ooofilereader/basereader.cxx
index d9be6740f057..2fc4a0c79297 100644
--- a/shell/source/all/ooofilereader/basereader.cxx
+++ b/shell/source/all/ooofilereader/basereader.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: basereader.cxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -50,14 +47,14 @@ m_ZipFile( DocumentName )
//
//------------------------------
-CBaseReader::CBaseReader(void * sw, zlib_filefunc_def* fa):
-m_ZipFile( sw , fa )
-{
-}
-
-//------------------------------
-//
-//------------------------------
+CBaseReader::CBaseReader(void * sw, zlib_filefunc_def* fa):
+m_ZipFile( sw , fa )
+{
+}
+
+//------------------------------
+//
+//------------------------------
CBaseReader::~CBaseReader()
{
diff --git a/shell/source/all/ooofilereader/contentreader.cxx b/shell/source/all/ooofilereader/contentreader.cxx
index 111647e70ad6..4afb278ff2c8 100644
--- a/shell/source/all/ooofilereader/contentreader.cxx
+++ b/shell/source/all/ooofilereader/contentreader.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: contentreader.cxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -61,27 +58,27 @@ CBaseReader( DocumentName )
}
}
-CContentReader::CContentReader( void* stream, LocaleSet_t const & DocumentLocale, zlib_filefunc_def* fa ) :
-CBaseReader( stream, fa )
-{
-try
- {
- m_DefaultLocale = DocumentLocale;
- Initialize( DOC_CONTENT_NAME );
- }
- catch(xml_parser_exception&
- #if OSL_DEBUG_LEVEL > 0
- ex
- #endif
- )
- {
- ENSURE(false, ex.what());
- }
- catch(...)
- {
- ENSURE(false, "Unknown error");
- }
-}
+CContentReader::CContentReader( void* stream, LocaleSet_t const & DocumentLocale, zlib_filefunc_def* fa ) :
+CBaseReader( stream, fa )
+{
+try
+ {
+ m_DefaultLocale = DocumentLocale;
+ Initialize( DOC_CONTENT_NAME );
+ }
+ catch(xml_parser_exception&
+ #if OSL_DEBUG_LEVEL > 0
+ ex
+ #endif
+ )
+ {
+ ENSURE(false, ex.what());
+ }
+ catch(...)
+ {
+ ENSURE(false, "Unknown error");
+ }
+}
/** destructor.
diff --git a/shell/source/all/ooofilereader/dummytag.hxx b/shell/source/all/ooofilereader/dummytag.hxx
index fe88a6142a18..cbd4382e84e3 100644
--- a/shell/source/all/ooofilereader/dummytag.hxx
+++ b/shell/source/all/ooofilereader/dummytag.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dummytag.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/all/ooofilereader/itag.hxx b/shell/source/all/ooofilereader/itag.hxx
index 074fb6fead75..97c09ed35b32 100644
--- a/shell/source/all/ooofilereader/itag.hxx
+++ b/shell/source/all/ooofilereader/itag.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: itag.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/all/ooofilereader/keywordstag.cxx b/shell/source/all/ooofilereader/keywordstag.cxx
index 9ed2a304334f..2ffccfddaff2 100644
--- a/shell/source/all/ooofilereader/keywordstag.cxx
+++ b/shell/source/all/ooofilereader/keywordstag.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: keywordstag.cxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/all/ooofilereader/keywordstag.hxx b/shell/source/all/ooofilereader/keywordstag.hxx
index 775388c55401..634810febd31 100644
--- a/shell/source/all/ooofilereader/keywordstag.hxx
+++ b/shell/source/all/ooofilereader/keywordstag.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: keywordstag.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/all/ooofilereader/makefile.mk b/shell/source/all/ooofilereader/makefile.mk
index b893db45d849..bf6365526eec 100644
--- a/shell/source/all/ooofilereader/makefile.mk
+++ b/shell/source/all/ooofilereader/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.7 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
@@ -85,5 +81,9 @@ LIB1FILES_X64=$(SLB_X64)$/zipfile.lib\
.INCLUDE : set_wntx64.mk
.INCLUDE : target.mk
+.IF "$(OS)" == "WNT"
+INCLUDE!:=$(subst,/stl, $(INCLUDE))
+.EXPORT : INCLUDE
+.ENDIF
.INCLUDE : tg_wntx64.mk
diff --git a/shell/source/all/ooofilereader/metainforeader.cxx b/shell/source/all/ooofilereader/metainforeader.cxx
index cec17b59d3c9..24e59f6845da 100644
--- a/shell/source/all/ooofilereader/metainforeader.cxx
+++ b/shell/source/all/ooofilereader/metainforeader.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: metainforeader.cxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -80,48 +77,48 @@ CBaseReader( DocumentName )
}
}
-CMetaInfoReader::CMetaInfoReader( void* stream, zlib_filefunc_def* fa) :
-CBaseReader( stream, fa)
-{
-try
- {
- m_pKeywords_Builder = new CKeywordsTag( );
- m_pSimple_Builder = new CSimpleTag( );
- m_pDummy_Builder = new CDummyTag( );
-
- //retrieve all infomation that is useful
- m_AllMetaInfo[META_INFO_AUTHOR] = EMPTY_XML_TAG;
- m_AllMetaInfo[META_INFO_TITLE] = EMPTY_XML_TAG;
- m_AllMetaInfo[META_INFO_SUBJECT] = EMPTY_XML_TAG;
- m_AllMetaInfo[META_INFO_KEYWORDS] = EMPTY_XML_TAG;
- m_AllMetaInfo[META_INFO_DESCRIPTION] = EMPTY_XML_TAG;
- m_AllMetaInfo[META_INFO_DOCUMENT_STATISTIC] = EMPTY_XML_TAG;
-
- m_AllMetaInfo[META_INFO_GENERATOR] = EMPTY_XML_TAG;
- m_AllMetaInfo[META_INFO_CREATION] = EMPTY_XML_TAG;
- m_AllMetaInfo[META_INFO_CREATOR] = EMPTY_XML_TAG;
- m_AllMetaInfo[META_INFO_MODIFIED] = EMPTY_XML_TAG;
- m_AllMetaInfo[META_INFO_LANGUAGE] = EMPTY_XML_TAG;
- m_AllMetaInfo[META_INFO_DOCUMENT_NUMBER] = EMPTY_XML_TAG;
- m_AllMetaInfo[META_INFO_EDITING_TIME] = EMPTY_XML_TAG;
-
- Initialize( META_CONTENT_NAME );
- }
- catch(xml_parser_exception&
- #if OSL_DEBUG_LEVEL > 0
- ex
- #endif
- )
- {
- ENSURE(false, ex.what());
- }
- catch(...)
- {
- ENSURE(false, "Unknown error");
- }
-
-}
-
+CMetaInfoReader::CMetaInfoReader( void* stream, zlib_filefunc_def* fa) :
+CBaseReader( stream, fa)
+{
+try
+ {
+ m_pKeywords_Builder = new CKeywordsTag( );
+ m_pSimple_Builder = new CSimpleTag( );
+ m_pDummy_Builder = new CDummyTag( );
+
+ //retrieve all infomation that is useful
+ m_AllMetaInfo[META_INFO_AUTHOR] = EMPTY_XML_TAG;
+ m_AllMetaInfo[META_INFO_TITLE] = EMPTY_XML_TAG;
+ m_AllMetaInfo[META_INFO_SUBJECT] = EMPTY_XML_TAG;
+ m_AllMetaInfo[META_INFO_KEYWORDS] = EMPTY_XML_TAG;
+ m_AllMetaInfo[META_INFO_DESCRIPTION] = EMPTY_XML_TAG;
+ m_AllMetaInfo[META_INFO_DOCUMENT_STATISTIC] = EMPTY_XML_TAG;
+
+ m_AllMetaInfo[META_INFO_GENERATOR] = EMPTY_XML_TAG;
+ m_AllMetaInfo[META_INFO_CREATION] = EMPTY_XML_TAG;
+ m_AllMetaInfo[META_INFO_CREATOR] = EMPTY_XML_TAG;
+ m_AllMetaInfo[META_INFO_MODIFIED] = EMPTY_XML_TAG;
+ m_AllMetaInfo[META_INFO_LANGUAGE] = EMPTY_XML_TAG;
+ m_AllMetaInfo[META_INFO_DOCUMENT_NUMBER] = EMPTY_XML_TAG;
+ m_AllMetaInfo[META_INFO_EDITING_TIME] = EMPTY_XML_TAG;
+
+ Initialize( META_CONTENT_NAME );
+ }
+ catch(xml_parser_exception&
+ #if OSL_DEBUG_LEVEL > 0
+ ex
+ #endif
+ )
+ {
+ ENSURE(false, ex.what());
+ }
+ catch(...)
+ {
+ ENSURE(false, "Unknown error");
+ }
+
+}
+
/** destructor.
*/
diff --git a/shell/source/all/ooofilereader/simpletag.cxx b/shell/source/all/ooofilereader/simpletag.cxx
index 646cf136002e..8fad2dc618ed 100644
--- a/shell/source/all/ooofilereader/simpletag.cxx
+++ b/shell/source/all/ooofilereader/simpletag.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: simpletag.cxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/all/ooofilereader/simpletag.hxx b/shell/source/all/ooofilereader/simpletag.hxx
index 394af4db7c1a..8e251c4329ab 100644
--- a/shell/source/all/ooofilereader/simpletag.hxx
+++ b/shell/source/all/ooofilereader/simpletag.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: simpletag.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/all/xml_parser.cxx b/shell/source/all/xml_parser.cxx
index 046397f64b8b..b7f73d2404a8 100644
--- a/shell/source/all/xml_parser.cxx
+++ b/shell/source/all/xml_parser.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: xml_parser.cxx,v $
- * $Revision: 1.10 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/all/zipfile/makefile.mk b/shell/source/all/zipfile/makefile.mk
index 9f294ce7aad0..4e0af2891027 100644
--- a/shell/source/all/zipfile/makefile.mk
+++ b/shell/source/all/zipfile/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.5 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
@@ -33,7 +29,7 @@ PRJ=..$/..$/..
PRJNAME=shell
TARGET=zipfile
ENABLE_EXCEPTIONS=TRUE
-EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
+EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
@@ -54,5 +50,9 @@ SLOFILES_X64=$(SLO_X64)$/zipfile.obj\
.INCLUDE : set_wntx64.mk
.INCLUDE : target.mk
+.IF "$(OS)" == "WNT"
+INCLUDE!:=$(subst,/stl, $(INCLUDE))
+.EXPORT : INCLUDE
+.ENDIF
.INCLUDE : tg_wntx64.mk
diff --git a/shell/source/all/zipfile/zipexcptn.cxx b/shell/source/all/zipfile/zipexcptn.cxx
index 5602322c0aaf..fcbbf54382bf 100644
--- a/shell/source/all/zipfile/zipexcptn.cxx
+++ b/shell/source/all/zipfile/zipexcptn.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: zipexcptn.cxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/all/zipfile/zipfile.cxx b/shell/source/all/zipfile/zipfile.cxx
index 06fb6cc934d3..96dd7922ec08 100644
--- a/shell/source/all/zipfile/zipfile.cxx
+++ b/shell/source/all/zipfile/zipfile.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: zipfile.cxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -79,10 +76,10 @@ bool ZipFile::IsZipFile(const std::string& /*FileName*/)
return true;
}
-bool ZipFile::IsZipFile(void* /*stream*/)
-{
- return true;
-}
+bool ZipFile::IsZipFile(void* /*stream*/)
+{
+ return true;
+}
/** Returns wheter the version of the specified zip file may be uncompressed with the
@@ -105,10 +102,10 @@ bool ZipFile::IsValidZipFileVersionNumber(const std::string& /*FileName*/)
return true;
}
-bool ZipFile::IsValidZipFileVersionNumber(void* /* stream*/)
-{
- return true;
-}
+bool ZipFile::IsValidZipFileVersionNumber(void* /* stream*/)
+{
+ return true;
+}
/** Constructs a zip file from a zip file
@@ -131,14 +128,14 @@ ZipFile::ZipFile(const std::string& FileName)
throw IOException(-1);
}
-ZipFile::ZipFile(void* stream, zlib_filefunc_def* fa)
-{
- fa->opaque = stream;
- m_uzFile = unzOpen2((const char *)NULL, fa);
-
- if (0 == m_uzFile)
- throw IOException(-1);
-}
+ZipFile::ZipFile(void* stream, zlib_filefunc_def* fa)
+{
+ fa->opaque = stream;
+ m_uzFile = unzOpen2((const char *)NULL, fa);
+
+ if (0 == m_uzFile)
+ throw IOException(-1);
+}
/** Destroys a zip file
diff --git a/shell/source/backends/desktopbe/desktopbackend.cxx b/shell/source/backends/desktopbe/desktopbackend.cxx
new file mode 100644
index 000000000000..21371755b479
--- /dev/null
+++ b/shell/source/backends/desktopbe/desktopbackend.cxx
@@ -0,0 +1,290 @@
+/*************************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+************************************************************************/
+
+#include "precompiled_shell.hxx"
+#include "sal/config.h"
+
+#include "boost/noncopyable.hpp"
+#include "com/sun/star/beans/Optional.hpp"
+#include "com/sun/star/beans/PropertyVetoException.hpp"
+#include "com/sun/star/beans/UnknownPropertyException.hpp"
+#include "com/sun/star/beans/XPropertyChangeListener.hpp"
+#include "com/sun/star/beans/XPropertySet.hpp"
+#include "com/sun/star/beans/XPropertySetInfo.hpp"
+#include "com/sun/star/beans/XVetoableChangeListener.hpp"
+#include "com/sun/star/lang/IllegalArgumentException.hpp"
+#include "com/sun/star/lang/WrappedTargetException.hpp"
+#include "com/sun/star/lang/XMultiComponentFactory.hpp"
+#include "com/sun/star/lang/XServiceInfo.hpp"
+#include "com/sun/star/lang/WrappedTargetException.hpp"
+#include "com/sun/star/uno/Any.hxx"
+#include "com/sun/star/uno/Exception.hpp"
+#include "com/sun/star/uno/Reference.hxx"
+#include "com/sun/star/uno/RuntimeException.hpp"
+#include "com/sun/star/uno/Sequence.hxx"
+#include "com/sun/star/uno/XComponentContext.hpp"
+#include "com/sun/star/uno/XCurrentContext.hpp"
+#include "cppuhelper/factory.hxx"
+#include "cppuhelper/implbase2.hxx"
+#include "cppuhelper/implementationentry.hxx"
+#include "cppuhelper/weak.hxx"
+#include "osl/diagnose.h"
+#include "rtl/string.h"
+#include "rtl/textenc.h"
+#include "rtl/ustring.h"
+#include "rtl/ustring.hxx"
+#include "sal/types.h"
+#include "uno/current_context.hxx"
+#include "uno/lbnames.h"
+
+namespace {
+
+namespace css = com::sun::star;
+
+rtl::OUString SAL_CALL getDefaultImplementationName() {
+ return rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.comp.configuration.backend.DesktopBackend"));
+}
+
+css::uno::Sequence< rtl::OUString > SAL_CALL getDefaultSupportedServiceNames() {
+ rtl::OUString name(
+ RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.configuration.backend.DesktopBackend"));
+ return css::uno::Sequence< rtl::OUString >(&name, 1);
+}
+
+class Default:
+ public cppu::WeakImplHelper2<
+ css::lang::XServiceInfo, css::beans::XPropertySet >,
+ private boost::noncopyable
+{
+public:
+ Default() {}
+
+private:
+ virtual ~Default() {}
+
+ virtual rtl::OUString SAL_CALL getImplementationName()
+ throw (css::uno::RuntimeException)
+ { return getDefaultImplementationName(); }
+
+ virtual sal_Bool SAL_CALL supportsService(rtl::OUString const & ServiceName)
+ throw (css::uno::RuntimeException)
+ { return ServiceName == getSupportedServiceNames()[0]; }
+
+ virtual css::uno::Sequence< rtl::OUString > SAL_CALL
+ getSupportedServiceNames() throw (css::uno::RuntimeException)
+ { return getDefaultSupportedServiceNames(); }
+
+ virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
+ getPropertySetInfo() throw (css::uno::RuntimeException)
+ { return css::uno::Reference< css::beans::XPropertySetInfo >(); }
+
+ virtual void SAL_CALL setPropertyValue(
+ rtl::OUString const &, css::uno::Any const &)
+ throw (
+ css::beans::UnknownPropertyException,
+ css::beans::PropertyVetoException,
+ css::lang::IllegalArgumentException,
+ css::lang::WrappedTargetException, css::uno::RuntimeException);
+
+ virtual css::uno::Any SAL_CALL getPropertyValue(
+ rtl::OUString const & PropertyName)
+ throw (
+ css::beans::UnknownPropertyException,
+ css::lang::WrappedTargetException, css::uno::RuntimeException);
+
+ virtual void SAL_CALL addPropertyChangeListener(
+ rtl::OUString const &,
+ css::uno::Reference< css::beans::XPropertyChangeListener > const &)
+ throw (
+ css::beans::UnknownPropertyException,
+ css::lang::WrappedTargetException, css::uno::RuntimeException)
+ {}
+
+ virtual void SAL_CALL removePropertyChangeListener(
+ rtl::OUString const &,
+ css::uno::Reference< css::beans::XPropertyChangeListener > const &)
+ throw (
+ css::beans::UnknownPropertyException,
+ css::lang::WrappedTargetException, css::uno::RuntimeException)
+ {}
+
+ virtual void SAL_CALL addVetoableChangeListener(
+ rtl::OUString const &,
+ css::uno::Reference< css::beans::XVetoableChangeListener > const &)
+ throw (
+ css::beans::UnknownPropertyException,
+ css::lang::WrappedTargetException, css::uno::RuntimeException)
+ {}
+
+ virtual void SAL_CALL removeVetoableChangeListener(
+ rtl::OUString const &,
+ css::uno::Reference< css::beans::XVetoableChangeListener > const &)
+ throw (
+ css::beans::UnknownPropertyException,
+ css::lang::WrappedTargetException, css::uno::RuntimeException)
+ {}
+};
+
+void Default::setPropertyValue(rtl::OUString const &, css::uno::Any const &)
+ throw (
+ css::beans::UnknownPropertyException, css::beans::PropertyVetoException,
+ css::lang::IllegalArgumentException, css::lang::WrappedTargetException,
+ css::uno::RuntimeException)
+{
+ throw css::lang::IllegalArgumentException(
+ rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM("setPropertyValue not supported")),
+ static_cast< cppu::OWeakObject * >(this), -1);
+}
+
+css::uno::Any Default::getPropertyValue(rtl::OUString const & PropertyName)
+ throw (
+ css::beans::UnknownPropertyException, css::lang::WrappedTargetException,
+ css::uno::RuntimeException)
+{
+ if (PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("EnableATToolSupport")) ||
+ PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ExternalMailer")) ||
+ PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("SourceViewFontHeight")) ||
+ PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("SourceViewFontName")) ||
+ PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("WorkPathVariable")) ||
+ PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ooInetFTPProxyName")) ||
+ PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ooInetFTPProxyPort")) ||
+ PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ooInetHTTPProxyName")) ||
+ PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ooInetHTTPProxyPort")) ||
+ PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ooInetHTTPSProxyName")) ||
+ PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ooInetHTTPSProxyPort")) ||
+ PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ooInetNoProxy")) ||
+ PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ooInetProxyType")))
+ {
+ return css::uno::makeAny(css::beans::Optional< css::uno::Any >());
+ }
+ throw css::beans::UnknownPropertyException(
+ PropertyName, static_cast< cppu::OWeakObject * >(this));
+}
+
+css::uno::Reference< css::uno::XInterface > createBackend(
+ css::uno::Reference< css::uno::XComponentContext > const & context,
+ rtl::OUString const & name)
+{
+ try {
+ return css::uno::Reference< css::lang::XMultiComponentFactory >(
+ context->getServiceManager(), css::uno::UNO_SET_THROW)->
+ createInstanceWithContext(name, context);
+ } catch (css::uno::RuntimeException &) {
+ // Assuming these exceptions are real errors:
+ throw;
+ } catch (css::uno::Exception & e) {
+ // Assuming these exceptions indicate that the service is not installed:
+ OSL_TRACE(
+ "createInstance(%s) failed with %s",
+ rtl::OUStringToOString(name, RTL_TEXTENCODING_UTF8).getStr(),
+ rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8).getStr());
+ return css::uno::Reference< css::uno::XInterface >();
+ }
+}
+
+css::uno::Reference< css::uno::XInterface > SAL_CALL createInstance(
+ css::uno::Reference< css::uno::XComponentContext > const & context)
+{
+ rtl::OUString desktop;
+ css::uno::Reference< css::uno::XCurrentContext > current(
+ css::uno::getCurrentContext());
+ if (current.is()) {
+ current->getValueByName(
+ rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM("system.desktop-environment"))) >>=
+ desktop;
+ }
+ // Fall back to the default if the specific backend is not available:
+ css::uno::Reference< css::uno::XInterface > backend;
+ if (desktop.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("GNOME"))) {
+ backend = createBackend(
+ context,
+ rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.configuration.backend.GconfBackend")));
+ } else if (desktop.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("KDE"))) {
+ backend = createBackend(
+ context,
+ rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.configuration.backend.KDEBackend")));
+ } else if (desktop.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("KDE4"))) {
+ backend = createBackend(
+ context,
+ rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.configuration.backend.KDE4Backend")));
+ }
+ return backend.is()
+ ? backend : static_cast< cppu::OWeakObject * >(new Default);
+}
+
+static cppu::ImplementationEntry const services[] = {
+ { &createInstance, &getDefaultImplementationName,
+ &getDefaultSupportedServiceNames, &cppu::createSingleComponentFactory, 0,
+ 0 },
+ { 0, 0, 0, 0, 0, 0 }
+};
+
+}
+
+extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
+ char const * pImplName, void * pServiceManager, void * pRegistryKey)
+{
+ return cppu::component_getFactoryHelper(
+ pImplName, pServiceManager, pRegistryKey, services);
+}
+
+extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL
+component_getImplementationEnvironment(
+ char const ** ppEnvTypeName, uno_Environment **)
+{
+ *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
+}
+
+extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(
+ void * pServiceManager, void * pRegistryKey)
+{
+ return component_writeInfoHelper(pServiceManager, pRegistryKey, services);
+}
diff --git a/shell/source/backends/desktopbe/desktopbe.xml b/shell/source/backends/desktopbe/desktopbe.xml
deleted file mode 100644
index 0230028157dd..000000000000
--- a/shell/source/backends/desktopbe/desktopbe.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE module-description PUBLIC "-//StarOffice//DTD ComponentDescription 1.0//EN" "module-description.dtd">
-<module-description xmlns:xlink="http://www.w3.org/1999/xlink">
- <module-name>desktopbe</module-name>
- <component-description>
- <author> Jan Holesovsky </author>
- <name>com.sun.star.comp.configuration.backend.DesktopBackend</name>
- <description> The shared gconf/KDE backend; will load GconfBackend or
- KDEBackend depending on the desktop environment.</description>
- <loader-name>com.sun.star.loader.SharedLibrary</loader-name>
- <language>c++</language>
- <status value="beta"/>
- <supported-service>com.sun.star.comp.configuration.backend.DesktopBackend</supported-service>
- <supported-service>com.sun.star.comp.configuration.backend.PlatformBackend</supported-service>
- <service-dependency>...</service-dependency>
- <type>com.sun.star.configuration.backend.XBackendChangesListener</type>
- <type>com.sun.star.configuration.backend.XBackendChangesNotifier</type>
- <type>com.sun.star.configuration.backend.XLayerHandler</type>
- <type>com.sun.star.configuration.backend.XSingleLayerStratum</type>
- <type>com.sun.star.lang.XMultiComponentFactory</type>
- <type>com.sun.star.lang.XServiceInfo</type>
- <type>com.sun.star.lang.XSingleComponentFactory</type>
- <type>com.sun.star.lang.XTypeProvider</type>
- <type>com.sun.star.uno.TypeClass</type>
- <type>com.sun.star.uno.XAggregation</type>
- <type>com.sun.star.uno.XComponentContext</type>
- <type>com.sun.star.uno.XCurrentContext</type>
- <type>com.sun.star.uno.XWeak</type>
- <type>com.sun.star.registry.XRegistryKey</type>
- </component-description>
- <project-build-dependency>cppuhelper</project-build-dependency>
- <project-build-dependency>cppu</project-build-dependency>
- <project-build-dependency>sal</project-build-dependency>
- <runtime-module-dependency>cppuhelper3$(COM)</runtime-module-dependency>
- <runtime-module-dependency>cppu3</runtime-module-dependency>
- <runtime-module-dependency>sal3</runtime-module-dependency>
-</module-description>
diff --git a/shell/source/backends/desktopbe/desktopbe1-ucd.txt b/shell/source/backends/desktopbe/desktopbe1-ucd.txt
index c1df46010377..fd874a82ead5 100644
--- a/shell/source/backends/desktopbe/desktopbe1-ucd.txt
+++ b/shell/source/backends/desktopbe/desktopbe1-ucd.txt
@@ -2,8 +2,5 @@
ImplementationName=com.sun.star.comp.configuration.backend.DesktopBackend
ComponentName=desktopbe1.uno.so
LoaderName=com.sun.star.loader.SharedLibrary
-[Data]
-SupportedComponents=org.openoffice.VCL;org.openoffice.Inet;org.openoffice.Office.Common;org.openoffice.Office.Paths;org.openoffice.UserProfile;org.openoffice.Office.Recovery;org.openoffice.Setup
[SupportedServices]
com.sun.star.configuration.backend.DesktopBackend
-com.sun.star.configuration.backend.PlatformBackend
diff --git a/shell/source/backends/desktopbe/desktopbecdef.cxx b/shell/source/backends/desktopbe/desktopbecdef.cxx
deleted file mode 100644
index 2ae366bfcc94..000000000000
--- a/shell/source/backends/desktopbe/desktopbecdef.cxx
+++ /dev/null
@@ -1,205 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: desktopbecdef.cxx,v $
- * $Revision: 1.4 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_shell.hxx"
-
-#ifndef _COM_SUN_STAR_CONFIGURATION_BACKEND_XSCHEMASUPPLIER_HPP_
-#include <com/sun/star/configuration/backend/XSingleLayerStratum.hpp>
-#endif
-#include <com/sun/star/registry/XRegistryKey.hpp>
-
-#ifndef _CPPUHELPER_IMPLEMENTATIONENTRY_HXX_
-#include <cppuhelper/implementationentry.hxx>
-#endif
-#include <com/sun/star/uno/XComponentContext.hpp>
-
-#include "uno/current_context.hxx"
-
-namespace css = com::sun::star ;
-namespace uno = css::uno ;
-namespace lang = css::lang ;
-namespace backend = css::configuration::backend ;
-
-//==============================================================================
-
-static uno::Reference<uno::XInterface> SAL_CALL createDesktopBackend(const uno::Reference<uno::XComponentContext>& xContext)
-{
- try {
- uno::Reference< uno::XCurrentContext > xCurrentContext(uno::getCurrentContext());
-
- if (xCurrentContext.is())
- {
- uno::Any aValue = xCurrentContext->getValueByName(
- rtl::OUString::createFromAscii( "system.desktop-environment" ) );
-
- rtl::OUString aDesktopEnvironment;
- if ( aValue >>= aDesktopEnvironment )
- {
- rtl::OUString aDesktopService;
- if ( aDesktopEnvironment.equalsIgnoreAsciiCaseAscii( "gnome" ) )
- aDesktopService = rtl::OUString::createFromAscii( "com.sun.star.configuration.backend.GconfBackend" );
- else if ( aDesktopEnvironment.equalsIgnoreAsciiCaseAscii( "kde" ) )
- aDesktopService = rtl::OUString::createFromAscii( "com.sun.star.configuration.backend.KDEBackend" );
- else
- return uno::Reference<uno::XInterface>();
-
- uno::Reference< lang::XMultiComponentFactory > xServiceManager = xContext->getServiceManager();
- if( xServiceManager.is() )
- {
- return uno::Reference< backend::XSingleLayerStratum >::query(
- xServiceManager->createInstanceWithContext( aDesktopService, xContext) );
- }
- }
- }
- } catch (uno::RuntimeException e) {
- }
-
- return uno::Reference<uno::XInterface>();
-}
-
-static rtl::OUString SAL_CALL getBackendName(void) {
- return rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.configuration.backend.DesktopBackend") );
-}
-
-static uno::Sequence<rtl::OUString> SAL_CALL getBackendServiceNames(void)
-{
- uno::Sequence<rtl::OUString> aServices(2) ;
- aServices[0] = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.backend.DesktopBackend")) ;
- aServices[1] = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.backend.PlatformBackend")) ;
-
- return aServices ;
-}
-
-static uno::Sequence<rtl::OUString> SAL_CALL getSupportedComponents(void)
-{
- const sal_Int32 nComponents = 7;
-
- uno::Sequence<rtl::OUString> aSupportedComponentsList(nComponents) ;
-
- aSupportedComponentsList[0] = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("org.openoffice.VCL")) ;
- aSupportedComponentsList[1] = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Inet")) ;
- aSupportedComponentsList[2] = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Common")) ;
- aSupportedComponentsList[3] = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Paths")) ;
-
- aSupportedComponentsList[4] = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("org.openoffice.UserProfile")) ;
- aSupportedComponentsList[5] = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Recovery")) ;
- aSupportedComponentsList[6] = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Setup")) ;
-
- return aSupportedComponentsList ;
-}
-//==============================================================================
-
-static const cppu::ImplementationEntry kImplementations_entries[] =
-{
- {
- createDesktopBackend,
- getBackendName,
- getBackendServiceNames,
- cppu::createSingleComponentFactory,
- NULL,
- 0
- },
- { NULL, NULL, NULL, NULL, NULL, 0 }
-} ;
-//------------------------------------------------------------------------------
-
-extern "C" void SAL_CALL component_getImplementationEnvironment(
- const sal_Char **aEnvTypeName,
- uno_Environment ** /* aEnvironment */)
-{
- *aEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ;
-}
-
-//------------------------------------------------------------------------------
-
-extern "C" sal_Bool SAL_CALL component_writeInfo(void * /* pServiceManager */,
- void *pRegistryKey)
-{
- using namespace ::com::sun::star::registry;
- if (pRegistryKey)
- {
- try
- {
- uno::Reference< XRegistryKey > xImplKey = static_cast< XRegistryKey* >( pRegistryKey )->createKey(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) + getBackendName()
- );
-
- // Register associated service names
- uno::Reference< XRegistryKey > xServicesKey = xImplKey->createKey(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES") )
- );
-
- uno::Sequence<rtl::OUString> sServiceNames = getBackendServiceNames();
- for (sal_Int32 i = 0 ; i < sServiceNames.getLength() ; ++ i)
- xServicesKey->createKey(sServiceNames[i]);
-
- // Register supported components
- uno::Reference<XRegistryKey> xComponentKey = xImplKey->createKey(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/DATA/SupportedComponents") )
- );
-
- xComponentKey->setAsciiListValue( getSupportedComponents() );
-
- return sal_True;
- }
-
- catch( InvalidRegistryException& )
- {
- OSL_ENSURE(sal_False, "InvalidRegistryException caught");
- }
- }
-
- return sal_False;
-}
-
-//------------------------------------------------------------------------------
-
-extern "C" void *component_getFactory(const sal_Char *aImplementationName,
- void *aServiceManager,
- void *aRegistryKey)
-{
- return cppu::component_getFactoryHelper(
- aImplementationName,
- aServiceManager,
- aRegistryKey,
- kImplementations_entries) ;
-}
-//------------------------------------------------------------------------------
diff --git a/shell/source/backends/desktopbe/exports.map b/shell/source/backends/desktopbe/exports.map
deleted file mode 100644
index ba501f9ae076..000000000000
--- a/shell/source/backends/desktopbe/exports.map
+++ /dev/null
@@ -1,10 +0,0 @@
-UDK_3_0_0 {
- global:
- GetVersionInfo;
- component_getImplementationEnvironment;
- component_getFactory;
- component_writeInfo;
-
- local:
- *;
-};
diff --git a/shell/source/backends/desktopbe/makefile.mk b/shell/source/backends/desktopbe/makefile.mk
index b6bcd3d95905..29260821d551 100644
--- a/shell/source/backends/desktopbe/makefile.mk
+++ b/shell/source/backends/desktopbe/makefile.mk
@@ -1,14 +1,10 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2008 by Sun Microsystems, Inc.
#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# $RCSfile: makefile.mk,v $
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
-# $Revision: 1.3 $
+# OpenOffice.org - a multi-platform office productivity suite
#
# This file is part of OpenOffice.org.
#
@@ -27,49 +23,31 @@
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
-#*************************************************************************
-PRJ=..$/..$/..
-
-PRJNAME=shell
-TARGET=desktopbe
+#***********************************************************************/
-LIBTARGET=NO
-ENABLE_EXCEPTIONS=TRUE
+PRJ = ../../..
+PRJNAME = shell
+TARGET = desktopbe
-COMP1TYPELIST=$(TARGET)
-COMPRDB=$(SOLARBINDIR)$/types.rdb
-UNOUCROUT=$(OUT)$/inc$/$(TARGET)
-INCPRE=$(UNOUCROUT)
+ENABLE_EXCEPTIONS = TRUE
+VISIBILITY_HIDDEN = TRUE
-# --- Settings ---
+.INCLUDE: settings.mk
-.INCLUDE : settings.mk
-
-UNIXTEXT=$(MISC)/$(TARGET)1-ucd.txt
-
-# no "lib" prefix
DLLPRE =
-# --- Files ---
-
-SLOFILES=\
- $(SLO)$/desktopbecdef.obj
-
-SHL1NOCHECK=TRUE
-SHL1TARGET=$(TARGET)1.uno
-SHL1OBJS=$(SLOFILES)
-SHL1DEF=$(MISC)$/$(SHL1TARGET).def
+SLOFILES = $(SLO)/desktopbackend.obj
-SHL1IMPLIB=i$(SHL1TARGET)
-SHL1STDLIBS= \
- $(CPPUHELPERLIB) \
- $(CPPULIB) \
- $(SALLIB)
-
-SHL1VERSIONMAP=exports.map
-SHL1DEF=$(MISC)$/$(SHL1TARGET).def
-DEF1NAME=$(SHL1TARGET)
+SHL1IMPLIB = i$(SHL1TARGET)
+SHL1OBJS = $(SLOFILES)
+SHL1STDLIBS = \
+ $(CPPUHELPERLIB) \
+ $(CPPULIB) \
+ $(SALLIB)
+SHL1TARGET = desktopbe1.uno
+SHL1USE_EXPORTS = name
+DEF1NAME = $(SHL1TARGET)
-# --- Targets ---
+UNIXTEXT = $(MISC)/desktopbe1-ucd.txt
-.INCLUDE : target.mk
+.INCLUDE: target.mk
diff --git a/shell/source/backends/gconfbe/exports.map b/shell/source/backends/gconfbe/exports.map
deleted file mode 100644
index ba501f9ae076..000000000000
--- a/shell/source/backends/gconfbe/exports.map
+++ /dev/null
@@ -1,10 +0,0 @@
-UDK_3_0_0 {
- global:
- GetVersionInfo;
- component_getImplementationEnvironment;
- component_getFactory;
- component_writeInfo;
-
- local:
- *;
-};
diff --git a/shell/source/backends/gconfbe/gconflayer.cxx b/shell/source/backends/gconfbe/gconfaccess.cxx
index 9d7ac2e8e47b..99a5b362c161 100644
--- a/shell/source/backends/gconfbe/gconflayer.cxx
+++ b/shell/source/backends/gconfbe/gconfaccess.cxx
@@ -1,81 +1,102 @@
/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: gconflayer.cxx,v $
- * $Revision: 1.15 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+************************************************************************/
+
#include "precompiled_shell.hxx"
-#include "gconflayer.hxx"
-#include <com/sun/star/configuration/backend/PropertyInfo.hpp>
-
-#ifndef _COM_SUN_STAR_CONFIGURATION_BACKEND_XLAYERCONTENTDESCIBER_HPP_
-#include <com/sun/star/configuration/backend/XLayerContentDescriber.hpp>
-#endif
-#include <rtl/strbuf.hxx>
-#include <rtl/ustrbuf.hxx>
-#include <osl/security.hxx>
-#include <osl/file.hxx>
-#include <osl/thread.h>
-#include <com/sun/star/uno/Sequence.hxx>
+#include "sal/config.h"
#include <string.h>
-using namespace rtl;
+#include "com/sun/star/uno/RuntimeException.hpp"
+#include "osl/file.hxx"
+#include "osl/security.hxx"
+#include "osl/thread.h"
+#include "rtl/strbuf.hxx"
+#include "rtl/ustrbuf.hxx"
-//==============================================================================
+#include "gconfaccess.hxx"
-GconfLayer::GconfLayer( const uno::Reference<uno::XComponentContext>& xContext,
- const ConfigurationValue pConfigurationValuesList[],
- const sal_Int32 nConfigurationValues,
- const char * pPreloadValuesList[] )
- :m_pConfigurationValuesList( pConfigurationValuesList )
- ,m_nConfigurationValues( nConfigurationValues )
- ,m_pPreloadValuesList( pPreloadValuesList )
-{
- //Create instance of LayerContentDescriber Service
- rtl::OUString const k_sLayerDescriberService( RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.comp.configuration.backend.LayerDescriber" ) );
+#define GCONF_PROXY_MODE_KEY "/system/proxy/mode"
+#define GCONF_AUTO_SAVE_KEY "/apps/openoffice/auto_save"
- typedef uno::Reference<backend::XLayerContentDescriber> LayerDescriber;
- uno::Reference< lang::XMultiComponentFactory > xServiceManager = xContext->getServiceManager();
- if( xServiceManager.is() )
- {
- m_xLayerContentDescriber = LayerDescriber::query(
- xServiceManager->createInstanceWithContext( k_sLayerDescriberService, xContext ) );
- }
- else
+namespace gconfaccess {
+
+namespace {
+
+namespace css = com::sun::star ;
+namespace uno = css::uno ;
+using namespace rtl;
+
+GConfClient* getGconfClient()
+{
+ static GConfClient* mClient= 0;
+ if (mClient == NULL)
{
- OSL_TRACE( "Could not retrieve ServiceManager" );
+ /* initialize glib object type library */
+ g_type_init();
+
+ GError* aError = NULL;
+ if (!gconf_init(0, NULL, &aError))
+ {
+ rtl::OUStringBuffer msg;
+ msg.appendAscii("GconfBackend:GconfLayer: Cannot Initialize Gconf connection - " );
+ msg.appendAscii(aError->message);
+
+ g_error_free(aError);
+ aError = NULL;
+ throw uno::RuntimeException(msg.makeStringAndClear(),NULL);
+ }
+
+ mClient = gconf_client_get_default();
+ if (!mClient)
+ {
+ throw uno::RuntimeException(rtl::OUString::createFromAscii
+ ("GconfBackend:GconfLayer: Cannot Initialize Gconf connection"),NULL);
+ }
+
+ static const char * const PreloadValuesList[] =
+ {
+ "/desktop/gnome/interface",
+ "/system/proxy",
+ "/system/http_proxy/host",
+ "/desktop/gnome/url-handlers/mailto",
+#ifdef ENABLE_LOCKDOWN
+ "/apps/openoffice",
+ "/desktop/gnome/lockdown",
+ "/apps/openoffice/lockdown",
+#endif // ENABLE_LOCKDOWN
+ NULL
+ };
+ int i = 0;
+ while( PreloadValuesList[i] != NULL )
+ gconf_client_preload( mClient, PreloadValuesList[i++], GCONF_CLIENT_PRELOAD_ONELEVEL, NULL );
}
-}
-//------------------------------------------------------------------------------
+ return mClient;
+}
static OUString xdg_user_dir_lookup (const char *type)
{
@@ -376,13 +397,12 @@ uno::Any translateToOOo( const ConfigurationValue aValue, GConfValue *aGconfValu
//------------------------------------------------------------------------------
-sal_Bool SAL_CALL isDependencySatisfied( const ConfigurationValue aValue )
+sal_Bool SAL_CALL isDependencySatisfied( GConfClient* aClient, const ConfigurationValue aValue )
{
switch( aValue.nDependsOn )
{
case SETTING_PROXY_MODE:
{
- GConfClient* aClient = GconfBackend::getGconfClient();
GConfValue* aGconfValue = gconf_client_get( aClient, GCONF_PROXY_MODE_KEY, NULL );
if ( aGconfValue != NULL )
@@ -449,116 +469,381 @@ sal_Bool SAL_CALL isDependencySatisfied( const ConfigurationValue aValue )
return sal_False;
}
-//------------------------------------------------------------------------------
+}
-void SAL_CALL GconfLayer::readData( const uno::Reference<backend::XLayerHandler>& xHandler )
- throw ( backend::MalformedDataException, lang::NullPointerException,
- lang::WrappedTargetException, uno::RuntimeException )
+ConfigurationValue const ConfigurationValues[] =
{
- if( ! m_xLayerContentDescriber.is() )
{
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
- "Could not create com.sun.star.configuration.backend.LayerContentDescriber Service"
- ) ), static_cast < backend::XLayer * > (this) );
- }
+ SETTING_ENABLE_ACCESSIBILITY,
+ "/desktop/gnome/interface/accessibility",
+ "EnableATToolSupport",
+ sal_True,
+ SETTINGS_LAST
+ },
- uno::Sequence<backend::PropertyInfo> aPropInfoList( m_nConfigurationValues );
- sal_Int32 nProperties = 0;
+ {
+ SETTING_PROXY_MODE,
+ GCONF_PROXY_MODE_KEY,
+ "ooInetProxyType",
+ sal_True,
+ SETTINGS_LAST
+ },
- GConfClient* aClient = GconfBackend::getGconfClient();
- GConfValue* aGconfValue;
- int i = 0;
+ {
+ SETTING_PROXY_HTTP_HOST,
+ "/system/http_proxy/host",
+ "ooInetHTTPProxyName",
+ sal_False,
+ SETTING_PROXY_MODE
+ },
- while( m_pPreloadValuesList[i] != NULL )
- gconf_client_preload( aClient, m_pPreloadValuesList[i++], GCONF_CLIENT_PRELOAD_ONELEVEL, NULL );
+ {
+ SETTING_PROXY_HTTP_PORT,
+ "/system/http_proxy/port",
+ "ooInetHTTPProxyPort",
+ sal_False,
+ SETTING_PROXY_MODE
+ },
+
+ {
+ SETTING_PROXY_HTTPS_HOST,
+ "/system/proxy/secure_host",
+ "ooInetHTTPSProxyName",
+ sal_False,
+ SETTING_PROXY_MODE
+ },
- for( i = 0; i < m_nConfigurationValues; i++ )
{
- if( ( m_pConfigurationValuesList[i].nDependsOn != SETTINGS_LAST ) && !isDependencySatisfied( m_pConfigurationValuesList[i] ) )
- continue;
+ SETTING_PROXY_HTTPS_PORT,
+ "/system/proxy/secure_port",
+ "ooInetHTTPSProxyPort",
+ sal_False,
+ SETTING_PROXY_MODE
+ },
- aGconfValue = gconf_client_get( aClient, m_pConfigurationValuesList[i].GconfItem, NULL );
+ {
+ SETTING_PROXY_FTP_HOST,
+ "/system/proxy/ftp_host",
+ "ooInetFTPProxyName",
+ sal_False,
+ SETTING_PROXY_MODE
+ },
- if( aGconfValue != NULL )
- {
- aPropInfoList[nProperties].Name = rtl::OUString::createFromAscii( m_pConfigurationValuesList[i].OOoConfItem );
- aPropInfoList[nProperties].Type = rtl::OUString::createFromAscii( m_pConfigurationValuesList[i].OOoConfValueType );
- aPropInfoList[nProperties].Protected = m_pConfigurationValuesList[i].bLocked;
+ {
+ SETTING_PROXY_FTP_PORT,
+ "/system/proxy/ftp_port",
+ "ooInetFTPProxyPort",
+ sal_False,
+ SETTING_PROXY_MODE
+ },
- if( m_pConfigurationValuesList[i].bNeedsTranslation )
- aPropInfoList[nProperties].Value = translateToOOo( m_pConfigurationValuesList[i], aGconfValue );
- else
- aPropInfoList[nProperties].Value = makeAnyOfGconfValue( aGconfValue );
+ {
+ SETTING_NO_PROXY_FOR,
+ "/system/http_proxy/ignore_hosts",
+ "ooInetNoProxy",
+ sal_True,
+ SETTING_PROXY_MODE
+ },
- gconf_value_free( aGconfValue );
+ {
+ SETTING_MAILER_PROGRAM,
+ "/desktop/gnome/url-handlers/mailto/command",
+ "ExternalMailer",
+ sal_True,
+ SETTINGS_LAST
+ },
+ {
+ SETTING_SOURCEVIEWFONT_NAME,
+ "/desktop/gnome/interface/monospace_font_name",
+ "SourceViewFontName",
+ sal_True,
+ SETTINGS_LAST
+ },
+ {
+ SETTING_SOURCEVIEWFONT_HEIGHT,
+ "/desktop/gnome/interface/monospace_font_name",
+ "SourceViewFontHeight",
+ sal_True,
+ SETTINGS_LAST
+ },
- nProperties++;
- }
- }
+ {
+ SETTING_WORK_DIRECTORY,
+ "/desktop/gnome/url-handlers/mailto/command", // dummy
+ "WorkPathVariable",
+ sal_True,
+ SETTING_WORK_DIRECTORY, // so that the existence of the dir can be checked
+ },
- if( nProperties > 0 )
+#ifdef ENABLE_LOCKDOWN
{
- aPropInfoList.realloc( nProperties );
- m_xLayerContentDescriber->describeLayer( xHandler, aPropInfoList );
- }
-}
+ SETTING_WRITER_DEFAULT_DOC_FORMAT,
+ "/apps/openoffice/writer_default_document_format",
+ "TextDocumentSetupFactoryDefaultFilter",
+ sal_False,
+ SETTINGS_LAST
+ },
-//------------------------------------------------------------------------------
+ {
+ SETTING_IMPRESS_DEFAULT_DOC_FORMAT,
+ "/apps/openoffice/impress_default_document_format",
+ "PresentationDocumentSetupFactoryDefaultFilter",
+ sal_False,
+ SETTINGS_LAST
+ },
-rtl::OUString SAL_CALL GconfLayer::getTimestamp( void )
- throw (uno::RuntimeException)
-{
- // Return a hash of the values as timestamp to avoid regenerating
- // the binary cache on each office launch.
- rtl::OStringBuffer aTimeStamp;
+ {
+ SETTING_CALC_DEFAULT_DOC_FORMAT,
+ "/apps/openoffice/calc_default_document_format",
+ "SpreadsheetDocumentSetupFactoryDefaultFilter",
+ sal_False,
+ SETTINGS_LAST
+ },
- // Make sure the timestamp differs from beta
- sal_Int32 nHashCode = 0;
+ {
+ SETTING_AUTO_SAVE,
+ GCONF_AUTO_SAVE_KEY,
+ "AutoSaveEnabled",
+ sal_False,
+ SETTINGS_LAST
+ },
- GConfClient* aClient = GconfBackend::getGconfClient();
- GConfValue* aGconfValue;
- int i = 0;
+ {
+ SETTING_AUTO_SAVE_INTERVAL,
+ "/apps/openoffice/auto_save_interval",
+ "AutoSaveTimeIntervall",
+ sal_False,
+ SETTING_AUTO_SAVE
+ },
+
+ {
+ SETTING_USER_GIVENNAME,
+ "/desktop/gnome/url-handlers/mailto/command", // dummy
+ "givenname",
+ sal_True,
+ SETTING_USER_GIVENNAME
+ },
- while( m_pPreloadValuesList[i] != NULL )
- gconf_client_preload( aClient, m_pPreloadValuesList[i++], GCONF_CLIENT_PRELOAD_ONELEVEL, NULL );
+ {
+ SETTING_USER_SURNAME,
+ "/desktop/gnome/url-handlers/mailto/command", // dummy
+ "sn",
+ sal_True,
+ SETTING_USER_SURNAME
+ },
+
+ {
+ SETTING_DISABLE_PRINTING,
+ "/desktop/gnome/lockdown/disable_printing",
+ "DisablePrinting",
+ sal_True,
+ SETTINGS_LAST
+ },
+
+ {
+ SETTING_USE_SYSTEM_FILE_DIALOG,
+ "/apps/openoffice/use_system_file_dialog",
+ "UseSystemFileDialog",
+ sal_False,
+ SETTINGS_LAST
+ },
+
+ {
+ SETTING_PRINTING_MODIFIES_DOCUMENT,
+ "/apps/openoffice/printing_modifies_doc",
+ "PrintingModifiesDocument",
+ sal_False,
+ SETTINGS_LAST
+ },
+
+ {
+ SETTING_SHOW_ICONS_IN_MENUS,
+ "/apps/openoffice/show_menu_icons",
+ "ShowIconsInMenues",
+ sal_False,
+ SETTINGS_LAST
+ },
+
+ {
+ SETTING_SHOW_INACTIVE_MENUITEMS,
+ "/apps/openoffice/show_menu_inactive_items",
+ "DontHideDisabledEntry",
+ sal_False,
+ SETTINGS_LAST
+ },
+
+ {
+ SETTING_SHOW_FONT_PREVIEW,
+ "/apps/openoffice/show_font_preview",
+ "ShowFontBoxWYSIWYG",
+ sal_False,
+ SETTINGS_LAST
+ },
+
+ {
+ SETTING_SHOW_FONT_HISTORY,
+ "/apps/openoffice/show_font_history",
+ "FontViewHistory",
+ sal_False,
+ SETTINGS_LAST
+ },
+
+ {
+ SETTING_ENABLE_OPENGL,
+ "/apps/openoffice/use_opengl",
+ "OpenGL",
+ sal_False,
+ SETTINGS_LAST
+ },
+
+ {
+ SETTING_OPTIMIZE_OPENGL,
+ "/apps/openoffice/optimize_opengl",
+ "OpenGL_Faster",
+ sal_False,
+ SETTINGS_LAST
+ },
+
+ {
+ SETTING_USE_SYSTEM_FONT,
+ "/apps/openoffice/use_system_font",
+ "AccessibilityIsSystemFont",
+ sal_False,
+ SETTINGS_LAST
+ },
+
+ {
+ SETTING_USE_FONT_ANTI_ALIASING,
+ "/apps/openoffice/use_font_anti_aliasing",
+ "FontAntiAliasingEnabled",
+ sal_False,
+ SETTINGS_LAST
+ },
+
+ {
+ SETTING_FONT_ANTI_ALIASING_MIN_PIXEL,
+ "/apps/openoffice/font_anti_aliasing_min_pixel",
+ "FontAntiAliasingMinPixelHeight",
+ sal_True,
+ SETTINGS_LAST
+ },
+
+ {
+ SETTING_WARN_CREATE_PDF,
+ "/apps/openoffice/lockdown/warn_info_create_pdf",
+ "WarnCreatePDF",
+ sal_False,
+ SETTINGS_LAST
+ },
+
+ {
+ SETTING_WARN_PRINT_DOC,
+ "/apps/openoffice/lockdown/warn_info_printing",
+ "WarnPrintDoc",
+ sal_False,
+ SETTINGS_LAST
+ },
- for( i = 0; i < m_nConfigurationValues; i++ )
{
- aGconfValue = gconf_client_get( aClient, m_pConfigurationValuesList[i].GconfItem, NULL );
+ SETTING_WARN_SAVEORSEND_DOC,
+ "/apps/openoffice/lockdown/warn_info_saving",
+ "WarnSaveOrSendDoc",
+ sal_False,
+ SETTINGS_LAST
+ },
+
+ {
+ SETTING_WARN_SIGN_DOC,
+ "/apps/openoffice/lockdown/warn_info_signing",
+ "WarnSignDoc",
+ sal_False,
+ SETTINGS_LAST
+ },
+
+ {
+ SETTING_REMOVE_PERSONAL_INFO,
+ "/apps/openoffice/lockdown/remove_personal_info_on_save",
+ "Scripting/RemovePersonalInfoOnSaving",
+ sal_False,
+ SETTINGS_LAST
+ },
+
+ {
+ SETTING_RECOMMEND_PASSWORD,
+ "/apps/openoffice/lockdown/recommend_password_on_save",
+ "RecommendPasswordProtection",
+ sal_False,
+ SETTINGS_LAST
+ },
+
+ {
+ SETTING_UNDO_STEPS,
+ "/apps/openoffice/undo_steps",
+ "UndoSteps",
+ sal_False,
+ SETTINGS_LAST
+ },
+
+ {
+ SETTING_SYMBOL_SET,
+ "/apps/openoffice/icon_size",
+ "SymbolSet",
+ sal_True,
+ SETTINGS_LAST
+ },
+
+ {
+ SETTING_MACRO_SECURITY_LEVEL,
+ "/apps/openoffice/lockdown/macro_security_level",
+ "MacroSecurityLevel",
+ sal_False,
+ SETTINGS_LAST
+ },
+
+ {
+ SETTING_CREATE_BACKUP,
+ "/apps/openoffice/create_backup",
+ "CreateBackup",
+ sal_False,
+ SETTINGS_LAST
+ },
+
+ {
+ SETTING_WARN_ALIEN_FORMAT,
+ "/apps/openoffice/warn_alien_format",
+ "WarnAlienFormat",
+ sal_False,
+ SETTINGS_LAST
+ },
+
+#endif // ENABLE_LOCKDOWN
+};
+
+std::size_t const nConfigurationValues =
+ sizeof ConfigurationValues / sizeof ConfigurationValues[0];
+
+css::beans::Optional< css::uno::Any > getValue(ConfigurationValue const & data)
+{
+ GConfClient* aClient = getGconfClient();
+ GConfValue* aGconfValue;
+ if( ( data.nDependsOn == SETTINGS_LAST ) || isDependencySatisfied( aClient, data ) )
+ {
+ aGconfValue = gconf_client_get( aClient, data.GconfItem, NULL );
if( aGconfValue != NULL )
{
- switch( aGconfValue->type )
- {
- case GCONF_VALUE_BOOL:
- nHashCode ^= (sal_Int32) !gconf_value_get_bool( aGconfValue );
- break;
-
- case GCONF_VALUE_INT:
- nHashCode ^= (sal_Int32) gconf_value_get_int( aGconfValue );
- break;
-
- case GCONF_VALUE_STRING:
- nHashCode ^= (sal_Int32) g_str_hash( gconf_value_get_string( aGconfValue ) );
- break;
-
- case GCONF_VALUE_LIST:
- if( GCONF_VALUE_STRING == gconf_value_get_list_type( aGconfValue ) )
- {
- GSList *list = gconf_value_get_list( aGconfValue );
- for(; list; list = g_slist_next(list))
- nHashCode ^= (sal_Int32) g_str_hash( gconf_value_get_string((GConfValue *) list->data) );
- break;
- }
-
- default:
- fprintf( stderr, "getTimestamp: Type not handled.\n" );
- break;
- }
- nHashCode = (nHashCode << 5) - nHashCode;
+ css::uno::Any value;
+ if( data.bNeedsTranslation )
+ value = translateToOOo( data, aGconfValue );
+ else
+ value = makeAnyOfGconfValue( aGconfValue );
+
gconf_value_free( aGconfValue );
+
+ return css::beans::Optional< css::uno::Any >(true, value);
}
}
+ return css::beans::Optional< css::uno::Any >();
+}
- return rtl::OUString::valueOf( nHashCode );
}
diff --git a/shell/source/backends/gconfbe/gconfaccess.hxx b/shell/source/backends/gconfbe/gconfaccess.hxx
new file mode 100644
index 000000000000..7fdd82ff05e7
--- /dev/null
+++ b/shell/source/backends/gconfbe/gconfaccess.hxx
@@ -0,0 +1,119 @@
+/*************************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+************************************************************************/
+
+#ifndef INCLUDED_SHELL_SOURCE_BACKENDS_GCONFBE_GCONFACCESS_HXX
+#define INCLUDED_SHELL_SOURCE_BACKENDS_GCONFBE_GCONFACCESS_HXX
+
+#include "sal/config.h"
+
+#include <cstddef>
+
+#include "com/sun/star/beans/Optional.hpp"
+#include "gconf/gconf-client.h"
+#include "sal/types.h"
+
+namespace com { namespace sun { namespace star { namespace uno {
+ class Any;
+} } } }
+
+namespace gconfaccess {
+
+enum ConfigurationSetting
+{
+ SETTING_PROXY_MODE,
+ SETTING_PROXY_HTTP_HOST,
+ SETTING_PROXY_HTTP_PORT,
+ SETTING_PROXY_HTTPS_HOST,
+ SETTING_PROXY_HTTPS_PORT,
+ SETTING_PROXY_FTP_HOST,
+ SETTING_PROXY_FTP_PORT,
+ SETTING_NO_PROXY_FOR,
+ SETTING_ENABLE_ACCESSIBILITY,
+ SETTING_MAILER_PROGRAM,
+ SETTING_WORK_DIRECTORY,
+ SETTING_SOURCEVIEWFONT_NAME,
+ SETTING_SOURCEVIEWFONT_HEIGHT,
+ SETTING_USER_GIVENNAME,
+ SETTING_USER_SURNAME,
+
+#ifdef ENABLE_LOCKDOWN
+
+ SETTING_DISABLE_PRINTING,
+ SETTING_USE_SYSTEM_FILE_DIALOG,
+ SETTING_PRINTING_MODIFIES_DOCUMENT,
+ SETTING_SHOW_ICONS_IN_MENUS,
+ SETTING_SHOW_INACTIVE_MENUITEMS,
+ SETTING_SHOW_FONT_PREVIEW,
+ SETTING_SHOW_FONT_HISTORY,
+ SETTING_ENABLE_OPENGL,
+ SETTING_OPTIMIZE_OPENGL,
+ SETTING_SAVE_DOCUMENT_WINDOWS,
+ SETTING_SAVE_DOCUMENT_VIEW_INFO,
+ SETTING_USE_SYSTEM_FONT,
+ SETTING_USE_FONT_ANTI_ALIASING,
+ SETTING_FONT_ANTI_ALIASING_MIN_PIXEL,
+ SETTING_WARN_CREATE_PDF,
+ SETTING_WARN_PRINT_DOC,
+ SETTING_WARN_SAVEORSEND_DOC,
+ SETTING_WARN_SIGN_DOC,
+ SETTING_REMOVE_PERSONAL_INFO,
+ SETTING_RECOMMEND_PASSWORD,
+ SETTING_UNDO_STEPS,
+ SETTING_SYMBOL_SET,
+ SETTING_MACRO_SECURITY_LEVEL,
+ SETTING_CREATE_BACKUP,
+ SETTING_WARN_ALIEN_FORMAT,
+ SETTING_AUTO_SAVE,
+ SETTING_AUTO_SAVE_INTERVAL,
+ SETTING_WRITER_DEFAULT_DOC_FORMAT,
+ SETTING_IMPRESS_DEFAULT_DOC_FORMAT,
+ SETTING_CALC_DEFAULT_DOC_FORMAT,
+
+#endif // ENABLE_LOCKDOWN
+
+ SETTINGS_LAST
+};
+
+struct ConfigurationValue
+{
+ const ConfigurationSetting nSettingId;
+ const gchar *GconfItem;
+ const char *OOoConfItem;
+ const sal_Bool bNeedsTranslation;
+ const ConfigurationSetting nDependsOn;
+};
+
+extern ConfigurationValue const ConfigurationValues[];
+
+extern std::size_t const nConfigurationValues;
+
+com::sun::star::beans::Optional< com::sun::star::uno::Any > getValue(
+ ConfigurationValue const & data);
+
+}
+
+#endif
diff --git a/shell/source/backends/gconfbe/gconfbackend.cxx b/shell/source/backends/gconfbe/gconfbackend.cxx
index 3c5b5eb86ad6..122d1cad02b3 100644
--- a/shell/source/backends/gconfbe/gconfbackend.cxx
+++ b/shell/source/backends/gconfbe/gconfbackend.cxx
@@ -1,1010 +1,239 @@
/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: gconfbackend.cxx,v $
- * $Revision: 1.15 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+************************************************************************/
-// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_shell.hxx"
-
-#include "gconfbackend.hxx"
-#include "gconflayer.hxx"
-#include <com/sun/star/configuration/backend/ComponentChangeEvent.hpp>
-
-#ifndef INCLUDED_VECTOR
-#include <vector>
-#define INCLUDED_VECTOR
-#endif
-#include <osl/process.h>
-#include <osl/time.h>
-#include <rtl/ustrbuf.hxx>
-#include <rtl/byteseq.h>
-
-#include <stdio.h>
-
-#ifdef ENABLE_LOCKDOWN
-// each entry should have an identifying ConfigurationSetting
-static const ConfigurationValue SetupConfigurationValuesList[] =
-{
- {
- SETTING_WRITER_DEFAULT_DOC_FORMAT,
- "/apps/openoffice/writer_default_document_format",
- "org.openoffice.Setup/Office/Factories/com.sun.star.text.TextDocument/ooSetupFactoryDefaultFilter",
- "string",
- sal_False,
- sal_False,
- SETTINGS_LAST
- },
-
- {
- SETTING_IMPRESS_DEFAULT_DOC_FORMAT,
- "/apps/openoffice/impress_default_document_format",
- "org.openoffice.Setup/Office/Factories/com.sun.star.presentation.PresentationDocument/ooSetupFactoryDefaultFilter",
- "string",
- sal_False,
- sal_False,
- SETTINGS_LAST
- },
-
- {
- SETTING_CALC_DEFAULT_DOC_FORMAT,
- "/apps/openoffice/calc_default_document_format",
- "org.openoffice.Setup/Office/Factories/com.sun.star.sheet.SpreadsheetDocument/ooSetupFactoryDefaultFilter",
- "string",
- sal_False,
- sal_False,
- SETTINGS_LAST
- },
-};
-#endif // ENABLE_LOCKDOWN
-
-#ifdef ENABLE_LOCKDOWN
-// each entry should have an identifying ConfigurationSetting
-static const ConfigurationValue RecoveryConfigurationValuesList[] =
-{
- {
- SETTING_AUTO_SAVE,
- GCONF_AUTO_SAVE_KEY,
- "org.openoffice.Office.Recovery/AutoSave/Enabled",
- "boolean",
- sal_False,
- sal_False,
- SETTINGS_LAST
- },
-
- {
- SETTING_AUTO_SAVE_INTERVAL,
- "/apps/openoffice/auto_save_interval",
- "org.openoffice.Office.Recovery/AutoSave/TimeIntervall",
- "int",
- sal_False,
- sal_False,
- SETTING_AUTO_SAVE
- },
-};
-#endif // ENABLE_LOCKDOWN
-
-/*
- * This should be in a different backend actually, but this has to wait ..
- */
-
-#ifdef ENABLE_LOCKDOWN
-// each entry should have an identifying ConfigurationSetting
-static const ConfigurationValue UserProfileConfigurationValuesList[] =
-{
- {
- SETTING_USER_GIVENNAME,
- "/desktop/gnome/url-handlers/mailto/command", // dummy, needed for getTimestamp
- "org.openoffice.UserProfile/Data/givenname",
- "string",
- sal_False,
- sal_True,
- SETTING_USER_GIVENNAME
- },
-
- {
- SETTING_USER_SURNAME,
- "/desktop/gnome/url-handlers/mailto/command", // dummy, needed for getTimestamp
- "org.openoffice.UserProfile/Data/sn",
- "string",
- sal_False,
- sal_True,
- SETTING_USER_SURNAME
- },
-};
-#endif // ENABLE_LOCKDOWN
-
-// each entry should have an identifying ConfigurationSetting
-static const ConfigurationValue VCLConfigurationValuesList[] =
-{
- {
- SETTING_ENABLE_ACCESSIBILITY,
- "/desktop/gnome/interface/accessibility",
- "org.openoffice.VCL/Settings/Accessibility/EnableATToolSupport",
- "string",
- sal_False,
- sal_True,
- SETTINGS_LAST
- },
-
-#ifdef ENABLE_LOCKDOWN
-
- {
- SETTING_DISABLE_PRINTING,
- "/desktop/gnome/lockdown/disable_printing",
- "org.openoffice.VCL/Settings/DesktopManagement/DisablePrinting",
- "string",
- sal_False,
- sal_True,
- SETTINGS_LAST
- },
-
-#endif // ENABLE_LOCKDOWN
-
-};
-
-// each entry should have an identifying ConfigurationSetting
-static const ConfigurationValue InetConfigurationValuesList[] =
-{
- {
- SETTING_PROXY_MODE,
- GCONF_PROXY_MODE_KEY,
- "org.openoffice.Inet/Settings/ooInetProxyType",
- "int",
- sal_False,
- sal_True,
- SETTINGS_LAST
- },
-
- {
- SETTING_PROXY_HTTP_HOST,
- "/system/http_proxy/host",
- "org.openoffice.Inet/Settings/ooInetHTTPProxyName",
- "string",
- sal_False,
- sal_False,
- SETTING_PROXY_MODE
- },
-
- {
- SETTING_PROXY_HTTP_PORT,
- "/system/http_proxy/port",
- "org.openoffice.Inet/Settings/ooInetHTTPProxyPort",
- "int",
- sal_False,
- sal_False,
- SETTING_PROXY_MODE
- },
-
- {
- SETTING_PROXY_HTTPS_HOST,
- "/system/proxy/secure_host",
- "org.openoffice.Inet/Settings/ooInetHTTPSProxyName",
- "string",
- sal_False,
- sal_False,
- SETTING_PROXY_MODE
- },
-
- {
- SETTING_PROXY_HTTPS_PORT,
- "/system/proxy/secure_port",
- "org.openoffice.Inet/Settings/ooInetHTTPSProxyPort",
- "int",
- sal_False,
- sal_False,
- SETTING_PROXY_MODE
- },
-
- {
- SETTING_PROXY_FTP_HOST,
- "/system/proxy/ftp_host",
- "org.openoffice.Inet/Settings/ooInetFTPProxyName",
- "string",
- sal_False,
- sal_False,
- SETTING_PROXY_MODE
- },
-
- {
- SETTING_PROXY_FTP_PORT,
- "/system/proxy/ftp_port",
- "org.openoffice.Inet/Settings/ooInetFTPProxyPort",
- "int",
- sal_False,
- sal_False,
- SETTING_PROXY_MODE
- },
-
- {
- SETTING_NO_PROXY_FOR,
- "/system/http_proxy/ignore_hosts",
- "org.openoffice.Inet/Settings/ooInetNoProxy",
- "string",
- sal_False,
- sal_True,
- SETTING_PROXY_MODE
- },
-};
-
-// each entry should have an identifying ConfigurationSetting
-static const ConfigurationValue CommonConfigurationValuesList[] =
-{
- {
- SETTING_MAILER_PROGRAM,
- "/desktop/gnome/url-handlers/mailto/command",
- "org.openoffice.Office.Common/ExternalMailer/Program",
- "string",
- sal_False,
- sal_True,
- SETTINGS_LAST
- },
- {
- SETTING_SOURCEVIEWFONT_NAME,
- "/desktop/gnome/interface/monospace_font_name",
- "org.openoffice.Office.Common/Font/SourceViewFont/FontName",
- "string",
- sal_False,
- sal_True,
- SETTINGS_LAST
- },
- {
- SETTING_SOURCEVIEWFONT_HEIGHT,
- "/desktop/gnome/interface/monospace_font_name",
- "org.openoffice.Office.Common/Font/SourceViewFont/FontHeight",
- "short",
- sal_False,
- sal_True,
- SETTINGS_LAST
- },
-
-#ifdef ENABLE_LOCKDOWN
-
- {
- SETTING_USE_SYSTEM_FILE_DIALOG,
- "/apps/openoffice/use_system_file_dialog",
- "org.openoffice.Office.Common/Misc/UseSystemFileDialog",
- "boolean",
- sal_False,
- sal_False,
- SETTINGS_LAST
- },
-
- {
- SETTING_DISABLE_UI_CUSTOMIZATION,
- "/apps/openoffice/lockdown/disable_ui_customization",
- "org.openoffice.Office.Common/Misc/DisableUICustomization",
- "boolean",
- sal_False,
- sal_False,
- SETTINGS_LAST
- },
-
- {
- SETTING_PRINTING_MODIFIES_DOCUMENT,
- "/apps/openoffice/printing_modifies_doc",
- "org.openoffice.Office.Common/Print/PrintingModifiesDocument",
- "boolean",
- sal_False,
- sal_False,
- SETTINGS_LAST
- },
-
- {
- SETTING_SHOW_ICONS_IN_MENUS,
- "/apps/openoffice/show_menu_icons",
- "org.openoffice.Office.Common/View/Menu/ShowIconsInMenues",
- "boolean",
- sal_False,
- sal_False,
- SETTINGS_LAST
- },
-
- {
- SETTING_SHOW_INACTIVE_MENUITEMS,
- "/apps/openoffice/show_menu_inactive_items",
- "org.openoffice.Office.Common/View/Menu/DontHideDisabledEntry",
- "boolean",
- sal_False,
- sal_False,
- SETTINGS_LAST
- },
-
- {
- SETTING_SHOW_FONT_PREVIEW,
- "/apps/openoffice/show_font_preview",
- "org.openoffice.Office.Common/Font/View/ShowFontBoxWYSIWYG",
- "boolean",
- sal_False,
- sal_False,
- SETTINGS_LAST
- },
-
- {
- SETTING_SHOW_FONT_HISTORY,
- "/apps/openoffice/show_font_history",
- "org.openoffice.Office.Common/Font/View/History",
- "boolean",
- sal_False,
- sal_False,
- SETTINGS_LAST
- },
-
- {
- SETTING_ENABLE_OPENGL,
- "/apps/openoffice/use_opengl",
- "org.openoffice.Office.Common/_3D_Engine/OpenGL",
- "boolean",
- sal_False,
- sal_False,
- SETTINGS_LAST
- },
-
- {
- SETTING_OPTIMIZE_OPENGL,
- "/apps/openoffice/optimize_opengl",
- "org.openoffice.Office.Common/_3D_Engine/OpenGL_Faster",
- "boolean",
- sal_False,
- sal_False,
- SETTINGS_LAST
- },
-
- {
- SETTING_USE_SYSTEM_FONT,
- "/apps/openoffice/use_system_font",
- "org.openoffice.Office.Common/Accessibility/IsSystemFont",
- "boolean",
- sal_False,
- sal_False,
- SETTINGS_LAST
- },
-
- {
- SETTING_USE_FONT_ANTI_ALIASING,
- "/apps/openoffice/use_font_anti_aliasing",
- "org.openoffice.Office.Common/View/FontAntiAliasing/Enabled",
- "boolean",
- sal_False,
- sal_False,
- SETTINGS_LAST
- },
-
- {
- SETTING_FONT_ANTI_ALIASING_MIN_PIXEL,
- "/apps/openoffice/font_anti_aliasing_min_pixel",
- "org.openoffice.Office.Common/View/FontAntiAliasing/MinPixelHeight",
- "short",
- sal_False,
- sal_True,
- SETTINGS_LAST
- },
-
- {
- SETTING_WARN_CREATE_PDF,
- "/apps/openoffice/lockdown/warn_info_create_pdf",
- "org.openoffice.Office.Common/Security/Scripting/WarnCreatePDF",
- "boolean",
- sal_False,
- sal_False,
- SETTINGS_LAST
- },
-
- {
- SETTING_WARN_PRINT_DOC,
- "/apps/openoffice/lockdown/warn_info_printing",
- "org.openoffice.Office.Common/Security/Scripting/WarnPrintDoc",
- "boolean",
- sal_False,
- sal_False,
- SETTINGS_LAST
- },
-
- {
- SETTING_WARN_SAVEORSEND_DOC,
- "/apps/openoffice/lockdown/warn_info_saving",
- "org.openoffice.Office.Common/Security/Scripting/WarnSaveOrSendDoc",
- "boolean",
- sal_False,
- sal_False,
- SETTINGS_LAST
- },
-
- {
- SETTING_WARN_SIGN_DOC,
- "/apps/openoffice/lockdown/warn_info_signing",
- "org.openoffice.Office.Common/Security/Scripting/WarnSignDoc",
- "boolean",
- sal_False,
- sal_False,
- SETTINGS_LAST
- },
-
- {
- SETTING_REMOVE_PERSONAL_INFO,
- "/apps/openoffice/lockdown/remove_personal_info_on_save",
- "org.openoffice.Office.Common/Security/Scripting/RemovePersonalInfoOnSaving",
- "boolean",
- sal_False,
- sal_False,
- SETTINGS_LAST
- },
-
- {
- SETTING_RECOMMEND_PASSWORD,
- "/apps/openoffice/lockdown/recommend_password_on_save",
- "org.openoffice.Office.Common/Security/Scripting/RecommendPasswordProtection",
- "boolean",
- sal_False,
- sal_False,
- SETTINGS_LAST
- },
-
- {
- SETTING_UNDO_STEPS,
- "/apps/openoffice/undo_steps",
- "org.openoffice.Office.Common/Undo/Steps",
- "int",
- sal_False,
- sal_False,
- SETTINGS_LAST
- },
-
- {
- SETTING_SYMBOL_SET,
- "/apps/openoffice/icon_size",
- "org.openoffice.Office.Common/Misc/SymbolSet",
- "short",
- sal_False,
- sal_True,
- SETTINGS_LAST
- },
-
- {
- SETTING_MACRO_SECURITY_LEVEL,
- "/apps/openoffice/lockdown/macro_security_level",
- "org.openoffice.Office.Common/Security/Scripting/MacroSecurityLevel",
- "int",
- sal_False,
- sal_False,
- SETTINGS_LAST
- },
-
- {
- SETTING_CREATE_BACKUP,
- "/apps/openoffice/create_backup",
- "org.openoffice.Office.Common/Save/Document/CreateBackup",
- "boolean",
- sal_False,
- sal_False,
- SETTINGS_LAST
- },
-
- {
- SETTING_WARN_ALIEN_FORMAT,
- "/apps/openoffice/warn_alien_format",
- "org.openoffice.Office.Common/Save/Document/WarnAlienFormat",
- "boolean",
- sal_False,
- sal_False,
- SETTINGS_LAST
- },
-
-#endif // ENABLE_LOCKDOWN
-
-};
-
-static const ConfigurationValue PathsConfigurationValuesList[] =
-{
- {
- SETTING_WORK_DIRECTORY,
- "/desktop/gnome/url-handlers/mailto/command", // dummy, needed for getTimestamp
- "org.openoffice.Office.Paths/Variables/Work",
- "string",
- sal_False,
- sal_True,
- SETTING_WORK_DIRECTORY, // so that the existence of the dir can be checked
- },
-};
-
-#ifdef ENABLE_LOCKDOWN
-static const char * SetupPreloadValuesList[] =
-{
- "/apps/openoffice",
- NULL
-};
-#endif // ENABLE_LOCKDOWN
-
-#ifdef ENABLE_LOCKDOWN
-static const char * RecoveryPreloadValuesList[] =
-{
- "/apps/openoffice",
- NULL
-};
-#endif // ENABLE_LOCKDOWN
-
-#ifdef ENABLE_LOCKDOWN
-static const char * UserProfilePreloadValuesList[] =
-{
- NULL
-};
-#endif // ENABLE_LOCKDOWN
-
-static const char * VCLPreloadValuesList[] =
-{
- "/desktop/gnome/interface",
-#ifdef ENABLE_LOCKDOWN
- "/desktop/gnome/lockdown",
-#endif // ENABLE_LOCKDOWN
- NULL
-};
-
-static const char * InetPreloadValuesList[] =
-{
- "/system/proxy",
- "/system/http_proxy/host",
- NULL
-};
-
-static const char * CommonPreloadValuesList[] =
-{
- "/desktop/gnome/url-handlers/mailto",
-#ifdef ENABLE_LOCKDOWN
- "/apps/openoffice/lockdown",
- "/apps/openoffice",
-#endif // ENABLE_LOCKDOWN
- NULL
-};
-
-static const char * PathsPreloadValuesList[] =
-{
- NULL
-};
-
-//==============================================================================
-
-/*
-void ONotificationThread::run()
-{
- mLoop= NULL;
- //Need to start a GMain loop for notifications to work
- mLoop=g_main_loop_new(g_main_context_default(),FALSE);
- g_main_loop_run(mLoop);
-} ;
-
-*/
-
-//------------------------------------------------------------------------------
-
-GconfBackend* GconfBackend::mInstance= 0;
-
-GconfBackend* GconfBackend::createInstance(const uno::Reference<uno::XComponentContext>& xContext)
-{
- if(mInstance == 0)
- {
- mInstance = new GconfBackend (xContext);
- }
-
- return mInstance;
-}
-
-//------------------------------------------------------------------------------
-
-GconfBackend::GconfBackend(const uno::Reference<uno::XComponentContext>& xContext)
- throw (backend::BackendAccessException)
- : BackendBase(mMutex), m_xContext(xContext)
-// , mNotificationThread(NULL)
-
-
-{
-}
-
-//------------------------------------------------------------------------------
-
-GconfBackend::~GconfBackend(void) {
-
-
-// delete (mNotificationThread);
- GconfBackend::mClient = NULL;
-
+#include "sal/config.h"
+
+#include <cstddef>
+
+#include "boost/noncopyable.hpp"
+#include "com/sun/star/beans/Optional.hpp"
+#include "com/sun/star/beans/PropertyVetoException.hpp"
+#include "com/sun/star/beans/UnknownPropertyException.hpp"
+#include "com/sun/star/beans/XPropertyChangeListener.hpp"
+#include "com/sun/star/beans/XPropertySet.hpp"
+#include "com/sun/star/beans/XPropertySetInfo.hpp"
+#include "com/sun/star/beans/XVetoableChangeListener.hpp"
+#include "com/sun/star/lang/IllegalArgumentException.hpp"
+#include "com/sun/star/lang/WrappedTargetException.hpp"
+#include "com/sun/star/lang/XMultiComponentFactory.hpp"
+#include "com/sun/star/lang/XServiceInfo.hpp"
+#include "com/sun/star/lang/WrappedTargetException.hpp"
+#include "com/sun/star/uno/Any.hxx"
+#include "com/sun/star/uno/Reference.hxx"
+#include "com/sun/star/uno/RuntimeException.hpp"
+#include "com/sun/star/uno/Sequence.hxx"
+#include "com/sun/star/uno/XComponentContext.hpp"
+#include "com/sun/star/uno/XCurrentContext.hpp"
+#include "cppuhelper/factory.hxx"
+#include "cppuhelper/implbase2.hxx"
+#include "cppuhelper/implementationentry.hxx"
+#include "cppuhelper/weak.hxx"
+#include "rtl/string.h"
+#include "rtl/ustring.h"
+#include "rtl/ustring.hxx"
+#include "sal/types.h"
+#include "uno/current_context.hxx"
+#include "uno/lbnames.h"
+
+#include "gconfaccess.hxx"
+#include "orbit.h"
+
+namespace {
+
+namespace css = com::sun::star;
+
+rtl::OUString SAL_CALL getServiceImplementationName() {
+ return rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.comp.configuration.backend.GconfBackend"));
}
-//------------------------------------------------------------------------------
-
-GConfClient* GconfBackend::mClient= 0;
-
-
-GConfClient* GconfBackend::getGconfClient()
-{
-
- if (mClient == NULL)
- {
- /* initialize glib object type library */
- g_type_init();
-
- GError* aError = NULL;
- if (!gconf_init(0, NULL, &aError))
- {
- rtl::OUStringBuffer msg;
- msg.appendAscii("GconfBackend:GconfLayer: Cannot Initialize Gconf connection - " );
- msg.appendAscii(aError->message);
-
- g_error_free(aError);
- aError = NULL;
- throw uno::RuntimeException(msg.makeStringAndClear(),NULL);
- }
-
- mClient = gconf_client_get_default();
- if (!mClient)
- {
- throw uno::RuntimeException(rtl::OUString::createFromAscii
- ("GconfBackend:GconfLayer: Cannot Initialize Gconf connection"),NULL);
- }
- }
-
- return mClient;
+css::uno::Sequence< rtl::OUString > SAL_CALL getServiceSupportedServiceNames() {
+ rtl::OUString name(
+ RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.configuration.backend.GconfBackend"));
+ return css::uno::Sequence< rtl::OUString >(&name, 1);
}
-//------------------------------------------------------------------------------
-
-uno::Reference<backend::XLayer> SAL_CALL GconfBackend::getLayer(
- const rtl::OUString& aComponent, const rtl::OUString& /*aTimestamp*/)
- throw (backend::BackendAccessException, lang::IllegalArgumentException)
-{
- uno::Reference<backend::XLayer> xLayer;
-
- if( aComponent.equalsAscii("org.openoffice.Office.Common" ) )
- {
- xLayer = new GconfLayer( m_xContext,
- CommonConfigurationValuesList,
- G_N_ELEMENTS( CommonConfigurationValuesList ),
- CommonPreloadValuesList );
- }
- else if( aComponent.equalsAscii("org.openoffice.Inet" ) )
- {
- xLayer = new GconfLayer( m_xContext,
- InetConfigurationValuesList,
- G_N_ELEMENTS( InetConfigurationValuesList ),
- InetPreloadValuesList );
- }
- else if( aComponent.equalsAscii("org.openoffice.VCL" ) )
- {
- xLayer = new GconfLayer( m_xContext,
- VCLConfigurationValuesList,
- G_N_ELEMENTS( VCLConfigurationValuesList ),
- VCLPreloadValuesList );
- }
- else if( aComponent.equalsAscii("org.openoffice.Office.Paths" ) )
- {
- xLayer = new GconfLayer( m_xContext,
- PathsConfigurationValuesList,
- G_N_ELEMENTS( PathsConfigurationValuesList ),
- PathsPreloadValuesList );
- }
+class Service:
+ public cppu::WeakImplHelper2<
+ css::lang::XServiceInfo, css::beans::XPropertySet >,
+ private boost::noncopyable
+{
+public:
+ Service();
+
+private:
+ virtual ~Service() {}
+
+ virtual rtl::OUString SAL_CALL getImplementationName()
+ throw (css::uno::RuntimeException)
+ { return getServiceImplementationName(); }
+
+ virtual sal_Bool SAL_CALL supportsService(rtl::OUString const & ServiceName)
+ throw (css::uno::RuntimeException)
+ { return ServiceName == getSupportedServiceNames()[0]; }
+
+ virtual css::uno::Sequence< rtl::OUString > SAL_CALL
+ getSupportedServiceNames() throw (css::uno::RuntimeException)
+ { return getServiceSupportedServiceNames(); }
+
+ virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
+ getPropertySetInfo() throw (css::uno::RuntimeException)
+ { return css::uno::Reference< css::beans::XPropertySetInfo >(); }
+
+ virtual void SAL_CALL setPropertyValue(
+ rtl::OUString const &, css::uno::Any const &)
+ throw (
+ css::beans::UnknownPropertyException,
+ css::beans::PropertyVetoException,
+ css::lang::IllegalArgumentException,
+ css::lang::WrappedTargetException, css::uno::RuntimeException);
+
+ virtual css::uno::Any SAL_CALL getPropertyValue(
+ rtl::OUString const & PropertyName)
+ throw (
+ css::beans::UnknownPropertyException,
+ css::lang::WrappedTargetException, css::uno::RuntimeException);
+
+ virtual void SAL_CALL addPropertyChangeListener(
+ rtl::OUString const &,
+ css::uno::Reference< css::beans::XPropertyChangeListener > const &)
+ throw (
+ css::beans::UnknownPropertyException,
+ css::lang::WrappedTargetException, css::uno::RuntimeException)
+ {}
+
+ virtual void SAL_CALL removePropertyChangeListener(
+ rtl::OUString const &,
+ css::uno::Reference< css::beans::XPropertyChangeListener > const &)
+ throw (
+ css::beans::UnknownPropertyException,
+ css::lang::WrappedTargetException, css::uno::RuntimeException)
+ {}
+
+ virtual void SAL_CALL addVetoableChangeListener(
+ rtl::OUString const &,
+ css::uno::Reference< css::beans::XVetoableChangeListener > const &)
+ throw (
+ css::beans::UnknownPropertyException,
+ css::lang::WrappedTargetException, css::uno::RuntimeException)
+ {}
+
+ virtual void SAL_CALL removeVetoableChangeListener(
+ rtl::OUString const &,
+ css::uno::Reference< css::beans::XVetoableChangeListener > const &)
+ throw (
+ css::beans::UnknownPropertyException,
+ css::lang::WrappedTargetException, css::uno::RuntimeException)
+ {}
+
+ bool enabled_;
+};
-#ifdef ENABLE_LOCKDOWN
- else if( aComponent.equalsAscii("org.openoffice.UserProfile" ) )
- {
- xLayer = new GconfLayer( m_xContext,
- UserProfileConfigurationValuesList,
- G_N_ELEMENTS( UserProfileConfigurationValuesList ),
- UserProfilePreloadValuesList );
- }
- else if( aComponent.equalsAscii("org.openoffice.Office.Recovery" ) )
- {
- xLayer = new GconfLayer( m_xContext,
- RecoveryConfigurationValuesList,
- G_N_ELEMENTS( RecoveryConfigurationValuesList ),
- RecoveryPreloadValuesList );
- }
- else if( aComponent.equalsAscii("org.openoffice.Setup" ) )
- {
- xLayer = new GconfLayer( m_xContext,
- SetupConfigurationValuesList,
- G_N_ELEMENTS( SetupConfigurationValuesList ),
- SetupPreloadValuesList );
+Service::Service(): enabled_(false) {
+ css::uno::Reference< css::uno::XCurrentContext > context(
+ css::uno::getCurrentContext());
+ if (context.is()) {
+ rtl::OUString desktop;
+ context->getValueByName(
+ rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM("system.desktop-environment"))) >>=
+ desktop;
+ enabled_ = desktop.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("GNOME")) &&
+ ((orbit_major_version == 2 && orbit_minor_version >= 8) ||
+ orbit_major_version > 2);
+ // ORBit-2 versions < 2.8 cause a deadlock with the gtk+ VCL plugin
}
-#endif // ENABLE_LOCKDOWN
-
- return xLayer;
}
-//------------------------------------------------------------------------------
-
-uno::Reference<backend::XUpdatableLayer> SAL_CALL
-GconfBackend::getUpdatableLayer(const rtl::OUString& /*aComponent*/)
- throw (backend::BackendAccessException,lang::NoSupportException,
- lang::IllegalArgumentException)
+void Service::setPropertyValue(rtl::OUString const &, css::uno::Any const &)
+ throw (
+ css::beans::UnknownPropertyException, css::beans::PropertyVetoException,
+ css::lang::IllegalArgumentException, css::lang::WrappedTargetException,
+ css::uno::RuntimeException)
{
- throw lang::NoSupportException( rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("GconfBackend: No Update Operation allowed, Read Only access") ),
- *this) ;
-}
-
-//------------------------------------------------------------------------------
-
-// currently not used
-#if 0
-static void
-keyChangedCallback(GConfClient* aClient,
- guint aID,
- GConfEntry* aEntry,
- gpointer aBackend)
-{
-
- OSL_TRACE("In KeyChangedCallback Function");
- rtl::OUString aGconfKey= rtl::OUString::createFromAscii(aEntry->key);
- GconfBackend * aGconfBe = (GconfBackend*) aBackend;
-
- aGconfBe->notifyListeners(aGconfKey);
-
+ throw css::lang::IllegalArgumentException(
+ rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM("setPropertyValue not supported")),
+ static_cast< cppu::OWeakObject * >(this), -1);
}
-//------------------------------------------------------------------------------
-
-void GconfBackend::notifyListeners(const rtl::OUString& /*aGconfKey*/)
+css::uno::Any Service::getPropertyValue(rtl::OUString const & PropertyName)
+ throw (
+ css::beans::UnknownPropertyException, css::lang::WrappedTargetException,
+ css::uno::RuntimeException)
{
-/*
- //look up associated component from Map using GconfKey
- KeyMappingTable::iterator aIter;
- rtl::OUString aComponent;
- for( aIter= mKeyMap.begin(); aIter != mKeyMap.end(); aIter++)
- {
- if (aIter->second.mGconfName == aGconfKey)
+ for (std::size_t i = 0; i < gconfaccess::nConfigurationValues; ++i) {
+ if (PropertyName.equalsAscii(
+ gconfaccess::ConfigurationValues[i].OOoConfItem))
{
- aComponent = aIter->first;
- break;
+ return css::uno::makeAny(
+ enabled_
+ ? gconfaccess::getValue(gconfaccess::ConfigurationValues[i])
+ : css::beans::Optional< css::uno::Any >());
}
-
- }
-
-
- //Need to store updated layer TimeStamp as Gconf library
- //has no access to TimeStamp via its api
- TimeValue aTimeValue ={0,0} ;
- osl_getSystemTime(&aTimeValue);
-
- oslDateTime aLayerTS;
- rtl::OUString aTimeStamp;
-
- if (osl_getDateTimeFromTimeValue(&aTimeValue, &aLayerTS)) {
- sal_Char asciiStamp [20] ;
-
- sprintf(asciiStamp, "%04d%02d%02d%02d%02d%02dZ",
- aLayerTS.Year, aLayerTS.Month, aLayerTS.Day,
- aLayerTS.Hours, aLayerTS.Minutes, aLayerTS.Seconds) ;
- aTimeStamp = rtl::OUString::createFromAscii(asciiStamp) ;
- }
-
-
- TSMappingTable::iterator aTSIter;
- aTSIter = mTSMap.find(aComponent);
- if (aTSIter == mTSMap.end())
- {
- mTSMap.insert(TSMappingTable::value_type(aComponent,aTimeStamp));
- }
- else
- {
- aTSIter->second = aTimeStamp;
-
}
- typedef ListenerList::iterator LLIter;
- typedef std::pair<LLIter, LLIter> BFRange;
- BFRange aRange = mListenerList.equal_range(aComponent);
- while (aRange.first != aRange.second)
- {
- LLIter cur = aRange.first++;
- backend::ComponentChangeEvent aEvent;
- aEvent.Component = aComponent;
- aEvent.Source = *this;
- cur->second->componentDataChanged(aEvent);
-
- }
-*/
+ throw css::beans::UnknownPropertyException(
+ PropertyName, static_cast< cppu::OWeakObject * >(this));
}
-#endif
-//------------------------------------------------------------------------------
-void SAL_CALL GconfBackend::addChangesListener(
- const uno::Reference<backend::XBackendChangesListener>& xListener,
- const rtl::OUString& aComponent)
- throw (::com::sun::star::uno::RuntimeException)
+css::uno::Reference< css::uno::XInterface > SAL_CALL createInstance(
+ css::uno::Reference< css::uno::XComponentContext > const &)
{
-/*
- osl::MutexGuard aGuard(mMutex);
-
- GConfClient* aClient = getGconfClient();
-
- ListenerList::iterator aIter;
- aIter = mListenerList.find(aComponent);
- if (aIter == mListenerList.end())
- {
- typedef KeyMappingTable::iterator KMTIter;
- typedef std::pair<KMTIter, KMTIter> BFRange;
-
- BFRange aRange = mKeyMap.equal_range(aComponent);
-
- while (aRange.first != aRange.second)
- {
- KMTIter cur = aRange.first++;
-
- sal_Int32 nIndex = cur->second.mGconfName.lastIndexOf('/');
- rtl::OUString aDirectory = cur->second.mGconfName.copy(0, nIndex);
- rtl::OString aDirectoryStr= rtl::OUStringToOString(aDirectory, RTL_TEXTENCODING_ASCII_US);
- GError* aError = NULL;
- gconf_client_add_dir(aClient,
- aDirectoryStr.getStr(),
- GCONF_CLIENT_PRELOAD_NONE,
- &aError);
-
- if(aError != NULL)
- {
- OSL_TRACE("GconfBackend:: Cannot register listener for Component %s",
- rtl::OUStringToOString(aComponent, RTL_TEXTENCODING_ASCII_US).getStr() );
- }
-
- rtl::OString aKey = rtl::OUStringToOString(cur->second.mGconfName,
- RTL_TEXTENCODING_ASCII_US);
-
- GConfClientNotifyFunc aNotifyFunc = &keyChangedCallback;
- sal_uInt32 aID = gconf_client_notify_add(
- aClient,
- aKey.getStr(),
- aNotifyFunc,
- this,
- NULL,
- &aError);
- if(aError != NULL)
- {
- OSL_TRACE("GconfBackend:: Cannot register listener for Component %s",
- rtl::OUStringToOString(aComponent, RTL_TEXTENCODING_ASCII_US).getStr() );
- }
-
-
-
- }
-
- }
-*/
-
-/*
- if (mNotificationThread == NULL)
- {
-
- mNotificationThread = new ONotificationThread();
-
- if ( mNotificationThread == NULL)
- {
- OSL_ENSURE(false,"Could not start Notification Thread ");
- }
- else
- {
- mNotificationThread->create();
- }
- }
-*/
- //Store listener in list
- mListenerList.insert(ListenerList::value_type(aComponent, xListener));
-
-
+ return static_cast< cppu::OWeakObject * >(new Service);
}
-//------------------------------------------------------------------------------
-void SAL_CALL GconfBackend::removeChangesListener(
- const uno::Reference<backend::XBackendChangesListener>& /*xListener*/,
- const rtl::OUString& /*aComponent*/)
- throw (::com::sun::star::uno::RuntimeException)
-{
-/*
- osl::MutexGuard aGuard(mMutex);
- GConfClient* aClient = GconfBackend::getGconfClient();
- ListenerList::iterator aIter;
- aIter = mListenerList.find(aComponent);
- if (aIter == mListenerList.end())
- {
-
- OSL_TRACE("GconfBackend:: Cannot deregister listener for Component %s - Listner not registered",
- rtl::OUStringToOString(aComponent, RTL_TEXTENCODING_ASCII_US).getStr() );
-
- typedef KeyMappingTable::iterator KMTIter;
- typedef std::pair<KMTIter, KMTIter> BFRange;
-
- BFRange aRange = mKeyMap.equal_range(aComponent);
-
- while (aRange.first != aRange.second)
- {
- KMTIter cur = aRange.first++;
-
- sal_Int32 nIndex = cur->second.mGconfName.lastIndexOf('/');
- rtl::OUString aDirectory = cur->second.mGconfName.copy(0, nIndex);
- rtl::OString aDirectoryStr= rtl::OUStringToOString(aDirectory, RTL_TEXTENCODING_ASCII_US);
- GError* aError = NULL;
- gconf_client_remove_dir(aClient,
- aDirectoryStr.getStr(),
- &aError);
- if(aError != NULL)
- {
- OSL_TRACE("GconfBackend:: Cannot deRegister listener for Component %s",
- rtl::OUStringToOString(aComponent, RTL_TEXTENCODING_ASCII_US).getStr() );
- }
- }
- }
-*/
-}
-
-//------------------------------------------------------------------------------
-
-rtl::OUString SAL_CALL GconfBackend::getBackendName(void) {
- return rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.configuration.backend.GconfBackend") );
-}
-
-//------------------------------------------------------------------------------
+static cppu::ImplementationEntry const services[] = {
+ { &createInstance, &getServiceImplementationName,
+ &getServiceSupportedServiceNames, &cppu::createSingleComponentFactory, 0,
+ 0 },
+ { 0, 0, 0, 0, 0, 0 }
+};
-rtl::OUString SAL_CALL GconfBackend::getImplementationName(void)
- throw (uno::RuntimeException)
-{
- return getBackendName() ;
}
-//------------------------------------------------------------------------------
-
-uno::Sequence<rtl::OUString> SAL_CALL GconfBackend::getBackendServiceNames(void)
+extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
+ char const * pImplName, void * pServiceManager, void * pRegistryKey)
{
- uno::Sequence<rtl::OUString> aServices(1) ;
- aServices[0] = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.backend.GconfBackend")) ;
-
- return aServices ;
+ return cppu::component_getFactoryHelper(
+ pImplName, pServiceManager, pRegistryKey, services);
}
-//------------------------------------------------------------------------------
-
-sal_Bool SAL_CALL GconfBackend::supportsService(const rtl::OUString& aServiceName)
- throw (uno::RuntimeException)
+extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL
+component_getImplementationEnvironment(
+ char const ** ppEnvTypeName, uno_Environment **)
{
- uno::Sequence< rtl::OUString > const svc = getBackendServiceNames();
-
- for(sal_Int32 i = 0; i < svc.getLength(); ++i )
- if(svc[i] == aServiceName)
- return true;
-
- return false;
+ *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
-//------------------------------------------------------------------------------
-
-uno::Sequence<rtl::OUString>
-SAL_CALL GconfBackend::getSupportedServiceNames(void)
- throw (uno::RuntimeException)
+extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(
+ void * pServiceManager, void * pRegistryKey)
{
- return getBackendServiceNames() ;
+ return component_writeInfoHelper(pServiceManager, pRegistryKey, services);
}
-
-// ---------------------------------------------------------------------------------------
-
-
diff --git a/shell/source/backends/gconfbe/gconfbackend.hxx b/shell/source/backends/gconfbe/gconfbackend.hxx
deleted file mode 100644
index 185577ec0265..000000000000
--- a/shell/source/backends/gconfbe/gconfbackend.hxx
+++ /dev/null
@@ -1,226 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: gconfbackend.hxx,v $
- * $Revision: 1.8 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef GCONFBACKEND_HXX_
-#define GCONFBACKEND_HXX_
-
-#ifndef _COM_SUN_STAR_CONFIGURATION_BACKEND_XSCHEMASUPPLIER_HPP_
-#include <com/sun/star/configuration/backend/XSingleLayerStratum.hpp>
-#endif
-#include <com/sun/star/lang/XInitialization.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-
-//#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
-//#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-//#endif // _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
-#include <com/sun/star/configuration/InvalidBootstrapFileException.hpp>
-#include <com/sun/star/configuration/backend/CannotConnectException.hpp>
-#include <com/sun/star/configuration/backend/XBackendChangesNotifier.hpp>
-#include <cppuhelper/compbase3.hxx>
-
-#ifndef INCLUDED_MAP
-#include <map>
-#define INCLUDED_MAP
-#endif
-//#ifndef _VOS_THREAD_HXX_
-//#include <vos/thread.hxx>
-//#endif
-
-#include <gconf/gconf-client.h>
-
-
-namespace css = com::sun::star ;
-namespace uno = css::uno ;
-namespace lang = css::lang ;
-namespace backend = css::configuration::backend ;
-
-
-/** Structure containing the mapping between OOffice and Gconf keys.
- AlOO specifies whether the key is protected, if key is protected it
- can not be over riden in subsequent higher layers
-*/
-struct keyMapping
-{
- keyMapping(){};
- rtl::OUString mOOName;
- rtl::OUString mOOType;
- rtl::OUString mGconfName;
- sal_Bool mbProtected;
-};
-
-typedef keyMapping KeyMappingInfo;
-typedef std::multimap<rtl::OUString, KeyMappingInfo> KeyMappingTable;
-
-/*Time Stamp mapping table used to store timestamps of updated components
- when a notification is recieved. It is needed as you cannot access gconf key
- timestamps via the Gconf api */
-
-typedef std::multimap<rtl::OUString, rtl::OUString> TSMappingTable;
-
-//------------------------------------------------------------------------------
-
-/*
-class ONotificationThread: public vos::OThread
-{
-
-
-public:
- ONotificationThread()
- {}
-
- ~ONotificationThread()
- {
- g_main_loop_quit(mLoop);
- }
-
-private:
- virtual void SAL_CALL onTerminated()
- {
- delete this;
- }
-
- virtual void SAL_CALL run();
- GMainLoop* mLoop;
-};
-
-*/
-
-//------------------------------------------------------------------------------
-typedef cppu::WeakComponentImplHelper3<backend::XSingleLayerStratum,
- backend::XBackendChangesNotifier,
- lang::XServiceInfo> BackendBase ;
-
-/**
- Implements the SingleLayerStratum service for gconf access.
- */
-class GconfBackend : public BackendBase {
- public :
-
- static GconfBackend* createInstance(const uno::Reference<uno::XComponentContext>& xContext);
-
- // XServiceInfo
- virtual rtl::OUString SAL_CALL getImplementationName( )
- throw (uno::RuntimeException) ;
-
- virtual sal_Bool SAL_CALL supportsService( const rtl::OUString& aServiceName )
- throw (uno::RuntimeException) ;
-
- virtual uno::Sequence<rtl::OUString> SAL_CALL getSupportedServiceNames( )
- throw (uno::RuntimeException) ;
-
- /**
- Provides the implementation name.
-
- @return implementation name
- */
- static rtl::OUString SAL_CALL getBackendName(void) ;
-
- /**
- Provides the supported services names
-
- @return service names
- */
- static uno::Sequence<rtl::OUString> SAL_CALL getBackendServiceNames(void) ;
-
- /* returns a GconfClient */
- static GConfClient* getGconfClient();
-
- //XSingleLayerStratum
- virtual uno::Reference<backend::XLayer> SAL_CALL
- getLayer( const rtl::OUString& aLayerId, const rtl::OUString& aTimestamp )
- throw (backend::BackendAccessException, lang::IllegalArgumentException) ;
-
- virtual uno::Reference<backend::XUpdatableLayer> SAL_CALL
- getUpdatableLayer( const rtl::OUString& aLayerId )
- throw (backend::BackendAccessException, lang::NoSupportException,
- lang::IllegalArgumentException) ;
-
- // XBackendChangesNotifier
- virtual void SAL_CALL addChangesListener(
- const uno::Reference<backend::XBackendChangesListener>& xListener,
- const rtl::OUString& aComponent)
- throw (::com::sun::star::uno::RuntimeException);
-
-
- virtual void SAL_CALL removeChangesListener(
- const uno::Reference<backend::XBackendChangesListener>& xListener,
- const rtl::OUString& aComponent)
- throw (::com::sun::star::uno::RuntimeException);
-// currently not used
-#if 0
- //Notify all listener of component change
- void notifyListeners(const rtl::OUString& aGconfKey);
-#endif
- protected:
- /**
- Service constructor from a service factory.
-
- @param xContext component context
- */
- GconfBackend(const uno::Reference<uno::XComponentContext>& xContext)
- throw (backend::BackendAccessException);
-
- /** Destructor */
- ~GconfBackend(void) ;
-
- private:
-
- typedef uno::Reference<backend::XBackendChangesListener> ListenerRef;
- typedef std::multimap<rtl::OUString,ListenerRef> ListenerList;
-
- /** Build Gconf/OO mapping table */
- void initializeMappingTable ();
-
-
- /** The component context */
- uno::Reference<uno::XComponentContext> m_xContext;
-
- /** Mutex for reOOurces protection */
- osl::Mutex mMutex ;
-
- KeyMappingTable mKeyMap;
-
- /** List of component TimeStamps */
- TSMappingTable mTSMap;
-
- static GconfBackend* mInstance;
-
- /** List of listener */
- ListenerList mListenerList;
-
- /**Connection to Gconf */
- static GConfClient* mClient;
-
-// ONotificationThread* mNotificationThread;
-} ;
-
-
-#endif // CONFIGMGR_LOCALBE_LOCALSINGLESTRATUM_HXX_
diff --git a/shell/source/backends/gconfbe/gconfbe.xml b/shell/source/backends/gconfbe/gconfbe.xml
deleted file mode 100644
index 55eea1c1f6c9..000000000000
--- a/shell/source/backends/gconfbe/gconfbe.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE module-description PUBLIC "-//StarOffice//DTD ComponentDescription 1.0//EN" "module-description.dtd">
-<module-description xmlns:xlink="http://www.w3.org/1999/xlink">
- <module-name>gconfbe</module-name>
- <component-description>
- <author> Oliver Braun </author>
- <name>com.sun.star.comp.configuration.backend.GconfBackend</name>
- <description> The </description>
- <loader-name>com.sun.star.loader.SharedLibrary</loader-name>
- <language>c++</language>
- <status value="beta"/>
- <supported-service>com.sun.star.comp.configuration.backend.GconfBackend</supported-service>
- <service-dependency>...</service-dependency>
- <type>com.sun.star.configuration.backend.XBackendChangesListener</type>
- <type>com.sun.star.configuration.backend.XBackendChangesNotifier</type>
- <type>com.sun.star.configuration.backend.XLayerHandler</type>
- <type>com.sun.star.configuration.backend.XSingleLayerStratum</type>
- <type>com.sun.star.lang.XMultiComponentFactory</type>
- <type>com.sun.star.lang.XServiceInfo</type>
- <type>com.sun.star.lang.XSingleComponentFactory</type>
- <type>com.sun.star.lang.XTypeProvider</type>
- <type>com.sun.star.uno.TypeClass</type>
- <type>com.sun.star.uno.XAggregation</type>
- <type>com.sun.star.uno.XComponentContext</type>
- <type>com.sun.star.uno.XCurrentContext</type>
- <type>com.sun.star.uno.XWeak</type>
- <type>com.sun.star.registry.XRegistryKey</type>
- </component-description>
- <project-build-dependency>cppuhelper</project-build-dependency>
- <project-build-dependency>cppu</project-build-dependency>
- <project-build-dependency>sal</project-build-dependency>
- <runtime-module-dependency>cppuhelper3$(COM)</runtime-module-dependency>
- <runtime-module-dependency>cppu3</runtime-module-dependency>
- <runtime-module-dependency>sal3</runtime-module-dependency>
-</module-description>
diff --git a/shell/source/backends/gconfbe/gconfbecdef.cxx b/shell/source/backends/gconfbe/gconfbecdef.cxx
deleted file mode 100644
index ed20759faa7e..000000000000
--- a/shell/source/backends/gconfbe/gconfbecdef.cxx
+++ /dev/null
@@ -1,151 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: gconfbecdef.cxx,v $
- * $Revision: 1.11 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_shell.hxx"
-#include "gconfbackend.hxx"
-#include <com/sun/star/registry/XRegistryKey.hpp>
-
-#ifndef _CPPUHELPER_IMPLEMENTATIONENTRY_HXX_
-#include <cppuhelper/implementationentry.hxx>
-#endif // _CPPUHELPER_IMPLEMENTATIONENTRY_HXX_
-#include <com/sun/star/uno/XComponentContext.hpp>
-#include <rtl/ustrbuf.hxx>
-
-#include "uno/current_context.hxx"
-#include <stdio.h>
-#include "orbit.h"
-
-namespace css = com::sun::star ;
-namespace uno = css::uno ;
-namespace lang = css::lang ;
-namespace backend = css::configuration::backend ;
-
-//==============================================================================
-
-static uno::Reference<uno::XInterface> SAL_CALL createGconfBackend(const uno::Reference<uno::XComponentContext>& xContext)
-{
- try {
- uno::Reference< uno::XCurrentContext > xCurrentContext(uno::getCurrentContext());
-
- if (xCurrentContext.is())
- {
- uno::Any aValue = xCurrentContext->getValueByName(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "system.desktop-environment" ) ) );
-
- rtl::OUString aDesktopEnvironment;
- if ( (aValue >>= aDesktopEnvironment) && (aDesktopEnvironment.equalsAscii("GNOME")) )
- {
- // ORBit-2 versions < 2.8 cause a deadlock with the gtk+ VCL plugin
- if ( (orbit_major_version >= 2) && (orbit_minor_version >= 8) )
- {
- return * GconfBackend::createInstance(xContext);
- }
- }
- }
-
- return uno::Reference<uno::XInterface>();
-
- } catch (uno::RuntimeException e) {
- return uno::Reference<uno::XInterface>();
- }
-
-}
-
-//==============================================================================
-
-static const cppu::ImplementationEntry kImplementations_entries[] =
-{
- {
- createGconfBackend,
- GconfBackend::getBackendName,
- GconfBackend::getBackendServiceNames,
- cppu::createSingleComponentFactory,
- NULL,
- 0
- },
- { NULL, NULL, NULL, NULL, NULL, 0 }
-} ;
-//------------------------------------------------------------------------------
-
-extern "C" void SAL_CALL component_getImplementationEnvironment(
- const sal_Char **aEnvTypeName,
- uno_Environment **/*aEnvironment*/) {
- *aEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ;
-}
-
-//------------------------------------------------------------------------------
-
-extern "C" sal_Bool SAL_CALL component_writeInfo(void */*pServiceManager*/,
- void *pRegistryKey) {
-
- using namespace ::com::sun::star::registry;
- if (pRegistryKey)
- {
- try
- {
- uno::Reference< XRegistryKey > xImplKey = static_cast< XRegistryKey* >( pRegistryKey )->createKey(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) + GconfBackend::getBackendName()
- );
-
- // Register associated service names
- uno::Reference< XRegistryKey > xServicesKey = xImplKey->createKey(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES") )
- );
-
- uno::Sequence<rtl::OUString> sServiceNames = GconfBackend::getBackendServiceNames();
- for (sal_Int32 i = 0 ; i < sServiceNames.getLength() ; ++ i)
- xServicesKey->createKey(sServiceNames[i]);
-
- return sal_True;
- }
-
- catch( InvalidRegistryException& )
- {
- OSL_ENSURE(sal_False, "InvalidRegistryException caught");
- }
- }
-
- return sal_False;
-}
-
-//------------------------------------------------------------------------------
-
-extern "C" void *component_getFactory(const sal_Char *aImplementationName,
- void *aServiceManager,
- void *aRegistryKey) {
-
- return cppu::component_getFactoryHelper(
- aImplementationName,
- aServiceManager,
- aRegistryKey,
- kImplementations_entries) ;
-}
-//------------------------------------------------------------------------------
diff --git a/shell/source/backends/gconfbe/gconflayer.hxx b/shell/source/backends/gconfbe/gconflayer.hxx
deleted file mode 100644
index af9753b9179a..000000000000
--- a/shell/source/backends/gconfbe/gconflayer.hxx
+++ /dev/null
@@ -1,133 +0,0 @@
-#ifndef GCONFLAYER_HXX_
-#define GCONFLAYER_HXX_
-
-#include "gconfbackend.hxx"
-#include <com/sun/star/configuration/backend/XLayer.hpp>
-#include <com/sun/star/configuration/backend/BackendAccessException.hpp>
-
-#ifndef _COM_SUN_STAR_CONFIGURATION_BACKEND_XLAYERCONTENTDESCIBER_HPP_
-#include <com/sun/star/configuration/backend/XLayerContentDescriber.hpp>
-#endif // _COM_SUN_STAR_CONFIGURATION_BACKEND_XLAYERCONTENTDESCIBER_HPP_
-#include <com/sun/star/util/XTimeStamped.hpp>
-#include <cppuhelper/implbase2.hxx>
-
-#define GCONF_PROXY_MODE_KEY "/system/proxy/mode"
-#define GCONF_AUTO_SAVE_KEY "/apps/openoffice/auto_save"
-
-enum ConfigurationSetting
-{
- SETTING_PROXY_MODE,
- SETTING_PROXY_HTTP_HOST,
- SETTING_PROXY_HTTP_PORT,
- SETTING_PROXY_HTTPS_HOST,
- SETTING_PROXY_HTTPS_PORT,
- SETTING_PROXY_FTP_HOST,
- SETTING_PROXY_FTP_PORT,
- SETTING_NO_PROXY_FOR,
- SETTING_ENABLE_ACCESSIBILITY,
- SETTING_MAILER_PROGRAM,
- SETTING_WORK_DIRECTORY,
- SETTING_SOURCEVIEWFONT_NAME,
- SETTING_SOURCEVIEWFONT_HEIGHT,
- SETTING_USER_GIVENNAME,
- SETTING_USER_SURNAME,
-
-#ifdef ENABLE_LOCKDOWN
-
- SETTING_DISABLE_PRINTING,
- SETTING_USE_SYSTEM_FILE_DIALOG,
- SETTING_DISABLE_UI_CUSTOMIZATION,
- SETTING_PRINTING_MODIFIES_DOCUMENT,
- SETTING_SHOW_ICONS_IN_MENUS,
- SETTING_SHOW_INACTIVE_MENUITEMS,
- SETTING_SHOW_FONT_PREVIEW,
- SETTING_SHOW_FONT_HISTORY,
- SETTING_ENABLE_OPENGL,
- SETTING_OPTIMIZE_OPENGL,
- SETTING_SAVE_DOCUMENT_WINDOWS,
- SETTING_SAVE_DOCUMENT_VIEW_INFO,
- SETTING_USE_SYSTEM_FONT,
- SETTING_USE_FONT_ANTI_ALIASING,
- SETTING_FONT_ANTI_ALIASING_MIN_PIXEL,
- SETTING_WARN_CREATE_PDF,
- SETTING_WARN_PRINT_DOC,
- SETTING_WARN_SAVEORSEND_DOC,
- SETTING_WARN_SIGN_DOC,
- SETTING_REMOVE_PERSONAL_INFO,
- SETTING_RECOMMEND_PASSWORD,
- SETTING_UNDO_STEPS,
- SETTING_SYMBOL_SET,
- SETTING_MACRO_SECURITY_LEVEL,
- SETTING_CREATE_BACKUP,
- SETTING_WARN_ALIEN_FORMAT,
- SETTING_AUTO_SAVE,
- SETTING_AUTO_SAVE_INTERVAL,
- SETTING_WRITER_DEFAULT_DOC_FORMAT,
- SETTING_IMPRESS_DEFAULT_DOC_FORMAT,
- SETTING_CALC_DEFAULT_DOC_FORMAT,
-
-#endif // ENABLE_LOCKDOWN
-
- SETTINGS_LAST
-};
-
-struct ConfigurationValue
-{
- const ConfigurationSetting nSettingId;
- const gchar *GconfItem;
- const char *OOoConfItem;
- const char *OOoConfValueType;
- const sal_Bool bLocked;
- const sal_Bool bNeedsTranslation;
- const ConfigurationSetting nDependsOn;
-};
-
-namespace css = com::sun::star ;
-namespace uno = css::uno ;
-namespace lang = css::lang ;
-namespace backend = css::configuration::backend ;
-namespace util = css::util ;
-
-/**
- Implementation of the XLayer interface for the Gconf values mapped into
- the org.openoffice.* configuration component.
- */
-class GconfLayer : public cppu::WeakImplHelper2<backend::XLayer, util::XTimeStamped>
-{
-public :
- /**
- Constructor given the component context
-
- @param xContext The component context
- */
-
- GconfLayer( const uno::Reference<uno::XComponentContext>& xContext,
- const ConfigurationValue pConfigurationValuesList[],
- const sal_Int32 nConfigurationValues,
- const char * pPreloadValuesList[] );
-
- // XLayer
- virtual void SAL_CALL readData(
- const uno::Reference<backend::XLayerHandler>& xHandler)
- throw ( backend::MalformedDataException,
- lang::NullPointerException,
- lang::WrappedTargetException,
- uno::RuntimeException );
-
- // XTimeStamped
- virtual rtl::OUString SAL_CALL getTimestamp(void)
- throw (uno::RuntimeException);
-
- protected:
-
- /** Destructor */
- ~GconfLayer(void) {}
-
-private :
- uno::Reference<backend::XLayerContentDescriber> m_xLayerContentDescriber;
- const ConfigurationValue* m_pConfigurationValuesList;
- const sal_Int32 m_nConfigurationValues;
- const char** m_pPreloadValuesList;
- } ;
-
-#endif // GCONFLAYER
diff --git a/shell/source/backends/gconfbe/makefile.mk b/shell/source/backends/gconfbe/makefile.mk
index 472db4b244a3..a8d9b23aa9df 100644
--- a/shell/source/backends/gconfbe/makefile.mk
+++ b/shell/source/backends/gconfbe/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.19 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
@@ -35,8 +31,7 @@ TARGET=gconfbe
LIBTARGET=NO
ENABLE_EXCEPTIONS=TRUE
-
-COMP1TYPELIST=$(TARGET)
+VISIBILITY_HIDDEN=TRUE
# --- Settings ---
@@ -69,9 +64,8 @@ PKGCONFIG_LIBS!:=-Wl,--export-dynamic $(PKGCONFIG_LIBS)
SLOFILES=\
- $(SLO)$/gconfbecdef.obj \
- $(SLO)$/gconfbackend.obj \
- $(SLO)$/gconflayer.obj
+ $(SLO)$/gconfaccess.obj \
+ $(SLO)$/gconfbackend.obj
SHL1NOCHECK=TRUE
SHL1TARGET=$(TARGET)1.uno
@@ -86,7 +80,6 @@ SHL1STDLIBS= \
SHL1STDLIBS+=$(PKGCONFIG_LIBS)
-SHL1VERSIONMAP=exports.map
SHL1DEF=$(MISC)$/$(SHL1TARGET).def
DEF1NAME=$(SHL1TARGET)
diff --git a/shell/source/backends/gconfbe/orbit.h b/shell/source/backends/gconfbe/orbit.h
index 4ddd26a03a89..2858e8100dc8 100644
--- a/shell/source/backends/gconfbe/orbit.h
+++ b/shell/source/backends/gconfbe/orbit.h
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: orbit.h,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/backends/kde4be/exports.map b/shell/source/backends/kde4be/exports.map
deleted file mode 100644
index ba501f9ae076..000000000000
--- a/shell/source/backends/kde4be/exports.map
+++ /dev/null
@@ -1,10 +0,0 @@
-UDK_3_0_0 {
- global:
- GetVersionInfo;
- component_getImplementationEnvironment;
- component_getFactory;
- component_writeInfo;
-
- local:
- *;
-};
diff --git a/shell/source/backends/kde4be/kde4access.cxx b/shell/source/backends/kde4be/kde4access.cxx
new file mode 100644
index 000000000000..336d2d4a458e
--- /dev/null
+++ b/shell/source/backends/kde4be/kde4access.cxx
@@ -0,0 +1,319 @@
+/*************************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+************************************************************************/
+
+#include "precompiled_shell.hxx"
+#include "sal/config.h"
+
+#include "QFont"
+#include "QString"
+#include "kemailsettings.h"
+#include "kglobalsettings.h"
+#include "kprotocolmanager.h"
+
+#include "com/sun/star/uno/Any.hxx"
+#include "cppu/unotype.hxx"
+#include "osl/diagnose.h"
+#include "osl/file.h"
+#include "rtl/string.h"
+#include "rtl/ustring.hxx"
+
+#include "kde4access.hxx"
+
+#define SPACE ' '
+#define COMMA ','
+#define SEMI_COLON ';'
+
+namespace kde4access {
+
+namespace {
+
+namespace css = com::sun::star ;
+namespace uno = css::uno ;
+
+}
+
+css::beans::Optional< css::uno::Any > getValue(rtl::OUString const & id) {
+ if (id.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ExternalMailer"))) {
+ KEMailSettings aEmailSettings;
+ QString aClientProgram;
+ ::rtl::OUString sClientProgram;
+
+ aClientProgram = aEmailSettings.getSetting( KEMailSettings::ClientProgram );
+ if ( aClientProgram.isEmpty() )
+ aClientProgram = "kmail";
+ else
+ aClientProgram = aClientProgram.section(SPACE, 0, 0);
+ sClientProgram = (const sal_Unicode *) aClientProgram.utf16();
+ return css::beans::Optional< css::uno::Any >(
+ true, uno::makeAny( sClientProgram ) );
+ } else if (id.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("SourceViewFontHeight")))
+ {
+ QFont aFixedFont;
+ short nFontHeight;
+
+ aFixedFont = KGlobalSettings::fixedFont();
+ nFontHeight = aFixedFont.pointSize();
+ return css::beans::Optional< css::uno::Any >(
+ true, uno::makeAny( nFontHeight ) );
+ } else if (id.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("SourceViewFontName")))
+ {
+ QFont aFixedFont;
+ QString aFontName;
+ :: rtl::OUString sFontName;
+
+ aFixedFont = KGlobalSettings::fixedFont();
+ aFontName = aFixedFont.family();
+ sFontName = (const sal_Unicode *) aFontName.utf16();
+ return css::beans::Optional< css::uno::Any >(
+ true, uno::makeAny( sFontName ) );
+ } else if (id.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("EnableATToolSupport")))
+ {
+ /* does not make much sense without an accessibility bridge */
+ sal_Bool ATToolSupport = sal_False;
+ return css::beans::Optional< css::uno::Any >(
+ true, uno::makeAny( rtl::OUString::valueOf( ATToolSupport ) ) );
+ } else if (id.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("WorkPathVariable")))
+ {
+ QString aDocumentsDir( KGlobalSettings::documentPath() );
+ rtl::OUString sDocumentsDir;
+ rtl::OUString sDocumentsURL;
+ if ( aDocumentsDir.endsWith(QChar('/')) )
+ aDocumentsDir.truncate ( aDocumentsDir.length() - 1 );
+ sDocumentsDir = (const sal_Unicode *) aDocumentsDir.utf16();
+ osl_getFileURLFromSystemPath( sDocumentsDir.pData, &sDocumentsURL.pData );
+ return css::beans::Optional< css::uno::Any >(
+ true, uno::makeAny( sDocumentsURL ) );
+ } else if (id.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ooInetFTPProxyName")))
+ {
+ QString aFTPProxy;
+ switch ( KProtocolManager::proxyType() )
+ {
+ case KProtocolManager::ManualProxy: // Proxies are manually configured
+ aFTPProxy = KProtocolManager::proxyFor( "FTP" );
+ break;
+ case KProtocolManager::PACProxy: // A proxy configuration URL has been given
+ case KProtocolManager::WPADProxy: // A proxy should be automatically discovered
+ case KProtocolManager::EnvVarProxy: // Use the proxy values set through environment variables
+// In such cases, the proxy address is not stored in KDE, but determined dynamically.
+// The proxy address may depend on the requested address, on the time of the day, on the speed of the wind...
+// The best we can do here is to ask the current value for a given address.
+ aFTPProxy = KProtocolManager::proxyForUrl( KUrl("ftp://ftp.openoffice.org") );
+ break;
+ default: // No proxy is used
+ break;
+ }
+ if ( !aFTPProxy.isEmpty() )
+ {
+ KUrl aProxy(aFTPProxy);
+ ::rtl::OUString sProxy = (const sal_Unicode *) aProxy.host().utf16();
+ return css::beans::Optional< css::uno::Any >(
+ true, uno::makeAny( sProxy ) );
+ }
+ } else if (id.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ooInetFTPProxyPort")))
+ {
+ QString aFTPProxy;
+ switch ( KProtocolManager::proxyType() )
+ {
+ case KProtocolManager::ManualProxy: // Proxies are manually configured
+ aFTPProxy = KProtocolManager::proxyFor( "FTP" );
+ break;
+ case KProtocolManager::PACProxy: // A proxy configuration URL has been given
+ case KProtocolManager::WPADProxy: // A proxy should be automatically discovered
+ case KProtocolManager::EnvVarProxy: // Use the proxy values set through environment variables
+// In such cases, the proxy address is not stored in KDE, but determined dynamically.
+// The proxy address may depend on the requested address, on the time of the day, on the speed of the wind...
+// The best we can do here is to ask the current value for a given address.
+ aFTPProxy = KProtocolManager::proxyForUrl( KUrl("ftp://ftp.openoffice.org") );
+ break;
+ default: // No proxy is used
+ break;
+ }
+ if ( !aFTPProxy.isEmpty() )
+ {
+ KUrl aProxy(aFTPProxy);
+ sal_Int32 nPort = aProxy.port();
+ return css::beans::Optional< css::uno::Any >(
+ true, uno::makeAny( nPort ) );
+ }
+ } else if (id.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ooInetHTTPProxyName")))
+ {
+ QString aHTTPProxy;
+ switch ( KProtocolManager::proxyType() )
+ {
+ case KProtocolManager::ManualProxy: // Proxies are manually configured
+ aHTTPProxy = KProtocolManager::proxyFor( "HTTP" );
+ break;
+ case KProtocolManager::PACProxy: // A proxy configuration URL has been given
+ case KProtocolManager::WPADProxy: // A proxy should be automatically discovered
+ case KProtocolManager::EnvVarProxy: // Use the proxy values set through environment variables
+// In such cases, the proxy address is not stored in KDE, but determined dynamically.
+// The proxy address may depend on the requested address, on the time of the day, on the speed of the wind...
+// The best we can do here is to ask the current value for a given address.
+ aHTTPProxy = KProtocolManager::proxyForUrl( KUrl("http://http.openoffice.org") );
+ break;
+ default: // No proxy is used
+ break;
+ }
+ if ( !aHTTPProxy.isEmpty() )
+ {
+ KUrl aProxy(aHTTPProxy);
+ ::rtl::OUString sProxy = (const sal_Unicode *) aProxy.host().utf16();
+ return css::beans::Optional< css::uno::Any >(
+ true, uno::makeAny( sProxy ) );
+ }
+ } else if (id.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ooInetHTTPProxyPort")))
+ {
+ QString aHTTPProxy;
+ switch ( KProtocolManager::proxyType() )
+ {
+ case KProtocolManager::ManualProxy: // Proxies are manually configured
+ aHTTPProxy = KProtocolManager::proxyFor( "HTTP" );
+ break;
+ case KProtocolManager::PACProxy: // A proxy configuration URL has been given
+ case KProtocolManager::WPADProxy: // A proxy should be automatically discovered
+ case KProtocolManager::EnvVarProxy: // Use the proxy values set through environment variables
+// In such cases, the proxy address is not stored in KDE, but determined dynamically.
+// The proxy address may depend on the requested address, on the time of the day, on the speed of the wind...
+// The best we can do here is to ask the current value for a given address.
+ aHTTPProxy = KProtocolManager::proxyForUrl( KUrl("http://http.openoffice.org") );
+ break;
+ default: // No proxy is used
+ break;
+ }
+ if ( !aHTTPProxy.isEmpty() )
+ {
+ KUrl aProxy(aHTTPProxy);
+ sal_Int32 nPort = aProxy.port();
+ return css::beans::Optional< css::uno::Any >(
+ true, uno::makeAny( nPort ) );
+ }
+ } else if (id.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ooInetHTTPSProxyName")))
+ {
+ QString aHTTPSProxy;
+ switch ( KProtocolManager::proxyType() )
+ {
+ case KProtocolManager::ManualProxy: // Proxies are manually configured
+ aHTTPSProxy = KProtocolManager::proxyFor( "HTTPS" );
+ break;
+ case KProtocolManager::PACProxy: // A proxy configuration URL has been given
+ case KProtocolManager::WPADProxy: // A proxy should be automatically discovered
+ case KProtocolManager::EnvVarProxy: // Use the proxy values set through environment variables
+// In such cases, the proxy address is not stored in KDE, but determined dynamically.
+// The proxy address may depend on the requested address, on the time of the day, on the speed of the wind...
+// The best we can do here is to ask the current value for a given address.
+ aHTTPSProxy = KProtocolManager::proxyForUrl( KUrl("https://https.openoffice.org") );
+ break;
+ default: // No proxy is used
+ break;
+ }
+ if ( !aHTTPSProxy.isEmpty() )
+ {
+ KUrl aProxy(aHTTPSProxy);
+ ::rtl::OUString sProxy = (const sal_Unicode *) aProxy.host().utf16();
+ return css::beans::Optional< css::uno::Any >(
+ true, uno::makeAny( sProxy ) );
+ }
+ } else if (id.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ooInetHTTPSProxyPort")))
+ {
+ QString aHTTPSProxy;
+ switch ( KProtocolManager::proxyType() )
+ {
+ case KProtocolManager::ManualProxy: // Proxies are manually configured
+ aHTTPSProxy = KProtocolManager::proxyFor( "HTTPS" );
+ break;
+ case KProtocolManager::PACProxy: // A proxy configuration URL has been given
+ case KProtocolManager::WPADProxy: // A proxy should be automatically discovered
+ case KProtocolManager::EnvVarProxy: // Use the proxy values set through environment variables
+// In such cases, the proxy address is not stored in KDE, but determined dynamically.
+// The proxy address may depend on the requested address, on the time of the day, on the speed of the wind...
+// The best we can do here is to ask the current value for a given address.
+ aHTTPSProxy = KProtocolManager::proxyForUrl( KUrl("https://https.openoffice.org") );
+ break;
+ default: // No proxy is used
+ break;
+ }
+ if ( !aHTTPSProxy.isEmpty() )
+ {
+ KUrl aProxy(aHTTPSProxy);
+ sal_Int32 nPort = aProxy.port();
+ return css::beans::Optional< css::uno::Any >(
+ true, uno::makeAny( nPort ) );
+ }
+ } else if (id.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ooInetNoProxy"))) {
+ QString aNoProxyFor;
+ switch ( KProtocolManager::proxyType() )
+ {
+ case KProtocolManager::ManualProxy: // Proxies are manually configured
+ case KProtocolManager::PACProxy: // A proxy configuration URL has been given
+ case KProtocolManager::WPADProxy: // A proxy should be automatically discovered
+ case KProtocolManager::EnvVarProxy: // Use the proxy values set through environment variables
+ aNoProxyFor = KProtocolManager::noProxyFor();
+ break;
+ default: // No proxy is used
+ break;
+ }
+ if ( !aNoProxyFor.isEmpty() )
+ {
+ ::rtl::OUString sNoProxyFor;
+
+ aNoProxyFor = aNoProxyFor.replace( COMMA, SEMI_COLON );
+ sNoProxyFor = (const sal_Unicode *) aNoProxyFor.utf16();
+ return css::beans::Optional< css::uno::Any >(
+ true, uno::makeAny( sNoProxyFor ) );
+ }
+ } else if (id.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ooInetProxyType"))) {
+ int nProxyType;
+ switch ( KProtocolManager::proxyType() )
+ {
+ case KProtocolManager::ManualProxy: // Proxies are manually configured
+ case KProtocolManager::PACProxy: // A proxy configuration URL has been given
+ case KProtocolManager::WPADProxy: // A proxy should be automatically discovered
+ case KProtocolManager::EnvVarProxy: // Use the proxy values set through environment variables
+ nProxyType = 1;
+ break;
+ default: // No proxy is used
+ nProxyType = 0;
+ }
+ return css::beans::Optional< css::uno::Any >(
+ true, uno::makeAny( (sal_Int32) nProxyType ) );
+ } else {
+ OSL_ASSERT(false); // this cannot happen
+ }
+ return css::beans::Optional< css::uno::Any >();
+}
+
+}
diff --git a/shell/source/backends/kde4be/kde4access.hxx b/shell/source/backends/kde4be/kde4access.hxx
new file mode 100644
index 000000000000..bfb7bc1ac945
--- /dev/null
+++ b/shell/source/backends/kde4be/kde4access.hxx
@@ -0,0 +1,47 @@
+/*************************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+************************************************************************/
+
+#ifndef INCLUDED_SHELL_SOURCE_BACKENDS_KDE4BE_KDE4ACCESS_HXX
+#define INCLUDED_SHELL_SOURCE_BACKENDS_KDE4BE_KDE4ACCESS_HXX
+
+#include "sal/config.h"
+
+#include "com/sun/star/beans/Optional.hpp"
+
+namespace com { namespace sun { namespace star { namespace uno {
+ class Any;
+} } } }
+namespace rtl { class OUString; }
+
+namespace kde4access {
+
+com::sun::star::beans::Optional< com::sun::star::uno::Any > getValue(
+ rtl::OUString const & id);
+
+}
+
+#endif
diff --git a/shell/source/backends/kde4be/kde4backend.cxx b/shell/source/backends/kde4be/kde4backend.cxx
index 7eb093bf7217..44ddb49bd025 100644
--- a/shell/source/backends/kde4be/kde4backend.cxx
+++ b/shell/source/backends/kde4be/kde4backend.cxx
@@ -1,158 +1,258 @@
/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: kde4backend.cxx,v $
- * $Revision: 1.7 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+************************************************************************/
+
#include "precompiled_shell.hxx"
+#include "sal/config.h"
-#include "kde4backend.hxx"
-#include "kde4commonlayer.hxx"
-#include "kde4inetlayer.hxx"
-#include "kde4vcllayer.hxx"
-#include "kde4pathslayer.hxx"
+#include "kapplication.h"
-//------------------------------------------------------------------------------
+#include "boost/noncopyable.hpp"
+#include "com/sun/star/beans/Optional.hpp"
+#include "com/sun/star/beans/PropertyVetoException.hpp"
+#include "com/sun/star/beans/UnknownPropertyException.hpp"
+#include "com/sun/star/beans/XPropertyChangeListener.hpp"
+#include "com/sun/star/beans/XPropertySet.hpp"
+#include "com/sun/star/beans/XPropertySetInfo.hpp"
+#include "com/sun/star/beans/XVetoableChangeListener.hpp"
+#include "com/sun/star/lang/IllegalArgumentException.hpp"
+#include "com/sun/star/lang/WrappedTargetException.hpp"
+#include "com/sun/star/lang/XMultiComponentFactory.hpp"
+#include "com/sun/star/lang/XServiceInfo.hpp"
+#include "com/sun/star/lang/WrappedTargetException.hpp"
+#include "com/sun/star/uno/Any.hxx"
+#include "com/sun/star/uno/Reference.hxx"
+#include "com/sun/star/uno/RuntimeException.hpp"
+#include "com/sun/star/uno/Sequence.hxx"
+#include "com/sun/star/uno/XComponentContext.hpp"
+#include "com/sun/star/uno/XCurrentContext.hpp"
+#include "cppuhelper/factory.hxx"
+#include "cppuhelper/implbase2.hxx"
+#include "cppuhelper/implementationentry.hxx"
+#include "cppuhelper/weak.hxx"
+#include "rtl/string.h"
+#include "rtl/ustring.h"
+#include "rtl/ustring.hxx"
+#include "sal/types.h"
+#include "uno/current_context.hxx"
+#include "uno/lbnames.h"
-KDEBackend* KDEBackend::mInstance= 0;
+#include "kde4access.hxx"
-KDEBackend* KDEBackend::createInstance(const uno::Reference<uno::XComponentContext>& xContext)
-{
- if (mInstance == 0)
- {
- mInstance = new KDEBackend (xContext);
- }
+namespace {
+
+namespace css = com::sun::star;
- return mInstance;
+rtl::OUString SAL_CALL getServiceImplementationName() {
+ return rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.comp.configuration.backend.KDE4Backend"));
}
-//------------------------------------------------------------------------------
+css::uno::Sequence< rtl::OUString > SAL_CALL getServiceSupportedServiceNames() {
+ rtl::OUString name(
+ RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.configuration.backend.KDE4Backend"));
+ return css::uno::Sequence< rtl::OUString >(&name, 1);
+}
-KDEBackend::KDEBackend(const uno::Reference<uno::XComponentContext>& xContext)
- throw (backend::BackendAccessException)
- : BackendBase(mMutex), m_xContext(xContext)
+class Service:
+ public cppu::WeakImplHelper2<
+ css::lang::XServiceInfo, css::beans::XPropertySet >,
+ private boost::noncopyable
{
-}
+public:
+ Service();
-//------------------------------------------------------------------------------
+private:
+ virtual ~Service() {}
-KDEBackend::~KDEBackend(void)
-{
-}
+ virtual rtl::OUString SAL_CALL getImplementationName()
+ throw (css::uno::RuntimeException)
+ { return getServiceImplementationName(); }
-//------------------------------------------------------------------------------
+ virtual sal_Bool SAL_CALL supportsService(rtl::OUString const & ServiceName)
+ throw (css::uno::RuntimeException)
+ { return ServiceName == getSupportedServiceNames()[0]; }
-uno::Reference<backend::XLayer> SAL_CALL KDEBackend::getLayer(
- const rtl::OUString& aComponent, const rtl::OUString& /* aTimestamp */)
- throw (backend::BackendAccessException, lang::IllegalArgumentException)
-{
- uno::Reference<backend::XLayer> xLayer;
+ virtual css::uno::Sequence< rtl::OUString > SAL_CALL
+ getSupportedServiceNames() throw (css::uno::RuntimeException)
+ { return getServiceSupportedServiceNames(); }
- if( aComponent.equalsAscii("org.openoffice.Office.Common" ) )
- {
- xLayer = new KDECommonLayer(m_xContext);
- }
- else if( aComponent.equalsAscii("org.openoffice.Inet" ) )
- {
- xLayer = new KDEInetLayer(m_xContext);
- }
- else if( aComponent.equalsAscii("org.openoffice.VCL" ) )
- {
- xLayer = new KDEVCLLayer(m_xContext);
- }
- else if( aComponent.equalsAscii("org.openoffice.Office.Paths" ) )
- {
- xLayer = new KDEPathsLayer(m_xContext);
- }
+ virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
+ getPropertySetInfo() throw (css::uno::RuntimeException)
+ { return css::uno::Reference< css::beans::XPropertySetInfo >(); }
- return xLayer;
-}
+ virtual void SAL_CALL setPropertyValue(
+ rtl::OUString const &, css::uno::Any const &)
+ throw (
+ css::beans::UnknownPropertyException,
+ css::beans::PropertyVetoException,
+ css::lang::IllegalArgumentException,
+ css::lang::WrappedTargetException, css::uno::RuntimeException);
-//------------------------------------------------------------------------------
+ virtual css::uno::Any SAL_CALL getPropertyValue(
+ rtl::OUString const & PropertyName)
+ throw (
+ css::beans::UnknownPropertyException,
+ css::lang::WrappedTargetException, css::uno::RuntimeException);
-uno::Reference<backend::XUpdatableLayer> SAL_CALL
-KDEBackend::getUpdatableLayer(const rtl::OUString& /* aComponent */)
- throw (backend::BackendAccessException,lang::NoSupportException,
- lang::IllegalArgumentException)
-{
- throw lang::NoSupportException( rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("KDEBackend: No Update Operation allowed, Read Only access") ),
- *this) ;
-}
+ virtual void SAL_CALL addPropertyChangeListener(
+ rtl::OUString const &,
+ css::uno::Reference< css::beans::XPropertyChangeListener > const &)
+ throw (
+ css::beans::UnknownPropertyException,
+ css::lang::WrappedTargetException, css::uno::RuntimeException)
+ {}
-//------------------------------------------------------------------------------
+ virtual void SAL_CALL removePropertyChangeListener(
+ rtl::OUString const &,
+ css::uno::Reference< css::beans::XPropertyChangeListener > const &)
+ throw (
+ css::beans::UnknownPropertyException,
+ css::lang::WrappedTargetException, css::uno::RuntimeException)
+ {}
-rtl::OUString SAL_CALL KDEBackend::getBackendName(void)
-{
- return rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.configuration.backend.KDE4Backend") );
-}
+ virtual void SAL_CALL addVetoableChangeListener(
+ rtl::OUString const &,
+ css::uno::Reference< css::beans::XVetoableChangeListener > const &)
+ throw (
+ css::beans::UnknownPropertyException,
+ css::lang::WrappedTargetException, css::uno::RuntimeException)
+ {}
-//------------------------------------------------------------------------------
+ virtual void SAL_CALL removeVetoableChangeListener(
+ rtl::OUString const &,
+ css::uno::Reference< css::beans::XVetoableChangeListener > const &)
+ throw (
+ css::beans::UnknownPropertyException,
+ css::lang::WrappedTargetException, css::uno::RuntimeException)
+ {}
-rtl::OUString SAL_CALL KDEBackend::getImplementationName(void)
- throw (uno::RuntimeException)
-{
- return getBackendName() ;
-}
+ bool enabled_;
+};
-//------------------------------------------------------------------------------
+Service::Service(): enabled_(false) {
+ css::uno::Reference< css::uno::XCurrentContext > context(
+ css::uno::getCurrentContext());
+ if (context.is()) {
+ rtl::OUString desktop;
+ context->getValueByName(
+ rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM("system.desktop-environment"))) >>=
+ desktop;
+ enabled_ = desktop.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("KDE4")) &&
+ KApplication::kApplication() != 0;
+ }
+}
-uno::Sequence<rtl::OUString> SAL_CALL KDEBackend::getBackendServiceNames(void)
+void Service::setPropertyValue(rtl::OUString const &, css::uno::Any const &)
+ throw (
+ css::beans::UnknownPropertyException, css::beans::PropertyVetoException,
+ css::lang::IllegalArgumentException, css::lang::WrappedTargetException,
+ css::uno::RuntimeException)
{
- uno::Sequence<rtl::OUString> aServices(1) ;
- aServices[0] = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.backend.KDE4Backend")) ;
-
- return aServices ;
+ throw css::lang::IllegalArgumentException(
+ rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM("setPropertyValue not supported")),
+ static_cast< cppu::OWeakObject * >(this), -1);
}
-//------------------------------------------------------------------------------
+css::uno::Any Service::getPropertyValue(rtl::OUString const & PropertyName)
+ throw (
+ css::beans::UnknownPropertyException, css::lang::WrappedTargetException,
+ css::uno::RuntimeException)
+{
+ if (PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("EnableATToolSupport")) ||
+ PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ExternalMailer")) ||
+ PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("SourceViewFontHeight")) ||
+ PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("SourceViewFontName")) ||
+ PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("WorkPathVariable")) ||
+ PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ooInetFTPProxyName")) ||
+ PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ooInetFTPProxyPort")) ||
+ PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ooInetHTTPProxyName")) ||
+ PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ooInetHTTPProxyPort")) ||
+ PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ooInetHTTPSProxyName")) ||
+ PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ooInetHTTPSProxyPort")) ||
+ PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ooInetNoProxy")) ||
+ PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ooInetProxyType")))
+ {
+ return css::uno::makeAny(
+ enabled_
+ ? kde4access::getValue(PropertyName)
+ : css::beans::Optional< css::uno::Any >());
+ }
+ throw css::beans::UnknownPropertyException(
+ PropertyName, static_cast< cppu::OWeakObject * >(this));
+}
-sal_Bool SAL_CALL KDEBackend::supportsService(const rtl::OUString& aServiceName)
- throw (uno::RuntimeException)
+css::uno::Reference< css::uno::XInterface > SAL_CALL createInstance(
+ css::uno::Reference< css::uno::XComponentContext > const &)
{
- uno::Sequence< rtl::OUString > const svc = getBackendServiceNames();
+ return static_cast< cppu::OWeakObject * >(new Service);
+}
- for(sal_Int32 i = 0; i < svc.getLength(); ++i )
- if(svc[i] == aServiceName)
- return true;
+static cppu::ImplementationEntry const services[] = {
+ { &createInstance, &getServiceImplementationName,
+ &getServiceSupportedServiceNames, &cppu::createSingleComponentFactory, 0,
+ 0 },
+ { 0, 0, 0, 0, 0, 0 }
+};
- return false;
}
-//------------------------------------------------------------------------------
+extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
+ char const * pImplName, void * pServiceManager, void * pRegistryKey)
+{
+ return cppu::component_getFactoryHelper(
+ pImplName, pServiceManager, pRegistryKey, services);
+}
-uno::Sequence<rtl::OUString>
-SAL_CALL KDEBackend::getSupportedServiceNames(void)
- throw (uno::RuntimeException)
+extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL
+component_getImplementationEnvironment(
+ char const ** ppEnvTypeName, uno_Environment **)
{
- return getBackendServiceNames() ;
+ *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
-// ---------------------------------------------------------------------------------------
+extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(
+ void * pServiceManager, void * pRegistryKey)
+{
+ return component_writeInfoHelper(pServiceManager, pRegistryKey, services);
+}
diff --git a/shell/source/backends/kde4be/kde4backend.hxx b/shell/source/backends/kde4be/kde4backend.hxx
deleted file mode 100644
index 01599c41a74d..000000000000
--- a/shell/source/backends/kde4be/kde4backend.hxx
+++ /dev/null
@@ -1,123 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: kde4backend.hxx,v $
- * $Revision: 1.4 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#pragma once
-
-#include <com/sun/star/configuration/backend/XSingleLayerStratum.hpp>
-#include <com/sun/star/lang/XInitialization.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/configuration/InvalidBootstrapFileException.hpp>
-#include <com/sun/star/configuration/backend/CannotConnectException.hpp>
-#include <cppuhelper/compbase2.hxx>
-
-#ifndef INCLUDED_MAP
-#include <map>
-#define INCLUDED_MAP
-#endif
-
-namespace css = com::sun::star ;
-namespace uno = css::uno ;
-namespace lang = css::lang ;
-namespace backend = css::configuration::backend ;
-
-
-//------------------------------------------------------------------------------
-typedef cppu::WeakComponentImplHelper2<backend::XSingleLayerStratum,
- lang::XServiceInfo> BackendBase ;
-
-/**
- Implements the SingleLayerStratum service for KDE access.
- */
-class KDEBackend : public BackendBase {
- public :
-
- static KDEBackend* createInstance(const uno::Reference<uno::XComponentContext>& xContext);
-
- // XServiceInfo
- virtual rtl::OUString SAL_CALL getImplementationName( )
- throw (uno::RuntimeException) ;
-
- virtual sal_Bool SAL_CALL supportsService( const rtl::OUString& aServiceName )
- throw (uno::RuntimeException) ;
-
- virtual uno::Sequence<rtl::OUString> SAL_CALL getSupportedServiceNames( )
- throw (uno::RuntimeException) ;
-
- /**
- Provides the implementation name.
-
- @return implementation name
- */
- static rtl::OUString SAL_CALL getBackendName(void) ;
-
- /**
- Provides the supported services names
-
- @return service names
- */
- static uno::Sequence<rtl::OUString> SAL_CALL getBackendServiceNames(void) ;
-
- //XSingleLayerStratum
- virtual uno::Reference<backend::XLayer> SAL_CALL
- getLayer( const rtl::OUString& aLayerId, const rtl::OUString& aTimestamp )
- throw (backend::BackendAccessException, lang::IllegalArgumentException) ;
-
- virtual uno::Reference<backend::XUpdatableLayer> SAL_CALL
- getUpdatableLayer( const rtl::OUString& aLayerId )
- throw (backend::BackendAccessException, lang::NoSupportException,
- lang::IllegalArgumentException) ;
-
- protected:
- /**
- Service constructor from a service factory.
-
- @param xContext component context
- */
- KDEBackend(const uno::Reference<uno::XComponentContext>& xContext)
- throw (backend::BackendAccessException);
-
- /** Destructor */
- ~KDEBackend(void) ;
-
- private:
-
- /** Build KDE/OO mapping table */
- void initializeMappingTable ();
-
-
- /** The component context */
- uno::Reference<uno::XComponentContext> m_xContext;
-
- /** Mutex for reOOurces protection */
- osl::Mutex mMutex ;
-
- static KDEBackend* mInstance;
-};
diff --git a/shell/source/backends/kde4be/kde4be.xml b/shell/source/backends/kde4be/kde4be.xml
deleted file mode 100644
index ea2d9be6dd6b..000000000000
--- a/shell/source/backends/kde4be/kde4be.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE module-description PUBLIC "-//StarOffice//DTD ComponentDescription 1.0//EN" "module-description.dtd">
-<module-description xmlns:xlink="http://www.w3.org/1999/xlink">
- <module-name>kde4be</module-name>
- <component-description>
- <author> Éric Bischoff </author>
- <name>com.sun.star.comp.configuration.backend.KDE4Backend</name>
- <description> The KDE4 configuration backend </description>
- <loader-name>com.sun.star.loader.SharedLibrary</loader-name>
- <language>c++</language>
- <status value="beta"/>
- <supported-service>com.sun.star.comp.configuration.backend.KDE4Backend</supported-service>
- <service-dependency>...</service-dependency>
- <type>com.sun.star.configuration.backend.XBackendChangesListener</type>
- <type>com.sun.star.configuration.backend.XBackendChangesNotifier</type>
- <type>com.sun.star.configuration.backend.XLayerHandler</type>
- <type>com.sun.star.configuration.backend.XSingleLayerStratum</type>
- <type>com.sun.star.lang.XMultiComponentFactory</type>
- <type>com.sun.star.lang.XServiceInfo</type>
- <type>com.sun.star.lang.XSingleComponentFactory</type>
- <type>com.sun.star.lang.XTypeProvider</type>
- <type>com.sun.star.uno.TypeClass</type>
- <type>com.sun.star.uno.XAggregation</type>
- <type>com.sun.star.uno.XComponentContext</type>
- <type>com.sun.star.uno.XCurrentContext</type>
- <type>com.sun.star.uno.XWeak</type>
- <type>com.sun.star.registry.XRegistryKey</type>
- </component-description>
- <project-build-dependency>cppuhelper</project-build-dependency>
- <project-build-dependency>cppu</project-build-dependency>
- <project-build-dependency>sal</project-build-dependency>
- <runtime-module-dependency>cppuhelper3$(COM)</runtime-module-dependency>
- <runtime-module-dependency>cppu3</runtime-module-dependency>
- <runtime-module-dependency>sal3</runtime-module-dependency>
-</module-description>
diff --git a/shell/source/backends/kde4be/kde4becdef.cxx b/shell/source/backends/kde4be/kde4becdef.cxx
deleted file mode 100644
index da0d22ead22e..000000000000
--- a/shell/source/backends/kde4be/kde4becdef.cxx
+++ /dev/null
@@ -1,143 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: kde4becdef.cxx,v $
- * $Revision: 1.8 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_shell.hxx"
-#include "kde4backend.hxx"
-
-#include <kapplication.h>
-
-#include <cppuhelper/implementationentry.hxx>
-
-#include <com/sun/star/registry/XRegistryKey.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
-
-#include "uno/current_context.hxx"
-
-namespace css = com::sun::star ;
-namespace uno = css::uno ;
-namespace lang = css::lang ;
-namespace backend = css::configuration::backend ;
-
-//==============================================================================
-
-static uno::Reference<uno::XInterface> SAL_CALL createKDEBackend(const uno::Reference<uno::XComponentContext>& xContext)
-{
- try {
- uno::Reference< uno::XCurrentContext > xCurrentContext(uno::getCurrentContext());
-
- if (xCurrentContext.is())
- {
- uno::Any aValue = xCurrentContext->getValueByName(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "system.desktop-environment" ) ) );
-
- rtl::OUString aDesktopEnvironment;
- if ( (aValue >>= aDesktopEnvironment) && (aDesktopEnvironment.equalsAscii("KDE")) && (KApplication::kApplication() != NULL) )
- return * KDEBackend::createInstance(xContext);
- }
-
- return uno::Reference<uno::XInterface>();
-
- } catch (uno::RuntimeException e) {
- return uno::Reference<uno::XInterface>();
- }
-
-}
-
-//==============================================================================
-
-static const cppu::ImplementationEntry kImplementations_entries[] =
-{
- {
- createKDEBackend,
- KDEBackend::getBackendName,
- KDEBackend::getBackendServiceNames,
- cppu::createSingleComponentFactory,
- NULL,
- 0
- },
- { NULL, NULL, NULL, NULL, NULL, 0 }
-} ;
-//------------------------------------------------------------------------------
-
-extern "C" void SAL_CALL component_getImplementationEnvironment(
- const sal_Char **aEnvTypeName,
- uno_Environment **) {
- *aEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ;
-}
-
-//------------------------------------------------------------------------------
-
-extern "C" sal_Bool SAL_CALL component_writeInfo(void *,
- void *pRegistryKey) {
-
- using namespace ::com::sun::star::registry;
- if (pRegistryKey)
- {
- try
- {
- uno::Reference< XRegistryKey > xImplKey = static_cast< XRegistryKey* >( pRegistryKey )->createKey(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) + KDEBackend::getBackendName()
- );
-
- // Register associated service names
- uno::Reference< XRegistryKey > xServicesKey = xImplKey->createKey(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES") )
- );
-
- uno::Sequence<rtl::OUString> sServiceNames = KDEBackend::getBackendServiceNames();
- for (sal_Int32 i = 0 ; i < sServiceNames.getLength() ; ++ i)
- xServicesKey->createKey(sServiceNames[i]);
-
- return sal_True;
- }
-
- catch( InvalidRegistryException& )
- {
- OSL_ENSURE(sal_False, "InvalidRegistryException caught");
- }
- }
-
- return sal_False;
-}
-
-//------------------------------------------------------------------------------
-
-extern "C" void *component_getFactory(const sal_Char *aImplementationName,
- void *aServiceManager,
- void *aRegistryKey) {
-
- return cppu::component_getFactoryHelper(
- aImplementationName,
- aServiceManager,
- aRegistryKey,
- kImplementations_entries) ;
-}
-//------------------------------------------------------------------------------
diff --git a/shell/source/backends/kde4be/kde4commonlayer.cxx b/shell/source/backends/kde4be/kde4commonlayer.cxx
deleted file mode 100644
index 1ce844672225..000000000000
--- a/shell/source/backends/kde4be/kde4commonlayer.cxx
+++ /dev/null
@@ -1,157 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: kde4commonlayer.cxx,v $
- * $Revision: 1.7 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_shell.hxx"
-
-#include "kde4commonlayer.hxx"
-
-#include <kemailsettings.h>
-#include <kglobalsettings.h>
-
-#include <QFont>
-
-#include <com/sun/star/configuration/backend/PropertyInfo.hpp>
-#include <com/sun/star/configuration/backend/XLayerContentDescriber.hpp>
-#include <com/sun/star/uno/Sequence.hxx>
-
-#define SPACE ' '
-
-//==============================================================================
-
-KDECommonLayer::KDECommonLayer(const uno::Reference<uno::XComponentContext>& xContext)
-{
- //Create instance of LayerContentDescriber Service
- rtl::OUString const k_sLayerDescriberService(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.comp.configuration.backend.LayerDescriber"));
-
- typedef uno::Reference<backend::XLayerContentDescriber> LayerDescriber;
- uno::Reference< lang::XMultiComponentFactory > xServiceManager = xContext->getServiceManager();
- if( xServiceManager.is() )
- {
- m_xLayerContentDescriber = LayerDescriber::query(
- xServiceManager->createInstanceWithContext(k_sLayerDescriberService, xContext));
- }
- else
- {
- OSL_TRACE("Could not retrieve ServiceManager");
- }
-}
-
-//------------------------------------------------------------------------------
-
-void SAL_CALL KDECommonLayer::readData( const uno::Reference<backend::XLayerHandler>& xHandler)
- throw ( backend::MalformedDataException, lang::NullPointerException,
- lang::WrappedTargetException, uno::RuntimeException)
-{
- if( ! m_xLayerContentDescriber.is() )
- {
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
- "Could not create com.sun.star.configuration.backend.LayerContentDescriber Service"
- ) ), static_cast < backend::XLayer * > (this) );
- }
-
- uno::Sequence<backend::PropertyInfo> aPropInfoList(3);
- sal_Int32 nProperties = 0;
-
- // Email client settings
- KEMailSettings aEmailSettings;
- QString aClientProgram;
- ::rtl::OUString sClientProgram;
-
- aClientProgram = aEmailSettings.getSetting( KEMailSettings::ClientProgram );
- if ( aClientProgram.isEmpty() )
- aClientProgram = "kmail";
- else
- aClientProgram = aClientProgram.section(SPACE, 0, 0);
- sClientProgram = (const sal_Unicode *) aClientProgram.utf16();
-
- aPropInfoList[nProperties].Name = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Office.Common/ExternalMailer/Program") );
- aPropInfoList[nProperties].Type = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "string" ) );
- aPropInfoList[nProperties].Protected = sal_False;
- aPropInfoList[nProperties++].Value = uno::makeAny( sClientProgram );
-
- // Source code font settings
- QFont aFixedFont;
- QString aFontName;
- :: rtl::OUString sFontName;
- short nFontHeight;
-
- aFixedFont = KGlobalSettings::fixedFont();
- aFontName = aFixedFont.family();
- sFontName = (const sal_Unicode *) aFontName.utf16();
- nFontHeight = aFixedFont.pointSize();
-
- aPropInfoList[nProperties].Name = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Office.Common/Font/SourceViewFont/FontName") );
- aPropInfoList[nProperties].Type = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "string" ) );
- aPropInfoList[nProperties].Protected = sal_False;
- aPropInfoList[nProperties++].Value = uno::makeAny( sFontName );
-
- aPropInfoList[nProperties].Name = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Office.Common/Font/SourceViewFont/FontHeight") );
- aPropInfoList[nProperties].Type = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "short" ) );
- aPropInfoList[nProperties].Protected = sal_False;
- aPropInfoList[nProperties++].Value = uno::makeAny( nFontHeight );
-
- if( nProperties > 0 )
- {
- aPropInfoList.realloc(nProperties);
- m_xLayerContentDescriber->describeLayer(xHandler, aPropInfoList);
- }
-}
-
-//------------------------------------------------------------------------------
-
-rtl::OUString SAL_CALL KDECommonLayer::getTimestamp(void)
- throw (uno::RuntimeException)
-{
- // Return the value as timestamp to avoid regenerating the binary cache
- // on each office launch.
-
- KEMailSettings aEmailSettings;
- QString aClientProgram = aEmailSettings.getSetting( KEMailSettings::ClientProgram );
- aClientProgram = aClientProgram.section(SPACE, 0, 0);
-
- QString aFixedFont = KGlobalSettings::fixedFont().toString();
-
- ::rtl::OUString sTimeStamp,
- sep( RTL_CONSTASCII_USTRINGPARAM( "$" ) );
-
- sTimeStamp = (const sal_Unicode *) aClientProgram.utf16();
- sTimeStamp += sep;
- sTimeStamp += (const sal_Unicode *) aFixedFont.utf16();
-
- return sTimeStamp;
-}
diff --git a/shell/source/backends/kde4be/kde4commonlayer.hxx b/shell/source/backends/kde4be/kde4commonlayer.hxx
deleted file mode 100644
index 9ce4cd4dc962..000000000000
--- a/shell/source/backends/kde4be/kde4commonlayer.hxx
+++ /dev/null
@@ -1,51 +0,0 @@
-#pragma once
-
-#include "kde4backend.hxx"
-#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/configuration/backend/XLayer.hpp>
-#include <com/sun/star/configuration/backend/BackendAccessException.hpp>
-#include <com/sun/star/configuration/backend/XLayerContentDescriber.hpp>
-#include <com/sun/star/util/XTimeStamped.hpp>
-#include <cppuhelper/implbase2.hxx>
-
-namespace css = com::sun::star ;
-namespace uno = css::uno ;
-namespace lang = css::lang ;
-namespace backend = css::configuration::backend ;
-namespace util = css::util ;
-
-/**
- Implementation of the XLayer interface for the KDE values mapped into
- the org.openoffice.Office.Common configuration component.
- */
-class KDECommonLayer : public cppu::WeakImplHelper2<backend::XLayer, util::XTimeStamped>
-{
-public :
- /**
- Constructor given the component context
-
- @param xContext The component context
- */
-
- KDECommonLayer(const uno::Reference<uno::XComponentContext>& xContext);
-
- // XLayer
- virtual void SAL_CALL readData(
- const uno::Reference<backend::XLayerHandler>& xHandler)
- throw ( backend::MalformedDataException,
- lang::NullPointerException,
- lang::WrappedTargetException,
- uno::RuntimeException) ;
-
- // XTimeStamped
- virtual rtl::OUString SAL_CALL getTimestamp(void)
- throw (uno::RuntimeException);
-
- protected:
-
- /** Destructor */
- ~KDECommonLayer(void) {}
-
- private :
- uno::Reference<backend::XLayerContentDescriber> m_xLayerContentDescriber ;
-};
diff --git a/shell/source/backends/kde4be/kde4inetlayer.cxx b/shell/source/backends/kde4be/kde4inetlayer.cxx
deleted file mode 100644
index bc661a093fb7..000000000000
--- a/shell/source/backends/kde4be/kde4inetlayer.cxx
+++ /dev/null
@@ -1,255 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: kde4inetlayer.cxx,v $
- * $Revision: 1.7 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_shell.hxx"
-
-#include <kprotocolmanager.h>
-
-#include "kde4inetlayer.hxx"
-#include <com/sun/star/configuration/backend/PropertyInfo.hpp>
-#include <com/sun/star/configuration/backend/XLayerContentDescriber.hpp>
-#include <com/sun/star/uno/Sequence.hxx>
-
-#define COMMA ','
-#define SEMI_COLON ';'
-
-//==============================================================================
-
-KDEInetLayer::KDEInetLayer(const uno::Reference<uno::XComponentContext>& xContext)
-{
- //Create instance of LayerContentDescriber Service
- rtl::OUString const k_sLayerDescriberService(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.comp.configuration.backend.LayerDescriber"));
-
- typedef uno::Reference<backend::XLayerContentDescriber> LayerDescriber;
- uno::Reference< lang::XMultiComponentFactory > xServiceManager = xContext->getServiceManager();
- if( xServiceManager.is() )
- {
- m_xLayerContentDescriber = LayerDescriber::query(
- xServiceManager->createInstanceWithContext(k_sLayerDescriberService, xContext));
- }
- else
- {
- OSL_TRACE("Could not retrieve ServiceManager");
- }
-}
-
-//------------------------------------------------------------------------------
-
-void SAL_CALL KDEInetLayer::readData( const uno::Reference<backend::XLayerHandler>& xHandler)
- throw ( backend::MalformedDataException, lang::NullPointerException,
- lang::WrappedTargetException, uno::RuntimeException)
-{
- if( ! m_xLayerContentDescriber.is() )
- {
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
- "Could not create com.sun.star.configuration.backend.LayerContentDescriber Service"
- ) ), static_cast < backend::XLayer * > (this) );
- }
-
- uno::Sequence<backend::PropertyInfo> aPropInfoList(8);
- sal_Int32 nProperties = 0;
-
- switch ( KProtocolManager::proxyType() )
- {
- case KProtocolManager::ManualProxy: // Proxies are manually configured
- setProxy(aPropInfoList, nProperties, 1,
- KProtocolManager::noProxyFor(),
- KProtocolManager::proxyFor( "HTTP" ),
- KProtocolManager::proxyFor( "FTP" ),
- KProtocolManager::proxyFor( "HTTPS" ));
- break;
- case KProtocolManager::PACProxy: // A proxy configuration URL has been given
- case KProtocolManager::WPADProxy: // A proxy should be automatically discovered
- case KProtocolManager::EnvVarProxy: // Use the proxy values set through environment variables
-// In such cases, the proxy address is not stored in KDE, but determined dynamically.
-// The proxy address may depend on the requested address, on the time of the day, on the speed of the wind...
-// The best we can do here is to ask the current value for a given address.
- setProxy(aPropInfoList, nProperties, 1,
- KProtocolManager::noProxyFor(),
- KProtocolManager::proxyForUrl( KUrl("http://www.openoffice.org") ),
- KProtocolManager::proxyForUrl( KUrl("ftp://ftp.openoffice.org") ),
- KProtocolManager::proxyForUrl( KUrl("https://www.openoffice.org") ));
- break;
- default: // No proxy is used
- setProxy(aPropInfoList, nProperties, 0);
- }
-
- if ( nProperties > 0 )
- {
- aPropInfoList.realloc(nProperties);
- m_xLayerContentDescriber->describeLayer(xHandler, aPropInfoList);
- }
-}
-
-//------------------------------------------------------------------------------
-
-rtl::OUString SAL_CALL KDEInetLayer::getTimestamp(void)
- throw (uno::RuntimeException)
-{
- // Return the value as timestamp to avoid regenerating the binary cache
- // on each office launch.
-
- QString aProxyType, aNoProxyFor, aHTTPProxy, aHTTPSProxy, aFTPProxy;
-
- switch ( KProtocolManager::proxyType() )
- {
- case KProtocolManager::ManualProxy:
- aProxyType = '1';
- aNoProxyFor = KProtocolManager::noProxyFor();
- aHTTPProxy = KProtocolManager::proxyFor( "HTTP" );
- aHTTPProxy = KProtocolManager::proxyFor( "HTTPS" );
- aFTPProxy = KProtocolManager::proxyFor( "FTP" );
- break;
- case KProtocolManager::PACProxy:
- case KProtocolManager::WPADProxy:
- case KProtocolManager::EnvVarProxy:
- aProxyType = '1';
- aNoProxyFor = KProtocolManager::noProxyFor();
- aHTTPProxy = KProtocolManager::proxyForUrl( KUrl("http://www.openoffice.org") );
- aHTTPSProxy = KProtocolManager::proxyForUrl( KUrl("https://www.openoffice.org") );
- aFTPProxy = KProtocolManager::proxyForUrl( KUrl("ftp://ftp.openoffice.org") );
- break;
- default:
- aProxyType = '0';
- }
-
- ::rtl::OUString sTimeStamp,
- sep( RTL_CONSTASCII_USTRINGPARAM( "$" ) );
-
- sTimeStamp = (const sal_Unicode *) aProxyType.utf16();
- sTimeStamp += sep;
- sTimeStamp += (const sal_Unicode *) aNoProxyFor.utf16();
- sTimeStamp += sep;
- sTimeStamp += (const sal_Unicode *) aHTTPProxy.utf16();
- sTimeStamp += sep;
- sTimeStamp += (const sal_Unicode *) aHTTPSProxy.utf16();
- sTimeStamp += sep;
- sTimeStamp += (const sal_Unicode *) aFTPProxy.utf16();
-
- return sTimeStamp;
-}
-
-//------------------------------------------------------------------------------
-
-void SAL_CALL KDEInetLayer::setProxy
- (uno::Sequence<backend::PropertyInfo> &aPropInfoList, sal_Int32 &nProperties,
- int nProxyType, const QString &aNoProxy, const QString &aHTTPProxy, const QString &aFTPProxy, const QString &aHTTPSProxy ) const
-{
- aPropInfoList[nProperties].Name = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Inet/Settings/ooInetProxyType") );
- aPropInfoList[nProperties].Type = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "int" ) );
- aPropInfoList[nProperties].Protected = sal_False;
- aPropInfoList[nProperties++].Value = uno::makeAny( (sal_Int32) nProxyType );
-
- if (nProxyType == 0) return;
-
- if ( !aNoProxy.isEmpty() )
- {
- QString aNoProxyFor(aNoProxy);
- ::rtl::OUString sNoProxyFor;
-
- aNoProxyFor = aNoProxyFor.replace( COMMA, SEMI_COLON );
- sNoProxyFor = (const sal_Unicode *) aNoProxyFor.utf16();
-
- aPropInfoList[nProperties].Name = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Inet/Settings/ooInetNoProxy") );
- aPropInfoList[nProperties].Type = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "string" ) );
- aPropInfoList[nProperties].Protected = sal_False;
- aPropInfoList[nProperties++].Value = uno::makeAny( sNoProxyFor );
- }
-
- if ( !aHTTPProxy.isEmpty() )
- {
- KUrl aProxy(aHTTPProxy);
- ::rtl::OUString sProxy = (const sal_Unicode *) aProxy.host().utf16();
- sal_Int32 nPort = aProxy.port();
-
- aPropInfoList[nProperties].Name = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Inet/Settings/ooInetHTTPProxyName") );
- aPropInfoList[nProperties].Type = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "string" ) );
- aPropInfoList[nProperties].Protected = sal_False;
- aPropInfoList[nProperties++].Value = uno::makeAny( sProxy );
-
- aPropInfoList[nProperties].Name = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Inet/Settings/ooInetHTTPProxyPort") );
- aPropInfoList[nProperties].Type = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "int" ) );
- aPropInfoList[nProperties].Protected = sal_False;
- aPropInfoList[nProperties++].Value = uno::makeAny( nPort );
- }
-
- if ( !aHTTPSProxy.isEmpty() )
- {
- KUrl aProxy(aHTTPSProxy);
- ::rtl::OUString sProxy = (const sal_Unicode *) aProxy.host().utf16();
- sal_Int32 nPort = aProxy.port();
-
- aPropInfoList[nProperties].Name = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Inet/Settings/ooInetHTTPSProxyName") );
- aPropInfoList[nProperties].Type = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "string" ) );
- aPropInfoList[nProperties].Protected = sal_False;
- aPropInfoList[nProperties++].Value = uno::makeAny( sProxy );
-
- aPropInfoList[nProperties].Name = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Inet/Settings/ooInetHTTPSProxyPort") );
- aPropInfoList[nProperties].Type = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "int" ) );
- aPropInfoList[nProperties].Protected = sal_False;
- aPropInfoList[nProperties++].Value = uno::makeAny( nPort );
- }
-
- if ( !aFTPProxy.isEmpty() )
- {
- KUrl aProxy(aFTPProxy);
- ::rtl::OUString sProxy = (const sal_Unicode *) aProxy.host().utf16();
- sal_Int32 nPort = aProxy.port();
-
- aPropInfoList[nProperties].Name = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Inet/Settings/ooInetFTPProxyName") );
- aPropInfoList[nProperties].Type = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "string" ) );
- aPropInfoList[nProperties].Protected = sal_False;
- aPropInfoList[nProperties++].Value = uno::makeAny( sProxy );
-
- aPropInfoList[nProperties].Name = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Inet/Settings/ooInetFTPProxyPort") );
- aPropInfoList[nProperties].Type = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "int" ) );
- aPropInfoList[nProperties].Protected = sal_False;
- aPropInfoList[nProperties++].Value = uno::makeAny( nPort );
- }
-}
-
diff --git a/shell/source/backends/kde4be/kde4inetlayer.hxx b/shell/source/backends/kde4be/kde4inetlayer.hxx
deleted file mode 100644
index 64d00fec45fc..000000000000
--- a/shell/source/backends/kde4be/kde4inetlayer.hxx
+++ /dev/null
@@ -1,59 +0,0 @@
-#pragma once
-
-#include <QString>
-
-#include "kde4backend.hxx"
-
-#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/configuration/backend/XLayer.hpp>
-#include <com/sun/star/configuration/backend/BackendAccessException.hpp>
-#include <com/sun/star/configuration/backend/XLayerContentDescriber.hpp>
-#include <com/sun/star/util/XTimeStamped.hpp>
-#include <cppuhelper/implbase2.hxx>
-
-namespace css = com::sun::star ;
-namespace uno = css::uno ;
-namespace lang = css::lang ;
-namespace backend = css::configuration::backend ;
-namespace util = css::util ;
-
-/**
- Implementation of the XLayer interface for the KDE values mapped into
- the org.openoffice.Inet configuration component.
- */
-class KDEInetLayer : public cppu::WeakImplHelper2<backend::XLayer, util::XTimeStamped>
-{
-public :
- /**
- Constructor given the component context
-
- @param xContext The component context
- */
-
- KDEInetLayer(const uno::Reference<uno::XComponentContext>& xContext);
-
- // XLayer
- virtual void SAL_CALL readData(
- const uno::Reference<backend::XLayerHandler>& xHandler)
- throw ( backend::MalformedDataException,
- lang::NullPointerException,
- lang::WrappedTargetException,
- uno::RuntimeException) ;
-
- // XTimeStamped
- virtual rtl::OUString SAL_CALL getTimestamp(void)
- throw (uno::RuntimeException);
-
- protected:
-
- /** Destructor */
- ~KDEInetLayer(void) {}
-
-private :
- uno::Reference<backend::XLayerContentDescriber> m_xLayerContentDescriber ;
-
- void SAL_CALL setProxy
- (uno::Sequence<backend::PropertyInfo> &aPropInfoList, sal_Int32 &nProperties,
- int nProxyType, const QString &aNoProxyfor = QString(),
- const QString &aHTTPProxy = QString(), const QString &aFTPProxy = QString(), const QString &aHTTPSProxy = QString()) const;
-};
diff --git a/shell/source/backends/kde4be/kde4pathslayer.cxx b/shell/source/backends/kde4be/kde4pathslayer.cxx
deleted file mode 100644
index 2511d0b57405..000000000000
--- a/shell/source/backends/kde4be/kde4pathslayer.cxx
+++ /dev/null
@@ -1,124 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: kde4pathslayer.cxx,v $
- * $Revision: 1.5 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_shell.hxx"
-
-#include "kde4pathslayer.hxx"
-
-#include <QString>
-#include <kglobalsettings.h>
-
-#include <com/sun/star/configuration/backend/PropertyInfo.hpp>
-#include <com/sun/star/configuration/backend/XLayerContentDescriber.hpp>
-
-#include <osl/security.hxx>
-#include <osl/file.hxx>
-#include <com/sun/star/uno/Sequence.hxx>
-
-#define SPACE ' '
-
-//==============================================================================
-
-KDEPathsLayer::KDEPathsLayer(const uno::Reference<uno::XComponentContext>& xContext)
-{
- //Create instance of LayerContentDescriber Service
- rtl::OUString const k_sLayerDescriberService(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.comp.configuration.backend.LayerDescriber"));
-
- typedef uno::Reference<backend::XLayerContentDescriber> LayerDescriber;
- uno::Reference< lang::XMultiComponentFactory > xServiceManager = xContext->getServiceManager();
- if( xServiceManager.is() )
- {
- m_xLayerContentDescriber = LayerDescriber::query(
- xServiceManager->createInstanceWithContext(k_sLayerDescriberService, xContext));
- }
- else
- {
- OSL_TRACE("Could not retrieve ServiceManager");
- }
-}
-
-//------------------------------------------------------------------------------
-
-void SAL_CALL KDEPathsLayer::readData( const uno::Reference<backend::XLayerHandler>& xHandler)
- throw ( backend::MalformedDataException, lang::NullPointerException,
- lang::WrappedTargetException, uno::RuntimeException)
-{
- if( ! m_xLayerContentDescriber.is() )
- {
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
- "Could not create com.sun.star.configuration.backend.LayerContentDescriber Service"
- ) ), static_cast < backend::XLayer * > (this) );
- }
-
- uno::Sequence<backend::PropertyInfo> aPropInfoList(1);
- sal_Int32 nProperties = 0;
-
- QString aDocumentsDir( KGlobalSettings::documentPath() );
- rtl::OUString sDocumentsDir;
- rtl::OUString sDocumentsURL;
- if ( aDocumentsDir.endsWith(QChar('/')) )
- aDocumentsDir.truncate ( aDocumentsDir.length() - 1 );
- sDocumentsDir = (const sal_Unicode *) aDocumentsDir.utf16();
- osl_getFileURLFromSystemPath( sDocumentsDir.pData, &sDocumentsURL.pData );
-
- aPropInfoList[nProperties].Name = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Office.Paths/Variables/Work") );
- aPropInfoList[nProperties].Type = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "string" ) );
- aPropInfoList[nProperties].Protected = sal_False;
- aPropInfoList[nProperties++].Value = uno::makeAny( sDocumentsURL );
-
- if( nProperties > 0 )
- {
- aPropInfoList.realloc(nProperties);
- m_xLayerContentDescriber->describeLayer(xHandler, aPropInfoList);
- }
-}
-
-//------------------------------------------------------------------------------
-
-rtl::OUString SAL_CALL KDEPathsLayer::getTimestamp(void)
- throw (uno::RuntimeException)
-{
- // Return the value as timestamp to avoid regenerating the binary cache
- // on each office launch.
-
- ::rtl::OUString sTimeStamp,
- sep( RTL_CONSTASCII_USTRINGPARAM( "$" ) );
-
- QString aDocumentsDir;
- aDocumentsDir = KGlobalSettings::documentPath();
-
- sTimeStamp += (const sal_Unicode *) aDocumentsDir.utf16();
-
- return sTimeStamp;
-}
diff --git a/shell/source/backends/kde4be/kde4pathslayer.hxx b/shell/source/backends/kde4be/kde4pathslayer.hxx
deleted file mode 100644
index 40d31a73c4f9..000000000000
--- a/shell/source/backends/kde4be/kde4pathslayer.hxx
+++ /dev/null
@@ -1,82 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: kde4pathslayer.hxx,v $
- * $Revision: 1.3 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#pragma once
-
-#include "kde4backend.hxx"
-#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/configuration/backend/XLayer.hpp>
-#include <com/sun/star/configuration/backend/BackendAccessException.hpp>
-#include <com/sun/star/configuration/backend/XLayerContentDescriber.hpp>
-#include <com/sun/star/util/XTimeStamped.hpp>
-
-#include <cppuhelper/implbase2.hxx>
-
-namespace css = com::sun::star ;
-namespace uno = css::uno ;
-namespace lang = css::lang ;
-namespace backend = css::configuration::backend ;
-namespace util = css::util ;
-
-/**
- Implementation of the XLayer interface for the KDE values mapped into
- the org.openoffice.Office.Paths configuration component.
- */
-class KDEPathsLayer : public cppu::WeakImplHelper2<backend::XLayer, util::XTimeStamped>
-{
-public :
- /**
- Constructor given the component context
-
- @param xContext The component context
- */
-
- KDEPathsLayer(const uno::Reference<uno::XComponentContext>& xContext);
-
- // XLayer
- virtual void SAL_CALL readData(
- const uno::Reference<backend::XLayerHandler>& xHandler)
- throw ( backend::MalformedDataException,
- lang::NullPointerException,
- lang::WrappedTargetException,
- uno::RuntimeException) ;
-
- // XTimeStamped
- virtual rtl::OUString SAL_CALL getTimestamp(void)
- throw (uno::RuntimeException);
-
- protected:
-
- /** Destructor */
- ~KDEPathsLayer(void) {}
-
- private :
- uno::Reference<backend::XLayerContentDescriber> m_xLayerContentDescriber ;
-};
diff --git a/shell/source/backends/kde4be/kde4vcllayer.cxx b/shell/source/backends/kde4be/kde4vcllayer.cxx
deleted file mode 100644
index 780c3e4e7ce1..000000000000
--- a/shell/source/backends/kde4be/kde4vcllayer.cxx
+++ /dev/null
@@ -1,115 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: kde4vcllayer.cxx,v $
- * $Revision: 1.5 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_shell.hxx"
-
-#include "kde4vcllayer.hxx"
-
-#include <com/sun/star/configuration/backend/PropertyInfo.hpp>
-#include <com/sun/star/configuration/backend/XLayerContentDescriber.hpp>
-#include <com/sun/star/uno/Sequence.hxx>
-
-//==============================================================================
-
-KDEVCLLayer::KDEVCLLayer(const uno::Reference<uno::XComponentContext>& xContext)
-{
- //Create instance of LayerContentDescriber Service
- rtl::OUString const k_sLayerDescriberService(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.comp.configuration.backend.LayerDescriber"));
-
- typedef uno::Reference<backend::XLayerContentDescriber> LayerDescriber;
- uno::Reference< lang::XMultiComponentFactory > xServiceManager = xContext->getServiceManager();
- if( xServiceManager.is() )
- {
- m_xLayerContentDescriber = LayerDescriber::query(
- xServiceManager->createInstanceWithContext(k_sLayerDescriberService, xContext));
- }
- else
- {
- OSL_TRACE("Could not retrieve ServiceManager");
- }
-}
-
-//------------------------------------------------------------------------------
-
-void SAL_CALL KDEVCLLayer::readData( const uno::Reference<backend::XLayerHandler>& xHandler)
- throw ( backend::MalformedDataException, lang::NullPointerException,
- lang::WrappedTargetException, uno::RuntimeException)
-{
- if( ! m_xLayerContentDescriber.is() )
- {
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
- "Could not create com.sun.star.configuration.backend.LayerContentDescriber Service"
- ) ), static_cast < backend::XLayer * > (this) );
- }
-
- uno::Sequence<backend::PropertyInfo> aPropInfoList(1);
-
-/*
- Commenting out, does not make much sense without an accessibility bridge
-===========================================================================
-#if defined(QT_ACCESSIBILITY_SUPPORT)
-// Accessibility tools under Qt for UNIX are available starting with Qt 4.0
- int nVersionMajor = 0;
- const char *q = qVersion(); // "3.1.0" for example
- while ('0' <= *q && *q <= '9')
- nVersionMajor = nVersionMajor * 10 + *q++ - '0';
- sal_Bool ATToolSupport = (sal_Bool) (nVersionMajor >= 4);
-#else
- sal_Bool ATToolSupport = sal_False;
-#endif
-===========================================================================
- End of commented out section
-*/ sal_Bool ATToolSupport = sal_False;
-
- aPropInfoList[0].Name = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.VCL/Settings/Accessibility/EnableATToolSupport") );
- aPropInfoList[0].Type = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "string" ) );
- aPropInfoList[0].Protected = sal_False;
- aPropInfoList[0].Value = uno::makeAny( rtl::OUString::valueOf( ATToolSupport ) );
-
- m_xLayerContentDescriber->describeLayer(xHandler, aPropInfoList);
-}
-
-//------------------------------------------------------------------------------
-
-rtl::OUString SAL_CALL KDEVCLLayer::getTimestamp(void)
- throw (uno::RuntimeException)
-{
- // Return the value as timestamp to avoid regenerating the binary cache
- // on each office launch.
-
- ::rtl::OUString sTimeStamp(
- RTL_CONSTASCII_USTRINGPARAM( "FALSE" ) );
-
- return sTimeStamp;
-}
diff --git a/shell/source/backends/kde4be/kde4vcllayer.hxx b/shell/source/backends/kde4be/kde4vcllayer.hxx
deleted file mode 100644
index 16036ee89122..000000000000
--- a/shell/source/backends/kde4be/kde4vcllayer.hxx
+++ /dev/null
@@ -1,53 +0,0 @@
-#pragma once
-
-#include "kde4backend.hxx"
-
-#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/configuration/backend/XLayer.hpp>
-#include <com/sun/star/configuration/backend/BackendAccessException.hpp>
-#include <com/sun/star/configuration/backend/XLayerContentDescriber.hpp>
-#include <com/sun/star/util/XTimeStamped.hpp>
-
-#include <cppuhelper/implbase2.hxx>
-
-namespace css = com::sun::star ;
-namespace uno = css::uno ;
-namespace lang = css::lang ;
-namespace backend = css::configuration::backend ;
-namespace util = css::util ;
-
-/**
- Implementation of the XLayer interface for the KDE values mapped into
- the org.openoffice.VCL configuration component.
- */
-class KDEVCLLayer : public cppu::WeakImplHelper2<backend::XLayer, util::XTimeStamped>
-{
-public :
- /**
- Constructor given the component context
-
- @param xContext The component context
- */
-
- KDEVCLLayer(const uno::Reference<uno::XComponentContext>& xContext);
-
- // XLayer
- virtual void SAL_CALL readData(
- const uno::Reference<backend::XLayerHandler>& xHandler)
- throw ( backend::MalformedDataException,
- lang::NullPointerException,
- lang::WrappedTargetException,
- uno::RuntimeException) ;
-
- // XTimeStamped
- virtual rtl::OUString SAL_CALL getTimestamp(void)
- throw (uno::RuntimeException);
-
- protected:
-
- /** Destructor */
- ~KDEVCLLayer(void) {}
-
- private :
- uno::Reference<backend::XLayerContentDescriber> m_xLayerContentDescriber ;
-};
diff --git a/shell/source/backends/kde4be/makefile.mk b/shell/source/backends/kde4be/makefile.mk
index 6f92762e5ae1..1f9093a95aee 100644
--- a/shell/source/backends/kde4be/makefile.mk
+++ b/shell/source/backends/kde4be/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.5 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
@@ -35,11 +31,7 @@ TARGET=kde4be
LIBTARGET=NO
ENABLE_EXCEPTIONS=TRUE
-
-COMP1TYPELIST=$(TARGET)
-COMPRDB=$(SOLARBINDIR)$/types.rdb
-UNOUCROUT=$(OUT)$/inc$/$(TARGET)
-INCPRE=$(UNOUCROUT)
+VISIBILITY_HIDDEN=TRUE
# --- Settings ---
@@ -64,12 +56,8 @@ CFLAGS+=$(KDE4_CFLAGS)
# --- Files ---
SLOFILES=\
- $(SLO)$/kde4backend.obj \
- $(SLO)$/kde4commonlayer.obj \
- $(SLO)$/kde4inetlayer.obj \
- $(SLO)$/kde4vcllayer.obj \
- $(SLO)$/kde4pathslayer.obj \
- $(SLO)$/kde4becdef.obj
+ $(SLO)$/kde4access.obj \
+ $(SLO)$/kde4backend.obj
SHL1NOCHECK=TRUE
SHL1TARGET=$(TARGET)1.uno
@@ -82,8 +70,7 @@ SHL1STDLIBS= \
$(CPPULIB) \
$(SALLIB) \
$(KDE4_LIBS) -lkio
-
-SHL1VERSIONMAP=exports.map
+
SHL1DEF=$(MISC)$/$(SHL1TARGET).def
DEF1NAME=$(SHL1TARGET)
diff --git a/shell/source/backends/kdebe/exports.map b/shell/source/backends/kdebe/exports.map
deleted file mode 100644
index ba501f9ae076..000000000000
--- a/shell/source/backends/kdebe/exports.map
+++ /dev/null
@@ -1,10 +0,0 @@
-UDK_3_0_0 {
- global:
- GetVersionInfo;
- component_getImplementationEnvironment;
- component_getFactory;
- component_writeInfo;
-
- local:
- *;
-};
diff --git a/shell/source/backends/kdebe/kdeaccess.cxx b/shell/source/backends/kdebe/kdeaccess.cxx
new file mode 100644
index 000000000000..618d74b5eacf
--- /dev/null
+++ b/shell/source/backends/kdebe/kdeaccess.cxx
@@ -0,0 +1,315 @@
+/*************************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+************************************************************************/
+
+#include "precompiled_shell.hxx"
+#include "sal/config.h"
+
+#include "com/sun/star/uno/Any.hxx"
+#include "cppu/unotype.hxx"
+#include "osl/diagnose.h"
+#include "osl/file.h"
+#include "rtl/string.h"
+#include "rtl/ustring.hxx"
+
+#include "kde_headers.h"
+
+#include "kdeaccess.hxx"
+
+#define SPACE ' '
+#define COMMA ','
+#define SEMI_COLON ';'
+
+namespace kdeaccess {
+
+namespace {
+
+namespace css = com::sun::star ;
+namespace uno = css::uno ;
+
+}
+
+css::beans::Optional< css::uno::Any > getValue(rtl::OUString const & id) {
+ if (id.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ExternalMailer"))) {
+ KEMailSettings aEmailSettings;
+ QString aClientProgram;
+ ::rtl::OUString sClientProgram;
+
+ aClientProgram = aEmailSettings.getSetting( KEMailSettings::ClientProgram );
+ if ( aClientProgram.isEmpty() )
+ aClientProgram = "kmail";
+ else
+ aClientProgram = aClientProgram.section(SPACE, 0, 0);
+ sClientProgram = (const sal_Unicode *) aClientProgram.ucs2();
+ return css::beans::Optional< css::uno::Any >(
+ true, uno::makeAny( sClientProgram ) );
+ } else if (id.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("SourceViewFontHeight")))
+ {
+ QFont aFixedFont;
+ short nFontHeight;
+
+ aFixedFont = KGlobalSettings::fixedFont();
+ nFontHeight = aFixedFont.pointSize();
+ return css::beans::Optional< css::uno::Any >(
+ true, uno::makeAny( nFontHeight ) );
+ } else if (id.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("SourceViewFontName")))
+ {
+ QFont aFixedFont;
+ QString aFontName;
+ :: rtl::OUString sFontName;
+
+ aFixedFont = KGlobalSettings::fixedFont();
+ aFontName = aFixedFont.family();
+ sFontName = (const sal_Unicode *) aFontName.ucs2();
+ return css::beans::Optional< css::uno::Any >(
+ true, uno::makeAny( sFontName ) );
+ } else if (id.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("EnableATToolSupport")))
+ {
+ /* does not make much sense without an accessibility bridge */
+ sal_Bool ATToolSupport = sal_False;
+ return css::beans::Optional< css::uno::Any >(
+ true, uno::makeAny( rtl::OUString::valueOf( ATToolSupport ) ) );
+ } else if (id.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("WorkPathVariable")))
+ {
+ QString aDocumentsDir( KGlobalSettings::documentPath() );
+ rtl::OUString sDocumentsDir;
+ rtl::OUString sDocumentsURL;
+ if ( aDocumentsDir.endsWith(QChar('/')) )
+ aDocumentsDir.truncate ( aDocumentsDir.length() - 1 );
+ sDocumentsDir = (const sal_Unicode *) aDocumentsDir.ucs2();
+ osl_getFileURLFromSystemPath( sDocumentsDir.pData, &sDocumentsURL.pData );
+ return css::beans::Optional< css::uno::Any >(
+ true, uno::makeAny( sDocumentsURL ) );
+ } else if (id.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ooInetFTPProxyName")))
+ {
+ QString aFTPProxy;
+ switch ( KProtocolManager::proxyType() )
+ {
+ case KProtocolManager::ManualProxy: // Proxies are manually configured
+ aFTPProxy = KProtocolManager::proxyFor( "FTP" );
+ break;
+ case KProtocolManager::PACProxy: // A proxy configuration URL has been given
+ case KProtocolManager::WPADProxy: // A proxy should be automatically discovered
+ case KProtocolManager::EnvVarProxy: // Use the proxy values set through environment variables
+// In such cases, the proxy address is not stored in KDE, but determined dynamically.
+// The proxy address may depend on the requested address, on the time of the day, on the speed of the wind...
+// The best we can do here is to ask the current value for a given address.
+ aFTPProxy = KProtocolManager::proxyForURL( "ftp://ftp.openoffice.org" );
+ break;
+ default: // No proxy is used
+ break;
+ }
+ if ( !aFTPProxy.isEmpty() )
+ {
+ KURL aProxy(aFTPProxy);
+ ::rtl::OUString sProxy = (const sal_Unicode *) aProxy.host().ucs2();
+ return css::beans::Optional< css::uno::Any >(
+ true, uno::makeAny( sProxy ) );
+ }
+ } else if (id.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ooInetFTPProxyPort")))
+ {
+ QString aFTPProxy;
+ switch ( KProtocolManager::proxyType() )
+ {
+ case KProtocolManager::ManualProxy: // Proxies are manually configured
+ aFTPProxy = KProtocolManager::proxyFor( "FTP" );
+ break;
+ case KProtocolManager::PACProxy: // A proxy configuration URL has been given
+ case KProtocolManager::WPADProxy: // A proxy should be automatically discovered
+ case KProtocolManager::EnvVarProxy: // Use the proxy values set through environment variables
+// In such cases, the proxy address is not stored in KDE, but determined dynamically.
+// The proxy address may depend on the requested address, on the time of the day, on the speed of the wind...
+// The best we can do here is to ask the current value for a given address.
+ aFTPProxy = KProtocolManager::proxyForURL( "ftp://ftp.openoffice.org" );
+ break;
+ default: // No proxy is used
+ break;
+ }
+ if ( !aFTPProxy.isEmpty() )
+ {
+ KURL aProxy(aFTPProxy);
+ sal_Int32 nPort = aProxy.port();
+ return css::beans::Optional< css::uno::Any >(
+ true, uno::makeAny( nPort ) );
+ }
+ } else if (id.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ooInetHTTPProxyName")))
+ {
+ QString aHTTPProxy;
+ switch ( KProtocolManager::proxyType() )
+ {
+ case KProtocolManager::ManualProxy: // Proxies are manually configured
+ aHTTPProxy = KProtocolManager::proxyFor( "HTTP" );
+ break;
+ case KProtocolManager::PACProxy: // A proxy configuration URL has been given
+ case KProtocolManager::WPADProxy: // A proxy should be automatically discovered
+ case KProtocolManager::EnvVarProxy: // Use the proxy values set through environment variables
+// In such cases, the proxy address is not stored in KDE, but determined dynamically.
+// The proxy address may depend on the requested address, on the time of the day, on the speed of the wind...
+// The best we can do here is to ask the current value for a given address.
+ aHTTPProxy = KProtocolManager::proxyForURL( "http://http.openoffice.org" );
+ break;
+ default: // No proxy is used
+ break;
+ }
+ if ( !aHTTPProxy.isEmpty() )
+ {
+ KURL aProxy(aHTTPProxy);
+ ::rtl::OUString sProxy = (const sal_Unicode *) aProxy.host().ucs2();
+ return css::beans::Optional< css::uno::Any >(
+ true, uno::makeAny( sProxy ) );
+ }
+ } else if (id.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ooInetHTTPProxyPort")))
+ {
+ QString aHTTPProxy;
+ switch ( KProtocolManager::proxyType() )
+ {
+ case KProtocolManager::ManualProxy: // Proxies are manually configured
+ aHTTPProxy = KProtocolManager::proxyFor( "HTTP" );
+ break;
+ case KProtocolManager::PACProxy: // A proxy configuration URL has been given
+ case KProtocolManager::WPADProxy: // A proxy should be automatically discovered
+ case KProtocolManager::EnvVarProxy: // Use the proxy values set through environment variables
+// In such cases, the proxy address is not stored in KDE, but determined dynamically.
+// The proxy address may depend on the requested address, on the time of the day, on the speed of the wind...
+// The best we can do here is to ask the current value for a given address.
+ aHTTPProxy = KProtocolManager::proxyForURL( "http://http.openoffice.org" );
+ break;
+ default: // No proxy is used
+ break;
+ }
+ if ( !aHTTPProxy.isEmpty() )
+ {
+ KURL aProxy(aHTTPProxy);
+ sal_Int32 nPort = aProxy.port();
+ return css::beans::Optional< css::uno::Any >(
+ true, uno::makeAny( nPort ) );
+ }
+ } else if (id.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ooInetHTTPSProxyName")))
+ {
+ QString aHTTPSProxy;
+ switch ( KProtocolManager::proxyType() )
+ {
+ case KProtocolManager::ManualProxy: // Proxies are manually configured
+ aHTTPSProxy = KProtocolManager::proxyFor( "HTTPS" );
+ break;
+ case KProtocolManager::PACProxy: // A proxy configuration URL has been given
+ case KProtocolManager::WPADProxy: // A proxy should be automatically discovered
+ case KProtocolManager::EnvVarProxy: // Use the proxy values set through environment variables
+// In such cases, the proxy address is not stored in KDE, but determined dynamically.
+// The proxy address may depend on the requested address, on the time of the day, on the speed of the wind...
+// The best we can do here is to ask the current value for a given address.
+ aHTTPSProxy = KProtocolManager::proxyForURL( "https://https.openoffice.org" );
+ break;
+ default: // No proxy is used
+ break;
+ }
+ if ( !aHTTPSProxy.isEmpty() )
+ {
+ KURL aProxy(aHTTPSProxy);
+ ::rtl::OUString sProxy = (const sal_Unicode *) aProxy.host().ucs2();
+ return css::beans::Optional< css::uno::Any >(
+ true, uno::makeAny( sProxy ) );
+ }
+ } else if (id.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ooInetHTTPSProxyPort")))
+ {
+ QString aHTTPSProxy;
+ switch ( KProtocolManager::proxyType() )
+ {
+ case KProtocolManager::ManualProxy: // Proxies are manually configured
+ aHTTPSProxy = KProtocolManager::proxyFor( "HTTPS" );
+ break;
+ case KProtocolManager::PACProxy: // A proxy configuration URL has been given
+ case KProtocolManager::WPADProxy: // A proxy should be automatically discovered
+ case KProtocolManager::EnvVarProxy: // Use the proxy values set through environment variables
+// In such cases, the proxy address is not stored in KDE, but determined dynamically.
+// The proxy address may depend on the requested address, on the time of the day, on the speed of the wind...
+// The best we can do here is to ask the current value for a given address.
+ aHTTPSProxy = KProtocolManager::proxyForURL( "https://https.openoffice.org" );
+ break;
+ default: // No proxy is used
+ break;
+ }
+ if ( !aHTTPSProxy.isEmpty() )
+ {
+ KURL aProxy(aHTTPSProxy);
+ sal_Int32 nPort = aProxy.port();
+ return css::beans::Optional< css::uno::Any >(
+ true, uno::makeAny( nPort ) );
+ }
+ } else if (id.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ooInetNoProxy"))) {
+ QString aNoProxyFor;
+ switch ( KProtocolManager::proxyType() )
+ {
+ case KProtocolManager::ManualProxy: // Proxies are manually configured
+ case KProtocolManager::PACProxy: // A proxy configuration URL has been given
+ case KProtocolManager::WPADProxy: // A proxy should be automatically discovered
+ case KProtocolManager::EnvVarProxy: // Use the proxy values set through environment variables
+ aNoProxyFor = KProtocolManager::noProxyFor();
+ break;
+ default: // No proxy is used
+ break;
+ }
+ if ( !aNoProxyFor.isEmpty() )
+ {
+ ::rtl::OUString sNoProxyFor;
+
+ aNoProxyFor = aNoProxyFor.replace( COMMA, SEMI_COLON );
+ sNoProxyFor = (const sal_Unicode *) aNoProxyFor.ucs2();
+ return css::beans::Optional< css::uno::Any >(
+ true, uno::makeAny( sNoProxyFor ) );
+ }
+ } else if (id.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ooInetProxyType"))) {
+ int nProxyType;
+ switch ( KProtocolManager::proxyType() )
+ {
+ case KProtocolManager::ManualProxy: // Proxies are manually configured
+ case KProtocolManager::PACProxy: // A proxy configuration URL has been given
+ case KProtocolManager::WPADProxy: // A proxy should be automatically discovered
+ case KProtocolManager::EnvVarProxy: // Use the proxy values set through environment variables
+ nProxyType = 1;
+ break;
+ default: // No proxy is used
+ nProxyType = 0;
+ }
+ return css::beans::Optional< css::uno::Any >(
+ true, uno::makeAny( (sal_Int32) nProxyType ) );
+ } else {
+ OSL_ASSERT(false); // this cannot happen
+ }
+ return css::beans::Optional< css::uno::Any >();
+}
+
+}
diff --git a/shell/source/backends/kdebe/kdeaccess.hxx b/shell/source/backends/kdebe/kdeaccess.hxx
new file mode 100644
index 000000000000..36a22e23db9a
--- /dev/null
+++ b/shell/source/backends/kdebe/kdeaccess.hxx
@@ -0,0 +1,47 @@
+/*************************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+************************************************************************/
+
+#ifndef INCLUDED_SHELL_SOURCE_BACKENDS_KDEBE_KDEACCESS_HXX
+#define INCLUDED_SHELL_SOURCE_BACKENDS_KDEBE_KDEACCESS_HXX
+
+#include "sal/config.h"
+
+#include "com/sun/star/beans/Optional.hpp"
+
+namespace com { namespace sun { namespace star { namespace uno {
+ class Any;
+} } } }
+namespace rtl { class OUString; }
+
+namespace kdeaccess {
+
+com::sun::star::beans::Optional< com::sun::star::uno::Any > getValue(
+ rtl::OUString const & id);
+
+}
+
+#endif
diff --git a/shell/source/backends/kdebe/kdebackend.cxx b/shell/source/backends/kdebe/kdebackend.cxx
index 5f1ab4e7bc0d..53a00cf35987 100644
--- a/shell/source/backends/kdebe/kdebackend.cxx
+++ b/shell/source/backends/kdebe/kdebackend.cxx
@@ -1,158 +1,258 @@
/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: kdebackend.cxx,v $
- * $Revision: 1.7 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+************************************************************************/
+
#include "precompiled_shell.hxx"
+#include "sal/config.h"
-#include "kdebackend.hxx"
-#include "kdecommonlayer.hxx"
-#include "kdeinetlayer.hxx"
-#include "kdevcllayer.hxx"
-#include "kdepathslayer.hxx"
+#include "boost/noncopyable.hpp"
+#include "com/sun/star/beans/Optional.hpp"
+#include "com/sun/star/beans/PropertyVetoException.hpp"
+#include "com/sun/star/beans/UnknownPropertyException.hpp"
+#include "com/sun/star/beans/XPropertyChangeListener.hpp"
+#include "com/sun/star/beans/XPropertySet.hpp"
+#include "com/sun/star/beans/XPropertySetInfo.hpp"
+#include "com/sun/star/beans/XVetoableChangeListener.hpp"
+#include "com/sun/star/lang/IllegalArgumentException.hpp"
+#include "com/sun/star/lang/WrappedTargetException.hpp"
+#include "com/sun/star/lang/XMultiComponentFactory.hpp"
+#include "com/sun/star/lang/XServiceInfo.hpp"
+#include "com/sun/star/lang/WrappedTargetException.hpp"
+#include "com/sun/star/uno/Any.hxx"
+#include "com/sun/star/uno/Reference.hxx"
+#include "com/sun/star/uno/RuntimeException.hpp"
+#include "com/sun/star/uno/Sequence.hxx"
+#include "com/sun/star/uno/XComponentContext.hpp"
+#include "com/sun/star/uno/XCurrentContext.hpp"
+#include "cppuhelper/factory.hxx"
+#include "cppuhelper/implbase2.hxx"
+#include "cppuhelper/implementationentry.hxx"
+#include "cppuhelper/weak.hxx"
+#include "rtl/string.h"
+#include "rtl/ustring.h"
+#include "rtl/ustring.hxx"
+#include "sal/types.h"
+#include "uno/current_context.hxx"
+#include "uno/lbnames.h"
-//------------------------------------------------------------------------------
+#include "kde_headers.h"
-KDEBackend* KDEBackend::mInstance= 0;
+#include "kdeaccess.hxx"
-KDEBackend* KDEBackend::createInstance(const uno::Reference<uno::XComponentContext>& xContext)
-{
- if (mInstance == 0)
- {
- mInstance = new KDEBackend (xContext);
- }
+namespace {
+
+namespace css = com::sun::star;
- return mInstance;
+rtl::OUString SAL_CALL getServiceImplementationName() {
+ return rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.comp.configuration.backend.KDEBackend"));
}
-//------------------------------------------------------------------------------
+css::uno::Sequence< rtl::OUString > SAL_CALL getServiceSupportedServiceNames() {
+ rtl::OUString name(
+ RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.configuration.backend.KDEBackend"));
+ return css::uno::Sequence< rtl::OUString >(&name, 1);
+}
-KDEBackend::KDEBackend(const uno::Reference<uno::XComponentContext>& xContext)
- throw (backend::BackendAccessException)
- : BackendBase(mMutex), m_xContext(xContext)
+class Service:
+ public cppu::WeakImplHelper2<
+ css::lang::XServiceInfo, css::beans::XPropertySet >,
+ private boost::noncopyable
{
-}
+public:
+ Service();
-//------------------------------------------------------------------------------
+private:
+ virtual ~Service() {}
-KDEBackend::~KDEBackend(void)
-{
-}
+ virtual rtl::OUString SAL_CALL getImplementationName()
+ throw (css::uno::RuntimeException)
+ { return getServiceImplementationName(); }
-//------------------------------------------------------------------------------
+ virtual sal_Bool SAL_CALL supportsService(rtl::OUString const & ServiceName)
+ throw (css::uno::RuntimeException)
+ { return ServiceName == getSupportedServiceNames()[0]; }
-uno::Reference<backend::XLayer> SAL_CALL KDEBackend::getLayer(
- const rtl::OUString& aComponent, const rtl::OUString& /* aTimestamp */)
- throw (backend::BackendAccessException, lang::IllegalArgumentException)
-{
- uno::Reference<backend::XLayer> xLayer;
+ virtual css::uno::Sequence< rtl::OUString > SAL_CALL
+ getSupportedServiceNames() throw (css::uno::RuntimeException)
+ { return getServiceSupportedServiceNames(); }
- if( aComponent.equalsAscii("org.openoffice.Office.Common" ) )
- {
- xLayer = new KDECommonLayer(m_xContext);
- }
- else if( aComponent.equalsAscii("org.openoffice.Inet" ) )
- {
- xLayer = new KDEInetLayer(m_xContext);
- }
- else if( aComponent.equalsAscii("org.openoffice.VCL" ) )
- {
- xLayer = new KDEVCLLayer(m_xContext);
- }
- else if( aComponent.equalsAscii("org.openoffice.Office.Paths" ) )
- {
- xLayer = new KDEPathsLayer(m_xContext);
- }
+ virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
+ getPropertySetInfo() throw (css::uno::RuntimeException)
+ { return css::uno::Reference< css::beans::XPropertySetInfo >(); }
- return xLayer;
-}
+ virtual void SAL_CALL setPropertyValue(
+ rtl::OUString const &, css::uno::Any const &)
+ throw (
+ css::beans::UnknownPropertyException,
+ css::beans::PropertyVetoException,
+ css::lang::IllegalArgumentException,
+ css::lang::WrappedTargetException, css::uno::RuntimeException);
-//------------------------------------------------------------------------------
+ virtual css::uno::Any SAL_CALL getPropertyValue(
+ rtl::OUString const & PropertyName)
+ throw (
+ css::beans::UnknownPropertyException,
+ css::lang::WrappedTargetException, css::uno::RuntimeException);
-uno::Reference<backend::XUpdatableLayer> SAL_CALL
-KDEBackend::getUpdatableLayer(const rtl::OUString& /* aComponent */)
- throw (backend::BackendAccessException,lang::NoSupportException,
- lang::IllegalArgumentException)
-{
- throw lang::NoSupportException( rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("KDEBackend: No Update Operation allowed, Read Only access") ),
- *this) ;
-}
+ virtual void SAL_CALL addPropertyChangeListener(
+ rtl::OUString const &,
+ css::uno::Reference< css::beans::XPropertyChangeListener > const &)
+ throw (
+ css::beans::UnknownPropertyException,
+ css::lang::WrappedTargetException, css::uno::RuntimeException)
+ {}
-//------------------------------------------------------------------------------
+ virtual void SAL_CALL removePropertyChangeListener(
+ rtl::OUString const &,
+ css::uno::Reference< css::beans::XPropertyChangeListener > const &)
+ throw (
+ css::beans::UnknownPropertyException,
+ css::lang::WrappedTargetException, css::uno::RuntimeException)
+ {}
-rtl::OUString SAL_CALL KDEBackend::getBackendName(void)
-{
- return rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.configuration.backend.KDEBackend") );
-}
+ virtual void SAL_CALL addVetoableChangeListener(
+ rtl::OUString const &,
+ css::uno::Reference< css::beans::XVetoableChangeListener > const &)
+ throw (
+ css::beans::UnknownPropertyException,
+ css::lang::WrappedTargetException, css::uno::RuntimeException)
+ {}
-//------------------------------------------------------------------------------
+ virtual void SAL_CALL removeVetoableChangeListener(
+ rtl::OUString const &,
+ css::uno::Reference< css::beans::XVetoableChangeListener > const &)
+ throw (
+ css::beans::UnknownPropertyException,
+ css::lang::WrappedTargetException, css::uno::RuntimeException)
+ {}
-rtl::OUString SAL_CALL KDEBackend::getImplementationName(void)
- throw (uno::RuntimeException)
-{
- return getBackendName() ;
-}
+ bool enabled_;
+};
-//------------------------------------------------------------------------------
+Service::Service(): enabled_(false) {
+ css::uno::Reference< css::uno::XCurrentContext > context(
+ css::uno::getCurrentContext());
+ if (context.is()) {
+ rtl::OUString desktop;
+ context->getValueByName(
+ rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM("system.desktop-environment"))) >>=
+ desktop;
+ enabled_ = desktop.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("KDE")) &&
+ KApplication::kApplication() != 0;
+ }
+}
-uno::Sequence<rtl::OUString> SAL_CALL KDEBackend::getBackendServiceNames(void)
+void Service::setPropertyValue(rtl::OUString const &, css::uno::Any const &)
+ throw (
+ css::beans::UnknownPropertyException, css::beans::PropertyVetoException,
+ css::lang::IllegalArgumentException, css::lang::WrappedTargetException,
+ css::uno::RuntimeException)
{
- uno::Sequence<rtl::OUString> aServices(1) ;
- aServices[0] = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.backend.KDEBackend")) ;
-
- return aServices ;
+ throw css::lang::IllegalArgumentException(
+ rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM("setPropertyValue not supported")),
+ static_cast< cppu::OWeakObject * >(this), -1);
}
-//------------------------------------------------------------------------------
+css::uno::Any Service::getPropertyValue(rtl::OUString const & PropertyName)
+ throw (
+ css::beans::UnknownPropertyException, css::lang::WrappedTargetException,
+ css::uno::RuntimeException)
+{
+ if (PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("EnableATToolSupport")) ||
+ PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ExternalMailer")) ||
+ PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("SourceViewFontHeight")) ||
+ PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("SourceViewFontName")) ||
+ PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("WorkPathVariable")) ||
+ PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ooInetFTPProxyName")) ||
+ PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ooInetFTPProxyPort")) ||
+ PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ooInetHTTPProxyName")) ||
+ PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ooInetHTTPProxyPort")) ||
+ PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ooInetHTTPSProxyName")) ||
+ PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ooInetHTTPSProxyPort")) ||
+ PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ooInetNoProxy")) ||
+ PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ooInetProxyType")))
+ {
+ return css::uno::makeAny(
+ enabled_
+ ? kdeaccess::getValue(PropertyName)
+ : css::beans::Optional< css::uno::Any >());
+ }
+ throw css::beans::UnknownPropertyException(
+ PropertyName, static_cast< cppu::OWeakObject * >(this));
+}
-sal_Bool SAL_CALL KDEBackend::supportsService(const rtl::OUString& aServiceName)
- throw (uno::RuntimeException)
+css::uno::Reference< css::uno::XInterface > SAL_CALL createInstance(
+ css::uno::Reference< css::uno::XComponentContext > const &)
{
- uno::Sequence< rtl::OUString > const svc = getBackendServiceNames();
+ return static_cast< cppu::OWeakObject * >(new Service);
+}
- for(sal_Int32 i = 0; i < svc.getLength(); ++i )
- if(svc[i] == aServiceName)
- return true;
+static cppu::ImplementationEntry const services[] = {
+ { &createInstance, &getServiceImplementationName,
+ &getServiceSupportedServiceNames, &cppu::createSingleComponentFactory, 0,
+ 0 },
+ { 0, 0, 0, 0, 0, 0 }
+};
- return false;
}
-//------------------------------------------------------------------------------
+extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
+ char const * pImplName, void * pServiceManager, void * pRegistryKey)
+{
+ return cppu::component_getFactoryHelper(
+ pImplName, pServiceManager, pRegistryKey, services);
+}
-uno::Sequence<rtl::OUString>
-SAL_CALL KDEBackend::getSupportedServiceNames(void)
- throw (uno::RuntimeException)
+extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL
+component_getImplementationEnvironment(
+ char const ** ppEnvTypeName, uno_Environment **)
{
- return getBackendServiceNames() ;
+ *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
-// ---------------------------------------------------------------------------------------
+extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(
+ void * pServiceManager, void * pRegistryKey)
+{
+ return component_writeInfoHelper(pServiceManager, pRegistryKey, services);
+}
diff --git a/shell/source/backends/kdebe/kdebackend.hxx b/shell/source/backends/kdebe/kdebackend.hxx
deleted file mode 100644
index 57cb2338a5bf..000000000000
--- a/shell/source/backends/kdebe/kdebackend.hxx
+++ /dev/null
@@ -1,128 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: kdebackend.hxx,v $
- * $Revision: 1.4 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef KDEBACKEND_HXX_
-#define KDEBACKEND_HXX_
-
-#ifndef _COM_SUN_STAR_CONFIGURATION_BACKEND_XSCHEMASUPPLIER_HPP_
-#include <com/sun/star/configuration/backend/XSingleLayerStratum.hpp>
-#endif
-#include <com/sun/star/lang/XInitialization.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/configuration/InvalidBootstrapFileException.hpp>
-#include <com/sun/star/configuration/backend/CannotConnectException.hpp>
-#include <cppuhelper/compbase2.hxx>
-
-#ifndef INCLUDED_MAP
-#include <map>
-#define INCLUDED_MAP
-#endif
-
-namespace css = com::sun::star ;
-namespace uno = css::uno ;
-namespace lang = css::lang ;
-namespace backend = css::configuration::backend ;
-
-
-//------------------------------------------------------------------------------
-typedef cppu::WeakComponentImplHelper2<backend::XSingleLayerStratum,
- lang::XServiceInfo> BackendBase ;
-
-/**
- Implements the SingleLayerStratum service for KDE access.
- */
-class KDEBackend : public BackendBase {
- public :
-
- static KDEBackend* createInstance(const uno::Reference<uno::XComponentContext>& xContext);
-
- // XServiceInfo
- virtual rtl::OUString SAL_CALL getImplementationName( )
- throw (uno::RuntimeException) ;
-
- virtual sal_Bool SAL_CALL supportsService( const rtl::OUString& aServiceName )
- throw (uno::RuntimeException) ;
-
- virtual uno::Sequence<rtl::OUString> SAL_CALL getSupportedServiceNames( )
- throw (uno::RuntimeException) ;
-
- /**
- Provides the implementation name.
-
- @return implementation name
- */
- static rtl::OUString SAL_CALL getBackendName(void) ;
-
- /**
- Provides the supported services names
-
- @return service names
- */
- static uno::Sequence<rtl::OUString> SAL_CALL getBackendServiceNames(void) ;
-
- //XSingleLayerStratum
- virtual uno::Reference<backend::XLayer> SAL_CALL
- getLayer( const rtl::OUString& aLayerId, const rtl::OUString& aTimestamp )
- throw (backend::BackendAccessException, lang::IllegalArgumentException) ;
-
- virtual uno::Reference<backend::XUpdatableLayer> SAL_CALL
- getUpdatableLayer( const rtl::OUString& aLayerId )
- throw (backend::BackendAccessException, lang::NoSupportException,
- lang::IllegalArgumentException) ;
-
- protected:
- /**
- Service constructor from a service factory.
-
- @param xContext component context
- */
- KDEBackend(const uno::Reference<uno::XComponentContext>& xContext)
- throw (backend::BackendAccessException);
-
- /** Destructor */
- ~KDEBackend(void) ;
-
- private:
-
- /** Build KDE/OO mapping table */
- void initializeMappingTable ();
-
-
- /** The component context */
- uno::Reference<uno::XComponentContext> m_xContext;
-
- /** Mutex for reOOurces protection */
- osl::Mutex mMutex ;
-
- static KDEBackend* mInstance;
-};
-
-#endif // CONFIGMGR_LOCALBE_LOCALSINGLESTRATUM_HXX_
diff --git a/shell/source/backends/kdebe/kdebe.xml b/shell/source/backends/kdebe/kdebe.xml
deleted file mode 100644
index edb1beb0698e..000000000000
--- a/shell/source/backends/kdebe/kdebe.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE module-description PUBLIC "-//StarOffice//DTD ComponentDescription 1.0//EN" "module-description.dtd">
-<module-description xmlns:xlink="http://www.w3.org/1999/xlink">
- <module-name>kdebe</module-name>
- <component-description>
- <author> Éric Bischoff </author>
- <name>com.sun.star.comp.configuration.backend.KDEBackend</name>
- <description> The KDE configuration backend </description>
- <loader-name>com.sun.star.loader.SharedLibrary</loader-name>
- <language>c++</language>
- <status value="beta"/>
- <supported-service>com.sun.star.comp.configuration.backend.KDEBackend</supported-service>
- <service-dependency>...</service-dependency>
- <type>com.sun.star.configuration.backend.XBackendChangesListener</type>
- <type>com.sun.star.configuration.backend.XBackendChangesNotifier</type>
- <type>com.sun.star.configuration.backend.XLayerHandler</type>
- <type>com.sun.star.configuration.backend.XSingleLayerStratum</type>
- <type>com.sun.star.lang.XMultiComponentFactory</type>
- <type>com.sun.star.lang.XServiceInfo</type>
- <type>com.sun.star.lang.XSingleComponentFactory</type>
- <type>com.sun.star.lang.XTypeProvider</type>
- <type>com.sun.star.uno.TypeClass</type>
- <type>com.sun.star.uno.XAggregation</type>
- <type>com.sun.star.uno.XComponentContext</type>
- <type>com.sun.star.uno.XCurrentContext</type>
- <type>com.sun.star.uno.XWeak</type>
- <type>com.sun.star.registry.XRegistryKey</type>
- </component-description>
- <project-build-dependency>cppuhelper</project-build-dependency>
- <project-build-dependency>cppu</project-build-dependency>
- <project-build-dependency>sal</project-build-dependency>
- <runtime-module-dependency>cppuhelper3$(COM)</runtime-module-dependency>
- <runtime-module-dependency>cppu3</runtime-module-dependency>
- <runtime-module-dependency>sal3</runtime-module-dependency>
-</module-description>
diff --git a/shell/source/backends/kdebe/kdebecdef.cxx b/shell/source/backends/kdebe/kdebecdef.cxx
deleted file mode 100644
index c4995e6e81c1..000000000000
--- a/shell/source/backends/kdebe/kdebecdef.cxx
+++ /dev/null
@@ -1,143 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: kdebecdef.cxx,v $
- * $Revision: 1.8 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_shell.hxx"
-#include "kdebackend.hxx"
-#include <com/sun/star/registry/XRegistryKey.hpp>
-
-#ifndef _CPPUHELPER_IMPLEMENTATIONENTRY_HXX_
-#include <cppuhelper/implementationentry.hxx>
-#endif
-#include <com/sun/star/uno/XComponentContext.hpp>
-#include "kde_headers.h"
-
-#include "uno/current_context.hxx"
-
-namespace css = com::sun::star ;
-namespace uno = css::uno ;
-namespace lang = css::lang ;
-namespace backend = css::configuration::backend ;
-
-//==============================================================================
-
-static uno::Reference<uno::XInterface> SAL_CALL createKDEBackend(const uno::Reference<uno::XComponentContext>& xContext)
-{
- try {
- uno::Reference< uno::XCurrentContext > xCurrentContext(uno::getCurrentContext());
-
- if (xCurrentContext.is())
- {
- uno::Any aValue = xCurrentContext->getValueByName(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "system.desktop-environment" ) ) );
-
- rtl::OUString aDesktopEnvironment;
- if ( (aValue >>= aDesktopEnvironment) && (aDesktopEnvironment.equalsAscii("KDE")) && (KApplication::kApplication() != NULL) )
- return * KDEBackend::createInstance(xContext);
- }
-
- return uno::Reference<uno::XInterface>();
-
- } catch (uno::RuntimeException e) {
- return uno::Reference<uno::XInterface>();
- }
-
-}
-
-//==============================================================================
-
-static const cppu::ImplementationEntry kImplementations_entries[] =
-{
- {
- createKDEBackend,
- KDEBackend::getBackendName,
- KDEBackend::getBackendServiceNames,
- cppu::createSingleComponentFactory,
- NULL,
- 0
- },
- { NULL, NULL, NULL, NULL, NULL, 0 }
-} ;
-//------------------------------------------------------------------------------
-
-extern "C" void SAL_CALL component_getImplementationEnvironment(
- const sal_Char **aEnvTypeName,
- uno_Environment **) {
- *aEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ;
-}
-
-//------------------------------------------------------------------------------
-
-extern "C" sal_Bool SAL_CALL component_writeInfo(void *,
- void *pRegistryKey) {
-
- using namespace ::com::sun::star::registry;
- if (pRegistryKey)
- {
- try
- {
- uno::Reference< XRegistryKey > xImplKey = static_cast< XRegistryKey* >( pRegistryKey )->createKey(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) + KDEBackend::getBackendName()
- );
-
- // Register associated service names
- uno::Reference< XRegistryKey > xServicesKey = xImplKey->createKey(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES") )
- );
-
- uno::Sequence<rtl::OUString> sServiceNames = KDEBackend::getBackendServiceNames();
- for (sal_Int32 i = 0 ; i < sServiceNames.getLength() ; ++ i)
- xServicesKey->createKey(sServiceNames[i]);
-
- return sal_True;
- }
-
- catch( InvalidRegistryException& )
- {
- OSL_ENSURE(sal_False, "InvalidRegistryException caught");
- }
- }
-
- return sal_False;
-}
-
-//------------------------------------------------------------------------------
-
-extern "C" void *component_getFactory(const sal_Char *aImplementationName,
- void *aServiceManager,
- void *aRegistryKey) {
-
- return cppu::component_getFactoryHelper(
- aImplementationName,
- aServiceManager,
- aRegistryKey,
- kImplementations_entries) ;
-}
-//------------------------------------------------------------------------------
diff --git a/shell/source/backends/kdebe/kdecommonlayer.cxx b/shell/source/backends/kdebe/kdecommonlayer.cxx
deleted file mode 100644
index 44592e893342..000000000000
--- a/shell/source/backends/kdebe/kdecommonlayer.cxx
+++ /dev/null
@@ -1,153 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: kdecommonlayer.cxx,v $
- * $Revision: 1.7 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_shell.hxx"
-#include "kdecommonlayer.hxx"
-#include "kde_headers.h"
-#include <com/sun/star/configuration/backend/PropertyInfo.hpp>
-#ifndef _COM_SUN_STAR_CONFIGURATION_BACKEND_XLAYERCONTENTDESCIBER_HPP_
-#include <com/sun/star/configuration/backend/XLayerContentDescriber.hpp>
-#endif
-#include <com/sun/star/uno/Sequence.hxx>
-
-#define SPACE ' '
-
-//==============================================================================
-
-KDECommonLayer::KDECommonLayer(const uno::Reference<uno::XComponentContext>& xContext)
-{
- //Create instance of LayerContentDescriber Service
- rtl::OUString const k_sLayerDescriberService(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.comp.configuration.backend.LayerDescriber"));
-
- typedef uno::Reference<backend::XLayerContentDescriber> LayerDescriber;
- uno::Reference< lang::XMultiComponentFactory > xServiceManager = xContext->getServiceManager();
- if( xServiceManager.is() )
- {
- m_xLayerContentDescriber = LayerDescriber::query(
- xServiceManager->createInstanceWithContext(k_sLayerDescriberService, xContext));
- }
- else
- {
- OSL_TRACE("Could not retrieve ServiceManager");
- }
-}
-
-//------------------------------------------------------------------------------
-
-void SAL_CALL KDECommonLayer::readData( const uno::Reference<backend::XLayerHandler>& xHandler)
- throw ( backend::MalformedDataException, lang::NullPointerException,
- lang::WrappedTargetException, uno::RuntimeException)
-{
- if( ! m_xLayerContentDescriber.is() )
- {
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
- "Could not create com.sun.star.configuration.backend.LayerContentDescriber Service"
- ) ), static_cast < backend::XLayer * > (this) );
- }
-
- uno::Sequence<backend::PropertyInfo> aPropInfoList(3);
- sal_Int32 nProperties = 0;
-
- // Email client settings
- KEMailSettings aEmailSettings;
- QString aClientProgram;
- ::rtl::OUString sClientProgram;
-
- aClientProgram = aEmailSettings.getSetting( KEMailSettings::ClientProgram );
- if ( aClientProgram.isEmpty() )
- aClientProgram = "kmail";
- else
- aClientProgram = aClientProgram.section(SPACE, 0, 0);
- sClientProgram = (const sal_Unicode *) aClientProgram.ucs2();
-
- aPropInfoList[nProperties].Name = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Office.Common/ExternalMailer/Program") );
- aPropInfoList[nProperties].Type = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "string" ) );
- aPropInfoList[nProperties].Protected = sal_False;
- aPropInfoList[nProperties++].Value = uno::makeAny( sClientProgram );
-
- // Source code font settings
- QFont aFixedFont;
- QString aFontName;
- :: rtl::OUString sFontName;
- short nFontHeight;
-
- aFixedFont = KGlobalSettings::fixedFont();
- aFontName = aFixedFont.family();
- sFontName = (const sal_Unicode *) aFontName.ucs2();
- nFontHeight = aFixedFont.pointSize();
-
- aPropInfoList[nProperties].Name = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Office.Common/Font/SourceViewFont/FontName") );
- aPropInfoList[nProperties].Type = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "string" ) );
- aPropInfoList[nProperties].Protected = sal_False;
- aPropInfoList[nProperties++].Value = uno::makeAny( sFontName );
-
- aPropInfoList[nProperties].Name = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Office.Common/Font/SourceViewFont/FontHeight") );
- aPropInfoList[nProperties].Type = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "short" ) );
- aPropInfoList[nProperties].Protected = sal_False;
- aPropInfoList[nProperties++].Value = uno::makeAny( nFontHeight );
-
- if( nProperties > 0 )
- {
- aPropInfoList.realloc(nProperties);
- m_xLayerContentDescriber->describeLayer(xHandler, aPropInfoList);
- }
-}
-
-//------------------------------------------------------------------------------
-
-rtl::OUString SAL_CALL KDECommonLayer::getTimestamp(void)
- throw (uno::RuntimeException)
-{
- // Return the value as timestamp to avoid regenerating the binary cache
- // on each office launch.
-
- KEMailSettings aEmailSettings;
- QString aClientProgram = aEmailSettings.getSetting( KEMailSettings::ClientProgram );
- aClientProgram = aClientProgram.section(SPACE, 0, 0);
-
- QString aFixedFont = KGlobalSettings::fixedFont().toString();
-
- ::rtl::OUString sTimeStamp,
- sep( RTL_CONSTASCII_USTRINGPARAM( "$" ) );
-
- sTimeStamp = (const sal_Unicode *) aClientProgram.ucs2();
- sTimeStamp += sep;
- sTimeStamp += (const sal_Unicode *) aFixedFont.ucs2();
-
- return sTimeStamp;
-}
diff --git a/shell/source/backends/kdebe/kdecommonlayer.hxx b/shell/source/backends/kdebe/kdecommonlayer.hxx
deleted file mode 100644
index e61661589145..000000000000
--- a/shell/source/backends/kdebe/kdecommonlayer.hxx
+++ /dev/null
@@ -1,56 +0,0 @@
-#ifndef KDECOMMONLAYER_HXX_
-#define KDECOMMONLAYER_HXX_
-
-#include "kdebackend.hxx"
-#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/configuration/backend/XLayer.hpp>
-#include <com/sun/star/configuration/backend/BackendAccessException.hpp>
-#ifndef _COM_SUN_STAR_CONFIGURATION_BACKEND_XLAYERCONTENTDESCIBER_HPP_
-#include <com/sun/star/configuration/backend/XLayerContentDescriber.hpp>
-#endif
-#include <com/sun/star/util/XTimeStamped.hpp>
-#include <cppuhelper/implbase2.hxx>
-
-namespace css = com::sun::star ;
-namespace uno = css::uno ;
-namespace lang = css::lang ;
-namespace backend = css::configuration::backend ;
-namespace util = css::util ;
-
-/**
- Implementation of the XLayer interface for the KDE values mapped into
- the org.openoffice.Office.Common configuration component.
- */
-class KDECommonLayer : public cppu::WeakImplHelper2<backend::XLayer, util::XTimeStamped>
-{
-public :
- /**
- Constructor given the component context
-
- @param xContext The component context
- */
-
- KDECommonLayer(const uno::Reference<uno::XComponentContext>& xContext);
-
- // XLayer
- virtual void SAL_CALL readData(
- const uno::Reference<backend::XLayerHandler>& xHandler)
- throw ( backend::MalformedDataException,
- lang::NullPointerException,
- lang::WrappedTargetException,
- uno::RuntimeException) ;
-
- // XTimeStamped
- virtual rtl::OUString SAL_CALL getTimestamp(void)
- throw (uno::RuntimeException);
-
- protected:
-
- /** Destructor */
- ~KDECommonLayer(void) {}
-
- private :
- uno::Reference<backend::XLayerContentDescriber> m_xLayerContentDescriber ;
- } ;
-
-#endif // KDECOMMONLAYER
diff --git a/shell/source/backends/kdebe/kdeinetlayer.cxx b/shell/source/backends/kdebe/kdeinetlayer.cxx
deleted file mode 100644
index 78cc0f4ba06d..000000000000
--- a/shell/source/backends/kdebe/kdeinetlayer.cxx
+++ /dev/null
@@ -1,254 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: kdeinetlayer.cxx,v $
- * $Revision: 1.7 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_shell.hxx"
-#include "kdeinetlayer.hxx"
-#include <com/sun/star/configuration/backend/PropertyInfo.hpp>
-#ifndef _COM_SUN_STAR_CONFIGURATION_BACKEND_XLAYERCONTENTDESCIBER_HPP_
-#include <com/sun/star/configuration/backend/XLayerContentDescriber.hpp>
-#endif
-#include <com/sun/star/uno/Sequence.hxx>
-
-#define COMMA ','
-#define SEMI_COLON ';'
-
-//==============================================================================
-
-KDEInetLayer::KDEInetLayer(const uno::Reference<uno::XComponentContext>& xContext)
-{
- //Create instance of LayerContentDescriber Service
- rtl::OUString const k_sLayerDescriberService(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.comp.configuration.backend.LayerDescriber"));
-
- typedef uno::Reference<backend::XLayerContentDescriber> LayerDescriber;
- uno::Reference< lang::XMultiComponentFactory > xServiceManager = xContext->getServiceManager();
- if( xServiceManager.is() )
- {
- m_xLayerContentDescriber = LayerDescriber::query(
- xServiceManager->createInstanceWithContext(k_sLayerDescriberService, xContext));
- }
- else
- {
- OSL_TRACE("Could not retrieve ServiceManager");
- }
-}
-
-//------------------------------------------------------------------------------
-
-void SAL_CALL KDEInetLayer::readData( const uno::Reference<backend::XLayerHandler>& xHandler)
- throw ( backend::MalformedDataException, lang::NullPointerException,
- lang::WrappedTargetException, uno::RuntimeException)
-{
- if( ! m_xLayerContentDescriber.is() )
- {
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
- "Could not create com.sun.star.configuration.backend.LayerContentDescriber Service"
- ) ), static_cast < backend::XLayer * > (this) );
- }
-
- uno::Sequence<backend::PropertyInfo> aPropInfoList(8);
- sal_Int32 nProperties = 0;
-
- switch ( KProtocolManager::proxyType() )
- {
- case KProtocolManager::ManualProxy: // Proxies are manually configured
- setProxy(aPropInfoList, nProperties, 1,
- KProtocolManager::noProxyFor(),
- KProtocolManager::proxyFor( "HTTP" ),
- KProtocolManager::proxyFor( "FTP" ),
- KProtocolManager::proxyFor( "HTTPS" ));
- break;
- case KProtocolManager::PACProxy: // A proxy configuration URL has been given
- case KProtocolManager::WPADProxy: // A proxy should be automatically discovered
- case KProtocolManager::EnvVarProxy: // Use the proxy values set through environment variables
-// In such cases, the proxy address is not stored in KDE, but determined dynamically.
-// The proxy address may depend on the requested address, on the time of the day, on the speed of the wind...
-// The best we can do here is to ask the current value for a given address.
- setProxy(aPropInfoList, nProperties, 1,
- KProtocolManager::noProxyFor(),
- KProtocolManager::proxyForURL( "http://www.openoffice.org" ),
- KProtocolManager::proxyForURL( "ftp://ftp.openoffice.org" ),
- KProtocolManager::proxyForURL( "https://www.openoffice.org" ));
- break;
- default: // No proxy is used
- setProxy(aPropInfoList, nProperties, 0);
- }
-
- if ( nProperties > 0 )
- {
- aPropInfoList.realloc(nProperties);
- m_xLayerContentDescriber->describeLayer(xHandler, aPropInfoList);
- }
-}
-
-//------------------------------------------------------------------------------
-
-rtl::OUString SAL_CALL KDEInetLayer::getTimestamp(void)
- throw (uno::RuntimeException)
-{
- // Return the value as timestamp to avoid regenerating the binary cache
- // on each office launch.
-
- QString aProxyType, aNoProxyFor, aHTTPProxy, aHTTPSProxy, aFTPProxy;
-
- switch ( KProtocolManager::proxyType() )
- {
- case KProtocolManager::ManualProxy:
- aProxyType = '1';
- aNoProxyFor = KProtocolManager::noProxyFor();
- aHTTPProxy = KProtocolManager::proxyFor( "HTTP" );
- aHTTPProxy = KProtocolManager::proxyFor( "HTTPS" );
- aFTPProxy = KProtocolManager::proxyFor( "FTP" );
- break;
- case KProtocolManager::PACProxy:
- case KProtocolManager::WPADProxy:
- case KProtocolManager::EnvVarProxy:
- aProxyType = '1';
- aNoProxyFor = KProtocolManager::noProxyFor();
- aHTTPProxy = KProtocolManager::proxyForURL( "http://www.openoffice.org" );
- aHTTPSProxy = KProtocolManager::proxyForURL( "https://www.openoffice.org" );
- aFTPProxy = KProtocolManager::proxyForURL( "ftp://ftp.openoffice.org" );
- break;
- default:
- aProxyType = '0';
- }
-
- ::rtl::OUString sTimeStamp,
- sep( RTL_CONSTASCII_USTRINGPARAM( "$" ) );
-
- sTimeStamp = (const sal_Unicode *) aProxyType.ucs2();
- sTimeStamp += sep;
- sTimeStamp += (const sal_Unicode *) aNoProxyFor.ucs2();
- sTimeStamp += sep;
- sTimeStamp += (const sal_Unicode *) aHTTPProxy.ucs2();
- sTimeStamp += sep;
- sTimeStamp += (const sal_Unicode *) aHTTPSProxy.ucs2();
- sTimeStamp += sep;
- sTimeStamp += (const sal_Unicode *) aFTPProxy.ucs2();
-
- return sTimeStamp;
-}
-
-//------------------------------------------------------------------------------
-
-void SAL_CALL KDEInetLayer::setProxy
- (uno::Sequence<backend::PropertyInfo> &aPropInfoList, sal_Int32 &nProperties,
- int nProxyType, const QString &aNoProxy, const QString &aHTTPProxy, const QString &aFTPProxy, const QString &aHTTPSProxy ) const
-{
- aPropInfoList[nProperties].Name = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Inet/Settings/ooInetProxyType") );
- aPropInfoList[nProperties].Type = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "int" ) );
- aPropInfoList[nProperties].Protected = sal_False;
- aPropInfoList[nProperties++].Value = uno::makeAny( (sal_Int32) nProxyType );
-
- if (nProxyType == 0) return;
-
- if ( !aNoProxy.isEmpty() )
- {
- QString aNoProxyFor(aNoProxy);
- ::rtl::OUString sNoProxyFor;
-
- aNoProxyFor = aNoProxyFor.replace( COMMA, SEMI_COLON );
- sNoProxyFor = (const sal_Unicode *) aNoProxyFor.ucs2();
-
- aPropInfoList[nProperties].Name = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Inet/Settings/ooInetNoProxy") );
- aPropInfoList[nProperties].Type = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "string" ) );
- aPropInfoList[nProperties].Protected = sal_False;
- aPropInfoList[nProperties++].Value = uno::makeAny( sNoProxyFor );
- }
-
- if ( !aHTTPProxy.isEmpty() )
- {
- KURL aProxy(aHTTPProxy);
- ::rtl::OUString sProxy = (const sal_Unicode *) aProxy.host().ucs2();
- sal_Int32 nPort = aProxy.port();
-
- aPropInfoList[nProperties].Name = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Inet/Settings/ooInetHTTPProxyName") );
- aPropInfoList[nProperties].Type = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "string" ) );
- aPropInfoList[nProperties].Protected = sal_False;
- aPropInfoList[nProperties++].Value = uno::makeAny( sProxy );
-
- aPropInfoList[nProperties].Name = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Inet/Settings/ooInetHTTPProxyPort") );
- aPropInfoList[nProperties].Type = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "int" ) );
- aPropInfoList[nProperties].Protected = sal_False;
- aPropInfoList[nProperties++].Value = uno::makeAny( nPort );
- }
-
- if ( !aHTTPSProxy.isEmpty() )
- {
- KURL aProxy(aHTTPSProxy);
- ::rtl::OUString sProxy = (const sal_Unicode *) aProxy.host().ucs2();
- sal_Int32 nPort = aProxy.port();
-
- aPropInfoList[nProperties].Name = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Inet/Settings/ooInetHTTPSProxyName") );
- aPropInfoList[nProperties].Type = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "string" ) );
- aPropInfoList[nProperties].Protected = sal_False;
- aPropInfoList[nProperties++].Value = uno::makeAny( sProxy );
-
- aPropInfoList[nProperties].Name = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Inet/Settings/ooInetHTTPSProxyPort") );
- aPropInfoList[nProperties].Type = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "int" ) );
- aPropInfoList[nProperties].Protected = sal_False;
- aPropInfoList[nProperties++].Value = uno::makeAny( nPort );
- }
-
- if ( !aFTPProxy.isEmpty() )
- {
- KURL aProxy(aFTPProxy);
- ::rtl::OUString sProxy = (const sal_Unicode *) aProxy.host().ucs2();
- sal_Int32 nPort = aProxy.port();
-
- aPropInfoList[nProperties].Name = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Inet/Settings/ooInetFTPProxyName") );
- aPropInfoList[nProperties].Type = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "string" ) );
- aPropInfoList[nProperties].Protected = sal_False;
- aPropInfoList[nProperties++].Value = uno::makeAny( sProxy );
-
- aPropInfoList[nProperties].Name = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Inet/Settings/ooInetFTPProxyPort") );
- aPropInfoList[nProperties].Type = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "int" ) );
- aPropInfoList[nProperties].Protected = sal_False;
- aPropInfoList[nProperties++].Value = uno::makeAny( nPort );
- }
-}
-
diff --git a/shell/source/backends/kdebe/kdeinetlayer.hxx b/shell/source/backends/kdebe/kdeinetlayer.hxx
deleted file mode 100755
index 1a7427b1cb2c..000000000000
--- a/shell/source/backends/kdebe/kdeinetlayer.hxx
+++ /dev/null
@@ -1,62 +0,0 @@
-#ifndef KDEINETLAYER_HXX_
-#define KDEINETLAYER_HXX_
-
-#include "kdebackend.hxx"
-#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/configuration/backend/XLayer.hpp>
-#include <com/sun/star/configuration/backend/BackendAccessException.hpp>
-#ifndef _COM_SUN_STAR_CONFIGURATION_BACKEND_XLAYERCONTENTDESCIBER_HPP_
-#include <com/sun/star/configuration/backend/XLayerContentDescriber.hpp>
-#endif
-#include <com/sun/star/util/XTimeStamped.hpp>
-#include <cppuhelper/implbase2.hxx>
-#include <kde_headers.h>
-
-namespace css = com::sun::star ;
-namespace uno = css::uno ;
-namespace lang = css::lang ;
-namespace backend = css::configuration::backend ;
-namespace util = css::util ;
-
-/**
- Implementation of the XLayer interface for the KDE values mapped into
- the org.openoffice.Inet configuration component.
- */
-class KDEInetLayer : public cppu::WeakImplHelper2<backend::XLayer, util::XTimeStamped>
-{
-public :
- /**
- Constructor given the component context
-
- @param xContext The component context
- */
-
- KDEInetLayer(const uno::Reference<uno::XComponentContext>& xContext);
-
- // XLayer
- virtual void SAL_CALL readData(
- const uno::Reference<backend::XLayerHandler>& xHandler)
- throw ( backend::MalformedDataException,
- lang::NullPointerException,
- lang::WrappedTargetException,
- uno::RuntimeException) ;
-
- // XTimeStamped
- virtual rtl::OUString SAL_CALL getTimestamp(void)
- throw (uno::RuntimeException);
-
- protected:
-
- /** Destructor */
- ~KDEInetLayer(void) {}
-
-private :
- uno::Reference<backend::XLayerContentDescriber> m_xLayerContentDescriber ;
-
- void SAL_CALL setProxy
- (uno::Sequence<backend::PropertyInfo> &aPropInfoList, sal_Int32 &nProperties,
- int nProxyType, const QString &aNoProxyfor = QString(),
- const QString &aHTTPProxy = QString(), const QString &aFTPProxy = QString(), const QString &aHTTPSProxy = QString()) const;
- } ;
-
-#endif // KDEINETLAYER
diff --git a/shell/source/backends/kdebe/kdepathslayer.cxx b/shell/source/backends/kdebe/kdepathslayer.cxx
deleted file mode 100644
index c60a7fff040a..000000000000
--- a/shell/source/backends/kdebe/kdepathslayer.cxx
+++ /dev/null
@@ -1,121 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: kdepathslayer.cxx,v $
- * $Revision: 1.5 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_shell.hxx"
-#include "kdepathslayer.hxx"
-#include "kde_headers.h"
-#include <com/sun/star/configuration/backend/PropertyInfo.hpp>
-#ifndef _COM_SUN_STAR_CONFIGURATION_BACKEND_XLAYERCONTENTDESCIBER_HPP_
-#include <com/sun/star/configuration/backend/XLayerContentDescriber.hpp>
-#endif
-#include <osl/security.hxx>
-#include <osl/file.hxx>
-#include <com/sun/star/uno/Sequence.hxx>
-
-#define SPACE ' '
-
-//==============================================================================
-
-KDEPathsLayer::KDEPathsLayer(const uno::Reference<uno::XComponentContext>& xContext)
-{
- //Create instance of LayerContentDescriber Service
- rtl::OUString const k_sLayerDescriberService(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.comp.configuration.backend.LayerDescriber"));
-
- typedef uno::Reference<backend::XLayerContentDescriber> LayerDescriber;
- uno::Reference< lang::XMultiComponentFactory > xServiceManager = xContext->getServiceManager();
- if( xServiceManager.is() )
- {
- m_xLayerContentDescriber = LayerDescriber::query(
- xServiceManager->createInstanceWithContext(k_sLayerDescriberService, xContext));
- }
- else
- {
- OSL_TRACE("Could not retrieve ServiceManager");
- }
-}
-
-//------------------------------------------------------------------------------
-
-void SAL_CALL KDEPathsLayer::readData( const uno::Reference<backend::XLayerHandler>& xHandler)
- throw ( backend::MalformedDataException, lang::NullPointerException,
- lang::WrappedTargetException, uno::RuntimeException)
-{
- if( ! m_xLayerContentDescriber.is() )
- {
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
- "Could not create com.sun.star.configuration.backend.LayerContentDescriber Service"
- ) ), static_cast < backend::XLayer * > (this) );
- }
-
- uno::Sequence<backend::PropertyInfo> aPropInfoList(1);
- sal_Int32 nProperties = 0;
-
- QString aDocumentsDir( KGlobalSettings::documentPath() );
- rtl::OUString sDocumentsDir;
- rtl::OUString sDocumentsURL;
- if ( aDocumentsDir.endsWith(QChar('/')) )
- aDocumentsDir.truncate ( aDocumentsDir.length() - 1 );
- sDocumentsDir = (const sal_Unicode *) aDocumentsDir.ucs2();
- osl_getFileURLFromSystemPath( sDocumentsDir.pData, &sDocumentsURL.pData );
-
- aPropInfoList[nProperties].Name = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Office.Paths/Variables/Work") );
- aPropInfoList[nProperties].Type = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "string" ) );
- aPropInfoList[nProperties].Protected = sal_False;
- aPropInfoList[nProperties++].Value = uno::makeAny( sDocumentsURL );
-
- if( nProperties > 0 )
- {
- aPropInfoList.realloc(nProperties);
- m_xLayerContentDescriber->describeLayer(xHandler, aPropInfoList);
- }
-}
-
-//------------------------------------------------------------------------------
-
-rtl::OUString SAL_CALL KDEPathsLayer::getTimestamp(void)
- throw (uno::RuntimeException)
-{
- // Return the value as timestamp to avoid regenerating the binary cache
- // on each office launch.
-
- ::rtl::OUString sTimeStamp,
- sep( RTL_CONSTASCII_USTRINGPARAM( "$" ) );
-
- QString aDocumentsDir;
- aDocumentsDir = KGlobalSettings::documentPath();
-
- sTimeStamp += (const sal_Unicode *) aDocumentsDir.ucs2();
-
- return sTimeStamp;
-}
diff --git a/shell/source/backends/kdebe/kdepathslayer.hxx b/shell/source/backends/kdebe/kdepathslayer.hxx
deleted file mode 100644
index 5a3b365be277..000000000000
--- a/shell/source/backends/kdebe/kdepathslayer.hxx
+++ /dev/null
@@ -1,86 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: kdepathslayer.hxx,v $
- * $Revision: 1.3 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef KDEPATHSLAYER_HXX_
-#define KDEPATHSLAYER_HXX_
-
-#include "kdebackend.hxx"
-#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/configuration/backend/XLayer.hpp>
-#include <com/sun/star/configuration/backend/BackendAccessException.hpp>
-#ifndef _COM_SUN_STAR_CONFIGURATION_BACKEND_XLAYERCONTENTDESCIBER_HPP_
-#include <com/sun/star/configuration/backend/XLayerContentDescriber.hpp>
-#endif
-#include <com/sun/star/util/XTimeStamped.hpp>
-#include <cppuhelper/implbase2.hxx>
-
-namespace css = com::sun::star ;
-namespace uno = css::uno ;
-namespace lang = css::lang ;
-namespace backend = css::configuration::backend ;
-namespace util = css::util ;
-
-/**
- Implementation of the XLayer interface for the KDE values mapped into
- the org.openoffice.Office.Paths configuration component.
- */
-class KDEPathsLayer : public cppu::WeakImplHelper2<backend::XLayer, util::XTimeStamped>
-{
-public :
- /**
- Constructor given the component context
-
- @param xContext The component context
- */
-
- KDEPathsLayer(const uno::Reference<uno::XComponentContext>& xContext);
-
- // XLayer
- virtual void SAL_CALL readData(
- const uno::Reference<backend::XLayerHandler>& xHandler)
- throw ( backend::MalformedDataException,
- lang::NullPointerException,
- lang::WrappedTargetException,
- uno::RuntimeException) ;
-
- // XTimeStamped
- virtual rtl::OUString SAL_CALL getTimestamp(void)
- throw (uno::RuntimeException);
-
- protected:
-
- /** Destructor */
- ~KDEPathsLayer(void) {}
-
- private :
- uno::Reference<backend::XLayerContentDescriber> m_xLayerContentDescriber ;
- } ;
-
-#endif // KDEPATHSLAYER
diff --git a/shell/source/backends/kdebe/kdevcllayer.cxx b/shell/source/backends/kdebe/kdevcllayer.cxx
deleted file mode 100644
index f6c5368acfec..000000000000
--- a/shell/source/backends/kdebe/kdevcllayer.cxx
+++ /dev/null
@@ -1,116 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: kdevcllayer.cxx,v $
- * $Revision: 1.5 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_shell.hxx"
-#include "kdevcllayer.hxx"
-#include <com/sun/star/configuration/backend/PropertyInfo.hpp>
-#ifndef _COM_SUN_STAR_CONFIGURATION_BACKEND_XLAYERCONTENTDESCIBER_HPP_
-#include <com/sun/star/configuration/backend/XLayerContentDescriber.hpp>
-#endif
-#include <com/sun/star/uno/Sequence.hxx>
-#include "kde_headers.h"
-
-//==============================================================================
-
-KDEVCLLayer::KDEVCLLayer(const uno::Reference<uno::XComponentContext>& xContext)
-{
- //Create instance of LayerContentDescriber Service
- rtl::OUString const k_sLayerDescriberService(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.comp.configuration.backend.LayerDescriber"));
-
- typedef uno::Reference<backend::XLayerContentDescriber> LayerDescriber;
- uno::Reference< lang::XMultiComponentFactory > xServiceManager = xContext->getServiceManager();
- if( xServiceManager.is() )
- {
- m_xLayerContentDescriber = LayerDescriber::query(
- xServiceManager->createInstanceWithContext(k_sLayerDescriberService, xContext));
- }
- else
- {
- OSL_TRACE("Could not retrieve ServiceManager");
- }
-}
-
-//------------------------------------------------------------------------------
-
-void SAL_CALL KDEVCLLayer::readData( const uno::Reference<backend::XLayerHandler>& xHandler)
- throw ( backend::MalformedDataException, lang::NullPointerException,
- lang::WrappedTargetException, uno::RuntimeException)
-{
- if( ! m_xLayerContentDescriber.is() )
- {
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
- "Could not create com.sun.star.configuration.backend.LayerContentDescriber Service"
- ) ), static_cast < backend::XLayer * > (this) );
- }
-
- uno::Sequence<backend::PropertyInfo> aPropInfoList(1);
-
-/*
- Commenting out, does not make much sense without an accessibility bridge
-===========================================================================
-#if defined(QT_ACCESSIBILITY_SUPPORT)
-// Accessibility tools under Qt for UNIX are available starting with Qt 4.0
- int nVersionMajor = 0;
- const char *q = qVersion(); // "3.1.0" for example
- while ('0' <= *q && *q <= '9')
- nVersionMajor = nVersionMajor * 10 + *q++ - '0';
- sal_Bool ATToolSupport = (sal_Bool) (nVersionMajor >= 4);
-#else
- sal_Bool ATToolSupport = sal_False;
-#endif
-===========================================================================
- End of commented out section
-*/ sal_Bool ATToolSupport = sal_False;
-
- aPropInfoList[0].Name = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.VCL/Settings/Accessibility/EnableATToolSupport") );
- aPropInfoList[0].Type = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "string" ) );
- aPropInfoList[0].Protected = sal_False;
- aPropInfoList[0].Value = uno::makeAny( rtl::OUString::valueOf( ATToolSupport ) );
-
- m_xLayerContentDescriber->describeLayer(xHandler, aPropInfoList);
-}
-
-//------------------------------------------------------------------------------
-
-rtl::OUString SAL_CALL KDEVCLLayer::getTimestamp(void)
- throw (uno::RuntimeException)
-{
- // Return the value as timestamp to avoid regenerating the binary cache
- // on each office launch.
-
- ::rtl::OUString sTimeStamp(
- RTL_CONSTASCII_USTRINGPARAM( "FALSE" ) );
-
- return sTimeStamp;
-}
diff --git a/shell/source/backends/kdebe/kdevcllayer.hxx b/shell/source/backends/kdebe/kdevcllayer.hxx
deleted file mode 100644
index 4b3a50e5c4c8..000000000000
--- a/shell/source/backends/kdebe/kdevcllayer.hxx
+++ /dev/null
@@ -1,56 +0,0 @@
-#ifndef KDEVCLLAYER_HXX_
-#define KDEVCLLAYER_HXX_
-
-#include "kdebackend.hxx"
-#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/configuration/backend/XLayer.hpp>
-#include <com/sun/star/configuration/backend/BackendAccessException.hpp>
-#ifndef _COM_SUN_STAR_CONFIGURATION_BACKEND_XLAYERCONTENTDESCIBER_HPP_
-#include <com/sun/star/configuration/backend/XLayerContentDescriber.hpp>
-#endif
-#include <com/sun/star/util/XTimeStamped.hpp>
-#include <cppuhelper/implbase2.hxx>
-
-namespace css = com::sun::star ;
-namespace uno = css::uno ;
-namespace lang = css::lang ;
-namespace backend = css::configuration::backend ;
-namespace util = css::util ;
-
-/**
- Implementation of the XLayer interface for the KDE values mapped into
- the org.openoffice.VCL configuration component.
- */
-class KDEVCLLayer : public cppu::WeakImplHelper2<backend::XLayer, util::XTimeStamped>
-{
-public :
- /**
- Constructor given the component context
-
- @param xContext The component context
- */
-
- KDEVCLLayer(const uno::Reference<uno::XComponentContext>& xContext);
-
- // XLayer
- virtual void SAL_CALL readData(
- const uno::Reference<backend::XLayerHandler>& xHandler)
- throw ( backend::MalformedDataException,
- lang::NullPointerException,
- lang::WrappedTargetException,
- uno::RuntimeException) ;
-
- // XTimeStamped
- virtual rtl::OUString SAL_CALL getTimestamp(void)
- throw (uno::RuntimeException);
-
- protected:
-
- /** Destructor */
- ~KDEVCLLayer(void) {}
-
- private :
- uno::Reference<backend::XLayerContentDescriber> m_xLayerContentDescriber ;
- } ;
-
-#endif // KDEVCLLAYER
diff --git a/shell/source/backends/kdebe/makefile.mk b/shell/source/backends/kdebe/makefile.mk
index 6159be6be151..31bf77b47b54 100644
--- a/shell/source/backends/kdebe/makefile.mk
+++ b/shell/source/backends/kdebe/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.5 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
@@ -35,11 +31,7 @@ TARGET=kdebe
LIBTARGET=NO
ENABLE_EXCEPTIONS=TRUE
-
-COMP1TYPELIST=$(TARGET)
-COMPRDB=$(SOLARBINDIR)$/types.rdb
-UNOUCROUT=$(OUT)$/inc$/$(TARGET)
-INCPRE=$(UNOUCROUT)
+VISIBILITY_HIDDEN=TRUE
# --- Settings ---
@@ -64,12 +56,8 @@ CFLAGS+=$(KDE_CFLAGS)
# --- Files ---
SLOFILES=\
- $(SLO)$/kdebackend.obj \
- $(SLO)$/kdecommonlayer.obj \
- $(SLO)$/kdeinetlayer.obj \
- $(SLO)$/kdevcllayer.obj \
- $(SLO)$/kdepathslayer.obj \
- $(SLO)$/kdebecdef.obj
+ $(SLO)$/kdeaccess.obj \
+ $(SLO)$/kdebackend.obj
SHL1NOCHECK=TRUE
SHL1TARGET=$(TARGET)1.uno
@@ -82,8 +70,7 @@ SHL1STDLIBS= \
$(CPPUHELPERLIB) \
$(CPPULIB) \
$(SALLIB)
-
-SHL1VERSIONMAP=exports.map
+
SHL1DEF=$(MISC)$/$(SHL1TARGET).def
DEF1NAME=$(SHL1TARGET)
diff --git a/shell/source/backends/localebe/exports.map b/shell/source/backends/localebe/exports.map
deleted file mode 100644
index ba501f9ae076..000000000000
--- a/shell/source/backends/localebe/exports.map
+++ /dev/null
@@ -1,10 +0,0 @@
-UDK_3_0_0 {
- global:
- GetVersionInfo;
- component_getImplementationEnvironment;
- component_getFactory;
- component_writeInfo;
-
- local:
- *;
-};
diff --git a/shell/source/backends/localebe/localebackend.cxx b/shell/source/backends/localebe/localebackend.cxx
index 1496f426d3c6..1335d4a7fa50 100644
--- a/shell/source/backends/localebe/localebackend.cxx
+++ b/shell/source/backends/localebe/localebackend.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: localebackend.cxx,v $
- * $Revision: 1.12 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -32,9 +29,7 @@
#include "precompiled_shell.hxx"
#include "localebackend.hxx"
-#include "localelayer.hxx"
-#include <com/sun/star/configuration/backend/ComponentChangeEvent.hpp>
-#include <uno/current_context.hxx>
+#include <com/sun/star/beans/Optional.hpp>
#include <osl/time.h>
#include <stdio.h>
@@ -229,11 +224,7 @@ rtl::OUString ImplGetLocale(LCID lcid)
// -------------------------------------------------------------------------------
-LocaleBackend::LocaleBackend(const uno::Reference<uno::XComponentContext>& xContext)
- throw (backend::BackendAccessException) :
- ::cppu::WeakImplHelper2 < backend::XSingleLayerStratum, lang::XServiceInfo > (),
- m_xContext(xContext)
-
+LocaleBackend::LocaleBackend()
{
}
@@ -245,11 +236,9 @@ LocaleBackend::~LocaleBackend(void)
//------------------------------------------------------------------------------
-LocaleBackend* LocaleBackend::createInstance(
- const uno::Reference<uno::XComponentContext>& xContext
-)
+LocaleBackend* LocaleBackend::createInstance()
{
- return new LocaleBackend(xContext);
+ return new LocaleBackend;
}
// ---------------------------------------------------------------------------------------
@@ -291,61 +280,45 @@ rtl::OUString LocaleBackend::getSystemLocale(void)
}
//------------------------------------------------------------------------------
-rtl::OUString LocaleBackend::createTimeStamp()
+void LocaleBackend::setPropertyValue(
+ rtl::OUString const &, css::uno::Any const &)
+ throw (
+ css::beans::UnknownPropertyException, css::beans::PropertyVetoException,
+ css::lang::IllegalArgumentException, css::lang::WrappedTargetException,
+ css::uno::RuntimeException)
{
- // the time stamp is free text, so just returning the values here.
- return getLocale() + getUILocale() + getSystemLocale();
+ throw css::lang::IllegalArgumentException(
+ rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM("setPropertyValue not supported")),
+ static_cast< cppu::OWeakObject * >(this), -1);
}
-//------------------------------------------------------------------------------
-
-uno::Reference<backend::XLayer> SAL_CALL LocaleBackend::getLayer(
- const rtl::OUString& aComponent, const rtl::OUString& /*aTimestamp*/)
- throw (backend::BackendAccessException, lang::IllegalArgumentException)
+css::uno::Any LocaleBackend::getPropertyValue(
+ rtl::OUString const & PropertyName)
+ throw (
+ css::beans::UnknownPropertyException, css::lang::WrappedTargetException,
+ css::uno::RuntimeException)
{
-
- uno::Sequence<rtl::OUString> aComps( getSupportedComponents() );
- if( aComponent.equals( aComps[0]) )
+ if (PropertyName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Locale"))) {
+ return css::uno::makeAny(
+ css::beans::Optional< css::uno::Any >(
+ true, css::uno::makeAny(getLocale())));
+ } else if (PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("SystemLocale")))
{
- if( ! m_xSystemLayer.is() )
- {
- uno::Sequence<backend::PropertyInfo> aPropInfoList(3);
-
- aPropInfoList[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.System/L10N/UILocale") );
- aPropInfoList[0].Type = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "string" ) );
- aPropInfoList[0].Protected = sal_False;
- aPropInfoList[0].Value = uno::makeAny( getUILocale() );
-
- aPropInfoList[1].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.System/L10N/Locale") );
- aPropInfoList[1].Type = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "string" ));
- aPropInfoList[1].Protected = sal_False;
- aPropInfoList[1].Value = uno::makeAny( getLocale() );
-
- aPropInfoList[2].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.System/L10N/SystemLocale") );
- aPropInfoList[2].Type = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "string" ));
- aPropInfoList[2].Protected = sal_False;
- aPropInfoList[2].Value = uno::makeAny( getSystemLocale() );
-
- m_xSystemLayer = new LocaleLayer(aPropInfoList, createTimeStamp(), m_xContext);
- }
-
- return m_xSystemLayer;
+ return css::uno::makeAny(
+ css::beans::Optional< css::uno::Any >(
+ true, css::uno::makeAny(getSystemLocale())));
+ } else if (PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("UILocale")))
+ {
+ return css::uno::makeAny(
+ css::beans::Optional< css::uno::Any >(
+ true, css::uno::makeAny(getUILocale())));
+ } else {
+ throw css::beans::UnknownPropertyException(
+ PropertyName, static_cast< cppu::OWeakObject * >(this));
}
-
- return uno::Reference<backend::XLayer>();
-}
-
-//------------------------------------------------------------------------------
-
-uno::Reference<backend::XUpdatableLayer> SAL_CALL
-LocaleBackend::getUpdatableLayer(const rtl::OUString& /*aComponent*/)
- throw (backend::BackendAccessException,lang::NoSupportException,
- lang::IllegalArgumentException)
-{
- throw lang::NoSupportException(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
- "LocaleBackend: No Update Operation allowed, Read Only access") ),
- *this) ;
}
//------------------------------------------------------------------------------
@@ -366,10 +339,8 @@ rtl::OUString SAL_CALL LocaleBackend::getImplementationName(void)
uno::Sequence<rtl::OUString> SAL_CALL LocaleBackend::getBackendServiceNames(void)
{
- uno::Sequence<rtl::OUString> aServiceNameList(2);
+ uno::Sequence<rtl::OUString> aServiceNameList(1);
aServiceNameList[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.backend.LocaleBackend")) ;
- aServiceNameList[1] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.backend.PlatformBackend")) ;
-
return aServiceNameList ;
}
@@ -394,16 +365,3 @@ uno::Sequence<rtl::OUString> SAL_CALL LocaleBackend::getSupportedServiceNames(vo
{
return getBackendServiceNames() ;
}
-
-// ---------------------------------------------------------------------------------------
-
-uno::Sequence<rtl::OUString> SAL_CALL LocaleBackend::getSupportedComponents(void)
-{
- uno::Sequence<rtl::OUString> aSupportedComponentList(1);
- aSupportedComponentList[0] = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.System" )
- );
-
- return aSupportedComponentList;
-}
-
diff --git a/shell/source/backends/localebe/localebackend.hxx b/shell/source/backends/localebe/localebackend.hxx
index 7546a0385cf0..29950a3df913 100644
--- a/shell/source/backends/localebe/localebackend.hxx
+++ b/shell/source/backends/localebe/localebackend.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: localebackend.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -31,10 +28,8 @@
#ifndef _FIXEDVALUEBACKEND_HXX_
#define _FIXEDVALUEBACKEND_HXX_
-#include <com/sun/star/configuration/backend/XSingleLayerStratum.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/configuration/backend/XBackendChangesNotifier.hpp>
#include <cppuhelper/implbase2.hxx>
#include <rtl/string.hxx>
@@ -42,19 +37,14 @@
namespace css = com::sun::star ;
namespace uno = css::uno ;
namespace lang = css::lang ;
-namespace backend = css::configuration::backend ;
-
-/**
- Implements the SingleLayerStratum service.
- */
class LocaleBackend : public ::cppu::WeakImplHelper2 <
- backend::XSingleLayerStratum,
+ css::beans::XPropertySet,
lang::XServiceInfo > {
public :
- static LocaleBackend* createInstance(const uno::Reference<uno::XComponentContext>& xContext);
+ static LocaleBackend* createInstance();
// XServiceInfo
virtual rtl::OUString SAL_CALL
@@ -81,45 +71,70 @@ class LocaleBackend : public ::cppu::WeakImplHelper2 <
@return service names
*/
static uno::Sequence<rtl::OUString> SAL_CALL getBackendServiceNames(void) ;
- /**
- Provides the supported component nodes
-
- @return supported component nodes
- */
- static uno::Sequence<rtl::OUString> SAL_CALL getSupportedComponents(void) ;
-
- //XSingleLayerStratum
- virtual uno::Reference<backend::XLayer> SAL_CALL
- getLayer( const rtl::OUString& aLayerId, const rtl::OUString& aTimestamp )
- throw (backend::BackendAccessException,
- lang::IllegalArgumentException) ;
-
- virtual uno::Reference<backend::XUpdatableLayer> SAL_CALL
- getUpdatableLayer( const rtl::OUString& aLayerId )
- throw (backend::BackendAccessException,
- lang::NoSupportException,
- lang::IllegalArgumentException) ;
+
+ // XPropertySet
+ virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
+ getPropertySetInfo() throw (css::uno::RuntimeException)
+ { return css::uno::Reference< css::beans::XPropertySetInfo >(); }
+
+ virtual void SAL_CALL setPropertyValue(
+ rtl::OUString const &, css::uno::Any const &)
+ throw (
+ css::beans::UnknownPropertyException,
+ css::beans::PropertyVetoException,
+ css::lang::IllegalArgumentException,
+ css::lang::WrappedTargetException, css::uno::RuntimeException);
+
+ virtual css::uno::Any SAL_CALL getPropertyValue(
+ rtl::OUString const & PropertyName)
+ throw (
+ css::beans::UnknownPropertyException,
+ css::lang::WrappedTargetException, css::uno::RuntimeException);
+
+ virtual void SAL_CALL addPropertyChangeListener(
+ rtl::OUString const &,
+ css::uno::Reference< css::beans::XPropertyChangeListener > const &)
+ throw (
+ css::beans::UnknownPropertyException,
+ css::lang::WrappedTargetException, css::uno::RuntimeException)
+ {}
+
+ virtual void SAL_CALL removePropertyChangeListener(
+ rtl::OUString const &,
+ css::uno::Reference< css::beans::XPropertyChangeListener > const &)
+ throw (
+ css::beans::UnknownPropertyException,
+ css::lang::WrappedTargetException, css::uno::RuntimeException)
+ {}
+
+ virtual void SAL_CALL addVetoableChangeListener(
+ rtl::OUString const &,
+ css::uno::Reference< css::beans::XVetoableChangeListener > const &)
+ throw (
+ css::beans::UnknownPropertyException,
+ css::lang::WrappedTargetException, css::uno::RuntimeException)
+ {}
+
+ virtual void SAL_CALL removeVetoableChangeListener(
+ rtl::OUString const &,
+ css::uno::Reference< css::beans::XVetoableChangeListener > const &)
+ throw (
+ css::beans::UnknownPropertyException,
+ css::lang::WrappedTargetException, css::uno::RuntimeException)
+ {}
+
protected:
/**
Service constructor from a service factory.
@param xContext component context
*/
- LocaleBackend(const uno::Reference<uno::XComponentContext>& xContext)
- throw (backend::BackendAccessException);
+ LocaleBackend();
/** Destructor */
~LocaleBackend(void) ;
private:
-
- uno::Reference<uno::XComponentContext> m_xContext ;
- uno::Reference<backend::XLayer> m_xSystemLayer ;
-
- // Returns a time stamp in the appropriate format
- // for configuration layers.
- static rtl::OUString createTimeStamp(void);
-
// Returns the user locale
static rtl::OUString getLocale(void);
diff --git a/shell/source/backends/localebe/localebe.xml b/shell/source/backends/localebe/localebe.xml
index fb6823b43a05..3c22a4970881 100644
--- a/shell/source/backends/localebe/localebe.xml
+++ b/shell/source/backends/localebe/localebe.xml
@@ -10,7 +10,6 @@
<language>c++</language>
<status value="beta"/>
<supported-service>com.sun.star.comp.configuration.backend.LocaleBackend</supported-service>
- <supported-service>com.sun.star.comp.configuration.backend.PlatformBackend</supported-service>
<service-dependency>...</service-dependency>
<type>com.sun.star.configuration.backend.XBackendChangesListener</type>
<type>com.sun.star.configuration.backend.XBackendChangesNotifier</type>
diff --git a/shell/source/backends/localebe/localebecdef.cxx b/shell/source/backends/localebe/localebecdef.cxx
index c9211543a283..576501e4da9f 100644
--- a/shell/source/backends/localebe/localebecdef.cxx
+++ b/shell/source/backends/localebe/localebecdef.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: localebecdef.cxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -32,7 +29,6 @@
#include "precompiled_shell.hxx"
#include <localebackend.hxx>
-#include <com/sun/star/registry/XRegistryKey.hpp>
#ifndef _CPPUHELPER_IMPLEMENTATIONENTRY_HXX_
#include <cppuhelper/implementationentry.hxx>
@@ -42,14 +38,13 @@
namespace css = com::sun::star ;
namespace uno = css::uno ;
namespace lang = css::lang ;
-namespace backend = css::configuration::backend ;
//------------------------------------------------------------------------------
static uno::Reference<uno::XInterface> SAL_CALL createLocaleBackend(
- const uno::Reference<uno::XComponentContext>& xContext){
+ const uno::Reference<uno::XComponentContext>&){
- return * LocaleBackend::createInstance(xContext);
+ return * LocaleBackend::createInstance();
}
//------------------------------------------------------------------------------
@@ -77,41 +72,9 @@ extern "C" void SAL_CALL component_getImplementationEnvironment(
//------------------------------------------------------------------------------
-extern "C" sal_Bool SAL_CALL component_writeInfo(void * /*pServiceManager*/, void *pRegistryKey) {
-
- using namespace ::com::sun::star::registry;
- if (pRegistryKey)
- {
- try
- {
- uno::Reference< XRegistryKey > xImplKey = static_cast< XRegistryKey* >( pRegistryKey )->createKey(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) + LocaleBackend::getBackendName()
- );
-
- // Register associated service names
- uno::Reference< XRegistryKey > xServicesKey = xImplKey->createKey(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES") )
- );
-
- uno::Sequence<rtl::OUString> sServiceNames = LocaleBackend::getBackendServiceNames();
- for (sal_Int32 i = 0 ; i < sServiceNames.getLength() ; ++ i)
- xServicesKey->createKey(sServiceNames[i]);
-
- // Register supported components
- uno::Reference<XRegistryKey> xComponentKey = xImplKey->createKey(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/DATA/SupportedComponents") )
- );
-
- xComponentKey->setAsciiListValue( LocaleBackend::getSupportedComponents() );
-
- return sal_True;
- }
- catch( InvalidRegistryException& )
- {
- OSL_ENSURE(sal_False, "InvalidRegistryException caught");
- }
- }
- return sal_False;
+extern "C" sal_Bool SAL_CALL component_writeInfo(void * pServiceManager, void *pRegistryKey) {
+ return cppu::component_writeInfoHelper(
+ pServiceManager, pRegistryKey, kImplementations_entries);
}
//------------------------------------------------------------------------------
diff --git a/shell/source/backends/localebe/localelayer.cxx b/shell/source/backends/localebe/localelayer.cxx
deleted file mode 100644
index 74253e9d9187..000000000000
--- a/shell/source/backends/localebe/localelayer.cxx
+++ /dev/null
@@ -1,88 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: localelayer.cxx,v $
- * $Revision: 1.6 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_shell.hxx"
-#include "localelayer.hxx"
-
-//------------------------------------------------------------------------------
-
-LocaleLayer::LocaleLayer( const uno::Sequence<backend::PropertyInfo>& aPropInfoList,
- const rtl::OUString& aTimestamp,
- const uno::Reference<uno::XComponentContext>& xContext)
- : m_aTimestamp(aTimestamp), m_aPropInfoList(aPropInfoList)
-{
- //Create instance of LayerContentDescriber Service
- rtl::OUString const k_sLayerDescriberService(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.comp.configuration.backend.LayerDescriber"));
-
- typedef uno::Reference<backend::XLayerContentDescriber> LayerDescriber;
- uno::Reference< lang::XMultiComponentFactory > xServiceManager = xContext->getServiceManager();
- if( xServiceManager.is() )
- {
- m_xLayerContentDescriber = LayerDescriber::query(
- xServiceManager->createInstanceWithContext(k_sLayerDescriberService, xContext));
- }
- else
- {
- OSL_TRACE("Could not retrieve ServiceManager");
- }
-
-}
-
-//------------------------------------------------------------------------------
-
-void SAL_CALL LocaleLayer::readData(
- const uno::Reference<backend::XLayerHandler>& xHandler)
- throw ( backend::MalformedDataException,
- lang::NullPointerException,
- lang::WrappedTargetException,
- uno::RuntimeException)
-{
-
- if (m_xLayerContentDescriber.is())
- {
- m_xLayerContentDescriber->describeLayer(xHandler, m_aPropInfoList);
- }
- else
- {
- OSL_TRACE("Could not create com.sun.star.configuration.backend.LayerContentDescriber Service");
- }
-}
-
-//------------------------------------------------------------------------------
-
-rtl::OUString SAL_CALL LocaleLayer::getTimestamp(void)
- throw (uno::RuntimeException)
-{
- return m_aTimestamp;
-}
-
-//------------------------------------------------------------------------------
diff --git a/shell/source/backends/localebe/localelayer.hxx b/shell/source/backends/localebe/localelayer.hxx
deleted file mode 100644
index 69b305079d33..000000000000
--- a/shell/source/backends/localebe/localelayer.hxx
+++ /dev/null
@@ -1,64 +0,0 @@
-#ifndef _LOCALELAYER_HXX_
-#define _LOCALELAYER_HXX_
-
-#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/configuration/backend/XLayer.hpp>
-#include <com/sun/star/configuration/backend/PropertyInfo.hpp>
-#include <com/sun/star/configuration/backend/BackendAccessException.hpp>
-
-#ifndef _COM_SUN_STAR_CONFIGURATION_BACKEND_XLAYERCONTENTDESCIBER_HPP_
-#include <com/sun/star/configuration/backend/XLayerContentDescriber.hpp>
-#endif
-#include <com/sun/star/util/XTimeStamped.hpp>
-#include <com/sun/star/uno/Sequence.hxx>
-#include <cppuhelper/implbase2.hxx>
-
-
-namespace css = com::sun::star ;
-namespace uno = css::uno ;
-namespace lang = css::lang ;
-namespace backend = css::configuration::backend ;
-namespace util = css::util ;
-
-/**
- Implementation of the XLayer interfaces for fixed values
- */
-
-class LocaleLayer : public cppu::WeakImplHelper2<backend::XLayer, util::XTimeStamped>
-{
- public :
- /**
- Constructor given the requested component name
-
- @param aPropInfoListyMap Gconf->OO key map
- @param aCompoentName Requested Component Name
- @param sTimestamp timestamp indicating last modifictaion
- */
- LocaleLayer(const uno::Sequence<backend::PropertyInfo>& aPropInfoList,
- const rtl::OUString& aTimestamp,
- const uno::Reference<uno::XComponentContext>& xContext);
-
- /** Destructor */
- ~LocaleLayer(void) {}
-
- // XLayer
- virtual void SAL_CALL readData(const uno::Reference<backend::XLayerHandler>& xHandler)
- throw ( backend::MalformedDataException,
- lang::NullPointerException,
- lang::WrappedTargetException,
- uno::RuntimeException) ;
-
- // XTimeStamped
- virtual rtl::OUString SAL_CALL getTimestamp(void)
- throw (uno::RuntimeException);
-
- private :
-
- rtl::OUString m_aTimestamp ;
- rtl::OUString m_aComponent ;
-
- uno::Reference<backend::XLayerContentDescriber> m_xLayerContentDescriber ;
- uno::Sequence<backend::PropertyInfo> m_aPropInfoList ;
-} ;
-
-#endif // _LOCALELAYER_HXX_
diff --git a/shell/source/backends/localebe/makefile.mk b/shell/source/backends/localebe/makefile.mk
index 76767264a831..bd12bcdb28ce 100644
--- a/shell/source/backends/localebe/makefile.mk
+++ b/shell/source/backends/localebe/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.7 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
@@ -49,9 +45,8 @@ DLLPRE =
SLOFILES=\
$(SLO)$/localebecdef.obj \
- $(SLO)$/localebackend.obj \
- $(SLO)$/localelayer.obj
-
+ $(SLO)$/localebackend.obj
+
SHL1TARGET=$(TARGET)1.uno
SHL1OBJS=$(SLOFILES)
SHL1DEF=$(MISC)$/$(SHL1TARGET).def
@@ -67,7 +62,7 @@ SHL1STDLIBS= \
SHL1STDLIBS+= -framework CoreServices
.ENDIF
-SHL1VERSIONMAP=exports.map
+SHL1VERSIONMAP=$(SOLARENV)/src/component.map
SHL1DEF=$(MISC)$/$(SHL1TARGET).def
DEF1NAME=$(SHL1TARGET)
diff --git a/shell/source/backends/macbe/exports.map b/shell/source/backends/macbe/exports.map
deleted file mode 100644
index ba501f9ae076..000000000000
--- a/shell/source/backends/macbe/exports.map
+++ /dev/null
@@ -1,10 +0,0 @@
-UDK_3_0_0 {
- global:
- GetVersionInfo;
- component_getImplementationEnvironment;
- component_getFactory;
- component_writeInfo;
-
- local:
- *;
-};
diff --git a/shell/source/backends/macbe/macbackend.cxx b/shell/source/backends/macbe/macbackend.cxx
index 06589e4d6574..b07afb2e6701 100644
--- a/shell/source/backends/macbe/macbackend.cxx
+++ b/shell/source/backends/macbe/macbackend.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: macbackend.cxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -31,18 +28,140 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_shell.hxx"
+// For MAXHOSTNAMELEN constant
+#include <sys/param.h>
+
+#include <premac.h>
+#include <SystemConfiguration/SystemConfiguration.h>
+#include <Foundation/NSPathUtilities.h>
+#include <postmac.h>
+
#include "macbackend.hxx"
-#include "macbelayer.hxx"
-#include <com/sun/star/configuration/backend/ComponentChangeEvent.hpp>
-#include <uno/current_context.hxx>
-#define MACBE_INET_COMPONENT "org.openoffice.Inet"
-#define MACBE_PATHS_COMPONENT "org.openoffice.Office.Paths"
+#include "com/sun/star/beans/Optional.hpp"
+#include "rtl/ustrbuf.hxx"
+#include "osl/file.h"
+
+#define SPACE ' '
+#define SEMI_COLON ';'
+
+typedef struct
+{
+ rtl::OUString Server;
+ sal_Int32 Port;
+} ProxyEntry;
+
+typedef enum {
+ sHTTP,
+ sHTTPS,
+ sFTP
+} ServiceType;
+
+//------------------------------------------------------------------------
+// helper functions
+//------------------------------------------------------------------------
-MacOSXBackend::MacOSXBackend(const uno::Reference<uno::XComponentContext>& xContext)
- throw (backend::BackendAccessException) :
- ::cppu::WeakImplHelper2 < backend::XSingleLayerStratum, lang::XServiceInfo > (),
- m_xContext(xContext)
+namespace // private
+{
+
+/*
+ * Returns current proxy settings for selected service type (HTTP or
+ * FTP) as a C string (in the buffer specified by host and hostSize)
+ * and a port number.
+ */
+
+bool GetProxySetting(ServiceType sType, char *host, size_t hostSize, UInt16 *port)
+{
+ bool result;
+ CFDictionaryRef proxyDict;
+ CFNumberRef enableNum;
+ int enable;
+ CFStringRef hostStr;
+ CFNumberRef portNum;
+ int portInt;
+
+ proxyDict = SCDynamicStoreCopyProxies(NULL);
+
+ if (!proxyDict)
+ return false;
+
+ CFStringRef proxiesEnable;
+ CFStringRef proxiesProxy;
+ CFStringRef proxiesPort;
+
+ switch ( sType )
+ {
+ case sHTTP : proxiesEnable = kSCPropNetProxiesHTTPEnable;
+ proxiesProxy = kSCPropNetProxiesHTTPProxy;
+ proxiesPort = kSCPropNetProxiesHTTPPort;
+ break;
+ case sHTTPS: proxiesEnable = kSCPropNetProxiesHTTPSEnable;
+ proxiesProxy = kSCPropNetProxiesHTTPSProxy;
+ proxiesPort = kSCPropNetProxiesHTTPSPort;
+ break;
+ default: proxiesEnable = kSCPropNetProxiesFTPEnable;
+ proxiesProxy = kSCPropNetProxiesFTPProxy;
+ proxiesPort = kSCPropNetProxiesFTPPort;
+ break;
+ }
+ // Proxy enabled?
+ enableNum = (CFNumberRef) CFDictionaryGetValue( proxyDict,
+ proxiesEnable );
+
+ result = (enableNum != NULL) && (CFGetTypeID(enableNum) == CFNumberGetTypeID());
+
+ if (result)
+ result = CFNumberGetValue(enableNum, kCFNumberIntType, &enable) && (enable != 0);
+
+ // Proxy enabled -> get hostname
+ if (result)
+ {
+ hostStr = (CFStringRef) CFDictionaryGetValue( proxyDict,
+ proxiesProxy );
+
+ result = (hostStr != NULL) && (CFGetTypeID(hostStr) == CFStringGetTypeID());
+ }
+
+ if (result)
+ result = CFStringGetCString(hostStr, host, (CFIndex) hostSize, kCFStringEncodingASCII);
+
+ // Get proxy port
+ if (result)
+ {
+ portNum = (CFNumberRef) CFDictionaryGetValue( proxyDict,
+ proxiesPort );
+
+ result = (portNum != NULL) && (CFGetTypeID(portNum) == CFNumberGetTypeID());
+ }
+ else
+ {
+ CFRelease(proxyDict);
+ return false;
+ }
+
+ if (result)
+ result = CFNumberGetValue(portNum, kCFNumberIntType, &portInt);
+
+ if (result)
+ *port = (UInt16) portInt;
+
+ if (proxyDict)
+ CFRelease(proxyDict);
+
+ if (!result)
+ {
+ *host = 0;
+ *port = 0;
+ }
+
+ return result;
+}
+
+} // end private namespace
+
+//------------------------------------------------------------------------------
+
+MacOSXBackend::MacOSXBackend()
{
}
@@ -54,46 +173,282 @@ MacOSXBackend::~MacOSXBackend(void)
//------------------------------------------------------------------------------
-MacOSXBackend* MacOSXBackend::createInstance(const uno::Reference<uno::XComponentContext>& xContext)
+MacOSXBackend* MacOSXBackend::createInstance()
{
- return new MacOSXBackend(xContext);
+ return new MacOSXBackend;
}
// ---------------------------------------------------------------------------------------
-uno::Reference<backend::XLayer> SAL_CALL MacOSXBackend::getLayer(const rtl::OUString& aComponent, const rtl::OUString& /*aTimestamp*/)
- throw (backend::BackendAccessException, lang::IllegalArgumentException)
-{
- if( aComponent.equalsAscii( MACBE_INET_COMPONENT ) )
- {
- if( ! m_xSystemLayer.is() )
- m_xSystemLayer = new MacOSXLayer( m_xContext );
+rtl::OUString CFStringToOUString(const CFStringRef sOrig) {
+ CFRetain(sOrig);
- return m_xSystemLayer;
- }
- else if( aComponent.equalsAscii( MACBE_PATHS_COMPONENT ) )
- {
- if( ! m_xPathLayer.is() )
- m_xPathLayer = new MacOSXPathLayer( m_xContext );
- return m_xPathLayer;
- }
+ CFIndex nStringLen = CFStringGetLength(sOrig)+1;
+
+ // Allocate a c string buffer
+ char sBuffer[nStringLen];
+
+ CFStringGetCString(sOrig, sBuffer, nStringLen, kCFStringEncodingASCII);
+
+ CFRelease(sOrig);
- return uno::Reference<backend::XLayer>();
+ return rtl::OUString::createFromAscii((sal_Char*)sBuffer);
}
-//------------------------------------------------------------------------------
+rtl::OUString GetOUString( NSString* pStr )
+{
+ if( ! pStr )
+ return rtl::OUString();
+ int nLen = [pStr length];
+ if( nLen == 0 )
+ return rtl::OUString();
+
+ rtl::OUStringBuffer aBuf( nLen+1 );
+ aBuf.setLength( nLen );
+ [pStr getCharacters: const_cast<sal_Unicode*>(aBuf.getStr())];
+ return aBuf.makeStringAndClear();
+}
-uno::Reference<backend::XUpdatableLayer> SAL_CALL
- MacOSXBackend::getUpdatableLayer(const rtl::OUString& /*aComponent*/)
- throw (backend::BackendAccessException,lang::NoSupportException,
- lang::IllegalArgumentException)
+void MacOSXBackend::setPropertyValue(
+ rtl::OUString const &, css::uno::Any const &)
+ throw (
+ css::beans::UnknownPropertyException, css::beans::PropertyVetoException,
+ css::lang::IllegalArgumentException, css::lang::WrappedTargetException,
+ css::uno::RuntimeException)
{
- throw lang::NoSupportException(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
- "MacOSXBackend: No Update Operation allowed, Read Only access") ),
- *this);
+ throw css::lang::IllegalArgumentException(
+ rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM("setPropertyValue not supported")),
+ static_cast< cppu::OWeakObject * >(this), -1);
+}
- return NULL;
+css::uno::Any MacOSXBackend::getPropertyValue(
+ rtl::OUString const & PropertyName)
+ throw (
+ css::beans::UnknownPropertyException, css::lang::WrappedTargetException,
+ css::uno::RuntimeException)
+{
+ if (PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("WorkPathVariable")))
+ {
+ rtl::OUString aDocDir;
+ NSArray* pPaths = NSSearchPathForDirectoriesInDomains( NSDocumentDirectory, NSUserDomainMask, true );
+ if( pPaths && [pPaths count] > 0 )
+ {
+ aDocDir = GetOUString( [pPaths objectAtIndex: 0] );
+
+ rtl::OUString aDocURL;
+ if( aDocDir.getLength() > 0 &&
+ osl_getFileURLFromSystemPath( aDocDir.pData, &aDocURL.pData ) == osl_File_E_None )
+ {
+ return css::uno::makeAny(
+ css::beans::Optional< css::uno::Any >(
+ true, css::uno::makeAny( aDocURL ) ) );
+ }
+ else
+ {
+ OSL_TRACE( "user documents list contains empty file path or conversion failed" );
+ }
+ }
+ else
+ {
+ OSL_TRACE( "Got nil or empty list of user document directories" );
+ }
+ return css::uno::makeAny(css::beans::Optional< css::uno::Any >());
+ } else if (PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ooInetFTPProxyName")))
+ {
+ ProxyEntry aFtpProxy;
+
+ char host[MAXHOSTNAMELEN];
+ UInt16 port;
+ bool retVal;
+
+ retVal = GetProxySetting(sFTP, host, 100, &port);
+
+ if (retVal)
+ {
+ aFtpProxy.Server = rtl::OUString::createFromAscii( host );
+ }
+
+ // ftp proxy name
+ if( aFtpProxy.Server.getLength() > 0 )
+ {
+ return css::uno::makeAny(
+ css::beans::Optional< css::uno::Any >(
+ true, uno::makeAny( aFtpProxy.Server ) ) );
+ }
+ return css::uno::makeAny(css::beans::Optional< css::uno::Any >());
+ } else if (PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ooInetFTPProxyPort")))
+ {
+ ProxyEntry aFtpProxy;
+
+ char host[MAXHOSTNAMELEN];
+ UInt16 port;
+ bool retVal;
+
+ retVal = GetProxySetting(sFTP, host, 100, &port);
+
+ if (retVal)
+ {
+ aFtpProxy.Port = port;
+ }
+
+ // ftp proxy port
+ if( aFtpProxy.Port > 0 )
+ {
+ return css::uno::makeAny(
+ css::beans::Optional< css::uno::Any >(
+ true, uno::makeAny( aFtpProxy.Port ) ) );
+ }
+ return css::uno::makeAny(css::beans::Optional< css::uno::Any >());
+ } else if (PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ooInetHTTPProxyName")))
+ {
+ ProxyEntry aHttpProxy;
+
+ char host[MAXHOSTNAMELEN];
+ UInt16 port;
+ bool retVal;
+
+ retVal = GetProxySetting(sHTTP, host, 100, &port);
+
+ if (retVal)
+ {
+ aHttpProxy.Server = rtl::OUString::createFromAscii( host );
+ }
+
+ // http proxy name
+ if( aHttpProxy.Server.getLength() > 0 )
+ {
+ return css::uno::makeAny(
+ css::beans::Optional< css::uno::Any >(
+ true, uno::makeAny( aHttpProxy.Server ) ) );
+ }
+ return css::uno::makeAny(css::beans::Optional< css::uno::Any >());
+ } else if (PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ooInetHTTPProxyPort")))
+ {
+ ProxyEntry aHttpProxy;
+
+ char host[MAXHOSTNAMELEN];
+ UInt16 port;
+ bool retVal;
+
+ retVal = GetProxySetting(sHTTP, host, 100, &port);
+
+ if (retVal)
+ {
+ aHttpProxy.Port = port;
+ }
+
+ // http proxy port
+ if( aHttpProxy.Port > 0 )
+ {
+ return css::uno::makeAny(
+ css::beans::Optional< css::uno::Any >(
+ true, uno::makeAny( aHttpProxy.Port ) ) );
+ }
+ return css::uno::makeAny(css::beans::Optional< css::uno::Any >());
+ } else if (PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ooInetHTTPSProxyName")))
+ {
+ ProxyEntry aHttpsProxy;
+
+ char host[MAXHOSTNAMELEN];
+ UInt16 port;
+ bool retVal;
+
+ retVal = GetProxySetting(sHTTPS, host, 100, &port);
+
+ if (retVal)
+ {
+ aHttpsProxy.Server = rtl::OUString::createFromAscii( host );
+ }
+
+ // https proxy name
+ if( aHttpsProxy.Server.getLength() > 0 )
+ {
+ return css::uno::makeAny(
+ css::beans::Optional< css::uno::Any >(
+ true, uno::makeAny( aHttpsProxy.Server ) ) );
+ }
+ return css::uno::makeAny(css::beans::Optional< css::uno::Any >());
+ } else if (PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ooInetHTTPSProxyPort")))
+ {
+ ProxyEntry aHttpsProxy;
+
+ char host[MAXHOSTNAMELEN];
+ UInt16 port;
+ bool retVal;
+
+ retVal = GetProxySetting(sHTTPS, host, 100, &port);
+
+ if (retVal)
+ {
+ aHttpsProxy.Port = port;
+ }
+
+ // https proxy port
+ if( aHttpsProxy.Port > 0 )
+ {
+ return css::uno::makeAny(
+ css::beans::Optional< css::uno::Any >(
+ true, uno::makeAny( aHttpsProxy.Port ) ) );
+ }
+ return css::uno::makeAny(css::beans::Optional< css::uno::Any >());
+ } else if (PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ooInetProxyType")))
+ {
+ // override default for ProxyType, which is "0" meaning "No proxies".
+ sal_Int32 nProperties = 1;
+ return css::uno::makeAny(
+ css::beans::Optional< css::uno::Any >(
+ true, uno::makeAny( nProperties ) ) );
+ } else if (PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ooInetNoProxy")))
+ {
+ rtl::OUString aProxyBypassList;
+
+ CFArrayRef rExceptionsList;
+ CFDictionaryRef rProxyDict = SCDynamicStoreCopyProxies(NULL);
+
+ if (!rProxyDict)
+ rExceptionsList = false;
+ else
+ rExceptionsList = (CFArrayRef) CFDictionaryGetValue(rProxyDict, kSCPropNetProxiesExceptionsList);
+
+ if (rExceptionsList)
+ {
+ for (CFIndex idx = 0; idx < CFArrayGetCount(rExceptionsList); idx++)
+ {
+ CFStringRef rException = (CFStringRef) CFArrayGetValueAtIndex(rExceptionsList, idx);
+
+ if (idx>0)
+ aProxyBypassList += rtl::OUString::createFromAscii( ";" );
+
+ aProxyBypassList += CFStringToOUString(rException);
+ }
+ }
+
+ if (rProxyDict)
+ CFRelease(rProxyDict);
+
+ // fill proxy bypass list
+ if( aProxyBypassList.getLength() > 0 )
+ {
+ return css::uno::makeAny(
+ css::beans::Optional< css::uno::Any >(
+ true,
+ uno::makeAny( aProxyBypassList.replace( SPACE, SEMI_COLON ) ) ) );
+ }
+ return css::uno::makeAny(css::beans::Optional< css::uno::Any >());
+ } else {
+ throw css::beans::UnknownPropertyException(
+ PropertyName, static_cast< cppu::OWeakObject * >(this));
+ }
}
//------------------------------------------------------------------------------
@@ -115,9 +470,8 @@ rtl::OUString SAL_CALL MacOSXBackend::getImplementationName(void)
uno::Sequence<rtl::OUString> SAL_CALL MacOSXBackend::getBackendServiceNames(void)
{
- uno::Sequence<rtl::OUString> aServiceNameList(2);
+ uno::Sequence<rtl::OUString> aServiceNameList(1);
aServiceNameList[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.backend.MacOSXBackend"));
- aServiceNameList[1] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.backend.PlatformBackend"));
return aServiceNameList;
}
@@ -143,15 +497,3 @@ uno::Sequence<rtl::OUString> SAL_CALL MacOSXBackend::getSupportedServiceNames(vo
{
return getBackendServiceNames();
}
-
-// ---------------------------------------------------------------------------------------
-
-uno::Sequence<rtl::OUString> SAL_CALL MacOSXBackend::getSupportedComponents(void)
-{
- uno::Sequence<rtl::OUString> aSupportedComponentList(2);
- aSupportedComponentList[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( MACBE_INET_COMPONENT ) );
- aSupportedComponentList[1] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( MACBE_PATHS_COMPONENT ) );
-
- return aSupportedComponentList;
-}
-
diff --git a/shell/source/backends/macbe/macbackend.hxx b/shell/source/backends/macbe/macbackend.hxx
index c25fe4296c0e..de4f9eee1ff6 100644
--- a/shell/source/backends/macbe/macbackend.hxx
+++ b/shell/source/backends/macbe/macbackend.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: macbackend.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -31,10 +28,8 @@
#ifndef _MACBACKEND_HXX_
#define _MACBACKEND_HXX_
-#include <com/sun/star/configuration/backend/XSingleLayerStratum.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/configuration/backend/XBackendChangesNotifier.hpp>
#include <cppuhelper/implbase2.hxx>
#include <rtl/string.hxx>
@@ -44,18 +39,13 @@
namespace css = com::sun::star;
namespace uno = css::uno;
namespace lang = css::lang;
-namespace backend = css::configuration::backend;
-
-/**
- Implements the SingleLayerStratum service.
- */
-class MacOSXBackend : public ::cppu::WeakImplHelper2 <backend::XSingleLayerStratum, lang::XServiceInfo >
+class MacOSXBackend : public ::cppu::WeakImplHelper2 <css::beans::XPropertySet, lang::XServiceInfo >
{
public:
- static MacOSXBackend* createInstance(const uno::Reference<uno::XComponentContext>& xContext);
+ static MacOSXBackend* createInstance();
// XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName()
@@ -81,19 +71,56 @@ public:
*/
static uno::Sequence<rtl::OUString> SAL_CALL getBackendServiceNames(void);
- /**
- Provides the supported component nodes
-
- @return supported component nodes
- */
- static uno::Sequence<rtl::OUString> SAL_CALL getSupportedComponents(void);
-
- // XSingleLayerStratum
- virtual uno::Reference<backend::XLayer> SAL_CALL getLayer(const rtl::OUString& aLayerId, const rtl::OUString& aTimestamp)
- throw (backend::BackendAccessException, lang::IllegalArgumentException);
-
- virtual uno::Reference<backend::XUpdatableLayer> SAL_CALL getUpdatableLayer(const rtl::OUString& aLayerId)
- throw (backend::BackendAccessException, lang::NoSupportException, lang::IllegalArgumentException);
+ // XPropertySet
+ virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
+ getPropertySetInfo() throw (css::uno::RuntimeException)
+ { return css::uno::Reference< css::beans::XPropertySetInfo >(); }
+
+ virtual void SAL_CALL setPropertyValue(
+ rtl::OUString const &, css::uno::Any const &)
+ throw (
+ css::beans::UnknownPropertyException,
+ css::beans::PropertyVetoException,
+ css::lang::IllegalArgumentException,
+ css::lang::WrappedTargetException, css::uno::RuntimeException);
+
+ virtual css::uno::Any SAL_CALL getPropertyValue(
+ rtl::OUString const & PropertyName)
+ throw (
+ css::beans::UnknownPropertyException,
+ css::lang::WrappedTargetException, css::uno::RuntimeException);
+
+ virtual void SAL_CALL addPropertyChangeListener(
+ rtl::OUString const &,
+ css::uno::Reference< css::beans::XPropertyChangeListener > const &)
+ throw (
+ css::beans::UnknownPropertyException,
+ css::lang::WrappedTargetException, css::uno::RuntimeException)
+ {}
+
+ virtual void SAL_CALL removePropertyChangeListener(
+ rtl::OUString const &,
+ css::uno::Reference< css::beans::XPropertyChangeListener > const &)
+ throw (
+ css::beans::UnknownPropertyException,
+ css::lang::WrappedTargetException, css::uno::RuntimeException)
+ {}
+
+ virtual void SAL_CALL addVetoableChangeListener(
+ rtl::OUString const &,
+ css::uno::Reference< css::beans::XVetoableChangeListener > const &)
+ throw (
+ css::beans::UnknownPropertyException,
+ css::lang::WrappedTargetException, css::uno::RuntimeException)
+ {}
+
+ virtual void SAL_CALL removeVetoableChangeListener(
+ rtl::OUString const &,
+ css::uno::Reference< css::beans::XVetoableChangeListener > const &)
+ throw (
+ css::beans::UnknownPropertyException,
+ css::lang::WrappedTargetException, css::uno::RuntimeException)
+ {}
protected:
@@ -102,18 +129,10 @@ protected:
@param xContext component context
*/
- MacOSXBackend(const uno::Reference<uno::XComponentContext>& xContext)
- throw (backend::BackendAccessException);
+ MacOSXBackend();
/** Destructor */
~MacOSXBackend(void);
-
-private:
-
- uno::Reference<uno::XComponentContext> m_xContext;
- uno::Reference<backend::XLayer> m_xSystemLayer;
- uno::Reference<backend::XLayer> m_xPathLayer;
-
};
#endif // _MACBACKEND_HXX_
diff --git a/shell/source/backends/macbe/macbe.xml b/shell/source/backends/macbe/macbe.xml
index 85854250cfe3..7cee5bb14de5 100644
--- a/shell/source/backends/macbe/macbe.xml
+++ b/shell/source/backends/macbe/macbe.xml
@@ -10,7 +10,6 @@
<language>c++</language>
<status value="beta"/>
<supported-service>com.sun.star.comp.configuration.backend.MacOSXBackend</supported-service>
- <supported-service>com.sun.star.comp.configuration.backend.PlatformBackend</supported-service>
<service-dependency>...</service-dependency>
<type>com.sun.star.configuration.backend.XBackendChangesListener</type>
<type>com.sun.star.configuration.backend.XBackendChangesNotifier</type>
diff --git a/shell/source/backends/macbe/macbecdef.cxx b/shell/source/backends/macbe/macbecdef.cxx
index 22698eb91ec5..18cf2806c16b 100644
--- a/shell/source/backends/macbe/macbecdef.cxx
+++ b/shell/source/backends/macbe/macbecdef.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: macbecdef.cxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -42,14 +39,13 @@
namespace css = com::sun::star;
namespace uno = css::uno;
namespace lang = css::lang;
-namespace backend = css::configuration::backend;
//------------------------------------------------------------------------------
static uno::Reference<uno::XInterface> SAL_CALL createMacOSXBackend(
- const uno::Reference<uno::XComponentContext>& xContext)
+ const uno::Reference<uno::XComponentContext>&)
{
- return * MacOSXBackend::createInstance(xContext);
+ return * MacOSXBackend::createInstance();
}
//------------------------------------------------------------------------------
@@ -77,41 +73,9 @@ extern "C" void SAL_CALL component_getImplementationEnvironment(
//------------------------------------------------------------------------------
-extern "C" sal_Bool SAL_CALL component_writeInfo(void * /*pServiceManager*/, void *pRegistryKey) {
-
- using namespace ::com::sun::star::registry;
- if (pRegistryKey)
- {
- try
- {
- uno::Reference< XRegistryKey > xImplKey = static_cast< XRegistryKey* >( pRegistryKey )->createKey(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) + MacOSXBackend::getBackendName()
- );
-
- // Register associated service names
- uno::Reference< XRegistryKey > xServicesKey = xImplKey->createKey(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES") )
- );
-
- uno::Sequence<rtl::OUString> sServiceNames = MacOSXBackend::getBackendServiceNames();
- for (sal_Int32 i = 0; i < sServiceNames.getLength(); ++ i)
- xServicesKey->createKey(sServiceNames[i]);
-
- // Register supported components
- uno::Reference<XRegistryKey> xComponentKey = xImplKey->createKey(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/DATA/SupportedComponents") )
- );
-
- xComponentKey->setAsciiListValue( MacOSXBackend::getSupportedComponents() );
-
- return sal_True;
- }
- catch( InvalidRegistryException& )
- {
- OSL_ENSURE(sal_False, "InvalidRegistryException caught");
- }
- }
- return sal_False;
+extern "C" sal_Bool SAL_CALL component_writeInfo(void * pServiceManager, void *pRegistryKey) {
+ return cppu::component_writeInfoHelper(
+ pServiceManager, pRegistryKey, kImplementations_entries);
}
//------------------------------------------------------------------------------
diff --git a/shell/source/backends/macbe/macbelayer.cxx b/shell/source/backends/macbe/macbelayer.cxx
deleted file mode 100644
index ea0d3cb63fb7..000000000000
--- a/shell/source/backends/macbe/macbelayer.cxx
+++ /dev/null
@@ -1,443 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: macbelayer.cxx,v $
- * $Revision: 1.6 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_shell.hxx"
-
-// For MAXHOSTNAMELEN constant
-#include <sys/param.h>
-
-#include <premac.h>
-#include <SystemConfiguration/SystemConfiguration.h>
-#include <Foundation/NSPathUtilities.h>
-#include <postmac.h>
-
-#include "macbelayer.hxx"
-
-#include "rtl/ustrbuf.hxx"
-#include "osl/file.h"
-
-#define SPACE ' '
-#define SEMI_COLON ';'
-
-typedef struct
-{
- rtl::OUString Server;
- sal_Int32 Port;
-} ProxyEntry;
-
-typedef enum {
- sHTTP,
- sHTTPS,
- sFTP
-} ServiceType;
-
-//------------------------------------------------------------------------
-// helper functions
-//------------------------------------------------------------------------
-
-namespace // private
-{
-
-/*
- * Returns current proxy settings for selected service type (HTTP or
- * FTP) as a C string (in the buffer specified by host and hostSize)
- * and a port number.
- */
-
-bool GetProxySetting(ServiceType sType, char *host, size_t hostSize, UInt16 *port)
-{
- bool result;
- CFDictionaryRef proxyDict;
- CFNumberRef enableNum;
- int enable;
- CFStringRef hostStr;
- CFNumberRef portNum;
- int portInt;
-
- proxyDict = SCDynamicStoreCopyProxies(NULL);
-
- if (!proxyDict)
- return false;
-
- CFStringRef proxiesEnable;
- CFStringRef proxiesProxy;
- CFStringRef proxiesPort;
-
- switch ( sType )
- {
- case sHTTP : proxiesEnable = kSCPropNetProxiesHTTPEnable;
- proxiesProxy = kSCPropNetProxiesHTTPProxy;
- proxiesPort = kSCPropNetProxiesHTTPPort;
- break;
- case sHTTPS: proxiesEnable = kSCPropNetProxiesHTTPSEnable;
- proxiesProxy = kSCPropNetProxiesHTTPSProxy;
- proxiesPort = kSCPropNetProxiesHTTPSPort;
- break;
- default: proxiesEnable = kSCPropNetProxiesFTPEnable;
- proxiesProxy = kSCPropNetProxiesFTPProxy;
- proxiesPort = kSCPropNetProxiesFTPPort;
- break;
- }
- // Proxy enabled?
- enableNum = (CFNumberRef) CFDictionaryGetValue( proxyDict,
- proxiesEnable );
-
- result = (enableNum != NULL) && (CFGetTypeID(enableNum) == CFNumberGetTypeID());
-
- if (result)
- result = CFNumberGetValue(enableNum, kCFNumberIntType, &enable) && (enable != 0);
-
- // Proxy enabled -> get hostname
- if (result)
- {
- hostStr = (CFStringRef) CFDictionaryGetValue( proxyDict,
- proxiesProxy );
-
- result = (hostStr != NULL) && (CFGetTypeID(hostStr) == CFStringGetTypeID());
- }
-
- if (result)
- result = CFStringGetCString(hostStr, host, (CFIndex) hostSize, kCFStringEncodingASCII);
-
- // Get proxy port
- if (result)
- {
- portNum = (CFNumberRef) CFDictionaryGetValue( proxyDict,
- proxiesPort );
-
- result = (portNum != NULL) && (CFGetTypeID(portNum) == CFNumberGetTypeID());
- }
- else
- {
- CFRelease(proxyDict);
- return false;
- }
-
- if (result)
- result = CFNumberGetValue(portNum, kCFNumberIntType, &portInt);
-
- if (result)
- *port = (UInt16) portInt;
-
- if (proxyDict)
- CFRelease(proxyDict);
-
- if (!result)
- {
- *host = 0;
- *port = 0;
- }
-
- return result;
-}
-
-} // end private namespace
-
-//------------------------------------------------------------------------------
-
-MacOSXLayer::MacOSXLayer( const uno::Reference<uno::XComponentContext>& xContext)
-{
- //Create instance of LayerContentDescriber Service
- rtl::OUString const k_sLayerDescriberService(
- RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.configuration.backend.LayerDescriber"));
-
- typedef uno::Reference<backend::XLayerContentDescriber> LayerDescriber;
- uno::Reference< lang::XMultiComponentFactory > xServiceManager = xContext->getServiceManager();
- if( xServiceManager.is() )
- {
- m_xLayerContentDescriber = LayerDescriber::query(
- xServiceManager->createInstanceWithContext(k_sLayerDescriberService, xContext));
- }
- else
- {
- OSL_TRACE("Could not retrieve ServiceManager");
- }
-
-}
-
-//------------------------------------------------------------------------------
-
-rtl::OUString CFStringToOUString(const CFStringRef sOrig) {
- CFRetain(sOrig);
-
- CFIndex nStringLen = CFStringGetLength(sOrig)+1;
-
- // Allocate a c string buffer
- char sBuffer[nStringLen];
-
- CFStringGetCString(sOrig, sBuffer, nStringLen, kCFStringEncodingASCII);
-
- CFRelease(sOrig);
-
- return rtl::OUString::createFromAscii((sal_Char*)sBuffer);
-}
-
-void SAL_CALL MacOSXLayer::readData(
- const uno::Reference<backend::XLayerHandler>& xHandler)
- throw ( backend::MalformedDataException,
- lang::NullPointerException,
- lang::WrappedTargetException,
- uno::RuntimeException)
-{
-
- if (m_xLayerContentDescriber.is())
- {
- rtl::OUString aProxyBypassList;
-
- CFArrayRef rExceptionsList;
- CFDictionaryRef rProxyDict = SCDynamicStoreCopyProxies(NULL);
-
- if (!rProxyDict)
- rExceptionsList = false;
- else
- rExceptionsList = (CFArrayRef) CFDictionaryGetValue(rProxyDict, kSCPropNetProxiesExceptionsList);
-
- if (rExceptionsList)
- {
- for (CFIndex idx = 0; idx < CFArrayGetCount(rExceptionsList); idx++)
- {
- CFStringRef rException = (CFStringRef) CFArrayGetValueAtIndex(rExceptionsList, idx);
-
- if (idx>0)
- aProxyBypassList += rtl::OUString::createFromAscii( ";" );
-
- aProxyBypassList += CFStringToOUString(rException);
- }
- }
-
- if (rProxyDict)
- CFRelease(rProxyDict);
-
- // override default for ProxyType, which is "0" meaning "No proxies".
- // CAUTION: if you add properties, please increase the sequence size here !
- uno::Sequence<backend::PropertyInfo> aPropInfoList(8);
- sal_Int32 nProperties = 1;
-
- aPropInfoList[0].Name = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Inet/Settings/ooInetProxyType") );
- aPropInfoList[0].Type = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "int" ) );
- aPropInfoList[0].Protected = sal_False;
- aPropInfoList[0].Value = uno::makeAny( nProperties );
-
- // fill proxy bypass list
- if( aProxyBypassList.getLength() > 0 )
- {
- aPropInfoList[nProperties].Name = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Inet/Settings/ooInetNoProxy") );
- aPropInfoList[nProperties].Type = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "string" ) );
- aPropInfoList[nProperties].Protected = sal_False;
- aPropInfoList[nProperties++].Value = uno::makeAny( aProxyBypassList.replace( SPACE, SEMI_COLON ) );
- }
-
- ProxyEntry aHttpProxy;
- ProxyEntry aHttpsProxy;
- ProxyEntry aFtpProxy;
-
- char host[MAXHOSTNAMELEN];
- UInt16 port;
- bool retVal;
-
- retVal = GetProxySetting(sHTTP, host, 100, &port);
-
- if (retVal)
- {
- aHttpProxy.Server = rtl::OUString::createFromAscii( host );
- aHttpProxy.Port = port;
- }
-
- retVal = GetProxySetting(sHTTPS, host, 100, &port);
-
- if (retVal)
- {
- aHttpsProxy.Server = rtl::OUString::createFromAscii( host );
- aHttpsProxy.Port = port;
- }
-
- retVal = GetProxySetting(sFTP, host, 100, &port);
-
- if (retVal)
- {
- aFtpProxy.Server = rtl::OUString::createFromAscii( host );
- aFtpProxy.Port = port;
- }
-
- // http proxy name
- if( aHttpProxy.Server.getLength() > 0 )
- {
- aPropInfoList[nProperties].Name = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Inet/Settings/ooInetHTTPProxyName") );
- aPropInfoList[nProperties].Type = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "string" ) );
- aPropInfoList[nProperties].Protected = sal_False;
- aPropInfoList[nProperties++].Value = uno::makeAny( aHttpProxy.Server );
- }
-
- // http proxy port
- if( aHttpProxy.Port > 0 )
- {
- aPropInfoList[nProperties].Name = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Inet/Settings/ooInetHTTPProxyPort") );
- aPropInfoList[nProperties].Type = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "int" ) );
- aPropInfoList[nProperties].Protected = sal_False;
- aPropInfoList[nProperties++].Value = uno::makeAny( aHttpProxy.Port );
- }
-
- // https proxy name
- if( aHttpsProxy.Server.getLength() > 0 )
- {
- aPropInfoList[nProperties].Name = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Inet/Settings/ooInetHTTPSProxyName") );
- aPropInfoList[nProperties].Type = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "string" ) );
- aPropInfoList[nProperties].Protected = sal_False;
- aPropInfoList[nProperties++].Value = uno::makeAny( aHttpsProxy.Server );
- }
-
- // https proxy port
- if( aHttpsProxy.Port > 0 )
- {
- aPropInfoList[nProperties].Name = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Inet/Settings/ooInetHTTPSProxyPort") );
- aPropInfoList[nProperties].Type = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "int" ) );
- aPropInfoList[nProperties].Protected = sal_False;
- aPropInfoList[nProperties++].Value = uno::makeAny( aHttpsProxy.Port );
- }
-
- // ftp proxy name
- if( aFtpProxy.Server.getLength() > 0 )
- {
- aPropInfoList[nProperties].Name = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Inet/Settings/ooInetFTPProxyName") );
- aPropInfoList[nProperties].Type = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "string" ) );
- aPropInfoList[nProperties].Protected = sal_False;
- aPropInfoList[nProperties++].Value = uno::makeAny( aFtpProxy.Server );
- }
-
- // ftp proxy port
- if( aFtpProxy.Port > 0 )
- {
- aPropInfoList[nProperties].Name = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Inet/Settings/ooInetFTPProxyPort") );
- aPropInfoList[nProperties].Type = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "int" ) );
- aPropInfoList[nProperties].Protected = sal_False;
- aPropInfoList[nProperties++].Value = uno::makeAny( aFtpProxy.Port );
- }
-
- // resize the property info list appropriately
- aPropInfoList.realloc(nProperties);
-
- m_xLayerContentDescriber->describeLayer(xHandler, aPropInfoList);
- }
- else
- {
- OSL_TRACE("Could not create com.sun.star.configuration.backend.LayerContentDescriber Service");
- }
-}
-
-//------------------------------------------------------------------------------
-
-rtl::OUString SAL_CALL MacOSXLayer::getTimestamp(void)
- throw (uno::RuntimeException)
-{
- // FIXME: Always new timestamp!?
- rtl::OUString aTimestamp = rtl::OUString::valueOf( time(NULL) );
-
- return aTimestamp;
-}
-
-//------------------------------------------------------------------------------
-
-rtl::OUString GetOUString( NSString* pStr )
-{
- if( ! pStr )
- return rtl::OUString();
- int nLen = [pStr length];
- if( nLen == 0 )
- return rtl::OUString();
-
- rtl::OUStringBuffer aBuf( nLen+1 );
- aBuf.setLength( nLen );
- [pStr getCharacters: const_cast<sal_Unicode*>(aBuf.getStr())];
- return aBuf.makeStringAndClear();
-}
-
-void SAL_CALL MacOSXPathLayer::readData(
- const uno::Reference<backend::XLayerHandler>& i_xHandler)
- throw ( backend::MalformedDataException,
- lang::NullPointerException,
- lang::WrappedTargetException,
- uno::RuntimeException)
-{
- if (m_xLayerContentDescriber.is())
- {
- rtl::OUString aDocDir;
- NSArray* pPaths = NSSearchPathForDirectoriesInDomains( NSDocumentDirectory, NSUserDomainMask, true );
- if( pPaths && [pPaths count] > 0 )
- {
- aDocDir = GetOUString( [pPaths objectAtIndex: 0] );
-
- rtl::OUString aDocURL;
- if( aDocDir.getLength() > 0 &&
- osl_getFileURLFromSystemPath( aDocDir.pData, &aDocURL.pData ) == osl_File_E_None )
- {
- uno::Sequence<backend::PropertyInfo> aPropInfoList(1);
-
- aPropInfoList[0].Name = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Office.Paths/Variables/Work" ) );
- aPropInfoList[0].Type = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "string" ) );
- aPropInfoList[0].Protected = sal_False;
- aPropInfoList[0].Value <<= aDocURL;
-
- m_xLayerContentDescriber->describeLayer(i_xHandler, aPropInfoList);
- }
- else
- {
- OSL_TRACE( "user documents list contains empty file path or conversion failed" );
- }
- }
- else
- {
- OSL_TRACE( "Got nil or empty list of user document directories" );
- }
- }
- else
- {
- OSL_TRACE("Could not create com.sun.star.configuration.backend.LayerContentDescriber Service");
- }
-}
-
diff --git a/shell/source/backends/macbe/macbelayer.hxx b/shell/source/backends/macbe/macbelayer.hxx
deleted file mode 100644
index a1f27148d1a3..000000000000
--- a/shell/source/backends/macbe/macbelayer.hxx
+++ /dev/null
@@ -1,104 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: macbelayer.hxx,v $
- * $Revision: 1.4 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _MACBELAYER_HXX_
-#define _MACBELAYER_HXX_
-
-#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/configuration/backend/XLayer.hpp>
-#include <com/sun/star/configuration/backend/PropertyInfo.hpp>
-#include <com/sun/star/configuration/backend/BackendAccessException.hpp>
-
-#ifndef _COM_SUN_STAR_CONFIGURATION_BACKEND_XLAYERCONTENTDESCIBER_HPP_
-#include <com/sun/star/configuration/backend/XLayerContentDescriber.hpp>
-#endif
-#include <com/sun/star/util/XTimeStamped.hpp>
-#include <com/sun/star/uno/Sequence.hxx>
-#include <cppuhelper/implbase2.hxx>
-
-namespace css = com::sun::star;
-namespace uno = css::uno;
-namespace lang = css::lang;
-namespace backend = css::configuration::backend;
-namespace util = css::util;
-
-/**
- Implementation of the XLayer interfaces for fixed values
- */
-
-class MacOSXLayer : public cppu::WeakImplHelper2<backend::XLayer, util::XTimeStamped>
-{
-public:
-
- /**
- Constructor given the requested component name
-
- @param aTimestamp timestamp indicating last modifictaion
- */
- MacOSXLayer(const uno::Reference<uno::XComponentContext>& xContext);
-
- /** Destructor */
- virtual ~MacOSXLayer(void) {}
-
- // XLayer
- virtual void SAL_CALL readData(const uno::Reference<backend::XLayerHandler>& xHandler)
- throw ( backend::MalformedDataException,
- lang::NullPointerException,
- lang::WrappedTargetException,
- uno::RuntimeException);
-
- // XTimeStamped
- virtual rtl::OUString SAL_CALL getTimestamp(void)
- throw (uno::RuntimeException);
-
-protected:
-
- rtl::OUString m_aComponent;
-
- uno::Reference<backend::XLayerContentDescriber> m_xLayerContentDescriber;
-
-};
-
-class MacOSXPathLayer : public MacOSXLayer
-{
- public:
- MacOSXPathLayer(const uno::Reference<uno::XComponentContext>& i_xContext) :
- MacOSXLayer( i_xContext ) {}
- virtual ~MacOSXPathLayer() {}
-
- // XLayer
- virtual void SAL_CALL readData(const uno::Reference<backend::XLayerHandler>& i_xHandler)
- throw ( backend::MalformedDataException,
- lang::NullPointerException,
- lang::WrappedTargetException,
- uno::RuntimeException);
-};
-
-#endif // _MACBELAYER_HXX_
diff --git a/shell/source/backends/macbe/makefile.mk b/shell/source/backends/macbe/makefile.mk
index c8f6891d6f87..c3a58ec9f5c6 100644
--- a/shell/source/backends/macbe/makefile.mk
+++ b/shell/source/backends/macbe/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.4 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
@@ -58,8 +54,7 @@ CFLAGSCXX+=$(OBJCXXFLAGS)
SLOFILES= \
$(SLO)$/macbecdef.obj \
- $(SLO)$/macbackend.obj \
- $(SLO)$/macbelayer.obj
+ $(SLO)$/macbackend.obj
SHL1TARGET=$(TARGET)1.uno
SHL1OBJS=$(SLOFILES)
@@ -72,7 +67,7 @@ SHL1STDLIBS= \
$(SALLIB) \
-framework Cocoa -framework SystemConfiguration
-SHL1VERSIONMAP=exports.map
+SHL1VERSIONMAP=$(SOLARENV)/src/component.map
SHL1DEF=$(MISC)$/$(SHL1TARGET).def
DEF1NAME=$(SHL1TARGET)
diff --git a/shell/source/backends/wininetbe/exports.map b/shell/source/backends/wininetbe/exports.map
deleted file mode 100644
index ba501f9ae076..000000000000
--- a/shell/source/backends/wininetbe/exports.map
+++ /dev/null
@@ -1,10 +0,0 @@
-UDK_3_0_0 {
- global:
- GetVersionInfo;
- component_getImplementationEnvironment;
- component_getFactory;
- component_writeInfo;
-
- local:
- *;
-};
diff --git a/shell/source/backends/wininetbe/makefile.mk b/shell/source/backends/wininetbe/makefile.mk
index be43ecaded36..9f79fa706fbf 100644
--- a/shell/source/backends/wininetbe/makefile.mk
+++ b/shell/source/backends/wininetbe/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.5 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
@@ -50,9 +46,8 @@ DLLPRE =
SLOFILES=\
$(SLO)$/wininetbecdef.obj \
- $(SLO)$/wininetbackend.obj \
- $(SLO)$/wininetlayer.obj
-
+ $(SLO)$/wininetbackend.obj
+
SHL1TARGET=$(TARGET)1.uno
SHL1OBJS=$(SLOFILES)
SHL1DEF=$(MISC)$/$(SHL1TARGET).def
@@ -63,7 +58,7 @@ SHL1STDLIBS= \
$(CPPULIB) \
$(SALLIB)
-SHL1VERSIONMAP=exports.map
+SHL1VERSIONMAP=$(SOLARENV)/src/component.map
SHL1DEF=$(MISC)$/$(SHL1TARGET).def
DEF1NAME=$(SHL1TARGET)
diff --git a/shell/source/backends/wininetbe/wininetbackend.cxx b/shell/source/backends/wininetbe/wininetbackend.cxx
index 018560f4f762..af6f1036496d 100644
--- a/shell/source/backends/wininetbe/wininetbackend.cxx
+++ b/shell/source/backends/wininetbe/wininetbackend.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: wininetbackend.cxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -31,76 +28,332 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_shell.hxx"
+#include "rtl/ustrbuf.hxx"
+
#include "wininetbackend.hxx"
-#include "wininetlayer.hxx"
-#include <com/sun/star/configuration/backend/ComponentChangeEvent.hpp>
-#include <uno/current_context.hxx>
+
+#if defined _MSC_VER
+#pragma warning(push, 1)
+#endif
+#include <windows.h>
+#include <wininet.h>
+#include <sal/alloca.h>
+#if defined _MSC_VER
+#pragma warning(pop)
+#endif
#define WININET_DLL_NAME "wininet.dll"
+#define EQUAL_SIGN '='
+#define COLON ':'
+#define SPACE ' '
+#define SEMI_COLON ';'
-WinInetBackend::WinInetBackend(const uno::Reference<uno::XComponentContext>& xContext)
- throw (backend::BackendAccessException) :
- ::cppu::WeakImplHelper2 < backend::XSingleLayerStratum, lang::XServiceInfo > (),
- m_xContext(xContext)
-{
- m_hWinInetDll = LoadLibrary( WININET_DLL_NAME );
-}
+namespace {
-//------------------------------------------------------------------------------
+struct Library {
+ HMODULE module;
-WinInetBackend::~WinInetBackend(void)
-{
- if ( m_hWinInetDll )
- FreeLibrary( m_hWinInetDll );
-}
+ Library(HMODULE theModule): module(theModule) {}
-//------------------------------------------------------------------------------
+ ~Library() { if (module) FreeLibrary(module); }
+};
-WinInetBackend* WinInetBackend::createInstance(
- const uno::Reference<uno::XComponentContext>& xContext
-)
-{
- return new WinInetBackend(xContext);
}
-// ---------------------------------------------------------------------------------------
+typedef struct
+{
+ rtl::OUString Server;
+ rtl::OUString Port;
+} ProxyEntry;
+
+//------------------------------------------------------------------------
+// helper functions
+//------------------------------------------------------------------------
-uno::Reference<backend::XLayer> SAL_CALL WinInetBackend::getLayer(
- const rtl::OUString& aComponent, const rtl::OUString& /*aTimestamp*/)
- throw (backend::BackendAccessException, lang::IllegalArgumentException)
+namespace // private
{
+ ProxyEntry ReadProxyEntry(const rtl::OUString& aProxy, sal_Int32& i)
+ {
+ ProxyEntry aProxyEntry;
+
+ aProxyEntry.Server = aProxy.getToken( 0, COLON, i );
+ if ( i > -1 )
+ aProxyEntry.Port = aProxy.getToken( 0, COLON, i );
+
+ return aProxyEntry;
+ }
- if( aComponent.equals( getSupportedComponents()[0]) )
+ ProxyEntry FindProxyEntry(const rtl::OUString& aProxyList, const rtl::OUString& aType)
{
- if( ! m_xSystemLayer.is() && m_hWinInetDll )
+ sal_Int32 nIndex = 0;
+
+ do
{
- WinInetLayer::InternetQueryOption_Proc_T lpfnInternetQueryOption =
- reinterpret_cast< WinInetLayer::InternetQueryOption_Proc_T >(
- GetProcAddress( m_hWinInetDll, "InternetQueryOptionA" ) );
+ // get the next token, e.g. ftp=server:port
+ rtl::OUString nextToken = aProxyList.getToken( 0, SPACE, nIndex );
+
+ // split the next token again into the parts separated
+ // through '=', e.g. ftp=server:port -> ftp and server:port
+ sal_Int32 i = 0;
+ if( nextToken.indexOf( EQUAL_SIGN ) > -1 )
+ {
+ if( aType.equals( nextToken.getToken( 0, EQUAL_SIGN, i ) ) )
+ return ReadProxyEntry(nextToken, i);
+ }
+ else if( aType.getLength() == 0)
+ return ReadProxyEntry(nextToken, i);
+
+ } while ( nIndex >= 0 );
+
+ return ProxyEntry();
+ }
- if( lpfnInternetQueryOption )
- m_xSystemLayer = new WinInetLayer(lpfnInternetQueryOption, m_xContext);
- }
+} // end private namespace
- return m_xSystemLayer;
+//------------------------------------------------------------------------------
+
+WinInetBackend::WinInetBackend()
+{
+ Library hWinInetDll( LoadLibrary( WININET_DLL_NAME ) );
+ if( hWinInetDll.module )
+ {
+ typedef BOOL ( WINAPI *InternetQueryOption_Proc_T )( HINTERNET, DWORD, LPVOID, LPDWORD );
+
+ InternetQueryOption_Proc_T lpfnInternetQueryOption =
+ reinterpret_cast< InternetQueryOption_Proc_T >(
+ GetProcAddress( hWinInetDll.module, "InternetQueryOptionA" ) );
+ if (lpfnInternetQueryOption)
+ {
+ LPINTERNET_PROXY_INFO lpi = NULL;
+
+ // query for the neccessary space
+ DWORD dwLength = 0;
+ BOOL bRet = lpfnInternetQueryOption(
+ NULL,
+ INTERNET_OPTION_PROXY,
+ (LPVOID)lpi,
+ &dwLength );
+
+ // allocate sufficient space on the heap
+ // insufficient space on the heap results
+ // in a stack overflow exception, we assume
+ // this never happens, because of the relatively
+ // small amount of memory we need
+ // alloca is nice because it is fast and we don't
+ // have to free the allocated memory, it will be
+ // automatically done
+ lpi = reinterpret_cast< LPINTERNET_PROXY_INFO >(
+ alloca( dwLength ) );
+
+ bRet = lpfnInternetQueryOption(
+ NULL,
+ INTERNET_OPTION_PROXY,
+ (LPVOID)lpi,
+ &dwLength );
+
+ // if a proxy is disabled, InternetQueryOption returns
+ // an empty proxy list, so we don't have to check if
+ // proxy is enabled or not
+
+ rtl::OUString aProxyList = rtl::OUString::createFromAscii( lpi->lpszProxy );
+ rtl::OUString aProxyBypassList = rtl::OUString::createFromAscii( lpi->lpszProxyBypass );
+
+ // override default for ProxyType, which is "0" meaning "No proxies".
+ sal_Int32 nProperties = 1;
+
+ valueProxyType_.IsPresent = true;
+ valueProxyType_.Value <<= nProperties;
+
+ // fill proxy bypass list
+ if( aProxyBypassList.getLength() > 0 )
+ {
+ rtl::OUStringBuffer aReverseList;
+ sal_Int32 nIndex = 0;
+ do
+ {
+ rtl::OUString aToken = aProxyBypassList.getToken( 0, SPACE, nIndex );
+ if ( aProxyList.indexOf( aToken ) == -1 )
+ {
+ if ( aReverseList.getLength() )
+ {
+ aReverseList.insert( 0, sal_Unicode( SEMI_COLON ) );
+ aReverseList.insert( 0, aToken );
+ }
+ else
+ aReverseList = aToken;
+ }
+ }
+ while ( nIndex >= 0 );
+
+ aProxyBypassList = aReverseList.makeStringAndClear();
+
+ valueNoProxy_.IsPresent = true;
+ valueNoProxy_.Value <<= aProxyBypassList.replace( SPACE, SEMI_COLON );
+ }
+
+ if( aProxyList.getLength() > 0 )
+ {
+ //-------------------------------------------------
+ // this implementation follows the algorithm
+ // of the internet explorer
+ // if there are type-dependent proxy settings
+ // and type independent proxy settings in the
+ // registry the internet explorer chooses the
+ // type independent proxy for all settings
+ // e.g. imagine the following registry entry
+ // ftp=server:port;http=server:port;server:port
+ // the last token server:port is type independent
+ // so the ie chooses this proxy server
+
+ // if there is no port specified for a type independent
+ // server the ie uses the port of an http server if
+ // there is one and it has a port
+ //-------------------------------------------------
+
+ ProxyEntry aTypeIndepProxy = FindProxyEntry( aProxyList, rtl::OUString());
+ ProxyEntry aHttpProxy = FindProxyEntry( aProxyList, rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM( "http" ) ) );
+ ProxyEntry aHttpsProxy = FindProxyEntry( aProxyList, rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM( "https" ) ) );
+
+ ProxyEntry aFtpProxy = FindProxyEntry( aProxyList, rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM( "ftp" ) ) );
+
+ if( aTypeIndepProxy.Server.getLength() )
+ {
+ aHttpProxy.Server = aTypeIndepProxy.Server;
+ aHttpsProxy.Server = aTypeIndepProxy.Server;
+ aFtpProxy.Server = aTypeIndepProxy.Server;
+
+ if( aTypeIndepProxy.Port.getLength() )
+ {
+ aHttpProxy.Port = aTypeIndepProxy.Port;
+ aHttpsProxy.Port = aTypeIndepProxy.Port;
+ aFtpProxy.Port = aTypeIndepProxy.Port;
+ }
+ else
+ {
+ aFtpProxy.Port = aHttpProxy.Port;
+ aHttpsProxy.Port = aHttpProxy.Port;
+ }
+ }
+
+ // http proxy name
+ if( aHttpProxy.Server.getLength() > 0 )
+ {
+ valueHttpProxyName_.IsPresent = true;
+ valueHttpProxyName_.Value <<= aHttpProxy.Server;
+ }
+
+ // http proxy port
+ if( aHttpProxy.Port.getLength() > 0 )
+ {
+ valueHttpProxyPort_.IsPresent = true;
+ valueHttpProxyPort_.Value <<= aHttpProxy.Port.toInt32();
+ }
+
+ // https proxy name
+ if( aHttpsProxy.Server.getLength() > 0 )
+ {
+ valueHttpsProxyName_.IsPresent = true;
+ valueHttpsProxyName_.Value <<= aHttpsProxy.Server;
+ }
+
+ // https proxy port
+ if( aHttpsProxy.Port.getLength() > 0 )
+ {
+ valueHttpsProxyPort_.IsPresent = true;
+ valueHttpsProxyPort_.Value <<= aHttpsProxy.Port.toInt32();
+ }
+
+ // ftp proxy name
+ if( aFtpProxy.Server.getLength() > 0 )
+ {
+ valueFtpProxyName_.IsPresent = true;
+ valueFtpProxyName_.Value <<= aFtpProxy.Server;
+ }
+
+ // ftp proxy port
+ if( aFtpProxy.Port.getLength() > 0 )
+ {
+ valueFtpProxyPort_.IsPresent = true;
+ valueFtpProxyPort_.Value <<= aFtpProxy.Port.toInt32();
+ }
+ }
+ }
}
+}
+
+//------------------------------------------------------------------------------
- return uno::Reference<backend::XLayer>();
+WinInetBackend::~WinInetBackend(void)
+{
}
//------------------------------------------------------------------------------
-uno::Reference<backend::XUpdatableLayer> SAL_CALL
-WinInetBackend::getUpdatableLayer(const rtl::OUString& /*aComponent*/)
- throw (backend::BackendAccessException,lang::NoSupportException,
- lang::IllegalArgumentException)
+WinInetBackend* WinInetBackend::createInstance()
+{
+ return new WinInetBackend;
+}
+
+// ---------------------------------------------------------------------------------------
+
+void WinInetBackend::setPropertyValue(
+ rtl::OUString const &, css::uno::Any const &)
+ throw (
+ css::beans::UnknownPropertyException, css::beans::PropertyVetoException,
+ css::lang::IllegalArgumentException, css::lang::WrappedTargetException,
+ css::uno::RuntimeException)
{
- throw lang::NoSupportException(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
- "WinInetBackend: No Update Operation allowed, Read Only access") ),
- *this) ;
+ throw css::lang::IllegalArgumentException(
+ rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM("setPropertyValue not supported")),
+ static_cast< cppu::OWeakObject * >(this), -1);
+}
- return NULL;
+css::uno::Any WinInetBackend::getPropertyValue(
+ rtl::OUString const & PropertyName)
+ throw (
+ css::beans::UnknownPropertyException, css::lang::WrappedTargetException,
+ css::uno::RuntimeException)
+{
+ if (PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ooInetFTPProxyName")))
+ {
+ return css::uno::makeAny(valueFtpProxyName_);
+ } else if (PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ooInetFTPProxyPort")))
+ {
+ return css::uno::makeAny(valueFtpProxyPort_);
+ } else if (PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ooInetHTTPProxyName")))
+ {
+ return css::uno::makeAny(valueHttpProxyName_);
+ } else if (PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ooInetHTTPProxyPort")))
+ {
+ return css::uno::makeAny(valueHttpProxyPort_);
+ } else if (PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ooInetHTTPSProxyName")))
+ {
+ return css::uno::makeAny(valueHttpsProxyName_);
+ } else if (PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ooInetHTTPSProxyPort")))
+ {
+ return css::uno::makeAny(valueHttpsProxyPort_);
+ } else if (PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ooInetNoProxy")))
+ {
+ return css::uno::makeAny(valueNoProxy_);
+ } else if (PropertyName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("ooInetProxyType")))
+ {
+ return css::uno::makeAny(valueProxyType_);
+ } else {
+ throw css::beans::UnknownPropertyException(
+ PropertyName, static_cast< cppu::OWeakObject * >(this));
+ }
}
//------------------------------------------------------------------------------
@@ -121,9 +374,8 @@ rtl::OUString SAL_CALL WinInetBackend::getImplementationName(void)
uno::Sequence<rtl::OUString> SAL_CALL WinInetBackend::getBackendServiceNames(void)
{
- uno::Sequence<rtl::OUString> aServiceNameList(2);
+ uno::Sequence<rtl::OUString> aServiceNameList(1);
aServiceNameList[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.backend.WinInetBackend")) ;
- aServiceNameList[1] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.backend.PlatformBackend")) ;
return aServiceNameList ;
}
@@ -149,16 +401,3 @@ uno::Sequence<rtl::OUString> SAL_CALL WinInetBackend::getSupportedServiceNames(v
{
return getBackendServiceNames() ;
}
-
-// ---------------------------------------------------------------------------------------
-
-uno::Sequence<rtl::OUString> SAL_CALL WinInetBackend::getSupportedComponents(void)
-{
- uno::Sequence<rtl::OUString> aSupportedComponentList(1);
- aSupportedComponentList[0] = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Inet" )
- );
-
- return aSupportedComponentList;
-}
-
diff --git a/shell/source/backends/wininetbe/wininetbackend.hxx b/shell/source/backends/wininetbe/wininetbackend.hxx
index c335fe005f12..5fe4d5625a9a 100644
--- a/shell/source/backends/wininetbe/wininetbackend.hxx
+++ b/shell/source/backends/wininetbe/wininetbackend.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: wininetbackend.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -31,38 +28,23 @@
#ifndef _FIXEDVALUEBACKEND_HXX_
#define _FIXEDVALUEBACKEND_HXX_
-#include <com/sun/star/configuration/backend/XSingleLayerStratum.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
+#include <com/sun/star/beans/Optional.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/configuration/backend/XBackendChangesNotifier.hpp>
#include <cppuhelper/implbase2.hxx>
#include <rtl/string.hxx>
-#if defined _MSC_VER
-#pragma warning(push, 1)
-#endif
-#include <windows.h>
-#include <wininet.h>
-#if defined _MSC_VER
-#pragma warning(pop)
-#endif
-
namespace css = com::sun::star ;
namespace uno = css::uno ;
namespace lang = css::lang ;
-namespace backend = css::configuration::backend ;
-
-/**
- Implements the SingleLayerStratum service.
- */
class WinInetBackend : public ::cppu::WeakImplHelper2 <
- backend::XSingleLayerStratum,
+ css::beans::XPropertySet,
lang::XServiceInfo > {
public :
- static WinInetBackend* createInstance(const uno::Reference<uno::XComponentContext>& xContext);
+ static WinInetBackend* createInstance();
// XServiceInfo
virtual rtl::OUString SAL_CALL
@@ -89,43 +71,86 @@ class WinInetBackend : public ::cppu::WeakImplHelper2 <
@return service names
*/
static uno::Sequence<rtl::OUString> SAL_CALL getBackendServiceNames(void) ;
- /**
- Provides the supported component nodes
-
- @return supported component nodes
- */
- static uno::Sequence<rtl::OUString> SAL_CALL getSupportedComponents(void) ;
-
- //XSingleLayerStratum
- virtual uno::Reference<backend::XLayer> SAL_CALL
- getLayer( const rtl::OUString& aLayerId, const rtl::OUString& aTimestamp )
- throw (backend::BackendAccessException,
- lang::IllegalArgumentException) ;
-
- virtual uno::Reference<backend::XUpdatableLayer> SAL_CALL
- getUpdatableLayer( const rtl::OUString& aLayerId )
- throw (backend::BackendAccessException,
- lang::NoSupportException,
- lang::IllegalArgumentException) ;
+
+ // XPropertySet
+ virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
+ getPropertySetInfo() throw (css::uno::RuntimeException)
+ { return css::uno::Reference< css::beans::XPropertySetInfo >(); }
+
+ virtual void SAL_CALL setPropertyValue(
+ rtl::OUString const &, css::uno::Any const &)
+ throw (
+ css::beans::UnknownPropertyException,
+ css::beans::PropertyVetoException,
+ css::lang::IllegalArgumentException,
+ css::lang::WrappedTargetException, css::uno::RuntimeException);
+
+ virtual css::uno::Any SAL_CALL getPropertyValue(
+ rtl::OUString const & PropertyName)
+ throw (
+ css::beans::UnknownPropertyException,
+ css::lang::WrappedTargetException, css::uno::RuntimeException);
+
+ virtual void SAL_CALL addPropertyChangeListener(
+ rtl::OUString const &,
+ css::uno::Reference< css::beans::XPropertyChangeListener > const &)
+ throw (
+ css::beans::UnknownPropertyException,
+ css::lang::WrappedTargetException, css::uno::RuntimeException)
+ {}
+
+ virtual void SAL_CALL removePropertyChangeListener(
+ rtl::OUString const &,
+ css::uno::Reference< css::beans::XPropertyChangeListener > const &)
+ throw (
+ css::beans::UnknownPropertyException,
+ css::lang::WrappedTargetException, css::uno::RuntimeException)
+ {}
+
+ virtual void SAL_CALL addVetoableChangeListener(
+ rtl::OUString const &,
+ css::uno::Reference< css::beans::XVetoableChangeListener > const &)
+ throw (
+ css::beans::UnknownPropertyException,
+ css::lang::WrappedTargetException, css::uno::RuntimeException)
+ {}
+
+ virtual void SAL_CALL removeVetoableChangeListener(
+ rtl::OUString const &,
+ css::uno::Reference< css::beans::XVetoableChangeListener > const &)
+ throw (
+ css::beans::UnknownPropertyException,
+ css::lang::WrappedTargetException, css::uno::RuntimeException)
+ {}
+
protected:
/**
Service constructor from a service factory.
@param xContext component context
*/
- WinInetBackend(const uno::Reference<uno::XComponentContext>& xContext)
- throw (backend::BackendAccessException);
+ WinInetBackend();
/** Destructor */
~WinInetBackend(void) ;
private:
-
- uno::Reference<uno::XComponentContext> m_xContext ;
- uno::Reference<backend::XLayer> m_xSystemLayer ;
-
- // The wininet.dll module handle
- HMODULE m_hWinInetDll;
+ com::sun::star::beans::Optional< com::sun::star::uno::Any >
+ valueProxyType_;
+ com::sun::star::beans::Optional< com::sun::star::uno::Any >
+ valueNoProxy_;
+ com::sun::star::beans::Optional< com::sun::star::uno::Any >
+ valueHttpProxyName_;
+ com::sun::star::beans::Optional< com::sun::star::uno::Any >
+ valueHttpProxyPort_;
+ com::sun::star::beans::Optional< com::sun::star::uno::Any >
+ valueHttpsProxyName_;
+ com::sun::star::beans::Optional< com::sun::star::uno::Any >
+ valueHttpsProxyPort_;
+ com::sun::star::beans::Optional< com::sun::star::uno::Any >
+ valueFtpProxyName_;
+ com::sun::star::beans::Optional< com::sun::star::uno::Any >
+ valueFtpProxyPort_;
} ;
diff --git a/shell/source/backends/wininetbe/wininetbe.xml b/shell/source/backends/wininetbe/wininetbe.xml
index 42364deba3cb..1bf4bd2cd053 100644
--- a/shell/source/backends/wininetbe/wininetbe.xml
+++ b/shell/source/backends/wininetbe/wininetbe.xml
@@ -10,7 +10,6 @@
<language>c++</language>
<status value="beta"/>
<supported-service>com.sun.star.comp.configuration.backend.Win32Backend</supported-service>
- <supported-service>com.sun.star.comp.configuration.backend.PlatformBackend</supported-service>
<service-dependency>...</service-dependency>
<type>com.sun.star.configuration.backend.XBackendChangesListener</type>
<type>com.sun.star.configuration.backend.XBackendChangesNotifier</type>
diff --git a/shell/source/backends/wininetbe/wininetbecdef.cxx b/shell/source/backends/wininetbe/wininetbecdef.cxx
index ae8ad725da1c..862600009e30 100644
--- a/shell/source/backends/wininetbe/wininetbecdef.cxx
+++ b/shell/source/backends/wininetbe/wininetbecdef.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: wininetbecdef.cxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -42,14 +39,13 @@
namespace css = com::sun::star ;
namespace uno = css::uno ;
namespace lang = css::lang ;
-namespace backend = css::configuration::backend ;
//------------------------------------------------------------------------------
static uno::Reference<uno::XInterface> SAL_CALL createWinInetBackend(
- const uno::Reference<uno::XComponentContext>& xContext){
+ const uno::Reference<uno::XComponentContext>&){
- return * WinInetBackend::createInstance(xContext);
+ return * WinInetBackend::createInstance();
}
//------------------------------------------------------------------------------
@@ -77,41 +73,9 @@ extern "C" void SAL_CALL component_getImplementationEnvironment(
//------------------------------------------------------------------------------
-extern "C" sal_Bool SAL_CALL component_writeInfo(void * /*pServiceManager*/, void *pRegistryKey) {
-
- using namespace ::com::sun::star::registry;
- if (pRegistryKey)
- {
- try
- {
- uno::Reference< XRegistryKey > xImplKey = static_cast< XRegistryKey* >( pRegistryKey )->createKey(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) + WinInetBackend::getBackendName()
- );
-
- // Register associated service names
- uno::Reference< XRegistryKey > xServicesKey = xImplKey->createKey(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES") )
- );
-
- uno::Sequence<rtl::OUString> sServiceNames = WinInetBackend::getBackendServiceNames();
- for (sal_Int32 i = 0 ; i < sServiceNames.getLength() ; ++ i)
- xServicesKey->createKey(sServiceNames[i]);
-
- // Register supported components
- uno::Reference<XRegistryKey> xComponentKey = xImplKey->createKey(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/DATA/SupportedComponents") )
- );
-
- xComponentKey->setAsciiListValue( WinInetBackend::getSupportedComponents() );
-
- return sal_True;
- }
- catch( InvalidRegistryException& )
- {
- OSL_ENSURE(sal_False, "InvalidRegistryException caught");
- }
- }
- return sal_False;
+extern "C" sal_Bool SAL_CALL component_writeInfo(void * pServiceManager, void *pRegistryKey) {
+ return cppu::component_writeInfoHelper(
+ pServiceManager, pRegistryKey, kImplementations_entries);
}
//------------------------------------------------------------------------------
diff --git a/shell/source/backends/wininetbe/wininetlayer.cxx b/shell/source/backends/wininetbe/wininetlayer.cxx
deleted file mode 100644
index d38bda5a1581..000000000000
--- a/shell/source/backends/wininetbe/wininetlayer.cxx
+++ /dev/null
@@ -1,377 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: wininetlayer.cxx,v $
- * $Revision: 1.7 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_shell.hxx"
-
-#ifndef _WININETLAYER_HXX_
-#include "wininetlayer.hxx"
-#endif
-
-#include <malloc.h>
-
-#include <rtl/ustrbuf.hxx>
-
-#define EQUAL_SIGN '='
-#define COLON ':'
-#define SPACE ' '
-#define SEMI_COLON ';'
-
-typedef struct
-{
- rtl::OUString Server;
- rtl::OUString Port;
-} ProxyEntry;
-
-//------------------------------------------------------------------------
-// helper functions
-//------------------------------------------------------------------------
-
-namespace // private
-{
- ProxyEntry ReadProxyEntry(const rtl::OUString& aProxy, sal_Int32& i)
- {
- ProxyEntry aProxyEntry;
-
- aProxyEntry.Server = aProxy.getToken( 0, COLON, i );
- if ( i > -1 )
- aProxyEntry.Port = aProxy.getToken( 0, COLON, i );
-
- return aProxyEntry;
- }
-
- ProxyEntry FindProxyEntry(const rtl::OUString& aProxyList, const rtl::OUString& aType)
- {
- sal_Int32 nIndex = 0;
-
- do
- {
- // get the next token, e.g. ftp=server:port
- rtl::OUString nextToken = aProxyList.getToken( 0, SPACE, nIndex );
-
- // split the next token again into the parts separated
- // through '=', e.g. ftp=server:port -> ftp and server:port
- sal_Int32 i = 0;
- if( nextToken.indexOf( EQUAL_SIGN ) > -1 )
- {
- if( aType.equals( nextToken.getToken( 0, EQUAL_SIGN, i ) ) )
- return ReadProxyEntry(nextToken, i);
- }
- else if( aType.getLength() == 0)
- return ReadProxyEntry(nextToken, i);
-
- } while ( nIndex >= 0 );
-
- return ProxyEntry();
- }
-
-} // end private namespace
-
-//------------------------------------------------------------------------------
-
-WinInetLayer::WinInetLayer( InternetQueryOption_Proc_T lpfnInternetQueryOption,
- const uno::Reference<uno::XComponentContext>& xContext)
- : m_lpfnInternetQueryOption(lpfnInternetQueryOption)
-{
- //Create instance of LayerContentDescriber Service
- rtl::OUString const k_sLayerDescriberService(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.comp.configuration.backend.LayerDescriber"));
-
- typedef uno::Reference<backend::XLayerContentDescriber> LayerDescriber;
- uno::Reference< lang::XMultiComponentFactory > xServiceManager = xContext->getServiceManager();
- if( xServiceManager.is() )
- {
- m_xLayerContentDescriber = LayerDescriber::query(
- xServiceManager->createInstanceWithContext(k_sLayerDescriberService, xContext));
- }
- else
- {
- OSL_TRACE("Could not retrieve ServiceManager");
- }
-
-}
-
-//------------------------------------------------------------------------------
-
-void SAL_CALL WinInetLayer::readData(
- const uno::Reference<backend::XLayerHandler>& xHandler)
- throw ( backend::MalformedDataException,
- lang::NullPointerException,
- lang::WrappedTargetException,
- uno::RuntimeException)
-{
-
- if (m_xLayerContentDescriber.is() && m_lpfnInternetQueryOption)
- {
- LPINTERNET_PROXY_INFO lpi = NULL;
-
- // query for the neccessary space
- DWORD dwLength = 0;
- BOOL bRet = m_lpfnInternetQueryOption(
- NULL,
- INTERNET_OPTION_PROXY,
- (LPVOID)lpi,
- &dwLength );
-
- // allocate sufficient space on the heap
- // insufficient space on the heap results
- // in a stack overflow exception, we assume
- // this never happens, because of the relatively
- // small amount of memory we need
- // _alloca is nice because it is fast and we don't
- // have to free the allocated memory, it will be
- // automatically done
- lpi = reinterpret_cast< LPINTERNET_PROXY_INFO >(
- _alloca( dwLength ) );
-
- bRet = m_lpfnInternetQueryOption(
- NULL,
- INTERNET_OPTION_PROXY,
- (LPVOID)lpi,
- &dwLength );
-
- // if a proxy is disabled, InternetQueryOption returns
- // an empty proxy list, so we don't have to check if
- // proxy is enabled or not
-
- rtl::OUString aProxyList = rtl::OUString::createFromAscii( lpi->lpszProxy );
- rtl::OUString aProxyBypassList = rtl::OUString::createFromAscii( lpi->lpszProxyBypass );
-
- // override default for ProxyType, which is "0" meaning "No proxies".
- uno::Sequence<backend::PropertyInfo> aPropInfoList(8);
- sal_Int32 nProperties = 1;
-
- aPropInfoList[0].Name = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Inet/Settings/ooInetProxyType") );
- aPropInfoList[0].Type = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "int" ) );
- aPropInfoList[0].Protected = sal_False;
- aPropInfoList[0].Value = uno::makeAny( nProperties );
-
- // fill proxy bypass list
- if( aProxyBypassList.getLength() > 0 )
- {
- rtl::OUStringBuffer aReverseList;
- sal_Int32 nIndex = 0;
- do
- {
- rtl::OUString aToken = aProxyBypassList.getToken( 0, SPACE, nIndex );
- if ( aProxyList.indexOf( aToken ) == -1 )
- {
- if ( aReverseList.getLength() )
- {
- aReverseList.insert( 0, sal_Unicode( SEMI_COLON ) );
- aReverseList.insert( 0, aToken );
- }
- else
- aReverseList = aToken;
- }
- }
- while ( nIndex >= 0 );
-
- aProxyBypassList = aReverseList.makeStringAndClear();
-
- aPropInfoList[nProperties].Name = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Inet/Settings/ooInetNoProxy") );
- aPropInfoList[nProperties].Type = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "string" ) );
- aPropInfoList[nProperties].Protected = sal_False;
- aPropInfoList[nProperties++].Value = uno::makeAny( aProxyBypassList.replace( SPACE, SEMI_COLON ) );
- }
-
- if( aProxyList.getLength() > 0 )
- {
- //-------------------------------------------------
- // this implementation follows the algorithm
- // of the internet explorer
- // if there are type-dependent proxy settings
- // and type independent proxy settings in the
- // registry the internet explorer chooses the
- // type independent proxy for all settings
- // e.g. imagine the following registry entry
- // ftp=server:port;http=server:port;server:port
- // the last token server:port is type independent
- // so the ie chooses this proxy server
-
- // if there is no port specified for a type independent
- // server the ie uses the port of an http server if
- // there is one and it has a port
- //-------------------------------------------------
-
- ProxyEntry aTypeIndepProxy = FindProxyEntry( aProxyList, rtl::OUString());
- ProxyEntry aHttpProxy = FindProxyEntry( aProxyList, rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "http" ) ) );
- ProxyEntry aHttpsProxy = FindProxyEntry( aProxyList, rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "https" ) ) );
-
- ProxyEntry aFtpProxy = FindProxyEntry( aProxyList, rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "ftp" ) ) );
-
- if( aTypeIndepProxy.Server.getLength() )
- {
- aHttpProxy.Server = aTypeIndepProxy.Server;
- aHttpsProxy.Server = aTypeIndepProxy.Server;
- aFtpProxy.Server = aTypeIndepProxy.Server;
-
- if( aTypeIndepProxy.Port.getLength() )
- {
- aHttpProxy.Port = aTypeIndepProxy.Port;
- aHttpsProxy.Port = aTypeIndepProxy.Port;
- aFtpProxy.Port = aTypeIndepProxy.Port;
- }
- else
- {
- aFtpProxy.Port = aHttpProxy.Port;
- aHttpsProxy.Port = aHttpProxy.Port;
- }
- }
-
- // http proxy name
- if( aHttpProxy.Server.getLength() > 0 )
- {
- aPropInfoList[nProperties].Name = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Inet/Settings/ooInetHTTPProxyName") );
- aPropInfoList[nProperties].Type = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "string" ) );
- aPropInfoList[nProperties].Protected = sal_False;
- aPropInfoList[nProperties++].Value = uno::makeAny( aHttpProxy.Server );
- }
-
- // http proxy port
- if( aHttpProxy.Port.getLength() > 0 )
- {
- aPropInfoList[nProperties].Name = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Inet/Settings/ooInetHTTPProxyPort") );
- aPropInfoList[nProperties].Type = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "int" ) );
- aPropInfoList[nProperties].Protected = sal_False;
- aPropInfoList[nProperties++].Value = uno::makeAny( aHttpProxy.Port.toInt32() );
- }
-
- // https proxy name
- if( aHttpsProxy.Server.getLength() > 0 )
- {
- aPropInfoList[nProperties].Name = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Inet/Settings/ooInetHTTPSProxyName") );
- aPropInfoList[nProperties].Type = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "string" ) );
- aPropInfoList[nProperties].Protected = sal_False;
- aPropInfoList[nProperties++].Value = uno::makeAny( aHttpsProxy.Server );
- }
-
- // https proxy port
- if( aHttpsProxy.Port.getLength() > 0 )
- {
- aPropInfoList[nProperties].Name = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Inet/Settings/ooInetHTTPSProxyPort") );
- aPropInfoList[nProperties].Type = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "int" ) );
- aPropInfoList[nProperties].Protected = sal_False;
- aPropInfoList[nProperties++].Value = uno::makeAny( aHttpsProxy.Port.toInt32() );
- }
-
- // ftp proxy name
- if( aFtpProxy.Server.getLength() > 0 )
- {
- aPropInfoList[nProperties].Name = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Inet/Settings/ooInetFTPProxyName") );
- aPropInfoList[nProperties].Type = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "string" ) );
- aPropInfoList[nProperties].Protected = sal_False;
- aPropInfoList[nProperties++].Value = uno::makeAny( aFtpProxy.Server );
- }
-
- // ftp proxy port
- if( aFtpProxy.Port.getLength() > 0 )
- {
- aPropInfoList[nProperties].Name = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Inet/Settings/ooInetFTPProxyPort") );
- aPropInfoList[nProperties].Type = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "int" ) );
- aPropInfoList[nProperties].Protected = sal_False;
- aPropInfoList[nProperties++].Value = uno::makeAny( aFtpProxy.Port.toInt32() );
- }
- }
-
- // resize the property info list appropriately
- aPropInfoList.realloc(nProperties);
-
- m_xLayerContentDescriber->describeLayer(xHandler, aPropInfoList);
- }
- else
- {
- OSL_TRACE("Could not create com.sun.star.configuration.backend.LayerContentDescriber Service");
- }
-}
-
-//------------------------------------------------------------------------------
-
-rtl::OUString SAL_CALL WinInetLayer::getTimestamp(void)
- throw (uno::RuntimeException)
-{
- rtl::OUString aTimestamp;
-
- if (m_lpfnInternetQueryOption)
- {
- LPINTERNET_PROXY_INFO lpi = NULL;
-
- // query for the neccessary space
- DWORD dwLength = 0;
- BOOL bRet = m_lpfnInternetQueryOption(
- NULL,
- INTERNET_OPTION_PROXY,
- (LPVOID)lpi,
- &dwLength );
-
- // allocate sufficient space on the heap
- // insufficient space on the heap results
- // in a stack overflow exception, we assume
- // this never happens, because of the relatively
- // small amount of memory we need
- // _alloca is nice because it is fast and we don't
- // have to free the allocated memory, it will be
- // automatically done
- lpi = reinterpret_cast< LPINTERNET_PROXY_INFO >(
- _alloca( dwLength ) );
-
- bRet = m_lpfnInternetQueryOption(
- NULL,
- INTERNET_OPTION_PROXY,
- (LPVOID)lpi,
- &dwLength );
-
- aTimestamp = rtl::OUString::createFromAscii( lpi->lpszProxy );
- aTimestamp += rtl::OUString::createFromAscii( lpi->lpszProxyBypass );
- }
-
- return aTimestamp;
-}
-
-//------------------------------------------------------------------------------
diff --git a/shell/source/backends/wininetbe/wininetlayer.hxx b/shell/source/backends/wininetbe/wininetlayer.hxx
deleted file mode 100644
index 761e174d1df5..000000000000
--- a/shell/source/backends/wininetbe/wininetlayer.hxx
+++ /dev/null
@@ -1,73 +0,0 @@
-#ifndef _WinInetLayer_HXX_
-#define _WinInetLayer_HXX_
-
-#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/configuration/backend/XLayer.hpp>
-#include <com/sun/star/configuration/backend/PropertyInfo.hpp>
-#include <com/sun/star/configuration/backend/BackendAccessException.hpp>
-
-#ifndef _COM_SUN_STAR_CONFIGURATION_BACKEND_XLAYERCONTENTDESCIBER_HPP_
-#include <com/sun/star/configuration/backend/XLayerContentDescriber.hpp>
-#endif
-#include <com/sun/star/util/XTimeStamped.hpp>
-#include <com/sun/star/uno/Sequence.hxx>
-#include <cppuhelper/implbase2.hxx>
-
-#if defined _MSC_VER
-#pragma warning(push, 1)
-#endif
-#include <windows.h>
-#include <wininet.h>
-#if defined _MSC_VER
-#pragma warning(pop)
-#endif
-
-namespace css = com::sun::star ;
-namespace uno = css::uno ;
-namespace lang = css::lang ;
-namespace backend = css::configuration::backend ;
-namespace util = css::util ;
-
-/**
- Implementation of the XLayer interfaces for fixed values
- */
-
-class WinInetLayer : public cppu::WeakImplHelper2<backend::XLayer, util::XTimeStamped>
-{
- public :
- typedef BOOL ( WINAPI *InternetQueryOption_Proc_T )( HINTERNET, DWORD, LPVOID, LPDWORD );
-
- /**
- Constructor given the requested component name
-
- @param lpfnInternetQueryOption function pointer into wininet.dll
- @param aTimestamp timestamp indicating last modifictaion
- */
- WinInetLayer(InternetQueryOption_Proc_T lpfnInternetQueryOption,
- const uno::Reference<uno::XComponentContext>& xContext);
-
- /** Destructor */
- ~WinInetLayer(void) {}
-
- // XLayer
- virtual void SAL_CALL readData(const uno::Reference<backend::XLayerHandler>& xHandler)
- throw ( backend::MalformedDataException,
- lang::NullPointerException,
- lang::WrappedTargetException,
- uno::RuntimeException) ;
-
- // XTimeStamped
- virtual rtl::OUString SAL_CALL getTimestamp(void)
- throw (uno::RuntimeException);
-
- private :
-
- rtl::OUString m_aComponent ;
-
- uno::Reference<backend::XLayerContentDescriber> m_xLayerContentDescriber ;
-
- // The InternetQueryOption function pointer
- InternetQueryOption_Proc_T m_lpfnInternetQueryOption;
-} ;
-
-#endif // _WinInetLayer_HXX_
diff --git a/shell/source/cmdmail/cmdmailentry.cxx b/shell/source/cmdmail/cmdmailentry.cxx
index 195916b7341d..aacef87396c4 100755
--- a/shell/source/cmdmail/cmdmailentry.cxx
+++ b/shell/source/cmdmail/cmdmailentry.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: cmdmailentry.cxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/cmdmail/cmdmailmsg.cxx b/shell/source/cmdmail/cmdmailmsg.cxx
index 66a74ea68989..77de429ed771 100755
--- a/shell/source/cmdmail/cmdmailmsg.cxx
+++ b/shell/source/cmdmail/cmdmailmsg.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: cmdmailmsg.cxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/cmdmail/cmdmailmsg.hxx b/shell/source/cmdmail/cmdmailmsg.hxx
index a9ddebfa234a..520bd0acbb56 100644
--- a/shell/source/cmdmail/cmdmailmsg.hxx
+++ b/shell/source/cmdmail/cmdmailmsg.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: cmdmailmsg.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/cmdmail/cmdmailsuppl.cxx b/shell/source/cmdmail/cmdmailsuppl.cxx
index e3f5bbb3dc3f..4878f8d7783f 100755
--- a/shell/source/cmdmail/cmdmailsuppl.cxx
+++ b/shell/source/cmdmail/cmdmailsuppl.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: cmdmailsuppl.cxx,v $
- * $Revision: 1.15 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/cmdmail/cmdmailsuppl.hxx b/shell/source/cmdmail/cmdmailsuppl.hxx
index 08f98d3dc021..343de67cb68c 100644
--- a/shell/source/cmdmail/cmdmailsuppl.hxx
+++ b/shell/source/cmdmail/cmdmailsuppl.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: cmdmailsuppl.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/cmdmail/exports.map b/shell/source/cmdmail/exports.map
deleted file mode 100644
index ba501f9ae076..000000000000
--- a/shell/source/cmdmail/exports.map
+++ /dev/null
@@ -1,10 +0,0 @@
-UDK_3_0_0 {
- global:
- GetVersionInfo;
- component_getImplementationEnvironment;
- component_getFactory;
- component_writeInfo;
-
- local:
- *;
-};
diff --git a/shell/source/cmdmail/makefile.mk b/shell/source/cmdmail/makefile.mk
index 6b83d74842f2..5781afe8f5dd 100644
--- a/shell/source/cmdmail/makefile.mk
+++ b/shell/source/cmdmail/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.7 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
@@ -57,7 +53,7 @@ SHL1STDLIBS=$(CPPULIB)\
$(CPPUHELPERLIB)\
$(SALLIB)
-SHL1VERSIONMAP=exports.map
+SHL1VERSIONMAP=$(SOLARENV)/src/component.map
SHL1DEF=$(MISC)$/$(SHL1TARGET).def
DEF1NAME=$(SHL1TARGET)
diff --git a/shell/source/tools/lngconvex/cmdline.cxx b/shell/source/tools/lngconvex/cmdline.cxx
index 68df937ca7c0..8e51e0b203e1 100644
--- a/shell/source/tools/lngconvex/cmdline.cxx
+++ b/shell/source/tools/lngconvex/cmdline.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: cmdline.cxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/tools/lngconvex/lngconvex.cxx b/shell/source/tools/lngconvex/lngconvex.cxx
index f605d6f340d9..1d8862153230 100644
--- a/shell/source/tools/lngconvex/lngconvex.cxx
+++ b/shell/source/tools/lngconvex/lngconvex.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: lngconvex.cxx,v $
- * $Revision: 1.18 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -48,6 +45,7 @@
#include "osl/thread.h"
#include "osl/process.h"
#include "osl/file.hxx"
+#include "sal/main.h"
#include "tools/config.hxx"
#include "i18npool/mslangid.hxx"
@@ -568,7 +566,7 @@ void inflate_rc_template_to_file(
#define RC_HEADER(c) MAKE_ABSOLUTE((c).get_arg("-rch"))
#define RC_FOOTER(c) MAKE_ABSOLUTE((c).get_arg("-rcf"))
-int main(int argc, char* argv[])
+SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
{
try
{
diff --git a/shell/source/tools/lngconvex/makefile.mk b/shell/source/tools/lngconvex/makefile.mk
index c98f5d47968c..da28e5ff68f4 100644
--- a/shell/source/tools/lngconvex/makefile.mk
+++ b/shell/source/tools/lngconvex/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.6 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/tools/regsvrex/makefile.mk b/shell/source/tools/regsvrex/makefile.mk
index 52c6ee70b6ec..2eb8dbf48481 100644
--- a/shell/source/tools/regsvrex/makefile.mk
+++ b/shell/source/tools/regsvrex/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.5 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/tools/regsvrex/regsvrex.cxx b/shell/source/tools/regsvrex/regsvrex.cxx
index db5f451d2d21..516e386e5e06 100644
--- a/shell/source/tools/regsvrex/regsvrex.cxx
+++ b/shell/source/tools/regsvrex/regsvrex.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: regsvrex.cxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/unix/exec/exports.map b/shell/source/unix/exec/exports.map
deleted file mode 100644
index ba501f9ae076..000000000000
--- a/shell/source/unix/exec/exports.map
+++ /dev/null
@@ -1,10 +0,0 @@
-UDK_3_0_0 {
- global:
- GetVersionInfo;
- component_getImplementationEnvironment;
- component_getFactory;
- component_writeInfo;
-
- local:
- *;
-};
diff --git a/shell/source/unix/exec/makefile.mk b/shell/source/unix/exec/makefile.mk
index e23e249e0835..4bf77436f668 100644
--- a/shell/source/unix/exec/makefile.mk
+++ b/shell/source/unix/exec/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.12 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
@@ -60,7 +56,7 @@ SHL1IMPLIB=i$(TARGET)
SHL1IMPLIB=
.ENDIF
-SHL1VERSIONMAP=exports.map
+SHL1VERSIONMAP=$(SOLARENV)/src/component.map
SHL1DEF=$(MISC)$/$(SHL1TARGET).def
DEF1NAME=$(SHL1TARGET)
diff --git a/shell/source/unix/exec/shellexec.cxx b/shell/source/unix/exec/shellexec.cxx
index 4ee0f32eb072..e6aca26922da 100644
--- a/shell/source/unix/exec/shellexec.cxx
+++ b/shell/source/unix/exec/shellexec.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: shellexec.cxx,v $
- * $Revision: 1.21 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/unix/exec/shellexec.hxx b/shell/source/unix/exec/shellexec.hxx
index 5b15736d7cb3..d7955cc135fd 100644
--- a/shell/source/unix/exec/shellexec.hxx
+++ b/shell/source/unix/exec/shellexec.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: shellexec.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/unix/exec/shellexecentry.cxx b/shell/source/unix/exec/shellexecentry.cxx
index 4af2d96a2e10..da5e5613f955 100644
--- a/shell/source/unix/exec/shellexecentry.cxx
+++ b/shell/source/unix/exec/shellexecentry.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: shellexecentry.cxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/unix/exec/urltest.cxx b/shell/source/unix/exec/urltest.cxx
index ee19df4bb342..1de12766e650 100644
--- a/shell/source/unix/exec/urltest.cxx
+++ b/shell/source/unix/exec/urltest.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: urltest.cxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/unix/misc/gnome-open-url.c b/shell/source/unix/misc/gnome-open-url.c
index 326b1a735786..3bd7a61e6546 100644
--- a/shell/source/unix/misc/gnome-open-url.c
+++ b/shell/source/unix/misc/gnome-open-url.c
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: gnome-open-url.c,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/unix/misc/makefile.mk b/shell/source/unix/misc/makefile.mk
index 8a5ee366223a..67fcc708c615 100644
--- a/shell/source/unix/misc/makefile.mk
+++ b/shell/source/unix/misc/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.8 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/unix/misc/open-url.c b/shell/source/unix/misc/open-url.c
index f8e76f26ec5d..91f4aeaff398 100644
--- a/shell/source/unix/misc/open-url.c
+++ b/shell/source/unix/misc/open-url.c
@@ -2,7 +2,7 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
diff --git a/shell/source/unix/misc/senddoc.c b/shell/source/unix/misc/senddoc.c
index bbe96420699d..5a21ef1ec50f 100644
--- a/shell/source/unix/misc/senddoc.c
+++ b/shell/source/unix/misc/senddoc.c
@@ -2,7 +2,7 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
diff --git a/shell/source/unix/misc/uri-encode.c b/shell/source/unix/misc/uri-encode.c
index 04e6582286ee..e93bd61e6675 100644
--- a/shell/source/unix/misc/uri-encode.c
+++ b/shell/source/unix/misc/uri-encode.c
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: uri-encode.c,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/unix/sysshell/makefile.mk b/shell/source/unix/sysshell/makefile.mk
index 2c1ace9fe187..3d8a55d4377f 100644
--- a/shell/source/unix/sysshell/makefile.mk
+++ b/shell/source/unix/sysshell/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.11 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/unix/sysshell/recently_used_file.cxx b/shell/source/unix/sysshell/recently_used_file.cxx
index 6de067a62936..cc4fbf75adcc 100644
--- a/shell/source/unix/sysshell/recently_used_file.cxx
+++ b/shell/source/unix/sysshell/recently_used_file.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: recently_used_file.cxx,v $
- * $Revision: 1.7.30.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/unix/sysshell/recently_used_file.hxx b/shell/source/unix/sysshell/recently_used_file.hxx
index ec27e5458cf0..346541a7efda 100644
--- a/shell/source/unix/sysshell/recently_used_file.hxx
+++ b/shell/source/unix/sysshell/recently_used_file.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: recently_used_file.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/unix/sysshell/recently_used_file_handler.cxx b/shell/source/unix/sysshell/recently_used_file_handler.cxx
index 80d22501ed46..b124d03b589c 100644
--- a/shell/source/unix/sysshell/recently_used_file_handler.cxx
+++ b/shell/source/unix/sysshell/recently_used_file_handler.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: recently_used_file_handler.cxx,v $
- * $Revision: 1.12 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/unix/sysshell/recfile.map b/shell/source/unix/sysshell/recfile.map
index fa87f39161aa..7e454f111896 100755
--- a/shell/source/unix/sysshell/recfile.map
+++ b/shell/source/unix/sysshell/recfile.map
@@ -1,4 +1,4 @@
-RECFILE_1_0_0 {
+UDK_3_0_0 {
global:
add_to_recently_used_file_list;
local:
diff --git a/shell/source/win32/SysShExec.cxx b/shell/source/win32/SysShExec.cxx
index cdc4f9543a57..7264afaac109 100644
--- a/shell/source/win32/SysShExec.cxx
+++ b/shell/source/win32/SysShExec.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: SysShExec.cxx,v $
- * $Revision: 1.12 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/win32/SysShExec.hxx b/shell/source/win32/SysShExec.hxx
index 31f2f445b8eb..b4d5f18b7899 100644
--- a/shell/source/win32/SysShExec.hxx
+++ b/shell/source/win32/SysShExec.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: SysShExec.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/win32/SysShentry.cxx b/shell/source/win32/SysShentry.cxx
index 2109c733cdc9..a542d046fc59 100644
--- a/shell/source/win32/SysShentry.cxx
+++ b/shell/source/win32/SysShentry.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: SysShentry.cxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/win32/makefile.mk b/shell/source/win32/makefile.mk
index 04cc45d89bc3..9a9564ed76ca 100644
--- a/shell/source/win32/makefile.mk
+++ b/shell/source/win32/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.12 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
@@ -68,4 +64,6 @@ DEF1EXPORTFILE= exports.dxp
# --- Targets ------------------------------------------------------
.INCLUDE : target.mk
+INCLUDE!:=$(subst,/stl, $(INCLUDE))
+.EXPORT : INCLUDE
diff --git a/shell/source/win32/shlxthandler/classfactory.cxx b/shell/source/win32/shlxthandler/classfactory.cxx
index ee60cb4f62b7..e19dd68383b4 100644
--- a/shell/source/win32/shlxthandler/classfactory.cxx
+++ b/shell/source/win32/shlxthandler/classfactory.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: classfactory.cxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/win32/shlxthandler/classfactory.hxx b/shell/source/win32/shlxthandler/classfactory.hxx
index 11463e747eb6..f0a8b84ae6ee 100644
--- a/shell/source/win32/shlxthandler/classfactory.hxx
+++ b/shell/source/win32/shlxthandler/classfactory.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: classfactory.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/win32/shlxthandler/columninfo/columninfo.cxx b/shell/source/win32/shlxthandler/columninfo/columninfo.cxx
index 9e40a3097ab4..f8816668f8ab 100644
--- a/shell/source/win32/shlxthandler/columninfo/columninfo.cxx
+++ b/shell/source/win32/shlxthandler/columninfo/columninfo.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: columninfo.cxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/win32/shlxthandler/columninfo/makefile.mk b/shell/source/win32/shlxthandler/columninfo/makefile.mk
index 0b25d470aa7b..868a711e005c 100644
--- a/shell/source/win32/shlxthandler/columninfo/makefile.mk
+++ b/shell/source/win32/shlxthandler/columninfo/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.6 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
@@ -58,4 +54,6 @@ SLOFILES_X64=$(SLO_X64)$/$(TARGET).obj
# --- Targets ------------------------------------------------------
.INCLUDE : set_wntx64.mk
.INCLUDE : target.mk
+INCLUDE!:=$(subst,/stl, $(INCLUDE))
+.EXPORT : INCLUDE
.INCLUDE : tg_wntx64.mk \ No newline at end of file
diff --git a/shell/source/win32/shlxthandler/infotips/infotips.cxx b/shell/source/win32/shlxthandler/infotips/infotips.cxx
index da6974d4399d..72da8c9e7060 100644
--- a/shell/source/win32/shlxthandler/infotips/infotips.cxx
+++ b/shell/source/win32/shlxthandler/infotips/infotips.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: infotips.cxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/win32/shlxthandler/infotips/makefile.mk b/shell/source/win32/shlxthandler/infotips/makefile.mk
index cf489f323278..f69f2cf2fd78 100644
--- a/shell/source/win32/shlxthandler/infotips/makefile.mk
+++ b/shell/source/win32/shlxthandler/infotips/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.6 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
@@ -34,6 +30,7 @@ PRJNAME=shell
TARGET=infotips
LIBTARGET=NO
ENABLE_EXCEPTIONS=TRUE
+EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
# --- Settings -----------------------------------------------------
@@ -58,4 +55,6 @@ SLOFILES_X64=$(SLO_X64)$/$(TARGET).obj
.INCLUDE : set_wntx64.mk
.INCLUDE : target.mk
+INCLUDE!:=$(subst,/stl, $(INCLUDE))
+.EXPORT : INCLUDE
.INCLUDE : tg_wntx64.mk \ No newline at end of file
diff --git a/shell/source/win32/shlxthandler/makefile.mk b/shell/source/win32/shlxthandler/makefile.mk
index 479f8c0b6cd9..4452cb1a90e6 100644
--- a/shell/source/win32/shlxthandler/makefile.mk
+++ b/shell/source/win32/shlxthandler/makefile.mk
@@ -1,15 +1,11 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2008 by Sun Microsystems, Inc.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.14 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
@@ -58,7 +54,7 @@ SLOFILES=$(SLO)$/classfactory.obj\
$(SLO)$/shlxthdl.obj\
$(SLO)$/listviewbuilder.obj\
$(SLO)$/document_statistic.obj\
- $(SLO)$/thumbviewer.obj
+ $(SLO)$/thumbviewer.obj\
SHL1TARGET=$(TARGET)
@@ -81,6 +77,14 @@ SHL1STDLIBS+=\
$(GDI32LIB)\
$(GDIPLUSLIB)
+.IF "$(COM)"!="GCC"
+SHL1STDLIBS+=\
+ msvcprt.lib
+.ENDIF
+
+SHL1STDLIBS+=\
+ $(SHLWAPILIB)
+
SHL1LIBS+=$(SLB)$/util.lib\
$(SLB)$/ooofilereader.lib
@@ -108,7 +112,7 @@ SLOFILES_X64= \
$(SLO_X64)$/shlxthdl.obj\
$(SLO_X64)$/listviewbuilder.obj\
$(SLO_X64)$/document_statistic.obj\
- $(SLO_X64)$/thumbviewer.obj
+ $(SLO_X64)$/thumbviewer.obj\
SHL1TARGET_X64=$(TARGET)
SHL1LIBS_X64=$(SOLARLIBDIR_X64)$/zlib.lib\
@@ -127,7 +131,12 @@ SHL1STDLIBS_X64+=\
$(GDIPLUSLIB_X64) \
$(MSVCRT_X64) \
$(MSVCPRT_X64) \
- $(OLDNAMESLIB_X64)
+ $(OLDNAMESLIB_X64) \
+ msvcprt.lib
+
+.IF "$(PRODUCT)"!="full"
+SHL1STDLIBS+=msvcrt.lib
+.ENDIF
SHL1LIBS_X64+=$(SLB_X64)$/util.lib\
$(SLB_X64)$/ooofilereader.lib
@@ -143,5 +152,7 @@ DEF1EXPORTFILE_X64=exports.dxp
.INCLUDE : set_wntx64.mk
.INCLUDE : target.mk
+INCLUDE!:=$(subst,/stl, $(INCLUDE))
+.EXPORT : INCLUDE
.INCLUDE : tg_wntx64.mk
diff --git a/shell/source/win32/shlxthandler/ooofilt/makefile.mk b/shell/source/win32/shlxthandler/ooofilt/makefile.mk
index 22127bc8ddac..9111069ab889 100644
--- a/shell/source/win32/shlxthandler/ooofilt/makefile.mk
+++ b/shell/source/win32/shlxthandler/ooofilt/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.8 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
@@ -37,7 +33,7 @@ ENABLE_EXCEPTIONS=TRUE
USE_DEFFILE=TRUE
# Do not use the dynamic STLport library.
-# NO_DEFAULT_STL=YES
+NO_DEFAULT_STL=YES
# Do not use the uwinapi library
UWINAPILIB=
@@ -55,7 +51,8 @@ CDEFS+=-D_WIN32_IE=0x501
# --- Files --------------------------------------------------------
SLOFILES=$(SLO)$/ooofilt.obj\
- $(SLO)$/propspec.obj
+ $(SLO)$/propspec.obj\
+ $(SLO)$/stream_helper.obj
# $(SLO)$/utilities.obj
# $(SLO)$/dbgmacros.obj
@@ -77,6 +74,15 @@ SHL1STDLIBS+=$(OLE32LIB)\
$(SHELL32LIB)\
$(KERNEL32LIB)\
$(OLDNAMESLIB)
+
+.IF "$(COM)"!="GCC"
+SHL1STDLIBS+=msvcprt.lib
+
+.IF "$(PRODUCT)"!="full"
+SHL1STDLIBS+=msvcrt.lib
+.ENDIF
+.ENDIF
+
# $(LIBSTLPORTST)
@@ -98,7 +104,8 @@ CDEFS_X64+=-D_WIN32_IE=0x501
USE_DEFFILE_X64=TRUE
SLOFILES_X64=$(SLO_X64)$/ooofilt.obj\
- $(SLO_X64)$/propspec.obj
+ $(SLO_X64)$/propspec.obj\
+ $(SLO_X64)$/stream_helper.obj
SHL1TARGET_X64=$(TARGET)
@@ -129,4 +136,6 @@ DEF1EXPORTFILE_X64=exports.dxp
.INCLUDE : set_wntx64.mk
.INCLUDE : target.mk
-.INCLUDE : tg_wntx64.mk \ No newline at end of file
+INCLUDE!:=$(subst,/stl, $(INCLUDE))
+.EXPORT : INCLUDE
+.INCLUDE : tg_wntx64.mk
diff --git a/shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx b/shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx
index ac8dd676c3b1..adcf2b2f8ddf 100644
--- a/shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx
+++ b/shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ooofilt.cxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -78,14 +75,15 @@
#include <ntquery.h>
#include "assert.h"
#include "ooofilt.hxx"
-#include <objidl.h>
-#include <stdio.h>
+#include <objidl.h>
+#include <stdio.h>
#include "propspec.hxx"
#ifdef __MINGW32__
#include <algorithm>
using ::std::min;
#endif
+#include "internal/stream_helper.hxx"
//C-------------------------------------------------------------------------
//
@@ -120,7 +118,7 @@ COooFilter::COooFilter() :
m_ChunkPosition(0),
m_cAttributes(0),
m_pAttributes(0),
- m_pStream(NULL)
+ m_pStream(NULL)
{
InterlockedIncrement( &g_lInstances );
@@ -176,8 +174,8 @@ SCODE STDMETHODCALLTYPE COooFilter::QueryInterface(
pUnkTemp = (IUnknown *)(IPersistFile *)this;
else if ( IID_IPersist == riid )
pUnkTemp = (IUnknown *)(IPersist *)(IPersistFile *)this;
- else if (IID_IPersistStream == riid)
- pUnkTemp = (IUnknown *)(IPersistStream *)this;
+ else if (IID_IPersistStream == riid)
+ pUnkTemp = (IUnknown *)(IPersistStream *)this;
else if ( IID_IUnknown == riid )
pUnkTemp = (IUnknown *)(IPersist *)(IPersistFile *)this;
else
@@ -720,99 +718,85 @@ SCODE STDMETHODCALLTYPE COooFilter::SaveCompleted(LPCWSTR /*pszFileName*/)
return S_OK;
}
-//M-------------------------------------------------------------------------
-//
-// Method: COooFilter::Load (IPersistStream::Load)
-//
-// Summary: Initializes an object from the stream where it was previously saved
-//
-// Arguments: pStm
-// [in] Pointer to stream from which object should be loaded
-//
-//
-// Returns: S_OK
-// E_OUTOFMEMORY
-// E_FAIL
-//
-//
-//--------------------------------------------------------------------------
-SCODE STDMETHODCALLTYPE COooFilter::Load(IStream *pStm)
-{
-
- // These next few lines work around the "Seek pointer" bug found on Vista.
-
- char buf[20];
- unsigned long count;
- HRESULT hr;
- ULARGE_INTEGER NewPosition;
- LARGE_INTEGER Move;
- Move.QuadPart = 0;
- hr = pStm->Seek (Move, STREAM_SEEK_SET, &NewPosition);
- hr = pStm->Read (buf, 20, &count);
-
- zlib_filefunc_def z_filefunc;
- fill_stream_filefunc (&z_filefunc);
- z_filefunc.opaque = (void*)pStm;
-
- m_pStream = pStm;
-
- try
- {
- if (m_pMetaInfoReader)
- delete m_pMetaInfoReader;
- m_pMetaInfoReader = new CMetaInfoReader((void*)m_pStream, &z_filefunc);
-
- if (m_pContentReader)
- delete m_pContentReader;
- m_pContentReader = new CContentReader((void*)m_pStream, m_pMetaInfoReader->getDefaultLocale(), &z_filefunc);
- }
- catch (const std::exception&)
- {
- return E_FAIL;
- }
- return S_OK;
-}
-
-//M-------------------------------------------------------------------------
-//
-// Method: COooFilter::GetSizeMax (IPersistStream::GetSizeMax)
-//
-// Summary: Returns the size in bytes of the stream neede to save the object.
-//
-// Arguments: pcbSize
-// [out] Pointer to a 64 bit unsigned int indicating the size needed
-//
-// Returns: E_NOTIMPL
-//
-//
-//--------------------------------------------------------------------------
-SCODE STDMETHODCALLTYPE COooFilter::GetSizeMax(ULARGE_INTEGER * /*pcbSize*/)
-{
- //
- return E_NOTIMPL;
-}
-
-//M-------------------------------------------------------------------------
-//
-// Method: COooFilter::Save (IPersistStream::Save)
-//
-// Summary: Save object to specified stream
-//
-// Arguments: pStm
-// [in] Pointer to stream
-//
-// fClearDirty
-// [in] Indicates whether to clear dirty flag
-//
-// Returns: E_NOTIMPL
-//
-//
-//--------------------------------------------------------------------------
-SCODE STDMETHODCALLTYPE COooFilter::Save(IStream * /*pStm*/, BOOL )
-{
- //
- return E_NOTIMPL;
-}
+//M-------------------------------------------------------------------------
+//
+// Method: COooFilter::Load (IPersistStream::Load)
+//
+// Summary: Initializes an object from the stream where it was previously saved
+//
+// Arguments: pStm
+// [in] Pointer to stream from which object should be loaded
+//
+//
+// Returns: S_OK
+// E_OUTOFMEMORY
+// E_FAIL
+//
+//
+//--------------------------------------------------------------------------
+SCODE STDMETHODCALLTYPE COooFilter::Load(IStream *pStm)
+{
+ zlib_filefunc_def z_filefunc;
+
+ m_pStream = PrepareIStream( pStm, z_filefunc );
+
+ try
+ {
+ if (m_pMetaInfoReader)
+ delete m_pMetaInfoReader;
+ m_pMetaInfoReader = new CMetaInfoReader((void*)m_pStream, &z_filefunc);
+
+ if (m_pContentReader)
+ delete m_pContentReader;
+ m_pContentReader = new CContentReader((void*)m_pStream, m_pMetaInfoReader->getDefaultLocale(), &z_filefunc);
+ }
+ catch (const std::exception&)
+ {
+ return E_FAIL;
+ }
+ return S_OK;
+}
+
+//M-------------------------------------------------------------------------
+//
+// Method: COooFilter::GetSizeMax (IPersistStream::GetSizeMax)
+//
+// Summary: Returns the size in bytes of the stream neede to save the object.
+//
+// Arguments: pcbSize
+// [out] Pointer to a 64 bit unsigned int indicating the size needed
+//
+// Returns: E_NOTIMPL
+//
+//
+//--------------------------------------------------------------------------
+SCODE STDMETHODCALLTYPE COooFilter::GetSizeMax(ULARGE_INTEGER * /*pcbSize*/)
+{
+ //
+ return E_NOTIMPL;
+}
+
+//M-------------------------------------------------------------------------
+//
+// Method: COooFilter::Save (IPersistStream::Save)
+//
+// Summary: Save object to specified stream
+//
+// Arguments: pStm
+// [in] Pointer to stream
+//
+// fClearDirty
+// [in] Indicates whether to clear dirty flag
+//
+// Returns: E_NOTIMPL
+//
+//
+//--------------------------------------------------------------------------
+SCODE STDMETHODCALLTYPE COooFilter::Save(IStream * /*pStm*/, BOOL )
+{
+ //
+ return E_NOTIMPL;
+}
//M-------------------------------------------------------------------------
//
@@ -1247,14 +1231,14 @@ namespace /* private */
if (!SetRegistryKey(HKEY_CLASSES_ROOT, ClsidEntry_Persist.c_str(), "", "OpenOffice.org Persistent Handler"))
return E_FAIL;
- // Add missing entry
- std::string ClsidEntry_Persist_Entry = CLSID_PERSIST_ENTRY;
- SubstitutePlaceholder(ClsidEntry_Persist_Entry,
- GUID_PLACEHOLDER,
- ClsidToString(PersistentGuid));
-
- if (!SetRegistryKey(HKEY_CLASSES_ROOT, ClsidEntry_Persist_Entry.c_str(), "", ClsidToString(PersistentGuid).c_str()));
+ // Add missing entry
+ std::string ClsidEntry_Persist_Entry = CLSID_PERSIST_ENTRY;
+ SubstitutePlaceholder(ClsidEntry_Persist_Entry,
+ GUID_PLACEHOLDER,
+ ClsidToString(PersistentGuid));
+ if (!SetRegistryKey(HKEY_CLASSES_ROOT, ClsidEntry_Persist_Entry.c_str(), "", ClsidToString(PersistentGuid).c_str()))
+ return E_FAIL;
std::string ClsidEntry_Persist_Addin = CLSID_GUID_PERSIST_ADDIN_ENTRY;
SubstitutePlaceholder(ClsidEntry_Persist_Addin,
@@ -1504,100 +1488,3 @@ STDAPI DllUnregisterServer()
*/
return S_OK;
}
-
-extern "C" {
-
- // IStream callback
- voidpf ZCALLBACK cb_sopen (voidpf opaque, const char* filename, int mode) {
- return opaque;
- }
-
- uLong ZCALLBACK cb_sread (voidpf opaque, voidpf stream, void* buf, uLong size) {
- unsigned long newsize;
- HRESULT hr;
-
- hr = ((IStream *)stream)->Read (buf, size, &newsize);
- if (hr == S_OK){
- return (unsigned long)newsize;
- }
- else {
- return (uLong)0;
- }
- }
-
- long ZCALLBACK cb_sseek (voidpf opaque, voidpf stream, uLong offset, int origin) {
- // IStream::Seek parameters
- HRESULT hr;
- LARGE_INTEGER Move;
- DWORD dwOrigin;
- Move.QuadPart = (__int64)offset;
-
- switch (origin) {
- case SEEK_CUR:
- dwOrigin = STREAM_SEEK_CUR;
- break;
- case SEEK_END:
- dwOrigin = STREAM_SEEK_END;
- break;
- case SEEK_SET:
- dwOrigin = STREAM_SEEK_SET;
- break;
- default:
- return -1;
- }
-
- hr = ((IStream*)stream)->Seek (Move, dwOrigin, NULL);
- if (hr == S_OK){
- return 0;
- }
- else {
- return -1;
- }
- }
-
- long ZCALLBACK cb_stell (voidpf opaque, voidpf stream) {
- // IStream::Seek parameters
- HRESULT hr;
- LARGE_INTEGER Move;
- ULARGE_INTEGER NewPosition;
- Move.QuadPart = 0;
- NewPosition.QuadPart = 0;
-
- hr = ((IStream*)stream)->Seek (Move, STREAM_SEEK_CUR, &NewPosition);
- if (hr == S_OK){
- return (long) NewPosition.QuadPart;
- }
- else {
- return -1;
- }
- }
-
- int ZCALLBACK cb_sclose (voidpf opaque, voidpf stream) {
- return 0;
- }
-
- int ZCALLBACK cb_serror (voidpf opaque, voidpf stream) {
- return 0; //RJK - for now
- }
-
- uLong ZCALLBACK cb_swrite (voidpf opaque, voidpf stream, const void* buf, uLong size) {
- HRESULT hr;
- unsigned long writecount;
- hr = ((IStream*)stream)->Write (buf, size, &writecount);
- if (hr == S_OK)
- return (unsigned int)writecount;
- else
- return (uLong)0;
- }
-
- void fill_stream_filefunc (zlib_filefunc_def* pzlib_filefunc_def) {
- pzlib_filefunc_def->zopen_file = cb_sopen;
- pzlib_filefunc_def->zread_file = cb_sread;
- pzlib_filefunc_def->zwrite_file = cb_swrite;
- pzlib_filefunc_def->ztell_file = cb_stell;
- pzlib_filefunc_def->zseek_file = cb_sseek;
- pzlib_filefunc_def->zclose_file = cb_sclose;
- pzlib_filefunc_def->zerror_file = cb_serror;
- }
-}
-
diff --git a/shell/source/win32/shlxthandler/ooofilt/ooofilt.hxx b/shell/source/win32/shlxthandler/ooofilt/ooofilt.hxx
index 9f1566b406bd..b68863523b28 100644
--- a/shell/source/win32/shlxthandler/ooofilt/ooofilt.hxx
+++ b/shell/source/win32/shlxthandler/ooofilt/ooofilt.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ooofilt.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -96,7 +93,7 @@ enum FilterState
FilteringContent, // Filtering the content property
FilteringProperty // Filtering the pseudo property
};
-class COooFilter : public IFilter, public IPersistFile, public IPersistStream
+class COooFilter : public IFilter, public IPersistFile, public IPersistStream
{
public:
// From IUnknown
@@ -143,16 +140,16 @@ public:
virtual SCODE STDMETHODCALLTYPE GetCurFile(
LPWSTR * ppszFileName);
- // From IPersistStream
- virtual SCODE STDMETHODCALLTYPE Load(
- IStream *pStm);
-
- virtual SCODE STDMETHODCALLTYPE Save(
- IStream *pStm,
- BOOL fClearDirty);
-
- virtual SCODE STDMETHODCALLTYPE GetSizeMax(
- ULARGE_INTEGER *pcbSize);
+ // From IPersistStream
+ virtual SCODE STDMETHODCALLTYPE Load(
+ IStream *pStm);
+
+ virtual SCODE STDMETHODCALLTYPE Save(
+ IStream *pStm,
+ BOOL fClearDirty);
+
+ virtual SCODE STDMETHODCALLTYPE GetSizeMax(
+ ULARGE_INTEGER *pcbSize);
private:
@@ -177,7 +174,7 @@ private:
ULONG m_ChunkPosition; // Chunk pointer to specify the current Chunk;
ULONG m_cAttributes; // Count of attributes
CFullPropSpec * m_pAttributes; // Attributes to filter
- IStream * m_pStream;
+ IStream * m_pStream;
};
@@ -219,26 +216,3 @@ private:
long m_lRefs; // Reference count
};
-
-extern "C" {
-
- voidpf ZCALLBACK cb_sopen OF((voidpf opaque, const char * filename, int mode));
- uLong ZCALLBACK cb_sread OF((voidpf opaque, voidpf stream, void* vuf, uLong size));
- uLong ZCALLBACK cb_swrite OF((voidpf opaque, voidpf stream, const void* buf, uLong size));
- long ZCALLBACK cb_stell OF((voidpf opaque, voidpf stream));
- long ZCALLBACK cb_sseek OF((voidpf opaque, voidpf stream, uLong offset, int origin));
- int ZCALLBACK cb_sclose OF((voidpf opaque, voidpf stream));
- int ZCALLBACK cb_serror OF((voidpf opaque, voidpf stream));
-
- void fill_stream_filefunc (zlib_filefunc_def* pzlib_filefunc_def);
-
-}
-
-
-
-
-
-
-
-
-
diff --git a/shell/source/win32/shlxthandler/ooofilt/propspec.cxx b/shell/source/win32/shlxthandler/ooofilt/propspec.cxx
index 16e49dfdc21f..fd7a24f2711a 100644
--- a/shell/source/win32/shlxthandler/ooofilt/propspec.cxx
+++ b/shell/source/win32/shlxthandler/ooofilt/propspec.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: propspec.cxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/win32/shlxthandler/ooofilt/propspec.hxx b/shell/source/win32/shlxthandler/ooofilt/propspec.hxx
index 3f264a2f4da4..ba4c34233d64 100644
--- a/shell/source/win32/shlxthandler/ooofilt/propspec.hxx
+++ b/shell/source/win32/shlxthandler/ooofilt/propspec.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: propspec.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/win32/shlxthandler/ooofilt/proxy/exports.dxp b/shell/source/win32/shlxthandler/ooofilt/proxy/exports.dxp
deleted file mode 100644
index 953039ccc957..000000000000
--- a/shell/source/win32/shlxthandler/ooofilt/proxy/exports.dxp
+++ /dev/null
@@ -1,4 +0,0 @@
-DllRegisterServer PRIVATE
-DllUnregisterServer PRIVATE
-DllGetClassObject PRIVATE
-DllCanUnloadNow PRIVATE \ No newline at end of file
diff --git a/shell/source/win32/shlxthandler/ooofilt/proxy/makefile.mk b/shell/source/win32/shlxthandler/ooofilt/proxy/makefile.mk
deleted file mode 100644
index 54dc3d59a734..000000000000
--- a/shell/source/win32/shlxthandler/ooofilt/proxy/makefile.mk
+++ /dev/null
@@ -1,92 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2008 by Sun Microsystems, Inc.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.7 $
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..$/..$/..
-PRJNAME=shell
-TARGET=ooofiltproxy
-LIBTARGET=NO
-ENABLE_EXCEPTIONS=TRUE
-USE_DEFFILE=TRUE
-DYNAMIC_CRT=
-UWINAPILIB=
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-CFLAGS+=-DWIN32_LEAN_AND_MEAN -D_NTSDK -DUNICODE -D_UNICODE -D_WIN32_WINNT=0x0501
-CDEFS+=-D_WIN32_IE=0x501
-
-# --- Files --------------------------------------------------------
-
-SLOFILES=$(SLO)$/ooofiltproxy.obj
-SHL1TARGET=$(TARGET)
-SHL1STDLIBS=$(OLE32LIB)\
- $(ADVAPO32LIB)\
- $(COMCTL32LIB)\
- $(UUIDLIB)\
- $(SHELL32LIB)\
- $(KERNEL32LIB)
-
-SHL1DEPN=
-SHL1OBJS=$(SLOFILES)
-SHL1DEF=$(MISC)$/$(SHL1TARGET).def
-DEF1NAME=$(SHL1TARGET)
-DEF1EXPORTFILE=exports.dxp
-
-.IF "$(BUILD_X64)"!=""
-#------------- x64 stuff ----------------
-USE_DEFFILE_X64=TRUE
-CFLAGS_X64+=-DWIN32_LEAN_AND_MEAN -D_NTSDK -DUNICODE -D_UNICODE -D_WIN32_WINNT=0x0501
-CDEFS_X64+=-D_WIN32_IE=0x501
-
-SLOFILES_X64=$(SLO_X64)$/ooofiltproxy.obj
-SHL1TARGET_X64=$(TARGET)
-SHL1STDLIBS_X64=$(OLE32LIB_X64)\
- $(ADVAPO32LIB_X64)\
- $(COMCTL32LIB_X64)\
- $(UUIDLIB_X64)\
- $(SHELL32LIB_X64)\
- $(KERNEL32LIB_X64)\
- $(MSVCRT_X64)
-
-SHL1DEPN_X64=
-SHL1OBJS_X64=$(SLO_X64)$/ooofiltproxy.obj
-SHL1DEF_X64=$(MISC_X64)$/$(TARGET).def
-DEF1NAME_X64=$(TARGET)
-DEF1EXPORTFILE_X64=exports.dxp
-.ENDIF # "$(BUILD_X64)"!=""
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : set_wntx64.mk
-.INCLUDE : target.mk
-.INCLUDE : tg_wntx64.mk
diff --git a/shell/source/win32/shlxthandler/ooofilt/proxy/ooofiltproxy.cxx b/shell/source/win32/shlxthandler/ooofilt/proxy/ooofiltproxy.cxx
deleted file mode 100644
index 218ba500d368..000000000000
--- a/shell/source/win32/shlxthandler/ooofilt/proxy/ooofiltproxy.cxx
+++ /dev/null
@@ -1,166 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: ooofiltproxy.cxx,v $
- * $Revision: 1.8 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_shell.hxx"
-
-#if defined _MSC_VER
-#pragma warning(push, 1)
-#endif
-#include <windows.h>
-#if defined _MSC_VER
-#pragma warning(pop)
-#endif
-#include <tchar.h>
-#ifdef __MINGW32__
-#include <basetyps.h>
-#endif
-#include "internal/config.hxx"
-
-
-/*
- The indexing filter library ooofilt.dll is linked against a couple
- of libaries (e.g. stlport, uwinapi, ...) which are not standard on
- a windows system. Unfortunately the library will be loaded by the
- indexing service via LoadLibrary so that the libraries ooofilt.dll
- depends on need to be in one of the standard search directories or
- the <office installation> directory need to be added to the PATH
- environment variable. In order to prevent failures while loading
- the ooofilt.dll we're installing and registering this proxy library
- which will load ooofilt.dll using LoadLibraryEx with the flag
- LOAD_WITH_ALTERED_SEARCH_PATH (see MSDN for details). This approach
- ensures that all libraries ooofilt.dll depends on will be found.
-*/
-
-typedef HRESULT (__stdcall * Forward_DllGetClassObject_t)(REFCLSID cid, REFIID iid, void** ppvObj);
-typedef HRESULT (__stdcall * Forward_DllCanUnloadNow_t)();
-typedef HRESULT (__stdcall * Forward_DllRegisterServer_t)();
-typedef HRESULT (__stdcall * Forward_DllUnregisterServer_t)();
-
-Forward_DllGetClassObject_t Forward_DllGetClassObject = NULL;
-Forward_DllCanUnloadNow_t Forward_DllCanUnloadNow = NULL;
-Forward_DllRegisterServer_t Forward_DllRegisterServer = NULL;
-Forward_DllUnregisterServer_t Forward_DllUnregisterServer = NULL;
-
-HMODULE hOoofilt = NULL;
-HMODULE hThisLibrary = NULL;
-
-/* Truncates the file name from an absolute path but
- leaves the final '\' */
-void PathTruncateFileName(TCHAR* path)
-{
- TCHAR* p = path + lstrlen(path);
- while (*p != _T('\\')) p--;
- p++;
- *p = 0;
-}
-
-void Init()
-{
- if (Forward_DllGetClassObject == NULL)
- {
- TCHAR buff[MAX_PATH];
- GetModuleFileName(hThisLibrary, buff, (sizeof(buff)/sizeof(TCHAR)));
- PathTruncateFileName(buff);
-
- lstrcat(buff, MODULE_NAME_FILTER);
-
- hOoofilt = LoadLibraryEx(buff, NULL, LOAD_WITH_ALTERED_SEARCH_PATH);
-
- if (hOoofilt)
- {
- Forward_DllGetClassObject = reinterpret_cast<Forward_DllGetClassObject_t>(
- GetProcAddress(hOoofilt, "DllGetClassObject"));
- Forward_DllCanUnloadNow = reinterpret_cast<Forward_DllCanUnloadNow_t>(
- GetProcAddress(hOoofilt, "DllCanUnloadNow"));
- Forward_DllRegisterServer = reinterpret_cast<Forward_DllRegisterServer_t>(
- GetProcAddress(hOoofilt, "DllRegisterServer"));
- Forward_DllUnregisterServer = reinterpret_cast<Forward_DllUnregisterServer_t>(
- GetProcAddress(hOoofilt, "DllUnregisterServer"));
- }
- }
-}
-
-extern "C" BOOL WINAPI DllMain(HMODULE hInstance, DWORD fdwReason, LPVOID /*lpvReserved*/)
-{
- switch (fdwReason)
- {
- case DLL_PROCESS_ATTACH:
- DisableThreadLibraryCalls( hInstance );
- hThisLibrary = hInstance;
- break;
- case DLL_PROCESS_DETACH:
- if (hOoofilt)
- FreeLibrary(hOoofilt);
- break;
- default:
- break;
- }
- return TRUE;
-}
-
-extern "C" HRESULT __stdcall DllGetClassObject(REFCLSID cid, REFIID iid, void** ppvObj)
-{
- Init();
-
- if (Forward_DllGetClassObject)
- return Forward_DllGetClassObject(cid, iid, ppvObj);
- else
- return E_FAIL;
-}
-
-extern "C" HRESULT __stdcall DllCanUnloadNow()
-{
- Init();
-
- if (Forward_DllCanUnloadNow)
- return Forward_DllCanUnloadNow();
- else
- return E_FAIL;
-}
-
-extern "C" HRESULT __stdcall DllRegisterServer()
-{
- Init();
- if (Forward_DllRegisterServer)
- return Forward_DllRegisterServer();
- else
- return E_FAIL;
-}
-
-extern "C" HRESULT __stdcall DllUnregisterServer()
-{
- Init();
-
- if (Forward_DllUnregisterServer)
- return Forward_DllUnregisterServer();
- else
- return E_FAIL;
-}
diff --git a/shell/source/win32/shlxthandler/ooofilt/stream_helper.cxx b/shell/source/win32/shlxthandler/ooofilt/stream_helper.cxx
new file mode 100644
index 000000000000..e12f95a88e50
--- /dev/null
+++ b/shell/source/win32/shlxthandler/ooofilt/stream_helper.cxx
@@ -0,0 +1,181 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2010 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_shell.hxx"
+
+#if defined _MSC_VER
+#pragma warning(push, 1)
+#endif
+#include <windows.h>
+#if defined _MSC_VER
+#pragma warning(pop)
+#endif
+
+#include <stdio.h>
+#include <objidl.h>
+
+/*#include <string.h>
+#include <filter.h>
+#include <filterr.h>
+#include <ntquery.h>
+#include "assert.h"
+#include "propspec.hxx"
+#ifdef __MINGW32__
+#include <algorithm>
+using ::std::min;
+#endif
+*/
+
+#include "internal/stream_helper.hxx"
+
+extern "C" {
+ voidpf ZCALLBACK cb_sopen OF((voidpf opaque, const char * filename, int mode));
+ uLong ZCALLBACK cb_sread OF((voidpf opaque, voidpf stream, void* vuf, uLong size));
+ uLong ZCALLBACK cb_swrite OF((voidpf opaque, voidpf stream, const void* buf, uLong size));
+ long ZCALLBACK cb_stell OF((voidpf opaque, voidpf stream));
+ long ZCALLBACK cb_sseek OF((voidpf opaque, voidpf stream, uLong offset, int origin));
+ int ZCALLBACK cb_sclose OF((voidpf opaque, voidpf stream));
+ int ZCALLBACK cb_serror OF((voidpf opaque, voidpf stream));
+
+ void fill_stream_filefunc (zlib_filefunc_def* pzlib_filefunc_def);
+}
+
+//-----------------------------
+IStream* PrepareIStream( IStream* pStream, zlib_filefunc_def &zFileFunc )
+{
+ // These next few lines work around the "Seek pointer" bug found on Vista.
+ char cBuf[20];
+ unsigned long nCount;
+ HRESULT hr;
+ ULARGE_INTEGER nNewPosition;
+ LARGE_INTEGER nMove;
+ nMove.QuadPart = 0;
+ hr = pStream->Seek( nMove, STREAM_SEEK_SET, &nNewPosition );
+ hr = pStream->Read( cBuf, 20, &nCount );
+
+ fill_stream_filefunc( &zFileFunc );
+ zFileFunc.opaque = (void*)pStream;
+
+ return pStream;
+}
+
+extern "C" {
+
+ // IStream callback
+ voidpf ZCALLBACK cb_sopen (voidpf opaque, const char* /*filename*/, int /*mode*/) {
+ return opaque;
+ }
+
+ uLong ZCALLBACK cb_sread (voidpf /*opaque*/, voidpf stream, void* buf, uLong size) {
+ unsigned long newsize;
+ HRESULT hr;
+
+ hr = ((IStream *)stream)->Read (buf, size, &newsize);
+ if (hr == S_OK){
+ return (unsigned long)newsize;
+ }
+ else {
+ return (uLong)0;
+ }
+ }
+
+ long ZCALLBACK cb_sseek (voidpf /*opaque*/, voidpf stream, uLong offset, int origin) {
+ // IStream::Seek parameters
+ HRESULT hr;
+ LARGE_INTEGER Move;
+ DWORD dwOrigin;
+ Move.QuadPart = (__int64)offset;
+
+ switch (origin) {
+ case SEEK_CUR:
+ dwOrigin = STREAM_SEEK_CUR;
+ break;
+ case SEEK_END:
+ dwOrigin = STREAM_SEEK_END;
+ break;
+ case SEEK_SET:
+ dwOrigin = STREAM_SEEK_SET;
+ break;
+ default:
+ return -1;
+ }
+
+ hr = ((IStream*)stream)->Seek (Move, dwOrigin, NULL);
+ if (hr == S_OK){
+ return 0;
+ }
+ else {
+ return -1;
+ }
+ }
+
+ long ZCALLBACK cb_stell (voidpf /*opaque*/, voidpf stream) {
+ // IStream::Seek parameters
+ HRESULT hr;
+ LARGE_INTEGER Move;
+ ULARGE_INTEGER NewPosition;
+ Move.QuadPart = 0;
+ NewPosition.QuadPart = 0;
+
+ hr = ((IStream*)stream)->Seek (Move, STREAM_SEEK_CUR, &NewPosition);
+ if (hr == S_OK){
+ return (long) NewPosition.QuadPart;
+ }
+ else {
+ return -1;
+ }
+ }
+
+ int ZCALLBACK cb_sclose (voidpf /*opaque*/, voidpf /*stream*/) {
+ return 0;
+ }
+
+ int ZCALLBACK cb_serror (voidpf /*opaque*/, voidpf /*stream*/) {
+ return 0; //RJK - for now
+ }
+
+ uLong ZCALLBACK cb_swrite (voidpf /*opaque*/, voidpf stream, const void* buf, uLong size) {
+ HRESULT hr;
+ unsigned long writecount;
+ hr = ((IStream*)stream)->Write (buf, size, &writecount);
+ if (hr == S_OK)
+ return (unsigned int)writecount;
+ else
+ return (uLong)0;
+ }
+
+ void fill_stream_filefunc (zlib_filefunc_def* pzlib_filefunc_def) {
+ pzlib_filefunc_def->zopen_file = cb_sopen;
+ pzlib_filefunc_def->zread_file = cb_sread;
+ pzlib_filefunc_def->zwrite_file = cb_swrite;
+ pzlib_filefunc_def->ztell_file = cb_stell;
+ pzlib_filefunc_def->zseek_file = cb_sseek;
+ pzlib_filefunc_def->zclose_file = cb_sclose;
+ pzlib_filefunc_def->zerror_file = cb_serror;
+ }
+}
diff --git a/shell/source/win32/shlxthandler/prophdl/exports.dxp b/shell/source/win32/shlxthandler/prophdl/exports.dxp
new file mode 100644
index 000000000000..2ada8255f8f7
--- /dev/null
+++ b/shell/source/win32/shlxthandler/prophdl/exports.dxp
@@ -0,0 +1,2 @@
+DllGetClassObject PRIVATE
+DllCanUnloadNow PRIVATE \ No newline at end of file
diff --git a/shell/source/win32/shlxthandler/prophdl/makefile.mk b/shell/source/win32/shlxthandler/prophdl/makefile.mk
new file mode 100644
index 000000000000..dc6d0e159046
--- /dev/null
+++ b/shell/source/win32/shlxthandler/prophdl/makefile.mk
@@ -0,0 +1,142 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2010 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+PRJ=..$/..$/..$/..
+PRJNAME=shell
+TARGET=propertyhdl
+LIBTARGET=NO
+ENABLE_EXCEPTIONS=TRUE
+NO_DEFAULT_STL=YES
+USE_DEFFILE=TRUE
+.IF "$(BUILD_X64)"!=""
+USE_DEFFILE_X64=TRUE
+.ENDIF
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+
+UWINAPILIB =
+UWINAPILIB_X64 =
+
+CFLAGS+=-DISOLATION_AWARE_ENABLED -DWIN32_LEAN_AND_MEAN -DXML_UNICODE -D_NTSDK -DUNICODE -D_UNICODE -D_WIN32_WINNT=0x0501
+CFLAGS+=-wd4710 -wd4711 -wd4514 -wd4619 -wd4217 -wd4820 -wd4100
+CDEFS+=-D_WIN32_IE=0x501
+
+# --- Files --------------------------------------------------------
+
+SLOFILES=$(SLO)$/$(TARGET).obj\
+ $(SLO)$/stream_helper.obj
+
+SHL1TARGET=$(TARGET)
+
+.IF "$(COM)"=="GCC"
+SHL1STDLIBS=$(ZLIB3RDLIB) $(EXPAT3RDLIB) $(COMCTL32LIB)
+SHL1LIBS=
+.ELSE
+SHL1STDLIBS=
+SHL1LIBS=$(SOLARLIBDIR)$/zlib.lib\
+ $(SOLARLIBDIR)$/expat_xmlparse.lib\
+ $(SOLARLIBDIR)$/expat_xmltok.lib
+.ENDIF
+SHL1STDLIBS+=\
+ $(OLEAUT32LIB)\
+ $(ADVAPI32LIB)\
+ $(OLE32LIB)\
+ $(UUIDLIB)\
+ $(SHELL32LIB)\
+ $(KERNEL32LIB)\
+ $(GDI32LIB)\
+ $(GDIPLUSLIB)\
+ $(SHLWAPILIB)\
+ $(PROPSYSLIB)
+
+.IF "$(COM)"!="GCC"
+SHL1STDLIBS+=\
+ msvcprt.lib
+
+.IF "$(PRODUCT)"!="full"
+SHL1STDLIBS+=msvcrt.lib
+.ENDIF
+.ENDIF
+
+SHL1LIBS+=$(SLB)$/util.lib\
+ $(SLB)$/ooofilereader.lib
+
+SHL1DEPN=
+SHL1OBJS=$(SLOFILES)
+SHL1DEF=$(MISC)$/$(SHL1TARGET).def
+DEF1NAME=$(SHL1TARGET)
+DEF1EXPORTFILE=exports.dxp
+
+# -------------------- x64 -----------------------
+.IF "$(BUILD_X64)"!=""
+CFLAGS_X64+=-DISOLATION_AWARE_ENABLED -DWIN32_LEAN_AND_MEAN -DXML_UNICODE -D_NTSDK -DUNICODE -D_UNICODE -D_WIN32_WINNT=0x0501
+CFLAGS_X64+=-wd4710 -wd4711 -wd4514 -wd4619 -wd4217 -wd4820
+CDEFS_X64+=-D_WIN32_IE=0x501
+SLOFILES_X64=$(SLO_X64)$/$(TARGET).obj
+
+SLOFILES_X64= \
+ $(SLO_X64)$/propertyhdl.obj\
+ $(SLO_X64)$/stream_helper.obj\
+
+SHL1TARGET_X64=$(TARGET)
+SHL1LIBS_X64=$(SOLARLIBDIR_X64)$/zlib.lib\
+ $(SOLARLIBDIR_X64)$/expat_xmlparse.lib\
+ $(SOLARLIBDIR_X64)$/expat_xmltok.lib
+
+SHL1STDLIBS_X64+=\
+ $(OLEAUT32LIB_X64)\
+ $(ADVAPI32LIB_X64)\
+ $(OLE32LIB_X64)\
+ $(UUIDLIB_X64)\
+ $(SHELL32LIB_X64)\
+ $(KERNEL32LIB_X64)\
+ $(GDI32LIB_X64)\
+ $(USER32LIB_X64) \
+ $(GDIPLUSLIB_X64) \
+ $(MSVCRT_X64) \
+ $(MSVCPRT_X64) \
+ $(OLDNAMESLIB_X64)\
+ $(PROPSYSLIB_X64)
+
+SHL1LIBS_X64+=$(SLB_X64)$/util.lib\
+ $(SLB_X64)$/ooofilereader.lib
+SHL1OBJS_X64=$(SLOFILES_X64)
+SHL1DEF_X64=$(MISC_X64)$/$(SHL1TARGET).def
+
+DEF1NAME_X64=$(SHL1TARGET_X64)
+DEF1EXPORTFILE_X64=exports.dxp
+
+.ENDIF # "$(BUILD_X64)"!=""
+
+# --- Targets ------------------------------------------------------
+.INCLUDE : set_wntx64.mk
+.INCLUDE : target.mk
+INCLUDE!:=$(subst,/stl, $(INCLUDE))
+.EXPORT : INCLUDE
+.INCLUDE : tg_wntx64.mk
diff --git a/shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx b/shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx
new file mode 100644
index 000000000000..3f495a7aa53d
--- /dev/null
+++ b/shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx
@@ -0,0 +1,463 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2010 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_shell.hxx"
+#include "internal/global.hxx"
+#include "internal/PropertyHdl.hxx"
+#include "internal/fileextensions.hxx"
+#include "internal/metainforeader.hxx"
+#include "internal/utilities.hxx"
+#include "internal/config.hxx"
+
+#include <propkey.h>
+#include <propvarutil.h>
+
+#include <malloc.h>
+#include <strsafe.h>
+
+#include "internal/stream_helper.hxx"
+
+//---------------------------
+// Module global
+//---------------------------
+long g_DllRefCnt = 0;
+HINSTANCE g_hModule = NULL;
+
+//
+// Map of property keys to the locations of their value(s) in the .??? XML schema
+//
+struct PROPERTYMAP
+{
+ PROPERTYKEY key;
+ PCWSTR pszXPathParent;
+ PCWSTR pszValueNodeName;
+};
+
+PROPERTYMAP g_rgPROPERTYMAP[] =
+{
+ { PKEY_Title, L"OpenOffice.org", L"Title" },
+ { PKEY_Author, L"OpenOffice.org", L"Author" },
+ { PKEY_Subject, L"OpenOffice.org", L"Subject" },
+ { PKEY_Keywords, L"OpenOffice.org", L"Keyword" },
+ { PKEY_Comment, L"OpenOffice.org", L"Comments" },
+};
+
+size_t gPropertyMapTableSize = sizeof(g_rgPROPERTYMAP)/sizeof(g_rgPROPERTYMAP[0]);
+
+//----------------------------
+//
+//----------------------------
+
+CPropertyHdl::CPropertyHdl( long nRefCnt ) :
+ m_RefCnt( nRefCnt ),
+ m_pCache( NULL )
+{
+ OutputDebugStringFormat( "CPropertyHdl: CTOR\n" );
+ InterlockedIncrement( &g_DllRefCnt );
+}
+
+//----------------------------
+//
+//----------------------------
+
+CPropertyHdl::~CPropertyHdl()
+{
+ if ( m_pCache )
+ {
+ m_pCache->Release();
+ m_pCache = NULL;
+ }
+ InterlockedDecrement( &g_DllRefCnt );
+}
+
+//-----------------------------
+// IUnknown methods
+//-----------------------------
+HRESULT STDMETHODCALLTYPE CPropertyHdl::QueryInterface(REFIID riid, void __RPC_FAR *__RPC_FAR *ppvObject)
+{
+ *ppvObject = 0;
+
+ if (IID_IUnknown == riid || IID_IPropertyStore == riid)
+ {
+ OutputDebugStringFormat( "CPropertyHdl: QueryInterface (IID_IPropertyStore)\n" );
+ IUnknown* pUnk = static_cast<IPropertyStore*>(this);
+ pUnk->AddRef();
+ *ppvObject = pUnk;
+ return S_OK;
+ }
+ else if (IID_IPropertyStoreCapabilities == riid)
+ {
+ OutputDebugStringFormat( "CPropertyHdl: QueryInterface (IID_IPropertyStoreCapabilities)\n" );
+ IUnknown* pUnk = static_cast<IPropertyStore*>(this);
+ pUnk->AddRef();
+ *ppvObject = pUnk;
+ return S_OK;
+ }
+ else if (IID_IInitializeWithStream == riid)
+ {
+ OutputDebugStringFormat( "CPropertyHdl: QueryInterface (IID_IInitializeWithStream)\n" );
+ IUnknown* pUnk = static_cast<IInitializeWithStream*>(this);
+ pUnk->AddRef();
+ *ppvObject = pUnk;
+ return S_OK;
+ }
+ OutputDebugStringFormat( "CPropertyHdl: QueryInterface (something different)\n" );
+
+ return E_NOINTERFACE;
+}
+
+//----------------------------
+ULONG STDMETHODCALLTYPE CPropertyHdl::AddRef( void )
+{
+ return InterlockedIncrement( &m_RefCnt );
+}
+
+//----------------------------
+ULONG STDMETHODCALLTYPE CPropertyHdl::Release( void )
+{
+ long refcnt = InterlockedDecrement( &m_RefCnt );
+
+ if ( 0 == m_RefCnt )
+ delete this;
+
+ return refcnt;
+}
+
+//-----------------------------
+// IPropertyStore
+//-----------------------------
+HRESULT STDMETHODCALLTYPE CPropertyHdl::GetCount( DWORD *pcProps )
+{
+ HRESULT hr = E_UNEXPECTED;
+ if ( m_pCache && pcProps )
+ {
+ hr = m_pCache->GetCount( pcProps );
+ }
+
+ return hr;
+}
+
+//-----------------------------
+HRESULT STDMETHODCALLTYPE CPropertyHdl::GetAt( DWORD iProp, PROPERTYKEY *pKey )
+{
+ HRESULT hr = E_UNEXPECTED;
+ if ( m_pCache )
+ {
+ hr = m_pCache->GetAt( iProp, pKey );
+ }
+
+ return hr;
+}
+
+//-----------------------------
+HRESULT STDMETHODCALLTYPE CPropertyHdl::GetValue( REFPROPERTYKEY key, PROPVARIANT *pPropVar )
+{
+ HRESULT hr = E_UNEXPECTED;
+ if ( m_pCache )
+ {
+ hr = m_pCache->GetValue( key, pPropVar );
+ }
+
+ return hr;
+}
+
+//-----------------------------
+HRESULT STDMETHODCALLTYPE CPropertyHdl::SetValue( REFPROPERTYKEY key, REFPROPVARIANT propVar )
+{
+ HRESULT hr = E_UNEXPECTED;
+ if ( m_pCache )
+ {
+ hr = STG_E_ACCESSDENIED;
+ }
+ return hr;
+}
+
+//-----------------------------
+HRESULT STDMETHODCALLTYPE CPropertyHdl::Commit()
+{
+ return S_OK;
+}
+
+//-----------------------------
+// IPropertyStore
+//-----------------------------
+HRESULT STDMETHODCALLTYPE CPropertyHdl::IsPropertyWritable( REFPROPERTYKEY key )
+{
+ // We start with read only properties only
+ return S_FALSE;
+}
+
+//-----------------------------
+// IInitializeWithStream
+//-----------------------------
+HRESULT STDMETHODCALLTYPE CPropertyHdl::Initialize( IStream *pStream, DWORD grfMode )
+{
+ if ( grfMode & STGM_READWRITE )
+ return STG_E_ACCESSDENIED;
+
+ if ( !m_pCache )
+ {
+#ifdef __MINGW32__
+ if ( FAILED( PSCreateMemoryPropertyStore( IID_IPropertyStoreCache, reinterpret_cast<void**>(&m_pCache) ) ) )
+#else
+ if ( FAILED( PSCreateMemoryPropertyStore( IID_PPV_ARGS( &m_pCache ) ) ) )
+#endif
+ OutputDebugStringFormat( "CPropertyHdl::Initialize: PSCreateMemoryPropertyStore failed" );
+
+ zlib_filefunc_def z_filefunc;
+ pStream = PrepareIStream( pStream, z_filefunc );
+
+ CMetaInfoReader *pMetaInfoReader = NULL;
+
+ try
+ {
+ pMetaInfoReader = new CMetaInfoReader( (void*)pStream, &z_filefunc );
+ }
+ catch (const std::exception& e)
+ {
+ OutputDebugStringFormat( "CPropertyHdl::Initialize: Caught exception [%s]", e.what() );
+ return E_FAIL;
+ }
+
+ LoadProperties( pMetaInfoReader );
+/*
+ // load extended properties and search content
+ _LoadExtendedProperties();
+ _LoadSearchContent();
+*/
+ }
+
+ return S_OK;
+}
+
+//-----------------------------
+void CPropertyHdl::LoadProperties( CMetaInfoReader *pMetaInfoReader )
+{
+ OutputDebugStringFormat( "CPropertyHdl: LoadProperties\n" );
+ PROPVARIANT propvarValues;
+
+ for ( UINT i = 0; i < (UINT)gPropertyMapTableSize; ++i )
+ {
+ PropVariantClear( &propvarValues );
+ HRESULT hr = GetItemData( pMetaInfoReader, i, &propvarValues);
+ if (hr == S_OK)
+ {
+ // coerce the value(s) to the appropriate type for the property key
+ hr = PSCoerceToCanonicalValue( g_rgPROPERTYMAP[i].key, &propvarValues );
+ if (SUCCEEDED(hr))
+ {
+ // cache the value(s) loaded
+ hr = m_pCache->SetValueAndState( g_rgPROPERTYMAP[i].key, &propvarValues, PSC_NORMAL );
+ }
+ }
+ }
+}
+
+//-----------------------------
+HRESULT CPropertyHdl::GetItemData( CMetaInfoReader *pMetaInfoReader, UINT nIndex, PROPVARIANT *pVarData )
+{
+ switch (nIndex) {
+ case 0: {
+ pVarData->vt = VT_BSTR;
+ pVarData->bstrVal = SysAllocString( pMetaInfoReader->getTagData( META_INFO_TITLE ).c_str() );
+ OutputDebugStringFormat( "CPropertyHdl::GetItemData: Title=%S.\n", pMetaInfoReader->getTagData( META_INFO_TITLE ).c_str() );
+ return S_OK;
+ }
+ case 1: {
+ pVarData->vt = VT_BSTR;
+ pVarData->bstrVal = SysAllocString( pMetaInfoReader->getTagData( META_INFO_AUTHOR ).c_str() );
+ OutputDebugStringFormat( "CPropertyHdl::GetItemData: Author=%S.\n", pMetaInfoReader->getTagData( META_INFO_AUTHOR ).c_str() );
+ return S_OK;
+ }
+ case 2: {
+ pVarData->vt = VT_BSTR;
+ pVarData->bstrVal = SysAllocString( pMetaInfoReader->getTagData( META_INFO_SUBJECT ).c_str() );
+ OutputDebugStringFormat( "CPropertyHdl::GetItemData: Subject=%S.\n", pMetaInfoReader->getTagData( META_INFO_SUBJECT ).c_str() );
+ return S_OK;
+ }
+ case 3: {
+ pVarData->vt = VT_BSTR;
+ pVarData->bstrVal = SysAllocString( pMetaInfoReader->getTagData( META_INFO_KEYWORDS ).c_str() );
+ OutputDebugStringFormat( "CPropertyHdl::GetItemData: Keywords=%S.\n", pMetaInfoReader->getTagData( META_INFO_KEYWORDS ).c_str() );
+ return S_OK;
+ }
+ case 4: {
+ pVarData->vt = VT_BSTR;
+ pVarData->bstrVal = SysAllocString( pMetaInfoReader->getTagData( META_INFO_DESCRIPTION ).c_str() );
+ OutputDebugStringFormat( "CPropertyHdl::GetItemData: Description=%S.\n", pMetaInfoReader->getTagData( META_INFO_DESCRIPTION ).c_str() );
+ return S_OK;
+ }
+ case 5: {
+ pVarData->vt = VT_BSTR;
+ pVarData->bstrVal = SysAllocString( pMetaInfoReader->getTagAttribute( META_INFO_DOCUMENT_STATISTIC, META_INFO_PAGES ).c_str() );
+ OutputDebugStringFormat( "CPropertyHdl::GetItemData: Pages=%S.\n", pMetaInfoReader->getTagAttribute( META_INFO_DOCUMENT_STATISTIC, META_INFO_PAGES ).c_str() );
+ return S_OK;
+ }
+ }
+
+ return S_FALSE;
+}
+
+//-----------------------------------------------------------------------------
+// CClassFactory
+//-----------------------------------------------------------------------------
+
+long CClassFactory::s_ServerLocks = 0;
+
+//-----------------------------------------------------------------------------
+CClassFactory::CClassFactory( const CLSID& clsid ) :
+ m_RefCnt(1),
+ m_Clsid(clsid)
+{
+ InterlockedIncrement( &g_DllRefCnt );
+}
+
+//-----------------------------------------------------------------------------
+CClassFactory::~CClassFactory()
+{
+ InterlockedDecrement( &g_DllRefCnt );
+}
+
+//-----------------------------------------------------------------------------
+// IUnknown methods
+//-----------------------------------------------------------------------------
+HRESULT STDMETHODCALLTYPE CClassFactory::QueryInterface( REFIID riid, void __RPC_FAR *__RPC_FAR *ppvObject )
+{
+ *ppvObject = 0;
+
+ if ( IID_IUnknown == riid || IID_IClassFactory == riid )
+ {
+ IUnknown* pUnk = this;
+ pUnk->AddRef();
+ *ppvObject = pUnk;
+ return S_OK;
+ }
+
+ return E_NOINTERFACE;
+}
+
+//-----------------------------------------------------------------------------
+ULONG STDMETHODCALLTYPE CClassFactory::AddRef( void )
+{
+ return InterlockedIncrement( &m_RefCnt );
+}
+
+//-----------------------------------------------------------------------------
+ULONG STDMETHODCALLTYPE CClassFactory::Release( void )
+{
+ long refcnt = InterlockedDecrement( &m_RefCnt );
+
+ if (0 == refcnt)
+ delete this;
+
+ return refcnt;
+}
+
+//-----------------------------------------------------------------------------
+// IClassFactory methods
+//-----------------------------------------------------------------------------
+HRESULT STDMETHODCALLTYPE CClassFactory::CreateInstance(
+ IUnknown __RPC_FAR *pUnkOuter,
+ REFIID riid,
+ void __RPC_FAR *__RPC_FAR *ppvObject)
+{
+ if ( pUnkOuter != NULL )
+ return CLASS_E_NOAGGREGATION;
+
+ IUnknown* pUnk = 0;
+
+ if ( CLSID_PROPERTY_HANDLER == m_Clsid )
+ pUnk = static_cast<IPropertyStore*>( new CPropertyHdl() );
+
+ POST_CONDITION(pUnk != 0, "Could not create COM object");
+
+ if (0 == pUnk)
+ return E_OUTOFMEMORY;
+
+ HRESULT hr = pUnk->QueryInterface( riid, ppvObject );
+
+ // if QueryInterface failed the component will destroy itself
+ pUnk->Release();
+
+ return hr;
+}
+
+//-----------------------------------------------------------------------------
+HRESULT STDMETHODCALLTYPE CClassFactory::LockServer( BOOL fLock )
+{
+ if ( fLock )
+ InterlockedIncrement( &s_ServerLocks );
+ else
+ InterlockedDecrement( &s_ServerLocks );
+
+ return S_OK;
+}
+
+//-----------------------------------------------------------------------------
+bool CClassFactory::IsLocked()
+{
+ return ( s_ServerLocks > 0 );
+}
+
+//-----------------------------------------------------------------------------
+extern "C" STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void** ppv)
+{
+ OutputDebugStringFormat( "DllGetClassObject.\n" );
+ *ppv = 0;
+
+ if ( rclsid != CLSID_PROPERTY_HANDLER )
+ return CLASS_E_CLASSNOTAVAILABLE;
+
+ if ( (riid != IID_IUnknown) && (riid != IID_IClassFactory) )
+ return E_NOINTERFACE;
+
+ IUnknown* pUnk = new CClassFactory( rclsid );
+ if ( 0 == pUnk )
+ return E_OUTOFMEMORY;
+
+ *ppv = pUnk;
+ return S_OK;
+}
+
+//-----------------------------------------------------------------------------
+extern "C" STDAPI DllCanUnloadNow( void )
+{
+ OutputDebugStringFormat( "DllCanUnloadNow.\n" );
+ if (CClassFactory::IsLocked() || g_DllRefCnt > 0)
+ return S_FALSE;
+
+ return S_OK;
+}
+
+//-----------------------------------------------------------------------------
+BOOL WINAPI DllMain( HINSTANCE hInst, ULONG /*ul_reason_for_call*/, LPVOID /*lpReserved*/ )
+{
+ OutputDebugStringFormat( "DllMain.\n" );
+ g_hModule = hInst;
+ return TRUE;
+}
diff --git a/shell/source/win32/shlxthandler/propsheets/document_statistic.cxx b/shell/source/win32/shlxthandler/propsheets/document_statistic.cxx
index 37523a9539de..1e41f478b95b 100644
--- a/shell/source/win32/shlxthandler/propsheets/document_statistic.cxx
+++ b/shell/source/win32/shlxthandler/propsheets/document_statistic.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: document_statistic.cxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/win32/shlxthandler/propsheets/document_statistic.hxx b/shell/source/win32/shlxthandler/propsheets/document_statistic.hxx
index 2773eafabc97..0b3a3dd96c07 100644
--- a/shell/source/win32/shlxthandler/propsheets/document_statistic.hxx
+++ b/shell/source/win32/shlxthandler/propsheets/document_statistic.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: document_statistic.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/win32/shlxthandler/propsheets/listviewbuilder.cxx b/shell/source/win32/shlxthandler/propsheets/listviewbuilder.cxx
index 2b10fdceba5c..5d3d365beb62 100644
--- a/shell/source/win32/shlxthandler/propsheets/listviewbuilder.cxx
+++ b/shell/source/win32/shlxthandler/propsheets/listviewbuilder.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: listviewbuilder.cxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/win32/shlxthandler/propsheets/listviewbuilder.hxx b/shell/source/win32/shlxthandler/propsheets/listviewbuilder.hxx
index d7357485b342..c764ff9809ad 100644
--- a/shell/source/win32/shlxthandler/propsheets/listviewbuilder.hxx
+++ b/shell/source/win32/shlxthandler/propsheets/listviewbuilder.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: listviewbuilder.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/win32/shlxthandler/propsheets/makefile.mk b/shell/source/win32/shlxthandler/propsheets/makefile.mk
index ac12795cf37f..55a31c9c59d3 100644
--- a/shell/source/win32/shlxthandler/propsheets/makefile.mk
+++ b/shell/source/win32/shlxthandler/propsheets/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.6 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
@@ -39,13 +35,14 @@ ENABLE_EXCEPTIONS=TRUE
.INCLUDE : settings.mk
-CFLAGS+=-DISOLATION_AWARE_ENABLED -DWIN32_LEAN_AND_MEAN -DXML_UNICODE -D_NTSDK -DUNICODE -D_UNICODE -D_WIN32_WINNT=0x0501
+CFLAGS+=-DISOLATION_AWARE_ENABLED -DWIN32_LEAN_AND_MEAN -DXML_UNICODE -D_NTSDK -DUNICODE -D_UNICODE
+CDEFS+=-U_WIN32_WINNT -D_WIN32_WINNT=0x0501 -U_WIN32_IE -D_WIN32_IE=0x501
+.IF "$(COM)"!="GCC"
CFLAGS+=-wd4710 -wd4711 -wd4514 -wd4619 -wd4217 -wd4820
-CDEFS+=-D_WIN32_IE=0x501
-
-CFLAGS_X64+=-DISOLATION_AWARE_ENABLED -DWIN32_LEAN_AND_MEAN -DXML_UNICODE -D_NTSDK -DUNICODE -D_UNICODE -D_WIN32_WINNT=0x0501
+CFLAGS_X64+=-DISOLATION_AWARE_ENABLED -DWIN32_LEAN_AND_MEAN -DXML_UNICODE -D_NTSDK -DUNICODE -D_UNICODE
CFLAGS_X64+=-wd4710 -wd4711 -wd4514 -wd4619 -wd4217 -wd4820
-CDEFS_X64+=-D_WIN32_IE=0x501
+CDEFS_X64+=-D_WIN32_WINNT=0x0501 -D_WIN32_IE=0x501
+.ENDIF
# --- Files --------------------------------------------------------
@@ -63,4 +60,6 @@ SLOFILES_X64=$(SLO_X64)$/propsheets.obj\
.INCLUDE : set_wntx64.mk
.INCLUDE : target.mk
+INCLUDE!:=$(subst,/stl, $(INCLUDE))
+.EXPORT : INCLUDE
.INCLUDE : tg_wntx64.mk \ No newline at end of file
diff --git a/shell/source/win32/shlxthandler/propsheets/propsheets.cxx b/shell/source/win32/shlxthandler/propsheets/propsheets.cxx
index d854694d8394..a45c7967f233 100644
--- a/shell/source/win32/shlxthandler/propsheets/propsheets.cxx
+++ b/shell/source/win32/shlxthandler/propsheets/propsheets.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: propsheets.cxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -51,6 +48,7 @@
#include <string>
#include <vector>
#include <utility>
+#include <strsafe.h>
/*---------------------------------------------
@@ -70,6 +68,7 @@
CPropertySheet::CPropertySheet(long RefCnt) :
m_RefCnt(RefCnt)
{
+ OutputDebugStringFormat("CPropertySheet::CTor [%d], [%d]", m_RefCnt, g_DllRefCnt );
InterlockedIncrement(&g_DllRefCnt);
}
@@ -79,6 +78,7 @@ CPropertySheet::CPropertySheet(long RefCnt) :
CPropertySheet::~CPropertySheet()
{
+ OutputDebugStringFormat("CPropertySheet::DTor [%d], [%d]", m_RefCnt, g_DllRefCnt );
InterlockedDecrement(&g_DllRefCnt);
}
@@ -116,6 +116,7 @@ HRESULT STDMETHODCALLTYPE CPropertySheet::QueryInterface(
ULONG STDMETHODCALLTYPE CPropertySheet::AddRef(void)
{
+ OutputDebugStringFormat("CPropertySheet::AddRef [%d]", m_RefCnt );
return InterlockedIncrement(&m_RefCnt);
}
@@ -125,6 +126,7 @@ ULONG STDMETHODCALLTYPE CPropertySheet::AddRef(void)
ULONG STDMETHODCALLTYPE CPropertySheet::Release(void)
{
+ OutputDebugStringFormat("CPropertySheet::Release [%d]", m_RefCnt );
long refcnt = InterlockedDecrement(&m_RefCnt);
if (0 == refcnt)
@@ -177,41 +179,51 @@ HRESULT STDMETHODCALLTYPE CPropertySheet::Initialize(
HRESULT STDMETHODCALLTYPE CPropertySheet::AddPages(LPFNADDPROPSHEETPAGE lpfnAddPage, LPARAM lParam)
{
- PROPSHEETPAGE psp;
+ // Get OS version (we don't need the summary page on Windows Vista or later)
+ OSVERSIONINFO sInfoOS;
- // add the summary property page
+ ZeroMemory( &sInfoOS, sizeof(OSVERSIONINFO) );
+ sInfoOS.dwOSVersionInfoSize = sizeof( OSVERSIONINFO );
+ GetVersionEx( &sInfoOS );
+ bool bIsVistaOrLater = (sInfoOS.dwMajorVersion >= 6);
- ZeroMemory(&psp, sizeof(PROPSHEETPAGEA));
+ std::wstring proppage_header;
- std::wstring proppage_header = GetResString(IDS_PROPPAGE_SUMMARY_TITLE);
+ PROPSHEETPAGE psp;
+ ZeroMemory(&psp, sizeof(PROPSHEETPAGEA));
+ // add the summary property page
psp.dwSize = sizeof(PROPSHEETPAGE);
psp.dwFlags = PSP_DEFAULT | PSP_USETITLE | PSP_USECALLBACK;
psp.hInstance = GetModuleHandle(MODULE_NAME);
- psp.pszTemplate = MAKEINTRESOURCE(IDD_PROPPAGE_SUMMARY);
- psp.pszTitle = proppage_header.c_str();
- psp.pfnDlgProc = reinterpret_cast<DLGPROC>(CPropertySheet::PropPageSummaryProc);
psp.lParam = reinterpret_cast<LPARAM>(this);
psp.pfnCallback = reinterpret_cast<LPFNPSPCALLBACK>(CPropertySheet::PropPageSummaryCallback);
- HPROPSHEETPAGE hPage = CreatePropertySheetPage(&psp);
-
- // keep this instance alive
- // will be released when the
- // the page is about to be
- // destroyed in the callback
- // function
+ HPROPSHEETPAGE hPage = NULL;
- if (hPage)
+ if ( !bIsVistaOrLater )
{
- if (lpfnAddPage(hPage, lParam))
- AddRef();
- else
- DestroyPropertySheetPage(hPage);
+ proppage_header = GetResString(IDS_PROPPAGE_SUMMARY_TITLE);
+
+ psp.pszTemplate = MAKEINTRESOURCE(IDD_PROPPAGE_SUMMARY);
+ psp.pszTitle = proppage_header.c_str();
+ psp.pfnDlgProc = reinterpret_cast<DLGPROC>(CPropertySheet::PropPageSummaryProc);
+
+ hPage = CreatePropertySheetPage(&psp);
+
+ // keep this instance alive, will be released when the
+ // the page is about to be destroyed in the callback function
+
+ if (hPage)
+ {
+ if (lpfnAddPage(hPage, lParam))
+ AddRef();
+ else
+ DestroyPropertySheetPage(hPage);
+ }
}
// add the statistics property page
-
proppage_header = GetResString(IDS_PROPPAGE_STATISTICS_TITLE);
psp.pszTemplate = MAKEINTRESOURCE(IDD_PROPPAGE_STATISTICS);
diff --git a/shell/source/win32/shlxthandler/res/makefile.mk b/shell/source/win32/shlxthandler/res/makefile.mk
index 8f8c77638387..ec0529015179 100644
--- a/shell/source/win32/shlxthandler/res/makefile.mk
+++ b/shell/source/win32/shlxthandler/res/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.8 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/win32/shlxthandler/shlxthdl.cxx b/shell/source/win32/shlxthandler/shlxthdl.cxx
index 1249d3cde6e7..6263c98ea749 100644
--- a/shell/source/win32/shlxthandler/shlxthdl.cxx
+++ b/shell/source/win32/shlxthandler/shlxthdl.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: shlxthdl.cxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -398,6 +395,15 @@ extern "C" STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void** ppv)
if ((riid != IID_IUnknown) && (riid != IID_IClassFactory))
return E_NOINTERFACE;
+ if ( rclsid == CLSID_INFOTIP_HANDLER )
+ OutputDebugStringFormat( "DllGetClassObject: Create CLSID_INFOTIP_HANDLER\n" );
+ else if ( rclsid == CLSID_COLUMN_HANDLER )
+ OutputDebugStringFormat( "DllGetClassObject: Create CLSID_COLUMN_HANDLER\n" );
+ else if ( rclsid == CLSID_PROPERTYSHEET_HANDLER )
+ OutputDebugStringFormat( "DllGetClassObject: Create CLSID_PROPERTYSHEET_HANDLER\n" );
+ else if ( rclsid == CLSID_THUMBVIEWER_HANDLER )
+ OutputDebugStringFormat( "DllGetClassObject: Create CLSID_THUMBVIEWER_HANDLER\n" );
+
IUnknown* pUnk = new CClassFactory(rclsid);
if (0 == pUnk)
return E_OUTOFMEMORY;
diff --git a/shell/source/win32/shlxthandler/thumbviewer/makefile.mk b/shell/source/win32/shlxthandler/thumbviewer/makefile.mk
index a7b0b40032dd..1b7dd103026e 100644
--- a/shell/source/win32/shlxthandler/thumbviewer/makefile.mk
+++ b/shell/source/win32/shlxthandler/thumbviewer/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.5 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
@@ -60,5 +56,7 @@ SLOFILES_X64=$(SLO_X64)$/$(TARGET).obj
.INCLUDE : set_wntx64.mk
.INCLUDE : target.mk
+INCLUDE!:=$(subst,/stl, $(INCLUDE))
+.EXPORT : INCLUDE
.INCLUDE : tg_wntx64.mk
diff --git a/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx b/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx
index 6315a719a62e..13f49c8a2efd 100644
--- a/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx
+++ b/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: thumbviewer.cxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/win32/shlxthandler/util/dbgmacros.cxx b/shell/source/win32/shlxthandler/util/dbgmacros.cxx
index 5bf6d68ee4d4..01ef1d47c083 100644
--- a/shell/source/win32/shlxthandler/util/dbgmacros.cxx
+++ b/shell/source/win32/shlxthandler/util/dbgmacros.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dbgmacros.cxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/win32/shlxthandler/util/fileextensions.cxx b/shell/source/win32/shlxthandler/util/fileextensions.cxx
index 3849045f71d9..b8de490a5c47 100644
--- a/shell/source/win32/shlxthandler/util/fileextensions.cxx
+++ b/shell/source/win32/shlxthandler/util/fileextensions.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: fileextensions.cxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/win32/shlxthandler/util/iso8601_converter.cxx b/shell/source/win32/shlxthandler/util/iso8601_converter.cxx
index ff7fe963413f..dcd779098865 100644
--- a/shell/source/win32/shlxthandler/util/iso8601_converter.cxx
+++ b/shell/source/win32/shlxthandler/util/iso8601_converter.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: iso8601_converter.cxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -149,7 +146,7 @@ std::wstring iso8601_duration_to_local_duration(const std::wstring& iso8601durat
hours = buff;
}
-#if defined(_MSC_VER) && defined(_M_X64)
+#if defined(_MSC_VER) //&& defined(_M_X64)
std::wostringstream oss;
oss << std::setw(2) << std::setfill(wchar_t('0')) << hours << L":" <<
std::setw(2) << std::setfill(wchar_t('0')) << minutes << L":" <<
@@ -172,12 +169,14 @@ std::wstring iso8601_duration_to_local_duration(const std::wstring& iso8601durat
return result;
#undef ADD_AS_PREFILLED
+/*
#else
std::wostringstream oss;
oss << std::setw(2) << std::setfill('0') << hours << L":" <<
std::setw(2) << std::setfill('0') << minutes << L":" <<
std::setw(2) << std::setfill('0') << seconds;
return oss.str();
+*/
#endif
}
diff --git a/shell/source/win32/shlxthandler/util/makefile.mk b/shell/source/win32/shlxthandler/util/makefile.mk
index c0bec9c36d3b..8ccf50602f93 100644
--- a/shell/source/win32/shlxthandler/util/makefile.mk
+++ b/shell/source/win32/shlxthandler/util/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.6 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
@@ -66,5 +62,7 @@ SLOFILES_X64=$(SLO_X64)$/dbgmacros.obj\
.INCLUDE : set_wntx64.mk
.INCLUDE : target.mk
+INCLUDE!:=$(subst,/stl, $(INCLUDE))
+.EXPORT : INCLUDE
.INCLUDE : tg_wntx64.mk
diff --git a/shell/source/win32/shlxthandler/util/registry.cxx b/shell/source/win32/shlxthandler/util/registry.cxx
index 1b1280152135..bac126bb0504 100644
--- a/shell/source/win32/shlxthandler/util/registry.cxx
+++ b/shell/source/win32/shlxthandler/util/registry.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: registry.cxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/win32/shlxthandler/util/utilities.cxx b/shell/source/win32/shlxthandler/util/utilities.cxx
index f2ae6238715a..f721c4113aa8 100644
--- a/shell/source/win32/shlxthandler/util/utilities.cxx
+++ b/shell/source/win32/shlxthandler/util/utilities.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: utilities.cxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/win32/simplemail/makefile.mk b/shell/source/win32/simplemail/makefile.mk
index 70e25f76fe1f..84a209e4c072 100644
--- a/shell/source/win32/simplemail/makefile.mk
+++ b/shell/source/win32/simplemail/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.7 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/win32/simplemail/senddoc.cxx b/shell/source/win32/simplemail/senddoc.cxx
index bcd60253edf1..c8ac40799cea 100644
--- a/shell/source/win32/simplemail/senddoc.cxx
+++ b/shell/source/win32/simplemail/senddoc.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: senddoc.cxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/win32/simplemail/simplemapi.cxx b/shell/source/win32/simplemail/simplemapi.cxx
index 8d7e99fcf210..faf383f580aa 100644
--- a/shell/source/win32/simplemail/simplemapi.cxx
+++ b/shell/source/win32/simplemail/simplemapi.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: simplemapi.cxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/win32/simplemail/simplemapi.hxx b/shell/source/win32/simplemail/simplemapi.hxx
index ab0962326f49..e4feb3524ed3 100644
--- a/shell/source/win32/simplemail/simplemapi.hxx
+++ b/shell/source/win32/simplemail/simplemapi.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: simplemapi.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/win32/simplemail/smplmailclient.cxx b/shell/source/win32/simplemail/smplmailclient.cxx
index 82968b747d95..49c546e5721d 100644
--- a/shell/source/win32/simplemail/smplmailclient.cxx
+++ b/shell/source/win32/simplemail/smplmailclient.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: smplmailclient.cxx,v $
- * $Revision: 1.16 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/win32/simplemail/smplmailclient.hxx b/shell/source/win32/simplemail/smplmailclient.hxx
index 160e9a0d585c..5457dffbffd9 100644
--- a/shell/source/win32/simplemail/smplmailclient.hxx
+++ b/shell/source/win32/simplemail/smplmailclient.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: smplmailclient.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/win32/simplemail/smplmailentry.cxx b/shell/source/win32/simplemail/smplmailentry.cxx
index 1c9596e7b7de..e65d93a95fca 100644
--- a/shell/source/win32/simplemail/smplmailentry.cxx
+++ b/shell/source/win32/simplemail/smplmailentry.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: smplmailentry.cxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/win32/simplemail/smplmailmsg.cxx b/shell/source/win32/simplemail/smplmailmsg.cxx
index 4e87216dfae1..088d84a050ad 100644
--- a/shell/source/win32/simplemail/smplmailmsg.cxx
+++ b/shell/source/win32/simplemail/smplmailmsg.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: smplmailmsg.cxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/win32/simplemail/smplmailmsg.hxx b/shell/source/win32/simplemail/smplmailmsg.hxx
index 7e194ed34a15..caeb0710de90 100644
--- a/shell/source/win32/simplemail/smplmailmsg.hxx
+++ b/shell/source/win32/simplemail/smplmailmsg.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: smplmailmsg.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/win32/simplemail/smplmailsuppl.cxx b/shell/source/win32/simplemail/smplmailsuppl.cxx
index db916bf95a27..375da5b07856 100644
--- a/shell/source/win32/simplemail/smplmailsuppl.cxx
+++ b/shell/source/win32/simplemail/smplmailsuppl.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: smplmailsuppl.cxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/win32/simplemail/smplmailsuppl.hxx b/shell/source/win32/simplemail/smplmailsuppl.hxx
index ed691063071f..e945556c6f8b 100644
--- a/shell/source/win32/simplemail/smplmailsuppl.hxx
+++ b/shell/source/win32/simplemail/smplmailsuppl.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: smplmailsuppl.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/win32/workbench/TestProxySet.cxx b/shell/source/win32/workbench/TestProxySet.cxx
index e0dbc9fa296e..ab0d89e945d2 100644
--- a/shell/source/win32/workbench/TestProxySet.cxx
+++ b/shell/source/win32/workbench/TestProxySet.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: TestProxySet.cxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/win32/workbench/TestSmplMail.cxx b/shell/source/win32/workbench/TestSmplMail.cxx
index 7442fc916c67..a9b04a9f4e05 100644
--- a/shell/source/win32/workbench/TestSmplMail.cxx
+++ b/shell/source/win32/workbench/TestSmplMail.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: TestSmplMail.cxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/win32/workbench/TestSysShExec.cxx b/shell/source/win32/workbench/TestSysShExec.cxx
index 41892e016450..c459408d3802 100644
--- a/shell/source/win32/workbench/TestSysShExec.cxx
+++ b/shell/source/win32/workbench/TestSysShExec.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: TestSysShExec.cxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/shell/source/win32/workbench/makefile.mk b/shell/source/win32/workbench/makefile.mk
index 2a48f6322207..9d9c7945b9bf 100644
--- a/shell/source/win32/workbench/makefile.mk
+++ b/shell/source/win32/workbench/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.9 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify