Kaydet (Commit) 0e6ea7b9 authored tarafından Caolán McNamara's avatar Caolán McNamara

ensure IsPage layout truly is a LwpPageLayout

Change-Id: I3ca21608d633145c8a5238b947e22671460e9195
üst 8d582298
......@@ -201,14 +201,17 @@ void LwpStory::SortPageLayout()
rtl::Reference<LwpVirtualLayout> xLayout(GetLayout(nullptr));
while (xLayout.get())
{
if (xLayout->IsPage())
LwpPageLayout *pLayout = xLayout->IsPage()
? dynamic_cast<LwpPageLayout*>(xLayout.get())
: nullptr;
if (pLayout)
{
LwpLayout::UseWhenType eSectionType = static_cast<LwpPageLayout*>(xLayout.get())->GetUseWhenType();
LwpLayout::UseWhenType eSectionType = pLayout->GetUseWhenType();
//for mirror page, the child is pagelayout
rtl::Reference<LwpVirtualLayout> xParent = xLayout->GetParentLayout();
if(eSectionType != LwpLayout::StartWithinColume && xParent.is() && !xParent->IsPage())
{
aLayoutList.push_back(static_cast<LwpPageLayout*>(xLayout.get()));
aLayoutList.push_back(pLayout);
}
}
xLayout = GetLayout(xLayout.get());
......
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