summaryrefslogtreecommitdiff
path: root/sw/source/core/text/itrpaint.cxx
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2003-11-25 09:46:19 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2003-11-25 09:46:19 +0000
commit1de9e18ac79d842d0c7645f39cb098d89eafa0e5 (patch)
tree02c3e0fa0209cc330cd3e1678284ad8061eaa1a9 /sw/source/core/text/itrpaint.cxx
parent8ddc7e9150d7732d3d0ba6411fea79902089a43e (diff)
INTEGRATION: CWS os23 (1.35.10); FILE MERGED
2003/11/03 13:56:50 fme 1.35.10.1: #i21910# CheckSpecialUnderline - New criteria for isolated underlining
Diffstat (limited to 'sw/source/core/text/itrpaint.cxx')
-rw-r--r--sw/source/core/text/itrpaint.cxx11
1 files changed, 7 insertions, 4 deletions
diff --git a/sw/source/core/text/itrpaint.cxx b/sw/source/core/text/itrpaint.cxx
index 020bcdf1aa2f..40ac5863896c 100644
--- a/sw/source/core/text/itrpaint.cxx
+++ b/sw/source/core/text/itrpaint.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: itrpaint.cxx,v $
*
- * $Revision: 1.35 $
+ * $Revision: 1.36 $
*
- * last change: $Author: kz $ $Date: 2003-10-15 09:56:25 $
+ * last change: $Author: rt $ $Date: 2003-11-25 10:46:19 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -702,6 +702,7 @@ void SwTxtPainter::CheckSpecialUnderline( const SwLinePortion* pPor,
ULONG nBold = 0;
const ULONG nPorWidth = pPor->Width();
USHORT nMaxBaseLineOfst = 0;
+ USHORT nNumberOfPortions = 0;
while( nTmpIdx <= nUnderEnd && pPor )
{
@@ -717,7 +718,7 @@ void SwTxtPainter::CheckSpecialUnderline( const SwLinePortion* pPor,
SVX_CASEMAP_KAPITAELCHEN == pFnt->GetCaseMap() )
break;
- if ( ! aIter.GetFnt()->GetEscapement() )
+ if ( !aIter.GetFnt()->GetEscapement() )
{
nSumWidth += pPor->Width();
const ULONG nFontHeight = aIter.GetFnt()->GetHeight();
@@ -741,12 +742,14 @@ void SwTxtPainter::CheckSpecialUnderline( const SwLinePortion* pPor,
nBold += pPor->Width();
}
+ ++nNumberOfPortions;
+
nTmpIdx += pPor->GetLen();
pPor = pPor->GetPortion();
}
// resulting height
- if ( nSumWidth && nSumWidth != nPorWidth )
+ if ( nNumberOfPortions > 1 && nSumWidth )
{
const ULONG nNewFontHeight = nAdjustBaseLine ?
nSumHeight :