Resizing a window with Shift to keep ration Width/Height
Miklos Vajna
vmiklos at collabora.com
Tue Apr 1 08:54:43 UTC 2025
Hi Laurent,
On Mon, Mar 31, 2025 at 07:37:49PM +0200, Laurent Balland <laurent.balland at mailo.fr> wrote:
> I'm working on bug 163816 [1] to preserve ratio Width/Height of an OLE
> object (such as a chart in Calc) when Shift is pressed. Work under progress
> is here [2].
>
> I suppose that such behavior is already coded somewhere in LibO (for
> instance when resizing an object in Draw). Can someone provide some
> interesting code pointers?
I believe SdrSnapView::SetOrtho() is related, also Writer's
SwWrtShell::Drag() is related, this is called "proportional" resizing.
See the code at
<https://github.com/libreoffice/core/blob/3e88456b7135ef2cd0f0121d46cc56436ce56ee5/sw/source/uibase/docvw/edtwin.cxx#L4510-L4543>,
hopefully some of that is also relevant for Calc.
Regards,
Miklos
More information about the LibreOffice
mailing list