[Libreoffice-commits] core.git: Branch 'feature/gsoc14-draw-chained-text-boxes' - 2 commits - svx/source
svx/source/svdraw/svdotxed.cxx | 28 +++- 1 file changed, 27 insertions(+), 1 deletion(-) New commits: commit 98b10d15f111c0960959c26f6fa5778f028a8228 Author: matteocam matteo.campane...@gmail.com Date: Wed Aug 5 15:09:34 2015 +0200 Set text object before flushing overflow checks Change-Id: Ie7e3162616f7d1ab53198dd0190326885a31b5fc diff --git a/svx/source/svdraw/svdotxed.cxx b/svx/source/svdraw/svdotxed.cxx index f948674..92288ad 100644 --- a/svx/source/svdraw/svdotxed.cxx +++ b/svx/source/svdraw/svdotxed.cxx @@ -316,6 +316,8 @@ void SdrTextObj::EndTextEdit(SdrOutliner rOutl) // Set parameters // Code from ImpSetTextEditParams ImpUpdateOutlParamsForOverflow(rDrawOutl, GetNextLinkInChain()); +const OutlinerParaObject *pObj = GetNextLinkInChain()-GetOutlinerParaObject(); +rDrawOutl.SetText(*pObj); rDrawOutl.SetUpdateMode(true); // XXX: Change name of method above to impHandleChainingEventsNonEditMode commit b0ad0b1a8294dd95f38fe4028787b01781e0ed68 Author: matteocam matteo.campane...@gmail.com Date: Wed Aug 5 14:43:58 2015 +0200 Update parameters for overflow as done for edt outl Change-Id: I963a50e8f5a6511cfe5dc9e5fe4d308c29d64d75 diff --git a/svx/source/svdraw/svdotxed.cxx b/svx/source/svdraw/svdotxed.cxx index 02c800fe..f948674 100644 --- a/svx/source/svdraw/svdotxed.cxx +++ b/svx/source/svdraw/svdotxed.cxx @@ -262,6 +262,18 @@ void SdrTextObj::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, Rectangle* p if (pViewInit!=NULL) *pViewInit=aViewInit; } +void ImpUpdateOutlParamsForOverflow(SdrOutliner *pOutl, SdrTextObj *pTextObj) +{ +Size aPaperMin; +Size aPaperMax; +Rectangle aEditArea; +pTextObj-TakeTextEditArea(aPaperMin,aPaperMax,aEditArea,NULL); + +pOutl-SetMinAutoPaperSize(aPaperMin); +pOutl-SetMaxAutoPaperSize(aPaperMax); +pOutl-SetPaperSize(Size()); +} + void SdrTextObj::EndTextEdit(SdrOutliner rOutl) { OutlinerParaObject* pNewText = NULL; @@ -286,13 +298,25 @@ void SdrTextObj::EndTextEdit(SdrOutliner rOutl) rOutl.ClearOverflowingParaNum(); // XXX: Experiment /* Flush overflow for next textbox */ -if (IsChainable() +if ( +IsChainable() GetNextLinkInChain() GetTextChain()-GetPendingOverflowCheck(GetNextLinkInChain()) ) { GetTextChain()-SetPendingOverflowCheck(GetNextLinkInChain(), false); // NEXT: Prepare outliner for overflow +/* FIXME + * Outliner needs to be prepared in the same way it is prepared + * in SdrTextObj::impDecomposeChainedTextPrimitive. + * This is not immediately feasible because that code needs some parameters + * that are specific of decomposition. + * Is there any other part where we get those parameters, e.g. who prepares the editing outliner? XXX +*/ SdrOutliner rDrawOutl = GetNextLinkInChain()-ImpGetDrawOutliner(); + +// Set parameters // Code from ImpSetTextEditParams +ImpUpdateOutlParamsForOverflow(rDrawOutl, GetNextLinkInChain()); + rDrawOutl.SetUpdateMode(true); // XXX: Change name of method above to impHandleChainingEventsNonEditMode GetNextLinkInChain()-impHandleChainingEventsDuringDecomposition(rDrawOutl); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/gsoc14-draw-chained-text-boxes' - 2 commits - svx/source
svx/source/svdraw/svdotext.cxx | 52 ++-- svx/source/svdraw/svdotextdecomposition.cxx |3 + 2 files changed, 53 insertions(+), 2 deletions(-) New commits: commit 8e7192c5e053684930e82a5c6bd53905ac2a Author: matteocam matteo.campane...@gmail.com Date: Wed Jul 29 18:56:51 2015 +0200 Check GetNicChainingEvent before chaining in static mode Change-Id: Ie3e4aeea896ae3269ee196d17d80505e2491eb71 diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx index b627b77..25feda4 100644 --- a/svx/source/svdraw/svdotextdecomposition.cxx +++ b/svx/source/svdraw/svdotextdecomposition.cxx @@ -1425,6 +1425,9 @@ void SdrTextObj::impGetScrollTextTiming(drawinglayer::animation::AnimationEntryL void SdrTextObj::impHandleChainingEventsDuringDecomposition(SdrOutliner rOutliner) const { +if (GetTextChain()-GetNilChainingEvent(this)) +return; + GetTextChain()-SetNilChainingEvent(this, true); TextChainFlow aTxtChainFlow(const_castSdrTextObj*(this)); commit 452ac5b3b37dc3c06ff0dbe958cc65417f2ed064 Author: matteocam matteo.campane...@gmail.com Date: Wed Jul 29 18:54:55 2015 +0200 Set link at calls of IsChainable. (not working) Change-Id: Ia6b57c560f20abac8cac98c29880d7aa5b962d7c diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index ca28046..46b1bbc 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -1984,12 +1984,60 @@ void SdrTextObj::onEditOutlinerStatusEvent( EditStatus* pEditStatus ) } } +// XXX: Make it a method somewhere? +SdrObject *ImpGetObjByName(SdrObjList *pObjList, OUString aObjName) +{ +// scan the whole list +size_t nObjCount = pObjList-GetObjCount(); +for (unsigned i = 0; i nObjCount; i++) { +SdrObject *pCurObj = pObjList-GetObj(i); + +if (pCurObj-GetName() == aObjName) { +return pCurObj; +} +} +// not found +return NULL; +} + +// XXX: Make it a (private) method of SdrTextObj +void ImpUpdateChainLinks(SdrTextObj *pTextObj, OUString aNextLinkName) +{ +// XXX: Current implementation constraints text boxes to be on the same page + +// No next link +if (aNextLinkName == ) { +pTextObj-SetNextLinkInChain(NULL); +return; +} + +SdrPage *pPage = pTextObj-GetPage(); +assert(pPage); +SdrTextObj *pNextTextObj = dynamic_cast SdrTextObj * +(ImpGetObjByName(pPage, aNextLinkName)); +if (!pNextTextObj) { +fprintf(stderr, [CHAINING] Can't find object as next link.\n); +return; +} + +pTextObj-SetNextLinkInChain(pNextTextObj); +} + bool SdrTextObj::IsChainable() const { // Read it as item const SfxItemSet rSet = GetObjectItemSet(); -OUString aNextName = static_castconst SfxStringItem(rSet.Get(SDRATTR_TEXT_CHAINNEXTNAME)).GetValue(); -return aNextName != ; // XXX: Should we also check for GetNilChainingEvent? (see old code below) +OUString aNextLinkName = static_castconst SfxStringItem(rSet.Get(SDRATTR_TEXT_CHAINNEXTNAME)).GetValue(); + +// Update links if any inconsistency is found +bool bNextLinkUnsetYet = (aNextLinkName != ) !mpNextInChain; +bool bInconsistentNextLink = mpNextInChain mpNextInChain-GetName() != aNextLinkName; +// if the link is not set despite there should be one OR if it has changed +if (bNextLinkUnsetYet || bInconsistentNextLink) { +ImpUpdateChainLinks(const_castSdrTextObj *(this), aNextLinkName); +} + +return aNextLinkName != ; // XXX: Should we also check for GetNilChainingEvent? (see old code below) /* // Check that no overflow is going on ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/gsoc14-draw-chained-text-boxes' - 2 commits - svx/source
svx/source/svdraw/svdotext.cxx |2 +- svx/source/unodraw/unoshap2.cxx |1 + 2 files changed, 2 insertions(+), 1 deletion(-) New commits: commit 5e02310180605c7dfc1539eeb0b95d691b1557be Author: matteocam matteo.campane...@gmail.com Date: Wed Jul 29 09:06:41 2015 +0200 Add chaining constant in unoshap Change-Id: I4a7d69636df9d5b80420da8fa5bd9bea8cf1d3f0 diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx index f01fe9e..5ceff5f 100644 --- a/svx/source/unodraw/unoshap2.cxx +++ b/svx/source/unodraw/unoshap2.cxx @@ -670,6 +670,7 @@ SvxShapeControlPropertyMapping[] = { RTL_CONSTASCII_STRINGPARAM(UNO_NAME_EDIT_CHAR_COLOR), RTL_CONSTASCII_STRINGPARAM(TextColor) }, { RTL_CONSTASCII_STRINGPARAM(CharBackColor), RTL_CONSTASCII_STRINGPARAM(CharBackColor) }, { RTL_CONSTASCII_STRINGPARAM(CharBackTransparent), RTL_CONSTASCII_STRINGPARAM(CharBackTransparent) }, +{ RTL_CONSTASCII_STRINGPARAM(UNO_NAME_TEXT_CHAINNEXTNAME), RTL_CONSTASCII_STRINGPARAM(UNO_NAME_TEXT_CHAINNEXTNAME) }, { RTL_CONSTASCII_STRINGPARAM(CharRelief), RTL_CONSTASCII_STRINGPARAM(FontRelief) }, { RTL_CONSTASCII_STRINGPARAM(CharUnderlineColor), RTL_CONSTASCII_STRINGPARAM(TextLineColor) }, { RTL_CONSTASCII_STRINGPARAM(UNO_NAME_EDIT_PARA_ADJUST), RTL_CONSTASCII_STRINGPARAM(Align) }, commit b240c7016c0a305c06918ff8e629226806f3f7ba Author: matteocam matteo.campane...@gmail.com Date: Wed Jul 29 08:48:54 2015 +0200 Fixed operator Change-Id: Ib82ad17855654dafc92bdf423691f3e76b54b387 diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index de5859e..66b8a7a 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -1989,7 +1989,7 @@ bool SdrTextObj::IsChainable() const // Read it as item const SfxItemSet rSet = GetObjectItemSet(); OUString aNextName = static_castconst SfxStringItem(rSet.Get(SDRATTR_TEXT_CHAINNEXTNAME)).GetValue(); -return aNextName == ; +return aNextName != ; // XXX if (!GetName().startsWith(Chainable)) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/gsoc14-draw-chained-text-boxes' - 2 commits - svx/source
svx/source/svdraw/svdedxv.cxx | 14 +- svx/source/svdraw/svdotext.cxx |7 --- 2 files changed, 13 insertions(+), 8 deletions(-) New commits: commit 7f44515aa8ac339757d6fdf3d1ce6fc15849d940 Author: matteocam matteo.campane...@gmail.com Date: Mon Jul 6 16:49:12 2015 -0400 Fixed function name Change-Id: I3187547ac920725e448d9053893c857dbd17d427 diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index 61c1593..cc16d53 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -490,13 +490,14 @@ IMPL_LINK_NOARG(SdrObjEditView,ImpChainingEventHdl) OutlinerView* pOLV = GetTextEditOutlinerView(); if( pTextObj pOLV) { +TextChain *pTextChain = pTextObj-GetTextChain(); // This is true during an underflow-caused overflow (with pEdtOutl-SetText()) -if (GetTextChain()-GetNilChainingEvent(pTextObj)) { +if (pTextChain-GetNilChainingEvent(pTextObj)) { return 0; } // We prevent to trigger further handling of overflow/underflow for pTextObj -GetTextChain()-SetNilChainingEvent(pTextObj, true); +pTextChain-SetNilChainingEvent(pTextObj, true); // Save previous selection pos ESelection aPreChainingSel(pOLV-GetSelection()); @@ -507,7 +508,7 @@ IMPL_LINK_NOARG(SdrObjEditView,ImpChainingEventHdl) // XXX: this logic could be put in a separate approppriate class /* Cursor motion stuff */ -CursorChainingEvent aCursorEvent = pTextObj-GetTextChain()-GetCursorEvent(pTextObj); +CursorChainingEvent aCursorEvent = pTextChain-GetCursorEvent(pTextObj); SdrTextObj *pNextLink = pTextObj-GetNextLinkInChain(); switch (aCursorEvent) { @@ -534,8 +535,8 @@ IMPL_LINK_NOARG(SdrObjEditView,ImpChainingEventHdl) ESelection aEndSel(nLastParaIndex,nLenLastPara,nLastParaIndex,nLenLastPara); */ -// XXX: Must be called -GetTextChain()-SetNilChainingEvent(pTextObj, false); +// NOTE: Must be called. Don't let the function return if you set it to true and not reset it +pTextChain-SetNilChainingEvent(pTextObj, false); } else { // XXX fprintf(stderr, [OnChaining] No Edit Outliner View\n); commit f0618282407e22d2486da761af7a8d033babcfdd Author: matteocam matteo.campane...@gmail.com Date: Mon Jul 6 16:47:24 2015 -0400 NilChainingEvents handled in SdrObjEditView Change-Id: I30dd131b849c3a8a97d5a75a61fc013b3d17b89e diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index bc5bfb0..61c1593 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -490,6 +490,14 @@ IMPL_LINK_NOARG(SdrObjEditView,ImpChainingEventHdl) OutlinerView* pOLV = GetTextEditOutlinerView(); if( pTextObj pOLV) { +// This is true during an underflow-caused overflow (with pEdtOutl-SetText()) +if (GetTextChain()-GetNilChainingEvent(pTextObj)) { +return 0; +} + +// We prevent to trigger further handling of overflow/underflow for pTextObj +GetTextChain()-SetNilChainingEvent(pTextObj, true); + // Save previous selection pos ESelection aPreChainingSel(pOLV-GetSelection()); @@ -498,6 +506,7 @@ IMPL_LINK_NOARG(SdrObjEditView,ImpChainingEventHdl) // XXX: this logic could be put in a separate approppriate class /* Cursor motion stuff */ + CursorChainingEvent aCursorEvent = pTextObj-GetTextChain()-GetCursorEvent(pTextObj); SdrTextObj *pNextLink = pTextObj-GetNextLinkInChain(); @@ -525,6 +534,8 @@ IMPL_LINK_NOARG(SdrObjEditView,ImpChainingEventHdl) ESelection aEndSel(nLastParaIndex,nLenLastPara,nLastParaIndex,nLenLastPara); */ +// XXX: Must be called +GetTextChain()-SetNilChainingEvent(pTextObj, false); } else { // XXX fprintf(stderr, [OnChaining] No Edit Outliner View\n); diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index 3455c97..531e41c 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -1992,12 +1992,6 @@ void SdrTextObj::onChainingEvent() if (!pEdtOutl) return; -// This is true during an underflow-caused overflow (with pEdtOutl-SetText()) -if (GetTextChain()-GetNilChainingEvent(this)) { - -return; -} - // Outliner for text transfer SdrOutliner aDrawOutliner = ImpGetDrawOutliner(); @@ -2027,7 +2021,6 @@ void SdrTextObj::onChainingEvent() } } -GetTextChain()-SetNilChainingEvent(this, false); } ___ Libreoffice-commits mailing list
[Libreoffice-commits] core.git: Branch 'feature/gsoc14-draw-chained-text-boxes' - 2 commits - svx/source
svx/source/svdraw/svdotextdecomposition.cxx |3 ++- svx/source/svdraw/svdotxed.cxx |4 2 files changed, 6 insertions(+), 1 deletion(-) New commits: commit 655a706988e4870dc577ea84373f536b8bab8b3f Author: matteocam matteo.campane...@gmail.com Date: Tue Aug 12 15:01:49 2014 +0200 Experiment: ensuring that EE_CNTRL_AUTOPAGESIZE is not set Change-Id: I86da72907044ea32b886fa6baa4d8171401c3990 diff --git a/svx/source/svdraw/svdotxed.cxx b/svx/source/svdraw/svdotxed.cxx index 4f62e0b..36e3d7e 100644 --- a/svx/source/svdraw/svdotxed.cxx +++ b/svx/source/svdraw/svdotxed.cxx @@ -62,6 +62,10 @@ bool SdrTextObj::BegTextEdit(SdrOutliner rOutl) rOutl.SetControlWord(nStat); } +// FIXME(matteocam) +nStat=~EE_CNTRL_AUTOPAGESIZE; +rOutl.SetControlWord(nStat); + OutlinerParaObject* pOutlinerParaObject = GetOutlinerParaObject(); if(pOutlinerParaObject!=NULL) { commit 21bea773ca7778588543fb7cb4733a35e7257d1e Author: matteocam matteo.campane...@gmail.com Date: Tue Aug 12 14:58:30 2014 +0200 Experiment: chained text boundaries in impDecomposeBlockTextPrimitive Change-Id: Ia022f8ac3fa50a2c2c24fbb0193c213411452300 diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx index 4ed8b58..882136b 100644 --- a/svx/source/svdraw/svdotextdecomposition.cxx +++ b/svx/source/svdraw/svdotextdecomposition.cxx @@ -935,7 +935,8 @@ void SdrTextObj::impDecomposeBlockTextPrimitive( rOutliner.SetFixedCellHeight(rSdrBlockTextPrimitive.isFixedCellHeight()); rOutliner.SetControlWord(nOriginalControlWord|EE_CNTRL_AUTOPAGESIZE); rOutliner.SetMinAutoPaperSize(aNullSize); -rOutliner.SetMaxAutoPaperSize(Size(100,100)); +//rOutliner.SetMaxAutoPaperSize(Size(100,100)); +rOutliner.SetMaxAutoPaperSize(Size(100,2000)); // Resolves: fdo#35779 set background color of this shape as the editeng background if there // is one. Check the shape itself, then the host page, then that page's master page. ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/gsoc14-draw-chained-text-boxes' - 2 commits - svx/source
svx/source/svdraw/svdotext.cxx | 27 --- svx/source/svdraw/svdotextdecomposition.cxx |3 +-- svx/source/svdraw/svdotxed.cxx | 25 + 3 files changed, 30 insertions(+), 25 deletions(-) New commits: commit f907f74a5ef3372f275c2ef5cb51d38823383e34 Author: matteocam matteo.campane...@gmail.com Date: Tue Aug 12 17:39:32 2014 +0200 Reverted changes from i119885 Change-Id: I8fc1ab70e6be8801e6ad0a60d3b60f7b622fe89f diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index 1cc03b0..ad1ae75 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -718,11 +718,6 @@ void SdrTextObj::TakeTextRect( SdrOutliner rOutliner, Rectangle rTextRect, boo sal_uIntPtr nStat0=rOutliner.GetControlWord(); Size aNullSize; -// FIXME(matteocam) -bool bChainedFrame = true; // XXX: should be returned from a method - -if (!bChainedFrame) { - if (!bContourFrame) { rOutliner.SetControlWord(nStat0|EE_CNTRL_AUTOPAGESIZE); @@ -748,15 +743,21 @@ void SdrTextObj::TakeTextRect( SdrOutliner rOutliner, Rectangle rTextRect, boo if (eAniDirection==SDRTEXTANI_UP || eAniDirection==SDRTEXTANI_DOWN) nHgt=100; } -// #i119885# Do not limit/force height to geometrical frame (vice versa for vertical writing) -if(IsVerticalWriting()) -{ -nWdt = 100; -} -else -{ -nHgt = 100; -} +// FIXME(matteocam) +bool bChainedFrame = true; // XXX: should be returned from a method + +if (!bChainedFrame) { + +// #i119885# Do not limit/force height to geometrical frame (vice versa for vertical writing) +if(IsVerticalWriting()) +{ +nWdt = 100; +} +else +{ +nHgt = 100; +} +} // END if (!bChainedFrame) rOutliner.SetMaxAutoPaperSize(Size(nWdt,nHgt)); } @@ -773,7 +774,6 @@ void SdrTextObj::TakeTextRect( SdrOutliner rOutliner, Rectangle rTextRect, boo rOutliner.SetMinAutoPaperSize(Size(0, nAnkHgt)); } } -} // END if (!bChainedFrame) rOutliner.SetPaperSize(aNullSize); if (bContourFrame) diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx index 882136b..4ed8b58 100644 --- a/svx/source/svdraw/svdotextdecomposition.cxx +++ b/svx/source/svdraw/svdotextdecomposition.cxx @@ -935,8 +935,7 @@ void SdrTextObj::impDecomposeBlockTextPrimitive( rOutliner.SetFixedCellHeight(rSdrBlockTextPrimitive.isFixedCellHeight()); rOutliner.SetControlWord(nOriginalControlWord|EE_CNTRL_AUTOPAGESIZE); rOutliner.SetMinAutoPaperSize(aNullSize); -//rOutliner.SetMaxAutoPaperSize(Size(100,100)); -rOutliner.SetMaxAutoPaperSize(Size(100,2000)); +rOutliner.SetMaxAutoPaperSize(Size(100,100)); // Resolves: fdo#35779 set background color of this shape as the editeng background if there // is one. Check the shape itself, then the host page, then that page's master page. diff --git a/svx/source/svdraw/svdotxed.cxx b/svx/source/svdraw/svdotxed.cxx index a671681..2cbf851 100644 --- a/svx/source/svdraw/svdotxed.cxx +++ b/svx/source/svdraw/svdotxed.cxx @@ -186,16 +186,20 @@ void SdrTextObj::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, Rectangle* p if (eAniDirection==SDRTEXTANI_UP || eAniDirection==SDRTEXTANI_DOWN) nMaxHgt=100; } -// #i119885# Do not limit/force height to geometrical frame (vice versa for vertical writing) -if(IsVerticalWriting()) -{ -nMaxWdt = 100; -} -else -{ -nMaxHgt = 100; +// FIXME(matteocam) +bool bChainedFrame = true; // XXX: should be returned from a method + +if ( !bChainedFrame ) { +// #i119885# Do not limit/force height to geometrical frame (vice versa for vertical writing) +if(IsVerticalWriting()) +{ +nMaxWdt = 100; +} +else +{ +nMaxHgt = 100; +} } - aPaperMax.Width()=nMaxWdt; aPaperMax.Height()=nMaxHgt; } @@ -249,10 +253,6 @@ void SdrTextObj::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, Rectangle* p aPaperMin.Height() = 0; } -// FIXME(matteocam) -aPaperMax.Height() = 2000; -aPaperMin.Height() = 2000; - if (pPaperMin!=NULL) *pPaperMin=aPaperMin; if (pPaperMax!=NULL) *pPaperMax=aPaperMax; if (pViewInit!=NULL)
[Libreoffice-commits] core.git: Branch 'feature/gsoc14-draw-chained-text-boxes' - 2 commits - svx/source vcl/source
svx/source/svdraw/svdotxed.cxx |7 --- vcl/source/outdev/text.cxx |2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) New commits: commit 31e66b9856671bb12e89997dae5df11c2235de3e Author: matteocam matteo.campane...@gmail.com Date: Thu Aug 7 22:24:36 2014 +0200 Some minor changes Change-Id: I90e8df3405e95c6295add0532fb6fa49c6517325 diff --git a/svx/source/svdraw/svdotxed.cxx b/svx/source/svdraw/svdotxed.cxx index b25a324..9151fe4 100644 --- a/svx/source/svdraw/svdotxed.cxx +++ b/svx/source/svdraw/svdotxed.cxx @@ -277,8 +277,6 @@ void SdrTextObj::EndTextEdit(SdrOutliner rOutl) pNewText = rOutl.CreateParaObject( 0, nParaAnz ); } -// we do not need the bookmark at the overflowing check anymore. -rOutl.ClearOverflowingParaNum(); // need to end edit mode early since SetOutlinerParaObject already // uses GetCurrentBoundRect() which needs to take the text into account @@ -287,6 +285,9 @@ void SdrTextObj::EndTextEdit(SdrOutliner rOutl) SetOutlinerParaObject(pNewText); } +// we do not need the bookmark at the overflowing check anymore. +rOutl.ClearOverflowingParaNum(); + pEdtOutl = NULL; rOutl.Clear(); sal_uInt32 nStat = rOutl.GetControlWord(); diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx index 7a587a6..b5177aa 100644 --- a/vcl/source/outdev/text.cxx +++ b/vcl/source/outdev/text.cxx @@ -966,11 +966,13 @@ void OutputDevice::DrawTextArray( const Point rStartPt, const OUString rStr, const sal_Int32* pDXAry, sal_Int32 nIndex, sal_Int32 nLen ) { +/* if ( maFont.IsTransparent() ) fprintf(stderr, [Actually transparent font] Real color = %x\n, maFont.GetFillColor().GetColor() ); fprintf(stderr, TextFillColor printing %c is %x\n, (char) rStr.toChar(), GetTextFillColor().GetColor()); +*/ if(nLen == 0x0) { commit 8e0e4419c0224528155dbc778826622042df3200 Author: matteocam matteo.campane...@gmail.com Date: Thu Aug 7 22:14:50 2014 +0200 Moved clearing for mnOverflowPara in the right place Change-Id: I3fd78af6d7338c6ce7c75c97148ab791118862eb diff --git a/svx/source/svdraw/svdotxed.cxx b/svx/source/svdraw/svdotxed.cxx index b32a8be..b25a324 100644 --- a/svx/source/svdraw/svdotxed.cxx +++ b/svx/source/svdraw/svdotxed.cxx @@ -268,9 +268,6 @@ void SdrTextObj::EndTextEdit(SdrOutliner rOutl) // set overflowing text for SdrChainedTextPrimitive2D pNextText = rOutl.GetOverflowingParaObject(); mpOverflowingText = pNextText; -// we do not need the bookmark at the overflowing check anymore. -rOutl.ClearOverflowingParaNum(); - // TODO: factor the lines of code above in a single function } @@ -280,6 +277,9 @@ void SdrTextObj::EndTextEdit(SdrOutliner rOutl) pNewText = rOutl.CreateParaObject( 0, nParaAnz ); } +// we do not need the bookmark at the overflowing check anymore. +rOutl.ClearOverflowingParaNum(); + // need to end edit mode early since SetOutlinerParaObject already // uses GetCurrentBoundRect() which needs to take the text into account // to work correct ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/gsoc14-draw-chained-text-boxes' - 2 commits - svx/source
svx/source/sdr/primitive2d/sdrattributecreator.cxx |6 +++--- svx/source/sdr/primitive2d/sdrdecompositiontools.cxx | 14 +- svx/source/svdraw/svdotext.cxx | 12 3 files changed, 16 insertions(+), 16 deletions(-) New commits: commit e5535665a3bbd7bd876eb62d8d4517d0bf16fad9 Author: matteocam matteo.campane...@gmail.com Date: Tue Jul 29 03:16:52 2014 +0300 Chained primitive is created only if there is chaining need Change-Id: Ib8da3f48b8c7327769a7a35dc7af7deb984aa36a diff --git a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx index f75354d..db79a85 100644 --- a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx +++ b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx @@ -305,13 +305,17 @@ namespace drawinglayer // isotrophically scaled text in range pNew = new SdrAutoFitTextPrimitive2D(rText.getSdrText(), rText.getOutlinerParaObject(), aAnchorTransform, bWordWrap); } +else if( rText.isToBeChained() ) // FIXME(matteocam) +{ +//bool b = true; // XXX: Chained Text by default! +//if (b) +pNew = new SdrChainedTextPrimitive2D( +rText.getSdrText(), +rText.getOutlinerParaObject() ); +//else // end FIXME +} else // text in range { -// FIXME(matteocam) -bool b = true; // XXX: Chained Text by default! -if (b) -pNew = new SdrChainedTextPrimitive2D( rText.getSdrText(), rText.getOutlinerParaObject() ); -else // end FIXME // build new primitive pNew = new SdrBlockTextPrimitive2D( rText.getSdrText(), commit 13977e0e6163e348d8d65468a8788dd9a8a7abd0 Author: matteocam matteo.campane...@gmail.com Date: Tue Jul 29 03:13:42 2014 +0300 Sets need for chaining in SdrTextObj when page overflow occurs Change-Id: I2e4a1adbacf7cae8feebaa392957e98c717699c2 diff --git a/svx/source/sdr/primitive2d/sdrattributecreator.cxx b/svx/source/sdr/primitive2d/sdrattributecreator.cxx index 2d135bc..fc22e83 100644 --- a/svx/source/sdr/primitive2d/sdrattributecreator.cxx +++ b/svx/source/sdr/primitive2d/sdrattributecreator.cxx @@ -524,10 +524,10 @@ namespace drawinglayer // FIXME(matteocam) bool bToBeChained = rTextObj.IsToBeChained(); // for resetting status -// XXX +// XXX: may not work if ( rTextObj.IsToBeChained() ) -{ -rTextObj.SetToBeChained( false ); +{ // XXX: hack +const_castSdrTextObj*(rTextObj)-SetToBeChained( false ); } if(rText.GetOutlinerParaObject() rText.GetModel()) diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index 09b8b8e..0b5e690 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -1947,16 +1947,12 @@ void SdrTextObj::onEditOutlinerStatusEvent( EditStatus* pEditStatus ) } else if (/* TODO: IsChained() */ pEditStatus-IsPageOverflow()) { +// FIXME(matteocam): should include check that the TextBox has a next chain link + +// set the need for chaining +SetToBeChained( true ); //impDecomposeChainedTextPrimitive(); -/* - * XXX: Do nothing for now, later here we'll set the need for chaining - * How do you do such a thing? - * TODO: Look at where text primitive creation methods are called. - * Then what? - * Store the state in SdrTextObj with something like needsChaingin? - * -*/ } } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits