[Libreoffice-commits] .: Branch 'libreoffice-3-5' - svtools/source

Caolán McNamara caolan at kemper.freedesktop.org
Wed Mar 14 09:39:43 PDT 2012


 svtools/source/edit/texteng.cxx |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit ecb7bfea45b2385ae7799ecfe7e77d695b57424a
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Mar 13 10:33:10 2012 +0100

    TextEngine::SeekCursor needs to call SetFont after all
    
    10f28d5c9a072bf108a79f3b05ad8247ca0dcea5 "callcatcher: build fixes" had removed
    this with the comment "SetFont() doesn't do anything" but that is clearly wrong:
    Without this, e.g. bold text within text fields is not displayed as such (e.g.,
    "File - New - Templates and Documnets - Templates - Presentation Backgrounds -
    Black and White": the captions in the right hand pane ("Title:", "Date:", etc.)
    should be bold).
    
    Signed-off-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/svtools/source/edit/texteng.cxx b/svtools/source/edit/texteng.cxx
index 06062b8..c0a5151 100644
--- a/svtools/source/edit/texteng.cxx
+++ b/svtools/source/edit/texteng.cxx
@@ -1477,7 +1477,11 @@ void TextEngine::SeekCursor( sal_uLong nPara, sal_uInt16 nPos, Font& rFont, Outp
         if ( ( ( pAttrib->GetStart() < nPos ) && ( pAttrib->GetEnd() >= nPos ) )
                     || !pNode->GetText().Len() )
         {
-            if ( pAttrib->Which() == TEXTATTR_FONTCOLOR )
+            if ( pAttrib->Which() != TEXTATTR_FONTCOLOR )
+            {
+                pAttrib->GetAttr().SetFont(rFont);
+            }
+            else
             {
                 if ( pOutDev )
                     pOutDev->SetTextColor( ((TextAttribFontColor&)pAttrib->GetAttr()).GetColor() );


More information about the Libreoffice-commits mailing list