diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2021-10-13 20:15:35 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2021-10-14 08:21:42 +0200 |
commit | 5c77f3790ff928501c31ebdce12c3a23982c6dd1 (patch) | |
tree | 90e587d1609e59bae972fc2477a68a734e353a29 /vcl | |
parent | f77479ab33705321db4355ff1d26a60ea777f638 (diff) |
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 <vmiklos@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/filter/ipdf/pdfdocument.cxx | 18 |
1 files changed, 8 insertions, 10 deletions
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--; } |