Blame SOURCES/0006-ClarisWorks-parser-use-the-page-size-to-define-the-b.patch

b5c349
From 018676e577356f7cd933680c1caf710f15a54c8d Mon Sep 17 00:00:00 2001
b5c349
From: osnola <alonso@loria.fr>
b5c349
Date: Tue, 4 Feb 2014 19:27:53 +0100
b5c349
Subject: [PATCH 6/8] ClarisWorks parser: use the page size to define the
b5c349
 bitmap final size when converting a paint document...
b5c349
b5c349
---
b5c349
 src/lib/CWGraph.cxx | 10 ++++++++--
b5c349
 1 file changed, 8 insertions(+), 2 deletions(-)
b5c349
b5c349
diff --git a/src/lib/CWGraph.cxx b/src/lib/CWGraph.cxx
b5c349
index 52f2a5c..8a6e946 100644
b5c349
--- a/src/lib/CWGraph.cxx
b5c349
+++ b/src/lib/CWGraph.cxx
b5c349
@@ -2722,8 +2722,14 @@ bool CWGraph::sendBitmap(CWGraphInternal::Bitmap &bitmap, bool asGraphic, MWAWPo
b5c349
   std::string type;
b5c349
   if (!bmap->getBinary(data,type)) return false;
b5c349
   if (pos.size()[0] <= 0 || pos.size()[1] <= 0) {
b5c349
-    MWAW_DEBUG_MSG(("CWGraph::sendBitmap: can not find bitmap size\n"));
b5c349
-    pos.setSize(Vec2f(0,0));
b5c349
+    if (m_mainParser->getHeader() &&
b5c349
+        m_mainParser->getHeader()->getKind()==MWAWDocument::MWAW_K_PAINT) // fixme
b5c349
+      pos.setSize(Vec2f(0.9f*float(m_mainParser->getPageWidth()),
b5c349
+                        0.9f*float(m_mainParser->getPageLength())));
b5c349
+    else {
b5c349
+      MWAW_DEBUG_MSG(("CWGraph::sendBitmap: can not find bitmap size\n"));
b5c349
+      pos.setSize(Vec2f(0,0));
b5c349
+    }
b5c349
   }
b5c349
   if (asGraphic) {
b5c349
     MWAWGraphicStyle style;
b5c349
-- 
b5c349
1.9.0
b5c349