summaryrefslogtreecommitdiff
path: root/svx/source/svdraw/svdotextdecomposition.cxx
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2008-10-17 08:40:10 +0000
committerOliver Bolte <obo@openoffice.org>2008-10-17 08:40:10 +0000
commita8ac4bc4145e7e558153b58c87b2def339aebe36 (patch)
treed1f5da0a1b702f12725b2b82117b7ff49872bb21 /svx/source/svdraw/svdotextdecomposition.cxx
parentae562e931a98e708a75e8d140cf1ff24854acfc7 (diff)
CWS-TOOLING: integrate CWS aw057
Diffstat (limited to 'svx/source/svdraw/svdotextdecomposition.cxx')
-rw-r--r--svx/source/svdraw/svdotextdecomposition.cxx16
1 files changed, 11 insertions, 5 deletions
diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx
index 8ebdb320e4de..25c743850bf2 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -8,7 +8,7 @@
*
* $RCSfile: svdotextdecomposition.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.2.18.2 $
*
* This file is part of OpenOffice.org.
*
@@ -90,6 +90,9 @@ namespace
basegfx::B2DHomMatrix maNewTransformA;
basegfx::B2DHomMatrix maNewTransformB;
+ // the visible area for contour text decomposition
+ basegfx::B2DVector maScale;
+
DECL_LINK(decomposeContourTextPrimitive, DrawPortionInfo* );
DECL_LINK(decomposeBlockTextPrimitive, DrawPortionInfo* );
DECL_LINK(decomposeStretchTextPrimitive, DrawPortionInfo* );
@@ -112,8 +115,9 @@ namespace
{
}
- void decomposeContourTextPrimitive(const basegfx::B2DHomMatrix& rNewTransformA, const basegfx::B2DHomMatrix& rNewTransformB)
+ void decomposeContourTextPrimitive(const basegfx::B2DHomMatrix& rNewTransformA, const basegfx::B2DHomMatrix& rNewTransformB, const basegfx::B2DVector& rScale)
{
+ maScale = rScale;
maNewTransformA = rNewTransformA;
maNewTransformB = rNewTransformB;
mrOutliner.SetDrawPortionHdl(LINK(this, impTextBreakupHandler, decomposeContourTextPrimitive));
@@ -511,7 +515,9 @@ namespace
IMPL_LINK(impTextBreakupHandler, decomposeContourTextPrimitive, DrawPortionInfo*, pInfo)
{
- if(pInfo)
+ // for contour text, ignore (clip away) all portions which are below
+ // the visible area given by maScale
+ if(pInfo && (double)pInfo->mrStartPos.Y() < maScale.getY())
{
impHandleDrawPortionInfo(*pInfo);
}
@@ -641,7 +647,7 @@ bool SdrTextObj::impDecomposeContourTextPrimitive(
// now break up text primitives.
impTextBreakupHandler aConverter(rOutliner);
- aConverter.decomposeContourTextPrimitive(aNewTransformA, aNewTransformB);
+ aConverter.decomposeContourTextPrimitive(aNewTransformA, aNewTransformB, aScale);
// cleanup outliner
rOutliner.Clear();
@@ -705,7 +711,7 @@ bool SdrTextObj::impDecomposeBlockTextPrimitive(
}
else
{
- if(IsTextFrame() && !rSdrBlockTextPrimitive.getUnlimitedPage())
+ if((rSdrBlockTextPrimitive.getWordWrap() || IsTextFrame()) && !rSdrBlockTextPrimitive.getUnlimitedPage())
{
rOutliner.SetMaxAutoPaperSize(aAnchorTextSize);
}