vcl/source/filter/ipdf/pdfdocument.cxx | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-)
New commits: commit 5c77f3790ff928501c31ebdce12c3a23982c6dd1 Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Wed Oct 13 20:15:35 2021 +0200 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Thu Oct 14 08:21:42 2021 +0200 vcl: avoid "else" after "break" in pdfdocument Allows indenting less. Change-Id: I454eba798abdbbd18ffb9c8927ef5bb0215f133f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123565 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/vcl/source/filter/ipdf/pdfdocument.cxx b/vcl/source/filter/ipdf/pdfdocument.cxx index 4b045c63319e..b5cc64caec9f 100644 --- a/vcl/source/filter/ipdf/pdfdocument.cxx +++ b/vcl/source/filter/ipdf/pdfdocument.cxx @@ -2059,7 +2059,7 @@ OUString PDFDocument::DecodeHexStringUTF16BE(PDFHexStringElement const& rElement // only the latter supported is here if (encoded.size() < 2 || encoded[0] != 0xFE || encoded[1] != 0xFF || (encoded.size() & 1) != 0) { - return OUString(); + return {}; } OUStringBuffer buf(static_cast<unsigned int>(encoded.size() - 2)); for (size_t i = 2; i < encoded.size(); i += 2) @@ -3152,16 +3152,14 @@ size_t PDFObjectParser::parse(PDFElement* pParsingElement, size_t nStartIndex, i nReturnIndex = i; break; } - else + + if (pParsingDictionary) { - if (pParsingDictionary) - { - pParsingDictionary->SetKeyOffset(aName, nNameOffset); - // Include the ending ']' in the length of the key - (array)value pair length. - sal_uInt64 nLength = pCurrentEndArray->GetOffset() - nNameOffset + 1; - pParsingDictionary->SetKeyValueLength(aName, nLength); - aName.clear(); - } + pParsingDictionary->SetKeyOffset(aName, nNameOffset); + // Include the ending ']' in the length of the key - (array)value pair length. + sal_uInt64 nLength = pCurrentEndArray->GetOffset() - nNameOffset + 1; + pParsingDictionary->SetKeyValueLength(aName, nLength); + aName.clear(); } nDepth--; }