diff options
author | Daniel Silva <danielfaleirosilva@gmail.com> | 2018-12-08 10:15:26 -0200 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2019-07-31 18:11:35 +0200 |
commit | f50363c7008c239d302944144beb256de6a55f38 (patch) | |
tree | ba40f5f919601157c7860bc5fc17c4423c886d30 /filter | |
parent | 08d23078d4636fc9fadfa45d4a0ed847cfcf7e9c (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
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 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); } |