From dc044c8827c2576f30a1e3e674be6319f43f8f66 Mon Sep 17 00:00:00 2001 From: Thomas Benisch Date: Tue, 15 May 2001 12:16:52 +0000 Subject: [PATCH] #86683# absolute position of controls --- basctl/source/dlged/dlgedobj.cxx | 78 +++++++++++++++++++++++--------- basctl/source/inc/dlgedobj.hxx | 6 ++- 2 files changed, 60 insertions(+), 24 deletions(-) diff --git a/basctl/source/dlged/dlgedobj.cxx b/basctl/source/dlged/dlgedobj.cxx index 3a2a9b57e621..967a9fb9556f 100644 --- a/basctl/source/dlged/dlgedobj.cxx +++ b/basctl/source/dlged/dlgedobj.cxx @@ -2,9 +2,9 @@ * * $RCSfile: dlgedobj.cxx,v $ * - * $Revision: 1.20 $ + * $Revision: 1.21 $ * - * last change: $Author: tbe $ $Date: 2001-05-14 11:23:57 $ + * last change: $Author: tbe $ $Date: 2001-05-15 13:12:30 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -969,18 +969,11 @@ void DlgEdObj::NbcMove( const Size& rSize ) // set geometry properties SetPropsFromRect(); - // dialog model changed - if ( ISA(DlgEdForm) ) - { - ((DlgEdForm*)this)->GetDlgEditor()->SetDialogModelChanged(TRUE); - } - else - { - GetDlgEdForm()->GetDlgEditor()->SetDialogModelChanged(TRUE); - } - // start listening StartListening(); + + // dialog model changed + GetDlgEdForm()->GetDlgEditor()->SetDialogModelChanged(TRUE); } //---------------------------------------------------------------------------- @@ -995,18 +988,11 @@ void DlgEdObj::NbcResize(const Point& rRef, const Fraction& xFract, const Fracti // set geometry properties SetPropsFromRect(); - // dialog model changed - if ( ISA(DlgEdForm) ) - { - ((DlgEdForm*)this)->GetDlgEditor()->SetDialogModelChanged(TRUE); - } - else - { - GetDlgEdForm()->GetDlgEditor()->SetDialogModelChanged(TRUE); - } - // start listening StartListening(); + + // dialog model changed + GetDlgEdForm()->GetDlgEditor()->SetDialogModelChanged(TRUE); } //---------------------------------------------------------------------------- @@ -1465,6 +1451,54 @@ SdrObject* DlgEdForm::CheckHit( const Point& rPnt, USHORT nTol, //---------------------------------------------------------------------------- +void DlgEdForm::NbcMove( const Size& rSize ) +{ + SdrUnoObj::NbcMove( rSize ); + + // set geometry properties of form + EndListening(sal_False); + SetPropsFromRect(); + StartListening(); + + // set geometry properties of all childs + ::std::vector::iterator aIter; + for ( aIter = pChilds.begin() ; aIter != pChilds.end() ; aIter++ ) + { + (*aIter)->EndListening(sal_False); + (*aIter)->SetPropsFromRect(); + (*aIter)->StartListening(); + } + + // dialog model changed + GetDlgEditor()->SetDialogModelChanged(TRUE); +} + +//---------------------------------------------------------------------------- + +void DlgEdForm::NbcResize(const Point& rRef, const Fraction& xFract, const Fraction& yFract) +{ + SdrUnoObj::NbcResize( rRef, xFract, yFract ); + + // set geometry properties of form + EndListening(sal_False); + SetPropsFromRect(); + StartListening(); + + // set geometry properties of all childs + ::std::vector::iterator aIter; + for ( aIter = pChilds.begin() ; aIter != pChilds.end() ; aIter++ ) + { + (*aIter)->EndListening(sal_False); + (*aIter)->SetPropsFromRect(); + (*aIter)->StartListening(); + } + + // dialog model changed + GetDlgEditor()->SetDialogModelChanged(TRUE); +} + +//---------------------------------------------------------------------------- + FASTBOOL DlgEdForm::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) { sal_Bool bResult = SdrUnoObj::EndCreate(rStat, eCmd); diff --git a/basctl/source/inc/dlgedobj.hxx b/basctl/source/inc/dlgedobj.hxx index 9219e1bba7cf..483a402b2919 100644 --- a/basctl/source/inc/dlgedobj.hxx +++ b/basctl/source/inc/dlgedobj.hxx @@ -2,9 +2,9 @@ * * $RCSfile: dlgedobj.hxx,v $ * - * $Revision: 1.10 $ + * $Revision: 1.11 $ * - * last change: $Author: tbe $ $Date: 2001-05-04 15:20:34 $ + * last change: $Author: tbe $ $Date: 2001-05-15 13:09:43 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -180,6 +180,8 @@ protected: const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rxSFac); DlgEdForm(); + virtual void NbcMove( const Size& rSize ); + virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact); virtual FASTBOOL EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd); public: