| commit | 1ef21ea98b46267d82da017ab2fec8e05d8e638b | [log] |
|---|---|---|
| author | Muhammet Kara <muhammet.kara@collabora.com> | Fri Dec 20 20:35:00 2019 +0300 |
| committer | Adolfo Jayme Barrientos <fitojb@ubuntu.com> | Tue Dec 24 05:48:32 2019 +0100 |
| tree | c69f61d075477ff852779f7b17332fe032bee2a7 | |
| parent | 8901b52731af3f59a97b754f59c132ef2714eb91 [diff] |
tdf#129526: Prevent accidental toggling of page orientation Change-Id: I3145cb34ec782c1aa60fe864a6ec7c195185ad18 Reviewed-on: https://gerrit.libreoffice.org/85637 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com> (cherry picked from commit aeab5bfa024f7d15099730fa536d78b5a7a7ea01) Reviewed-on: https://gerrit.libreoffice.org/85737 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
diff --git a/sw/source/uibase/sidebar/PageOrientationControl.cxx b/sw/source/uibase/sidebar/PageOrientationControl.cxx index 0d9844ef..9d9caa4 100644 --- a/sw/source/uibase/sidebar/PageOrientationControl.cxx +++ b/sw/source/uibase/sidebar/PageOrientationControl.cxx
@@ -114,6 +114,14 @@ void PageOrientationControl::ExecuteOrientationChange( const bool bLandscape ) SfxViewFrame::Current()->GetBindings().GetDispatcher()->QueryState(SID_ATTR_PAGE_SIZE, pItem); mpPageSizeItem.reset( static_cast<SvxSizeItem*>(pItem->Clone()) ); // Prevent accidental toggling of page orientation if ((mpPageSizeItem->GetWidth() > mpPageSizeItem->GetHeight()) == bLandscape) { if ( mxUndoManager.is() ) mxUndoManager->leaveUndoContext(); return; } SfxViewFrame::Current()->GetBindings().GetDispatcher()->QueryState(SID_ATTR_PAGE_LRSPACE, pItem); mpPageLRMarginItem.reset( static_cast<SvxLongLRSpaceItem*>(pItem->Clone()) );