summaryrefslogtreecommitdiff
path: root/svx/source/svdraw
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2017-11-26 21:51:26 +0100
committerMatteo Casalin <matteo.casalin@yahoo.com>2017-12-08 16:17:55 +0100
commit8f4c5a34b9e8704035c6ec770fc2947eb9964502 (patch)
tree9bd9a083366b0570aba82ab44bceee11b36c8d2a /svx/source/svdraw
parentd67eaa235db15853b3b454f2ef45c9a72529a3dc (diff)
GetMarkableObjCount() is only compared against 1
Change-Id: I390b260fe481c7db73a065dd271c78a5df188ccc
Diffstat (limited to 'svx/source/svdraw')
-rw-r--r--svx/source/svdraw/svdmrkv.cxx25
1 files changed, 12 insertions, 13 deletions
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index 9fc9f3a0bf0c..d02758a6eee8 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -522,23 +522,22 @@ void SdrMarkView::BrkMarkGluePoints()
}
}
-sal_uIntPtr SdrMarkView::GetMarkableObjCount() const
+bool SdrMarkView::HasMultipleMarkableObjects() const
{
- sal_uIntPtr nCount=0;
SdrPageView* pPV = GetSdrPageView();
+ if (!pPV)
+ return false;
- if(pPV)
- {
- SdrObjList* pOL=pPV->GetObjList();
- const size_t nObjCount = pOL->GetObjCount();
- for (size_t nObjNum=0; nObjNum<nObjCount; ++nObjNum) {
- SdrObject* pObj=pOL->GetObj(nObjNum);
- if (IsObjMarkable(pObj,pPV)) {
- nCount++;
- }
- }
+ int nCount=0;
+ SdrObjList* pOL=pPV->GetObjList();
+ const size_t nObjCount = pOL->GetObjCount();
+ for (size_t nObjNum=0; nObjNum<nObjCount; ++nObjNum) {
+ SdrObject* pObj=pOL->GetObj(nObjNum);
+ if (IsObjMarkable(pObj,pPV) && ++nCount>1)
+ return true;
}
- return nCount;
+
+ return false;
}
bool SdrMarkView::HasMarkableObj() const