summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-07-01 09:59:26 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-07-01 10:56:14 +0100
commit5ace3f3b4f2f916d8b2acab1b5cc0fe2a5a19dee (patch)
tree00cdcfc6ef33bc558bda62935d46377f033975d6 /sc
parent62cb50fd9b97358114dcc4d0c1afdcdd04341b0c (diff)
clang scan-build: various warnings
Change-Id: I4bdfb074b3cf6fcb49765322308dfa4b9ed67713
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/bcaslot.cxx2
-rw-r--r--sc/source/ui/undo/undotab.cxx2
-rw-r--r--sc/source/ui/vba/vbarange.cxx3
3 files changed, 3 insertions, 4 deletions
diff --git a/sc/source/core/data/bcaslot.cxx b/sc/source/core/data/bcaslot.cxx
index 6d6eee24bde9..701e53050700 100644
--- a/sc/source/core/data/bcaslot.cxx
+++ b/sc/source/core/data/bcaslot.cxx
@@ -226,7 +226,7 @@ void ScBroadcastAreaSlot::EndListeningArea( const ScRange& rRange,
}
else
{
- if ( !rpArea->GetBroadcaster().HasListeners() )
+ if (rpArea && !rpArea->GetBroadcaster().HasListeners())
{
ScBroadcastAreas::const_iterator aIter( FindBroadcastArea( rRange));
if (aIter == aBroadcastAreaTbl.end() || isMarkedErased( aIter))
diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx
index b5091d5954f0..713305cac85c 100644
--- a/sc/source/ui/undo/undotab.cxx
+++ b/sc/source/ui/undo/undotab.cxx
@@ -1485,7 +1485,7 @@ SdrObject* ScUndoRenameObject::GetObject()
for (sal_uInt16 nTab=0; nTab<nCount; nTab++)
{
SdrPage* pPage = pDrawLayer->GetPage(nTab);
- OSL_ENSURE(pPage,"Page ?");
+ assert(pPage && "Page ?");
SdrObjListIter aIter( *pPage, IM_DEEPNOGROUPS );
SdrObject* pObject = aIter.Next();
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index a14bb3129903..ef0839abed89 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -3155,7 +3155,6 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
const SvxSearchItem& globalSearchOptions = ScGlobal::GetSearchItem();
SvxSearchItem newOptions( globalSearchOptions );
- sal_Int16 nLookAt = globalSearchOptions.GetWordOnly() ? excel::XlLookAt::xlPart : excel::XlLookAt::xlWhole;
sal_Int16 nSearchOrder = globalSearchOptions.GetRowDirection() ? excel::XlSearchOrder::xlByRows : excel::XlSearchOrder::xlByColumns;
uno::Reference< util::XSearchable > xSearch( mxRange, uno::UNO_QUERY );
@@ -3207,7 +3206,7 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
// LookAt
if ( LookAt.hasValue() )
{
- nLookAt = ::comphelper::getINT16( LookAt );
+ sal_Int16 nLookAt = ::comphelper::getINT16( LookAt );
bool bSearchWords = false;
if ( nLookAt == excel::XlLookAt::xlPart )
bSearchWords = false;