29#include "structures.h"
30#include "structures_private.h"
34 PageLayout::PageLayout () : m_numModified (0)
38 PageLayout::~PageLayout ()
42 PageLayout &PageLayout::operator= (
const PageLayout &rhs)
47 PageLayoutGenerated::operator= (rhs);
48 NeedsHeader::operator= (rhs);
50 m_numModified = rhs.m_numModified;
55 bool PageLayout::readFromDevice (
void)
59 #ifdef DEBUG_PAGELAYOUT
60 m_device->debug (
"\n<<<< PageLayout::readFromDevice >>>>\n");
63 int numPageLayoutPages = m_header->getNumPageSectionProperty ();
65 #ifdef DEBUG_PAGELAYOUT
66 m_device->debug (
"num pageLayoutPages: ", numPageLayoutPages);
70 if (numPageLayoutPages == 0)
72 else if (numPageLayoutPages > 1)
73 ErrorAndQuit (Error::InvalidFormat,
"invalid #pageLayoutPages\n");
76 if (!m_device->seekInternal (m_header->getPageSectionProperty () * 128, SEEK_SET))
77 ErrorAndQuit (Error::FileError,
"could not seek to pageLayout\n");
79 if (!PageLayoutGenerated::readFromDevice ())
82 #ifdef DEBUG_PAGELAYOUT
88 Dump (pageNumberStart);
106 #define UpdateModifiedCount(variable) if (m_##variable != variable##Default) m_numModified++
107 UpdateModifiedCount (magic102);
108 UpdateModifiedCount (magic512);
109 UpdateModifiedCount (pageHeight);
110 UpdateModifiedCount (pageWidth);
111 UpdateModifiedCount (pageNumberStart);
112 UpdateModifiedCount (topMargin);
113 UpdateModifiedCount (textHeight);
114 UpdateModifiedCount (leftMargin);
115 UpdateModifiedCount (textWidth);
116 UpdateModifiedCount (magic256);
117 UpdateModifiedCount (headerFromTop);
118 UpdateModifiedCount (footerFromTop);
119 UpdateModifiedCount (magic720);
120 UpdateModifiedCount (zero);
121 UpdateModifiedCount (magic1080);
123 UpdateModifiedCount (zero2);
124 #undef UpdateModifiedCount
129 bool PageLayout::writeToDevice (
void)
133 #ifdef DEBUG_PAGELAYOUT
134 m_device->debug (
"\n>>>> PageLayout::writeToDevice <<<<\n");
137 m_header->setPageSectionProperty (m_device->tellInternal () / 128);
140 if (!getIsModified ())
143 if (!PageLayoutGenerated::writeToDevice ())
150 Font::Font (
const Byte *name,
const Byte family) : m_name (NULL)
152 if (name) setName (name);
153 FontGenerated::m_family = family;
161 Font &Font::operator= (
const Font &rhs)
166 FontGenerated::operator= (rhs);
168 setName (rhs.getName ());
173 bool Font::readFromDevice (
void)
177 if (!FontGenerated::readFromDevice ())
186 if (m_numDataBytes == 0xFFFF)
190 if (m_numDataBytes == 0)
194 if (m_numDataBytes > 128 -
sizeof (m_numDataBytes))
195 ErrorAndQuit (MSWrite::Error::InvalidFormat,
"Font nameLen is too big\n");
198 int nameLen = m_numDataBytes -
sizeof (m_family) - 1 ;
201 m_name =
new Byte [nameLen + 1];
203 ErrorAndQuit (Error::OutOfMemory,
"could not allocate memory for fontName\n");
206 if (!m_device->readInternal (m_name, nameLen + 1))
207 ErrorAndQuit (Error::FileError,
"could not read fontName\n");
210 if (m_name [nameLen] !=
'\0')
211 ErrorAndQuit (Error::InvalidFormat,
"fontName not NUL-terminated\n");
214 m_device->debug (
"\tfontName=", (
const char *) m_name);
219 bool Font::writeToDevice (
void)
224 Word offset = m_device->tellInternal () % 128;
225 if (offset +
sizeof (m_numDataBytes) + m_numDataBytes +
sizeof (m_numDataBytes) > 128)
228 Byte scratch [2] = {0xFF, 0xFF};
229 if (!m_device->writeInternal (scratch, 2))
230 ErrorAndQuit (Error::FileError,
"could not write Font 0xFFFF\n");
237 if (!FontGenerated::writeToDevice ())
240 if (!m_device->writeInternal (m_name, m_numDataBytes - sizeof (m_family)))
241 ErrorAndQuit (Error::FileError,
"could not write fontName\n");
247 FormatCharProperty::FormatCharProperty () : m_fontTable (NULL)
253 FormatCharProperty::~FormatCharProperty ()
257 FormatCharProperty &FormatCharProperty::operator= (
const FormatCharProperty &rhs)
262 FormatCharPropertyGenerated::operator= (rhs);
264 m_afterEndCharByte = rhs.m_afterEndCharByte;
265 m_fontTable = rhs.m_fontTable;
271 bool FormatCharProperty::operator== (FormatCharProperty &rhs)
275 if ((numDataBytes = getNumDataBytes ()) != rhs.getNumDataBytes ())
281 return memcmp (m_data +
sizeof (m_numDataBytes), rhs.m_data + sizeof (m_numDataBytes), numDataBytes) == 0;
284 bool FormatCharProperty::readFromDevice (
void)
289 m_device->debug (
"\nFormatCharProperty::readFromDevice\n");
292 if (!FormatCharPropertyGenerated::readFromDevice ())
296 ErrorAndQuit (Error::InternalError,
"m_fontTable not setup for FormatCharProperty::readFromDevice\n");
299 if (!updateFont ())
return false;
304 bool FormatCharProperty::writeToDevice (
void)
309 m_device->debug (
"\nFormatCharProperty::writeToDevice, #bytes=", getNumDataBytes ());
312 return FormatCharPropertyGenerated::writeToDevice ();
315 bool FormatCharProperty::updateFont (
void)
317 Font *fontPtr = m_fontTable->getFont (getFontCode ());
319 ErrorAndQuit (Error::InvalidFormat,
"fontCode out of range\n");
325 bool FormatCharProperty::updateFontCode (
void)
327 DWord code = m_fontTable->addFont (&m_font);
328 if (code == 0xFFFFFFFF)
338 FormatParaPropertyTabulator::FormatParaPropertyTabulator ()
342 FormatParaPropertyTabulator::~FormatParaPropertyTabulator ()
346 FormatParaPropertyTabulator &FormatParaPropertyTabulator::operator= (
const FormatParaPropertyTabulator &rhs)
351 FormatParaPropertyTabulatorGenerated::operator= (rhs);
356 bool FormatParaPropertyTabulator::readFromDevice (
void)
360 #ifdef DEBUG_PARA_TAB
361 m_device->debug (
"\nFormatParaPropertyTabulator::readFromDevice\n");
364 if (!FormatParaPropertyTabulatorGenerated::readFromDevice ())
367 #ifdef DEBUG_PARA_TAB
376 bool FormatParaPropertyTabulator::writeToDevice (
void)
380 #ifdef DEBUG_PARA_TAB
381 m_device->debug (
"\nFormatParaPropertyTabulator::writeToDevice\n");
384 return FormatParaPropertyTabulatorGenerated::writeToDevice ();
388 FormatParaProperty::FormatParaProperty () : m_leftMargin (0xFFFF),
389 m_rightMargin (0xFFFF),
391 m_addedTooManyTabs (false)
396 FormatParaProperty::~FormatParaProperty ()
400 FormatParaProperty &FormatParaProperty::operator= (
const FormatParaProperty &rhs)
405 FormatParaPropertyGenerated::operator= (rhs);
407 m_afterEndCharByte = rhs.m_afterEndCharByte;
408 m_leftMargin = rhs.m_leftMargin, m_rightMargin = rhs.m_rightMargin;
409 m_numTabulators = rhs.m_numTabulators;
410 m_addedTooManyTabs = rhs.m_addedTooManyTabs;
415 bool FormatParaProperty::operator== (FormatParaProperty &rhs)
418 if ((numDataBytes = getNumDataBytes ()) != rhs.getNumDataBytes ())
424 return memcmp (m_data +
sizeof (m_numDataBytes), rhs.m_data + sizeof (m_numDataBytes), numDataBytes) == 0;
427 bool FormatParaProperty::readFromDevice (
void)
432 m_device->debug (
"\nFormatParaProperty::readFromDevice\n");
435 #ifdef CHECK_INTERNAL
436 if (m_leftMargin == 0xFFFF && m_rightMargin == 0xFFFF)
437 ErrorAndQuit (Error::InternalError,
"FormatParaProperty::readFromDevice call not setup\n");
440 if (!FormatParaPropertyGenerated::readFromDevice ())
450 if (getIsNotNormalParagraph ())
453 if (m_leftMargin < m_leftIndent)
454 m_leftIndent -= m_leftMargin;
459 if (m_rightMargin < m_rightIndent)
460 m_rightIndent -= m_rightMargin;
465 if (m_numDataBytes > 22)
466 m_numTabulators = (m_numDataBytes - 22) / FormatParaPropertyTabulator::s_size;
471 if (getNumDataBytes () != m_numDataBytes && !m_numTabulators)
472 m_device->error (Error::Warn,
"m_numDataBytes != getNumDataBytes ()\n");
473 UseThisMuch::signalHaveSetData (
false, m_numDataBytes * 8);
478 bool FormatParaProperty::writeToDevice (
void)
482 #ifdef CHECK_INTERNAL
483 if (m_leftMargin == 0xFFFF && m_rightMargin == 0xFFFF)
484 ErrorAndQuit (Error::InternalError,
"FormatParaProperty::writeToDevice call not setup\n");
488 m_device->debug (
"\nFormatParaProperty::writeToDevice, #bytes=", getNumDataBytes ());
491 if (m_addedTooManyTabs)
492 ErrorAndQuit (Error::InternalError,
"cannot have more than 14 tabulators; shouldn't even have more than 12\n");
494 if (m_numTabulators > 12)
495 m_device->error (Error::Warn,
"should not have more than 12 tabulators since you can only access 12 tabs via the GUI\n");
499 if (!FormatParaPropertyGenerated::writeToDevice ())
506 Image::Image () : m_externalImage (NULL),
507 m_externalImageSize (0),
508 m_externalImageUpto (0),
509 m_originalWidth (0), m_originalHeight (0),
510 m_displayedWidth (0), m_displayedHeight (0)
516 delete [] m_externalImage;
519 Image &Image::operator= (
const Image &rhs)
524 ImageGenerated::operator= (rhs);
526 m_externalImageSize = rhs.m_externalImageSize;
527 m_externalImageUpto = rhs.m_externalImageUpto;
529 delete [] m_externalImage;
530 m_externalImage =
new Byte [m_externalImageSize];
531 if (!m_externalImage)
534 if (rhs.m_externalImage)
535 memcpy (m_externalImage, rhs.m_externalImage, m_externalImageUpto);
537 m_originalWidth = rhs.m_originalWidth;
538 m_originalHeight = rhs.m_originalHeight;
540 m_displayedWidth = rhs.m_displayedWidth;
541 m_displayedHeight = rhs.m_displayedHeight;
547 int Image::getBytesPerScanLine (
const int width,
const int bitsPerPixel,
const int padBytes)
553 bitWidth = width * bitsPerPixel;
554 byteWidth = bitWidth / 8;
560 byteWidth = (byteWidth + padBytes - 1) / padBytes * padBytes;
565 bool Image::readFromDevice (
void)
570 m_device->debug (
"\n<<<< Image::readFromDevice >>>>\n");
573 if (!ImageGenerated::readFromDevice ())
587 Dump (numHeaderBytes);
589 Dump (horizontalScalingRel1000);
590 Dump (verticalScalingRel1000);
599 if (m_bmh->getWidth () || m_bmh->getHeight ())
600 m_device->error (Error::Warn,
"m_bmh structure should be 0 for WMFs\n");
602 m_originalWidth = Milli2Twip (
double (m_MFP_width) / 100.0) * 4.0/3.0;
603 m_originalHeight = Milli2Twip (
double (m_MFP_height) / 100.0) * 4.0/3.0;
605 m_displayedWidth = double (m_width);
606 m_displayedHeight = double (m_height);
608 if (m_horizontalScalingRel1000 != 1000)
609 m_device->error (Error::Warn,
"horizontal scaling should not be set for WMFs\n");
610 if (m_verticalScalingRel1000 != 1000)
611 m_device->error (Error::Warn,
"vertical scaling should not be set for WMFs\n");
618 m_externalImage =
new Byte [m_externalImageSize = getNumDataBytes ()];
619 if (!m_externalImage)
620 ErrorAndQuit (Error::OutOfMemory,
"could not allocate memory for external WMF image\n");
622 if (!m_device->readInternal (m_externalImage, m_externalImageSize))
623 ErrorAndQuit (Error::FileError,
"could not read internal WMF\n");
627 m_device->setCache (m_externalImage);
628 wmfHeader.setDevice (m_device);
629 if (!wmfHeader.readFromDevice ())
635 m_device->setCache (NULL);
643 m_originalWidth = Point2Twip (DWord (m_bmh->getWidth ()));
644 m_originalHeight = Point2Twip (DWord (m_bmh->getHeight ()));
646 m_displayedWidth = m_originalWidth / 1.38889 * m_horizontalScalingRel1000 / 1000;
647 m_displayedHeight = m_originalHeight / 1.38889 * m_verticalScalingRel1000 / 1000;
649#define MSWrite_fabs(val) (((val)>=0)?(val):(-(val)))
651 if (MSWrite_fabs (m_MFP_width /
double (m_bmh->getWidth ()) - 2.64) > .3)
652 m_device->error (Error::Warn,
"m_MFP_width != m_bmh->getWidth() * 2.64\n");
653 if (MSWrite_fabs (m_MFP_height /
double (m_bmh->getHeight ()) - 2.64) > .3)
654 m_device->error (Error::Warn,
"m_MFP_height != m_bmh->getHeight() * 2.64\n");
659 m_device->error (Error::Warn,
"m_width should not be set for BMPs\n");
662 m_device->error (Error::Warn,
"m_height should not be set for BMPs\n");
669 Byte *internalData =
new Byte [getNumDataBytes ()];
671 ErrorAndQuit (Error::OutOfMemory,
"could not allocate memory for internal BMP image\n");
672 if (!m_device->readInternal (internalData, getNumDataBytes ()))
673 ErrorAndQuit (Error::FileError,
"could not read internal BMP\n");
676 BMP_BitmapInfoHeader infoHeader;
677 infoHeader.setWidth (m_bmh->getWidth ());
678 infoHeader.setHeight (m_bmh->getHeight ());
679 if (m_bmh->getNumPlanes () != 1)
680 ErrorAndQuit (Error::InvalidFormat,
"bmh.m_numPlanes != 1\n");
681 infoHeader.setNumPlanes (m_bmh->getNumPlanes ());
682 infoHeader.setBitsPerPixel (m_bmh->getBitsPerPixel ());
683 infoHeader.setCompression (0);
684 infoHeader.setSizeImage (0);
685 infoHeader.setXPixelsPerMeter (0), infoHeader.setYPixelsPerMeter (0);
686 infoHeader.setColoursUsed (1 << infoHeader.getBitsPerPixel ());
687 infoHeader.setColoursImportant (infoHeader.getColoursUsed ());
689 if (infoHeader.getColoursUsed () != 2)
690 ErrorAndQuit (Error::InternalError,
"colour bitmap??? Please email clarencedang@users.sourceforge.net this file\n");
692 Word colourTableSize = infoHeader.getColoursUsed () * BMP_BitmapColourIndex::s_size;
695 BMP_BitmapFileHeader fileHeader;
696 DWord fileSize = BMP_BitmapFileHeader::s_size + BMP_BitmapInfoHeader::s_size
698 + (m_bmh->getHeight ()
699 * getBytesPerScanLine (m_bmh->getWidth (), m_bmh->getBitsPerPixel (), 4));
701 fileHeader.setTotalBytes (fileSize);
702 fileHeader.setActualImageOffset (BMP_BitmapFileHeader::s_size + BMP_BitmapInfoHeader::s_size
706 BMP_BitmapColourIndex *colourIndex =
new BMP_BitmapColourIndex [infoHeader.getColoursUsed ()];
708 ErrorAndQuit (Error::OutOfMemory,
"could not allocate memory for colourIndex[]\n");
712 colourIndex [0].setRed (0), colourIndex [0].setGreen (0), colourIndex [0].setBlue (0);
713 colourIndex [1].setRed (0xFF), colourIndex [1].setGreen (0xFF), colourIndex [1].setBlue (0xFF);
715 m_externalImage =
new Byte [m_externalImageSize = fileSize];
716 if (!m_externalImage)
717 ErrorAndQuit (Error::OutOfMemory,
"could not allocate memory for external BMP image\n");
720 device.setCache (m_externalImage);
721 fileHeader.setDevice (&device);
722 fileHeader.writeToDevice ();
723 infoHeader.setDevice (&device);
724 infoHeader.writeToDevice ();
725 for (
int i = 0; i < 2; i++)
727 colourIndex [i].setDevice (&device);
728 colourIndex [i].writeToDevice ();
733 Word scanLineWRILength = getBytesPerScanLine (infoHeader.getWidth (), infoHeader.getBitsPerPixel (), 2);
734 if (scanLineWRILength != m_bmh->getWidthBytes ())
735 ErrorAndQuit (Error::InvalidFormat,
"scanLineWRILength != m_bmh->getWidthBytes()\n");
736 Word scanLineBMPLength = getBytesPerScanLine (infoHeader.getWidth (), infoHeader.getBitsPerPixel (), 4);
739 m_device->debug (
"in: scanLineWRILength: ", scanLineWRILength);
740 m_device->debug (
"out: scanLineBMPLength: ", scanLineBMPLength);
743 Byte *padding =
new Byte [scanLineBMPLength - scanLineWRILength];
745 ErrorAndQuit (Error::OutOfMemory,
"could not allocate memory for scanline\n");
746 memset (padding, 0, scanLineBMPLength - scanLineWRILength);
749 for (
int i = (
int) infoHeader.getHeight () - 1; i >= 0; i--)
752 device.writeInternal (internalData + i * scanLineWRILength, scanLineWRILength *
sizeof (Byte));
755 device.writeInternal (padding, (scanLineBMPLength - scanLineWRILength) *
sizeof (Byte));
760 device.setCache (NULL);
762 delete [] colourIndex;
763 delete [] internalData;
769 bool Image::writeToDevice (
void)
774 m_device->debug (
"\n>>>> Image::writeToDevice <<<<\n");
788 Dump (numHeaderBytes);
802 m_device->setCache (m_externalImage);
803 wmfHeader.setDevice (m_device);
804 if (!wmfHeader.readFromDevice ())
return false;
809 m_device->setCache (NULL);
818 m_bmh->setHeight (0);
819 m_bmh->setWidthBytes (0);
820 m_bmh->setNumPlanes (0);
821 m_bmh->setBitsPerPixel (0);
823 m_MFP_width = Word (Twip2Milli (m_originalWidth * 0.75) * 100.0);
824 m_MFP_height = Word (Twip2Milli (m_originalHeight * 0.75) * 100.0);
826 m_width = Word (m_displayedWidth);
827 m_height = Word (m_displayedHeight);
830 m_horizontalScalingRel1000 = m_verticalScalingRel1000 = 1000;
834 setNumDataBytes (m_externalImageSize);
835 if (!ImageGenerated::writeToDevice ())
839 if (!m_device->writeInternal (m_externalImage, m_externalImageSize))
return false;
843 m_device->setCache (m_externalImage);
845 BMP_BitmapFileHeader fileHeader;
846 fileHeader.setDevice (m_device);
847 if (!fileHeader.readFromDevice ())
return false;
863 BMP_BitmapInfoHeader infoHeader;
864 infoHeader.setDevice (m_device);
865 if (!infoHeader.readFromDevice ())
return false;
869 Word scanLineWRILength = getBytesPerScanLine (infoHeader.getWidth (), infoHeader.getBitsPerPixel (), 2);
870 Word scanLineBMPLength = getBytesPerScanLine (infoHeader.getWidth (), infoHeader.getBitsPerPixel (), 4);
872 if (infoHeader.getWidth () != Word (Twip2Point (m_originalWidth)))
873 ErrorAndQuit (Error::Warn,
"infoHeader width != m_originalWidth\n");
874 if (infoHeader.getHeight () != Word (Twip2Point (m_originalHeight)))
875 ErrorAndQuit (Error::Warn,
"infoHeader.height != m_originalHeight\n");
877 m_bmh->setWidth (infoHeader.getWidth ());
878 m_bmh->setHeight (infoHeader.getHeight ());
879 m_bmh->setWidthBytes (scanLineWRILength);
880 if (infoHeader.getNumPlanes () != 1)
881 ErrorAndQuit (Error::InvalidFormat,
"infoHeader.getNumPlanes() != 1\n");
882 m_bmh->setNumPlanes (infoHeader.getNumPlanes ());
883 m_bmh->setBitsPerPixel (infoHeader.getBitsPerPixel ());
884 if (infoHeader.getCompression () != 0)
885 ErrorAndQuit (Error::Unsupported,
"compressed bitmaps unsupported\n");
888 infoHeader.setColoursUsed (1 << infoHeader.getBitsPerPixel ());
891 if (infoHeader.getColoursUsed () != 2)
892 ErrorAndQuit (Error::Unsupported,
"can't save colour BMPs, use WMFs for that purpose\n");
895 BMP_BitmapColourIndex *colourIndex =
new BMP_BitmapColourIndex [infoHeader.getColoursUsed ()];
897 ErrorAndQuit (Error::OutOfMemory,
"could not allocate memory for colourIndex[]\n");
898 colourIndex [0].setDevice (m_device);
899 if (!colourIndex [0].readFromDevice ())
return false;
900 if (colourIndex [0].getRed () != 0 || colourIndex [0].getGreen () != 0 || colourIndex [0].getBlue () != 0)
901 m_device->error (Error::Warn,
"black not black\n");
902 colourIndex [1].setDevice (m_device);
903 if (!colourIndex [1].readFromDevice ())
return false;
904 if (colourIndex [1].getRed () != 0xFF || colourIndex [1].getGreen () != 0xFF || colourIndex [1].getBlue () != 0xFF)
905 m_device->error (Error::Warn,
"white not white\n");
908 m_device->setCache (NULL);
915 m_MFP_width = Word (Twip2Point (m_originalWidth) * 2.64);
916 m_MFP_height = Word (Twip2Point (m_originalHeight) * 2.64);
919 m_width = 0, m_height = 0;
921 m_horizontalScalingRel1000 = Word (m_displayedWidth * 1.38889 * 1000.0 / m_originalWidth);
922 m_verticalScalingRel1000 = Word (m_displayedHeight * 1.38889 * 1000.0 / m_originalHeight);
926 setNumDataBytes (infoHeader.getHeight () * scanLineBMPLength);
927 if (!ImageGenerated::writeToDevice ())
931 Byte *bmpData = m_externalImage + fileHeader.getActualImageOffset () + (infoHeader.getHeight () - 1) * scanLineBMPLength;
932 for (
int i = (
int) infoHeader.getHeight () - 1; i >= 0; i--)
936 if (!m_device->writeInternal (bmpData, scanLineWRILength))
939 bmpData -= scanLineBMPLength;
942 delete [] colourIndex;
949 OLE::OLE () : m_externalObject (NULL),
950 m_externalObjectSize (0), m_externalObjectUpto (0)
956 delete [] m_externalObject;
959 OLE &OLE::operator= (
const OLE &rhs)
964 OLEGenerated::operator= (rhs);
966 m_externalObjectSize = rhs.m_externalObjectSize;
967 m_externalObjectUpto = rhs.m_externalObjectUpto;
969 delete [] m_externalObject;
970 m_externalObject =
new Byte [m_externalObjectSize];
971 if (!m_externalObject)
974 if (rhs.m_externalObject)
975 memcpy (m_externalObject, rhs.m_externalObject, m_externalObjectUpto);
980 bool OLE::readFromDevice (
void)
985 m_device->debug (
"\n<<<< OLE::readFromDevice >>>>\n");
988 if (!OLEGenerated::readFromDevice ())
994 switch (m_objectType)
996 case OLEType::Static:
997 m_device->debug (
"\tobjectType: 1 - static\n");
999 case OLEType::Embedded:
1000 m_device->debug (
"\tobjectType: 2 - embedded\n");
1003 m_device->debug (
"\tobjectType: 3 - link\n");
1011 Dump (numDataBytes);
1015 Dump (numHeaderBytes);
1017 Dump (widthScaledRel1000);
1018 Dump (heightScaledRel1000);
1022 m_externalObject =
new Byte [m_externalObjectSize = getNumDataBytes ()];
1023 if (!m_externalObject)
1024 ErrorAndQuit (Error::OutOfMemory,
"could not allocate memory for external OLE object\n");
1026 if (!m_device->readInternal (m_externalObject, m_externalObjectSize))
1032 bool OLE::writeToDevice (
void)
1037 m_device->debug (
"\n>>>> OLE::writeToDevice <<<<\n");
1043 switch (m_objectType)
1045 case OLEType::Static:
1046 m_device->debug (
"\tobjectType: 1 - static\n");
1048 case OLEType::Embedded:
1049 m_device->debug (
"\tobjectType: 2 - embedded\n");
1052 m_device->debug (
"\tobjectType: 3 - link\n");
1060 Dump (numDataBytes);
1064 Dump (numHeaderBytes);
1066 Dump (widthScaledRel1000);
1067 Dump (heightScaledRel1000);
1071 if (!OLEGenerated::writeToDevice ())
1075 if (!m_device->writeInternal (m_externalObject, m_externalObjectSize))