Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Hi,

MAB: https://bugs.freedesktop.org/show_bug.cgi?id=32181

I've created a (rather idiotic) patch, that fixes that bug, but I have no clue what is going on %-) so it can cause some awful side-effects.

There was commit
http://cgit.freedesktop.org/libreoffice/core/commit/?id=6425c2884d6013a41adbd76728e15832af7a3220
which did besides:

@@ -496,7 +510,13 @@ void SwTxtPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
         if( pPor->IsArrowPortion() && GetInfo().OnWin() && !pArrow )
             pArrow = (SwArrowPortion*)pPor;

-        pPor = !bDrawInWindow && GetInfo().X() > nMaxRight ? 0 : pNext;
+        pPor = bDrawInWindow || GetInfo().X() <= nMaxRight ||
+               // --> FME 2004-06-24 #i16816# tagged pdf support
+               ( GetInfo().GetVsh()->GetViewOptions()->IsPDFExport() &&
+                 pNext && pNext->IsHolePortion() ) ?
+               // <--
+               pNext :
+               0;
     }

so on pdfexport we are taking next portion if it is a hole portion regardless of its position. What is this: "a hole portion"?
I am thinking: maybe the proper fix is to negate that condition:

  !pNext->IsHolePortion()

(it solves the problem as well)

Thanks,
Ivan
From ffe808477ea3302f62c9f2c6fe2db9eaeac637b6 Mon Sep 17 00:00:00 2001
From: Ivan Timofeev <timofeev.i.s@gmail.com>
Date: Fri, 15 Jun 2012 16:02:25 +0400
Subject: [PATCH] fdo#32181: don't exceed margins on pdfexport

(regression from 6425c2884d6013a41adbd76728e15832af7a3220)

Change-Id: Ia54b82e3b781704c84b1e648e980960042cd69ba
---
 sw/source/core/text/itrpaint.cxx |    8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/sw/source/core/text/itrpaint.cxx b/sw/source/core/text/itrpaint.cxx
index dabb7b5..6357429 100644
--- a/sw/source/core/text/itrpaint.cxx
+++ b/sw/source/core/text/itrpaint.cxx
@@ -419,13 +419,7 @@ void SwTxtPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
         if( pPor->IsArrowPortion() && GetInfo().OnWin() && !pArrow )
             pArrow = (SwArrowPortion*)pPor;
 
-        pPor = bDrawInWindow || GetInfo().X() <= nMaxRight ||
-               // #i16816# tagged pdf support
-               ( GetInfo().GetVsh() &&
-                 GetInfo().GetVsh()->GetViewOptions()->IsPDFExport() &&
-                 pNext && pNext->IsHolePortion() ) ?
-               pNext :
-               0;
+        pPor = bDrawInWindow || GetInfo().X() <= nMaxRight ? pNext : 0;
     }
 
     // delete underline font
-- 
1.7.10


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.