summaryrefslogtreecommitdiff
path: root/wizards/com/sun/star/wizards/common/Helper.java
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2008-06-25 13:25:59 +0000
committerKurt Zenker <kz@openoffice.org>2008-06-25 13:25:59 +0000
commitbe815508a519767673309cd35b400d7117f3ce9c (patch)
treeb24ccd5335be273e151c94d58515683d641306a0 /wizards/com/sun/star/wizards/common/Helper.java
parent0532fbce6363b3e1b4f66d57bfc7c7310e2a691e (diff)
INTEGRATION: CWS rptwizard01 (1.8.126); FILE MERGED
2008/06/02 07:37:46 lla 1.8.126.3: #i86092# wrong comparison between strings 2008/05/21 10:13:39 lla 1.8.126.2: RESYNC: (1.8-1.9); FILE MERGED 2008/05/16 07:03:23 lla 1.8.126.1: #i86092# restructures to work with multipath
Diffstat (limited to 'wizards/com/sun/star/wizards/common/Helper.java')
-rw-r--r--wizards/com/sun/star/wizards/common/Helper.java26
1 files changed, 24 insertions, 2 deletions
diff --git a/wizards/com/sun/star/wizards/common/Helper.java b/wizards/com/sun/star/wizards/common/Helper.java
index 08d2210a12b1..70abf59e5960 100644
--- a/wizards/com/sun/star/wizards/common/Helper.java
+++ b/wizards/com/sun/star/wizards/common/Helper.java
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: Helper.java,v $
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
* This file is part of OpenOffice.org.
*
@@ -28,6 +28,8 @@
*
************************************************************************/package com.sun.star.wizards.common;
+import com.sun.star.uno.XComponentContext;
+import com.sun.star.util.XMacroExpander;
import java.util.Calendar;
import com.sun.star.beans.Property;
@@ -90,7 +92,7 @@ public class Helper {
int MaxCount = CurPropertyValue.length;
for (int i = 0; i < MaxCount; i++) {
if (CurPropertyValue[i] != null) {
- if (CurPropertyValue[i].Name == PropertyName) {
+ if (CurPropertyValue[i].Name.equals(PropertyName)) {
return CurPropertyValue[i].Value;
}
}
@@ -332,5 +334,25 @@ public class Helper {
}
+public static XComponentContext getComponentContext(XMultiServiceFactory _xMSF)
+{
+ // Get the path to the extension and try to add the path to the class loader
+ final XPropertySet xProps = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class, _xMSF);
+ final PropertySetHelper aHelper = new PropertySetHelper(xProps);
+ final Object aDefaultContext = aHelper.getPropertyValueAsObject("DefaultContext");
+ final XComponentContext xComponentContext = (XComponentContext)UnoRuntime.queryInterface(XComponentContext.class, aDefaultContext);
+ return xComponentContext;
+}
+
+public static XMacroExpander getMacroExpander(XMultiServiceFactory _xMSF)
+{
+ final XComponentContext xComponentContext = getComponentContext(_xMSF);
+ final Object aSingleton = xComponentContext.getValueByName("/singletons/com.sun.star.util.theMacroExpander");
+ XMacroExpander xExpander = (XMacroExpander)UnoRuntime.queryInterface(XMacroExpander.class, aSingleton);
+ // String[][] aStrListList = xProvider.getExtensionList();
+// final String sLocation = xProvider.getPackageLocation("com.sun.reportdesigner");
+ return xExpander;
+}
+
}