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