Bug 89895 - Report: overlining works only in preview
Summary: Report: overlining works only in preview
Status: RESOLVED WONTFIX
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
3.5.6.2 release
Hardware: Other Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-08 21:08 UTC by Julien Nabet
Modified: 2015-12-27 19:59 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
bt with underline (10.68 KB, text/plain)
2015-03-11 20:38 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Julien Nabet 2015-03-08 21:08:24 UTC
On pc Debian x86-64 with master sources updated 3 days ago or with LO Debian package 4.3.3.2, overlining in reports doesn't work.

1) Open Base and create a new hsqldb embedded file
2) Create a simple table
3) Create a report from this table
4) Select a field on the report, then right click and select "properties" if they're not present
5) Select "..." next to Font
6) Select 2nd tab, "Font effects"
7) Select "Single" in Overlining
Preview is ok
8) Click "Ok" button
The overlining isn't present in the report
Repeat 5) 6)
Overlining is set to "Without"!
Comment 1 Julien Nabet 2015-03-08 22:23:56 UTC
Lionel: any thoughts why preview of overlining would work but not when clicking ok?
I don't even know where to search :-(
Comment 2 Julien Nabet 2015-03-09 07:13:04 UTC
I thought first about a problem in cui/source/tabpages/chardlg.cxx but it works on Writer (at least with 4.3.3.2)
Comment 3 Lionel Elie Mamane 2015-03-09 07:20:20 UTC
If I understand your reproduction instructions right, it seems the property is not set on the control itself (in memory), the problem is not in the serialisation (saving from memory in XML in zip on disk)... I would follow (stepping in gdb) the setting of the property (in extensions/source/propctrlr/) and see where it "goes wrong" from there.

You may want to first do that with a property that works and compare.
Comment 4 Julien Nabet 2015-03-10 20:59:04 UTC
Thank you Lionel for your feedback.
I've added error logs at every method which referenced underline, no logs on console when using underline :-(

In addition, LO has been very slow (even for a debug build) for me to open some dialog windows since today.
Language dialog in Options is impossible to open for me.
First I thought about the idle/timer work but this problem has appeared only today whereas I didn't update my local repo :-(
Comment 5 Julien Nabet 2015-03-11 20:38:57 UTC
Created attachment 114049 [details]
bt with underline

I've updated my local repo and runned "make clean && make".
Slowdown has disappeared :-)

So I finally found a bt when clicking Ok after having changed underline.

I thought it will be easy then to pinpoint the location where overlining could be lacking, but for the moment, nothing.

Let's stay optimistic! :-)
Comment 6 Julien Nabet 2015-03-11 21:02:35 UTC
From #10 0x00002aaae008f101 in rptui::GeometryHandler::setPropertyValue (this=0x69fa190, PropertyName="FontDescriptor", Value=
    uno::Any uno::Sequence of length 4 = {{Name = "Font", Value = uno::Any {Name = "Liberation Sans", Height = 12, Width = 0, StyleName = "", Family = 3, CharSet = 76, Pitch = 2, CharacterWidth = 100, Weight = 150, Slant = com::sun::star::awt::FontSlant_NONE, Underline = 1, Strikeout = 0, Orientation = 0, Kerning = 0 '\000', WordLineMode = 0 '\000', Type = 0}}, {Name = "FontAsian", Value = uno::Any {Name = "Source Han Sans CN Regular", Height = 12, Width = 0, StyleName = "", Family = 6, CharSet = 76, Pitch = 2, CharacterWidth = 75, Weight = 100, Slant = com::sun::star::awt::FontSlant_NONE, Underline = 1, Strikeout = 0, Orientation = 0, Kerning = 0 '\000', WordLineMode = 0 '\000', Type = 0}}, {Name = "FontComplex", Value = uno::Any {Name = "FreeSans", Height = 12, Width = 0, StyleName = "", Family = 6, CharSet = 76, Pitch = 2, CharacterWidth = 100, Weight = 100, Slant = com::sun::star::awt::FontSlant_NONE, Underline = 1, Strikeout = 0, Orientation = 0, Kerning = 0 '\000', WordLineMode = 0 '\000', Type = 0}}, {Name = "CharUnderlineColor", Value = uno::Any 4294967295}}) at /home/julien/compile-libreoffice/libreoffice/reportdesign/source/ui/inspection/GeometryHandler.cxx:657

I got this:
#10 0x00002aaae008f101 in rptui::GeometryHandler::setPropertyValue (this=0x69fa190, PropertyName="FontDescriptor", Value=
    uno::Any uno::Sequence of length 4 = 

{
	{Name = "Font", Value = uno::Any 
		{Name = "Liberation Sans", Height = 12, Width = 0, StyleName = "", Family = 3, CharSet = 76, Pitch = 2, CharacterWidth = 100, Weight = 150, Slant = com::sun::star::awt::FontSlant_NONE, Underline = 15, Strikeout = 0, Orientation = 0, Kerning = 0 '\000', WordLineMode = 0 '\000', Type = 0
		}
	}, 
	{Name = "FontAsian", Value = uno::Any 
		{Name = "Source Han Sans CN Regular", Height = 12, Width = 0, StyleName = "", Family = 6, CharSet = 76, Pitch = 2, CharacterWidth = 75, Weight = 100, Slant = com::sun::star::awt::FontSlant_NONE, Underline = 15, Strikeout = 0, Orientation = 0, Kerning = 0 '\000', WordLineMode = 0 '\000', Type = 0
		}
	}, 
	{Name = "FontComplex", Value = uno::Any 
		{Name = "FreeSans", Height = 12, Width = 0, StyleName = "", Family = 6, CharSet = 76, Pitch = 2, CharacterWidth = 100, Weight = 100, Slant = com::sun::star::awt::FontSlant_NONE, Underline = 15, Strikeout = 0, Orientation = 0, Kerning = 0 '\000', WordLineMode = 0 '\000', Type = 0
		}
	}, 
	{Name = "CharUnderlineColor", Value = uno::Any 4294967295
	}
}) at /home/julien/compile-libreoffice/libreoffice/reportdesign/source/ui/inspection/GeometryHandler.cxx:657
where we can see there's no overline part.

After some research, the location to fix seems there:
http://opengrok.libreoffice.org/xref/core/reportdesign/source/ui/misc/UITools.cxx#594
Comment 7 Julien Nabet 2015-03-11 22:36:22 UTC
Investigation brings here:
reportdesign/inc/ReportHelperDefines.hxx
and there reportdesign/source/core/inc/ReportHelperImpl.hxx
2 files with a lot of macros. (a place to refactor for C++ templates experts?)

Even if I let aside differences that I don't understand like textlinecolor, charunderlinecolor one these 2 files, after having modified reportdesign/source/ui/misc/UITools.cxx, it's not sufficient, the bug remains.
Unless I'm mistaken, it seems that other parts like offapi/com/sun/star/awt/FontDescriptor.idl / offapi/type_reference/offapi.idl must be changed.
I naively added an overline attribute in both but got a big bt:
warn:legacy.osl:15322:1:reportdesign/source/core/sdr/RptObject.cxx:368: OUnoObject::EndListening: not listening currently!
*** stack smashing detected ***: /home/julien/compile-libreoffice/libreoffice/instdir/program/soffice.bin terminated
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x731ff)[0x7fd5f278e1ff]
/lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x37)[0x7fd5f28114c7]
/lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x0)[0x7fd5f2811490]
/home/julien/compile-libreoffice/libreoffice/instdir/program/libcomphelper.so(+0x172ac0)[0x7fd5f0b35ac0]
/home/julien/compile-libreoffice/libreoffice/instdir/program/libcomphelper.so(_ZN10comphelper7compareERKN3com3sun4star3uno3AnyES6_+0x41)[0x7fd5f0b35b0d]
/home/julien/compile-libreoffice/libreoffice/instdir/program/libtklo.so(+0x362901)[0x7fd5ed752901]
/home/julien/compile-libreoffice/libreoffice/instdir/program/libtklo.so(_ZN15UnoControlModel24convertFastPropertyValueERN3com3sun4star3uno3AnyES5_iRKS4_+0x5df)[0x7fd5ed6f3f5f]
/home/julien/compile-libreoffice/libreoffice/instdir/program/libuno_cppuhelpergcc3.so.3(_ZN4cppu18OPropertySetHelper21setFastPropertyValuesEiPiPKN3com3sun4star3uno3AnyEi+0x309)[0x7fd5f03f06e7]
...

At this point, I must recognize it's too high level for me :-(
Comment 8 Lionel Elie Mamane 2015-03-12 06:20:02 UTC
(In reply to Julien Nabet from comment #7)

> Unless I'm mistaken, it seems that other parts like
> offapi/com/sun/star/awt/FontDescriptor.idl /
> offapi/type_reference/offapi.idl must be changed.

offapi/*/*/*/*/*.idl defines our public API; I expect overline is already defined there in some way, and does not need to be added. offapi/type_reference/offapi.idl is not supposed to be edited manually, unless we decide to make an incompatible change (but then discuss in mailing list!!!).

> I naively added an overline attribute in both but got a big bt:
> warn:legacy.osl:15322:1:reportdesign/source/core/sdr/RptObject.cxx:368:
> OUnoObject::EndListening: not listening currently!
> *** stack smashing detected ***:
> /home/julien/compile-libreoffice/libreoffice/instdir/program/soffice.bin
> terminated

This probably comes from an incomplete recompile. If you change the API, well, recompile.


I would suggest to see (or ask on the ML) how overline is handled in Writer, since it does not seem to be through the FontDescriptor. Then we can understand how to add the same handling to reports.
Comment 9 Alex Thurgood 2015-03-13 13:21:03 UTC
Confirmed on

Version: 4.5.0.0.alpha0+
Build ID: 34d6ec2c6e6618beacac881ec28ab527b25558d1
Locale: fr_

OSX 10.10.2
Comment 10 Matthew Francis 2015-03-20 06:16:04 UTC
This appears to have been the case since the "Oracle Report Builder" was integrated in 3.6 (the previous way of editing reports doesn't seem to have been able to set any attributes on fields in this way, not just overline)

So, not a regression, but a "bug introduced by a new feature"
Comment 11 Julien Nabet 2015-12-27 19:59:56 UTC
Not a priority, let's close this instead of letting rot