From 086326eabc0a12487d23ab89798d276146fb7804 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Wed, 7 Jul 2010 19:43:24 +0200 Subject: vcl113: #i110453# support disabled options in a choice --- sw/source/core/view/printdata.cxx | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/sw/source/core/view/printdata.cxx b/sw/source/core/view/printdata.cxx index d67b820fc9..5d8cb3f043 100755 --- a/sw/source/core/view/printdata.cxx +++ b/sw/source/core/view/printdata.cxx @@ -325,22 +325,26 @@ SwPrintUIOptions::SwPrintUIOptions( // create a choice for the content to create rtl::OUString aPrintRangeName( RTL_CONSTASCII_USTRINGPARAM( "PrintContent" ) ); - uno::Sequence< rtl::OUString > aChoices( bHasSelection ? 3 : 2 ); - uno::Sequence< rtl::OUString > aHelpText( bHasSelection ? 3 : 2 ); + uno::Sequence< rtl::OUString > aChoices( 3 ); + uno::Sequence< sal_Bool > aChoicesDisabled( 3 ); + uno::Sequence< rtl::OUString > aHelpText( 3 ); aChoices[0] = aLocalizedStrings.GetString( 38 ); + aChoicesDisabled[0] = sal_False; aHelpText[0] = aLocalizedStrings.GetString( 39 ); aChoices[1] = aLocalizedStrings.GetString( 40 ); + aChoicesDisabled[1] = sal_False; aHelpText[1] = aLocalizedStrings.GetString( 41 ); - if (bHasSelection) - { - aChoices[2] = aLocalizedStrings.GetString( 42 ); - aHelpText[2] = aLocalizedStrings.GetString( 43 ); - } + aChoices[2] = aLocalizedStrings.GetString( 42 ); + aChoicesDisabled[2] = sal_Bool(! bHasSelection); + aHelpText[2] = aLocalizedStrings.GetString( 43 ); m_aUIProperties[nIdx++].Value = getChoiceControlOpt( rtl::OUString(), aHelpText, aPrintRangeName, aChoices, - bHasSelection ? 2 /*enable 'Selection' radio button*/ : 0 /* enable 'All pages' */); + bHasSelection ? 2 /*enable 'Selection' radio button*/ : 0 /* enable 'All pages' */, + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Radio" ) ), + aChoicesDisabled + ); // create a an Edit dependent on "Pages" selected vcl::PrinterOptionsHelper::UIControlOptions aPageRangeOpt( aPrintRangeName, 1, sal_True ); m_aUIProperties[nIdx++].Value = getEditControlOpt( rtl::OUString(), @@ -374,6 +378,7 @@ SwPrintUIOptions::SwPrintUIOptions( aChoices, nPrintPostIts, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "List" ) ), + uno::Sequence< sal_Bool >(), aAnnotOpt ); @@ -441,6 +446,7 @@ SwPrintUIOptions::SwPrintUIOptions( aBRTLChoices, nBRTLChoice, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "List" ) ), + uno::Sequence< sal_Bool >(), aBrochureRTLOpt ); } -- cgit v1.2.3 From f9c5d6dbacda999ba7853b79cd80e295a07042c3 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Thu, 8 Jul 2010 19:03:59 +0200 Subject: vcl113: #i63604# make inputwin for sw and sc adjust to font from system settings --- sw/source/ui/ribbar/inputwin.cxx | 2 ++ 1 file changed, 2 insertions(+) mode change 100644 => 100755 sw/source/ui/ribbar/inputwin.cxx diff --git a/sw/source/ui/ribbar/inputwin.cxx b/sw/source/ui/ribbar/inputwin.cxx old mode 100644 new mode 100755 index 174634af48..3fe5e3edb5 --- a/sw/source/ui/ribbar/inputwin.cxx +++ b/sw/source/ui/ribbar/inputwin.cxx @@ -79,6 +79,8 @@ SwInputWindow::SwInputWindow( Window* pParent, SfxBindings* pBind ) bActive = bIsTable = bDelSel = bResetUndo = bCallUndo = FALSE; FreeResource(); + + aEdit.SetSizePixel( aEdit.CalcMinimumSize() ); SfxImageManager* pManager = SfxImageManager::GetImageManager( SW_MOD() ); pManager->RegisterToolBox(this); -- cgit v1.2.3