Resolves: tdf#143487 don't draw a border at all for DrawFrameStyle::NONE

Change-Id: I7794376c9475a32276d23135365c99a3f6fb7d84
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122142
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index d9f479e..4c38928 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -1832,6 +1832,8 @@ VclScrolledWindow::VclScrolledWindow(vcl::Window *pParent)

int VclScrolledWindow::CalcBorderWidth() const
{
    if (m_eDrawFrameStyle == DrawFrameStyle::NONE)
        return 0;
    const tools::Rectangle aRect(tools::Rectangle(Point(0, 0), Size(100, 100)));
    DecorationView aDecoView(const_cast<OutputDevice*>(GetOutDev()));
    // don't actually draw anything, just measure what size it would be and the diff is the desired border size to reserve
@@ -2103,6 +2105,8 @@ bool VclScrolledWindow::EventNotify(NotifyEvent& rNEvt)
void VclScrolledWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect)
{
    VclBin::Paint(rRenderContext, rRect);
    if (m_eDrawFrameStyle == DrawFrameStyle::NONE)
        return;
    const tools::Rectangle aRect(tools::Rectangle(Point(0,0), GetSizePixel()));
    DecorationView aDecoView(&rRenderContext);
    const tools::Rectangle aContentRect = aDecoView.DrawFrame(aRect, m_eDrawFrameStyle, m_eDrawFrameFlags);