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


Hello Albert,

Sorry that it took me a bit to review your patch but my master trees
are totally screwed for my own feature. I now checked your patch and
solved the conflicts that were related to my last fix for sort
dialogs. Attached you'll find a patch that applies cleanly on master.
I checked the dialog and it looks like we need to move some items a
bit.

2012/5/14 Albert Thuswaldner <albert.thuswaldner@gmail.com>:

1.) Compile time waring about resources ids. There is probably a
simple fix for this, I think I understand the problem but not what to
do about it.
f4099: "/home/thuswa/work/libo2/sc/source/ui/src/sortdlg.src", line
60: Warning in the object (Type: ListBox, 15):
Global resources should have an identifier >= 256.

Pos = MAP_APPFONT ( 172 , 11 ) ;
^
f4099: "/home/thuswa/work/libo2/sc/source/ui/src/sortdlg.src", line
68: Warning in the object (Type: RadioButton, 16):
Global resources should have an identifier >= 256.

Pos = MAP_APPFONT ( 172 , 25 ) ;
^
f4099: "/home/thuswa/work/libo2/sc/source/ui/src/sortdlg.src", line
75: Warning in the object (Type: RadioButton, 17):
Global resources should have an identifier >= 256.

Pos = MAP_APPFONT ( 6 , 0 ) ;
^
f4099: "/home/thuswa/work/libo2/sc/source/ui/src/sortdlg.src", line
82: Warning in the object (Type: FixedLine, 14):
Global resources should have an identifier >= 256.
[ build DEP ] SRS:sc/res


This one is quite simple. we need to move the identifiers out of the 0
to 255 range.

Andras, do you have an idea what range is useable in sc for this? I
think most of the 256 to 999 range is already used but I have no idea
where to check this.


2.) to return a pointer to the vector containing the ui widgets is of
course not ideal, see below:

ScSortKeyItems* ScSortKeyWindow::AddSortKey( sal_uInt16 nItem )
ScSortKeyItems* ScSortKeyCtrl::AddSortKey( sal_uInt16 nItem )

Instead I probably should create a reference when I initialize
ScSortKeyCtrl and ScSortKeyWindow, but I'm not exactly sure how to do
this.

I've attached a simple patch showing how to do this. The patch will
not compile but shows already the basic ideas. The idea is to move the
ScSortKeyItems variable into tpsort and only pass a reference. I think
a good final step is to use a boost::ptr_vector which will control the
lifetime of the contained objects.

Regards,
Markus

Attachment: 0001-fdo-45747-remove-the-limitation-to-3-sort-entries-in.patch
Description: Binary data

Attachment: 0001-how-to-add-ScSortKeyItems-as-reference.patch
Description: Binary data

Attachment: sort dialog.png
Description: PNG image


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.