diff -rup ../src680_m217-dr55-applied/xmloff/inc/xmloff/shapeexport.hxx xmloff/inc/xmloff/shapeexport.hxx
--- ../src680_m217-dr55-applied/xmloff/inc/xmloff/shapeexport.hxx	2007-07-03 11:16:16.000000000 +0100
+++ xmloff/inc/xmloff/shapeexport.hxx	2007-07-04 09:20:57.000000000 +0100
@@ -231,11 +231,6 @@ private:
 	const rtl::OUString							msStartShape;
 	const rtl::OUString							msEndShape;
 	const rtl::OUString							msOnClick;
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
-	const rtl::OUString							msOnAction;
-	const rtl::OUString							msAction;
-	const rtl::OUString							msURL;
-#endif
 	const rtl::OUString							msEventType;
 	const rtl::OUString							msPresentation;
 	const rtl::OUString							msMacroName;
diff -rup ../src680_m217-dr55-applied/xmloff/source/draw/eventimp.cxx xmloff/source/draw/eventimp.cxx
--- ../src680_m217-dr55-applied/xmloff/source/draw/eventimp.cxx	2007-07-03 11:16:16.000000000 +0100
+++ xmloff/source/draw/eventimp.cxx	2007-07-04 14:30:58.000000000 +0100
@@ -147,9 +147,6 @@ public:
 
 	sal_Bool mbValid;
 	sal_Bool mbScript;
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
-    sal_Bool mbActionEvent;
-#endif
 	ClickAction meClickAction;
 	XMLEffect meEffect;
 	XMLEffectDirection meDirection;
@@ -161,9 +158,6 @@ public:
 	OUString msMacroName;
 	OUString msBookmark;
 	OUString msLanguage;
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
-    OUString msHyperURL;
-#endif
 };
 
 ///////////////////////////////////////////////////////////////////////
@@ -222,18 +216,11 @@ TYPEINIT1( SdXMLEventContext, SvXMLImpor
 
 SdXMLEventContext::SdXMLEventContext( SvXMLImport& rImp,  sal_uInt16 nPrfx, const OUString& rLocalName,  const Reference< XAttributeList >& xAttrList, const Reference< XShape >& rxShape )
 :	SvXMLImportContext(rImp, nPrfx, rLocalName),
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
-    mxShape( rxShape ), mbScript( sal_False ), mbActionEvent( sal_False ), meClickAction( ClickAction_NONE ),
-#else
     mxShape( rxShape ), mbScript( sal_False ), meClickAction( ClickAction_NONE ),
-#endif
 	meEffect( EK_none ), meDirection( ED_none ), mnStartScale( 100 ),
 	meSpeed( AnimationSpeed_MEDIUM ), mnVerb(0), mbPlayFull( sal_False )
 {
     static const OUString sXMLClickName( RTL_CONSTASCII_USTRINGPARAM( "click" ) );
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
-    static const OUString sXMLActionName( RTL_CONSTASCII_USTRINGPARAM( "action" ) );
-#endif
 
     if( nPrfx == XML_NAMESPACE_PRESENTATION && IsXMLToken( rLocalName, XML_EVENT_LISTENER ) )
 	{
@@ -304,12 +291,7 @@ SdXMLEventContext::SdXMLEventContext( Sv
 				sEventName = sValue;
 				sal_uInt16 nScriptPrefix =
 					GetImport().GetNamespaceMap().GetKeyByAttrName( sValue, &sEventName );
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
-                mbValid = XML_NAMESPACE_DOM == nScriptPrefix && ( sEventName == sXMLClickName || sEventName == sXMLActionName );
-                mbActionEvent = mbValid && (sEventName == sXMLActionName);
-#else
                 mbValid = XML_NAMESPACE_DOM == nScriptPrefix && sEventName == sXMLClickName;
-#endif
 			}
 			else if( IsXMLToken( aAttrLocalName, XML_LANGUAGE ) )
 			{
@@ -338,12 +320,6 @@ SdXMLEventContext::SdXMLEventContext( Sv
 				{
 					msMacroName = sValue;
 				}
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
-                else if ( mbActionEvent )
-                {
-                    msHyperURL = sValue;
-                }
-#endif
 				else
 				{
 					const rtl::OUString &rTmp =
@@ -389,26 +365,6 @@ void SdXMLEventContext::EndElement()
         OUString sAPIEventName;
         uno::Sequence< beans::PropertyValue > aProperties;
 
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
-        if( mbActionEvent )
-        {
-            sAPIEventName = OUString( RTL_CONSTASCII_USTRINGPARAM( "OnAction" ) );
-            aProperties.realloc( 2 );
-            beans::PropertyValue* pProperty = aProperties.getArray();
-
-            pProperty->Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "EventType" ) );
-            pProperty->Handle = -1;
-            pProperty->Value <<= OUString( RTL_CONSTASCII_USTRINGPARAM( "Action" ) );
-            pProperty->State = beans::PropertyState_DIRECT_VALUE;
-            ++pProperty;
-            pProperty->Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "URL" ) );
-            pProperty->Handle = -1;
-            pProperty->Value <<= msHyperURL;
-            pProperty->State = beans::PropertyState_DIRECT_VALUE;
-        }
-        else
-#endif
-        {
             sAPIEventName = OUString( RTL_CONSTASCII_USTRINGPARAM( "OnClick" ) );
 
             if( mbScript )
@@ -593,8 +549,6 @@ void SdXMLEventContext::EndElement()
                     break;
                 }
             }
-        }
-
         xEvents->replaceByName( sAPIEventName, uno::Any( aProperties ) );
 
     } while(0);
diff -rup ../src680_m217-dr55-applied/xmloff/source/draw/shapeexport2.cxx xmloff/source/draw/shapeexport2.cxx
--- ../src680_m217-dr55-applied/xmloff/source/draw/shapeexport2.cxx	2007-07-03 11:16:16.000000000 +0100
+++ xmloff/source/draw/shapeexport2.cxx	2007-07-04 09:32:59.000000000 +0100
@@ -371,9 +371,6 @@ const sal_Int32 FOUND_CLICKEVENTTYPE    
 const sal_Int32 FOUND_MACRO             = 0x00000100;
 const sal_Int32 FOUND_LIBRARY           = 0x00000200;
 const sal_Int32 FOUND_ACTIONEVENTTYPE   = 0x00000400;
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
-const sal_Int32 FOUND_URL               = 0x00000800;
-#endif
 
 } // namespace
 
@@ -463,33 +460,6 @@ void XMLShapeExport::ImpExportEvents( co
         }
     }
 
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
-    // extract properties from "OnAction" event -------------------------------
-
-    OUString aActionEventType;
-    OUString aHyperURL;
-
-    uno::Sequence< beans::PropertyValue > aActionProperties;
-    if( xEvents->hasByName( msOnAction ) && (xEvents->getByName( msOnAction ) >>= aActionProperties) )
-    {
-        const beans::PropertyValue* pProperty = aActionProperties.getConstArray();
-        const beans::PropertyValue* pPropertyEnd = pProperty + aActionProperties.getLength();
-        for( ; pProperty != pPropertyEnd; ++pProperty )
-        {
-            if( ( ( nFound & FOUND_ACTIONEVENTTYPE ) == 0 ) && pProperty->Name == msEventType )
-            {
-                if( pProperty->Value >>= aActionEventType )
-                    nFound |= FOUND_ACTIONEVENTTYPE;
-            }
-            else if( ( ( nFound & FOUND_URL ) == 0 ) && ( pProperty->Name == msURL  ) )
-            {
-                if( pProperty->Value >>= aHyperURL )
-                    nFound |= FOUND_URL;
-            }
-        }
-    }
-#endif
-
     // create the XML elements
 
     if( aClickEventType == msPresentation )
@@ -641,15 +611,9 @@ void XMLShapeExport::ImpExportEvents( co
             SvXMLElementExport aEventElemt(mrExport, XML_NAMESPACE_SCRIPT, XML_EVENT_LISTENER, sal_True, sal_True);
         }
     }
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
-    else if( aClickEventType == msScript || aActionEventType == msAction )
-    {
-        if( nFound & ( FOUND_MACRO | FOUND_URL ) )
-#else
     else if( aClickEventType == msScript )
     {
         if( nFound & FOUND_MACRO )
-#endif
         {
             SvXMLElementExport aEventsElemt(mrExport, XML_NAMESPACE_OFFICE, XML_EVENT_LISTENERS, sal_True, sal_True);
             if ( nFound & FOUND_MACRO )
@@ -664,18 +628,6 @@ void XMLShapeExport::ImpExportEvents( co
 
                 SvXMLElementExport aEventElemt(mrExport, XML_NAMESPACE_SCRIPT, XML_EVENT_LISTENER, sal_True, sal_True);
             }
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
-            if ( nFound & FOUND_URL )
-            {
-                OUString aEventQName(
-                    mrExport.GetNamespaceMap().GetQNameByKey(
-                            XML_NAMESPACE_DOM, OUString( RTL_CONSTASCII_USTRINGPARAM( "action" ) ) ) );
-                mrExport.AddAttribute( XML_NAMESPACE_SCRIPT, XML_EVENT_NAME, aEventQName );
-                mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, aHyperURL );
-
-                SvXMLElementExport aEventElemt(mrExport, XML_NAMESPACE_PRESENTATION, XML_EVENT_LISTENER, sal_True, sal_True);
-            }
-#endif
         }
     }
 }
diff -rup ../src680_m217-dr55-applied/xmloff/source/draw/shapeexport.cxx xmloff/source/draw/shapeexport.cxx
--- ../src680_m217-dr55-applied/xmloff/source/draw/shapeexport.cxx	2007-07-03 11:16:16.000000000 +0100
+++ xmloff/source/draw/shapeexport.cxx	2007-07-04 09:31:09.000000000 +0100
@@ -161,11 +161,6 @@ XMLShapeExport::XMLShapeExport(SvXMLExpo
 	msStartShape( RTL_CONSTASCII_USTRINGPARAM("StartShape") ),
 	msEndShape( RTL_CONSTASCII_USTRINGPARAM("EndShape") ),
 	msOnClick( RTL_CONSTASCII_USTRINGPARAM("OnClick") ),
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
-	msOnAction( RTL_CONSTASCII_USTRINGPARAM("OnAction") ),
-	msAction( RTL_CONSTASCII_USTRINGPARAM("Action") ),
-	msURL( RTL_CONSTASCII_USTRINGPARAM("URL") ),
-#endif
 	msEventType( RTL_CONSTASCII_USTRINGPARAM("EventType") ),
 	msPresentation( RTL_CONSTASCII_USTRINGPARAM("Presentation") ),
 	msMacroName( RTL_CONSTASCII_USTRINGPARAM("MacroName") ),
diff -rup ../src680_m217-dr55-applied/sc/inc/sc.hrc sc/inc/sc.hrc
--- ../src680_m217-dr55-applied/sc/inc/sc.hrc	2007-07-03 11:16:23.000000000 +0100
+++ sc/inc/sc.hrc	2007-07-04 09:34:32.000000000 +0100
@@ -583,11 +583,9 @@
 // #i59082# assign macro to shape
 #define SID_ASSIGNMACRO                 (SC_VIEW_START + 95)
 
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
 // #i66550# hyperlinks in shapes
 #define SID_DRAW_HLINK_EDIT             (SC_VIEW_START + 96)
 #define SID_DRAW_HLINK_DELETE           (SC_VIEW_START + 97)
-#endif
 
 // NOTE: last valid ID is (SC_VIEW_START + 99)
 
diff -rup ../src680_m217-dr55-applied/sc/inc/shapeuno.hxx sc/inc/shapeuno.hxx
--- ../src680_m217-dr55-applied/sc/inc/shapeuno.hxx	2007-07-03 11:16:23.000000000 +0100
+++ sc/inc/shapeuno.hxx	2007-07-04 12:14:31.000000000 +0100
@@ -74,6 +74,7 @@ namespace com { namespace sun { namespac
 class SdrObject;
 struct SvEventDescription;
 class ShapeUnoEventAccessImpl;
+class  ScMacroInfo;
 
 //------------------------------------------------------------------------
 
@@ -89,6 +90,7 @@ class ScShapeObj : public ::cppu::OWeakO
 					public ::com::sun::star::document::XEventsSupplier
 {
 private:
+friend  ScMacroInfo* lcl_getShapeHyperMacroInfo( ScShapeObj* pShape, BOOL bCreate );
 	::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation > mxShapeAgg;
     // cached pointers to avoid repeated queryAggregation calls:
     ::com::sun::star::beans::XPropertySet*                                  pShapePropertySet;
diff -rup ../src680_m217-dr55-applied/sc/inc/unonames.hxx sc/inc/unonames.hxx
--- ../src680_m217-dr55-applied/sc/inc/unonames.hxx	2007-07-03 11:16:23.000000000 +0100
+++ sc/inc/unonames.hxx	2007-07-04 10:06:31.000000000 +0100
@@ -183,6 +183,8 @@
 #define SC_UNONAME_ANCHOR           "Anchor"
 #define SC_UNONAME_HORIPOS          "HoriOrientPosition"
 #define SC_UNONAME_VERTPOS          "VertOrientPosition"
+//     #i66550 HLINK_FOR_SHAPES
+#define SC_UNONAME_HYPERLINK        "Hyperlink" 
 
 //	other cell properties
 #define SC_UNONAME_CHCOLHDR			"ChartColumnAsLabel"
diff -rup ../src680_m217-dr55-applied/sc/inc/userdat.hxx sc/inc/userdat.hxx
--- ../src680_m217-dr55-applied/sc/inc/userdat.hxx	2007-07-03 11:16:23.000000000 +0100
+++ sc/inc/userdat.hxx	2007-07-04 09:35:53.000000000 +0100
@@ -117,16 +117,12 @@ public:
     void            SetMacro( const rtl::OUString& rMacro ) { maMacro = rMacro; }
     const rtl::OUString& GetMacro() const { return maMacro; }
 
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
     void            SetHlink( const rtl::OUString& rHlink ) { maHlink = rHlink; }
     const rtl::OUString& GetHlink() const { return maHlink; }
-#endif
 
 private:
     rtl::OUString   maMacro;
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
     rtl::OUString   maHlink;
-#endif
 };
 
 //-------------------------------------------------------------------------
diff -rup ../src680_m217-dr55-applied/sc/source/filter/excel/xiescher.cxx sc/source/filter/excel/xiescher.cxx
--- ../src680_m217-dr55-applied/sc/source/filter/excel/xiescher.cxx	2007-07-03 11:16:23.000000000 +0100
+++ sc/source/filter/excel/xiescher.cxx	2007-07-04 09:39:01.000000000 +0100
@@ -1647,19 +1647,15 @@ SdrObject* XclImpDffManager::ProcessObj(
     {
         // macro name and hyperlink for drawing objects and pictures (not for controls and charts)
         const String& rMacro = xDrawObj->GetMacroName();
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
         OUString aHlink = ReadHlinkProperty( rEscherStrm );
         if( (rMacro.Len() > 0) || (aHlink.getLength() > 0) )
-#else
-        if( rMacro.Len() > 0 )
-#endif
         {
             if( ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( xSdrObj.get(), TRUE ) )
             {
+                if ( rMacro.Len() > 0 )
                 pInfo->SetMacro( XclControlObjHelper::GetScMacroName( rMacro ) );
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
+                if ( aHlink.getLength() > 0 )
                 pInfo->SetHlink( aHlink );
-#endif
             }
         }
     }
diff -rup ../src680_m217-dr55-applied/sc/source/filter/xml/xmlcelli.cxx sc/source/filter/xml/xmlcelli.cxx
--- ../src680_m217-dr55-applied/sc/source/filter/xml/xmlcelli.cxx	2007-02-27 12:49:18.000000000 +0000
+++ sc/source/filter/xml/xmlcelli.cxx	2007-07-04 11:55:03.000000000 +0100
@@ -164,6 +164,84 @@ ScMyImportAnnotation::~ScMyImportAnnotat
     delete pOPO;
 }
 
+//-------------------- #i66550 HLINK_FOR_SHAPES --------------------
+
+SvXMLImportContext*
+lcl_processShapeElement(  ScXMLImport& rImport, USHORT nPrfx, const ::rtl::OUString& rLName, const uno::Reference< xml::sax::XAttributeList>& xAttrList, uno::Reference< drawing::XShapes >& xShapes, rtl::OUString& rHLink )
+{
+	SvXMLImportContext* pContext = NULL;
+	table::CellAddress aCellPos = rImport.GetTables().GetRealCellPos();
+	if (xShapes.is())
+	{
+		if (aCellPos.Column > MAXCOL)
+			aCellPos.Column = MAXCOL;
+		if (aCellPos.Row > MAXROW)
+			aCellPos.Row = MAXROW;
+		XMLTableShapeImportHelper* pTableShapeImport = (XMLTableShapeImportHelper*)rImport.GetShapeImport().get();
+		pTableShapeImport->SetHlink( rHLink );
+		pTableShapeImport->SetOnTable(sal_False);
+		pTableShapeImport->SetCell(aCellPos);
+		pContext = rImport.GetShapeImport()->CreateGroupChildContext(
+			rImport, nPrfx, rLName, xAttrList, xShapes, sal_False);
+	}
+	return pContext;
+}
+
+class XMLShapeHyperLinkContext : public SvXMLImportContext
+{
+	::rtl::OUString sHLink;
+	ScXMLImport& rXMLImport;
+public:
+	XMLShapeHyperLinkContext( ScXMLImport& rImport, USHORT nPrfx, const ::rtl::OUString& rLName, const uno::Reference< xml::sax::XAttributeList>& xAttrList );
+
+	virtual ~XMLShapeHyperLinkContext(){}
+	virtual void EndElement(){}
+
+	SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
+		const ::rtl::OUString& rLocalName,
+		const uno::Reference<xml::sax::XAttributeList >& xAttrList );
+};
+
+XMLShapeHyperLinkContext::XMLShapeHyperLinkContext( ScXMLImport& rImport, USHORT nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< xml::sax::XAttributeList>& xAttrList ) : SvXMLImportContext( rImport, nPrfx, rLName ), rXMLImport( rImport )
+{
+	// re-use the TableRowCell map ( I don't suppose it's worth implementing a new one )
+	const SvXMLTokenMap& rTokenMap = rXMLImport.GetShapeHyperlinkTokenMap();
+	sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+	for( sal_Int16 i=0; i < nAttrCount; i++ )
+	{
+		const OUString& rAttrName = xAttrList->getNameByIndex( i );
+		const OUString& rValue = xAttrList->getValueByIndex( i );
+
+		OUString aLocalName;
+		sal_uInt16 nPrefix = rXMLImport.GetNamespaceMap().GetKeyByAttrName( rAttrName, &aLocalName );
+		if ( rTokenMap.Get( nPrefix, aLocalName ) == XML_TOK_SHAPE_ATTR_HREF )
+		{
+			sHLink = rXMLImport.GetAbsoluteReference( rValue );
+			break;
+		}
+	}
+}
+
+
+SvXMLImportContext*
+XMLShapeHyperLinkContext::CreateChildContext( sal_uInt16 nPrefix,
+		const ::rtl::OUString& rLocalName,
+		const ::com::sun::star::uno::Reference<
+		::com::sun::star::xml::sax::XAttributeList > & xAttrList )
+{
+	SvXMLImportContext* pContext = NULL;
+	uno::Reference<drawing::XShapes> xShapes ( rXMLImport.GetTables().GetCurrentXShapes());
+	if ( xShapes.is() )
+	{
+		pContext = lcl_processShapeElement( rXMLImport, nPrefix, rLocalName, xAttrList, xShapes, sHLink );
+		if (pContext)
+			rXMLImport.ProgressBarIncrement(sal_False);
+	}
+	if ( !pContext )
+		pContext = new SvXMLImportContext( rXMLImport, nPrefix, rLocalName );
+	return pContext;
+}
+
 //------------------------------------------------------------------
 
 ScXMLTableRowCellContext::ScXMLTableRowCellContext( ScXMLImport& rImport,
@@ -589,23 +667,23 @@ SvXMLImportContext *ScXMLTableRowCellCon
 				rXMLImport, nPrefix, rLName, xAttrList, pCellRangeSource );
 		}
 		break;
+	// #i66550 HLINK_FOR_SHAPES
+	case XML_TOK_TABLE_ROW_CELL_DRAW_A:
+		{
+			pContext = new XMLShapeHyperLinkContext(
+				rXMLImport, nPrefix, rLName, xAttrList );
+		}
+		break;
 	}
-
 	if (!pContext && !bTextP)
 	{
-		com::sun::star::table::CellAddress aCellPos = rXMLImport.GetTables().GetRealCellPos();
+		// #i66550 HLINK_FOR_SHAPES
 		uno::Reference<drawing::XShapes> xShapes (rXMLImport.GetTables().GetCurrentXShapes());
 		if (xShapes.is())
 		{
-			if (aCellPos.Column > MAXCOL)
-				aCellPos.Column = MAXCOL;
-			if (aCellPos.Row > MAXROW)
-				aCellPos.Row = MAXROW;
-			XMLTableShapeImportHelper* pTableShapeImport = (XMLTableShapeImportHelper*)rXMLImport.GetShapeImport().get();
-			pTableShapeImport->SetOnTable(sal_False);
-			pTableShapeImport->SetCell(aCellPos);
-			pContext = rXMLImport.GetShapeImport()->CreateGroupChildContext(
-				rXMLImport, nPrefix, rLName, xAttrList, xShapes);
+			rtl::OUString sBlank;
+			pContext = lcl_processShapeElement( rXMLImport, nPrefix, rLName, xAttrList, xShapes, sBlank );
+
 			if (pContext)
 			{
 				bIsEmpty = sal_False;
diff -rup ../src680_m217-dr55-applied/sc/source/filter/xml/xmlexprt.cxx sc/source/filter/xml/xmlexprt.cxx
--- ../src680_m217-dr55-applied/sc/source/filter/xml/xmlexprt.cxx	2007-07-03 11:16:23.000000000 +0100
+++ sc/source/filter/xml/xmlexprt.cxx	2007-07-04 10:22:36.000000000 +0100
@@ -2665,7 +2665,34 @@ void ScXMLExport::ExportShape(const uno:
 		}
 	}
 	if (!bIsChart)
+	{
+		// #i66550 HLINK_FOR_SHAPES
+		rtl::OUString sHlink;
+		uno::Reference< beans::XPropertySet > xProps( xShape, uno::UNO_QUERY );
+		if ( xProps.is() )
+			xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_HYPERLINK ) ) ) >>= sHlink;
+
+		std::auto_ptr< SvXMLElementExport > pDrawA;
+		// enlose shapes with <draw:a> element only if sHlink contains something
+		if ( sHlink.getLength() > 0 )
+		{
+			// need to get delete the attributes that are pre-loaded
+			// for the shape export ( otherwise they will become 	
+			// attributes of the draw:a element ) This *shouldn't* 
+			// affect performance adversely as there are only a 
+			// couple of attributes involved
+			uno::Reference< xml::sax::XAttributeList > xSaveAttribs( new  SvXMLAttributeList( GetAttrList() ) );
+			ClearAttrList();
+			// Add Hlink	
+			AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
+			AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, sHlink);
+			pDrawA.reset( new SvXMLElementExport( *this, XML_NAMESPACE_DRAW, XML_A, sal_False, sal_False ) );
+			// Attribute list has been cleared by previous operation
+			// re-add pre-loaded attributes
+			AddAttributeList( xSaveAttribs );
+		}
 		GetShapeExport()->exportShape(xShape, SEF_DEFAULT, pPoint);
+	}
 	IncrementProgressBar(sal_False);
 }
 
diff -rup ../src680_m217-dr55-applied/sc/source/filter/xml/xmlimprt.cxx sc/source/filter/xml/xmlimprt.cxx
--- ../src680_m217-dr55-applied/sc/source/filter/xml/xmlimprt.cxx	2007-07-03 11:16:23.000000000 +0100
+++ sc/source/filter/xml/xmlimprt.cxx	2007-07-04 11:50:18.000000000 +0100
@@ -274,6 +274,11 @@ uno::Reference< uno::XInterface > SAL_CA
 }
 
 //----------------------------------------------------------------------------
+// #i66550 HLINK_FOR_SHAPES
+static  __FAR_DATA SvXMLTokenMapEntry aShapeHyperlinkTokenMap[] =
+{
+	{ XML_NAMESPACE_XLINK, XML_HREF, XML_TOK_SHAPE_ATTR_HREF },
+};
 
 static __FAR_DATA SvXMLTokenMapEntry aDocTokenMap[] =
 {
@@ -485,6 +490,7 @@ static __FAR_DATA SvXMLTokenMapEntry aTa
 	{ XML_NAMESPACE_OFFICE,	XML_ANNOTATION, 		XML_TOK_TABLE_ROW_CELL_ANNOTATION			},
 	{ XML_NAMESPACE_TABLE,	XML_DETECTIVE,			XML_TOK_TABLE_ROW_CELL_DETECTIVE			},
 	{ XML_NAMESPACE_TABLE,	XML_CELL_RANGE_SOURCE,	XML_TOK_TABLE_ROW_CELL_CELL_RANGE_SOURCE	},
+	{ XML_NAMESPACE_DRAW, XML_A, XML_TOK_TABLE_ROW_CELL_DRAW_A },
 	XML_TOKEN_MAP_END
 };
 
@@ -973,6 +979,14 @@ SvXMLImportContext *ScXMLDocContext_Impl
 
 	return pContext;
 }
+// #i66550 HLINK_FOR_SHAPES
+const SvXMLTokenMap& ScXMLImport::GetShapeHyperlinkTokenMap()
+{
+	if( !pShapeHyperlinkTokenMap )
+		pShapeHyperlinkTokenMap = new SvXMLTokenMap( aShapeHyperlinkTokenMap );
+
+	return *pShapeHyperlinkTokenMap;
+}
 
 const SvXMLTokenMap& ScXMLImport::GetDocElemTokenMap()
 {
@@ -1485,6 +1485,7 @@ ScXMLImport::ScXMLImport(
 //	pScAutoStylePool(new SvXMLAutoStylePoolP),
 //	pParaItemMapper( 0 ),
 //	pI18NMap( new SvI18NMap ),
+	pShapeHyperlinkTokenMap( 0 ),
 	pDocElemTokenMap( 0 ),
 	pStylesElemTokenMap( 0 ),
 	pStylesAttrTokenMap( 0 ),
@@ -1592,6 +1593,7 @@ ScXMLImport::~ScXMLImport() throw()
 //	RemoveUnusedNumRules();
 
 //	delete pI18NMap;
+	delete pShapeHyperlinkTokenMap;
 	delete pDocElemTokenMap;
 	delete pStylesElemTokenMap;
 	delete pStylesAttrTokenMap;
diff -rup ../src680_m217-dr55-applied/sc/source/filter/xml/xmlimprt.hxx sc/source/filter/xml/xmlimprt.hxx
--- ../src680_m217-dr55-applied/sc/source/filter/xml/xmlimprt.hxx	2006-04-20 14:26:00.000000000 +0100
+++ sc/source/filter/xml/xmlimprt.hxx	2007-07-04 11:57:00.000000000 +0100
@@ -94,6 +94,11 @@ class XMLNumberFormatAttributesExportHel
 
 using namespace rtl;
 
+enum ScXMLShapeHlinkTokens // #i66550 HLINK_FOR_SHAPES
+{
+	XML_TOK_SHAPE_ATTR_HREF
+};
+
 enum ScXMLDocTokens
 {
 	XML_TOK_DOC_FONTDECLS,
@@ -281,7 +286,8 @@ enum ScXMLTableRowCellTokens
 	XML_TOK_TABLE_ROW_CELL_TABLE,
 	XML_TOK_TABLE_ROW_CELL_ANNOTATION,
 	XML_TOK_TABLE_ROW_CELL_DETECTIVE,
-	XML_TOK_TABLE_ROW_CELL_CELL_RANGE_SOURCE
+	XML_TOK_TABLE_ROW_CELL_CELL_RANGE_SOURCE,
+	XML_TOK_TABLE_ROW_CELL_DRAW_A,
 };
 
 enum ScXMLTableRowCellAttrTokens
@@ -694,6 +700,7 @@ class ScXMLImport: public SvXMLImport
 
 //	SvXMLImportItemMapper	*pParaItemMapper;// paragraph item import
 //	SvI18NMap				*pI18NMap;			// name mapping for I18N
+	SvXMLTokenMap			*pShapeHyperlinkTokenMap;
 	SvXMLTokenMap			*pDocElemTokenMap;
 	SvXMLTokenMap			*pStylesElemTokenMap;
 	SvXMLTokenMap			*pStylesAttrTokenMap;
@@ -854,6 +861,7 @@ public:
 //	SvXMLImportContextRef			GetAutoStyles() const { return xAutoStyles; }
 //	SvXMLImportContextRef			GetStyles() const { return xStyles; }
 
+	const SvXMLTokenMap& GetShapeHyperlinkTokenMap();
 	const SvXMLTokenMap& GetDocElemTokenMap();
 	const SvXMLTokenMap& GetStylesElemTokenMap();
 	const SvXMLTokenMap& GetStylesAttrTokenMap();
diff -rup ../src680_m217-dr55-applied/sc/source/filter/xml/XMLTableShapeImportHelper.cxx sc/source/filter/xml/XMLTableShapeImportHelper.cxx
--- ../src680_m217-dr55-applied/sc/source/filter/xml/XMLTableShapeImportHelper.cxx	2007-05-22 21:03:11.000000000 +0100
+++ sc/source/filter/xml/XMLTableShapeImportHelper.cxx	2007-07-04 10:07:38.000000000 +0100
@@ -82,7 +82,7 @@
 #ifndef _COM_SUN_STAR_DRAWING_XSHAPES_HPP_
 #include <com/sun/star/drawing/XShapes.hpp>
 #endif
-
+#include "unonames.hxx"
 #define SC_LAYERID "LayerID"
 
 using namespace ::com::sun::star;
@@ -119,6 +119,13 @@ void XMLTableShapeImportHelper::finishSh
 {
 	XMLShapeImportHelper::finishShape( rShape, xAttrList, rShapes );
 	static_cast<ScXMLImport&>(mrImporter).LockSolarMutex();
+	// #i66550 HLINK_FOR_SHAPES
+	if ( rShape.is() && sHlink.getLength() )
+	{
+		uno::Reference< beans::XPropertySet > xProp( rShape, uno::UNO_QUERY );
+		if ( xProp.is() )
+			xProp->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_HYPERLINK ) ), uno::Any( sHlink ) );
+	}
 	if (rShapes == static_cast<ScXMLImport&>(mrImporter).GetTables().GetCurrentXShapes())
 	{
         if (!pAnnotationContext)
diff -rup ../src680_m217-dr55-applied/sc/source/filter/xml/XMLTableShapeImportHelper.hxx sc/source/filter/xml/XMLTableShapeImportHelper.hxx
--- ../src680_m217-dr55-applied/sc/source/filter/xml/XMLTableShapeImportHelper.hxx	2005-09-08 20:59:29.000000000 +0100
+++ sc/source/filter/xml/XMLTableShapeImportHelper.hxx	2007-07-04 11:51:42.000000000 +0100
@@ -51,6 +51,7 @@ class XMLTableShapeImportHelper : public
 	::com::sun::star::table::CellAddress aStartCell;
     ScXMLAnnotationContext* pAnnotationContext;
 	sal_Bool bOnTable;
+	::rtl::OUString sHlink; // #i66550 HLINK_FOR_SHAPES
 
 public:
 
@@ -61,8 +62,8 @@ public:
     virtual void finishShape(com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& rShape,
 			const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList,
 			com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes);
-
-
+	// #i66550 HLINK_FOR_SHAPES
+	void SetHlink( const rtl::OUString& rHlink ) { sHlink = rHlink; }
 	void SetCell (const ::com::sun::star::table::CellAddress& rAddress) { aStartCell = rAddress; }
 	void SetOnTable (const sal_Bool bTempOnTable) { bOnTable = bTempOnTable; }
     void SetAnnotation(ScXMLAnnotationContext* pAnnotation) { pAnnotationContext = pAnnotation; }
diff -rup ../src680_m217-dr55-applied/sc/source/ui/drawfunc/drawsh2.cxx sc/source/ui/drawfunc/drawsh2.cxx
--- ../src680_m217-dr55-applied/sc/source/ui/drawfunc/drawsh2.cxx	2007-07-03 11:16:23.000000000 +0100
+++ sc/source/ui/drawfunc/drawsh2.cxx	2007-07-04 09:42:48.000000000 +0100
@@ -209,24 +209,20 @@ void ScDrawShell::GetDrawFuncState( SfxI
 	BOOL bCanRename = FALSE;
     if ( nMarkCount > 1 )
     {
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
         // no hypelink options for a selected group
         rSet.DisableItem( SID_DRAW_HLINK_EDIT );
         rSet.DisableItem( SID_DRAW_HLINK_DELETE );
         rSet.DisableItem( SID_OPEN_HYPERLINK );
-#endif
     }
     else if ( nMarkCount == 1 )
 	{
         SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
         ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj );
         if ( !pInfo || (pInfo->GetHlink().getLength() == 0) )
         {
             rSet.DisableItem( SID_DRAW_HLINK_DELETE );
             rSet.DisableItem( SID_OPEN_HYPERLINK );
         }
-#endif
         SdrLayerID nLayerID = pObj->GetLayer();
         if ( nLayerID != SC_LAYER_INTERN )
             bCanRename = TRUE;                          // #i51351# anything except internal objects can be renamed
diff -rup ../src680_m217-dr55-applied/sc/source/ui/drawfunc/drawsh5.cxx sc/source/ui/drawfunc/drawsh5.cxx
--- ../src680_m217-dr55-applied/sc/source/ui/drawfunc/drawsh5.cxx	2007-07-03 11:16:23.000000000 +0100
+++ sc/source/ui/drawfunc/drawsh5.cxx	2007-07-04 13:52:29.000000000 +0100
@@ -103,14 +103,12 @@ void ScDrawShell::GetHLinkState( SfxItem
     if ( nMarkCount == 1 )              // URL-Button markiert ?
     {
         SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
         ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj );
         if ( pInfo && (pInfo->GetHlink().getLength() > 0) )
         {
             aHLinkItem.SetURL( pInfo->GetHlink() );
             aHLinkItem.SetInsertMode(HLINK_FIELD);
         }
-#endif
         SdrUnoObj* pUnoCtrl = PTR_CAST(SdrUnoObj, pObj);
         if (pUnoCtrl && FmFormInventor == pUnoCtrl->GetObjInventor())
         {
@@ -253,13 +251,11 @@ void ScDrawShell::ExecuteHLink( SfxReque
                                     bDone = TRUE;
                                 }
                             }
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
                             else
                             {
                                 SetHlinkForObject( pObj, rURL );
                                 bDone = TRUE;
                             }
-#endif
                         }
                     }
 
diff -rup ../src680_m217-dr55-applied/sc/source/ui/drawfunc/drawsh.cxx sc/source/ui/drawfunc/drawsh.cxx
--- ../src680_m217-dr55-applied/sc/source/ui/drawfunc/drawsh.cxx	2007-07-03 11:16:23.000000000 +0100
+++ sc/source/ui/drawfunc/drawsh.cxx	2007-07-04 09:41:10.000000000 +0100
@@ -218,7 +218,6 @@ void ScDrawShell::ExecDrawAttr( SfxReque
 			ExecuteTextAttrDlg( rReq );
 			break;
 
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
         case SID_DRAW_HLINK_EDIT:
             if ( pSingleSelectedObj )
                 pViewData->GetDispatcher().Execute( SID_HYPERLINK_DIALOG );
@@ -246,7 +245,6 @@ void ScDrawShell::ExecDrawAttr( SfxReque
                     ScGlobal::OpenURL( pInfo->GetHlink(), String::EmptyString() );
             }
             break;
-#endif
 
 		case SID_ATTR_TRANSFORM:
 			{
@@ -498,7 +496,6 @@ void ScDrawShell::ExecuteTextAttrDlg( Sf
 	delete( pDlg );
 }
 
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
 void ScDrawShell::SetHlinkForObject( SdrObject* pObj, const rtl::OUString& rHlnk )
 {
     if ( pObj )
@@ -508,5 +505,4 @@ void ScDrawShell::SetHlinkForObject( Sdr
         lcl_setModified( GetObjectShell() );
     }
 }
-#endif
 
diff -rup ../src680_m217-dr55-applied/sc/source/ui/drawfunc/fudraw.cxx sc/source/ui/drawfunc/fudraw.cxx
--- ../src680_m217-dr55-applied/sc/source/ui/drawfunc/fudraw.cxx	2007-07-03 11:16:23.000000000 +0100
+++ sc/source/ui/drawfunc/fudraw.cxx	2007-07-04 09:44:58.000000000 +0100
@@ -899,11 +899,7 @@ void FuDraw::ForcePointer(const MouseEve
 			SdrObjMacroHitRec aHitRec;	//! muss da noch irgendwas gesetzt werden ????
 			pViewShell->SetActivePointer( pObj->GetMacroPointer(aHitRec) );
 		}
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
         else if ( !bAlt && pInfo && ((pInfo->GetMacro().getLength() > 0) || (pInfo->GetHlink().getLength() > 0)) )
-#else
-        else if ( !bAlt && pInfo && (pInfo->GetMacro().getLength() > 0) )
-#endif
 			pWindow->SetPointer( Pointer( POINTER_REFHAND ) );
 		else if ( IsDetectiveHit( aPnt ) )
 			pViewShell->SetActivePointer( Pointer( POINTER_DETECTIVE ) );
diff -rup ../src680_m217-dr55-applied/sc/source/ui/drawfunc/fusel.cxx sc/source/ui/drawfunc/fusel.cxx
--- ../src680_m217-dr55-applied/sc/source/ui/drawfunc/fusel.cxx	2007-07-03 11:16:23.000000000 +0100
+++ sc/source/ui/drawfunc/fusel.cxx	2007-07-04 09:47:00.000000000 +0100
@@ -210,7 +210,6 @@ BOOL __EXPORT FuSelection::MouseButtonDo
                    }
 
                    ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj, TRUE );
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
                    // For interoperability favour links over macros if both are defined
                    if ( pInfo->GetHlink().getLength() > 0 )
                    {
@@ -218,9 +217,6 @@ BOOL __EXPORT FuSelection::MouseButtonDo
                        sURL = pInfo->GetHlink();
                    }
                    else if ( pInfo->GetMacro().getLength() > 0 )
-#else
-                   if ( pInfo->GetMacro().getLength() > 0 )
-#endif
                    {
                        SfxObjectShell* pObjSh = SfxObjectShell::Current();
                        if ( pObjSh && SfxApplication::IsXScriptURL( pInfo->GetMacro() ) )
diff -rup ../src680_m217-dr55-applied/sc/source/ui/drawfunc/objdraw.src sc/source/ui/drawfunc/objdraw.src
--- ../src680_m217-dr55-applied/sc/source/ui/drawfunc/objdraw.src	2007-07-03 11:16:23.000000000 +0100
+++ sc/source/ui/drawfunc/objdraw.src	2007-07-04 12:55:13.000000000 +0100
@@ -190,7 +190,6 @@
         ITEM_FORMAT_PARA_DLG\
     };
 
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
 #define MN_EDITLNK \
     MenuItem\
     {\
@@ -206,7 +205,6 @@
         HelpID = SID_DRAW_HLINK_DELETE ; \
         Text [ en-US ] = "~Remove Hyperlink" ; \
 	};
-#endif
 
 #define MN_DRWTXTATTR \
     MenuItem\
@@ -1299,14 +1297,12 @@ Menu RID_POPUP_DRAW
 		MenuItem { Separator = TRUE ; };
 		 //------------------------------
 		ITEM_GROUP_MENU
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
 		 //------------------------------
 		MenuItem { Separator = TRUE ; };
 		 //------------------------------
 		MN_EDITLNK
 		MN_DELLNK
         MenuItem { ITEM_OPEN_HYPERLINK };
-#endif
 	};
 };
 
@@ -1376,14 +1372,12 @@ Menu RID_POPUP_GRAPHIC
 		MenuItem { Separator = TRUE ; };
 		 //------------------------------
 		ITEM_GROUP_MENU
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
 		 //------------------------------
 		MenuItem { Separator = TRUE ; };
 		 //------------------------------
 		MN_EDITLNK
 		MN_DELLNK
         MenuItem { ITEM_OPEN_HYPERLINK };
-#endif
 	};
 };
 
diff -rup ../src680_m217-dr55-applied/sc/source/ui/inc/drawsh.hxx sc/source/ui/inc/drawsh.hxx
--- ../src680_m217-dr55-applied/sc/source/ui/inc/drawsh.hxx	2007-07-03 11:16:23.000000000 +0100
+++ sc/source/ui/inc/drawsh.hxx	2007-07-04 09:48:36.000000000 +0100
@@ -62,9 +62,7 @@ class ScDrawShell : public SfxShell
 
     DECL_LINK( NameObjectHdl, AbstractSvxNameDialog* );
 
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
     void SetHlinkForObject( SdrObject* pObj, const rtl::OUString& rHlnk );
-#endif
 
 protected:
 	ScViewData*	GetViewData()	{ return pViewData; }
diff -rup ../src680_m217-dr55-applied/sc/source/ui/unoobj/shapeuno.cxx sc/source/ui/unoobj/shapeuno.cxx
--- ../src680_m217-dr55-applied/sc/source/ui/unoobj/shapeuno.cxx	2007-07-03 11:16:23.000000000 +0100
+++ sc/source/ui/unoobj/shapeuno.cxx	2007-07-04 14:35:39.000000000 +0100
@@ -77,6 +77,8 @@ const SfxItemPropertyMap* lcl_GetShapeMa
         {MAP_CHAR_LEN(SC_UNONAME_HORIPOS), 0, &getCppuType((sal_Int32*)0), 0, 0 },
 		{MAP_CHAR_LEN(SC_UNONAME_IMAGEMAP),	0, &getCppuType((uno::Reference<container::XIndexContainer>*)0), 0, 0 },
 		{MAP_CHAR_LEN(SC_UNONAME_VERTPOS), 0, &getCppuType((sal_Int32*)0), 0, 0 },
+		// #i66550 HLINK_FOR_SHAPES
+		{MAP_CHAR_LEN(SC_UNONAME_HYPERLINK), 0, &getCppuType((rtl::OUString*)0), 0, 0 },
         {0,0,0,0,0,0}
 	};
 	return aShapeMap_Impl;
@@ -91,6 +93,14 @@ const SvEventDescription* ScShapeObj::Ge
 	};
 	return aMacroDescriptionsImpl;
 }
+// #i66550 HLINK_FOR_SHAPES
+ScMacroInfo* lcl_getShapeHyperMacroInfo( ScShapeObj* pShape, BOOL bCreate = FALSE )
+{
+        if( pShape )
+            if( SdrObject* pObj = pShape->GetSdrObject() )
+                return ScDrawLayer::GetMacroInfo( pObj, bCreate );
+        return 0;
+}
 
 //------------------------------------------------------------------------
 
@@ -639,6 +649,13 @@ void SAL_CALL ScShapeObj::setPropertyVal
             }
         }
     }
+	else if  ( aNameString.EqualsAscii( SC_UNONAME_HYPERLINK ) )
+	{
+                rtl::OUString sHlink;
+        	ScMacroInfo* pInfo = lcl_getShapeHyperMacroInfo(this, TRUE);
+        	if ( ( aValue >>= sHlink ) && pInfo )
+			pInfo->SetHlink( sHlink );
+	}
 	else
 	{
         GetShapePropertySet();
@@ -820,6 +837,13 @@ uno::Any SAL_CALL ScShapeObj::getPropert
             }
         }
     }
+	else if ( aNameString.EqualsAscii( SC_UNONAME_HYPERLINK ) )
+	{
+		rtl::OUString sHlink;
+		if ( ScMacroInfo* pInfo = lcl_getShapeHyperMacroInfo(this) )
+			sHlink = pInfo->GetHlink();
+		aAny <<= sHlink;
+	}
 	else
 	{
         GetShapePropertySet();
@@ -1332,11 +1356,6 @@ SdrObject* ScShapeObj::GetSdrObject() co
 }
 
 #define SC_EVENTACC_ONCLICK     ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OnClick" ) )
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
-#define SC_EVENTACC_ONACTION    ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OnAction" ) )
-#define SC_EVENTACC_URL         ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "URL" ) )
-#define SC_EVENTACC_ACTION      ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Action" ) )
-#endif
 #define SC_EVENTACC_SCRIPT      ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Script" ) )
 #define SC_EVENTACC_EVENTTYPE   ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "EventType" ) )
 
@@ -1348,10 +1367,7 @@ private:
 
     ScMacroInfo* getInfo( BOOL bCreate = FALSE )
 	{
-        if( mpShape )
-            if( SdrObject* pObj = mpShape->GetSdrObject() )
-                return ScDrawLayer::GetMacroInfo( pObj, bCreate );
-        return 0;
+		return lcl_getShapeHyperMacroInfo( mpShape, bCreate );
 	}
 
 public:
@@ -1377,11 +1393,7 @@ public:
 				isEventType = true;
 				continue;
 			}
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
-            if ( isEventType && ((pProperties->Name == SC_EVENTACC_SCRIPT) || (pProperties->Name == SC_EVENTACC_URL)) )
-#else
             if ( isEventType && (pProperties->Name == SC_EVENTACC_SCRIPT) )
-#endif
 			{
                 rtl::OUString sValue;
                 if ( pProperties->Value >>= sValue )
@@ -1392,10 +1404,8 @@ public:
                         break;
                     if ( pProperties->Name == SC_EVENTACC_SCRIPT )
                         pInfo->SetMacro( sValue );
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
                     else
                         pInfo->SetHlink( sValue );
-#endif
                 }
 			}
 		}
@@ -1418,19 +1428,6 @@ public:
                 aProperties[ 1 ].Value <<= pInfo->GetMacro();
             }
         }
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
-        else if( aName == SC_EVENTACC_ONACTION )
-        {
-            if ( pInfo && (pInfo->GetHlink().getLength() > 0) )
-            {
-                aProperties.realloc( 2 );
-                aProperties[ 0 ].Name = SC_EVENTACC_EVENTTYPE;
-                aProperties[ 0 ].Value <<= SC_EVENTACC_ACTION;
-                aProperties[ 1 ].Name = SC_EVENTACC_URL;
-                aProperties[ 1 ].Value <<= pInfo->GetHlink();
-            }
-        }
-#endif
         else
         {
             throw container::NoSuchElementException();
@@ -1441,25 +1438,14 @@ public:
 
     virtual uno::Sequence< rtl::OUString > SAL_CALL getElementNames() throw(uno::RuntimeException)
 	{
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
-        uno::Sequence< rtl::OUString > aSeq( 2 );
-#else
         uno::Sequence< rtl::OUString > aSeq( 1 );
-#endif
         aSeq[ 0 ] = SC_EVENTACC_ONCLICK;
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
-        aSeq[ 1 ] = SC_EVENTACC_ONACTION;
-#endif
         return aSeq;
 	}
 
 	virtual sal_Bool SAL_CALL hasByName( const rtl::OUString& aName ) throw(uno::RuntimeException)
 	{
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
-        return (aName == SC_EVENTACC_ONCLICK) || (aName == SC_EVENTACC_ONACTION);
-#else
         return aName == SC_EVENTACC_ONCLICK;
-#endif
 	}
 
 	// XElementAccess
diff -rup ../src680_m217-dr55-applied/sc/source/ui/view/gridwin5.cxx sc/source/ui/view/gridwin5.cxx
--- ../src680_m217-dr55-applied/sc/source/ui/view/gridwin5.cxx	2007-07-03 11:16:23.000000000 +0100
+++ sc/source/ui/view/gridwin5.cxx	2007-07-04 13:53:00.000000000 +0100
@@ -359,14 +359,12 @@ void ScGridWindow::RequestHelp(const Hel
                                     if ( pDrView->PickObj(aMDPos, pHit, pPV, SDRSEARCH_DEEP ) )
                                         pObj = pHit;
                             }
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
                             ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj );
                             if ( pInfo && (pInfo->GetHlink().getLength() > 0) )
                             {
                                 aPixRect = LogicToPixel(aVEvt.pObj->GetLogicRect());
                                 aHelpText = pInfo->GetHlink();
                             }
-#endif
                         }
                     }
                 }
diff -rup ../src680_m217-dr55-applied/sc/sdi/drawsh.sdi sc/sdi/drawsh.sdi
--- ../src680_m217-dr55-applied/sc/sdi/drawsh.sdi	2007-07-03 11:16:23.000000000 +0100
+++ sc/sdi/drawsh.sdi	2007-07-04 13:50:38.000000000 +0100
@@ -233,9 +233,9 @@ interface TableDraw
     SID_FONTWORK_CHARACTER_SPACING_DIALOG	[ ExecMethod = ExecDrawFunc ; StateMethod = GetDrawFuncState ; ]
 
 // ISSUE66550_HLINK_FOR_SHAPES
-//    SID_DRAW_HLINK_EDIT             [ ExecMethod = ExecDrawAttr; StateMethod = GetDrawFuncState; Export = FALSE; ]
-//    SID_DRAW_HLINK_DELETE           [ ExecMethod = ExecDrawAttr; StateMethod = GetDrawFuncState; Export = FALSE; ]
-//    SID_OPEN_HYPERLINK              [ ExecMethod = ExecDrawAttr; StateMethod = GetDrawFuncState; Export = FALSE; ]
+    SID_DRAW_HLINK_EDIT             [ ExecMethod = ExecDrawAttr; StateMethod = GetDrawFuncState; Export = FALSE; ]
+    SID_DRAW_HLINK_DELETE           [ ExecMethod = ExecDrawAttr; StateMethod = GetDrawFuncState; Export = FALSE; ]
+    SID_OPEN_HYPERLINK              [ ExecMethod = ExecDrawAttr; StateMethod = GetDrawFuncState; Export = FALSE; ]
 }
 
 
diff -rup ../src680_m217-dr55-applied/sc/sdi/scalc.sdi sc/sdi/scalc.sdi
--- ../src680_m217-dr55-applied/sc/sdi/scalc.sdi	2007-07-03 11:16:23.000000000 +0100
+++ sc/sdi/scalc.sdi	2007-07-04 13:51:45.000000000 +0100
@@ -6327,55 +6327,55 @@ SfxVoidItem StandardFonts SID_STANDARD_F
 
 //--------------------------------------------------------------------------
 // ISSUE66550_HLINK_FOR_SHAPES
-//SfxVoidItem EditShapeHyperlink SID_DRAW_HLINK_EDIT
-//()
-//[
-//   /* flags: */
-//   AutoUpdate = FALSE,
-//   Cachable = Cachable,
-//   FastCall = TRUE,
-//   HasCoreId = FALSE,
-//   HasDialog = TRUE,
-//   ReadOnlyDoc = TRUE,
-//   Toggle = FALSE,
-//   Container = FALSE,
-//   RecordAbsolute = FALSE,
-//   RecordPerSet;
-//   Synchron;
-//
+SfxVoidItem EditShapeHyperlink SID_DRAW_HLINK_EDIT
+()
+[
+   /* flags: */
+   AutoUpdate = FALSE,
+   Cachable = Cachable,
+   FastCall = TRUE,
+   HasCoreId = FALSE,
+   HasDialog = TRUE,
+   ReadOnlyDoc = TRUE,
+   Toggle = FALSE,
+   Container = FALSE,
+   RecordAbsolute = FALSE,
+   RecordPerSet;
+   Synchron;
+
 //   /* config: */
-//   AccelConfig = TRUE,
-//   MenuConfig = FALSE,
-//   StatusBarConfig = FALSE,
-//   ToolBoxConfig = FALSE,
-//   GroupId = GID_DRAWING;
-//]
+   AccelConfig = TRUE,
+   MenuConfig = FALSE,
+   StatusBarConfig = FALSE,
+   ToolBoxConfig = FALSE,
+   GroupId = GID_DRAWING;
+]
 
 //--------------------------------------------------------------------------
 // ISSUE66550_HLINK_FOR_SHAPES
-//SfxVoidItem DeleteShapeHyperlink SID_DRAW_HLINK_DELETE
-//()
-//[
-//   /* flags: */
-//   AutoUpdate = TRUE,
-//   Cachable = Cachable,
-//   FastCall = TRUE,
-//   HasCoreId = FALSE,
-//   HasDialog = FALSE,
-//   ReadOnlyDoc = TRUE,
-//   Toggle = FALSE,
-//   Container = FALSE,
-//   RecordAbsolute = FALSE,
-//   RecordPerSet;
-//   Synchron;
-//
-//   /* config: */
-//   AccelConfig = TRUE,
-//   MenuConfig = FALSE,
-//   StatusBarConfig = FALSE,
-//   ToolBoxConfig = FALSE,
-//   GroupId = GID_DRAWING;
-//]
+SfxVoidItem DeleteShapeHyperlink SID_DRAW_HLINK_DELETE
+()
+[
+   /* flags: */
+   AutoUpdate = TRUE,
+   Cachable = Cachable,
+   FastCall = TRUE,
+   HasCoreId = FALSE,
+   HasDialog = FALSE,
+   ReadOnlyDoc = TRUE,
+   Toggle = FALSE,
+   Container = FALSE,
+   RecordAbsolute = FALSE,
+   RecordPerSet;
+   Synchron;
+
+   /* config: */
+   AccelConfig = TRUE,
+   MenuConfig = FALSE,
+   StatusBarConfig = FALSE,
+   ToolBoxConfig = FALSE,
+   GroupId = GID_DRAWING;
+]
 
 //--------------------------------------------------------------------------
 SfxVoidItem StandardTextAttributes SID_TEXT_STANDARD
Index: offapi/com/sun/star/drawing/Shape.idl
===================================================================
RCS file: /cvs/api/offapi/com/sun/star/drawing/Shape.idl,v
retrieving revision 1.18
diff -u -p -r1.18 Shape.idl
--- offapi/com/sun/star/drawing/Shape.idl	7 Sep 2005 23:48:02 -0000	1.18
+++ offapi/com/sun/star/drawing/Shape.idl	18 Jul 2007 19:29:56 -0000
@@ -192,6 +192,9 @@ published service Shape
 		@see com::sun::star::xml::AttributeContainer
 	*/
 	[optional, property] com::sun::star::container::XNameContainer ShapeUserDefinedAttributes;
+	/** this property lets you get and set a hyperlink for this shape.
+	 */
+	[optional, property] string Hyperlink;
 };
 
 //=============================================================================
