diff options
author | Herbert Dürr <hdu@apache.org> | 2013-01-03 15:04:38 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-02-23 14:28:04 +0000 |
commit | 90a83191a4be799e0ebe35ec9f3352f399c1d7cd (patch) | |
tree | 521538e8531a50efa774f66980a93bb47be8c883 /sw | |
parent | f0ea8c6ba5d2e33341bad9cb49b58ccf9eee92c2 (diff) |
Resolves: #i68503# a SwHolePortion must not be decorated
(cherry picked from commit a69be8d24830305e8d7301fc4646fd803945eaba)
Conflicts:
sw/source/core/text/portxt.cxx
Change-Id: I247ac6d623b47d08ac9e2e5f107520241d19af8f
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/text/portxt.cxx | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx index 8dee6f796e9d..d6a01f20eb73 100644 --- a/sw/source/core/text/portxt.cxx +++ b/sw/source/core/text/portxt.cxx @@ -717,13 +717,33 @@ SwLinePortion *SwHolePortion::Compress() { return this; } void SwHolePortion::Paint( const SwTxtPaintInfo &rInf ) const { - // #i16816# tagged pdf support - if( rInf.GetVsh() && rInf.GetVsh()->GetViewOptions()->IsPDFExport() && - SwTaggedPDFHelper::IsExportTaggedPDF( *rInf.GetOut()) ) + if( !rInf.GetOut() ) + return; + + // #i16816# export stuff only needed for tagged pdf support + if (!SwTaggedPDFHelper::IsExportTaggedPDF( *rInf.GetOut()) ) + return; + + // #i68503# the hole must have no decoration for a consistent visual appearance + const SwFont* pOrigFont = rInf.GetFont(); + SwFont* pHoleFont = NULL; + SwFontSave* pFontSave = NULL; + if( pOrigFont->GetUnderline() != UNDERLINE_NONE + || pOrigFont->GetOverline() != UNDERLINE_NONE + || pOrigFont->GetStrikeout() != STRIKEOUT_NONE ) { - const OUString aTxt( ' ' ); - rInf.DrawText( aTxt, *this, 0, 1, false ); + pHoleFont = new SwFont( *pOrigFont ); + pHoleFont->SetUnderline( UNDERLINE_NONE ); + pHoleFont->SetOverline( UNDERLINE_NONE ); + pHoleFont->SetStrikeout( STRIKEOUT_NONE ); + pFontSave = new SwFontSave( rInf, pHoleFont ); } + + const OUString aTxt( ' ' ); + rInf.DrawText( aTxt, *this, 0, 1, false ); + + delete pFontSave; + delete pHoleFont; } /************************************************************************* |