Kaydet (Commit) 988b695b authored tarafından Vort's avatar Vort Kaydeden (comit) Caolán McNamara

fdo#37246 PDF Import: Color to string conversion fix

Change-Id: I5ec9f0246f6c2d1b12a389906d04133b2f5a6f9f
Reviewed-on: https://gerrit.libreoffice.org/8106Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 1bbc5537
...@@ -33,13 +33,13 @@ OUString pdfi::getColorString( const rendering::ARGBColor& rCol ) ...@@ -33,13 +33,13 @@ OUString pdfi::getColorString( const rendering::ARGBColor& rCol )
const sal_uInt8 nGreen( sal::static_int_cast<sal_Int8>( basegfx::fround( rCol.Green * 255.0 ) ) ); const sal_uInt8 nGreen( sal::static_int_cast<sal_Int8>( basegfx::fround( rCol.Green * 255.0 ) ) );
const sal_uInt8 nBlue ( sal::static_int_cast<sal_Int8>( basegfx::fround( rCol.Blue * 255.0 ) ) ); const sal_uInt8 nBlue ( sal::static_int_cast<sal_Int8>( basegfx::fround( rCol.Blue * 255.0 ) ) );
aBuf.append( '#' ); aBuf.append( '#' );
if( nRed < 10 ) if( nRed < 16 )
aBuf.append( '0' ); aBuf.append( '0' );
aBuf.append( sal_Int32(nRed), 16 ); aBuf.append( sal_Int32(nRed), 16 );
if( nGreen < 10 ) if( nGreen < 16 )
aBuf.append( '0' ); aBuf.append( '0' );
aBuf.append( sal_Int32(nGreen), 16 ); aBuf.append( sal_Int32(nGreen), 16 );
if( nBlue < 10 ) if( nBlue < 16 )
aBuf.append( '0' ); aBuf.append( '0' );
aBuf.append( sal_Int32(nBlue), 16 ); aBuf.append( sal_Int32(nBlue), 16 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment