incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1400156 - /incubator/ooo/trunk/main/sd/source/ui/tools/PreviewRenderer.cxx
Date Fri, 19 Oct 2012 16:27:04 GMT
Author: alg
Date: Fri Oct 19 16:27:03 2012
New Revision: 1400156

URL: http://svn.apache.org/viewvc?rev=1400156&view=rev
Log:
#121224# Corrected to use the ApplicationDocumentColor instead of the ApplicationBackgroundColor

Modified:
    incubator/ooo/trunk/main/sd/source/ui/tools/PreviewRenderer.cxx

Modified: incubator/ooo/trunk/main/sd/source/ui/tools/PreviewRenderer.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sd/source/ui/tools/PreviewRenderer.cxx?rev=1400156&r1=1400155&r2=1400156&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sd/source/ui/tools/PreviewRenderer.cxx (original)
+++ incubator/ooo/trunk/main/sd/source/ui/tools/PreviewRenderer.cxx Fri Oct 19 16:27:03 2012
@@ -283,16 +283,30 @@ bool PreviewRenderer::Initialize (
         SdrPageView* pPageView = mpView->GetSdrPageView();
         if (pPageView == NULL)
             break;
-        // Set background color of page view and outliner.
+
+        // #121224# 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
         svtools::ColorConfig aColorConfig;
-        const Color aPageBackgroundColor(pPage->GetPageBackgroundColor(pPageView));
-        pPageView->SetApplicationBackgroundColor(aPageBackgroundColor);
-        SdrOutliner& rOutliner (pDocument->GetDrawOutliner(NULL));
-        rOutliner.SetBackgroundColor(aPageBackgroundColor);
+        Color aApplicationDocumentColor;
+
+        if(!pPageView || 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();
 
         bSuccess = true;



Mime
View raw message