[Libreoffice-commits] .: sc/inc sc/source

Kohei Yoshida kohei at kemper.freedesktop.org
Wed Oct 5 14:12:43 PDT 2011


 sc/inc/document.hxx              |    2 +-
 sc/source/core/data/documen8.cxx |    5 +++++
 sc/source/ui/view/printfun.cxx   |   10 ++--------
 3 files changed, 8 insertions(+), 9 deletions(-)

New commits:
commit f82ee563747745018c82e79536421c05d171030a
Author: Kohei Yoshida <kohei.yoshida at suse.com>
Date:   Wed Oct 5 17:09:38 2011 -0400

    bnc#722045: Display page background color/image properly.
    
    A regression from 3.3.  Calc wouldn't display page background color
    or image in print preview.  This was a side effect of the removal
    of the high-contract mode.
    
    In 3.3, Calc purpusefully wouldn't show background color/image when
    the app is in high contrast mode.  Now that the mode has been removed,
    the code acted as though the high contract mode is always on, which
    caused the background color/image to always be hidden in print preview.

diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 0d1e13d..5648a54 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -696,7 +696,7 @@ public:
 
     SfxBindings*    GetViewBindings();
     SfxObjectShell* GetDocumentShell() const    { return pShell; }
-    ScDrawLayer*    GetDrawLayer()              { return pDrawLayer; }
+    SC_DLLPUBLIC ScDrawLayer* GetDrawLayer();
     SfxBroadcaster* GetDrawBroadcaster();       // to avoid header
     void            BeginDrawUndo();
 
diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx
index c799ee0..5f0ca06 100644
--- a/sc/source/core/data/documen8.cxx
+++ b/sc/source/core/data/documen8.cxx
@@ -1512,6 +1512,11 @@ SfxBindings* ScDocument::GetViewBindings()
         return NULL;
 }
 
+ScDrawLayer* ScDocument::GetDrawLayer()
+{
+    return pDrawLayer;
+}
+
 //------------------------------------------------------------------------
 
 void ScDocument::TransliterateText( const ScMarkData& rMultiMark, sal_Int32 nType )
diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx
index 43d6a5d..7c07e11 100644
--- a/sc/source/ui/view/printfun.cxx
+++ b/sc/source/ui/view/printfun.cxx
@@ -1313,10 +1313,7 @@ void ScPrintFunc::DrawBorder( long nScrX, long nScrY, long nScrW, long nScrH,
     if (nEffHeight<=0 || nEffWidth<=0)
         return;                                         // leer
 
-    //  SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed TRUE)
-    sal_Bool bCellContrast = bUseStyleColor;
-
-    if ( pBackground && !bCellContrast )
+    if ( pBackground )
     {
         if (pBackground->GetGraphicPos() != GPOS_NONE)
         {
@@ -1338,10 +1335,7 @@ void ScPrintFunc::DrawBorder( long nScrX, long nScrY, long nScrW, long nScrH,
 
     if ( pShadow && pShadow->GetLocation() != SVX_SHADOW_NONE )
     {
-        if ( bCellContrast )
-            pDev->SetFillColor( SC_MOD()->GetColorConfig().GetColorValue(svtools::FONTCOLOR).nColor );
-        else
-            pDev->SetFillColor(pShadow->GetColor());
+        pDev->SetFillColor(pShadow->GetColor());
         pDev->SetLineColor();
         long nShadowX = (long) ( pShadow->GetWidth() * nScaleX );
         long nShadowY = (long) ( pShadow->GetWidth() * nScaleY );


More information about the Libreoffice-commits mailing list