Kaydet (Commit) 23393015 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1267636 Logically dead code

Change-Id: I3bd06dee1a5536552f79d9eddf5c7059723cba2e
üst 9e90c4d7
...@@ -222,7 +222,7 @@ sal_Int32 SwTextBoxHelper::getCount(SdrPage* pPage, std::set<const SwFrmFmt*>& r ...@@ -222,7 +222,7 @@ sal_Int32 SwTextBoxHelper::getCount(SdrPage* pPage, std::set<const SwFrmFmt*>& r
uno::Any SwTextBoxHelper::getByIndex(SdrPage* pPage, sal_Int32 nIndex, std::set<const SwFrmFmt*>& rTextBoxes) throw(lang::IndexOutOfBoundsException) uno::Any SwTextBoxHelper::getByIndex(SdrPage* pPage, sal_Int32 nIndex, std::set<const SwFrmFmt*>& rTextBoxes) throw(lang::IndexOutOfBoundsException)
{ {
if (nIndex < 0 || nIndex >= getCount(pPage, rTextBoxes)) if (nIndex < 0)
throw lang::IndexOutOfBoundsException(); throw lang::IndexOutOfBoundsException();
SdrObject* pRet = 0; SdrObject* pRet = 0;
...@@ -238,8 +238,11 @@ uno::Any SwTextBoxHelper::getByIndex(SdrPage* pPage, sal_Int32 nIndex, std::set< ...@@ -238,8 +238,11 @@ uno::Any SwTextBoxHelper::getByIndex(SdrPage* pPage, sal_Int32 nIndex, std::set<
} }
++nCount; ++nCount;
} }
assert(pRet);
return pRet ? uno::makeAny(uno::Reference<drawing::XShape>(pRet->getUnoShape(), uno::UNO_QUERY)) : uno::Any(); if (!pRet)
throw lang::IndexOutOfBoundsException();
return uno::makeAny(uno::Reference<drawing::XShape>(pRet->getUnoShape(), uno::UNO_QUERY));
} }
sal_Int32 SwTextBoxHelper::getOrdNum(const SdrObject* pObject, std::set<const SwFrmFmt*>& rTextBoxes) sal_Int32 SwTextBoxHelper::getOrdNum(const SdrObject* pObject, std::set<const SwFrmFmt*>& rTextBoxes)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment