diff options
author | Armin Le Grand <alg@apache.org> | 2013-05-07 09:37:01 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-06-18 16:46:39 +0100 |
commit | 60446a0386b6d40899f6817c9545414841ee3522 (patch) | |
tree | 252dfdcd5abf55c39d160d801803ab2ddc0ec0c4 /svx | |
parent | 72703332ff42a70d19050d78a63286b9a9b6f930 (diff) |
Related: #i122120# corrected flag for drawing checkerboards...
adapted previews, added to configuration
(cherry picked from commit c17e634e125f524d153e1ad8febff6d11b810ee4)
Conflicts:
officecfg/registry/schema/org/openoffice/Office/Common.xcs
svtools/inc/svtools/accessibilityoptions.hxx
svtools/source/inc/configitems/accessibilityoptions_const.hxx
vcl/inc/vcl/settings.hxx
Change-Id: I3f4fd9525e31cd816599b963ecd2fa42b1f666d7
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/dialog/dlgctrl.cxx | 21 | ||||
-rw-r--r-- | svx/source/gallery2/galctrl.cxx | 2 | ||||
-rw-r--r-- | svx/source/tbxctrls/fontworkgallery.cxx | 2 | ||||
-rw-r--r-- | svx/source/xoutdev/xtabdash.cxx | 2 | ||||
-rw-r--r-- | svx/source/xoutdev/xtabhtch.cxx | 2 | ||||
-rw-r--r-- | svx/source/xoutdev/xtablend.cxx | 2 |
6 files changed, 24 insertions, 7 deletions
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx index 18d5671b37f3..9dc7bb875991 100644 --- a/svx/source/dialog/dlgctrl.cxx +++ b/svx/source/dialog/dlgctrl.cxx @@ -1209,7 +1209,7 @@ namespace { const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); - if(rStyleSettings.GetUIPreviewUsesCheckeredBackground()) + if(rStyleSettings.GetPreviewUsesCheckeredBackground()) { const Point aNull(0, 0); static const sal_uInt32 nLen(8); @@ -1635,7 +1635,24 @@ void SvxPreviewBase::LocalPrePaint() mpBufferDevice->SetMapMode(GetMapMode()); } - mpBufferDevice->Erase(); + const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); + + if(rStyleSettings.GetPreviewUsesCheckeredBackground()) + { + const Point aNull(0, 0); + static const sal_uInt32 nLen(8); + static const Color aW(COL_WHITE); + static const Color aG(0xef, 0xef, 0xef); + const bool bWasEnabled(mpBufferDevice->IsMapModeEnabled()); + + mpBufferDevice->EnableMapMode(false); + mpBufferDevice->DrawCheckered(aNull, mpBufferDevice->GetOutputSizePixel(), nLen, aW, aG); + mpBufferDevice->EnableMapMode(bWasEnabled); + } + else + { + mpBufferDevice->Erase(); + } } void SvxPreviewBase::LocalPostPaint() diff --git a/svx/source/gallery2/galctrl.cxx b/svx/source/gallery2/galctrl.cxx index 3e154f480f95..2aacbaab4539 100644 --- a/svx/source/gallery2/galctrl.cxx +++ b/svx/source/gallery2/galctrl.cxx @@ -262,7 +262,7 @@ void drawTransparenceBackground(OutputDevice& rOut, const Point& rPos, const Siz { const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); - if(rStyleSettings.GetUIPreviewUsesCheckeredBackground()) + if(rStyleSettings.GetPreviewUsesCheckeredBackground()) { // draw checkered background static const sal_uInt32 nLen(8); diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx index 1b5cad9286ef..d1f410404ccc 100644 --- a/svx/source/tbxctrls/fontworkgallery.cxx +++ b/svx/source/tbxctrls/fontworkgallery.cxx @@ -130,7 +130,7 @@ void FontWorkGalleryDialog::initFavorites(sal_uInt16 nThemeId) aVDev.SetOutputSizePixel(aSize); - if(rStyleSettings.GetUIPreviewUsesCheckeredBackground()) + if(rStyleSettings.GetPreviewUsesCheckeredBackground()) { static const sal_uInt32 nLen(8); static const Color aW(COL_WHITE); diff --git a/svx/source/xoutdev/xtabdash.cxx b/svx/source/xoutdev/xtabdash.cxx index 93ada53f8d76..ea9fb0100e5d 100644 --- a/svx/source/xoutdev/xtabdash.cxx +++ b/svx/source/xoutdev/xtabdash.cxx @@ -146,7 +146,7 @@ Bitmap XDashList::ImpCreateBitmapForXDash(const XDash* pDash) ? DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT : DRAWMODE_DEFAULT); - if(rStyleSettings.GetUIPreviewUsesCheckeredBackground()) + if(rStyleSettings.GetPreviewUsesCheckeredBackground()) { const Point aNull(0, 0); static const sal_uInt32 nLen(8 * nFactor); diff --git a/svx/source/xoutdev/xtabhtch.cxx b/svx/source/xoutdev/xtabhtch.cxx index 8235cabe0ce7..2a1edd15dc1f 100644 --- a/svx/source/xoutdev/xtabhtch.cxx +++ b/svx/source/xoutdev/xtabhtch.cxx @@ -150,7 +150,7 @@ Bitmap XHatchList::CreateBitmapForUI( long nIndex ) ? DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT : DRAWMODE_DEFAULT); - if(rStyleSettings.GetUIPreviewUsesCheckeredBackground()) + if(rStyleSettings.GetPreviewUsesCheckeredBackground()) { const Point aNull(0, 0); static const sal_uInt32 nLen(8); diff --git a/svx/source/xoutdev/xtablend.cxx b/svx/source/xoutdev/xtablend.cxx index d5bc78960b5a..1dae9c89c33e 100644 --- a/svx/source/xoutdev/xtablend.cxx +++ b/svx/source/xoutdev/xtablend.cxx @@ -131,7 +131,7 @@ Bitmap XLineEndList::CreateBitmapForUI( long nIndex ) ? DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT : DRAWMODE_DEFAULT); - if(rStyleSettings.GetUIPreviewUsesCheckeredBackground()) + if(rStyleSettings.GetPreviewUsesCheckeredBackground()) { const Point aNull(0, 0); static const sal_uInt32 nLen(8); |