incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1347716 [2/6] - in /incubator/ooo/branches/alg/aw080/main: basctl/source/dlged/ basctl/source/inc/ chart2/source/controller/main/ cui/source/tabpages/ filter/source/msfilter/ reportdesign/source/core/sdr/ reportdesign/source/ui/inc/ report...
Date Thu, 07 Jun 2012 17:08:12 GMT
Modified: incubator/ooo/branches/alg/aw080/main/sd/source/ui/func/fuconcs.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sd/source/ui/func/fuconcs.cxx?rev=1347716&r1=1347715&r2=1347716&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sd/source/ui/func/fuconcs.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sd/source/ui/func/fuconcs.cxx Thu Jun  7 17:08:07 2012
@@ -129,7 +129,7 @@ bool FuConstructCustomShape::MouseButton
 		mpWindow->CaptureMouse();
 		sal_uInt16 nDrgLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
 
-		mpView->BegCreateObj(aLogicPos, (OutputDevice*) NULL, nDrgLog);
+		mpView->BegCreateObj(aLogicPos, nDrgLog);
 
 		SdrObject* pObj = mpView->GetCreateObj();
 		if ( pObj )
@@ -212,7 +212,7 @@ bool FuConstructCustomShape::KeyInput(co
 
 void FuConstructCustomShape::Activate()
 {
-	mpView->SetCurrentObj( OBJ_CUSTOMSHAPE );
+	mpView->setSdrObjectCreationInfo(SdrObjectCreationInfo(static_cast< sal_uInt16 >(OBJ_CUSTOMSHAPE)));
 	FuConstruct::Activate();
 }
 
@@ -307,8 +307,7 @@ SdrObject* FuConstructCustomShape::Creat
 {
 	SdrObject* pObj = SdrObjFactory::MakeNewObject(
 		mpView->getSdrModelFromSdrView(),
-		mpView->GetCurrentObjInventor(), 
-		mpView->GetCurrentObjIdentifier());
+		mpView->getSdrObjectCreationInfo());
 
 	if( pObj )
 	{

Modified: incubator/ooo/branches/alg/aw080/main/sd/source/ui/func/fuconrec.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sd/source/ui/func/fuconrec.cxx?rev=1347716&r1=1347715&r2=1347716&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sd/source/ui/func/fuconrec.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sd/source/ui/func/fuconrec.cxx Thu Jun  7 17:08:07 2012
@@ -120,7 +120,7 @@ void FuConstructRectangle::DoExecute( Sf
 						pCenterX->GetValue() - (nWidth / 2), pCenterY->GetValue() - (nHeight / 2)));
 				SdrCircObj* pNewCircle = new SdrCircObj(
 					*GetDoc(),
-					OBJ_CIRC, 
+					CircleType_Circle, 
 					aObjTrans);
 
 				mpView->InsertObjectAtView(*pNewCircle, SDRINSERT_SETDEFLAYER | SDRINSERT_SETDEFATTR);
@@ -208,14 +208,18 @@ bool FuConstructRectangle::MouseButtonDo
 		mpWindow->CaptureMouse();
 		sal_uInt16 nDrgLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
 
-		if (mpView->GetCurrentObjIdentifier() == OBJ_CAPTION)
+		if(OBJ_CAPTION == mpView->getSdrObjectCreationInfo().getIdent())
 		{
-			bReturn = mpView->BegCreateCaptionObj(aLogicPos, basegfx::B2DVector(846.0, 846.0), // (4x2)cm
-												(OutputDevice*) NULL, nDrgLog);
+			bReturn = mpView->BegCreateCaptionObj(
+                aLogicPos, 
+                basegfx::B2DVector(846.0, 846.0), // (4x2)cm
+				nDrgLog);
 		}
 		else
 		{
-			mpView->BegCreateObj(aLogicPos, (OutputDevice*) NULL, nDrgLog);
+			mpView->BegCreateObj(
+                aLogicPos, 
+                nDrgLog);
 		}
 
 		SdrObject* pObj = mpView->GetCreateObj();
@@ -322,7 +326,8 @@ bool FuConstructRectangle::KeyInput(cons
 
 void FuConstructRectangle::Activate()
 {
-	SdrObjKind aObjKind;
+	SdrObjKind aObjKind(OBJ_NONE);
+    SdrPathObjType aSdrPathObjType(PathType_Line);
 
 	switch (nSlotId)
 	{
@@ -337,7 +342,8 @@ void FuConstructRectangle::Activate()
 			// keine break !
 		case SID_DRAW_LINE :
 		case SID_DRAW_XLINE:
-			aObjKind = OBJ_LINE;
+			aObjKind = OBJ_POLY;
+            aSdrPathObjType = PathType_Line;
 			break;
 
 		case SID_DRAW_MEASURELINE:
@@ -416,7 +422,10 @@ void FuConstructRectangle::Activate()
 		break;
 	}
 
-	mpView->SetCurrentObj((sal_uInt16)aObjKind);
+    SdrObjectCreationInfo aSdrObjectCreationInfo(static_cast< sal_uInt16 >(aObjKind));
+
+    aSdrObjectCreationInfo.setSdrPathObjType(aSdrPathObjType);
+	mpView->setSdrObjectCreationInfo(aSdrObjectCreationInfo);
 
 	FuConstruct::Activate();
 }
@@ -806,8 +815,7 @@ SdrObject* FuConstructRectangle::CreateD
 
 	SdrObject* pObj = SdrObjFactory::MakeNewObject(
 		mpView->getSdrModelFromSdrView(),
-		mpView->GetCurrentObjInventor(), 
-		mpView->GetCurrentObjIdentifier());
+		mpView->getSdrObjectCreationInfo());
 
 	if(pObj)
 	{

Modified: incubator/ooo/branches/alg/aw080/main/sd/source/ui/func/fuconuno.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sd/source/ui/func/fuconuno.cxx?rev=1347716&r1=1347715&r2=1347716&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sd/source/ui/func/fuconuno.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sd/source/ui/func/fuconuno.cxx Thu Jun  7 17:08:07 2012
@@ -107,7 +107,7 @@ bool FuConstructUnoControl::MouseButtonD
 
 		mpWindow->CaptureMouse();
 		const double fTolerance(basegfx::B2DVector(mpWindow->GetInverseViewTransformation() * basegfx::B2DVector(DRGPIX, 0.0)).getLength());
-		mpView->BegCreateObj(aLogicPos, (OutputDevice*) NULL, fTolerance);
+		mpView->BegCreateObj(aLogicPos, fTolerance);
 		bReturn = true;
 	}
 	return bReturn;
@@ -168,7 +168,7 @@ bool FuConstructUnoControl::KeyInput(con
 \************************************************************************/
 void FuConstructUnoControl::Activate()
 {
-	mpView->SetCurrentObj( nIdentifier, nInventor );
+	mpView->setSdrObjectCreationInfo(SdrObjectCreationInfo(nIdentifier, nInventor));
 
 	aNewPointer = Pointer(POINTER_DRAW_RECT);
 	aOldPointer = mpWindow->GetPointer();
@@ -200,8 +200,7 @@ SdrObject* FuConstructUnoControl::Create
 	
 	SdrObject* pObj = SdrObjFactory::MakeNewObject(
 		mpView->getSdrModelFromSdrView(),
-		mpView->GetCurrentObjInventor(), 
-		mpView->GetCurrentObjIdentifier());
+		mpView->getSdrObjectCreationInfo());
 
 	if(pObj)
 	{

Modified: incubator/ooo/branches/alg/aw080/main/sd/source/ui/func/fumorph.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sd/source/ui/func/fumorph.cxx?rev=1347716&r1=1347715&r2=1347716&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sd/source/ui/func/fumorph.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sd/source/ui/func/fumorph.cxx Thu Jun  7 17:08:07 2012
@@ -402,7 +402,6 @@ void FuMorph::ImpInsertPolygons(List& rP
 		const ::basegfx::B2DPolyPolygon& rPolyPoly3D = *(::basegfx::B2DPolyPolygon*)rPolyPolyList3D.GetObject(i);
     	SdrPathObj* pNewObj = new SdrPathObj(
 			*GetDoc(),
-			OBJ_POLY, 
 			rPolyPoly3D);
 
 		// Linienfarbe

Modified: incubator/ooo/branches/alg/aw080/main/sd/source/ui/func/fuoaprms.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sd/source/ui/func/fuoaprms.cxx?rev=1347716&r1=1347715&r2=1347716&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sd/source/ui/func/fuoaprms.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sd/source/ui/func/fuoaprms.cxx Thu Jun  7 17:08:07 2012
@@ -302,29 +302,29 @@ void FuObjectAnimationParameters::DoExec
 	{
 		SdrObject* pObject1 = aSelection[0];
 		SdrObject* pObject2 = aSelection[1];
-		SdrObjKind eKind1   = (SdrObjKind)pObject1->GetObjIdentifier();
-		SdrObjKind eKind2   = (SdrObjKind)pObject2->GetObjIdentifier();
 		SdAnimationInfo* pInfo1 = mpDoc->GetAnimationInfo(pObject1);
 		SdAnimationInfo* pInfo2 = mpDoc->GetAnimationInfo(pObject2);
 		pInfo  = NULL;
 
-		if (pObject1->GetObjInventor() == SdrInventor &&
-			((eKind1 == OBJ_LINE) ||                        // 2-Punkt-Linie
-			 (eKind1 == OBJ_PLIN) ||                        // Polygon
-			 (eKind1 == OBJ_PATHLINE))                &&    // Bezier-Kurve
-			 (pInfo2 && pInfo2->meEffect == presentation::AnimationEffect_PATH))
-		{
-			pInfo = pInfo2;
-		}
-
-		if (pObject2->GetObjInventor() == SdrInventor &&
-			((eKind2 == OBJ_LINE) ||                        // 2-Punkt-Linie
-			 (eKind2 == OBJ_PLIN) ||                        // Polygon
-			 (eKind2 == OBJ_PATHLINE))                &&    // Bezier-Kurve
-			(pInfo1 && pInfo1->meEffect == presentation::AnimationEffect_PATH))
-		{
-			pInfo = pInfo1;
-		}
+        if(pObject1 && pInfo2 && pInfo2->meEffect == presentation::AnimationEffect_PATH)
+        {
+            SdrPathObj* pSdrPathObj = dynamic_cast< SdrPathObj* >(pObject1);
+
+            if(pSdrPathObj && !pSdrPathObj->isClosed())
+            {
+    			pInfo = pInfo2;
+            }
+        }
+
+        if(pObject2 && pInfo1 && pInfo1->meEffect == presentation::AnimationEffect_PATH)
+        {
+            SdrPathObj* pSdrPathObj = dynamic_cast< SdrPathObj* >(pObject2);
+
+            if(pSdrPathObj && !pSdrPathObj->isClosed())
+            {
+    			pInfo = pInfo1;
+            }
+        }
 
 		if (pInfo)
 		{
@@ -653,27 +653,30 @@ void FuObjectAnimationParameters::DoExec
 			SdrObjKind eKind1   = (SdrObjKind)pObject1->GetObjIdentifier();
 			SdrObjKind eKind2   = (SdrObjKind)pObject2->GetObjIdentifier();
 
-			if (pObject1->GetObjInventor() == SdrInventor &&
-				((eKind1 == OBJ_LINE) ||        // 2-Punkt-Linie
-				 (eKind1 == OBJ_PLIN) ||        // Polygon
-				 (eKind1 == OBJ_PATHLINE)))     // Bezier-Kurve
-			{
-				pPath = (SdrPathObj*)pObject1;
-				pRunningObj = pObject2;
-			}
-
-			if (pObject2->GetObjInventor() == SdrInventor &&
-				((eKind2 == OBJ_LINE) ||        // 2-Punkt-Linie
-				 (eKind2 == OBJ_PLIN) ||        // Polygon
-				 (eKind2 == OBJ_PATHLINE)))     // Bezier-Kurve
-			{
-				pPath = (SdrPathObj*)pObject2;
-				pRunningObj = pObject1;
-			}
+            if(pObject1)
+            {
+                SdrPathObj* pSdrPathObj = dynamic_cast< SdrPathObj* >(pObject1);
+
+                if(pSdrPathObj && !pSdrPathObj->isClosed())
+                {
+				    pPath = pSdrPathObj;
+				    pRunningObj = pObject2;
+                }
+            }
+
+            if(pObject2)
+            {
+                SdrPathObj* pSdrPathObj = dynamic_cast< SdrPathObj* >(pObject2);
+
+                if(pSdrPathObj && !pSdrPathObj->isClosed())
+                {
+				    pPath = pSdrPathObj;
+				    pRunningObj = pObject1;
+                }
+            }
 
 			DBG_ASSERT(pPath, "keine Kurve gefunden");
 
-
 			// das laufende Objekt auf das Kurvenende schieben
 			const basegfx::B2DRange aCurRange(sdr::legacy::GetLogicRange(*pRunningObj));
 			const basegfx::B2DPolyPolygon aPolyPolygon(pPath->getB2DPolyPolygonInObjectCoordinates());

Modified: incubator/ooo/branches/alg/aw080/main/sd/source/ui/func/futext.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sd/source/ui/func/futext.cxx?rev=1347716&r1=1347715&r2=1347716&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sd/source/ui/func/futext.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sd/source/ui/func/futext.cxx Thu Jun  7 17:08:07 2012
@@ -183,7 +183,7 @@ void FuText::DoExecute( SfxRequest& )
         ToolBarManager::TBG_FUNCTION,
         RID_DRAW_TEXT_TOOLBOX);
 
-	mpView->SetCurrentObj(OBJ_TEXT);
+	mpView->setSdrObjectCreationInfo(SdrObjectCreationInfo(static_cast< sal_uInt16 >(OBJ_TEXT)));
 	mpView->SetViewEditMode(SDREDITMODE_EDIT);
 
 	MouseEvent aMEvt(mpWindow->GetPointerPosPixel());
@@ -284,7 +284,7 @@ bool FuText::MouseButtonDown(const Mouse
 				eHit = mpView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt);
 			}
 
-			mpView->SetCurrentObj(OBJ_TEXT);
+			mpView->setSdrObjectCreationInfo(SdrObjectCreationInfo(static_cast< sal_uInt16 >(OBJ_TEXT)));
 			mpView->SetViewEditMode(SDREDITMODE_EDIT);
 		}
 
@@ -441,9 +441,9 @@ bool FuText::MouseButtonDown(const Mouse
 						/**********************************************************
 						* Objekt erzeugen
 						**********************************************************/
-						mpView->SetCurrentObj(OBJ_TEXT);
+						mpView->setSdrObjectCreationInfo(SdrObjectCreationInfo(static_cast< sal_uInt16 >(OBJ_TEXT)));
 						mpView->SetViewEditMode(SDREDITMODE_CREATE);
-						mpView->BegCreateObj(aMDPos, 0, fTolerance);
+						mpView->BegCreateObj(aMDPos, fTolerance);
 					}
 					else
 					{
@@ -687,7 +687,7 @@ bool FuText::MouseButtonUp(const MouseEv
 
 		mpView->SetDragWithCopy(bDragWithCopy);
 		mpView->EndDragObj( mpView->IsDragWithCopy() );
-		mpView->SetCurrentObj(OBJ_TEXT);
+		mpView->setSdrObjectCreationInfo(SdrObjectCreationInfo(static_cast< sal_uInt16 >(OBJ_TEXT)));
 
         if ( mpView->IsRotateAllowed() && mpViewShell->GetFrameView()->IsClickChangeRotation() && (rMEvt.GetClicks() != 2) &&
 			!rMEvt.IsShift() && !rMEvt.IsMod1() && !rMEvt.IsMod2() && !rMEvt.IsRight() &&
@@ -802,9 +802,9 @@ bool FuText::MouseButtonUp(const MouseEv
 			/**********************************************************************
 			* Mengentext (linksbuendiges AutoGrow)
 			**********************************************************************/
-			mpView->SetCurrentObj(OBJ_TEXT);
+			mpView->setSdrObjectCreationInfo(SdrObjectCreationInfo(static_cast< sal_uInt16 >(OBJ_TEXT)));
 			mpView->SetViewEditMode(SDREDITMODE_CREATE);
-			mpView->BegCreateObj(aMDPos, 0, fTolerance);
+			mpView->BegCreateObj(aMDPos, fTolerance);
 
 			bool bSnapEnabled = mpView->IsSnapEnabled();
 
@@ -999,7 +999,7 @@ bool FuText::KeyInput(const KeyEvent& rK
 
 	if( bPermanent )
 	{
-		mpView->SetCurrentObj(OBJ_TEXT);
+		mpView->setSdrObjectCreationInfo(SdrObjectCreationInfo(static_cast< sal_uInt16 >(OBJ_TEXT)));
 		mpView->SetViewEditMode(SDREDITMODE_CREATE);
 	}
 
@@ -1069,7 +1069,7 @@ void FuText::SetInEditMode(const MouseEv
 	SdrPageView* pPV = mpView->GetSdrPageView();
 	if( pPV && mxTextObj.is() && (mxTextObj->getSdrPageFromSdrObject() == &pPV->getSdrPageFromSdrPageView()) )
 	{
-		mpView->SetCurrentObj(OBJ_TEXT);
+		mpView->setSdrObjectCreationInfo(SdrObjectCreationInfo(static_cast< sal_uInt16 >(OBJ_TEXT)));
 
 		if( bPermanent )
 			mpView->SetViewEditMode(SDREDITMODE_CREATE);
@@ -1433,8 +1433,7 @@ SdrObject* FuText::CreateDefaultObject(c
 	SdrTextObj* pObj = dynamic_cast< SdrTextObj* >(
 		SdrObjFactory::MakeNewObject(
 			mpView->getSdrModelFromSdrView(),
-			mpView->GetCurrentObjInventor(), 
-			mpView->GetCurrentObjIdentifier()));
+			mpView->getSdrObjectCreationInfo()));
 
 	if(pObj)
 	{
@@ -1489,7 +1488,7 @@ bool FuText::cancel()
 		if(mpView->SdrEndTextEdit() == SDRENDTEXTEDIT_DELETED)
 			mxTextObj.reset(0);
 
-		mpView->SetCurrentObj(OBJ_TEXT);
+		mpView->setSdrObjectCreationInfo(SdrObjectCreationInfo(static_cast< sal_uInt16 >(OBJ_TEXT)));
 		mpView->SetViewEditMode(SDREDITMODE_EDIT);
 		return true;
 	}

Modified: incubator/ooo/branches/alg/aw080/main/sd/source/ui/unoidl/unomodel.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sd/source/ui/unoidl/unomodel.cxx?rev=1347716&r1=1347715&r2=1347716&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sd/source/ui/unoidl/unomodel.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sd/source/ui/unoidl/unomodel.cxx Thu Jun  7 17:08:07 2012
@@ -1036,76 +1036,76 @@ uno::Reference< uno::XInterface > SAL_CA
 	if( aType.EqualsAscii( "com.sun.star.presentation.", 0, 26 ) )
 	{
 		SvxShape* pShape = NULL;
+        SvxShapeKind aSvxShapeKind(SvxShapeKind_Text);
 
-		sal_uInt16 nType = OBJ_TEXT;
 		// create a shape wrapper
 		if( aType.EqualsAscii( "TitleTextShape", 26, 14 ) )
 		{
-			nType = OBJ_TEXT;
+			aSvxShapeKind = SvxShapeKind_Text;
 		}
 		else if( aType.EqualsAscii( "OutlinerShape", 26, 13 ) )
 		{
-			nType = OBJ_TEXT;
+			aSvxShapeKind = SvxShapeKind_Text;
 		}
 		else if( aType.EqualsAscii( "SubtitleShape", 26, 13 ) )
 		{
-			nType = OBJ_TEXT;
+			aSvxShapeKind = SvxShapeKind_Text;
 		}
 		else if( aType.EqualsAscii( "GraphicObjectShape", 26, 18 ) )
 		{
-			nType = OBJ_GRAF;
+			aSvxShapeKind = SvxShapeKind_Graphic;
 		}
 		else if( aType.EqualsAscii( "PageShape", 26, 9 ) )
 		{
-			nType = OBJ_PAGE;
+			aSvxShapeKind = SvxShapeKind_Page;
 		}
 		else if( aType.EqualsAscii( "OLE2Shape", 26, 9 ) )
 		{
-			nType = OBJ_OLE2;
+			aSvxShapeKind = SvxShapeKind_OLE2;
 		}
 		else if( aType.EqualsAscii( "ChartShape", 26, 10 ) )
 		{
-			nType = OBJ_OLE2;
+			aSvxShapeKind = SvxShapeKind_OLE2;
 		}
 		else if( aType.EqualsAscii( "CalcShape", 26, 9 ) )
 		{
-			nType = OBJ_OLE2;
+			aSvxShapeKind = SvxShapeKind_OLE2;
 		}
 		else if( aType.EqualsAscii( "TableShape", 26, 10 ) )
 		{
-			nType = OBJ_TABLE;
+			aSvxShapeKind = SvxShapeKind_Table;
 		}
 		else if( aType.EqualsAscii( "OrgChartShape", 26, 13 ) )
 		{
-			nType = OBJ_OLE2;
+			aSvxShapeKind = SvxShapeKind_OLE2;
 		}
 		else if( aType.EqualsAscii( "NotesShape", 26, 13 ) )
 		{
-			nType = OBJ_TEXT;
+			aSvxShapeKind = SvxShapeKind_Text;
 		}
 		else if( aType.EqualsAscii( "HandoutShape", 26, 13 ) )
 		{
-			nType = OBJ_PAGE;
+			aSvxShapeKind = SvxShapeKind_Page;
 		}
 		else if( aType.EqualsAscii( "FooterShape", 26, 12 ) )
 		{
-			nType = OBJ_TEXT;
+			aSvxShapeKind = SvxShapeKind_Text;
 		}
 		else if( aType.EqualsAscii( "HeaderShape", 26, 12 ) )
 		{
-			nType = OBJ_TEXT;
+			aSvxShapeKind = SvxShapeKind_Text;
 		}
 		else if( aType.EqualsAscii( "SlideNumberShape", 26, 17 ) )
 		{
-			nType = OBJ_TEXT;
+			aSvxShapeKind = SvxShapeKind_Text;
 		}
 		else if( aType.EqualsAscii( "DateTimeShape", 26, 17 ) )
 		{
-			nType = OBJ_TEXT;
+			aSvxShapeKind = SvxShapeKind_Text;
 		}
 		else if( aType.EqualsAscii( "MediaShape", 26, 10 ) )
 		{
-			nType = OBJ_MEDIA;
+			aSvxShapeKind = SvxShapeKind_Media;
 		}
 		else
 		{
@@ -1113,19 +1113,24 @@ uno::Reference< uno::XInterface > SAL_CA
 		}
 
 		// create the API wrapper
-		pShape = CreateSvxShapeByTypeAndInventor( nType, SdrInventor );
+		pShape = SvxDrawPage::CreateShapeBySvxShapeKind(aSvxShapeKind);
 
 		// set shape type
 		if( pShape && !mbClipBoard )
+        {
 			pShape->SetShapeType(aServiceSpecifier);
+        }
 
 		xRet = (uno::XWeak*)pShape;
 	}
 	else if( aServiceSpecifier.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.TableShape") ) )
 	{
-		SvxShape* pShape = CreateSvxShapeByTypeAndInventor( OBJ_TABLE, SdrInventor );
-		if( pShape && !mbClipBoard )
+		SvxShape* pShape = SvxDrawPage::CreateShapeBySvxShapeKind(SvxShapeKind_Table);
+		
+        if( pShape && !mbClipBoard )
+        {
 			pShape->SetShapeType(aServiceSpecifier);
+        }
 
 		xRet = (uno::XWeak*)pShape;
 	}

Modified: incubator/ooo/branches/alg/aw080/main/sd/source/ui/unoidl/unoobj.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sd/source/ui/unoidl/unoobj.cxx?rev=1347716&r1=1347715&r2=1347716&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sd/source/ui/unoidl/unoobj.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sd/source/ui/unoidl/unoobj.cxx Thu Jun  7 17:08:07 2012
@@ -110,7 +110,7 @@ DECLARE_STL_STDKEY_MAP(sal_uIntPtr, SfxE
 static SdExtPropertySetInfoCache gImplImpressPropertySetInfoCache;
 static SdExtPropertySetInfoCache gImplDrawPropertySetInfoCache;
 
-DECLARE_STL_STDKEY_MAP(sal_uInt32, uno::Sequence< uno::Type >*, SdTypesCache);
+DECLARE_STL_STDKEY_MAP(SvxShapeKind, uno::Sequence< uno::Type >*, SdTypesCache);
 static SdTypesCache gImplTypesCache;
 
 ///////////////////////////////////////////////////////////////////////
@@ -311,10 +311,10 @@ extern "C" int __LOADONCALLAPI SortFunc(
 SdXShape::SdXShape( SvxShape* pShape, SdXImpressDocument* pModel) throw()
 :	mpShape( pShape ),
 	mpPropSet( pModel?
-					lcl_ImplGetShapePropertySet(pModel->IsImpressDocument(), pShape->getShapeKind() == OBJ_GRAF )
+					lcl_ImplGetShapePropertySet(pModel->IsImpressDocument(), SvxShapeKind_Graphic == pShape->getSvxShapeKind() )
 				:	lcl_GetEmpty_SdXShapePropertySet_Impl() ),
 	mpMap( pModel?
-					lcl_ImplGetShapePropertyMap(pModel->IsImpressDocument(), pShape->getShapeKind() == OBJ_GRAF )
+					lcl_ImplGetShapePropertyMap(pModel->IsImpressDocument(), SvxShapeKind_Graphic == pShape->getSvxShapeKind() )
 				:	lcl_GetEmpty_SdXShapePropertyMap_Impl() ),
 	mpModel(pModel),
 	mpImplementationId( NULL )
@@ -380,9 +380,9 @@ uno::Sequence< uno::Type > SAL_CALL SdXS
 	}
 	else
 	{
-		const sal_uInt32 nObjId = mpShape->getShapeKind();
+		const SvxShapeKind eSvxShapeKind(mpShape->getSvxShapeKind());
 		uno::Sequence< uno::Type >* pTypes;
-		SdTypesCache::iterator aIter( gImplTypesCache.find( nObjId ) );
+		SdTypesCache::iterator aIter( gImplTypesCache.find( eSvxShapeKind ) );
 		if( aIter == gImplTypesCache.end() )
 		{
 			pTypes = new uno::Sequence< uno::Type >( mpShape->_getTypes() );
@@ -390,7 +390,7 @@ uno::Sequence< uno::Type > SAL_CALL SdXS
 			pTypes->realloc( nCount+1 );
 			(*pTypes)[nCount] = ::getCppuType((const uno::Reference< lang::XTypeProvider>*)0);
 
-			gImplTypesCache[ nObjId ] = pTypes;
+			gImplTypesCache[ eSvxShapeKind ] = pTypes;
 		}
 		else
 		{

Modified: incubator/ooo/branches/alg/aw080/main/sd/source/ui/view/DocumentRenderer.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sd/source/ui/view/DocumentRenderer.cxx?rev=1347716&r1=1347715&r2=1347716&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sd/source/ui/view/DocumentRenderer.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sd/source/ui/view/DocumentRenderer.cxx Thu Jun  7 17:08:07 2012
@@ -1648,7 +1648,6 @@ private:
 
                 SdrPathObj* pPathObj = new SdrPathObj(
 					rModel,
-					OBJ_PATHLINE, 
 					aPathPoly );
 
 				pPathObj->SetMergedItem(XLineStyleItem(XLINE_SOLID));

Modified: incubator/ooo/branches/alg/aw080/main/sd/source/ui/view/drawview.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sd/source/ui/view/drawview.cxx?rev=1347716&r1=1347715&r2=1347716&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sd/source/ui/view/drawview.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sd/source/ui/view/drawview.cxx Thu Jun  7 17:08:07 2012
@@ -103,7 +103,7 @@ DrawView::DrawView( DrawDocShell* pDocSh
 , mpVDev(NULL)
 , mnPOCHSmph(0)
 {
-	SetCurrentObj(OBJ_RECT, SdrInventor);
+	setSdrObjectCreationInfo(SdrObjectCreationInfo(static_cast< sal_uInt16 >(OBJ_RECT), SdrInventor));
 }
 
 /*************************************************************************

Modified: incubator/ooo/branches/alg/aw080/main/sd/source/ui/view/drviews4.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sd/source/ui/view/drviews4.cxx?rev=1347716&r1=1347715&r2=1347716&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sd/source/ui/view/drviews4.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sd/source/ui/view/drviews4.cxx Thu Jun  7 17:08:07 2012
@@ -682,23 +682,48 @@ void DrawViewShell::Command(const Comman
 																	RID_DRAW_TEXTOBJ_POPUP;
 										break;
 
-									case OBJ_PATHLINE:
-									case OBJ_PLIN:
-										nSdResId = bGraphicShell ? RID_GRAPHIC_POLYLINEOBJ_POPUP :
-																	RID_DRAW_POLYLINEOBJ_POPUP;
-										break;
+                                    case OBJ_POLY:
+                                    {
+                                        SdrPathObj* pSdrPathObj = dynamic_cast< SdrPathObj* >(pObj);
+
+                                        if(pSdrPathObj)
+                                        {
+                                            switch(pSdrPathObj->getSdrPathObjType())
+                                            {
+                                                case PathType_Line:
+                                                {
+										            nSdResId = bGraphicShell ? RID_GRAPHIC_LINEOBJ_POPUP :
+																	            RID_DRAW_LINEOBJ_POPUP;
+                                                    break;
+                                                }
+                                                case PathType_OpenPolygon:
+                                                case PathType_OpenBezier:
+                                                {
+										            nSdResId = bGraphicShell ? RID_GRAPHIC_POLYLINEOBJ_POPUP :
+																	            RID_DRAW_POLYLINEOBJ_POPUP;
+                                                    break;
+                                                }
+                                                case PathType_ClosedPolygon:
+                                                case PathType_ClosedBezier:
+                                                {
+										            nSdResId = bGraphicShell ? RID_GRAPHIC_GEOMOBJ_POPUP :
+																	            RID_DRAW_GEOMOBJ_POPUP;
+                                                    break;
+                                                }
+                                            }
+                                        }
+                                        else
+                                        {
+                                            OSL_ENSURE(false, "OOps, SdrObjKind and dynamic_cast do not fit (!)");
+                                        }
+                                        break;
+                                    }
 
-									case OBJ_FREELINE:
 									case OBJ_EDGE:		// Connector
 										nSdResId = bGraphicShell ? RID_GRAPHIC_EDGEOBJ_POPUP :
 																	RID_DRAW_EDGEOBJ_POPUP;
 										break;
 
-									case OBJ_LINE:
-										nSdResId = bGraphicShell ? RID_GRAPHIC_LINEOBJ_POPUP :
-																	RID_DRAW_LINEOBJ_POPUP;
-										break;
-
 									case OBJ_MEASURE:
 										nSdResId = bGraphicShell ? RID_GRAPHIC_MEASUREOBJ_POPUP :
 																	RID_DRAW_MEASUREOBJ_POPUP;
@@ -706,12 +731,6 @@ void DrawViewShell::Command(const Comman
 
 									case OBJ_RECT:
 									case OBJ_CIRC:
-									case OBJ_FREEFILL:
-									case OBJ_PATHFILL:
-									case OBJ_POLY:
-									case OBJ_SECT:
-									case OBJ_CARC:
-									case OBJ_CCUT:
 										nSdResId = bGraphicShell ? RID_GRAPHIC_GEOMOBJ_POPUP :
 																	RID_DRAW_GEOMOBJ_POPUP;
 										break;

Modified: incubator/ooo/branches/alg/aw080/main/sd/source/ui/view/drviews7.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sd/source/ui/view/drviews7.cxx?rev=1347716&r1=1347715&r2=1347716&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sd/source/ui/view/drviews7.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sd/source/ui/view/drviews7.cxx Thu Jun  7 17:08:07 2012
@@ -1408,12 +1408,49 @@ void DrawViewShell::GetMenuState( SfxIte
 				// 2D objects
 				switch( nId )
 				{
-					case OBJ_PATHLINE :
-					case OBJ_PLIN :
-					case OBJ_LINE:
-					case OBJ_FREELINE :
+                    case OBJ_POLY:
+                    {
+                        SdrPathObj* pSdrPathObj = dynamic_cast< SdrPathObj* >(pObj);
+
+                        if(pSdrPathObj)
+                        {
+                            switch(pSdrPathObj->getSdrPathObjType())
+                            {
+                                case PathType_Line:
+                                case PathType_OpenPolygon:
+                                case PathType_OpenBezier:
+                                {
+						            bFoundObjNoArea = true;
+						            bFoundNoGraphicObj = true;
+                                    break;
+                                }
+                            }
+                        }
+                        else
+                        {
+                            OSL_ENSURE(false, "OOps, SdrObjKind and dynamic_cast do not fit (!)");
+                        }
+                        break;
+                    }
+                    case OBJ_CIRC:
+                    {
+                        SdrCircObj* pSdrCircObj = dynamic_cast< SdrCircObj* >(pObj);
+
+                        if(pSdrCircObj)
+                        {
+                            if(CircleType_Arc == pSdrCircObj->GetSdrCircleObjType())
+                            {
+						        bFoundObjNoArea = true;
+						        bFoundNoGraphicObj = true;
+                            }
+                        }
+                        else
+                        {
+                            OSL_ENSURE(false, "OOps, SdrObjKind and dynamic_cast do not fit (!)");
+                        }
+                        break;
+                    }
 					case OBJ_EDGE:
-					case OBJ_CARC :
 						bFoundObjNoArea      = true;
 						bFoundNoGraphicObj = true;
 						break;

Modified: incubator/ooo/branches/alg/aw080/main/sd/source/ui/view/drviewse.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sd/source/ui/view/drviewse.cxx?rev=1347716&r1=1347715&r2=1347716&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sd/source/ui/view/drviewse.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sd/source/ui/view/drviewse.cxx Thu Jun  7 17:08:07 2012
@@ -1575,7 +1575,8 @@ void DrawViewShell::InsertURLButton(cons
     if (bNewObj) try
     {
         SdrUnoObj* pUnoCtrl = static_cast< SdrUnoObj* >(SdrObjFactory::MakeNewObject(
-			*GetDoc(), FmFormInventor, OBJ_FM_BUTTON)); 
+			*GetDoc(), 
+            SdrObjectCreationInfo(OBJ_FM_BUTTON, FmFormInventor))); 
 
         Reference< awt::XControlModel > xControlModel( pUnoCtrl->GetUnoControlModel(), uno::UNO_QUERY_THROW );
 		Reference< beans::XPropertySet > xPropSet( xControlModel, uno::UNO_QUERY_THROW );

Modified: incubator/ooo/branches/alg/aw080/main/sd/source/ui/view/drviewsj.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sd/source/ui/view/drviewsj.cxx?rev=1347716&r1=1347715&r2=1347716&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sd/source/ui/view/drviewsj.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sd/source/ui/view/drviewsj.cxx Thu Jun  7 17:08:07 2012
@@ -169,27 +169,29 @@ void DrawViewShell::GetMenuStateSel( Sfx
 				rSet.DisableItem(SID_CONVERT_TO_24BIT);
 			}
 
-			if( nInv == SdrInventor &&
-			   (nId == OBJ_LINE ||
-				nId == OBJ_PLIN ||
-				nId == OBJ_PATHLINE ||
-				nId == OBJ_FREELINE ))
-			{
-				//rSet.DisableItem( SID_ATTRIBUTES_AREA ); // wieder raus!
-				rSet.DisableItem( SID_ATTR_FILL_STYLE );
-			}
-			if( (!dynamic_cast< const SdrPathObj* >(pSingleObject) && !aInfoRec.mbCanConvToPath) 
-				|| pSdrObjGroup ) // Solange es JOE fehlerhaft behandelt!
+            const SdrPathObj* pSdrPathObj = dynamic_cast< const SdrPathObj* >(pSingleObject);
+
+            if(pSdrPathObj)
+            {
+                if(!pSdrPathObj->isClosed())
+                {
+      				rSet.DisableItem( SID_ATTR_FILL_STYLE );
+                }
+            }
+			
+            if( (!pSdrPathObj && !aInfoRec.mbCanConvToPath) || pSdrObjGroup ) // Solange es JOE fehlerhaft behandelt!
 			{ 
 				// JOE: Ein Gruppenobjekt kann eben u.U. in ein PathObj gewandelt werden
 				rSet.DisableItem( SID_LINEEND_POLYGON );
 			}
-			if(nInv == SdrInventor &&
-			   (nId == OBJ_PATHFILL || nId == OBJ_PATHLINE || !aInfoRec.mbCanConvToPath))
+			
+            if((pSdrPathObj && pSdrPathObj->isBezier()) || !aInfoRec.mbCanConvToPath)
+            {
 				rSet.DisableItem( SID_CHANGEBEZIER );
+            }
 
 			if( nInv == SdrInventor &&
-				( nId == OBJ_POLY || nId == OBJ_PLIN || !aInfoRec.mbCanConvToPoly ) &&
+				((pSdrPathObj && !pSdrPathObj->isBezier()) || !aInfoRec.mbCanConvToPoly ) &&
 				!GetView()->IsVectorizeAllowed() )
 			{
 				rSet.DisableItem( SID_CHANGEPOLYGON );
@@ -338,19 +340,26 @@ void DrawViewShell::GetMenuStateSel( Sfx
 				{
 					switch (nId)
 					{
+                        case OBJ_POLY:
+                        {
+                            SdrPathObj* pSdrPathObj = dynamic_cast< SdrPathObj* >(pObj);
+
+                            if(pSdrPathObj)
+                            {
+                                bDrawObj = true;
+                                bLine = pSdrPathObj->isLine();
+                            }
+                            else
+                            {
+                                OSL_ENSURE(false, "OOps, SdrObjKind and dynamic_cast do not fit (!)");
+                            }
+                            break;
+                        }
 						case OBJ_TEXT: bText = true; break;
-						case OBJ_LINE: bLine = true; break;
 						case OBJ_EDGE: bEdgeObj = true; break;
 						case OBJ_MEASURE: bMeasureObj = true; break;
 						case OBJ_RECT:
-						case OBJ_CIRC:
-						case OBJ_FREELINE:
-						case OBJ_FREEFILL:
-						case OBJ_PATHFILL:
-						case OBJ_PATHLINE:
-						case OBJ_SECT:
-						case OBJ_CARC:
-						case OBJ_CCUT: bDrawObj = true; break;
+						case OBJ_CIRC: bDrawObj = true; break;
 						case OBJ_GRUP: bGroup = true; break;
 						case OBJ_GRAF: bGraf = true; break;
 						case OBJ_TITLETEXT:
@@ -364,7 +373,7 @@ void DrawViewShell::GetMenuStateSel( Sfx
 						b3dObj = true;
 					else if(dynamic_cast< E3dCompoundObject* >(pObj))
 						bE3dCompoundObject = true;
-			}
+			    }
 			}
 			if( bLine && !bText && !bDrawObj &&!b3dObj)
 			{

Modified: incubator/ooo/branches/alg/aw080/main/sd/source/ui/view/sdview.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sd/source/ui/view/sdview.cxx?rev=1347716&r1=1347715&r2=1347716&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sd/source/ui/view/sdview.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sd/source/ui/view/sdview.cxx Thu Jun  7 17:08:07 2012
@@ -1033,37 +1033,38 @@ bool View::IsMorphingAllowed() const
 	{
 		const SdrObject* pObj1 = aSelection[0];
 		const SdrObject* pObj2 = aSelection[1];
-		const sal_uInt16		nKind1 = pObj1->GetObjIdentifier();
-		const sal_uInt16		nKind2 = pObj2->GetObjIdentifier();
+        const SdrPathObj* pSdrPathObj = dynamic_cast< const SdrPathObj* >(pObj1);
 
-		if ( ( nKind1 != OBJ_TEXT && nKind2 != OBJ_TEXT ) &&
-			 ( nKind1 != OBJ_TITLETEXT && nKind2 != OBJ_TITLETEXT ) &&
-			 ( nKind1 != OBJ_OUTLINETEXT && nKind2 != OBJ_OUTLINETEXT ) &&
-			 ( nKind1 != OBJ_GRUP && nKind2 != OBJ_GRUP ) &&
-			 ( nKind1 != OBJ_LINE && nKind2 != OBJ_LINE ) &&
-			 ( nKind1 != OBJ_PLIN && nKind2 != OBJ_PLIN ) &&
-			 ( nKind1 != OBJ_PATHLINE && nKind2 != OBJ_PATHLINE ) &&
-			 ( nKind1 != OBJ_FREELINE && nKind2 != OBJ_FREELINE ) &&
-			 ( nKind1 != OBJ_PATHPLIN && nKind2 != OBJ_PATHPLIN ) &&
-			 ( nKind1 != OBJ_MEASURE && nKind2 != OBJ_MEASURE ) &&
-			 ( nKind1 != OBJ_EDGE && nKind2 != OBJ_EDGE ) &&
-			 ( nKind1 != OBJ_GRAF && nKind2 != OBJ_GRAF ) &&
-			 ( nKind1 != OBJ_OLE2 && nKind2 != OBJ_OLE2 ) &&
-			 ( nKind1 != OBJ_CAPTION && nKind2 !=  OBJ_CAPTION ) &&
-			 !dynamic_cast< const E3dObject* >(pObj1) && !dynamic_cast< const E3dObject* >(pObj2) )
-		{
-			SfxItemSet		aSet1( mpDoc->GetItemPool(), XATTR_FILLSTYLE, XATTR_FILLSTYLE );
-			SfxItemSet		aSet2( mpDoc->GetItemPool(), XATTR_FILLSTYLE, XATTR_FILLSTYLE );
-
-			aSet1.Put(pObj1->GetMergedItemSet());
-			aSet2.Put(pObj2->GetMergedItemSet());
-
-			const XFillStyle	eFillStyle1 = ( (const XFillStyleItem&) aSet1.Get( XATTR_FILLSTYLE ) ).GetValue();
-			const XFillStyle	eFillStyle2 = ( (const XFillStyleItem&) aSet2.Get( XATTR_FILLSTYLE ) ).GetValue();
-
-			if( ( eFillStyle1 == XFILL_NONE || eFillStyle1 == XFILL_SOLID ) &&
-				( eFillStyle2 == XFILL_NONE || eFillStyle2 == XFILL_SOLID ) )
-				bRet = true;
+        if(!pSdrPathObj || pSdrPathObj->isClosed()) // not a path or closed (not OBJ_LINE, OBJ_PLIN, OBJ_PATHLINE, OBJ_FREELINE or OBJ_PATHPLIN)
+        {
+            pSdrPathObj = dynamic_cast< const SdrPathObj* >(pObj2);
+
+            if(!pSdrPathObj || pSdrPathObj->isClosed()) // not a path or closed (not OBJ_LINE, OBJ_PLIN, OBJ_PATHLINE, OBJ_FREELINE or OBJ_PATHPLIN)
+            {
+		        const sal_uInt16 nKind1 = pObj1->GetObjIdentifier();
+		        const sal_uInt16 nKind2 = pObj2->GetObjIdentifier();
+
+		        if ( ( nKind1 != OBJ_TEXT && nKind2 != OBJ_TEXT ) &&
+			         ( nKind1 != OBJ_TITLETEXT && nKind2 != OBJ_TITLETEXT ) &&
+			         ( nKind1 != OBJ_OUTLINETEXT && nKind2 != OBJ_OUTLINETEXT ) &&
+			         ( nKind1 != OBJ_GRUP && nKind2 != OBJ_GRUP ) &&
+			         ( nKind1 != OBJ_MEASURE && nKind2 != OBJ_MEASURE ) &&
+			         ( nKind1 != OBJ_EDGE && nKind2 != OBJ_EDGE ) &&
+			         ( nKind1 != OBJ_GRAF && nKind2 != OBJ_GRAF ) &&
+			         ( nKind1 != OBJ_OLE2 && nKind2 != OBJ_OLE2 ) &&
+			         ( nKind1 != OBJ_CAPTION && nKind2 !=  OBJ_CAPTION ) &&
+			         !dynamic_cast< const E3dObject* >(pObj1) && !dynamic_cast< const E3dObject* >(pObj2) )
+		        {
+			        const XFillStyle eFillStyle1(((const XFillStyleItem&)pObj1->GetMergedItem(XATTR_FILLSTYLE)).GetValue());
+			        const XFillStyle eFillStyle2(((const XFillStyleItem&)pObj2->GetMergedItem(XATTR_FILLSTYLE)).GetValue());
+
+			        if( ( eFillStyle1 == XFILL_NONE || eFillStyle1 == XFILL_SOLID ) &&
+				        ( eFillStyle2 == XFILL_NONE || eFillStyle2 == XFILL_SOLID ) )
+                    {
+				        bRet = true;
+                    }
+                }
+            }
 		}
 	}
 

Modified: incubator/ooo/branches/alg/aw080/main/svx/Library_svxcore.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/svx/Library_svxcore.mk?rev=1347716&r1=1347715&r2=1347716&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/svx/Library_svxcore.mk (original)
+++ incubator/ooo/branches/alg/aw080/main/svx/Library_svxcore.mk Thu Jun  7 17:08:07 2012
@@ -325,6 +325,7 @@ $(eval $(call gb_Library_add_exception_o
     svx/source/svdraw/svdoashp \
     svx/source/svdraw/svdoattr \
     svx/source/svdraw/svdobj \
+    svx/source/svdraw/sdrobjectfactory \
     svx/source/svdraw/svdocapt \
     svx/source/svdraw/svdocirc \
     svx/source/svdraw/svdoedge \

Modified: incubator/ooo/branches/alg/aw080/main/svx/Package_inc.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/svx/Package_inc.mk?rev=1347716&r1=1347715&r2=1347716&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/svx/Package_inc.mk (original)
+++ incubator/ooo/branches/alg/aw080/main/svx/Package_inc.mk Thu Jun  7 17:08:07 2012
@@ -376,6 +376,7 @@ $(eval $(call gb_Package_add_file,svx_in
 $(eval $(call gb_Package_add_file,svx_inc,inc/svx/ChildrenManager.hxx,svx/ChildrenManager.hxx))
 $(eval $(call gb_Package_add_file,svx_inc,inc/svx/fmgridcl.hxx,svx/fmgridcl.hxx))
 $(eval $(call gb_Package_add_file,svx_inc,inc/svx/svdobj.hxx,svx/svdobj.hxx))
+$(eval $(call gb_Package_add_file,svx_inc,inc/svx/sdrobjectfactory.hxx,svx/sdrobjectfactory.hxx))
 $(eval $(call gb_Package_add_file,svx_inc,inc/svx/clipboardctl.hxx,svx/clipboardctl.hxx))
 $(eval $(call gb_Package_add_file,svx_inc,inc/svx/xtable.hxx,svx/xtable.hxx))
 $(eval $(call gb_Package_add_file,svx_inc,inc/svx/sdgcoitm.hxx,svx/sdgcoitm.hxx))

Modified: incubator/ooo/branches/alg/aw080/main/svx/inc/svx/SvxShapeTypes.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/svx/inc/svx/SvxShapeTypes.hxx?rev=1347716&r1=1347715&r2=1347716&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/svx/inc/svx/SvxShapeTypes.hxx (original)
+++ incubator/ooo/branches/alg/aw080/main/svx/inc/svx/SvxShapeTypes.hxx Thu Jun  7 17:08:07 2012
@@ -50,8 +50,6 @@ enum SvxShapeTypes
     DRAWING_POLY_LINE,
     DRAWING_OPEN_BEZIER,
     DRAWING_CLOSED_BEZIER,
-    DRAWING_OPEN_FREEHAND,
-    DRAWING_CLOSED_FREEHAND,
     DRAWING_POLY_POLYGON_PATH,
     DRAWING_POLY_LINE_PATH,
     DRAWING_GRAPHIC_OBJECT,

Modified: incubator/ooo/branches/alg/aw080/main/svx/inc/svx/fmglob.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/svx/inc/svx/fmglob.hxx?rev=1347716&r1=1347715&r2=1347716&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/svx/inc/svx/fmglob.hxx (original)
+++ incubator/ooo/branches/alg/aw080/main/svx/inc/svx/fmglob.hxx Thu Jun  7 17:08:07 2012
@@ -28,6 +28,7 @@
 #include <svx/svdobj.hxx>
 #include <com/sun/star/form/FormComponentType.hpp>
 
+// TTTT: Needed at all? SdrObjKind == OBJ_UNO for all these anyways
 const sal_uInt32 FmFormInventor = sal_uInt32('F')*0x00000001+
 							  sal_uInt32('M')*0x00000100+
 							  sal_uInt32('0')*0x00010000+

Modified: incubator/ooo/branches/alg/aw080/main/svx/inc/svx/galmisc.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/svx/inc/svx/galmisc.hxx?rev=1347716&r1=1347715&r2=1347716&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/svx/inc/svx/galmisc.hxx (original)
+++ incubator/ooo/branches/alg/aw080/main/svx/inc/svx/galmisc.hxx Thu Jun  7 17:08:07 2012
@@ -35,6 +35,7 @@
 #include "svx/svxdllapi.h"
 #include <tools/date.hxx>
 #include <tools/time.hxx>
+#include <svx/sdrobjectfactory.hxx>
 
 // ------------
 // - Forwards -

Modified: incubator/ooo/branches/alg/aw080/main/svx/inc/svx/globl3d.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/svx/inc/svx/globl3d.hxx?rev=1347716&r1=1347715&r2=1347716&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/svx/inc/svx/globl3d.hxx (original)
+++ incubator/ooo/branches/alg/aw080/main/svx/inc/svx/globl3d.hxx Thu Jun  7 17:08:07 2012
@@ -42,7 +42,7 @@ const sal_uInt16 E3D_CUBEOBJ_ID 	= 3;
 const sal_uInt16 E3D_SPHEREOBJ_ID	= 4;
 const sal_uInt16 E3D_EXTRUDEOBJ_ID	= 5;
 const sal_uInt16 E3D_LATHEOBJ_ID	= 6;
-const sal_uInt16 E3D_COMPOUNDOBJ_ID = 7;
+const sal_uInt16 E3D_COMPOUNDOBJ_ID = 7; // TTTT should not be used, is a base class only
 const sal_uInt16 E3D_POLYGONOBJ_ID 	= 8;
 
 #endif		// _E3D_GLOBL3D_HXX

Modified: incubator/ooo/branches/alg/aw080/main/svx/inc/svx/graphctl.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/svx/inc/svx/graphctl.hxx?rev=1347716&r1=1347715&r2=1347716&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/svx/inc/svx/graphctl.hxx (original)
+++ incubator/ooo/branches/alg/aw080/main/svx/inc/svx/graphctl.hxx Thu Jun  7 17:08:07 2012
@@ -59,7 +59,7 @@ class SVX_DLLPUBLIC GraphCtrl : public C
 	Size				aGraphSize;
 	Point				aMousePos;
 	WinBits				nWinStyle;
-	SdrObjKind			eObjKind;
+	SdrObjectCreationInfo   maSdrObjectCreationInfo;
 	sal_uInt16				nPolyEdit;
 	sal_Bool				bEditMode;
 	sal_Bool				bSdrMode;
@@ -115,8 +115,8 @@ public:
 	void				SetPolyEditMode( const sal_uInt16 nPolyEdit );
 	sal_uInt16				GetPolyEditMode() const { return nPolyEdit; }
 
-	void				SetObjKind( const SdrObjKind eObjKind );
-	SdrObjKind			GetObjKind() const { return eObjKind; }
+	void setSdrObjectCreationInfo( const SdrObjectCreationInfo& rSdrObjectCreationInfo );
+	const SdrObjectCreationInfo& getSdrObjectCreationInfo() const { return maSdrObjectCreationInfo; }
 
 	SdrModel*			GetSdrModel() const { return pModel; }
 	SdrView*			GetSdrView() const { return pView; }

Added: incubator/ooo/branches/alg/aw080/main/svx/inc/svx/sdrobjectfactory.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/svx/inc/svx/sdrobjectfactory.hxx?rev=1347716&view=auto
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/svx/inc/svx/sdrobjectfactory.hxx (added)
+++ incubator/ooo/branches/alg/aw080/main/svx/inc/svx/sdrobjectfactory.hxx Thu Jun  7 17:08:07 2012
@@ -0,0 +1,116 @@
+/**************************************************************
+ * 
+ * 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 _SVDOBJFACTORY_HXX
+#define _SVDOBJFACTORY_HXX
+
+#include <svx/svdmodel.hxx>
+#include <svx/svdocirc.hxx>
+#include <svx/svdopath.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+
+class SVX_DLLPUBLIC SdrObjectCreationInfo
+{
+private:
+	sal_uInt16			mnIdent;    // object identifier (SdrObjKind)
+	sal_uInt32			mnInvent;   // object inventor
+    SdrPathObjType      maSdrPathObjType; // if OBJ_POLY defines target object type
+    SdrCircleObjType    maSdrCircleObjType; // if OBJ_CIRC defines target object type
+
+    /// bitfield
+    bool                mbFreehandMode : 1; // if OBJ_POLY, allow freehand creation
+
+public:
+    SdrObjectCreationInfo(
+        sal_uInt16 nIdent = OBJ_NONE, 
+        sal_uInt32 nInvent = SdrInventor, 
+        SdrPathObjType aSdrPathObjType = PathType_Line,
+        SdrCircleObjType aSdrCircleObjType = CircleType_Circle,
+        bool bFreehandMode = false)
+    :   mnIdent(nIdent),
+        mnInvent(nInvent),
+        maSdrPathObjType(aSdrPathObjType),
+        maSdrCircleObjType(aSdrCircleObjType),
+        mbFreehandMode(bFreehandMode)
+    {
+    }
+
+    const sal_uInt16 getIdent() const { return mnIdent; }
+    void setIdent(const sal_uInt16 nNew) { mnIdent = nNew; }
+
+    const sal_uInt32 getInvent() const { return mnInvent; }
+    void setInvent(const sal_uInt32 nNew) { mnInvent = nNew; }
+    
+    const SdrPathObjType& getSdrPathObjType() const { return maSdrPathObjType; }
+    void setSdrPathObjType(const SdrPathObjType& rNew) { maSdrPathObjType = rNew; }
+
+    const SdrCircleObjType& getSdrCircleObjType() const { return maSdrCircleObjType; }
+    void setSdrCircleObjType(const SdrCircleObjType& rNew) { maSdrCircleObjType = rNew; }
+
+    const bool getFreehandMode() const { return mbFreehandMode; }
+    void setFreehandMode(const bool bNew) { mbFreehandMode = bNew; }
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+class SVX_DLLPUBLIC SdrObjFactory
+{
+private:
+	SdrModel&						mrTargetModel;
+    SdrObjectCreationInfo           maSdrObjectCreationInfo;
+
+	// fuer MakeNewObj():
+	SdrObject*						mpNewObj;
+
+	// fuer MakeNewObjUserData():
+	SdrObject*						mpObj;
+	SdrObjUserData*					mpNewData;
+
+	SVX_DLLPRIVATE SdrObjFactory(SdrModel& rTargetModel, const SdrObjectCreationInfo& rSdrObjectCreationInfo);
+	SVX_DLLPRIVATE SdrObjFactory(const SdrObjectCreationInfo& rSdrObjectCreationInfo, SdrObject& rObj1);
+
+public:
+	static SdrObject* MakeNewObject(SdrModel& rTargetModel, const SdrObjectCreationInfo& rSdrObjectCreationInfo);
+	static void InsertMakeObjectHdl(const Link& rLink);
+	static void RemoveMakeObjectHdl(const Link& rLink);
+
+	static SdrObjUserData* MakeNewObjUserData(const SdrObjectCreationInfo& rSdrObjectCreationInfo, SdrObject& rObj);
+	static void InsertMakeUserDataHdl(const Link& rLink);
+	static void RemoveMakeUserDataHdl(const Link& rLink);
+
+    SdrModel& getTargetModel() const { return mrTargetModel; }
+    const SdrObjectCreationInfo& getSdrObjectCreationInfo() const { return maSdrObjectCreationInfo; }
+    SdrObject* getSdrObjUserDataTargetSdrObject() const { return mpObj; }
+    SdrObjUserData* getNewSdrObjUserData() const { return mpNewData; }
+
+    void setNewSdrObject(SdrObject* pNew) { mpNewObj = pNew; }
+    void setNewSdrObjUserData(SdrObjUserData* pNew) { mpNewData = pNew; }
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_SVDOBJFACTORY_HXX
+
+//////////////////////////////////////////////////////////////////////////////
+// eof

Propchange: incubator/ooo/branches/alg/aw080/main/svx/inc/svx/sdrobjectfactory.hxx
------------------------------------------------------------------------------
    svn:executable = *

Modified: incubator/ooo/branches/alg/aw080/main/svx/inc/svx/svdcrtv.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/svx/inc/svx/svdcrtv.hxx?rev=1347716&r1=1347715&r2=1347716&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/svx/inc/svx/svdcrtv.hxx (original)
+++ incubator/ooo/branches/alg/aw080/main/svx/inc/svx/svdcrtv.hxx Thu Jun  7 17:08:07 2012
@@ -26,6 +26,7 @@
 
 #include <svx/svddrgv.hxx>
 #include "svx/svxdllapi.h"
+#include <svx/sdrobjectfactory.hxx>
 
 ////////////////////////////////////////////////////////////////////////////////////////////////////
 // predefines
@@ -47,14 +48,13 @@ protected:
 	// compile the apps all the time
 	ImpSdrCreateViewExtraData*	mpCreateViewExtraData;
 
-	Pointer						maCreatePointer;
+    // necessary data for new object creation
+    SdrObjectCreationInfo       maSdrObjectCreationInfo;
+	Pointer			            maCreatePointer;
 
 	sal_uInt16					mnAutoCloseDistPix;
 	sal_uInt16					mnFreeHandMinDistPix;
 
-	sal_uInt32					mnAktInvent;     // Aktuell eingestelltes
-	sal_uInt16					mnAktIdent;      // Obj fuer Neuerzeugung
-
 	/// bitfield
 	bool						mbAutoTextEdit : 1; // Textedit nach dem erzeugen eines Textrahmens starten
 	bool						mb1stPointAsCenter : 1;
@@ -62,8 +62,12 @@ protected:
 
 	void ImpClearConnectMarker();
 
-	bool ImpBegCreateObj(sal_uInt32 nInvent, sal_uInt16 nIdent, const basegfx::B2DPoint& rPnt, OutputDevice* pOut,
-		double fMinMovLogic, const basegfx::B2DRange& rLogRange, SdrObject* pPreparedFactoryObject);
+	bool ImpBegCreateObj(
+        const SdrObjectCreationInfo& rSdrObjectCreationInfo, 
+        const basegfx::B2DPoint& rPnt, 
+		double fMinMovLogic, 
+        const basegfx::B2DRange& rLogRange, 
+        SdrObject* pPreparedFactoryObject);
 
 	void ShowCreateObj();
 	void HideCreateObj();
@@ -74,7 +78,13 @@ protected:
 	virtual ~SdrCreateView();
 
 public:
-	virtual bool IsAction() const;
+    const SdrObjectCreationInfo& getSdrObjectCreationInfo() const { return maSdrObjectCreationInfo; }
+    void setSdrObjectCreationInfo(const SdrObjectCreationInfo& rSdrObjectCreationInfo);
+
+    const Pointer& getCreatePointer() const { return maCreatePointer; }
+    void setCreatePointer(const Pointer& rNew) { maCreatePointer = rNew; }
+
+    virtual bool IsAction() const;
 	virtual void MovAction(const basegfx::B2DPoint& rPnt);
 	virtual void EndAction();
 	virtual void BckAction();
@@ -98,12 +108,8 @@ public:
 	// Feststellen, ob Bemassungswerkzeug aktiviert
 	bool IsMeasureTool() const;
 
-	void SetCurrentObj(sal_uInt16 nIdent, sal_uInt32 nInvent=SdrInventor);
-	sal_uInt32 GetCurrentObjInventor() const { return mnAktInvent; }
-	sal_uInt16 GetCurrentObjIdentifier() const { return mnAktIdent; }
-
 	// Starten des normalen Create
-	bool BegCreateObj(const basegfx::B2DPoint& rPnt, OutputDevice* pOut = 0, double fMinMovLogic = 3.0);
+	bool BegCreateObj(const basegfx::B2DPoint& rPnt, double fMinMovLogic = 3.0);
 	bool BegCreatePreparedObject(const basegfx::B2DPoint& rPnt, double fMinMovLogic, SdrObject* pPreparedFactoryObject);
 	void MovCreateObj(const basegfx::B2DPoint& rPnt);
 	bool EndCreateObj(SdrCreateCmd eCmd);
@@ -114,8 +120,7 @@ public:
 	// BegCreateCaptionObj() erzeugt ein SdrCaptionObj (Legendenobjekt).
 	// rObjSiz ist die anfaengliche Groesse des Legenden-Textrahmens.
 	// gedraggd wird lediglich die Laenge des Zipfel.
-	bool BegCreateCaptionObj(const basegfx::B2DPoint& rPnt, const basegfx::B2DVector& rObjSiz, OutputDevice* pOut = 0, 
-		double fMinMovLogic = 3.0);
+	bool BegCreateCaptionObj(const basegfx::B2DPoint& rPnt, const basegfx::B2DVector& rObjSiz, double fMinMovLogic = 3.0);
 
 	// Wenn TextEditAfterCreate auf sal_True steht (das ist der Default),
 	// dann wird nach dem erzeugen eines Textrahmenobjekts (OBJ_TEXT,

Modified: incubator/ooo/branches/alg/aw080/main/svx/inc/svx/svdobj.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/svx/inc/svx/svdobj.hxx?rev=1347716&r1=1347715&r2=1347716&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/svx/inc/svx/svdobj.hxx (original)
+++ incubator/ooo/branches/alg/aw080/main/svx/inc/svx/svdobj.hxx Thu Jun  7 17:08:07 2012
@@ -44,6 +44,7 @@
 #include <basegfx/matrix/b2dhommatrixtools.hxx>
 #include <svx/svdpool.hxx>
 #include <boost/utility.hpp>
+#include <svx/unoprov.hxx>
 
 //////////////////////////////////////////////////////////////////////////////
 // predefines
@@ -87,18 +88,18 @@ enum SdrObjKind 
 {
 	OBJ_NONE = 0   ,  //            Abstraktes Objekt (SdrObject)
 	OBJ_GRUP       ,  //            Objektgruppe
-	OBJ_LINE       ,  // OBJ_POLY   Strecke
+//	OBJ_LINE       ,  // OBJ_POLY   Strecke
 	OBJ_RECT       ,  //            Rechteck ww. mit runden Ecken
 	OBJ_CIRC       ,  //            Kreis, Ellipse
-	OBJ_SECT       ,  // OBJ_CIRC   Kreissektor
-	OBJ_CARC       ,  // OBJ_CIRC   Kreisbogen
-	OBJ_CCUT       ,  // OBJ_CIRC   Kreisabschnitt
+//	OBJ_SECT       ,  // OBJ_CIRC   Kreissektor
+//	OBJ_CARC       ,  // OBJ_CIRC   Kreisbogen
+//	OBJ_CCUT       ,  // OBJ_CIRC   Kreisabschnitt
 	OBJ_POLY       ,  //            Polygon, PolyPolygon
-	OBJ_PLIN       ,  // OBJ_POLY   PolyLine
-	OBJ_PATHLINE   ,  // OBJ_POLY   Offene Bezierkurve
-	OBJ_PATHFILL   ,  // OBJ_POLY   Geschlossene Bezierkurve
-	OBJ_FREELINE   ,  //            Offene Freihandlinie
-	OBJ_FREEFILL   ,  //            Geschlossene Freihandlinie
+//	OBJ_PLIN       ,  // OBJ_POLY   PolyLine
+//	OBJ_PATHLINE   ,  // OBJ_POLY   Offene Bezierkurve
+//	OBJ_PATHFILL   ,  // OBJ_POLY   Geschlossene Bezierkurve
+//	OBJ_FREELINE   ,  // OBJ_POLY   Offene Freihandlinie
+//	OBJ_FREEFILL   ,  // OBJ_POLY   Geschlossene Freihandlinie
 	OBJ_TEXT       ,  //            Textobjekt
 	OBJ_TITLETEXT  ,  //            Titeltext. Spezial-Textobjekt fuer StarDraw
 	OBJ_OUTLINETEXT,  //            OutlineText. Spezial-Textobjekt fuer StarDraw
@@ -106,8 +107,8 @@ enum SdrObjKind 
 	OBJ_OLE2       ,  //            OLE-Objekt
 	OBJ_EDGE       ,  //            Verbindungsobjekt fuer Konnektoren
 	OBJ_CAPTION    ,  //            Legendenobjekt
-	OBJ_PATHPOLY   ,  //            Polygon/PolyPolygon dargestellt durch SdrPathObj
-	OBJ_PATHPLIN   ,  //            Polyline dargestellt durch SdrPathObj
+//	OBJ_PATHPOLY   ,  // Needed?    Polygon/PolyPolygon dargestellt durch SdrPathObj
+//	OBJ_PATHPLIN   ,  // Needed?    Polyline dargestellt durch SdrPathObj
 	OBJ_PAGE       ,  //            Objekt, das eine SdrPage darstellt
 	OBJ_MEASURE    ,  //            Bemassungsobjekt
 	OBJ_FRAME      ,  //            staendig aktives OLE (PlugIn-Frame oder sowas)
@@ -869,36 +870,6 @@ typedef tools::WeakReference< SdrObject 
 
 //////////////////////////////////////////////////////////////////////////////
 
-class SVX_DLLPUBLIC SdrObjFactory
-{
-public:
-	SdrModel*						mpTargetModel;
-	sal_uInt32						mnInventor;
-	sal_uInt16						mnIdentifier;
-
-	// fuer MakeNewObj():
-	SdrObject*						mpNewObj;
-
-	// fuer MakeNewObjUserData():
-	SdrObject*						mpObj;
-	SdrObjUserData*					mpNewData;
-
-private:
-	SVX_DLLPRIVATE SdrObjFactory(SdrModel& rTargetModel, sal_uInt32 nInvent, sal_uInt16 nIdent);
-	SVX_DLLPRIVATE SdrObjFactory(sal_uInt32 nInvent, sal_uInt16 nIdent, SdrObject& rObj1);
-
-public:
-	static SdrObject* MakeNewObject(SdrModel& rTargetModel, sal_uInt32 nInvent, sal_uInt16 nIdent);
-	static void InsertMakeObjectHdl(const Link& rLink);
-	static void RemoveMakeObjectHdl(const Link& rLink);
-
-	static SdrObjUserData* MakeNewObjUserData(sal_uInt32 nInvent, sal_uInt16 nIdent, SdrObject& rObj);
-	static void InsertMakeUserDataHdl(const Link& rLink);
-	static void RemoveMakeUserDataHdl(const Link& rLink);
-};
-
-//////////////////////////////////////////////////////////////////////////////
-
 #endif //_SVDOBJ_HXX
 
 //////////////////////////////////////////////////////////////////////////////

Modified: incubator/ooo/branches/alg/aw080/main/svx/inc/svx/svdocirc.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/svx/inc/svx/svdocirc.hxx?rev=1347716&r1=1347715&r2=1347716&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/svx/inc/svx/svdocirc.hxx (original)
+++ incubator/ooo/branches/alg/aw080/main/svx/inc/svx/svdocirc.hxx Thu Jun  7 17:08:07 2012
@@ -47,8 +47,8 @@ class SVX_DLLPUBLIC SdrCircObj : public 
 protected:
 	virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact();
 
-	// OBJ_CIRC || OBJ_CCUT || OBJ_CARC || OBJ_SECT, default is OBJ_CIRC
-    SdrObjKind					meCircleKind;
+    // type of object
+    SdrCircleObjType            meSdrCircleObjType;
 
 	// [0.0 .. F_2PI], default is 0.0 for start and F_2PI for end
 	double						mfStartAngle;
@@ -65,7 +65,7 @@ public:
 
 	SdrCircObj(
 		SdrModel& rSdrModel,
-		SdrObjKind eNewKind = OBJ_CIRC, // OBJ_CIRC || OBJ_CCUT || OBJ_CARC || OBJ_SECT
+		SdrCircleObjType eSdrCircleObjType = CircleType_Circle,
 		const basegfx::B2DHomMatrix& rTransform = basegfx::B2DHomMatrix(), 
 		double fNewStartWink = 0.0, 
 		double fNewEndWink = F_2PI);
@@ -73,11 +73,12 @@ public:
 	virtual bool IsClosedObj() const;
 	double GetStartAngle() const;
 	double GetEndAngle() const;
-	SdrObjKind GetCircleKind() const;
+	
+    SdrCircleObjType GetSdrCircleObjType() const;
+	void SetSdrCircleObjType(SdrCircleObjType eNew);
 
 	void SetStartAngle(double fNew);
 	void SetEndAngle(double fNew);
-	void SetCircleKind(SdrObjKind eNew); // only OBJ_CIRC, OBJ_CCUT, OBJ_CARC and OBJ_SECT allowed
 
 	virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const;
 	virtual sal_uInt16 GetObjIdentifier() const;

Modified: incubator/ooo/branches/alg/aw080/main/svx/inc/svx/svdopath.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/svx/inc/svx/svdopath.hxx?rev=1347716&r1=1347715&r2=1347716&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/svx/inc/svx/svdopath.hxx (original)
+++ incubator/ooo/branches/alg/aw080/main/svx/inc/svx/svdopath.hxx Thu Jun  7 17:08:07 2012
@@ -41,7 +41,6 @@ class SdrPathObjGeoData : public SdrObjG
 {
 public:
 	basegfx::B2DPolyPolygon	maPathPolygon;
-	SdrObjKind					meKind;
 
 	SdrPathObjGeoData();
 	virtual ~SdrPathObjGeoData();
@@ -74,17 +73,13 @@ protected:
 	// the geometry data in object coordinates. This means that it is not
 	// in normalized form. To get it in normalized form You need to transform
 	// with the inverse of the object matrix
-    basegfx::B2DPolyPolygon	maPathPolygon;
-
-	// classic object kind (may change at this object)
-	SdrObjKind					meKind;
+    basegfx::B2DPolyPolygon     maPathPolygon;
 
 	// for isolation of old Drag/Create code
 	ImpPathForDragAndCreate*	mpDAC;
 
 	// helpers for GET/SET/INS/etc. PNT
-	void ImpSetClosed(sal_Bool bClose);
-	void ImpForceKind();
+	void ImpSetClosed(bool bClose);
 	void ImpForceLineWink();
 	ImpPathForDragAndCreate& impGetDAC(const SdrView& rView) const;
 	void impDeleteDAC() const;
@@ -98,6 +93,11 @@ protected:
 	/// method to copy all data from given source
 	virtual void copyDataFromSdrObject(const SdrObject& rSource);
 
+    /// GeoData support
+	virtual SdrObjGeoData* NewGeoData() const;
+	virtual void SaveGeoData(SdrObjGeoData& rGeo) const;
+	virtual void RestGeoData(const SdrObjGeoData& rGeo);
+
 public:
 	// possible path types, derived from set polygon, thus readonly and useful
 	// for various behaviours. Default is PathType_Line when not enough info in polygon
@@ -109,7 +109,6 @@ public:
 	static sal_Bool ImpFindPolyPnt(const basegfx::B2DPolyPolygon& rPoly, sal_uInt32 nAbsPnt, sal_uInt32& rPolyNum, sal_uInt32& rPointNum);
 	SdrPathObj(
 		SdrModel& rSdrModel, 
-		SdrObjKind eNewKind, 
 		const basegfx::B2DPolyPolygon& rPathPoly = basegfx::B2DPolyPolygon());
 	virtual bool IsClosedObj() const;
 
@@ -157,12 +156,6 @@ public:
 	// split at tis point
 	SdrObject* RipPoint(sal_uInt32 nHdlNum, sal_uInt32& rNewPt0Index);
 
-protected:
-	virtual SdrObjGeoData* NewGeoData() const;
-	virtual void SaveGeoData(SdrObjGeoData& rGeo) const;
-	virtual void RestGeoData(const SdrObjGeoData& rGeo);
-
-public:
 	virtual SdrObject* DoConvertToPolygonObject(bool bBezier, bool bAddText) const;
 	virtual void setSdrObjectTransformation(const basegfx::B2DHomMatrix& rTransformation);
 
@@ -175,10 +168,9 @@ public:
 	void setB2DPolyPolygonInNormalizedCoordinates(const basegfx::B2DPolyPolygon& rPathPoly);
 
 	// helpers for states
-	bool IsClosed() const { return meKind==OBJ_POLY || meKind==OBJ_PATHPOLY || meKind==OBJ_PATHFILL || meKind==OBJ_FREEFILL; }
-	bool IsLine() const { return meKind==OBJ_PLIN || meKind==OBJ_PATHPLIN || meKind==OBJ_PATHLINE || meKind==OBJ_FREELINE || meKind==OBJ_LINE; }
-	bool IsFreeHand() const { return meKind==OBJ_FREELINE || meKind==OBJ_FREEFILL; }
-	bool IsBezier() const { return meKind==OBJ_PATHLINE || meKind==OBJ_PATHFILL; }
+    bool isClosed() const;
+    bool isLine() const;
+    bool isBezier() const;
 
 	void ToggleClosed();
 };

Modified: incubator/ooo/branches/alg/aw080/main/svx/inc/svx/svdpntv.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/svx/inc/svx/svdpntv.hxx?rev=1347716&r1=1347715&r2=1347716&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/svx/inc/svx/svdpntv.hxx (original)
+++ incubator/ooo/branches/alg/aw080/main/svx/inc/svx/svdpntv.hxx Thu Jun  7 17:08:07 2012
@@ -197,16 +197,6 @@ protected:
     bool						mbHideDraw : 1;             // hide draw objects other than form controls
     bool						mbHideFormControl : 1;      // hide form controls only
 
-	/// defines if SdrPathObj interactive creation is in freehand mode. Default
-	/// is false
-	bool						mbCreateFreehandMode : 1;
-
-	/// target SdrPathObjType for interactive path construction, default is PathType_Line
-	SdrPathObjType				maSdrPathObjType;
-
-	/// target SDrCircleObjType for interactive circle construction, default is CircleType_Circle
-	SdrCircleObjType			maSdrCircleObjType;
-
 	svtools::ColorConfig            maColorConfig;
 	Color							maGridColor;
 
@@ -245,15 +235,6 @@ protected:
 
 	SVX_DLLPRIVATE const OutputDevice* GetActualOutDev() const { return mpActualOutDev; }
 
-	/// reset mbCreateFreehandMode, maSdrPathObjType and maSdrCircleObjType
-	/// to defaults
-	void ResetCreationParameters()
-	{
-		mbCreateFreehandMode = false;
-		maSdrPathObjType = PathType_Line;
-		maSdrCircleObjType = CircleType_Circle;
-	}
-
 public:
 	void GlueInvalidate() const;
 
@@ -273,18 +254,6 @@ public:
 	bool IsPagePaintingAllowed() const;
 	void SetPagePaintingAllowed(bool bNew);
 
-	/// define or ask if freehand creation is active
-	bool getCreateFreehandMode() const { return mbCreateFreehandMode; }
-	void setCreateFreehandMode(bool bNew) { mbCreateFreehandMode = bNew; }
-
-	/// define or ask for target SdrPathObj type for interactive construction
-	SdrPathObjType getTargetSdrPathObjType() const { return maSdrPathObjType; }
-	void setTargetSdrPathObjType(SdrPathObjType eNew) { maSdrPathObjType = eNew; }
-
-	/// define or ask for target SdrCircObj type for interactive construction
-	SdrCircleObjType getTargetSdrCircleObjType() const { return maSdrCircleObjType; }
-	void setTargetSdrCircleObjType(SdrCircleObjType eNew) { maSdrCircleObjType = eNew; }
-
 	sal_uInt32 PaintWindowCount() const { return maPaintWindows.size(); }
 	SdrPaintWindow* FindPaintWindow(const OutputDevice& rOut) const;
 	SdrPaintWindow* GetPaintWindow(sal_uInt32 nIndex) const;

Modified: incubator/ooo/branches/alg/aw080/main/svx/inc/svx/svdstr.hrc
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/svx/inc/svx/svdstr.hrc?rev=1347716&r1=1347715&r2=1347716&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/svx/inc/svx/svdstr.hrc (original)
+++ incubator/ooo/branches/alg/aw080/main/svx/inc/svx/svdstr.hrc Thu Jun  7 17:08:07 2012
@@ -85,9 +85,6 @@
 #define STR_ObjNameSingulPATHFILL    (STR_ObjNameBegin + 53)
 #define STR_ObjNamePluralPATHFILL    (STR_ObjNameBegin + 54)
 #define STR_ObjNameSingulFREELINE    (STR_ObjNameBegin + 55)
-#define STR_ObjNamePluralFREELINE    (STR_ObjNameBegin + 56)
-#define STR_ObjNameSingulFREEFILL    (STR_ObjNameBegin + 57)
-#define STR_ObjNamePluralFREEFILL    (STR_ObjNameBegin + 58)
 #define STR_ObjNameSingulCOMBLINE    (STR_ObjNameBegin + 59)
 #define STR_ObjNamePluralCOMBLINE    (STR_ObjNameBegin + 60)
 #define STR_ObjNameSingulCOMBFILL    (STR_ObjNameBegin + 61)

Modified: incubator/ooo/branches/alg/aw080/main/svx/inc/svx/unoapi.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/svx/inc/svx/unoapi.hxx?rev=1347716&r1=1347715&r2=1347716&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/svx/inc/svx/unoapi.hxx (original)
+++ incubator/ooo/branches/alg/aw080/main/svx/inc/svx/unoapi.hxx Thu Jun  7 17:08:07 2012
@@ -39,11 +39,6 @@ class SvxNumBulletItem;
 class SfxItemPool;
 class String;
 
-/** creates a StarOffice API wrapper with the given type and inventor
-	Deprecated: This will be replaced with a function returning XShape.
-*/
-SVX_DLLPUBLIC SvxShape* CreateSvxShapeByTypeAndInventor( sal_uInt16 nType, sal_uInt32 nInventor ) throw();
-
 /** returns a StarOffice API wrapper for the given SdrObject */
 SVX_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > GetXShapeForSdrObject( SdrObject* pObj ) throw ();
 

Modified: incubator/ooo/branches/alg/aw080/main/svx/inc/svx/unopage.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/svx/inc/svx/unopage.hxx?rev=1347716&r1=1347715&r2=1347716&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/svx/inc/svx/unopage.hxx (original)
+++ incubator/ooo/branches/alg/aw080/main/svx/inc/svx/unopage.hxx Thu Jun  7 17:08:07 2012
@@ -57,6 +57,7 @@ class SvxShapeGroup;
 class SvxShapeConnector;
 class SvxShapeList;
 class SvxDrawPageList;
+class SdrObjectCreationInfo;
 
 /***********************************************************************
 * Macros fuer Umrechnung Twips<->100tel mm                             *
@@ -99,14 +100,17 @@ class SVX_DLLPUBLIC SvxDrawPage : public
 	SdrObject *CreateSdrObject( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw();
 
 	// Typ und Inventor bestimmen
-	void GetTypeAndInventor( sal_uInt16& rType, sal_uInt32& rInventor, const ::rtl::OUString& aName ) const throw();
+    SvxShapeKind getSvxShapeKind( const ::rtl::OUString& aName ) const throw();
 
 	// Erzeugen eines SdrObjects anhand einer Description. Kann von
 	// abgeleiteten Klassen dazu benutzt werden, eigene Shapes zu
 	// unterstuetzen (z.B. Controls)
 	virtual SdrObject *_CreateSdrObject( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw();
 
-	static SvxShape* CreateShapeByTypeAndInventor( sal_uInt16 nType, sal_uInt32 nInventor, SdrObject *pObj = NULL, SvxDrawPage *pPage = NULL ) throw();
+	static SvxShape* CreateShapeBySvxShapeKind(
+        SvxShapeKind aSvxShapeKind, 
+        SdrObject *pObj = 0, 
+        SvxDrawPage *pPage = 0) throw();
 
 	// Die folgende Methode wird gerufen, wenn ein SvxShape-Objekt angelegt
 	// werden soll. abgeleitete Klassen koennen hier eine Ableitung oder

Modified: incubator/ooo/branches/alg/aw080/main/svx/inc/svx/unoprov.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/svx/inc/svx/unoprov.hxx?rev=1347716&r1=1347715&r2=1347716&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/svx/inc/svx/unoprov.hxx (original)
+++ incubator/ooo/branches/alg/aw080/main/svx/inc/svx/unoprov.hxx Thu Jun  7 17:08:07 2012
@@ -27,43 +27,14 @@
 #include <com/sun/star/lang/XServiceInfo.hpp>
 #include <svl/itemprop.hxx>
 #include <tools/list.hxx>
-#include "svx/svxdllapi.h"
+#include <svx/svxdllapi.h>
+#include <editeng/unoipset.hxx>
 
 class SvxItemPropertySet;
 class SfxItemPool;
 
-/***********************************************************************
-* class UHashMap                                                       *
-***********************************************************************/
-
-struct UHashMapEntry
-{
-	::rtl::OUString aIdentifier;
-	sal_uInt32 nId;
-
-	UHashMapEntry(const sal_Char * value, sal_Int32 length, sal_uInt32 _nId) : aIdentifier(value,length,RTL_TEXTENCODING_ASCII_US), nId(_nId) { }
-};
-
-DECLARE_LIST( UHashMapEntryList, UHashMapEntry* )
-
-#define HASHARRAYSIZE	0x10
-#define UHASHMAP_NOTFOUND sal::static_int_cast< sal_uInt32 >(~0)
-
-class UHashMap
-{
-private:
-	UHashMapEntryList m_aHashList[HASHARRAYSIZE];
-
-public:
-	UHashMap( UHashMapEntry* pMap );
-	~UHashMap() {};
-
-	sal_uInt32 getId( const ::rtl::OUString& rCompareString );
-};
-
-/***********************************************************************
-* Soriterer                                                            *
-***********************************************************************/
+//////////////////////////////////////////////////////////////////////////////
+// Soriterer                                                            
 
 #define	SVXMAP_SHAPE				0
 #define	SVXMAP_CONNECTOR			1
@@ -92,9 +63,11 @@ public:
 #define SVXMAP_TABLE				24
 #define SVXMAP_PAGE                 25
 #define	SVXMAP_END					26	// last+1 !
+
 /***********************************************************************
 * SvxUnoPropertyMapProvider											   *
 ***********************************************************************/
+
 class SVX_DLLPUBLIC SvxUnoPropertyMapProvider
 {
     SfxItemPropertyMapEntry* aMapArr[SVXMAP_END];
@@ -111,16 +84,15 @@ public:
 * Globals                                                              *
 ***********************************************************************/
 
-const sal_Int16 OBJ_OLE2_APPLET	= 100;
-const sal_Int16 OBJ_OLE2_PLUGIN = 101;
-
 extern SvxUnoPropertyMapProvider aSvxMapProvider;
-extern UHashMapEntry pSdrShapeIdentifierMap[];
-extern UHashMap aSdrShapeIdentifierMap;
-
 #define E3D_INVENTOR_FLAG			(0x80000000)
 
-#include <editeng/unoipset.hxx>
+// object creation info creator
+class rtl::OUString;
+enum SvxShapeKind;
+SvxShapeKind getSvxShapeKindFromTypeName(const rtl::OUString&);
+std::vector< rtl::OUString > getAllSvxShapeTypeNames();
+bool getNameForSvxShapeType(rtl::OUString&, SvxShapeKind);
 
 /***********************************************************************
 * class SvxPropertySetInfoPool                                         *
@@ -143,3 +115,5 @@ private:
 
 #endif
 
+//////////////////////////////////////////////////////////////////////////////
+// eof

Modified: incubator/ooo/branches/alg/aw080/main/svx/inc/svx/unoshape.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/svx/inc/svx/unoshape.hxx?rev=1347716&r1=1347715&r2=1347716&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/svx/inc/svx/unoshape.hxx (original)
+++ incubator/ooo/branches/alg/aw080/main/svx/inc/svx/unoshape.hxx Thu Jun  7 17:08:07 2012
@@ -51,15 +51,18 @@
 #include "svx/svxdllapi.h"
 #include <rtl/ref.hxx>
 #include <com/sun/star/uno/Any.hxx>
-
 #include <svx/svdouno.hxx>
-
 #include <comphelper/servicehelper.hxx>
-
 #include <cppuhelper/implbase1.hxx>
 #include <cppuhelper/implbase12.hxx>
-
 #include <svx/unoprov.hxx>
+#include <editeng/unotext.hxx>
+#include <com/sun/star/drawing/XShapes.hpp>
+#include <com/sun/star/drawing/XShapeGroup.hpp>
+#include <com/sun/star/container/XIndexAccess.hpp>
+#include <com/sun/star/drawing/XConnectorShape.hpp>
+#include <com/sun/star/drawing/XControlShape.hpp>
+#include <basegfx/polygon/b2dpolypolygon.hxx>
 
 class SfxItemSet;
 class SdrModel;
@@ -102,6 +105,44 @@ typedef ::cppu::WeakAggImplHelper12<
     ::com::sun::star::document::XActionLockable,
     ::com::sun::star::beans::XMultiPropertyStates> SvxShape_UnoImplHelper;
 
+enum SvxShapeKind
+{
+    // values with direct mapping to SdrObjKind
+    SvxShapeKind_None,              // OBJ_NONE
+    SvxShapeKind_Group,             // OBJ_GRUP
+    SvxShapeKind_Rectangle,         // OBJ_RECT
+    SvxShapeKind_Circle,            // OBJ_CIRC
+    SvxShapeKind_Path,              // OBJ_POLY and removed old ones (OBJ_LINE, OBJ_PLIN, OBJ_PATHLINE, OBJ_PATHFILL, OBJ_FREELINE, OBJ_FREEFILL, OBJ_PATHPOLY, OBJ_PATHPLIN)
+    SvxShapeKind_Text,              // OBJ_TEXT, OBJ_TITLETEXT, OBJ_OUTLINETEXT
+    SvxShapeKind_Graphic,           // OBJ_GRAF
+    SvxShapeKind_OLE2,              // OBJ_OLE2
+    SvxShapeKind_Connector,         // OBJ_EDGE
+    SvxShapeKind_Caption,           // OBJ_CAPTION
+    SvxShapeKind_Page,              // OBJ_PAGE
+    SvxShapeKind_Measure,           // OBJ_MEASURE
+    SvxShapeKind_Frame,             // OBJ_FRAME
+    SvxShapeKind_Control,           // OBJ_UNO
+    SvxShapeKind_Customshape,       // OBJ_CUSTOMSHAPE
+    SvxShapeKind_Media,             // OBJ_MEDIA
+    SvxShapeKind_Table,             // OBJ_TABLE
+
+    // values special handling
+    SvxShapeKind_Applet,            // OBJ_OLE2_APPLET but special SvxAppletShape
+    SvxShapeKind_Plugin,            // OBJ_OLE2_PLUGIN but special SvxPluginShape
+
+    // 3D shapes, mappings to E3D_*_ID
+    SvxShapeKind_3DScene,           // E3D_SCENE_ID
+    SvxShapeKind_3DCube,            // E3D_CUBEOBJ_ID
+    SvxShapeKind_3DSphere,          // E3D_SPHEREOBJ_ID
+    SvxShapeKind_3DExtrude,         // E3D_EXTRUDEOBJ_ID
+    SvxShapeKind_3DLathe,           // E3D_LATHEOBJ_ID
+    SvxShapeKind_3DPolygon,         // E3D_POLYGONOBJ_ID
+};
+
+// converter
+SvxShapeKind SVX_DLLPUBLIC SdrObjectCreatorInventorToSvxShapeKind(sal_uInt16 nIdent, sal_uInt32 nInvent);
+void SvxShapeKindToSdrObjectCreatorInventor(SvxShapeKind aSvxShapeKind, sal_uInt16& nIdent, sal_uInt32& nInvent);
+
 class SVX_DLLPUBLIC SvxShape : public SvxShape_UnoImplHelper,
                  public SfxListener,
                  public SvxShapeMutex
@@ -155,9 +196,8 @@ protected:
 	/** used from the XActionLockable interface */
 	sal_uInt16 mnLockCount;
 
-    const SfxItemPropertyMapEntry* getPropertyMapEntries() const { return maPropMapEntries; }
+    virtual const SfxItemPropertyMapEntry* getPropertyMapEntries() const;
 
-	void updateShapeKind();
 	void endSetPropertyValues();
 
 	// overide these for special property handling in subcasses. Return true if property is handled
@@ -192,8 +232,8 @@ public:
 
     ::svx::PropertyChangeNotifier& getShapePropertyChangeNotifier();
 
-	void setShapeKind( sal_uInt32 nKind );
-	sal_uInt32 getShapeKind() const;
+	void setSvxShapeKind(SvxShapeKind eKind);
+	SvxShapeKind getSvxShapeKind() const;
 
 	// styles need this
 	static sal_Bool SAL_CALL SetFillAttribute( sal_Int32 nWID, const ::rtl::OUString& rName, SfxItemSet& rSet, SdrModel* pModel );
@@ -319,8 +359,6 @@ private:
     SVX_DLLPRIVATE void impl_construct();
 };
 
-#include <editeng/unotext.hxx>
-
 class SVX_DLLPUBLIC SvxShapeText : public SvxShape, public SvxUnoTextBase
 {
 protected:
@@ -388,9 +426,6 @@ public:
 	// XServiceInfo
 	virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
 };
-#include <com/sun/star/drawing/XShapes.hpp>
-#include <com/sun/star/drawing/XShapeGroup.hpp>
-#include <com/sun/star/container/XIndexAccess.hpp>
 
 /***********************************************************************
 *                                                                      *
@@ -446,7 +481,6 @@ public:
     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(  ) throw(::com::sun::star::uno::RuntimeException);
     virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId(  ) throw(::com::sun::star::uno::RuntimeException);
 };
-#include <com/sun/star/drawing/XConnectorShape.hpp>
 
 /***********************************************************************
 *                                                                      *
@@ -486,7 +520,6 @@ public:
     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(  ) throw(::com::sun::star::uno::RuntimeException);
     virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId(  ) throw(::com::sun::star::uno::RuntimeException);
 };
-#include <com/sun/star/drawing/XControlShape.hpp>
 
 /***********************************************************************
 *                                                                      *
@@ -570,6 +603,7 @@ public:
 // #i118485# changed parent to SvxShapeText to allow Text handling over UNO API
 class SVX_DLLPUBLIC SvxOle2Shape : public SvxShapeText
 {
+private:
 protected:
     // overide these for special property handling in subcasses. Return true if property is handled
     virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
@@ -591,27 +625,28 @@ public:
 	virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
 };
 
-
-#include <basegfx/polygon/b2dpolypolygon.hxx>
-
 /***********************************************************************
 *                                                                      *
 ***********************************************************************/
 class SvxShapePolyPolygon : public SvxShapeText
 {
 private:
-	::com::sun::star::drawing::PolygonKind mePolygonKind;
+    // quick test if this is a bezier based polygon
+    bool isBezierBased() const;
 
 protected:
     using SvxUnoTextRangeBase::setPropertyValue;
     using SvxUnoTextRangeBase::getPropertyValue;
 
-	// overide these for special property handling in subcasses. Return true if property is handled
+    // depends on polygon type, need to solve this dynamically
+    virtual const SfxItemPropertyMapEntry* getPropertyMapEntries() const;
+
+    // overide these for special property handling in subcasses. Return true if property is handled
     virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
     virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
 
 public:
-	SvxShapePolyPolygon( SdrObject* pObj , ::com::sun::star::drawing::PolygonKind eNew = com::sun::star::drawing::PolygonKind_LINE ) throw(com::sun::star::lang::IllegalArgumentException, com::sun::star::beans::PropertyVetoException);
+	SvxShapePolyPolygon( SdrObject* pObj ) throw(com::sun::star::lang::IllegalArgumentException, com::sun::star::beans::PropertyVetoException);
 	virtual ~SvxShapePolyPolygon() throw();
 
 	// Local support functions
@@ -626,36 +661,6 @@ public:
 /***********************************************************************
 *                                                                      *
 ***********************************************************************/
-
-class SvxShapePolyPolygonBezier : public SvxShapeText
-{
-private:
-	::com::sun::star::drawing::PolygonKind mePolygonKind;
-
-protected:
-    using SvxUnoTextRangeBase::setPropertyValue;
-    using SvxUnoTextRangeBase::getPropertyValue;
-
-public:
-	// overide these for special property handling in subcasses. Return true if property is handled
-    virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
-    virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
-
-	SvxShapePolyPolygonBezier( SdrObject* pObj , ::com::sun::star::drawing::PolygonKind eNew = com::sun::star::drawing::PolygonKind_PATHLINE) throw();
-	virtual ~SvxShapePolyPolygonBezier() throw();
-
-	// Local support functions
-	::com::sun::star::drawing::PolygonKind GetPolygonKind() const throw();
-	void SetPolygon(const basegfx::B2DPolyPolygon & rNew) throw();
-	basegfx::B2DPolyPolygon GetPolygon() const throw();
-
-	// XServiceInfo
-    virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
-};
-
-/***********************************************************************
-*                                                                      *
-***********************************************************************/
 class SvxGraphicObject : public SvxShapeText
 {
 protected:

Modified: incubator/ooo/branches/alg/aw080/main/svx/source/accessibility/AccessibleShape.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/svx/source/accessibility/AccessibleShape.cxx?rev=1347716&r1=1347715&r2=1347716&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/svx/source/accessibility/AccessibleShape.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/svx/source/accessibility/AccessibleShape.cxx Thu Jun  7 17:08:07 2012
@@ -1085,7 +1085,6 @@ void AccessibleShape::ViewForwarderChang
 
         case DRAWING_CAPTION:
         case DRAWING_CLOSED_BEZIER:
-        case DRAWING_CLOSED_FREEHAND:
         case DRAWING_ELLIPSE:
         case DRAWING_POLY_POLYGON:
         case DRAWING_POLY_POLYGON_PATH:
@@ -1098,7 +1097,6 @@ void AccessibleShape::ViewForwarderChang
         case DRAWING_LINE:
         case DRAWING_MEASURE:
         case DRAWING_OPEN_BEZIER:
-        case DRAWING_OPEN_FREEHAND:
         case DRAWING_POLY_LINE:
         case DRAWING_POLY_LINE_PATH:
             aDG.AddLineProperties ();

Modified: incubator/ooo/branches/alg/aw080/main/svx/source/accessibility/ShapeTypeHandler.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/svx/source/accessibility/ShapeTypeHandler.cxx?rev=1347716&r1=1347715&r2=1347716&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/svx/source/accessibility/ShapeTypeHandler.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/svx/source/accessibility/ShapeTypeHandler.cxx Thu Jun  7 17:08:07 2012
@@ -264,9 +264,6 @@ long ShapeTypeHandler::GetSlotId (const 
         case DRAWING_CLOSED_BEZIER:
             nResourceId = STR_ObjNameSingulPATHFILL;
             break;
-        case DRAWING_CLOSED_FREEHAND:
-            nResourceId = STR_ObjNameSingulFREEFILL;
-            break;
         case DRAWING_CONNECTOR:
             nResourceId = STR_ObjNameSingulEDGE;
             break;
@@ -288,9 +285,6 @@ long ShapeTypeHandler::GetSlotId (const 
         case DRAWING_OPEN_BEZIER:
             nResourceId = STR_ObjNameSingulPATHLINE;
             break;
-        case DRAWING_OPEN_FREEHAND:
-            nResourceId = STR_ObjNameSingulFREELINE;
-            break;
         case DRAWING_PAGE:
             nResourceId = STR_ObjNameSingulPAGE;
             break;

Modified: incubator/ooo/branches/alg/aw080/main/svx/source/accessibility/SvxShapeTypes.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/svx/source/accessibility/SvxShapeTypes.cxx?rev=1347716&r1=1347715&r2=1347716&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/svx/source/accessibility/SvxShapeTypes.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/svx/source/accessibility/SvxShapeTypes.cxx Thu Jun  7 17:08:07 2012
@@ -47,14 +47,12 @@ AccessibleShape* CreateSvxAccessibleShap
         case DRAWING_3D_SPHERE:
         case DRAWING_CAPTION:
         case DRAWING_CLOSED_BEZIER:
-        case DRAWING_CLOSED_FREEHAND:
         case DRAWING_CONNECTOR:
         case DRAWING_ELLIPSE:
         case DRAWING_GROUP:
         case DRAWING_LINE:
         case DRAWING_MEASURE:
         case DRAWING_OPEN_BEZIER:
-        case DRAWING_OPEN_FREEHAND:
         case DRAWING_PAGE:
         case DRAWING_POLY_POLYGON:
         case DRAWING_POLY_LINE:
@@ -128,12 +126,6 @@ ShapeTypeDescriptor aSvxShapeTypeList[] 
     ShapeTypeDescriptor (   DRAWING_CLOSED_BEZIER,
         ::rtl::OUString::createFromAscii ("com.sun.star.drawing.ClosedBezierShape"),
         CreateSvxAccessibleShape ),
-    ShapeTypeDescriptor (   DRAWING_OPEN_FREEHAND,
-        ::rtl::OUString::createFromAscii ("com.sun.star.drawing.OpenFreeHandShape"),
-        CreateSvxAccessibleShape ),
-    ShapeTypeDescriptor (   DRAWING_CLOSED_FREEHAND,
-        ::rtl::OUString::createFromAscii ("com.sun.star.drawing.ClosedFreeHandShape"),
-        CreateSvxAccessibleShape ),
     ShapeTypeDescriptor (   DRAWING_POLY_POLYGON_PATH,
         ::rtl::OUString::createFromAscii ("com.sun.star.drawing.PolyPolygonPathShape"),
         CreateSvxAccessibleShape ),



Mime
View raw message