[GSoC] Text Background Color in Draw - Report 22/06/2014

Miklos Vajna vmiklos at collabora.co.uk
Thu Jul 10 05:20:42 PDT 2014


Hi Matteo,

I noticed a crash that's probably related to your (otherwise great :-)
), text background editeng work -- care to take a look?

1) Start Writer, enable form controls toolbar (View -> Toolbars -> Form controls)
2) Click the more controls button, pick the Date Field
3) Draw a rectangle in the body text area to create an instance
4) Try to query its background color via UNO: Tools -> Macros ->
Organize macros -> Basic -> Edit, then type:

print ThisComponent.DrawPage(0).CharBackColor

and Press F5 to run, it crashes with:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff3b4d9fc in SfxItemSet::Get (this=0x1dfaa00, nWhich=0, bSrchInParent=true) at /home/vmiklos/git/libreoffice/master/svl/source/items/itemset.cxx:1002
1002        DBG_ASSERT( !pItem->ISA(SfxSetItem) ||
(gdb) bt 10
#0  0x00007ffff3b4d9fc in SfxItemSet::Get (this=0x1dfaa00, nWhich=0, bSrchInParent=true) at /home/vmiklos/git/libreoffice/master/svl/source/items/itemset.cxx:1002
#1  0x00007fffd2cc9de6 in SdrObject::GetMergedItem (this=0x226b140, nWhich=0) at /home/vmiklos/git/libreoffice/master/svx/source/svdraw/svdobj.cxx:2113
#2  0x00007fffd2ea856e in SvxShape::_getPropertyValue (this=0x21c1f38, PropertyName="CharBackColor") at /home/vmiklos/git/libreoffice/master/svx/source/unodraw/unoshape.cxx:1797

nWhich = 0 sounds buggy, maybe you advertise your new UNO property in a
generic property map, but in case of form controls, the underlying
implementation doesn't handle that?

Thanks,

Miklos
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20140710/f76ba3bb/attachment.sig>


More information about the LibreOffice mailing list