summaryrefslogtreecommitdiff
path: root/sw/source/uibase/docvw/SidebarTxtControl.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase/docvw/SidebarTxtControl.cxx')
-rw-r--r--sw/source/uibase/docvw/SidebarTxtControl.cxx19
1 files changed, 16 insertions, 3 deletions
diff --git a/sw/source/uibase/docvw/SidebarTxtControl.cxx b/sw/source/uibase/docvw/SidebarTxtControl.cxx
index d864b40114c4..e8d1d28e219c 100644
--- a/sw/source/uibase/docvw/SidebarTxtControl.cxx
+++ b/sw/source/uibase/docvw/SidebarTxtControl.cxx
@@ -53,6 +53,7 @@
#include <shellres.hxx>
#include <SwRewriter.hxx>
#include <memory>
+#include <comphelper/lok.hxx>
namespace sw { namespace sidebarwindows {
@@ -151,25 +152,37 @@ void SidebarTextControl::Draw(OutputDevice* pDev, const Point& rPt, const Size&
}
}
+void SidebarTextControl::PaintTile(vcl::RenderContext& rRenderContext, const Rectangle& rRect)
+{
+ Paint(rRenderContext, rRect);
+}
+
void SidebarTextControl::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect)
{
+ Point aPoint(0, 0);
+ if (comphelper::LibreOfficeKit::isActive())
+ aPoint = rRect.TopLeft();
+
if (!rRenderContext.GetSettings().GetStyleSettings().GetHighContrastMode())
{
if (mrSidebarWin.IsMouseOverSidebarWin() || HasFocus())
{
- rRenderContext.DrawGradient(Rectangle(Point(0,0), rRenderContext.PixelToLogic(GetSizePixel())),
+ rRenderContext.DrawGradient(Rectangle(aPoint, rRenderContext.PixelToLogic(GetSizePixel())),
Gradient(GradientStyle_LINEAR, mrSidebarWin.ColorDark(), mrSidebarWin.ColorDark()));
}
else
{
- rRenderContext.DrawGradient(Rectangle(Point(0,0), rRenderContext.PixelToLogic(GetSizePixel())),
+ rRenderContext.DrawGradient(Rectangle(aPoint, rRenderContext.PixelToLogic(GetSizePixel())),
Gradient(GradientStyle_LINEAR, mrSidebarWin.ColorLight(), mrSidebarWin.ColorDark()));
}
}
if (GetTextView())
{
- GetTextView()->Paint(rRect, &rRenderContext);
+ if (comphelper::LibreOfficeKit::isActive())
+ GetTextView()->GetOutliner()->Draw(&rRenderContext, rRect);
+ else
+ GetTextView()->Paint(rRect, &rRenderContext);
}
if (mrSidebarWin.GetLayoutStatus() == SwPostItHelper::DELETED)