Re: Help Locating Base Code

2012-08-31 Thread Lionel Elie Mamane
On Wed, Aug 22, 2012 at 08:20:45AM -0700, Joel Madero wrote:

> Thanks for letting me know it's Lionel :)

In general, you can find "subject-specific experts" listed at
http://wiki.documentfoundation.org/FindTheExpert

> I told Rafael yesterday in the chat that just because I enjoy being
> angry (actually just enjoy a good challenge) I'll probably assign
> myself another base bug in the coming weeks and spend 20 hours to
> fix one line ;)

Don't be too disappointed by this asymmetry; it is often like that:
finding *where* to fix is harder than actually fixing :)

> On Wed, Aug 22, 2012 at 12:16 AM, Jan Holesovsky  wrote:

> > On 2012-08-21 at 11:10 -0700, Joel Madero wrote:
> >
> > > Thanks to everyone who helped me along the way. The code actually
> > > ended up being in formcomponenthandler.cxx,
> > > FormComponentPropertyHandler::impl_browseImage_nothrow.
> >
> > Great to hear; I hope I did not mislead you too much - that was the
> > other occurrence of FILEOPEN_LINK_PREVIEW/CHECKBOX_LINK :-)
> >
> > > I think we need to start looking for a database expert, someone who
> > > enjoys it and is willing to get into the grit of the crappy code. Any
> > > takers ? ;)
> >
> > Oh - database expert, that's Lionel :-)  But of course, having more
> > database experts would be great!
> >
> > > I'll get the patch done tonight after I clear all the other stuff I
> > > was testing with, going to attempt gerritt for the first time.
> >
> > Looking forward to the patch!
> >
> > All the best,
> > Kendy
> >
> >
> >

> ___
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Help Locating Base Code

2012-08-30 Thread Lionel Elie Mamane
On Wed, Aug 22, 2012 at 09:21:24AM +0100, Mark Stanton wrote:

>> Oh - database expert, that's Lionel :-)  But of course, having more
>> database experts would be great!

> I intended that to be me.  Having spent more than twenty years
> writing them I thought I might qualify.

Cool! I'm already rejoicing at the idea of having you around. Welcome.

Do you intend to be mainly in

1) "pure database" stuff (drivers, SQL parsing and generation, ...)

or also dig into

2) stuff more around it, like e.g. the report builder and the forms
   system?

There is certainly a need for more manpower in number 1 (there is
always a need for more...), but number 2 has IMHO some of the most
urgent / important matters open. And maybe more importantly, I'm
better at number 1 than number 2, so the need is more desperate.

> I'm reading the lists (here, dev & qa) regularly, but unfortunately
> at the moment I'm bogged down (...).

> I hope to be "here" in a month or two.

We'll be waiting. See you soon.

-- 
Lionel
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Help Locating Base Code

2012-08-22 Thread Joel Madero
Thanks for letting me know it's Lionel :) I told Rafael yesterday in the
chat that just because I enjoy being angry (actually just enjoy a good
challenge) I'll probably assign myself another base bug in the coming weeks
and spend 20 hours to fix one line ;) now I know who to bug with every
minor question (just kidding!).

Best Regards,

Joel

On Wed, Aug 22, 2012 at 12:16 AM, Jan Holesovsky  wrote:

> Hi Joel,
>
> On 2012-08-21 at 11:10 -0700, Joel Madero wrote:
>
> > Thanks to everyone who helped me along the way. The code actually
> > ended up being in formcomponenthandler.cxx,
> > FormComponentPropertyHandler::impl_browseImage_nothrow.
>
> Great to hear; I hope I did not mislead you too much - that was the
> other occurrence of FILEOPEN_LINK_PREVIEW/CHECKBOX_LINK :-)
>
> > I think we need to start looking for a database expert, someone who
> > enjoys it and is willing to get into the grit of the crappy code. Any
> > takers ? ;)
>
> Oh - database expert, that's Lionel :-)  But of course, having more
> database experts would be great!
>
> > I'll get the patch done tonight after I clear all the other stuff I
> > was testing with, going to attempt gerritt for the first time.
>
> Looking forward to the patch!
>
> All the best,
> Kendy
>
>
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Help Locating Base Code

2012-08-22 Thread Mark Stanton
> Oh - database expert, that's Lionel :-)  But of course, having more
> database experts would be great!

I intended that to be me.  Having spent more than twenty years writing 
them I thought I might qualify.  

I'm reading the lists (here, dev & qa) regularly, but unfortunately at 
the moment I'm bogged down in a new system launch and some consulting.

I hope to be "here" in a month or two.

Regards
Mark Stanton


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Help Locating Base Code

2012-08-22 Thread Jan Holesovsky
Hi Joel,

On 2012-08-21 at 11:10 -0700, Joel Madero wrote:

> Thanks to everyone who helped me along the way. The code actually
> ended up being in formcomponenthandler.cxx,
> FormComponentPropertyHandler::impl_browseImage_nothrow. 

Great to hear; I hope I did not mislead you too much - that was the
other occurrence of FILEOPEN_LINK_PREVIEW/CHECKBOX_LINK :-)

> I think we need to start looking for a database expert, someone who
> enjoys it and is willing to get into the grit of the crappy code. Any
> takers ? ;)

Oh - database expert, that's Lionel :-)  But of course, having more
database experts would be great!

> I'll get the patch done tonight after I clear all the other stuff I
> was testing with, going to attempt gerritt for the first time.

Looking forward to the patch!

All the best,
Kendy


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Help Locating Base Code

2012-08-21 Thread Joel Madero
Thanks to everyone who helped me along the way. The code actually ended up
being in formcomponenthandler.cxx,
FormComponentPropertyHandler::impl_browseImage_nothrow.

One simple change and it's good. Many thanks to everyone again, Rafael
ended up locating the exact location and helping me see what I was missing
from my backtrace, talked me through it in IRC which is always appreciated
from us new users.

I think we need to start looking for a database expert, someone who enjoys
it and is willing to get into the grit of the crappy code. Any takers ? ;)

I'll get the patch done tonight after I clear all the other stuff I was
testing with, going to attempt gerritt for the first time.


Best Regards,
Joel

On Tue, Aug 21, 2012 at 10:45 AM, Lionel Elie Mamane wrote:

> On Tue, Aug 21, 2012 at 11:58:15AM +0200, Jan Holesovsky wrote:
>
> > On 2012-08-20 at 09:53 -0700, Joel Madero wrote:
>
> >> I am still having a hard time locating the relevant code for this bug
> >> fdo#53001. I did the backtrace with the dialog open and I didn't see
> >> anything useful in there. If someone can help direct me to the
> >> relevant code OR if someone is willing to take the bug and fix it, I
> >> think it's a 20 minute fix but hours upon hours of trying to find the
> >> code has left me a bit frustrated.
>
> > Having read the bug report, it says that it is a 'Link' in the file
> > dialog.  The file dialog is located in the fpicker/ subdir, so (...)
>
> I intended to get back to helping Joel after fixing my bug-of-the-day,
> which took longer than anticipated.
>
> Kendy, thanks for helping Joel.
>
> Joel, if you have any other question/difficulty, feel free to continue
> this thread.
>
> --
> Lionel
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Help Locating Base Code

2012-08-21 Thread Lionel Elie Mamane
On Tue, Aug 21, 2012 at 11:58:15AM +0200, Jan Holesovsky wrote:

> On 2012-08-20 at 09:53 -0700, Joel Madero wrote:

>> I am still having a hard time locating the relevant code for this bug
>> fdo#53001. I did the backtrace with the dialog open and I didn't see
>> anything useful in there. If someone can help direct me to the
>> relevant code OR if someone is willing to take the bug and fix it, I
>> think it's a 20 minute fix but hours upon hours of trying to find the
>> code has left me a bit frustrated. 

> Having read the bug report, it says that it is a 'Link' in the file
> dialog.  The file dialog is located in the fpicker/ subdir, so (...)

I intended to get back to helping Joel after fixing my bug-of-the-day,
which took longer than anticipated.

Kendy, thanks for helping Joel.

Joel, if you have any other question/difficulty, feel free to continue
this thread.

-- 
Lionel
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Help Locating Base Code

2012-08-21 Thread Jan Holesovsky
Hi Joel,

On 2012-08-20 at 09:53 -0700, Joel Madero wrote:

> I am still having a hard time locating the relevant code for this bug
> fdo#53001. I did the backtrace with the dialog open and I didn't see
> anything useful in there. If someone can help direct me to the
> relevant code OR if someone is willing to take the bug and fix it, I
> think it's a 20 minute fix but hours upon hours of trying to find the
> code has left me a bit frustrated. 

Having read the bug report, it says that it is a 'Link' in the file
dialog.  The file dialog is located in the fpicker/ subdir, so

git grep Link fpicker/ | grep src
fpicker/source/office/OfficeFilePicker.src:Text [ en-US ] = "~Link" ;

When you open it, you see that its identifier is
STR_SVT_FILEPICKER_INSERT_AS_LINK; and in the output of

git grep STR_SVT_FILEPICKER_INSERT_AS_LINK

the is interesting is fpicker/source/office/iodlg.cxx; so looking there,
it is set when SFX_EXTRA_INSERTASLINK bit is set, so grepping for that:

git grep SFX_EXTRA_INSERTASLINK

the interesting one seems to be
fpicker/source/office/OfficeFilePicker.cxx; it is set with
TemplateDescription::FILEOPEN_LINK_PREVIEW_IMAGE_TEMPLATE or
TemplateDescription::FILEOPEN_LINK_PREVIEW; so let's git grep for that:

git grep FILEOPEN_LINK_PREVIEW

and voila! - we have a hit in reportdesign:

reportdesign/source/ui/report/ReportController.cxx

So the code that controls this is 

void OReportController::insertGraphic()

There is even

xController->enableControl(ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_LINK,
 sal_False/*sal_True*/);

in there - so it seems to me that the code tries to disable the
checkbox ;-)

In the bug report, I miss the information if the bug appears with the
native Windows file picker, or the LibreOffice one; if the former, I'd
look around fpicker/source/win32/filepicker (here git grep
CHECKBOX_LINK, probably), if the latter, then I'd try
fpicker/source/office.

Please let me know if you need any further help.  Sorry - you've picked
a not really straight-forward bug ;-)

All the best,
Kendy

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Help Locating Base Code

2012-08-20 Thread Joel Madero
I am still having a hard time locating the relevant code for this bug
fdo#53001. I did the backtrace with the dialog open and I didn't see
anything useful in there. If someone can help direct me to the relevant
code OR if someone is willing to take the bug and fix it, I think it's a 20
minute fix but hours upon hours of trying to find the code has left me a
bit frustrated.

Best Regards,
Joel

On Thu, Aug 9, 2012 at 10:34 AM, Joel Madero  wrote:

> Thanks to everyone. I have successfully done my first backtrace :) It was
> unrelated but I see things that make sense  :) now time to try to locate
> this dialog and the trigger that is affecting image linking.
>
>
> Joel
>
>
> On Wed, Aug 8, 2012 at 11:49 PM, Jan Holesovsky  wrote:
>
>> Hi Joel,
>>
>> Joel Madero píše v St 08. 08. 2012 v 18:35 -0700:
>>
>> > Thanks for the advice. Unfortunately every time I run "run" and get into
>> > database I get a segfault in gdb.
>> >
>> > Program received signal SIGSEGV, Segmentation fault.
>> > [Switching to Thread 0x7fffc2d06700 (LWP 4977)]
>>
>> To see where it crashed, do 'bt' in gdb - that will show you backtrace
>> of the crash.  If it looks unrelated, do 'thread apply all bt' which
>> will show backtrace of all threads.
>>
>> > Not sure why. Also mine looks nothing like Lionel's did when he ran gdb.
>> > Mine looks more like this:
>>
>> After issuing 'bt' (Lionel's "and look at the backtrace"), you should
>> see something similar to Lionel's output :-)
>>
>> All the best,
>> Kendy
>>
>>
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Help Locating Base Code

2012-08-09 Thread Joel Madero
Thanks to everyone. I have successfully done my first backtrace :) It was
unrelated but I see things that make sense  :) now time to try to locate
this dialog and the trigger that is affecting image linking.


Joel

On Wed, Aug 8, 2012 at 11:49 PM, Jan Holesovsky  wrote:

> Hi Joel,
>
> Joel Madero píše v St 08. 08. 2012 v 18:35 -0700:
>
> > Thanks for the advice. Unfortunately every time I run "run" and get into
> > database I get a segfault in gdb.
> >
> > Program received signal SIGSEGV, Segmentation fault.
> > [Switching to Thread 0x7fffc2d06700 (LWP 4977)]
>
> To see where it crashed, do 'bt' in gdb - that will show you backtrace
> of the crash.  If it looks unrelated, do 'thread apply all bt' which
> will show backtrace of all threads.
>
> > Not sure why. Also mine looks nothing like Lionel's did when he ran gdb.
> > Mine looks more like this:
>
> After issuing 'bt' (Lionel's "and look at the backtrace"), you should
> see something similar to Lionel's output :-)
>
> All the best,
> Kendy
>
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Help Locating Base Code

2012-08-09 Thread Jan Holesovsky
Hi Joel,

Joel Madero píše v St 08. 08. 2012 v 18:35 -0700:

> Thanks for the advice. Unfortunately every time I run "run" and get into 
> database I get a segfault in gdb.
> 
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 0x7fffc2d06700 (LWP 4977)]

To see where it crashed, do 'bt' in gdb - that will show you backtrace
of the crash.  If it looks unrelated, do 'thread apply all bt' which
will show backtrace of all threads.

> Not sure why. Also mine looks nothing like Lionel's did when he ran gdb. 
> Mine looks more like this:

After issuing 'bt' (Lionel's "and look at the backtrace"), you should
see something similar to Lionel's output :-)

All the best,
Kendy

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Help Locating Base Code

2012-08-09 Thread Lionel Elie Mamane
On Wed, Aug 08, 2012 at 06:35:18PM -0700, Joel Madero wrote:
> On 08/08/2012 06:01 AM, Michael Meeks wrote:
>> On Wed, 2012-08-08 at 07:32 +0200, Lionel Elie Mamane wrote:
>>> On Tue, Aug 07, 2012 at 06:50:22PM -0700, Joel Madero wrote:

 I'm trying to locate the code that handles the dialog that appears when you
 do the following steps in base:

>>> To answer this kind of questions, I find it useful to run a build
>>> with symbols (debug build) under gdb. Then, when the dialog is
>>> open, just press CTRL-C in gdb


> Thanks for the advice. Unfortunately every time I run "run" and get
> into database I get a segfault in gdb.

> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 0x7fffc2d06700 (LWP 4977)]

And the backtrace (commmand "bt") looks like:

#1 0x454545453 in ?
#2 0x4545abc85 in ?
#3 0x4545df778 in ?

Right?

That's Java code hitting an unitialised (object) variable. Just type
"continue". To get gdb to not stop/handle SIGSEGV, but only pass it to
the program, the command is:

handle SIGSEGV pass noprint nostop

But if you are hunting for a "real" segfault, then you'll also miss
the one you are hunting for :) Luckily that is not your case here.

(
 When hunting for a segfault, I usually just type "continue" a few
 times until I get to the right one, or I disable gdb's handling of
 segfaults until I know the one I want is near, and then reenable it:

 handle SIGSEGV pass print stop
)


Also, before running soffice.bin in gdb, I thought one needed to
"source ooenv". You did that?

> Not sure why. Also mine looks nothing like Lionel's did when he ran
> gdb. Mine looks more like this:

> [New Thread 0x7fffb8fff700 (LWP 4966)]
> [New Thread 0x7fffb8efe700 (LWP 4967)]
> [New Thread 0x7fffb8dfd700 (LWP 4968)]
> [New Thread 0x7fffb8cfc700 (LWP 4969)]
> [New Thread 0x7fffb8bfb700 (LWP 4970)]
> [New Thread 0x7fffb8afa700 (LWP 4971)]
> [New Thread 0x7fffb89f9700 (LWP 4972)]
> [Thread 0x7fffc2d06700 (LWP 4962) exited]
> [New Thread 0x7fffd08a3700 (LWP 4973)]
> [New Thread 0x7fffc2d06700 (LWP 4974)]
> [New Thread 0x7fff93fff700 (LWP 4975)]
> [Thread 0x7fff93fff700 (LWP 4975) exited]
> [Thread 0x7fffc2d06700 (LWP 4974) exited]
> [New Thread 0x7fffc2d06700 (LWP 4977)]
> [New Thread 0x7fffc9667700 (LWP 4978)]

That looks right; I showed you only the interesting portion of the
backtrace command's output, not the whole gdb session.

-- 
Lionel
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Help Locating Base Code

2012-08-08 Thread Joel Madero

On 08/08/2012 06:01 AM, Michael Meeks wrote:

On Wed, 2012-08-08 at 07:32 +0200, Lionel Elie Mamane wrote:

On Tue, Aug 07, 2012 at 06:50:22PM -0700, Joel Madero wrote:

I'm trying to locate the code that handles the dialog that appears when you
do the following steps in base:

To answer this kind of questions, I find it useful to run a build with
symbols (debug build) under gdb. Then, when the dialog is open, just
press CTRL-C in gdb

So - that is one way :-) another way is to grep for the UI strings,
which usually come from a .src file; so

git --no-pager grep -2 "Create Report in Design View"
dbaccess/source/ui/app/app.src-String RID_STR_NEW_REPORT
dbaccess/source/ui/app/app.src-{
dbaccess/source/ui/app/app.src:Text [ en-US ] = "Create Report in Design 
View..." ;
dbaccess/source/ui/app/app.src-};
dbaccess/source/ui/app/app.src-

Maps the string to the ID, then grep for that RID_STR_...

git --no-pager grep -2 RID_STR_NEW_REPORT
dbaccess/source/ui/app/AppDetailView.cxx-
dbaccess/source/ui/app/AppDetailView.cxx-case E_REPORT:
dbaccess/source/ui/app/AppDetailView.cxx:rList.push_back( TaskEntry( 
".uno:DBNewReport", RID_STR_REPORT_HELP_TEXT, RID_STR_NEW_REPORT, true ) );
dbaccess/source/ui/app/AppDetailView.cxx:rList.push_back( TaskEntry( 
".uno:DBNewReportAutoPilot", RID_STR_REPORTS_HELP_TEXT_WIZARD, 
RID_STR_NEW_REPORT_AUTO ) );
dbaccess/source/ui/app/AppDetailView.cxx-_rData.nTitleId = 
RID_STR_REPORTS_CONTAINER;
dbaccess/source/ui/app/AppDetailView.cxx-break;

So somewhere thereabouts :-)

There was (IIRC) an easy-hack to create some web infrastructure that
would help do this lookup (particularly with accelerator keys) for new
developers - that'd be an awesome thing to build of course - a bit of
php (or somesuch) interfacing to a database built by some 'git greps ?'

All the best,

Michael.



Thanks for the advice. Unfortunately every time I run "run" and get into 
database I get a segfault in gdb.


Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffc2d06700 (LWP 4977)]

Not sure why. Also mine looks nothing like Lionel's did when he ran gdb. 
Mine looks more like this:


[New Thread 0x7fffb8fff700 (LWP 4966)]
[New Thread 0x7fffb8efe700 (LWP 4967)]
[New Thread 0x7fffb8dfd700 (LWP 4968)]
[New Thread 0x7fffb8cfc700 (LWP 4969)]
[New Thread 0x7fffb8bfb700 (LWP 4970)]
[New Thread 0x7fffb8afa700 (LWP 4971)]
[New Thread 0x7fffb89f9700 (LWP 4972)]
[Thread 0x7fffc2d06700 (LWP 4962) exited]
[New Thread 0x7fffd08a3700 (LWP 4973)]
[New Thread 0x7fffc2d06700 (LWP 4974)]
[New Thread 0x7fff93fff700 (LWP 4975)]
[Thread 0x7fff93fff700 (LWP 4975) exited]
[Thread 0x7fffc2d06700 (LWP 4974) exited]
[New Thread 0x7fffc2d06700 (LWP 4977)]
[New Thread 0x7fffc9667700 (LWP 4978)]


Any help appreciated. Thanks all


Joel

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Help Locating Base Code

2012-08-08 Thread Rafael Dominguez
After that, to execute the program you need to type run and press enter
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Help Locating Base Code

2012-08-08 Thread Joel Madero

On 08/08/2012 11:34 AM, Jan Holesovsky wrote:

gdb ./soffice.bin

when I do that all I get is this:

joel@joel-Studio-1737:/data/git/libo/install/program$ gdb ./soffice.bin
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2) 7.4-2012.04
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 


This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
...
Reading symbols from 
/data/git/libo/solver/unxlngx6.pro/installation/opt/program/soffice.bin...done.



LibreOffice doesn't actually start at all :-/

Joel
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Help Locating Base Code

2012-08-08 Thread Jan Holesovsky
Hi Joel,

On 2012-08-08 at 08:24 -0700, Joel Madero wrote:

> 1. For getting a bit more in depth instructions, is it best to ask
> here or in IRC? I believe (almost positive) that my Libo is installed
> with symbols enabled, so I want to try to do the gdb method but need
> kind of a complete breakdown of what to do (I believe it's only a few
> steps). 

Both works - the way you choose depends on how fast do you need the
answer :-) - IRC is usually faster, OTOH asking on the ML can teach more
people how to do things.

> 2. If the best place to ask is here, could someone be kind enough to
> write out the few steps?

Just one more thing, the 'gdb' way works only when you are on Linux ;-)
- on Windows you have to use the MSVC debugger.

So provided that you are on Linux, just go to the subdir where you have
installed your LO, do

gdb ./soffice.bin

and continue as Lionel advised.  More about debugging is here:

http://wiki.documentfoundation.org/Development/How_to_debug

Hope that helps,
Kendy

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Help Locating Base Code

2012-08-08 Thread Joel Madero
Thanks to both of you. I have tried the gdb method before and honestly, for
a new programmer, our directions aren't the best on the wiki. I am yet to
successfully make progress but I am going to figure it out this time around
since it seems like that's what is needed. Usually I just grep the label
for something I am search for and then backtrack from there, seeing where
it is used and how and sooner or later I find the code that I'm looking
for. In this case Lionel is right, both the "..." and the "pictures" labels
are both so generic that they are useless for tracking down the code. Also
it seems like these dialogs are a bit complex (seems like they could be
simplified but that's probably for another day ;) ). So my next question is
two fold...

1. For getting a bit more in depth instructions, is it best to ask here or
in IRC? I believe (almost positive) that my Libo is installed with symbols
enabled, so I want to try to do the gdb method but need kind of a complete
breakdown of what to do (I believe it's only a few steps).

2. If the best place to ask is here, could someone be kind enough to write
out the few steps?

Again thank you for all of your patience. I feel like I'm starting to get a
grasp on the code :)


Joel

On Wed, Aug 8, 2012 at 6:20 AM, Lionel Elie Mamane  wrote:

> On Wed, Aug 08, 2012 at 02:01:28PM +0100, Michael Meeks wrote:
> > On Wed, 2012-08-08 at 07:32 +0200, Lionel Elie Mamane wrote:
> >> On Tue, Aug 07, 2012 at 06:50:22PM -0700, Joel Madero wrote:
>
> >>> I'm trying to locate the code that handles the dialog that appears
> when you
> >>> do the following steps in base:
>
> >> To answer this kind of questions, I find it useful to run a build with
> >> symbols (debug build) under gdb. Then, when the dialog is open, just
> >> press CTRL-C in gdb
>
> >   So - that is one way :-) another way is to grep for the UI strings,
> > which usually come from a .src file; so
>
> > git --no-pager grep -2 "Create Report in Design View"
>
> In general, you are right, this is a useful technique that needs less
> tooling, and I didn't think of mentioning it.
>
> In this case, however, Joel was looking for a _different_ thing than
> what you show in the example. He wanted to see what creates the dialog
> titled "Picture" when one presses the button labelled "...".
>
> As these are quite generic labels, in this case, the gdb technique is
> faster / more accurate, assuming you already have a build with
> symbols.
>
> --
> Lionel
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Help Locating Base Code

2012-08-08 Thread Lionel Elie Mamane
On Wed, Aug 08, 2012 at 02:01:28PM +0100, Michael Meeks wrote:
> On Wed, 2012-08-08 at 07:32 +0200, Lionel Elie Mamane wrote:
>> On Tue, Aug 07, 2012 at 06:50:22PM -0700, Joel Madero wrote:

>>> I'm trying to locate the code that handles the dialog that appears when you
>>> do the following steps in base:

>> To answer this kind of questions, I find it useful to run a build with
>> symbols (debug build) under gdb. Then, when the dialog is open, just
>> press CTRL-C in gdb

>   So - that is one way :-) another way is to grep for the UI strings,
> which usually come from a .src file; so

> git --no-pager grep -2 "Create Report in Design View"

In general, you are right, this is a useful technique that needs less
tooling, and I didn't think of mentioning it.

In this case, however, Joel was looking for a _different_ thing than
what you show in the example. He wanted to see what creates the dialog
titled "Picture" when one presses the button labelled "...".

As these are quite generic labels, in this case, the gdb technique is
faster / more accurate, assuming you already have a build with
symbols.

-- 
Lionel
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Help Locating Base Code

2012-08-08 Thread Michael Meeks

On Wed, 2012-08-08 at 07:32 +0200, Lionel Elie Mamane wrote:
> On Tue, Aug 07, 2012 at 06:50:22PM -0700, Joel Madero wrote:
> > I'm trying to locate the code that handles the dialog that appears when you
> > do the following steps in base:
> 
> To answer this kind of questions, I find it useful to run a build with
> symbols (debug build) under gdb. Then, when the dialog is open, just
> press CTRL-C in gdb

So - that is one way :-) another way is to grep for the UI strings,
which usually come from a .src file; so

git --no-pager grep -2 "Create Report in Design View"
dbaccess/source/ui/app/app.src-String RID_STR_NEW_REPORT
dbaccess/source/ui/app/app.src-{
dbaccess/source/ui/app/app.src:Text [ en-US ] = "Create Report in Design 
View..." ;
dbaccess/source/ui/app/app.src-};
dbaccess/source/ui/app/app.src-

Maps the string to the ID, then grep for that RID_STR_...

git --no-pager grep -2 RID_STR_NEW_REPORT
dbaccess/source/ui/app/AppDetailView.cxx-
dbaccess/source/ui/app/AppDetailView.cxx-case E_REPORT:
dbaccess/source/ui/app/AppDetailView.cxx:rList.push_back( TaskEntry( 
".uno:DBNewReport", RID_STR_REPORT_HELP_TEXT, RID_STR_NEW_REPORT, true ) );
dbaccess/source/ui/app/AppDetailView.cxx:rList.push_back( TaskEntry( 
".uno:DBNewReportAutoPilot", RID_STR_REPORTS_HELP_TEXT_WIZARD, 
RID_STR_NEW_REPORT_AUTO ) );
dbaccess/source/ui/app/AppDetailView.cxx-_rData.nTitleId = 
RID_STR_REPORTS_CONTAINER;
dbaccess/source/ui/app/AppDetailView.cxx-break;

So somewhere thereabouts :-)

There was (IIRC) an easy-hack to create some web infrastructure that
would help do this lookup (particularly with accelerator keys) for new
developers - that'd be an awesome thing to build of course - a bit of
php (or somesuch) interfacing to a database built by some 'git greps ?'

All the best,

Michael.

-- 
michael.me...@suse.com  <><, Pseudo Engineer, itinerant idiot

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Help Locating Base Code

2012-08-07 Thread Lionel Elie Mamane
On Tue, Aug 07, 2012 at 06:50:22PM -0700, Joel Madero wrote:

> I'm trying to locate the code that handles the dialog that appears when you
> do the following steps in base:

To answer this kind of questions, I find it useful to run a build with
symbols (debug build) under gdb. Then, when the dialog is open, just
press CTRL-C in gdb, and look at the backtrace. Usually you'll even be
in the right thread, else have a look at "thread apply all bt 10" and
usually it is quite clear which thread is the right one.

In this case:

#4  0x7f003f85217c in RunDialog::run (this=0x2e2a8c0)
at 
/home/master/src/libreoffice/core/vcl/unx/gtk/fpicker/SalGtkPicker.cxx:183
#5  0x7f003f8581e1 in SalGtkFilePicker::execute (this=0x25bfba0)
at 
/home/master/src/libreoffice/core/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx:995
#6  0x7f004bbd9bfa in sfx2::FileDialogHelper_Impl::implDoExecute (
this=this@entry=0x25bf0f0)
at 
/home/master/src/libreoffice/core/sfx2/source/dialog/filedlghelper.cxx:1336
#7  0x7f004bbdb18a in sfx2::FileDialogHelper_Impl::execute (this=0x25bf0f0)
at 
/home/master/src/libreoffice/core/sfx2/source/dialog/filedlghelper.cxx:1604
#8  0x7f004bbdff7c in sfx2::FileDialogHelper::Execute (this=0x7fff3b0c4830)
at 
/home/master/src/libreoffice/core/sfx2/source/dialog/filedlghelper.cxx:2409
#9  0x7f001f47c298 in 
pcr::FormComponentPropertyHandler::impl_browseForImage_nothrow (this=0x29ba300, 
_out_rNewValue=empty uno::Any, _rClearBeforeDialog=...)
at 
/home/master/src/libreoffice/core/extensions/source/propctrlr/formcomponenthandler.cxx:2814
#10 0x7f001f4747cd in 
pcr::FormComponentPropertyHandler::onInteractivePropertySelection 
(this=0x29ba300, _rPropertyName="ImageURL", _rData=empty uno::Any, 
_rxInspectorUI=...)
at 
/home/master/src/libreoffice/core/extensions/source/propctrlr/formcomponenthandler.cxx:1472
#11 0x7f001fcc0c12 in 
rptui::GeometryHandler::onInteractivePropertySelection (this=0x2beaa10, 
PropertyName="ImageURL", Primary=, _rData=empty uno::Any, 
_rxInspectorUI=...)
at 
/home/master/src/libreoffice/core/reportdesign/source/ui/inspection/GeometryHandler.cxx:1483
#12 0x7f001f3a31e2 in pcr::OPropertyBrowserController::Clicked 
(this=0x2819870, _rName="ImageURL", _bPrimary=)
at 
/home/master/src/libreoffice/core/extensions/source/propctrlr/propcontroller.cxx:1351
#13 0x7f001f3dd267 in pcr::OBrowserListBox::buttonClicked (this=0x2da3e40, 
_pLine=0x2bc0300, _bPrimary=)
at 
/home/master/src/libreoffice/core/extensions/source/propctrlr/browserlistbox.cxx:904
#14 0x7f001f42bcaa in pcr::OBrowserLine::OnButtonClicked (this=0x2bc0300, 
_pButton=0x2bc56d0)
at 
/home/master/src/libreoffice/core/extensions/source/propctrlr/browserline.cxx:502
#15 0x7f001f42bc4d in pcr::OBrowserLine::LinkStubOnButtonClicked 
(pThis=0x2bc0300, pCaller=0x2bc56d0)
at 
/home/master/src/libreoffice/core/extensions/source/propctrlr/browserline.cxx:499
#16 0x7f004911d1e8 in Link::Call (this=this@entry=0x2bc58c8, 
pCaller=pCaller@entry=0x2bc56d0)
at /home/master/src/libreoffice/core/solver/unxlngx6/inc/tools/link.hxx:140
#17 0x7f004916ae79 in Control::ImplCallEventListenersAndHandler (this=
0x2bc56d0, nEvent=1102, rHandler=..., pCaller=0x2bc56d0)
at /home/master/src/libreoffice/core/vcl/source/control/ctrl.cxx:383
#18 0x7f004914fc7a in Button::Click (this=0x2bc56d0)
at /home/master/src/libreoffice/core/vcl/source/control/button.cxx:122
#19 0x7f004915471b in PushButton::Tracking (this=0x2bc56d0, rTEvt=...)
at /home/master/src/libreoffice/core/vcl/source/control/button.cxx:1288
#20 0x7f0049589244 in Window::EndTracking (this=0x2bc56d0, 
nFlags=)
at /home/master/src/libreoffice/core/vcl/source/window/window2.cxx:758
#21 0x7f00495c0a11 in ImplHandleMouseEvent (pWindow=pWindow@entry=
0x27f0e50, nSVEvent=nSVEvent@entry=2, bMouseLeave=bMouseLeave@entry=0 
'\000', nX=1021, nY=462, nMsgTime=471828910, nCode=1, nMode=3)
at /home/master/src/libreoffice/core/vcl/source/window/winproc.cxx:810
#22 0x7f00495c63f7 in ImplHandleSalMouseButtonUp 
(pWindow=pWindow@entry=0x27f0e50, pEvent=pEvent@entry=0x7fff3b0c5630)
at /home/master/src/libreoffice/core/vcl/source/window/winproc.cxx:2089
#23 0x7f00495c56a2 in ImplWindowFrameProc (pWindow=0x27f0e50, 
nEvent=, pEvent=0x7fff3b0c5630)
at /home/master/src/libreoffice/core/vcl/source/window/winproc.cxx:2418
#24 0x7f003f84ab25 in SalFrame::CallCallback (this=this@entry=0x27f12e0, 
nEvent=nEvent@entry=4, pEvent=pEvent@entry=0x7fff3b0c5630)
at /home/master/src/libreoffice/core/vcl/inc/salframe.hxx:294
#25 0x7f003f846bc6 in GtkSalFrame::signalButton (pEvent=0x2cef980, 
frame=0x27f12e0)
at /home/master/src/libreoffice/core/vcl/unx/gtk/window/gtkframe.cxx:2882

-- 
Lionel
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Help Locating Base Code

2012-08-07 Thread Joel Madero
Hi All,

Spent a few hours trying to track this down and I can't figure it out so
hoping someone can guide me in the right direction.

I'm trying to locate the code that handles the dialog that appears when you
do the following steps in base:

1. From Start Center create and save new "sample.odb"
2. Database-Pane: 
3. Tasks-Pane: 'Create Report in Design View ...'
> Report Designer appears
4. Click into Page footer
(Related properties appear at the right)
5. Click 'Graphic' icon in toolbar
6. Draw a 20mm x 20mm with pushed mouse button into footer field
Propperties field will change to Image control will appear at the right
7. In 'Image control -> General' nearby bottom in line "Graphics" click
'...' button To insert a picture


The dialog that appears simply says "Picture" as the header. If someone can
guide me to the relevant code, more specifically I'm trying to see how it's
passing on the default of "unlinked" to that dialog. If you go to "Insert
-> Image" the check mark is checked by default. Would be nice to track that
down as well so that I can compare the two.


Thanks for your guidance and continuing patience with my beginner skills :)

Joel
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice