summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2013-12-24 19:47:30 +0100
committerJan-Marek Glogowski <glogow@fbihome.de>2014-08-20 09:40:42 +0200
commit43d96f279a8f7626bcc145ff1938d02f85ff0791 (patch)
tree951d93a79cca346fdab9cea8b5c8989996d020fc /sw/source
parent671482310c3b6de4df8757618192d57a93d25ae4 (diff)
Rename some mail merge variables
Fixes the variable name typo pSourrceDocSh and renames bLoop to bNoError to represent the variables function. Reviewed-on: https://gerrit.libreoffice.org/7431 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit 5da974369d01760b336de34e68c03d7268d2d330) Conflicts: sw/source/ui/dbui/dbmgr.cxx Change-Id: Iba688ed0fb40c0c3947da1b21beb00c67a10ff09
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/ui/dbui/dbmgr.cxx32
1 files changed, 16 insertions, 16 deletions
diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx
index 186789aaae16..d94838c5b2d1 100644
--- a/sw/source/ui/dbui/dbmgr.cxx
+++ b/sw/source/ui/dbui/dbmgr.cxx
@@ -826,7 +826,7 @@ sal_Bool SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
{
//check if the doc is synchronized and contains at least one linked section
bool bSynchronizedDoc = pSourceShell->IsLabelDoc() && pSourceShell->GetSectionFmtCount() > 1;
- sal_Bool bLoop = sal_True;
+ sal_Bool bNoError = sal_True;
bool bEMail = rMergeDescriptor.nMergeType == DBMGR_MERGE_MAILING;
const bool bAsSingleFile = rMergeDescriptor.nMergeType == DBMGR_MERGE_SINGLE_FILE;
@@ -864,19 +864,20 @@ sal_Bool SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
aCol >>= xColumnProp;
}
+ // Try saving the source document
SfxDispatcher* pSfxDispatcher = pSourceShell->GetView().GetViewFrame()->GetDispatcher();
- SwDocShell* pSourrceDocSh = pSourceShell->GetView().GetDocShell();
- pSfxDispatcher->Execute( pSourrceDocSh->HasName() ? SID_SAVEDOC : SID_SAVEASDOC, SFX_CALLMODE_SYNCHRON|SFX_CALLMODE_RECORD);
- // has document been saved successfully?
- if( !pSourrceDocSh->IsModified() )
+ SwDocShell* pSourceDocSh = pSourceShell->GetView().GetDocShell();
+ pSfxDispatcher->Execute( pSourceDocSh->HasName() ? SID_SAVEDOC : SID_SAVEASDOC, SFX_CALLMODE_SYNCHRON|SFX_CALLMODE_RECORD);
+ if( !pSourceDocSh->IsModified() )
{
- SfxMedium* pOrig = pSourceShell->GetView().GetDocShell()->GetMedium();
+ SfxMedium* pOrig = pSourceDocSh->GetMedium();
String sSourceDocumentURL(pOrig->GetURLObject().GetMainURL( INetURLObject::NO_DECODE ));
const SfxFilter* pSfxFlt = SwIoSystem::GetFileFilter(
sSourceDocumentURL, ::aEmptyStr );
const SfxFilter* pStoreToFilter = pSfxFlt;
SfxFilterContainer* pFilterContainer = SwDocShell::Factory().GetFilterContainer();
const String* pStoreToFilterOptions = 0;
+
// if a save_to filter is set then use it - otherwise use the default
if( bEMail && !rMergeDescriptor.bSendAsAttachment )
{
@@ -955,14 +956,14 @@ sal_Bool SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
aPrtMonDlg.Show();
// Progress, to prohibit KeyInputs
- SfxProgress aProgress(pSourrceDocSh, ::aEmptyStr, 1);
+ SfxProgress aProgress(pSourceDocSh, ::aEmptyStr, 1);
// lock all dispatchers
- SfxViewFrame* pViewFrm = SfxViewFrame::GetFirst(pSourrceDocSh);
+ SfxViewFrame* pViewFrm = SfxViewFrame::GetFirst(pSourceDocSh);
while (pViewFrm)
{
pViewFrm->GetDispatcher()->Lock(sal_True);
- pViewFrm = SfxViewFrame::GetNext(*pViewFrm, pSourrceDocSh);
+ pViewFrm = SfxViewFrame::GetNext(*pViewFrm, pSourceDocSh);
}
sal_uLong nDocNo = 1;
@@ -1010,7 +1011,7 @@ sal_Bool SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
if( !aTempFile->IsValid() )
{
ErrorHandler::HandleError( ERRCODE_IO_NOTSUPPORTED );
- bLoop = sal_False;
+ bNoError = sal_False;
bCancel = sal_True;
}
else
@@ -1148,7 +1149,7 @@ sal_Bool SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
// error message ??
ErrorHandler::HandleError( xWorkDocSh->GetError() );
bCancel = sal_True;
- bLoop = sal_False;
+ bNoError = sal_False;
}
if( bEMail )
{
@@ -1284,7 +1285,7 @@ sal_Bool SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
{
// error message ??
ErrorHandler::HandleError( xTargetDocShell->GetError() );
- bLoop = sal_False;
+ bNoError = sal_False;
}
}
else if( pTargetView ) // must be available!
@@ -1338,11 +1339,11 @@ sal_Bool SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
SWUnoHelper::UCB_DeleteFile( *aFileIter );
// unlock all dispatchers
- pViewFrm = SfxViewFrame::GetFirst(pSourrceDocSh);
+ pViewFrm = SfxViewFrame::GetFirst(pSourceDocSh);
while (pViewFrm)
{
pViewFrm->GetDispatcher()->Lock(sal_False);
- pViewFrm = SfxViewFrame::GetNext(*pViewFrm, pSourrceDocSh);
+ pViewFrm = SfxViewFrame::GetNext(*pViewFrm, pSourceDocSh);
}
SW_MOD()->SetView(&pSourceShell->GetView());
@@ -1353,10 +1354,9 @@ sal_Bool SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
{
xMailDispatcher->stop();
xMailDispatcher->shutdown();
-
}
- return bLoop;
+ return bNoError;
}
IMPL_LINK_INLINE_START( SwNewDBMgr, PrtCancelHdl, Button *, pButton )