diff options
author | osnola <alonso.laurent@gmail.com> | 2017-04-17 14:47:52 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2017-04-17 14:47:52 +0200 |
commit | 91a768b931faca5cfb78e13f84c58c16ac5ff2a6 (patch) | |
tree | 6ccbd6ab9f6d0e1e9b0da35e8de77c139eaaa560 | |
parent | 11e6276b761715bf8e516ac3342ee26b111af388 (diff) |
set page size to A4 if it is unknown
Change-Id: I7bdfc6a2eeeaf37fd480c10bd4088fb2606162a3
-rw-r--r-- | src/lib/ABWContentCollector.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/ABWContentCollector.cpp b/src/lib/ABWContentCollector.cpp index cd7c98b..a9f9e86 100644 --- a/src/lib/ABWContentCollector.cpp +++ b/src/lib/ABWContentCollector.cpp @@ -984,8 +984,9 @@ void libabw::ABWContentCollector::_openPageSpan() startDocument(); librevenge::RVNGPropertyList propList; - propList.insert("fo:page-width", m_ps->m_pageWidth); - propList.insert("fo:page-height", m_ps->m_pageHeight); + // assume default page size is A4 + propList.insert("fo:page-width", m_ps->m_pageWidth>0 ? m_ps->m_pageWidth : 8.27); + propList.insert("fo:page-height", m_ps->m_pageHeight>0 ? m_ps->m_pageHeight : 11.7); propList.insert("fo:margin-left", m_ps->m_pageMarginLeft); propList.insert("fo:margin-right", m_ps->m_pageMarginRight); propList.insert("fo:margin-top", m_ps->m_pageMarginTop); |