editeng/source/outliner/overflowingtxt.cxx | 6 ++++++ include/editeng/overflowingtxt.hxx | 21 +++++++++++++++++++++ svx/source/svdraw/svdmodel.cxx | 2 +- svx/source/svdraw/textchainflow.cxx | 18 +++++++++++++++++- 4 files changed, 45 insertions(+), 2 deletions(-)
New commits: commit ecc3fcd988b222af17eb93bbf3fbc7ec55dec9d6 Author: matteocam <matteo.campane...@gmail.com> Date: Tue Jun 30 10:04:11 2015 -0400 Added ChainedText as a further abstraction on top of (Non)OverflowingText Change-Id: I7607aacc856fd9af7ae2087e81a362f071163bd5 diff --git a/editeng/source/outliner/overflowingtxt.cxx b/editeng/source/outliner/overflowingtxt.cxx index 196d1f8..8ecd05c 100644 --- a/editeng/source/outliner/overflowingtxt.cxx +++ b/editeng/source/outliner/overflowingtxt.cxx @@ -39,4 +39,10 @@ OUString OverflowingText::GetHeadingLines() const } +ChainedText::ChainedText(Outliner *pOutl) +{ + // Initialize stuff here +} + + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/editeng/overflowingtxt.hxx b/include/editeng/overflowingtxt.hxx index e4f9a2d..5399f4b 100644 --- a/include/editeng/overflowingtxt.hxx +++ b/include/editeng/overflowingtxt.hxx @@ -27,6 +27,11 @@ class OUString; class OutlinerParaObject; +class EditTextObject; +class Outliner; + +typedef EditTextObject FormattedTextPortion; + class EDITENG_DLLPUBLIC OverflowingText @@ -71,6 +76,22 @@ class EDITENG_DLLPUBLIC NonOverflowingText { } }; +// XXX: Do we also need a class for Underflow here? + +/* + * class ChainedText: + * contains and handles the state of a text broken _after_ a flow event. + * +*/ +class EDITENG_DLLPUBLIC ChainedText { + public: + ChainedText(Outliner *); + + private: + NonOverflowingText *mpNonOverflowingTxt; + OverflowingText *mpOverflowingTxt; +}; + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx index 19652f4..efe280d 100644 --- a/svx/source/svdraw/svdmodel.cxx +++ b/svx/source/svdraw/svdmodel.cxx @@ -220,7 +220,7 @@ void SdrModel::ImpCtor(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* _pEmbe pChainingOutliner = SdrMakeOutliner( OUTLINERMODE_TEXTOBJECT, this ); ImpSetOutlinerDefaults(pChainingOutliner, true); - // Make a TextChain + // Make a TextChain //XXX: There should not be only one - XXX: Prototype code pTextChain = new TextChain; /* End Text Chaining related code */ diff --git a/svx/source/svdraw/textchainflow.cxx b/svx/source/svdraw/textchainflow.cxx index 723c7f7..1261175 100644 --- a/svx/source/svdraw/textchainflow.cxx +++ b/svx/source/svdraw/textchainflow.cxx @@ -255,6 +255,10 @@ OutlinerParaObject *TextChainFlow::impGetOverflowingParaObject(SdrOutliner *pOut pJoiningPara = pOutliner->CreateParaObject(); } + // Create a Para Object out of mpMidParas + // (in order to use the SfxItemPool of the current outliner + // instead of the ones currently in mpMidParas) + // start actual composition //pOutliner->Clear(); impSetOutlinerToEmptyTxt(pOutliner); @@ -347,8 +351,20 @@ void EditingTextChainFlow::impSetFlowOutlinerParams(SdrOutliner *pFlowOutl, SdrO pFlowOutl->SetMinAutoPaperSize(pParamOutl->GetMinAutoPaperSize()); pFlowOutl->SetPaperSize(pParamOutl->GetPaperSize()); - // Set right text attributes + // Set right text attributes // XXX: Not enough: it does not handle complex attributes pFlowOutl->SetEditTextObjectPool(pParamOutl->GetEditTextObjectPool()); } +/* + * + * Some notes on how to set style sheets: + * - save whole edittexts instead of strings only for (Non)OverflowingText; this can be done by the EditEngine::CreateTextObject method and using a selection - probably from ImpEditEngine) + * - first, refactor the impGet*ParaObject stuff moving it in some (static?) class in overflowingtxt.hxx. Probably each of these methods should be split in smaller routines. + * - for the refactoring of the previous point we may also add an option for whether we are joining paragraphs or not + * - When making new OutlinerParaObjs and joining paragraphs we need to first add the string (as we already do) and then, with the appropriate selection, use Outliner::QuickSetAttribs(SfxItemSet(txtObj->GetPool()), aSelectionOfTheNewText) + * - having all this in a whole class that contains Overflowing and NonOverflowingText would not be bad. This same class could be used to handle a cursor later on. + * + * + * + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits