From 4bcd960e7f677c813c9fd7f10f4469461f0b7a18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Mon, 2 Dec 2013 16:00:10 +0000 Subject: [PATCH] restore SdrMarkView::HasMarkableObj, etc. Change-Id: Ib5c0d5028792708bc0ac0e756aa47d486443bbb7 --- include/svx/svdmrkv.hxx | 2 ++ svx/source/svdraw/svdmrkv.cxx | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/include/svx/svdmrkv.hxx b/include/svx/svdmrkv.hxx index 64a7ffbd717a..ecf2b207a1a4 100644 --- a/include/svx/svdmrkv.hxx +++ b/include/svx/svdmrkv.hxx @@ -228,6 +228,8 @@ public: void SetFrameDragSingles(sal_Bool bOn=sal_True) { SetFrameHandles(bOn); } sal_Bool IsFrameDragSingles() const { return IsFrameHandles(); } + sal_Bool HasMarkableObj() const; + //////////////////////////////////////////////////////////////////////////////////////////////////// // migrate selections diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index 4b85b92065f0..b63131aadc9b 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -519,6 +519,25 @@ sal_uIntPtr SdrMarkView::GetMarkableObjCount() const return nCount; } +sal_Bool SdrMarkView::HasMarkableObj() const +{ + sal_uIntPtr nCount=0; + + SdrPageView* pPV = GetSdrPageView(); + if(pPV) + { + SdrObjList* pOL=pPV->GetObjList(); + sal_uIntPtr nObjAnz=pOL->GetObjCount(); + for (sal_uIntPtr nObjNum=0; nObjNumGetObj(nObjNum); + if (IsObjMarkable(pObj,pPV)) { + nCount++; + } + } + } + return nCount!=0; +} + void SdrMarkView::hideMarkHandles() { if(!mbMarkHandlesHidden)