diff options
author | Jim Raykowski <raykowj@gmail.com> | 2023-10-04 16:26:00 -0800 |
---|---|---|
committer | Jim Raykowski <raykowj@gmail.com> | 2023-10-06 18:51:41 +0200 |
commit | a3c7d25122f615c1e3232e535afef2f8ad33d186 (patch) | |
tree | 13c0a12eca36259ef9ec2cdb5141310f0d6c1d26 /sw/source/uibase/wrtsh/select.cxx | |
parent | d8fa0ca2a3befeb961f8555321af6f6cbf14c03d (diff) |
tdf#157584 Fix accessibility check doesn't move footnote into view
when a frame object is currently selected
This patch introduces the function SwWrtShell::AssureStdMode to fix
this bug and to replace duplicated code.
Change-Id: I4106db983f79c92eea96a67b510393b2ac09a6d4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157575
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'sw/source/uibase/wrtsh/select.cxx')
-rw-r--r-- | sw/source/uibase/wrtsh/select.cxx | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/sw/source/uibase/wrtsh/select.cxx b/sw/source/uibase/wrtsh/select.cxx index fe369d0f2091..3ae5842f6187 100644 --- a/sw/source/uibase/wrtsh/select.cxx +++ b/sw/source/uibase/wrtsh/select.cxx @@ -47,6 +47,8 @@ #include <unotools/configmgr.hxx> #include <bitmaps.hlst> +#include <svx/svdview.hxx> + namespace com::sun::star::util { struct SearchOptions2; } @@ -594,6 +596,35 @@ void SwWrtShell::EnterStdMode() SwTransferable::ClearSelection( *this ); } +void SwWrtShell::AssureStdMode() +{ + // deselect any drawing or frame and leave editing mode + if (SdrView* pSdrView = GetDrawView()) + { + if (pSdrView->IsTextEdit()) + { + bool bLockView = IsViewLocked(); + LockView(true); + EndTextEdit(); + LockView(bLockView); + } + // go out of the frame + Point aPt(LONG_MIN, LONG_MIN); + SelectObj(aPt, SW_LEAVE_FRAME); + } + if (IsSelFrameMode() || IsObjSelected()) + { + UnSelectFrame(); + LeaveSelFrameMode(); + GetView().LeaveDrawCreate(); + EnterStdMode(); + DrawSelChanged(); + GetView().StopShellTimer(); + } + else + EnterStdMode(); +} + // Extended Mode void SwWrtShell::EnterExtMode() |