Date: prev next · Thread: first prev next last
2016 Archives by date, by thread · List index


<https://cgit.freedesktop.org/libreoffice/core/commit/?id=4c33aa61b3ea1fa170b9446fbfdffe85b659ff3b>:

commit 4c33aa61b3ea1fa170b9446fbfdffe85b659ff3b
Author: matteocam <matteo.campanelli@gmail.com>
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;
[...]

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.