summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorThomas Benisch <tbe@openoffice.org>2001-05-04 14:20:34 +0000
committerThomas Benisch <tbe@openoffice.org>2001-05-04 14:20:34 +0000
commit82da03eb8f6b300e0c4dd1e32a2da02271e39902 (patch)
treebcefe5c829844555e48d2d314315a072d166a33f /basctl
parent0aa1eda1a2af438d7061ba2a6d53866141f5fda6 (diff)
#86076# selection of controls within groupbox
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/dlged/dlgedobj.cxx38
-rw-r--r--basctl/source/inc/dlgedobj.hxx6
2 files changed, 40 insertions, 4 deletions
diff --git a/basctl/source/dlged/dlgedobj.cxx b/basctl/source/dlged/dlgedobj.cxx
index ea77abbe6185..625bfdf289b6 100644
--- a/basctl/source/dlged/dlgedobj.cxx
+++ b/basctl/source/dlged/dlgedobj.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: dlgedobj.cxx,v $
*
- * $Revision: 1.17 $
+ * $Revision: 1.18 $
*
- * last change: $Author: tbe $ $Date: 2001-05-04 11:09:19 $
+ * last change: $Author: tbe $ $Date: 2001-05-04 15:20:18 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1260,6 +1260,40 @@ void SAL_CALL DlgEdObj::_elementRemoved(const ::com::sun::star::container::Conta
//----------------------------------------------------------------------------
+SdrObject* DlgEdObj::CheckHit( const Point& rPnt, USHORT nTol,const SetOfByte* pSet ) const
+{
+ ::rtl::OUString aServiceName = GetServiceName();
+
+ if (aServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.awt.UnoControlGroupBoxModel") ))
+ {
+ Rectangle aROuter = aOutRect;
+ aROuter.Left() -= nTol;
+ aROuter.Right() += nTol;
+ aROuter.Top() -= nTol;
+ aROuter.Bottom() += nTol;
+
+ Rectangle aRInner = aOutRect;
+ if( (aRInner.GetSize().Height() > (long)nTol*2) &&
+ (aRInner.GetSize().Width() > (long)nTol*2) )
+ {
+ aRInner.Left() += nTol;
+ aRInner.Right() -= nTol;
+ aRInner.Top() += nTol;
+ aRInner.Bottom() -= nTol;
+ }
+
+ if( aROuter.IsInside( rPnt ) && !aRInner.IsInside( rPnt ) )
+ return (SdrObject*)this;
+ else
+ return 0;
+ }
+ else
+ return SdrObject::CheckHit( rPnt, nTol, pSet );
+}
+
+
+//----------------------------------------------------------------------------
+
TYPEINIT1(DlgEdForm, DlgEdObj);
DBG_NAME(DlgEdForm);
diff --git a/basctl/source/inc/dlgedobj.hxx b/basctl/source/inc/dlgedobj.hxx
index a959ea8cd38e..9219e1bba7cf 100644
--- a/basctl/source/inc/dlgedobj.hxx
+++ b/basctl/source/inc/dlgedobj.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: dlgedobj.hxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: tbe $ $Date: 2001-03-23 16:12:35 $
+ * last change: $Author: tbe $ $Date: 2001-05-04 15:20:34 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -156,6 +156,8 @@ public:
virtual void SAL_CALL _elementInserted( const ::com::sun::star::container::ContainerEvent& Event ) throw(::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL _elementReplaced( const ::com::sun::star::container::ContainerEvent& Event ) throw(::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL _elementRemoved( const ::com::sun::star::container::ContainerEvent& Event ) throw(::com::sun::star::uno::RuntimeException);
+
+ virtual SdrObject* CheckHit(const Point& rPnt,USHORT nTol,const SetOfByte*) const;
};