summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-06-27 16:30:19 +0200
committerMichael Stahl <michael.stahl@allotropia.de>2022-09-23 14:27:39 +0200
commit268f4d4174dea1a319441dc6957eecb0eff9b447 (patch)
treee78f2b95f91f2f2266569807f6a94400c5a72f85
parentcrashtesting: fix assert seen with forum-mso-en-8349.docx (diff)
downloadcore-268f4d4174dea1a319441dc6957eecb0eff9b447.tar.gz
core-268f4d4174dea1a319441dc6957eecb0eff9b447.zip
tdf#149692 crash importing document with vba forms
This bug appears to date back to commit a43cc9ec8dde4f311bcf8ff96e6a26d56b2abdcf Author: Noel Power <noel.power@suse.com> Date: Wed Apr 17 17:08:59 2013 +0100 implement MultiPage, Page & TabStrip import for oox Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136500 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit a15fe37bf1dc50fcf88cea9c0038b217119671b8) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136472 Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit ef79ccd5bbd5fbc0f0c132c4fc5a48fcd1fbbc16) Change-Id: Ia4784e4c34189f05e516704fa2e2485e4560fa4b
-rw-r--r--oox/source/ole/vbacontrol.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/oox/source/ole/vbacontrol.cxx b/oox/source/ole/vbacontrol.cxx
index 36b9278c079d..36200523149b 100644
--- a/oox/source/ole/vbacontrol.cxx
+++ b/oox/source/ole/vbacontrol.cxx
@@ -440,13 +440,17 @@ void VbaFormControl::importStorage( StorageBase& rStrg, const AxClassTable& rCla
if ( xPageSiteRef.get() )
idToPage[ xPageSiteRef->getId() ] = control;
}
- else
+ else if (elem->getControlType() == API_CONTROL_TABSTRIP)
{
AxTabStripModel* pTabStrip = static_cast<AxTabStripModel*>(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
auto itCtrlId = pMultiPage->mnIDs.begin();