include/svx/textchainflow.hxx       |    4 ++++
 svx/source/svdraw/textchainflow.cxx |   23 +++++++++++++++++++----
 2 files changed, 23 insertions(+), 4 deletions(-)

New commits:
commit 88c71f468817eac65a17b6a56e729661b4365704
Author: matteocam <matteo.campane...@gmail.com>
Date:   Mon Jun 29 18:28:14 2015 -0400

    Drawing outliner's item pool set to that of editing outl
    
    Change-Id: I5ba711fda7df498e0405f351eca953db615e232b

diff --git a/include/svx/textchainflow.hxx b/include/svx/textchainflow.hxx
index 10ba90a..776dc22 100644
--- a/include/svx/textchainflow.hxx
+++ b/include/svx/textchainflow.hxx
@@ -58,6 +58,8 @@ class TextChainFlow {
     virtual void impLeaveOnlyNonOverflowingText(SdrOutliner *);
     virtual void impMoveChainedTextToNextLink(SdrOutliner *);
 
+    virtual void impSetFlowOutlinerParams(SdrOutliner *, SdrOutliner *);
+
     OutlinerParaObject *impGetNonOverflowingParaObject(SdrOutliner *pOutliner);
     OutlinerParaObject *impGetOverflowingParaObject(SdrOutliner *pOutliner);
 
@@ -97,6 +99,8 @@ class EditingTextChainFlow : public TextChainFlow
 
     virtual void impSetTextForEditingOutliner(OutlinerParaObject *);
 
+    virtual void impSetFlowOutlinerParams(SdrOutliner *, SdrOutliner *) 
SAL_OVERRIDE;
+
 };
 
 #endif // INCLUDED_SVX_TEXTCHAINFLOW_HXX
diff --git a/svx/source/svdraw/textchainflow.cxx 
b/svx/source/svdraw/textchainflow.cxx
index 652e803..723c7f7 100644
--- a/svx/source/svdraw/textchainflow.cxx
+++ b/svx/source/svdraw/textchainflow.cxx
@@ -50,6 +50,11 @@ TextChainFlow::~TextChainFlow()
 
 }
 
+void TextChainFlow::impSetFlowOutlinerParams(SdrOutliner *, SdrOutliner *)
+{
+    // Nothing to do if not in editing mode
+}
+
 /*
  * Check for overflow in the state of pFlowOutl.
  * If pParamOutl is not NULL sets some parameters from there.
@@ -59,22 +64,21 @@ TextChainFlow::~TextChainFlow()
 */
 void TextChainFlow::impCheckForFlowEvents(SdrOutliner *pFlowOutl, SdrOutliner 
*pParamOutl)
 {
+    bool bOldUpdateMode = pFlowOutl->GetUpdateMode();
     // NOTE: Nah you probably don't need this
     if (pParamOutl != NULL)
     {
         // XXX: Set parameters
         // XXX: does this work if you do it before setting the text? Seems so.
         pFlowOutl->SetUpdateMode(true);
-        pFlowOutl->SetMaxAutoPaperSize(pParamOutl->GetMaxAutoPaperSize());
-        pFlowOutl->SetMinAutoPaperSize(pParamOutl->GetMinAutoPaperSize());
-        pFlowOutl->SetPaperSize(pParamOutl->GetPaperSize());
+       impSetFlowOutlinerParams(pFlowOutl, pParamOutl);
     }
 
     bool bIsPageOverflow = pFlowOutl->IsPageOverflow();
 
     if (pParamOutl != NULL)
     {
-        pFlowOutl->SetUpdateMode(false); // XXX: Plausibly should be the prev. 
state
+        pFlowOutl->SetUpdateMode(bOldUpdateMode); // XXX: Plausibly should be 
the prev. state
     }
 
     // NOTE: overflow and underflow cannot be both true
@@ -336,4 +340,15 @@ void 
EditingTextChainFlow::impSetTextForEditingOutliner(OutlinerParaObject *pNew
     }
 }
 
+void EditingTextChainFlow::impSetFlowOutlinerParams(SdrOutliner *pFlowOutl, 
SdrOutliner *pParamOutl)
+{
+    // Set right size for overflow
+    pFlowOutl->SetMaxAutoPaperSize(pParamOutl->GetMaxAutoPaperSize());
+    pFlowOutl->SetMinAutoPaperSize(pParamOutl->GetMinAutoPaperSize());
+    pFlowOutl->SetPaperSize(pParamOutl->GetPaperSize());
+
+    // Set right text attributes
+    pFlowOutl->SetEditTextObjectPool(pParamOutl->GetEditTextObjectPool());
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to