diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-12-16 09:03:08 +0000 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2021-01-12 11:13:35 +0100 |
commit | 5530242003bbf25ee4e4c20094fdce98d8dd1ffb (patch) | |
tree | 7fe54d0b71af355bca2b1233095a33aa4cfd6911 /filter | |
parent | 2468ff2f3f8d124db785db80365311c460954d51 (diff) |
ofz#19525 Invalid enum value
value is unused anyway, so just reflect that
Change-Id: I032f477dddd4d50c791898eb214dac2dbbb69f09
Reviewed-on: https://gerrit.libreoffice.org/85203
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/graphicfilter/icgm/bundles.cxx | 5 | ||||
-rw-r--r-- | filter/source/graphicfilter/icgm/bundles.hxx | 3 | ||||
-rw-r--r-- | filter/source/graphicfilter/icgm/cgmtypes.hxx | 1 | ||||
-rw-r--r-- | filter/source/graphicfilter/icgm/class1.cxx | 4 |
4 files changed, 4 insertions, 9 deletions
diff --git a/filter/source/graphicfilter/icgm/bundles.cxx b/filter/source/graphicfilter/icgm/bundles.cxx index 6754b9bccaf2..2bb36999de98 100644 --- a/filter/source/graphicfilter/icgm/bundles.cxx +++ b/filter/source/graphicfilter/icgm/bundles.cxx @@ -29,7 +29,6 @@ void Bundle::SetColor( sal_uInt32 nColor ) } FontEntry::FontEntry() : - eCharSetType ( CST_CCOMPLETE ), nFontType ( 0 ) { } @@ -74,7 +73,6 @@ CGMFList& CGMFList::operator=( const CGMFList& rSource ) pCFontEntry->pCharSetValue.reset( new sal_Int8[ nSize ] ); memcpy( pCFontEntry->pCharSetValue.get(), pPtr->pCharSetValue.get(), nSize ); } - pCFontEntry->eCharSetType = pPtr->eCharSetType; pCFontEntry->nFontType = pPtr->nFontType; aFontEntryList.push_back( std::move(pCFontEntry) ); } @@ -169,7 +167,7 @@ void CGMFList::InsertName( sal_uInt8 const * pSource, sal_uInt32 nSize ) } -void CGMFList::InsertCharSet( CharSetType eCharSetType, sal_uInt8 const * pSource, sal_uInt32 nSize ) +void CGMFList::InsertCharSet( sal_uInt8 const * pSource, sal_uInt32 nSize ) { FontEntry* pFontEntry; if ( nFontsAvailable == nCharSetCount ) @@ -183,7 +181,6 @@ void CGMFList::InsertCharSet( CharSetType eCharSetType, sal_uInt8 const * pSourc pFontEntry = aFontEntryList[ nCharSetCount ].get(); } nCharSetCount++; - pFontEntry->eCharSetType = eCharSetType; pFontEntry->pCharSetValue.reset( new sal_Int8[ nSize + 1 ] ); pFontEntry->pCharSetValue[ nSize ] = 0; memcpy( pFontEntry->pCharSetValue.get(), pSource, nSize ); diff --git a/filter/source/graphicfilter/icgm/bundles.hxx b/filter/source/graphicfilter/icgm/bundles.hxx index 1f9bf7bb29df..8d87bac2082b 100644 --- a/filter/source/graphicfilter/icgm/bundles.hxx +++ b/filter/source/graphicfilter/icgm/bundles.hxx @@ -143,7 +143,6 @@ class FontEntry public: std::unique_ptr<sal_Int8[]> pFontName; - CharSetType eCharSetType; std::unique_ptr<sal_Int8[]> pCharSetValue; sal_uInt32 nFontType; // bit 0 = 1 -> Italic, @@ -169,7 +168,7 @@ public: FontEntry* GetFontEntry( sal_uInt32 ); void InsertName( sal_uInt8 const * pSource, sal_uInt32 nSize ); - void InsertCharSet( CharSetType, sal_uInt8 const * pSource, sal_uInt32 nSize ); + void InsertCharSet( sal_uInt8 const * pSource, sal_uInt32 nSize ); CGMFList& operator=( const CGMFList& rFontList ); }; diff --git a/filter/source/graphicfilter/icgm/cgmtypes.hxx b/filter/source/graphicfilter/icgm/cgmtypes.hxx index a245ebcbf3b2..b9a80fb4c83a 100644 --- a/filter/source/graphicfilter/icgm/cgmtypes.hxx +++ b/filter/source/graphicfilter/icgm/cgmtypes.hxx @@ -97,7 +97,6 @@ enum ColorSelectionMode { CSM_INDEXED = 0, CSM_DIRECT = 1 }; enum ColorModel { CM_RGB = 0, CM_CMYK = 1 }; enum CharacterCodingA { CCA_BASIC_7 = 0, CCA_BASIC_8 = 1, CCA_EXT_7 = 2, CCA_EXT_8 = 3 }; -enum CharSetType { CST_CBYTE_94 = 0, CST_CBYTE_96 = 1, CST_MULT94 = 2, CST_MULT96 = 3, CST_CCOMPLETE = 4 }; enum TextPrecision { TPR_STRING = 0, TPR_CHARACTER = 1, TPR_STROKE = 2, TPR_UNDEFINED = 0xffff }; enum TextPath { TPR_RIGHT = 0, TPR_LEFT = 1, TPR_UP = 2, TPR_DOWN = 3 }; enum TextAlignmentH { TAH_NORMAL = 0, TAH_LEFT = 1, TAH_CENTER = 2, TAH_RIGHT = 3, TAH_CONT = 4 }; diff --git a/filter/source/graphicfilter/icgm/class1.cxx b/filter/source/graphicfilter/icgm/class1.cxx index a828c919695b..085fd00e558f 100644 --- a/filter/source/graphicfilter/icgm/class1.cxx +++ b/filter/source/graphicfilter/icgm/class1.cxx @@ -180,13 +180,13 @@ void CGM::ImplDoClass1() { while ( mnParaSize < mnElementSize ) { - sal_uInt32 nCharSetType = ImplGetUI16(); + ImplGetUI16(); // skip CharSetType sal_uInt32 nSize = ImplGetUI(1); if (static_cast<sal_uIntPtr>(mpEndValidSource - (mpSource + mnParaSize)) < nSize) throw css::uno::Exception("attempt to read past end of input", nullptr); - pElement->aFontList.InsertCharSet( static_cast<CharSetType>(nCharSetType), mpSource + mnParaSize, nSize ); + pElement->aFontList.InsertCharSet( mpSource + mnParaSize, nSize ); mnParaSize += nSize; } } |