diff options
author | Armin Le Grand <alg@apache.org> | 2012-10-19 15:27:03 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-06-10 11:26:29 +0100 |
commit | e86a67313e0fbd3c263497684c8d98f1a00d32e7 (patch) | |
tree | eff7c582f05e035d00e3da36ecb8930a90295267 | |
parent | 6858934fadcbe825ef59a3c7da4f82879163382b (diff) |
Resolves: #i121224# Corrected to use the ApplicationDocumentColor...
instead of the ApplicationBackgroundColor
(cherry picked from commit 8d005e90cfee08663c02db2e75130b68bf143a93)
Conflicts:
sd/source/ui/tools/PreviewRenderer.cxx
Change-Id: I5bb3d40724dbcca189fac8c9ba29b684b0b9ec67
-rw-r--r-- | sd/source/ui/tools/PreviewRenderer.cxx | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/sd/source/ui/tools/PreviewRenderer.cxx b/sd/source/ui/tools/PreviewRenderer.cxx index 9a355aa148e2..64b17f0ab7a1 100644 --- a/sd/source/ui/tools/PreviewRenderer.cxx +++ b/sd/source/ui/tools/PreviewRenderer.cxx @@ -274,16 +274,28 @@ bool PreviewRenderer::Initialize ( if (pPageView == NULL) return false; - // Set background color of page view and outliner. - svtools::ColorConfig aColorConfig; - const Color aPageBackgroundColor(pPage->GetPageBackgroundColor(pPageView)); - pPageView->SetApplicationBackgroundColor(aPageBackgroundColor); - SdrOutliner& rOutliner (pDocument->GetDrawOutliner(NULL)); - rOutliner.SetBackgroundColor(aPageBackgroundColor); + // #i121224# No need to set SetApplicationBackgroundColor (which is the color + // of the area 'behind' the page (formally called 'Wiese') since the page previews + // produced exactly cover the page's area, so it would never be visible. What + // needs to be set is the ApplicationDocumentColor which is derived from + // svtools::DOCCOLOR normally + Color aApplicationDocumentColor; + + if (pPageView->GetApplicationDocumentColor() == COL_AUTO) + { + svtools::ColorConfig aColorConfig; + aApplicationDocumentColor = aColorConfig.GetColorValue( svtools::DOCCOLOR ).nColor; + } + else + { + aApplicationDocumentColor = pPageView->GetApplicationDocumentColor(); + } + + pPageView->SetApplicationDocumentColor(aApplicationDocumentColor); + SdrOutliner& rOutliner(pDocument->GetDrawOutliner(NULL)); + rOutliner.SetBackgroundColor(aApplicationDocumentColor); rOutliner.SetDefaultLanguage(pDocument->GetLanguage(EE_CHAR_LANGUAGE)); - mpView->SetApplicationBackgroundColor( - Color(aColorConfig.GetColorValue(svtools::APPBACKGROUND).nColor)); - mpPreviewDevice->SetBackground(Wallpaper(aPageBackgroundColor)); + mpPreviewDevice->SetBackground(Wallpaper(aApplicationDocumentColor)); mpPreviewDevice->Erase(); return true; |