Kaydet (Commit) c4705ada authored tarafından Oliver Bolte's avatar Oliver Bolte

INTEGRATION: CWS aw051 (1.27.98); FILE MERGED

2007/06/21 16:28:32 aw 1.27.98.5: #i78198# applied 64bit patch for object selection(s)
2007/06/08 14:52:13 aw 1.27.98.4: #i77162# adaptions to changed B2DPolygon bezier handling
2007/05/21 18:23:52 aw 1.27.98.3: RESYNC: (1.28-1.29); FILE MERGED
2007/05/10 15:56:50 aw 1.27.98.2: RESYNC: (1.27-1.28); FILE MERGED
2007/05/10 09:56:57 aw 1.27.98.1: #i76891#
üst f76c3bc0
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
* *
* $RCSfile: svdedtv2.cxx,v $ * $RCSfile: svdedtv2.cxx,v $
* *
* $Revision: 1.31 $ * $Revision: 1.32 $
* *
* last change: $Author: rt $ $Date: 2007-07-06 07:39:50 $ * last change: $Author: obo $ $Date: 2007-07-18 10:56:06 $
* *
* The Contents of this file are made available subject to * The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1. * the terms of GNU Lesser General Public License Version 2.1.
...@@ -978,42 +978,23 @@ void SdrEditView::MergeMarkedObjects(SdrMergeMode eMode) ...@@ -978,42 +978,23 @@ void SdrEditView::MergeMarkedObjects(SdrMergeMode eMode)
pInsPV = pM->GetPageView(); pInsPV = pM->GetPageView();
pInsOL = pObj->GetObjList(); pInsOL = pObj->GetObjList();
// get the polygons; do NOT use ImpGetXPolyPoly here - it does fetch all // #i76891# use single iter from SJ here whcih works on SdrObjects and takes
// the polygons, but they are all put in one single XPolyPolygon so that // groups into account by itself
// no SetDirections() on single objects can be made. This would lead to SdrObjListIter aIter(*pObj, IM_DEEPWITHGROUPS);
// wrong results.
SdrObjList* pObjectList = pObj->GetSubList();
if(pObjectList) while(aIter.IsMore())
{
SdrObjListIter aIter(*pObjectList, IM_DEEPWITHGROUPS);
while(aIter.IsMore())
{
SdrObject* pCandidate = aIter.Next();
SdrPathObj* pPathObj = PTR_CAST(SdrPathObj, pCandidate);
if(pPathObj)
{
basegfx::B2DPolyPolygon aTmpPoly(pPathObj->GetPathPoly());
aTmpPoly = basegfx::tools::correctOrientations(aTmpPoly);
if(!bFirstObjectComplete)
{
aMergePolyPolygonA.append(aTmpPoly);
}
else
{
aMergePolyPolygonB.append(aTmpPoly);
}
}
}
}
else
{ {
SdrPathObj* pPathObj = PTR_CAST(SdrPathObj, pObj); SdrObject* pCandidate = aIter.Next();
SdrPathObj* pPathObj = PTR_CAST(SdrPathObj, pCandidate);
if(pPathObj) if(pPathObj)
{ {
basegfx::B2DPolyPolygon aTmpPoly(pPathObj->GetPathPoly()); basegfx::B2DPolyPolygon aTmpPoly(pPathObj->GetPathPoly());
// #i76891# unfortunately ConvertMarkedToPathObj has converted all
// involved polygon data to curve segments, even if not necessary.
// It is better to try to reduce to more simple polygons.
aTmpPoly = basegfx::tools::simplifyCurveSegments(aTmpPoly);
aTmpPoly = basegfx::tools::correctOrientations(aTmpPoly); aTmpPoly = basegfx::tools::correctOrientations(aTmpPoly);
if(!bFirstObjectComplete) if(!bFirstObjectComplete)
...@@ -1441,16 +1422,22 @@ void SdrEditView::ImpDismantleOneObject(const SdrObject* pObj, SdrObjList& rOL, ...@@ -1441,16 +1422,22 @@ void SdrEditView::ImpDismantleOneObject(const SdrObject* pObj, SdrObjList& rOL,
{ {
SdrObjKind eKind(OBJ_PLIN); SdrObjKind eKind(OBJ_PLIN);
basegfx::B2DPolygon aNewPolygon; basegfx::B2DPolygon aNewPolygon;
const sal_uInt32 nNextIndex((b + 1) % nPointCount);
aNewPolygon.append(rCandidate.getB2DPoint(b)); aNewPolygon.append(rCandidate.getB2DPoint(b));
aNewPolygon.append(rCandidate.getB2DPoint((b + 1) % nPointCount));
if(rCandidate.areControlPointsUsed()) if(rCandidate.areControlPointsUsed())
{ {
aNewPolygon.setControlVectorA(0, rCandidate.getControlVectorA(b)); aNewPolygon.appendBezierSegment(
aNewPolygon.setControlVectorB(0, rCandidate.getControlVectorB(b)); rCandidate.getNextControlPoint(b),
rCandidate.getPrevControlPoint(nNextIndex),
rCandidate.getB2DPoint(nNextIndex));
eKind = OBJ_PATHLINE; eKind = OBJ_PATHLINE;
} }
else
{
aNewPolygon.append(rCandidate.getB2DPoint(nNextIndex));
}
SdrPathObj* pPath = new SdrPathObj(eKind, basegfx::B2DPolyPolygon(aNewPolygon)); SdrPathObj* pPath = new SdrPathObj(eKind, basegfx::B2DPolyPolygon(aNewPolygon));
ImpCopyAttributes(pSrcPath, pPath); ImpCopyAttributes(pSrcPath, pPath);
...@@ -1935,7 +1922,7 @@ void SdrEditView::DoImportMarkedMtf(SvdProgressInfo *pProgrInfo) ...@@ -1935,7 +1922,7 @@ void SdrEditView::DoImportMarkedMtf(SvdProgressInfo *pProgrInfo)
if(aNewMarked.GetMarkCount()) if(aNewMarked.GetMarkCount())
{ {
// Neue Selektion bilden // Neue Selektion bilden
for(sal_uInt32 a(0); a < aNewMarked.GetMarkCount(); a++) for(ULONG a(0); a < aNewMarked.GetMarkCount(); a++)
{ {
GetMarkedObjectListWriteAccess().InsertEntry(*aNewMarked.GetMark(a)); GetMarkedObjectListWriteAccess().InsertEntry(*aNewMarked.GetMark(a));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment