diff options
author | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-02-04 10:38:39 +0100 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-02-04 10:38:39 +0100 |
commit | 2176aee8e22caf0396c1b3b544a3549a0a417a8f (patch) | |
tree | 36d0682e2aec8719ac65b8ca0be0d050d75a925f /wizards/com/sun/star/wizards/report | |
parent | 722556b9cd099cbb352cb11692ec1b27adfac5dd (diff) | |
parent | 055bc5c7f48cd556d256dedc32671f60ad30ccf4 (diff) |
autorecovery: commit resolved merge (after rebase to m71)
Diffstat (limited to 'wizards/com/sun/star/wizards/report')
3 files changed, 22 insertions, 14 deletions
diff --git a/wizards/com/sun/star/wizards/report/IReportDocument.java b/wizards/com/sun/star/wizards/report/IReportDocument.java index af8476f5c3e9..e94f93bf9d2e 100644 --- a/wizards/com/sun/star/wizards/report/IReportDocument.java +++ b/wizards/com/sun/star/wizards/report/IReportDocument.java @@ -204,7 +204,7 @@ public interface IReportDocument * @param Name * @param OpenMode */ - public void store(String Name, int OpenMode); + public void store(String Name, int OpenMode) throws com.sun.star.uno.Exception; /** * The current report is added to the DB View under the given name diff --git a/wizards/com/sun/star/wizards/report/ReportFinalizer.java b/wizards/com/sun/star/wizards/report/ReportFinalizer.java index 8c0df7c36c5c..9ffb89b768f5 100644 --- a/wizards/com/sun/star/wizards/report/ReportFinalizer.java +++ b/wizards/com/sun/star/wizards/report/ReportFinalizer.java @@ -244,8 +244,9 @@ public class ReportFinalizer public void changeReportTitle() { - String TitleName = xTitleTextBox.getText(); + final String TitleName = xTitleTextBox.getText(); CurReportDocument.liveupdate_updateReportTitle(TitleName); + CurUnoDialog.enableFinishButton(!"".equals(TitleName)); } public int getReportOpenMode() @@ -272,18 +273,25 @@ public class ReportFinalizer public boolean finish() { StoreName = getStoreName(); - if (CurReportDocument.getRecordParser().getReportDocuments().hasByHierarchicalName(StoreName)) + if (!CurReportDocument.getRecordParser().getReportDocuments().hasByHierarchicalName(StoreName)) { - String sMsgReportDocumentNameDuplicate = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 76); - String sShowMsgReportNameisDuplicate = JavaTools.replaceSubString(sMsgReportDocumentNameDuplicate, StoreName, "%REPORTNAME"); - /* int iMsg = */ CurUnoDialog.showMessageBox("ErrorBox", VclWindowPeerAttribute.OK, sShowMsgReportNameisDuplicate); - return false; - } - else - { - CurReportDocument.store(StoreName, getReportOpenMode()); - ReportWizard.bCloseDocument = false; - return true; + try + { + CurReportDocument.store(StoreName, getReportOpenMode()); + ReportWizard.bCloseDocument = false; + return true; + } + catch(Exception e) + { + CurUnoDialog.showMessageBox("ErrorBox", VclWindowPeerAttribute.OK,e.getLocalizedMessage() ); + CurUnoDialog.enableFinishButton(false); + return false; + } } + String sMsgReportDocumentNameDuplicate = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 76); + String sShowMsgReportNameisDuplicate = JavaTools.replaceSubString(sMsgReportDocumentNameDuplicate, StoreName, "%REPORTNAME"); + /* int iMsg = */ CurUnoDialog.showMessageBox("ErrorBox", VclWindowPeerAttribute.OK, sShowMsgReportNameisDuplicate); + CurUnoDialog.enableFinishButton(false); + return false; } } diff --git a/wizards/com/sun/star/wizards/report/ReportTextImplementation.java b/wizards/com/sun/star/wizards/report/ReportTextImplementation.java index 3d79c5d2d8ac..6e0091b52ef5 100644 --- a/wizards/com/sun/star/wizards/report/ReportTextImplementation.java +++ b/wizards/com/sun/star/wizards/report/ReportTextImplementation.java @@ -480,7 +480,7 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme return m_aDoc.xMSFDoc; } - public void store(String _sName, int _nOpenMode) + public void store(String _sName, int _nOpenMode) throws com.sun.star.uno.Exception { getDoc().createReportForm(ReportWizard.SOREPORTFORMNAME); // int nOpenMode = getReportOpenMode(); |