filter/source/pdf/impdialog.cxx | 12 +++++++++--- sw/source/core/view/printdata.cxx | 3 ++- 2 files changed, 11 insertions(+), 4 deletions(-)
New commits: commit f50363c7008c239d302944144beb256de6a55f38 Author: Daniel Silva <[email protected]> AuthorDate: Sat Dec 8 10:15:26 2018 -0200 Commit: Michael Stahl <[email protected]> CommitDate: Wed Jul 31 18:11:35 2019 +0200 tdf#54908 Make selection active if there's a selection (Writer) If the user make a selection in Writer and then opens print dialog or PDF export dialog, Print Selection is the default option. Change-Id: I46ba90cfeabafef1c05dd3e5008ecf55f177a146 Reviewed-on: https://gerrit.libreoffice.org/64804 Reviewed-by: Michael Stahl <[email protected]> Tested-by: Jenkins diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx index f0b5663eeb10..f6f084fd2fb0 100644 --- a/filter/source/pdf/impdialog.cxx +++ b/filter/source/pdf/impdialog.cxx @@ -504,8 +504,9 @@ void ImpPDFTabGeneralPage::SetFilterConfigItem(ImpPDFTabDialog* pParent) mxRbAll->connect_toggled( LINK( this, ImpPDFTabGeneralPage, ToggleAllHdl ) ); TogglePagesHdl(); - mxRbSelection->set_sensitive( pParent->mbSelectionPresent ); - if ( pParent->mbSelectionPresent ) + const bool bSelectionPresent = pParent->mbSelectionPresent; + mxRbSelection->set_sensitive( bSelectionPresent ); + if ( bSelectionPresent ) mxRbSelection->connect_toggled( LINK( this, ImpPDFTabGeneralPage, ToggleSelectionHdl ) ); mbIsPresentation = pParent->mbIsPresentation; mbIsWriter = pParent->mbIsWriter; @@ -612,7 +613,12 @@ void ImpPDFTabGeneralPage::SetFilterConfigItem(ImpPDFTabDialog* pParent) } mxCbExportPlaceholders->set_visible(mbIsWriter); - if( !mbIsWriter ) + if( mbIsWriter ) + { + // tdf#54908 Make selection active if there is a selection in Writer's version + mxRbSelection->set_active( bSelectionPresent ); + } + else { mxCbExportPlaceholders->set_active(false); } diff --git a/sw/source/core/view/printdata.cxx b/sw/source/core/view/printdata.cxx index a92f3661c990..a2da5005cc38 100644 --- a/sw/source/core/view/printdata.cxx +++ b/sw/source/core/view/printdata.cxx @@ -301,7 +301,8 @@ SwPrintUIOptions::SwPrintUIOptions( aWidgetIds[4] = "rbRangeSelection"; m_aUIProperties[nIdx++].Value = setChoiceRadiosControlOpt(aWidgetIds, OUString(), aHelpIds, aPrintRangeName, - aChoices, 0 /* always default to 'All pages' */, + aChoices, + bHasSelection ? 4 : 0, aChoicesDisabled); // show an Edit dependent on "Pages" selected _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
