diff options
author | Armin Le Grand <alg@apache.org> | 2013-04-16 08:41:07 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2013-05-20 11:33:13 +0100 |
commit | 35aa48d80b4b800d408d26bd72fbdfd711abbb6f (patch) | |
tree | 2756d4aa78cd67be7d1597b4222f0da0657c770d /svtools/source/control/valueset.cxx | |
parent | 05038d1bd0a7bc9ecb6676ba1309576ac74f849f (diff) |
Resolves: #i122041# Unified and centralized control for Color ValueSets
(cherry picked from commit 68e707bbc6fe23881b822e6efab8a2933343dc1a)
Conflicts:
cui/source/inc/backgrnd.hxx
cui/source/inc/cuitabarea.hxx
cui/source/tabpages/backgrnd.cxx
cui/source/tabpages/tpcolor.cxx
sd/source/ui/view/drviews6.cxx
svx/Package_inc.mk
svx/inc/svx/colrctrl.hxx
svx/source/sidebar/tools/ColorControl.cxx
svx/source/tbxctrls/colorwindow.hxx
svx/source/tbxctrls/colrctrl.cxx
svx/source/tbxctrls/tbcontrl.cxx
Change-Id: Ie06fe355846b737ec8aae9aade4d408232c83193
Related: #i122041# Add a11y values for defining behaviour of ColorValueSets
(cherry picked from commit 401e8f2db607081e62eaaa1f08a8cd8971a3f637)
Conflicts:
cui/source/tabpages/backgrnd.cxx
officecfg/registry/schema/org/openoffice/Office/Common.xcs
sc/source/ui/miscdlgs/tabbgcolordlg.cxx
svtools/inc/svtools/accessibilityoptions.hxx
svtools/source/inc/configitems/accessibilityoptions_const.hxx
vcl/inc/vcl/bitmap.hxx
vcl/source/gdi/bitmap4.cxx
Change-Id: If9d0db5f22974cad1ac886eca3719ca92ca7f240
Diffstat (limited to 'svtools/source/control/valueset.cxx')
-rw-r--r-- | svtools/source/control/valueset.cxx | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx index 9eb212488195..1006bf0d6800 100644 --- a/svtools/source/control/valueset.cxx +++ b/svtools/source/control/valueset.cxx @@ -28,7 +28,7 @@ #include <com/sun/star/accessibility/AccessibleStateType.hpp> #include <com/sun/star/lang/XComponent.hpp> #include <rtl/ustring.hxx> - +#include <svtools/accessibilityoptions.hxx> #include "valueimp.hxx" #include <svtools/valueset.hxx> @@ -294,6 +294,25 @@ void ValueSet::ImplFormatItem( ValueSetItem* pItem, Rectangle aRect ) { maVirDev.SetFillColor( pItem->maColor ); maVirDev.DrawRect( aRect ); + + const SvtAccessibilityOptions aOptions; + const sal_Int16 nEdgeBlendingPercent(aOptions.GetEdgeBlending()); + static bool bTest(false); + + if(nEdgeBlendingPercent && bTest) + { + Bitmap aBitmap(maVirDev.GetBitmap(aRect.TopLeft(), aRect.GetSize())); + + if(!aBitmap.IsEmpty()) + { + const Color aTopLeft(COL_WHITE); + const Color aBottomRight(COL_BLACK); + const sal_uInt8 nAlpha((nEdgeBlendingPercent * 255) / 100); + + aBitmap.DrawBlendFrame(nAlpha, aTopLeft, aBottomRight); + maVirDev.DrawBitmap(aRect.TopLeft(), aBitmap); + } + } } else { |