summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2024-04-26 22:03:53 +0200
committerLászló Németh <nemeth@numbertext.org>2024-04-29 00:16:31 +0200
commit30de13743f144aced83bc43d310592f82788c910 (patch)
tree3412baf39ebf3c7bb23d380c88ee0a40c15d470d /sw/source
parentf3b899655018397e71300dbb32cdf4f82940a68b (diff)
tdf#160836 sw: resize rows at images cropped by row height
Fixed row height can crop cell content, including images anchored as character. Resizing the row height with mouse was not possible there, because selection of the cropped image avoided to drag & drop the horizontal cell border. Change-Id: I6dde79e77563468059794548b6c058cad61586a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166795 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: Jenkins
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/uibase/docvw/edtwin.cxx12
1 files changed, 10 insertions, 2 deletions
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index 6bd10d4d580f..c0d4a0837f17 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -3154,9 +3154,13 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
SwTab nMouseTabCol = SwTab::COL_NONE;
const bool bTmp = !rSh.IsDrawCreate() && !m_pApplyTempl && !rSh.IsInSelect()
&& aMEvt.GetClicks() == 1 && MOUSE_LEFT == aMEvt.GetButtons();
+
if ( bTmp &&
SwTab::COL_NONE != (nMouseTabCol = rSh.WhichMouseTabCol( aDocPos ) ) &&
- !rSh.IsObjSelectable( aDocPos ) )
+ ( !rSh.IsObjSelectable( aDocPos ) ||
+ // allow resizing row height, if the image is anchored as character in the cell
+ ( rSh.ShouldObjectBeSelected(aDocPos) &&
+ !( SwTab::COL_VERT == nMouseTabCol || SwTab::COL_HORI == nMouseTabCol ) ) ) )
{
// Enhanced table selection
if ( SwTab::SEL_HORI <= nMouseTabCol && SwTab::COLSEL_VERT >= nMouseTabCol )
@@ -4025,8 +4029,12 @@ bool SwEditWin::changeMousePointer(Point const & rDocPoint)
SwWrtShell & rShell = m_rView.GetWrtShell();
SwTab nMouseTabCol;
+
if ( SwTab::COL_NONE != (nMouseTabCol = rShell.WhichMouseTabCol( rDocPoint ) ) &&
- !rShell.IsObjSelectable( rDocPoint ) )
+ ( !rShell.IsObjSelectable( rDocPoint ) ||
+ // allow resizing row height, if the image is anchored as character in the cell
+ ( rShell.ShouldObjectBeSelected(rDocPoint) &&
+ !( SwTab::COL_VERT == nMouseTabCol || SwTab::COL_HORI == nMouseTabCol ) ) ) )
{
PointerStyle nPointer = PointerStyle::Null;
bool bChkTableSel = false;