summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@suse.com>2011-10-05 17:09:38 -0400
committerKohei Yoshida <kohei.yoshida@suse.com>2011-10-05 17:12:41 -0400
commitf82ee563747745018c82e79536421c05d171030a (patch)
treec6cc962daaf119f2beeb0b1ac195ba00d8ce59f9 /sc
parentdbf650a31da1ded5bd50e66a39fcf63ade943697 (diff)
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.
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/document.hxx2
-rw-r--r--sc/source/core/data/documen8.cxx5
-rw-r--r--sc/source/ui/view/printfun.cxx10
3 files changed, 8 insertions, 9 deletions
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 0d1e13de9363..5648a54a4786 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 c799ee04d2fc..5f0ca06c83af 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 43d6a5d481b2..7c07e11c714f 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 );