diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2004-10-13 07:47:25 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2004-10-13 07:47:25 +0000 |
commit | c5fe5afdaf3e05931a83f1bf631f15945c6e8a48 (patch) | |
tree | 6c80808af46f80927a7f0cff805e4fc5700c46f3 | |
parent | 4214ed2be88cde00a5ba62bde5946b67e5273fc9 (diff) |
INTEGRATION: CWS vcl27 (1.17.432); FILE MERGED
2004/09/15 11:53:48 hdu 1.17.432.1: #110416# fix conversion to polygon for rotated text
-rw-r--r-- | svx/source/svdraw/svdtxhdl.cxx | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/svx/source/svdraw/svdtxhdl.cxx b/svx/source/svdraw/svdtxhdl.cxx index 6d0b5ccead00..53f03f51145f 100644 --- a/svx/source/svdraw/svdtxhdl.cxx +++ b/svx/source/svdraw/svdtxhdl.cxx @@ -2,9 +2,9 @@ * * $RCSfile: svdtxhdl.cxx,v $ * - * $Revision: 1.17 $ + * $Revision: 1.18 $ * - * last change: $Author: rt $ $Date: 2003-11-24 17:01:41 $ + * last change: $Author: hr $ $Date: 2004-10-13 08:47:25 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -484,25 +484,19 @@ IMPL_LINK(ImpTextPortionHandler,ConvertHdl,DrawPortionInfo*,pInfo) FontMetric aFontMetric(aVDev.GetFontMetric()); sal_Int32 nLineLen(0L); - if(!nHochTief) - { - // Normalstellung - aVDev.SetFont(pInfo->rFont); - } - else + Font aFont( pInfo->rFont ); + + if( nHochTief) { - // Fuer Hoch-Tiefstellung den Font verkleinern + // shrink the font for sub-/superscripting long nPercent(pInfo->rFont.GetPropr()); if(nPercent != 100) { - Font aFont(pInfo->rFont); Size aSize(aFont.GetSize()); - aSize.Height() = (aSize.Height() * nPercent +50) / 100; aSize.Width() = (aSize.Width() * nPercent +50) / 100; aFont.SetSize(aSize); - aVDev.SetFont(aFont); } sal_Bool bNeg(nHochTief < 0); @@ -516,6 +510,9 @@ IMPL_LINK(ImpTextPortionHandler,ConvertHdl,DrawPortionInfo*,pInfo) nHochTief = -nHochTief; } +aFont.SetOrientation( 0 ); +aVDev.SetFont( aFont ); + if(bIsVertical) // #83068# aPos.X() += aFontMetric.GetAscent() + nHochTief; @@ -539,7 +536,6 @@ IMPL_LINK(ImpTextPortionHandler,ConvertHdl,DrawPortionInfo*,pInfo) // #100318# convert in a single step // #101499# Use GetTextOutlines and a PolyPolyVector now PolyPolyVector aPolyPolyVector; - if(aVDev.GetTextOutlines(aPolyPolyVector, pInfo->rText, pInfo->nTextStart, pInfo->nTextStart, pInfo->nTextLen) && aPolyPolyVector.size()) { @@ -553,8 +549,8 @@ IMPL_LINK(ImpTextPortionHandler,ConvertHdl,DrawPortionInfo*,pInfo) XPolyPolygon aXPP(aPolyPoly); // rotate 270 degree if vertical since result is unrotated - if(bIsVertical) - aXPP.Rotate(Point(), 2700); + if( pInfo->rFont.GetOrientation() ) + aXPP.Rotate( Point(), pInfo->rFont.GetOrientation() ); // result is baseline oriented, thus move one line height, too if(bIsVertical) |