summaryrefslogtreecommitdiff
path: root/sw/source/ui/vba/vbarange.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/vba/vbarange.cxx')
-rw-r--r--sw/source/ui/vba/vbarange.cxx59
1 files changed, 29 insertions, 30 deletions
diff --git a/sw/source/ui/vba/vbarange.cxx b/sw/source/ui/vba/vbarange.cxx
index 3ee72935845d..a76cd1cdce51 100644
--- a/sw/source/ui/vba/vbarange.cxx
+++ b/sw/source/ui/vba/vbarange.cxx
@@ -45,18 +45,18 @@
using namespace ::ooo::vba;
using namespace ::com::sun::star;
-SwVbaRange::SwVbaRange( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< text::XTextDocument >& rTextDocument, const uno::Reference< text::XTextRange >& rStart ) throw (script::BasicErrorException, uno::RuntimeException) : SwVbaRange_BASE( rParent, rContext ), mxTextDocument( rTextDocument )
+SwVbaRange::SwVbaRange( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< text::XTextDocument >& rTextDocument, const uno::Reference< text::XTextRange >& rStart ) : SwVbaRange_BASE( rParent, rContext ), mxTextDocument( rTextDocument )
{
uno::Reference< text::XTextRange > xEnd;
initialize( rStart, xEnd );
}
-SwVbaRange::SwVbaRange( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< text::XTextDocument >& rTextDocument, const uno::Reference< text::XTextRange >& rStart, const uno::Reference< text::XTextRange >& rEnd ) throw (script::BasicErrorException, uno::RuntimeException) : SwVbaRange_BASE( rParent, rContext ), mxTextDocument( rTextDocument )
+SwVbaRange::SwVbaRange( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< text::XTextDocument >& rTextDocument, const uno::Reference< text::XTextRange >& rStart, const uno::Reference< text::XTextRange >& rEnd ) : SwVbaRange_BASE( rParent, rContext ), mxTextDocument( rTextDocument )
{
initialize( rStart, rEnd );
}
-SwVbaRange::SwVbaRange( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< text::XTextDocument >& rTextDocument, const uno::Reference< text::XTextRange >& rStart, const uno::Reference< text::XTextRange >& rEnd, const uno::Reference< text::XText >& rText ) throw (script::BasicErrorException, uno::RuntimeException) : SwVbaRange_BASE( rParent, rContext ),mxTextDocument( rTextDocument ), mxText( rText )
+SwVbaRange::SwVbaRange( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< text::XTextDocument >& rTextDocument, const uno::Reference< text::XTextRange >& rStart, const uno::Reference< text::XTextRange >& rEnd, const uno::Reference< text::XText >& rText ) : SwVbaRange_BASE( rParent, rContext ),mxTextDocument( rTextDocument ), mxText( rText )
{
initialize( rStart, rEnd );
}
@@ -65,7 +65,7 @@ SwVbaRange::~SwVbaRange()
{
}
-void SwVbaRange::initialize( const uno::Reference< text::XTextRange >& rStart, const uno::Reference< text::XTextRange >& rEnd ) throw (css::script::BasicErrorException, uno::RuntimeException)
+void SwVbaRange::initialize( const uno::Reference< text::XTextRange >& rStart, const uno::Reference< text::XTextRange >& rEnd )
{
if( !mxText.is() )
{
@@ -84,7 +84,7 @@ void SwVbaRange::initialize( const uno::Reference< text::XTextRange >& rStart, c
}
uno::Reference< text::XTextRange > SAL_CALL
-SwVbaRange::getXTextRange() throw (uno::RuntimeException, std::exception)
+SwVbaRange::getXTextRange()
{
uno::Reference< text::XTextRange > xTextRange( mxTextCursor, uno::UNO_QUERY_THROW );
return xTextRange;
@@ -96,7 +96,7 @@ SwVbaRange::getXTextRange() throw (uno::RuntimeException, std::exception)
* @return
*/
OUString SAL_CALL
-SwVbaRange::getText() throw ( uno::RuntimeException, std::exception )
+SwVbaRange::getText()
{
OUString aText = mxTextCursor->getString();
sal_Int32 nLen = aText.getLength();
@@ -125,7 +125,7 @@ SwVbaRange::getText() throw ( uno::RuntimeException, std::exception )
}
void SAL_CALL
-SwVbaRange::setText( const OUString& rText ) throw ( uno::RuntimeException, std::exception )
+SwVbaRange::setText( const OUString& rText )
{
// Emulate the MSWord behavior, Don't delete the bookmark
// which contains no text string in current inserting position,
@@ -171,7 +171,6 @@ SwVbaRange::setText( const OUString& rText ) throw ( uno::RuntimeException, std:
// FIXME: test is not pass
void SAL_CALL SwVbaRange::InsertBreak(const uno::Any& _breakType)
- throw (css::script::BasicErrorException, uno::RuntimeException, std::exception)
{
// default type is wdPageBreak;
sal_Int32 nBreakType = word::WdBreakType::wdPageBreak;
@@ -215,7 +214,7 @@ void SAL_CALL SwVbaRange::InsertBreak(const uno::Any& _breakType)
}
void SAL_CALL
-SwVbaRange::Select() throw ( uno::RuntimeException, std::exception )
+SwVbaRange::Select()
{
uno::Reference< frame::XModel > xModel( mxTextDocument, uno::UNO_QUERY_THROW );
uno::Reference< text::XTextViewCursor > xTextViewCursor = word::getXTextViewCursor( xModel );
@@ -224,14 +223,14 @@ SwVbaRange::Select() throw ( uno::RuntimeException, std::exception )
}
void SAL_CALL
-SwVbaRange::InsertParagraph() throw ( uno::RuntimeException, std::exception )
+SwVbaRange::InsertParagraph()
{
mxTextCursor->setString( "" );
InsertParagraphBefore();
}
void SAL_CALL
-SwVbaRange::InsertParagraphBefore() throw ( uno::RuntimeException, std::exception )
+SwVbaRange::InsertParagraphBefore()
{
uno::Reference< text::XTextRange > xTextRange = mxTextCursor->getStart();
mxText->insertControlCharacter( xTextRange, text::ControlCharacter::PARAGRAPH_BREAK, true );
@@ -239,26 +238,26 @@ SwVbaRange::InsertParagraphBefore() throw ( uno::RuntimeException, std::exceptio
}
void SAL_CALL
-SwVbaRange::InsertParagraphAfter() throw ( uno::RuntimeException, std::exception )
+SwVbaRange::InsertParagraphAfter()
{
uno::Reference< text::XTextRange > xTextRange = mxTextCursor->getEnd();
mxText->insertControlCharacter( xTextRange, text::ControlCharacter::PARAGRAPH_BREAK, true );
}
uno::Reference< word::XParagraphFormat > SAL_CALL
-SwVbaRange::getParagraphFormat() throw ( uno::RuntimeException, std::exception )
+SwVbaRange::getParagraphFormat()
{
uno::Reference< beans::XPropertySet > xParaProps( mxTextCursor, uno::UNO_QUERY_THROW );
return uno::Reference< word::XParagraphFormat >( new SwVbaParagraphFormat( this, mxContext, xParaProps ) );
}
void SAL_CALL
-SwVbaRange::setParagraphFormat( const uno::Reference< word::XParagraphFormat >& /*rParagraphFormat*/ ) throw ( uno::RuntimeException, std::exception )
+SwVbaRange::setParagraphFormat( const uno::Reference< word::XParagraphFormat >& /*rParagraphFormat*/ )
{
throw uno::RuntimeException("Not implemented" );
}
-void SwVbaRange::GetStyleInfo(OUString& aStyleName, OUString& aStyleType ) throw ( uno::RuntimeException )
+void SwVbaRange::GetStyleInfo(OUString& aStyleName, OUString& aStyleType )
{
uno::Reference< beans::XPropertySet > xProp( mxTextCursor, uno::UNO_QUERY_THROW );
if( ( xProp->getPropertyValue("CharStyleName") >>= aStyleName ) && !aStyleName.isEmpty() )
@@ -276,7 +275,7 @@ void SwVbaRange::GetStyleInfo(OUString& aStyleName, OUString& aStyleType ) throw
}
uno::Any SAL_CALL
-SwVbaRange::getStyle() throw ( uno::RuntimeException, std::exception )
+SwVbaRange::getStyle()
{
OUString aStyleName;
OUString aStyleType;
@@ -289,39 +288,39 @@ SwVbaRange::getStyle() throw ( uno::RuntimeException, std::exception )
}
void SAL_CALL
-SwVbaRange::setStyle( const uno::Any& rStyle ) throw ( uno::RuntimeException, std::exception )
+SwVbaRange::setStyle( const uno::Any& rStyle )
{
uno::Reference< beans::XPropertySet > xParaProps( mxTextCursor, uno::UNO_QUERY_THROW );
SwVbaStyle::setStyle( xParaProps, rStyle );
}
uno::Reference< word::XFont > SAL_CALL
-SwVbaRange::getFont() throw ( uno::RuntimeException, std::exception )
+SwVbaRange::getFont()
{
VbaPalette aColors;
return new SwVbaFont( mxParent, mxContext, aColors.getPalette(), uno::Reference< beans::XPropertySet >( getXTextRange(), uno::UNO_QUERY_THROW ) );
}
uno::Reference< word::XListFormat > SAL_CALL
-SwVbaRange::getListFormat() throw ( uno::RuntimeException, std::exception )
+SwVbaRange::getListFormat()
{
return uno::Reference< word::XListFormat >( new SwVbaListFormat( this, mxContext, getXTextRange() ) );
}
-::sal_Int32 SAL_CALL SwVbaRange::getLanguageID() throw (uno::RuntimeException, std::exception)
+::sal_Int32 SAL_CALL SwVbaRange::getLanguageID()
{
uno::Reference< beans::XPropertySet > xParaProps( mxTextCursor, uno::UNO_QUERY_THROW );
return SwVbaStyle::getLanguageID( xParaProps );
}
-void SAL_CALL SwVbaRange::setLanguageID( ::sal_Int32 _languageid ) throw (uno::RuntimeException, std::exception)
+void SAL_CALL SwVbaRange::setLanguageID( ::sal_Int32 _languageid )
{
uno::Reference< beans::XPropertySet > xParaProps( mxTextCursor, uno::UNO_QUERY_THROW );
SwVbaStyle::setLanguageID( xParaProps, _languageid );
}
uno::Any SAL_CALL
-SwVbaRange::PageSetup( ) throw (uno::RuntimeException, std::exception)
+SwVbaRange::PageSetup( )
{
uno::Reference< beans::XPropertySet > xParaProps( mxTextCursor, uno::UNO_QUERY_THROW );
uno::Reference< frame::XModel > xModel( mxTextDocument, uno::UNO_QUERY_THROW );
@@ -334,13 +333,13 @@ SwVbaRange::PageSetup( ) throw (uno::RuntimeException, std::exception)
return uno::makeAny( uno::Reference< word::XPageSetup >( new SwVbaPageSetup( this, mxContext, xModel, xPageProps ) ) );
}
-::sal_Int32 SAL_CALL SwVbaRange::getStart() throw (uno::RuntimeException, std::exception)
+::sal_Int32 SAL_CALL SwVbaRange::getStart()
{
uno::Reference< text::XText > xText = mxTextDocument->getText();
return SwVbaRangeHelper::getPosition( xText, mxTextCursor->getStart() );
}
-void SAL_CALL SwVbaRange::setStart( ::sal_Int32 _start ) throw (uno::RuntimeException, std::exception)
+void SAL_CALL SwVbaRange::setStart( ::sal_Int32 _start )
{
uno::Reference< text::XText > xText = mxTextDocument->getText();
uno::Reference< text::XTextRange > xStart = SwVbaRangeHelper::getRangeByPosition( xText, _start );
@@ -350,13 +349,13 @@ void SAL_CALL SwVbaRange::setStart( ::sal_Int32 _start ) throw (uno::RuntimeExce
mxTextCursor->gotoRange( xEnd, true );
}
-::sal_Int32 SAL_CALL SwVbaRange::getEnd() throw (uno::RuntimeException, std::exception)
+::sal_Int32 SAL_CALL SwVbaRange::getEnd()
{
uno::Reference< text::XText > xText = mxTextDocument->getText();
return SwVbaRangeHelper::getPosition( xText, mxTextCursor->getEnd() );
}
-void SAL_CALL SwVbaRange::setEnd( ::sal_Int32 _end ) throw (uno::RuntimeException, std::exception)
+void SAL_CALL SwVbaRange::setEnd( ::sal_Int32 _end )
{
uno::Reference< text::XText > xText = mxTextDocument->getText();
uno::Reference< text::XTextRange > xEnd = SwVbaRangeHelper::getRangeByPosition( xText, _end );
@@ -365,7 +364,7 @@ void SAL_CALL SwVbaRange::setEnd( ::sal_Int32 _end ) throw (uno::RuntimeExceptio
mxTextCursor->gotoRange( xEnd, true );
}
-sal_Bool SAL_CALL SwVbaRange::InRange( const uno::Reference< ::ooo::vba::word::XRange >& Range ) throw (uno::RuntimeException, std::exception)
+sal_Bool SAL_CALL SwVbaRange::InRange( const uno::Reference< ::ooo::vba::word::XRange >& Range )
{
SwVbaRange* pRange = dynamic_cast< SwVbaRange* >( Range.get() );
if( !pRange )
@@ -378,7 +377,7 @@ sal_Bool SAL_CALL SwVbaRange::InRange( const uno::Reference< ::ooo::vba::word::X
}
uno::Any SAL_CALL
-SwVbaRange::Revisions( const uno::Any& index ) throw (uno::RuntimeException, std::exception)
+SwVbaRange::Revisions( const uno::Any& index )
{
uno::Reference< text::XTextRange > xTextRange = getXTextRange();
uno::Reference< frame::XModel > xModel( mxTextDocument, uno::UNO_QUERY_THROW );
@@ -389,7 +388,7 @@ SwVbaRange::Revisions( const uno::Any& index ) throw (uno::RuntimeException, std
}
uno::Any SAL_CALL
-SwVbaRange::Sections( const uno::Any& index ) throw (uno::RuntimeException, std::exception)
+SwVbaRange::Sections( const uno::Any& index )
{
uno::Reference< text::XTextRange > xTextRange = getXTextRange();
uno::Reference< frame::XModel > xModel( mxTextDocument, uno::UNO_QUERY_THROW );
@@ -400,7 +399,7 @@ SwVbaRange::Sections( const uno::Any& index ) throw (uno::RuntimeException, std:
}
uno::Any SAL_CALL
-SwVbaRange::Fields( const uno::Any& index ) throw (uno::RuntimeException, std::exception)
+SwVbaRange::Fields( const uno::Any& index )
{
//FIXME: should be get the field in current range
uno::Reference< frame::XModel > xModel( mxTextDocument, uno::UNO_QUERY_THROW );