sc/source/ui/inc/datatableview.hxx | 2 -- sc/source/ui/miscdlgs/datatableview.cxx | 12 +++++++----- 2 files changed, 7 insertions(+), 7 deletions(-)
New commits: commit 488b69db9844e40fb432b847a271a92fd9e7414a Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Fri Aug 5 15:35:51 2022 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Sat Aug 6 13:09:29 2022 +0200 ScDataTableView has visible grid in the rectangle at the scrollbar junction so over paint it with the face color, and replace the unusual use of ScrollBarBox as painter for topleft corner with same Change-Id: I922541122d725a2feeee0db6a1078b953da3156d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137878 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sc/source/ui/inc/datatableview.hxx b/sc/source/ui/inc/datatableview.hxx index fa7be381d3c9..2635c7952a9e 100644 --- a/sc/source/ui/inc/datatableview.hxx +++ b/sc/source/ui/inc/datatableview.hxx @@ -22,7 +22,6 @@ #include <com/sun/star/awt/XWindow.hpp> #include <svtools/scrolladaptor.hxx> #include <vcl/ctrl.hxx> -#include <vcl/scrbar.hxx> #include <types.hxx> #include "hdrcont.hxx" @@ -77,7 +76,6 @@ class ScDataTableView : public Control { std::shared_ptr<ScDocument> mpDoc; std::unique_ptr<SelectionEngine> mpSelectionEngine; - VclPtr<ScrollBarBox> mpTopLeft; VclPtr<ScDataTableColView> mpColView; VclPtr<ScDataTableRowView> mpRowView; VclPtr<ScrollAdaptor> mpVScroll; diff --git a/sc/source/ui/miscdlgs/datatableview.cxx b/sc/source/ui/miscdlgs/datatableview.cxx index 70fe3dde756e..41db482eaf05 100644 --- a/sc/source/ui/miscdlgs/datatableview.cxx +++ b/sc/source/ui/miscdlgs/datatableview.cxx @@ -132,7 +132,6 @@ ScDataTableView::ScDataTableView(const css::uno::Reference<css::awt::XWindow> &r Control(VCLUnoHelper::GetWindow(rParent)), mpDoc(std::move(pDoc)), mpSelectionEngine(new SelectionEngine(this)), - mpTopLeft(VclPtr<ScrollBarBox>::Create(this, WB_SIZEABLE)), mpColView(VclPtr<ScDataTableColView>::Create(this, mpDoc.get(), mpSelectionEngine.get())), mpRowView(VclPtr<ScDataTableRowView>::Create(this, mpDoc.get(), mpSelectionEngine.get())), mpVScroll(VclPtr<ScrollAdaptor>::Create(this, false)), @@ -141,7 +140,6 @@ ScDataTableView::ScDataTableView(const css::uno::Reference<css::awt::XWindow> &r mnFirstVisibleRow(0), mnFirstVisibleCol(0) { - mpTopLeft->setPosSizePixel(0, 0, nRowHeaderWidth, nColHeaderHeight); mpColView->setPosSizePixel(nRowHeaderWidth, 0, nRowHeaderWidth, nColHeaderHeight); mpRowView->setPosSizePixel(0, nColHeaderHeight, nRowHeaderWidth, nColHeaderHeight); @@ -153,7 +151,6 @@ ScDataTableView::ScDataTableView(const css::uno::Reference<css::awt::XWindow> &r mpHScroll->SetRangeMax(50); mpHScroll->SetScrollHdl(LINK(this, ScDataTableView, HorzScrollHdl)); - mpTopLeft->Show(); mpColView->Show(); mpRowView->Show(); mpVScroll->Show(); @@ -167,7 +164,6 @@ ScDataTableView::~ScDataTableView() void ScDataTableView::dispose() { - mpTopLeft.disposeAndClear(); mpColView.disposeAndClear(); mpRowView.disposeAndClear(); mpVScroll.disposeAndClear(); @@ -249,7 +245,6 @@ void ScDataTableView::MouseButtonUp(const MouseEvent& rMEvt) void ScDataTableView::Resize() { Size aSize = GetSizePixel(); - mpTopLeft->setPosSizePixel(0, 0, nRowHeaderWidth, nColHeaderHeight); mpColView->setPosSizePixel(nRowHeaderWidth, 0, aSize.Width() - mnScrollBarSize, nColHeaderHeight); mpRowView->setPosSizePixel(0, nColHeaderHeight, nRowHeaderWidth, aSize.Height()); @@ -274,6 +269,13 @@ void ScDataTableView::Paint(vcl::RenderContext& rRenderContext, const tools::Rec aOutput.DrawDocumentBackground(); aOutput.DrawGrid(rRenderContext, true, false); aOutput.DrawStrings(); + + Color aFaceColor(rRenderContext.GetSettings().GetStyleSettings().GetFaceColor()); + rRenderContext.SetLineColor(aFaceColor); + rRenderContext.SetFillColor(aFaceColor); + rRenderContext.DrawRect(tools::Rectangle(Point(0, 0), Size(nRowHeaderWidth, nColHeaderHeight))); + rRenderContext.DrawRect(tools::Rectangle(Point(aSize.Width() - mnScrollBarSize, aSize.Height() - mnScrollBarSize), Size(mnScrollBarSize, mnScrollBarSize))); + Control::Paint(rRenderContext, rRectangle); }