diff options
Diffstat (limited to 'sc/source/ui')
-rw-r--r-- | sc/source/ui/inc/preview.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/preview.cxx | 7 | ||||
-rw-r--r-- | sc/source/ui/view/prevwsh.cxx | 2 |
3 files changed, 3 insertions, 8 deletions
diff --git a/sc/source/ui/inc/preview.hxx b/sc/source/ui/inc/preview.hxx index f6982914029d..f926e1abb7db 100644 --- a/sc/source/ui/inc/preview.hxx +++ b/sc/source/ui/inc/preview.hxx @@ -65,8 +65,6 @@ private: ScPreviewLocationData* pLocationData; // stores table layout for accessibility API FmFormView* pDrawView; - SCTAB nCurTab; - // intern: ScDocShell* pDocShell; ScPreviewShell* pViewShell; diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx index 272be8412a90..186205cd7409 100644 --- a/sc/source/ui/view/preview.cxx +++ b/sc/source/ui/view/preview.cxx @@ -107,7 +107,6 @@ ScPreview::ScPreview( Window* pParent, ScDocShell* pDocSh, ScPreviewShell* pView nTotalPages( 0 ), pLocationData( NULL ), pDrawView( NULL ), - nCurTab ( ScDocShell::GetCurTab() ), pDocShell( pDocSh ), pViewShell( pViewSh ), bInGetState( false ), @@ -247,9 +246,6 @@ void ScPreview::CalcPages() // but always all sheets are used (there is no selected sheet) ScPrintOptions aOptions = SC_MOD()->GetPrintOptions(); - ScMarkData aMarkData; - aMarkData.SelectTable( nCurTab, true ); - while (nStart > static_cast<SCTAB>(nPages.size())) nPages.push_back(0); while (nStart > static_cast<SCTAB>(nFirstAttr.size())) @@ -260,7 +256,8 @@ void ScPreview::CalcPages() nPages.push_back(0); if ( i == static_cast<SCTAB>(nFirstAttr.size())) nFirstAttr.push_back(0); - if (!aOptions.GetAllSheets() && !aMarkData.GetTableSelect( i )) { + if (!aOptions.GetAllSheets() && !maSelectedTabs.count(i) > 0) + { nPages[i] = 0; nFirstAttr[i] = 0; continue; diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx index 89fd96891685..ef995ba5e29d 100644 --- a/sc/source/ui/view/prevwsh.cxx +++ b/sc/source/ui/view/prevwsh.cxx @@ -159,8 +159,8 @@ ScPreviewShell::ScPreviewShell( SfxViewFrame* pViewFrame, ScTabViewShell* pTabViewShell = ((ScTabViewShell*)pOldSh); const ScViewData* pData = pTabViewShell->GetViewData(); pData->WriteUserDataSequence( aSourceData ); - InitStartTable( pData->GetTabNo() ); pPreview->SetSelectedTabs(pData->GetMarkData()); + InitStartTable( pData->GetTabNo() ); // also have to store the TabView's DesignMode state // (only if draw view exists) |