summaryrefslogtreecommitdiff
path: root/svx/source/gallery2
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/gallery2
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/gallery2')
-rw-r--r--svx/source/gallery2/galctrl.cxx27
1 files changed, 19 insertions, 8 deletions
diff --git a/svx/source/gallery2/galctrl.cxx b/svx/source/gallery2/galctrl.cxx
index 12980888bbfd..3e154f480f95 100644
--- a/svx/source/gallery2/galctrl.cxx
+++ b/svx/source/gallery2/galctrl.cxx
@@ -258,14 +258,25 @@ void GalleryPreview::PreviewMedia( const INetURLObject& rURL )
}
}
-void drawCheckered(OutputDevice& rOut, const Point& rPos, const Size& rSize)
+void drawTransparenceBackground(OutputDevice& rOut, const Point& rPos, const Size& rSize)
{
- // draw checkered background
- static const sal_uInt32 nLen(8);
- static const Color aW(COL_WHITE);
- static const Color aG(0xef, 0xef, 0xef);
+ const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
- rOut.DrawCheckered(rPos, rSize, nLen, aW, aG);
+ if(rStyleSettings.GetUIPreviewUsesCheckeredBackground())
+ {
+ // draw checkered background
+ static const sal_uInt32 nLen(8);
+ static const Color aW(COL_WHITE);
+ static const Color aG(0xef, 0xef, 0xef);
+
+ rOut.DrawCheckered(rPos, rSize, nLen, aW, aG);
+ }
+ else
+ {
+ rOut.SetLineColor();
+ rOut.SetFillColor(rStyleSettings.GetFieldColor());
+ rOut.DrawRect(Rectangle(rPos, rSize));
+ }
}
DBG_NAME(GalleryIconView)
@@ -381,7 +392,7 @@ void GalleryIconView::UserDraw( const UserDrawEvent& rUDEvt )
if(bTransparent)
{
// draw checkered background for full rectangle.
- drawCheckered(*pDev, rRect.TopLeft(), rRect.GetSize());
+ drawTransparenceBackground(*pDev, rRect.TopLeft(), rRect.GetSize());
}
aGraphic.Draw( pDev, aPos, aSize );
@@ -599,7 +610,7 @@ void GalleryListView::PaintField( OutputDevice& rDev, const Rectangle& rRect, sa
if(bTransparent)
{
// draw checkered background
- drawCheckered(rDev, aPos, aSize);
+ drawTransparenceBackground(rDev, aPos, aSize);
}
aGrfObj.Draw( &rDev, aPos, aSize );