37 throw css::uno::Exception(
"attempt to read past end of input",
nullptr);
39 sal_uInt16* pTemp =
reinterpret_cast<sal_uInt16*
>(
mpSource);
40 sal_uInt16 nOpcode = pTemp[ 4 ];
44 if (
mpChart || ( nOpcode == 0 ) )
51 throw css::uno::Exception(
"attempt to read past end of input",
nullptr);
55 mpChart->mnCurrentFileType = pAppData[ 3 ];
82 throw css::uno::Exception(
"attempt to read past end of input",
nullptr);
86 if (nZoneEnum > 0 && nZoneEnum <= 6)
87 mpChart->mDataNode[ nZoneEnum ] = *
reinterpret_cast<DataNode*
>( pAppData );
93 throw css::uno::Exception(
"attempt to read past end of input",
nullptr);
95 if ( pAppData[ 16 ] == 0 )
97 if ( pAppData[ 2 ] == 46 )
101 else if ( pAppData[ 2 ] & 0x80 )
121 throw css::uno::Exception(
"attempt to read past end of input",
nullptr);
123 std::unique_ptr<TextEntry> pTextEntry(
new TextEntry);
124 pTextEntry->nTypeOfText = *
reinterpret_cast<sal_uInt16*
>( pAppData );
125 pTextEntry->nRowOrLineNum = *
reinterpret_cast<sal_uInt16*
>( pAppData + 2 );
126 pTextEntry->nColumnNum = *
reinterpret_cast<sal_uInt16*
>( pAppData + 4 );
127 sal_uInt16
nAttributes = *
reinterpret_cast<sal_uInt16*
>( pAppData + 6 );
129 pTextEntry->nLineType = (
nAttributes >> 8 ) & 0xf;
134 sal_uInt32 nLen = strnlen(
reinterpret_cast<char*
>(pAppData), nMaxLen);
135 pTextEntry->pText =
new char[nLen + 1];
136 memcpy( pTextEntry->pText, pAppData, nLen );
137 pTextEntry->pText[nLen] = 0;
140 mpChart->InsertTextEntry( std::move(pTextEntry) );
std::unique_ptr< CGMChart > mpChart
std::unique_ptr< CGMImpressOutAct > mpOutAct
sal_uInt8 * mpEndValidSource
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)