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
This commit is contained in:
committed by
Christian Lohmaier
parent
302d64cb3c
commit
e8e093f14b
@@ -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
|
||||
|
@@ -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.
|
||||
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: */
|
||||
|
@@ -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();
|
||||
}
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user