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


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"; >;
     };
 };
 

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.