filter/source/graphicfilter/ipict/ipict.hxx | 7 +++---- filter/source/graphicfilter/itiff/lzwdecom.hxx | 23 ++++++++++------------- filter/source/msfilter/dffrecordheader.cxx | 14 +++++++------- filter/source/svg/test/odfserializer.hxx | 6 +++--- solenv/clang-format/excludelist | 4 ---- 5 files changed, 23 insertions(+), 31 deletions(-)
New commits: commit e8e093f14b698fc710930b2dead57c7d4fb63b8e Author: Philipp Hofer <philipp.ho...@protonmail.com> AuthorDate: Thu Nov 12 12:57:13 2020 +0100 Commit: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> CommitDate: Sat Nov 21 13:16:08 2020 +0100 tdf#123936 Formatting files in module filter with clang-format Change-Id: I787835eb102868bbd52cdb1c9999b5dad553947f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105669 Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> Tested-by: Jenkins diff --git a/filter/source/graphicfilter/ipict/ipict.hxx b/filter/source/graphicfilter/ipict/ipict.hxx index 5e87a4a5b897..31ffdac0a81e 100644 --- a/filter/source/graphicfilter/ipict/ipict.hxx +++ b/filter/source/graphicfilter/ipict/ipict.hxx @@ -15,11 +15,10 @@ class GDIMetaFile; class SvStream; -namespace pict { - +namespace pict +{ /// Function to access PictReader::ReadPict for unit testing. -void ReadPictFile(SvStream &rStreamPict, GDIMetaFile& rGDIMetaFile); - +void ReadPictFile(SvStream& rStreamPict, GDIMetaFile& rGDIMetaFile); } #endif // INCLUDED_FILTER_SOURCE_GRAPHICFILTER_IPICT_HXX diff --git a/filter/source/graphicfilter/itiff/lzwdecom.hxx b/filter/source/graphicfilter/itiff/lzwdecom.hxx index 8f2675b9d53f..71ec833b21db 100644 --- a/filter/source/graphicfilter/itiff/lzwdecom.hxx +++ b/filter/source/graphicfilter/itiff/lzwdecom.hxx @@ -25,7 +25,8 @@ #define MAX_TABLE_SIZE 4096 -struct LZWTableEntry { +struct LZWTableEntry +{ sal_uInt16 nPrevCode; sal_uInt16 nDataCount; sal_uInt8 nData; @@ -33,26 +34,24 @@ struct LZWTableEntry { class SvStream; -class LZWDecompressor { - +class LZWDecompressor +{ public: - LZWDecompressor(); ~LZWDecompressor(); - void StartDecompression(SvStream & rIStream); + void StartDecompression(SvStream& rIStream); - sal_uInt64 Decompress(sal_uInt8 * pTarget, sal_uInt32 nMaxCount); - // Returns the number of written bytes. If < nMaxCount there is - // no more data to be unpacked or an error occurred. + // Returns the number of written bytes. If < nMaxCount there is + // no more data to be unpacked or an error occurred. + sal_uInt64 Decompress(sal_uInt8* pTarget, sal_uInt32 nMaxCount); private: - sal_uInt16 GetNextCode(); void AddToTable(sal_uInt16 nPrevCode, sal_uInt16 nCodeFirstData); void DecompressSome(); - SvStream * pIStream; + SvStream* pIStream; std::array<LZWTableEntry, MAX_TABLE_SIZE> pTable; sal_uInt16 nTableSize; @@ -62,15 +61,13 @@ private: sal_uInt16 nOldCode; std::array<sal_uInt8, MAX_TABLE_SIZE> pOutBuf; - sal_uInt8 * pOutBufData; + sal_uInt8* pOutBufData; sal_uInt16 nOutBufDataLen; sal_uInt8 nInputBitsBuf; sal_uInt16 nInputBitsBufSize; }; - #endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/filter/source/msfilter/dffrecordheader.cxx b/filter/source/msfilter/dffrecordheader.cxx index e0adfe9460f0..b1d4316b630b 100644 --- a/filter/source/msfilter/dffrecordheader.cxx +++ b/filter/source/msfilter/dffrecordheader.cxx @@ -19,21 +19,21 @@ #include <filter/msfilter/dffrecordheader.hxx> -bool ReadDffRecordHeader( SvStream& rIn, DffRecordHeader& rRec ) +bool ReadDffRecordHeader(SvStream& rIn, DffRecordHeader& rRec) { rRec.nFilePos = rIn.Tell(); sal_uInt16 nTmp(0); - rIn.ReadUInt16( nTmp ); + rIn.ReadUInt16(nTmp); rRec.nImpVerInst = nTmp; - rRec.nRecVer = sal::static_int_cast< sal_uInt8 >(nTmp & 0x000F); + rRec.nRecVer = sal::static_int_cast<sal_uInt8>(nTmp & 0x000F); rRec.nRecInstance = nTmp >> 4; - rIn.ReadUInt16( rRec.nRecType ); - rIn.ReadUInt32( rRec.nRecLen ); + rIn.ReadUInt16(rRec.nRecType); + rIn.ReadUInt32(rRec.nRecLen); // preserving overflow, optimally we would check // the record size against the parent header - if ( rRec.nRecLen > ( SAL_MAX_UINT32 - rRec.nFilePos ) ) - rIn.SetError( SVSTREAM_FILEFORMAT_ERROR ); + if (rRec.nRecLen > (SAL_MAX_UINT32 - rRec.nFilePos)) + rIn.SetError(SVSTREAM_FILEFORMAT_ERROR); return rIn.good(); } diff --git a/filter/source/svg/test/odfserializer.hxx b/filter/source/svg/test/odfserializer.hxx index bff8cb68fa69..8bce673b40a2 100644 --- a/filter/source/svg/test/odfserializer.hxx +++ b/filter/source/svg/test/odfserializer.hxx @@ -26,9 +26,9 @@ namespace svgi { - /// Creates a XDocumentHandler that serializes directly to an XOutputStream - css::uno::Reference< css::xml::sax::XDocumentHandler> - createSerializer(const css::uno::Reference<css::io::XOutputStream>& ); +/// Creates a XDocumentHandler that serializes directly to an XOutputStream +css::uno::Reference<css::xml::sax::XDocumentHandler> +createSerializer(const css::uno::Reference<css::io::XOutputStream>&); } #endif // INCLUDED_FILTER_SOURCE_SVG_TEST_ODFSERIALIZER_HXX diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist index 30590df8c4af..adc338c3b886 100644 --- a/solenv/clang-format/excludelist +++ b/solenv/clang-format/excludelist @@ -4138,7 +4138,6 @@ filter/source/graphicfilter/ipbm/ipbm.cxx filter/source/graphicfilter/ipcd/ipcd.cxx filter/source/graphicfilter/ipcx/ipcx.cxx filter/source/graphicfilter/ipict/ipict.cxx -filter/source/graphicfilter/ipict/ipict.hxx filter/source/graphicfilter/ipict/shape.cxx filter/source/graphicfilter/ipict/shape.hxx filter/source/graphicfilter/ipsd/ipsd.cxx @@ -4148,10 +4147,8 @@ filter/source/graphicfilter/itiff/ccidecom.cxx filter/source/graphicfilter/itiff/ccidecom.hxx filter/source/graphicfilter/itiff/itiff.cxx filter/source/graphicfilter/itiff/lzwdecom.cxx -filter/source/graphicfilter/itiff/lzwdecom.hxx filter/source/msfilter/countryid.cxx filter/source/msfilter/dffpropset.cxx -filter/source/msfilter/dffrecordheader.cxx filter/source/msfilter/escherex.cxx filter/source/msfilter/eschesdo.cxx filter/source/msfilter/eschesdo.hxx @@ -4186,7 +4183,6 @@ filter/source/svg/svgfontexport.hxx filter/source/svg/svgwriter.cxx filter/source/svg/svgwriter.hxx filter/source/svg/test/odfserializer.cxx -filter/source/svg/test/odfserializer.hxx filter/source/t602/t602filter.cxx filter/source/t602/t602filter.hxx filter/source/textfilterdetect/filterdetect.cxx _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits