kbrown / rpms / libreoffice

Forked from rpms/libreoffice 2 years ago
Clone

Blame SOURCES/0285-sc-lok-annotations-paint-range-and-anchor-overlay.patch

f325b2
From 6c76b4b478428d2326ea672d1bd87d1fa9654797 Mon Sep 17 00:00:00 2001
f325b2
From: Miklos Vajna <vmiklos@collabora.co.uk>
f325b2
Date: Fri, 6 Nov 2015 17:12:46 +0100
f325b2
Subject: [PATCH 285/398] sc lok annotations: paint range and anchor overlay
f325b2
f325b2
Change-Id: I16e51e074704026a45471e7a08c3b96846d44053
f325b2
(cherry picked from commit 5f68759810496ff3fadf5a883203449772c7392f)
f325b2
---
f325b2
 sw/source/uibase/docvw/SidebarWin.cxx | 15 +++++++++++++++
f325b2
 1 file changed, 15 insertions(+)
f325b2
f325b2
diff --git a/sw/source/uibase/docvw/SidebarWin.cxx b/sw/source/uibase/docvw/SidebarWin.cxx
f325b2
index 038bdb243e65..e3e238715365 100644
f325b2
--- a/sw/source/uibase/docvw/SidebarWin.cxx
f325b2
+++ b/sw/source/uibase/docvw/SidebarWin.cxx
f325b2
@@ -263,6 +263,21 @@ void SwSidebarWin::PaintTile(vcl::RenderContext& rRenderContext, const Rectangle
f325b2
 
f325b2
         rRenderContext.Pop();
f325b2
     }
f325b2
+
f325b2
+    const drawinglayer::geometry::ViewInformation2D aViewInformation;
f325b2
+    std::unique_ptr<drawinglayer::processor2d::BaseProcessor2D> pProcessor(drawinglayer::processor2d::createBaseProcessor2DFromOutputDevice(rRenderContext, aViewInformation));
f325b2
+
f325b2
+    // drawinglayer sets the map mode to pixels, not needed here.
f325b2
+    rRenderContext.Pop();
f325b2
+    // Work in document-global twips.
f325b2
+    rRenderContext.Pop();
f325b2
+    if (mpAnchor)
f325b2
+        pProcessor->process(mpAnchor->getOverlayObjectPrimitive2DSequence());
f325b2
+    if (mpTextRangeOverlay)
f325b2
+        pProcessor->process(mpTextRangeOverlay->getOverlayObjectPrimitive2DSequence());
f325b2
+    rRenderContext.Push(PushFlags::NONE);
f325b2
+    pProcessor.reset();
f325b2
+    rRenderContext.Push(PushFlags::NONE);
f325b2
 }
f325b2
 
f325b2
 void SwSidebarWin::Draw(OutputDevice* pDev, const Point& rPt, const Size& rSz, sal_uLong nInFlags)
f325b2
-- 
f325b2
2.12.0
f325b2