[Libreoffice-commits] core.git: 7 commits - basic/source include/basic solenv/inc vcl/source

Stephan Bergmann sbergman at redhat.com
Mon Apr 11 12:32:58 UTC 2016


 basic/source/sbx/sbxform.cxx       |   16 +++---
 include/basic/sbxform.hxx          |    4 -
 solenv/inc/doxygen.cfg             |    3 -
 solenv/inc/doxygen_doc.cfg         |    3 -
 solenv/inc/doxygen_tag.cfg         |    3 -
 vcl/source/filter/igif/gifread.cxx |   87 +++++++++++++++++++++++++++++++++++-
 vcl/source/filter/igif/gifread.hxx |   89 -------------------------------------
 vcl/source/filter/ixbm/xbmread.cxx |   41 ++++++++++++++++-
 vcl/source/filter/ixbm/xbmread.hxx |   44 ------------------
 vcl/source/filter/ixpm/xpmread.cxx |   78 ++++++++++++++++++++++++++++++++
 vcl/source/filter/ixpm/xpmread.hxx |   81 ---------------------------------
 vcl/source/filter/jpeg/jpegcomp.h  |   20 +-------
 vcl/source/filter/jpeg/transupp.c  |   24 ++++-----
 vcl/source/fontsubset/sft.cxx      |   37 ++++++---------
 vcl/source/fontsubset/ttcr.cxx     |   25 +++-------
 15 files changed, 251 insertions(+), 304 deletions(-)

New commits:
commit a2f91994dffb5945ff70de864591d594d2fe7f59
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Apr 8 22:23:06 2016 +0200

    Avoid reserved identifier
    
    Change-Id: I6dfb2961adeb412405c58e0a0b51e130cbd3e0c3

diff --git a/basic/source/sbx/sbxform.cxx b/basic/source/sbx/sbxform.cxx
index 3323d4f..92c8bc8 100644
--- a/basic/source/sbx/sbxform.cxx
+++ b/basic/source/sbx/sbxform.cxx
@@ -227,7 +227,7 @@ void SbxBasicFormater::ParseBack( OUStringBuffer& sStrg, const OUString& sFormat
     }
 }
 
-#ifdef _with_sprintf
+#ifdef with_sprintf_
 
 
 void SbxBasicFormater::InitScan( double _dNum )
@@ -657,7 +657,7 @@ void SbxBasicFormater::ScanFormatString( double dNumber,
     bZeroSpaceOn = false;
 
 
-#ifdef _with_sprintf
+#ifdef with_sprintf_
     InitScan( dNumber );
 #endif
     // scanning the format-string:
@@ -697,7 +697,7 @@ void SbxBasicFormater::ScanFormatString( double dNumber,
                         for( short j = nMaxDigit; j > nDigitPos; j-- )
                         {
                             short nTempDigit;
-#ifdef _with_sprintf
+#ifdef with_sprintf_
                             AppendDigit( sReturnStrg, nTempDigit = GetDigitAtPosScan( j, bFoundFirstDigit ) );
 #else
                             AppendDigit( sReturnStrg, nTempDigit = GetDigitAtPos( dNumber, j, dNumber, bFoundFirstDigit ) );
@@ -730,7 +730,7 @@ void SbxBasicFormater::ScanFormatString( double dNumber,
                 else
                 {
                     short nTempDigit;
-#ifdef _with_sprintf
+#ifdef with_sprintf_
                     AppendDigit( sReturnStrg, nTempDigit = GetDigitAtPosScan( nDigitPos, bFoundFirstDigit ) );
 #else
                     AppendDigit( sReturnStrg, nTempDigit = GetDigitAtPos( dNumber, nDigitPos, dNumber, bFoundFirstDigit ) );
@@ -760,7 +760,7 @@ void SbxBasicFormater::ScanFormatString( double dNumber,
                     {
                         for( short j = nMaxExponentDigit; j > nExponentPos; j-- )
                         {
-#ifdef _with_sprintf
+#ifdef with_sprintf_
                             AppendDigit( sReturnStrg, GetDigitAtPosExpScan( dExponent, j, bFoundFirstDigit ) );
 #else
                             AppendDigit( sReturnStrg,GetDigitAtPos( dExponent, j, dExponent, bFoundFirstDigit ) );
@@ -775,7 +775,7 @@ void SbxBasicFormater::ScanFormatString( double dNumber,
                 }
                 else
                 {
-#ifdef _with_sprintf
+#ifdef with_sprintf_
                     AppendDigit( sReturnStrg, GetDigitAtPosExpScan( dExponent, nExponentPos, bFoundFirstDigit ) );
 #else
                     AppendDigit( sReturnStrg, GetDigitAtPos( dExponent, nExponentPos, dExponent, bFoundFirstDigit ) );
@@ -817,7 +817,7 @@ void SbxBasicFormater::ScanFormatString( double dNumber,
                 }
 
                 bool bOverflow = false;
-#ifdef _with_sprintf
+#ifdef with_sprintf_
                 short nNextDigit = GetDigitAtPosScan( nDigitPos, bFoundFirstDigit );
 #else
                 short nNextDigit = GetDigitAtPos( dNumber, nDigitPos, dNumber, bFoundFirstDigit );
@@ -916,7 +916,7 @@ void SbxBasicFormater::ScanFormatString( double dNumber,
     // scan completed - rounding necessary?
     if( !bScientific )
     {
-#ifdef _with_sprintf
+#ifdef with_sprintf_
         short nNextDigit = GetDigitAtPosScan( nDigitPos, bFoundFirstDigit );
 #else
         short nNextDigit = GetDigitAtPos( dNumber, nDigitPos, dNumber, bFoundFirstDigit );
diff --git a/include/basic/sbxform.hxx b/include/basic/sbxform.hxx
index ff32b37..4832ed3 100644
--- a/include/basic/sbxform.hxx
+++ b/include/basic/sbxform.hxx
@@ -73,7 +73,7 @@
         a) use sprintf()
         b) use log10() and pow() digit
 */
-#define _with_sprintf   // use a)
+#define with_sprintf_   // use a)
 
 #include <rtl/ustring.hxx>
 #include <rtl/ustrbuf.hxx>
@@ -115,7 +115,7 @@ class BASIC_DLLPUBLIC SbxBasicFormater {
     BASIC_DLLPRIVATE void   StrRoundDigit( OUStringBuffer& sStrg, short nPos );
     BASIC_DLLPRIVATE void   ParseBack( OUStringBuffer& sStrg, const OUString& sFormatStrg,
                                        short nFormatPos );
-#ifdef _with_sprintf
+#ifdef with_sprintf_
     // Methods for string conversion with sprintf():
     BASIC_DLLPRIVATE void   InitScan( double _dNum );
     BASIC_DLLPRIVATE void   InitExp( double _dNewExp );
commit 662035ed6334711d053cb4a7b2d37ff95c1f6838
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Apr 8 21:56:59 2016 +0200

    Don't get excited about "inline"
    
    Change-Id: I4f067bd60706814b4d2cc6057a0342696021ad75

diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx
index 69d3fef..cee73c0 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -131,21 +131,14 @@ static const sal_uInt32 T_otto = 0x4f54544f;        /* 'OTTO' */
 #define T_gsub 0x47535542
 #define T_CFF  0x43464620
 
-/*- inline functions */
-#ifdef __GNUC__
-#define _inline static __inline__
-#else
-#define _inline static
-#endif
-
-_inline void *smalloc(size_t size)
+static void *smalloc(size_t size)
 {
     void *res = malloc(size);
     assert(res != nullptr);
     return res;
 }
 
-_inline void *scalloc(size_t n, size_t size)
+static void *scalloc(size_t n, size_t size)
 {
     void *res = calloc(n, size);
     assert(res != nullptr);
@@ -153,7 +146,7 @@ _inline void *scalloc(size_t n, size_t size)
 }
 
 /*- Data access macros for data stored in big-endian or little-endian format */
-_inline sal_Int16 GetInt16(const sal_uInt8 *ptr, size_t offset, int bigendian)
+static sal_Int16 GetInt16(const sal_uInt8 *ptr, size_t offset, int bigendian)
 {
     sal_Int16 t;
     assert(ptr != nullptr);
@@ -167,7 +160,7 @@ _inline sal_Int16 GetInt16(const sal_uInt8 *ptr, size_t offset, int bigendian)
     return t;
 }
 
-_inline sal_uInt16 GetUInt16(const sal_uInt8 *ptr, size_t offset, int bigendian)
+static sal_uInt16 GetUInt16(const sal_uInt8 *ptr, size_t offset, int bigendian)
 {
     sal_uInt16 t;
     assert(ptr != nullptr);
@@ -181,7 +174,7 @@ _inline sal_uInt16 GetUInt16(const sal_uInt8 *ptr, size_t offset, int bigendian)
     return t;
 }
 
-_inline sal_Int32  GetInt32(const sal_uInt8 *ptr, size_t offset, int bigendian)
+static sal_Int32  GetInt32(const sal_uInt8 *ptr, size_t offset, int bigendian)
 {
     sal_Int32 t;
     assert(ptr != nullptr);
@@ -197,7 +190,7 @@ _inline sal_Int32  GetInt32(const sal_uInt8 *ptr, size_t offset, int bigendian)
     return t;
 }
 
-_inline sal_uInt32 GetUInt32(const sal_uInt8 *ptr, size_t offset, int bigendian)
+static sal_uInt32 GetUInt32(const sal_uInt8 *ptr, size_t offset, int bigendian)
 {
     sal_uInt32 t;
     assert(ptr != nullptr);
@@ -225,7 +218,7 @@ static sal_uInt32 Int32FromMOTA(sal_uInt32 a) {
 }
 #endif
 
-_inline F16Dot16 fixedMul(F16Dot16 a, F16Dot16 b)
+static F16Dot16 fixedMul(F16Dot16 a, F16Dot16 b)
 {
     unsigned int a1, b1;
     unsigned int a2, b2;
@@ -251,7 +244,7 @@ _inline F16Dot16 fixedMul(F16Dot16 a, F16Dot16 b)
     return sign ? -res : res;
 }
 
-_inline F16Dot16 fixedDiv(F16Dot16 a, F16Dot16 b)
+static F16Dot16 fixedDiv(F16Dot16 a, F16Dot16 b)
 {
     unsigned int f, r;
     F16Dot16 res;
@@ -278,7 +271,7 @@ _inline F16Dot16 fixedDiv(F16Dot16 a, F16Dot16 b)
 
 /*- returns a * b / c -*/
 /* XXX provide a real implementation that preserves accuracy */
-_inline F16Dot16 fixedMulDiv(F16Dot16 a, F16Dot16 b, F16Dot16 c)
+static F16Dot16 fixedMulDiv(F16Dot16 a, F16Dot16 b, F16Dot16 c)
 {
     F16Dot16 res;
 
@@ -287,17 +280,17 @@ _inline F16Dot16 fixedMulDiv(F16Dot16 a, F16Dot16 b, F16Dot16 c)
 }
 
 /*- Translate units from TT to PS (standard 1/1000) -*/
-_inline int XUnits(int unitsPerEm, int n)
+static int XUnits(int unitsPerEm, int n)
 {
     return (n * 1000) / unitsPerEm;
 }
 
-_inline const sal_uInt8* getTable( TrueTypeFont *ttf, sal_uInt32 ord)
+static const sal_uInt8* getTable( TrueTypeFont *ttf, sal_uInt32 ord)
 {
     return ttf->tables[ord];
 }
 
-_inline sal_uInt32 getTableSize(TrueTypeFont *ttf, sal_uInt32 ord)
+static sal_uInt32 getTableSize(TrueTypeFont *ttf, sal_uInt32 ord)
 {
     return ttf->tlens[ord];
 }
@@ -324,18 +317,18 @@ static bool HexFmtFlush(HexFmt *_this)
     return bRet;
 }
 
-_inline void HexFmtOpenString(HexFmt *_this)
+static void HexFmtOpenString(HexFmt *_this)
 {
     fputs("<\n", _this->o);
 }
 
-_inline void HexFmtCloseString(HexFmt *_this)
+static void HexFmtCloseString(HexFmt *_this)
 {
     HexFmtFlush(_this);
     fputs("00\n>\n", _this->o);
 }
 
-_inline void HexFmtDispose(HexFmt *_this)
+static void HexFmtDispose(HexFmt *_this)
 {
     HexFmtFlush(_this);
     free(_this);
diff --git a/vcl/source/fontsubset/ttcr.cxx b/vcl/source/fontsubset/ttcr.cxx
index 4931160..0708b2e 100644
--- a/vcl/source/fontsubset/ttcr.cxx
+++ b/vcl/source/fontsubset/ttcr.cxx
@@ -64,17 +64,8 @@ typedef struct {
     sal_uInt8  *data;
 } TableEntry;
 
-/*
- * this is a duplicate code from sft.c but it is left here for performance reasons
- */
-#ifdef __GNUC__
-#define _inline static __inline__
-#else
-#define _inline static
-#endif
-
 /*- Data access macros for data stored in big-endian or little-endian format */
-_inline sal_Int16 GetInt16( const sal_uInt8* ptr, sal_uInt32 offset, int bigendian)
+static sal_Int16 GetInt16( const sal_uInt8* ptr, sal_uInt32 offset, int bigendian)
 {
     sal_Int16 t;
     assert(ptr != nullptr);
@@ -88,7 +79,7 @@ _inline sal_Int16 GetInt16( const sal_uInt8* ptr, sal_uInt32 offset, int bigendi
     return t;
 }
 
-_inline sal_uInt16 GetUInt16( const sal_uInt8* ptr, sal_uInt32 offset, int bigendian)
+static sal_uInt16 GetUInt16( const sal_uInt8* ptr, sal_uInt32 offset, int bigendian)
 {
     sal_uInt16 t;
     assert(ptr != nullptr);
@@ -102,7 +93,7 @@ _inline sal_uInt16 GetUInt16( const sal_uInt8* ptr, sal_uInt32 offset, int bigen
     return t;
 }
 
-_inline void PutInt16(sal_Int16 val, sal_uInt8 *ptr, sal_uInt32 offset, int bigendian)
+static void PutInt16(sal_Int16 val, sal_uInt8 *ptr, sal_uInt32 offset, int bigendian)
 {
     assert(ptr != nullptr);
 
@@ -115,7 +106,7 @@ _inline void PutInt16(sal_Int16 val, sal_uInt8 *ptr, sal_uInt32 offset, int bige
     }
 }
 
-_inline void PutUInt16(sal_uInt16 val, sal_uInt8 *ptr, sal_uInt32 offset, int bigendian)
+static void PutUInt16(sal_uInt16 val, sal_uInt8 *ptr, sal_uInt32 offset, int bigendian)
 {
     assert(ptr != nullptr);
 
@@ -128,7 +119,7 @@ _inline void PutUInt16(sal_uInt16 val, sal_uInt8 *ptr, sal_uInt32 offset, int bi
     }
 }
 
-_inline void PutUInt32(sal_uInt32 val, sal_uInt8 *ptr, sal_uInt32 offset, int bigendian)
+static void PutUInt32(sal_uInt32 val, sal_uInt8 *ptr, sal_uInt32 offset, int bigendian)
 {
     assert(ptr != nullptr);
 
@@ -180,14 +171,14 @@ static sal_uInt32 CheckSum(sal_uInt32 *ptr, sal_uInt32 length)
     return sum;
 }
 
-_inline void *smalloc(sal_uInt32 size)
+static void *smalloc(sal_uInt32 size)
 {
     void *res = malloc(size);
     assert(res != nullptr);
     return res;
 }
 
-_inline void *scalloc(sal_uInt32 n, sal_uInt32 size)
+static void *scalloc(sal_uInt32 n, sal_uInt32 size)
 {
     void *res = calloc(n, size);
     assert(res != nullptr);
@@ -1522,7 +1513,7 @@ extern "C"
 }
 
 #ifdef TEST_TTCR
-_inline sal_uInt32 mkTag(sal_uInt8 a, sal_uInt8 b, sal_uInt8 c, sal_uInt8 d) {
+static sal_uInt32 mkTag(sal_uInt8 a, sal_uInt8 b, sal_uInt8 c, sal_uInt8 d) {
     return (a << 24) | (b << 16) | (c << 8) | d;
 }
 
commit b5d7b60fe3c0befb07ba739b0168bfc17851667f
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Apr 8 21:52:21 2016 +0200

    Avoid reserved identifiers
    
    Change-Id: I3c3ca71a2e0098ec8df49c6bf4c2045218c91ee9

diff --git a/vcl/source/filter/jpeg/jpegcomp.h b/vcl/source/filter/jpeg/jpegcomp.h
index dcad5a9..9b3e367 100644
--- a/vcl/source/filter/jpeg/jpegcomp.h
+++ b/vcl/source/filter/jpeg/jpegcomp.h
@@ -10,9 +10,9 @@
  */
 
 #if JPEG_LIB_VERSION >= 70
-#define _min_DCT_h_scaled_size min_DCT_h_scaled_size
-#define _min_DCT_v_scaled_size min_DCT_v_scaled_size
+#define min_DCT_h_scaled_size_ min_DCT_h_scaled_size
+#define min_DCT_v_scaled_size_ min_DCT_v_scaled_size
 #else
-#define _min_DCT_h_scaled_size min_DCT_scaled_size
-#define _min_DCT_v_scaled_size min_DCT_scaled_size
+#define min_DCT_h_scaled_size_ min_DCT_scaled_size
+#define min_DCT_v_scaled_size_ min_DCT_scaled_size
 #endif
diff --git a/vcl/source/filter/jpeg/transupp.c b/vcl/source/filter/jpeg/transupp.c
index 323aa30..a784ffb 100644
--- a/vcl/source/filter/jpeg/transupp.c
+++ b/vcl/source/filter/jpeg/transupp.c
@@ -859,15 +859,15 @@ jtransform_request_workspace (j_decompress_ptr srcinfo,
     if (info->num_components == 1) {
       if (!jtransform_perfect_transform(srcinfo->output_width,
       srcinfo->output_height,
-      srcinfo->_min_DCT_h_scaled_size,
-      srcinfo->_min_DCT_v_scaled_size,
+      srcinfo->min_DCT_h_scaled_size_,
+      srcinfo->min_DCT_v_scaled_size_,
       info->transform))
     return FALSE;
     } else {
       if (!jtransform_perfect_transform(srcinfo->output_width,
       srcinfo->output_height,
-      srcinfo->max_h_samp_factor * srcinfo->_min_DCT_h_scaled_size,
-      srcinfo->max_v_samp_factor * srcinfo->_min_DCT_v_scaled_size,
+      srcinfo->max_h_samp_factor * srcinfo->min_DCT_h_scaled_size_,
+      srcinfo->max_v_samp_factor * srcinfo->min_DCT_v_scaled_size_,
       info->transform))
     return FALSE;
     }
@@ -886,26 +886,26 @@ jtransform_request_workspace (j_decompress_ptr srcinfo,
     info->output_width = srcinfo->output_height;
     info->output_height = srcinfo->output_width;
     if (info->num_components == 1) {
-      info->iMCU_sample_width = srcinfo->_min_DCT_v_scaled_size;
-      info->iMCU_sample_height = srcinfo->_min_DCT_h_scaled_size;
+      info->iMCU_sample_width = srcinfo->min_DCT_v_scaled_size_;
+      info->iMCU_sample_height = srcinfo->min_DCT_h_scaled_size_;
     } else {
       info->iMCU_sample_width =
-    srcinfo->max_v_samp_factor * srcinfo->_min_DCT_v_scaled_size;
+    srcinfo->max_v_samp_factor * srcinfo->min_DCT_v_scaled_size_;
       info->iMCU_sample_height =
-    srcinfo->max_h_samp_factor * srcinfo->_min_DCT_h_scaled_size;
+    srcinfo->max_h_samp_factor * srcinfo->min_DCT_h_scaled_size_;
     }
     break;
   default:
     info->output_width = srcinfo->output_width;
     info->output_height = srcinfo->output_height;
     if (info->num_components == 1) {
-      info->iMCU_sample_width = srcinfo->_min_DCT_h_scaled_size;
-      info->iMCU_sample_height = srcinfo->_min_DCT_v_scaled_size;
+      info->iMCU_sample_width = srcinfo->min_DCT_h_scaled_size_;
+      info->iMCU_sample_height = srcinfo->min_DCT_v_scaled_size_;
     } else {
       info->iMCU_sample_width =
-    srcinfo->max_h_samp_factor * srcinfo->_min_DCT_h_scaled_size;
+    srcinfo->max_h_samp_factor * srcinfo->min_DCT_h_scaled_size_;
       info->iMCU_sample_height =
-    srcinfo->max_v_samp_factor * srcinfo->_min_DCT_v_scaled_size;
+    srcinfo->max_v_samp_factor * srcinfo->min_DCT_v_scaled_size_;
     }
     break;
   }
commit 0548af776fc617acfe95076df0edc1b41ce536b1
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Apr 8 21:49:39 2016 +0200

    Remove unused macros
    
    ...that were introduced with b5a9cc71d246c26da8aca4203da84c10c104c222 "Exif
    reading/writing and Jpeg lossless transformations support" but apparently never
    used
    
    Change-Id: I7e3367b5753b06746a82ae18453b6f9a291ff77a

diff --git a/vcl/source/filter/jpeg/jpegcomp.h b/vcl/source/filter/jpeg/jpegcomp.h
index ed9eeab..dcad5a9 100644
--- a/vcl/source/filter/jpeg/jpegcomp.h
+++ b/vcl/source/filter/jpeg/jpegcomp.h
@@ -10,21 +10,9 @@
  */
 
 #if JPEG_LIB_VERSION >= 70
-#define _DCT_scaled_size DCT_h_scaled_size
-#define _DCT_h_scaled_size DCT_h_scaled_size
-#define _DCT_v_scaled_size DCT_v_scaled_size
-#define _min_DCT_scaled_size min_DCT_h_scaled_size
 #define _min_DCT_h_scaled_size min_DCT_h_scaled_size
 #define _min_DCT_v_scaled_size min_DCT_v_scaled_size
-#define _jpeg_width jpeg_width
-#define _jpeg_height jpeg_height
 #else
-#define _DCT_scaled_size DCT_scaled_size
-#define _DCT_h_scaled_size DCT_scaled_size
-#define _DCT_v_scaled_size DCT_scaled_size
-#define _min_DCT_scaled_size min_DCT_scaled_size
 #define _min_DCT_h_scaled_size min_DCT_scaled_size
 #define _min_DCT_v_scaled_size min_DCT_scaled_size
-#define _jpeg_width image_width
-#define _jpeg_height image_height
 #endif
commit e5963700ff6e60e9679cf37bc0b65f5cfb406f5a
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Apr 8 21:07:14 2016 +0200

    Get rid of _XPMPRIVATE
    
    Change-Id: I37396cfe303bdc17520a69ee7cbdbdbc219eea1c

diff --git a/solenv/inc/doxygen.cfg b/solenv/inc/doxygen.cfg
index 92ace78..6de3745 100644
--- a/solenv/inc/doxygen.cfg
+++ b/solenv/inc/doxygen.cfg
@@ -2018,7 +2018,6 @@ PREDEFINED             = LINUX \
                          OSL_DEBUG_LEVEL=2 \
                          CUI \
                          EXCEPTIONS_ON \
-                         _XPMPRIVATE \
                          DOXYGEN_ONLY
 
 # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
diff --git a/solenv/inc/doxygen_doc.cfg b/solenv/inc/doxygen_doc.cfg
index ed3705a..057c6cd 100644
--- a/solenv/inc/doxygen_doc.cfg
+++ b/solenv/inc/doxygen_doc.cfg
@@ -2018,7 +2018,6 @@ PREDEFINED             = LINUX \
                          OSL_DEBUG_LEVEL=2 \
                          CUI \
                          EXCEPTIONS_ON \
-                         _XPMPRIVATE \
                          DOXYGEN_ONLY
 
 # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
diff --git a/solenv/inc/doxygen_tag.cfg b/solenv/inc/doxygen_tag.cfg
index 30cbe8d..cf07173 100644
--- a/solenv/inc/doxygen_tag.cfg
+++ b/solenv/inc/doxygen_tag.cfg
@@ -2018,7 +2018,6 @@ PREDEFINED             = LINUX \
                          OSL_DEBUG_LEVEL=2 \
                          CUI \
                          EXCEPTIONS_ON \
-                         _XPMPRIVATE \
                          DOXYGEN_ONLY
 
 # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
diff --git a/vcl/source/filter/ixpm/xpmread.cxx b/vcl/source/filter/ixpm/xpmread.cxx
index 2622bf0..d4853b4 100644
--- a/vcl/source/filter/ixpm/xpmread.cxx
+++ b/vcl/source/filter/ixpm/xpmread.cxx
@@ -20,10 +20,86 @@
 #include <vcl/bitmapaccess.hxx>
 #include <vcl/graph.hxx>
 #include "rgbtable.hxx"
-#define _XPMPRIVATE
 #include "xpmread.hxx"
 #include <cstring>
 
+#define XPMTEMPBUFSIZE      0x00008000
+#define XPMSTRINGBUF        0x00008000
+
+#define XPMIDENTIFIER       0x00000001          // mnIdentifier includes on of the six phases
+#define XPMDEFINITION       0x00000002          // the XPM format consists of
+#define XPMVALUES           0x00000003
+#define XPMCOLORS           0x00000004
+#define XPMPIXELS           0x00000005
+#define XPMEXTENSIONS       0x00000006
+#define XPMENDEXT           0x00000007
+
+#define XPMREMARK           0x00000001          // defines used by mnStatus
+#define XPMDOUBLE           0x00000002
+#define XPMSTRING           0x00000004
+#define XPMFINISHED         0x00000008
+
+#define XPMCASESENSITIVE    0x00000001
+#define XPMCASENONSENSITIVE 0x00000002
+
+enum ReadState
+{
+    XPMREAD_OK,
+    XPMREAD_ERROR,
+    XPMREAD_NEED_MORE
+};
+
+class BitmapWriteAccess;
+class Graphic;
+
+class XPMReader : public GraphicReader
+{
+private:
+
+    SvStream&           mrIStm;
+    Bitmap              maBmp;
+    BitmapWriteAccess*  mpAcc;
+    Bitmap              maMaskBmp;
+    BitmapWriteAccess*  mpMaskAcc;
+    long                mnLastPos;
+
+    sal_uLong               mnWidth;
+    sal_uLong               mnHeight;
+    sal_uLong               mnColors;
+    sal_uLong               mnCpp;                              // characters per pix
+    bool                mbTransparent;
+    bool                mbStatus;
+    sal_uLong               mnStatus;
+    sal_uLong               mnIdentifier;
+    sal_uInt8               mcThisByte;
+    sal_uInt8               mcLastByte;
+    sal_uLong               mnTempAvail;
+    sal_uInt8*              mpTempBuf;
+    sal_uInt8*              mpTempPtr;
+    sal_uInt8*              mpFastColorTable;
+    sal_uInt8*              mpColMap;
+    sal_uLong               mnStringSize;
+    sal_uInt8*              mpStringBuf;
+    sal_uLong               mnParaSize;
+    sal_uInt8*              mpPara;
+
+    bool                    ImplGetString();
+    bool                    ImplGetColor( sal_uLong );
+    bool                    ImplGetScanLine( sal_uLong );
+    bool                    ImplGetColSub( sal_uInt8* );
+    bool                    ImplGetColKey( sal_uInt8 );
+    void                    ImplGetRGBHex( sal_uInt8*, sal_uLong );
+    bool                    ImplGetPara( sal_uLong numb );
+    static bool             ImplCompare( sal_uInt8 const *, sal_uInt8 const *, sal_uLong, sal_uLong nmode = XPMCASENONSENSITIVE );
+    sal_uLong               ImplGetULONG( sal_uLong nPara );
+
+public:
+    explicit            XPMReader( SvStream& rStm );
+    virtual             ~XPMReader();
+
+    ReadState           ReadXPM( Graphic& rGraphic );
+};
+
 XPMReader::XPMReader(SvStream& rStm)
     : mrIStm(rStm)
     , mpAcc(nullptr)
diff --git a/vcl/source/filter/ixpm/xpmread.hxx b/vcl/source/filter/ixpm/xpmread.hxx
index 141f4b2..d353262 100644
--- a/vcl/source/filter/ixpm/xpmread.hxx
+++ b/vcl/source/filter/ixpm/xpmread.hxx
@@ -22,87 +22,6 @@
 
 #include <vcl/bitmap.hxx>
 
-#ifdef _XPMPRIVATE
-
-#define XPMTEMPBUFSIZE      0x00008000
-#define XPMSTRINGBUF        0x00008000
-
-#define XPMIDENTIFIER       0x00000001          // mnIdentifier includes on of the six phases
-#define XPMDEFINITION       0x00000002          // the XPM format consists of
-#define XPMVALUES           0x00000003
-#define XPMCOLORS           0x00000004
-#define XPMPIXELS           0x00000005
-#define XPMEXTENSIONS       0x00000006
-#define XPMENDEXT           0x00000007
-
-#define XPMREMARK           0x00000001          // defines used by mnStatus
-#define XPMDOUBLE           0x00000002
-#define XPMSTRING           0x00000004
-#define XPMFINISHED         0x00000008
-
-#define XPMCASESENSITIVE    0x00000001
-#define XPMCASENONSENSITIVE 0x00000002
-
-enum ReadState
-{
-    XPMREAD_OK,
-    XPMREAD_ERROR,
-    XPMREAD_NEED_MORE
-};
-
-class BitmapWriteAccess;
-class Graphic;
-
-class XPMReader : public GraphicReader
-{
-private:
-
-    SvStream&           mrIStm;
-    Bitmap              maBmp;
-    BitmapWriteAccess*  mpAcc;
-    Bitmap              maMaskBmp;
-    BitmapWriteAccess*  mpMaskAcc;
-    long                mnLastPos;
-
-    sal_uLong               mnWidth;
-    sal_uLong               mnHeight;
-    sal_uLong               mnColors;
-    sal_uLong               mnCpp;                              // characters per pix
-    bool                mbTransparent;
-    bool                mbStatus;
-    sal_uLong               mnStatus;
-    sal_uLong               mnIdentifier;
-    sal_uInt8               mcThisByte;
-    sal_uInt8               mcLastByte;
-    sal_uLong               mnTempAvail;
-    sal_uInt8*              mpTempBuf;
-    sal_uInt8*              mpTempPtr;
-    sal_uInt8*              mpFastColorTable;
-    sal_uInt8*              mpColMap;
-    sal_uLong               mnStringSize;
-    sal_uInt8*              mpStringBuf;
-    sal_uLong               mnParaSize;
-    sal_uInt8*              mpPara;
-
-    bool                    ImplGetString();
-    bool                    ImplGetColor( sal_uLong );
-    bool                    ImplGetScanLine( sal_uLong );
-    bool                    ImplGetColSub( sal_uInt8* );
-    bool                    ImplGetColKey( sal_uInt8 );
-    void                    ImplGetRGBHex( sal_uInt8*, sal_uLong );
-    bool                    ImplGetPara( sal_uLong numb );
-    static bool             ImplCompare( sal_uInt8 const *, sal_uInt8 const *, sal_uLong, sal_uLong nmode = XPMCASENONSENSITIVE );
-    sal_uLong               ImplGetULONG( sal_uLong nPara );
-
-public:
-    explicit            XPMReader( SvStream& rStm );
-    virtual             ~XPMReader();
-
-    ReadState           ReadXPM( Graphic& rGraphic );
-};
-
-#endif // _XPMPRIVATE
-
 VCL_DLLPUBLIC bool ImportXPM( SvStream& rStream, Graphic& rGraphic );
 
 #endif // INCLUDED_VCL_SOURCE_FILTER_IXPM_XPMREAD_HXX
commit 9dee2bf5b40dc0e730a4f0c2aacc03a068322388
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Apr 8 21:05:12 2016 +0200

    Get rid of _XBMPRIVATE
    
    Change-Id: I4e2cd2d98299ee0b25e05b8a96fb8c3b8390b66d

diff --git a/solenv/inc/doxygen.cfg b/solenv/inc/doxygen.cfg
index bc3857c..92ace78 100644
--- a/solenv/inc/doxygen.cfg
+++ b/solenv/inc/doxygen.cfg
@@ -2018,7 +2018,6 @@ PREDEFINED             = LINUX \
                          OSL_DEBUG_LEVEL=2 \
                          CUI \
                          EXCEPTIONS_ON \
-                         _XBMPRIVATE \
                          _XPMPRIVATE \
                          DOXYGEN_ONLY
 
diff --git a/solenv/inc/doxygen_doc.cfg b/solenv/inc/doxygen_doc.cfg
index b8d4503..ed3705a 100644
--- a/solenv/inc/doxygen_doc.cfg
+++ b/solenv/inc/doxygen_doc.cfg
@@ -2018,7 +2018,6 @@ PREDEFINED             = LINUX \
                          OSL_DEBUG_LEVEL=2 \
                          CUI \
                          EXCEPTIONS_ON \
-                         _XBMPRIVATE \
                          _XPMPRIVATE \
                          DOXYGEN_ONLY
 
diff --git a/solenv/inc/doxygen_tag.cfg b/solenv/inc/doxygen_tag.cfg
index 49ada4a..30cbe8d 100644
--- a/solenv/inc/doxygen_tag.cfg
+++ b/solenv/inc/doxygen_tag.cfg
@@ -2018,7 +2018,6 @@ PREDEFINED             = LINUX \
                          OSL_DEBUG_LEVEL=2 \
                          CUI \
                          EXCEPTIONS_ON \
-                         _XBMPRIVATE \
                          _XPMPRIVATE \
                          DOXYGEN_ONLY
 
diff --git a/vcl/source/filter/ixbm/xbmread.cxx b/vcl/source/filter/ixbm/xbmread.cxx
index d34076f..a8a59a7 100644
--- a/vcl/source/filter/ixbm/xbmread.cxx
+++ b/vcl/source/filter/ixbm/xbmread.cxx
@@ -17,11 +17,50 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#define _XBMPRIVATE
 #include <ctype.h>
 #include <comphelper/string.hxx>
 #include "xbmread.hxx"
 
+enum XBMFormat
+{
+    XBM10,
+    XBM11
+};
+
+enum ReadState
+{
+    XBMREAD_OK,
+    XBMREAD_ERROR,
+    XBMREAD_NEED_MORE
+};
+
+class XBMReader : public GraphicReader
+{
+    SvStream&           rIStm;
+    Bitmap              aBmp1;
+    BitmapWriteAccess*  pAcc1;
+    short*              pHexTable;
+    BitmapColor         aWhite;
+    BitmapColor         aBlack;
+    long                nLastPos;
+    long                nWidth;
+    long                nHeight;
+    bool                bStatus;
+
+    void            InitTable();
+    OString         FindTokenLine( SvStream* pInStm, const char* pTok1,
+                                       const char* pTok2 = nullptr, const char* pTok3 = nullptr );
+    long            ParseDefine( const sal_Char* pDefine );
+    bool            ParseData( SvStream* pInStm, const OString& aLastLine, XBMFormat eFormat );
+
+public:
+
+    explicit        XBMReader( SvStream& rStm );
+    virtual         ~XBMReader();
+
+    ReadState       ReadXBM( Graphic& rGraphic );
+};
+
 XBMReader::XBMReader( SvStream& rStm ) :
             rIStm           ( rStm ),
             pAcc1           ( nullptr ),
diff --git a/vcl/source/filter/ixbm/xbmread.hxx b/vcl/source/filter/ixbm/xbmread.hxx
index 52082c2..de95910 100644
--- a/vcl/source/filter/ixbm/xbmread.hxx
+++ b/vcl/source/filter/ixbm/xbmread.hxx
@@ -23,50 +23,6 @@
 #include <vcl/graph.hxx>
 #include <vcl/bitmapaccess.hxx>
 
-#ifdef _XBMPRIVATE
-
-enum XBMFormat
-{
-    XBM10,
-    XBM11
-};
-
-enum ReadState
-{
-    XBMREAD_OK,
-    XBMREAD_ERROR,
-    XBMREAD_NEED_MORE
-};
-
-class XBMReader : public GraphicReader
-{
-    SvStream&           rIStm;
-    Bitmap              aBmp1;
-    BitmapWriteAccess*  pAcc1;
-    short*              pHexTable;
-    BitmapColor         aWhite;
-    BitmapColor         aBlack;
-    long                nLastPos;
-    long                nWidth;
-    long                nHeight;
-    bool                bStatus;
-
-    void            InitTable();
-    OString         FindTokenLine( SvStream* pInStm, const char* pTok1,
-                                       const char* pTok2 = nullptr, const char* pTok3 = nullptr );
-    long            ParseDefine( const sal_Char* pDefine );
-    bool            ParseData( SvStream* pInStm, const OString& aLastLine, XBMFormat eFormat );
-
-public:
-
-    explicit        XBMReader( SvStream& rStm );
-    virtual         ~XBMReader();
-
-    ReadState       ReadXBM( Graphic& rGraphic );
-};
-
-#endif // _XBMPRIVATE
-
 VCL_DLLPUBLIC bool ImportXBM( SvStream& rStream, Graphic& rGraphic );
 
 #endif // INCLUDED_VCL_SOURCE_FILTER_IXBM_XBMREAD_HXX
commit 5f12e1902a4e9716c610388615fbe4a289133d63
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Apr 8 21:03:23 2016 +0200

    Get rid of _GIFPRIVATE
    
    Change-Id: I3e6b8d424c460987f7a6269ad035ecaeafe48366

diff --git a/solenv/inc/doxygen.cfg b/solenv/inc/doxygen.cfg
index bb5872e..bc3857c 100644
--- a/solenv/inc/doxygen.cfg
+++ b/solenv/inc/doxygen.cfg
@@ -2018,7 +2018,6 @@ PREDEFINED             = LINUX \
                          OSL_DEBUG_LEVEL=2 \
                          CUI \
                          EXCEPTIONS_ON \
-                         _GIFPRIVATE \
                          _XBMPRIVATE \
                          _XPMPRIVATE \
                          DOXYGEN_ONLY
diff --git a/solenv/inc/doxygen_doc.cfg b/solenv/inc/doxygen_doc.cfg
index 2617df1..b8d4503 100644
--- a/solenv/inc/doxygen_doc.cfg
+++ b/solenv/inc/doxygen_doc.cfg
@@ -2018,7 +2018,6 @@ PREDEFINED             = LINUX \
                          OSL_DEBUG_LEVEL=2 \
                          CUI \
                          EXCEPTIONS_ON \
-                         _GIFPRIVATE \
                          _XBMPRIVATE \
                          _XPMPRIVATE \
                          DOXYGEN_ONLY
diff --git a/solenv/inc/doxygen_tag.cfg b/solenv/inc/doxygen_tag.cfg
index 1b4b892..49ada4a 100644
--- a/solenv/inc/doxygen_tag.cfg
+++ b/solenv/inc/doxygen_tag.cfg
@@ -2018,7 +2018,6 @@ PREDEFINED             = LINUX \
                          OSL_DEBUG_LEVEL=2 \
                          CUI \
                          EXCEPTIONS_ON \
-                         _GIFPRIVATE \
                          _XBMPRIVATE \
                          _XPMPRIVATE \
                          DOXYGEN_ONLY
diff --git a/vcl/source/filter/igif/gifread.cxx b/vcl/source/filter/igif/gifread.cxx
index dd4e925..01060ab 100644
--- a/vcl/source/filter/igif/gifread.cxx
+++ b/vcl/source/filter/igif/gifread.cxx
@@ -17,14 +17,97 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#define _GIFPRIVATE
-
 #include "decode.hxx"
 #include "gifread.hxx"
 #include <memory>
 
 #define NO_PENDING( rStm ) ( ( rStm ).GetError() != ERRCODE_IO_PENDING )
 
+enum GIFAction
+{
+    GLOBAL_HEADER_READING,
+    MARKER_READING,
+    EXTENSION_READING,
+    LOCAL_HEADER_READING,
+    FIRST_BLOCK_READING,
+    NEXT_BLOCK_READING,
+    ABORT_READING,
+    END_READING
+};
+
+enum ReadState
+{
+    GIFREAD_OK,
+    GIFREAD_ERROR,
+    GIFREAD_NEED_MORE
+};
+
+class GIFLZWDecompressor;
+
+class SvStream;
+
+class GIFReader : public GraphicReader
+{
+    Graphic             aImGraphic;
+    Animation           aAnimation;
+    Bitmap              aBmp8;
+    Bitmap              aBmp1;
+    BitmapPalette       aGPalette;
+    BitmapPalette       aLPalette;
+    SvStream&           rIStm;
+    sal_uInt8*          pSrcBuf;
+    GIFLZWDecompressor* pDecomp;
+    BitmapWriteAccess*  pAcc8;
+    BitmapWriteAccess*  pAcc1;
+    long                nYAcc;
+    long                nLastPos;
+    sal_uInt32          nLogWidth100;
+    sal_uInt32          nLogHeight100;
+    sal_uInt16          nTimer;
+    sal_uInt16          nGlobalWidth;           // maximum imagewidth from header
+    sal_uInt16          nGlobalHeight;          // maximum imageheight from header
+    sal_uInt16          nImageWidth;            // maximum screenwidth from header
+    sal_uInt16          nImageHeight;           // maximum screenheight from header
+    sal_uInt16          nImagePosX;
+    sal_uInt16          nImagePosY;
+    sal_uInt16          nImageX;                // maximum screenwidth from header
+    sal_uInt16          nImageY;                // maximum screenheight from header
+    sal_uInt16          nLastImageY;
+    sal_uInt16          nLastInterCount;
+    sal_uInt16          nLoops;
+    GIFAction           eActAction;
+    bool                bStatus;
+    bool                bGCTransparent;         // is the image transparent, if yes:
+    bool                bInterlaced;
+    bool                bOverreadBlock;
+    bool                bImGraphicReady;
+    bool                bGlobalPalette;
+    sal_uInt8           nBackgroundColor;       // backgroundcolour
+    sal_uInt8           nGCTransparentIndex;    // pixels of this index are transparant
+    sal_uInt8           nGCDisposalMethod;      // 'Disposal Method' (see GIF docs)
+    sal_uInt8           cTransIndex1;
+    sal_uInt8           cNonTransIndex1;
+
+    void                ReadPaletteEntries( BitmapPalette* pPal, sal_uLong nCount );
+    void                ClearImageExtensions();
+    void                CreateBitmaps( long nWidth, long nHeight, BitmapPalette* pPal, bool bWatchForBackgroundColor );
+    bool                ReadGlobalHeader();
+    bool                ReadExtension();
+    bool                ReadLocalHeader();
+    sal_uLong           ReadNextBlock();
+    void                FillImages( sal_uInt8* pBytes, sal_uLong nCount );
+    void                CreateNewBitmaps();
+    bool                ProcessGIF();
+
+public:
+
+    ReadState           ReadGIF( Graphic& rGraphic );
+    const Graphic&      GetIntermediateGraphic();
+
+    explicit            GIFReader( SvStream& rStm );
+    virtual             ~GIFReader();
+};
+
 GIFReader::GIFReader( SvStream& rStm )
     : aGPalette ( 256 )
     , aLPalette ( 256 )
diff --git a/vcl/source/filter/igif/gifread.hxx b/vcl/source/filter/igif/gifread.hxx
index 5ac60cc..c6909f4 100644
--- a/vcl/source/filter/igif/gifread.hxx
+++ b/vcl/source/filter/igif/gifread.hxx
@@ -23,95 +23,6 @@
 #include <vcl/graph.hxx>
 #include <vcl/bitmapaccess.hxx>
 
-#ifdef _GIFPRIVATE
-
-enum GIFAction
-{
-    GLOBAL_HEADER_READING,
-    MARKER_READING,
-    EXTENSION_READING,
-    LOCAL_HEADER_READING,
-    FIRST_BLOCK_READING,
-    NEXT_BLOCK_READING,
-    ABORT_READING,
-    END_READING
-};
-
-enum ReadState
-{
-    GIFREAD_OK,
-    GIFREAD_ERROR,
-    GIFREAD_NEED_MORE
-};
-
-class GIFLZWDecompressor;
-
-class SvStream;
-
-class GIFReader : public GraphicReader
-{
-    Graphic             aImGraphic;
-    Animation           aAnimation;
-    Bitmap              aBmp8;
-    Bitmap              aBmp1;
-    BitmapPalette       aGPalette;
-    BitmapPalette       aLPalette;
-    SvStream&           rIStm;
-    sal_uInt8*          pSrcBuf;
-    GIFLZWDecompressor* pDecomp;
-    BitmapWriteAccess*  pAcc8;
-    BitmapWriteAccess*  pAcc1;
-    long                nYAcc;
-    long                nLastPos;
-    sal_uInt32          nLogWidth100;
-    sal_uInt32          nLogHeight100;
-    sal_uInt16          nTimer;
-    sal_uInt16          nGlobalWidth;           // maximum imagewidth from header
-    sal_uInt16          nGlobalHeight;          // maximum imageheight from header
-    sal_uInt16          nImageWidth;            // maximum screenwidth from header
-    sal_uInt16          nImageHeight;           // maximum screenheight from header
-    sal_uInt16          nImagePosX;
-    sal_uInt16          nImagePosY;
-    sal_uInt16          nImageX;                // maximum screenwidth from header
-    sal_uInt16          nImageY;                // maximum screenheight from header
-    sal_uInt16          nLastImageY;
-    sal_uInt16          nLastInterCount;
-    sal_uInt16          nLoops;
-    GIFAction           eActAction;
-    bool                bStatus;
-    bool                bGCTransparent;         // is the image transparent, if yes:
-    bool                bInterlaced;
-    bool                bOverreadBlock;
-    bool                bImGraphicReady;
-    bool                bGlobalPalette;
-    sal_uInt8           nBackgroundColor;       // backgroundcolour
-    sal_uInt8           nGCTransparentIndex;    // pixels of this index are transparant
-    sal_uInt8           nGCDisposalMethod;      // 'Disposal Method' (see GIF docs)
-    sal_uInt8           cTransIndex1;
-    sal_uInt8           cNonTransIndex1;
-
-    void                ReadPaletteEntries( BitmapPalette* pPal, sal_uLong nCount );
-    void                ClearImageExtensions();
-    void                CreateBitmaps( long nWidth, long nHeight, BitmapPalette* pPal, bool bWatchForBackgroundColor );
-    bool                ReadGlobalHeader();
-    bool                ReadExtension();
-    bool                ReadLocalHeader();
-    sal_uLong           ReadNextBlock();
-    void                FillImages( sal_uInt8* pBytes, sal_uLong nCount );
-    void                CreateNewBitmaps();
-    bool                ProcessGIF();
-
-public:
-
-    ReadState           ReadGIF( Graphic& rGraphic );
-    const Graphic&      GetIntermediateGraphic();
-
-    explicit            GIFReader( SvStream& rStm );
-    virtual             ~GIFReader();
-};
-
-#endif // _GIFPRIVATE
-
 VCL_DLLPUBLIC bool ImportGIF( SvStream& rStream, Graphic& rGraphic );
 
 #endif // INCLUDED_VCL_SOURCE_FILTER_IGIF_GIFREAD_HXX


More information about the Libreoffice-commits mailing list