From 5322b2a0c94772961310dc646a237df18cd20e6e Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Thu, 4 Jun 2009 08:23:53 +0000 Subject: #i101242# new print dialog UI --- sw/source/ui/dbui/dbmgr.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sw/source/ui/dbui/dbmgr.cxx') diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index bf6bef6959b3..17d2ad5ef31d 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -988,7 +988,7 @@ BOOL SwNewDBMgr::MergePrint( SwView& rView, bRet = TRUE; } } - else if( pSh->Prt( rOpt, &rProgress ) ) + else if( pSh->Prt( pPrt, rOpt, &rProgress ) ) /* TLPDF */ bRet = TRUE; bMergeLock = FALSE; @@ -1145,7 +1145,7 @@ BOOL SwNewDBMgr::MergePrintDocuments( SwView& rView, bRet = TRUE; } } - else if( pSh->Prt( rOpt, &rProgress ) ) + else if( pSh->Prt( pPrt, rOpt, &rProgress ) ) /* TLPDF */ bRet = TRUE; bMergeLock = FALSE; -- cgit From c8bc5be2dca2dbe7e9cba1c9027f2c97076e8374 Mon Sep 17 00:00:00 2001 From: Philipp Lohmann Date: Thu, 11 Jun 2009 17:26:10 +0000 Subject: make compile again, needs adaption ? --- sw/source/ui/dbui/dbmgr.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'sw/source/ui/dbui/dbmgr.cxx') diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index d123dec5e0dd..f64d0e0b4512 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -976,12 +976,14 @@ BOOL SwNewDBMgr::MergePrint( SwView& rView, bMergeLock = TRUE; if(rOpt.IsPrintProspect()) { +#ifdef TL_NOT_NOW /*TLPDF*/ if( ! pPrt->IsJobActive() ) { pPrt->SetJobValue( String( RTL_CONSTASCII_USTRINGPARAM( "IsQuickJob" ) ), String( RTL_CONSTASCII_USTRINGPARAM( "true" ) ) ); pPrt->StartJob( rOpt.GetJobName() ); } +#endif if( pPrt->IsJobActive() ) { pSh->PrintProspect( rOpt, rProgress, rOpt.IsPrintProspect_RTL() ); @@ -1139,7 +1141,11 @@ BOOL SwNewDBMgr::MergePrintDocuments( SwView& rView, bMergeLock = TRUE; if(rOpt.IsPrintProspect()) { - if( pPrt->IsJobActive() || pPrt->StartJob( rOpt.GetJobName() )) + if( pPrt->IsJobActive() +#ifdef TL_NOT_NOW /*TLPDF*/ + || pPrt->StartJob( rOpt.GetJobName() ) +#endif + ) { pSh->PrintProspect( rOpt, rProgress, rOpt.IsPrintProspect_RTL() ); bRet = TRUE; -- cgit From 3269764069d16788c2534655e7900bf5606d6aa7 Mon Sep 17 00:00:00 2001 From: Philipp Lohmann Date: Fri, 12 Jun 2009 15:22:27 +0000 Subject: #i92516# remove old StartPage/EndPage API --- sw/source/ui/dbui/dbmgr.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'sw/source/ui/dbui/dbmgr.cxx') diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index f64d0e0b4512..0f7c203195be 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -904,9 +904,11 @@ BOOL SwNewDBMgr::MergePrint( SwView& rView, pModOpt->SetSinglePrintJob(rOpt.IsPrintSingleJobs()); SfxPrinter *pPrt = pSh->getIDocumentDeviceAccess()->getPrinter( false ); +#ifdef TL_NOT_NOW /*TLPDF*/ Link aSfxSaveLnk = pPrt->GetEndPrintHdl(); if( rOpt.IsPrintSingleJobs() ) pPrt->SetEndPrintHdl( Link() ); +#endif BOOL bUserBreak = FALSE, bRet = FALSE; @@ -1009,6 +1011,7 @@ BOOL SwNewDBMgr::MergePrint( SwView& rView, nEndRow = pImpl->pMergeData ? pImpl->pMergeData->xResultSet->getRow() : 0; } while( bSynchronizedDoc && (nStartRow != nEndRow)? ExistsNextRecord() : ToNextMergeRecord()); +#ifdef TL_NOT_NOW /*TLPDF*/ if( rOpt.IsPrintSingleJobs() ) { SfxPrinter* pTmpPrinter = pSh->getIDocumentDeviceAccess()->getPrinter( true ); @@ -1016,6 +1019,7 @@ BOOL SwNewDBMgr::MergePrint( SwView& rView, if ( !bUserBreak && !pTmpPrinter->IsJobActive() ) //Schon zu spaet? aSfxSaveLnk.Call( pTmpPrinter ); } +#endif rOpt.nMergeCnt = 0; rOpt.nMergeAct = 0; @@ -1048,9 +1052,11 @@ BOOL SwNewDBMgr::MergePrintDocuments( SwView& rView, rOpt.SetPrintSingleJobs( sal_True ); SfxPrinter *pPrt = pSh->getIDocumentDeviceAccess()->getPrinter( false ); +#ifdef TL_NOT_NOW /*TLPDF*/ Link aSfxSaveLnk = pPrt->GetEndPrintHdl(); if( rOpt.IsPrintSingleJobs() ) pPrt->SetEndPrintHdl( Link() ); +#endif BOOL bUserBreak = FALSE, bRet = FALSE; @@ -1168,6 +1174,7 @@ BOOL SwNewDBMgr::MergePrintDocuments( SwView& rView, } } +#ifdef TL_NOT_NOW /*TLPDF*/ if( rOpt.IsPrintSingleJobs() ) { SfxPrinter* pTmpPrinter = pSh->getIDocumentDeviceAccess()->getPrinter( true ); @@ -1175,6 +1182,7 @@ BOOL SwNewDBMgr::MergePrintDocuments( SwView& rView, if ( !bUserBreak && !pTmpPrinter->IsJobActive() ) //Schon zu spaet? aSfxSaveLnk.Call( pTmpPrinter ); } +#endif rOpt.nMergeCnt = 0; rOpt.nMergeAct = 0; -- cgit From 3c7537520ff5fb728e357a6f6cb7b1a343cd54fe Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Thu, 16 Jul 2009 14:39:49 +0000 Subject: #i101242# new print UI dialog; PageRange now basically functional --- sw/source/ui/dbui/dbmgr.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'sw/source/ui/dbui/dbmgr.cxx') diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index 0f7c203195be..7fa9a24338c2 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -881,6 +881,8 @@ SwNewDBMgr::~SwNewDBMgr() BOOL SwNewDBMgr::MergePrint( SwView& rView, SwPrtOptions& rOpt, SfxProgress& rProgress, BOOL bIsAPI ) { + (void) rView; (void) rOpt; (void) rProgress; (void) bIsAPI; /* TLPDF */ +#ifdef TL_NOT_NOW /*TLPDF*/ //!! Currently broken beyond repair since we will not have a printer SwWrtShell* pSh = &rView.GetWrtShell(); //check if the doc is synchronized and contains at least one linked section BOOL bSynchronizedDoc = pSh->IsLabelDoc() && pSh->GetSectionFmtCount() > 1; @@ -1038,6 +1040,8 @@ BOOL SwNewDBMgr::MergePrint( SwView& rView, } return bRet; +#endif // TL_NOT_NOW /*TLPDF*/ //!! Currently broken beyond repair since we will not have a printer + return TRUE; /* TLPDF */ } /*-- 21.06.2004 09:08:16--------------------------------------------------- @@ -1045,6 +1049,8 @@ BOOL SwNewDBMgr::MergePrint( SwView& rView, BOOL SwNewDBMgr::MergePrintDocuments( SwView& rView, SwPrtOptions& rOpt, SfxProgress& rProgress, BOOL bIsAPI ) { + (void) rView; (void) rOpt; (void) rProgress; (void) bIsAPI; /* TLPDF */ +#ifdef TL_NOT_NOW /*TLPDF*/ //!! Currently broken beyond repair since we will not have a printer SwWrtShell* pSh = &rView.GetWrtShell(); //check if the doc is synchronized and contains at least one linked section //merge source is already open @@ -1201,6 +1207,8 @@ BOOL SwNewDBMgr::MergePrintDocuments( SwView& rView, } return bRet; +#endif // TL_NOT_NOW /*TLPDF*/ //!! Currently broken beyond repair since we will not have a printer + return TRUE; /* TLPDF */ } -- cgit From 063c55820f1f7b21f2999d9a5f8a0e18078c3f32 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Thu, 6 Aug 2009 12:40:39 +0000 Subject: #i92516# Fix mail merge with new printing function. Don't set SID_ASYNCHRON to true for normal mail merge operations --- sw/source/ui/dbui/dbmgr.cxx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'sw/source/ui/dbui/dbmgr.cxx') diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index 7fa9a24338c2..97d882c3a8e1 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -500,12 +500,11 @@ BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc ) if(IsMergeSilent()) { aPrintArgs.Put( SfxBoolItem(SID_SILENT, TRUE) ); - // #i25686# printing should be done asynchronously to prevent dangling offices - // when mail merge is called as command line macro - // #i52629# aynchronous printing should only be done in silent mode - otherwise - // the printer dialog does not come up - aPrintArgs.Put( SfxBoolItem( SID_ASYNCHRON, rMergeDesc.bPrintAsync )); } + // #i52629# aynchronous printing should only be done in silent mode - otherwise + // the printer dialog does not come up + aPrintArgs.Put( SfxBoolItem( SID_ASYNCHRON, rMergeDesc.bPrintAsync )); + // convert PropertyValues const beans::PropertyValue* pPrintOptions = rMergeDesc.aPrintOptions.getConstArray(); for( sal_Int32 nOption = 0; nOption < rMergeDesc.aPrintOptions.getLength(); ++nOption) -- cgit From a6e4f39c82a75fb2684d3563b9c2a7af3518d2bc Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Fri, 14 Aug 2009 13:56:56 +0000 Subject: #i101242# new print UI --- sw/source/ui/dbui/dbmgr.cxx | 90 ++++++++++++++++++++++----------------------- 1 file changed, 45 insertions(+), 45 deletions(-) (limited to 'sw/source/ui/dbui/dbmgr.cxx') diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index 97d882c3a8e1..e53f5d766427 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -79,7 +79,8 @@ #include #include #include -#include +#include +//#include #include #include #include @@ -877,11 +878,11 @@ SwNewDBMgr::~SwNewDBMgr() --------------------------------------------------------------------*/ -BOOL SwNewDBMgr::MergePrint( SwView& rView, - SwPrtOptions& rOpt, SfxProgress& rProgress, BOOL bIsAPI ) +BOOL SwNewDBMgr::MergePrint( SwView& /*rView*/, + SwPrtOptions& /*rOpt*/, SfxProgress& /*rProgress*/, BOOL /*bIsAPI*/ ) { - (void) rView; (void) rOpt; (void) rProgress; (void) bIsAPI; /* TLPDF */ -#ifdef TL_NOT_NOW /*TLPDF*/ //!! Currently broken beyond repair since we will not have a printer + return TRUE; +#ifdef TL_NOT_NOW /*TLPDF*/ SwWrtShell* pSh = &rView.GetWrtShell(); //check if the doc is synchronized and contains at least one linked section BOOL bSynchronizedDoc = pSh->IsLabelDoc() && pSh->GetSectionFmtCount() > 1; @@ -904,12 +905,12 @@ BOOL SwNewDBMgr::MergePrint( SwView& rView, SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig(); pModOpt->SetSinglePrintJob(rOpt.IsPrintSingleJobs()); - SfxPrinter *pPrt = pSh->getIDocumentDeviceAccess()->getPrinter( false ); -#ifdef TL_NOT_NOW /*TLPDF*/ - Link aSfxSaveLnk = pPrt->GetEndPrintHdl(); - if( rOpt.IsPrintSingleJobs() ) - pPrt->SetEndPrintHdl( Link() ); -#endif +//TLPDF SfxPrinter *pPrt = pSh->getIDocumentDeviceAccess()->getPrinter( false ); + const boost::shared_ptr< Printer > pPrt( new Printer /* Printer( const JobSetup& rJobSetup ) */ ); // TLPDF + vcl::OldStylePrintAdaptor aPrtAdaptor( pPrt ); // TLPDF +//TLPDF Link aSfxSaveLnk = pPrt->GetEndPrintHdl(); +//TLPDF if( rOpt.IsPrintSingleJobs() ) +//TLPDF pPrt->SetEndPrintHdl( Link() ); BOOL bUserBreak = FALSE, bRet = FALSE; @@ -986,23 +987,27 @@ BOOL SwNewDBMgr::MergePrint( SwView& rView, String( RTL_CONSTASCII_USTRINGPARAM( "true" ) ) ); pPrt->StartJob( rOpt.GetJobName() ); } -#endif if( pPrt->IsJobActive() ) { - pSh->PrintProspect( rOpt, rProgress, rOpt.IsPrintProspect_RTL() ); + pSh->PrintProspectMM( aPrtAdaptor, rOpt, rOpt.IsPrintProspect_RTL() ); /* TLPDF */ bRet = TRUE; } +#endif // TL_NOT_NOW /*TLPDF*/ + pSh->PrintProspectMM( aPrtAdaptor, rOpt, rOpt.IsPrintProspect_RTL() ); // TLPDF + bRet = TRUE; // TLPDF } - else if( pSh->Prt( pPrt, rOpt, &rProgress ) ) /* TLPDF */ + else if( pSh->PrintOrPDFExportMM( aPrtAdaptor, rOpt ) /* TLPDF */ ) bRet = TRUE; bMergeLock = FALSE; +#ifdef TL_NOT_NOW /*TLPDF*/ if( !pPrt->IsJobActive() ) { bUserBreak = TRUE; bRet = FALSE; break; } +#endif // TL_NOT_NOW /*TLPDF*/ if( !rOpt.IsPrintSingleJobs() ) { String& rJNm = (String&)rOpt.GetJobName(); @@ -1012,15 +1017,16 @@ BOOL SwNewDBMgr::MergePrint( SwView& rView, nEndRow = pImpl->pMergeData ? pImpl->pMergeData->xResultSet->getRow() : 0; } while( bSynchronizedDoc && (nStartRow != nEndRow)? ExistsNextRecord() : ToNextMergeRecord()); -#ifdef TL_NOT_NOW /*TLPDF*/ if( rOpt.IsPrintSingleJobs() ) { - SfxPrinter* pTmpPrinter = pSh->getIDocumentDeviceAccess()->getPrinter( true ); - pTmpPrinter->SetEndPrintHdl( aSfxSaveLnk ); - if ( !bUserBreak && !pTmpPrinter->IsJobActive() ) //Schon zu spaet? - aSfxSaveLnk.Call( pTmpPrinter ); +//TLPDF SfxPrinter* pTmpPrinter = pSh->getIDocumentDeviceAccess()->getPrinter( true ); +//TLPDF const boost::shared_ptr< Printer > pTmpPrinter( new Printer /* Printer( const JobSetup& rJobSetup ) */ ); // TLPDF +//TLPDF vcl::OldStylePrintAdaptor aPrtAdaptor( pTmpPrinter ); + // TLPDF +//TLPDF pTmpPrinter->SetEndPrintHdl( aSfxSaveLnk ); +//TLPDF if ( !bUserBreak && !pTmpPrinter->IsJobActive() ) //Schon zu spaet? +//TLPDF aSfxSaveLnk.Call( pTmpPrinter ); } -#endif rOpt.nMergeCnt = 0; rOpt.nMergeAct = 0; @@ -1039,29 +1045,28 @@ BOOL SwNewDBMgr::MergePrint( SwView& rView, } return bRet; -#endif // TL_NOT_NOW /*TLPDF*/ //!! Currently broken beyond repair since we will not have a printer - return TRUE; /* TLPDF */ +#endif // TL_NOT_NOW /*TLPDF*/ } /*-- 21.06.2004 09:08:16--------------------------------------------------- -----------------------------------------------------------------------*/ -BOOL SwNewDBMgr::MergePrintDocuments( SwView& rView, - SwPrtOptions& rOpt, SfxProgress& rProgress, BOOL bIsAPI ) +BOOL SwNewDBMgr::MergePrintDocuments( SwView& /*rView*/, + SwPrtOptions& /*rOpt*/, SfxProgress& /*rProgress*/, BOOL /*bIsAPI*/ ) { - (void) rView; (void) rOpt; (void) rProgress; (void) bIsAPI; /* TLPDF */ -#ifdef TL_NOT_NOW /*TLPDF*/ //!! Currently broken beyond repair since we will not have a printer + return TRUE; +#ifdef TL_NOT_NOW /*TLPDF*/ SwWrtShell* pSh = &rView.GetWrtShell(); //check if the doc is synchronized and contains at least one linked section //merge source is already open rOpt.nMergeCnt = 0; rOpt.SetPrintSingleJobs( sal_True ); - SfxPrinter *pPrt = pSh->getIDocumentDeviceAccess()->getPrinter( false ); -#ifdef TL_NOT_NOW /*TLPDF*/ - Link aSfxSaveLnk = pPrt->GetEndPrintHdl(); - if( rOpt.IsPrintSingleJobs() ) - pPrt->SetEndPrintHdl( Link() ); -#endif +//TLPDF SfxPrinter *pPrt = pSh->getIDocumentDeviceAccess()->getPrinter( false ); + const boost::shared_ptr< Printer > pPrt( new Printer /* Printer( const JobSetup& rJobSetup ) */ ); // TLPDF + vcl::OldStylePrintAdaptor aPrtAdaptor( pPrt ); // TLPDF +//TLPDF Link aSfxSaveLnk = pPrt->GetEndPrintHdl(); +//TLPDF if( rOpt.IsPrintSingleJobs() ) +//TLPDF pPrt->SetEndPrintHdl( Link() ); BOOL bUserBreak = FALSE, bRet = FALSE; @@ -1152,17 +1157,13 @@ BOOL SwNewDBMgr::MergePrintDocuments( SwView& rView, bMergeLock = TRUE; if(rOpt.IsPrintProspect()) { - if( pPrt->IsJobActive() -#ifdef TL_NOT_NOW /*TLPDF*/ - || pPrt->StartJob( rOpt.GetJobName() ) -#endif - ) - { - pSh->PrintProspect( rOpt, rProgress, rOpt.IsPrintProspect_RTL() ); +//TLPDF if( pPrt->IsJobActive() || pPrt->StartJob( rOpt.GetJobName() )) +//TLPDF { + pSh->PrintProspectMM( aPrtAdaptor, rOpt, rOpt.IsPrintProspect_RTL() ); bRet = TRUE; - } +//TLPDF } } - else if( pSh->Prt( pPrt, rOpt, &rProgress ) ) /* TLPDF */ + else if( pSh->PrintOrPDFExportMM( aPrtAdaptor, rOpt ) /* TLPDF */ ) bRet = TRUE; bMergeLock = FALSE; @@ -1179,15 +1180,15 @@ BOOL SwNewDBMgr::MergePrintDocuments( SwView& rView, } } -#ifdef TL_NOT_NOW /*TLPDF*/ if( rOpt.IsPrintSingleJobs() ) { +#ifdef TL_NOT_NOW /*TLPDF*/ SfxPrinter* pTmpPrinter = pSh->getIDocumentDeviceAccess()->getPrinter( true ); pTmpPrinter->SetEndPrintHdl( aSfxSaveLnk ); if ( !bUserBreak && !pTmpPrinter->IsJobActive() ) //Schon zu spaet? aSfxSaveLnk.Call( pTmpPrinter ); +#endif // TL_NOT_NOW /*TLPDF*/ } -#endif rOpt.nMergeCnt = 0; rOpt.nMergeAct = 0; @@ -1206,8 +1207,7 @@ BOOL SwNewDBMgr::MergePrintDocuments( SwView& rView, } return bRet; -#endif // TL_NOT_NOW /*TLPDF*/ //!! Currently broken beyond repair since we will not have a printer - return TRUE; /* TLPDF */ +#endif // TL_NOT_NOW /*TLPDF*/ } -- cgit From 84d95bba0af714d81a889c6eb194d3e4ed21fa21 Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Mon, 17 Aug 2009 09:18:18 +0000 Subject: #i101242# new print UI --- sw/source/ui/dbui/dbmgr.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'sw/source/ui/dbui/dbmgr.cxx') diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index e53f5d766427..62fe78702d1f 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -908,6 +908,7 @@ BOOL SwNewDBMgr::MergePrint( SwView& /*rView*/, //TLPDF SfxPrinter *pPrt = pSh->getIDocumentDeviceAccess()->getPrinter( false ); const boost::shared_ptr< Printer > pPrt( new Printer /* Printer( const JobSetup& rJobSetup ) */ ); // TLPDF vcl::OldStylePrintAdaptor aPrtAdaptor( pPrt ); // TLPDF + const boost::shared_ptr< vcl::PrinterController > pPrtController( &aPrtAdaptor ); //TLPDF Link aSfxSaveLnk = pPrt->GetEndPrintHdl(); //TLPDF if( rOpt.IsPrintSingleJobs() ) //TLPDF pPrt->SetEndPrintHdl( Link() ); @@ -993,10 +994,10 @@ BOOL SwNewDBMgr::MergePrint( SwView& /*rView*/, bRet = TRUE; } #endif // TL_NOT_NOW /*TLPDF*/ - pSh->PrintProspectMM( aPrtAdaptor, rOpt, rOpt.IsPrintProspect_RTL() ); // TLPDF + pSh->PrintProspectMM( pPrtController, rOpt, rOpt.IsPrintProspect_RTL() ); // TLPDF bRet = TRUE; // TLPDF } - else if( pSh->PrintOrPDFExportMM( aPrtAdaptor, rOpt ) /* TLPDF */ ) + else if( pSh->PrintOrPDFExportMM( pPrtController, rOpt ) /* TLPDF */ ) bRet = TRUE; bMergeLock = FALSE; @@ -1064,6 +1065,7 @@ BOOL SwNewDBMgr::MergePrintDocuments( SwView& /*rView*/, //TLPDF SfxPrinter *pPrt = pSh->getIDocumentDeviceAccess()->getPrinter( false ); const boost::shared_ptr< Printer > pPrt( new Printer /* Printer( const JobSetup& rJobSetup ) */ ); // TLPDF vcl::OldStylePrintAdaptor aPrtAdaptor( pPrt ); // TLPDF + const boost::shared_ptr< vcl::PrinterController > pPrtController( &aPrtAdaptor ); //TLPDF Link aSfxSaveLnk = pPrt->GetEndPrintHdl(); //TLPDF if( rOpt.IsPrintSingleJobs() ) //TLPDF pPrt->SetEndPrintHdl( Link() ); @@ -1159,11 +1161,11 @@ BOOL SwNewDBMgr::MergePrintDocuments( SwView& /*rView*/, { //TLPDF if( pPrt->IsJobActive() || pPrt->StartJob( rOpt.GetJobName() )) //TLPDF { - pSh->PrintProspectMM( aPrtAdaptor, rOpt, rOpt.IsPrintProspect_RTL() ); + pSh->PrintProspectMM( pPrtController, rOpt, rOpt.IsPrintProspect_RTL() ); bRet = TRUE; //TLPDF } } - else if( pSh->PrintOrPDFExportMM( aPrtAdaptor, rOpt ) /* TLPDF */ ) + else if( pSh->PrintOrPDFExportMM( pPrtController, rOpt ) /* TLPDF */ ) bRet = TRUE; bMergeLock = FALSE; -- cgit From 00eb1cf049970426333503731f6102909555b484 Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Wed, 19 Aug 2009 07:32:06 +0000 Subject: #i101242# new print UI --- sw/source/ui/dbui/dbmgr.cxx | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'sw/source/ui/dbui/dbmgr.cxx') diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index 62fe78702d1f..7c0991bd39fe 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -881,8 +881,9 @@ SwNewDBMgr::~SwNewDBMgr() BOOL SwNewDBMgr::MergePrint( SwView& /*rView*/, SwPrtOptions& /*rOpt*/, SfxProgress& /*rProgress*/, BOOL /*bIsAPI*/ ) { - return TRUE; -#ifdef TL_NOT_NOW /*TLPDF*/ + DBG_ASSERT( 0, "not implemented" ); + return FALSE; +#ifdef TL_NOT_NOW /* TLPDF */ SwWrtShell* pSh = &rView.GetWrtShell(); //check if the doc is synchronized and contains at least one linked section BOOL bSynchronizedDoc = pSh->IsLabelDoc() && pSh->GetSectionFmtCount() > 1; @@ -990,14 +991,14 @@ BOOL SwNewDBMgr::MergePrint( SwView& /*rView*/, } if( pPrt->IsJobActive() ) { - pSh->PrintProspectMM( aPrtAdaptor, rOpt, rOpt.IsPrintProspect_RTL() ); /* TLPDF */ + pSh->PrintProspectMM( aPrtAdaptor, aViewProperties, rOpt, rOpt.IsPrintProspect_RTL() ); /* TLPDF */ bRet = TRUE; } #endif // TL_NOT_NOW /*TLPDF*/ - pSh->PrintProspectMM( pPrtController, rOpt, rOpt.IsPrintProspect_RTL() ); // TLPDF + pSh->PrintProspectMM( aPrtAdaptor, aViewProperties, rOpt, rOpt.IsPrintProspect_RTL() ); // TLPDF bRet = TRUE; // TLPDF } - else if( pSh->PrintOrPDFExportMM( pPrtController, rOpt ) /* TLPDF */ ) + else if( pSh->PrintOrPDFExportMM( aPrtAdaptor, aViewProperties, rOpt ) /* TLPDF */ ) bRet = TRUE; bMergeLock = FALSE; @@ -1046,7 +1047,7 @@ BOOL SwNewDBMgr::MergePrint( SwView& /*rView*/, } return bRet; -#endif // TL_NOT_NOW /*TLPDF*/ +#endif // TL_NOT_NOW /* TLPDF */ } /*-- 21.06.2004 09:08:16--------------------------------------------------- @@ -1054,8 +1055,9 @@ BOOL SwNewDBMgr::MergePrint( SwView& /*rView*/, BOOL SwNewDBMgr::MergePrintDocuments( SwView& /*rView*/, SwPrtOptions& /*rOpt*/, SfxProgress& /*rProgress*/, BOOL /*bIsAPI*/ ) { - return TRUE; -#ifdef TL_NOT_NOW /*TLPDF*/ + DBG_ASSERT( 0, "not implemented" ); + return FALSE; +#ifdef TL_NOT_NOW /* TLPDF */ SwWrtShell* pSh = &rView.GetWrtShell(); //check if the doc is synchronized and contains at least one linked section //merge source is already open @@ -1149,6 +1151,7 @@ BOOL SwNewDBMgr::MergePrintDocuments( SwView& /*rView*/, pAddViewProperties[0].Value <<= ::rtl::OUString( aTmp ); rView.SetAdditionalPrintOptions(aAddViewProperties); + // TLPDF: What abou this line ??? rView.SfxViewShell::Print( rProgress, bIsAPI ); // ggf Basic-Macro ausfuehren if( rOpt.IsPrintSingleJobs() && bRet ) { @@ -1161,11 +1164,11 @@ BOOL SwNewDBMgr::MergePrintDocuments( SwView& /*rView*/, { //TLPDF if( pPrt->IsJobActive() || pPrt->StartJob( rOpt.GetJobName() )) //TLPDF { - pSh->PrintProspectMM( pPrtController, rOpt, rOpt.IsPrintProspect_RTL() ); - bRet = TRUE; + pSh->PrintProspectMM( aPrtAdaptor, aAddViewProperties, rOpt, rOpt.IsPrintProspect_RTL() ); + bRet = TRUE; //TLPDF } } - else if( pSh->PrintOrPDFExportMM( pPrtController, rOpt ) /* TLPDF */ ) + else if( pSh->PrintOrPDFExportMM( aPrtAdaptor, aAddViewProperties, rOpt ) /* TLPDF */ ) bRet = TRUE; bMergeLock = FALSE; @@ -1209,7 +1212,7 @@ BOOL SwNewDBMgr::MergePrintDocuments( SwView& /*rView*/, } return bRet; -#endif // TL_NOT_NOW /*TLPDF*/ +#endif // TL_NOT_NOW /* TLPDF */ } -- cgit From bc18988ff86ca83d850fba993a669ff6b8253b5a Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Thu, 27 Aug 2009 12:29:52 +0000 Subject: #101242# SwRenderData introduced; minor name changes --- sw/source/ui/dbui/dbmgr.cxx | 62 ++++++++++++++++++++++++++++++++------------- 1 file changed, 44 insertions(+), 18 deletions(-) (limited to 'sw/source/ui/dbui/dbmgr.cxx') diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index a5cfd66a740a..ff29ca8638e2 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -458,6 +458,7 @@ BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc ) case DBMGR_MERGE_MAILMERGE: // Serienbrief { SwView& rView = rMergeDesc.rSh.GetView(); +#ifdef TL_NOT_NOW /*TLPDF*/ SfxDispatcher *pDis = rView.GetViewFrame()->GetDispatcher(); SfxItemSet aPrintArgs( rView.GetPool(), SID_SILENT, SID_SILENT, //5528 @@ -522,9 +523,42 @@ BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc ) } } - pDis->Execute( SID_PRINTDOC, - SFX_CALLMODE_SYNCHRON|SFX_CALLMODE_RECORD, - aPrintArgs ); +#endif //def TL_NOT_NOW /*TLPDF*/ + +// TLPDF pDis->Execute( SID_PRINTDOC, +// TLPDF SFX_CALLMODE_SYNCHRON|SFX_CALLMODE_RECORD, +// TLPDF aPrintArgs ); +#if OSL_DEBUG_LEVEL > 1 + sal_Bool _bVal; + sal_Int16 _nVal; + rtl::OUString _sVal; + const beans::PropertyValue* pPrintOptions = rMergeDesc.aPrintOptions.getConstArray(); + for( sal_Int32 nOption = 0; nOption < rMergeDesc.aPrintOptions.getLength(); ++nOption) + { + rtl::OUString aName( pPrintOptions[nOption].Name ); + uno::Any aVal( pPrintOptions[nOption].Value ); + aVal >>= _bVal; + aVal >>= _nVal; + aVal >>= _sVal; + } +#endif + + // printing should be done synchronous otherwise the document + // might already become invalid during the process + uno::Sequence< beans::PropertyValue > aOptions( rMergeDesc.aPrintOptions ); + const sal_Int32 nOpts = aOptions.getLength(); + aOptions.realloc( nOpts + 1 ); + aOptions[ nOpts ].Name = rtl::OUString::createFromAscii( "Wait" ); + aOptions[ nOpts ].Value <<= sal_True ; + + const SwModuleOptions * pModOpt = SW_MOD()->GetModuleConfig(); + if (pModOpt->IsSinglePrintJob()) + { + } + else + { + rView.ExecPrint( aOptions, sal_False, sal_False ); + } } break; @@ -858,12 +892,9 @@ SwNewDBMgr::~SwNewDBMgr() --------------------------------------------------------------------*/ -BOOL SwNewDBMgr::MergePrint( SwView& /*rView*/, - SwPrtOptions& /*rOpt*/, SfxProgress& /*rProgress*/, BOOL /*bIsAPI*/ ) +BOOL SwNewDBMgr::MergePrint( SwView& rView, + SwPrtOptions& rOpt, SfxProgress& rProgress, BOOL bIsAPI ) { - DBG_ASSERT( 0, "not implemented" ); - return FALSE; -#ifdef TL_NOT_NOW /* TLPDF */ SwWrtShell* pSh = &rView.GetWrtShell(); //check if the doc is synchronized and contains at least one linked section BOOL bSynchronizedDoc = pSh->IsLabelDoc() && pSh->GetSectionFmtCount() > 1; @@ -971,11 +1002,11 @@ BOOL SwNewDBMgr::MergePrint( SwView& /*rView*/, } if( pPrt->IsJobActive() ) { - pSh->PrintProspectMM( aPrtAdaptor, aViewProperties, rOpt, rOpt.IsPrintProspect_RTL() ); /* TLPDF */ + pSh->PrintProspectMM( aPrtAdaptor, aViewProperties, rOpt, rOpt.IsPrintProspectRTL() ); /* TLPDF */ bRet = TRUE; } #endif // TL_NOT_NOW /*TLPDF*/ - pSh->PrintProspectMM( aPrtAdaptor, aViewProperties, rOpt, rOpt.IsPrintProspect_RTL() ); // TLPDF + pSh->PrintProspectMM( aPrtAdaptor, aViewProperties, rOpt, rOpt.IsPrintProspectRTL() ); // TLPDF bRet = TRUE; // TLPDF } else if( pSh->PrintOrPDFExportMM( aPrtAdaptor, aViewProperties, rOpt ) /* TLPDF */ ) @@ -1027,17 +1058,13 @@ BOOL SwNewDBMgr::MergePrint( SwView& /*rView*/, } return bRet; -#endif // TL_NOT_NOW /* TLPDF */ } /*-- 21.06.2004 09:08:16--------------------------------------------------- -----------------------------------------------------------------------*/ -BOOL SwNewDBMgr::MergePrintDocuments( SwView& /*rView*/, - SwPrtOptions& /*rOpt*/, SfxProgress& /*rProgress*/, BOOL /*bIsAPI*/ ) +BOOL SwNewDBMgr::MergePrintDocuments( SwView& rView, + SwPrtOptions& rOpt, SfxProgress& rProgress, BOOL bIsAPI ) { - DBG_ASSERT( 0, "not implemented" ); - return FALSE; -#ifdef TL_NOT_NOW /* TLPDF */ SwWrtShell* pSh = &rView.GetWrtShell(); //check if the doc is synchronized and contains at least one linked section //merge source is already open @@ -1144,7 +1171,7 @@ BOOL SwNewDBMgr::MergePrintDocuments( SwView& /*rView*/, { //TLPDF if( pPrt->IsJobActive() || pPrt->StartJob( rOpt.GetJobName() )) //TLPDF { - pSh->PrintProspectMM( aPrtAdaptor, aAddViewProperties, rOpt, rOpt.IsPrintProspect_RTL() ); + pSh->PrintProspectMM( aPrtAdaptor, aAddViewProperties, rOpt, rOpt.IsPrintProspectRTL() ); bRet = TRUE; //TLPDF } } @@ -1192,7 +1219,6 @@ BOOL SwNewDBMgr::MergePrintDocuments( SwView& /*rView*/, } return bRet; -#endif // TL_NOT_NOW /* TLPDF */ } -- cgit From d9d92875a62f7c2142f4c851f10eccdf896cc4ee Mon Sep 17 00:00:00 2001 From: Philipp Lohmann Date: Fri, 28 Aug 2009 14:15:32 +0000 Subject: fix warning --- sw/source/ui/dbui/dbmgr.cxx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'sw/source/ui/dbui/dbmgr.cxx') diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index ff29ca8638e2..034429f39ca7 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -458,7 +458,7 @@ BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc ) case DBMGR_MERGE_MAILMERGE: // Serienbrief { SwView& rView = rMergeDesc.rSh.GetView(); -#ifdef TL_NOT_NOW /*TLPDF*/ +#ifdef TL_NOT_NOW /*TLPDF*/ SfxDispatcher *pDis = rView.GetViewFrame()->GetDispatcher(); SfxItemSet aPrintArgs( rView.GetPool(), SID_SILENT, SID_SILENT, //5528 @@ -523,7 +523,7 @@ BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc ) } } -#endif //def TL_NOT_NOW /*TLPDF*/ +#endif //def TL_NOT_NOW /*TLPDF*/ // TLPDF pDis->Execute( SID_PRINTDOC, // TLPDF SFX_CALLMODE_SYNCHRON|SFX_CALLMODE_RECORD, @@ -540,8 +540,8 @@ BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc ) aVal >>= _bVal; aVal >>= _nVal; aVal >>= _sVal; - } -#endif + } +#endif // printing should be done synchronous otherwise the document // might already become invalid during the process @@ -550,8 +550,8 @@ BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc ) aOptions.realloc( nOpts + 1 ); aOptions[ nOpts ].Name = rtl::OUString::createFromAscii( "Wait" ); aOptions[ nOpts ].Value <<= sal_True ; - - const SwModuleOptions * pModOpt = SW_MOD()->GetModuleConfig(); + + const SwModuleOptions * pModOpt = SW_MOD()->GetModuleConfig(); if (pModOpt->IsSinglePrintJob()) { } @@ -925,8 +925,8 @@ BOOL SwNewDBMgr::MergePrint( SwView& rView, //TLPDF if( rOpt.IsPrintSingleJobs() ) //TLPDF pPrt->SetEndPrintHdl( Link() ); - BOOL bUserBreak = FALSE, - bRet = FALSE; +//TLPDF BOOL bUserBreak = FALSE; + BOOL bRet = FALSE; long nStartRow, nEndRow; //calculate number of data sets to be printed -- cgit From 49722c743ab79cb01c4932c894549d8db9bb9426 Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Mon, 31 Aug 2009 08:59:41 +0000 Subject: #i101242# minor clean-up --- sw/source/ui/dbui/dbmgr.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sw/source/ui/dbui/dbmgr.cxx') diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index 034429f39ca7..8ca8463a379a 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -552,12 +552,13 @@ BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc ) aOptions[ nOpts ].Value <<= sal_True ; const SwModuleOptions * pModOpt = SW_MOD()->GetModuleConfig(); - if (pModOpt->IsSinglePrintJob()) + if (pModOpt->IsSinglePrintJob()) // single print job per document? { + rView.ExecPrint( aOptions, sal_False, sal_False ); } else { - rView.ExecPrint( aOptions, sal_False, sal_False ); + // here use the print adaptor top get just one print job } } break; -- cgit From 24e7c7a3173bf1612c9903466e88508852bce390 Mon Sep 17 00:00:00 2001 From: Oliver Specht Date: Tue, 1 Sep 2009 08:22:04 +0000 Subject: #i101242# mail merge printing --- sw/source/ui/dbui/dbmgr.cxx | 371 ++++++++++---------------------------------- 1 file changed, 79 insertions(+), 292 deletions(-) (limited to 'sw/source/ui/dbui/dbmgr.cxx') diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index 8ca8463a379a..c1884e7ccbfc 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -455,114 +455,7 @@ BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc ) bRet = Merge(&rMergeDesc.rSh); // Mischen break; - case DBMGR_MERGE_MAILMERGE: // Serienbrief - { - SwView& rView = rMergeDesc.rSh.GetView(); -#ifdef TL_NOT_NOW /*TLPDF*/ - SfxDispatcher *pDis = rView.GetViewFrame()->GetDispatcher(); - SfxItemSet aPrintArgs( rView.GetPool(), - SID_SILENT, SID_SILENT, //5528 - SID_ASYNCHRON, SID_ASYNCHRON, //5811 - SID_PRINT_FIRST_PAGE, SID_PRINT_FIRST_PAGE, // 5001 - SID_PRINT_LAST_PAGE, SID_PRINT_LAST_PAGE, // 5002 - SID_PRINT_COPIES, SID_PRINT_COPIES, // 5003 - SID_PRINTER_NAME, SID_PRINTER_NAME, //5322 - SID_SELECTION, SID_SELECTION, //5346 - SID_FILE_NAME, SID_FILE_NAME, // 5507 - SID_PRINT_PAGES, SID_PRINT_PAGES, //6589 - SID_PRINT_COLLATE, SID_PRINT_COLLATE, //6590 - FN_QRY_MERGE, FN_QRY_MERGE, - 0 ); - aPrintArgs.Put(SfxBoolItem(FN_QRY_MERGE, TRUE) ); - - // !! Currently (Jan-2003) silent is defined by supplying *any* - // !! item!! (Thus according to OS it would be silent even when - // !! other items then SID_SILENT would be supplied!) - // !! Therefore it has to be the 0 pointer when not silent. - if(IsMergeSilent()) - { - aPrintArgs.Put( SfxBoolItem(SID_SILENT, TRUE) ); - } - // #i52629# aynchronous printing should only be done in silent mode - otherwise - // the printer dialog does not come up - aPrintArgs.Put( SfxBoolItem( SID_ASYNCHRON, rMergeDesc.bPrintAsync )); - - // convert PropertyValues - const beans::PropertyValue* pPrintOptions = rMergeDesc.aPrintOptions.getConstArray(); - for( sal_Int32 nOption = 0; nOption < rMergeDesc.aPrintOptions.getLength(); ++nOption) - { - if( pPrintOptions[nOption].Name.equalsAscii( "CopyCount" )) - { - sal_Int16 nCopies = 0; - if((pPrintOptions[nOption].Value >>= nCopies) && nCopies > 0) - aPrintArgs.Put( SfxInt16Item( SID_PRINT_COPIES, nCopies )); - } - else if( pPrintOptions[nOption].Name.equalsAscii( "FileName" )) - { - ::rtl::OUString sFileName; - if( (pPrintOptions[nOption].Value >>= sFileName) && sFileName.getLength() > 0) - aPrintArgs.Put( SfxStringItem( SID_FILE_NAME, sFileName )); - } - else if( pPrintOptions[nOption].Name.equalsAscii( "Collate" )) - { - sal_Bool bCollate = sal_False; - if( pPrintOptions[nOption].Value >>= bCollate ) - aPrintArgs.Put( SfxBoolItem( SID_PRINT_COLLATE, bCollate )); - } - else if( pPrintOptions[nOption].Name.equalsAscii( "Pages" )) - { - ::rtl::OUString sPages; - if( (pPrintOptions[nOption].Value >>= sPages) && sPages.getLength() ) - aPrintArgs.Put( SfxStringItem( SID_PRINT_PAGES, sPages )); - } - else if( pPrintOptions[nOption].Name.equalsAscii( "Wait" )) - { - sal_Bool bWait = sal_False; - if( pPrintOptions[nOption].Value >>= bWait ) - aPrintArgs.Put( SfxBoolItem( SID_ASYNCHRON, !bWait )); - } - - } -#endif //def TL_NOT_NOW /*TLPDF*/ - -// TLPDF pDis->Execute( SID_PRINTDOC, -// TLPDF SFX_CALLMODE_SYNCHRON|SFX_CALLMODE_RECORD, -// TLPDF aPrintArgs ); -#if OSL_DEBUG_LEVEL > 1 - sal_Bool _bVal; - sal_Int16 _nVal; - rtl::OUString _sVal; - const beans::PropertyValue* pPrintOptions = rMergeDesc.aPrintOptions.getConstArray(); - for( sal_Int32 nOption = 0; nOption < rMergeDesc.aPrintOptions.getLength(); ++nOption) - { - rtl::OUString aName( pPrintOptions[nOption].Name ); - uno::Any aVal( pPrintOptions[nOption].Value ); - aVal >>= _bVal; - aVal >>= _nVal; - aVal >>= _sVal; - } -#endif - - // printing should be done synchronous otherwise the document - // might already become invalid during the process - uno::Sequence< beans::PropertyValue > aOptions( rMergeDesc.aPrintOptions ); - const sal_Int32 nOpts = aOptions.getLength(); - aOptions.realloc( nOpts + 1 ); - aOptions[ nOpts ].Name = rtl::OUString::createFromAscii( "Wait" ); - aOptions[ nOpts ].Value <<= sal_True ; - - const SwModuleOptions * pModOpt = SW_MOD()->GetModuleConfig(); - if (pModOpt->IsSinglePrintJob()) // single print job per document? - { - rView.ExecPrint( aOptions, sal_False, sal_False ); - } - else - { - // here use the print adaptor top get just one print job - } - } - break; - + case DBMGR_MERGE_MAILMERGE: // printing merge from 'old' merge dialog or from UNO-component case DBMGR_MERGE_MAILING: case DBMGR_MERGE_MAILFILES: case DBMGR_MERGE_SINGLE_FILE: @@ -1060,169 +953,6 @@ BOOL SwNewDBMgr::MergePrint( SwView& rView, return bRet; } -/*-- 21.06.2004 09:08:16--------------------------------------------------- - - -----------------------------------------------------------------------*/ -BOOL SwNewDBMgr::MergePrintDocuments( SwView& rView, - SwPrtOptions& rOpt, SfxProgress& rProgress, BOOL bIsAPI ) -{ - SwWrtShell* pSh = &rView.GetWrtShell(); - //check if the doc is synchronized and contains at least one linked section - //merge source is already open - rOpt.nMergeCnt = 0; - rOpt.SetPrintSingleJobs( sal_True ); - -//TLPDF SfxPrinter *pPrt = pSh->getIDocumentDeviceAccess()->getPrinter( false ); - const boost::shared_ptr< Printer > pPrt( new Printer /* Printer( const JobSetup& rJobSetup ) */ ); // TLPDF - vcl::OldStylePrintAdaptor aPrtAdaptor( pPrt ); // TLPDF - const boost::shared_ptr< vcl::PrinterController > pPrtController( &aPrtAdaptor ); -//TLPDF Link aSfxSaveLnk = pPrt->GetEndPrintHdl(); -//TLPDF if( rOpt.IsPrintSingleJobs() ) -//TLPDF pPrt->SetEndPrintHdl( Link() ); - - BOOL bUserBreak = FALSE, - bRet = FALSE; - //calculate number of data sets to be printed - - Sequence aViewProperties(16); - PropertyValue* pViewProperties = aViewProperties.getArray(); - pViewProperties[0].Name = C2U("MailMergeCount"); - pViewProperties[0].Value <<= (sal_Int32)rOpt.nMergeCnt; - pViewProperties[1].Name = C2U("PrintGraphics"); - pViewProperties[1].Value <<= (sal_Bool)rOpt.IsPrintGraphic(); - pViewProperties[2].Name = C2U("PrintTables"); - pViewProperties[2].Value <<= (sal_Bool)rOpt.IsPrintTable(); - pViewProperties[3].Name = C2U("PrintDrawings"); - pViewProperties[3].Value <<= (sal_Bool)rOpt.IsPrintDraw(); - pViewProperties[4].Name = C2U("PrintLeftPages"); - pViewProperties[4].Value <<= (sal_Bool)rOpt.IsPrintLeftPage(); - pViewProperties[5].Name = C2U("PrintRightPages"); - pViewProperties[5].Value <<= (sal_Bool)rOpt.IsPrintRightPage(); - pViewProperties[6].Name = C2U("PrintControls"); - pViewProperties[6].Value <<= (sal_Bool)rOpt.IsPrintControl(); - pViewProperties[7].Name = C2U("PrintReversed"); - pViewProperties[7].Value <<= (sal_Bool)rOpt.IsPrintReverse(); - pViewProperties[8].Name = C2U("PrintPaperFromSetup"); - pViewProperties[8].Value <<= (sal_Bool)rOpt.IsPaperFromSetup(); - pViewProperties[9].Name = C2U("PrintFaxName"); - pViewProperties[9].Value <<= rOpt.GetFaxName(); - pViewProperties[10].Name = C2U("PrintAnnotationMode"); - pViewProperties[10].Value <<= (text::NotePrintMode) rOpt.GetPrintPostIts(); - pViewProperties[11].Name = C2U("PrintProspect"); - pViewProperties[11].Value <<= (sal_Bool)rOpt.IsPrintProspect(); - pViewProperties[12].Name = C2U("PrintPageBackground"); - pViewProperties[12].Value <<= (sal_Bool)rOpt.IsPrintPageBackground(); - pViewProperties[13].Name = C2U("PrintBlackFonts"); - pViewProperties[13].Value <<= (sal_Bool)rOpt.IsPrintBlackFont(); - pViewProperties[14].Name = C2U("IsSinglePrintJob"); - pViewProperties[14].Value <<= (sal_Bool)rOpt.IsPrintSingleJobs(); - pViewProperties[15].Name = C2U("PrintEmptyPages"); - pViewProperties[15].Value <<= (sal_Bool)rOpt.IsPrintEmptyPages(); - - rView.SetAdditionalPrintOptions(aViewProperties); - - SwMailMergeConfigItem* pConfigItem = rView.GetMailMergeConfigItem(); - DBG_ASSERT(pConfigItem, "mail merge config item is missing"); - if(!pConfigItem) - return sal_False; - - USHORT nDocStart = pConfigItem->GetPrintRangeStart(); - USHORT nDocEnd = pConfigItem->GetPrintRangeEnd(); - DBG_ASSERT(nDocStart < nDocEnd && nDocEnd <= pConfigItem->GetMergedDocumentCount(), - "merge print settings are not correct"); - - for( sal_uInt32 nPrintDocument = nDocStart; nPrintDocument < nDocEnd; ++nPrintDocument) - { - SwDocMergeInfo& rDocInfo = pConfigItem->GetDocumentMergeInfo(nPrintDocument); - rOpt.aMulti.SelectAll(FALSE); - rOpt.aMulti.Select(Range( rDocInfo.nStartPageInTarget, rDocInfo.nEndPageInTarget ), TRUE ); - - ++rOpt.nMergeAct; - - // launch MailMergeEvent if required - const SwXMailMerge *pEvtSrc = GetMailMergeEvtSrc(); - if (pEvtSrc) - { - uno::Reference< XInterface > xRef( (XMailMergeBroadcaster *) pEvtSrc ); - text::MailMergeEvent aEvt( xRef, rView.GetDocShell()->GetModel() ); - pEvtSrc->LaunchMailMergeEvent( aEvt ); - } - - String aTmp; - aTmp += String::CreateFromInt32( rDocInfo.nStartPageInTarget ); - aTmp += '-'; - aTmp += String::CreateFromInt32( rDocInfo.nEndPageInTarget ); - - Sequence aAddViewProperties(1); - PropertyValue* pAddViewProperties = aAddViewProperties.getArray(); - pAddViewProperties[0].Name = C2U("Pages"); - pAddViewProperties[0].Value <<= ::rtl::OUString( aTmp ); - rView.SetAdditionalPrintOptions(aAddViewProperties); - - // TLPDF: What abou this line ??? - rView.SfxViewShell::Print( rProgress, bIsAPI ); // ggf Basic-Macro ausfuehren - if( rOpt.IsPrintSingleJobs() && bRet ) - { - //rOpt.bJobStartet = FALSE; - bRet = FALSE; - } - - bMergeLock = TRUE; - if(rOpt.IsPrintProspect()) - { -//TLPDF if( pPrt->IsJobActive() || pPrt->StartJob( rOpt.GetJobName() )) -//TLPDF { - pSh->PrintProspectMM( aPrtAdaptor, aAddViewProperties, rOpt, rOpt.IsPrintProspectRTL() ); - bRet = TRUE; -//TLPDF } - } - else if( pSh->PrintOrPDFExportMM( aPrtAdaptor, aAddViewProperties, rOpt ) /* TLPDF */ ) - bRet = TRUE; - bMergeLock = FALSE; - - if( !pPrt->IsJobActive() ) - { - bUserBreak = TRUE; - bRet = FALSE; - break; - } - if( !rOpt.IsPrintSingleJobs() ) - { - String& rJNm = (String&)rOpt.GetJobName(); - rJNm.Erase(); - } - } - - if( rOpt.IsPrintSingleJobs() ) - { -#ifdef TL_NOT_NOW /*TLPDF*/ - SfxPrinter* pTmpPrinter = pSh->getIDocumentDeviceAccess()->getPrinter( true ); - pTmpPrinter->SetEndPrintHdl( aSfxSaveLnk ); - if ( !bUserBreak && !pTmpPrinter->IsJobActive() ) //Schon zu spaet? - aSfxSaveLnk.Call( pTmpPrinter ); -#endif // TL_NOT_NOW /*TLPDF*/ - } - - rOpt.nMergeCnt = 0; - rOpt.nMergeAct = 0; - - nMergeType = DBMGR_INSERT; - - SwDocShell* pDocSh = rView.GetDocShell(); - SfxViewFrame *pTmpFrm = SfxViewFrame::GetFirst(pDocSh); - - while (pTmpFrm) // Alle Views Invalidieren - { - SwView *pVw = PTR_CAST(SwView, pTmpFrm->GetViewShell()); - if (pVw) - pVw->GetEditWin().Invalidate(); - pTmpFrm = pTmpFrm->GetNext(*pTmpFrm, pDocSh); - } - - return bRet; -} - - /*-------------------------------------------------------------------- Beschreibung: Serienbriefe als einzelne Dokumente speichern @@ -1370,6 +1100,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, // in case of creating a single resulting file this has to be created here SwWrtShell* pTargetShell = 0; SfxObjectShellRef xTargetDocShell; + SwView* pTargetView = 0; std::auto_ptr< utl::TempFile > aTempFile; String sModifiedStartingPageDesc; String sStartingPageDesc; @@ -1382,7 +1113,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, xTargetDocShell->DoInitNew( 0 ); SfxViewFrame* pTargetFrame = SfxViewFrame::CreateViewFrame( *xTargetDocShell, 0, TRUE ); - SwView* pTargetView = static_cast( pTargetFrame->GetViewShell() ); + pTargetView = static_cast( pTargetFrame->GetViewShell() ); //initiate SelectShell() to create sub shells pTargetView->AttrChangedNotify( &pTargetView->GetWrtShell() ); @@ -1703,27 +1434,83 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, // save the single output document if(rMergeDescriptor.bCreateSingleFile || bAsSingleFile) { - DBG_ASSERT( aTempFile.get(), "Temporary file not available" ); - INetURLObject aTempFileURL(bAsSingleFile ? sSubject : aTempFile->GetURL()); - SfxMedium* pDstMed = new SfxMedium( - aTempFileURL.GetMainURL( INetURLObject::NO_DECODE ), - STREAM_STD_READWRITE, TRUE ); - pDstMed->SetFilter( pStoreToFilter ); - if(pDstMed->GetItemSet()) + if( rMergeDescriptor.nMergeType != DBMGR_MERGE_MAILMERGE ) { - if(pStoreToFilterOptions ) - pDstMed->GetItemSet()->Put(SfxStringItem(SID_FILE_FILTEROPTIONS, *pStoreToFilterOptions)); - if(rMergeDescriptor.aSaveToFilterData.getLength()) - pDstMed->GetItemSet()->Put(SfxUsrAnyItem(SID_FILTER_DATA, makeAny(rMergeDescriptor.aSaveToFilterData))); - } + DBG_ASSERT( aTempFile.get(), "Temporary file not available" ); + INetURLObject aTempFileURL(bAsSingleFile ? sSubject : aTempFile->GetURL()); + SfxMedium* pDstMed = new SfxMedium( + aTempFileURL.GetMainURL( INetURLObject::NO_DECODE ), + STREAM_STD_READWRITE, TRUE ); + pDstMed->SetFilter( pStoreToFilter ); + if(pDstMed->GetItemSet()) + { + if(pStoreToFilterOptions ) + pDstMed->GetItemSet()->Put(SfxStringItem(SID_FILE_FILTEROPTIONS, *pStoreToFilterOptions)); + if(rMergeDescriptor.aSaveToFilterData.getLength()) + pDstMed->GetItemSet()->Put(SfxUsrAnyItem(SID_FILTER_DATA, makeAny(rMergeDescriptor.aSaveToFilterData))); + } - xTargetDocShell->DoSaveAs(*pDstMed); - xTargetDocShell->DoSaveCompleted(pDstMed); - if( xTargetDocShell->GetError() ) + xTargetDocShell->DoSaveAs(*pDstMed); + xTargetDocShell->DoSaveCompleted(pDstMed); + if( xTargetDocShell->GetError() ) + { + // error message ?? + ErrorHandler::HandleError( xTargetDocShell->GetError() ); + bLoop = FALSE; + } + } + else if( pTargetView ) // must be available! { - // error message ?? - ErrorHandler::HandleError( xTargetDocShell->GetError() ); - bLoop = FALSE; + //print the target document + #if OSL_DEBUG_LEVEL > 1 + sal_Bool _bVal; + sal_Int16 _nVal; + rtl::OUString _sVal; + const beans::PropertyValue* pDbgPrintOptions = rMergeDescriptor.aPrintOptions.getConstArray(); + for( sal_Int32 nOption = 0; nOption < rMergeDescriptor.aPrintOptions.getLength(); ++nOption) + { + rtl::OUString aName( pDbgPrintOptions[nOption].Name ); + uno::Any aVal( pDbgPrintOptions[nOption].Value ); + aVal >>= _bVal; + aVal >>= _nVal; + aVal >>= _sVal; + } + #endif + // printing should be done synchronously otherwise the document + // might already become invalid during the process + uno::Sequence< beans::PropertyValue > aOptions( rMergeDescriptor.aPrintOptions ); + const sal_Int32 nOpts = aOptions.getLength(); + aOptions.realloc( nOpts + 1 ); + aOptions[ nOpts ].Name = rtl::OUString::createFromAscii( "Wait" ); + aOptions[ nOpts ].Value <<= sal_True ; +// aPrintArgs.Put(SfxBoolItem(FN_QRY_MERGE, TRUE) ); +// // #i52629# aynchronous printing should only be done in silent mode - otherwise +// // the printer dialog does not come up +// aPrintArgs.Put( SfxBoolItem( SID_ASYNCHRON, rMergeDescriptor.bPrintAsync )); + // move print options + const beans::PropertyValue* pPrintOptions = rMergeDescriptor.aPrintOptions.getConstArray(); + for( sal_Int32 nOption = 0; nOption < rMergeDescriptor.aPrintOptions.getLength(); ++nOption) + { + if( pPrintOptions[nOption].Name.equalsAscii( "CopyCount" ) + ||( pPrintOptions[nOption].Name.equalsAscii( "FileName" )) + ||( pPrintOptions[nOption].Name.equalsAscii( "Collate" )) + ||( pPrintOptions[nOption].Name.equalsAscii( "Pages" )) + ||( pPrintOptions[nOption].Name.equalsAscii( "Wait" ))) + { + aOptions.realloc( nOpts + 1 ); + aOptions[ nOpts ].Name = pPrintOptions[nOption].Name; + aOptions[ nOpts ].Value = pPrintOptions[nOption].Value ; + } + } + + const SwModuleOptions * pModOpt = SW_MOD()->GetModuleConfig(); +// if (pModOpt->IsSinglePrintJob()) +// { +// } +// else +// { + pTargetView->ExecPrint( aOptions, IsMergeSilent(), rMergeDescriptor.bPrintAsync ); +// } } xTargetDocShell->DoClose(); } @@ -2955,6 +2742,7 @@ void SwNewDBMgr::ExecuteFormLetter( SwWrtShell& rSh, SwMergeDescriptor aMergeDesc( pImpl->pMergeDialog->GetMergeType(), pView->GetWrtShell(), aDescriptor ); aMergeDesc.sSaveToFilter = pImpl->pMergeDialog->GetSaveFilter(); + aMergeDesc.bCreateSingleFile= true; MergeNew(aMergeDesc); pWorkDoc->SetNewDBMgr( pWorkDBMgr ); @@ -3448,5 +3236,4 @@ void SwConnectionDisposedListener_Impl::disposing( const EventObject& rSource ) rDBMgr.aDataSourceParams.DeleteAndDestroy(nPos - 1); } } -} - +} \ No newline at end of file -- cgit From b4c51335262a4f3ad88d15d3b13d5442e90b142b Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Tue, 1 Sep 2009 15:41:59 +0000 Subject: #i101242# applying view options and formatting doc now only done in getRendererCount --- sw/source/ui/dbui/dbmgr.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sw/source/ui/dbui/dbmgr.cxx') diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index c1884e7ccbfc..2e2b43339124 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -900,10 +900,10 @@ BOOL SwNewDBMgr::MergePrint( SwView& rView, bRet = TRUE; } #endif // TL_NOT_NOW /*TLPDF*/ - pSh->PrintProspectMM( aPrtAdaptor, aViewProperties, rOpt, rOpt.IsPrintProspectRTL() ); // TLPDF +//TLPDFXX pSh->PrintProspectMM( aPrtAdaptor, aViewProperties, rOpt, rOpt.IsPrintProspectRTL() ); // TLPDF bRet = TRUE; // TLPDF } - else if( pSh->PrintOrPDFExportMM( aPrtAdaptor, aViewProperties, rOpt ) /* TLPDF */ ) + else if( 1 /*TLPDFXX pSh->PrintOrPDFExportMM( aPrtAdaptor, aViewProperties, rOpt ) */ ) bRet = TRUE; bMergeLock = FALSE; @@ -3236,4 +3236,4 @@ void SwConnectionDisposedListener_Impl::disposing( const EventObject& rSource ) rDBMgr.aDataSourceParams.DeleteAndDestroy(nPos - 1); } } -} \ No newline at end of file +} -- cgit From 65756e786d115472d3607724456888d325608a95 Mon Sep 17 00:00:00 2001 From: Philipp Lohmann Date: Tue, 1 Sep 2009 16:31:53 +0000 Subject: remove warnings --- sw/source/ui/dbui/dbmgr.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source/ui/dbui/dbmgr.cxx') diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index 2e2b43339124..dee7803a9798 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -1503,7 +1503,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, } } - const SwModuleOptions * pModOpt = SW_MOD()->GetModuleConfig(); +// const SwModuleOptions * pModOpt = SW_MOD()->GetModuleConfig(); // if (pModOpt->IsSinglePrintJob()) // { // } -- cgit From 4c0bd776257fb1ad287e34b4e1bcf4bb6cd2f822 Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Thu, 3 Sep 2009 15:12:37 +0000 Subject: #i101242# printing from HTML source view --- sw/source/ui/dbui/dbmgr.cxx | 172 -------------------------------------------- 1 file changed, 172 deletions(-) (limited to 'sw/source/ui/dbui/dbmgr.cxx') diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index dee7803a9798..487bc744e9eb 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -781,178 +781,6 @@ SwNewDBMgr::~SwNewDBMgr() } delete pImpl; } -/*-------------------------------------------------------------------- - Beschreibung: Serienbrief drucken - --------------------------------------------------------------------*/ - - -BOOL SwNewDBMgr::MergePrint( SwView& rView, - SwPrtOptions& rOpt, SfxProgress& rProgress, BOOL bIsAPI ) -{ - SwWrtShell* pSh = &rView.GetWrtShell(); - //check if the doc is synchronized and contains at least one linked section - BOOL bSynchronizedDoc = pSh->IsLabelDoc() && pSh->GetSectionFmtCount() > 1; - //merge source is already open - rOpt.nMergeCnt = 0; - //#i56195# no field update while printing mail merge documents - rOpt.bUpdateFieldsInPrinting = sal_False; - if(pImpl->pMergeData) - { - if(pImpl->pMergeData->aSelection.getLength()) - rOpt.nMergeCnt = pImpl->pMergeData->aSelection.getLength(); - else if(pImpl->pMergeData->xResultSet.is()) - { - sal_Int32 nCount; - if( lcl_getCountFromResultSet( nCount, pImpl->pMergeData->xResultSet ) ) - rOpt.nMergeCnt = (ULONG)nCount; - } - } - - SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig(); - pModOpt->SetSinglePrintJob(rOpt.IsPrintSingleJobs()); - -//TLPDF SfxPrinter *pPrt = pSh->getIDocumentDeviceAccess()->getPrinter( false ); - const boost::shared_ptr< Printer > pPrt( new Printer /* Printer( const JobSetup& rJobSetup ) */ ); // TLPDF - vcl::OldStylePrintAdaptor aPrtAdaptor( pPrt ); // TLPDF - const boost::shared_ptr< vcl::PrinterController > pPrtController( &aPrtAdaptor ); -//TLPDF Link aSfxSaveLnk = pPrt->GetEndPrintHdl(); -//TLPDF if( rOpt.IsPrintSingleJobs() ) -//TLPDF pPrt->SetEndPrintHdl( Link() ); - -//TLPDF BOOL bUserBreak = FALSE; - BOOL bRet = FALSE; - long nStartRow, nEndRow; - //calculate number of data sets to be printed - - Sequence aViewProperties(16); - PropertyValue* pViewProperties = aViewProperties.getArray(); - pViewProperties[0].Name = C2U("MailMergeCount"); - pViewProperties[0].Value <<= (sal_Int32)rOpt.nMergeCnt; - pViewProperties[1].Name = C2U("PrintGraphics"); - pViewProperties[1].Value <<= (sal_Bool)rOpt.IsPrintGraphic(); - pViewProperties[2].Name = C2U("PrintTables"); - pViewProperties[2].Value <<= (sal_Bool)rOpt.IsPrintTable(); - pViewProperties[3].Name = C2U("PrintDrawings"); - pViewProperties[3].Value <<= (sal_Bool)rOpt.IsPrintDraw(); - pViewProperties[4].Name = C2U("PrintLeftPages"); - pViewProperties[4].Value <<= (sal_Bool)rOpt.IsPrintLeftPage(); - pViewProperties[5].Name = C2U("PrintRightPages"); - pViewProperties[5].Value <<= (sal_Bool)rOpt.IsPrintRightPage(); - pViewProperties[6].Name = C2U("PrintControls"); - pViewProperties[6].Value <<= (sal_Bool)rOpt.IsPrintControl(); - pViewProperties[7].Name = C2U("PrintReversed"); - pViewProperties[7].Value <<= (sal_Bool)rOpt.IsPrintReverse(); - pViewProperties[8].Name = C2U("PrintPaperFromSetup"); - pViewProperties[8].Value <<= (sal_Bool)rOpt.IsPaperFromSetup(); - pViewProperties[9].Name = C2U("PrintFaxName"); - pViewProperties[9].Value <<= rOpt.GetFaxName(); - pViewProperties[10].Name = C2U("PrintAnnotationMode"); - pViewProperties[10].Value <<= (text::NotePrintMode) rOpt.GetPrintPostIts(); - pViewProperties[11].Name = C2U("PrintProspect"); - pViewProperties[11].Value <<= (sal_Bool)rOpt.IsPrintProspect(); - pViewProperties[12].Name = C2U("PrintPageBackground"); - pViewProperties[12].Value <<= (sal_Bool)rOpt.IsPrintPageBackground(); - pViewProperties[13].Name = C2U("PrintBlackFonts"); - pViewProperties[13].Value <<= (sal_Bool)rOpt.IsPrintBlackFont(); - pViewProperties[14].Name = C2U("IsSinglePrintJob"); - pViewProperties[14].Value <<= (sal_Bool)rOpt.IsPrintSingleJobs(); - pViewProperties[15].Name = C2U("PrintEmptyPages"); - pViewProperties[15].Value <<= (sal_Bool)rOpt.IsPrintEmptyPages(); - - rView.SetAdditionalPrintOptions(aViewProperties); - do { - nStartRow = pImpl->pMergeData ? pImpl->pMergeData->xResultSet->getRow() : 0; - { - SFX_APP()->NotifyEvent(SfxEventHint(SW_EVENT_FIELD_MERGE, pSh->GetView().GetViewFrame()->GetObjectShell())); - pSh->ViewShell::UpdateFlds(); - SFX_APP()->NotifyEvent(SfxEventHint(SW_EVENT_FIELD_MERGE_FINISHED, pSh->GetView().GetViewFrame()->GetObjectShell())); - ++rOpt.nMergeAct; - - // launch MailMergeEvent if required - const SwXMailMerge *pEvtSrc = GetMailMergeEvtSrc(); - if (pEvtSrc) - { - uno::Reference< XInterface > xRef( (XMailMergeBroadcaster *) pEvtSrc ); - text::MailMergeEvent aEvt( xRef, rView.GetDocShell()->GetModel() ); - pEvtSrc->LaunchMailMergeEvent( aEvt ); - } - - rView.SfxViewShell::Print( rProgress, bIsAPI ); // ggf Basic-Macro ausfuehren - if( rOpt.IsPrintSingleJobs() && bRet ) - { - //rOpt.bJobStartet = FALSE; - bRet = FALSE; - } - - bMergeLock = TRUE; - if(rOpt.IsPrintProspect()) - { -#ifdef TL_NOT_NOW /*TLPDF*/ - if( ! pPrt->IsJobActive() ) - { - pPrt->SetJobValue( String( RTL_CONSTASCII_USTRINGPARAM( "IsQuickJob" ) ), - String( RTL_CONSTASCII_USTRINGPARAM( "true" ) ) ); - pPrt->StartJob( rOpt.GetJobName() ); - } - if( pPrt->IsJobActive() ) - { - pSh->PrintProspectMM( aPrtAdaptor, aViewProperties, rOpt, rOpt.IsPrintProspectRTL() ); /* TLPDF */ - bRet = TRUE; - } -#endif // TL_NOT_NOW /*TLPDF*/ -//TLPDFXX pSh->PrintProspectMM( aPrtAdaptor, aViewProperties, rOpt, rOpt.IsPrintProspectRTL() ); // TLPDF - bRet = TRUE; // TLPDF - } - else if( 1 /*TLPDFXX pSh->PrintOrPDFExportMM( aPrtAdaptor, aViewProperties, rOpt ) */ ) - bRet = TRUE; - bMergeLock = FALSE; - -#ifdef TL_NOT_NOW /*TLPDF*/ - if( !pPrt->IsJobActive() ) - { - bUserBreak = TRUE; - bRet = FALSE; - break; - } -#endif // TL_NOT_NOW /*TLPDF*/ - if( !rOpt.IsPrintSingleJobs() ) - { - String& rJNm = (String&)rOpt.GetJobName(); - rJNm.Erase(); - } - } - nEndRow = pImpl->pMergeData ? pImpl->pMergeData->xResultSet->getRow() : 0; - } while( bSynchronizedDoc && (nStartRow != nEndRow)? ExistsNextRecord() : ToNextMergeRecord()); - - if( rOpt.IsPrintSingleJobs() ) - { -//TLPDF SfxPrinter* pTmpPrinter = pSh->getIDocumentDeviceAccess()->getPrinter( true ); -//TLPDF const boost::shared_ptr< Printer > pTmpPrinter( new Printer /* Printer( const JobSetup& rJobSetup ) */ ); // TLPDF -//TLPDF vcl::OldStylePrintAdaptor aPrtAdaptor( pTmpPrinter ); - // TLPDF -//TLPDF pTmpPrinter->SetEndPrintHdl( aSfxSaveLnk ); -//TLPDF if ( !bUserBreak && !pTmpPrinter->IsJobActive() ) //Schon zu spaet? -//TLPDF aSfxSaveLnk.Call( pTmpPrinter ); - } - - rOpt.nMergeCnt = 0; - rOpt.nMergeAct = 0; - - nMergeType = DBMGR_INSERT; - - SwDocShell* pDocSh = rView.GetDocShell(); - SfxViewFrame *pTmpFrm = SfxViewFrame::GetFirst(pDocSh); - - while (pTmpFrm) // Alle Views Invalidieren - { - SwView *pVw = PTR_CAST(SwView, pTmpFrm->GetViewShell()); - if (pVw) - pVw->GetEditWin().Invalidate(); - pTmpFrm = pTmpFrm->GetNext(*pTmpFrm, pDocSh); - } - - return bRet; -} /*-------------------------------------------------------------------- Beschreibung: Serienbriefe als einzelne Dokumente speichern -- cgit From 330620b17d6785b9f1f7d3646e3958bc7fbdd1eb Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 9 Dec 2009 10:11:48 +0100 Subject: autorecovery: substituted some more usages of SfxViewFrame::CreateViewFrame with their new equivalents --- sw/source/ui/dbui/dbmgr.cxx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'sw/source/ui/dbui/dbmgr.cxx') diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index 603af1c31111..9ed35bf00e6a 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -1327,7 +1327,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, // create a target docshell to put the merged document into xTargetDocShell = new SwDocShell( SFX_CREATE_MODE_STANDARD ); xTargetDocShell->DoInitNew( 0 ); - SfxViewFrame* pTargetFrame = SfxViewFrame::CreateViewFrame( *xTargetDocShell, 0, TRUE ); + SfxViewFrame* pTargetFrame = SfxViewFrame::LoadHiddenDocument( *xTargetDocShell, 0 ); SwView* pTargetView = static_cast( pTargetFrame->GetViewShell() ); @@ -1447,7 +1447,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, if (xWorkDocSh->DoLoad(pWorkMed)) { //create a view frame for the document - SfxViewFrame* pWorkFrame = SfxViewFrame::CreateViewFrame( *xWorkDocSh, 0, TRUE ); + SfxViewFrame* pWorkFrame = SfxViewFrame::LoadHiddenDocument( *xWorkDocSh, 0 ); //request the layout calculation SwWrtShell& rWorkShell = static_cast< SwView* >(pWorkFrame->GetViewShell())->GetWrtShell(); @@ -2892,7 +2892,7 @@ void SwNewDBMgr::ExecuteFormLetter( SwWrtShell& rSh, pWorkMed->SetFilter( pSfxFlt ); if( xWorkDocSh->DoLoad(pWorkMed) ) { - SfxViewFrame *pFrame = SfxViewFrame::CreateViewFrame( *xWorkDocSh, 0, TRUE ); + SfxViewFrame *pFrame = SfxViewFrame::LoadHiddenDocument( *xWorkDocSh, 0 ); SwView *pView = (SwView*) pFrame->GetViewShell(); pView->AttrChangedNotify( &pView->GetWrtShell() );//Damit SelectShell gerufen wird. //set the current DBMgr @@ -3183,7 +3183,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig, // create a target docshell to put the merged document into SfxObjectShellRef xTargetDocShell( new SwDocShell( SFX_CREATE_MODE_STANDARD ) ); xTargetDocShell->DoInitNew( 0 ); - SfxViewFrame* pTargetFrame = SfxViewFrame::CreateViewFrame( *xTargetDocShell, 0, TRUE ); + SfxViewFrame* pTargetFrame = SfxViewFrame::LoadHiddenDocument( *xTargetDocShell, 0 ); //the created window has to be located at the same position as the source window Window& rTargetWindow = pTargetFrame->GetFrame()->GetWindow(); @@ -3244,7 +3244,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig, xWorkDocSh->DoInitNew(); } //create a ViewFrame - SwView* pWorkView = static_cast< SwView* >( SfxViewFrame::CreateViewFrame( *xWorkDocSh, 0, sal_True )->GetViewShell() ); + SwView* pWorkView = static_cast< SwView* >( SfxViewFrame::LoadHiddenDocument( *xWorkDocSh, 0 )->GetViewShell() ); SwWrtShell& rWorkShell = pWorkView->GetWrtShell(); pWorkView->AttrChangedNotify( &rWorkShell );//Damit SelectShell gerufen wird. @@ -3255,8 +3255,8 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig, pWorkDoc->EmbedAllLinks(); if(UNDO_UI_DELETE_INVISIBLECNTNT == rWorkShell.GetUndoIds()) rWorkShell.Undo(); - // #i69485# lock fields to prevent access to the result set while calculating layout - rWorkShell.LockExpFlds(); + // #i69485# lock fields to prevent access to the result set while calculating layout + rWorkShell.LockExpFlds(); // create a layout rWorkShell.CalcLayout(); rWorkShell.UnlockExpFlds(); -- cgit From 3fa259739300c572830e3680de6fcf93257fca4c Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Tue, 15 Dec 2009 21:55:40 +0100 Subject: #i107706#: liquidate goodies module --- sw/source/ui/dbui/dbmgr.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source/ui/dbui/dbmgr.cxx') diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index 329316dcb21a..5c2d7cb2fef6 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -77,7 +77,7 @@ #include #include #include -#include +#include #include #include #include -- cgit From 9688479e09b20ba09a419931af59c04177e4373e Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 15 Dec 2009 23:07:57 +0100 Subject: autorecovery: SfxViewFrame's SfxFrame is a reference now, no pointer (it can never be NULL) --- sw/source/ui/dbui/dbmgr.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sw/source/ui/dbui/dbmgr.cxx') diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index 9ed35bf00e6a..ce8646239425 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -3186,11 +3186,11 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig, SfxViewFrame* pTargetFrame = SfxViewFrame::LoadHiddenDocument( *xTargetDocShell, 0 ); //the created window has to be located at the same position as the source window - Window& rTargetWindow = pTargetFrame->GetFrame()->GetWindow(); - Window& rSourceWindow = rSourceView.GetViewFrame()->GetFrame()->GetWindow(); + Window& rTargetWindow = pTargetFrame->GetFrame().GetWindow(); + Window& rSourceWindow = rSourceView.GetViewFrame()->GetFrame().GetWindow(); rTargetWindow.SetPosPixel(rSourceWindow.GetPosPixel()); -// pTargetFrame->GetFrame()->Appear(); +// pTargetFrame->GetFrame().Appear(); SwView* pTargetView = static_cast( pTargetFrame->GetViewShell() ); rMMConfig.SetTargetView(pTargetView); //initiate SelectShell() to create sub shells -- cgit From 55f1f483cfa4cde111593782f17c514a0056d7f0 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Fri, 8 Jan 2010 18:32:51 +0100 Subject: #i107450#: build all other modules with new editeng lib --- sw/source/ui/dbui/dbmgr.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source/ui/dbui/dbmgr.cxx') diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index 5c2d7cb2fef6..23bd5c82735d 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -119,7 +119,7 @@ #include #include #include -#include +#include #include #include -- cgit From a3dad64d25dfe6ef0297d6d2fbaf72fcef5017fb Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Wed, 13 Jan 2010 22:25:07 +0100 Subject: #i107450#: move more code out of svx --- sw/source/ui/dbui/dbmgr.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source/ui/dbui/dbmgr.cxx') diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index 23bd5c82735d..092b7beb92e6 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -116,7 +116,7 @@ #include #include #include -#include +#include #include #include #include -- cgit From bd711a0e5e5e0e94cc4cb78251f50de205aeb485 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 1 Feb 2010 21:32:33 +0100 Subject: autorecovery: more sophisticated configuration data for interaction handlers The generic css.task.InteractionHandler implementation in module uui is now able to instantiate "sub handlers", i.e. components to delegate a request to, based on the type of the request, and some configuration data. The "old" (and now deprecated) configuration scheme at org.openoffice.ucb.InteractionHandler did not contain type information, so any handlers registered there were always called when no default implementation for a given request was available. The "new" configuration scheme at org.openoffice.Interaction contains UNO type information. That is, a given handler implementation can declare itself responsible for an arbitrary set of UNO types, and for each of those types, whether it is also responsible for sub types. The generic interaction handler implementation uses this configuration data, when it encounteres an interaction request it cannot fullfill itself, to instantiate a component to delegate the request to. As with the "old" data, such a component is required to support the css.task.XInteractionHandler2 interface. Also, if it supports css.lang.XInitialization, then it will be initialized with a name-value pair, the name being "Parent", the value being the XWindow interface of the parent window for any message boxes. As an examplary implementation for this feature, the css.sdb.InteractionHandler has been deprecated. Now the css.sdb.DatabaseInteractionHandler is reponsible for database-related interactions, and the new configuration scheme is pre-filled with data assigning this responsibility. Consequently, a lot of places previously creating an css.sdb.InteractionHandler have been modified to create the default css.task.InteractionHandler. --- sw/source/ui/dbui/dbmgr.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sw/source/ui/dbui/dbmgr.cxx') diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index 1f72bbf1fe84..3d8eb202fbb4 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -1949,7 +1949,7 @@ uno::Reference< sdbc::XConnection> SwNewDBMgr::GetConnection(const String& rData { rxSource.set(xComplConnection,UNO_QUERY); Reference< XInteractionHandler > xHandler( - xMgr->createInstance( C2U( "com.sun.star.sdb.InteractionHandler" )), UNO_QUERY); + xMgr->createInstance( C2U( "com.sun.star.task.InteractionHandler" )), UNO_QUERY); xConnection = xComplConnection->connectWithCompletion( xHandler ); } } @@ -3100,7 +3100,7 @@ uno::Reference SwNewDBMgr::createCursor(const ::rtl::OUString& _sDat if ( xRowSet.is() ) { - uno::Reference< XInteractionHandler > xHandler(xMgr->createInstance(C2U("com.sun.star.sdb.InteractionHandler")), UNO_QUERY); + uno::Reference< XInteractionHandler > xHandler(xMgr->createInstance(C2U("com.sun.star.task.InteractionHandler")), UNO_QUERY); xRowSet->executeWithCompletion(xHandler); } xResultSet = uno::Reference(xRowSet, UNO_QUERY); -- cgit From 1a359bd2a8d7621574942287703e7df69ebffa16 Mon Sep 17 00:00:00 2001 From: Jens-Heiner Rechtien Date: Fri, 12 Feb 2010 15:01:35 +0100 Subject: changefileheader2: #i109125#: change source file copyright notice from Sun Microsystems to Oracle; remove CVS style keywords (RCSfile, Revision) --- sw/source/ui/dbui/dbmgr.cxx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'sw/source/ui/dbui/dbmgr.cxx') diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index 07ba1564c5ef..411f06198168 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: dbmgr.cxx,v $ - * $Revision: 1.132.44.2 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify -- cgit