From 6033e2d29d7ee9df5201c9834ba6b070da03e98e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Thu, 9 Oct 2014 15:40:08 +0100 Subject: [PATCH] Resolves: fdo#60904 allow export of VBAProject xModLibContainerExport has a "VBAProject" entry but xDlgLibContainerExport doesn't, so just export the one we do have Change-Id: I15f7794904a5aff7679f2cf9fd654d741fd5cbe3 --- basctl/source/basicide/moduldl2.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx index 04281824073a..15e16dbfb999 100644 --- a/basctl/source/basicide/moduldl2.cxx +++ b/basctl/source/basicide/moduldl2.cxx @@ -1106,8 +1106,14 @@ void LibPage::implExportLib( const OUString& aLibName, const OUString& aTargetUR if ( xModLibContainerExport.is() ) xModLibContainerExport->exportLibrary( aOULibName, aTargetURL, Handler ); - if ( xDlgLibContainerExport.is() ) - xDlgLibContainerExport->exportLibrary( aOULibName, aTargetURL, Handler ); + if (!xDlgLibContainerExport.is()) + return; + Reference xNameAcc(xDlgLibContainerExport, UNO_QUERY); + if (!xNameAcc.is()) + return; + if (!xNameAcc->hasByName(aOULibName)) + return; + xDlgLibContainerExport->exportLibrary(aOULibName, aTargetURL, Handler); } // Implementation XCommandEnvironment