summaryrefslogtreecommitdiff
path: root/xmlsecurity/workben
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2018-03-21 13:23:58 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2018-03-21 14:29:14 +0100
commit17407f808ed0ca5d65a98da186f7e2ab60dc641b (patch)
treeda019d31c00f0d9c7b32933be98f6ef647111530 /xmlsecurity/workben
parent45ea6ebdf1ddb43335d116a0dd7a4ad61f5725f3 (diff)
Turn on clang-format for these files
I (tried to) keep these files consistent locally with astyle in the past, switching to clang-format makes sure that the recent problem with introducing inconsistencies in these files doesn't happen again. (On the flip side, it's great to see that now others also touch this PDF/pdfium code. :-) ) Change-Id: I6065eab77c584197a82fe48e7d3e81b445106efd Reviewed-on: https://gerrit.libreoffice.org/51701 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'xmlsecurity/workben')
-rw-r--r--xmlsecurity/workben/pdfverify.cxx28
1 files changed, 19 insertions, 9 deletions
diff --git a/xmlsecurity/workben/pdfverify.cxx b/xmlsecurity/workben/pdfverify.cxx
index 90d03d37e32b..b8639aec75c6 100644
--- a/xmlsecurity/workben/pdfverify.cxx
+++ b/xmlsecurity/workben/pdfverify.cxx
@@ -39,7 +39,9 @@ void generatePreview(const OString& rPdfPath, const OString& rPngPath)
osl::FileBase::getFileURLFromSystemPath(OUString::fromUtf8(rPdfPath), aInURL);
SvFileStream aInStream(aInURL, StreamMode::READ);
WmfExternal* pExtHeader = nullptr;
- if (rFilter.ImportGraphic(aGraphic, OUString(), aInStream, GRFILTER_FORMAT_DONTKNOW, nullptr, GraphicFilterImportFlags::NONE, pExtHeader) != ERRCODE_NONE)
+ if (rFilter.ImportGraphic(aGraphic, OUString(), aInStream, GRFILTER_FORMAT_DONTKNOW, nullptr,
+ GraphicFilterImportFlags::NONE, pExtHeader)
+ != ERRCODE_NONE)
return;
BitmapEx aBitmapEx = aGraphic.GetBitmapEx();
@@ -66,11 +68,14 @@ int pdfVerify(int nArgc, char** pArgv)
}
catch (const uno::RuntimeException& rException)
{
- SAL_WARN("xmlsecurity.pdfio", "cppu::defaultBootstrap_InitialComponentContext() failed: " << rException);
+ SAL_WARN("xmlsecurity.pdfio",
+ "cppu::defaultBootstrap_InitialComponentContext() failed: " << rException);
return 1;
}
- uno::Reference<lang::XMultiComponentFactory> xMultiComponentFactory = xComponentContext->getServiceManager();
- uno::Reference<lang::XMultiServiceFactory> xMultiServiceFactory(xMultiComponentFactory, uno::UNO_QUERY);
+ uno::Reference<lang::XMultiComponentFactory> xMultiComponentFactory
+ = xComponentContext->getServiceManager();
+ uno::Reference<lang::XMultiServiceFactory> xMultiServiceFactory(xMultiComponentFactory,
+ uno::UNO_QUERY);
comphelper::setProcessServiceFactory(xMultiServiceFactory);
if (nArgc > 3 && OString(pArgv[3]) == "-p")
@@ -88,10 +93,12 @@ int pdfVerify(int nArgc, char** pArgv)
}
catch (const uno::DeploymentException& rException)
{
- SAL_WARN("xmlsecurity.pdfio", "DeploymentException while creating SEInitializer: " << rException);
+ SAL_WARN("xmlsecurity.pdfio",
+ "DeploymentException while creating SEInitializer: " << rException);
return 1;
}
- uno::Reference<xml::crypto::XXMLSecurityContext> xSecurityContext = xSEInitializer->createSecurityContext(OUString());
+ uno::Reference<xml::crypto::XXMLSecurityContext> xSecurityContext
+ = xSEInitializer->createSecurityContext(OUString());
OUString aInURL;
osl::FileBase::getFileURLFromSystemPath(OUString::fromUtf8(pArgv[1]), aInURL);
@@ -157,7 +164,8 @@ int pdfVerify(int nArgc, char** pArgv)
return 1;
}
- bool bSuccess = aInfo.nStatus == xml::crypto::SecurityOperationStatus_OPERATION_SUCCEEDED;
+ bool bSuccess
+ = aInfo.nStatus == xml::crypto::SecurityOperationStatus_OPERATION_SUCCEEDED;
std::cerr << "signature #" << i << ": digest match? " << bSuccess << std::endl;
}
}
@@ -166,8 +174,10 @@ int pdfVerify(int nArgc, char** pArgv)
}
std::cerr << "adding a new signature" << std::endl;
- uno::Reference<xml::crypto::XSecurityEnvironment> xSecurityEnvironment = xSecurityContext->getSecurityEnvironment();
- uno::Sequence<uno::Reference<security::XCertificate>> aCertificates = xSecurityEnvironment->getPersonalCertificates();
+ uno::Reference<xml::crypto::XSecurityEnvironment> xSecurityEnvironment
+ = xSecurityContext->getSecurityEnvironment();
+ uno::Sequence<uno::Reference<security::XCertificate>> aCertificates
+ = xSecurityEnvironment->getPersonalCertificates();
if (!aCertificates.hasElements())
{
SAL_WARN("xmlsecurity.pdfio", "no signing certificates found");