summaryrefslogtreecommitdiff
path: root/writerperfect
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-04-12 11:21:58 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-04-28 11:23:34 +0200
commit9348b322a5c230dfcc2231661b73e480b130fcd9 (patch)
tree2c81a97d6f54229c87c5e2a37c73935ffc2527ac /writerperfect
parent5bcd18461b8cb63b477dbb74025374b4c963161a (diff)
clang-tidy readability-simplify-boolean-expr
Change-Id: Iea7ab64683f0b29794d50d774cc482b54a00e70a Reviewed-on: https://gerrit.libreoffice.org/36450 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'writerperfect')
-rw-r--r--writerperfect/source/common/DirectoryStream.cxx5
-rw-r--r--writerperfect/source/writer/WordPerfectImportFilter.cxx4
2 files changed, 2 insertions, 7 deletions
diff --git a/writerperfect/source/common/DirectoryStream.cxx b/writerperfect/source/common/DirectoryStream.cxx
index a23f2571adbd..cc186cfaab0b 100644
--- a/writerperfect/source/common/DirectoryStream.cxx
+++ b/writerperfect/source/common/DirectoryStream.cxx
@@ -169,10 +169,7 @@ const css::uno::Reference<css::ucb::XContent> DirectoryStream::getContent() cons
bool DirectoryStream::isStructured()
{
- if (!m_pImpl)
- return false;
-
- return true;
+ return m_pImpl != nullptr;
}
unsigned DirectoryStream::subStreamCount()
diff --git a/writerperfect/source/writer/WordPerfectImportFilter.cxx b/writerperfect/source/writer/WordPerfectImportFilter.cxx
index cba9a9b96f22..68c2a5cc8dd1 100644
--- a/writerperfect/source/writer/WordPerfectImportFilter.cxx
+++ b/writerperfect/source/writer/WordPerfectImportFilter.cxx
@@ -145,9 +145,7 @@ bool SAL_CALL WordPerfectImportFilter::importImpl(const Sequence< css::beans::Pr
collector.addDocumentHandler(&aHandler, ODF_FLAT_XML);
collector.registerEmbeddedObjectHandler("image/x-wpg", &handleEmbeddedWPGObject);
collector.registerEmbeddedImageHandler("image/x-wpg", &handleEmbeddedWPGImage);
- if (libwpd::WPD_OK == libwpd::WPDocument::parse(&input, &collector, aUtf8Passwd.isEmpty() ? nullptr : aUtf8Passwd.getStr()))
- return true;
- return false;
+ return libwpd::WPD_OK == libwpd::WPDocument::parse(&input, &collector, aUtf8Passwd.isEmpty() ? nullptr : aUtf8Passwd.getStr());
}
sal_Bool SAL_CALL WordPerfectImportFilter::filter(const Sequence< css::beans::PropertyValue > &aDescriptor)