diff options
author | Noel Grandin <noel@peralex.com> | 2014-05-26 15:26:03 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-05-27 08:20:11 +0200 |
commit | 9af0abebfd61641c9d028505caa864cdf898e35b (patch) | |
tree | aff469b96f89daf093271d95f790250147ea9c0d /sdext | |
parent | 9b791f9c31165b82ec0fa3760a8af18c5af21294 (diff) |
remove unnecessary use of Reference constructor in throw
Convert code like this:
throw IOException("xx",
Reference< XInterface >(static_cast<OWeakObject*>(this)) );
to this:
throw IOException("xx",
static_cast<OWeakObject*>(this) );
Change-Id: Ife9f645f0f1810a8e80219126193015502c43dbb
Diffstat (limited to 'sdext')
-rw-r--r-- | sdext/source/presenter/PresenterAccessibility.cxx | 8 | ||||
-rw-r--r-- | sdext/source/presenter/PresenterWindowManager.cxx | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/sdext/source/presenter/PresenterAccessibility.cxx b/sdext/source/presenter/PresenterAccessibility.cxx index a4c66f0ea729..2dd8de5db854 100644 --- a/sdext/source/presenter/PresenterAccessibility.cxx +++ b/sdext/source/presenter/PresenterAccessibility.cxx @@ -896,7 +896,7 @@ Reference<XAccessible> SAL_CALL ThrowIfDisposed(); if (nIndex<0 || nIndex>=sal_Int32(maChildren.size())) - throw lang::IndexOutOfBoundsException("invalid child index", uno::Reference<uno::XInterface>(static_cast<uno::XWeak*>(this))); + throw lang::IndexOutOfBoundsException("invalid child index", static_cast<uno::XWeak*>(this)); return Reference<XAccessible>(maChildren[nIndex].get()); } @@ -1569,7 +1569,7 @@ sal_Unicode SAL_CALL PresenterAccessible::AccessibleParagraph::getCharacter (sal ThrowIfDisposed(); if (!mpParagraph) - throw lang::IndexOutOfBoundsException("no text support in current mode", uno::Reference<uno::XInterface>(static_cast<uno::XWeak*>(this))); + throw lang::IndexOutOfBoundsException("no text support in current mode", static_cast<uno::XWeak*>(this)); return mpParagraph->GetCharacter(nIndex); } @@ -1609,7 +1609,7 @@ awt::Rectangle SAL_CALL PresenterAccessible::AccessibleParagraph::getCharacterBo awt::Rectangle aCharacterBox; if (nIndex < 0) { - throw lang::IndexOutOfBoundsException("invalid text index", uno::Reference<uno::XInterface>(static_cast<uno::XWeak*>(this))); + throw lang::IndexOutOfBoundsException("invalid text index", static_cast<uno::XWeak*>(this)); } else if (mpParagraph) { @@ -1622,7 +1622,7 @@ awt::Rectangle SAL_CALL PresenterAccessible::AccessibleParagraph::getCharacterBo } else { - throw lang::IndexOutOfBoundsException("no text support in current mode", uno::Reference<uno::XInterface>(static_cast<uno::XWeak*>(this))); + throw lang::IndexOutOfBoundsException("no text support in current mode", static_cast<uno::XWeak*>(this)); } return aCharacterBox; diff --git a/sdext/source/presenter/PresenterWindowManager.cxx b/sdext/source/presenter/PresenterWindowManager.cxx index 89c15ef44b66..520b160845b4 100644 --- a/sdext/source/presenter/PresenterWindowManager.cxx +++ b/sdext/source/presenter/PresenterWindowManager.cxx @@ -1195,7 +1195,7 @@ void PresenterWindowManager::ThrowIfDisposed (void) const if (rBHelper.bDisposed || rBHelper.bInDispose) { throw lang::DisposedException ( - OUString( "PresenterWindowManager has already been disposed"), + "PresenterWindowManager has already been disposed", const_cast<uno::XWeak*>(static_cast<const uno::XWeak*>(this))); } } |