sc/source/ui/inc/tabcont.hxx | 1 - sc/source/ui/unoobj/docuno.cxx | 7 ++++++- sc/source/ui/view/tabcont.cxx | 16 ---------------- sc/source/ui/view/tabview3.cxx | 2 +- 4 files changed, 7 insertions(+), 19 deletions(-)
New commits: commit 36d950fb16d214b7163223fc2b51f0990f96e494 Author: Kohei Yoshida <kohei.yosh...@suse.com> Date: Tue Nov 29 11:50:03 2011 -0500 Let's not over-activate tab controls unnecessarily. This interfares with the preview shell passing selected tabs back to the view shell, by always selecting the first tab unconditionally. The tabs get painted fine even without this call, so let's remove it. diff --git a/sc/source/ui/inc/tabcont.hxx b/sc/source/ui/inc/tabcont.hxx index 6e922fa..5691234 100644 --- a/sc/source/ui/inc/tabcont.hxx +++ b/sc/source/ui/inc/tabcont.hxx @@ -79,7 +79,6 @@ public: void UpdateInputContext(); void UpdateStatus(); - void ActivateView(sal_Bool bActivate); void SetSheetLayoutRTL( sal_Bool bSheetRTL ); }; diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx index 5666349..230736a 100644 --- a/sc/source/ui/view/tabcont.cxx +++ b/sc/source/ui/view/tabcont.cxx @@ -377,22 +377,6 @@ void ScTabControl::UpdateStatus() } } -void ScTabControl::ActivateView(sal_Bool bActivate) -{ - ScMarkData& rMark = pViewData->GetMarkData(); - - sal_uInt16 nCurId = GetCurPageId(); - if (!nCurId) return; // kann vorkommen, wenn bei Excel-Import alles versteckt ist - sal_uInt16 nPage = nCurId - 1; - - if (bActivate) - { - SelectPage( nPage+1, sal_True ); - rMark.SelectTable( static_cast<SCTAB>(nPage), sal_True ); - } - Invalidate(); -} - void ScTabControl::SetSheetLayoutRTL( sal_Bool bSheetRTL ) { SetEffectiveRTL( bSheetRTL ); diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx index 8bedb88..556d3bf 100644 --- a/sc/source/ui/view/tabview3.cxx +++ b/sc/source/ui/view/tabview3.cxx @@ -2291,7 +2291,7 @@ void ScTabView::ActivateView( bool bActivate, bool bFirst ) pHdl->EnterHandler(); } } - pTabControl->ActivateView(bActivate); + PaintExtras(); aViewData.Activate(bActivate); commit 654c4be03c86cf00f0c66f876caa392e9391f8f5 Author: Kohei Yoshida <kohei.yosh...@suse.com> Date: Tue Nov 29 11:24:27 2011 -0500 Let's check the validity of sheet indices. You never know... diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index b5de718..b9be493 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -899,8 +899,13 @@ bool ScModelObj::FillRenderMarkData( const uno::Any& aSelection, { uno::Sequence<sal_Int32> aSelected = xSelectedSheets->getSelectedSheets(); ScMarkData::MarkedTabsType aSelectedTabs; + SCTAB nMaxTab = pDocShell->GetDocument()->GetTableCount() -1; for (sal_Int32 i = 0, n = aSelected.getLength(); i < n; ++i) - aSelectedTabs.insert(static_cast<SCTAB>(aSelected[i])); + { + SCTAB nSelected = static_cast<SCTAB>(aSelected[i]); + if (ValidTab(nSelected, nMaxTab)) + aSelectedTabs.insert(static_cast<SCTAB>(aSelected[i])); + } rMark.SetSelectedTabs(aSelectedTabs); } _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits