[Libreoffice-commits] core.git: sw/source

Caolán McNamara caolanm at redhat.com
Fri Nov 1 16:06:18 CET 2013


 sw/source/core/text/inftxt.cxx |   13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

New commits:
commit 55369420bd488411dd5428a66f4ad70c2ef9b007
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Nov 1 15:05:15 2013 +0000

    stop unbalanced OutputDevice Push/Pop warnings on closing help
    
    where it takes the early GetBackColor return after Push but before Pop
    
    Change-Id: I5fac78b7270c8561cb8e7d26bd2bff44628c8547

diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index 7ee6c80..1ff5a9c 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -1182,17 +1182,22 @@ void SwTxtPaintInfo::DrawBackBrush( const SwLinePortion &rPor ) const
         // #i16816# tagged pdf support
         SwTaggedPDFHelper aTaggedPDFHelper( 0, 0, 0, *pTmpOut );
 
-        pTmpOut->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
+        Color aFillColor;
 
         if( m_pFnt->GetHighlightColor() != COL_TRANSPARENT )
         {
-            pTmpOut->SetFillColor( m_pFnt->GetHighlightColor() );
+            aFillColor = m_pFnt->GetHighlightColor();
         }
         else
         {
-            if( !m_pFnt->GetBackColor() ) return;
-            pTmpOut->SetFillColor( *m_pFnt->GetBackColor() );
+            if( !m_pFnt->GetBackColor() )
+                return;
+            aFillColor = *m_pFnt->GetBackColor();
         }
+
+        pTmpOut->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
+
+        pTmpOut->SetFillColor(aFillColor);
         pTmpOut->SetLineColor();
 
         DrawRect( aIntersect, sal_True, sal_False );


More information about the Libreoffice-commits mailing list