diff options
author | Philipp Hofer <philipp.hofer@protonmail.com> | 2020-11-12 12:57:13 +0100 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2020-11-21 13:16:08 +0100 |
commit | e8e093f14b698fc710930b2dead57c7d4fb63b8e (patch) | |
tree | a0dfa423577d00a22d8c7bcd2d7b90056160e56f /filter | |
parent | 302d64cb3c21335867b447970ab8db8d1fabdef3 (diff) |
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+LibreOffice@googlemail.com>
Tested-by: Jenkins
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/graphicfilter/ipict/ipict.hxx | 7 | ||||
-rw-r--r-- | filter/source/graphicfilter/itiff/lzwdecom.hxx | 23 | ||||
-rw-r--r-- | filter/source/msfilter/dffrecordheader.cxx | 14 | ||||
-rw-r--r-- | filter/source/svg/test/odfserializer.hxx | 6 |
4 files changed, 23 insertions, 27 deletions
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 |