[Libreoffice-commits] core.git: xmloff/source
Samuel Mehrbrodt (via logerrit)
logerrit at kemper.freedesktop.org
Mon Jul 19 10:56:16 UTC 2021
xmloff/source/draw/shapeexport.cxx | 37 ++++++++++++++++++++-----------------
1 file changed, 20 insertions(+), 17 deletions(-)
New commits:
commit 903f7dd825caca1af15d985658043ec055c4eb45
Author: Samuel Mehrbrodt <samuel.mehrbrodt at allotropia.de>
AuthorDate: Thu Jul 15 11:50:57 2021 +0200
Commit: Samuel Mehrbrodt <samuel.mehrbrodt at allotropia.de>
CommitDate: Mon Jul 19 12:55:41 2021 +0200
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 at allotropia.de>
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() )
More information about the Libreoffice-commits
mailing list