include/svx/textchain.hxx | 4 -- svx/source/svdraw/svdotext.cxx | 54 +--------------------------------------- svx/source/svdraw/textchain.cxx | 13 --------- 3 files changed, 2 insertions(+), 69 deletions(-)
New commits: commit 374be8c82ea75bb5908ed44d0e358deab433341e Author: matteocam <matteo.campane...@gmail.com> Date: Tue Jun 23 19:07:07 2015 -0400 Removed references to HandlingOveflow property Change-Id: Icef338d4e3d286ef4b2a0640ede1984cbf71e699 diff --git a/include/svx/textchain.hxx b/include/svx/textchain.hxx index 9290f22..56b0af8 100644 --- a/include/svx/textchain.hxx +++ b/include/svx/textchain.hxx @@ -41,7 +41,6 @@ class ImpChainLinkProperties ImpChainLinkProperties(); bool bOverwriteOnOverflow; - bool bHandlingUnderflow; bool bNilChainingEvent; }; @@ -65,9 +64,6 @@ class TextChain { void SetOverwriteOnOverflow(SdrTextObj *, bool ); bool GetOverwriteOnOverflow(SdrTextObj *pTarget); - bool GetLinkHandlingUnderflow(SdrTextObj *pTarget); - void SetLinkHandlingUnderflow(SdrTextObj *, bool); - bool GetNilChainingEvent(SdrTextObj *pTarget); void SetNilChainingEvent(SdrTextObj *, bool); diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index c6adc5a..71fe911 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -1971,16 +1971,7 @@ void SdrTextObj::onOverflowStatusEvent( ) if ( mbToBeChained ) { SdrOutliner &aDrawOutliner = ImpGetDrawOutliner(); - // If this is the a post-underflow-type of overflow then we cannot - // trust the editing outl on the text since it has still the old one - if(GetTextChain()->GetLinkHandlingUnderflow(this)) { - OutlinerParaObject *pPObj = GetOutlinerParaObject(); - aDrawOutliner.SetUpdateMode(true); - aDrawOutliner.SetMaxAutoPaperSize(pEdtOutl->GetMaxAutoPaperSize()); - aDrawOutliner.SetText(*pPObj); - aDrawOutliner.IsPageOverflow(); // Check for overflow to set flags - mpOverflowingText = aDrawOutliner.GetOverflowingText(); - } else if (pEdtOutl != NULL) + if (pEdtOutl != NULL) mpOverflowingText = pEdtOutl->GetOverflowingText(); else { assert(0); // Should never happen. FIXME(matteocam) @@ -1989,21 +1980,6 @@ void SdrTextObj::onOverflowStatusEvent( ) SdrTextObj *pNextTextObj = GetNextLinkInChain(); impLeaveOnlyNonOverflowingText(&aDrawOutliner); - if (GetTextChain()->GetLinkHandlingUnderflow(this)) - { - // reset underflow handling - GetTextChain()->SetLinkHandlingUnderflow(this, false); - /* We are about to call set text on underflowing text, - * since there is nothing more to be handled this should be nil - */ - GetTextChain()->SetNilChainingEvent(this, true); - // Set text for editing outliner; will trigger onChainingEvent (which will return immediately) - OutlinerParaObject *pPObj = GetOutlinerParaObject(); - pEdtOutl->SetText(*pPObj); - // XXX: not sure if next lines necessary - OutlinerParaObject *pNewPObj = pEdtOutl->CreateParaObject(); - NbcSetOutlinerParaObject(pNewPObj); - } // Transfer overflowing text impMoveChainedTextToNextLink(&aDrawOutliner, pNextTextObj); @@ -2015,21 +1991,6 @@ void SdrTextObj::onUnderflowStatusEvent( ) SdrTextObj *pNextLink = GetNextLinkInChain(); SdrOutliner &aDrawOutliner = ImpGetDrawOutliner(); - if (GetTextChain()->GetLinkHandlingUnderflow(this)) - { - // possibly coming from an overflow - if (pEdtOutl) { - GetTextChain()->SetLinkHandlingUnderflow(this, false); - GetTextChain()->SetNilChainingEvent(this, true); - OutlinerParaObject *pPObj = GetOutlinerParaObject(); - pEdtOutl->SetText(*pPObj); - OutlinerParaObject *pNewPObj = pEdtOutl->CreateParaObject(); - SetOutlinerParaObject(pNewPObj); - } - - return; - } - if (!pNextLink->HasText()) return; @@ -2106,18 +2067,7 @@ void SdrTextObj::onChainingEvent() bool bIsPageOverflow; - if (GetTextChain()->GetLinkHandlingUnderflow(this)) - { - // If handling underflow we check for overflow in the object - Outliner &aDrawOutliner = ImpGetDrawOutliner(); - aDrawOutliner.SetUpdateMode(true); - aDrawOutliner.SetMaxAutoPaperSize(pEdtOutl->GetMaxAutoPaperSize()); - OutlinerParaObject *pPObj = GetOutlinerParaObject(); - aDrawOutliner.SetText(*pPObj); - bIsPageOverflow = aDrawOutliner.IsPageOverflow(); - } else { - bIsPageOverflow = pEdtOutl->IsPageOverflow(); - } + bIsPageOverflow = pEdtOutl->IsPageOverflow(); // Propagates the need for change SetToBeChained( bIsPageOverflow ); diff --git a/svx/source/svdraw/textchain.cxx b/svx/source/svdraw/textchain.cxx index 1fd7f92..8266a03 100644 --- a/svx/source/svdraw/textchain.cxx +++ b/svx/source/svdraw/textchain.cxx @@ -25,7 +25,6 @@ ImpChainLinkProperties::ImpChainLinkProperties() { // give defaults bOverwriteOnOverflow = false; - bHandlingUnderflow = false; bNilChainingEvent = false; } @@ -61,18 +60,6 @@ bool TextChain::GetLinksHaveMergeableFirstPara(SdrTextObj* /* pPrevLink */, SdrT return false; } -bool TextChain::GetLinkHandlingUnderflow(SdrTextObj *pTarget) -{ - ImpChainLinkProperties *pLinkProperties = GetLinkProperties(pTarget); - return pLinkProperties->bHandlingUnderflow; -} - -void TextChain::SetLinkHandlingUnderflow(SdrTextObj *pTarget, bool bHandlingUnderflow) -{ - ImpChainLinkProperties *pLinkProperties = GetLinkProperties(pTarget); - pLinkProperties->bHandlingUnderflow = bHandlingUnderflow; -} - bool TextChain::GetNilChainingEvent(SdrTextObj *pTarget) { ImpChainLinkProperties *pLinkProperties = GetLinkProperties(pTarget); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits