summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/items/textitem.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx
index 313997fa246c..53c1baaa7223 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -1449,7 +1449,8 @@ bool SvxColorItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
case MID_COLOR_ALPHA:
{
- rVal <<= mColor.GetTransparency();
+ auto fTransparency = static_cast<double>(mColor.GetTransparency()) * 100 / 255;
+ rVal <<= static_cast<sal_Int16>(basegfx::fround(fTransparency));
break;
}
default:
@@ -1472,7 +1473,8 @@ bool SvxColorItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
bool bRet = rVal >>= nTransparency;
if (bRet)
{
- mColor.SetTransparency(nTransparency);
+ auto fTransparency = static_cast<double>(nTransparency) * 255 / 100;
+ mColor.SetTransparency(static_cast<sal_uInt8>(basegfx::fround(fTransparency)));
}
return bRet;
}