diff options
Diffstat (limited to 'sc/source/ui/vba/vbawindow.cxx')
-rw-r--r-- | sc/source/ui/vba/vbawindow.cxx | 242 |
1 files changed, 121 insertions, 121 deletions
diff --git a/sc/source/ui/vba/vbawindow.cxx b/sc/source/ui/vba/vbawindow.cxx index a31d348ff7c8..625666b236b9 100644 --- a/sc/source/ui/vba/vbawindow.cxx +++ b/sc/source/ui/vba/vbawindow.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -66,7 +66,7 @@ typedef ::cppu::WeakImplHelper1< container::XEnumeration > Enumeration_BASE; -typedef ::cppu::WeakImplHelper3< container::XEnumerationAccess +typedef ::cppu::WeakImplHelper3< container::XEnumerationAccess , com::sun::star::container::XIndexAccess , com::sun::star::container::XNameAccess > SelectedSheets_BASE; @@ -85,12 +85,12 @@ public: m_it = m_sheets.begin(); } // XEnumeration - virtual ::sal_Bool SAL_CALL hasMoreElements( ) throw (uno::RuntimeException) - { + virtual ::sal_Bool SAL_CALL hasMoreElements( ) throw (uno::RuntimeException) + { return m_it != m_sheets.end(); } - virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) - { + virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) + { if ( !hasMoreElements() ) { throw container::NoSuchElementException(); @@ -107,7 +107,7 @@ class SelectedSheetsEnumAccess : public SelectedSheets_BASE uno::Reference< uno::XComponentContext > m_xContext; NameIndexHash namesToIndices; Sheets sheets; - uno::Reference< frame::XModel > m_xModel; + uno::Reference< frame::XModel > m_xModel; public: SelectedSheetsEnumAccess( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel ):m_xContext( xContext ), m_xModel( xModel ) { @@ -120,7 +120,7 @@ public: ScTabViewShell* pViewShell = excel::getBestViewShell( m_xModel ); if ( !pViewShell ) throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Cannot obtain view shell" ) ), uno::Reference< uno::XInterface >() ); - + SCTAB nTabCount = pDocShell->GetDocument()->GetTableCount(); uno::Sequence<sal_Int32> aSheets( nTabCount ); SCTAB nIndex = 0; @@ -140,60 +140,60 @@ public: } } - + //XEnumerationAccess virtual uno::Reference< container::XEnumeration > SAL_CALL createEnumeration( ) throw (uno::RuntimeException) { - return new SelectedSheetsEnum( m_xContext, sheets, m_xModel ); + return new SelectedSheetsEnum( m_xContext, sheets, m_xModel ); } // XIndexAccess - virtual ::sal_Int32 SAL_CALL getCount( ) throw (uno::RuntimeException) - { + virtual ::sal_Int32 SAL_CALL getCount( ) throw (uno::RuntimeException) + { return sheets.size(); } - virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw ( lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException) - { + virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw ( lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException) + { if ( Index < 0 - || static_cast< Sheets::size_type >( Index ) >= sheets.size() ) + || static_cast< Sheets::size_type >( Index ) >= sheets.size() ) throw lang::IndexOutOfBoundsException(); - + return uno::makeAny( sheets[ Index ] ); } //XElementAccess virtual uno::Type SAL_CALL getElementType( ) throw (uno::RuntimeException) - { - return excel::XWorksheet::static_type(0); + { + return excel::XWorksheet::static_type(0); } - virtual ::sal_Bool SAL_CALL hasElements( ) throw (uno::RuntimeException) - { + virtual ::sal_Bool SAL_CALL hasElements( ) throw (uno::RuntimeException) + { return (sheets.size() > 0); } //XNameAccess - virtual uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) - { + virtual uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) + { NameIndexHash::const_iterator it = namesToIndices.find( aName ); if ( it == namesToIndices.end() ) throw container::NoSuchElementException(); return uno::makeAny( sheets[ it->second ] ); - + } - virtual uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames( ) throw (uno::RuntimeException) - { + virtual uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames( ) throw (uno::RuntimeException) + { uno::Sequence< ::rtl::OUString > names( namesToIndices.size() ); ::rtl::OUString* pString = names.getArray(); NameIndexHash::const_iterator it = namesToIndices.begin(); NameIndexHash::const_iterator it_end = namesToIndices.end(); for ( ; it != it_end; ++it, ++pString ) - *pString = it->first; - return names; + *pString = it->first; + return names; } - virtual ::sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw (uno::RuntimeException) - { + virtual ::sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw (uno::RuntimeException) + { NameIndexHash::const_iterator it = namesToIndices.find( aName ); return (it != namesToIndices.end()); } @@ -239,19 +239,19 @@ ScVbaWindow::Scroll( const uno::Any& Down, const uno::Any& Up, const uno::Any& T m_xPane->SmallScroll( Down, Up, ToRight, ToLeft ); } -void SAL_CALL +void SAL_CALL ScVbaWindow::SmallScroll( const uno::Any& Down, const uno::Any& Up, const uno::Any& ToRight, const uno::Any& ToLeft ) throw (uno::RuntimeException) { Scroll( Down, Up, ToRight, ToLeft ); } -void SAL_CALL +void SAL_CALL ScVbaWindow::LargeScroll( const uno::Any& Down, const uno::Any& Up, const uno::Any& ToRight, const uno::Any& ToLeft ) throw (uno::RuntimeException) { Scroll( Down, Up, ToRight, ToLeft, true ); } -uno::Any SAL_CALL +uno::Any SAL_CALL ScVbaWindow::SelectedSheets( const uno::Any& aIndex ) throw (uno::RuntimeException) { uno::Reference< container::XEnumerationAccess > xEnumAccess( new SelectedSheetsEnumAccess( mxContext, m_xModel ) ); @@ -260,12 +260,12 @@ ScVbaWindow::SelectedSheets( const uno::Any& aIndex ) throw (uno::RuntimeExcepti if ( aIndex.hasValue() ) { uno::Reference< XCollection > xColl( xSheets, uno::UNO_QUERY_THROW ); - return xColl->Item( aIndex, uno::Any() ); + return xColl->Item( aIndex, uno::Any() ); } - return uno::makeAny( xSheets ); + return uno::makeAny( xSheets ); } -void SAL_CALL +void SAL_CALL ScVbaWindow::ScrollWorkbookTabs( const uno::Any& /*Sheets*/, const uno::Any& /*Position*/ ) throw (uno::RuntimeException) { // #TODO #FIXME need some implementation to scroll through the tabs @@ -273,7 +273,7 @@ ScVbaWindow::ScrollWorkbookTabs( const uno::Any& /*Sheets*/, const uno::Any& /*P /* sal_Int32 nSheets = 0; sal_Int32 nPosition = 0; - throw uno::RuntimeException( rtl::OUString::createFromAscii("No Implemented" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString::createFromAscii("No Implemented" ), uno::Reference< uno::XInterface >() ); sal_Bool bSheets = ( Sheets >>= nSheets ); sal_Bool bPosition = ( Position >>= nPosition ); if ( bSheets || bPosition ) // at least one param specified @@ -290,12 +290,12 @@ getPropsFromModel( const uno::Reference< frame::XModel >& xModel ) uno::Reference< frame::XController > xController = xModel->getCurrentController(); if ( !xController.is() ) throw uno::RuntimeException( rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM ("No controller for model") ), uno::Reference< uno::XInterface >() ); + RTL_CONSTASCII_USTRINGPARAM ("No controller for model") ), uno::Reference< uno::XInterface >() ); return uno::Reference< beans::XPropertySet >( xController->getFrame(), uno::UNO_QUERY ); } -uno::Any SAL_CALL +uno::Any SAL_CALL ScVbaWindow::getCaption() throw (uno::RuntimeException) { static rtl::OUString sCrud(RTL_CONSTASCII_USTRINGPARAM(" - OpenOffice.org Calc" ) ); @@ -303,8 +303,8 @@ ScVbaWindow::getCaption() throw (uno::RuntimeException) uno::Reference< beans::XPropertySet > xProps = getPropsFromModel( m_xModel ); rtl::OUString sTitle; - xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( SC_UNONAME_TITLE ) ) ) >>= sTitle; - sal_Int32 nCrudIndex = sTitle.indexOf( sCrud ); + xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( SC_UNONAME_TITLE ) ) ) >>= sTitle; + sal_Int32 nCrudIndex = sTitle.indexOf( sCrud ); // adjust title ( by removing crud ) // sCrud string present if ( nCrudIndex != -1 ) @@ -319,8 +319,8 @@ ScVbaWindow::getCaption() throw (uno::RuntimeException) // is like XL // if the adjusted title == workbook name, use name // if the adjusted title != workbook name but ... - // name == title + extension ( .csv, ,odt, .xls ) - // etc. then also use the name + // name == title + extension ( .csv, ,odt, .xls ) + // etc. then also use the name if ( !sTitle.equals( sName ) ) { @@ -332,40 +332,40 @@ ScVbaWindow::getCaption() throw (uno::RuntimeException) sTitle = sName; } } - } + } return uno::makeAny( sTitle ); } -void SAL_CALL +void SAL_CALL ScVbaWindow::setCaption( const uno::Any& _caption ) throw (uno::RuntimeException) { - + uno::Reference< beans::XPropertySet > xProps = getPropsFromModel( m_xModel ); xProps->setPropertyValue( rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM ( SC_UNONAME_TITLE ) ) , _caption ); + RTL_CONSTASCII_USTRINGPARAM ( SC_UNONAME_TITLE ) ) , _caption ); } -uno::Any SAL_CALL +uno::Any SAL_CALL ScVbaWindow::getScrollRow() throw (uno::RuntimeException) -{ +{ sal_Int32 nValue = 0; - ScTabViewShell* pViewShell = excel::getBestViewShell( m_xModel ); + ScTabViewShell* pViewShell = excel::getBestViewShell( m_xModel ); if ( pViewShell ) { ScSplitPos eWhich = pViewShell->GetViewData()->GetActivePart(); nValue = pViewShell->GetViewData()->GetPosY(WhichV(eWhich)); } - + return uno::makeAny( nValue + 1); } -void SAL_CALL +void SAL_CALL ScVbaWindow::setScrollRow( const uno::Any& _scrollrow ) throw (uno::RuntimeException) { - ScTabViewShell* pViewShell = excel::getBestViewShell( m_xModel ); + ScTabViewShell* pViewShell = excel::getBestViewShell( m_xModel ); if ( pViewShell ) { - sal_Int32 scrollRow = 0; + sal_Int32 scrollRow = 0; _scrollrow >>= scrollRow; ScSplitPos eWhich = pViewShell->GetViewData()->GetActivePart(); sal_Int32 nOldValue = pViewShell->GetViewData()->GetPosY(WhichV(eWhich)) + 1; @@ -373,27 +373,27 @@ ScVbaWindow::setScrollRow( const uno::Any& _scrollrow ) throw (uno::RuntimeExcep } } -uno::Any SAL_CALL +uno::Any SAL_CALL ScVbaWindow::getScrollColumn() throw (uno::RuntimeException) -{ +{ sal_Int32 nValue = 0; - ScTabViewShell* pViewShell = excel::getBestViewShell( m_xModel ); + ScTabViewShell* pViewShell = excel::getBestViewShell( m_xModel ); if ( pViewShell ) { ScSplitPos eWhich = pViewShell->GetViewData()->GetActivePart(); nValue = pViewShell->GetViewData()->GetPosX(WhichH(eWhich)); } - + return uno::makeAny( nValue + 1); } -void SAL_CALL +void SAL_CALL ScVbaWindow::setScrollColumn( const uno::Any& _scrollcolumn ) throw (uno::RuntimeException) { - ScTabViewShell* pViewShell = excel::getBestViewShell( m_xModel ); + ScTabViewShell* pViewShell = excel::getBestViewShell( m_xModel ); if ( pViewShell ) { - sal_Int32 scrollColumn = 0; + sal_Int32 scrollColumn = 0; _scrollcolumn >>= scrollColumn; ScSplitPos eWhich = pViewShell->GetViewData()->GetActivePart(); sal_Int32 nOldValue = pViewShell->GetViewData()->GetPosX(WhichH(eWhich)) + 1; @@ -401,11 +401,11 @@ ScVbaWindow::setScrollColumn( const uno::Any& _scrollcolumn ) throw (uno::Runtim } } -uno::Any SAL_CALL +uno::Any SAL_CALL ScVbaWindow::getWindowState() throw (uno::RuntimeException) -{ +{ sal_Int32 nwindowState = xlNormal; - ScTabViewShell* pViewShell = excel::getBestViewShell( m_xModel ); + ScTabViewShell* pViewShell = excel::getBestViewShell( m_xModel ); SfxViewFrame* pViewFrame = pViewShell -> GetViewFrame(); WorkWindow* pWork = (WorkWindow*) pViewFrame->GetFrame().GetSystemWindow(); if ( pWork ) @@ -418,12 +418,12 @@ ScVbaWindow::getWindowState() throw (uno::RuntimeException) return uno::makeAny( nwindowState ); } -void SAL_CALL +void SAL_CALL ScVbaWindow::setWindowState( const uno::Any& _windowstate ) throw (uno::RuntimeException) { sal_Int32 nwindowState = xlMaximized; _windowstate >>= nwindowState; - ScTabViewShell* pViewShell = excel::getBestViewShell( m_xModel ); + ScTabViewShell* pViewShell = excel::getBestViewShell( m_xModel ); SfxViewFrame* pViewFrame = pViewShell -> GetViewFrame(); WorkWindow* pWork = (WorkWindow*) pViewFrame->GetFrame().GetSystemWindow(); if ( pWork ) @@ -455,19 +455,19 @@ ScVbaWindow::Close( const uno::Any& SaveChanges, const uno::Any& FileName, const } uno::Reference< excel::XPane > SAL_CALL -ScVbaWindow::ActivePane() throw (script::BasicErrorException, uno::RuntimeException) -{ +ScVbaWindow::ActivePane() throw (script::BasicErrorException, uno::RuntimeException) +{ return new ScVbaPane( this, mxContext, m_xModel, m_xViewPane ); } -uno::Reference< excel::XRange > SAL_CALL +uno::Reference< excel::XRange > SAL_CALL ScVbaWindow::ActiveCell( ) throw (script::BasicErrorException, uno::RuntimeException) { uno::Reference< excel::XApplication > xApplication( Application(), uno::UNO_QUERY_THROW ); return xApplication->getActiveCell(); } -uno::Any SAL_CALL +uno::Any SAL_CALL ScVbaWindow::Selection( ) throw (script::BasicErrorException, uno::RuntimeException) { uno::Reference< excel::XApplication > xApplication( Application(), uno::UNO_QUERY_THROW ); @@ -489,11 +489,11 @@ ScVbaWindow::getDisplayGridlines() throw (uno::RuntimeException) rtl::OUString sName( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_SHOWGRID ) ); sal_Bool bGrid = sal_True; xProps->getPropertyValue( sName ) >>= bGrid; - return bGrid; + return bGrid; } -void SAL_CALL +void SAL_CALL ScVbaWindow::setDisplayGridlines( ::sal_Bool _displaygridlines ) throw (uno::RuntimeException) { uno::Reference< beans::XPropertySet > xProps( m_xModel->getCurrentController(), uno::UNO_QUERY_THROW ); @@ -501,17 +501,17 @@ ScVbaWindow::setDisplayGridlines( ::sal_Bool _displaygridlines ) throw (uno::Run xProps->setPropertyValue( sName, uno::makeAny( _displaygridlines )); } -::sal_Bool SAL_CALL +::sal_Bool SAL_CALL ScVbaWindow::getDisplayHeadings() throw (uno::RuntimeException) { uno::Reference< beans::XPropertySet > xProps( m_xModel->getCurrentController(), uno::UNO_QUERY_THROW ); rtl::OUString sName( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_COLROWHDR ) ); sal_Bool bHeading = sal_True; xProps->getPropertyValue( sName ) >>= bHeading; - return bHeading; + return bHeading; } -void SAL_CALL +void SAL_CALL ScVbaWindow::setDisplayHeadings( ::sal_Bool _bDisplayHeadings ) throw (uno::RuntimeException) { uno::Reference< beans::XPropertySet > xProps( m_xModel->getCurrentController(), uno::UNO_QUERY_THROW ); @@ -519,17 +519,17 @@ ScVbaWindow::setDisplayHeadings( ::sal_Bool _bDisplayHeadings ) throw (uno::Runt xProps->setPropertyValue( sName, uno::makeAny( _bDisplayHeadings )); } -::sal_Bool SAL_CALL +::sal_Bool SAL_CALL ScVbaWindow::getDisplayHorizontalScrollBar() throw (uno::RuntimeException) { uno::Reference< beans::XPropertySet > xProps( m_xModel->getCurrentController(), uno::UNO_QUERY_THROW ); rtl::OUString sName( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_HORSCROLL ) ); sal_Bool bHorizontalScrollBar = sal_True; xProps->getPropertyValue( sName ) >>= bHorizontalScrollBar; - return bHorizontalScrollBar; + return bHorizontalScrollBar; } -void SAL_CALL +void SAL_CALL ScVbaWindow::setDisplayHorizontalScrollBar( ::sal_Bool _bDisplayHorizontalScrollBar ) throw (uno::RuntimeException) { uno::Reference< beans::XPropertySet > xProps( m_xModel->getCurrentController(), uno::UNO_QUERY_THROW ); @@ -537,17 +537,17 @@ ScVbaWindow::setDisplayHorizontalScrollBar( ::sal_Bool _bDisplayHorizontalScroll xProps->setPropertyValue( sName, uno::makeAny( _bDisplayHorizontalScrollBar )); } -::sal_Bool SAL_CALL +::sal_Bool SAL_CALL ScVbaWindow::getDisplayOutline() throw (uno::RuntimeException) { uno::Reference< beans::XPropertySet > xProps( m_xModel->getCurrentController(), uno::UNO_QUERY_THROW ); rtl::OUString sName( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_OUTLSYMB ) ); sal_Bool bOutline = sal_True; xProps->getPropertyValue( sName ) >>= bOutline; - return bOutline; + return bOutline; } -void SAL_CALL +void SAL_CALL ScVbaWindow::setDisplayOutline( ::sal_Bool _bDisplayOutline ) throw (uno::RuntimeException) { uno::Reference< beans::XPropertySet > xProps( m_xModel->getCurrentController(), uno::UNO_QUERY_THROW ); @@ -555,17 +555,17 @@ ScVbaWindow::setDisplayOutline( ::sal_Bool _bDisplayOutline ) throw (uno::Runtim xProps->setPropertyValue( sName, uno::makeAny( _bDisplayOutline )); } -::sal_Bool SAL_CALL +::sal_Bool SAL_CALL ScVbaWindow::getDisplayVerticalScrollBar() throw (uno::RuntimeException) { uno::Reference< beans::XPropertySet > xProps( m_xModel->getCurrentController(), uno::UNO_QUERY_THROW ); rtl::OUString sName( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_VERTSCROLL ) ); sal_Bool bVerticalScrollBar = sal_True; xProps->getPropertyValue( sName ) >>= bVerticalScrollBar; - return bVerticalScrollBar; + return bVerticalScrollBar; } -void SAL_CALL +void SAL_CALL ScVbaWindow::setDisplayVerticalScrollBar( ::sal_Bool _bDisplayVerticalScrollBar ) throw (uno::RuntimeException) { uno::Reference< beans::XPropertySet > xProps( m_xModel->getCurrentController(), uno::UNO_QUERY_THROW ); @@ -573,17 +573,17 @@ ScVbaWindow::setDisplayVerticalScrollBar( ::sal_Bool _bDisplayVerticalScrollBar xProps->setPropertyValue( sName, uno::makeAny( _bDisplayVerticalScrollBar )); } -::sal_Bool SAL_CALL +::sal_Bool SAL_CALL ScVbaWindow::getDisplayWorkbookTabs() throw (uno::RuntimeException) { uno::Reference< beans::XPropertySet > xProps( m_xModel->getCurrentController(), uno::UNO_QUERY_THROW ); rtl::OUString sName( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_SHEETTABS ) ); sal_Bool bWorkbookTabs = sal_True; xProps->getPropertyValue( sName ) >>= bWorkbookTabs; - return bWorkbookTabs; + return bWorkbookTabs; } -void SAL_CALL +void SAL_CALL ScVbaWindow::setDisplayWorkbookTabs( ::sal_Bool _bDisplayWorkbookTabs ) throw (uno::RuntimeException) { uno::Reference< beans::XPropertySet > xProps( m_xModel->getCurrentController(), uno::UNO_QUERY_THROW ); @@ -591,13 +591,13 @@ ScVbaWindow::setDisplayWorkbookTabs( ::sal_Bool _bDisplayWorkbookTabs ) throw (u xProps->setPropertyValue( sName, uno::makeAny( _bDisplayWorkbookTabs )); } -::sal_Bool SAL_CALL +::sal_Bool SAL_CALL ScVbaWindow::getFreezePanes() throw (uno::RuntimeException) { - return m_xViewFreezable->hasFrozenPanes(); + return m_xViewFreezable->hasFrozenPanes(); } -void SAL_CALL +void SAL_CALL ScVbaWindow::setFreezePanes( ::sal_Bool /*_bFreezePanes*/ ) throw (uno::RuntimeException) { if( m_xViewSplitable->getIsWindowSplit() ) @@ -609,21 +609,21 @@ ScVbaWindow::setFreezePanes( ::sal_Bool /*_bFreezePanes*/ ) throw (uno::RuntimeE } else { - // otherwise we freeze in the center of the visible sheet + // otherwise we freeze in the center of the visible sheet table::CellRangeAddress aCellRangeAddress = m_xViewPane->getVisibleRange(); sal_Int32 nColumn = aCellRangeAddress.StartColumn + (( aCellRangeAddress.EndColumn - aCellRangeAddress.StartColumn )/2 ); sal_Int32 nRow = aCellRangeAddress.StartRow + (( aCellRangeAddress.EndRow - aCellRangeAddress.StartRow )/2 ); - m_xViewFreezable->freezeAtPosition( nColumn, nRow ); + m_xViewFreezable->freezeAtPosition( nColumn, nRow ); } } -::sal_Bool SAL_CALL +::sal_Bool SAL_CALL ScVbaWindow::getSplit() throw (uno::RuntimeException) { - return m_xViewSplitable->getIsWindowSplit(); + return m_xViewSplitable->getIsWindowSplit(); } -void SAL_CALL +void SAL_CALL ScVbaWindow::setSplit( ::sal_Bool _bSplit ) throw (uno::RuntimeException) { if( !_bSplit ) @@ -640,13 +640,13 @@ ScVbaWindow::setSplit( ::sal_Bool _bSplit ) throw (uno::RuntimeException) } } -sal_Int32 SAL_CALL +sal_Int32 SAL_CALL ScVbaWindow::getSplitColumn() throw (uno::RuntimeException) { - return m_xViewSplitable->getSplitColumn(); + return m_xViewSplitable->getSplitColumn(); } -void SAL_CALL +void SAL_CALL ScVbaWindow::setSplitColumn( sal_Int32 _splitcolumn ) throw (uno::RuntimeException) { if( getSplitColumn() != _splitcolumn ) @@ -658,7 +658,7 @@ ScVbaWindow::setSplitColumn( sal_Int32 _splitcolumn ) throw (uno::RuntimeExcepti } } -double SAL_CALL +double SAL_CALL ScVbaWindow::getSplitHorizontal() throw (uno::RuntimeException) { double fSplitHorizontal = m_xViewSplitable->getSplitHorizontal(); @@ -666,21 +666,21 @@ ScVbaWindow::getSplitHorizontal() throw (uno::RuntimeException) return fHoriPoints; } -void SAL_CALL +void SAL_CALL ScVbaWindow::setSplitHorizontal( double _splithorizontal ) throw (uno::RuntimeException) { double fHoriPixels = PointsToPixels( m_xDevice, _splithorizontal, sal_True ); - m_xViewSplitable->splitAtPosition( static_cast<sal_Int32>( fHoriPixels ), 0 ); + m_xViewSplitable->splitAtPosition( static_cast<sal_Int32>( fHoriPixels ), 0 ); } -sal_Int32 SAL_CALL +sal_Int32 SAL_CALL ScVbaWindow::getSplitRow() throw (uno::RuntimeException) { sal_Int32 nValue = m_xViewSplitable->getSplitRow(); - return nValue ? nValue - 1 : nValue; + return nValue ? nValue - 1 : nValue; } -void SAL_CALL +void SAL_CALL ScVbaWindow::setSplitRow( sal_Int32 _splitrow ) throw (uno::RuntimeException) { if( getSplitRow() != _splitrow ) @@ -692,15 +692,15 @@ ScVbaWindow::setSplitRow( sal_Int32 _splitrow ) throw (uno::RuntimeException) } } -double SAL_CALL +double SAL_CALL ScVbaWindow::getSplitVertical() throw (uno::RuntimeException) { double fSplitVertical = m_xViewSplitable->getSplitVertical(); - double fVertiPoints = PixelsToPoints( m_xDevice, fSplitVertical, sal_False ); + double fVertiPoints = PixelsToPoints( m_xDevice, fSplitVertical, sal_False ); return fVertiPoints; } -void SAL_CALL +void SAL_CALL ScVbaWindow::setSplitVertical(double _splitvertical ) throw (uno::RuntimeException) { double fVertiPixels = PointsToPixels( m_xDevice, _splitvertical, sal_False ); @@ -718,9 +718,9 @@ void ScVbaWindow::SplitAtDefinedPosition(sal_Bool _bUnFreezePane) m_xViewSplitable->splitAtPosition(nHoriSplit, nVertSplit); } -uno::Any SAL_CALL +uno::Any SAL_CALL ScVbaWindow::getZoom() throw (uno::RuntimeException) -{ +{ uno::Reference< beans::XPropertySet > xProps( m_xModel->getCurrentController(), uno::UNO_QUERY_THROW ); rtl::OUString sName( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_ZOOMTYPE ) ); sal_Int16 nZoomType = view::DocumentZoomType::PAGE_WIDTH; @@ -739,7 +739,7 @@ ScVbaWindow::getZoom() throw (uno::RuntimeException) return uno::Any(); } -void SAL_CALL +void SAL_CALL ScVbaWindow::setZoom( const uno::Any& _zoom ) throw (uno::RuntimeException) { sal_Int16 nZoom = 100; @@ -754,7 +754,7 @@ ScVbaWindow::setZoom( const uno::Any& _zoom ) throw (uno::RuntimeException) excel::implSetZoom( m_xModel, nZoom, vTabs ); } -uno::Reference< excel::XWorksheet > SAL_CALL +uno::Reference< excel::XWorksheet > SAL_CALL ScVbaWindow::ActiveSheet( ) throw (script::BasicErrorException, uno::RuntimeException) { uno::Reference< excel::XApplication > xApplication( Application(), uno::UNO_QUERY_THROW ); @@ -764,9 +764,9 @@ ScVbaWindow::ActiveSheet( ) throw (script::BasicErrorException, uno::RuntimeExc uno::Any SAL_CALL ScVbaWindow::getView() throw (uno::RuntimeException) { - // not supported now - sal_Int32 nWindowView = excel::XlWindowView::xlNormalView; - return uno::makeAny( nWindowView ); + // not supported now + sal_Int32 nWindowView = excel::XlWindowView::xlNormalView; + return uno::makeAny( nWindowView ); } void SAL_CALL @@ -808,7 +808,7 @@ ScVbaWindow::PointsToScreenPixelsX(sal_Int32 _points) throw (css::script::BasicE return static_cast<sal_Int32>(fConvertFactor * nHundredthsofOneMillimeters ); } -sal_Int32 SAL_CALL +sal_Int32 SAL_CALL ScVbaWindow::PointsToScreenPixelsY(sal_Int32 _points) throw (css::script::BasicErrorException, css::uno::RuntimeException) { sal_Int32 nHundredthsofOneMillimeters = Millimeter::getInHundredthsOfOneMillimeter( _points ); @@ -816,28 +816,28 @@ ScVbaWindow::PointsToScreenPixelsY(sal_Int32 _points) throw (css::script::BasicE return static_cast<sal_Int32>(fConvertFactor * nHundredthsofOneMillimeters ); } -void SAL_CALL +void SAL_CALL ScVbaWindow::PrintOut( const css::uno::Any& From, const css::uno::Any&To, const css::uno::Any& Copies, const css::uno::Any& Preview, const css::uno::Any& ActivePrinter, const css::uno::Any& PrintToFile, const css::uno::Any& Collate, const css::uno::Any& PrToFileName ) throw (css::script::BasicErrorException, css::uno::RuntimeException) { - // need test, print current active sheet + // need test, print current active sheet PrintOutHelper( excel::getBestViewShell( m_xModel ), From, To, Copies, Preview, ActivePrinter, PrintToFile, Collate, PrToFileName, sal_True ); } -void SAL_CALL +void SAL_CALL ScVbaWindow::PrintPreview( const css::uno::Any& EnableChanges ) throw (css::script::BasicErrorException, css::uno::RuntimeException) { - // need test, print preview current active sheet - PrintPreviewHelper( EnableChanges, excel::getBestViewShell( m_xModel ) ); + // need test, print preview current active sheet + PrintPreviewHelper( EnableChanges, excel::getBestViewShell( m_xModel ) ); } -rtl::OUString& +rtl::OUString& ScVbaWindow::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaWindow") ); return sImplName; } -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > ScVbaWindow::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; |