summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2011-11-28 03:01:52 +0100
committerEike Rathke <erack@redhat.com>2011-11-28 15:25:33 +0100
commitd8a85d728f45826c485eb3d250a394e3462e37a1 (patch)
tree7c5a886ab0e341d2b976af1d8c95b3075fdd6c4d
parentb66fb4c3c5c7d1bb6543d84d425b6c4bd654fae3 (diff)
dr78: #i116881# correct handling of cached page breaks for user-defined cell range, remove unused parameter in DoPrint
# HG changeset patch # User Niklas Nebel <nn@openoffice.org> # Date 1297188469 -3600 # Node ID be5ffcd423c49c0045ddeaf11702d44fbde8a8f1 # Parent 3157cd9d60c35f1bcb4c8f56e86cf76ab364e7ee
-rw-r--r--sc/source/core/data/table5.cxx2
-rw-r--r--sc/source/ui/inc/printfun.hxx2
-rw-r--r--sc/source/ui/unoobj/docuno.cxx4
-rw-r--r--sc/source/ui/view/pfuncache.cxx4
-rw-r--r--sc/source/ui/view/preview.cxx2
-rw-r--r--sc/source/ui/view/printfun.cxx24
6 files changed, 7 insertions, 31 deletions
diff --git a/sc/source/core/data/table5.cxx b/sc/source/core/data/table5.cxx
index 7c649175b491..f5a2abe35f92 100644
--- a/sc/source/core/data/table5.cxx
+++ b/sc/source/core/data/table5.cxx
@@ -317,7 +317,7 @@ void ScTable::UpdatePageBreaks( const ScRange* pUserArea )
if (nEndRow+2 <= MAXROW)
RemoveRowPageBreaks(nEndRow+2, MAXROW);
}
- mbPageBreaksValid = true;
+ mbPageBreaksValid = !pUserArea; // #i116881# the valid flag can only apply to the "no user area" case
}
void ScTable::RemoveManualBreaks()
diff --git a/sc/source/ui/inc/printfun.hxx b/sc/source/ui/inc/printfun.hxx
index 0c84978479ed..1b0a4b4b89b2 100644
--- a/sc/source/ui/inc/printfun.hxx
+++ b/sc/source/ui/inc/printfun.hxx
@@ -268,7 +268,7 @@ public:
void ApplyPrintSettings(); // aus DoPrint() schon gerufen
long DoPrint( const MultiSelection& rPageRanges,
long nStartPage, long nDisplayStart, bool bDoPrint,
- SfxProgress* pProgress, ScPreviewLocationData* pLocationData );
+ ScPreviewLocationData* pLocationData );
// Werte abfragen - sofort
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 667bb4c6683c..31bb2e3deff8 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -1063,7 +1063,7 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScModelObj::getRenderer( sal_Int32
long nDisplayStart = pPrintFuncCache->GetDisplayStart( nTab );
long nTabStart = pPrintFuncCache->GetTabStart( nTab );
- (void)aFunc.DoPrint( aPage, nTabStart, nDisplayStart, false, NULL, NULL );
+ (void)aFunc.DoPrint( aPage, nTabStart, nDisplayStart, false, NULL );
ScRange aCellRange;
sal_Bool bWasCellRange = aFunc.GetLastSourceRange( aCellRange );
@@ -1193,7 +1193,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec
}
}
- (void)aFunc.DoPrint( aPage, nTabStart, nDisplayStart, sal_True, NULL, NULL );
+ (void)aFunc.DoPrint( aPage, nTabStart, nDisplayStart, true, NULL );
// resolve the hyperlinks for PDF export
diff --git a/sc/source/ui/view/pfuncache.cxx b/sc/source/ui/view/pfuncache.cxx
index f13b2933d736..cbc20687529a 100644
--- a/sc/source/ui/view/pfuncache.cxx
+++ b/sc/source/ui/view/pfuncache.cxx
@@ -78,8 +78,6 @@ ScPrintFuncCache::ScPrintFuncCache( ScDocShell* pD, const ScMarkData& rMark,
long nThisTab = 0;
if ( rMark.GetTableSelect( nTab ) )
{
- pDoc->InvalidatePageBreaks( nTab ); // user print area (selection) may be different
-
ScPrintFunc aFunc( pDocSh, pPrinter, nTab, nAttrPage, 0, pSelRange, &aSelection.GetOptions() );
nThisTab = aFunc.GetTotalPages();
nFirstAttr.push_back( aFunc.GetFirstPageNo() ); // from page style or previous sheet
@@ -131,7 +129,7 @@ void ScPrintFuncCache::InitLocations( const ScMarkData& rMark, OutputDevice* pDe
aPage.Select( aPageRange );
ScPreviewLocationData aLocData( pDoc, pDev );
- aFunc.DoPrint( aPage, nTabStart, nDisplayStart, false, NULL, &aLocData );
+ aFunc.DoPrint( aPage, nTabStart, nDisplayStart, false, &aLocData );
ScRange aCellRange;
Rectangle aPixRect;
diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx
index 7e018e6a690d..269b6373e849 100644
--- a/sc/source/ui/view/preview.cxx
+++ b/sc/source/ui/view/preview.cxx
@@ -415,7 +415,7 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation )
aPage.SetTotalRange( Range(0,RANGE_MAX) );
aPage.Select( aPageRange );
- long nPrinted = pPrintFunc->DoPrint( aPage, nTabStart, nDisplayStart, bDoPrint, NULL, pFillLocation );
+ long nPrinted = pPrintFunc->DoPrint( aPage, nTabStart, nDisplayStart, bDoPrint, pFillLocation );
OSL_ENSURE(nPrinted<=1, "was'n nu los?");
SetMapMode(aMMMode);
diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx
index c844fd951951..b6af96afcb27 100644
--- a/sc/source/ui/view/printfun.cxx
+++ b/sc/source/ui/view/printfun.cxx
@@ -51,7 +51,6 @@
#include <editeng/ulspitem.hxx>
#include <sfx2/app.hxx>
#include <sfx2/printer.hxx>
-#include <sfx2/progress.hxx>
#include <tools/multisel.hxx>
#include <sfx2/docfile.hxx>
#include <tools/urlobj.hxx>
@@ -2609,7 +2608,7 @@ void ScPrintFunc::ApplyPrintSettings()
long ScPrintFunc::DoPrint( const MultiSelection& rPageRanges,
long nStartPage, long nDisplayStart, bool bDoPrint,
- SfxProgress* pProgress, ScPreviewLocationData* pLocationData )
+ ScPreviewLocationData* pLocationData )
{
OSL_ENSURE(pDev,"Device == NULL");
if (!pParamSet)
@@ -2629,9 +2628,6 @@ long ScPrintFunc::DoPrint( const MultiSelection& rPageRanges,
MakeTableString();
- if ( pProgress )
- pProgress->SetText( String( ScResId( SCSTR_STAT_PRINT ) ) );
-
//--------------------------------------------------------------------
long nPageNo = 0;
@@ -2672,12 +2668,6 @@ long ScPrintFunc::DoPrint( const MultiSelection& rPageRanges,
{
PrintPage( nPageNo+nDisplayStart, nX1, nY1, nX2, nY2,
bDoPrint, pLocationData );
-
- if ( pProgress )
- {
- pProgress->SetState( nPageNo+nStartPage+1, nEndPage );
- pProgress->Reschedule(); //does the user want to continue
- }
++nPrinted;
}
++nPageNo;
@@ -2702,13 +2692,6 @@ long ScPrintFunc::DoPrint( const MultiSelection& rPageRanges,
{
PrintPage( nPageNo+nDisplayStart, nX1, nY1, nX2, nY2,
bDoPrint, pLocationData );
-
- if ( pProgress )
- {
- pProgress->SetState( nPageNo+nStartPage+1, nEndPage );
- pProgress->Reschedule(); //does the user want to continue
-
- }
++nPrinted;
}
++nPageNo;
@@ -2733,11 +2716,6 @@ long ScPrintFunc::DoPrint( const MultiSelection& rPageRanges,
if ( nNoteAdd )
{
nNoteNr += nNoteAdd;
- if ( pProgress && bPageSelected )
- {
- pProgress->SetState( nPageNo+nStartPage+1, nEndPage );
- pProgress->Reschedule(); //does the user want to continue
- }
if (bPageSelected)
{
++nPrinted;