summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2021-07-15 11:50:57 +0200
committerSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2021-07-19 12:55:41 +0200
commit903f7dd825caca1af15d985658043ec055c4eb45 (patch)
tree5c4f83603f93c7823165c85c492c073114920b23
parent739aaf02db3353fac8490272cab0c9486570f76d (diff)
Make obvious that this is in a try/catch block
Change-Id: I1118ef026730481eeef127b570bfd59de4434455 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119163 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
-rw-r--r--xmloff/source/draw/shapeexport.cxx37
1 files changed, 20 insertions, 17 deletions
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index d9d4116a2c55..105281b46d0c 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -583,29 +583,32 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape
// export hyperlinks with <a><shape/></a>. Currently only in draw since draw
// does not support document events
- if( xSet.is() && (GetExport().GetModelType() == SvtModuleOptions::EFactory::DRAW) ) try
+ if( xSet.is() && (GetExport().GetModelType() == SvtModuleOptions::EFactory::DRAW) )
{
- presentation::ClickAction eAction = presentation::ClickAction_NONE;
- xSet->getPropertyValue("OnClick") >>= eAction;
-
- if( (eAction == presentation::ClickAction_DOCUMENT) ||
- (eAction == presentation::ClickAction_BOOKMARK) )
+ try
{
- OUString sURL;
- xSet->getPropertyValue(gsBookmark) >>= sURL;
+ presentation::ClickAction eAction = presentation::ClickAction_NONE;
+ xSet->getPropertyValue("OnClick") >>= eAction;
- if( !sURL.isEmpty() )
+ if( (eAction == presentation::ClickAction_DOCUMENT) ||
+ (eAction == presentation::ClickAction_BOOKMARK) )
{
- mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, sURL );
- mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
- mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_SHOW, XML_EMBED );
- pHyperlinkElement.reset( new SvXMLElementExport(mrExport, XML_NAMESPACE_DRAW, XML_A, true, true) );
+ OUString sURL;
+ xSet->getPropertyValue(gsBookmark) >>= sURL;
+
+ if( !sURL.isEmpty() )
+ {
+ mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, sURL );
+ mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
+ mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_SHOW, XML_EMBED );
+ pHyperlinkElement.reset( new SvXMLElementExport(mrExport, XML_NAMESPACE_DRAW, XML_A, true, true) );
+ }
}
}
- }
- catch(const uno::Exception&)
- {
- TOOLS_WARN_EXCEPTION("xmloff", "XMLShapeExport::exportShape(): exception during hyperlink export");
+ catch(const uno::Exception&)
+ {
+ TOOLS_WARN_EXCEPTION("xmloff", "XMLShapeExport::exportShape(): exception during hyperlink export");
+ }
}
if( xSet.is() )