diff options
Diffstat (limited to 'odk/examples/DevelopersGuide/GUI')
-rw-r--r-- | odk/examples/DevelopersGuide/GUI/SystemDialog.java | 6 | ||||
-rw-r--r-- | odk/examples/DevelopersGuide/GUI/UnoDialogSample.java | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/odk/examples/DevelopersGuide/GUI/SystemDialog.java b/odk/examples/DevelopersGuide/GUI/SystemDialog.java index 1c1de4364cf8..453d9b99cd72 100644 --- a/odk/examples/DevelopersGuide/GUI/SystemDialog.java +++ b/odk/examples/DevelopersGuide/GUI/SystemDialog.java @@ -42,7 +42,7 @@ import com.sun.star.ui.dialogs.XFilterManager; import com.sun.star.ui.dialogs.XFolderPicker2; import com.sun.star.uno.UnoRuntime; import com.sun.star.uno.XComponentContext; - +import com.sun.star.util.thePathSettings; public class SystemDialog { @@ -86,7 +86,7 @@ public class SystemDialog { xFilePicker.setDefaultName("MyExampleDocument"); // set the initial displaydirectory. In this example the user template directory is used - Object oPathSettings = m_xMCF.createInstanceWithContext("com.sun.star.util.PathSettings",m_xContext); + Object oPathSettings = thePathSettings.get(m_xContext); XPropertySet xPropertySet = com.sun.star.uno.UnoRuntime.queryInterface(XPropertySet.class, oPathSettings); String sTemplateUrl = (String) xPropertySet.getPropertyValue("Template_writable"); xFilePicker.setDisplayDirectory(sTemplateUrl); @@ -134,7 +134,7 @@ public class SystemDialog { String sWorkUrl = ""; try{ // retrieve the configured Work path... - Object oPathSettings = m_xMCF.createInstanceWithContext("com.sun.star.util.PathSettings",m_xContext); + Object oPathSettings = thePathSettings.get(m_xContext); XPropertySet xPropertySet = com.sun.star.uno.UnoRuntime.queryInterface(XPropertySet.class, oPathSettings); sWorkUrl = (String) xPropertySet.getPropertyValue("Work"); } catch (com.sun.star.uno.Exception exception) { diff --git a/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java b/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java index 851158f91d81..60eb85475dd5 100644 --- a/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java +++ b/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java @@ -98,6 +98,7 @@ import com.sun.star.util.XNumberFormats; import com.sun.star.util.XNumberFormatsSupplier; import com.sun.star.util.Date; import com.sun.star.util.Time; +import com.sun.star.util.thePathSettings; // Anregung von DV: @@ -1116,7 +1117,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis String sName = createUniqueName(m_xDlgModelNameContainer, "FileControl"); // retrieve the configured Work path... - Object oPathSettings = m_xMCF.createInstanceWithContext("com.sun.star.util.PathSettings",m_xContext); + Object oPathSettings = thePathSettings.get(m_xContext); XPropertySet xPropertySet = com.sun.star.uno.UnoRuntime.queryInterface(XPropertySet.class, oPathSettings); String sWorkUrl = (String) xPropertySet.getPropertyValue("Work"); |