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


I have an issue with my current chaining code.
The current chaining mechanism seems to be working:
once out of edit mode, when a page overflow occurs, the first paragraph
that causes it and all the next ones are moved in the next link in the
chain .
The problem arises when the first paragraph is the one that overflows
already.
Instead of disappearing from the first text box and appearing into the the
second one, it rather simply disappears from the first.

I have an hypothesis about what goes wrong.
The following code describes what happens when we get out of edit mode:

// the following is pseudo code
SdrTextObj::EndTextEdit(...) {
[...]
  // ignores overflowing text
  newText = Non_Overflowing_Paragraphs() // !! It is NULL if all text
overflows
  // saves overflowing text for later use from other SdrTextObj-s in the
chain
  this->overflowingText = Overflowing_Paragraphs()

  // set truncated text in current SdrTextObj
  this->SetCurrentText(newText) // this method is SetOutlinerParaObject in
the original code

[...]
}

The code above truncates the text in the first box.
The text in the second paragraph is restored by creating an appropriate
SdrChainedTextPrimitive object and its create2DDecomposition method.
It seems that such a method is never called when all text is overflowing,
i.e. when newText above is NULL.
The two are plausibly one consequence of the other.

An ideal solution would be to replace that NULL pointer with a dummy
OutlinerParaObject or something like that.
Any hint on how to do this?

In case anyone wanted to have a look:
http://cgit.freedesktop.org/libreoffice/core/tree/svx/source/svdraw/svdotxed.cxx?h=feature/gsoc14-draw-chained-text-boxes#n252

http://cgit.freedesktop.org/libreoffice/core/tree/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx?h=feature/gsoc14-draw-chained-text-boxes#n488

Cheers,
Matteo

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.