diff options
author | Noel Power <noel.power@novell.com> | 2012-08-01 18:25:32 +0100 |
---|---|---|
committer | Noel Power <noel.power@novell.com> | 2012-08-01 18:47:50 +0100 |
commit | 3514df0f78c6cce2cc618e1c7c2728c759342bce (patch) | |
tree | 2112bee815833d03c362c7c58a5bafbd2faaedc3 /sc/source/ui/vba/vbawindow.cxx | |
parent | 13dc61da882e1e5800665f027894d1885c42def7 (diff) |
add TabRatio api and detect macro at group shape fixes bnc#770708
Change-Id: I73eb612edaba21aa5bb07577b42bd31f8de2dd2a
Diffstat (limited to 'sc/source/ui/vba/vbawindow.cxx')
-rw-r--r-- | sc/source/ui/vba/vbawindow.cxx | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/sc/source/ui/vba/vbawindow.cxx b/sc/source/ui/vba/vbawindow.cxx index f196a5c8fc3a..f56c79fc23b0 100644 --- a/sc/source/ui/vba/vbawindow.cxx +++ b/sc/source/ui/vba/vbawindow.cxx @@ -851,6 +851,28 @@ ScVbaWindow::PrintPreview( const css::uno::Any& EnableChanges ) throw (css::scri PrintPreviewHelper( EnableChanges, excel::getBestViewShell( m_xModel ) ); } +double SAL_CALL ScVbaWindow::getTabRatio() throw (css::uno::RuntimeException) +{ + ScTabViewShell* pViewShell = excel::getBestViewShell( m_xModel ); + if ( pViewShell && pViewShell->GetViewData() && pViewShell->GetViewData()->GetView() ) + { + double fRatio = pViewShell->GetViewData()->GetView()->GetRelTabBarWidth(); + if ( fRatio >= 0.0 && fRatio <= 1.0 ) + return fRatio; + } + return 0.0; +} + +void SAL_CALL ScVbaWindow::setTabRatio( double fRatio ) throw (css::uno::RuntimeException) +{ + ScTabViewShell* pViewShell = excel::getBestViewShell( m_xModel ); + if ( pViewShell && pViewShell->GetViewData() && pViewShell->GetViewData()->GetView() ) + { + if ( fRatio >= 0.0 && fRatio <= 1.0 ) + pViewShell->GetViewData()->GetView()->SetRelTabBarWidth( fRatio ); + } +} + rtl::OUString ScVbaWindow::getServiceImplName() { |