filter/source/svg/test/svg2odf.cxx | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-)
New commits: commit 82deca07b5ac9b0ed926635f20dfbc8401869bf5 Author: Caolán McNamara <caol...@redhat.com> Date: Fri Nov 6 09:14:28 2015 +0000 coverity#1309069 Uncaught exception Change-Id: Ia4f39cecba80ef7761530670c14e1888decf4670 diff --git a/filter/source/svg/test/svg2odf.cxx b/filter/source/svg/test/svg2odf.cxx index a8620b1..5eab2b5 100644 --- a/filter/source/svg/test/svg2odf.cxx +++ b/filter/source/svg/test/svg2odf.cxx @@ -72,27 +72,28 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) return 1; } - OUString aBaseURL, aTmpURL, aSrcURL, aDstURL, aIniUrl; + int nRet = 1; - osl_getProcessWorkingDir(&aBaseURL.pData); - osl_getFileURLFromSystemPath( OUString::createFromAscii(argv[1]).pData, - &aTmpURL.pData ); - osl_getAbsoluteFileURL(aBaseURL.pData,aTmpURL.pData,&aSrcURL.pData); + try + { + OUString aBaseURL, aTmpURL, aSrcURL, aDstURL, aIniUrl; - osl_getFileURLFromSystemPath( OUString::createFromAscii(argv[2]).pData, - &aTmpURL.pData ); - osl_getAbsoluteFileURL(aBaseURL.pData,aTmpURL.pData,&aDstURL.pData); + osl_getProcessWorkingDir(&aBaseURL.pData); + osl_getFileURLFromSystemPath( OUString::createFromAscii(argv[1]).pData, + &aTmpURL.pData ); + osl_getAbsoluteFileURL(aBaseURL.pData,aTmpURL.pData,&aSrcURL.pData); - osl_getFileURLFromSystemPath( OUString::createFromAscii(argv[3]).pData, - &aTmpURL.pData ); - osl_getAbsoluteFileURL(aBaseURL.pData,aTmpURL.pData,&aIniUrl.pData); + osl_getFileURLFromSystemPath( OUString::createFromAscii(argv[2]).pData, + &aTmpURL.pData ); + osl_getAbsoluteFileURL(aBaseURL.pData,aTmpURL.pData,&aDstURL.pData); - // bootstrap UNO - uno::Reference< lang::XMultiServiceFactory > xFactory; - uno::Reference< uno::XComponentContext > xCtx; - int nRet = 1; - try - { + osl_getFileURLFromSystemPath( OUString::createFromAscii(argv[3]).pData, + &aTmpURL.pData ); + osl_getAbsoluteFileURL(aBaseURL.pData,aTmpURL.pData,&aIniUrl.pData); + + // bootstrap UNO + uno::Reference< lang::XMultiServiceFactory > xFactory; + uno::Reference< uno::XComponentContext > xCtx; xCtx = ::cppu::defaultBootstrap_InitialComponentContext(aIniUrl); xFactory.set(xCtx->getServiceManager(), uno::UNO_QUERY); if (!xFactory.is())
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits