From b1cfdb7bee4f7af97af54e6abbc5d04aed4ba082 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 11 Mar 2019 11:06:57 +0200 Subject: new loplugin:unoquery look for places we are doing code like: Reference(model, css::uno::UNO_QUERY)->getAsProperty() which might result in a SIGSEGV is the query fails Change-Id: I5cbdbc9e64bd0bed588297c512bf60cbacb9442e Reviewed-on: https://gerrit.libreoffice.org/69044 Tested-by: Jenkins Reviewed-by: Noel Grandin --- oox/source/ole/vbaproject.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'oox/source/ole/vbaproject.cxx') diff --git a/oox/source/ole/vbaproject.cxx b/oox/source/ole/vbaproject.cxx index bba778658ae5..26b037563495 100644 --- a/oox/source/ole/vbaproject.cxx +++ b/oox/source/ole/vbaproject.cxx @@ -193,7 +193,7 @@ void VbaProject::importVbaData(const uno::Reference& xInputStr uno::Reference xDocStream(xDocStorage->openStreamElement("_MS_VBA_Macros_XML", nOpenMode), uno::UNO_QUERY); comphelper::OStorageHelper::CopyInputToOutput(xInputStream, xDocStream); } - uno::Reference(xDocStorage, uno::UNO_QUERY)->commit(); + uno::Reference(xDocStorage, uno::UNO_QUERY_THROW)->commit(); } void VbaProject::registerMacroAttacher( const VbaMacroAttacherRef& rxAttacher ) -- cgit