summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-01-31 00:19:00 +0100
committerNoel Power <noel.power@suse.com>2013-01-31 09:30:21 +0000
commit3a17d0b3fba7b5eb9f604baa96abcca2b929ee67 (patch)
treee6e1155c2d6b1958e17b97fa43a8fbe8c7655cbc /sc
parentbe9d9fee66aaa7123bd84b3d5a4fc08457774544 (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>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx13
1 files changed, 10 insertions, 3 deletions
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 5782dbc4ebac..2a595b03a296 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -3095,9 +3095,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