PATCH: word import bitmap size


Subject: PATCH: word import bitmap size
From: Robert Wilhelm (robert@gaston.camelot.de)
Date: Sat Jan 19 2002 - 17:34:25 CST


Appended patch fixes the bitmap size e.g. in Bug #2584.
You can find following changes:
wv.h and wv.c: PICF.mx and PICF.my are unsigned short
                 and give scaling faktor in units 1/1000
ie_imp_MsWord97.cpp: take value of mx and my into account.
                  plus fix debug print.

Robert

Index: wv.h
===================================================================
RCS file: /cvsroot/wv/wv.h,v
retrieving revision 1.97
diff -u -r1.97 wv.h
--- wv.h 2001/12/26 16:52:20 1.97
+++ wv.h 2002/01/19 23:26:34
@@ -3451,8 +3451,8 @@
         } obj;
         S16 dxaGoal;
         S16 dyaGoal;
- S16 mx;
- S16 my;
+ U16 mx;
+ U16 my;
         S16 dxaCropLeft;
         S16 dyaCropTop;
         S16 dxaCropRight;
Index: picf.c
===================================================================
RCS file: /cvsroot/wv/picf.c,v
retrieving revision 1.26
diff -u -r1.26 picf.c
--- picf.c 2002/01/17 21:10:11 1.26
+++ picf.c 2002/01/19 23:26:34
@@ -30,8 +30,8 @@
         wvGetrc (&(apicf->obj.arc), fd);
     apicf->dxaGoal = (S16) read_16ubit (fd);
     apicf->dyaGoal = (S16) read_16ubit (fd);
- apicf->mx = (S16) read_16ubit (fd);
- apicf->my = (S16) read_16ubit (fd);
+ apicf->mx = read_16ubit (fd);
+ apicf->my = read_16ubit (fd);
     apicf->dxaCropLeft = (S16) read_16ubit (fd);
     apicf->dyaCropTop = (S16) read_16ubit (fd);
     apicf->dxaCropRight = (S16) read_16ubit (fd);
Index: ie_imp_MsWord_97.cpp
===================================================================
RCS file: /cvsroot/abi/src/wp/impexp/xp/ie_imp_MsWord_97.cpp,v
retrieving revision 1.142
diff -u -r1.142 ie_imp_MsWord_97.cpp
--- ie_imp_MsWord_97.cpp 2002/01/18 18:44:52 1.142
+++ ie_imp_MsWord_97.cpp 2002/01/19 23:27:38
@@ -1100,7 +1100,7 @@
 
                         if (wv0x01(&blip, fil, picf.lcb - picf.cbHeader))
                           {
- this->_handleImage(&blip, picf.dxaGoal, picf.dyaGoal);
+ this->_handleImage(&blip, picf.mx * picf.dxaGoal / 1000, picf.my * picf.dyaGoal / 1000);
                           }
                         else
                           {
@@ -2259,7 +2259,7 @@
                                 m_fieldRet = 0;
 
                         xxx_UT_DEBUGMSG(("DOM: Field: command %s, ret is %d\n",
- wvWideStrToMB(command), m_fieldRet));
+ wvWideStrToMB(m_command), m_fieldRet));
                         wvFree(m_fieldC);
                         m_fieldWhich = m_argument;
                         m_fieldI = 0;



This archive was generated by hypermail 2b25 : Sat Jan 19 2002 - 17:38:49 CST