diff options
author | Mikhail Voytenko <mav@openoffice.org> | 2010-11-22 12:58:00 +0100 |
---|---|---|
committer | Mikhail Voytenko <mav@openoffice.org> | 2010-11-22 12:58:00 +0100 |
commit | b824d13f58822cc73cff2980daccafffba28fde4 (patch) | |
tree | 91d96f7564529a95195c67ea579b67067c685d7b /wizards/com | |
parent | a664cb2a1752339c6fb34784c6b0992da52101d3 (diff) |
fwk160: #i59788# use standard InteractionHandler to store documents
Diffstat (limited to 'wizards/com')
3 files changed, 7 insertions, 6 deletions
diff --git a/wizards/com/sun/star/wizards/document/OfficeDocument.java b/wizards/com/sun/star/wizards/document/OfficeDocument.java index 4cb78cd967c3..2f1acea977f6 100644 --- a/wizards/com/sun/star/wizards/document/OfficeDocument.java +++ b/wizards/com/sun/star/wizards/document/OfficeDocument.java @@ -288,7 +288,7 @@ public class OfficeDocument return oDocument; } - public static boolean store(XMultiServiceFactory xMSF, XComponent xComponent, String StorePath, String FilterName, boolean bStoreToUrl, String sMsgSavingImpossible) + public static boolean store(XMultiServiceFactory xMSF, XComponent xComponent, String StorePath, String FilterName, boolean bStoreToUrl) { try { @@ -296,10 +296,13 @@ public class OfficeDocument PropertyValue[] oStoreProperties; if (FilterName.length() > 0) { - oStoreProperties = new PropertyValue[1]; + oStoreProperties = new PropertyValue[2]; oStoreProperties[0] = new PropertyValue(); oStoreProperties[0].Name = "FilterName"; oStoreProperties[0].Value = FilterName; + oStoreProperties[1] = new PropertyValue(); + oStoreProperties[1].Name = "InteractionHandler"; + oStoreProperties[1].Value = (XInteractionHandler) UnoRuntime.queryInterface(XInteractionHandler.class, xMSF.createInstance("com.sun.star.comp.uui.UUIInteractionHandler")); } else { @@ -319,8 +322,6 @@ public class OfficeDocument { exception.printStackTrace(System.out); - //TODO make sure that the peer of the dialog is used when available - showMessageBox(xMSF, "ErrorBox", VclWindowPeerAttribute.OK, sMsgSavingImpossible); return false; } } diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java index 0cc5268accc0..551b73c3c281 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java @@ -246,7 +246,7 @@ public class FaxWizardDialogImpl extends FaxWizardDialog myFaxDoc.killEmptyFrames(); - bSaveSuccess = OfficeDocument.store(xMSF, xTextDocument, sPath, "writer8_template", false, "Template could not be saved to" + sPath); + bSaveSuccess = OfficeDocument.store(xMSF, xTextDocument, sPath, "writer8_template", false); if (bSaveSuccess) { saveConfiguration(); diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java index f992ef98b56b..f62badd18776 100644 --- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java +++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java @@ -305,7 +305,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog myLetterDoc.killEmptyFrames(); - bSaveSuccess = OfficeDocument.store(xMSF, xTextDocument, sPath, "writer8_template", false, "Template could not be saved to " + sPath); + bSaveSuccess = OfficeDocument.store(xMSF, xTextDocument, sPath, "writer8_template", false); if (bSaveSuccess) { |