Created attachment 166047 [details]
File for reproducing the bug
Open attached document it has a shape with anchor "To cell (resize with cell)". It is anchored to cell D3.
Click on column header D and use "Hide Columns" from context menu. Notice, that the shape is still visible. Undo.
Click on row header 3 and use "Hide Rows" from context menu. Notice, that now the shape is invisible. Undo.
Expected: Visibility of the shape behaves the same for column and row.
Version: 18.104.22.168 (x64)
Build ID: 32fe9ceb49bbaa24397ab3ebad5eb8f5287d8086
CPU threads: 4; OS: Windows 10.0 Build 20180; UI render: GL; VCL: win;
Locale: es-ES (es_ES); UI-Language: en-US Calc: CL
Version: 22.214.171.124.alpha0+ (x64)
Build ID: dec9a123867dcd0fea4683beeb3b4b6659f926f3
CPU threads: 4; OS: Windows 10.0 Build 20180; UI render: Skia/Vulkan; VCL: win
Locale: es-ES (es_ES); UI: es-ES Calc: threaded
Should be fixed with https://cgit.freedesktop.org/libreoffice/core/commit/?id=1f0b3c7a40edfa81bbc7a58d123a6a2dfd83e4ca
(The patch covers several bug reports, therefore no automatic notification.)