diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-01-31 00:19:00 +0100 |
---|---|---|
committer | Noel Power <noel.power@suse.com> | 2013-02-01 10:22:29 +0000 |
commit | e483ea0d8abda0eb5a0e8cef55229f3e8ac06a21 (patch) | |
tree | 215bf6b3473a4ce5a362105f5847a8d2a64a7c8b | |
parent | b865d4fceb035d9de481f73724c2473f2a893b6e (diff) |
Hyperlink is an optional property, fdo#58858
Change-Id: I30f2b0cdb72951a47cfd8d0091b5418fd59efe83
Reviewed-on: https://gerrit.libreoffice.org/1930
Reviewed-by: Noel Power <noel.power@suse.com>
Tested-by: Noel Power <noel.power@suse.com>
Reviewed-on: https://gerrit.libreoffice.org/1941
-rw-r--r-- | sc/source/filter/xml/xmlexprt.cxx | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index 7ac035168ea0..b599e6e6328d 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -3092,9 +3092,16 @@ void ScXMLExport::ExportShape(const uno::Reference < drawing::XShape >& xShape, { // #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; + try + { + uno::Reference< beans::XPropertySet > xProps( xShape, uno::UNO_QUERY ); + if ( xProps.is() ) + xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_HYPERLINK ) ) ) >>= sHlink; + } + catch ( const beans::UnknownPropertyException& ) + { + // no hyperlink property + } std::auto_ptr< SvXMLElementExport > pDrawA; // enlose shapes with <draw:a> element only if sHlink contains something |