sc/source/filter/xcl97/xcl97esc.cxx | 4 ++++ 1 file changed, 4 insertions(+)
New commits: commit ab62d75141192a73dcd6862e37753bc1c3f82576 Author: Gülşah Köse <gulsah.k...@collabora.com> AuthorDate: Fri Jan 17 16:57:59 2025 +0300 Commit: Szymon Kłos <szymon.k...@collabora.com> CommitDate: Tue Jan 28 09:21:08 2025 +0100 tdf#164141 Fix command button xls to xlsx convert problem. MSO has two type controls. ActiveX and normal. ControlTypeinMSO specifies the form control object is ActiveX or not. 2: ActiveX form control 1: Normal form control Current case is simple ActiveX button created by MSO can not be exported by LibreOffice properly. It was triggering the repair dialog on MSO. And we even lost the button in LibreOffice. If the pCurrXclObj is failed, we need to give a chance to export button by using XclExpTbxControlObj instead of directly XclObjAny This patch just fixes the Command button xls to xlsx convertion problem. Not all the form controls. Signed-off-by: Gülşah Köse <gulsah.k...@collabora.com> Change-Id: Ifabf4d0e16bd620f8201a2143d8af7c64d8859a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180414 Reviewed-by: Szymon Kłos <szymon.k...@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> diff --git a/sc/source/filter/xcl97/xcl97esc.cxx b/sc/source/filter/xcl97/xcl97esc.cxx index 43538de6c889..84317f706010 100644 --- a/sc/source/filter/xcl97/xcl97esc.cxx +++ b/sc/source/filter/xcl97/xcl97esc.cxx @@ -240,7 +240,11 @@ EscherExHostAppData* XclEscherEx::StartShape( const Reference< XShape >& rxShape SAL_WARN("sc", "XclEscherEx::StartShape, this control can't get the property ControlTypeinMSO!"); } if( nMsCtlType == 2 ) //OCX Form Control + { pCurrXclObj = CreateOCXCtrlObj( rxShape, pChildAnchor ).release(); + if(!pCurrXclObj) // Give a chance to handle control object with XclExpTbxControlObj instead of XclObjAny + pCurrXclObj = CreateTBXCtrlObj( rxShape, pChildAnchor ).release(); + } else //TBX Form Control pCurrXclObj = CreateTBXCtrlObj( rxShape, pChildAnchor ).release(); if( !pCurrXclObj )