diff options
Diffstat (limited to 'filter/source/graphicfilter/icgm/cgm.hxx')
-rw-r--r-- | filter/source/graphicfilter/icgm/cgm.hxx | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/filter/source/graphicfilter/icgm/cgm.hxx b/filter/source/graphicfilter/icgm/cgm.hxx index 3f9c88dde649..e2281311e438 100644 --- a/filter/source/graphicfilter/icgm/cgm.hxx +++ b/filter/source/graphicfilter/icgm/cgm.hxx @@ -17,13 +17,13 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_FILTER_SOURCE_GRAPHICFILTER_ICGM_CGM_HXX -#define INCLUDED_FILTER_SOURCE_GRAPHICFILTER_ICGM_CGM_HXX +#pragma once #include <com/sun/star/frame/XModel.hpp> -#include <vector> +#include <cmath> #include <memory> +#include <vector> #include "cgmtypes.hxx" class Graphic; @@ -61,6 +61,7 @@ class CGM bool mbFirstOutPut; bool mbInDefaultReplacement; sal_uInt32 mnAct4PostReset; + int mnBitmapInserts; std::unique_ptr<CGMBitmap> mpBitmapInUse; std::unique_ptr<CGMChart> mpChart; // if sal_True->"SHWSLIDEREC" // otherwise "BEGINPIC" commands @@ -137,6 +138,15 @@ class CGM bool Write( SvStream& rIStm ); }; -#endif + +inline bool useless(double value) +{ + if (!std::isfinite(value)) + return true; + int exp; + std::frexp(value, &exp); + const int maxbits = sizeof(tools::Long) * 8; + return exp > maxbits; +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |