Re: [Libreoffice] [MHST] GDB doesn't show name of methods in backtrace

2011-08-08 Thread Jan Holesovsky
Hi Ta Tung,

Ta Duc Tung píše v St 03. 08. 2011 v 15:16 +0700:

 I attach the patch for sw. It's used to add a radio button to print 
 dialog in Writer. Please apply and see the bug.
 In this patch, I add a new radio button named Current page to print 
 dialog.

Instead of this approach, I've just pushed your patch that defaults the
page range to print to current page, instead of all the pages.

But actually it might be better to CC the UX list for advice - what is
preferred?  'Current page' radio button, or is it enough to default the
'Pages' input line to the current page (page containing the cursor)?

Regards,
Kendy

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


Re: [Libreoffice] [MHST] GDB doesn't show name of methods in backtrace

2011-08-03 Thread Ta Duc Tung

On 08/02/2011 05:06 PM, Ta Duc Tung wrote:

On 08/01/2011 06:55 PM, Michael Meeks wrote:

Hi there,

On Thu, 2011-07-28 at 01:09 +0700, Ta Duc Tung wrote:
I've tried to make with debug=t but no change. GDB log still the 
same :(

Any one please help!
You need to 'make clean' in sw and then 'make debug=true' - and 
-then-

you need to ensure that your install is linked to the dev tree with
solenv/bin/linkoo.

Then you need to re-run gdb, (with ooenv sourced), and you should 
have

more luck.

Thanks !

Michael.


Hi,

Firstly, I want to thank Michael. I still don't know how to ensure 
whether my install is linked to the dev tree but follow your word, GDB 
is somehow working (even there are still some ?? things, but at 
least, I can next and step now).


I've try to use DDD to debug the code and I get this Segmentation Fault
http://pastebin.com/6ciQanTq

The bug above happens when I try to add a radio button to print dialog 
of Writer. Like this:

http://pastebin.com/mS2G3e8t

Please, how to fix this fault. I think I miss something in adding new 
radiobutton, but I don't know where it is.


Thanks and Best Regards,
Ta Tung

Hi,

I attach the patch for sw. It's used to add a radio button to print 
dialog in Writer. Please apply and see the bug.
In this patch, I add a new radio button named Current page to print 
dialog. It does appears but when I click to choose that radio button, 
Writer gets terminated.


Thanks and Best Regards,
Ta Tung

PS: Thank you, Caolán.
diff --git a/sw/source/core/view/printdata.cxx 
b/sw/source/core/view/printdata.cxx
index db5313d..b59372d 100644
--- a/sw/source/core/view/printdata.cxx
+++ b/sw/source/core/view/printdata.cxx
@@ -195,8 +195,8 @@ SwPrintUIOptions::SwPrintUIOptions(
 {
 ResStringArray aLocalizedStrings( SW_RES( STR_PRINTOPTUI ) );
 
-OSL_ENSURE( aLocalizedStrings.Count() = 30, resource incomplete );
-if( aLocalizedStrings.Count()  30 ) // bad resource ?
+OSL_ENSURE( aLocalizedStrings.Count() = 31, resource incomplete );
+if( aLocalizedStrings.Count()  31 ) // bad resource ?
 return;
 
 // printing HTML sources does not have any valid UI options.
@@ -310,9 +310,9 @@ SwPrintUIOptions::SwPrintUIOptions(
 
 // create a choice for the content to create
 rtl::OUString aPrintRangeName( RTL_CONSTASCII_USTRINGPARAM( PrintContent 
) );
-uno::Sequence rtl::OUString  aChoices( 3 );
-uno::Sequence sal_Bool  aChoicesDisabled( 3 );
-uno::Sequence rtl::OUString  aHelpIds( 3 );
+uno::Sequence rtl::OUString  aChoices( 4 );
+uno::Sequence sal_Bool  aChoicesDisabled( 4 );
+uno::Sequence rtl::OUString  aHelpIds( 4 );
 aChoices[0] = aLocalizedStrings.GetString( 27 );
 aChoicesDisabled[0] = sal_False;
 aHelpIds[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 
.HelpID:vcl:PrintDialog:PrintContent:RadioButton:0 ) );
@@ -321,7 +321,11 @@ SwPrintUIOptions::SwPrintUIOptions(
 aHelpIds[1] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 
.HelpID:vcl:PrintDialog:PrintContent:RadioButton:1 ) );
 aChoices[2] = aLocalizedStrings.GetString( 29 );
 aChoicesDisabled[2] = sal_Bool(! bHasSelection);
-aHelpIds[2] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 
.HelpID:vcl:PrintDialog:PrintContent:RadioButton:2 ) );
+aHelpIds[2] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 
.HelpID:vcl:PrintDialog:PrintContent:RadioButton:2 ) );
+aChoices[3] = aLocalizedStrings.GetString( 30 );
+aChoicesDisabled[3] = sal_False;
+aHelpIds[3] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 
.HelpID:vcl:PrintDialog:PrintContent:RadioButton:3 ) );
+
 m_aUIProperties[nIdx++].Value = getChoiceControlOpt( rtl::OUString(),
  aHelpIds,
  aPrintRangeName,
diff --git a/sw/source/ui/config/optdlg.src b/sw/source/ui/config/optdlg.src
index 8a21f45..3264001 100644
--- a/sw/source/ui/config/optdlg.src
+++ b/sw/source/ui/config/optdlg.src
@@ -1069,6 +1069,7 @@ StringArray STR_PRINTOPTUI
  ~All pages; ;
  Pa~ges; ;
  ~Selection; ;
+Cu~rrent page; ;
 };
 };
 
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [MHST] GDB doesn't show name of methods in backtrace

2011-08-02 Thread Ta Duc Tung

On 08/01/2011 06:55 PM, Michael Meeks wrote:

Hi there,

On Thu, 2011-07-28 at 01:09 +0700, Ta Duc Tung wrote:

I've tried to make with debug=t but no change. GDB log still the same :(
Any one please help!

You need to 'make clean' in sw and then 'make debug=true' - and -then-
you need to ensure that your install is linked to the dev tree with
solenv/bin/linkoo.

Then you need to re-run gdb, (with ooenv sourced), and you should have
more luck.

Thanks !

Michael.


Hi,

Firstly, I want to thank Michael. I still don't know how to ensure 
whether my install is linked to the dev tree but follow your word, GDB 
is somehow working (even there are still some ?? things, but at least, 
I can next and step now).


I've try to use DDD to debug the code and I get this Segmentation Fault
http://pastebin.com/6ciQanTq

The bug above happens when I try to add a radio button to print dialog 
of Writer. Like this:

http://pastebin.com/mS2G3e8t

Please, how to fix this fault. I think I miss something in adding new 
radiobutton, but I don't know where it is.


Thanks and Best Regards,
Ta Tung
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [MHST] GDB doesn't show name of methods in backtrace

2011-08-02 Thread Caolán McNamara
On Tue, 2011-08-02 at 17:06 +0700, Ta Duc Tung wrote:
 Please, how to fix this fault. I think I miss something in adding new 
 radiobutton, but I don't know where it is.

Attach a patch of your changes which crash for you and someone might
apply it to their local tree and have a look.

FWIW, on the symbols issue I'd add --enable-symbols to
the ./autogen.sh configure line to make sure that everything gets built
with -g

C.

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


Re: [Libreoffice] [MHST] GDB doesn't show name of methods in backtrace

2011-08-01 Thread Michael Meeks
Hi there,

On Thu, 2011-07-28 at 01:09 +0700, Ta Duc Tung wrote:
 I've tried to make with debug=t but no change. GDB log still the same :( 
 Any one please help!

You need to 'make clean' in sw and then 'make debug=true' - and -then-
you need to ensure that your install is linked to the dev tree with
solenv/bin/linkoo.

Then you need to re-run gdb, (with ooenv sourced), and you should have
more luck.

Thanks !

Michael.

-- 
 michael.me...@novell.com  , Pseudo Engineer, itinerant idiot


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


Re: [Libreoffice] [MHST] GDB doesn't show name of methods in backtrace

2011-08-01 Thread Korrawit Pruegsanusak
Hello all,

On Mon, Aug 1, 2011 at 21:45, Ta Duc Tung tatung2...@gmail.com wrote:
 Thanks for your reply, Michael :-)
 Sorry if this is a dump question but, how to ensure that my install is
 linked to the dev tree with solenv/bin/linkoo ?

Not Michael ;) but IMHO you should run
$ solenv/bin/linkoo
with appropriate parameters.

Best Regards,
-- 
Korrawit Pruegsanusak
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [MHST] GDB doesn't show name of methods in backtrace

2011-07-27 Thread Ta Duc Tung

On 07/22/2011 06:51 PM, Andor E wrote:

Hi,
did you build module sw with debug=t? Otherwise you won't get any
method names and line numbers.

Greetings

eymux

On Fri, Jul 22, 2011 at 12:57 PM, Ta Duc Tungtatung2...@gmail.com  wrote:

Hi,
I've tried to add a radio button into print dialog for Writer.
In /sw/source/core/view/printdata.cxx, I have this piece of code (around
line 310)
http://pastebin.com/gMu70wYm
~~~
aChoices[3] = aLocalizedStrings.GetString( 30 );
aChoicesDisabled[3] = sal_False;
aHelpIds[3] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
.HelpID:vcl:PrintDialog:PrintContent:RadioButton:3 ) );
m_aUIProperties[nIdx++].Value = getChoiceControlOpt( rtl::OUString(),
 aHelpIds,
 aPrintRangeName,
 aChoices,
 0 /* always default
to 'All pages' */,
 rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM( Radio ) ),
 aChoicesDisabled
 );


After that I add an item to PRINTOPTUI in /sw/source/ui/config/optdlg.src
--  the Current Page
http://pastebin.com/nrNBz7A6
~~
StringArray STR_PRINTOPTUI
{
ItemList [en-US] =
{
  ..
  ~All pages;;
  Pa~ges;;
  ~Selection;;
  Cu~rrent page;;
};
};
~

When I try to run it, the radio button does appear but when I click on that
radio button (Current page), Writer just stop and dismiss.

I've tried to debug it by gdb and this is the message.
http://pastebin.com/i4QpmjDS

Program received signal SIGSEGV, Segmentation fault.
0x0013391a in rtl_uString_acquire ()
   from
/home/tatung/mhstlibo/git/libo/solver/350/unxlngi6.pro/installation/opt/program/../basis-link/ure-link/lib/libuno_sal.so.3
~

I put breakpoint in SwXTextDocument::getRendererCount() (#5 in gdb log from
pastebin link above). The program does stop at that breakpoint, but when I
want to step in, it just pass through it :( Like this:

Breakpoint 1, 0x04384774 in
SwXTextDocument::getRendererCount(com::sun::star::uno::Any const,
com::sun::star::uno::Sequencecom::sun::star::beans::PropertyValue  const)
()
   from
/home/tatung/mhstlibo/git/libo/solver/350/unxlngi6.pro/installation/opt/program/../basis-link/program/libswlo.so
(gdb) step
Single stepping until exit from function
_ZN15SwXTextDocument16getRendererCountERKN3com3sun4star3uno3AnyERKNS3_8SequenceINS2_5beans13PropertyValueEEE,
which has no line number information.
In unotxdoc.cxx/getRendererCount, after check IsValid()
In unotxdoc.cxx/getRendererCount 1
[New Thread 0xb1620b70 (LWP 14464)]
[Thread 0xb1620b70 (LWP 14464) exited]
[New Thread 0xb223fb70 (LWP 14465)]
In unotxdoc.cxx/getRendererCount 2
In unotxdoc.cxx/getRendererCount 3
In unotxdoc.cxx/getRendererCount 4
In unotxdoc.cxx/getRendererCount/check pSwView 1
[New Thread 0xb1620b70 (LWP 14466)]
[Thread 0xb223fb70 (LWP 14465) exited]
In unotxdoc.cxx/getRendererCount/check pSwView 2
In unotxdoc.cxx/getRendererCount/check pSwView 3

Program received signal SIGSEGV, Segmentation fault.
0x0013391a in rtl_uString_acquire ()
   from
/home/tatung/mhstlibo/git/libo/solver/350/unxlngi6.pro/installation/opt/program/../basis-link/ure-link/lib/libuno_sal.so.3
(gdb)
~

Did I miss any thing? Please help :)

Thanks for your help!
Ta Tung

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


Hi,

I've tried to make with debug=t but no change. GDB log still the same :( 
Any one please help!


Thanks,
Ta Tung
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [MHST] GDB doesn't show name of methods in backtrace

2011-07-27 Thread Ta Duc Tung

On 07/22/2011 06:51 PM, Andor E wrote:

Hi,
did you build module sw with debug=t? Otherwise you won't get any
method names and line numbers.

Greetings

eymux

On Fri, Jul 22, 2011 at 12:57 PM, Ta Duc Tungtatung2...@gmail.com  wrote:

Hi,
I've tried to add a radio button into print dialog for Writer.
In /sw/source/core/view/printdata.cxx, I have this piece of code (around
line 310)
http://pastebin.com/gMu70wYm
~~~
aChoices[3] = aLocalizedStrings.GetString( 30 );
aChoicesDisabled[3] = sal_False;
aHelpIds[3] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
.HelpID:vcl:PrintDialog:PrintContent:RadioButton:3 ) );
m_aUIProperties[nIdx++].Value = getChoiceControlOpt( rtl::OUString(),
 aHelpIds,
 aPrintRangeName,
 aChoices,
 0 /* always default
to 'All pages' */,
 rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM( Radio ) ),
 aChoicesDisabled
 );


After that I add an item to PRINTOPTUI in /sw/source/ui/config/optdlg.src
--  the Current Page
http://pastebin.com/nrNBz7A6
~~
StringArray STR_PRINTOPTUI
{
ItemList [en-US] =
{
  ..
  ~All pages;;
  Pa~ges;;
  ~Selection;;
  Cu~rrent page;;
};
};
~

When I try to run it, the radio button does appear but when I click on that
radio button (Current page), Writer just stop and dismiss.

I've tried to debug it by gdb and this is the message.
http://pastebin.com/i4QpmjDS

Program received signal SIGSEGV, Segmentation fault.
0x0013391a in rtl_uString_acquire ()
   from
/home/tatung/mhstlibo/git/libo/solver/350/unxlngi6.pro/installation/opt/program/../basis-link/ure-link/lib/libuno_sal.so.3
~

I put breakpoint in SwXTextDocument::getRendererCount() (#5 in gdb log from
pastebin link above). The program does stop at that breakpoint, but when I
want to step in, it just pass through it :( Like this:

Breakpoint 1, 0x04384774 in
SwXTextDocument::getRendererCount(com::sun::star::uno::Any const,
com::sun::star::uno::Sequencecom::sun::star::beans::PropertyValue  const)
()
   from
/home/tatung/mhstlibo/git/libo/solver/350/unxlngi6.pro/installation/opt/program/../basis-link/program/libswlo.so
(gdb) step
Single stepping until exit from function
_ZN15SwXTextDocument16getRendererCountERKN3com3sun4star3uno3AnyERKNS3_8SequenceINS2_5beans13PropertyValueEEE,
which has no line number information.
In unotxdoc.cxx/getRendererCount, after check IsValid()
In unotxdoc.cxx/getRendererCount 1
[New Thread 0xb1620b70 (LWP 14464)]
[Thread 0xb1620b70 (LWP 14464) exited]
[New Thread 0xb223fb70 (LWP 14465)]
In unotxdoc.cxx/getRendererCount 2
In unotxdoc.cxx/getRendererCount 3
In unotxdoc.cxx/getRendererCount 4
In unotxdoc.cxx/getRendererCount/check pSwView 1
[New Thread 0xb1620b70 (LWP 14466)]
[Thread 0xb223fb70 (LWP 14465) exited]
In unotxdoc.cxx/getRendererCount/check pSwView 2
In unotxdoc.cxx/getRendererCount/check pSwView 3

Program received signal SIGSEGV, Segmentation fault.
0x0013391a in rtl_uString_acquire ()
   from
/home/tatung/mhstlibo/git/libo/solver/350/unxlngi6.pro/installation/opt/program/../basis-link/ure-link/lib/libuno_sal.so.3
(gdb)
~

Did I miss any thing? Please help :)

Thanks for your help!
Ta Tung

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



Hi,
After some manual tracings, I see that the Segmentation fault happen in
http://opengrok.libreoffice.org/xref/writer/sw/inc/viewsh.hxx#423

~~~
inline const SwViewOption *GetViewOptions() const { return pOpt; }
~~~

I don't know how to fix this. Any hint, please?
After adding new radio button to print dialog as above, do I have to 
modify somewhere to get it work?


Thanks,
Ta Tung
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [MHST] GDB doesn't show name of methods in backtrace

2011-07-23 Thread Ta Duc Tung

On 07/22/2011 06:51 PM, Andor E wrote:

Hi,
did you build module sw with debug=t? Otherwise you won't get any
method names and line numbers.

Greetings

eymux

On Fri, Jul 22, 2011 at 12:57 PM, Ta Duc Tungtatung2...@gmail.com  wrote:

Hi,
I've tried to add a radio button into print dialog for Writer.
In /sw/source/core/view/printdata.cxx, I have this piece of code (around
line 310)
http://pastebin.com/gMu70wYm
~~~
aChoices[3] = aLocalizedStrings.GetString( 30 );
aChoicesDisabled[3] = sal_False;
aHelpIds[3] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
.HelpID:vcl:PrintDialog:PrintContent:RadioButton:3 ) );
m_aUIProperties[nIdx++].Value = getChoiceControlOpt( rtl::OUString(),
 aHelpIds,
 aPrintRangeName,
 aChoices,
 0 /* always default
to 'All pages' */,
 rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM( Radio ) ),
 aChoicesDisabled
 );


After that I add an item to PRINTOPTUI in /sw/source/ui/config/optdlg.src
--  the Current Page
http://pastebin.com/nrNBz7A6
~~
StringArray STR_PRINTOPTUI
{
ItemList [en-US] =
{
  ..
  ~All pages;;
  Pa~ges;;
  ~Selection;;
  Cu~rrent page;;
};
};
~

When I try to run it, the radio button does appear but when I click on that
radio button (Current page), Writer just stop and dismiss.

I've tried to debug it by gdb and this is the message.
http://pastebin.com/i4QpmjDS

Program received signal SIGSEGV, Segmentation fault.
0x0013391a in rtl_uString_acquire ()
   from
/home/tatung/mhstlibo/git/libo/solver/350/unxlngi6.pro/installation/opt/program/../basis-link/ure-link/lib/libuno_sal.so.3
~

I put breakpoint in SwXTextDocument::getRendererCount() (#5 in gdb log from
pastebin link above). The program does stop at that breakpoint, but when I
want to step in, it just pass through it :( Like this:

Breakpoint 1, 0x04384774 in
SwXTextDocument::getRendererCount(com::sun::star::uno::Any const,
com::sun::star::uno::Sequencecom::sun::star::beans::PropertyValue  const)
()
   from
/home/tatung/mhstlibo/git/libo/solver/350/unxlngi6.pro/installation/opt/program/../basis-link/program/libswlo.so
(gdb) step
Single stepping until exit from function
_ZN15SwXTextDocument16getRendererCountERKN3com3sun4star3uno3AnyERKNS3_8SequenceINS2_5beans13PropertyValueEEE,
which has no line number information.
In unotxdoc.cxx/getRendererCount, after check IsValid()
In unotxdoc.cxx/getRendererCount 1
[New Thread 0xb1620b70 (LWP 14464)]
[Thread 0xb1620b70 (LWP 14464) exited]
[New Thread 0xb223fb70 (LWP 14465)]
In unotxdoc.cxx/getRendererCount 2
In unotxdoc.cxx/getRendererCount 3
In unotxdoc.cxx/getRendererCount 4
In unotxdoc.cxx/getRendererCount/check pSwView 1
[New Thread 0xb1620b70 (LWP 14466)]
[Thread 0xb223fb70 (LWP 14465) exited]
In unotxdoc.cxx/getRendererCount/check pSwView 2
In unotxdoc.cxx/getRendererCount/check pSwView 3

Program received signal SIGSEGV, Segmentation fault.
0x0013391a in rtl_uString_acquire ()
   from
/home/tatung/mhstlibo/git/libo/solver/350/unxlngi6.pro/installation/opt/program/../basis-link/ure-link/lib/libuno_sal.so.3
(gdb)
~

Did I miss any thing? Please help :)

Thanks for your help!
Ta Tung

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



Hi,

I've tried to make it with debug=t but no change. Still there that log

~~
(gdb) backtrace
#0  0x0013391a in rtl_uString_acquire ()
   from 
/home/tatung/mhstlibo/git/libo/solver/350/unxlngi6.pro/installation/opt/program/../basis-link/ure-link/lib/libuno_sal.so.3

#1  0x010aee25 in String::Assign(String const) ()
   from 
/home/tatung/mhstlibo/git/libo/solver/350/unxlngi6.pro/installation/opt/program/../basis-link/program/libtllo.so

#2  0x0427fac2 in ?? ()
   from 
/home/tatung/mhstlibo/git/libo/solver/350/unxlngi6.pro/installation/opt/program/../basis-link/program/libswlo.so

#3  0x043812f0 in ?? ()
   from 
/home/tatung/mhstlibo/git/libo/solver/350/unxlngi6.pro/installation/opt/program/../basis-link/program/libswlo.so

#4  0x0419ec9a in ?? ()
   from 

Re: [Libreoffice] [MHST] GDB doesn't show name of methods in backtrace

2011-07-23 Thread Korrawit Pruegsanusak
Hello Ta Duc Tung,

On Sat, Jul 23, 2011 at 16:22, Ta Duc Tung tatung2...@gmail.com wrote:
 On 07/22/2011 06:51 PM, Andor E wrote:
 On Fri, Jul 22, 2011 at 12:57 PM, Ta Duc Tungtatung2...@gmail.com

 I put breakpoint in SwXTextDocument::getRendererCount() (#5 in gdb log
 from
 pastebin link above). The program does stop at that breakpoint, but when
 I
 want to step in, it just pass through it :( Like this:

Maybe setting breakpoint from line number of code instead of function
name could help?

Best Regards,
-- 
Korrawit Pruegsanusak
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice] [MHST] GDB doesn't show name of methods in backtrace

2011-07-22 Thread Ta Duc Tung

Hi,
I've tried to add a radio button into print dialog for Writer.
In /sw/source/core/view/printdata.cxx, I have this piece of code (around 
line 310)

http://pastebin.com/gMu70wYm
~~~
aChoices[3] = aLocalizedStrings.GetString( 30 );
aChoicesDisabled[3] = sal_False;
aHelpIds[3] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 
.HelpID:vcl:PrintDialog:PrintContent:RadioButton:3 ) );

m_aUIProperties[nIdx++].Value = getChoiceControlOpt( rtl::OUString(),
 aHelpIds,
 aPrintRangeName,
 aChoices,
 0 /* always 
default to 'All pages' */,
 rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM( Radio ) ),

 aChoicesDisabled
 );


After that I add an item to PRINTOPTUI in 
/sw/source/ui/config/optdlg.src -- the Current Page

http://pastebin.com/nrNBz7A6
~~
StringArray STR_PRINTOPTUI
{
ItemList [en-US] =
{
  ..
 ~All pages; ;
 Pa~ges; ;
 ~Selection; ;
 Cu~rrent page; ;
};
};
~

When I try to run it, the radio button does appear but when I click on 
that radio button (Current page), Writer just stop and dismiss.


I've tried to debug it by gdb and this is the message.
http://pastebin.com/i4QpmjDS

Program received signal SIGSEGV, Segmentation fault.
0x0013391a in rtl_uString_acquire ()
   from 
/home/tatung/mhstlibo/git/libo/solver/350/unxlngi6.pro/installation/opt/program/../basis-link/ure-link/lib/libuno_sal.so.3

~

I put breakpoint in SwXTextDocument::getRendererCount() (#5 in gdb log 
from pastebin link above). The program does stop at that breakpoint, but 
when I want to step in, it just pass through it :( Like this:


Breakpoint 1, 0x04384774 in 
SwXTextDocument::getRendererCount(com::sun::star::uno::Any const, 
com::sun::star::uno::Sequencecom::sun::star::beans::PropertyValue 
const) ()
   from 
/home/tatung/mhstlibo/git/libo/solver/350/unxlngi6.pro/installation/opt/program/../basis-link/program/libswlo.so

(gdb) step
Single stepping until exit from function 
_ZN15SwXTextDocument16getRendererCountERKN3com3sun4star3uno3AnyERKNS3_8SequenceINS2_5beans13PropertyValueEEE,

which has no line number information.
In unotxdoc.cxx/getRendererCount, after check IsValid()
In unotxdoc.cxx/getRendererCount 1
[New Thread 0xb1620b70 (LWP 14464)]
[Thread 0xb1620b70 (LWP 14464) exited]
[New Thread 0xb223fb70 (LWP 14465)]
In unotxdoc.cxx/getRendererCount 2
In unotxdoc.cxx/getRendererCount 3
In unotxdoc.cxx/getRendererCount 4
In unotxdoc.cxx/getRendererCount/check pSwView 1
[New Thread 0xb1620b70 (LWP 14466)]
[Thread 0xb223fb70 (LWP 14465) exited]
In unotxdoc.cxx/getRendererCount/check pSwView 2
In unotxdoc.cxx/getRendererCount/check pSwView 3

Program received signal SIGSEGV, Segmentation fault.
0x0013391a in rtl_uString_acquire ()
   from 
/home/tatung/mhstlibo/git/libo/solver/350/unxlngi6.pro/installation/opt/program/../basis-link/ure-link/lib/libuno_sal.so.3

(gdb)
~

Did I miss any thing? Please help :)

Thanks for your help!
Ta Tung

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