Kaydet (Commit) 3a17d0b3 authored tarafından Markus Mohrhard's avatar Markus Mohrhard Kaydeden (comit) Noel Power

Hyperlink is an optional property, fdo#58858

Change-Id: I30f2b0cdb72951a47cfd8d0091b5418fd59efe83
Reviewed-on: https://gerrit.libreoffice.org/1930Reviewed-by: 's avatarNoel Power <noel.power@suse.com>
Tested-by: 's avatarNoel Power <noel.power@suse.com>
üst be9d9fee
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment