From 9c9911bcf882f1da5943cbadfba5498406bb7438 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 27 Jun 2022 16:30:19 +0200 Subject: tdf#149692 crash importing document with vba forms MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This bug appears to date back to commit a43cc9ec8dde4f311bcf8ff96e6a26d56b2abdcf Author: Noel Power Date: Wed Apr 17 17:08:59 2013 +0100 implement MultiPage, Page & TabStrip import for oox Change-Id: Ia4784e4c34189f05e516704fa2e2485e4560fa4b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136500 Tested-by: Jenkins Reviewed-by: Noel Grandin (cherry picked from commit a15fe37bf1dc50fcf88cea9c0038b217119671b8) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136472 Reviewed-by: Caolán McNamara (cherry picked from commit ef79ccd5bbd5fbc0f0c132c4fc5a48fcd1fbbc16) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136535 Reviewed-by: Xisco Fauli --- oox/source/ole/vbacontrol.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'oox/source') diff --git a/oox/source/ole/vbacontrol.cxx b/oox/source/ole/vbacontrol.cxx index 88d7f28617ef..9c2a301635d9 100644 --- a/oox/source/ole/vbacontrol.cxx +++ b/oox/source/ole/vbacontrol.cxx @@ -446,13 +446,17 @@ void VbaFormControl::importStorage( StorageBase& rStrg, const AxClassTable& rCla if ( xPageSiteRef ) idToPage[ xPageSiteRef->getId() ] = control; } - else + else if (elem->getControlType() == API_CONTROL_TABSTRIP) { AxTabStripModel* pTabStrip = static_cast(elem.get()); sCaptions = pTabStrip->maItems; pMultiPage->mnActiveTab = pTabStrip->mnListIndex; pMultiPage->mnTabStyle = pTabStrip->mnTabStyle; } + else + { + SAL_WARN("oox", "unexpected control type " << elem->getControlType()); + } } // apply caption/titles to pages -- cgit