Hi Laurent, On Mon, Mar 31, 2025 at 07:37:49PM +0200, Laurent Balland <laurent.ball...@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