#86076# selection of controls within groupbox

This commit is contained in:
Thomas Benisch 2001-05-04 14:20:34 +00:00
parent 0aa1eda1a2
commit 82da03eb8f
2 changed files with 40 additions and 4 deletions

View file

@ -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
@ -1258,6 +1258,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);

View file

@ -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;
};