Cancel button in printdialog box not working

2015-04-15 Thread Andy Mendoza
Hi.
I have a problem with the printdialog box of LibreOffice Developer's Build. 
When I click the Cancel button it still proceeds with the printing. I tried 
tracing the code in printdlg.cxx but I get stuck with this line
mpCancelButton-SetClickHdl( LINK(this, PrintDialog, ClickHdl));I don't know 
where SetClickHdl came from and what does it do?How do I fix this problem?
I'm still new with developing LibreOffice so I'm not yet familiar with the flow 
of the codes.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Cancel button in printdialog box not working

2015-04-15 Thread Andy Mendoza
may I ask what's the meaning of this line of code?EndDialog(pButton == 
mpOKButton ? RET_OK : RET_CANCEL);
In my understanding, it means that if mpOKButton is clicked RET_OK is performed 
and if mpCancelButton is clicked RET_CANCEL is performed. Am I right? Could it 
be that the error is within this code? I tried reversing the two(RET_OK and 
RET_CANCEL). the output is still the same. 


 On Wednesday, April 15, 2015 3:12 AM, Michael Stahl mst...@redhat.com 
wrote:
   

 On 15.04.2015 11:13, Andy Mendoza wrote:
 I have a problem with the printdialog box of LibreOffice Developer's
 Build. When I click the Cancel button it still proceeds with the
 printing. I tried tracing the code in printdlg.cxx but I get stuck with
 this line
 
 mpCancelButton-SetClickHdl( LINK(this, PrintDialog, ClickHdl));
 I don't know where SetClickHdl came from and what does it do?
 How do I fix this problem?

that is the fabulous tools LINK macro, the best technology breakthrough
of 1991 or so.

there should be a IMPL_LINK(PrintDialog, ClickHdl ...) in the same file
that is the callback that is set here.


___
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


Adding a linker to library in makefile

2015-04-13 Thread Andy Mendoza
Hi. I added #includemysql/mysql.h to printdlg.cxx because I want it to 
connect to a database I've created. when I build the program it gives an error: 
undefined reference to 'mysql_init()'. I researched and the solution says put a 
linker 'mysql_config --cflags --libs' when compiling. Where do I put this 
linker in the makefiles? I'm still new to LibreOffice hacking. I have an 
application and I want to connect it to LibreOffice to determine how many pages 
to be printed to compare it to the user's remaining credit. if the credit is 
less than the number of pages then the application will cancel the printing. I 
already got the canceling  part. It's the comparing part I don't get because of 
the error: undefined reference to 'mysql_init()'. Hope you would help me out 
with this. Thanks
 ___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice