Index: source/sdr/contact/viewcontactofgraphic.cxx =================================================================== --- source/sdr/contact/viewcontactofgraphic.cxx (revision 276553) +++ source/sdr/contact/viewcontactofgraphic.cxx (working copy) @@ -310,7 +310,8 @@ false, false, false, - false); + false, + false); // decompose immediately with neutral ViewInformation. This will // layout the text to more simple TextPrimitives from drawinglayer Index: source/sdr/primitive2d/sdrconnectorprimitive2d.cxx =================================================================== --- source/sdr/primitive2d/sdrconnectorprimitive2d.cxx (revision 276553) +++ source/sdr/primitive2d/sdrconnectorprimitive2d.cxx (working copy) @@ -72,7 +72,7 @@ // add text if(getSdrLSTAttribute().getText()) { - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(::basegfx::B2DPolyPolygon(getUnitPolygon()), aEmptyMatrix, *getSdrLSTAttribute().getText(), getSdrLSTAttribute().getLine(), false, false)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(::basegfx::B2DPolyPolygon(getUnitPolygon()), aEmptyMatrix, *getSdrLSTAttribute().getText(), getSdrLSTAttribute().getLine(), false, false, false)); } // add shadow Index: source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx =================================================================== --- source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx (revision 276553) +++ source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx (working copy) @@ -60,8 +60,9 @@ getTextBox(), *getSdrSTAttribute().getText(), 0, - isForceTextClipToTextRange(), // #SJ# use CellText mode; text upper-left - getWordWrap())); + false, + getWordWrap(), + isForceTextClipToTextRange())); } // add shadow Index: source/sdr/primitive2d/sdrpathprimitive2d.cxx =================================================================== --- source/sdr/primitive2d/sdrpathprimitive2d.cxx (revision 276553) +++ source/sdr/primitive2d/sdrpathprimitive2d.cxx (working copy) @@ -89,7 +89,7 @@ // add text if(getSdrLFSTAttribute().getText()) { - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(getUnitPolyPolygon(), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(getUnitPolyPolygon(), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false, false)); } // add shadow Index: source/sdr/primitive2d/sdrcaptionprimitive2d.cxx =================================================================== --- source/sdr/primitive2d/sdrcaptionprimitive2d.cxx (revision 276553) +++ source/sdr/primitive2d/sdrcaptionprimitive2d.cxx (working copy) @@ -123,7 +123,8 @@ *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, - false)); + false, + false)); } // add shadow Index: source/sdr/primitive2d/sdrellipseprimitive2d.cxx =================================================================== --- source/sdr/primitive2d/sdrellipseprimitive2d.cxx (revision 276553) +++ source/sdr/primitive2d/sdrellipseprimitive2d.cxx (working copy) @@ -94,7 +94,7 @@ // add text if(getSdrLFSTAttribute().getText()) { - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(::basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(::basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false, false)); } // add shadow @@ -191,7 +191,7 @@ // add text if(getSdrLFSTAttribute().getText()) { - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(::basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(::basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false, false)); } // add shadow Index: source/sdr/primitive2d/sdrmeasureprimitive2d.cxx =================================================================== --- source/sdr/primitive2d/sdrmeasureprimitive2d.cxx (revision 276553) +++ source/sdr/primitive2d/sdrmeasureprimitive2d.cxx (working copy) @@ -134,7 +134,8 @@ pTextAttribute->isScroll(), false, false, - false); + false, + false); aTextRange = pBlockText->getB2DRange(aViewInformation); } Index: source/sdr/primitive2d/sdrole2primitive2d.cxx =================================================================== --- source/sdr/primitive2d/sdrole2primitive2d.cxx (revision 276553) +++ source/sdr/primitive2d/sdrole2primitive2d.cxx (working copy) @@ -110,7 +110,7 @@ // always supported by the old paints, too if(getSdrLFSTAttribute().getText()) { - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false, false)); } // add shadow Index: source/sdr/primitive2d/sdrrectangleprimitive2d.cxx =================================================================== --- source/sdr/primitive2d/sdrrectangleprimitive2d.cxx (revision 276553) +++ source/sdr/primitive2d/sdrrectangleprimitive2d.cxx (working copy) @@ -110,7 +110,7 @@ // add text if(getSdrLFSTAttribute().getText()) { - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false, false)); } // add shadow Index: source/sdr/primitive2d/sdrdecompositiontools.cxx =================================================================== --- source/sdr/primitive2d/sdrdecompositiontools.cxx (revision 276553) +++ source/sdr/primitive2d/sdrdecompositiontools.cxx (working copy) @@ -173,7 +173,8 @@ const attribute::SdrTextAttribute& rText, const attribute::SdrLineAttribute* pStroke, bool bCellText, - bool bWordWrap) + bool bWordWrap, + bool bClipOnBounds) { basegfx::B2DHomMatrix aAnchorTransform(rObjectTransform); SdrTextPrimitive2D* pNew = 0; @@ -297,7 +298,8 @@ rText.isFixedCellHeight(), rText.isScroll(), bCellText, - bWordWrap); + bWordWrap, + bClipOnBounds); } } Index: source/sdr/primitive2d/sdrgrafprimitive2d.cxx =================================================================== --- source/sdr/primitive2d/sdrgrafprimitive2d.cxx (revision 276553) +++ source/sdr/primitive2d/sdrgrafprimitive2d.cxx (working copy) @@ -104,7 +104,7 @@ // add text if(getSdrLFSTAttribute().getText()) { - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false, false)); } // add shadow Index: source/sdr/primitive2d/sdrtextprimitive2d.cxx =================================================================== --- source/sdr/primitive2d/sdrtextprimitive2d.cxx (revision 276553) +++ source/sdr/primitive2d/sdrtextprimitive2d.cxx (working copy) @@ -382,7 +382,8 @@ bool bFixedCellHeight, bool bUnlimitedPage, bool bCellText, - bool bWordWrap) + bool bWordWrap, + bool bClipOnBounds) : SdrTextPrimitive2D(pSdrText, rOutlinerParaObject), maTextRangeTransform(rTextRangeTransform), maSdrTextHorzAdjust(aSdrTextHorzAdjust), @@ -390,7 +391,8 @@ mbFixedCellHeight(bFixedCellHeight), mbUnlimitedPage(bUnlimitedPage), mbCellText(bCellText), - mbWordWrap(bWordWrap) + mbWordWrap(bWordWrap), + mbClipOnBounds(bClipOnBounds) { } @@ -406,7 +408,8 @@ && isFixedCellHeight() == rCompare.isFixedCellHeight() && getUnlimitedPage() == rCompare.getUnlimitedPage() && getCellText() == rCompare.getCellText() - && getWordWrap() == rCompare.getWordWrap()); + && getWordWrap() == rCompare.getWordWrap() + && getClipOnBounds() == rCompare.getClipOnBounds()); } return false; @@ -423,7 +426,8 @@ isFixedCellHeight(), getUnlimitedPage(), getCellText(), - getWordWrap()); + getWordWrap(), + getClipOnBounds()); } // provide unique ID Index: source/svdraw/svdotextdecomposition.cxx =================================================================== --- source/svdraw/svdotextdecomposition.cxx (revision 276553) +++ source/svdraw/svdotextdecomposition.cxx (working copy) @@ -800,24 +800,32 @@ 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 - rOutliner.SetMinAutoPaperSize(aNullSize); rOutliner.SetMaxAutoPaperSize(aAnchorTextSize); rOutliner.SetPaperSize(aAnchorTextSize); - rOutliner.SetMinAutoPaperSize(Size(nAnchorTextWidth, 0)); - rOutliner.SetUpdateMode(TRUE); + rOutliner.SetUpdateMode(true); rOutliner.SetText(rSdrBlockTextPrimitive.getOutlinerParaObject()); - rOutliner.SetUpdateMode(TRUE); rOutliner.SetControlWord(nOriginalControlWord); } 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); if((rSdrBlockTextPrimitive.getWordWrap() || IsTextFrame()) && !rSdrBlockTextPrimitive.getUnlimitedPage()) { @@ -843,16 +851,6 @@ rOutliner.SetMaxAutoPaperSize(aMaxAutoPaperSize); } - // set minimal paper size hor/ver if needed - if(bHorizontalIsBlock) - { - rOutliner.SetMinAutoPaperSize(Size(nAnchorTextWidth, 0)); - } - else if(bVerticalIsBlock) - { - rOutliner.SetMinAutoPaperSize(Size(0, nAnchorTextHeight)); - } - rOutliner.SetPaperSize(aNullSize); rOutliner.SetUpdateMode(true); rOutliner.SetText(rSdrBlockTextPrimitive.getOutlinerParaObject()); @@ -931,7 +929,8 @@ // as the master shape we are working on. For vertical, use the top-right // corner const double fStartInX(bVerticalWritintg ? aAdjustTranslate.getX() + aOutlinerScale.getX() : aAdjustTranslate.getX()); - aNewTransformA.translate(fStartInX, aAdjustTranslate.getY()); + const basegfx::B2DTuple aAdjOffset(fStartInX, aAdjustTranslate.getY()); + aNewTransformA.translate(aAdjOffset.getX(), aAdjOffset.getY()); // mirroring. We are now in aAnchorTextRange sizes. When mirroring in X and Y, // move the null point which was top left to bottom right. @@ -948,10 +947,10 @@ // #SJ# create ClipRange (if needed) basegfx::B2DRange aClipRange; - if(bIsCell) + if(rSdrBlockTextPrimitive.getClipOnBounds()) { - aClipRange.expand(basegfx::B2DTuple(0.0, 0.0)); - aClipRange.expand(basegfx::B2DTuple(aAnchorTextSize.Width(), aAnchorTextSize.Height())); + aClipRange.expand(-aAdjOffset); + aClipRange.expand(basegfx::B2DTuple(aAnchorTextSize.Width(), aAnchorTextSize.Height()) - aAdjOffset); } // now break up text primitives. Index: source/table/viewcontactoftableobj.cxx =================================================================== --- source/table/viewcontactoftableobj.cxx (revision 276553) +++ source/table/viewcontactoftableobj.cxx (working copy) @@ -123,7 +123,7 @@ getTransform(), *getSdrFTAttribute().getText(), 0, - true, false)); + true, false, false)); } } Index: inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx =================================================================== --- inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx (revision 276553) +++ inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx (working copy) @@ -219,6 +219,7 @@ unsigned mbUnlimitedPage : 1; // force layout with no text break unsigned mbCellText : 1; // this is a cell text as block text unsigned mbWordWrap : 1; // for CustomShapes text layout + unsigned mbClipOnBounds : 1; // for CustomShapes text layout protected: // local decomposition. @@ -234,7 +235,8 @@ bool bFixedCellHeight, bool bUnlimitedPage, bool bCellText, - bool bWordWrap); + bool bWordWrap, + bool bClipOnBounds); // get data const basegfx::B2DHomMatrix& getTextRangeTransform() const { return maTextRangeTransform; } @@ -244,6 +246,7 @@ bool getUnlimitedPage() const { return mbUnlimitedPage; } bool getCellText() const { return mbCellText; } bool getWordWrap() const { return mbWordWrap; } + bool getClipOnBounds() const { return mbClipOnBounds; } // compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; Index: inc/svx/sdr/primitive2d/sdrdecompositiontools.hxx =================================================================== --- inc/svx/sdr/primitive2d/sdrdecompositiontools.hxx (revision 276553) +++ inc/svx/sdr/primitive2d/sdrdecompositiontools.hxx (working copy) @@ -75,7 +75,8 @@ const attribute::SdrTextAttribute& rText, const attribute::SdrLineAttribute* pStroke, bool bCellText, - bool bWordWrap); + bool bWordWrap, + bool bClipOnBounds); Primitive2DSequence createEmbeddedShadowPrimitive( const Primitive2DSequence& rContent,