filter/source/pdf/impdialog.cxx | 13 +++---------- sw/source/core/view/printdata.cxx | 3 +-- 2 files changed, 4 insertions(+), 12 deletions(-)
New commits: commit fed82c416aba3380b8c8931f7d8e0ec359e52a2c Author: Khaled Hosny <kha...@libreoffice.org> AuthorDate: Mon Aug 7 12:59:40 2023 +0300 Commit: خالد حسني <kha...@libreoffice.org> CommitDate: Mon Aug 7 13:38:27 2023 +0200 tdf#139164: Revert "tdf#54908 Make selection active if there's a selection (Writer)" This reverts commit 87d5c863109f7991e3f2f3a1eb970c00d5a27bd5. Making Writer print selection only by default is not something people expect, and it is not the default in any other application. Judging by the number of duplicates, it seems to have caught a lot of people by surprise, which is not a good UX. Change-Id: Ia7c8928c474d3390d7f7fee6e0c2e504a41d51b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155422 Tested-by: Jenkins Reviewed-by: خالد حسني <kha...@libreoffice.org> diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx index 3279581eedd5..755f530eee27 100644 --- a/filter/source/pdf/impdialog.cxx +++ b/filter/source/pdf/impdialog.cxx @@ -586,9 +586,8 @@ void ImpPDFTabGeneralPage::SetFilterConfigItem(ImpPDFTabDialog* pParent) mxRbAll->connect_toggled( LINK( this, ImpPDFTabGeneralPage, ToggleAllHdl ) ); TogglePagesHdl(); - const bool bSelectionPresent = pParent->mbSelectionPresent; - mxRbSelection->set_sensitive( bSelectionPresent ); - if ( bSelectionPresent ) + mxRbSelection->set_sensitive( pParent->mbSelectionPresent ); + if ( pParent->mbSelectionPresent ) mxRbSelection->connect_toggled( LINK( this, ImpPDFTabGeneralPage, ToggleSelectionHdl ) ); mbIsPresentation = pParent->mbIsPresentation; mbIsWriter = pParent->mbIsWriter; @@ -707,13 +706,7 @@ void ImpPDFTabGeneralPage::SetFilterConfigItem(ImpPDFTabDialog* pParent) } mxCbExportPlaceholders->set_visible(mbIsWriter); - if( mbIsWriter ) - { - // tdf#54908 Make selection active if there is a selection in Writer's version - mxRbSelection->set_active( bSelectionPresent ); - mxCbExportNotesInMargin->set_active(pParent->mbExportNotesInMargin); - } - else + if( !mbIsWriter ) { mxCbExportPlaceholders->set_active(false); mxCbExportNotesInMargin->set_active(false); diff --git a/sw/source/core/view/printdata.cxx b/sw/source/core/view/printdata.cxx index 62a2780f9c58..7cf3017eeec7 100644 --- a/sw/source/core/view/printdata.cxx +++ b/sw/source/core/view/printdata.cxx @@ -284,8 +284,7 @@ SwPrintUIOptions::SwPrintUIOptions( uno::Sequence< OUString > aWidgetIds{ "rbAllPages", "rbRangePages", "rbRangeSelection" }; m_aUIProperties[nIdx++].Value = setChoiceRadiosControlOpt(aWidgetIds, OUString(), aHelpIds, aPrintRangeName, - aChoices, - bHasSelection ? 2 : 0, + aChoices, 0 /* always default to 'All pages' */, aChoicesDisabled); // show an Edit dependent on "Pages" selected