diff options
author | Jonathan Pryor <jpryor@novell.com> | 2010-09-15 12:01:56 +0200 |
---|---|---|
committer | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2010-09-15 14:09:37 +0200 |
commit | 7e905a8c791eee19d905f6655e4d5f0eeded38a2 (patch) | |
tree | 61303556c1e39694ad952f33f865c1e13312d2cc /sc/source/ui/view/preview.cxx | |
parent | 833272e9bb6220b63e6d1674283855cd12311bee (diff) |
sc-print-selected-sheets.diff: Make Print Preview consistent with Print output
n#335684, i#45497
Diffstat (limited to 'sc/source/ui/view/preview.cxx')
-rw-r--r-- | sc/source/ui/view/preview.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx index 83fdab9000e6..3ab6dc140484 100644 --- a/sc/source/ui/view/preview.cxx +++ b/sc/source/ui/view/preview.cxx @@ -109,6 +109,7 @@ ScPreview::ScPreview( Window* pParent, ScDocShell* pDocSh, ScPreviewShell* pView bLocationValid( FALSE ), pLocationData( NULL ), pDrawView( NULL ), + nCurTab ( ScDocShell::GetCurTab() ), bInPaint( FALSE ), bInGetState( FALSE ), pDocShell( pDocSh ), @@ -249,8 +250,17 @@ void ScPreview::CalcPages( SCTAB /*nToWhichTab*/ ) // but always all sheets are used (there is no selected sheet) ScPrintOptions aOptions = SC_MOD()->GetPrintOptions(); + ScMarkData aMarkData; + aMarkData.SelectTable( nCurTab, TRUE ); + for (SCTAB i=nStart; i<nAnz; i++) { + if (!aOptions.GetAllSheets() && !aMarkData.GetTableSelect( i )) { + nPages[i] = 0; + nFirstAttr[i] = 0; + continue; + } + long nAttrPage = i > 0 ? nFirstAttr[i-1] : 1; long nThisStart = nTotalPages; |