summaryrefslogtreecommitdiff
path: root/svx/source/tbxctrls/fontworkgallery.cxx
diff options
context:
space:
mode:
authorArmin Le Grand <alg@apache.org>2013-06-18 10:07:44 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-06-18 13:06:12 +0100
commit7377557f277b19c4953198c17b591fd964ac7c40 (patch)
tree205ee08ac0651082379c1bced5ada7105e27029a /svx/source/tbxctrls/fontworkgallery.cxx
parent08337321e655a3b4991c895de98d96858e60d863 (diff)
Resolves: #i122120# Changed UI preview creators...
to no longer need SdrModel/SdrObject (cherry picked from commit 0c353433ad94786a937fa9da01d6e7382e3da942) corrected unwanted change (cherry picked from commit 8a10735b8ee3926a592d6919f4dbb823771bed9f) Conflicts: vcl/inc/vcl/outdev.hxx 7c096015d974382e6874a874370ee72a61f02e6a Change-Id: Ib2afe135566eba2e99cc8c4a653de3df0fa7f0cd
Diffstat (limited to 'svx/source/tbxctrls/fontworkgallery.cxx')
-rw-r--r--svx/source/tbxctrls/fontworkgallery.cxx22
1 files changed, 17 insertions, 5 deletions
diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx
index 4fb418a40758..1b5cad9286ef 100644
--- a/svx/source/tbxctrls/fontworkgallery.cxx
+++ b/svx/source/tbxctrls/fontworkgallery.cxx
@@ -114,6 +114,8 @@ void FontWorkGalleryDialog::initFavorites(sal_uInt16 nThemeId)
sal_uInt32 nModelPos;
FmFormModel *pModel = NULL;
+ const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
+
for( nModelPos = 0; nModelPos < nFavCount; nModelPos++ )
{
BitmapEx aThumb;
@@ -122,17 +124,27 @@ void FontWorkGalleryDialog::initFavorites(sal_uInt16 nThemeId)
if(!!aThumb)
{
- static const sal_uInt32 nLen(8);
- static const Color aW(COL_WHITE);
- static const Color aG(0xef, 0xef, 0xef);
VirtualDevice aVDev;
const Point aNull(0, 0);
const Size aSize(aThumb.GetSizePixel());
aVDev.SetOutputSizePixel(aSize);
- aVDev.DrawCheckered(aNull, aSize, nLen, aW, aG);
- aVDev.DrawBitmapEx(aNull, aThumb);
+ if(rStyleSettings.GetUIPreviewUsesCheckeredBackground())
+ {
+ static const sal_uInt32 nLen(8);
+ static const Color aW(COL_WHITE);
+ static const Color aG(0xef, 0xef, 0xef);
+
+ aVDev.DrawCheckered(aNull, aSize, nLen, aW, aG);
+ }
+ else
+ {
+ aVDev.SetBackground(rStyleSettings.GetFieldColor());
+ aVDev.Erase();
+ }
+
+ aVDev.DrawBitmapEx(aNull, aThumb);
maFavoritesHorizontal.push_back(aVDev.GetBitmap(aNull, aSize));
}
}