summaryrefslogtreecommitdiff
path: root/sw/source/ui/dbui/mailmergewizard.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/dbui/mailmergewizard.cxx')
-rw-r--r--sw/source/ui/dbui/mailmergewizard.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/sw/source/ui/dbui/mailmergewizard.cxx b/sw/source/ui/dbui/mailmergewizard.cxx
index aa18828648fc..50c42b40e7ca 100644
--- a/sw/source/ui/dbui/mailmergewizard.cxx
+++ b/sw/source/ui/dbui/mailmergewizard.cxx
@@ -147,7 +147,16 @@ void SwMailMergeWizard::enterState( WizardState _nState )
switch(_nState)
{
case MM_DOCUMENTSELECTPAGE:
+ {
bEnablePrev = false; // the first page
+
+ OUString sDataSourceName = GetSwView()->GetDataSourceName();
+ if(!sDataSourceName.isEmpty() &&
+ !SwView::IsDataSourceAvailable(sDataSourceName))
+ {
+ bEnableNext = false;
+ }
+ }
break;
case MM_ADDRESSBLOCKPAGE :
bEnableNext = m_xConfigItem->GetResultSet().is();