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/04 19:20:26 UTC

svn commit: r1529226 [1/4] - in /openoffice/branches/alg/aw080/main: basegfx/inc/basegfx/matrix/ basegfx/source/matrix/ filter/source/msfilter/ offapi/com/sun/star/drawing/ sd/inc/pch/ sd/source/ui/dlg/ sd/source/ui/func/ sd/source/ui/inc/ sd/source/ui...

Author: alg
Date: Fri Oct  4 17:20:25 2013
New Revision: 1529226

URL: http://svn.apache.org/r1529226
Log:
GluePoint reworks (all in unit coordinates), needs more checks

Added:
    openoffice/branches/alg/aw080/main/svx/inc/svx/sdrglue.hxx   (with props)
    openoffice/branches/alg/aw080/main/svx/inc/svx/sdrobjecttools.hxx   (with props)
    openoffice/branches/alg/aw080/main/svx/source/svdraw/sdrglue.cxx   (with props)
    openoffice/branches/alg/aw080/main/svx/source/svdraw/sdrobjecttools.cxx   (with props)
Removed:
    openoffice/branches/alg/aw080/main/svx/inc/svx/svdglue.hxx
    openoffice/branches/alg/aw080/main/svx/source/svdraw/svdglue.cxx
Modified:
    openoffice/branches/alg/aw080/main/basegfx/inc/basegfx/matrix/b2dhommatrixtools.hxx
    openoffice/branches/alg/aw080/main/basegfx/source/matrix/b2dhommatrixtools.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/offapi/com/sun/star/drawing/EscapeDirection.idl
    openoffice/branches/alg/aw080/main/sd/inc/pch/precompiled_sd.hxx
    openoffice/branches/alg/aw080/main/sd/source/ui/dlg/gluectrl.cxx
    openoffice/branches/alg/aw080/main/sd/source/ui/dlg/sdtreelb.cxx
    openoffice/branches/alg/aw080/main/sd/source/ui/func/fuediglu.cxx
    openoffice/branches/alg/aw080/main/sd/source/ui/inc/sdtreelb.hxx
    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/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/source/customshapes/EnhancedCustomShape2d.cxx
    openoffice/branches/alg/aw080/main/svx/source/sdr/contact/viewcontactofsdrobj.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/svdedtv1.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/svdpoev.cxx
    openoffice/branches/alg/aw080/main/svx/source/unodraw/gluepts.cxx
    openoffice/branches/alg/aw080/main/svx/source/unodraw/unoshap2.cxx

Modified: openoffice/branches/alg/aw080/main/basegfx/inc/basegfx/matrix/b2dhommatrixtools.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/basegfx/inc/basegfx/matrix/b2dhommatrixtools.hxx?rev=1529226&r1=1529225&r2=1529226&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/basegfx/inc/basegfx/matrix/b2dhommatrixtools.hxx (original)
+++ openoffice/branches/alg/aw080/main/basegfx/inc/basegfx/matrix/b2dhommatrixtools.hxx Fri Oct  4 17:20:25 2013
@@ -174,6 +174,13 @@ namespace basegfx
             const B2DHomMatrix& rSource,
             const B2DRange& rRange);
 
+        // eventually correct the scaling of the given matrix to be not zero. If the
+        // scaling is zero in X and/or Y, it gets corrected to the given default values
+        B2DHomMatrix guaranteeMinimalScaling(
+            const B2DHomMatrix& rSource, 
+            double fDefaultScaleX = 1.0, 
+            double fDefaultScaleY = 1.0);
+
 		/* tooling methods for converting API matrices (drawing::HomogenMatrix3)
 		   to B2DHomMatrix
 		 */

Modified: openoffice/branches/alg/aw080/main/basegfx/source/matrix/b2dhommatrixtools.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/basegfx/source/matrix/b2dhommatrixtools.cxx?rev=1529226&r1=1529225&r2=1529226&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/basegfx/source/matrix/b2dhommatrixtools.cxx (original)
+++ openoffice/branches/alg/aw080/main/basegfx/source/matrix/b2dhommatrixtools.cxx Fri Oct  4 17:20:25 2013
@@ -511,6 +511,38 @@ namespace basegfx
             return rSource * createScaleTranslateB2DHomMatrix(aSize, aPos);
         }
 
+        /// adapt given transformation to absolute scale given by the B2DRange. This
+        /// means that rRange.getRange() is used as scale and rRange.getMinimum() is
+        /// used as translation; mirrorings, shear and rotation will be preserved from
+        /// the given transformation
+        B2DHomMatrix guaranteeMinimalScaling(
+            const B2DHomMatrix& rSource, 
+            double fDefaultScaleX, 
+            double fDefaultScaleY)
+        {
+            const bool bZeroX(fTools::equalZero(rSource.get(0, 0)));
+            const bool bZeroY(fTools::equalZero(rSource.get(1, 1)));
+
+            if(!bZeroX && !bZeroY)
+            {
+                return rSource;
+            }
+
+            B2DHomMatrix aCorrected(rSource);
+
+            if(bZeroX)
+            {
+                aCorrected.set(0, 0, fDefaultScaleX);
+            }
+
+            if(bZeroY)
+            {
+                aCorrected.set(1, 1, fDefaultScaleY);
+            }
+
+            return aCorrected;
+        }
+
         /* tooling methods for converting API matrices (drawing::HomogenMatrix3)
 		   to B2DHomMatrix
 		 */

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=1529226&r1=1529225&r2=1529226&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/filter/source/msfilter/escherex.cxx (original)
+++ openoffice/branches/alg/aw080/main/filter/source/msfilter/escherex.cxx Fri Oct  4 17:20:25 2013
@@ -4804,27 +4804,54 @@ sal_uInt32 EscherConnectorListEntry::Get
                         ( *pGluePointType >>= nGluePointType ) ) )
 					nGluePointType = GetCustomShapeConnectionTypeDefault( eSpType );
 
-				if ( nGluePointType == com::sun::star::drawing::EnhancedCustomShapeGluePointType::CUSTOM )
-				{
-					const SdrGluePointList* pList = pCustoShape->GetGluePointList();
-					if ( pList )
-					{
-						Polygon aPoly;
-						sal_uInt16 nNum, nAnz = pList->GetCount();
-						if ( nAnz )
-						{
-							for ( nNum = 0; nNum < nAnz; nNum++ )
-							{
-								const SdrGluePoint& 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 )
+                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());
+
+                    if(aGluePointVector.size())
+                    {
+                        Polygon aPoly;
+
+                        for(sal_uInt32 a(0); a < aGluePointVector.size(); a++)
+                        {
+                            const sdr::glue::Point* pCandidate = aGluePointVector[a];
+
+                            if(pCandidate)
+                            {
+                                const basegfx::B2DPoint aPt(pCustoShape->getSdrObjectTransformation() * pCandidate->getUnitPosition());
+
+                                aPoly.Insert(POLY_APPEND, Point(basegfx::fround(aPt.getX()), basegfx::fround(aPt.getY())));
+                            }
+                            else
+                            {
+                                OSL_ENSURE(false, "Got sdr::glue::PointVector 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 )
 				{
 					SdrPathObj* pPoly = dynamic_cast< SdrPathObj* >(pCustoShape->DoConvertToPolygonObject(true, true));
 					

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=1529226&r1=1529225&r2=1529226&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/filter/source/msfilter/msdffimp.cxx (original)
+++ openoffice/branches/alg/aw080/main/filter/source/msfilter/msdffimp.cxx Fri Oct  4 17:20:25 2013
@@ -471,11 +471,11 @@ void SvxMSDffManager::SolveSolver( const
 				if ( pO )
 				{
 					Any aAny;
-					SdrGluePoint aGluePoint;
+					sdr::glue::Point aGluePoint;
 					Reference< XShape > aXShape( pO->getUnoShape(), UNO_QUERY );
 					Reference< XShape > aXConnector( pPtr->pCObj->getUnoShape(), UNO_QUERY );
-					SdrGluePointList* pList = pO->ForceGluePointList();
-
+                    sdr::glue::List* pList = pO->GetGluePointList(true);
+                    sdr::glue::PointVector aGluePointVector(pList ? pList->getVector() : sdr::glue::PointVector());
                     sal_Bool bValidGluePoint = sal_False;
 					sal_Int32 nId = nC;
                     sal_uInt32 nInventor = pO->GetObjInventor();
@@ -522,68 +522,94 @@ void SvxMSDffManager::SolveSolver( const
 									bValidGluePoint = sal_True;
 							}
 							break;
-							case OBJ_POLY :
-							{
-								if ( pList && ( pList->GetCount() > nC ) )
-								{
-									bValidGluePoint = sal_True;
-									nId = (sal_Int32)((*pList)[ (sal_uInt16)nC].GetId() + 3 );
-								}
-								else
-								{
-									sal_Bool bNotFound = sal_True;
+                            case OBJ_POLY :
+                            {
+                                // TTTT:GLUE if ( pList && ( pList->GetCount() > nC ) )
+                                if(aGluePointVector.size() > nC)
+                                {
+                                    const sdr::glue::Point* pCandidate = aGluePointVector[nC];
 
-									PolyPolygon aPolyPoly( EscherPropertyContainer::GetPolyPolygon( aXShape ) );
-									sal_uInt16 k, j, nPolySize = aPolyPoly.Count();
-									if ( nPolySize )
-									{
-										sal_uInt32  nPointCount = 0;
-										Rectangle aBoundRect( aPolyPoly.GetBoundRect() );
-										if ( aBoundRect.GetWidth() && aBoundRect.GetHeight() )
-										{
-											for ( k = 0; bNotFound && ( k < nPolySize ); k++ )
-											{
-												const Polygon& rPolygon = aPolyPoly.GetObject( k );
-												for ( j = 0; bNotFound && ( j < rPolygon.GetSize() ); j++ )
-												{
-													PolyFlags eFlags = rPolygon.GetFlags( j );
-													if ( eFlags == POLY_NORMAL )
-													{
-														if ( nC == nPointCount )
-														{
-															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.SetEscDir( SDRESC_SMART );
-															nId = (sal_Int32)((*pList)[ pList->Insert( aGluePoint ) ].GetId() + 3 );
-															bNotFound = sal_False;
-														}
-														nPointCount++;
-													}
-												}
-											}
-										}
-									}
-									if ( !bNotFound )
-									{
-										bValidGluePoint = sal_True;
-									}
-								}
-							}
-							break;
+                                    if(pCandidate)
+                                    {
+                                        nId = pCandidate->getID() + 4;
+                                        bValidGluePoint = sal_True;
+                                    }
+                                    else
+                                    {
+                                        OSL_ENSURE(false, "Got sdr::glue::PointVector with empty entries (!)");
+                                    }
+
+                                    // TTTT:GLUE
+                                    //bValidGluePoint = sal_True;
+                                    //nId = (sal_Int32)((*pList)[ (sal_uInt16)nC].GetId() + 3 );
+                                }
+                                else
+                                {
+                                    sal_Bool bNotFound = sal_True;
+                                    PolyPolygon aPolyPoly( EscherPropertyContainer::GetPolyPolygon( aXShape ) );
+                                    sal_uInt16 k, j, nPolySize = aPolyPoly.Count();
+
+                                    if ( nPolySize )
+                                    {
+                                        sal_uInt32  nPointCount = 0;
+                                        Rectangle aBoundRect( aPolyPoly.GetBoundRect() );
+
+                                        if ( aBoundRect.GetWidth() && aBoundRect.GetHeight() )
+                                        {
+                                            for ( k = 0; bNotFound && ( k < nPolySize ); k++ )
+                                            {
+                                                const Polygon& rPolygon = aPolyPoly.GetObject( k );
+
+                                                for ( j = 0; bNotFound && ( j < rPolygon.GetSize() ); j++ )
+                                                {
+                                                    PolyFlags eFlags = rPolygon.GetFlags( j );
+
+                                                    if ( eFlags == POLY_NORMAL )
+                                                    {
+                                                        if ( nC == nPointCount )
+                                                        {
+                                                            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)));
+                                                            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++;
+                                                    }
+                                                }
+                                            }
+                                        }
+                                    }
+                                    if ( !bNotFound )
+                                    {
+                                        bValidGluePoint = sal_True;
+                                    }
+                                }
+                            }
+                            break;
 
 							case OBJ_CUSTOMSHAPE :
 							{
@@ -604,15 +630,31 @@ void SvxMSDffManager::SolveSolver( const
 									MSO_SPT eSpType = EnhancedCustomShapeTypeNames::Get( sShapeType );
 									nGluePointType = GetCustomShapeConnectionTypeDefault( eSpType );
 								}
-								if ( nGluePointType == EnhancedCustomShapeGluePointType::CUSTOM )
-								{
-									if ( pList && ( pList->GetCount() > nC ) )
-									{
-										bValidGluePoint = sal_True;
-										nId = (sal_Int32)((*pList)[ (sal_uInt16)nC].GetId() + 3 );
-									}
-								}
-								else if ( nGluePointType == EnhancedCustomShapeGluePointType::RECT )
+                                if ( nGluePointType == EnhancedCustomShapeGluePointType::CUSTOM )
+                                {
+                                    if(aGluePointVector.size() > nC)
+                                    {
+                                        const sdr::glue::Point* pCandidate = aGluePointVector[nC];
+
+                                        if(pCandidate)
+                                        {
+                                            nId = pCandidate->getID() + 4;
+                                            bValidGluePoint = sal_True;
+                                        }
+                                        else
+                                        {
+                                            OSL_ENSURE(false, "Got sdr::glue::PointVector 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 )
 								{
 									if ( nC & 1 )
 									{
@@ -732,10 +774,30 @@ void SvxMSDffManager::SolveSolver( const
 												aGeometryItem.SetPropertyValue( sPath, aProp );
 												bValidGluePoint = sal_True;
 												((SdrObjCustomShape*)pO)->SetMergedItem( aGeometryItem );
-												SdrGluePointList* pLst = pO->ForceGluePointList();
-												if ( (sal_Int32)pLst->GetCount() > nGluePoints )
-													nId = (sal_Int32)((*pLst)[ (sal_uInt16)nGluePoints ].GetId() + 3 );
-											}
+
+                                                // 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)
+                                                {
+                                                    const sdr::glue::Point* pCandidate = aGPVector[nGluePoints];
+
+                                                    if(pCandidate)
+                                                    {
+                                                        nId = pCandidate->getID() + 4;
+                                                    }
+                                                    else
+                                                    {
+                                                        OSL_ENSURE(false, "Got sdr::glue::PointVector 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/offapi/com/sun/star/drawing/EscapeDirection.idl
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/offapi/com/sun/star/drawing/EscapeDirection.idl?rev=1529226&r1=1529225&r2=1529226&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/offapi/com/sun/star/drawing/EscapeDirection.idl (original)
+++ openoffice/branches/alg/aw080/main/offapi/com/sun/star/drawing/EscapeDirection.idl Fri Oct  4 17:20:25 2013
@@ -30,38 +30,77 @@
  
 //============================================================================= 
  
-/** This enumeration defines the escape direction a connector takes on
-	a glue point.
+/** This enumeration defines the escape direction a connector can take
+    a glue point. More than one direction may be allowed. When all
+    directions are allowed, SMART is used.
  */
 published enum EscapeDirection
 { 
-	//------------------------------------------------------------------------- 
-	// DOCUMENTATION OMITTED FOR EscapeDirection::	SMART, 
-	SMART, 
-
-	//------------------------------------------------------------------------- 
-	// DOCUMENTATION OMITTED FOR EscapeDirection::	LEFT, 
-	LEFT, 
- 
-	//------------------------------------------------------------------------- 
-	// DOCUMENTATION OMITTED FOR EscapeDirection::	RIGHT, 
-	RIGHT, 
- 
-	//------------------------------------------------------------------------- 
-	// DOCUMENTATION OMITTED FOR EscapeDirection::	UP, 
-	UP, 
- 
-	//------------------------------------------------------------------------- 
-	// DOCUMENTATION OMITTED FOR EscapeDirection::	DOWN 
-	DOWN,
-
-	//------------------------------------------------------------------------- 
-	// DOCUMENTATION OMITTED FOR EscapeDirection::	HORIZONTAL 
-	HORIZONTAL,
-	 
-	//------------------------------------------------------------------------- 
-	// DOCUMENTATION OMITTED FOR EscapeDirection::	VERTICAL 
-	VERTICAL
+    //------------------------------------------------------------------------- 
+    // DOCUMENTATION OMITTED FOR EscapeDirection::  SMART, 
+    SMART, 
+
+    //------------------------------------------------------------------------- 
+    // DOCUMENTATION OMITTED FOR EscapeDirection::  LEFT, 
+    LEFT, 
+
+    //------------------------------------------------------------------------- 
+    // DOCUMENTATION OMITTED FOR EscapeDirection::  RIGHT, 
+    RIGHT, 
+
+    //------------------------------------------------------------------------- 
+    // DOCUMENTATION OMITTED FOR EscapeDirection::  UP, 
+    UP, 
+
+    //------------------------------------------------------------------------- 
+    // DOCUMENTATION OMITTED FOR EscapeDirection::  DOWN 
+    DOWN,
+
+    //------------------------------------------------------------------------- 
+    // DOCUMENTATION OMITTED FOR EscapeDirection::  HORIZONTAL (LEFT & RIGHT)
+    HORIZONTAL,
+
+    //------------------------------------------------------------------------- 
+    // DOCUMENTATION OMITTED FOR EscapeDirection::  VERTICAL (UP & DOWN)
+    VERTICAL
+
+    // As can be seen when looking at HORIZONTAL and VERTICAL the true meaning of
+    // this EscapeDirection is a combination of LEFT/RIGHT/UP/DOWN describing all
+    // allowed escape directions from which the router may choose the best one. To
+    // allow this the following incompatible expansion would be needed:
+    //
+    // //------------------------------------------------------------------------- 
+    // // DOCUMENTATION OMITTED FOR EscapeDirection::  UPWARD (LEFT & UP)
+    // LEFTUP,
+    // 
+    // //------------------------------------------------------------------------- 
+    // // DOCUMENTATION OMITTED FOR EscapeDirection::  UPWARD (UP & RIGHT)
+    // UPRIGHT,
+    // 
+    // //------------------------------------------------------------------------- 
+    // // DOCUMENTATION OMITTED FOR EscapeDirection::  UPWARD (RIGHT & DOWN)
+    // RIGHTDOWN,
+    // 
+    // //------------------------------------------------------------------------- 
+    // // DOCUMENTATION OMITTED FOR EscapeDirection::  DOWNLEFT (DOWN & LEFT)
+    // DOWNLEFT,
+    // 
+    // //------------------------------------------------------------------------- 
+    // // DOCUMENTATION OMITTED FOR EscapeDirection::  UPWARD (LEFT & UP & RIGHT)
+    // UPWARD,
+    // 
+    // //------------------------------------------------------------------------- 
+    // // DOCUMENTATION OMITTED FOR EscapeDirection::  RIGHTWARD (UP & RIGHT & DOWN)
+    // RIGHTWARD,
+    // 
+    // //------------------------------------------------------------------------- 
+    // // DOCUMENTATION OMITTED FOR EscapeDirection::  DOWNWARD (RIGHT & DOWN & LEFT)
+    // DOWNWARD,
+    // 
+    // //------------------------------------------------------------------------- 
+    // // DOCUMENTATION OMITTED FOR EscapeDirection::  LEFTWARD (DOWN & LEFT & UP)
+    // LEFTWARD
+
 }; 
  
 //============================================================================= 

Modified: openoffice/branches/alg/aw080/main/sd/inc/pch/precompiled_sd.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sd/inc/pch/precompiled_sd.hxx?rev=1529226&r1=1529225&r2=1529226&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sd/inc/pch/precompiled_sd.hxx (original)
+++ openoffice/branches/alg/aw080/main/sd/inc/pch/precompiled_sd.hxx Fri Oct  4 17:20:25 2013
@@ -672,7 +672,7 @@
 #include "svx/svddef.hxx"
 #include "svx/svdetc.hxx"
 #include "editeng/measfld.hxx"
-#include "svx/svdglue.hxx"
+#include "svx/sdrglue.hxx"
 #include "svx/svditer.hxx"
 #include "svx/svdlayer.hxx"
 #include "svx/svdoashp.hxx"

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=1529226&r1=1529225&r2=1529226&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 Fri Oct  4 17:20:25 2013
@@ -28,7 +28,7 @@
 #include <string> // HACK: prevent conflict between STLPORT and Workshop headers
 
 #include <svx/dialogs.hrc>
-#include <svx/svdglue.hxx>
+#include <svx/sdrglue.hxx>
 #include <svl/intitem.hxx>
 #include <sfx2/app.hxx>
 #include <sfx2/dispatch.hxx>
@@ -48,18 +48,11 @@ using namespace ::com::sun::star::frame;
 #define ESCDIR_COUNT 5
 static sal_uInt16 aEscDirArray[] =
 {
-	SDRESC_SMART,
-	SDRESC_LEFT,
-	SDRESC_RIGHT,
-	SDRESC_TOP,
-	SDRESC_BOTTOM,
-//	SDRESC_LO,
-//	SDRESC_LU,
-//	SDRESC_RO,
-//	SDRESC_RU,
-//	SDRESC_HORZ,
-//	SDRESC_VERT,
-//	SDRESC_ALL
+    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
 };
 
 

Modified: openoffice/branches/alg/aw080/main/sd/source/ui/dlg/sdtreelb.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sd/source/ui/dlg/sdtreelb.cxx?rev=1529226&r1=1529225&r2=1529226&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sd/source/ui/dlg/sdtreelb.cxx (original)
+++ openoffice/branches/alg/aw080/main/sd/source/ui/dlg/sdtreelb.cxx Fri Oct  4 17:20:25 2013
@@ -86,6 +86,16 @@ public:
 
 bool SD_DLLPRIVATE SdPageObjsTLB::bIsInDrag = false;
 
+void SdPageObjsTLB::SetViewFrame( SfxViewFrame* pViewFrame ) 
+{ 
+    mpFrame = pViewFrame; 
+}
+
+bool SdPageObjsTLB::IsLinkableSelected() const 
+{ 
+    return mbLinkableSelected; 
+}
+
 bool SdPageObjsTLB::IsInDrag()
 { 
 	return bIsInDrag; 

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=1529226&r1=1529225&r2=1529226&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 Fri Oct  4 17:20:25 2013
@@ -27,7 +27,7 @@
 #include "fuediglu.hxx"
 #include <svl/eitem.hxx>
 #include <svx/dialogs.hrc>
-#include <svx/svdglue.hxx>
+#include <svx/sdrglue.hxx>
 #include <sfx2/request.hxx>
 
 
@@ -381,29 +381,29 @@ void FuEditGluePoints::ReceiveRequest(Sf
 
 		case SID_GLUE_ESCDIR_LEFT:
 		{
-			mpView->SetMarkedGluePointsEscDir( SDRESC_LEFT,
-					!mpView->IsMarkedGluePointsEscDir( SDRESC_LEFT ) );
+			mpView->SetMarkedGluePointsEscDir( sdr::glue::Point::ESCAPE_DIRECTION_LEFT,
+					!mpView->IsMarkedGluePointsEscDir( sdr::glue::Point::ESCAPE_DIRECTION_LEFT ) );
 		}
 		break;
 
 		case SID_GLUE_ESCDIR_RIGHT:
 		{
-			mpView->SetMarkedGluePointsEscDir( SDRESC_RIGHT,
-					!mpView->IsMarkedGluePointsEscDir( SDRESC_RIGHT ) );
+			mpView->SetMarkedGluePointsEscDir( sdr::glue::Point::ESCAPE_DIRECTION_RIGHT,
+					!mpView->IsMarkedGluePointsEscDir( sdr::glue::Point::ESCAPE_DIRECTION_RIGHT ) );
 		}
 		break;
 
 		case SID_GLUE_ESCDIR_TOP:
 		{
-			mpView->SetMarkedGluePointsEscDir( SDRESC_TOP,
-					!mpView->IsMarkedGluePointsEscDir( SDRESC_TOP ) );
+			mpView->SetMarkedGluePointsEscDir( sdr::glue::Point::ESCAPE_DIRECTION_TOP,
+					!mpView->IsMarkedGluePointsEscDir( sdr::glue::Point::ESCAPE_DIRECTION_TOP ) );
 		}
 		break;
 
 		case SID_GLUE_ESCDIR_BOTTOM:
 		{
-			mpView->SetMarkedGluePointsEscDir( SDRESC_BOTTOM,
-					!mpView->IsMarkedGluePointsEscDir( SDRESC_BOTTOM ) );
+			mpView->SetMarkedGluePointsEscDir( sdr::glue::Point::ESCAPE_DIRECTION_BOTTOM,
+					!mpView->IsMarkedGluePointsEscDir( sdr::glue::Point::ESCAPE_DIRECTION_BOTTOM ) );
 		}
 		break;
 
@@ -418,37 +418,37 @@ void FuEditGluePoints::ReceiveRequest(Sf
 
 		case SID_GLUE_HORZALIGN_CENTER:
 		{
-			mpView->SetMarkedGluePointsAlign(false, SDRHORZALIGN_CENTER);
+			mpView->SetMarkedGluePointsAlign(false, sdr::glue::Point::Alignment_Center);
 		}
 		break;
 
 		case SID_GLUE_HORZALIGN_LEFT:
 		{
-			mpView->SetMarkedGluePointsAlign(false, SDRHORZALIGN_LEFT);
+			mpView->SetMarkedGluePointsAlign(false, sdr::glue::Point::Alignment_Minimum);
 		}
 		break;
 
 		case SID_GLUE_HORZALIGN_RIGHT:
 		{
-			mpView->SetMarkedGluePointsAlign(false, SDRHORZALIGN_RIGHT);
+			mpView->SetMarkedGluePointsAlign(false, sdr::glue::Point::Alignment_Maximum);
 		}
 		break;
 
 		case SID_GLUE_VERTALIGN_CENTER:
 		{
-			mpView->SetMarkedGluePointsAlign(true, SDRVERTALIGN_CENTER);
+			mpView->SetMarkedGluePointsAlign(true, sdr::glue::Point::Alignment_Center);
 		}
 		break;
 
 		case SID_GLUE_VERTALIGN_TOP:
 		{
-			mpView->SetMarkedGluePointsAlign(true, SDRVERTALIGN_TOP);
+			mpView->SetMarkedGluePointsAlign(true, sdr::glue::Point::Alignment_Minimum);
 		}
 		break;
 
 		case SID_GLUE_VERTALIGN_BOTTOM:
 		{
-			mpView->SetMarkedGluePointsAlign(true, SDRVERTALIGN_BOTTOM);
+			mpView->SetMarkedGluePointsAlign(true, sdr::glue::Point::Alignment_Maximum);
 		}
 		break;
 	}

Modified: openoffice/branches/alg/aw080/main/sd/source/ui/inc/sdtreelb.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sd/source/ui/inc/sdtreelb.hxx?rev=1529226&r1=1529225&r2=1529226&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sd/source/ui/inc/sdtreelb.hxx (original)
+++ openoffice/branches/alg/aw080/main/sd/source/ui/inc/sdtreelb.hxx Fri Oct  4 17:20:25 2013
@@ -196,7 +196,7 @@ public:
 	virtual void			SelectHdl();
 	virtual void			KeyInput( const KeyEvent& rKEvt );
 							
-	void					SetViewFrame( SfxViewFrame* pViewFrame ) { mpFrame = pViewFrame; }
+	void					SetViewFrame( SfxViewFrame* pViewFrame );
 	SfxViewFrame*			GetViewFrame() const { return mpFrame; }
 							
 	void					Fill( const SdDrawDocument*, bool bAllPages, const String& rDocName );
@@ -211,7 +211,7 @@ public:
 	SdDrawDocument*			GetBookmarkDoc(SfxMedium* pMedium = NULL);
 	::sd::DrawDocShell*			GetDropDocSh() { return(mpDropDocSh); }
 	
-	bool                    IsLinkableSelected() const { return mbLinkableSelected; }
+	bool                    IsLinkableSelected() const;
 	
 	static bool				IsInDrag();
 	using SvLBox::ExecuteDrop;

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=1529226&r1=1529225&r2=1529226&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 Fri Oct  4 17:20:25 2013
@@ -459,15 +459,18 @@ void DrawViewShell::GetMenuState( SfxIte
 		else
 		{
 			// Horizontale Ausrichtung
-			sal_uInt16 nHorz = mpDrawView->GetMarkedGluePointsAlign( false );
-			rSet.Put( SfxBoolItem( SID_GLUE_HORZALIGN_CENTER, nHorz == SDRHORZALIGN_CENTER ) );
-			rSet.Put( SfxBoolItem( SID_GLUE_HORZALIGN_LEFT,   nHorz == SDRHORZALIGN_LEFT ) );
-			rSet.Put( SfxBoolItem( SID_GLUE_HORZALIGN_RIGHT,  nHorz == SDRHORZALIGN_RIGHT ) );
+			const sdr::glue::Point::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 ) );
+
 			// Vertikale Ausrichtung
-			sal_uInt16 nVert = mpDrawView->GetMarkedGluePointsAlign( true );
-			rSet.Put( SfxBoolItem( SID_GLUE_VERTALIGN_CENTER, nVert == SDRVERTALIGN_CENTER ) );
-			rSet.Put( SfxBoolItem( SID_GLUE_VERTALIGN_TOP,	  nVert == SDRVERTALIGN_TOP ) );
-			rSet.Put( SfxBoolItem( SID_GLUE_VERTALIGN_BOTTOM, nVert == SDRVERTALIGN_BOTTOM ) );
+			const sdr::glue::Point::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 ) );
 		}
 
 		// Punkt einfuegen
@@ -475,25 +478,25 @@ void DrawViewShell::GetMenuState( SfxIte
 
 		// Autrittsrichtung
 		// Links
-		eState = mpDrawView->IsMarkedGluePointsEscDir( SDRESC_LEFT );
+		eState = mpDrawView->IsMarkedGluePointsEscDir( sdr::glue::Point::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( SDRESC_RIGHT );
+		eState = mpDrawView->IsMarkedGluePointsEscDir( sdr::glue::Point::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( SDRESC_TOP );
+		eState = mpDrawView->IsMarkedGluePointsEscDir( sdr::glue::Point::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( SDRESC_BOTTOM );
+		eState = mpDrawView->IsMarkedGluePointsEscDir( sdr::glue::Point::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=1529226&r1=1529225&r2=1529226&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 Fri Oct  4 17:20:25 2013
@@ -521,81 +521,101 @@ bool View::InsertData( const Transferabl
 										nConnectorCount++;
 								}
 
-								// #83525# try to re-establish connections at clones
-								if(nConnectorCount)
-								{
-									for(a = 0; a < aConnectorContainer.Count(); a++)
-									{
-										ImpRememberOrigAndClone* pRem = (ImpRememberOrigAndClone*)aConnectorContainer.GetObject(a);
-										SdrEdgeObj* pOrigEdge = dynamic_cast< SdrEdgeObj* >(pRem->pOrig);
-										SdrEdgeObj* pCloneEdge = dynamic_cast< SdrEdgeObj* >(pRem->pClone);
-
-										if(pOrigEdge && pCloneEdge)
-										{
-											// test first connection
-											SdrObjConnection& rConn0 = pOrigEdge->GetConnection(false);
-											SdrObject* pConnObj = rConn0.GetObject();
-											if(pConnObj)
-											{
-												SdrObject* pConnClone = ImpGetClone(aConnectorContainer, pConnObj);
-												if(pConnClone)
-												{
-													// if dest obj was cloned, too, re-establish connection
-													pCloneEdge->ConnectToNode(false, pConnClone);
-													pCloneEdge->GetConnection(false).SetConnectorId(rConn0.GetConnectorId());
-												}
-												else
-												{
-													// set position of connection point of original connected object
-													const SdrGluePointList* pGlueList = pConnObj->GetGluePointList();
-													if(pGlueList)
-													{
-														sal_uInt32 nInd = pGlueList->FindGluePoint(rConn0.GetConnectorId());
-
-														if(SDRGLUEPOINT_NOTFOUND != nInd)
-														{
-															const SdrGluePoint& rGluePoint = (*pGlueList)[nInd];
-															basegfx::B2DPoint aPosition = rGluePoint.GetAbsolutePos(sdr::legacy::GetSnapRange(*pConnObj));
-															aPosition += aVector;
-															pCloneEdge->SetTailPoint(false, aPosition);
-														}
-													}
-												}
-											}
-
-											// test second connection
-											SdrObjConnection& rConn1 = pOrigEdge->GetConnection(true);
-											pConnObj = rConn1.GetObject();
-											if(pConnObj)
-											{
-												SdrObject* pConnClone = ImpGetClone(aConnectorContainer, pConnObj);
-												if(pConnClone)
-												{
-													// if dest obj was cloned, too, re-establish connection
-													pCloneEdge->ConnectToNode(true, pConnClone);
-													pCloneEdge->GetConnection(true).SetConnectorId(rConn1.GetConnectorId());
-												}
-												else
-												{
-													// set position of connection point of original connected object
-													const SdrGluePointList* pGlueList = pConnObj->GetGluePointList();
-													if(pGlueList)
-													{
-														sal_uInt32 nInd = pGlueList->FindGluePoint(rConn1.GetConnectorId());
-
-														if(SDRGLUEPOINT_NOTFOUND != nInd)
-														{
-															const SdrGluePoint& rGluePoint = (*pGlueList)[nInd];
-															basegfx::B2DPoint aPosition = rGluePoint.GetAbsolutePos(sdr::legacy::GetSnapRange(*pConnObj));
-															aPosition += aVector;
-															pCloneEdge->SetTailPoint(true, aPosition);
-														}
-													}
-												}
-											}
-										}
-									}
-								}
+                                // #83525# try to re-establish connections at clones
+                                if(nConnectorCount)
+                                {
+                                    for(a = 0; a < aConnectorContainer.Count(); a++)
+                                    {
+                                        ImpRememberOrigAndClone* pRem = (ImpRememberOrigAndClone*)aConnectorContainer.GetObject(a);
+                                        SdrEdgeObj* pOrigEdge = dynamic_cast< SdrEdgeObj* >(pRem->pOrig);
+                                        SdrEdgeObj* pCloneEdge = dynamic_cast< SdrEdgeObj* >(pRem->pClone);
+
+                                        if(pOrigEdge && pCloneEdge)
+                                        {
+                                            // test first connection
+                                            SdrObjConnection& rConn0 = pOrigEdge->GetConnection(false);
+                                            SdrObject* pConnObj = rConn0.GetObject();
+                                            if(pConnObj)
+                                            {
+                                                SdrObject* pConnClone = ImpGetClone(aConnectorContainer, pConnObj);
+                                                if(pConnClone)
+                                                {
+                                                    // if dest obj was cloned, too, re-establish connection
+                                                    pCloneEdge->ConnectToNode(false, pConnClone);
+                                                    pCloneEdge->GetConnection(false).SetConnectorId(rConn0.GetConnectorId());
+                                                }
+                                                else
+                                                {
+                                                    // set position of connection point of original connected object
+                                                    const sdr::glue::List* pGlueList = pConnObj->GetGluePointList(false);
+                                                    if(pGlueList)
+                                                    {
+                                                        const sdr::glue::Point* pCandidate = pGlueList->findByID(rConn0.GetConnectorId());
+
+                                                        if(pCandidate)
+                                                        {
+                                                            const basegfx::B2DPoint aPosition(pConnObj->getSdrObjectTransformation() * pCandidate->getUnitPosition());
+
+                                                            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);
+                                                        //}
+                                                    }
+                                                }
+                                            }
+
+                                            // test second connection
+                                            SdrObjConnection& rConn1 = pOrigEdge->GetConnection(true);
+                                            pConnObj = rConn1.GetObject();
+                                            if(pConnObj)
+                                            {
+                                                SdrObject* pConnClone = ImpGetClone(aConnectorContainer, pConnObj);
+                                                if(pConnClone)
+                                                {
+                                                    // if dest obj was cloned, too, re-establish connection
+                                                    pCloneEdge->ConnectToNode(true, pConnClone);
+                                                    pCloneEdge->GetConnection(true).SetConnectorId(rConn1.GetConnectorId());
+                                                }
+                                                else
+                                                {
+                                                    // set position of connection point of original connected object
+                                                    const sdr::glue::List* pGlueList = pConnObj->GetGluePointList(false);
+                                                    if(pGlueList)
+                                                    {
+                                                        const sdr::glue::Point* pCandidate = pGlueList->findByID(rConn1.GetConnectorId());
+
+                                                        if(pCandidate)
+                                                        {
+                                                            const basegfx::B2DPoint aPosition(pConnObj->getSdrObjectTransformation() * pCandidate->getUnitPosition());
+
+                                                            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);
+                                                        //}
+                                                    }
+                                                }
+                                            }
+                                        }
+                                    }
+                                }
 
 								// #83525# cleanup remember classes
 								for(a = 0; a < aConnectorContainer.Count(); a++)

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=1529226&r1=1529225&r2=1529226&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/svx/Library_svxcore.mk (original)
+++ openoffice/branches/alg/aw080/main/svx/Library_svxcore.mk Fri Oct  4 17:20:25 2013
@@ -304,6 +304,7 @@ $(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 \
@@ -317,7 +318,6 @@ $(eval $(call gb_Library_add_exception_o
     svx/source/svdraw/svdetc \
     svx/source/svdraw/svdfmtf \
     svx/source/svdraw/svdglev \
-    svx/source/svdraw/svdglue \
     svx/source/svdraw/svdhdl \
     svx/source/svdraw/svdhlpln \
     svx/source/svdraw/svdibrow \

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=1529226&r1=1529225&r2=1529226&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/svx/Package_inc.mk (original)
+++ openoffice/branches/alg/aw080/main/svx/Package_inc.mk Fri Oct  4 17:20:25 2013
@@ -315,6 +315,7 @@ $(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))
@@ -358,7 +359,6 @@ $(eval $(call gb_Package_add_file,svx_in
 $(eval $(call gb_Package_add_file,svx_inc,inc/svx/svdfield.hxx,svx/svdfield.hxx))
 $(eval $(call gb_Package_add_file,svx_inc,inc/svx/svdglev.hxx,svx/svdglev.hxx))
 $(eval $(call gb_Package_add_file,svx_inc,inc/svx/svdglob.hxx,svx/svdglob.hxx))
-$(eval $(call gb_Package_add_file,svx_inc,inc/svx/svdglue.hxx,svx/svdglue.hxx))
 $(eval $(call gb_Package_add_file,svx_inc,inc/svx/svdhdl.hxx,svx/svdhdl.hxx))
 $(eval $(call gb_Package_add_file,svx_inc,inc/svx/svdhlpln.hxx,svx/svdhlpln.hxx))
 $(eval $(call gb_Package_add_file,svx_inc,inc/svx/svditer.hxx,svx/svditer.hxx))

Added: openoffice/branches/alg/aw080/main/svx/inc/svx/sdrglue.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/svx/inc/svx/sdrglue.hxx?rev=1529226&view=auto
==============================================================================
--- openoffice/branches/alg/aw080/main/svx/inc/svx/sdrglue.hxx (added)
+++ openoffice/branches/alg/aw080/main/svx/inc/svx/sdrglue.hxx Fri Oct  4 17:20:25 2013
@@ -0,0 +1,197 @@
+/**************************************************************
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+#ifndef _SDRGLUE_HXX
+#define _SDRGLUE_HXX
+
+#include <basegfx/point/b2dpoint.hxx>
+#include <basegfx/vector/b2dvector.hxx>
+#include "svx/svxdllapi.h"
+#include <com/sun/star/drawing/GluePoint2.hpp>
+#include <set>
+#include <vector>
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+    namespace glue
+    {
+        class SVX_DLLPUBLIC Point
+        {
+        public:
+            // defines for GluePoint alignment (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:
+            // allow class List access to setID()
+            friend class List;
+
+            // position in unit coordinates [0.0 .. 1.0] in X,Y
+            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 Points in one list need unique identifiers
+            // and will be sorted by these. This is administrated by the List 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 points from the ones from CustomShapes
+            bool                            mbUserDefined : 1;
+
+            // write access to ID is limited to list class only
+            void setID(sal_uInt32 nNew) { maID = nNew; }
+
+            // write access to scale adaption to list class only
+            void adaptToChangedScale(const basegfx::B2DVector& rOldScale, const basegfx::B2DVector& rNewScale);
+        protected:
+        public:
+            Point(
+                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
+            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 sizes of the object the GluePoint belongs to. The converter to
+            // sdr::glue::Point is implemented as constructor
+            com::sun::star::drawing::GluePoint2 convertToGluePoint2(
+                const basegfx::B2DVector& rAbsoluteScale) const;
+            Point(
+                const com::sun::star::drawing::GluePoint2& rGluePoint2, 
+                const basegfx::B2DVector& rAbsoluteScale);
+        };
+    } // end of namespace glue
+} // end of namespace sdr
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+    namespace glue
+    {
+        // sort by ID
+        struct PointComparator
+        {
+            bool operator()(const Point& rA, const Point& rB) const;
+        };
+
+        // typedef for point set
+        typedef ::std::set< Point, PointComparator > PointSet;
+        typedef ::std::vector< Point* > PointVector;
+
+        class SVX_DLLPUBLIC List
+        {
+        private:
+            // the GluePoint set
+            PointSet                maPointSet;
+
+        protected:
+        public:
+            List()
+            :   maPointSet()
+            {
+            }
+
+            // add new Point, it gets a new ID assigned and a reference to the 
+            // new instance (copied to list) is returned. It will assert when 
+            // already added
+            Point& add(const Point& rNew);
+
+            // remove Point (will assert if not added)
+            void remove(const Point& rNew);
+
+            // find by ID
+            Point* findByID(sal_uInt32 nID) const;
+
+            // get vector of Points (pointers to the real points)
+            PointVector getVector() const;
+
+            // adapt to changed absolute scale, e.g. when not relative and alignments have to be addressed
+            void adaptToChangedScale(const basegfx::B2DVector& rOldScale, const basegfx::B2DVector& rNewScale);
+        };
+    } // end of namespace glue
+} // end of namespace sdr
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+#endif //_SDRGLUE_HXX
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// eof

Propchange: openoffice/branches/alg/aw080/main/svx/inc/svx/sdrglue.hxx
------------------------------------------------------------------------------
    svn:executable = *

Added: openoffice/branches/alg/aw080/main/svx/inc/svx/sdrobjecttools.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/svx/inc/svx/sdrobjecttools.hxx?rev=1529226&view=auto
==============================================================================
--- openoffice/branches/alg/aw080/main/svx/inc/svx/sdrobjecttools.hxx (added)
+++ openoffice/branches/alg/aw080/main/svx/inc/svx/sdrobjecttools.hxx Fri Oct  4 17:20:25 2013
@@ -0,0 +1,57 @@
+/**************************************************************
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+#ifndef _SVDOBJ_TOOLS_HXX
+#define _SVDOBJ_TOOLS_HXX
+
+#include "svx/svxdllapi.h"
+#include <svx/svdobj.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// predefines
+
+class SdrPathObj;
+
+//////////////////////////////////////////////////////////////////////////////
+// defines
+
+enum DefaultSdrPathObjType
+{
+    DefaultSdrPathObjType_Line,         // SID_DRAW_LINE, SID_DRAW_XLINE, SID_LINE_ARROW_START, SID_LINE_ARROW_END, SID_LINE_ARROWS, SID_LINE_ARROW_CIRCLE, SID_LINE_CIRCLE_ARROW, SID_LINE_ARROW_SQUARE, SID_LINE_SQUARE_ARROW
+    DefaultSdrPathObjType_BezierFill,   // SID_DRAW_BEZIER_FILL
+    DefaultSdrPathObjType_Bezier,       // SID_DRAW_BEZIER_NOFILL
+    DefaultSdrPathObjType_Freeline,     // SID_DRAW_FREELINE, SID_DRAW_FREELINE_NOFILL
+    DefaultSdrPathObjType_Polygon,      // SID_DRAW_POLYGON, SID_DRAW_POLYGON_NOFILL
+    DefaultSdrPathObjType_XPolygon,     // SID_DRAW_XPOLYGON, SID_DRAW_XPOLYGON_NOFILL
+};
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// helper for constructing views to create default geometries for diverse kinds of
+// SdrPathObjs, as used e.g. in pressing CTRL-Tab in keyboard toolbar navigation
+
+void SVX_DLLPUBLIC initializeDefaultSdrPathObjByObjectType(SdrPathObj& rObj, DefaultSdrPathObjType eType, const basegfx::B2DRange& rRange, bool bClose);
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_SVDOBJ_TOOLS_HXX
+
+//////////////////////////////////////////////////////////////////////////////
+// eof

Propchange: openoffice/branches/alg/aw080/main/svx/inc/svx/sdrobjecttools.hxx
------------------------------------------------------------------------------
    svn:executable = *

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=1529226&r1=1529225&r2=1529226&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/svx/inc/svx/svdglev.hxx (original)
+++ openoffice/branches/alg/aw080/main/svx/inc/svx/svdglev.hxx Fri Oct  4 17:20:25 2013
@@ -19,8 +19,6 @@
  * 
  *************************************************************/
 
-
-
 #ifndef _SVDGLEV_HXX
 #define _SVDGLEV_HXX
 
@@ -30,7 +28,7 @@
 ////////////////////////////////////////////////////////////////////////////////////////////////////
 // predefines
 
-class SdrGluePoint;
+class sdr::glue::Point;
 
 ////////////////////////////////////////////////////////////////////////////////////////////////////
 
@@ -39,10 +37,10 @@ class SVX_DLLPUBLIC SdrGlueEditView: pub
 private:
 	// Markierte Klebepunkte kopieren und anstelle der alten markieren
 	void ImpCopyMarkedGluePoints();
-	typedef void (*PGlueDoFunc)(SdrGluePoint&, const SdrObject* pObj, const void*, const void*, const void*, const void*, const void*);
-	typedef void (*PGlueTrFunc)(basegfx::B2DPoint&, const void*, const void*, const void*, const void*, const void*);
+	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*);
 	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(PGlueTrFunc pTrFunc, 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);
 
 protected:
 	// #i71538# make constructors of SdrView sub-components protected to avoid incomplete incarnations which may get casted to SdrView
@@ -53,7 +51,8 @@ public:
 	// Durch den Parameter nThisEsc uebergibt man die Richtung, die man
 	// checken bzw. setzen/loeschen will.
 	// Moegliche Werte fuer nThisEsc sind z.Zt.
-	// SDRESC_LEFT, SDRESC_RIGHT, SDRESC_TOP und SDRESC_BOTTOM
+	// ESCAPE_DIRECTION_LEFT, ESCAPE_DIRECTION_RIGHT, 
+    // ESCAPE_DIRECTION_TOP und ESCAPE_DIRECTION_BOTTOM
 	TRISTATE IsMarkedGluePointsEscDir(sal_uInt16 nThisEsc) const;
 	void SetMarkedGluePointsEscDir(sal_uInt16 nThisEsc, bool bOn);
 	bool IsSetMarkedGluePointsEscDirPossible() const { return !IsReadOnly() && areGluesSelected(); }
@@ -74,16 +73,20 @@ public:
 	//      SDRVERTALIGN_TOP
 	//      SDRVERTALIGN_BOTTOM
 	//      SDRVERTALIGN_DONTCARE (nur bei Get())
-	sal_uInt16 GetMarkedGluePointsAlign(bool bVert) const;
-	void SetMarkedGluePointsAlign(bool bVert, sal_uInt16 nAlign);
+	sdr::glue::Point::Alignment GetMarkedGluePointsAlign(bool bVert) const;
+	void SetMarkedGluePointsAlign(bool bVert, sdr::glue::Point::Alignment nAlign);
 	bool IsSetMarkedGluePointsAlignPossible() const { return !IsReadOnly() && areGluesSelected(); }
 
 	// Alle merkierten Klebepunkte entfernen
 	void DeleteMarkedGluePoints();
 
-	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);
+    // 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=1529226&r1=1529225&r2=1529226&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/svx/inc/svx/svdoashp.hxx (original)
+++ openoffice/branches/alg/aw080/main/svx/inc/svx/svdoashp.hxx Fri Oct  4 17:20:25 2013
@@ -112,8 +112,8 @@ public:
 	// #i37011# centralize throw-away of render geometry
 	void InvalidateRenderGeometry();
 
-	// #i38892#
-	void ImpCheckCustomGluePointsAreAdded();
+	// 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,8 +216,8 @@ public:
 	virtual void          SaveGeoData(SdrObjGeoData &rGeo) const;
 	virtual void          RestGeoData(const SdrObjGeoData &rGeo);
 
-	virtual const SdrGluePointList* GetGluePointList() const;
-	virtual SdrGluePointList* ForceGluePointList();
+	virtual sdr::glue::List* GetGluePointList(bool bForce) const;
+	// TTTT:GLUE virtual sdr::glue::List* ForceGluePointList();
 
 	virtual void AddToHdlList(SdrHdlList& rHdlList) const;
 

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=1529226&r1=1529225&r2=1529226&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/svx/inc/svx/svdobj.hxx (original)
+++ openoffice/branches/alg/aw080/main/svx/inc/svx/svdobj.hxx Fri Oct  4 17:20:25 2013
@@ -31,8 +31,8 @@
 #include <svl/lstner.hxx>
 #include <vcl/timer.hxx>
 #include <svx/svdsob.hxx>
-#include <svx/svdtypes.hxx> // fuer SdrLayerID
-#include <svx/svdglue.hxx> // Klebepunkte
+#include <svx/svdtypes.hxx>
+#include <svx/sdrglue.hxx>
 #include <svx/xdash.hxx>
 #include <svx/xpoly.hxx>
 #include <svx/xenum.hxx>
@@ -212,7 +212,7 @@ class SVX_DLLPUBLIC SdrObjGeoData
 public:
 	basegfx::B2DHomMatrix	maSdrObjectTransformation;
 	basegfx::B2DPoint		maObjectAnchor;
-	SdrGluePointList*		mpGPL;
+	sdr::glue::List*		mpGPL;
 	SdrLayerID				mnLayerID;
 
     /// bitfield
@@ -232,7 +232,7 @@ class SdrObjPlusData
 {
 public:
 	SdrObjUserDataList*			mpUserDataList; // applikationsspeziefische Daten
-	SdrGluePointList*			mpGluePoints;   // Klebepunkte zum Ankleben von Objektverbindern
+	sdr::glue::List*			mpGluePoints;   // Klebepunkte zum Ankleben von Objektverbindern
 
 	// object name, title and description
 	String						maObjName;
@@ -723,13 +723,13 @@ public:
 	// Automatische Klebepunkte:
 	// je 4 Scheitelpunkt- und Eckpositionen muss ein Knotenobjekt liefern
 	// i.d.R. 0=oben, 1=rechts, 2=unten, 3=links
-	virtual SdrGluePoint GetVertexGluePoint(sal_uInt32 nNum) const;
+	virtual sdr::glue::Point GetVertexGluePoint(sal_uInt32 nNum) const;
 
 	// Liste aller Klebepunkte. Kann NULL sein.
-	virtual const SdrGluePointList* GetGluePointList() const;
+	virtual sdr::glue::List* GetGluePointList(bool bForce) const;
 
 	// Nach veraendern der GluePointList muss man am Obj SendRepaintBroadcast rufen!
-	virtual SdrGluePointList* ForceGluePointList();
+	// TTTT:GLUE virtual sdr::glue::List* ForceGluePointList();
 
     /** sets the writing mode of the object's context
 

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=1529226&r1=1529225&r2=1529226&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/svx/inc/svx/svdoedge.hxx (original)
+++ openoffice/branches/alg/aw080/main/svx/inc/svx/svdoedge.hxx Fri Oct  4 17:20:25 2013
@@ -25,7 +25,7 @@
 #define _SVDOEDGE_HXX
 
 #include <svx/svdotext.hxx>
-#include <svx/svdglue.hxx>
+#include <svx/sdrglue.hxx>
 #include <svx/svxdllapi.h>
 #include <basegfx/polygon/b2dpolygon.hxx>
 
@@ -44,37 +44,37 @@ namespace sdr {	namespace properties { c
 class SdrObjConnection
 {
 private:
-	friend class				SdrEdgeObj;
-	friend class				ImpEdgeHdl;
-	friend class				SdrCreateView;
+    friend class				SdrEdgeObj;
+    friend class				ImpEdgeHdl;
+    friend class				SdrCreateView;
 
 protected:
-	basegfx::B2DPoint			maObjOfs;       // Wird beim Draggen eines Knotens gesetzt
-	SdrObject*					mpConnectedSdrObject;          // Referenziertes Objekt
-	sal_uInt16				    mnConnectorId;        // Konnektornummer
-
-	// bitfield
-	bool						mbBestConnection : 1;   // true= es wird der guenstigste Konnektor gesucht
-	bool						mbBestVertex : 1; // true= es wird der guenstigste Scheitelpunkt zum konnekten gesucht
-	bool						mbAutoVertex : 1; // AutoConnector am Scheitelpunkt nCon
+    // TTTT:GLUE basegfx::B2DPoint			maObjOfs;       // Wird beim Draggen eines Knotens gesetzt
+    SdrObject*					mpConnectedSdrObject;          // Referenziertes Objekt
+    sal_uInt16				    mnConnectorId;        // Konnektornummer
+
+    // bitfield
+    bool						mbBestConnection : 1;   // true= es wird der guenstigste Konnektor gesucht
+    bool						mbBestVertex : 1; // true= es wird der guenstigste Scheitelpunkt zum konnekten gesucht
+    bool						mbAutoVertex : 1; // AutoConnector am Scheitelpunkt nCon
 
 public:
-	SVX_DLLPUBLIC ~SdrObjConnection();
-	SdrObjConnection() { ResetVars(); }
+    SVX_DLLPUBLIC ~SdrObjConnection();
+    SdrObjConnection() { ResetVars(); }
 
-	void ResetVars();
-	bool TakeGluePoint(SdrGluePoint& rGP, bool bSetAbsolutePos) const;
+    void ResetVars();
+    bool TakeGluePoint(sdr::glue::Point& rGP/* TTTT:GLUE, bool bSetAbsolutePos*/) const;
 
-	inline void SetBestConnection( bool rB ) { mbBestConnection = rB; };
-	inline void SetBestVertex( bool rB ) { mbBestVertex = rB; };
-	inline void SetAutoVertex( bool rB ) { mbAutoVertex = rB; };
-	inline void SetConnectorId( sal_uInt16 nId ) { mnConnectorId = nId; };
-
-	inline bool IsBestConnection() const { return mbBestConnection; };
-	inline bool IsBestVertex() const { return mbBestVertex; };
-	inline bool IsAutoVertex() const { return mbAutoVertex; };
-	inline sal_uInt16 GetConnectorId() const { return mnConnectorId; };
-	inline SdrObject* GetObject() const { return mpConnectedSdrObject; }
+    inline void SetBestConnection( bool rB ) { mbBestConnection = rB; };
+    inline void SetBestVertex( bool rB ) { mbBestVertex = rB; };
+    inline void SetAutoVertex( bool rB ) { mbAutoVertex = rB; };
+    inline void SetConnectorId( sal_uInt16 nId ) { mnConnectorId = nId; };
+
+    inline bool IsBestConnection() const { return mbBestConnection; };
+    inline bool IsBestVertex() const { return mbBestVertex; };
+    inline bool IsAutoVertex() const { return mbAutoVertex; };
+    inline sal_uInt16 GetConnectorId() const { return mnConnectorId; };
+    inline SdrObject* GetObject() const { return mpConnectedSdrObject; }
 };
 
 //************************************************************
@@ -114,7 +114,7 @@ public:
 
 	basegfx::B2DPoint& ImpGetLineVersatzPoint(SdrEdgeLineCode eLineCode);
 	const basegfx::B2DPoint& ImpGetLineVersatzPoint(SdrEdgeLineCode eLineCode) const { return const_cast< SdrEdgeInfoRec* >(this)->ImpGetLineVersatzPoint(eLineCode); }
-	sal_uInt16 ImpGetPolyIdx(SdrEdgeLineCode eLineCode, sal_uInt32 nPointCount) const;
+	sal_uInt32 ImpGetPolyIdx(SdrEdgeLineCode eLineCode, sal_uInt32 nPointCount) const;
 	bool ImpIsHorzLine(SdrEdgeLineCode eLineCode, sal_uInt32 nPointCount) const;
 	void ImpSetLineVersatz(SdrEdgeLineCode eLineCode, sal_uInt32 nPointCount, long nVal);
 	long ImpGetLineVersatz(SdrEdgeLineCode eLineCode, sal_uInt32 nPointCount) const;
@@ -212,9 +212,9 @@ public:
 	SdrObjConnection& GetConnection(bool bTail1) { return *(bTail1 ? &maCon1 : &maCon2); }
 	virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const;
 	virtual sal_uInt16 GetObjIdentifier() const;
-	virtual SdrGluePoint GetVertexGluePoint(sal_uInt32 nNum) const;
-	virtual const SdrGluePointList* GetGluePointList() const;
-	virtual SdrGluePointList* ForceGluePointList();
+	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/source/customshapes/EnhancedCustomShape2d.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/svx/source/customshapes/EnhancedCustomShape2d.cxx?rev=1529226&r1=1529225&r2=1529226&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/svx/source/customshapes/EnhancedCustomShape2d.cxx (original)
+++ openoffice/branches/alg/aw080/main/svx/source/customshapes/EnhancedCustomShape2d.cxx Fri Oct  4 17:20:25 2013
@@ -2296,25 +2296,58 @@ SdrObject* EnhancedCustomShape2d::Create
 	return pRet;
 }
 
-void EnhancedCustomShape2d::ApplyGluePoints( SdrObject* pObj )
+void EnhancedCustomShape2d::ApplyGluePoints(SdrObject* pTarget)
 {
-	if ( pObj && seqGluePoints.getLength() )
-	{
-		sal_uInt32 i, nCount = seqGluePoints.getLength();
-		for ( i = 0; i < nCount; i++ )
-		{
-			SdrGluePoint aGluePoint;
-
-			aGluePoint.SetPos( GetPoint( seqGluePoints[ i ], sal_True, sal_True ) );
-			aGluePoint.SetPercent( sal_False );
-
-			aGluePoint.SetAlign( SDRVERTALIGN_TOP | SDRHORZALIGN_LEFT );
-			aGluePoint.SetEscDir( SDRESC_SMART );
-			SdrGluePointList* pList = pObj->ForceGluePointList();
-			if( pList )
-				/* sal_uInt16 nId = */ pList->Insert( aGluePoint );
-		}
-	}
+    if(pTarget)
+    {
+        const sal_uInt32 nCount(seqGluePoints.getLength());
+
+        if(nCount)
+        {
+            sdr::glue::List* pList = pTarget->GetGluePointList(true);
+
+            if(pList)
+            {
+                // positions from GetPoint(seqGluePoints) are relative to absolute object size
+                const basegfx::B2DVector aObjectScale(
+                    basegfx::absolute(pCustomShapeObj->getSdrObjectScale()));
+                const basegfx::B2DPoint aScaleToUnit(
+                    basegfx::fTools::equalZero(aObjectScale.getX()) ? 1.0 : 1.0/ aObjectScale.getX(),
+                    basegfx::fTools::equalZero(aObjectScale.getY()) ? 1.0 : 1.0/ aObjectScale.getY());
+
+                for(sal_uInt32 a(0); a < nCount; a++)
+                {
+                    const basegfx::B2DPoint aPosition(GetPoint(seqGluePoints[a], sal_True, sal_True));
+                    const sdr::glue::Point aNew(
+                        aPosition * aScaleToUnit,
+                        sdr::glue::Point::ESCAPE_DIRECTION_SMART,
+                        sdr::glue::Point::Alignment_Minimum,
+                        sdr::glue::Point::Alignment_Minimum);
+
+                    pList->add(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/sdr/contact/viewcontactofsdrobj.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/svx/source/sdr/contact/viewcontactofsdrobj.cxx?rev=1529226&r1=1529225&r2=1529226&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 Fri Oct  4 17:20:25 2013
@@ -150,44 +150,52 @@ namespace sdr
 		//////////////////////////////////////////////////////////////////////////////
 		// primitive stuff
 
-		// add Gluepoints (if available)
-		drawinglayer::primitive2d::Primitive2DSequence ViewContactOfSdrObj::createGluePointPrimitive2DSequence() const
-		{
-			drawinglayer::primitive2d::Primitive2DSequence xRetval;
-			const SdrGluePointList* pGluePointList = GetSdrObject().GetGluePointList();
-
-			if(pGluePointList)
-			{
-				const sal_uInt32 nCount(pGluePointList->GetCount());
-
-				if(nCount)
-				{
-					// prepare point vector
-					std::vector< basegfx::B2DPoint > aGluepointVector;
-
-					// create GluePoint primitives. ATM these are relative to the SnapRect
-					for(sal_uInt32 a(0L); a < nCount; a++)
-					{
-						const SdrGluePoint& rCandidate = (*pGluePointList)[(sal_uInt16)a];
-						const basegfx::B2DPoint aPosition(rCandidate.GetAbsolutePos(sdr::legacy::GetSnapRange(GetSdrObject())));
-
-						aGluepointVector.push_back(aPosition);
-					}
-
-					if(!aGluepointVector.empty())
-					{
-						const basegfx::BColor aBackPen(1.0, 1.0, 1.0);
-						const basegfx::BColor aRGBFrontColor(0.0, 0.0, 1.0); // COL_LIGHTBLUE
-						const drawinglayer::primitive2d::Primitive2DReference xReference(new drawinglayer::primitive2d::MarkerArrayPrimitive2D(
-							aGluepointVector, 
-							drawinglayer::primitive2d::createDefaultGluepoint_7x7(aBackPen, aRGBFrontColor)));
+        // add Gluepoints (if available)
+        drawinglayer::primitive2d::Primitive2DSequence ViewContactOfSdrObj::createGluePointPrimitive2DSequence() const
+        {
+            drawinglayer::primitive2d::Primitive2DSequence xRetval;
+            const sdr::glue::List* pGluePointList = GetSdrObject().GetGluePointList(false);
+
+            if(pGluePointList)
+            {
+                const sdr::glue::PointVector aGluePoints(pGluePointList->getVector());
+                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];
+
+                        if(pCandidate)
+                        {
+                            aPointVector.push_back(rTransformation * pCandidate->getUnitPosition());
+                        }
+                        else
+                        {
+                            OSL_ENSURE(false, "sdr::glue::PointVector with empty entries (!)");
+                        }
+                    }
+
+                    if(!aPointVector.empty())
+                    {
+                        const basegfx::BColor aBackPen(1.0, 1.0, 1.0);
+                        const basegfx::BColor aRGBFrontColor(0.0, 0.0, 1.0); // COL_LIGHTBLUE
+                        const drawinglayer::primitive2d::Primitive2DReference xReference(new drawinglayer::primitive2d::MarkerArrayPrimitive2D(
+                            aPointVector, 
+                            drawinglayer::primitive2d::createDefaultGluepoint_7x7(aBackPen, aRGBFrontColor)));
                         xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
-					}
-				}
-			}
+                    }
+                }
+            }
 
-			return xRetval;
-		}
+            return xRetval;
+        }
 
         drawinglayer::primitive2d::Primitive2DSequence ViewContactOfSdrObj::embedToObjectSpecificInformation(const drawinglayer::primitive2d::Primitive2DSequence& rSource) const
         {