ooo-build r14661 - in trunk: . patches/dev300 patches/vba
- From: noelpwer svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r14661 - in trunk: . patches/dev300 patches/vba
- Date: Fri, 28 Nov 2008 16:40:17 +0000 (UTC)
Author: noelpwer
Date: Fri Nov 28 16:40:17 2008
New Revision: 14661
URL: http://svn.gnome.org/viewvc/ooo-build?rev=14661&view=rev
Log:
2008-11-28 Noel Power <noel power novell com>
* patches/dev300/apply: tweak & re-enable patch below
* patches/dev300/vba-sc-autoshapes-hyperlinks.diff:
* patches/vba/ObjectModule.diff: tweak again because the above patch
affects the context
Modified:
trunk/ChangeLog
trunk/patches/dev300/apply
trunk/patches/dev300/vba-sc-autoshapes-hyperlinks.diff
trunk/patches/vba/ObjectModule.diff
Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply (original)
+++ trunk/patches/dev300/apply Fri Nov 28 16:40:17 2008
@@ -723,7 +723,7 @@
# Fix autoshape excel hyperlink import OOo ( depends on vba-sc-handleautoshapemacro-import.diff )
# FIXME 2008-11-26: doesn't apply to dev300-m35, maybe because of lack of diffs
# above that has also been bypassed
-# vba-sc-autoshapes-hyperlinks.diff, i#66550, noelpwer
+vba-sc-autoshapes-hyperlinks.diff, i#66550, noelpwer
# Delete Rows/Delete Columns should remember the content so that the user is
# able to paste it elsewhere (similar to Insert Cut Cells in Excel)
Modified: trunk/patches/dev300/vba-sc-autoshapes-hyperlinks.diff
==============================================================================
--- trunk/patches/dev300/vba-sc-autoshapes-hyperlinks.diff (original)
+++ trunk/patches/dev300/vba-sc-autoshapes-hyperlinks.diff Fri Nov 28 16:40:17 2008
@@ -1,223 +1,23 @@
-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
+diff --git offapi/com/sun/star/drawing/Shape.idl offapi/com/sun/star/drawing/Shape.idl
+index 536ab62..bc5a70f 100644
+--- offapi/com/sun/star/drawing/Shape.idl
++++ offapi/com/sun/star/drawing/Shape.idl
+@@ -195,6 +195,10 @@ published service Shape
+ the z-order.
+ */
+ [optional, property] long NavigationOrder;
++
++ /** this property lets you get and set a hyperlink for this shape.
++ */
++ [optional, property] string Hyperlink;
};
- ///////////////////////////////////////////////////////////////////////
-@@ -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 @@
+ //=============================================================================
+diff --git sc/inc/sc.hrc sc/inc/sc.hrc
+index be881a4..152289f 100644
+--- sc/inc/sc.hrc
++++ sc/inc/sc.hrc
+@@ -593,11 +593,9 @@
// #i59082# assign macro to shape
#define SID_ASSIGNMACRO (SC_VIEW_START + 95)
@@ -227,12 +27,13 @@
#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
+ // "Zoom / Synchronize sheets" in options dialog
+ #define SID_SC_OPT_SYNCZOOM (SC_VIEW_START + 98)
+diff --git sc/inc/shapeuno.hxx sc/inc/shapeuno.hxx
+index a628d28..10833bf 100644
+--- sc/inc/shapeuno.hxx
++++ sc/inc/shapeuno.hxx
+@@ -53,6 +53,7 @@ namespace com { namespace sun { namespace star {
class SdrObject;
struct SvEventDescription;
class ShapeUnoEventAccessImpl;
@@ -240,7 +41,7 @@
//------------------------------------------------------------------------
-@@ -89,6 +90,7 @@ class ScShapeObj : public ::cppu::OWeakO
+@@ -68,6 +69,7 @@ class ScShapeObj : public ::cppu::OWeakObject,
public ::com::sun::star::document::XEventsSupplier
{
private:
@@ -248,10 +49,11 @@
::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 @@
+diff --git sc/inc/unonames.hxx sc/inc/unonames.hxx
+index 7d331e1..b2c45ac 100644
+--- sc/inc/unonames.hxx
++++ sc/inc/unonames.hxx
+@@ -182,6 +182,8 @@
#define SC_UNONAME_ANCHOR "Anchor"
#define SC_UNONAME_HORIPOS "HoriOrientPosition"
#define SC_UNONAME_VERTPOS "VertOrientPosition"
@@ -260,10 +62,11 @@
// 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:
+diff --git sc/inc/userdat.hxx sc/inc/userdat.hxx
+index cba05d0..3099b87 100644
+--- sc/inc/userdat.hxx
++++ sc/inc/userdat.hxx
+@@ -101,16 +101,12 @@ public:
void SetMacro( const rtl::OUString& rMacro ) { maMacro = rMacro; }
const rtl::OUString& GetMacro() const { return maMacro; }
@@ -280,83 +83,240 @@
};
//-------------------------------------------------------------------------
-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/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 --git sc/sdi/drawsh.sdi sc/sdi/drawsh.sdi
+index b52250e..3c860f9 100644
+--- sc/sdi/drawsh.sdi
++++ sc/sdi/drawsh.sdi
+@@ -229,9 +229,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/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
- }
+
+diff --git sc/sdi/scalc.sdi sc/sdi/scalc.sdi
+index cca4416..9bf0630 100644
+--- sc/sdi/scalc.sdi
++++ sc/sdi/scalc.sdi
+@@ -6397,55 +6397,55 @@ SfxVoidItem StandardFonts SID_STANDARD_FONTS
+
+ //--------------------------------------------------------------------------
+ // 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
+diff --git sc/source/filter/excel/xiescher.cxx sc/source/filter/excel/xiescher.cxx
+index 4d6fddf..7b8f936 100644
+--- sc/source/filter/excel/xiescher.cxx
++++ sc/source/filter/excel/xiescher.cxx
+@@ -491,7 +491,6 @@ void XclImpDrawObjBase::ProcessSdrObject( SdrObject& rSdrObj ) const
+ }
+
+ // macro and hyperlink
+-#ifdef ISSUE66550_HLINK_FOR_SHAPES
+ if( mbSimpleMacro && ((maMacroName.Len() > 0) || (maHyperlink.getLength() > 0)) )
+ {
+ if( ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( &rSdrObj, TRUE ) )
+@@ -500,11 +499,6 @@ void XclImpDrawObjBase::ProcessSdrObject( SdrObject& rSdrObj ) const
+ pInfo->SetHlink( maHyperlink );
+ }
+ }
+-#else
+- if( mbSimpleMacro && (maMacroName.Len() > 0) )
+- if( ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( &rSdrObj, TRUE ) )
+- pInfo->SetMacro( XclControlHelper::GetScMacroName( maMacroName ) );
+-#endif
+
+ // call virtual function for object type specific processing
+ DoProcessSdrObj( rSdrObj );
+diff --git sc/source/filter/xml/xmlexprt.cxx sc/source/filter/xml/xmlexprt.cxx
+index 495b35a..b06fbdd 100644
+--- sc/source/filter/xml/xmlexprt.cxx
++++ sc/source/filter/xml/xmlexprt.cxx
+@@ -2514,7 +2514,34 @@ void ScXMLExport::ExportShape(const uno::Reference < drawing::XShape >& xShape,
+ }
+ }
+ 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 --git sc/source/ui/drawfunc/drawsh.cxx sc/source/ui/drawfunc/drawsh.cxx
+index 39c3d76..c657abf 100644
+--- sc/source/ui/drawfunc/drawsh.cxx
++++ sc/source/ui/drawfunc/drawsh.cxx
+@@ -210,7 +210,6 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq )
+ ExecuteTextAttrDlg( rReq );
+ break;
+
+-#ifdef ISSUE66550_HLINK_FOR_SHAPES
+ case SID_DRAW_HLINK_EDIT:
+ if ( pSingleSelectedObj )
+ pViewData->GetDispatcher().Execute( SID_HYPERLINK_DIALOG );
+@@ -238,7 +237,6 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq )
+ ScGlobal::OpenURL( pInfo->GetHlink(), String::EmptyString() );
+ }
+ break;
+-#endif
+
+ case SID_ATTR_TRANSFORM:
+ {
+@@ -490,7 +488,6 @@ void ScDrawShell::ExecuteTextAttrDlg( SfxRequest& rReq, USHORT /* nTabPage */ )
+ delete( pDlg );
+ }
+
+-#ifdef ISSUE66550_HLINK_FOR_SHAPES
+ void ScDrawShell::SetHlinkForObject( SdrObject* pObj, const rtl::OUString& rHlnk )
+ {
+ if ( pObj )
+@@ -500,5 +497,4 @@ void ScDrawShell::SetHlinkForObject( SdrObject* pObj, const rtl::OUString& rHlnk
+ lcl_setModified( GetObjectShell() );
+ }
+ }
+-#endif
+
+diff --git sc/source/ui/drawfunc/drawsh2.cxx sc/source/ui/drawfunc/drawsh2.cxx
+index bd6f2a1..27bfc44 100644
+--- sc/source/ui/drawfunc/drawsh2.cxx
++++ sc/source/ui/drawfunc/drawsh2.cxx
+@@ -199,24 +199,20 @@ void ScDrawShell::GetDrawFuncState( SfxItemSet& rSet ) // Funktionen disablen
+ 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();
@@ -371,10 +331,11 @@
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
+diff --git sc/source/ui/drawfunc/drawsh5.cxx sc/source/ui/drawfunc/drawsh5.cxx
+index 16e20a9..4fd06bf 100644
+--- sc/source/ui/drawfunc/drawsh5.cxx
++++ sc/source/ui/drawfunc/drawsh5.cxx
+@@ -95,14 +95,12 @@ void ScDrawShell::GetHLinkState( SfxItemSet& rSet ) // Hyperlink
if ( nMarkCount == 1 ) // URL-Button markiert ?
{
SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
@@ -389,7 +350,7 @@
SdrUnoObj* pUnoCtrl = PTR_CAST(SdrUnoObj, pObj);
if (pUnoCtrl && FmFormInventor == pUnoCtrl->GetObjInventor())
{
-@@ -253,13 +251,11 @@ void ScDrawShell::ExecuteHLink( SfxReque
+@@ -245,13 +243,11 @@ void ScDrawShell::ExecuteHLink( SfxRequest& rReq )
bDone = TRUE;
}
}
@@ -403,43 +364,11 @@
}
}
-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
+diff --git sc/source/ui/drawfunc/fudraw.cxx sc/source/ui/drawfunc/fudraw.cxx
+index 5c0460f..d060c2f 100644
+--- sc/source/ui/drawfunc/fudraw.cxx
++++ sc/source/ui/drawfunc/fudraw.cxx
+@@ -891,11 +891,7 @@ void FuDraw::ForcePointer(const MouseEvent* pMEvt)
SdrObjMacroHitRec aHitRec; //! muss da noch irgendwas gesetzt werden ????
pViewShell->SetActivePointer( pObj->GetMacroPointer(aHitRec) );
}
@@ -451,10 +380,11 @@
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
+diff --git sc/source/ui/drawfunc/fusel.cxx sc/source/ui/drawfunc/fusel.cxx
+index 41c3e60..57bb6ba 100644
+--- sc/source/ui/drawfunc/fusel.cxx
++++ sc/source/ui/drawfunc/fusel.cxx
+@@ -205,7 +205,6 @@ BOOL __EXPORT FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
}
ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj, TRUE );
@@ -462,7 +392,7 @@
// For interoperability favour links over macros if both are defined
if ( pInfo->GetHlink().getLength() > 0 )
{
-@@ -218,9 +217,6 @@ BOOL __EXPORT FuSelection::MouseButtonDo
+@@ -213,9 +212,6 @@ BOOL __EXPORT FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
sURL = pInfo->GetHlink();
}
else if ( pInfo->GetMacro().getLength() > 0 )
@@ -472,10 +402,11 @@
{
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 @@
+diff --git sc/source/ui/drawfunc/objdraw.src sc/source/ui/drawfunc/objdraw.src
+index 53d70c1..a1986b1 100644
+--- sc/source/ui/drawfunc/objdraw.src
++++ sc/source/ui/drawfunc/objdraw.src
+@@ -185,7 +185,6 @@
ITEM_FORMAT_PARA_DLG\
};
@@ -483,7 +414,7 @@
#define MN_EDITLNK \
MenuItem\
{\
-@@ -206,7 +205,6 @@
+@@ -201,7 +200,6 @@
HelpID = SID_DRAW_HLINK_DELETE ; \
Text [ en-US ] = "~Remove Hyperlink" ; \
};
@@ -491,7 +422,7 @@
#define MN_DRWTXTATTR \
MenuItem\
-@@ -1299,14 +1297,12 @@ Menu RID_POPUP_DRAW
+@@ -1294,14 +1292,12 @@ Menu RID_POPUP_DRAW
MenuItem { Separator = TRUE ; };
//------------------------------
ITEM_GROUP_MENU
@@ -506,7 +437,7 @@
};
};
-@@ -1376,14 +1372,12 @@ Menu RID_POPUP_GRAPHIC
+@@ -1371,14 +1367,12 @@ Menu RID_POPUP_GRAPHIC
MenuItem { Separator = TRUE ; };
//------------------------------
ITEM_GROUP_MENU
@@ -521,10 +452,11 @@
};
};
-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
+diff --git sc/source/ui/inc/drawsh.hxx sc/source/ui/inc/drawsh.hxx
+index 20b150f..9435ec8 100644
+--- sc/source/ui/inc/drawsh.hxx
++++ sc/source/ui/inc/drawsh.hxx
+@@ -47,9 +47,7 @@ class ScDrawShell : public SfxShell
DECL_LINK( NameObjectHdl, AbstractSvxNameDialog* );
@@ -534,10 +466,11 @@
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
+diff --git sc/source/ui/unoobj/shapeuno.cxx sc/source/ui/unoobj/shapeuno.cxx
+index 151acf8..1d8a944 100644
+--- sc/source/ui/unoobj/shapeuno.cxx
++++ sc/source/ui/unoobj/shapeuno.cxx
+@@ -72,6 +72,8 @@ const SfxItemPropertyMap* lcl_GetShapeMap()
{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 },
@@ -546,7 +479,7 @@
{0,0,0,0,0,0}
};
return aShapeMap_Impl;
-@@ -91,6 +93,14 @@ const SvEventDescription* ScShapeObj::Ge
+@@ -86,6 +88,14 @@ const SvEventDescription* ScShapeObj::GetSupportedMacroItems()
};
return aMacroDescriptionsImpl;
}
@@ -561,7 +494,7 @@
//------------------------------------------------------------------------
-@@ -639,6 +649,13 @@ void SAL_CALL ScShapeObj::setPropertyVal
+@@ -627,6 +637,13 @@ void SAL_CALL ScShapeObj::setPropertyValue(
}
}
}
@@ -575,7 +508,7 @@
else
{
GetShapePropertySet();
-@@ -820,6 +837,13 @@ uno::Any SAL_CALL ScShapeObj::getPropert
+@@ -808,6 +825,13 @@ uno::Any SAL_CALL ScShapeObj::getPropertyValue( const rtl::OUString& aPropertyNa
}
}
}
@@ -589,7 +522,7 @@
else
{
GetShapePropertySet();
-@@ -1332,11 +1356,6 @@ SdrObject* ScShapeObj::GetSdrObject() co
+@@ -1320,11 +1344,6 @@ SdrObject* ScShapeObj::GetSdrObject() const throw()
}
#define SC_EVENTACC_ONCLICK ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OnClick" ) )
@@ -601,7 +534,7 @@
#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:
+@@ -1336,10 +1355,7 @@ private:
ScMacroInfo* getInfo( BOOL bCreate = FALSE )
{
@@ -613,7 +546,7 @@
}
public:
-@@ -1377,11 +1393,7 @@ public:
+@@ -1365,11 +1381,7 @@ public:
isEventType = true;
continue;
}
@@ -625,7 +558,7 @@
{
rtl::OUString sValue;
if ( pProperties->Value >>= sValue )
-@@ -1392,10 +1404,8 @@ public:
+@@ -1380,10 +1392,8 @@ public:
break;
if ( pProperties->Name == SC_EVENTACC_SCRIPT )
pInfo->SetMacro( sValue );
@@ -636,7 +569,7 @@
}
}
}
-@@ -1418,19 +1428,6 @@ public:
+@@ -1406,19 +1416,6 @@ public:
aProperties[ 1 ].Value <<= pInfo->GetMacro();
}
}
@@ -656,7 +589,7 @@
else
{
throw container::NoSuchElementException();
-@@ -1441,25 +1438,14 @@ public:
+@@ -1429,25 +1426,14 @@ public:
virtual uno::Sequence< rtl::OUString > SAL_CALL getElementNames() throw(uno::RuntimeException)
{
@@ -682,10 +615,11 @@
}
// 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
+diff --git sc/source/ui/view/gridwin5.cxx sc/source/ui/view/gridwin5.cxx
+index 81ef0df..57797eb 100644
+--- sc/source/ui/view/gridwin5.cxx
++++ sc/source/ui/view/gridwin5.cxx
+@@ -345,14 +345,12 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt)
if ( pDrView->PickObj(aMDPos, pHit, pPV, SDRSEARCH_DEEP ) )
pObj = pHit;
}
@@ -700,147 +634,231 @@
}
}
}
-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 ; ]
+diff --git xmloff/inc/xmloff/shapeexport.hxx xmloff/inc/xmloff/shapeexport.hxx
+index bb3b369..bc331e8 100644
+--- xmloff/inc/xmloff/shapeexport.hxx
++++ xmloff/inc/xmloff/shapeexport.hxx
+@@ -197,11 +197,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 --git xmloff/source/draw/eventimp.cxx xmloff/source/draw/eventimp.cxx
+index 54c0683..57c8dee 100644
+--- xmloff/source/draw/eventimp.cxx
++++ xmloff/source/draw/eventimp.cxx
+@@ -104,9 +104,6 @@ public:
- // 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; ]
- }
+ sal_Bool mbValid;
+ sal_Bool mbScript;
+-#ifdef ISSUE66550_HLINK_FOR_SHAPES
+- sal_Bool mbActionEvent;
+-#endif
+ ClickAction meClickAction;
+ XMLEffect meEffect;
+ XMLEffectDirection meDirection;
+@@ -118,9 +115,6 @@ public:
+ OUString msMacroName;
+ OUString msBookmark;
+ OUString msLanguage;
+-#ifdef ISSUE66550_HLINK_FOR_SHAPES
+- OUString msHyperURL;
+-#endif
+ };
+
+ ///////////////////////////////////////////////////////////////////////
+@@ -179,18 +173,11 @@ TYPEINIT1( SdXMLEventContext, SvXMLImportContext );
+
+ 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 ) )
+ {
+@@ -261,12 +248,7 @@ SdXMLEventContext::SdXMLEventContext( SvXMLImport& rImp, sal_uInt16 nPrfx, cons
+ 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 ) )
+ {
+@@ -295,12 +277,6 @@ SdXMLEventContext::SdXMLEventContext( SvXMLImport& rImp, sal_uInt16 nPrfx, cons
+ {
+ msMacroName = sValue;
+ }
+-#ifdef ISSUE66550_HLINK_FOR_SHAPES
+- else if ( mbActionEvent )
+- {
+- msHyperURL = sValue;
+- }
+-#endif
+ else
+ {
+ const rtl::OUString &rTmp =
+@@ -346,26 +322,6 @@ void SdXMLEventContext::EndElement()
+ OUString sAPIEventName;
+ uno::Sequence< beans::PropertyValue > aProperties;
-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
+-#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" ) );
- //--------------------------------------------------------------------------
- // 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;
-+]
+ if( mbScript )
+@@ -550,8 +506,6 @@ void SdXMLEventContext::EndElement()
+ break;
+ }
+ }
+- }
+-
+ xEvents->replaceByName( sAPIEventName, uno::Any( aProperties ) );
- //--------------------------------------------------------------------------
- // 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;
-+]
+ } while(0);
+diff --git xmloff/source/draw/shapeexport.cxx xmloff/source/draw/shapeexport.cxx
+index 4691d72..0bfa0cb 100644
+--- xmloff/source/draw/shapeexport.cxx
++++ xmloff/source/draw/shapeexport.cxx
+@@ -87,11 +87,6 @@ XMLShapeExport::XMLShapeExport(SvXMLExport& rExp,
+ 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 --git xmloff/source/draw/shapeexport2.cxx xmloff/source/draw/shapeexport2.cxx
+index c3594a6..d7005be 100644
+--- xmloff/source/draw/shapeexport2.cxx
++++ xmloff/source/draw/shapeexport2.cxx
+@@ -296,9 +296,6 @@ const sal_Int32 FOUND_CLICKEVENTTYPE = 0x00000080;
+ 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
- //--------------------------------------------------------------------------
- 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,10 @@ published service Shape
- the z-order.
- */
- [optional, property] long NavigationOrder;
-+
-+ /** this property lets you get and set a hyperlink for this shape.
-+ */
-+ [optional, property] string Hyperlink;
- };
+ } // namespace
- //=============================================================================
---- xmloff/source/draw/ximpshap.cxx 2008-06-26 20:29:00.000000000 +0100
-+++ xmloff/source/draw/ximpshap.cxx 2008-06-26 21:02:45.000000000 +0100
-@@ -378,6 +378,11 @@ void SdXMLShapeContext::EndElement()
+@@ -388,33 +385,6 @@ void XMLShapeExport::ImpExportEvents( const uno::Reference< drawing::XShape >& x
+ }
+ }
+
+-#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 )
+@@ -566,15 +536,9 @@ void XMLShapeExport::ImpExportEvents( const uno::Reference< drawing::XShape >& x
+ 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 )
+@@ -589,18 +553,6 @@ void XMLShapeExport::ImpExportEvents( const uno::Reference< drawing::XShape >& x
+
+ 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 --git xmloff/source/draw/ximpshap.cxx xmloff/source/draw/ximpshap.cxx
+index 5d1d0da..c461d59 100644
+--- xmloff/source/draw/ximpshap.cxx
++++ xmloff/source/draw/ximpshap.cxx
+@@ -375,6 +375,11 @@ void SdXMLShapeContext::EndElement()
if( msHyperlink.getLength() != 0 ) try
{
@@ -852,7 +870,7 @@
Reference< XEventsSupplier > xEventsSupplier( mxShape, UNO_QUERY_THROW );
Reference< XNameReplace > xEvents( xEventsSupplier->getEvents(), UNO_QUERY_THROW );
-@@ -3201,9 +3206,16 @@ SvXMLImportContext *SdXMLFrameShapeConte
+@@ -3230,9 +3235,16 @@ SvXMLImportContext *SdXMLFrameShapeContext::CreateChildContext( USHORT nPrefix,
if( !mxImplContext.Is() )
{
Modified: trunk/patches/vba/ObjectModule.diff
==============================================================================
--- trunk/patches/vba/ObjectModule.diff (original)
+++ trunk/patches/vba/ObjectModule.diff Fri Nov 28 16:40:17 2008
@@ -2029,7 +2029,7 @@
index 2508629..4d6fddf 100644
--- sc/source/filter/excel/xiescher.cxx
+++ sc/source/filter/excel/xiescher.cxx
-@@ -496,14 +496,14 @@ void XclImpDrawObjBase::ProcessSdrObject( SdrObject& rSdrObj ) const
+@@ -496,7 +496,7 @@ void XclImpDrawObjBase::ProcessSdrObject( SdrObject& rSdrObj ) const
{
if( ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( &rSdrObj, TRUE ) )
{
@@ -2038,14 +2038,6 @@
pInfo->SetHlink( maHyperlink );
}
}
- #else
- if( mbSimpleMacro && (maMacroName.Len() > 0) )
- if( ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( &rSdrObj, TRUE ) )
-- pInfo->SetMacro( XclControlHelper::GetScMacroName( maMacroName ) );
-+ pInfo->SetMacro( XclControlHelper::GetScMacroName( maMacroName, GetDocShell() ) );
- #endif
-
- // call virtual function for object type specific processing
@@ -1887,7 +1887,7 @@ void XclImpTbxObjBase::SetDffProperties( const DffPropSet& rDffPropSet )
bool XclImpTbxObjBase::FillMacroDescriptor( ScriptEventDescriptor& rDescriptor ) const
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]