summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/core/data/dpobject.cxx2
-rw-r--r--sc/source/core/data/dpoutput.cxx2
-rw-r--r--sc/source/ui/cctrl/dpcontrol.cxx31
-rw-r--r--sc/source/ui/inc/dpcontrol.hxx3
-rw-r--r--sc/source/ui/view/gridwin4.cxx2
5 files changed, 7 insertions, 33 deletions
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index 2175d09277da..8db3c16abf8b 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -637,7 +637,7 @@ void ScDPObject::Output( const ScAddress& rPos )
// clear old output area
pDoc->DeleteAreaTab( aOutRange.aStart.Col(), aOutRange.aStart.Row(),
aOutRange.aEnd.Col(), aOutRange.aEnd.Row(),
- aOutRange.aStart.Tab(), IDF_CONTENTS | IDF_OBJECTS );
+ aOutRange.aStart.Tab(), IDF_ALL );
pDoc->RemoveFlagsTab( aOutRange.aStart.Col(), aOutRange.aStart.Row(),
aOutRange.aEnd.Col(), aOutRange.aEnd.Row(),
aOutRange.aStart.Tab(), SC_MF_AUTO );
diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx
index e625e90085f8..2b86a698c846 100644
--- a/sc/source/core/data/dpoutput.cxx
+++ b/sc/source/core/data/dpoutput.cxx
@@ -972,7 +972,7 @@ void ScDPOutput::Output()
// clear whole (new) output area
//! when modifying table, clear old area
//! include IDF_OBJECTS ???
- pDoc->DeleteAreaTab( aStartPos.Col(), aStartPos.Row(), nTabEndCol, nTabEndRow, nTab, IDF_CONTENTS | IDF_OBJECTS);
+ pDoc->DeleteAreaTab( aStartPos.Col(), aStartPos.Row(), nTabEndCol, nTabEndRow, nTab, IDF_ALL );
if ( bDoFilter )
lcl_DoFilterButton( pDoc, aStartPos.Col(), aStartPos.Row(), nTab );
diff --git a/sc/source/ui/cctrl/dpcontrol.cxx b/sc/source/ui/cctrl/dpcontrol.cxx
index 1b18ed64c90a..5b430f87ebb1 100644
--- a/sc/source/ui/cctrl/dpcontrol.cxx
+++ b/sc/source/ui/cctrl/dpcontrol.cxx
@@ -38,8 +38,6 @@
#include "document.hxx"
#include "docpool.hxx"
#include "patattr.hxx"
-#include <editeng/brshitem.hxx>
-#include <editeng/colritem.hxx>
using rtl::OUString;
@@ -47,7 +45,6 @@ ScDPFieldButton::ScDPFieldButton(OutputDevice* pOutDev, const StyleSettings* pSt
mpDoc(pDoc),
mpOutDev(pOutDev),
mpStyle(pStyle),
- mpPattern(NULL),
mbBaseButton(true),
mbPopupButton(false),
mbHasHiddenMember(false),
@@ -120,15 +117,8 @@ void ScDPFieldButton::draw()
{
// Background
Rectangle aRect(maPos, maSize);
- Color aBackCol = mpStyle->GetFaceColor();
- if ( mpPattern )
- {
- const SvxBrushItem& rBrushItem = (const SvxBrushItem&)mpPattern->GetItemSet().Get( ATTR_BACKGROUND );
- if ( rBrushItem.GetColor() != COL_TRANSPARENT )
- aBackCol = rBrushItem.GetColor();
- }
- mpOutDev->SetFillColor(aBackCol);
- mpOutDev->SetLineColor(aBackCol);
+ mpOutDev->SetLineColor(mpStyle->GetFaceColor());
+ mpOutDev->SetFillColor(mpStyle->GetFaceColor());
mpOutDev->DrawRect(aRect);
// Border lines
@@ -145,27 +135,16 @@ void ScDPFieldButton::draw()
// Field name.
// Get the font and size the same way as in scenario selection (lcl_DrawOneFrame in gridwin4.cxx)
Font aTextFont( mpStyle->GetAppFont() );
- Color aButTextCol = mpStyle->GetButtonTextColor();
if ( mpDoc )
{
+ // use ScPatternAttr::GetFont only for font size
Font aAttrFont;
- if ( mpPattern )
- {
- mpPattern->GetFont( aAttrFont, SC_AUTOCOL_DISPLAY, mpOutDev, &maZoomY );
- const SvxColorItem& rColorItem = (const SvxColorItem&)mpPattern->GetItemSet().Get( ATTR_FONT_COLOR );
- if ( rColorItem.GetValue().GetColor() != COL_TRANSPARENT )
- aButTextCol = rColorItem.GetValue();
- }
- else
- {
- // use ScPatternAttr::GetFont only for font size
- static_cast<const ScPatternAttr&>(mpDoc->GetPool()->GetDefaultItem(ATTR_PATTERN)).
+ static_cast<const ScPatternAttr&>(mpDoc->GetPool()->GetDefaultItem(ATTR_PATTERN)).
GetFont( aAttrFont, SC_AUTOCOL_BLACK, mpOutDev, &maZoomY );
- }
aTextFont.SetSize( aAttrFont.GetSize() );
}
mpOutDev->SetFont(aTextFont);
- mpOutDev->SetTextColor( aButTextCol );
+ mpOutDev->SetTextColor(mpStyle->GetButtonTextColor());
Point aTextPos = maPos;
long nTHeight = mpOutDev->GetTextHeight();
diff --git a/sc/source/ui/inc/dpcontrol.hxx b/sc/source/ui/inc/dpcontrol.hxx
index f033ad0364a4..42d0cf637bd2 100644
--- a/sc/source/ui/inc/dpcontrol.hxx
+++ b/sc/source/ui/inc/dpcontrol.hxx
@@ -42,7 +42,6 @@ class Size;
class StyleSettings;
class Window;
class ScDocument;
-class ScPatternAttr;
/**
* This class takes care of physically drawing field button controls inside
@@ -62,7 +61,6 @@ public:
void setHasHiddenMember(bool b);
void setPopupPressed(bool b);
void setPopupLeft(bool b);
- void setFieldPattern(const ScPatternAttr* pPattern){ mpPattern = pPattern; }
void draw();
void getPopupBoundingBox(Point& rPos, Size& rSize) const;
@@ -79,7 +77,6 @@ private:
ScDocument* mpDoc;
OutputDevice* mpOutDev;
const StyleSettings* mpStyle;
- const ScPatternAttr* mpPattern;
bool mbBaseButton;
bool mbPopupButton;
bool mbHasHiddenMember;
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 65667fd73adf..ff3e67bbc67e 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -1247,8 +1247,6 @@ void ScGridWindow::DrawButtons( SCCOL nX1, SCROW /*nY1*/, SCCOL nX2, SCROW /*nY2
aCellBtn.setDrawBaseButton(true);
aCellBtn.setDrawPopupButton(pInfo->bPopupButton);
aCellBtn.setHasHiddenMember(pInfo->bFilterActive);
-
- aCellBtn.setFieldPattern( pDoc->GetPattern( nCol, nRow, nTab ) );
aCellBtn.draw();
}
}