diff options
author | Oliver Bolte <obo@openoffice.org> | 2009-12-01 10:53:27 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2009-12-01 10:53:27 +0000 |
commit | 236f74be7727f46bd245893c78ce02c0b766a28a (patch) | |
tree | e2af10b85761f11806af51f9a6aca44528855852 | |
parent | 01893617e21ac7e7fee0a16056e8a77f135e92ca (diff) |
CWS-TOOLING: integrate CWS ooo32gsl07
2009-11-24 09:00:19 +0100 hdu r277603 : #i107076# device DPI also gets a maximum limit
2009-11-23 11:43:01 +0100 hdu r277593 : #i107076# device DPI now gets a minimum limit
2009-11-20 16:41:39 +0100 hdu r277582 : #ii107076# limit minimal device resolution
2009-11-20 13:42:09 +0100 af r277578 : #i107049# Do not scroll focus indicator into view when slide sorter is focused.
2009-11-20 11:31:54 +0100 aw r277576 : ooo32gsl07 #i106214# corrected MinAutoPaperSize for Cell BlockFormatting
2009-11-20 10:28:09 +0100 hdu r277573 : #i107006# text justification invalidates previous measurements of a layout
-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 434efde463..8cc1ede0ec 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 |