editeng/source/outliner/overflowingtxt.cxx | 9 ++++----- include/editeng/overflowingtxt.hxx | 7 ++----- svx/source/svdraw/textchainflow.cxx | 4 ++-- 3 files changed, 8 insertions(+), 12 deletions(-)
New commits: commit e7d28b8d3b6e77ccfb4228cf814c200de55856a7 Author: matteocam <matteo.campane...@gmail.com> Date: Tue Jun 30 11:44:38 2015 -0400 For OF: Passing text to be merged last minute; otherwise might be old Change-Id: I12553f4aa5145c8ebad77977506700cc6c530e1f diff --git a/editeng/source/outliner/overflowingtxt.cxx b/editeng/source/outliner/overflowingtxt.cxx index 85aa0b2..9e1ee3d 100644 --- a/editeng/source/outliner/overflowingtxt.cxx +++ b/editeng/source/outliner/overflowingtxt.cxx @@ -40,19 +40,18 @@ OUString OverflowingText::GetHeadingLines() const } -OFlowChainedText::OFlowChainedText(Outliner *pOutl, OutlinerParaObject* pTextToBeMerged) - : mpTextToBeMerged(pTextToBeMerged) +OFlowChainedText::OFlowChainedText(Outliner *pOutl) { mpOverflowingTxt = pOutl->GetOverflowingText(); mpNonOverflowingTxt = pOutl->GetNonOverflowingText(); } -OutlinerParaObject *OFlowChainedText::CreateOverflowingParaObject(Outliner *pOutliner) +OutlinerParaObject *OFlowChainedText::CreateOverflowingParaObject(Outliner *pOutliner, OutlinerParaObject *pTextToBeMerged) { - if (mpOverflowingTxt == NULL) + if (mpOverflowingTxt == NULL || pTextToBeMerged == NULL) return NULL; - pOutliner->SetText(*mpTextToBeMerged); + pOutliner->SetText(*pTextToBeMerged); // Get text of first paragraph of destination box Paragraph *pOldPara0 = pOutliner->GetParagraph(0); diff --git a/include/editeng/overflowingtxt.hxx b/include/editeng/overflowingtxt.hxx index 3920af3..a2602ad 100644 --- a/include/editeng/overflowingtxt.hxx +++ b/include/editeng/overflowingtxt.hxx @@ -85,13 +85,11 @@ class EDITENG_DLLPUBLIC NonOverflowingText { */ class EDITENG_DLLPUBLIC OFlowChainedText { public: - OFlowChainedText(Outliner *, OutlinerParaObject *); + OFlowChainedText(Outliner *); - OutlinerParaObject *CreateOverflowingParaObject(Outliner *); + OutlinerParaObject *CreateOverflowingParaObject(Outliner *, OutlinerParaObject *); OutlinerParaObject *CreateNonOverflowingParaObject(Outliner *); - OutlinerParaObject *GetTextToBeMerged() const { return mpTextToBeMerged; } - protected: void impSetOutlinerToEmptyTxt(Outliner *); @@ -101,7 +99,6 @@ class EDITENG_DLLPUBLIC OFlowChainedText { NonOverflowingText *mpNonOverflowingTxt; OverflowingText *mpOverflowingTxt; - OutlinerParaObject *mpTextToBeMerged; }; diff --git a/svx/source/svdraw/textchainflow.cxx b/svx/source/svdraw/textchainflow.cxx index 0e4be0b..b3dcd80 100644 --- a/svx/source/svdraw/textchainflow.cxx +++ b/svx/source/svdraw/textchainflow.cxx @@ -87,7 +87,7 @@ void TextChainFlow::impCheckForFlowEvents(SdrOutliner *pFlowOutl, SdrOutliner *p bUnderflow = !bIsPageOverflow && mpNextLink && mpNextLink->HasText(); // Set (Non)OverflowingTxt here - mpOverflChText = bOverflow ? new OFlowChainedText(pFlowOutl, mpNextLink->GetOutlinerParaObject()) : NULL; + mpOverflChText = bOverflow ? new OFlowChainedText(pFlowOutl) : NULL; //mpOverflowingTxt = bOverflow ? pFlowOutl->GetOverflowingText() : NULL; //mpNonOverflowingTxt = bOverflow ? pFlowOutl->GetNonOverflowingText() : NULL; @@ -197,7 +197,7 @@ SdrTextObj *TextChainFlow::GetNextLink() const OutlinerParaObject *TextChainFlow::impGetOverflowingParaObject(SdrOutliner *pOutliner) { - return mpOverflChText->CreateOverflowingParaObject(pOutliner); + return mpOverflChText->CreateOverflowingParaObject(pOutliner, mpNextLink->GetOutlinerParaObject()); } TextChain *TextChainFlow::GetTextChain() _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits