diff options
Diffstat (limited to 'patches/dev300/sc-export-shape-hlink-bindings.diff')
-rw-r--r-- | patches/dev300/sc-export-shape-hlink-bindings.diff | 207 |
1 files changed, 0 insertions, 207 deletions
diff --git a/patches/dev300/sc-export-shape-hlink-bindings.diff b/patches/dev300/sc-export-shape-hlink-bindings.diff deleted file mode 100644 index f593db7d4..000000000 --- a/patches/dev300/sc-export-shape-hlink-bindings.diff +++ /dev/null @@ -1,207 +0,0 @@ -diff --git sc/source/filter/excel/xecontent.cxx sc/source/filter/excel/xecontent.cxx -index 083cf7a..f9588b6 100644 ---- sc/source/filter/excel/xecontent.cxx -+++ sc/source/filter/excel/xecontent.cxx -@@ -461,12 +461,17 @@ void XclExpHyperlink::WriteBody( XclExpStream& rStrm ) - { - sal_uInt16 nXclCol = static_cast< sal_uInt16 >( maScPos.Col() ); - sal_uInt16 nXclRow = static_cast< sal_uInt16 >( maScPos.Row() ); -- mxVarData->Seek( STREAM_SEEK_TO_BEGIN ); -+ rStrm << nXclRow << nXclRow << nXclCol << nXclCol; -+ WriteEmbeddedData( rStrm ); -+} - -- rStrm << nXclRow << nXclRow << nXclCol << nXclCol -- << XclTools::maGuidStdLink -+void XclExpHyperlink::WriteEmbeddedData( XclExpStream& rStrm ) -+{ -+ rStrm << XclTools::maGuidStdLink - << sal_uInt32( 2 ) - << mnFlags; -+ -+ mxVarData->Seek( STREAM_SEEK_TO_BEGIN ); - rStrm.CopyFromStream( *mxVarData ); - } - -diff --git sc/source/filter/inc/xcl97esc.hxx sc/source/filter/inc/xcl97esc.hxx -index efb9076..3703827 100644 ---- sc/source/filter/inc/xcl97esc.hxx -+++ sc/source/filter/inc/xcl97esc.hxx -@@ -55,12 +55,13 @@ class XclExpOcxControlObj; - class XclExpTbxControlObj; - #endif - class XclExpShapeObj; -- -+class EscherExHostAppData; - class ShapeInteractionHelper - { - public: - static XclExpShapeObj* CreateShapeObj(const XclExpRoot& rRoot, const ::com::sun::star::uno::Reference< - ::com::sun::star::drawing::XShape >& xShape ); -+ static void PopulateShapeInteractionInfo( const XclExpRoot& rRoot, const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape, EscherExHostAppData& rHostAppData ); - }; - - class XclEscherEx : public EscherEx, protected XclExpRoot -diff --git sc/source/filter/xcl97/xcl97esc.cxx sc/source/filter/xcl97/xcl97esc.cxx -diff --git sc/source/filter/inc/xecontent.hxx sc/source/filter/inc/xecontent.hxx -index 729d653..aeb6c13 100644 ---- sc/source/filter/inc/xecontent.hxx -+++ sc/source/filter/inc/xecontent.hxx -@@ -116,6 +116,8 @@ public: - inline const String* GetRepr() const { return mxRepr.get(); } - - virtual void SaveXml( XclExpXmlStream& rStrm ); -+ -+ virtual void WriteEmbeddedData( XclExpStream& rStrm ); - private: - /** Builds file name from the passed file URL. Tries to convert to relative file name. - @param rnLevel (out-param) The parent directory level. -index aaa0316..cf9da11 100644 ---- sc/source/filter/xcl97/xcl97esc.cxx -+++ sc/source/filter/xcl97/xcl97esc.cxx -@@ -58,6 +58,9 @@ - #include "global.hxx" - #include "document.hxx" - #include "drwlayer.hxx" -+#include "xecontent.hxx" -+#include <svx/flditem.hxx> -+#include "userdat.hxx" - #include "xcl97rec.hxx" - #include "xehelper.hxx" - #include "xechart.hxx" -@@ -233,6 +236,7 @@ EscherExHostAppData* XclEscherEx::StartShape( const com::sun::star::uno::Referen - // #107540# ignore permanent note shapes - // #i12190# do not ignore callouts (do not filter by object type ID) - pCurrXclObj = ShapeInteractionHelper::CreateShapeObj( GetRoot(), rShape ); -+ ShapeInteractionHelper::PopulateShapeInteractionInfo( GetRoot(), rShape, *pCurrAppData ); - } - } - if ( pCurrXclObj ) -@@ -345,6 +349,7 @@ void XclEscherEx::DeleteCurrAppData() - delete pCurrAppData->GetClientAnchor(); - // delete pCurrAppData->GetClientData(); - delete pCurrAppData->GetClientTextbox(); -+ delete pCurrAppData->GetInteractionInfo(); - delete pCurrAppData; - } - } -@@ -581,3 +586,35 @@ ShapeInteractionHelper::CreateShapeObj(const XclExpRoot& rRoot, const Reference< - { - return new XclExpShapeObj( rRoot, xShape ); - } -+ -+void -+ShapeInteractionHelper::PopulateShapeInteractionInfo(const XclExpRoot& rRoot, const Reference< XShape >& xShape, EscherExHostAppData& rHostAppData ) -+{ -+ try -+ { -+ SvMemoryStream* pMemStrm = NULL; -+ rtl::OUString sHyperLink; -+ rtl::OUString sMacro; -+ if ( ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( ::GetSdrObjectFromXShape( xShape ) ) ) -+ { -+ sHyperLink = pInfo->GetHlink(); -+ sMacro = pInfo->GetMacro(); -+ } -+ if ( sHyperLink.getLength() > 0 ) -+ { -+ pMemStrm = new SvMemoryStream(); -+ XclExpStream tmpStream( *pMemStrm, rRoot ); -+ ScAddress dummyAddress; -+ SvxURLField aUrlField; -+ aUrlField.SetURL( sHyperLink ); -+ XclExpHyperlink hExpHlink( rRoot, aUrlField, dummyAddress ); -+ hExpHlink.WriteEmbeddedData( tmpStream ); -+ } -+ if ( ( sHyperLink.getLength() > 0 ) || ( sMacro.getLength() > 0 ) ) -+ rHostAppData.SetInteractionInfo( new InteractionInfo( pMemStrm, true ) ); -+ } -+ catch( Exception& ) -+ { -+ } -+} -+ -diff --git svx/inc/svx/escherex.hxx svx/inc/svx/escherex.hxx -index ad20c74..d7b7184 100644 ---- svx/inc/svx/escherex.hxx -+++ svx/inc/svx/escherex.hxx -@@ -47,6 +47,7 @@ - #include <com/sun/star/drawing/Hatch.hpp> - #include <svx/msdffdef.hxx> - #include "svx/svxdllapi.h" -+#include <memory> - - /*Record Name FBT-Value Instance Contents Wrd Exl PPt Ver*/ - // In der Mickysoft-Doku heissen die msofbt... statt ESCHER_... -@@ -1256,6 +1257,19 @@ public: - const Rectangle& rRect ) = 0; - }; - -+class InteractionInfo -+{ -+ bool mbHasInteraction; -+ std::auto_ptr<SvMemoryStream> mpHyperlinkRecord; -+ InteractionInfo(); -+public: -+ InteractionInfo( SvMemoryStream* pStream, bool bInteraction ) : mbHasInteraction( bInteraction ) -+ { -+ mpHyperlinkRecord.reset( pStream ); -+ } -+ bool hasInteraction() { return mbHasInteraction; } -+ const std::auto_ptr< SvMemoryStream >& getHyperlinkRecord() { return mpHyperlinkRecord; } -+}; - - class EscherExHostAppData - { -@@ -1263,14 +1277,17 @@ private: - EscherExClientAnchor_Base* pClientAnchor; - EscherExClientRecord_Base* pClientData; - EscherExClientRecord_Base* pClientTextbox; -+ InteractionInfo* pInteractionInfo; - // ignore single shape if entire pages are written - BOOL bDontWriteShape; - - public: - EscherExHostAppData() : pClientAnchor(0), pClientData(0), -- pClientTextbox(0), bDontWriteShape(FALSE) -+ pClientTextbox(0), pInteractionInfo(0), bDontWriteShape(FALSE) - {} - -+ void SetInteractionInfo( InteractionInfo* p ) -+ { pInteractionInfo = p; } - void SetClientAnchor( EscherExClientAnchor_Base* p ) - { pClientAnchor = p; } - void SetClientData( EscherExClientRecord_Base* p ) -@@ -1279,6 +1296,8 @@ public: - { pClientTextbox = p; } - void SetDontWriteShape( BOOL b ) - { bDontWriteShape = b; } -+ InteractionInfo* GetInteractionInfo() const -+ { return pInteractionInfo; } - EscherExClientAnchor_Base* GetClientAnchor() const - { return pClientAnchor; } - EscherExClientRecord_Base* GetClientData() const -diff --git svx/source/msfilter/eschesdo.cxx svx/source/msfilter/eschesdo.cxx -index e93661a..243c236 100644 ---- svx/source/msfilter/eschesdo.cxx -+++ svx/source/msfilter/eschesdo.cxx -@@ -251,6 +251,19 @@ UINT32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj, - // #i51348# shape name - if( aShapeName.Len() > 0 ) - aPropOpt.AddOpt( ESCHER_Prop_wzName, aShapeName ); -+ if ( InteractionInfo* pInteraction = mpHostAppData ? mpHostAppData->GetInteractionInfo():NULL ) -+ { -+ const std::auto_ptr< SvMemoryStream >& pMemStrm = pInteraction->getHyperlinkRecord(); -+ if ( pMemStrm.get() ) -+ { -+ pMemStrm->ObjectOwnsMemory( FALSE ); -+ sal_uInt8* pBuf = (sal_uInt8*) pMemStrm->GetData(); -+ sal_uInt32 nSize = pMemStrm->Seek( STREAM_SEEK_TO_END ); -+ aPropOpt.AddOpt( ESCHER_Prop_pihlShape, sal_False, nSize, pBuf, nSize );; -+ } -+ if ( pInteraction->hasInteraction() ) -+ aPropOpt.AddOpt( ESCHER_Prop_fPrint, 0x00080008 ); -+ } - - if ( rObj.GetType().EqualsAscii( "drawing.Custom" ) ) - { |