[Libreoffice-commits] core.git: 24 commits - comphelper/source include/comphelper include/cppuhelper sc/inc sc/qa sc/source sd/source sw/source
Caolán McNamara
caolanm at redhat.com
Wed Jan 29 08:42:01 PST 2014
comphelper/source/property/propertycontainer.cxx | 3
include/comphelper/propertycontainer.hxx | 3
include/cppuhelper/propshlp.hxx | 3
sc/inc/cellsuno.hxx | 9 +-
sc/inc/chartuno.hxx | 6 +
sc/inc/cursuno.hxx | 4 -
sc/inc/docuno.hxx | 9 +-
sc/inc/linkuno.hxx | 4 -
sc/inc/styleuno.hxx | 15 +++-
sc/inc/viewuno.hxx | 4 -
sc/qa/unit/filters-test.cxx | 1
sc/qa/unit/ucalc.cxx | 7 +-
sc/qa/unit/ucalc_formula.cxx | 4 -
sc/source/ui/unoobj/cellsuno.cxx | 8 +-
sc/source/ui/unoobj/chartuno.cxx | 6 +
sc/source/ui/unoobj/cursuno.cxx | 3
sc/source/ui/unoobj/docuno.cxx | 14 ++--
sc/source/ui/unoobj/linkuno.cxx | 3
sc/source/ui/unoobj/styleuno.cxx | 15 +++-
sc/source/ui/unoobj/viewuno.cxx | 4 -
sc/source/ui/vba/vbaapplication.cxx | 3
sc/source/ui/vba/vbaapplication.hxx | 3
sd/source/ui/dlg/sdtreelb.cxx | 71 ++++++-----------------
sw/source/filter/ww8/ww8par.cxx | 8 +-
24 files changed, 114 insertions(+), 96 deletions(-)
New commits:
commit 29aa5166e56e32f6a5471d375fd5fe9aac084d30
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jan 29 16:32:06 2014 +0000
revert coverity#1158232 Resource leak
coverity doesn't seem to understand auto_ptr wrt to
sc/source/core/tool/dbdata.cxx
noescape: "ScDBCollection::NamedDBs::insert(ScDBData *)" does not free or save its pointer parameter "p".
bool ScDBCollection::NamedDBs::insert(ScDBData* p)
then again, neither did I
Change-Id: I7113b909afb96b518cf0d9321ad5541e16cacfa7
diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index 565c576..b19afdc 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -101,9 +101,7 @@ void Test::testFormulaCreateStringFromTokens()
ScDBData* pData = new ScDBData(
OUString::createFromAscii(
aDBs[i].pName), aDBs[i].nTab, aDBs[i].nCol1, aDBs[i].nRow1, aDBs[i].nCol2,aDBs[i].nRow2);
- bool bInserted = pDBs->getNamedDBs().insert(pData);
- if (!bInserted)
- delete pData;
+ pDBs->getNamedDBs().insert(pData);
}
const char* aTests[] = {
commit c651ac080b6cb7dced52ad098fb6b66e875f467a
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jan 29 16:16:43 2014 +0000
coverity#735949 Unchecked dynamic_cast
Change-Id: I30c08b98c5bf92c3b73ac0e9ae21facd1e135303
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 6de0917..83f3838 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -937,8 +937,12 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
pObj->SetMergedItemSet(aSet);
pObj->SetModel(pSdrModel);
- if (bVerticalText && dynamic_cast< SdrTextObj* >( pObj ) )
- dynamic_cast< SdrTextObj* >( pObj )->SetVerticalWriting(sal_True);
+ if (bVerticalText)
+ {
+ SdrTextObj *pTextObj = dynamic_cast< SdrTextObj* >(pObj);
+ if (pTextObj)
+ pTextObj->SetVerticalWriting(true);
+ }
if ( bIsSimpleDrawingTextBox )
{
commit 87002bb8d42122500ac4f3fe2f01fa23419938d0
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jan 29 16:15:18 2014 +0000
coverity#737429 Uncaught exception
Change-Id: I7188ded009509b933958e4ada4d5f76d9ef1d742
diff --git a/sc/inc/cellsuno.hxx b/sc/inc/cellsuno.hxx
index 836237e..2fd4c3e 100644
--- a/sc/inc/cellsuno.hxx
+++ b/sc/inc/cellsuno.hxx
@@ -464,7 +464,8 @@ public:
createReplaceDescriptor() throw(::com::sun::star::uno::RuntimeException);
virtual sal_Int32 SAL_CALL replaceAll( const ::com::sun::star::uno::Reference<
::com::sun::star::util::XSearchDescriptor >& xDesc )
- throw(::com::sun::star::uno::RuntimeException);
+ throw(::com::sun::star::uno::RuntimeException,
+ std::exception);
// XModifyBroadcaster
virtual void SAL_CALL addModifyListener( const ::com::sun::star::uno::Reference<
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 7daa1e8..3bc0f8b 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -4031,7 +4031,8 @@ uno::Reference<util::XReplaceDescriptor> SAL_CALL ScCellRangesBase::createReplac
}
sal_Int32 SAL_CALL ScCellRangesBase::replaceAll( const uno::Reference<util::XSearchDescriptor>& xDesc )
- throw(uno::RuntimeException)
+ throw(uno::RuntimeException,
+ std::exception)
{
SolarMutexGuard aGuard;
sal_Int32 nReplaced = 0;
commit 77fbfa6c4454e20752a2f9345f73d5aa22eb54b6
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jan 29 16:13:37 2014 +0000
coverity#737449 Uncaught exception
Change-Id: I617f272a7ae80669eb26c0e7bfb6022a632be552
diff --git a/sc/inc/cellsuno.hxx b/sc/inc/cellsuno.hxx
index cde567b..836237e 100644
--- a/sc/inc/cellsuno.hxx
+++ b/sc/inc/cellsuno.hxx
@@ -446,7 +446,8 @@ public:
virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL
findAll( const ::com::sun::star::uno::Reference<
::com::sun::star::util::XSearchDescriptor >& xDesc )
- throw(::com::sun::star::uno::RuntimeException);
+ throw(::com::sun::star::uno::RuntimeException,
+ std::exception);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL
findFirst( const ::com::sun::star::uno::Reference<
::com::sun::star::util::XSearchDescriptor >& xDesc )
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 4beadd9..7daa1e8 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -3906,7 +3906,8 @@ uno::Reference<util::XSearchDescriptor> SAL_CALL ScCellRangesBase::createSearchD
uno::Reference<container::XIndexAccess> SAL_CALL ScCellRangesBase::findAll(
const uno::Reference<util::XSearchDescriptor>& xDesc )
- throw(uno::RuntimeException)
+ throw(uno::RuntimeException,
+ std::exception)
{
SolarMutexGuard aGuard;
// Wenn nichts gefunden wird, soll Null zurueckgegeben werden (?)
commit d61ae1f5ade012428b519cc23b24428fc89cd413
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jan 29 16:11:51 2014 +0000
coverity#737492 Uncaught exception
Change-Id: Icadfe5baf85d55ee57603dd8fe0cda19034a70a5
diff --git a/sc/inc/cursuno.hxx b/sc/inc/cursuno.hxx
index fba4a71..9834795 100644
--- a/sc/inc/cursuno.hxx
+++ b/sc/inc/cursuno.hxx
@@ -42,7 +42,9 @@ public:
// XSheetCellCursor
virtual void SAL_CALL collapseToCurrentRegion() throw(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL collapseToCurrentArray() throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL collapseToCurrentArray()
+ throw(::com::sun::star::uno::RuntimeException,
+ std::exception);
virtual void SAL_CALL collapseToMergedArea() throw(::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL expandToEntireColumns() throw(::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL expandToEntireRows() throw(::com::sun::star::uno::RuntimeException);
diff --git a/sc/source/ui/unoobj/cursuno.cxx b/sc/source/ui/unoobj/cursuno.cxx
index 16b4207..5985b6df 100644
--- a/sc/source/ui/unoobj/cursuno.cxx
+++ b/sc/source/ui/unoobj/cursuno.cxx
@@ -127,7 +127,8 @@ void SAL_CALL ScCellCursorObj::collapseToCurrentRegion() throw(uno::RuntimeExcep
}
}
-void SAL_CALL ScCellCursorObj::collapseToCurrentArray() throw(uno::RuntimeException)
+void SAL_CALL ScCellCursorObj::collapseToCurrentArray()
+ throw(uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
const ScRangeList& rRanges = GetRangeList();
commit f5babb88f202d1e170be7047f91bb900de1c680a
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jan 29 16:07:51 2014 +0000
coverity#737564 Uncaught exception
Change-Id: Ibe61884b5930cc7bdd449c472171c1b0e710b75f
diff --git a/sc/inc/docuno.hxx b/sc/inc/docuno.hxx
index a5d7f72..7c8b5ad 100644
--- a/sc/inc/docuno.hxx
+++ b/sc/inc/docuno.hxx
@@ -170,7 +170,8 @@ public:
const ::com::sun::star::uno::Sequence<
::com::sun::star::beans::PropertyValue >& xOptions )
throw (::com::sun::star::lang::IllegalArgumentException,
- ::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::RuntimeException,
+ std::exception);
virtual void SAL_CALL render( sal_Int32 nRenderer, const ::com::sun::star::uno::Any& aSelection,
const ::com::sun::star::uno::Sequence<
::com::sun::star::beans::PropertyValue >& xOptions )
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 75c5fa6..e6ad2a8 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -985,7 +985,9 @@ static sal_Int32 lcl_GetRendererNum( sal_Int32 nSelRenderer, const OUString& rPa
uno::Sequence<beans::PropertyValue> SAL_CALL ScModelObj::getRenderer( sal_Int32 nSelRenderer,
const uno::Any& aSelection, const uno::Sequence<beans::PropertyValue>& rOptions )
- throw (lang::IllegalArgumentException, uno::RuntimeException)
+ throw (lang::IllegalArgumentException,
+ uno::RuntimeException,
+ std::exception)
{
SolarMutexGuard aGuard;
if (!pDocShell)
commit 04db0fdcac38b5f78a2b52396de1d5b48ea706a0
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jan 29 16:06:11 2014 +0000
coverity#737582 Uncaught exception
Change-Id: I5b8ce0a3fff9772b18988ef345e3de2f5b477f38
diff --git a/sc/inc/docuno.hxx b/sc/inc/docuno.hxx
index 4e7577d..a5d7f72 100644
--- a/sc/inc/docuno.hxx
+++ b/sc/inc/docuno.hxx
@@ -175,7 +175,8 @@ public:
const ::com::sun::star::uno::Sequence<
::com::sun::star::beans::PropertyValue >& xOptions )
throw (::com::sun::star::lang::IllegalArgumentException,
- ::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::RuntimeException,
+ std::exception);
/// XLinkTargetSupplier
virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 309e4ce..75c5fa6 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -1093,7 +1093,9 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScModelObj::getRenderer( sal_Int32
void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelection,
const uno::Sequence<beans::PropertyValue>& rOptions )
- throw(lang::IllegalArgumentException, uno::RuntimeException)
+ throw(lang::IllegalArgumentException,
+ uno::RuntimeException,
+ std::exception)
{
SolarMutexGuard aGuard;
if (!pDocShell)
commit 7f3c538514aeab1f628fdcfaed34c42d5740b11e
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jan 29 16:05:15 2014 +0000
coverity#737683 Uncaught exception
Change-Id: I80f2d39ef2578d2f3dfd09e3a7ccf9daaedcb48c
diff --git a/sc/inc/styleuno.hxx b/sc/inc/styleuno.hxx
index 24926b5..bf757ff 100644
--- a/sc/inc/styleuno.hxx
+++ b/sc/inc/styleuno.hxx
@@ -239,7 +239,8 @@ public:
virtual OUString SAL_CALL getParentStyle() throw(::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setParentStyle( const OUString& aParentStyle )
throw(::com::sun::star::container::NoSuchElementException,
- ::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::RuntimeException,
+ std::exception);
// XNamed
virtual OUString SAL_CALL getName() throw(::com::sun::star::uno::RuntimeException);
diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx
index e0f3d0e..d0e1c33 100644
--- a/sc/source/ui/unoobj/styleuno.cxx
+++ b/sc/source/ui/unoobj/styleuno.cxx
@@ -1057,7 +1057,9 @@ OUString SAL_CALL ScStyleObj::getParentStyle() throw(uno::RuntimeException)
}
void SAL_CALL ScStyleObj::setParentStyle( const OUString& rParentStyle )
- throw(container::NoSuchElementException, uno::RuntimeException)
+ throw(container::NoSuchElementException,
+ uno::RuntimeException,
+ std::exception)
{
SolarMutexGuard aGuard;
SfxStyleSheetBase* pStyle = GetStyle_Impl();
commit fc94084ad8684481888cf39b331a2e22cfdc8755
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jan 29 16:04:19 2014 +0000
coverity#737687 Uncaught exception
Change-Id: Ib7e2245861d82d7863f3fe03b484356adeae37db
diff --git a/sc/inc/styleuno.hxx b/sc/inc/styleuno.hxx
index d5255db..24926b5 100644
--- a/sc/inc/styleuno.hxx
+++ b/sc/inc/styleuno.hxx
@@ -215,7 +215,8 @@ private:
const SfxItemPropertySimpleEntry* pEntry,
const ::com::sun::star::uno::Any* pValue )
throw(::com::sun::star::lang::IllegalArgumentException,
- ::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::RuntimeException,
+ std::exception);
ScStyleObj(); // disabled
public:
diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx
index 3536564..e0f3d0e 100644
--- a/sc/source/ui/unoobj/styleuno.cxx
+++ b/sc/source/ui/unoobj/styleuno.cxx
@@ -1533,7 +1533,9 @@ void SAL_CALL ScStyleObj::setPropertyValue(
}
void ScStyleObj::SetOnePropertyValue( const OUString& rPropertyName, const SfxItemPropertySimpleEntry* pEntry, const uno::Any* pValue )
- throw(lang::IllegalArgumentException, uno::RuntimeException)
+ throw(lang::IllegalArgumentException,
+ uno::RuntimeException,
+ std::exception)
{
SfxStyleSheetBase* pStyle = GetStyle_Impl();
if ( pStyle && pEntry )
commit a4364d474bbccd13836bd6dd8c1fa65955d5450d
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jan 29 16:02:58 2014 +0000
coverity#737689 Uncaught exception
Change-Id: I85814cebd70b52e1a848dbc3a97b4d7c3d694c84
diff --git a/sc/inc/styleuno.hxx b/sc/inc/styleuno.hxx
index 85550f2..d5255db 100644
--- a/sc/inc/styleuno.hxx
+++ b/sc/inc/styleuno.hxx
@@ -326,7 +326,9 @@ public:
// XMultiPropertyStates
// getPropertyStates already defined for XPropertyState
- virtual void SAL_CALL setAllPropertiesToDefault() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setAllPropertiesToDefault()
+ throw (::com::sun::star::uno::RuntimeException,
+ std::exception);
virtual void SAL_CALL setPropertiesToDefault( const ::com::sun::star::uno::Sequence<
OUString >& aPropertyNames )
throw (::com::sun::star::beans::UnknownPropertyException,
diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx
index 19243ec..3536564 100644
--- a/sc/source/ui/unoobj/styleuno.cxx
+++ b/sc/source/ui/unoobj/styleuno.cxx
@@ -1422,7 +1422,8 @@ void SAL_CALL ScStyleObj::firePropertiesChangeEvent( const uno::Sequence<OUStrin
// XMultiPropertyStates
// getPropertyStates already defined for XPropertyState
-void SAL_CALL ScStyleObj::setAllPropertiesToDefault() throw (uno::RuntimeException)
+void SAL_CALL ScStyleObj::setAllPropertiesToDefault()
+ throw (uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
commit 0ca9e0351831b4d877ccb5fc43eb2b6d8b46d822
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jan 29 16:01:50 2014 +0000
coverity#737693 Uncaught exception
Change-Id: I91f23b9dae37e7b2d79e643f7f99ec31f82c369d
diff --git a/sc/inc/styleuno.hxx b/sc/inc/styleuno.hxx
index a3c8945..85550f2 100644
--- a/sc/inc/styleuno.hxx
+++ b/sc/inc/styleuno.hxx
@@ -133,8 +133,9 @@ public:
::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL removeByName( const OUString& Name )
throw(::com::sun::star::container::NoSuchElementException,
- ::com::sun::star::lang::WrappedTargetException,
- ::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException,
+ std::exception);
// XNameReplace
virtual void SAL_CALL replaceByName( const OUString& aName,
diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx
index 561bd73..19243ec 100644
--- a/sc/source/ui/unoobj/styleuno.cxx
+++ b/sc/source/ui/unoobj/styleuno.cxx
@@ -718,7 +718,9 @@ void SAL_CALL ScStyleFamilyObj::replaceByName( const OUString& aName, const uno:
void SAL_CALL ScStyleFamilyObj::removeByName( const OUString& aName )
throw(container::NoSuchElementException,
- lang::WrappedTargetException, uno::RuntimeException)
+ lang::WrappedTargetException,
+ uno::RuntimeException,
+ std::exception)
{
SolarMutexGuard aGuard;
bool bFound = false;
commit 3784decc976e54f3fafa5c4a11e43f5becee61d4
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jan 29 16:00:37 2014 +0000
coverity#737711 Uncaught exception
Change-Id: Ie33feecf4116d15c500d104ec0787d496d532710
diff --git a/sc/inc/viewuno.hxx b/sc/inc/viewuno.hxx
index 25f5576..ac7bf1a 100644
--- a/sc/inc/viewuno.hxx
+++ b/sc/inc/viewuno.hxx
@@ -395,7 +395,9 @@ public:
throw(::com::sun::star::uno::RuntimeException);
// XTransferableSupplier
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > SAL_CALL getTransferable( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > SAL_CALL getTransferable()
+ throw (::com::sun::star::uno::RuntimeException,
+ std::exception);
virtual void SAL_CALL insertTransferable( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& xTrans )
throw(::com::sun::star::datatransfer::UnsupportedFlavorException,
::com::sun::star::uno::RuntimeException,
diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx
index f9c9895..ffe6c48 100644
--- a/sc/source/ui/unoobj/viewuno.cxx
+++ b/sc/source/ui/unoobj/viewuno.cxx
@@ -2262,7 +2262,9 @@ ScTabViewObj* ScTabViewObj::getImplementation( const uno::Reference<uno::XInterf
return pRet;
}
-::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > SAL_CALL ScTabViewObj::getTransferable( ) throw (::com::sun::star::uno::RuntimeException)
+::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > SAL_CALL ScTabViewObj::getTransferable()
+ throw (::com::sun::star::uno::RuntimeException,
+ std::exception)
{
SolarMutexGuard aGuard;
ScEditShell* pShell = PTR_CAST( ScEditShell, GetViewShell()->GetViewFrame()->GetDispatcher()->GetShell(0) );
commit aa19046e3b72e0298b493f04dc1641079915ede2
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jan 29 15:59:00 2014 +0000
coverity#989717 Dereference null return value
Change-Id: Ib6684a6f83b6e6d7362301fd67eb47911afaa809
diff --git a/sc/qa/unit/filters-test.cxx b/sc/qa/unit/filters-test.cxx
index e7dcae2..10dfea9 100644
--- a/sc/qa/unit/filters-test.cxx
+++ b/sc/qa/unit/filters-test.cxx
@@ -459,6 +459,7 @@ void impl_testLegacyCellAnchoredRotatedShape( ScDocument* pDoc, Rectangle& aRect
ScDrawObjData* pData = ScDrawLayer::GetObjData( pObj );
+ CPPUNIT_ASSERT_MESSAGE("expected object meta data", pData);
printf("expected startrow %" SAL_PRIdINT32 " actual %" SAL_PRIdINT32 "\n", aAnchor.maStart.Row(), pData->maStart.Row() );
CPPUNIT_ASSERT_EQUAL( aAnchor.maStart.Row(), pData->maStart.Row() );
printf("expected startcol %d actual %d\n", aAnchor.maStart.Col(), pData->maStart.Col() );
commit 618e93c4864d93d10c388996ccf2276b5f5f9aba
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jan 29 15:57:27 2014 +0000
coverity#1000850 Uncaught exception
Change-Id: Ief1b4abb114a29526bd9b721d2d760e7c7cddd90
diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx
index b4f5b8d..868f486 100644
--- a/sc/source/ui/vba/vbaapplication.cxx
+++ b/sc/source/ui/vba/vbaapplication.cxx
@@ -1268,7 +1268,8 @@ ScVbaApplication::getDisplayFormulaBar()
}
void SAL_CALL
-ScVbaApplication::setDisplayFormulaBar( ::sal_Bool _displayformulabar ) throw ( css::uno::RuntimeException )
+ScVbaApplication::setDisplayFormulaBar( ::sal_Bool _displayformulabar )
+ throw(css::uno::RuntimeException, std::exception)
{
ScTabViewShell* pViewShell = excel::getCurrentBestViewShell( mxContext );
if ( pViewShell && ( _displayformulabar != getDisplayFormulaBar() ) )
diff --git a/sc/source/ui/vba/vbaapplication.hxx b/sc/source/ui/vba/vbaapplication.hxx
index 220d08d..17743b4 100644
--- a/sc/source/ui/vba/vbaapplication.hxx
+++ b/sc/source/ui/vba/vbaapplication.hxx
@@ -82,7 +82,8 @@ public:
virtual css::uno::Reference< ov::excel::XWorksheet > SAL_CALL getActiveSheet() throw (css::uno::RuntimeException);
virtual ::sal_Bool SAL_CALL getDisplayFormulaBar()
throw (css::uno::RuntimeException, std::exception);
- virtual void SAL_CALL setDisplayFormulaBar( ::sal_Bool _displayformulabar ) throw ( css::uno::RuntimeException );
+ virtual void SAL_CALL setDisplayFormulaBar(::sal_Bool _displayformulabar)
+ throw (css::uno::RuntimeException, std::exception);
virtual css::uno::Reference< ov::XAssistant > SAL_CALL getAssistant() throw (css::uno::RuntimeException);
virtual css::uno::Reference< ov::excel::XWorkbook > SAL_CALL getThisWorkbook() throw (css::uno::RuntimeException);
commit 585000f4710379cf9d709ea0f1a23d7d029a22fb
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jan 29 15:55:46 2014 +0000
coverity#1078467 Unchecked return value
Change-Id: I432e913befcab08224ea56ae1c190d169d85e717
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index da136b1..8cdcb4d 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -3443,7 +3443,8 @@ void Test::testCopyPaste()
pLocal1 = m_pDoc->GetRangeName(1)->findByUpperName(OUString("LOCAL1"));
CPPUNIT_ASSERT_MESSAGE("local range name 1 should be copied", pLocal1);
ScRange aRangeLocal1;
- pLocal1->IsValidReference(aRangeLocal1);
+ bool bIsValidRef = pLocal1->IsValidReference(aRangeLocal1);
+ CPPUNIT_ASSERT_MESSAGE("local range name 1 should be valid", bIsValidRef);
CPPUNIT_ASSERT_MESSAGE("local range 1 should still point to Sheet1.A1",aRangeLocal1 == ScRange(0,0,0,0,0,0));
pLocal2 = m_pDoc->GetRangeName(1)->findByUpperName(OUString("LOCAL2"));
CPPUNIT_ASSERT_MESSAGE("local2 should not be copied", pLocal2 == NULL);
commit ec92ace51d624d520fa3d828680f7298e742a30c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jan 29 15:42:50 2014 +0000
coverity#1078468 Unchecked return value
Change-Id: I00f0f401500ae89612932d1ce67a8754498e64d5
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index ee36e37..da136b1 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -3945,8 +3945,9 @@ void Test::testSearchCells()
SCTAB nTab = 0;
ScRangeList aMatchedRanges;
OUString aUndoStr;
- m_pDoc->SearchAndReplace(aItem, nCol, nRow, nTab, aMarkData, aMatchedRanges, aUndoStr);
+ bool bSuccess = m_pDoc->SearchAndReplace(aItem, nCol, nRow, nTab, aMarkData, aMatchedRanges, aUndoStr);
+ CPPUNIT_ASSERT_MESSAGE("Search And Replace should succeed", bSuccess);
CPPUNIT_ASSERT_MESSAGE("There should be exactly 3 matching cells.", aMatchedRanges.size() == 3);
ScAddress aHit(0,0,0);
CPPUNIT_ASSERT_MESSAGE("A1 should be inside the matched range.", aMatchedRanges.In(aHit));
commit 5dc14ccd0ae364e86401554acec663eac68fc6a4
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jan 29 15:41:38 2014 +0000
coverity#1078723 Dereference null return value
Change-Id: I087a73cfa6e71a2c4ac12869e8cfffa7522bb0ff
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index d4f8209..ee36e37 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -4844,6 +4844,7 @@ void Test::testAnchoredRotatedShape()
ScDrawObjData aAnchor;
ScDrawObjData* pData = ScDrawLayer::GetObjData( pObj );
+ CPPUNIT_ASSERT_MESSAGE("Failed to get drawing object meta-data.", pData);
aAnchor.maStart = pData->maStart;
aAnchor.maEnd = pData->maEnd;
commit fa9a817630bebc27d62b516b27a35c8de06a0ef7
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jan 29 15:38:57 2014 +0000
coverity#1078995 Uncaught exception
Change-Id: I9fe5e4ed518536b1ed8d33f65efa2b092f1b998d
diff --git a/sc/inc/linkuno.hxx b/sc/inc/linkuno.hxx
index b5788e8..f02d362 100644
--- a/sc/inc/linkuno.hxx
+++ b/sc/inc/linkuno.hxx
@@ -235,7 +235,9 @@ public:
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
// XRefreshable
- virtual void SAL_CALL refresh() throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL refresh()
+ throw(::com::sun::star::uno::RuntimeException,
+ std::exception);
virtual void SAL_CALL addRefreshListener( const ::com::sun::star::uno::Reference<
::com::sun::star::util::XRefreshListener >& l )
throw(::com::sun::star::uno::RuntimeException);
diff --git a/sc/source/ui/unoobj/linkuno.cxx b/sc/source/ui/unoobj/linkuno.cxx
index e90a641..a4f75d2 100644
--- a/sc/source/ui/unoobj/linkuno.cxx
+++ b/sc/source/ui/unoobj/linkuno.cxx
@@ -695,7 +695,8 @@ void ScAreaLinkObj::ModifyRefreshDelay_Impl( sal_Int32 nRefresh )
// XRefreshable
-void SAL_CALL ScAreaLinkObj::refresh() throw(uno::RuntimeException)
+void SAL_CALL ScAreaLinkObj::refresh()
+ throw(uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
ScAreaLink* pLink = lcl_GetAreaLink(pDocShell, nPos);
commit 9bd0e895a4c937f1f831aab1cca6f2e94387260b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jan 29 15:37:15 2014 +0000
coverity#1079000 Uncaught exception
Change-Id: I7ffee42abe03c34d68b6168328143666d72e7efc
diff --git a/comphelper/source/property/propertycontainer.cxx b/comphelper/source/property/propertycontainer.cxx
index 89fc64c..a322ff1 100644
--- a/comphelper/source/property/propertycontainer.cxx
+++ b/comphelper/source/property/propertycontainer.cxx
@@ -77,7 +77,8 @@ sal_Bool OPropertyContainer::convertFastPropertyValue(
}
//--------------------------------------------------------------------------
-void OPropertyContainer::setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle, const Any& _rValue) throw (Exception)
+void OPropertyContainer::setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle, const Any& _rValue)
+ throw (Exception, std::exception)
{
OPropertyContainerHelper::setFastPropertyValue( _nHandle, _rValue );
}
diff --git a/include/comphelper/propertycontainer.hxx b/include/comphelper/propertycontainer.hxx
index e348225..a594b71 100644
--- a/include/comphelper/propertycontainer.hxx
+++ b/include/comphelper/propertycontainer.hxx
@@ -67,7 +67,8 @@ protected:
sal_Int32 nHandle,
const ::com::sun::star::uno::Any& rValue
)
- throw (::com::sun::star::uno::Exception);
+ throw (::com::sun::star::uno::Exception,
+ std::exception);
using OPropertyContainer_Base::getFastPropertyValue;
virtual void SAL_CALL getFastPropertyValue(
diff --git a/include/cppuhelper/propshlp.hxx b/include/cppuhelper/propshlp.hxx
index bc01cbc..6bbf671 100644
--- a/include/cppuhelper/propshlp.hxx
+++ b/include/cppuhelper/propshlp.hxx
@@ -603,7 +603,8 @@ protected:
virtual void SAL_CALL setFastPropertyValue_NoBroadcast(
sal_Int32 nHandle,
const ::com::sun::star::uno::Any& rValue )
- throw (::com::sun::star::uno::Exception) = 0;
+ throw (::com::sun::star::uno::Exception,
+ std::exception) = 0;
/**
The same as getFastProperyValue, but return the value through rValue and nHandle
is always valid.
diff --git a/sc/inc/chartuno.hxx b/sc/inc/chartuno.hxx
index c403048..317e9ca 100644
--- a/sc/inc/chartuno.hxx
+++ b/sc/inc/chartuno.hxx
@@ -135,7 +135,8 @@ protected:
// ::comphelper::OPropertySetHelper
virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
virtual void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue )
- throw (::com::sun::star::uno::Exception);
+ throw (::com::sun::star::uno::Exception,
+ std::exception);
using ::cppu::OPropertySetHelper::getFastPropertyValue;
virtual void SAL_CALL getFastPropertyValue( ::com::sun::star::uno::Any& rValue, sal_Int32 nHandle ) const;
diff --git a/sc/source/ui/unoobj/chartuno.cxx b/sc/source/ui/unoobj/chartuno.cxx
index b3bed22..cbd44d8 100644
--- a/sc/source/ui/unoobj/chartuno.cxx
+++ b/sc/source/ui/unoobj/chartuno.cxx
@@ -560,7 +560,8 @@ void ScChartObj::Update_Impl( const ScRangeListRef& rRanges, bool bColHeaders, b
return *ScChartObj_PABase::getArrayHelper();
}
-void ScChartObj::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const uno::Any& rValue ) throw (uno::Exception)
+void ScChartObj::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const uno::Any& rValue )
+ throw (uno::Exception, std::exception)
{
switch ( nHandle )
{
commit 3a02f0334ece2e8d175c2bb86b69a9450999d3f0
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jan 29 15:36:05 2014 +0000
coverity#1079001 Uncaught exception
Change-Id: I0f477b798fbf0803a88bc785ce5ce33358c374c3
diff --git a/sc/inc/chartuno.hxx b/sc/inc/chartuno.hxx
index ca667e2..c403048 100644
--- a/sc/inc/chartuno.hxx
+++ b/sc/inc/chartuno.hxx
@@ -67,7 +67,8 @@ public:
const ::com::sun::star::uno::Sequence<
::com::sun::star::table::CellRangeAddress >& aRanges,
sal_Bool bColumnHeaders, sal_Bool bRowHeaders )
- throw(::com::sun::star::uno::RuntimeException);
+ throw(::com::sun::star::uno::RuntimeException,
+ std::exception);
virtual void SAL_CALL removeByName( const OUString& aName )
throw(::com::sun::star::uno::RuntimeException);
diff --git a/sc/source/ui/unoobj/chartuno.cxx b/sc/source/ui/unoobj/chartuno.cxx
index a6cfba0..b3bed22 100644
--- a/sc/source/ui/unoobj/chartuno.cxx
+++ b/sc/source/ui/unoobj/chartuno.cxx
@@ -169,7 +169,8 @@ void SAL_CALL ScChartsObj::addNewByName( const OUString& rName,
const awt::Rectangle& aRect,
const uno::Sequence<table::CellRangeAddress>& aRanges,
sal_Bool bColumnHeaders, sal_Bool bRowHeaders )
- throw(::com::sun::star::uno::RuntimeException)
+ throw(::com::sun::star::uno::RuntimeException,
+ std::exception)
{
SolarMutexGuard aGuard;
if (!pDocShell)
commit b56597adda5ee848113f76c002da8e811dfc02f7
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jan 29 15:34:54 2014 +0000
coverity#1079002 Uncaught exception
Change-Id: I57d0d07165c2cb31c3077fd4f4afffae5a0d181c
diff --git a/sc/inc/cellsuno.hxx b/sc/inc/cellsuno.hxx
index 91ef892..cde567b 100644
--- a/sc/inc/cellsuno.hxx
+++ b/sc/inc/cellsuno.hxx
@@ -367,7 +367,8 @@ public:
virtual void SAL_CALL addChartDataChangeEventListener(
const ::com::sun::star::uno::Reference<
::com::sun::star::chart::XChartDataChangeEventListener >& aListener )
- throw(::com::sun::star::uno::RuntimeException);
+ throw(::com::sun::star::uno::RuntimeException,
+ std::exception);
virtual void SAL_CALL removeChartDataChangeEventListener( const ::com::sun::star::uno::Reference<
::com::sun::star::chart::XChartDataChangeEventListener >& aListener )
throw(::com::sun::star::uno::RuntimeException);
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 2129818..4beadd9 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -3346,7 +3346,7 @@ void ScCellRangesBase::ForceChartListener_Impl()
void SAL_CALL ScCellRangesBase::addChartDataChangeEventListener( const uno::Reference<
chart::XChartDataChangeEventListener >& aListener )
- throw(uno::RuntimeException)
+ throw(uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
if ( pDocShell && !aRanges.empty() )
commit 61fe4e1f7825812f6ade8678c160fc923d69c429
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jan 29 15:32:14 2014 +0000
coverity#1079017 Uncaught exception
Change-Id: I2f76a79b66e38b6557645303d4d4515d74172dcb
diff --git a/sc/inc/docuno.hxx b/sc/inc/docuno.hxx
index 56ec909..4e7577d 100644
--- a/sc/inc/docuno.hxx
+++ b/sc/inc/docuno.hxx
@@ -244,7 +244,8 @@ public:
::com::sun::star::beans::PropertyVetoException,
::com::sun::star::lang::IllegalArgumentException,
::com::sun::star::lang::WrappedTargetException,
- ::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::RuntimeException,
+ std::exception);
virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
const OUString& PropertyName )
throw(::com::sun::star::beans::UnknownPropertyException,
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index f3b64c5..309e4ce 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -1585,9 +1585,9 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScModelObj::getPropertySetInfo(
void SAL_CALL ScModelObj::setPropertyValue(
const OUString& aPropertyName, const uno::Any& aValue )
- throw(beans::UnknownPropertyException, beans::PropertyVetoException,
- lang::IllegalArgumentException, lang::WrappedTargetException,
- uno::RuntimeException)
+ throw(beans::UnknownPropertyException, beans::PropertyVetoException,
+ lang::IllegalArgumentException, lang::WrappedTargetException,
+ uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
OUString aString(aPropertyName);
commit e3149900156ef4d207f64ec16fb2d367c3c29dba
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jan 29 15:30:34 2014 +0000
coverity#1132704 Dereference before null check
Change-Id: I1922d7f3481fc56b33a078277cd17e54b14d6953
diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx
index 56a856c..8d00e1b 100644
--- a/sd/source/ui/dlg/sdtreelb.cxx
+++ b/sd/source/ui/dlg/sdtreelb.cxx
@@ -1143,34 +1143,20 @@ void SdPageObjsTLB::KeyInput( const KeyEvent& rKEvt )
{
sal_Bool bMarked=sal_False;
SvTreeListEntry* pNewEntry = GetCurEntry();
- if( GetParent(pNewEntry) == NULL )
+ if (!pNewEntry)
return;
- OUString aStr=GetSelectEntry();
- Window* pWindow=NULL;
- SdNavigatorWin* pSdNavigatorWin=NULL;
- sd::DrawDocShell* pSdDrawDocShell = NULL;
- if(pNewEntry)
- pWindow=(Window*)GetParent(pNewEntry);
- if(pWindow)
- pSdNavigatorWin = (SdNavigatorWin*)pWindow;
- if( pSdNavigatorWin )
- pSdDrawDocShell = pSdNavigatorWin->GetDrawDocShell(mpDoc);
- if(pSdDrawDocShell)
+ SvTreeListEntry* pParentEntry = GetParent(pNewEntry);
+ if (!pParentEntry)
+ return;
+ OUString aStr(GetSelectEntry());
+ SdNavigatorWin* pSdNavigatorWin = (SdNavigatorWin*)pParentEntry;
+ sd::DrawDocShell* pSdDrawDocShell = pSdNavigatorWin->GetDrawDocShell(mpDoc);
+ if (pSdDrawDocShell)
{
pSdDrawDocShell->GotoTreeBookmark(aStr);
bMarked=pSdDrawDocShell->GetObjectIsmarked(aStr);
}
- if(pNewEntry)
- {
- if(bMarked)
- {
- pNewEntry->SetMarked(sal_True);
- }
- else
- {
- pNewEntry->SetMarked( sal_False );
- }
- }
+ pNewEntry->SetMarked(bMarked);
Invalidate();
}
}
commit 94753842eb83bb16783310416bdb95d6827d7ead
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jan 29 15:25:46 2014 +0000
fix indent
Change-Id: Ie0f32006babf12dcb4fb6c244a4110222c2ad7ec
diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx
index 46b344f..56a856c 100644
--- a/sd/source/ui/dlg/sdtreelb.cxx
+++ b/sd/source/ui/dlg/sdtreelb.cxx
@@ -1139,57 +1139,40 @@ void SdPageObjsTLB::KeyInput( const KeyEvent& rKEvt )
}
else if (rKEvt.GetKeyCode().GetCode() == KEY_SPACE)
{
- if(bisInSdNavigatorWin)
- {
- sal_Bool bMarked=sal_False;
- SvTreeListEntry* pNewEntry = GetCurEntry();
- if( GetParent(pNewEntry) == NULL )
- return;
- OUString aStr=GetSelectEntry();
- Window* pWindow=NULL;
- SdNavigatorWin* pSdNavigatorWin=NULL;
- sd::DrawDocShell* pSdDrawDocShell = NULL;
- if(pNewEntry)
- pWindow=(Window*)GetParent(pNewEntry);
- if(pWindow)
- pSdNavigatorWin = (SdNavigatorWin*)pWindow;
- if( pSdNavigatorWin )
- pSdDrawDocShell = pSdNavigatorWin->GetDrawDocShell(mpDoc);
- if(pSdDrawDocShell)
- {
- pSdDrawDocShell->GotoTreeBookmark(aStr);
- bMarked=pSdDrawDocShell->GetObjectIsmarked(aStr);
- }
- //Removed by yanjun for sym2_6385
- //The symphony2.0 can support morn than one level tree list, also support to select tow or more items in different level.
- /*
- SvTreeListEntry* pBeginEntry = First();
- if( pBeginEntry )
- {
- if( GetParent(pBeginEntry) != GetParent(pNewEntry) )
- pBeginEntry->SetMarked( sal_False );
- SvTreeListEntry* pNextEntry = Next( pBeginEntry );
- while( pNextEntry )
- {
- if( GetParent(pNextEntry) != GetParent(pNewEntry) )
- pNextEntry->SetMarked( sal_False );
- pNextEntry = Next( pNextEntry );
- }
- }
- End*/
- if(pNewEntry)
- {
- if(bMarked)
- {
- pNewEntry->SetMarked(sal_True);
- }
- else
- {
- pNewEntry->SetMarked( sal_False );
- }
- }
- Invalidate();
- }
+ if(bisInSdNavigatorWin)
+ {
+ sal_Bool bMarked=sal_False;
+ SvTreeListEntry* pNewEntry = GetCurEntry();
+ if( GetParent(pNewEntry) == NULL )
+ return;
+ OUString aStr=GetSelectEntry();
+ Window* pWindow=NULL;
+ SdNavigatorWin* pSdNavigatorWin=NULL;
+ sd::DrawDocShell* pSdDrawDocShell = NULL;
+ if(pNewEntry)
+ pWindow=(Window*)GetParent(pNewEntry);
+ if(pWindow)
+ pSdNavigatorWin = (SdNavigatorWin*)pWindow;
+ if( pSdNavigatorWin )
+ pSdDrawDocShell = pSdNavigatorWin->GetDrawDocShell(mpDoc);
+ if(pSdDrawDocShell)
+ {
+ pSdDrawDocShell->GotoTreeBookmark(aStr);
+ bMarked=pSdDrawDocShell->GetObjectIsmarked(aStr);
+ }
+ if(pNewEntry)
+ {
+ if(bMarked)
+ {
+ pNewEntry->SetMarked(sal_True);
+ }
+ else
+ {
+ pNewEntry->SetMarked( sal_False );
+ }
+ }
+ Invalidate();
+ }
}
else
SvTreeListBox::KeyInput( rKEvt );
More information about the Libreoffice-commits
mailing list