diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-12-14 13:52:22 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-12-14 13:52:55 +0000 |
commit | 0e6ea7b9fa8f3748d0ced2122fa0a7c7698c1f93 (patch) | |
tree | 26c8a7d97a2d4f86e13553989bd06fd7a4c748a2 /lotuswordpro | |
parent | Related: rhbz#1290014 gtk3: use gtk_window_set_modal on modal dialogs (diff) | |
download | core-0e6ea7b9fa8f3748d0ced2122fa0a7c7698c1f93.tar.gz core-0e6ea7b9fa8f3748d0ced2122fa0a7c7698c1f93.zip |
ensure IsPage layout truly is a LwpPageLayout
Change-Id: I3ca21608d633145c8a5238b947e22671460e9195
Diffstat (limited to 'lotuswordpro')
-rw-r--r-- | lotuswordpro/source/filter/lwpstory.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lotuswordpro/source/filter/lwpstory.cxx b/lotuswordpro/source/filter/lwpstory.cxx index 17ed5c610c9c..64d15c0d41a8 100644 --- a/lotuswordpro/source/filter/lwpstory.cxx +++ b/lotuswordpro/source/filter/lwpstory.cxx @@ -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()); |