diff options
author | Kurt Zenker <kz@openoffice.org> | 2009-12-04 19:02:03 +0100 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2009-12-04 19:02:03 +0100 |
commit | 875ac20478f16e5107acb222c0b851b99d2e0f27 (patch) | |
tree | 653ceed692fc48ca1bf8627f6d8b4e92740c3335 /svx | |
parent | 9b087a2b56a0bf02f0f03322967e92e81692f823 (diff) | |
parent | 72a8d5326343acabb3fe9a2685bce769c8ae759f (diff) |
CWS-TOOLING: integrate CWS ooo32gsl07_DEV300
Notes
Notes:
split repo tag: libs-core_ooo/DEV300_m67
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/svdraw/svdotextdecomposition.cxx | 48 |
1 files changed, 31 insertions, 17 deletions
diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx index 934b0f78ca3e..03e43a5eb57c 100644 --- a/svx/source/svdraw/svdotextdecomposition.cxx +++ b/svx/source/svdraw/svdotextdecomposition.cxx @@ -800,34 +800,48 @@ void SdrTextObj::impDecomposeBlockTextPrimitive( const bool bVerticalWritintg(rSdrBlockTextPrimitive.getOutlinerParaObject().IsVertical()); const Size aAnchorTextSize(Size(nAnchorTextWidth, nAnchorTextHeight)); - // check if block text is used (only one of them can be true) - const bool bHorizontalIsBlock(SDRTEXTHORZADJUST_BLOCK == eHAdj && !bVerticalWritintg); - const bool bVerticalIsBlock(SDRTEXTVERTADJUST_BLOCK == eVAdj && bVerticalWritintg); - - // set minimal paper size hor/ver if needed - if(bHorizontalIsBlock) - { - rOutliner.SetMinAutoPaperSize(Size(nAnchorTextWidth, 0)); - } - else if(bVerticalIsBlock) - { - rOutliner.SetMinAutoPaperSize(Size(0, nAnchorTextHeight)); - } - if(bIsCell) { // cell text is formated neither like a text object nor like a object // text, so use a special setup here - // #i106214# To work with an unchangeable PaperSize (CellSize in - // this case) Set(Min|Max)AutoPaperSize and SetPaperSize have to be used rOutliner.SetMaxAutoPaperSize(aAnchorTextSize); - rOutliner.SetMinAutoPaperSize(aAnchorTextSize); + + // #i106214# To work with an unchangeable PaperSize (CellSize in + // this case) Set(Min|Max)AutoPaperSize and SetPaperSize have to be used. + // #i106214# This was not completely correct; to still measure the real + // text height to allow vertical adjust (and vice versa for VerticalWritintg) + // only one aspect has to be set, but the other one to zero + if(bVerticalWritintg) + { + // measure the horizontal text size + rOutliner.SetMinAutoPaperSize(Size(0, aAnchorTextSize.Height())); + } + else + { + // measure the vertical text size + rOutliner.SetMinAutoPaperSize(Size(aAnchorTextSize.Width(), 0)); + } + rOutliner.SetPaperSize(aAnchorTextSize); rOutliner.SetUpdateMode(true); rOutliner.SetText(rSdrBlockTextPrimitive.getOutlinerParaObject()); } else { + // check if block text is used (only one of them can be true) + const bool bHorizontalIsBlock(SDRTEXTHORZADJUST_BLOCK == eHAdj && !bVerticalWritintg); + const bool bVerticalIsBlock(SDRTEXTVERTADJUST_BLOCK == eVAdj && bVerticalWritintg); + + // set minimal paper size hor/ver if needed + if(bHorizontalIsBlock) + { + rOutliner.SetMinAutoPaperSize(Size(nAnchorTextWidth, 0)); + } + else if(bVerticalIsBlock) + { + rOutliner.SetMinAutoPaperSize(Size(0, nAnchorTextHeight)); + } + if((rSdrBlockTextPrimitive.getWordWrap() || IsTextFrame()) && !rSdrBlockTextPrimitive.getUnlimitedPage()) { // #i103454# maximal paper size hor/ver needs to be limited to text |