summaryrefslogtreecommitdiff
path: root/sc/source/filter/oox/drawingfragment.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/filter/oox/drawingfragment.cxx')
-rw-r--r--sc/source/filter/oox/drawingfragment.cxx21
1 files changed, 20 insertions, 1 deletions
diff --git a/sc/source/filter/oox/drawingfragment.cxx b/sc/source/filter/oox/drawingfragment.cxx
index 73e6b47eb7c1..6e8dc5ed5c90 100644
--- a/sc/source/filter/oox/drawingfragment.cxx
+++ b/sc/source/filter/oox/drawingfragment.cxx
@@ -35,6 +35,9 @@
#include <com/sun/star/script/ScriptEventDescriptor.hpp>
#include <com/sun/star/script/XEventAttacherManager.hpp>
#include <rtl/strbuf.hxx>
+#include <svx/svdobj.hxx>
+#include "drwlayer.hxx"
+#include "userdat.hxx"
#include "oox/drawingml/connectorshapecontext.hxx"
#include "oox/drawingml/graphicshapecontext.hxx"
#include "oox/helper/attributelist.hxx"
@@ -45,7 +48,7 @@
#include "stylesbuffer.hxx"
#include "themebuffer.hxx"
#include "unitconverter.hxx"
-
+#include "worksheetbuffer.hxx"
namespace oox {
namespace xls {
@@ -66,6 +69,10 @@ using namespace ::oox::core;
using namespace ::oox::drawingml;
using namespace ::oox::ole;
+using ::com::sun::star::awt::Size;
+using ::com::sun::star::awt::Point;
+using ::com::sun::star::awt::Rectangle;
+using ::com::sun::star::awt::XControlModel;
using ::rtl::OStringBuffer;
using ::rtl::OUString;
using ::rtl::OUStringToOString;
@@ -110,12 +117,24 @@ Shape::Shape( const WorksheetHelper& rHelper, const AttributeList& rAttribs, con
void Shape::finalizeXShape( XmlFilterBase& rFilter, const Reference< XShapes >& rxShapes )
{
+ rtl::OUString sURL;
+ getShapeProperties()[ PROP_URL ] >>= sURL;
+ getWorksheets().convertSheetNameRef( sURL );
if( !maMacroName.isEmpty() && mxShape.is() )
{
VbaMacroAttacherRef xAttacher( new ShapeMacroAttacher( maMacroName, mxShape ) );
getBaseFilter().getVbaProject().registerMacroAttacher( xAttacher );
}
::oox::drawingml::Shape::finalizeXShape( rFilter, rxShapes );
+ if ( !sURL.isEmpty() )
+ {
+ SdrObject* pObj = SdrObject::getSdrObjectFromXShape( mxShape );
+ if ( pObj )
+ {
+ if ( ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj, sal_True ) )
+ pInfo->SetHlink( sURL );
+ }
+ }
}
// ============================================================================