<div dir="ltr">Today I tried to embed some code to link the content of one text box to another in Draw. I took heavy inspiration from some existing code in <a href="http://docs.libreoffice.org/svx/html/svdotext_8cxx_source.html#l00205">SdrTextObj::FitFrameToTextSize()</a>. However I get a SIGSEGV in some other part of the code shortly afterwards.<div>

<div><br></div><div>What I tried to do was the following:</div><div>- Having two text boxes in the document,</div><div>- I tried to copy (a part of) the content from SdrPage::GetObj(0) into SdrPage::GetObj(1). This occurs in svx's drawinglayer and in particular in impTextBreakupHandler.</div>

<div>- The text is copied into the outliner of the second text box to be layouted again (simulating what FitFrameToTextSize above does. An important difference with that code is that now two different boxes are used).</div>

<div><br></div><div>This is the link to the main commit: </div><div><a href="http://cgit.freedesktop.org/libreoffice/core/commit/?h=feature/gsoc14-draw-chained-text-boxes&id=643d9cf5e73e523c88d1b545dd27d98feb1bf088">http://cgit.freedesktop.org/libreoffice/core/commit/?h=feature/gsoc14-draw-chained-text-boxes&id=643d9cf5e73e523c88d1b545dd27d98feb1bf088</a><br>

</div><div><br></div><div><br></div><div>Here is the seg. fault message:</div><div><div>Program received signal SIGSEGV, Segmentation fault.</div><div>0x00007f5cb26d9b5c in ContentAttribs::GetItem (this=0x99999999999999a1, nWhich=4006)</div>

<div>    at /home/seriouspillow/Proiects/libreoffice/gsoc/core/editeng/source/editeng/editdoc.cxx:1804</div><div>1804<span class="" style="white-space:pre">      </span>    if ( pStyle && ( aAttribSet.GetItemState( nWhich, false ) != SFX_ITEM_ON  ) )</div>

</div><div><br></div><div><br></div><div>Thorsten, any opinions?<br></div><div><br></div><div>Cheers,</div><div>Matteo</div><div><div><br></div></div></div></div>