summaryrefslogtreecommitdiff
path: root/wizards/com/sun/star/wizards/common/FileAccess.java
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2009-02-12 14:03:59 +0000
committerOliver Bolte <obo@openoffice.org>2009-02-12 14:03:59 +0000
commit20cea29aa241c198cfbd6cdda9f4cf198e6933bd (patch)
tree16b877dc84dbf8eff62614606d8f145d8cc2e9d7 /wizards/com/sun/star/wizards/common/FileAccess.java
parentbbef3ea39fc3fe0bed5bc6307e396fd434e02296 (diff)
CWS-TOOLING: integrate CWS fwk99
2009-01-20 17:39:31 +0100 pb r266605 : fix: #i98280# new 'More templates'-URL 2009-01-15 20:17:58 +0100 mst r266391 : #i95702# convert wizards to DocumentProperties (partially based on patch by cmc) 2009-01-12 07:35:44 +0100 pb r266131 : fix: #i96851# HID_PASTE_DLG and HID_LINKDLG_TABLB added 2009-01-09 10:40:48 +0100 pb r266061 : fix: #i97386# Execute_Impl() while sub-dialog is open this could be deleted; #i68415# patch from cmc 2009-01-09 10:35:24 +0100 pb r266059 : fix: #i97386# struct Deleted added 2009-01-09 10:05:17 +0100 pb r266057 : fix: #i97365# ModalDialog RID_SVXPAGE_IMPROVEMENT removed 2009-01-09 10:02:39 +0100 pb r266056 : fix: #i97841# new: set InfoURL and HandleHyperLink() 2009-01-09 09:59:13 +0100 pb r266053 : fix: #i97391# MinWidth re-calculated; #i97365# SvxImprovementDialog2 removed 2009-01-09 09:55:00 +0100 pb r266051 : fix: #i97841# new: HandleHyperLink(); #i97365# SvxImprovementDialog2 removed 2009-01-06 14:24:24 +0100 cd r265921 : #i96831# Fix build problem with gcc 4.3.2 using the return value of link correctly. 2009-01-06 12:18:41 +0100 cd r265907 : #i96831# Fix build problem with gcc 4.3.2 2009-01-06 12:02:59 +0100 mst r265905 : fix #i97775# - xmloff/source/core/nmspmap.cxx: + SvXMLNamespaceMap::GetQNameByKey does not handle default namespace correctly
Diffstat (limited to 'wizards/com/sun/star/wizards/common/FileAccess.java')
-rw-r--r--wizards/com/sun/star/wizards/common/FileAccess.java25
1 files changed, 12 insertions, 13 deletions
diff --git a/wizards/com/sun/star/wizards/common/FileAccess.java b/wizards/com/sun/star/wizards/common/FileAccess.java
index ffa23b51baae..229778b61ada 100644
--- a/wizards/com/sun/star/wizards/common/FileAccess.java
+++ b/wizards/com/sun/star/wizards/common/FileAccess.java
@@ -48,6 +48,8 @@ import com.sun.star.ucb.*;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.XInterface;
import com.sun.star.util.DateTime;
+import com.sun.star.beans.PropertyValue;
+import com.sun.star.document.XDocumentProperties;
/**
* This class delivers static convenience methods
@@ -76,9 +78,7 @@ public class FileAccess
// As there are several conventions about the look of Url (e.g. with " " or with "%20") you cannot make a
// simple String comparison to find out, if a path is already in "ResultPath"
String[] PathList = JavaTools.ArrayoutofString(ResultPath, ";");
- boolean badd = false;
int MaxIndex = PathList.length - 1;
- int iPos;
String CompCurPath;
// sAddPath.replace(null, (char) 47);
String CompAddPath = JavaTools.replaceSubString(sAddPath, "", "/");
@@ -607,8 +607,8 @@ public class FileAccess
java.util.Vector TitleVector = null;
java.util.Vector NameVector = null;
- XInterface xDocInterface = (XInterface) xMSF.createInstance("com.sun.star.document.StandaloneDocumentInfo");
- com.sun.star.document.XStandaloneDocumentInfo xDocInfo = (com.sun.star.document.XStandaloneDocumentInfo) UnoRuntime.queryInterface(com.sun.star.document.XStandaloneDocumentInfo.class, xDocInterface);
+ XInterface xDocInterface = (XInterface) xMSF.createInstance("com.sun.star.document.DocumentProperties");
+ XDocumentProperties xDocProps = (XDocumentProperties) UnoRuntime.queryInterface(XDocumentProperties.class, xDocInterface);
XInterface xInterface = (XInterface) xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess");
com.sun.star.ucb.XSimpleFileAccess xSimpleFileAccess = (com.sun.star.ucb.XSimpleFileAccess) UnoRuntime.queryInterface(com.sun.star.ucb.XSimpleFileAccess.class, xInterface);
@@ -621,17 +621,16 @@ public class FileAccess
FilterName = FilterName == null || FilterName.equals("") ? null : FilterName + "-";
String fileName = "";
+ PropertyValue[] noArgs = { };
for (int i = 0; i < nameList.length; i++)
{
fileName = getFilename(nameList[i]);
if (FilterName == null || fileName.startsWith(FilterName))
{
-
- xDocInfo.loadFromURL(nameList[i]);
+ xDocProps.loadFromMedium(nameList[i], noArgs);
NameVector.addElement(nameList[i]);
- TitleVector.addElement(com.sun.star.uno.AnyConverter.toString(Helper.getUnoPropertyValue(xDocInterface, "Title")));
-
+ TitleVector.addElement(xDocProps.getTitle());
}
}
String[] LocNameList = new String[NameVector.size()];
@@ -715,11 +714,11 @@ public class FileAccess
String sTitle = "";
try
{
- XInterface xDocInterface = (XInterface) xMSF.createInstance("com.sun.star.document.StandaloneDocumentInfo");
- com.sun.star.document.XStandaloneDocumentInfo xDocInfo = (com.sun.star.document.XStandaloneDocumentInfo) UnoRuntime.queryInterface(com.sun.star.document.XStandaloneDocumentInfo.class, xDocInterface);
-
- xDocInfo.loadFromURL(_sFile);
- sTitle = com.sun.star.uno.AnyConverter.toString(Helper.getUnoPropertyValue(xDocInterface, "Title"));
+ XInterface xDocInterface = (XInterface) xMSF.createInstance("com.sun.star.document.DocumentProperties");
+ XDocumentProperties xDocProps = (XDocumentProperties) UnoRuntime.queryInterface(XDocumentProperties.class, xDocInterface);
+ PropertyValue[] noArgs = { };
+ xDocProps.loadFromMedium(_sFile, noArgs);
+ sTitle = xDocProps.getTitle();
}
catch (Exception e)
{