[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - lotuswordpro/source
Caolán McNamara
caolanm at redhat.com
Mon Dec 14 05:54:06 PST 2015
lotuswordpro/source/filter/lwpstory.cxx | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
New commits:
commit 619f9a8794bbe5022853b9bc52fc3bb7db7b9031
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Dec 14 13:52:22 2015 +0000
ensure IsPage layout truly is a LwpPageLayout
Change-Id: I3ca21608d633145c8a5238b947e22671460e9195
(cherry picked from commit 0e6ea7b9fa8f3748d0ced2122fa0a7c7698c1f93)
diff --git a/lotuswordpro/source/filter/lwpstory.cxx b/lotuswordpro/source/filter/lwpstory.cxx
index 17ed5c6..64d15c0 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());
More information about the Libreoffice-commits
mailing list