Kaydet (Commit) 4f90b5c2 authored tarafından Caolán McNamara's avatar Caolán McNamara Kaydeden (comit) Andras Timar

forcepoint #31 survive missing control model

Change-Id: I37e4af560b46b4f6d9e0b87fe58493818f366d3c
Reviewed-on: https://gerrit.libreoffice.org/51878Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMichael Stahl <Michael.Stahl@cib.de>
(cherry picked from commit d98cfa4d)
üst 66013b9f
...@@ -431,7 +431,13 @@ void VbaFormControl::importStorage( StorageBase& rStrg, const AxClassTable& rCla ...@@ -431,7 +431,13 @@ void VbaFormControl::importStorage( StorageBase& rStrg, const AxClassTable& rCla
for ( ; it != it_end; ++it ) for ( ; it != it_end; ++it )
{ {
if ( (*it)->mxCtrlModel->getControlType() == API_CONTROL_PAGE ) auto& elem = (*it)->mxCtrlModel;
if (!elem)
{
SAL_WARN("oox", "empty control model");
continue;
}
if (elem->getControlType() == API_CONTROL_PAGE)
{ {
VbaSiteModelRef xPageSiteRef = (*it)->mxSiteModel; VbaSiteModelRef xPageSiteRef = (*it)->mxSiteModel;
if ( xPageSiteRef.get() ) if ( xPageSiteRef.get() )
...@@ -439,7 +445,7 @@ void VbaFormControl::importStorage( StorageBase& rStrg, const AxClassTable& rCla ...@@ -439,7 +445,7 @@ void VbaFormControl::importStorage( StorageBase& rStrg, const AxClassTable& rCla
} }
else else
{ {
AxTabStripModel* pTabStrip = static_cast<AxTabStripModel*> ( (*it)->mxCtrlModel.get() ); AxTabStripModel* pTabStrip = static_cast<AxTabStripModel*>(elem.get());
sCaptions = pTabStrip->maItems; sCaptions = pTabStrip->maItems;
pMultiPage->mnActiveTab = pTabStrip->mnListIndex; pMultiPage->mnActiveTab = pTabStrip->mnListIndex;
pMultiPage->mnTabStyle = pTabStrip->mnTabStyle; pMultiPage->mnTabStyle = pTabStrip->mnTabStyle;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment