summaryrefslogtreecommitdiff
path: root/sw/source/ui/vba/vbarange.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-01-26 12:28:58 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-01-26 12:54:43 +0000
commite57ca02849c3d87142ff5ff9099a212e72b8139c (patch)
treebcce66b27261553c308779f3e8663a269ed3a671 /sw/source/ui/vba/vbarange.cxx
parent8802ebd5172ec4bc412a59d136c82b77ab452281 (diff)
Remove dynamic exception specifications
...(for now, from LIBO_INTERNAL_CODE only). See the mail thread starting at <https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html> "Dynamic Exception Specifications" for details. Most changes have been done automatically by the rewriting loplugin:dynexcspec (after enabling the rewriting mode, to be committed shortly). The way it only removes exception specs from declarations if it also sees a definition, it identified some dead declarations-w/o-definitions (that have been removed manually) and some cases where a definition appeared in multiple include files (which have also been cleaned up manually). There's also been cases of macro paramters (that were used to abstract over exception specs) that have become unused now (and been removed). Furthermore, some code needed to be cleaned up manually (avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no configurations available that would actually build that code. Missing @throws documentation has not been applied in such manual clean-up. Change-Id: I3408691256c9b0c12bc5332de976743626e13960 Reviewed-on: https://gerrit.libreoffice.org/33574 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
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 );