You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by or...@apache.org on 2012/06/06 10:31:18 UTC
svn commit: r1346777 - in /incubator/ooo/branches/AOO34/main/vcl:
inc/vcl/print.hxx source/gdi/print3.cxx
Author: orw
Date: Wed Jun 6 08:31:18 2012
New Revision: 1346777
URL: http://svn.apache.org/viewvc?rev=1346777&view=rev
Log:
#119189# - print dialog: trigger application to free resources
Found by: sorath <to...@mail.ru>
Modified:
incubator/ooo/branches/AOO34/main/vcl/inc/vcl/print.hxx
incubator/ooo/branches/AOO34/main/vcl/source/gdi/print3.cxx
Modified: incubator/ooo/branches/AOO34/main/vcl/inc/vcl/print.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/AOO34/main/vcl/inc/vcl/print.hxx?rev=1346777&r1=1346776&r2=1346777&view=diff
==============================================================================
--- incubator/ooo/branches/AOO34/main/vcl/inc/vcl/print.hxx (original)
+++ incubator/ooo/branches/AOO34/main/vcl/inc/vcl/print.hxx Wed Jun 6 08:31:18 2012
@@ -514,6 +514,10 @@ public:
void abortJob();
+ // applications (well, sw) depend on a page request with "IsLastPage" = true
+ // to free resources, else they (well, sw) will crash eventually
+ void triggerAppToFreeResources();
+
bool isShowDialogs() const;
bool isDirectPrint() const;
Modified: incubator/ooo/branches/AOO34/main/vcl/source/gdi/print3.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/AOO34/main/vcl/source/gdi/print3.cxx?rev=1346777&r1=1346776&r2=1346777&view=diff
==============================================================================
--- incubator/ooo/branches/AOO34/main/vcl/source/gdi/print3.cxx (original)
+++ incubator/ooo/branches/AOO34/main/vcl/source/gdi/print3.cxx Wed Jun 6 08:31:18 2012
@@ -499,6 +499,9 @@ void Printer::ImplPrintJob( const boost:
pController->setValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintCollateAsSingleJobs" ) ),
makeAny( sal_True ) );
}
+ // applications (well, sw) depend on a page request with "IsLastPage" = true
+ // to free resources, else they (well, sw) will crash eventually
+ i_pController->triggerAppToFreeResources();
}
catch( std::bad_alloc& )
{
@@ -1242,9 +1245,8 @@ void PrinterController::jobFinished( vie
{
}
-void PrinterController::abortJob()
+void PrinterController::triggerAppToFreeResources()
{
- setJobState( view::PrintableState_JOB_ABORTED );
// applications (well, sw) depend on a page request with "IsLastPage" = true
// to free resources, else they (well, sw) will crash eventually
setLastPage( sal_True );
@@ -1254,6 +1256,13 @@ void PrinterController::abortJob()
getPageFile( 0, aMtf, false );
}
+void PrinterController::abortJob()
+{
+ setJobState( view::PrintableState_JOB_ABORTED );
+
+ triggerAppToFreeResources();
+}
+
void PrinterController::setLastPage( sal_Bool i_bLastPage )
{
mpImplData->mbLastPage = i_bLastPage;