You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by al...@apache.org on 2013/10/17 20:36:04 UTC
svn commit: r1533203 [1/3] - in /openoffice/branches/alg/aw080/main:
basctl/source/dlged/ filter/source/msfilter/ reportdesign/source/ui/report/
sc/source/ui/drawfunc/ sd/source/ui/animations/ sd/source/ui/dlg/
sd/source/ui/func/ sd/source/ui/view/ svx...
Author: alg
Date: Thu Oct 17 18:36:03 2013
New Revision: 1533203
URL: http://svn.apache.org/r1533203
Log:
GluePoint rework done and checked
Modified:
openoffice/branches/alg/aw080/main/basctl/source/dlged/dlgedfunc.cxx
openoffice/branches/alg/aw080/main/filter/source/msfilter/escherex.cxx
openoffice/branches/alg/aw080/main/filter/source/msfilter/msdffimp.cxx
openoffice/branches/alg/aw080/main/reportdesign/source/ui/report/ViewsWindow.cxx
openoffice/branches/alg/aw080/main/sc/source/ui/drawfunc/fudraw.cxx
openoffice/branches/alg/aw080/main/sd/source/ui/animations/motionpathtag.cxx
openoffice/branches/alg/aw080/main/sd/source/ui/dlg/gluectrl.cxx
openoffice/branches/alg/aw080/main/sd/source/ui/func/fuediglu.cxx
openoffice/branches/alg/aw080/main/sd/source/ui/func/fupoor.cxx
openoffice/branches/alg/aw080/main/sd/source/ui/view/drviews7.cxx
openoffice/branches/alg/aw080/main/sd/source/ui/view/sdview3.cxx
openoffice/branches/alg/aw080/main/svx/Library_svxcore.mk
openoffice/branches/alg/aw080/main/svx/Package_inc.mk
openoffice/branches/alg/aw080/main/svx/inc/svx/gluepoint.hxx
openoffice/branches/alg/aw080/main/svx/inc/svx/svdglev.hxx
openoffice/branches/alg/aw080/main/svx/inc/svx/svdoashp.hxx
openoffice/branches/alg/aw080/main/svx/inc/svx/svdobj.hxx
openoffice/branches/alg/aw080/main/svx/inc/svx/svdoedge.hxx
openoffice/branches/alg/aw080/main/svx/inc/svx/svdview.hxx
openoffice/branches/alg/aw080/main/svx/source/customshapes/EnhancedCustomShape2d.cxx
openoffice/branches/alg/aw080/main/svx/source/dialog/graphctl.cxx
openoffice/branches/alg/aw080/main/svx/source/sdr/contact/viewcontactofsdrobj.cxx
openoffice/branches/alg/aw080/main/svx/source/svdraw/gluepoint.cxx
openoffice/branches/alg/aw080/main/svx/source/svdraw/sdrselection.cxx
openoffice/branches/alg/aw080/main/svx/source/svdraw/svdcrtv.cxx
openoffice/branches/alg/aw080/main/svx/source/svdraw/svddrgmt.cxx
openoffice/branches/alg/aw080/main/svx/source/svdraw/svddrgv.cxx
openoffice/branches/alg/aw080/main/svx/source/svdraw/svdglev.cxx
openoffice/branches/alg/aw080/main/svx/source/svdraw/svdmrkv.cxx
openoffice/branches/alg/aw080/main/svx/source/svdraw/svdmrkv1.cxx
openoffice/branches/alg/aw080/main/svx/source/svdraw/svdoashp.cxx
openoffice/branches/alg/aw080/main/svx/source/svdraw/svdobj.cxx
openoffice/branches/alg/aw080/main/svx/source/svdraw/svdoedge.cxx
openoffice/branches/alg/aw080/main/svx/source/svdraw/svdpntv.cxx
openoffice/branches/alg/aw080/main/svx/source/svdraw/svdview.cxx
openoffice/branches/alg/aw080/main/svx/source/unodraw/gluepts.cxx
openoffice/branches/alg/aw080/main/sw/source/ui/docvw/edtwin.cxx
Modified: openoffice/branches/alg/aw080/main/basctl/source/dlged/dlgedfunc.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/basctl/source/dlged/dlgedfunc.cxx?rev=1533203&r1=1533202&r2=1533203&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/basctl/source/dlged/dlgedfunc.cxx (original)
+++ openoffice/branches/alg/aw080/main/basctl/source/dlged/dlgedfunc.cxx Thu Oct 17 18:36:03 2013
@@ -289,55 +289,6 @@ sal_Bool DlgEdFunc::KeyInput( const KeyE
{
// move the handle
pView->MoveHandleByVector(*pHdl, aMove, pWindow, 0);
-
- // TTTT:HANDLE
- //if ( pHdl && !aMove.equalZero() )
- //{
- // const basegfx::B2DPoint aStartPoint( pHdl->getPosition() );
- // const basegfx::B2DPoint aEndPoint( pHdl->getPosition() + aMove );
- // const SdrDragStat& rDragStat = pView->GetDragStat();
- //
- // // start dragging
- // pView->BegDragObj( aStartPoint, pHdl, 0.0 );
- //
- // if ( pView->IsDragObj() )
- // {
- // const bool bWasNoSnap(rDragStat.IsNoSnap());
- // const bool bWasSnapEnabled(pView->IsSnapEnabled());
- //
- // // switch snapping off
- // if ( !bWasNoSnap )
- // {
- // ((SdrDragStat&)rDragStat).SetNoSnap(true);
- // }
- //
- // if ( bWasSnapEnabled )
- // {
- // pView->SetSnapEnabled( false );
- // }
- //
- // pView->MovAction( aEndPoint );
- // pView->EndDragObj();
- //
- // // restore snap
- // if ( !bWasNoSnap )
- // {
- // ((SdrDragStat&)rDragStat).SetNoSnap( bWasNoSnap );
- // }
- //
- // if ( bWasSnapEnabled )
- // {
- // pView->SetSnapEnabled( bWasSnapEnabled );
- // }
- // }
- //
- // // make moved handle visible
- // const basegfx::B2DRange aVisRange(
- // aEndPoint - basegfx::B2DPoint(100.0, 100.0),
- // aEndPoint + basegfx::B2DPoint(100.0, 100.0));
- //
- // pView->MakeVisibleAtView( aVisRange, *pWindow );
- //}
}
}
else
Modified: openoffice/branches/alg/aw080/main/filter/source/msfilter/escherex.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/filter/source/msfilter/escherex.cxx?rev=1533203&r1=1533202&r2=1533203&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/filter/source/msfilter/escherex.cxx (original)
+++ openoffice/branches/alg/aw080/main/filter/source/msfilter/escherex.cxx Thu Oct 17 18:36:03 2013
@@ -4806,8 +4806,8 @@ sal_uInt32 EscherConnectorListEntry::Get
if ( nGluePointType == com::sun::star::drawing::EnhancedCustomShapeGluePointType::CUSTOM )
{
- const sdr::glue::List* pList = pCustoShape->GetGluePointList(false);
- const sdr::glue::PointVector aGluePointVector(pList ? pList->getVector() : sdr::glue::PointVector());
+ const sdr::glue::GluePointProvider& rProvider = pCustoShape->GetGluePointProvider();
+ const sdr::glue::GluePointVector aGluePointVector(rProvider.getUserGluePointVector());
if(aGluePointVector.size())
{
@@ -4815,7 +4815,7 @@ sal_uInt32 EscherConnectorListEntry::Get
for(sal_uInt32 a(0); a < aGluePointVector.size(); a++)
{
- const sdr::glue::Point* pCandidate = aGluePointVector[a];
+ const sdr::glue::GluePoint* pCandidate = aGluePointVector[a];
if(pCandidate)
{
@@ -4825,31 +4825,13 @@ sal_uInt32 EscherConnectorListEntry::Get
}
else
{
- OSL_ENSURE(false, "Got sdr::glue::PointVector with empty entries (!)");
+ OSL_ENSURE(false, "Got sdr::glue::GluePointVector with empty entries (!)");
}
}
nRule = GetClosestPoint( aPoly, aRefPoint );
bRectangularConnection = false;
}
-
- // TTTT:GLUE
- //if ( pList )
- //{
- // Polygon aPoly;
- // sal_uInt16 nNum, nAnz = pList->GetCount();
- // if ( nAnz )
- // {
- // for ( nNum = 0; nNum < nAnz; nNum++ )
- // {
- // const sdr::glue::Point& rGP = (*pList)[ nNum ];
- // const basegfx::B2DPoint aPt( rGP.GetAbsolutePos( sdr::legacy::GetSnapRange(*pCustoShape) ) );
- // aPoly.Insert( POLY_APPEND, Point(basegfx::fround(aPt.getX()), basegfx::fround(aPt.getY())) );
- // }
- // nRule = GetClosestPoint( aPoly, aRefPoint );
- // bRectangularConnection = false;
- // }
- //}
}
else if ( nGluePointType == com::sun::star::drawing::EnhancedCustomShapeGluePointType::SEGMENTS )
{
Modified: openoffice/branches/alg/aw080/main/filter/source/msfilter/msdffimp.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/filter/source/msfilter/msdffimp.cxx?rev=1533203&r1=1533202&r2=1533203&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/filter/source/msfilter/msdffimp.cxx (original)
+++ openoffice/branches/alg/aw080/main/filter/source/msfilter/msdffimp.cxx Thu Oct 17 18:36:03 2013
@@ -471,11 +471,10 @@ void SvxMSDffManager::SolveSolver( const
if ( pO )
{
Any aAny;
- sdr::glue::Point aGluePoint;
Reference< XShape > aXShape( pO->getUnoShape(), UNO_QUERY );
Reference< XShape > aXConnector( pPtr->pCObj->getUnoShape(), UNO_QUERY );
- sdr::glue::List* pList = pO->GetGluePointList(true);
- sdr::glue::PointVector aGluePointVector(pList ? pList->getVector() : sdr::glue::PointVector());
+ sdr::glue::GluePointProvider& rProvider = pO->GetGluePointProvider();
+ const sdr::glue::GluePointVector aGluePointVector(rProvider.getUserGluePointVector());
sal_Bool bValidGluePoint = sal_False;
sal_Int32 nId = nC;
sal_uInt32 nInventor = pO->GetObjInventor();
@@ -524,10 +523,9 @@ void SvxMSDffManager::SolveSolver( const
break;
case OBJ_POLY :
{
- // TTTT:GLUE if ( pList && ( pList->GetCount() > nC ) )
if(aGluePointVector.size() > nC)
{
- const sdr::glue::Point* pCandidate = aGluePointVector[nC];
+ const sdr::glue::GluePoint* pCandidate = aGluePointVector[nC];
if(pCandidate)
{
@@ -536,12 +534,8 @@ void SvxMSDffManager::SolveSolver( const
}
else
{
- OSL_ENSURE(false, "Got sdr::glue::PointVector with empty entries (!)");
+ OSL_ENSURE(false, "Got sdr::glue::GluePointVector with empty entries (!)");
}
-
- // TTTT:GLUE
- //bValidGluePoint = sal_True;
- //nId = (sal_Int32)((*pList)[ (sal_uInt16)nC].GetId() + 3 );
}
else
{
@@ -566,36 +560,16 @@ void SvxMSDffManager::SolveSolver( const
if ( eFlags == POLY_NORMAL )
{
- if ( nC == nPointCount )
+ if ( nC == nPointCount && rProvider.allowsUserGluePoints() )
{
const Point& rPoint = rPolygon.GetPoint( j );
const double fX((rPoint.X() - aBoundRect.Left()) / (aBoundRect.GetWidth() ? aBoundRect.GetWidth() : 1));
const double fY((rPoint.Y() - aBoundRect.Top()) / (aBoundRect.GetHeight() ? aBoundRect.GetHeight() : 1));
- // TTTT:GLUE bUserDefined == true okay?
- sdr::glue::Point& rNew = pList->add(sdr::glue::Point(basegfx::B2DPoint(fX, fY)));
+ // create that single GluePoint at polygon point position
+ sdr::glue::GluePoint& rNew = rProvider.addUserGluePoint(sdr::glue::GluePoint(basegfx::B2DPoint(fX, fY)));
nId = rNew.getID() + 4;
bNotFound = sal_False;
-
- //const Point& rPoint = rPolygon.GetPoint( j );
- //double fXRel = rPoint.X() - aBoundRect.Left();
- //double fYRel = rPoint.Y() - aBoundRect.Top();
- //sal_Int32 nWidth = aBoundRect.GetWidth();
- //if ( !nWidth )
- // nWidth = 1;
- //sal_Int32 nHeight= aBoundRect.GetHeight();
- //if ( !nHeight )
- // nHeight = 1;
- //fXRel /= (double)nWidth;
- //fXRel *= 10000;
- //fYRel /= (double)nHeight;
- //fYRel *= 10000;
- //aGluePoint.SetPos( basegfx::B2DPoint( fXRel, fYRel ) );
- //aGluePoint.SetPercent( true );
- //aGluePoint.SetAlign( SDRVERTALIGN_TOP | SDRHORZALIGN_LEFT );
- //aGluePoint.setEscapeDirections(sdr::glue::Point::ESCAPE_DIRECTION_SMART);
- //nId = (sal_Int32)((*pList)[ pList->Insert( aGluePoint ) ].GetId() + 3 );
- //bNotFound = sal_False;
}
nPointCount++;
}
@@ -634,7 +608,7 @@ void SvxMSDffManager::SolveSolver( const
{
if(aGluePointVector.size() > nC)
{
- const sdr::glue::Point* pCandidate = aGluePointVector[nC];
+ const sdr::glue::GluePoint* pCandidate = aGluePointVector[nC];
if(pCandidate)
{
@@ -643,16 +617,9 @@ void SvxMSDffManager::SolveSolver( const
}
else
{
- OSL_ENSURE(false, "Got sdr::glue::PointVector with empty entries (!)");
+ OSL_ENSURE(false, "Got sdr::glue::GluePointVector with empty entries (!)");
}
}
-
- // TTTT:GLUE
- //if ( pList && ( pList->GetCount() > nC ) )
- //{
- // bValidGluePoint = sal_True;
- // nId = (sal_Int32)((*pList)[ (sal_uInt16)nC].GetId() + 3 );
- //}
}
else if ( nGluePointType == EnhancedCustomShapeGluePointType::RECT )
{
@@ -774,14 +741,12 @@ void SvxMSDffManager::SolveSolver( const
aGeometryItem.SetPropertyValue( sPath, aProp );
bValidGluePoint = sal_True;
((SdrObjCustomShape*)pO)->SetMergedItem( aGeometryItem );
+ const sdr::glue::GluePointProvider& rProvider = pO->GetGluePointProvider();
+ const sdr::glue::GluePointVector aGluePointVector(rProvider.getUserGluePointVector());
- // TTTT:GLUE false okay here?
- const sdr::glue::List* pLst = pO->GetGluePointList(false);
- const sdr::glue::PointVector aGPVector(pLst ? pLst->getVector() : sdr::glue::PointVector());
-
- if((sal_Int32)aGPVector.size() > nGluePoints)
+ if(aGluePointVector.size() > nGluePoints)
{
- const sdr::glue::Point* pCandidate = aGPVector[nGluePoints];
+ const sdr::glue::GluePoint* pCandidate = aGluePointVector[nGluePoints];
if(pCandidate)
{
@@ -789,14 +754,9 @@ void SvxMSDffManager::SolveSolver( const
}
else
{
- OSL_ENSURE(false, "Got sdr::glue::PointVector with empty entries (!)");
+ OSL_ENSURE(false, "Got sdr::glue::GluePointVector with empty entries (!)");
}
}
-
- // TTTT:GLUE
- //const sdr::glue::List* pLst = pO->GetGluePointList(true);
- //if ( (sal_Int32)pLst->GetCount() > nGluePoints )
- // nId = (sal_Int32)((*pLst)[ (sal_uInt16)nGluePoints ].GetId() + 3 );
}
}
}
Modified: openoffice/branches/alg/aw080/main/reportdesign/source/ui/report/ViewsWindow.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/reportdesign/source/ui/report/ViewsWindow.cxx?rev=1533203&r1=1533202&r2=1533203&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/reportdesign/source/ui/report/ViewsWindow.cxx (original)
+++ openoffice/branches/alg/aw080/main/reportdesign/source/ui/report/ViewsWindow.cxx Thu Oct 17 18:36:03 2013
@@ -1748,82 +1748,6 @@ void OViewsWindow::handleKey(const KeyCo
// move the handle
rView.MoveHandleByVector(*pHdl, aMove, &rReportSection, 0);
}
-
- // TTTT:HANDLE
- //if ( pHdl && !aMove.equalZero() )
- //{
- // const basegfx::B2DPoint aStartPoint( pHdl->getPosition() );
- // const basegfx::B2DPoint aEndPoint( pHdl->getPosition() + aMove );
- // const SdrDragStat& rDragStat = rView.GetDragStat();
- //
- // // start dragging
- // rView.BegDragObj( aStartPoint, pHdl, 0.0 );
- //
- // if ( rView.IsDragObj() )
- // {
- // const bool bWasNoSnap = rDragStat.IsNoSnap();
- // const bool bWasSnapEnabled = rView.IsSnapEnabled();
- //
- // // switch snapping off
- // if ( !bWasNoSnap )
- // ((SdrDragStat&)rDragStat).SetNoSnap( true );
- // if ( bWasSnapEnabled )
- // rView.SetSnapEnabled( false );
- //
- // basegfx::B2DRange aNewRange;
- // bool bCheck = false;
- // const SdrObjectVector aSelection(rView.getSelectedSdrObjectVectorFromSdrMarkView());
- //
- // for (sal_uInt32 i(0); !bCheck && i < aSelection.size(); ++i )
- // {
- // bCheck = dynamic_cast< OUnoObject* >(aSelection[i]) || dynamic_cast< OOle2Obj* >(aSelection[i]);
- // if ( bCheck )
- // aNewRange.expand(aSelection[i]->getObjectRange(&rView));
- // }
- //
- // switch(pHdl->GetKind())
- // {
- // case HDL_LEFT:
- // case HDL_UPLFT:
- // case HDL_LWLFT:
- // case HDL_UPPER:
- // aNewRange = basegfx::B2DRange(
- // aNewRange.getMinimum() + aMove,
- // aNewRange.getMaximum());
- // break;
- // case HDL_UPRGT:
- // case HDL_RIGHT:
- // case HDL_LWRGT:
- // case HDL_LOWER:
- // aNewRange = basegfx::B2DRange(
- // aNewRange.getMinimum(),
- // aNewRange.getMaximum() + aMove);
- // break;
- // default:
- // break;
- // }
- //
- // if ( !(bCheck && isOver(aNewRange,*rReportSection.getPage(),rView)) )
- // {
- // rView.MovAction(aEndPoint);
- // }
- //
- // rView.EndDragObj();
- //
- // // restore snap
- // if ( !bWasNoSnap )
- // ((SdrDragStat&)rDragStat).SetNoSnap( bWasNoSnap );
- // if ( bWasSnapEnabled )
- // rView.SetSnapEnabled( bWasSnapEnabled );
- // }
- //
- // // make moved handle visible
- // const basegfx::B2DRange aRange(
- // aEndPoint - basegfx::B2DPoint(DEFAUL_MOVE_SIZE, DEFAUL_MOVE_SIZE),
- // aEndPoint + basegfx::B2DPoint(DEFAUL_MOVE_SIZE, DEFAUL_MOVE_SIZE));
- //
- // rView.MakeVisibleAtView( aRange, rReportSection);
- //}
}
rView.RecreateAllMarkHandles();
Modified: openoffice/branches/alg/aw080/main/sc/source/ui/drawfunc/fudraw.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sc/source/ui/drawfunc/fudraw.cxx?rev=1533203&r1=1533202&r2=1533203&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sc/source/ui/drawfunc/fudraw.cxx (original)
+++ openoffice/branches/alg/aw080/main/sc/source/ui/drawfunc/fudraw.cxx Thu Oct 17 18:36:03 2013
@@ -602,47 +602,7 @@ sal_Bool __EXPORT FuDraw::KeyInput(const
{
// move handle with index nHandleIndex
pView->MoveHandleByVector(*pHdl, aMove, pWindow, 0);
-
- // TTTT:HANDLE
- //if(pHdl && !aMove.equalZero())
- //{
- // // now move the Handle
- // const basegfx::B2DPoint aStartPoint(pHdl->getPosition());
- // const basegfx::B2DPoint aEndPoint(aStartPoint + aMove);
- // const SdrDragStat& rDragStat = pView->GetDragStat();
- //
- // // start dragging
- // pView->BegDragObj(aStartPoint, pHdl, 0.0);
- //
- // if(pView->IsDragObj())
- // {
- // const bool bWasNoSnap(rDragStat.IsNoSnap());
- // const bool bWasSnapEnabled(pView->IsSnapEnabled());
- //
- // // switch snapping off
- // if(!bWasNoSnap)
- // ((SdrDragStat&)rDragStat).SetNoSnap(true);
- // if(bWasSnapEnabled)
- // pView->SetSnapEnabled(false);
- //
- // pView->MovAction(aEndPoint);
- // pView->EndDragObj();
- //
- // // restore snap
- // if(!bWasNoSnap)
- // ((SdrDragStat&)rDragStat).SetNoSnap(bWasNoSnap);
- // if(bWasSnapEnabled)
- // pView->SetSnapEnabled(bWasSnapEnabled);
- // }
- //
- // // make moved handle visible
- // const basegfx::B2DRange aVisRange(
- // aEndPoint - basegfx::B2DPoint(100.0, 100.0),
- // aEndPoint + basegfx::B2DPoint(100.0, 100.0));
- // pView->MakeVisibleAtView(aVisRange, *pWindow);
- //
- bReturn = sal_True;
- //}
+ bReturn = sal_True;
}
}
}
Modified: openoffice/branches/alg/aw080/main/sd/source/ui/animations/motionpathtag.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sd/source/ui/animations/motionpathtag.cxx?rev=1533203&r1=1533202&r2=1533203&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sd/source/ui/animations/motionpathtag.cxx (original)
+++ openoffice/branches/alg/aw080/main/sd/source/ui/animations/motionpathtag.cxx Thu Oct 17 18:36:03 2013
@@ -770,37 +770,6 @@ bool MotionPathTag::OnMove( const KeyEve
}
mrView.MoveHandleByVector(*pHdl, basegfx::B2DVector(fX, fY), 0, pDragMethod);
-
- // TTTT:HANDLE
- //const basegfx::B2DPoint aStartPoint(pHdl->getPosition());
- //const basegfx::B2DPoint aEndPoint(aStartPoint + basegfx::B2DPoint(fX, fY));
- //
- //// start dragging
- //rtl::Reference< MotionPathTag > xTag( this );
- //SdrDragMethod* pDragMethod = 0;
- //
- //mrView.BegDragObj(aStartPoint, pHdl, 0.0, pDragMethod);
- //
- //if(mrView.IsDragObj())
- //{
- // const bool bWasNoSnap(mrView.GetDragStat().IsNoSnap());
- // const bool bWasSnapEnabled(mrView.IsSnapEnabled());
- //
- // // switch snapping off
- // if(!bWasNoSnap)
- // ((SdrDragStat&)mrView.GetDragStat()).SetNoSnap(true);
- // if(bWasSnapEnabled)
- // mrView.SetSnapEnabled(false);
- //
- // mrView.MovAction(aEndPoint);
- // mrView.EndDragObj();
- //
- // // restore snap
- // if(!bWasNoSnap)
- // ((SdrDragStat&)mrView.GetDragStat()).SetNoSnap(bWasNoSnap);
- // if(bWasSnapEnabled)
- // mrView.SetSnapEnabled(bWasSnapEnabled);
- //}
}
else
{
Modified: openoffice/branches/alg/aw080/main/sd/source/ui/dlg/gluectrl.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sd/source/ui/dlg/gluectrl.cxx?rev=1533203&r1=1533202&r2=1533203&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sd/source/ui/dlg/gluectrl.cxx (original)
+++ openoffice/branches/alg/aw080/main/sd/source/ui/dlg/gluectrl.cxx Thu Oct 17 18:36:03 2013
@@ -34,6 +34,7 @@
#include <sfx2/dispatch.hxx>
#include <vcl/toolbox.hxx>
#include <sfx2/viewfrm.hxx>
+#include <svx/gluepoint.hxx>
#include "strings.hrc"
#include "gluectrl.hxx"
@@ -48,11 +49,11 @@ using namespace ::com::sun::star::frame;
#define ESCDIR_COUNT 5
static sal_uInt16 aEscDirArray[] =
{
- sdr::glue::Point::ESCAPE_DIRECTION_SMART,
- sdr::glue::Point::ESCAPE_DIRECTION_LEFT,
- sdr::glue::Point::ESCAPE_DIRECTION_RIGHT,
- sdr::glue::Point::ESCAPE_DIRECTION_TOP,
- sdr::glue::Point::ESCAPE_DIRECTION_BOTTOM
+ sdr::glue::GluePoint::ESCAPE_DIRECTION_SMART,
+ sdr::glue::GluePoint::ESCAPE_DIRECTION_LEFT,
+ sdr::glue::GluePoint::ESCAPE_DIRECTION_RIGHT,
+ sdr::glue::GluePoint::ESCAPE_DIRECTION_TOP,
+ sdr::glue::GluePoint::ESCAPE_DIRECTION_BOTTOM
};
Modified: openoffice/branches/alg/aw080/main/sd/source/ui/func/fuediglu.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sd/source/ui/func/fuediglu.cxx?rev=1533203&r1=1533202&r2=1533203&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sd/source/ui/func/fuediglu.cxx (original)
+++ openoffice/branches/alg/aw080/main/sd/source/ui/func/fuediglu.cxx Thu Oct 17 18:36:03 2013
@@ -381,29 +381,29 @@ void FuEditGluePoints::ReceiveRequest(Sf
case SID_GLUE_ESCDIR_LEFT:
{
- mpView->SetMarkedGluePointsEscDir( sdr::glue::Point::ESCAPE_DIRECTION_LEFT,
- !mpView->IsMarkedGluePointsEscDir( sdr::glue::Point::ESCAPE_DIRECTION_LEFT ) );
+ mpView->SetMarkedGluePointsEscDir( sdr::glue::GluePoint::ESCAPE_DIRECTION_LEFT,
+ !mpView->IsMarkedGluePointsEscDir( sdr::glue::GluePoint::ESCAPE_DIRECTION_LEFT ) );
}
break;
case SID_GLUE_ESCDIR_RIGHT:
{
- mpView->SetMarkedGluePointsEscDir( sdr::glue::Point::ESCAPE_DIRECTION_RIGHT,
- !mpView->IsMarkedGluePointsEscDir( sdr::glue::Point::ESCAPE_DIRECTION_RIGHT ) );
+ mpView->SetMarkedGluePointsEscDir( sdr::glue::GluePoint::ESCAPE_DIRECTION_RIGHT,
+ !mpView->IsMarkedGluePointsEscDir( sdr::glue::GluePoint::ESCAPE_DIRECTION_RIGHT ) );
}
break;
case SID_GLUE_ESCDIR_TOP:
{
- mpView->SetMarkedGluePointsEscDir( sdr::glue::Point::ESCAPE_DIRECTION_TOP,
- !mpView->IsMarkedGluePointsEscDir( sdr::glue::Point::ESCAPE_DIRECTION_TOP ) );
+ mpView->SetMarkedGluePointsEscDir( sdr::glue::GluePoint::ESCAPE_DIRECTION_TOP,
+ !mpView->IsMarkedGluePointsEscDir( sdr::glue::GluePoint::ESCAPE_DIRECTION_TOP ) );
}
break;
case SID_GLUE_ESCDIR_BOTTOM:
{
- mpView->SetMarkedGluePointsEscDir( sdr::glue::Point::ESCAPE_DIRECTION_BOTTOM,
- !mpView->IsMarkedGluePointsEscDir( sdr::glue::Point::ESCAPE_DIRECTION_BOTTOM ) );
+ mpView->SetMarkedGluePointsEscDir( sdr::glue::GluePoint::ESCAPE_DIRECTION_BOTTOM,
+ !mpView->IsMarkedGluePointsEscDir( sdr::glue::GluePoint::ESCAPE_DIRECTION_BOTTOM ) );
}
break;
@@ -418,37 +418,37 @@ void FuEditGluePoints::ReceiveRequest(Sf
case SID_GLUE_HORZALIGN_CENTER:
{
- mpView->SetMarkedGluePointsAlign(false, sdr::glue::Point::Alignment_Center);
+ mpView->SetMarkedGluePointsAlign(false, sdr::glue::GluePoint::Alignment_Center);
}
break;
case SID_GLUE_HORZALIGN_LEFT:
{
- mpView->SetMarkedGluePointsAlign(false, sdr::glue::Point::Alignment_Minimum);
+ mpView->SetMarkedGluePointsAlign(false, sdr::glue::GluePoint::Alignment_Minimum);
}
break;
case SID_GLUE_HORZALIGN_RIGHT:
{
- mpView->SetMarkedGluePointsAlign(false, sdr::glue::Point::Alignment_Maximum);
+ mpView->SetMarkedGluePointsAlign(false, sdr::glue::GluePoint::Alignment_Maximum);
}
break;
case SID_GLUE_VERTALIGN_CENTER:
{
- mpView->SetMarkedGluePointsAlign(true, sdr::glue::Point::Alignment_Center);
+ mpView->SetMarkedGluePointsAlign(true, sdr::glue::GluePoint::Alignment_Center);
}
break;
case SID_GLUE_VERTALIGN_TOP:
{
- mpView->SetMarkedGluePointsAlign(true, sdr::glue::Point::Alignment_Minimum);
+ mpView->SetMarkedGluePointsAlign(true, sdr::glue::GluePoint::Alignment_Minimum);
}
break;
case SID_GLUE_VERTALIGN_BOTTOM:
{
- mpView->SetMarkedGluePointsAlign(true, sdr::glue::Point::Alignment_Maximum);
+ mpView->SetMarkedGluePointsAlign(true, sdr::glue::GluePoint::Alignment_Maximum);
}
break;
}
Modified: openoffice/branches/alg/aw080/main/sd/source/ui/func/fupoor.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sd/source/ui/func/fupoor.cxx?rev=1533203&r1=1533202&r2=1533203&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sd/source/ui/func/fupoor.cxx (original)
+++ openoffice/branches/alg/aw080/main/sd/source/ui/func/fupoor.cxx Thu Oct 17 18:36:03 2013
@@ -812,46 +812,6 @@ bool FuPoor::KeyInput(const KeyEvent& rK
{
// move handle with index nHandleIndex
mpView->MoveHandleByVector(*pHdl, aMove, mpWindow, 0);
-
- // TTTT:HANDLE
- //if(pHdl && !aMove.equalZero())
- //{
- // // now move the Handle
- // const basegfx::B2DPoint aStartPoint(pHdl->getPosition());
- // const basegfx::B2DPoint aEndPoint(aStartPoint + aMove);
- // const SdrDragStat& rDragStat = mpView->GetDragStat();
- //
- // // start dragging
- // mpView->BegDragObj(aStartPoint, pHdl, 0.0);
- //
- // if(mpView->IsDragObj())
- // {
- // const bool bWasNoSnap(rDragStat.IsNoSnap());
- // const bool bWasSnapEnabled(mpView->IsSnapEnabled());
- //
- // // switch snapping off
- // if(!bWasNoSnap)
- // ((SdrDragStat&)rDragStat).SetNoSnap(true);
- // if(bWasSnapEnabled)
- // mpView->SetSnapEnabled(false);
- //
- // mpView->MovAction(aEndPoint);
- // mpView->EndDragObj();
- //
- // // restore snap
- // if(!bWasNoSnap)
- // ((SdrDragStat&)rDragStat).SetNoSnap(bWasNoSnap);
- // if(bWasSnapEnabled)
- // mpView->SetSnapEnabled(bWasSnapEnabled);
- // }
- //
- // // make moved handle visible
- // const basegfx::B2DRange aVisRange(
- // aEndPoint - basegfx::B2DPoint(100.0, 100.0),
- // aEndPoint + basegfx::B2DPoint(100.0, 100.0));
- //
- // mpView->MakeVisibleAtView(aVisRange, *mpWindow);
- //}
}
// #109007#
Modified: openoffice/branches/alg/aw080/main/sd/source/ui/view/drviews7.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sd/source/ui/view/drviews7.cxx?rev=1533203&r1=1533202&r2=1533203&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sd/source/ui/view/drviews7.cxx (original)
+++ openoffice/branches/alg/aw080/main/sd/source/ui/view/drviews7.cxx Thu Oct 17 18:36:03 2013
@@ -459,18 +459,18 @@ void DrawViewShell::GetMenuState( SfxIte
else
{
// Horizontale Ausrichtung
- const sdr::glue::Point::Alignment nHorz(mpDrawView->GetMarkedGluePointsAlign(false));
+ const sdr::glue::GluePoint::Alignment nHorz(mpDrawView->GetMarkedGluePointsAlign(false));
- rSet.Put( SfxBoolItem( SID_GLUE_HORZALIGN_CENTER, nHorz == sdr::glue::Point::Alignment_Center ) );
- rSet.Put( SfxBoolItem( SID_GLUE_HORZALIGN_LEFT, nHorz == sdr::glue::Point::Alignment_Minimum ) );
- rSet.Put( SfxBoolItem( SID_GLUE_HORZALIGN_RIGHT, nHorz == sdr::glue::Point::Alignment_Maximum ) );
+ rSet.Put( SfxBoolItem( SID_GLUE_HORZALIGN_CENTER, nHorz == sdr::glue::GluePoint::Alignment_Center ) );
+ rSet.Put( SfxBoolItem( SID_GLUE_HORZALIGN_LEFT, nHorz == sdr::glue::GluePoint::Alignment_Minimum ) );
+ rSet.Put( SfxBoolItem( SID_GLUE_HORZALIGN_RIGHT, nHorz == sdr::glue::GluePoint::Alignment_Maximum ) );
// Vertikale Ausrichtung
- const sdr::glue::Point::Alignment nVert(mpDrawView->GetMarkedGluePointsAlign(true));
+ const sdr::glue::GluePoint::Alignment nVert(mpDrawView->GetMarkedGluePointsAlign(true));
- rSet.Put( SfxBoolItem( SID_GLUE_VERTALIGN_CENTER, nVert == sdr::glue::Point::Alignment_Center ) );
- rSet.Put( SfxBoolItem( SID_GLUE_VERTALIGN_TOP, nVert == sdr::glue::Point::Alignment_Minimum ) );
- rSet.Put( SfxBoolItem( SID_GLUE_VERTALIGN_BOTTOM, nVert == sdr::glue::Point::Alignment_Maximum ) );
+ rSet.Put( SfxBoolItem( SID_GLUE_VERTALIGN_CENTER, nVert == sdr::glue::GluePoint::Alignment_Center ) );
+ rSet.Put( SfxBoolItem( SID_GLUE_VERTALIGN_TOP, nVert == sdr::glue::GluePoint::Alignment_Minimum ) );
+ rSet.Put( SfxBoolItem( SID_GLUE_VERTALIGN_BOTTOM, nVert == sdr::glue::GluePoint::Alignment_Maximum ) );
}
// Punkt einfuegen
@@ -478,25 +478,25 @@ void DrawViewShell::GetMenuState( SfxIte
// Autrittsrichtung
// Links
- eState = mpDrawView->IsMarkedGluePointsEscDir( sdr::glue::Point::ESCAPE_DIRECTION_LEFT );
+ eState = mpDrawView->IsMarkedGluePointsEscDir( sdr::glue::GluePoint::ESCAPE_DIRECTION_LEFT );
if( eState == STATE_DONTKNOW )
rSet.InvalidateItem( SID_GLUE_ESCDIR_LEFT );
else
rSet.Put( SfxBoolItem( SID_GLUE_ESCDIR_LEFT, eState == STATE_CHECK ) );
// Rechts
- eState = mpDrawView->IsMarkedGluePointsEscDir( sdr::glue::Point::ESCAPE_DIRECTION_RIGHT );
+ eState = mpDrawView->IsMarkedGluePointsEscDir( sdr::glue::GluePoint::ESCAPE_DIRECTION_RIGHT );
if( eState == STATE_DONTKNOW )
rSet.InvalidateItem( SID_GLUE_ESCDIR_RIGHT );
else
rSet.Put( SfxBoolItem( SID_GLUE_ESCDIR_RIGHT, eState == STATE_CHECK ) );
// Oben
- eState = mpDrawView->IsMarkedGluePointsEscDir( sdr::glue::Point::ESCAPE_DIRECTION_TOP );
+ eState = mpDrawView->IsMarkedGluePointsEscDir( sdr::glue::GluePoint::ESCAPE_DIRECTION_TOP );
if( eState == STATE_DONTKNOW )
rSet.InvalidateItem( SID_GLUE_ESCDIR_TOP );
else
rSet.Put( SfxBoolItem( SID_GLUE_ESCDIR_TOP, eState == STATE_CHECK ) );
// Unten
- eState = mpDrawView->IsMarkedGluePointsEscDir( sdr::glue::Point::ESCAPE_DIRECTION_BOTTOM );
+ eState = mpDrawView->IsMarkedGluePointsEscDir( sdr::glue::GluePoint::ESCAPE_DIRECTION_BOTTOM );
if( eState == STATE_DONTKNOW )
rSet.InvalidateItem( SID_GLUE_ESCDIR_BOTTOM );
else
Modified: openoffice/branches/alg/aw080/main/sd/source/ui/view/sdview3.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sd/source/ui/view/sdview3.cxx?rev=1533203&r1=1533202&r2=1533203&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sd/source/ui/view/sdview3.cxx (original)
+++ openoffice/branches/alg/aw080/main/sd/source/ui/view/sdview3.cxx Thu Oct 17 18:36:03 2013
@@ -547,10 +547,11 @@ bool View::InsertData( const Transferabl
else
{
// set position of connection point of original connected object
- const sdr::glue::List* pGlueList = pConnObj->GetGluePointList(false);
- if(pGlueList)
+ const sdr::glue::GluePointProvider& rProvider = pConnObj->GetGluePointProvider();
+
+ if(rProvider.hasUserGluePoints())
{
- const sdr::glue::Point* pCandidate = pGlueList->findByID(rConn0.GetConnectorId());
+ const sdr::glue::GluePoint* pCandidate = rProvider.findUserGluePointByID(rConn0.GetConnectorId());
if(pCandidate)
{
@@ -558,17 +559,6 @@ bool View::InsertData( const Transferabl
pCloneEdge->SetTailPoint(false, aPosition + aVector);
}
-
- // TTTT:GLUE
- //sal_uInt32 nInd = pGlueList->FindGluePoint(rConn0.GetConnectorId());
- //
- //if(SDRGLUEPOINT_NOTFOUND != nInd)
- //{
- // const sdr::glue::Point& rGluePoint = (*pGlueList)[nInd];
- // basegfx::B2DPoint aPosition = rGluePoint.GetAbsolutePos(sdr::legacy::GetSnapRange(*pConnObj));
- // aPosition += aVector;
- // pCloneEdge->SetTailPoint(false, aPosition);
- //}
}
}
}
@@ -588,10 +578,11 @@ bool View::InsertData( const Transferabl
else
{
// set position of connection point of original connected object
- const sdr::glue::List* pGlueList = pConnObj->GetGluePointList(false);
- if(pGlueList)
+ const sdr::glue::GluePointProvider& rProvider = pConnObj->GetGluePointProvider();
+
+ if(rProvider.hasUserGluePoints())
{
- const sdr::glue::Point* pCandidate = pGlueList->findByID(rConn1.GetConnectorId());
+ const sdr::glue::GluePoint* pCandidate = rProvider.findUserGluePointByID(rConn1.GetConnectorId());
if(pCandidate)
{
@@ -599,17 +590,6 @@ bool View::InsertData( const Transferabl
pCloneEdge->SetTailPoint(true, aPosition + aVector);
}
-
- // TTTT:GLUE
- //sal_uInt32 nInd = pGlueList->FindGluePoint(rConn1.GetConnectorId());
- //
- //if(SDRGLUEPOINT_NOTFOUND != nInd)
- //{
- // const sdr::glue::Point& rGluePoint = (*pGlueList)[nInd];
- // basegfx::B2DPoint aPosition = rGluePoint.GetAbsolutePos(sdr::legacy::GetSnapRange(*pConnObj));
- // aPosition += aVector;
- // pCloneEdge->SetTailPoint(true, aPosition);
- //}
}
}
}
Modified: openoffice/branches/alg/aw080/main/svx/Library_svxcore.mk
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/svx/Library_svxcore.mk?rev=1533203&r1=1533202&r2=1533203&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/svx/Library_svxcore.mk (original)
+++ openoffice/branches/alg/aw080/main/svx/Library_svxcore.mk Thu Oct 17 18:36:03 2013
@@ -304,7 +304,6 @@ $(eval $(call gb_Library_add_exception_o
svx/source/svdraw/sdrpagewindow \
svx/source/svdraw/sdrobjecttools \
svx/source/svdraw/sdrpaintwindow \
- svx/source/svdraw/sdrglue \
svx/source/svdraw/selectioncontroller \
svx/source/svdraw/svdattr \
svx/source/svdraw/svdcrtv \
Modified: openoffice/branches/alg/aw080/main/svx/Package_inc.mk
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/svx/Package_inc.mk?rev=1533203&r1=1533202&r2=1533203&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/svx/Package_inc.mk (original)
+++ openoffice/branches/alg/aw080/main/svx/Package_inc.mk Thu Oct 17 18:36:03 2013
@@ -135,6 +135,7 @@ $(eval $(call gb_Package_add_file,svx_in
$(eval $(call gb_Package_add_file,svx_inc,inc/svx/globl3d.hxx,svx/globl3d.hxx))
$(eval $(call gb_Package_add_file,svx_inc,inc/svx/globlmn.hrc,globlmn_tmpl.hrc))
$(eval $(call gb_Package_add_file,svx_inc,inc/svx/grafctrl.hxx,svx/grafctrl.hxx))
+$(eval $(call gb_Package_add_file,svx_inc,inc/svx/gluepoint.hxx,svx/gluepoint.hxx))
$(eval $(call gb_Package_add_file,svx_inc,inc/svx/graphctl.hxx,svx/graphctl.hxx))
$(eval $(call gb_Package_add_file,svx_inc,inc/svx/grfcrop.hxx,svx/grfcrop.hxx))
$(eval $(call gb_Package_add_file,svx_inc,inc/svx/grfflt.hxx,svx/grfflt.hxx))
@@ -315,7 +316,6 @@ $(eval $(call gb_Package_add_file,svx_in
$(eval $(call gb_Package_add_file,svx_inc,inc/svx/sdrobjectfilter.hxx,svx/sdrobjectfilter.hxx))
$(eval $(call gb_Package_add_file,svx_inc,inc/svx/sdrpagewindow.hxx,svx/sdrpagewindow.hxx))
$(eval $(call gb_Package_add_file,svx_inc,inc/svx/sdrpaintwindow.hxx,svx/sdrpaintwindow.hxx))
-$(eval $(call gb_Package_add_file,svx_inc,inc/svx/sdrglue.hxx,svx/sdrglue.hxx))
$(eval $(call gb_Package_add_file,svx_inc,inc/svx/sdrundomanager.hxx,svx/sdrundomanager.hxx))
$(eval $(call gb_Package_add_file,svx_inc,inc/svx/sdtaaitm.hxx,svx/sdtaaitm.hxx))
$(eval $(call gb_Package_add_file,svx_inc,inc/svx/sdtaditm.hxx,svx/sdtaditm.hxx))
Modified: openoffice/branches/alg/aw080/main/svx/inc/svx/gluepoint.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/svx/inc/svx/gluepoint.hxx?rev=1533203&r1=1533202&r2=1533203&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/svx/inc/svx/gluepoint.hxx (original)
+++ openoffice/branches/alg/aw080/main/svx/inc/svx/gluepoint.hxx Thu Oct 17 18:36:03 2013
@@ -22,111 +22,293 @@
#ifndef _GLUEPOINT_HXX
#define _GLUEPOINT_HXX
-#include <sal/types.h>
#include <basegfx/point/b2dpoint.hxx>
-#include <com/sun/star/drawing/Alignment.hpp>
-#include <com/sun/star/drawing/EscapeDirection.hpp>
+#include <basegfx/vector/b2dvector.hxx>
+#include "svx/svxdllapi.h"
+#include <com/sun/star/drawing/GluePoint2.hpp>
+#include <set>
+#include <vector>
////////////////////////////////////////////////////////////////////////////////////////////////////
namespace sdr
{
- namespace gluepoint
- {
- enum GluePointType
- {
- GLUEPOINTTYPE_AUTO,
- GLUEPOINTTYPE_EDGE,
- GLUEPOINTTYPE_USER
- };
-
- class GluePoint
+ namespace glue
+ {
+ // The GluePoint class describes possible GluePoints for objects which support
+ // a GluePointProvider (see below). GluePoints are principally in unit coordinates
+ // so that they do not have to be transformed with the object they belong to.
+ // Their coordinateas will always be truncated to the unit range (0, 0, 1, 1)
+ // when used, so being always inside that range and thus cannot leave the
+ // object. Internally, values outside that range are used to model GluePoint
+ // states when not relative and Alignment is set to keep that alignment alive
+ // even when the positions are moved outside the object
+ class SVX_DLLPUBLIC GluePoint
{
+ public:
+ // defines for GluePoint alignment (see members meHorizontalAlignment,
+ // meVerticalAlignment)
+ enum Alignment
+ {
+ Alignment_Minimum,
+ Alignment_Center,
+ Alignment_Maximum
+ };
+
+ // defines for GluePoint escape direction (meEscapeDirections). These
+ // may be or-ed together to define all allowed escape directions from
+ // which the layouter may choose the best possible.
+ // Or-ing all allowed values is from the meaning identical to ESCAPE_DIRECTION_SMART.
+ static const sal_uInt16 ESCAPE_DIRECTION_SMART = 0;
+ static const sal_uInt16 ESCAPE_DIRECTION_LEFT = 1;
+ static const sal_uInt16 ESCAPE_DIRECTION_RIGHT = 2;
+ static const sal_uInt16 ESCAPE_DIRECTION_TOP = 4;
+ static const sal_uInt16 ESCAPE_DIRECTION_BOTTOM = 8;
+
private:
- basegfx::B2DPoint maPosition;
- sal_uInt32 mnIdentifier;
- GluePointType meType;
- com::sun::star::drawing::Alignment meAlignment;
- com::sun::star::drawing::EscapeDirection meEscapeDirection;
+ // allow class GluePointProvider access to setID() in setIdAtGluePoint()
+ friend class GluePointProvider;
+
+ // position in unit coordinates [0.0 .. 1.0] in X,Y
+ // may be internally outside the unit range when the GluePoint is not relative
+ basegfx::B2DPoint maUnitPosition;
+
+ // allowed escape directions, default is ESCAPE_DIRECTION_SMART
+ sal_uInt16 meEscapeDirections;
+
+ // horizontal and vertical alignments. If != Alignment_None the
+ // position will change as distance from the defined anchor position.
+ Alignment meHorizontalAlignment;
+ Alignment meVerticalAlignment;
+
+ // unique identifier ID. All GluePoints in one list need unique identifiers
+ // and will be sorted by these. This is administrated by the
+ // GluePointProvider class
+ sal_uInt32 maID;
+
+ /// bitfield
+ // if true, position is just relative to unit range (default)
+ // if false, position is also relative, but additionally controlled
+ // by the Alignment settings when the object it belongs to is scaled
+ bool mbRelative : 1;
+
+ // needed to separate user-defined GluePoints from the ones from
+ // CustomShapes (custom-defined GluePoints)
+ bool mbUserDefined : 1;
+
+ // write access to ID is limited to GluePointProvider class only
+ void setID(sal_uInt32 nNew) { maID = nNew; }
+ // write access to scale adaption to GluePointProvider class only
+ void adaptToChangedScale(const basegfx::B2DVector& rOldScale, const basegfx::B2DVector& rNewScale);
+
+ protected:
public:
- GluePoint()
- : maPosition(0.0, 0.0),
- mnIdentifier(0),
- meType(GLUEPOINTTYPE_AUTO),
- meAlignment(com::sun::star::drawing::Alignment_TOP_LEFT),
- meEscapeDirection(com::sun::star::drawing::EscapeDirection_SMART)
+ GluePoint(
+ const basegfx::B2DPoint& rUnitPosition = basegfx::B2DPoint(0.5, 0.5),
+ sal_uInt16 nEscapeDirections = ESCAPE_DIRECTION_SMART,
+ Alignment eHorizontalAlignment = Alignment_Center,
+ Alignment eVerticalAlignment = Alignment_Center,
+ bool bRelative = true,
+ bool bUserDefined = true);
+
+ // get/set UnitPosition. Always in [0.0 .. 1.0] in Y and Y, will be truncated at set
+ // and truncated at get
+ basegfx::B2DPoint getUnitPosition() const;
+ void setUnitPosition(const basegfx::B2DPoint& rNew);
+
+ // get/set allowed EscapeDirections
+ sal_uInt16 getEscapeDirections() const { return meEscapeDirections; }
+ void setEscapeDirections(sal_uInt16 nNew) { meEscapeDirections = nNew; }
+
+ // get/set HorizontalAlignment
+ Alignment getHorizontalAlignment() const { return meHorizontalAlignment; }
+ void setHorizontalAlignment(Alignment eNew) { meHorizontalAlignment = eNew; }
+
+ // get/set VerticalAlignment
+ Alignment getVerticalAlignment() const { return meVerticalAlignment; }
+ void setVerticalAlignment(Alignment eNew) { meVerticalAlignment = eNew; }
+
+ // acess to relative flag. When setting to true the UnitPostion will be
+ // internally truncated since the non-relative modes allow values outside
+ // the unit range
+ bool getRelative() const { return mbRelative; }
+ void setRelative(bool bNew);
+
+ // access to UserDefined (read only, define at construction time)
+ bool getUserDefined() const { return mbUserDefined; }
+
+ // read access to ID (write is private and limitied to list class)
+ sal_uInt32 getID() const { return maID; }
+
+ // needed UNO API converters; both rely on the correct absolute scale given since the UNO API
+ // definition partially uses the sizes of the object the GluePoint belongs to. The converter to
+ // sdr::glue::GluePoint is implemented as constructor
+ com::sun::star::drawing::GluePoint2 convertToGluePoint2(
+ const basegfx::B2DVector& rAbsoluteScale) const;
+ GluePoint(
+ const com::sun::star::drawing::GluePoint2& rGluePoint2,
+ const basegfx::B2DVector& rAbsoluteScale);
+ };
+ } // end of namespace glue
+} // end of namespace sdr
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace glue
+ {
+ // typedef for GluePointVector
+ typedef ::std::vector< GluePoint* > GluePointVector;
+
+ // This is the basic GluePoint providing interface; an instance of this class is
+ // provided by objects supporting GluePoints (e.g. SdrObjects, using
+ // GetGluePointProvider()).
+ // There are two basic kinds of GluePoints: AutoGluePoints and UserGluePoints.
+ //
+ // AutoGluePoints are constant GluePoints offered by the object, e.g. the standard
+ // left/right/top/back.
+ //
+ // UserGluePoints may be freely added/edited by the user, but there may also be
+ // implementations which do not support UserGluePoints at all (SdrEdgeObj). There may
+ // also be implementations which add 'fixed' UserGluePoints for which delete/edit
+ // will be ignored, e.g. standard GluePoints added from a CustomShape, but not the
+ // user. These will return false on getUserDefined().
+ //
+ // This basic implementation implements:
+ // - standard AutoGluePoints (left/right/top/back)
+ // - no UserGluePoints
+
+ class SVX_DLLPUBLIC GluePointProvider
+ {
+ private:
+ protected:
+ // copy constructor and assignment are protected, use Clone() to create copies
+ // with content
+ GluePointProvider(const GluePointProvider& rCandidate);
+ virtual GluePointProvider& operator=(const GluePointProvider& rCandidate);
+
+ // internal access to GluePoint::setID; this is internal functionality and
+ // only the basic implementations of GluePointProvider::addUserGluePoint should use it
+ void setIdAtGluePoint(GluePoint& rGluePoint, sal_uInt32 nNew)
{
+ rGluePoint.setID(nNew);
}
- GluePoint(
- const basegfx::B2DPoint& rPosition,
- sal_uInt32 nIdentifier,
- GluePointType eType,
- com::sun::star::drawing::Alignment eAlignment = com::sun::star::drawing::Alignment_CENTER,
- com::sun::star::drawing::EscapeDirection eEscapeDirection = com::sun::star::drawing::EscapeDirection_SMART)
- : maPosition(rPosition),
- mnIdentifier(nIdentifier),
- meType(eType),
- meAlignment(eAlignment),
- meEscapeDirection(eEscapeDirection)
+ // internal access to GluePoint::adaptToChangedScale; this is internal functionality and
+ // only the basic implementations of GluePointProvider::adaptUserGluePointsToChangedScale
+ // should use it
+ void adaptGluePointToChangedScale(GluePoint& rGluePoint, const basegfx::B2DVector& rOldScale, const basegfx::B2DVector& rNewScale)
{
+ rGluePoint.adaptToChangedScale(rOldScale, rNewScale);
}
- const basegfx::B2DPoint& getPosition() const { return maPosition; }
- sal_uInt32 getIdentifier() const { return mnIdentifier; }
- GluePointType getType() const { return meType; }
- com::sun::star::drawing::Alignment getAlignment() const { return meAlignment; }
- com::sun::star::drawing::EscapeDirection getEscapeDirection() const { return meEscapeDirection; }
+ public:
+ // construction, destruction
+ GluePointProvider();
+ virtual ~GluePointProvider();
+
+ // copying
+ virtual GluePointProvider* Clone() const;
+
+ // AutoGluePoint read access (read only, the GluePoints returned are
+ // usually created on the fly). The count is currently fixed to 4,
+ // mainly because the UNO API implementations rely on this
+ virtual sal_uInt32 getAutoGluePointCount() const;
+ virtual GluePoint getAutoGluePointByIndex(sal_uInt32 nIndex) const;
+
+ // flag if UserGluePoints are allowed (e.g. not for SdrEdgeObj), needs
+ // to be checked before calling addUserGluePoint
+ virtual bool allowsUserGluePoints() const;
+
+ // add new GluePoint, it gets internally a new ID assigned and a
+ // reference to the new instance (copied to list) is returned. It
+ // will assert when already added or could not be added. To check
+ // if it was added, compare the address of the return value with
+ // the address of rNew
+ virtual GluePoint& addUserGluePoint(GluePoint& rNew);
+
+ // remove GluePoint (will assert if it was not added)
+ virtual void removeUserGluePoint(const GluePoint& rNew);
+
+ // check on content
+ virtual bool hasUserGluePoints() const;
+
+ // find UserGluePoint by ID
+ virtual GluePoint* findUserGluePointByID(sal_uInt32 nID) const;
+
+ // get vector of UserGluePoints (pointers to the real points). This
+ // makes accesses easier, but should only be used as temporary data
+ virtual const GluePointVector getUserGluePointVector() const;
+
+ // adapt UserGluePoints to changed absolute scale, e.g. when not relative and alignments have to be addressed
+ virtual void adaptUserGluePointsToChangedScale(const basegfx::B2DVector& rOldScale, const basegfx::B2DVector& rNewScale);
};
- } // end of namespace gluepoint
+ } // end of namespace glue
} // end of namespace sdr
////////////////////////////////////////////////////////////////////////////////////////////////////
namespace sdr
{
- namespace gluepoint
- {
- class GluePointProvider
+ namespace glue
+ {
+ // operator for ::std::set to sort GluePoints by ID
+ struct GluePointComparator
+ {
+ bool operator()(const GluePoint& rA, const GluePoint& rB) const;
+ };
+
+ // typedef for GluePoint set
+ typedef ::std::set< GluePoint, GluePointComparator > GluePointSet;
+
+ // This derivation of GluePointProvider extends the standard one to
+ // support basic UserGluePoints in all aspects (new/edit/delete)
+
+ class SVX_DLLPUBLIC StandardGluePointProvider : public GluePointProvider
{
+ private:
+ // the GluePoint set for UserGluePoints. Use a set sorted by ID
+ // to be able to implement findUserGluePointByID effectively
+ GluePointSet maGluePointSet;
+
+ protected:
+ StandardGluePointProvider(const StandardGluePointProvider& rCandidate);
+ virtual GluePointProvider& operator=(const GluePointProvider& rCandidate);
+
public:
// construction, destruction, copying
- GluePointProvider();
- virtual ~GluePointProvider();
- GluePointProvider(const GluePointProvider& rCandidate);
- virtual GluePointProvider& operator=(const GluePointProvider& rCandidate);
+ StandardGluePointProvider();
+ virtual ~StandardGluePointProvider();
- // Clone() operator calls the local copy constructor
- virtual GluePointProvider& Clone() const;
+ // copying
+ virtual GluePointProvider* Clone() const;
- // AutoGluePoint access
- virtual sal_uInt32 getAutoGluePointCount() const;
- virtual GluePoint getAutoGluePointByIndex(sal_uInt32 nIndex) const;
+ // flag if UserGluePoints are allowed (e.g. not for SdrEdgeObj)
+ virtual bool allowsUserGluePoints() const;
+
+ // add new GluePoint, it gets a new ID assigned and a reference to the
+ // new instance (copied to list) is returned. It will assert when
+ // already added
+ virtual GluePoint& addUserGluePoint(GluePoint& rNew);
+
+ // remove GluePoint (will assert if it was not added)
+ virtual void removeUserGluePoint(const GluePoint& rNew);
+
+ // check on content
+ virtual bool hasUserGluePoints() const;
+
+ // find UserGluePoint by ID
+ virtual GluePoint* findUserGluePointByID(sal_uInt32 nID) const;
+
+ // get vector of UserGluePoints (pointers to the real points)
+ virtual const GluePointVector getUserGluePointVector() const;
- // EdgeGluePoint access
- virtual sal_uInt32 getEdgeGluePointCount() const;
- virtual GluePoint getEdgeGluePointByIndex(sal_uInt32 nIndex) const;
-
- // UserGluePoint access
- virtual sal_uInt32 getUserGluePointCount() const;
- virtual GluePoint getUserGluePointByIndex(sal_uInt32 nIndex) const;
-
- // bundled GluePoint access
- sal_uInt32 getGluePointCount() const;
- GluePoint getGluePointByIndex(sal_uInt32 nIndex) const;
-
- // UserGluePoint manipulation
- virtual bool areUserGluePointsAllowed() const;
- virtual GluePoint addUserGluePoint(
- const basegfx::B2DPoint& rPosition,
- GluePointType eType,
- com::sun::star::drawing::Alignment eAlignment,
- com::sun::star::drawing::EscapeDirection eEscapeDirection);
- virtual void removeUserGluePoint(const GluePoint& rCandidate);
- virtual bool existsUserGluePoint(const GluePoint& rCandidate) const;
+ // adapt UserGluePoints to changed absolute scale, e.g. when not relative and alignments have to be addressed
+ virtual void adaptUserGluePointsToChangedScale(const basegfx::B2DVector& rOldScale, const basegfx::B2DVector& rNewScale);
};
- } // end of namespace gluepoint
+ } // end of namespace glue
} // end of namespace sdr
////////////////////////////////////////////////////////////////////////////////////////////////////
Modified: openoffice/branches/alg/aw080/main/svx/inc/svx/svdglev.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/svx/inc/svx/svdglev.hxx?rev=1533203&r1=1533202&r2=1533203&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/svx/inc/svx/svdglev.hxx (original)
+++ openoffice/branches/alg/aw080/main/svx/inc/svx/svdglev.hxx Thu Oct 17 18:36:03 2013
@@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
// predefines
-class sdr::glue::Point;
+class sdr::glue::GluePoint;
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -37,8 +37,7 @@ class SVX_DLLPUBLIC SdrGlueEditView: pub
private:
// Markierte Klebepunkte kopieren und anstelle der alten markieren
void ImpCopyMarkedGluePoints();
- typedef void (*PGlueDoFunc)(sdr::glue::Point&, const SdrObject* pObj, const void*, const void*, const void*, const void*, const void*);
- // TTTT:GLUE typedef void (*PGlueTrFunc)(basegfx::B2DPoint&, const void*, const void*, const void*, const void*, const void*);
+ typedef void (*PGlueDoFunc)(sdr::glue::GluePoint&, const SdrObject* pObj, const void*, const void*, const void*, const void*, const void*);
void ImpDoMarkedGluePoints(PGlueDoFunc pDoFunc, bool bConst, const void* p1 = 0, const void* p2 = 0, const void* p3 = 0, const void* p4 = 0, const void* p5 = 0);
void ImpTransformMarkedGluePoints(const basegfx::B2DHomMatrix& rTransform);
@@ -73,8 +72,8 @@ public:
// SDRVERTALIGN_TOP
// SDRVERTALIGN_BOTTOM
// SDRVERTALIGN_DONTCARE (nur bei Get())
- sdr::glue::Point::Alignment GetMarkedGluePointsAlign(bool bVert) const;
- void SetMarkedGluePointsAlign(bool bVert, sdr::glue::Point::Alignment nAlign);
+ sdr::glue::GluePoint::Alignment GetMarkedGluePointsAlign(bool bVert) const;
+ void SetMarkedGluePointsAlign(bool bVert, sdr::glue::GluePoint::Alignment nAlign);
bool IsSetMarkedGluePointsAlignPossible() const { return !IsReadOnly() && areGluesSelected(); }
// Alle merkierten Klebepunkte entfernen
@@ -82,11 +81,6 @@ public:
// central GluePoint transformator
void TransformMarkedGluePoints(const basegfx::B2DHomMatrix& rTransformation, const SdrRepeatFunc aRepFunc, bool bCopy = false);
-
- // TTTT:GLUE
- //void MoveMarkedGluePoints(const basegfx::B2DVector& rDelta, bool bCopy = false);
- //void ResizeMarkedGluePoints(const basegfx::B2DPoint& rRef, const basegfx::B2DVector& rScale, bool bCopy = false);
- //void RotateMarkedGluePoints(const basegfx::B2DPoint& rRef, double fAngle, bool bCopy = false);
};
#endif //_SVDGLEV_HXX
Modified: openoffice/branches/alg/aw080/main/svx/inc/svx/svdoashp.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/svx/inc/svx/svdoashp.hxx?rev=1533203&r1=1533202&r2=1533203&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/svx/inc/svx/svdoashp.hxx (original)
+++ openoffice/branches/alg/aw080/main/svx/inc/svx/svdoashp.hxx Thu Oct 17 18:36:03 2013
@@ -90,11 +90,11 @@ private:
// double fObjectRotation;
protected:
- virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact();
+ virtual sdr::properties::BaseProperties* CreateObjectSpecificProperties();
+ virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact();
+ virtual sdr::glue::GluePointProvider* CreateObjectSpecificGluePointProvider();
public:
- virtual sdr::properties::BaseProperties* CreateObjectSpecificProperties();
-
// to allow sdr::properties::CustomShapeProperties access
friend class sdr::properties::CustomShapeProperties;
@@ -112,9 +112,6 @@ public:
// #i37011# centralize throw-away of render geometry
void InvalidateRenderGeometry();
- // TTTT:GLUE #i38892#
- // void ImpCheckCustomGluePointsAreAdded();
-
// returns the new text range that corresponds to the current logic range. The return value can be empty if nothing changed.
basegfx::B2DRange ImpCalculateTextFrame();
@@ -216,9 +213,6 @@ public:
virtual void SaveGeoData(SdrObjGeoData &rGeo) const;
virtual void RestGeoData(const SdrObjGeoData &rGeo);
- virtual sdr::glue::List* GetGluePointList(bool bForce) const;
- // TTTT:GLUE virtual sdr::glue::List* ForceGluePointList();
-
virtual void AddToHdlList(SdrHdlList& rHdlList) const;
// #i33136#
Modified: openoffice/branches/alg/aw080/main/svx/inc/svx/svdobj.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/svx/inc/svx/svdobj.hxx?rev=1533203&r1=1533202&r2=1533203&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/svx/inc/svx/svdobj.hxx (original)
+++ openoffice/branches/alg/aw080/main/svx/inc/svx/svdobj.hxx Thu Oct 17 18:36:03 2013
@@ -32,7 +32,6 @@
#include <vcl/timer.hxx>
#include <svx/svdsob.hxx>
#include <svx/svdtypes.hxx>
-#include <svx/sdrglue.hxx>
#include <svx/xdash.hxx>
#include <svx/xpoly.hxx>
#include <svx/xenum.hxx>
@@ -45,6 +44,7 @@
#include <svx/svdpool.hxx>
#include <boost/utility.hpp>
#include <svl/poolitem.hxx>
+#include <svx/gluepoint.hxx>
//////////////////////////////////////////////////////////////////////////////
// predefines
@@ -210,20 +210,20 @@ public:
class SVX_DLLPUBLIC SdrObjGeoData
{
public:
- basegfx::B2DHomMatrix maSdrObjectTransformation;
- basegfx::B2DPoint maObjectAnchor;
- sdr::glue::List* mpGPL;
- SdrLayerID mnLayerID;
+ basegfx::B2DHomMatrix maSdrObjectTransformation;
+ basegfx::B2DPoint maObjectAnchor;
+ sdr::glue::GluePointProvider* mpGluePointProvider;
+ SdrLayerID mnLayerID;
/// bitfield
- bool mbMoveProtect : 1;
- bool mbSizeProtect : 1;
- bool mbNoPrint : 1;
- bool mbVisible : 1;
+ bool mbMoveProtect : 1;
+ bool mbSizeProtect : 1;
+ bool mbNoPrint : 1;
+ bool mbVisible : 1;
public:
- SdrObjGeoData();
- virtual ~SdrObjGeoData();
+ SdrObjGeoData();
+ virtual ~SdrObjGeoData();
};
//////////////////////////////////////////////////////////////////////////////
@@ -232,7 +232,6 @@ class SdrObjPlusData
{
public:
SdrObjUserDataList* mpUserDataList; // applikationsspeziefische Daten
- sdr::glue::List* mpGluePoints; // Klebepunkte zum Ankleben von Objektverbindern
// object name, title and description
String maObjName;
@@ -352,11 +351,11 @@ private:
// on-demand members
sdr::properties::BaseProperties* mpProperties;
sdr::contact::ViewContact* mpViewContact;
- sdr::gluepoint::GluePointProvider* mpGluePointProvider;
+ sdr::glue::GluePointProvider* mpGluePointProvider;
- virtual sdr::properties::BaseProperties* CreateObjectSpecificProperties();
- virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact();
- virtual sdr::gluepoint::GluePointProvider* CreateObjectSpecificGluePointProvider();
+ virtual sdr::properties::BaseProperties* CreateObjectSpecificProperties();
+ virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact();
+ virtual sdr::glue::GluePointProvider* CreateObjectSpecificGluePointProvider();
/** only for internal use! */
SvxShape* getSvxShape() const;
@@ -480,7 +479,7 @@ public:
// acces to on-demand members
virtual sdr::properties::BaseProperties& GetProperties() const;
sdr::contact::ViewContact& GetViewContact() const;
- sdr::gluepoint::GluePointProvider& GetGluePointProvider() const;
+ sdr::glue::GluePointProvider& GetGluePointProvider() const;
// DrawContact support: Methods for handling Object changes
void ActionChanged() const;
@@ -703,34 +702,6 @@ public:
virtual XubString GetMacroPopupComment(const SdrObjMacroHitRec& rRec) const;
bool IsMacroHit(const SdrObjMacroHitRec& rRec) const { return CheckMacroHit(rRec)!=NULL; }
- // Konnektoren. (siehe auch Dokumentation in SvdoEdge.HXX, SdrEdgeObj
- // sowie SvdGlue.HXX und SvdGlEV.HXX)
- // Es gibt Knoten und Kanten. Eine Kante kann theoretisch auch Knoten
- // sein, das ist jedoch in dieser Version noch nicht implementiert.
- // Ein Knoten hat eine Anzahl von Klebepunkten, wo Kanten angeklebt
- // werden koennen.
- // Eine Kante kann
- // - ohne Verbindungen sein
- // - an einem Ende auf der Wiese stehen und am anderen Ende an
- // genau einem Knoten gebunden sein
- // - an beiden Enden mit jeweils genau einem Knoten verbunden sein.
- // Die Kante ist Listener bei seinen bis zu 2 Knoten.
- // Wird der Knoten verschoben oder Resized, folgen alle angebundenen
- // Kanten. Ebenso bei SetGluePoint()... am Knoten.
- // Beim Verschieben/Resizen der Kante wird dagegen die Verbindung
- // geloesst.
-
- // Automatische Klebepunkte:
- // je 4 Scheitelpunkt- und Eckpositionen muss ein Knotenobjekt liefern
- // i.d.R. 0=oben, 1=rechts, 2=unten, 3=links
- virtual sdr::glue::Point GetVertexGluePoint(sal_uInt32 nNum) const;
-
- // Liste aller Klebepunkte. Kann NULL sein.
- virtual sdr::glue::List* GetGluePointList(bool bForce) const;
-
- // Nach veraendern der GluePointList muss man am Obj SendRepaintBroadcast rufen!
- // TTTT:GLUE virtual sdr::glue::List* ForceGluePointList();
-
/** sets the writing mode of the object's context
Objects which itself do not support different writing modes will ignore this call.
Modified: openoffice/branches/alg/aw080/main/svx/inc/svx/svdoedge.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/svx/inc/svx/svdoedge.hxx?rev=1533203&r1=1533202&r2=1533203&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/svx/inc/svx/svdoedge.hxx (original)
+++ openoffice/branches/alg/aw080/main/svx/inc/svx/svdoedge.hxx Thu Oct 17 18:36:03 2013
@@ -25,7 +25,6 @@
#define _SVDOEDGE_HXX
#include <svx/svdotext.hxx>
-#include <svx/sdrglue.hxx>
#include <svx/svxdllapi.h>
#include <basegfx/polygon/b2dpolygon.hxx>
@@ -49,7 +48,6 @@ private:
friend class SdrCreateView;
protected:
- // TTTT:GLUE basegfx::B2DPoint maObjOfs; // Wird beim Draggen eines Knotens gesetzt
SdrObject* mpConnectedSdrObject; // Referenziertes Objekt
sal_uInt16 mnConnectorId; // Konnektornummer
@@ -63,7 +61,7 @@ public:
SdrObjConnection() { ResetVars(); }
void ResetVars();
- bool TakeGluePoint(sdr::glue::Point& rGP/* TTTT:GLUE, bool bSetAbsolutePos*/) const;
+ bool TakeGluePoint(sdr::glue::GluePoint& rGP) const;
inline void SetBestConnection( bool rB ) { mbBestConnection = rB; };
inline void SetBestVertex( bool rB ) { mbBestVertex = rB; };
@@ -152,8 +150,9 @@ private:
friend class ImpEdgeHdl;
protected:
- virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact();
- virtual sdr::properties::BaseProperties* CreateObjectSpecificProperties();
+ virtual sdr::properties::BaseProperties* CreateObjectSpecificProperties();
+ virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact();
+ virtual sdr::glue::GluePointProvider* CreateObjectSpecificGluePointProvider();
SdrObjConnection maCon1; // Verbindungszustand des Linienanfangs
SdrObjConnection maCon2; // Verbindungszustand des Linienendes
@@ -212,9 +211,6 @@ public:
SdrObjConnection& GetConnection(bool bTail1) { return *(bTail1 ? &maCon1 : &maCon2); }
virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const;
virtual sal_uInt16 GetObjIdentifier() const;
- virtual sdr::glue::Point GetVertexGluePoint(sal_uInt32 nNum) const;
- virtual sdr::glue::List* GetGluePointList(bool bForce) const;
- // TTTT:GLUE virtual sdr::glue::List* ForceGluePointList();
// bTail1=true: Linienanfang, sonst LinienEnde
// pObj=NULL: Disconnect
Modified: openoffice/branches/alg/aw080/main/svx/inc/svx/svdview.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/svx/inc/svx/svdview.hxx?rev=1533203&r1=1533202&r2=1533203&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/svx/inc/svx/svdview.hxx (original)
+++ openoffice/branches/alg/aw080/main/svx/inc/svx/svdview.hxx Thu Oct 17 18:36:03 2013
@@ -284,7 +284,6 @@ public:
virtual void onAccessibilityOptionsChanged();
- // TTTT:HANDLE
void MoveHandleByVector(const SdrHdl& rHdl, const basegfx::B2DVector& rDistance, Window* pMakeVisibleWindow, SdrDragMethod* pOwnDragMethod);
};
Modified: openoffice/branches/alg/aw080/main/svx/source/customshapes/EnhancedCustomShape2d.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/svx/source/customshapes/EnhancedCustomShape2d.cxx?rev=1533203&r1=1533202&r2=1533203&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/svx/source/customshapes/EnhancedCustomShape2d.cxx (original)
+++ openoffice/branches/alg/aw080/main/svx/source/customshapes/EnhancedCustomShape2d.cxx Thu Oct 17 18:36:03 2013
@@ -2304,9 +2304,9 @@ void EnhancedCustomShape2d::ApplyGluePoi
if(nCount)
{
- sdr::glue::List* pList = pTarget->GetGluePointList(true);
+ sdr::glue::GluePointProvider& rProvider = pTarget->GetGluePointProvider();
- if(pList)
+ if(rProvider.allowsUserGluePoints())
{
// positions from GetPoint(seqGluePoints) are relative to absolute object size
const basegfx::B2DVector aObjectScale(
@@ -2318,36 +2318,21 @@ void EnhancedCustomShape2d::ApplyGluePoi
for(sal_uInt32 a(0); a < nCount; a++)
{
const basegfx::B2DPoint aPosition(GetPoint(seqGluePoints[a], sal_True, sal_True));
- const sdr::glue::Point aNew(
+
+ // caution: These custom-defined GluePoints are *not* UserDefined, set to false
+ sdr::glue::GluePoint aNew(
aPosition * aScaleToUnit,
- sdr::glue::Point::ESCAPE_DIRECTION_SMART,
- sdr::glue::Point::Alignment_Minimum,
- sdr::glue::Point::Alignment_Minimum);
+ sdr::glue::GluePoint::ESCAPE_DIRECTION_SMART,
+ sdr::glue::GluePoint::Alignment_Minimum,
+ sdr::glue::GluePoint::Alignment_Minimum,
+ true, // Relative
+ false); // UserDefined
- pList->add(aNew);
+ rProvider.addUserGluePoint(aNew);
}
}
}
}
-
- // TTTT:GLUE
- //if ( pObj && seqGluePoints.getLength() )
- //{
- // sal_uInt32 i, nCount = seqGluePoints.getLength();
- // for ( i = 0; i < nCount; i++ )
- // {
- // sdr::glue::Point aGluePoint;
- //
- // aGluePoint.SetPos( GetPoint( seqGluePoints[ i ], sal_True, sal_True ) );
- // aGluePoint.SetPercent( sal_False );
- //
- // aGluePoint.SetAlign( SDRVERTALIGN_TOP | SDRHORZALIGN_LEFT );
- // aGluePoint.setEscapeDirections( sdr::glue::Point::ESCAPE_DIRECTION_SMART );
- // sdr::glue::List* pList = pObj->GetGluePointList(true);
- // if( pList )
- // /* sal_uInt16 nId = */ pList->Insert( aGluePoint );
- // }
- //}
}
SdrObject* EnhancedCustomShape2d::CreateLineGeometry()
Modified: openoffice/branches/alg/aw080/main/svx/source/dialog/graphctl.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/svx/source/dialog/graphctl.cxx?rev=1533203&r1=1533202&r2=1533203&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/svx/source/dialog/graphctl.cxx (original)
+++ openoffice/branches/alg/aw080/main/svx/source/dialog/graphctl.cxx Thu Oct 17 18:36:03 2013
@@ -602,39 +602,6 @@ void GraphCtrl::KeyInput( const KeyEvent
{
// move handle with index nHandleIndex
pView->MoveHandleByVector(*pHdl, aMove, 0, 0);
-
- // TTTT:HANDLE
- //if(pHdl && !aMove.equalZero())
- //{
- // // now move the Handle
- // const basegfx::B2DPoint aStartPoint(pHdl->getPosition());
- // const basegfx::B2DPoint aEndPoint(aStartPoint + aMove);
- // const SdrDragStat& rDragStat = pView->GetDragStat();
- //
- // // start dragging
- // pView->BegDragObj(aStartPoint, pHdl, 0.0);
- //
- // if(pView->IsDragObj())
- // {
- // const bool bWasNoSnap(rDragStat.IsNoSnap());
- // const bool bWasSnapEnabled(pView->IsSnapEnabled());
- //
- // // switch snapping off
- // if(!bWasNoSnap)
- // ((SdrDragStat&)rDragStat).SetNoSnap(true);
- // if(bWasSnapEnabled)
- // pView->SetSnapEnabled(false);
- //
- // pView->MovAction(aEndPoint);
- // pView->EndDragObj();
- //
- // // restore snap
- // if(!bWasNoSnap)
- // ((SdrDragStat&)rDragStat).SetNoSnap(bWasNoSnap);
- // if(bWasSnapEnabled)
- // pView->SetSnapEnabled(bWasSnapEnabled);
- // }
- //}
}
bProc = true;
Modified: openoffice/branches/alg/aw080/main/svx/source/sdr/contact/viewcontactofsdrobj.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/svx/source/sdr/contact/viewcontactofsdrobj.cxx?rev=1533203&r1=1533202&r2=1533203&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/svx/source/sdr/contact/viewcontactofsdrobj.cxx (original)
+++ openoffice/branches/alg/aw080/main/svx/source/sdr/contact/viewcontactofsdrobj.cxx Thu Oct 17 18:36:03 2013
@@ -154,23 +154,22 @@ namespace sdr
drawinglayer::primitive2d::Primitive2DSequence ViewContactOfSdrObj::createGluePointPrimitive2DSequence() const
{
drawinglayer::primitive2d::Primitive2DSequence xRetval;
- const sdr::glue::List* pGluePointList = GetSdrObject().GetGluePointList(false);
+ const sdr::glue::GluePointProvider& rProvider = GetSdrObject().GetGluePointProvider();
- if(pGluePointList)
+ if(rProvider.hasUserGluePoints())
{
- const sdr::glue::PointVector aGluePoints(pGluePointList->getVector());
+ const sdr::glue::GluePointVector aGluePoints(rProvider.getUserGluePointVector());
const sal_uInt32 nCount(aGluePoints.size());
if(nCount)
{
- // TTTT:GLUE
// prepare primitives; positions are in unit coordinates
const basegfx::B2DHomMatrix& rTransformation = GetSdrObject().getSdrObjectTransformation();
std::vector< basegfx::B2DPoint > aPointVector;
for(sal_uInt32 a(0); a < nCount; a++)
{
- const sdr::glue::Point* pCandidate = aGluePoints[a];
+ const sdr::glue::GluePoint* pCandidate = aGluePoints[a];
if(pCandidate)
{
@@ -178,7 +177,7 @@ namespace sdr
}
else
{
- OSL_ENSURE(false, "sdr::glue::PointVector with empty entries (!)");
+ OSL_ENSURE(false, "sdr::glue::GluePointVector with empty entries (!)");
}
}