diff options
author | Daniel Silva <danielfaleirosilva@gmail.com> | 2018-12-08 10:15:26 -0200 |
---|---|---|
committer | Xisco Faulí <xiscofauli@libreoffice.org> | 2019-08-03 14:21:41 +0200 |
commit | 87d5c863109f7991e3f2f3a1eb970c00d5a27bd5 (patch) | |
tree | b6cbeabb262aa0d957cdaa362fa41dd3838c5ad5 /filter | |
parent | dd2b7919058fc0e23a7117d39110d3ecaaad1fb2 (diff) |
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 <Michael.Stahl@cib.de>
Tested-by: Jenkins
(cherry picked from commit f50363c7008c239d302944144beb256de6a55f38)
Reviewed-on: https://gerrit.libreoffice.org/76879
Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/pdf/impdialog.cxx | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx index 213f2cc2dc02..14738ff2e723 100644 --- a/filter/source/pdf/impdialog.cxx +++ b/filter/source/pdf/impdialog.cxx @@ -503,8 +503,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; @@ -611,7 +612,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); } |