diff options
Diffstat (limited to 'sw/source/ui/vba/vbaselection.cxx')
-rw-r--r-- | sw/source/ui/vba/vbaselection.cxx | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/sw/source/ui/vba/vbaselection.cxx b/sw/source/ui/vba/vbaselection.cxx index 620e44fa413b..17d4e2f5a3af 100644 --- a/sw/source/ui/vba/vbaselection.cxx +++ b/sw/source/ui/vba/vbaselection.cxx @@ -1,7 +1,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 @@ -73,7 +73,7 @@ uno::Reference< text::XTextRange > SwVbaSelection::GetSelectedRange() throw ( un { uno::Reference< text::XTextRange > xTextRange; uno::Reference< lang::XServiceInfo > xServiceInfo( mxModel->getCurrentSelection(), uno::UNO_QUERY_THROW ); - if( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextRanges") ) ) ) + if( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextRanges") ) ) ) { uno::Reference< container::XIndexAccess > xTextRanges( xServiceInfo, uno::UNO_QUERY_THROW ); if( xTextRanges->getCount() > 0 ) @@ -89,7 +89,7 @@ uno::Reference< text::XTextRange > SwVbaSelection::GetSelectedRange() throw ( un return xTextRange; } -uno::Reference< word::XRange > SAL_CALL +uno::Reference< word::XRange > SAL_CALL SwVbaSelection::getRange() throw ( uno::RuntimeException ) { uno::Reference< text::XTextRange > xTextRange = GetSelectedRange(); @@ -187,7 +187,7 @@ SwVbaSelection::EndKey( const uno::Any& _unit, const uno::Any& _extend ) throw ( void SAL_CALL SwVbaSelection::Delete( const uno::Any& /*_unit*/, const uno::Any& /*_count*/ ) throw ( uno::RuntimeException ) { - // FIXME: handle the arguments: _unit and _count + // FIXME: handle the arguments: _unit and _count rtl::OUString url = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:Delete")); dispatchRequests( mxModel,url ); } @@ -208,7 +208,7 @@ void SwVbaSelection::NextCell( sal_Int32 nCount, E_DIRECTION eDirection ) throw rtl::OUString aCellName; xCellProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CellName") ) ) >>= aCellName; uno::Reference< text::XTextTableCursor > xTextTableCursor = xTextTable->createCursorByCellName( aCellName ); - // move the table cursor + // move the table cursor switch( eDirection ) { case MOVE_LEFT: @@ -255,17 +255,17 @@ SwVbaSelection::MoveRight( const uno::Any& _unit, const uno::Any& _count, const _count >>= nCount; if( _extend.hasValue() ) _extend >>= nExtend; - + if( nCount == 0 ) return; - + if( nCount < 0 ) { // TODO: call MoveLeft; MoveLeft( _unit, uno::makeAny( -nCount ), _extend ); return; } - + switch( nUnit ) { case word::WdUnits::wdCell: @@ -300,16 +300,16 @@ SwVbaSelection::MoveLeft( const uno::Any& _unit, const uno::Any& _count, const u _count >>= nCount; if( _extend.hasValue() ) _extend >>= nExtend; - + if( nCount == 0 ) return; - + if( nCount < 0 ) { MoveRight( _unit, uno::makeAny( -nCount ), _extend ); return; } - + switch( nUnit ) { case word::WdUnits::wdCell: @@ -344,17 +344,17 @@ SwVbaSelection::MoveDown( const uno::Any& _unit, const uno::Any& _count, const u _count >>= nCount; if( _extend.hasValue() ) _extend >>= nExtend; - + if( nCount == 0 ) return; - + if( nCount < 0 ) { // TODO: call MoveLeft; //MoveUp( _unit, uno::makeAny( -nCount ), _extend ); return; } - + switch( nUnit ) { case word::WdUnits::wdLine: @@ -376,7 +376,7 @@ SwVbaSelection::MoveDown( const uno::Any& _unit, const uno::Any& _count, const u void SAL_CALL SwVbaSelection::TypeParagraph() throw ( uno::RuntimeException ) { - // #FIXME: if the selection is an entire paragraph, it's replaced + // #FIXME: if the selection is an entire paragraph, it's replaced // by the new paragraph sal_Bool isCollapsed = mxTextViewCursor->isCollapsed(); InsertParagraph(); @@ -415,7 +415,7 @@ SwVbaSelection::setParagraphFormat( const uno::Reference< word::XParagraphFormat return getRange()->setParagraphFormat( rParagraphFormat ); } -uno::Reference< word::XFind > SAL_CALL +uno::Reference< word::XFind > SAL_CALL SwVbaSelection::getFind() throw ( uno::RuntimeException ) { uno::Reference< text::XTextRange > xTextRange = GetSelectedRange(); @@ -565,12 +565,12 @@ SwVbaSelection::Tables( const uno::Any& aIndex ) throw (uno::RuntimeException) // Hacky implementation due to missing api ( and lack of knowledge ) // we can only support a selection that is a single table if ( !aIndex.hasValue() ) // currently we can't support multiple tables in a selection - throw uno::RuntimeException(); + throw uno::RuntimeException(); // if the current selection is a XTextTableCursor and the index is 1 then we can service this request, otherwise we just have to throw uno::Reference< text::XTextTableCursor > xTextTableCursor( mxModel->getCurrentSelection(), uno::UNO_QUERY ); if ( !xTextTableCursor.is() ) - throw uno::RuntimeException(); + throw uno::RuntimeException(); sal_Int32 nIndex = 0; aIndex >>= nIndex; @@ -578,7 +578,7 @@ SwVbaSelection::Tables( const uno::Any& aIndex ) throw (uno::RuntimeException) uno::Any aRet; if ( nIndex != 1 ) - throw uno::RuntimeException(); + throw uno::RuntimeException(); SwXTextTableCursor* pTTCursor = dynamic_cast< SwXTextTableCursor* >( xTextTableCursor.get() ); if ( pTTCursor ) { @@ -588,12 +588,12 @@ SwVbaSelection::Tables( const uno::Any& aIndex ) throw (uno::RuntimeException) { uno::Reference< text::XTextTable > xTbl = SwXTextTables::GetObject(*pFmt); uno::Reference< css::text::XTextDocument > xTextDoc( mxModel, uno::UNO_QUERY_THROW ); - uno::Reference< word::XTable > xVBATbl = new SwVbaTable( mxParent, mxContext, xTextDoc, xTbl ); + uno::Reference< word::XTable > xVBATbl = new SwVbaTable( mxParent, mxContext, xTextDoc, xTbl ); aRet <<= xVBATbl; } } return aRet; - + } uno::Any SAL_CALL @@ -618,7 +618,7 @@ SwVbaSelection::getHeaderFooter() throw ( uno::RuntimeException ) nIndex = word::WdHeaderFooterIndex::wdHeaderFooterEvenPages; else if( HeaderFooterHelper::isFirstPageHeader( mxModel, xCurrentText ) || HeaderFooterHelper::isFirstPageFooter( mxModel, xCurrentText ) ) nIndex = word::WdHeaderFooterIndex::wdHeaderFooterFirstPage; - + return uno::Reference< word::XHeaderFooter >( new SwVbaHeaderFooter( this, mxContext, mxModel, xPageStyleProps, isHeader, nIndex ) ); } @@ -631,7 +631,7 @@ SwVbaSelection::ShapeRange( ) throw (uno::RuntimeException) uno::Reference< drawing::XShapes > xShapes( mxModel->getCurrentSelection(), uno::UNO_QUERY ); if ( !xShapes.is() ) - throw uno::RuntimeException(); + throw uno::RuntimeException(); uno::Reference< drawing::XDrawPageSupplier > xDrawPageSupplier( mxModel, uno::UNO_QUERY_THROW ); uno::Reference< drawing::XDrawPage > xDrawPage = xDrawPageSupplier->getDrawPage(); @@ -658,14 +658,14 @@ void SAL_CALL SwVbaSelection::setEnd( ::sal_Int32 _end ) throw (uno::RuntimeExce getRange()->setEnd( _end ); } -rtl::OUString& +rtl::OUString& SwVbaSelection::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaSelection") ); return sImplName; } -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > SwVbaSelection::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; |