vcl/unx/generic/print/genpspgraphics.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 6624124df227e5a8ba14595848008d0b2d901255
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Mon May 2 23:21:59 2022 +0200
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Tue May 3 10:59:47 2022 +0200

    Why cast from FontWeight to int
    
    Change-Id: I2e283197024c89681dc123e77c05d593ccec4552
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133738
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/vcl/unx/generic/print/genpspgraphics.cxx 
b/vcl/unx/generic/print/genpspgraphics.cxx
index 41409d7a07a5..7c4e14b27d52 100644
--- a/vcl/unx/generic/print/genpspgraphics.cxx
+++ b/vcl/unx/generic/print/genpspgraphics.cxx
@@ -198,9 +198,9 @@ void GenPspGraphics::SetFont(LogicalFontInstance 
*pFontInstance, int nFallbackLe
         if( eItalic != ITALIC_NORMAL && eItalic != ITALIC_OBLIQUE )
             bArtItalic = true;
     }
-    int nWeight = static_cast<int>(rEntry.GetWeight());
-    int nRealWeight = 
static_cast<int>(m_pPrinterGfx->GetFontMgr().getFontWeight( nID ));
-    if( nRealWeight <= int(WEIGHT_MEDIUM) && nWeight > int(WEIGHT_MEDIUM) )
+    FontWeight nWeight = rEntry.GetWeight();
+    FontWeight nRealWeight = m_pPrinterGfx->GetFontMgr().getFontWeight( nID );
+    if( nRealWeight <= WEIGHT_MEDIUM && nWeight > WEIGHT_MEDIUM )
     {
         bArtBold = true;
     }

Reply via email to