From 4efe591659f63ea50b751ece8e7294776c7fbff1 Mon Sep 17 00:00:00 2001 From: matteocam Date: Mon, 7 Sep 2015 12:32:14 +0200 Subject: chained editeng: Change size settings if box is chainable Change-Id: I3717324b3be36b9503cae195fd42249d92d2c685 --- svx/source/svdraw/svdotext.cxx | 21 +++++++++++++-------- svx/source/svdraw/svdotxed.cxx | 28 ++++++++++++++++++++-------- 2 files changed, 33 insertions(+), 16 deletions(-) (limited to 'svx') diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index 8fd7bc2c0ae1..55948aa285c2 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -755,14 +755,19 @@ void SdrTextObj::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, boo if (eAniDirection==SDRTEXTANI_UP || eAniDirection==SDRTEXTANI_DOWN) nHgt=1000000; } - // #i119885# Do not limit/force height to geometrical frame (vice versa for vertical writing) - if(IsVerticalWriting()) - { - nWdt = 1000000; - } - else - { - nHgt = 1000000; + bool bChainedFrame = IsChainable(); + // Might be required for overflow check working: do limit height to frame if box is chainable. + if (!bChainedFrame) { + // #i119885# Do not limit/force height to geometrical frame (vice versa for vertical writing) + + if(IsVerticalWriting()) + { + nWdt = 1000000; + } + else + { + nHgt = 1000000; + } } rOutliner.SetMaxAutoPaperSize(Size(nWdt,nHgt)); diff --git a/svx/source/svdraw/svdotxed.cxx b/svx/source/svdraw/svdotxed.cxx index b0b2ccce3e64..c68b085bb43e 100644 --- a/svx/source/svdraw/svdotxed.cxx +++ b/svx/source/svdraw/svdotxed.cxx @@ -62,6 +62,14 @@ bool SdrTextObj::BegTextEdit(SdrOutliner& rOutl) rOutl.SetControlWord(nStat); } + // disable AUTOPAGESIZE if IsChainable (might be required for overflow check) + if ( IsChainable() ) { + EEControlBits nStat1=rOutl.GetControlWord(); + nStat1 &=~EEControlBits::AUTOPAGESIZE; + rOutl.SetControlWord(nStat1); + } + + OutlinerParaObject* pOutlinerParaObject = GetOutlinerParaObject(); if(pOutlinerParaObject!=NULL) { @@ -181,14 +189,18 @@ void SdrTextObj::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, Rectangle* p if (eAniDirection==SDRTEXTANI_UP || eAniDirection==SDRTEXTANI_DOWN) nMaxHgt=1000000; } - // #i119885# Do not limit/force height to geometrical frame (vice versa for vertical writing) - if(IsVerticalWriting()) - { - nMaxWdt = 1000000; - } - else - { - nMaxHgt = 1000000; + bool bChainedFrame = IsChainable(); + // Might be required for overflow check working: do limit height to frame if box is chainable. + if (!bChainedFrame) { + // #i119885# Do not limit/force height to geometrical frame (vice versa for vertical writing) + if(IsVerticalWriting()) + { + nMaxWdt = 1000000; + } + else + { + nMaxHgt = 1000000; + } } aPaperMax.Width()=nMaxWdt; -- cgit