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>
This commit is contained in:
parent
3e33a11d8a
commit
8a14fb988e
4 changed files with 4 additions and 9 deletions
|
@ -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 );
|
||||
|
|
|
@ -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 );
|
||||
};
|
||||
|
||||
|
|
|
@ -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 };
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue