[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.0' - sc/source
Henry Castro
hcastro at collabora.com
Tue Jan 12 13:54:26 PST 2016
sc/source/ui/inc/tabcont.hxx | 2 +-
sc/source/ui/inc/tabview.hxx | 1 +
sc/source/ui/unoobj/docuno.cxx | 5 ++++-
sc/source/ui/view/tabview3.cxx | 5 +++++
4 files changed, 11 insertions(+), 2 deletions(-)
New commits:
commit 9074fcb3db9653ace243b0fd3373fa9d3956cd0a
Author: Henry Castro <hcastro at collabora.com>
Date: Tue Jan 12 15:37:25 2016 -0400
sc lokit: refactor setPart
Change-Id: I01786551aef0274ae11fe673cc5b0c250e8817cc
Reviewed-on: https://gerrit.libreoffice.org/21403
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Henry Castro <hcastro at collabora.com>
diff --git a/sc/source/ui/inc/tabcont.hxx b/sc/source/ui/inc/tabcont.hxx
index d1515c5..4189a82 100644
--- a/sc/source/ui/inc/tabcont.hxx
+++ b/sc/source/ui/inc/tabcont.hxx
@@ -44,7 +44,6 @@ private:
DECL_LINK(ShowPageList, const CommandEvent*);
- void SwitchToPageId(sal_uInt16 nId);
protected:
virtual void Select() SAL_OVERRIDE;
virtual void Command( const CommandEvent& rCEvt ) SAL_OVERRIDE;
@@ -73,6 +72,7 @@ public:
void UpdateStatus();
void SetSheetLayoutRTL( bool bSheetRTL );
+ void SwitchToPageId( sal_uInt16 nId );
};
#endif
diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx
index 548742c..2150d2e 100644
--- a/sc/source/ui/inc/tabview.hxx
+++ b/sc/source/ui/inc/tabview.hxx
@@ -386,6 +386,7 @@ public:
SC_DLLPUBLIC void SetTabNo( SCTAB nTab, bool bNew = false, bool bExtendSelection = false, bool bSameTabButMoved = false );
void SelectNextTab( short nDir, bool bExtendSelection = false );
+ void SelectTabPage( const sal_uInt16 nTab );
void ActivateView( bool bActivate, bool bFirst );
void ActivatePart( ScSplitPos eWhich );
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 1a41391..0aada85 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -496,7 +496,10 @@ void ScModelObj::paintTile( VirtualDevice& rDevice,
void ScModelObj::setPart( int nPart )
{
ScViewData* pViewData = ScDocShell::GetViewData();
- pViewData->SetTabNo( nPart );
+ ScTabView* pTabView = dynamic_cast< ScTabView* >( pViewData->GetView() );
+
+ if (pTabView)
+ pTabView->SelectTabPage(nPart + 1);
}
int ScModelObj::getParts()
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index ad84f1b..dd47fa2 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -1515,6 +1515,11 @@ void ScTabView::SelectNextTab( short nDir, bool bExtendSelection )
PaintExtras();
}
+void ScTabView::SelectTabPage( const sal_uInt16 nTab )
+{
+ pTabControl->SwitchToPageId( nTab );
+}
+
// SetTabNo - angezeigte Tabelle
void ScTabView::SetTabNo( SCTAB nTab, bool bNew, bool bExtendSelection, bool bSameTabButMoved )
More information about the Libreoffice-commits
mailing list