<https://cgit.freedesktop.org/libreoffice/core/commit/?id=4c33aa61b3ea1fa170b9446fbfdffe85b659ff3b>:
commit 4c33aa61b3ea1fa170b9446fbfdffe85b659ff3b
Author: matteocam <[email protected]>
Date: Sun Sep 6 11:29:03 2015 +0200
chained editeng: Add TextChainFlow related files
Change-Id: I0e4155391fff29dc4484c7aedd4e62f02c4afd25
[...]
diff --git a/svx/source/svdraw/textchainflow.cxx
b/svx/source/svdraw/textchainflow.cxx
new file mode 100644
index 0000000..922cfb3
--- /dev/null
+++ b/svx/source/svdraw/textchainflow.cxx
[...]
+/*
+ * Check for overflow in the state of pFlowOutl.
+ * If pParamOutl is not NULL sets some parameters from there.
+ * This is useful in case the outliner is not set for overflow
+ * (e.g. in editing mode we check for overflow in drawing outl but
+ * parameters come from editing outliner)
+*/
+void TextChainFlow::impCheckForFlowEvents(SdrOutliner *pFlowOutl, SdrOutliner
*pParamOutl)
+{
+ bool bOldUpdateMode = pFlowOutl->GetUpdateMode();
+
+ // XXX: This could be reorganized moving most of this stuff inside
EditingTextChainFlow
+ if (pParamOutl != NULL)
+ {
+ // We need this since it's required to check overflow
+ pFlowOutl->SetUpdateMode(true);
+
+ // XXX: does this work if you do it before setting the text? Seems so.
+ impSetFlowOutlinerParams(pFlowOutl, pParamOutl);
+ }
+
+ bool bIsPageOverflow = pFlowOutl->IsPageOverflow();
+
+ // NOTE: overflow and underflow cannot be both true
+ bOverflow = bIsPageOverflow && mpNextLink;
+ bUnderflow = !bIsPageOverflow && mpNextLink && mpNextLink->HasText();
+
+ // Get old state on whether to merge para-s or not
+ // NOTE: We handle UF/OF using the _old_ state. The new one is simply saved
+ bool bMustMergeParaAmongLinks =
GetTextChain()->GetIsPartOfLastParaInNextLink(mpTargetLink);
+
+ // Set (Non)OverflowingTxt here (if any)
+
+ // If we had an underflow before we have to deep merge paras anyway
+ bool bMustMergeParaOF = bMustMergeParaAmongLinks || mbOFisUFinduced;
+
+ // XXX
+ bMustMergeParaOF = true; // XXX: Experiment: no deep merging.
should that be removed?
+
+ mpOverflChText = bOverflow ?
+ new OFlowChainedText(pFlowOutl, bMustMergeParaOF) :
+ NULL;
[...]
_______________________________________________
LibreOffice mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice