summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-03-25 09:02:18 +0100
committerStephan Bergmann <sbergman@redhat.com>2016-03-25 09:02:18 +0100
commitd1b8dcd5d3fa545df4f4ed2714d4424b32286173 (patch)
tree930d1164a7bd57aaf8c3f34926b3b50180f8876b /sw
parent7e7a156b4b1b1a22a077968810db9f9958130339 (diff)
loplugin:defaultparams,staticcall,literaltoboolconversion
Change-Id: Ie758fc9d7d8546f7631bb865b307be56386a2057
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/dbui/dbmgr.cxx27
1 files changed, 15 insertions, 12 deletions
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index 2fccde845ef0..75fa402bda24 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -158,11 +158,14 @@ const sal_Char cActiveConnection[] = "ActiveConnection";
SfxGetpApp()->NotifyEvent(SfxEventHint(SW_EVENT_##type, \
SwDocShell::GetEventName(STR_SW_EVENT_##type), shell))
-#define RESCHEDULE_GUI \
- do { \
- for( sal_uInt16 i = 0; i < 25; i++) \
- Application::Reschedule(); \
- } while( 0 )
+namespace {
+
+void rescheduleGui() {
+ for( sal_uInt16 i = 0; i < 25; i++)
+ Application::Reschedule();
+}
+
+}
enum class SwDBNextRecord { NEXT, FIRST };
static bool lcl_ToNextRecord( SwDSParam* pParam, const SwDBNextRecord action = SwDBNextRecord::NEXT );
@@ -1224,7 +1227,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
pProgressDlg->SetCancelHdl( LINK(this, SwDBManager, PrtCancelHdl) );
pProgressDlg->Show();
- RESCHEDULE_GUI;
+ rescheduleGui();
}
if( bCreateSingleFile && !pTargetView )
@@ -1347,7 +1350,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
pProgressDlg->Update();
}
- RESCHEDULE_GUI;
+ rescheduleGui();
// Create a copy of the source document and work with that one instead of the source.
// If we're not in the single file mode (which requires modifying the document for the merging),
@@ -1439,8 +1442,8 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
pWorkView->StartPrint( aOptions, bIsMergeSilent, rMergeDescriptor.bPrintAsync );
// some GetPrinter functions have a true default, so keep the false
- SfxPrinter* pDocPrt = pWorkView->GetPrinter( false );
- JobSetup aJobSetup = pDocPrt ? pDocPrt->GetJobSetup() : pWorkView->GetJobSetup();
+ SfxPrinter* pDocPrt = pWorkView->GetPrinter();
+ JobSetup aJobSetup = pDocPrt ? pDocPrt->GetJobSetup() : SfxViewShell::GetJobSetup();
if( !Printer::PreparePrintJob( pWorkView->GetPrinterController(), aJobSetup ) )
MergeCancel();
}
@@ -1534,7 +1537,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
}
else if( IsMergeOk() ) // && bCreateSingleFile
{
- RESCHEDULE_GUI;
+ rescheduleGui();
// sw::DocumentLayoutManager::CopyLayoutFormat() did not generate
// unique fly names, do it here once.
@@ -1549,7 +1552,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
aLayout->AllCheckPageDescs();
}
- RESCHEDULE_GUI;
+ rescheduleGui();
if( IsMergeOk() && bMT_FILE )
{
@@ -1586,7 +1589,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
xTargetDocShell->DoClose();
}
- RESCHEDULE_GUI;
+ rescheduleGui();
pProgressDlg.disposeAndClear();