diff options
Diffstat (limited to 'drawinglayer')
-rw-r--r-- | drawinglayer/source/primitive2d/textlayoutdevice.cxx | 2 | ||||
-rw-r--r-- | drawinglayer/source/processor3d/defaultprocessor3d.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx b/drawinglayer/source/primitive2d/textlayoutdevice.cxx index ca0b8bb7e95c..820f0f9dbe4c 100644 --- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx +++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx @@ -453,7 +453,7 @@ namespace drawinglayer // TODO: eKerning // set FontHeight and init to no FontScaling - o_rSize.setY(rFont.GetFontSize().getHeight() > 0 ? rFont.GetFontSize().getHeight() : 0); + o_rSize.setY(std::max<long>(rFont.GetFontSize().getHeight(), 0)); o_rSize.setX(o_rSize.getY()); #ifdef _WIN32 diff --git a/drawinglayer/source/processor3d/defaultprocessor3d.cxx b/drawinglayer/source/processor3d/defaultprocessor3d.cxx index 40eac4395e04..36b6939362d7 100644 --- a/drawinglayer/source/processor3d/defaultprocessor3d.cxx +++ b/drawinglayer/source/processor3d/defaultprocessor3d.cxx @@ -234,7 +234,7 @@ namespace drawinglayer // calculate logic pixel size in texture coordinates const double fLogicTexSizeX(fLogicPixelSizeWorld / rPrimitive.getTextureSize().getX()); const double fLogicTexSizeY(fLogicPixelSizeWorld / rPrimitive.getTextureSize().getY()); - const double fLogicTexSize(fLogicTexSizeX > fLogicTexSizeY ? fLogicTexSizeX : fLogicTexSizeY); + const double fLogicTexSize(std::max(fLogicTexSizeX, fLogicTexSizeY)); // create texture and set mpGeoTexSvx.reset(new texture::GeoTexSvxMultiHatch(rPrimitive, fLogicTexSize)); |