forcepoint #31 survive missing control model
Change-Id: I37e4af560b46b4f6d9e0b87fe58493818f366d3c Reviewed-on: https://gerrit.libreoffice.org/51857 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
@@ -430,7 +430,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() )
|
||||||
@@ -438,7 +444,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;
|
||||||
|
Reference in New Issue
Block a user