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::Sequence<com::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
Context
- [Libreoffice] [MHST] GDB doesn't show name of methods in backtrace · Ta Duc Tung
- (message not available)
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.