diff options
-rw-r--r-- | src/lib/IWAParser.cpp | 2 | ||||
-rw-r--r-- | src/lib/libetonyek_utils.cpp | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/lib/IWAParser.cpp b/src/lib/IWAParser.cpp index 6de5fe7..d4f914a 100644 --- a/src/lib/IWAParser.cpp +++ b/src/lib/IWAParser.cpp @@ -483,6 +483,8 @@ bool IWAParser::readFill(const IWAMessage &msg, IWORKFill &fill) } } bitmap.m_fillColor = readColor(get(msg.message(3)), 3); + if (!bitmap.m_fillColor) // a least in new KeyNote files, the field 9 can also store a color + bitmap.m_fillColor = readColor(get(msg.message(3)), 9); bitmap.m_size = readSize(get(msg.message(3)), 4); if (!bitmap.m_size) bitmap.m_size=IWORKSize(); // to do not change result from previous code const optional<unsigned> &fileRef = readRef(get(msg.message(3)), 6); diff --git a/src/lib/libetonyek_utils.cpp b/src/lib/libetonyek_utils.cpp index 1743aa3..9b789c7 100644 --- a/src/lib/libetonyek_utils.cpp +++ b/src/lib/libetonyek_utils.cpp @@ -467,7 +467,12 @@ try unsigned unit=readU8(stream); unsigned xPixels=readU16(stream, true); unsigned yPixels=readU16(stream, true); - if (unit==1) // by inch + if (unit==0) // unsure, but this seems more compatible with LibreOffice + { + factor[0]=1.44*double(xPixels)/72; + factor[1]=1.44*double(yPixels)/72; + } + else if (unit==1) // by inch { factor[0]=double(xPixels)/72; factor[1]=double(yPixels)/72; |