summaryrefslogtreecommitdiff
path: root/jvmfwk/source
diff options
context:
space:
mode:
authorJoachim Lingner <jl@openoffice.org>2004-05-18 14:11:57 +0000
committerJoachim Lingner <jl@openoffice.org>2004-05-18 14:11:57 +0000
commitbd8762dd3254232595038164d61da245400c9cd9 (patch)
tree70451b64e409e21b7729eb8924ac36b66ea319b6 /jvmfwk/source
parent5670c036247f25e52789abb0f3c3832359b2928e (diff)
#i20052#
Diffstat (limited to 'jvmfwk/source')
-rw-r--r--jvmfwk/source/fwkutil.cxx29
1 files changed, 27 insertions, 2 deletions
diff --git a/jvmfwk/source/fwkutil.cxx b/jvmfwk/source/fwkutil.cxx
index a9cd06d44c60..494cdafe6c4e 100644
--- a/jvmfwk/source/fwkutil.cxx
+++ b/jvmfwk/source/fwkutil.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: fwkutil.cxx,v $
*
- * $Revision: 1.15 $
+ * $Revision: 1.16 $
*
- * last change: $Author: jl $ $Date: 2004-05-18 12:50:10 $
+ * last change: $Author: jl $ $Date: 2004-05-18 15:11:57 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -895,9 +895,34 @@ JFW_MODE getMode()
rtl::OUString sOffice = buff.makeStringAndClear();
sal_Int32 index = 0;
+ //are we in the soffice process?
if ((index = ouExe.lastIndexOf(sOffice)) != 1
&& index + sOffice.getLength() == ouExe.getLength())
return JFW_MODE_OFFICE;
+ //we may have been started from javaldx etc.
+ //is there an soffice in the same directory?
+ rtl::OUString sOfficeURL = searchFileNextToThisLib(sOffice);
+
+ //is there <office>/share/config/javavendors.xml?
+ rtl::OUString sBaseDir = getBaseInstallation();
+ rtl::OUString sVendors;
+ if (sBaseDir.getLength() != 0)
+ {
+ //We are run within office installation
+ rtl::OUStringBuffer sSettings(256);
+ sSettings.append(sBaseDir);
+ sSettings.appendAscii("/share/config/");
+ sSettings.appendAscii(VENDORSETTINGS);
+ rtl::OUString sVend = sSettings.makeStringAndClear();
+
+ //check if the file exists
+ osl::DirectoryItem item;
+ osl::File::RC fileError = osl::DirectoryItem::get(sVend, item);
+ if (fileError == osl::FileBase::E_None)
+ sVendors = sVend;
+ }
+ if (sOfficeURL.getLength() > 0 && sVendors.getLength() > 0)
+ return JFW_MODE_OFFICE;
//FWK_MODE_ENV_SIMPLE ?