summaryrefslogtreecommitdiff
path: root/sw/source/ui/dbui
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/dbui')
-rw-r--r--sw/source/ui/dbui/dbinsdlg.cxx6
-rw-r--r--sw/source/ui/dbui/dbmgr.cxx7
-rw-r--r--sw/source/ui/dbui/mailmergewizard.cxx2
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.cxx4
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.hxx2
-rw-r--r--sw/source/ui/dbui/mmdocselectpage.cxx8
-rw-r--r--sw/source/ui/dbui/mmdocselectpage.hxx2
-rw-r--r--sw/source/ui/dbui/mmgreetingspage.cxx2
-rw-r--r--sw/source/ui/dbui/mmgreetingspage.hxx2
-rw-r--r--sw/source/ui/dbui/mmlayoutpage.cxx4
-rw-r--r--sw/source/ui/dbui/mmlayoutpage.hxx2
-rw-r--r--sw/source/ui/dbui/mmpreparemergepage.cxx4
-rw-r--r--sw/source/ui/dbui/mmpreparemergepage.hxx2
13 files changed, 24 insertions, 23 deletions
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index b44ee246ac41..9e62f7a4de36 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -1911,7 +1911,7 @@ void SwInsertDBColAutoPilot::Load()
SwInsDBColumn& rSet = *aDBColumns[ n ];
for( USHORT m = 0; m < pNewData->aDBColumns.Count() ; ++m )
{
- const SwInsDBColumn& rGet = *pNewData->aDBColumns[ m ];
+ SwInsDBColumn& rGet = *pNewData->aDBColumns[ m ];
if(rGet.sColumn == rSet.sColumn)
{
if( rGet.bHasFmt && !rGet.bIsDBFmt )
@@ -1923,8 +1923,10 @@ void SwInsertDBColAutoPilot::Load()
{
xub_StrLen nCheckPos;
short nType;
- rNFmtr.PutEntry( (String&)rGet.sUsrNumFmt, nCheckPos, nType,
+ String sTmpFmt = rGet.sUsrNumFmt;
+ rNFmtr.PutEntry( sTmpFmt, nCheckPos, nType,
rSet.nUsrNumFmt, rGet.eUsrNumFmtLng );
+ rGet.sUsrNumFmt = sTmpFmt;
}
}
break;
diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx
index 8ad861713e0a..cf894f8728c4 100644
--- a/sw/source/ui/dbui/dbmgr.cxx
+++ b/sw/source/ui/dbui/dbmgr.cxx
@@ -2907,9 +2907,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
}
else
{
- SwDoc* pNewDoc = rSourceView.GetDocShell()->GetDoc()->CreateCopy();
- xWorkDocSh = new SwDocShell( pNewDoc, SFX_CREATE_MODE_STANDARD );
- xWorkDocSh->DoInitNew();
+ xWorkDocSh = rSourceView.GetDocShell()->GetDoc()->CreateCopy(true);
}
//create a ViewFrame
SwView* pWorkView = static_cast< SwView* >( SfxViewFrame::LoadHiddenDocument( *xWorkDocSh, 0 )->GetViewShell() );
@@ -3032,8 +3030,9 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
pTargetShell->SttDoc();
//
}
- catch( Exception& )
+ catch( Exception& rEx)
{
+ (void)rEx;
DBG_ERROR("exception caught in SwNewDBMgr::MergeDocuments");
}
DELETEZ(pImpl->pMergeData);
diff --git a/sw/source/ui/dbui/mailmergewizard.cxx b/sw/source/ui/dbui/mailmergewizard.cxx
index 54cf6edac512..365c56b4c0ea 100644
--- a/sw/source/ui/dbui/mailmergewizard.cxx
+++ b/sw/source/ui/dbui/mailmergewizard.cxx
@@ -260,7 +260,7 @@ void SwMailMergeWizard::UpdateRoadmap()
//#i97436# if a document has to be loaded then enable output type page only
m_bDocumentLoad = false;
bool bEnableOutputTypePage = (nCurPage != MM_DOCUMENTSELECTPAGE) ||
- static_cast<svt::OWizardPage*>(pCurPage)->commitPage( eValidate );
+ static_cast<svt::OWizardPage*>(pCurPage)->commitPage( ::svt::WizardTypes::eValidate );
for(sal_uInt16 nPage = MM_DOCUMENTSELECTPAGE; nPage <= MM_OUTPUTPAGE; ++nPage)
{
diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx
index b2d8c790c25d..a35b0727c1ed 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.cxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.cxx
@@ -175,9 +175,9 @@ void SwMailMergeAddressBlockPage::ActivatePage()
/*-- 27.05.2004 13:59:15---------------------------------------------------
-----------------------------------------------------------------------*/
-sal_Bool SwMailMergeAddressBlockPage::commitPage( CommitPageReason _eReason )
+sal_Bool SwMailMergeAddressBlockPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
- if ( eTravelForward == _eReason && !m_pWizard->GetConfigItem().GetResultSet().is() )
+ if ( ::svt::WizardTypes::eTravelForward == _eReason && !m_pWizard->GetConfigItem().GetResultSet().is() )
return sal_False;
return sal_True;
}
diff --git a/sw/source/ui/dbui/mmaddressblockpage.hxx b/sw/source/ui/dbui/mmaddressblockpage.hxx
index b47b71f1a561..eddaca225e9b 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.hxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.hxx
@@ -98,7 +98,7 @@ class SwMailMergeAddressBlockPage : public svt::OWizardPage
void EnableAddressBlock(sal_Bool bAll, sal_Bool bSelective);
virtual void ActivatePage();
- virtual sal_Bool commitPage( CommitPageReason _eReason );
+ virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
virtual bool canAdvance() const;
public:
diff --git a/sw/source/ui/dbui/mmdocselectpage.cxx b/sw/source/ui/dbui/mmdocselectpage.cxx
index 698e12f44882..e125b4f8ed2e 100644
--- a/sw/source/ui/dbui/mmdocselectpage.cxx
+++ b/sw/source/ui/dbui/mmdocselectpage.cxx
@@ -197,11 +197,11 @@ IMPL_LINK(SwMailMergeDocSelectPage, FileSelectHdl, PushButton*, pButton)
/*-- 06.04.2004 12:52:24---------------------------------------------------
-----------------------------------------------------------------------*/
-sal_Bool SwMailMergeDocSelectPage::commitPage( CommitPageReason _eReason )
+sal_Bool SwMailMergeDocSelectPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
sal_Bool bReturn = sal_False;
- bool bNext = _eReason == eTravelForward;
- if(bNext || _eReason == eValidate )
+ bool bNext = _eReason == ::svt::WizardTypes::eTravelForward;
+ if(bNext || _eReason == ::svt::WizardTypes::eValidate )
{
::rtl::OUString sReloadDocument;
bReturn = m_aCurrentDocRB.IsChecked() ||
@@ -209,7 +209,7 @@ sal_Bool SwMailMergeDocSelectPage::commitPage( CommitPageReason _eReason )
((sReloadDocument = m_sLoadFileName).getLength() && m_aLoadDocRB.IsChecked() )||
((sReloadDocument = m_sLoadTemplateName).getLength() && m_aLoadTemplateRB.IsChecked())||
(m_aRecentDocRB.IsChecked() && (sReloadDocument = m_aRecentDocLB.GetSelectEntry()).getLength());
- if( _eReason == eValidate )
+ if( _eReason == ::svt::WizardTypes::eValidate )
m_pWizard->SetDocumentLoad(!m_aCurrentDocRB.IsChecked());
if(bNext && !m_aCurrentDocRB.IsChecked())
diff --git a/sw/source/ui/dbui/mmdocselectpage.hxx b/sw/source/ui/dbui/mmdocselectpage.hxx
index 2785846b39e8..6483025f88ed 100644
--- a/sw/source/ui/dbui/mmdocselectpage.hxx
+++ b/sw/source/ui/dbui/mmdocselectpage.hxx
@@ -61,7 +61,7 @@ class SwMailMergeDocSelectPage : public svt::OWizardPage
DECL_LINK(DocSelectHdl, RadioButton*);
DECL_LINK(FileSelectHdl, PushButton*);
- virtual sal_Bool commitPage( CommitPageReason _eReason );
+ virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
public:
SwMailMergeDocSelectPage( SwMailMergeWizard* _pParent);
diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx b/sw/source/ui/dbui/mmgreetingspage.cxx
index c7613055d6ab..7281880c593d 100644
--- a/sw/source/ui/dbui/mmgreetingspage.cxx
+++ b/sw/source/ui/dbui/mmgreetingspage.cxx
@@ -390,7 +390,7 @@ void SwMailMergeGreetingsPage::ActivatePage()
/*-- 11.05.2004 14:47:10---------------------------------------------------
-----------------------------------------------------------------------*/
-sal_Bool SwMailMergeGreetingsPage::commitPage( CommitPageReason )
+sal_Bool SwMailMergeGreetingsPage::commitPage( ::svt::WizardTypes::CommitPageReason )
{
SwMailMergeConfigItem& rConfig = m_pWizard->GetConfigItem();
diff --git a/sw/source/ui/dbui/mmgreetingspage.hxx b/sw/source/ui/dbui/mmgreetingspage.hxx
index 1756f78a29d8..3e237d797e2f 100644
--- a/sw/source/ui/dbui/mmgreetingspage.hxx
+++ b/sw/source/ui/dbui/mmgreetingspage.hxx
@@ -122,7 +122,7 @@ class SwMailMergeGreetingsPage : public svt::OWizardPage,
virtual void UpdatePreview();
virtual void ActivatePage();
- virtual sal_Bool commitPage( CommitPageReason _eReason );
+ virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
public:
SwMailMergeGreetingsPage( SwMailMergeWizard* _pParent);
~SwMailMergeGreetingsPage();
diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx
index 366eb23e9352..d9ae7b9c518f 100644
--- a/sw/source/ui/dbui/mmlayoutpage.cxx
+++ b/sw/source/ui/dbui/mmlayoutpage.cxx
@@ -254,11 +254,11 @@ void SwMailMergeLayoutPage::ActivatePage()
/*-- 11.05.2004 10:41:26---------------------------------------------------
-----------------------------------------------------------------------*/
-sal_Bool SwMailMergeLayoutPage::commitPage( CommitPageReason _eReason )
+sal_Bool SwMailMergeLayoutPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
//now insert the frame and the greeting
SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem();
- if(eTravelForward == _eReason)
+ if(::svt::WizardTypes::eTravelForward == _eReason)
{
long nLeft = static_cast< long >(m_aLeftMF.Denormalize(m_aLeftMF.GetValue(FUNIT_TWIP)));
long nTop = static_cast< long >(m_aTopMF.Denormalize(m_aTopMF.GetValue(FUNIT_TWIP)));
diff --git a/sw/source/ui/dbui/mmlayoutpage.hxx b/sw/source/ui/dbui/mmlayoutpage.hxx
index 0a4569c71437..b7dd9dfab2e6 100644
--- a/sw/source/ui/dbui/mmlayoutpage.hxx
+++ b/sw/source/ui/dbui/mmlayoutpage.hxx
@@ -98,7 +98,7 @@ class SwMailMergeLayoutPage : public svt::OWizardPage
static void InsertGreeting(SwWrtShell& rShell, SwMailMergeConfigItem& rConfigItem, bool bExample);
virtual void ActivatePage();
- virtual sal_Bool commitPage(CommitPageReason _eReason);
+ virtual sal_Bool commitPage(::svt::WizardTypes::CommitPageReason _eReason);
public:
SwMailMergeLayoutPage( SwMailMergeWizard* _pParent);
~SwMailMergeLayoutPage();
diff --git a/sw/source/ui/dbui/mmpreparemergepage.cxx b/sw/source/ui/dbui/mmpreparemergepage.cxx
index a8650c4b37c9..8539f037ecdc 100644
--- a/sw/source/ui/dbui/mmpreparemergepage.cxx
+++ b/sw/source/ui/dbui/mmpreparemergepage.cxx
@@ -191,10 +191,10 @@ void SwMailMergePrepareMergePage::ActivatePage()
/*-- 13.05.2004 15:38:32---------------------------------------------------
merge the data into a new file
-----------------------------------------------------------------------*/
-sal_Bool SwMailMergePrepareMergePage::commitPage( CommitPageReason _eReason )
+sal_Bool SwMailMergePrepareMergePage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem();
- if(eTravelForward == _eReason && !rConfigItem.IsMergeDone())
+ if(::svt::WizardTypes::eTravelForward == _eReason && !rConfigItem.IsMergeDone())
{
m_pWizard->CreateTargetDocument();
m_pWizard->SetRestartPage(MM_MERGEPAGE);
diff --git a/sw/source/ui/dbui/mmpreparemergepage.hxx b/sw/source/ui/dbui/mmpreparemergepage.hxx
index 90298711dd88..8fb7ad938996 100644
--- a/sw/source/ui/dbui/mmpreparemergepage.hxx
+++ b/sw/source/ui/dbui/mmpreparemergepage.hxx
@@ -64,7 +64,7 @@ class SwMailMergePrepareMergePage : public svt::OWizardPage
DECL_LINK(MoveHdl_Impl, void*);
virtual void ActivatePage();
- virtual sal_Bool commitPage( CommitPageReason _eReason );
+ virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
public:
SwMailMergePrepareMergePage( SwMailMergeWizard* _pParent);