[Libreoffice-commits] core.git: Branch 'feature/gsoc14-draw-chained-text-boxes' - editeng/source include/editeng svx/source
matteocam
matteo.campanelli at gmail.com
Tue Jun 30 08:46:23 PDT 2015
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.campanelli at 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()
More information about the Libreoffice-commits
mailing list