summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
Diffstat (limited to 'filter')
-rw-r--r--filter/inc/filter/msfilter/escherex.hxx270
-rw-r--r--filter/inc/filter/msfilter/msdffimp.hxx312
-rw-r--r--filter/inc/filter/msfilter/msocximex.hxx28
-rw-r--r--filter/inc/filter/msfilter/msoleexp.hxx8
-rw-r--r--filter/inc/filter/msfilter/svdfppt.hxx296
-rw-r--r--filter/inc/filter/msfilter/svxmsbas.hxx20
-rw-r--r--filter/source/config/cache/cacheitem.hxx12
-rw-r--r--filter/source/config/cache/filtercache.hxx4
-rw-r--r--filter/source/config/cache/typedetection.cxx2
-rw-r--r--filter/source/flash/impswfdialog.cxx2
-rw-r--r--filter/source/flash/swfexporter.cxx4
-rw-r--r--filter/source/flash/swfwriter1.cxx22
-rw-r--r--filter/source/flash/swfwriter2.cxx2
-rw-r--r--filter/source/graphicfilter/egif/egif.cxx168
-rw-r--r--filter/source/graphicfilter/egif/giflzwc.cxx46
-rw-r--r--filter/source/graphicfilter/egif/giflzwc.hxx14
-rw-r--r--filter/source/graphicfilter/eos2met/eos2met.cxx498
-rw-r--r--filter/source/graphicfilter/epbm/epbm.cxx44
-rw-r--r--filter/source/graphicfilter/epgm/epgm.cxx62
-rw-r--r--filter/source/graphicfilter/epict/epict.cxx446
-rw-r--r--filter/source/graphicfilter/eppm/eppm.cxx56
-rw-r--r--filter/source/graphicfilter/eps/eps.cxx336
-rw-r--r--filter/source/graphicfilter/eras/eras.cxx70
-rw-r--r--filter/source/graphicfilter/etiff/etiff.cxx162
-rw-r--r--filter/source/graphicfilter/expm/expm.cxx78
-rw-r--r--filter/source/graphicfilter/icgm/actimpr.cxx4
-rw-r--r--filter/source/graphicfilter/icgm/class4.cxx18
-rw-r--r--filter/source/graphicfilter/icgm/outact.cxx8
-rw-r--r--filter/source/graphicfilter/icgm/outact.hxx4
-rw-r--r--filter/source/graphicfilter/idxf/dxf2mtf.cxx110
-rw-r--r--filter/source/graphicfilter/idxf/dxf2mtf.hxx30
-rw-r--r--filter/source/graphicfilter/idxf/dxfgrprd.cxx52
-rw-r--r--filter/source/graphicfilter/idxf/dxfgrprd.hxx42
-rw-r--r--filter/source/graphicfilter/idxf/dxfreprd.cxx30
-rw-r--r--filter/source/graphicfilter/idxf/dxfreprd.hxx26
-rw-r--r--filter/source/graphicfilter/idxf/dxfvec.cxx22
-rw-r--r--filter/source/graphicfilter/idxf/dxfvec.hxx26
-rw-r--r--filter/source/graphicfilter/idxf/idxf.cxx12
-rw-r--r--filter/source/graphicfilter/ieps/ieps.cxx80
-rw-r--r--filter/source/graphicfilter/ios2met/ios2met.cxx542
-rw-r--r--filter/source/graphicfilter/ipbm/ipbm.cxx204
-rw-r--r--filter/source/graphicfilter/ipcd/ipcd.cxx98
-rw-r--r--filter/source/graphicfilter/ipcx/ipcx.cxx132
-rw-r--r--filter/source/graphicfilter/ipict/ipict.cxx292
-rw-r--r--filter/source/graphicfilter/ipsd/ipsd.cxx188
-rw-r--r--filter/source/graphicfilter/iras/iras.cxx90
-rw-r--r--filter/source/graphicfilter/itga/itga.cxx236
-rw-r--r--filter/source/graphicfilter/itiff/ccidecom.cxx164
-rw-r--r--filter/source/graphicfilter/itiff/ccidecom.hxx64
-rw-r--r--filter/source/graphicfilter/itiff/itiff.cxx388
-rw-r--r--filter/source/graphicfilter/itiff/lzwdecom.cxx36
-rw-r--r--filter/source/graphicfilter/itiff/lzwdecom.hxx28
-rw-r--r--filter/source/msfilter/escherex.cxx214
-rw-r--r--filter/source/msfilter/eschesdo.cxx136
-rw-r--r--filter/source/msfilter/eschesdo.hxx72
-rw-r--r--filter/source/msfilter/msdffimp.cxx876
-rw-r--r--filter/source/msfilter/msocximex.cxx34
-rw-r--r--filter/source/msfilter/msoleexp.cxx10
-rw-r--r--filter/source/msfilter/msvbahelper.cxx2
-rw-r--r--filter/source/msfilter/msvbasic.cxx4
-rw-r--r--filter/source/msfilter/svdfppt.cxx664
-rw-r--r--filter/source/msfilter/svxmsbas.cxx26
-rw-r--r--filter/source/msfilter/svxmsbas2.cxx6
-rw-r--r--filter/source/msfilter/viscache.hxx24
-rw-r--r--filter/source/pdf/impdialog.cxx64
-rw-r--r--filter/source/pdf/impdialog.hxx2
-rw-r--r--filter/source/pdf/pdfexport.cxx4
-rw-r--r--filter/source/svg/svgexport.cxx26
-rw-r--r--filter/source/svg/svgfilter.hxx2
-rw-r--r--filter/source/svg/svgfontexport.cxx16
-rw-r--r--filter/source/svg/svgwriter.cxx56
-rw-r--r--filter/source/xsltdialog/xmlfileview.cxx108
-rw-r--r--filter/source/xsltdialog/xmlfileview.hxx12
-rw-r--r--filter/source/xsltdialog/xmlfiltersettingsdialog.cxx16
-rw-r--r--filter/source/xsltdialog/xmlfiltertabdialog.cxx6
75 files changed, 4134 insertions, 4134 deletions
diff --git a/filter/inc/filter/msfilter/escherex.hxx b/filter/inc/filter/msfilter/escherex.hxx
index 51058e2eabd8..978331a3e4fc 100644
--- a/filter/inc/filter/msfilter/escherex.hxx
+++ b/filter/inc/filter/msfilter/escherex.hxx
@@ -654,15 +654,15 @@ enum ESCHER_LineCap
// Transform
#define ESCHER_Prop_Rotation 4 /* Fixed Point 16.16 degrees */
// Protection
-#define ESCHER_Prop_LockRotation 119 /* BOOL No rotation */
-#define ESCHER_Prop_LockAspectRatio 120 /* BOOL Don't allow changes in aspect ratio */
-#define ESCHER_Prop_LockPosition 121 /* BOOL Don't allow the shape to be moved */
-#define ESCHER_Prop_LockAgainstSelect 122 /* BOOL Shape may not be selected */
-#define ESCHER_Prop_LockCropping 123 /* BOOL No cropping this shape */
-#define ESCHER_Prop_LockVertices 124 /* BOOL Edit Points not allowed */
-#define ESCHER_Prop_LockText 125 /* BOOL Do not edit text */
-#define ESCHER_Prop_LockAdjustHandles 126 /* BOOL Do not adjust */
-#define ESCHER_Prop_LockAgainstGrouping 127 /* BOOL Do not group this shape */
+#define ESCHER_Prop_LockRotation 119 /* sal_Bool No rotation */
+#define ESCHER_Prop_LockAspectRatio 120 /* sal_Bool Don't allow changes in aspect ratio */
+#define ESCHER_Prop_LockPosition 121 /* sal_Bool Don't allow the shape to be moved */
+#define ESCHER_Prop_LockAgainstSelect 122 /* sal_Bool Shape may not be selected */
+#define ESCHER_Prop_LockCropping 123 /* sal_Bool No cropping this shape */
+#define ESCHER_Prop_LockVertices 124 /* sal_Bool Edit Points not allowed */
+#define ESCHER_Prop_LockText 125 /* sal_Bool Do not edit text */
+#define ESCHER_Prop_LockAdjustHandles 126 /* sal_Bool Do not adjust */
+#define ESCHER_Prop_LockAgainstGrouping 127 /* sal_Bool Do not group this shape */
// Text
#define ESCHER_Prop_lTxid 128 /* LONG id for the text, value determined by the host */
#define ESCHER_Prop_dxTextLeft 129 /* LONG margins relative to shape's inscribed */
@@ -676,11 +676,11 @@ enum ESCHER_LineCap
#define ESCHER_Prop_cdirFont 137 /* MSOCDIR Font rotation */
#define ESCHER_Prop_hspNext 138 /* MSOHSP ID of the next shape (used by Word for linked textboxes) */
#define ESCHER_Prop_txdir 139 /* MSOTXDIR Bi-Di Text direction */
-#define ESCHER_Prop_SelectText 187 /* BOOL TRUE if single click selects text, FALSE if two clicks */
-#define ESCHER_Prop_AutoTextMargin 188 /* BOOL use host's margin calculations */
-#define ESCHER_Prop_RotateText 189 /* BOOL Rotate text with shape */
-#define ESCHER_Prop_FitShapeToText 190 /* BOOL Size shape to fit text size */
-#define ESCHER_Prop_FitTextToShape 191 /* BOOL Size text to fit shape size */
+#define ESCHER_Prop_SelectText 187 /* sal_Bool sal_True if single click selects text, sal_False if two clicks */
+#define ESCHER_Prop_AutoTextMargin 188 /* sal_Bool use host's margin calculations */
+#define ESCHER_Prop_RotateText 189 /* sal_Bool Rotate text with shape */
+#define ESCHER_Prop_FitShapeToText 190 /* sal_Bool Size shape to fit text size */
+#define ESCHER_Prop_FitTextToShape 191 /* sal_Bool Size text to fit shape size */
// GeoText
#define ESCHER_Prop_gtextUNICODE 192 /* WCHAR* UNICODE text string */
#define ESCHER_Prop_gtextRTF 193 /* char* RTF text string */
@@ -688,22 +688,22 @@ enum ESCHER_LineCap
#define ESCHER_Prop_gtextSize 195 /* LONG default point size */
#define ESCHER_Prop_gtextSpacing 196 /* LONG fixed point 16.16 */
#define ESCHER_Prop_gtextFont 197 /* WCHAR* font family name */
-#define ESCHER_Prop_gtextFReverseRows 240 /* BOOL Reverse row order */
-#define ESCHER_Prop_fGtext 241 /* BOOL Has text effect */
-#define ESCHER_Prop_gtextFVertical 242 /* BOOL Rotate characters */
-#define ESCHER_Prop_gtextFKern 243 /* BOOL Kern characters */
-#define ESCHER_Prop_gtextFTight 244 /* BOOL Tightening or tracking */
-#define ESCHER_Prop_gtextFStretch 245 /* BOOL Stretch to fit shape */
-#define ESCHER_Prop_gtextFShrinkFit 246 /* BOOL Char bounding box */
-#define ESCHER_Prop_gtextFBestFit 247 /* BOOL Scale text-on-path */
-#define ESCHER_Prop_gtextFNormalize 248 /* BOOL Stretch char height */
-#define ESCHER_Prop_gtextFDxMeasure 249 /* BOOL Do not measure along path */
-#define ESCHER_Prop_gtextFBold 250 /* BOOL Bold font */
-#define ESCHER_Prop_gtextFItalic 251 /* BOOL Italic font */
-#define ESCHER_Prop_gtextFUnderline 252 /* BOOL Underline font */
-#define ESCHER_Prop_gtextFShadow 253 /* BOOL Shadow font */
-#define ESCHER_Prop_gtextFSmallcaps 254 /* BOOL Small caps font */
-#define ESCHER_Prop_gtextFStrikethrough 255 /* BOOL Strike through font */
+#define ESCHER_Prop_gtextFReverseRows 240 /* sal_Bool Reverse row order */
+#define ESCHER_Prop_fGtext 241 /* sal_Bool Has text effect */
+#define ESCHER_Prop_gtextFVertical 242 /* sal_Bool Rotate characters */
+#define ESCHER_Prop_gtextFKern 243 /* sal_Bool Kern characters */
+#define ESCHER_Prop_gtextFTight 244 /* sal_Bool Tightening or tracking */
+#define ESCHER_Prop_gtextFStretch 245 /* sal_Bool Stretch to fit shape */
+#define ESCHER_Prop_gtextFShrinkFit 246 /* sal_Bool Char bounding box */
+#define ESCHER_Prop_gtextFBestFit 247 /* sal_Bool Scale text-on-path */
+#define ESCHER_Prop_gtextFNormalize 248 /* sal_Bool Stretch char height */
+#define ESCHER_Prop_gtextFDxMeasure 249 /* sal_Bool Do not measure along path */
+#define ESCHER_Prop_gtextFBold 250 /* sal_Bool Bold font */
+#define ESCHER_Prop_gtextFItalic 251 /* sal_Bool Italic font */
+#define ESCHER_Prop_gtextFUnderline 252 /* sal_Bool Underline font */
+#define ESCHER_Prop_gtextFShadow 253 /* sal_Bool Shadow font */
+#define ESCHER_Prop_gtextFSmallcaps 254 /* sal_Bool Small caps font */
+#define ESCHER_Prop_gtextFStrikethrough 255 /* sal_Bool Strike through font */
// Blip
#define ESCHER_Prop_cropFromTop 256 /* LONG 16.16 fraction times total */
#define ESCHER_Prop_cropFromBottom 257 /* LONG image width or height, */
@@ -723,10 +723,10 @@ enum ESCHER_LineCap
#define ESCHER_Prop_pibPrint 271 /* IMsoBlip* Blip to display when printing */
#define ESCHER_Prop_pibPrintName 272 /* WCHAR* Blip file name */
#define ESCHER_Prop_pibPrintFlags 273 /* MSOBLIPFLAGS Blip flags */
-#define ESCHER_Prop_fNoHitTestPicture 316 /* BOOL Do not hit test the picture */
-#define ESCHER_Prop_pictureGray 317 /* BOOL grayscale display */
-#define ESCHER_Prop_pictureBiLevel 318 /* BOOL bi-level display */
-#define ESCHER_Prop_pictureActive 319 /* BOOL Server is active (OLE objects only) */
+#define ESCHER_Prop_fNoHitTestPicture 316 /* sal_Bool Do not hit test the picture */
+#define ESCHER_Prop_pictureGray 317 /* sal_Bool grayscale display */
+#define ESCHER_Prop_pictureBiLevel 318 /* sal_Bool bi-level display */
+#define ESCHER_Prop_pictureActive 319 /* sal_Bool Server is active (OLE objects only) */
// Geometry
#define ESCHER_Prop_geoLeft 320 /* LONG Defines the G (geometry) coordinate space. */
#define ESCHER_Prop_geoTop 321 /* LONG */
@@ -745,12 +745,12 @@ enum ESCHER_LineCap
#define ESCHER_Prop_adjust8Value 334 /* LONG */
#define ESCHER_Prop_adjust9Value 335 /* LONG */
#define ESCHER_Prop_adjust10Value 336 /* LONG */
-#define ESCHER_Prop_fShadowOK 378 /* BOOL Shadow may be set */
-#define ESCHER_Prop_f3DOK 379 /* BOOL 3D may be set */
-#define ESCHER_Prop_fLineOK 380 /* BOOL Line style may be set */
-#define ESCHER_Prop_fGtextOK 381 /* BOOL Text effect (FontWork) supported */
-#define ESCHER_Prop_fFillShadeShapeOK 382 /* BOOL */
-#define ESCHER_Prop_fFillOK 383 /* BOOL OK to fill the shape through the UI or VBA? */
+#define ESCHER_Prop_fShadowOK 378 /* sal_Bool Shadow may be set */
+#define ESCHER_Prop_f3DOK 379 /* sal_Bool 3D may be set */
+#define ESCHER_Prop_fLineOK 380 /* sal_Bool Line style may be set */
+#define ESCHER_Prop_fGtextOK 381 /* sal_Bool Text effect (FontWork) supported */
+#define ESCHER_Prop_fFillShadeShapeOK 382 /* sal_Bool */
+#define ESCHER_Prop_fFillOK 383 /* sal_Bool OK to fill the shape through the UI or VBA? */
// FillStyle
#define ESCHER_Prop_fillType 384 /* ESCHER_FillStyle Type of fill */
#define ESCHER_Prop_fillColor 385 /* MSOCLR Foreground color */
@@ -781,11 +781,11 @@ enum ESCHER_LineCap
#define ESCHER_Prop_fillShapeOriginX 410 /* LONG */
#define ESCHER_Prop_fillShapeOriginY 411 /* LONG */
#define ESCHER_Prop_fillShadeType 412 /* MSOSHADETYPE Type of shading, if a shaded (gradient) fill. */
-#define ESCHER_Prop_fFilled 443 /* BOOL Is shape filled? */
-#define ESCHER_Prop_fHitTestFill 444 /* BOOL Should we hit test fill? */
-#define ESCHER_Prop_fillShape 445 /* BOOL Register pattern on shape */
-#define ESCHER_Prop_fillUseRect 446 /* BOOL Use the large rect? */
-#define ESCHER_Prop_fNoFillHitTest 447 /* BOOL Hit test a shape as though filled */
+#define ESCHER_Prop_fFilled 443 /* sal_Bool Is shape filled? */
+#define ESCHER_Prop_fHitTestFill 444 /* sal_Bool Should we hit test fill? */
+#define ESCHER_Prop_fillShape 445 /* sal_Bool Register pattern on shape */
+#define ESCHER_Prop_fillUseRect 446 /* sal_Bool Use the large rect? */
+#define ESCHER_Prop_fNoFillHitTest 447 /* sal_Bool Hit test a shape as though filled */
// LineStyle
#define ESCHER_Prop_lineColor 448 /* MSOCLR Color of line */
#define ESCHER_Prop_lineOpacity 449 /* LONG Not implemented */
@@ -811,11 +811,11 @@ enum ESCHER_LineCap
#define ESCHER_Prop_lineEndArrowLength 469 /* MSOLINEENDLENGTH Arrow at end */
#define ESCHER_Prop_lineJoinStyle 470 /* MSOLINEJOIN How to join lines */
#define ESCHER_Prop_lineEndCapStyle 471 /* MSOLINECAP How to end lines */
-#define ESCHER_Prop_fArrowheadsOK 507 /* BOOL Allow arrowheads if prop. is set */
-#define ESCHER_Prop_fLine 508 /* BOOL Any line? */
-#define ESCHER_Prop_fHitTestLine 509 /* BOOL Should we hit test lines? */
-#define ESCHER_Prop_lineFillShape 510 /* BOOL Register pattern on shape */
-#define ESCHER_Prop_fNoLineDrawDash 511 /* BOOL Draw a dashed line if no line */
+#define ESCHER_Prop_fArrowheadsOK 507 /* sal_Bool Allow arrowheads if prop. is set */
+#define ESCHER_Prop_fLine 508 /* sal_Bool Any line? */
+#define ESCHER_Prop_fHitTestLine 509 /* sal_Bool Should we hit test lines? */
+#define ESCHER_Prop_lineFillShape 510 /* sal_Bool Register pattern on shape */
+#define ESCHER_Prop_fNoLineDrawDash 511 /* sal_Bool Draw a dashed line if no line */
// ShadowStyle
#define ESCHER_Prop_shadowType 512 /* MSOSHADOWTYPE Type of effect */
#define ESCHER_Prop_shadowColor 513 /* MSOCLR Foreground color */
@@ -835,8 +835,8 @@ enum ESCHER_LineCap
#define ESCHER_Prop_shadowWeight 527 /* LONG scaling factor */
#define ESCHER_Prop_shadowOriginX 528 /* LONG */
#define ESCHER_Prop_shadowOriginY 529 /* LONG */
-#define ESCHER_Prop_fShadow 574 /* BOOL Any shadow? */
-#define ESCHER_Prop_fshadowObscured 575 /* BOOL Excel5-style shadow */
+#define ESCHER_Prop_fShadow 574 /* sal_Bool Any shadow? */
+#define ESCHER_Prop_fshadowObscured 575 /* sal_Bool Excel5-style shadow */
// PerspectiveStyle
#define ESCHER_Prop_perspectiveType 576 /* MSOXFORMTYPE Where transform applies */
#define ESCHER_Prop_perspectiveOffsetX 577 /* LONG The LONG values define a */
@@ -850,7 +850,7 @@ enum ESCHER_LineCap
#define ESCHER_Prop_perspectiveWeight 585 /* LONG Scaling factor */
#define ESCHER_Prop_perspectiveOriginX 586 /* LONG */
#define ESCHER_Prop_perspectiveOriginY 587 /* LONG */
-#define ESCHER_Prop_fPerspective 639 /* BOOL On/off */
+#define ESCHER_Prop_fPerspective 639 /* sal_Bool On/off */
// 3D Object
#define ESCHER_Prop_c3DSpecularAmt 640 /* LONG Fixed-point 16.16 */
#define ESCHER_Prop_c3DDiffuseAmt 641 /* LONG Fixed-point 16.16 */
@@ -861,10 +861,10 @@ enum ESCHER_LineCap
#define ESCHER_Prop_c3DExtrudePlane 646 /* LONG Extrusion direction */
#define ESCHER_Prop_c3DExtrusionColor 647 /* MSOCLR Basic color of extruded part of shape; the lighting model used will determine the exact shades used when rendering. */
#define ESCHER_Prop_c3DCrMod 648 /* MSOCLR Modification for BW views */
-#define ESCHER_Prop_f3D 700 /* BOOL Does this shape have a 3D effect? */
-#define ESCHER_Prop_fc3DMetallic 701 /* BOOL Use metallic specularity? */
-#define ESCHER_Prop_fc3DUseExtrusionColor 702 /* BOOL */
-#define ESCHER_Prop_fc3DLightFace 703 /* BOOL */
+#define ESCHER_Prop_f3D 700 /* sal_Bool Does this shape have a 3D effect? */
+#define ESCHER_Prop_fc3DMetallic 701 /* sal_Bool Use metallic specularity? */
+#define ESCHER_Prop_fc3DUseExtrusionColor 702 /* sal_Bool */
+#define ESCHER_Prop_fc3DLightFace 703 /* sal_Bool */
// 3D Style
#define ESCHER_Prop_c3DYRotationAngle 704 /* LONG degrees (16.16) about y axis */
#define ESCHER_Prop_c3DXRotationAngle 705 /* LONG degrees (16.16) about x axis */
@@ -893,22 +893,22 @@ enum ESCHER_LineCap
#define ESCHER_Prop_c3DFillY 728 /* LONG tion; only their relative */
#define ESCHER_Prop_c3DFillZ 729 /* LONG magnitudes matter */
#define ESCHER_Prop_c3DFillIntensity 730 /* LONG Fixed point intensity */
-#define ESCHER_Prop_fc3DConstrainRotation 763 /* BOOL */
-#define ESCHER_Prop_fc3DRotationCenterAuto 764 /* BOOL */
-#define ESCHER_Prop_fc3DParallel 765 /* BOOL Parallel projection? */
-#define ESCHER_Prop_fc3DKeyHarsh 766 /* BOOL Is key lighting harsh? */
-#define ESCHER_Prop_fc3DFillHarsh 767 /* BOOL Is fill lighting harsh? */
+#define ESCHER_Prop_fc3DConstrainRotation 763 /* sal_Bool */
+#define ESCHER_Prop_fc3DRotationCenterAuto 764 /* sal_Bool */
+#define ESCHER_Prop_fc3DParallel 765 /* sal_Bool Parallel projection? */
+#define ESCHER_Prop_fc3DKeyHarsh 766 /* sal_Bool Is key lighting harsh? */
+#define ESCHER_Prop_fc3DFillHarsh 767 /* sal_Bool Is fill lighting harsh? */
// Shape
#define ESCHER_Prop_hspMaster 769 /* MSOHSP master shape */
#define ESCHER_Prop_cxstyle 771 /* MSOCXSTYLE Type of connector */
#define ESCHER_Prop_bWMode 772 /* ESCHERwMode Settings for modifications to */
#define ESCHER_Prop_bWModePureBW 773 /* ESCHERwMode be made when in different */
#define ESCHER_Prop_bWModeBW 774 /* ESCHERwMode forms of black-and-white mode. */
-#define ESCHER_Prop_fOleIcon 826 /* BOOL For OLE objects, whether the object is in icon form */
-#define ESCHER_Prop_fPreferRelativeResize 827 /* BOOL For UI only. Prefer relative resizing. */
-#define ESCHER_Prop_fLockShapeType 828 /* BOOL Lock the shape type (don't allow Change Shape) */
-#define ESCHER_Prop_fDeleteAttachedObject 830 /* BOOL */
-#define ESCHER_Prop_fBackground 831 /* BOOL If TRUE, this is the background shape. */
+#define ESCHER_Prop_fOleIcon 826 /* sal_Bool For OLE objects, whether the object is in icon form */
+#define ESCHER_Prop_fPreferRelativeResize 827 /* sal_Bool For UI only. Prefer relative resizing. */
+#define ESCHER_Prop_fLockShapeType 828 /* sal_Bool Lock the shape type (don't allow Change Shape) */
+#define ESCHER_Prop_fDeleteAttachedObject 830 /* sal_Bool */
+#define ESCHER_Prop_fBackground 831 /* sal_Bool If sal_True, this is the background shape. */
// Callout
#define ESCHER_Prop_spcot 832 /* MSOSPCOT Callout type */
#define ESCHER_Prop_dxyCalloutGap 833 /* LONG Distance from box to first point.(EMUs) */
@@ -916,13 +916,13 @@ enum ESCHER_LineCap
#define ESCHER_Prop_spcod 835 /* MSOSPCOD Callout drop type */
#define ESCHER_Prop_dxyCalloutDropSpecified 836 /* LONG if msospcodSpecified, the actual drop distance */
#define ESCHER_Prop_dxyCalloutLengthSpecified 837 /* LONG if fCalloutLengthSpecified, the actual distance */
-#define ESCHER_Prop_fCallout 889 /* BOOL Is the shape a callout? */
-#define ESCHER_Prop_fCalloutAccentBar 890 /* BOOL does callout have accent bar */
-#define ESCHER_Prop_fCalloutTextBorder 891 /* BOOL does callout have a text border */
-#define ESCHER_Prop_fCalloutMinusX 892 /* BOOL */
-#define ESCHER_Prop_fCalloutMinusY 893 /* BOOL */
-#define ESCHER_Prop_fCalloutDropAuto 894 /* BOOL If true, then we occasionally invert the drop distance */
-#define ESCHER_Prop_fCalloutLengthSpecified 895 /* BOOL if true, we look at dxyCalloutLengthSpecified */
+#define ESCHER_Prop_fCallout 889 /* sal_Bool Is the shape a callout? */
+#define ESCHER_Prop_fCalloutAccentBar 890 /* sal_Bool does callout have accent bar */
+#define ESCHER_Prop_fCalloutTextBorder 891 /* sal_Bool does callout have a text border */
+#define ESCHER_Prop_fCalloutMinusX 892 /* sal_Bool */
+#define ESCHER_Prop_fCalloutMinusY 893 /* sal_Bool */
+#define ESCHER_Prop_fCalloutDropAuto 894 /* sal_Bool If true, then we occasionally invert the drop distance */
+#define ESCHER_Prop_fCalloutLengthSpecified 895 /* sal_Bool if true, we look at dxyCalloutLengthSpecified */
// GroupShape
#define ESCHER_Prop_wzName 896 /* WCHAR* Shape Name (present only if explicitly set) */
#define ESCHER_Prop_wzDescription 897 /* WCHAR* alternate text */
@@ -935,13 +935,13 @@ enum ESCHER_LineCap
#define ESCHER_Prop_lidRegroup 904 /* LONG Regroup ID */
#define ESCHER_Prop_tableProperties 927
#define ESCHER_Prop_tableRowProperties 928
-#define ESCHER_Prop_fEditedWrap 953 /* BOOL Has the wrap polygon been edited? */
-#define ESCHER_Prop_fBehindDocument 954 /* BOOL Word-only (shape is behind text) */
-#define ESCHER_Prop_fOnDblClickNotify 955 /* BOOL Notify client on a double click */
-#define ESCHER_Prop_fIsButton 956 /* BOOL A button shape (i.e., clicking performs an action). Set for shapes with attached hyperlinks or macros. */
-#define ESCHER_Prop_fOneD 957 /* BOOL 1D adjustment */
-#define ESCHER_Prop_fHidden 958 /* BOOL Do not display */
-#define ESCHER_Prop_fPrint 959 /* BOOL Print this shape */
+#define ESCHER_Prop_fEditedWrap 953 /* sal_Bool Has the wrap polygon been edited? */
+#define ESCHER_Prop_fBehindDocument 954 /* sal_Bool Word-only (shape is behind text) */
+#define ESCHER_Prop_fOnDblClickNotify 955 /* sal_Bool Notify client on a double click */
+#define ESCHER_Prop_fIsButton 956 /* sal_Bool A button shape (i.e., clicking performs an action). Set for shapes with attached hyperlinks or macros. */
+#define ESCHER_Prop_fOneD 957 /* sal_Bool 1D adjustment */
+#define ESCHER_Prop_fHidden 958 /* sal_Bool Do not display */
+#define ESCHER_Prop_fPrint 959 /* sal_Bool Print this shape */
#define ESCHER_PERSISTENTRY_PREALLOCATE 64
@@ -1025,9 +1025,9 @@ struct EscherPropertyValueHelper
struct EscherPersistEntry
{
- UINT32 mnID;
- UINT32 mnOffset;
- EscherPersistEntry( UINT32 nId, UINT32 nOffset ) { mnID = nId; mnOffset = nOffset; };
+ sal_uInt32 mnID;
+ sal_uInt32 mnOffset;
+ EscherPersistEntry( sal_uInt32 nId, sal_uInt32 nOffset ) { mnID = nId; mnOffset = nOffset; };
};
@@ -1041,12 +1041,12 @@ class EscherBlibEntry
protected:
- UINT32 mnIdentifier[ 4 ];
- UINT32 mnPictureOffset; // offset auf die grafik im PictureStreams
- UINT32 mnSize; // size of real graphic
+ sal_uInt32 mnIdentifier[ 4 ];
+ sal_uInt32 mnPictureOffset; // offset auf die grafik im PictureStreams
+ sal_uInt32 mnSize; // size of real graphic
- UINT32 mnRefCount; // !! reference count
- UINT32 mnSizeExtra; // !! size of preceding header
+ sal_uInt32 mnRefCount; // !! reference count
+ sal_uInt32 mnSizeExtra; // !! size of preceding header
ESCHER_BlibType meBlibType;
@@ -1066,7 +1066,7 @@ class EscherBlibEntry
void WriteBlibEntry( SvStream& rSt, sal_Bool bWritePictureOffset, sal_uInt32 nResize = 0 );
sal_Bool IsEmpty() const { return mbIsEmpty; };
- BOOL operator==( const EscherBlibEntry& ) const;
+ sal_Bool operator==( const EscherBlibEntry& ) const;
};
// ---------------------------------------------------------------------------------------------
@@ -1084,7 +1084,7 @@ class MSFILTER_DLLPUBLIC EscherGraphicProvider
protected :
- UINT32 ImplInsertBlib( EscherBlibEntry* p_EscherBlibEntry );
+ sal_uInt32 ImplInsertBlib( EscherBlibEntry* p_EscherBlibEntry );
public :
@@ -1261,13 +1261,13 @@ class MSFILTER_DLLPUBLIC EscherPersistTable
public:
List maPersistTable;
- BOOL PtIsID( UINT32 nID );
- void PtInsert( UINT32 nID, UINT32 nOfs );
- UINT32 PtDelete( UINT32 nID );
- UINT32 PtGetOffsetByID( UINT32 nID );
- UINT32 PtReplace( UINT32 nID, UINT32 nOfs );
- UINT32 PtReplaceOrInsert( UINT32 nID, UINT32 nOfs );
- UINT32 PtGetCount() const { return maPersistTable.Count(); };
+ sal_Bool PtIsID( sal_uInt32 nID );
+ void PtInsert( sal_uInt32 nID, sal_uInt32 nOfs );
+ sal_uInt32 PtDelete( sal_uInt32 nID );
+ sal_uInt32 PtGetOffsetByID( sal_uInt32 nID );
+ sal_uInt32 PtReplace( sal_uInt32 nID, sal_uInt32 nOfs );
+ sal_uInt32 PtReplaceOrInsert( sal_uInt32 nID, sal_uInt32 nOfs );
+ sal_uInt32 PtGetCount() const { return maPersistTable.Count(); };
EscherPersistTable();
virtual ~EscherPersistTable();
@@ -1313,11 +1313,11 @@ private:
EscherExClientRecord_Base* pClientData;
EscherExClientRecord_Base* pClientTextbox;
// ignore single shape if entire pages are written
- BOOL bDontWriteShape;
+ sal_Bool bDontWriteShape;
public:
EscherExHostAppData() : pClientAnchor(0), pClientData(0),
- pClientTextbox(0), bDontWriteShape(FALSE)
+ pClientTextbox(0), bDontWriteShape(sal_False)
{}
void SetClientAnchor( EscherExClientAnchor_Base* p )
@@ -1326,7 +1326,7 @@ public:
{ pClientData = p; }
void SetClientTextbox( EscherExClientRecord_Base* p )
{ pClientTextbox = p; }
- void SetDontWriteShape( BOOL b )
+ void SetDontWriteShape( sal_Bool b )
{ bDontWriteShape = b; }
EscherExClientAnchor_Base* GetClientAnchor() const
{ return pClientAnchor; }
@@ -1342,7 +1342,7 @@ public:
void WriteClientTextbox( EscherEx& rEx )
{ if( pClientTextbox ) pClientTextbox->WriteData( rEx ); }
- BOOL DontWriteShape() const { return bDontWriteShape; }
+ sal_Bool DontWriteShape() const { return bDontWriteShape; }
};
@@ -1442,22 +1442,22 @@ class MSFILTER_DLLPUBLIC EscherEx : public EscherPersistTable
EscherExGlobalRef mxGlobal;
ImplEscherExSdrPtr mpImplEscherExSdr;
SvStream* mpOutStrm;
- UINT32 mnStrmStartOfs;
+ sal_uInt32 mnStrmStartOfs;
std::vector< sal_uInt32 > mOffsets;
std::vector< sal_uInt16 > mRecTypes;
- UINT32 mnCurrentDg;
- UINT32 mnCountOfs;
+ sal_uInt32 mnCurrentDg;
+ sal_uInt32 mnCountOfs;
- UINT32 mnGroupLevel;
- UINT16 mnHellLayerId;
+ sal_uInt32 mnGroupLevel;
+ sal_uInt16 mnHellLayerId;
- BOOL mbEscherSpgr;
- BOOL mbEscherDg;
- BOOL mbOleEmf; // OLE is EMF instead of WMF
+ sal_Bool mbEscherSpgr;
+ sal_Bool mbEscherDg;
+ sal_Bool mbOleEmf; // OLE is EMF instead of WMF
- virtual BOOL DoSeek( UINT32 nKey );
+ virtual sal_Bool DoSeek( sal_uInt32 nKey );
public:
explicit EscherEx( const EscherExGlobalRef& rxGlobal, SvStream& rOutStrm );
@@ -1505,17 +1505,17 @@ public:
*/
void InsertAtCurrentPos( sal_uInt32 nBytes, bool bExpandEndOfAtom );
- void InsertPersistOffset( UINT32 nKey, UINT32 nOffset ); // Es wird nicht geprueft, ob sich jener schluessel schon in der PersistantTable befindet
- void ReplacePersistOffset( UINT32 nKey, UINT32 nOffset );
- UINT32 GetPersistOffset( UINT32 nKey );
- BOOL SeekToPersistOffset( UINT32 nKey );
- virtual BOOL InsertAtPersistOffset( UINT32 nKey, UINT32 nValue );// nValue wird im Stream an entrsprechender Stelle eingefuegt(overwrite modus), ohne dass sich die
+ void InsertPersistOffset( sal_uInt32 nKey, sal_uInt32 nOffset ); // Es wird nicht geprueft, ob sich jener schluessel schon in der PersistantTable befindet
+ void ReplacePersistOffset( sal_uInt32 nKey, sal_uInt32 nOffset );
+ sal_uInt32 GetPersistOffset( sal_uInt32 nKey );
+ sal_Bool SeekToPersistOffset( sal_uInt32 nKey );
+ virtual sal_Bool InsertAtPersistOffset( sal_uInt32 nKey, sal_uInt32 nValue );// nValue wird im Stream an entrsprechender Stelle eingefuegt(overwrite modus), ohne dass sich die
// aktuelle StreamPosition aendert
SvStream& GetStream() const { return *mpOutStrm; }
- ULONG GetStreamPos() const { return mpOutStrm->Tell(); }
+ sal_uLong GetStreamPos() const { return mpOutStrm->Tell(); }
- virtual BOOL SeekBehindRecHeader( UINT16 nRecType ); // der stream muss vor einem gueltigen Record Header oder Atom stehen
+ virtual sal_Bool SeekBehindRecHeader( sal_uInt16 nRecType ); // der stream muss vor einem gueltigen Record Header oder Atom stehen
// features beim erzeugen folgender Container:
//
@@ -1524,29 +1524,29 @@ public:
// ESCHER_SpgrContainer:
// ESCHER_SpContainer:
- virtual void OpenContainer( UINT16 nEscherContainer, int nRecInstance = 0 );
+ virtual void OpenContainer( sal_uInt16 nEscherContainer, int nRecInstance = 0 );
virtual void CloseContainer();
virtual void BeginAtom();
- virtual void EndAtom( UINT16 nRecType, int nRecVersion = 0, int nRecInstance = 0 );
- virtual void AddAtom( UINT32 nAtomSitze, UINT16 nRecType, int nRecVersion = 0, int nRecInstance = 0 );
+ virtual void EndAtom( sal_uInt16 nRecType, int nRecVersion = 0, int nRecInstance = 0 );
+ virtual void AddAtom( sal_uInt32 nAtomSitze, sal_uInt16 nRecType, int nRecVersion = 0, int nRecInstance = 0 );
virtual void AddChildAnchor( const Rectangle& rRectangle );
virtual void AddClientAnchor( const Rectangle& rRectangle );
- virtual UINT32 EnterGroup( const String& rShapeName, const Rectangle* pBoundRect = 0 );
- UINT32 EnterGroup( const Rectangle* pBoundRect = NULL );
- UINT32 GetGroupLevel() const { return mnGroupLevel; };
- virtual BOOL SetGroupSnapRect( UINT32 nGroupLevel, const Rectangle& rRect );
- virtual BOOL SetGroupLogicRect( UINT32 nGroupLevel, const Rectangle& rRect );
+ virtual sal_uInt32 EnterGroup( const String& rShapeName, const Rectangle* pBoundRect = 0 );
+ sal_uInt32 EnterGroup( const Rectangle* pBoundRect = NULL );
+ sal_uInt32 GetGroupLevel() const { return mnGroupLevel; };
+ virtual sal_Bool SetGroupSnapRect( sal_uInt32 nGroupLevel, const Rectangle& rRect );
+ virtual sal_Bool SetGroupLogicRect( sal_uInt32 nGroupLevel, const Rectangle& rRect );
virtual void LeaveGroup();
// ein ESCHER_Sp wird geschrieben ( Ein ESCHER_DgContainer muss dazu geoeffnet sein !!)
- virtual void AddShape( UINT32 nShpInstance, UINT32 nFlagIds, UINT32 nShapeID = 0 );
+ virtual void AddShape( sal_uInt32 nShpInstance, sal_uInt32 nFlagIds, sal_uInt32 nShapeID = 0 );
virtual void Commit( EscherPropertyContainer& rProps, const Rectangle& rRect );
- UINT32 GetColor( const UINT32 nColor, BOOL bSwap = TRUE );
- UINT32 GetColor( const Color& rColor, BOOL bSwap = TRUE );
+ sal_uInt32 GetColor( const sal_uInt32 nColor, sal_Bool bSwap = sal_True );
+ sal_uInt32 GetColor( const Color& rColor, sal_Bool bSwap = sal_True );
// ...Sdr... implemented in eschesdo.cxx
@@ -1554,7 +1554,7 @@ public:
void AddUnoShapes( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& rxShapes );
/// returns the ShapeID
- UINT32 AddSdrObject( const SdrObject& rObj );
+ sal_uInt32 AddSdrObject( const SdrObject& rObj );
/// If objects are written through AddSdrObject the
/// SolverContainer has to be written, and maybe some
@@ -1570,7 +1570,7 @@ public:
/// Called after a shape is written to inform the application
/// of the resulted shape type and ID.
- virtual void EndShape( UINT16 nShapeType, UINT32 nShapeID );
+ virtual void EndShape( sal_uInt16 nShapeType, sal_uInt32 nShapeID );
/// Called before an AdditionalText EnterGroup occurs.
/// The current shape will be written in three parts:
@@ -1591,14 +1591,14 @@ public:
virtual EscherExHostAppData* EnterAdditionalTextGroup();
/// Called if an ESCHER_Prop_lTxid shall be written
- virtual UINT32 QueryTextID( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >&, UINT32 nShapeId );
+ virtual sal_uInt32 QueryTextID( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >&, sal_uInt32 nShapeId );
// add an dummy rectangle shape into the escher stream
- UINT32 AddDummyShape();
+ sal_uInt32 AddDummyShape();
static const SdrObject* GetSdrObject( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& rXShape );
- void SetHellLayerId( UINT16 nId ) { mnHellLayerId = nId; }
- UINT16 GetHellLayerId() const { return mnHellLayerId; }
+ void SetHellLayerId( sal_uInt16 nId ) { mnHellLayerId = nId; }
+ sal_uInt16 GetHellLayerId() const { return mnHellLayerId; }
private:
EscherEx( const EscherEx& );
diff --git a/filter/inc/filter/msfilter/msdffimp.hxx b/filter/inc/filter/msfilter/msdffimp.hxx
index 4f11a4c2fab9..29894fe38525 100644
--- a/filter/inc/filter/msfilter/msdffimp.hxx
+++ b/filter/inc/filter/msfilter/msdffimp.hxx
@@ -65,17 +65,17 @@ class MSFILTER_DLLPUBLIC DffRecordHeader
{
public:
- BYTE nRecVer; // may be DFF_PSFLAG_CONTAINER
- UINT16 nRecInstance;
- UINT16 nImpVerInst;
- UINT16 nRecType;
- UINT32 nRecLen;
- ULONG nFilePos;
+ sal_uInt8 nRecVer; // may be DFF_PSFLAG_CONTAINER
+ sal_uInt16 nRecInstance;
+ sal_uInt16 nImpVerInst;
+ sal_uInt16 nRecType;
+ sal_uInt32 nRecLen;
+ sal_uLong nFilePos;
public:
DffRecordHeader() : nRecVer(0), nRecInstance(0), nImpVerInst(0), nRecType(0), nRecLen(0), nFilePos(0) {}
FASTBOOL IsContainer() const { return nRecVer == DFF_PSFLAG_CONTAINER; }
- ULONG GetRecBegFilePos() const { return nFilePos; }
- ULONG GetRecEndFilePos() const { return nFilePos + DFF_COMMON_RECORD_HEADER_SIZE + nRecLen; }
+ sal_uLong GetRecBegFilePos() const { return nFilePos; }
+ sal_uLong GetRecEndFilePos() const { return nFilePos + DFF_COMMON_RECORD_HEADER_SIZE + nRecLen; }
void SeekToEndOfRecord(SvStream& rIn) const { rIn.Seek(nFilePos + DFF_COMMON_RECORD_HEADER_SIZE + nRecLen ); }
void SeekToContent( SvStream& rIn) const { rIn.Seek(nFilePos + DFF_COMMON_RECORD_HEADER_SIZE ); }
void SeekToBegOfRecord(SvStream& rIn) const { rIn.Seek( nFilePos ); }
@@ -86,10 +86,10 @@ public:
struct DffPropFlags
{
- BYTE bSet : 1;
- BYTE bComplex : 1;
- BYTE bBlip : 1;
- BYTE bSoftAttr : 1;
+ sal_uInt8 bSet : 1;
+ sal_uInt8 bComplex : 1;
+ sal_uInt8 bBlip : 1;
+ sal_uInt8 bSoftAttr : 1;
};
class SvxMSDffManager;
@@ -98,23 +98,23 @@ class MSFILTER_DLLPUBLIC DffPropSet : public Table
{
protected :
- UINT32 mpContents[ 1024 ];
+ sal_uInt32 mpContents[ 1024 ];
DffPropFlags mpFlags[ 1024 ];
public :
- DffPropSet( BOOL bInitialize = FALSE ){ if ( bInitialize )
+ DffPropSet( sal_Bool bInitialize = sal_False ){ if ( bInitialize )
memset( mpFlags, 0, 0x400 * sizeof( DffPropFlags ) ); };
- inline BOOL IsProperty( UINT32 nRecType ) const { return ( mpFlags[ nRecType & 0x3ff ].bSet ); };
- BOOL IsHardAttribute( UINT32 nId ) const;
- UINT32 GetPropertyValue( UINT32 nId, UINT32 nDefault = 0 ) const;
+ inline sal_Bool IsProperty( sal_uInt32 nRecType ) const { return ( mpFlags[ nRecType & 0x3ff ].bSet ); };
+ sal_Bool IsHardAttribute( sal_uInt32 nId ) const;
+ sal_uInt32 GetPropertyValue( sal_uInt32 nId, sal_uInt32 nDefault = 0 ) const;
/** Returns a boolean property by its real identifier. */
- bool GetPropertyBool( UINT32 nId, bool bDefault = false ) const;
+ bool GetPropertyBool( sal_uInt32 nId, bool bDefault = false ) const;
/** Returns a string property. */
- ::rtl::OUString GetPropertyString( UINT32 nId, SvStream& rStrm ) const;
- void SetPropertyValue( UINT32 nId, UINT32 nValue ) const;
- BOOL SeekToContent( UINT32 nRecType, SvStream& rSt ) const;
+ ::rtl::OUString GetPropertyString( sal_uInt32 nId, SvStream& rStrm ) const;
+ void SetPropertyValue( sal_uInt32 nId, sal_uInt32 nValue ) const;
+ sal_Bool SeekToContent( sal_uInt32 nRecType, SvStream& rSt ) const;
void Merge( DffPropSet& rMasterPropSet ) const;
void InitializePropSet() const;
friend SvStream& operator>>( SvStream& rIn, DffPropSet& rPropSet );
@@ -137,19 +137,19 @@ class MSFILTER_DLLPUBLIC DffPropertyReader : public DffPropSet
public:
- INT32 mnFix16Angle;
+ sal_Int32 mnFix16Angle;
DffPropertyReader( const SvxMSDffManager& rManager );
~DffPropertyReader();
- INT32 Fix16ToAngle( INT32 nAngle ) const;
+ sal_Int32 Fix16ToAngle( sal_Int32 nAngle ) const;
#ifdef DBG_CUSTOMSHAPE
- void ReadPropSet( SvStream& rIn, void* pClientData, UINT32 nShapeType = 0 ) const;
+ void ReadPropSet( SvStream& rIn, void* pClientData, sal_uInt32 nShapeType = 0 ) const;
#else
void ReadPropSet( SvStream& rIn, void* pClientData ) const;
#endif
- void SetDefaultPropSet( SvStream& rIn, UINT32 nOffDgg ) const;
+ void SetDefaultPropSet( SvStream& rIn, sal_uInt32 nOffDgg ) const;
void ApplyAttributes( SvStream& rIn, SfxItemSet& rSet ) const;
void ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, const DffObjData& rObjData ) const;
};
@@ -236,8 +236,8 @@ struct MSFILTER_DLLPUBLIC SvxMSDffSolverContainer
struct FIDCL
{
- UINT32 dgid; // DG owning the SPIDs in this cluster
- UINT32 cspidCur; // number of SPIDs used so far
+ sal_uInt32 dgid; // DG owning the SPIDs in this cluster
+ sal_uInt32 cspidCur; // number of SPIDs used so far
};
//---------------------------------------------------------------------------
@@ -245,9 +245,9 @@ struct FIDCL
//---------------------------------------------------------------------------
struct MSDffTxId
{
- USHORT nTxBxS;
- USHORT nSequence;
- MSDffTxId(USHORT nTxBxS_, USHORT nSequence_ )
+ sal_uInt16 nTxBxS;
+ sal_uInt16 nSequence;
+ MSDffTxId(sal_uInt16 nTxBxS_, sal_uInt16 nSequence_ )
: nTxBxS( nTxBxS_ ),
nSequence( nSequence_ ){}
MSDffTxId(const MSDffTxId& rCopy)
@@ -260,15 +260,15 @@ struct MSFILTER_DLLPUBLIC SvxMSDffImportRec
SdrObject* pObj;
Polygon* pWrapPolygon;
char* pClientAnchorBuffer;
- UINT32 nClientAnchorLen;
+ sal_uInt32 nClientAnchorLen;
char* pClientDataBuffer;
- UINT32 nClientDataLen;
- UINT32 nXAlign;
- UINT32 nXRelTo;
- UINT32 nYAlign;
- UINT32 nYRelTo;
- UINT32 nLayoutInTableCell;
- UINT32 nFlags;
+ sal_uInt32 nClientDataLen;
+ sal_uInt32 nXAlign;
+ sal_uInt32 nXRelTo;
+ sal_uInt32 nYAlign;
+ sal_uInt32 nYRelTo;
+ sal_uInt32 nLayoutInTableCell;
+ sal_uInt32 nFlags;
long nTextRotationAngle;
long nDxTextLeft; // Abstand der Textbox vom umgebenden Shape
long nDyTextTop;
@@ -283,25 +283,25 @@ struct MSFILTER_DLLPUBLIC SvxMSDffImportRec
long nCropFromLeft;
long nCropFromRight;
MSDffTxId aTextId; // Kennungen fuer Textboxen
- ULONG nNextShapeId; // fuer verlinkte Textboxen
- ULONG nShapeId;
+ sal_uLong nNextShapeId; // fuer verlinkte Textboxen
+ sal_uLong nShapeId;
MSO_SPT eShapeType;
MSO_LineStyle eLineStyle; // Umrandungs-Arten
- BOOL bDrawHell :1;
- BOOL bHidden :1;
- BOOL bReplaceByFly :1;
- BOOL bLastBoxInChain :1;
- BOOL bHasUDefProp :1;
- BOOL bVFlip :1;
- BOOL bHFlip :1;
- BOOL bAutoWidth :1;
+ sal_Bool bDrawHell :1;
+ sal_Bool bHidden :1;
+ sal_Bool bReplaceByFly :1;
+ sal_Bool bLastBoxInChain :1;
+ sal_Bool bHasUDefProp :1;
+ sal_Bool bVFlip :1;
+ sal_Bool bHFlip :1;
+ sal_Bool bAutoWidth :1;
SvxMSDffImportRec();
SvxMSDffImportRec(const SvxMSDffImportRec& rCopy);
~SvxMSDffImportRec();
- BOOL operator==( const SvxMSDffImportRec& rEntry ) const
+ sal_Bool operator==( const SvxMSDffImportRec& rEntry ) const
{ return nShapeId == rEntry.nShapeId; }
- BOOL operator<( const SvxMSDffImportRec& rEntry ) const
+ sal_Bool operator<( const SvxMSDffImportRec& rEntry ) const
{ return nShapeId < rEntry.nShapeId; }
};
typedef SvxMSDffImportRec* MSDffImportRec_Ptr;
@@ -324,13 +324,13 @@ struct SvxMSDffImportData
SvxMSDffImportData(const Rectangle& rParentRect)
:aParentRect( rParentRect )
{}
- void SetNewRect(INT32 l, INT32 o,
- INT32 r, INT32 u ){ aNewRect = Rectangle(l,o, r,u); }
- BOOL HasParRect() const { return aParentRect.IsEmpty(); }
- BOOL HasNewRect() const { return aNewRect.IsEmpty() ; }
- BOOL HasRecords() const { return 0 != aRecords.Count(); }
- USHORT GetRecCount() const { return aRecords.Count(); }
- SvxMSDffImportRec* GetRecord(USHORT iRecord) const
+ void SetNewRect(sal_Int32 l, sal_Int32 o,
+ sal_Int32 r, sal_Int32 u ){ aNewRect = Rectangle(l,o, r,u); }
+ sal_Bool HasParRect() const { return aParentRect.IsEmpty(); }
+ sal_Bool HasNewRect() const { return aNewRect.IsEmpty() ; }
+ sal_Bool HasRecords() const { return 0 != aRecords.Count(); }
+ sal_uInt16 GetRecCount() const { return aRecords.Count(); }
+ SvxMSDffImportRec* GetRecord(sal_uInt16 iRecord) const
{ return aRecords.GetObject( iRecord ); }
};
@@ -341,16 +341,16 @@ struct DffObjData
Rectangle aBoundRect;
Rectangle aChildAnchor;
- UINT32 nShapeId;
- UINT32 nSpFlags;
+ sal_uInt32 nShapeId;
+ sal_uInt32 nSpFlags;
MSO_SPT eShapeType;
- BOOL bShapeType : 1;
- BOOL bClientAnchor : 1;
- BOOL bClientData : 1;
- BOOL bChildAnchor : 1;
- BOOL bOpt : 1;
- BOOL bIsAutoText : 1;
+ sal_Bool bShapeType : 1;
+ sal_Bool bClientAnchor : 1;
+ sal_Bool bClientData : 1;
+ sal_Bool bChildAnchor : 1;
+ sal_Bool bOpt : 1;
+ sal_Bool bIsAutoText : 1;
int nCalledByGroup;
@@ -362,12 +362,12 @@ struct DffObjData
nShapeId( 0 ),
nSpFlags( 0 ),
eShapeType( mso_sptNil ),
- bShapeType( FALSE ),
- bClientAnchor( FALSE ),
- bClientData( FALSE ),
- bChildAnchor( FALSE ),
- bOpt( FALSE ),
- bIsAutoText( FALSE ),
+ bShapeType( sal_False ),
+ bClientAnchor( sal_False ),
+ bClientData( sal_False ),
+ bChildAnchor( sal_False ),
+ bOpt( sal_False ),
+ bIsAutoText( sal_False ),
nCalledByGroup( nClByGroup ){}
};
@@ -375,8 +375,8 @@ struct DffObjData
struct DffRecordList
{
- UINT32 nCount;
- UINT32 nCurrent;
+ sal_uInt32 nCount;
+ sal_uInt32 nCurrent;
DffRecordList* pPrev;
DffRecordList* pNext;
@@ -400,10 +400,10 @@ class MSFILTER_DLLPUBLIC DffRecordManager : public DffRecordList
DffRecordList* pCList;
void Clear();
- void Consume( SvStream& rIn, BOOL bAppend = FALSE, UINT32 nStOfs = 0 );
+ void Consume( SvStream& rIn, sal_Bool bAppend = sal_False, sal_uInt32 nStOfs = 0 );
- BOOL SeekToContent( SvStream& rIn, UINT16 nRecType, DffSeekToContentMode eMode = SEEK_FROM_BEGINNING );
- DffRecordHeader* GetRecordHeader( UINT16 nRecType, DffSeekToContentMode eMode = SEEK_FROM_BEGINNING );
+ sal_Bool SeekToContent( SvStream& rIn, sal_uInt16 nRecType, DffSeekToContentMode eMode = SEEK_FROM_BEGINNING );
+ DffRecordHeader* GetRecordHeader( sal_uInt16 nRecType, DffSeekToContentMode eMode = SEEK_FROM_BEGINNING );
DffRecordManager();
DffRecordManager( SvStream& rIn );
@@ -433,10 +433,10 @@ class MSFILTER_DLLPUBLIC SvxMSDffManager : public DffPropertyReader
SvxMSDffBLIPInfos* pBLIPInfos;
SvxMSDffShapeInfos* pShapeInfos;
SvxMSDffShapeOrders* pShapeOrders;
- ULONG nDefaultFontHeight;
+ sal_uLong nDefaultFontHeight;
long nOffsDgg;
- USHORT nBLIPCount;
- USHORT nShapeCount;
+ sal_uInt16 nBLIPCount;
+ sal_uInt16 nShapeCount;
sal_uInt32 nGroupShapeFlags;
void CheckTxBxStoryChain();
@@ -445,9 +445,9 @@ class MSFILTER_DLLPUBLIC SvxMSDffManager : public DffPropertyReader
protected :
String maBaseURL;
- UINT32 mnCurMaxShapeId; // we need this information to
- UINT32 mnDrawingsSaved; // access the right drawing
- UINT32 mnIdClusters; // while only knowing the shapeid
+ sal_uInt32 mnCurMaxShapeId; // we need this information to
+ sal_uInt32 mnDrawingsSaved; // access the right drawing
+ sal_uInt32 mnIdClusters; // while only knowing the shapeid
FIDCL* mpFidcls;
Table maDgOffsetTable; // array of fileoffsets
@@ -467,8 +467,8 @@ protected :
long nPntMul;
long nPntDiv;
FASTBOOL bNeedMap;
- UINT32 nSvxMSDffSettings;
- UINT32 nSvxMSDffOLEConvFlags;
+ sal_uInt32 nSvxMSDffSettings;
+ sal_uInt32 nSvxMSDffOLEConvFlags;
/** stores a reference to an imported SdrObject with its shape id if
it has one
@@ -477,26 +477,26 @@ protected :
void GetCtrlData( long nOffsDgg );
void GetDrawingGroupContainerData( SvStream& rSt,
- ULONG nLenDgg );
+ sal_uLong nLenDgg );
// --> OD 2008-08-01 #156763#
// Add internal drawing container id as parameter to the sub methods of
// reading the control information about the drawing objects.
// The drawing container id is used to distinguish the text ids of drawing
// objects in different drawing containers.
void GetDrawingContainerData( SvStream& rSt,
- ULONG nLenDg,
+ sal_uLong nLenDg,
const unsigned long nDrawingContainerId );
- BOOL GetShapeGroupContainerData( SvStream& rSt,
- ULONG nLenShapeGroupCont,
- BOOL bPatriarch,
+ sal_Bool GetShapeGroupContainerData( SvStream& rSt,
+ sal_uLong nLenShapeGroupCont,
+ sal_Bool bPatriarch,
const unsigned long nDrawingContainerId );
- BOOL GetShapeContainerData( SvStream& rSt,
- ULONG nLenShapeCont,
- ULONG nPosGroup,
+ sal_Bool GetShapeContainerData( SvStream& rSt,
+ sal_uLong nLenShapeCont,
+ sal_uLong nPosGroup,
const unsigned long nDrawingContainerId );
// <--
- FASTBOOL ReadGraphic( SvStream& rSt, ULONG nIndex, Graphic& rGraphic ) const;
+ FASTBOOL ReadGraphic( SvStream& rSt, sal_uLong nIndex, Graphic& rGraphic ) const;
SdrObject* ImportFontWork( SvStream&, SfxItemSet&, Rectangle& rBoundRect ) const;
SdrObject* ImportGraphic( SvStream&, SfxItemSet&, const DffObjData& ) const;
// --> OD 2004-12-14 #i32596# - pass <nCalledByGroup> to method
@@ -513,7 +513,7 @@ protected :
static const GDIMetaFile* lcl_GetMetaFileFromGrf_Impl( const Graphic& rGrf, GDIMetaFile& rMtf );
#ifndef SVX_LIGHT
static com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > CheckForConvertToSOObj(
- UINT32 nConvertFlags, SotStorage& rSrcStg,
+ sal_uInt32 nConvertFlags, SotStorage& rSrcStg,
const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& xDestStg,
const Graphic& rGrf,
const Rectangle& rVisArea );
@@ -522,12 +522,12 @@ protected :
/*
folgende Methoden sind zum Excel-Import zu ueberschreiben:
*/
- virtual BOOL ProcessClientAnchor(SvStream& rStData, ULONG nDatLen, char*& rpBuff, UINT32& rBuffLen ) const;
+ virtual sal_Bool ProcessClientAnchor(SvStream& rStData, sal_uLong nDatLen, char*& rpBuff, sal_uInt32& rBuffLen ) const;
virtual void ProcessClientAnchor2( SvStream& rStData, DffRecordHeader& rHd, void* pData, DffObjData& );
- virtual BOOL ProcessClientData( SvStream& rStData, ULONG nDatLen, char*& rpBuff, UINT32& rBuffLen ) const;
+ virtual sal_Bool ProcessClientData( SvStream& rStData, sal_uLong nDatLen, char*& rpBuff, sal_uInt32& rBuffLen ) const;
virtual SdrObject* ProcessObj( SvStream& rSt, DffObjData& rData, void* pData, Rectangle& rTextRect, SdrObject* pObj = NULL);
- virtual ULONG Calc_nBLIPPos( ULONG nOrgVal, ULONG nStreamPos ) const;
- virtual FASTBOOL GetColorFromPalette(USHORT nNum, Color& rColor) const;
+ virtual sal_uLong Calc_nBLIPPos( sal_uLong nOrgVal, sal_uLong nStreamPos ) const;
+ virtual FASTBOOL GetColorFromPalette(sal_uInt16 nNum, Color& rColor) const;
// -----------------------------------------------------------------------
@@ -543,7 +543,7 @@ protected :
folgende Methode ist von allen zu ueberschreiben, die OLE-Objecte
importieren moechten:
*/
- virtual BOOL GetOLEStorageName( long nOLEId, String& rStorageName,
+ virtual sal_Bool GetOLEStorageName( long nOLEId, String& rStorageName,
SotStorageRef& rSrcStorage,
com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& xDestStg
) const;
@@ -552,9 +552,9 @@ protected :
folgende Methode ist von allen zu ueberschreiben, die verhindern
moechten, dass (abgerundete) Rechtecke mit umgebrochenem Text
immer in SdrRectObj( OBJ_TEXT ) umgewandelt werden:
- TRUE bedeutet umwandeln.
+ sal_True bedeutet umwandeln.
*/
- virtual BOOL ShapeHasText(ULONG nShapeId, ULONG nFilePos) const;
+ virtual sal_Bool ShapeHasText(sal_uLong nShapeId, sal_uLong nFilePos) const;
public:
@@ -571,19 +571,19 @@ public:
Color MSO_TEXT_CLR_ToColor( sal_uInt32 nColorCode ) const;
Color MSO_CLR_ToColor( sal_uInt32 nColorCode, sal_uInt16 nContextProperty = DFF_Prop_lineColor ) const;
- virtual BOOL SeekToShape( SvStream& rSt, void* pClientData, UINT32 nId ) const;
- FASTBOOL SeekToRec( SvStream& rSt, USHORT nRecId, ULONG nMaxFilePos, DffRecordHeader* pRecHd = NULL, ULONG nSkipCount = 0 ) const;
- FASTBOOL SeekToRec2( USHORT nRecId1, USHORT nRecId2, ULONG nMaxFilePos, DffRecordHeader* pRecHd = NULL, ULONG nSkipCount = 0 ) const;
+ virtual sal_Bool SeekToShape( SvStream& rSt, void* pClientData, sal_uInt32 nId ) const;
+ FASTBOOL SeekToRec( SvStream& rSt, sal_uInt16 nRecId, sal_uLong nMaxFilePos, DffRecordHeader* pRecHd = NULL, sal_uLong nSkipCount = 0 ) const;
+ FASTBOOL SeekToRec2( sal_uInt16 nRecId1, sal_uInt16 nRecId2, sal_uLong nMaxFilePos, DffRecordHeader* pRecHd = NULL, sal_uLong nSkipCount = 0 ) const;
// -----------------------------------------------------------------------
- static void MSDFFReadZString( SvStream& rIn, String& rStr, ULONG nMaxLen, FASTBOOL bUniCode = FALSE );
-
- static BOOL ReadCommonRecordHeader( DffRecordHeader& rRec, SvStream& rIn );
- static BOOL ReadCommonRecordHeader( SvStream& rSt,
- BYTE& rVer,
- USHORT& rInst,
- USHORT& rFbt,
- UINT32& rLength );
+ static void MSDFFReadZString( SvStream& rIn, String& rStr, sal_uLong nMaxLen, FASTBOOL bUniCode = sal_False );
+
+ static sal_Bool ReadCommonRecordHeader( DffRecordHeader& rRec, SvStream& rIn );
+ static sal_Bool ReadCommonRecordHeader( SvStream& rSt,
+ sal_uInt8& rVer,
+ sal_uInt16& rInst,
+ sal_uInt16& rFbt,
+ sal_uInt32& rLength );
/*
Konstruktor
===========
@@ -610,7 +610,7 @@ public:
SdrModel* pSdrModel_ = 0,
long nApplicationScale = 0,
ColorData mnDefaultColor_ = COL_DEFAULT,
- ULONG nDefaultFontHeight_ = 24,
+ sal_uLong nDefaultFontHeight_ = 24,
SvStream* pStData2_ = 0,
MSFilterTracer* pTracer = NULL );
@@ -622,11 +622,11 @@ public:
virtual ~SvxMSDffManager();
- UINT32 GetSvxMSDffSettings() const { return nSvxMSDffSettings; };
- void SetSvxMSDffSettings( UINT32 nSettings ) { nSvxMSDffSettings = nSettings; };
+ sal_uInt32 GetSvxMSDffSettings() const { return nSvxMSDffSettings; };
+ void SetSvxMSDffSettings( sal_uInt32 nSettings ) { nSvxMSDffSettings = nSettings; };
- static BOOL MakeContentStream( SotStorage * pStor, const GDIMetaFile & );
- static BOOL ConvertToOle2( SvStream& rStm, UINT32 nLen, const GDIMetaFile*,
+ static sal_Bool MakeContentStream( SotStorage * pStor, const GDIMetaFile & );
+ static sal_Bool ConvertToOle2( SvStream& rStm, sal_uInt32 nLen, const GDIMetaFile*,
const SotStorageRef & rDest );
void SetModel(SdrModel* pModel, long nApplicationScale);
@@ -638,8 +638,8 @@ public:
void Scale(Polygon& rPoly) const;
void Scale(PolyPolygon& rPoly) const;
void ScaleEmu(sal_Int32& rVal) const;
- UINT32 ScalePt( UINT32 nPt ) const;
- INT32 ScalePoint( INT32 nVal ) const;
+ sal_uInt32 ScalePt( sal_uInt32 nPt ) const;
+ sal_Int32 ScalePoint( sal_Int32 nVal ) const;
/*
GetBLIP() - Anforderung eines bestimmten BLIP
@@ -650,9 +650,9 @@ public:
Output: rData - bereits fertig konvertierte Daten
( direkt als Grafik in unsere Dokumente einzusetzen )
- Rueckgabewert: TRUE, im Erfolgsfalls, FALSE bei Fehler
+ Rueckgabewert: sal_True, im Erfolgsfalls, sal_False bei Fehler
*/
- BOOL GetBLIP( ULONG nIdx, Graphic& rData, Rectangle* pVisArea = NULL ) const;
+ sal_Bool GetBLIP( sal_uLong nIdx, Graphic& rData, Rectangle* pVisArea = NULL ) const;
/*
GetBLIPDirect() -Einlesen eines BLIP aus schon positioniertem Stream
@@ -663,11 +663,11 @@ public:
Output: rData -bereits fertig konvertierte Daten
( direkt als Grafik in unsere Dokumente einzusetzen )
- Rueckgabewert: TRUE, im Erfolgsfalls, FALSE bei Fehler
+ Rueckgabewert: sal_True, im Erfolgsfalls, sal_False bei Fehler
*/
- BOOL GetBLIPDirect(SvStream& rBLIPStream, Graphic& rData, Rectangle* pVisArea = NULL ) const;
+ sal_Bool GetBLIPDirect(SvStream& rBLIPStream, Graphic& rData, Rectangle* pVisArea = NULL ) const;
- BOOL GetShape(ULONG nId,
+ sal_Bool GetShape(sal_uLong nId,
SdrObject*& rpData, SvxMSDffImportData& rData);
/*
@@ -682,7 +682,7 @@ public:
1.. - Anzahl der BLIPs
USHRT_MAX - Fehler: kein korrektes Drawing File Format
*/
- USHORT GetBLIPCount() const{ return nBLIPCount; }
+ sal_uInt16 GetBLIPCount() const{ return nBLIPCount; }
/*
ZCodecDecompressed() - Dekomprimierung eines komp. WMF oder Enhanced WMF
@@ -692,9 +692,9 @@ public:
rOut -bereits korrekt positionierter Ausgabe-Stream,
bLookForEnd -Flag, ob das komp. Bild bis zum Stream-Ende reicht.
- Falls TRUE, wird jeweils geprueft, ob das gelesene noch
+ Falls sal_True, wird jeweils geprueft, ob das gelesene noch
zum Bild gehoert.
- Falls FALSE, wird bis zum Stream-Ende gelesen.
+ Falls sal_False, wird bis zum Stream-Ende gelesen.
Output: rIn -Der Stream steht hinter dem Ende des komp. Bildes.
(es kann aber noch eine Ende-Kennung und CRC-Sum folgen)
@@ -702,12 +702,12 @@ public:
Der Stream wird auf den Anfang des Bildes positioniert.
(also dorthin, wo der Stream vor der Verarbeitung stand)
- Rueckgabewert: TRUE, im Erfolgsfall
- FALSE bei Fehler oder Null Bytes geschrieben
+ Rueckgabewert: sal_True, im Erfolgsfall
+ sal_False bei Fehler oder Null Bytes geschrieben
*/
-// static BOOL ZCodecDecompressed( SvStream& rIn,
+// static sal_Bool ZCodecDecompressed( SvStream& rIn,
// SvStream& rOut,
-// BOOL bLookForEnd );
+// sal_Bool bLookForEnd );
//
SdrObject* ImportObj(SvStream& rSt, void* pData,
Rectangle& rClientRect, const Rectangle& rGlobalChildRect, int nCalledByGroup = 0, sal_Int32* pShapeId = NULL);
@@ -733,20 +733,20 @@ public:
return pShapeOrders;
}
- void StoreShapeOrder(ULONG nId,
- ULONG nTxBx,
+ void StoreShapeOrder(sal_uLong nId,
+ sal_uLong nTxBx,
SdrObject* pObject,
SwFlyFrmFmt* pFly = 0,
short nHdFtSection = 0) const;
void ExchangeInShapeOrder(SdrObject* pOldObject,
- ULONG nTxBx,
+ sal_uLong nTxBx,
SwFlyFrmFmt* pFly,
SdrObject* pObject) const;
void RemoveFromShapeOrder( SdrObject* pObject ) const;
- UINT32 GetConvertFlags() const { return nSvxMSDffOLEConvFlags; }
+ sal_uInt32 GetConvertFlags() const { return nSvxMSDffOLEConvFlags; }
static SdrOle2Obj* CreateSdrOLEFromStorage( const String& rStorageName,
SotStorageRef& rSrcStorage,
@@ -756,7 +756,7 @@ public:
const Rectangle& rVisArea,
SvStream* pDataStrrm,
ErrCode& rError,
- UINT32 nConvertFlags,
+ sal_uInt32 nConvertFlags,
sal_Int64 nAspect );
/* the method SolveSolver will create connections between shapes, it should be called after a page is imported.
@@ -777,33 +777,33 @@ public:
struct SvxMSDffBLIPInfo
{
- USHORT nBLIPType; // Art des BLIP: z.B. 6 fuer PNG
- ULONG nFilePos; // Offset des BLIP im Daten-Stream
- ULONG nBLIPSize; // Anzahl Bytes, die der BLIP im Stream einnimmt
- SvxMSDffBLIPInfo(USHORT nBType, ULONG nFPos, ULONG nBSize):
+ sal_uInt16 nBLIPType; // Art des BLIP: z.B. 6 fuer PNG
+ sal_uLong nFilePos; // Offset des BLIP im Daten-Stream
+ sal_uLong nBLIPSize; // Anzahl Bytes, die der BLIP im Stream einnimmt
+ SvxMSDffBLIPInfo(sal_uInt16 nBType, sal_uLong nFPos, sal_uLong nBSize):
nBLIPType( nBType ), nFilePos( nFPos ), nBLIPSize( nBSize ){}
};
struct SvxMSDffShapeInfo
{
sal_uInt32 nShapeId; // Shape Id, verwendet im PLCF SPA und im mso_fbtSp (FSP)
- ULONG nFilePos; // Offset des Shape im Kontroll-Stream fuer eventuelle
+ sal_uLong nFilePos; // Offset des Shape im Kontroll-Stream fuer eventuelle
// erneute Zugriffe auf dieses Shape
sal_uInt32 nTxBxComp;
- BOOL bReplaceByFly :1; // Shape darf im Writer durch Rahmen ersetzt werden.
- BOOL bSortByShapeId :1;
- BOOL bLastBoxInChain:1;
+ sal_Bool bReplaceByFly :1; // Shape darf im Writer durch Rahmen ersetzt werden.
+ sal_Bool bSortByShapeId :1;
+ sal_Bool bLastBoxInChain:1;
- SvxMSDffShapeInfo(ULONG nFPos, sal_uInt32 nId=0, // ULONG nBIdx=0,
- USHORT nSeqId=0, USHORT nBoxId=0):
+ SvxMSDffShapeInfo(sal_uLong nFPos, sal_uInt32 nId=0, // sal_uLong nBIdx=0,
+ sal_uInt16 nSeqId=0, sal_uInt16 nBoxId=0):
nShapeId( nId ),
nFilePos( nFPos ),
nTxBxComp( (nSeqId << 16) + nBoxId )
{
- bReplaceByFly = FALSE;
- bSortByShapeId = FALSE;
- bLastBoxInChain = TRUE;
+ bReplaceByFly = sal_False;
+ bSortByShapeId = sal_False;
+ bLastBoxInChain = sal_True;
}
SvxMSDffShapeInfo(SvxMSDffShapeInfo& rInfo):
nShapeId( rInfo.nShapeId ),
@@ -814,12 +814,12 @@ struct SvxMSDffShapeInfo
bSortByShapeId = rInfo.bSortByShapeId;
bLastBoxInChain = rInfo.bLastBoxInChain;
}
- BOOL operator==( const SvxMSDffShapeInfo& rEntry ) const
+ sal_Bool operator==( const SvxMSDffShapeInfo& rEntry ) const
{
return bSortByShapeId ? (nShapeId == rEntry.nShapeId)
: (nTxBxComp == rEntry.nTxBxComp && this == &rEntry);
}
- BOOL operator<( const SvxMSDffShapeInfo& rEntry ) const
+ sal_Bool operator<( const SvxMSDffShapeInfo& rEntry ) const
{
return bSortByShapeId ? (nShapeId < rEntry.nShapeId)
: (nTxBxComp < rEntry.nTxBxComp);
@@ -828,9 +828,9 @@ struct SvxMSDffShapeInfo
struct SvxMSDffShapeOrder
{
- ULONG nShapeId; // Shape Id, verwendet im PLCF SPA und im mso_fbtSp (FSP)
+ sal_uLong nShapeId; // Shape Id, verwendet im PLCF SPA und im mso_fbtSp (FSP)
- ULONG nTxBxComp; // Ketten- und Boxnummer in der Text-Box-Story (bzw. Null)
+ sal_uLong nTxBxComp; // Ketten- und Boxnummer in der Text-Box-Story (bzw. Null)
SwFlyFrmFmt* pFly; // Frame-Format eines statt des Sdr-Text-Objektes im
// Writer eingefuegten Rahmens: zur Verkettung benoetigt!
@@ -844,14 +844,14 @@ struct SvxMSDffShapeOrder
// nur die Shape-Ids vermerkt,
// Text-Box-Nummer und der Objekt-Pointer werden nur dann
// gespeichert, wenn das Shape tatsaechlich importiert wird!
- SvxMSDffShapeOrder( ULONG nId ):
+ SvxMSDffShapeOrder( sal_uLong nId ):
nShapeId( nId ), nTxBxComp( 0 ), pFly( 0 ), nHdFtSection( 0 ), pObj( 0 ){}
- BOOL operator==( const SvxMSDffShapeOrder& rEntry ) const
+ sal_Bool operator==( const SvxMSDffShapeOrder& rEntry ) const
{
return (nTxBxComp == rEntry.nTxBxComp);
}
- BOOL operator<( const SvxMSDffShapeOrder& rEntry ) const
+ sal_Bool operator<( const SvxMSDffShapeOrder& rEntry ) const
{
return (nTxBxComp < rEntry.nTxBxComp);
}
diff --git a/filter/inc/filter/msfilter/msocximex.hxx b/filter/inc/filter/msfilter/msocximex.hxx
index 173835495b12..3e0c9419a7e3 100644
--- a/filter/inc/filter/msfilter/msocximex.hxx
+++ b/filter/inc/filter/msfilter/msocximex.hxx
@@ -97,14 +97,14 @@ public:
sal_Bool ReadOCXStream( SotStorageRef& rSrc1,
com::sun::star::uno::Reference<
com::sun::star::drawing::XShape > *pShapeRef=0,
- BOOL bFloatingCtrl=FALSE );
+ sal_Bool bFloatingCtrl=sal_False );
//Excel has a nasty kludged mechanism for this, read
//the comments in the source to follow it
sal_Bool ReadOCXExcelKludgeStream(SotStorageStreamRef& rSrc1,
com::sun::star::uno::Reference <
- com::sun::star::drawing::XShape > *pShapeRef,BOOL bFloatingCtrl);
+ com::sun::star::drawing::XShape > *pShapeRef,sal_Bool bFloatingCtrl);
//Writes the given Uno Control into the given storage
@@ -135,7 +135,7 @@ public:
const com::sun::star::awt::Size& /*rSize*/,
com::sun::star::uno::Reference<
com::sun::star::drawing::XShape >* /*pShape*/,
- BOOL /*bFloatingCtrl*/ ) {return sal_False;}
+ sal_Bool /*bFloatingCtrl*/ ) {return sal_False;}
/*begin: Backwards compatability with office 95 import, modify later*/
const com::sun::star::uno::Reference<
@@ -177,7 +177,7 @@ class OCX_FontData
public:
OCX_FontData() : nFontNameLen(0), fBold(0), fItalic(0), fUnderline(0),
fStrike(0), nFontSize(12), nJustification(1), pFontName(0),
- bHasAlign(FALSE), bHasFont(TRUE) {}
+ bHasAlign(sal_False), bHasFont(sal_True) {}
~OCX_FontData() {
if (pFontName)
delete [] pFontName;
@@ -228,7 +228,7 @@ class MSFILTER_DLLPUBLIC OCX_Control
public:
OCX_Control(UniString sN, OCX_Control* parent = NULL ) : nWidth( 0 ), nHeight( 0 ), mnLeft(0), mnTop(0),
mnStep(0), mnBackColor(0x8000000FL), mnForeColor(0), mnTabPos(0), mbVisible(true), sName(sN), pDocSh(0),
- bSetInDialog(FALSE), mpParent( parent ) {}
+ bSetInDialog(sal_False), mpParent( parent ) {}
sal_Bool FullRead(SotStorageStream *pS)
{
return Read(pS) && ReadFontData(pS);
@@ -936,7 +936,7 @@ public:
msDialogType = rtl::OUString::createFromAscii("com.sun.star.awt.UnoControlCheckBoxModel");
mnBackColor = 0x80000005L;
mnForeColor = 0x80000008L;
- aFontData.SetHasAlign(TRUE);
+ aFontData.SetHasAlign(sal_True);
}
using OCX_ModernControl::Import; // to not hide the other two import methods
@@ -962,7 +962,7 @@ public:
msDialogType = rtl::OUString::createFromAscii("com.sun.star.awt.UnoControlRadioButtonModel");
mnBackColor = 0x80000005L;
mnForeColor = 0x80000008L;
- aFontData.SetHasAlign(TRUE);
+ aFontData.SetHasAlign(sal_True);
}
using OCX_ModernControl::Import; // to not hide the other two import methods
@@ -990,7 +990,7 @@ public:
mnBackColor = 0x80000005L;
mnForeColor = 0x80000008L;
nBorderColor = 0x80000006L;
- aFontData.SetHasAlign(TRUE);
+ aFontData.SetHasAlign(sal_True);
}
using OCX_ModernControl::Import; // to not hide the other two import methods
@@ -1037,7 +1037,7 @@ public:
mnBackColor = 0x8000000F;
mnForeColor = 0x80000012;
- aFontData.SetHasAlign(TRUE);
+ aFontData.SetHasAlign(sal_True);
aFontData.nJustification = 3; // centered by default
}
static OCX_Control *Create() { return new OCX_ToggleButton;}
@@ -1064,7 +1064,7 @@ public:
mnBackColor = 0x80000005;
mnForeColor = 0x80000008;
nBorderColor = 0x80000006;
- aFontData.SetHasAlign(TRUE);
+ aFontData.SetHasAlign(sal_True);
}
static OCX_Control *Create() { return new OCX_ComboBox;}
using OCX_ModernControl::Import; // to not hide the other two import methods
@@ -1089,7 +1089,7 @@ public:
mnBackColor = 0x80000005;
mnForeColor = 0x80000008;
nBorderColor = 0x80000006;
- aFontData.SetHasAlign(TRUE);
+ aFontData.SetHasAlign(sal_True);
}
static OCX_Control *Create() { return new OCX_ListBox;}
using OCX_ModernControl::Import; // to not hide the other two import methods
@@ -1190,8 +1190,8 @@ class OCX_ImageButton: public OCX_CommandButton
{
public:
OCX_ImageButton() {
- aFontData.SetHasAlign(FALSE);
- aFontData.SetHasFont(FALSE);
+ aFontData.SetHasAlign(sal_False);
+ aFontData.SetHasFont(sal_False);
}
static OCX_Control *Create() { return new OCX_ImageButton;}
sal_Bool Export(SotStorageRef &rObj,
@@ -1235,7 +1235,7 @@ public:
msDialogType = rtl::OUString::createFromAscii("com.sun.star.awt.UnoControlFixedTextModel");
mnForeColor = 0x80000008;
mnBackColor = 0x80000005;
- aFontData.SetHasAlign(TRUE);
+ aFontData.SetHasAlign(sal_True);
}
~OCX_Label() {
diff --git a/filter/inc/filter/msfilter/msoleexp.hxx b/filter/inc/filter/msfilter/msoleexp.hxx
index 3cdbab6a9235..7107369ca430 100644
--- a/filter/inc/filter/msfilter/msoleexp.hxx
+++ b/filter/inc/filter/msfilter/msoleexp.hxx
@@ -43,12 +43,12 @@ class SotStorage;
class MSFILTER_DLLPUBLIC SvxMSExportOLEObjects
{
- UINT32 nConvertFlags;
+ sal_uInt32 nConvertFlags;
public:
- SvxMSExportOLEObjects( UINT32 nCnvrtFlgs ) : nConvertFlags(nCnvrtFlgs) {}
+ SvxMSExportOLEObjects( sal_uInt32 nCnvrtFlgs ) : nConvertFlags(nCnvrtFlgs) {}
- void SetFlags( UINT32 n ) { nConvertFlags = n; }
- UINT32 GetFlags() const { return nConvertFlags; }
+ void SetFlags( sal_uInt32 n ) { nConvertFlags = n; }
+ sal_uInt32 GetFlags() const { return nConvertFlags; }
void ExportOLEObject( svt::EmbeddedObjectRef& rObj, SotStorage& rDestStg );
void ExportOLEObject( const com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject>& rObj, SotStorage& rDestStg );
diff --git a/filter/inc/filter/msfilter/svdfppt.hxx b/filter/inc/filter/msfilter/svdfppt.hxx
index 796ecc18cd3a..81c454515e5d 100644
--- a/filter/inc/filter/msfilter/svdfppt.hxx
+++ b/filter/inc/filter/msfilter/svdfppt.hxx
@@ -121,18 +121,18 @@ struct SdHyperlinkEntry
// Hilfsklasse zum Einlesen der PPT InteractiveInfoAtom
struct MSFILTER_DLLPUBLIC PptInteractiveInfoAtom
{
- UINT32 nSoundRef;
- UINT32 nExHyperlinkId;
- UINT8 nAction;
- UINT8 nOleVerb;
- UINT8 nJump;
- UINT8 nFlags;
- UINT8 nHyperlinkType;
+ sal_uInt32 nSoundRef;
+ sal_uInt32 nExHyperlinkId;
+ sal_uInt8 nAction;
+ sal_uInt8 nOleVerb;
+ sal_uInt8 nJump;
+ sal_uInt8 nFlags;
+ sal_uInt8 nHyperlinkType;
// unknown, da Gesamtgroesse 16 ist
- UINT8 nUnknown1;
- UINT8 nUnknown2;
- UINT8 nUnknown3;
+ sal_uInt8 nUnknown1;
+ sal_uInt8 nUnknown2;
+ sal_uInt8 nUnknown3;
public:
@@ -150,7 +150,7 @@ enum PptPageFormat
PPTPF_CUSTOM
};
-// Werte fuer den ULONG im PPT_PST_TextHeaderAtom
+// Werte fuer den sal_uLong im PPT_PST_TextHeaderAtom
enum PPT_TextHeader
{
PPTTH_TITLE,
@@ -175,10 +175,10 @@ enum PPT_TextHeader
#define TSS_TYPE_QUARTERBODY (8)
// Inventor-Id fuer PPT UserData
-const UINT32 PPTInventor =UINT32('P')*0x00000001+
- UINT32('P')*0x00000100+
- UINT32('T')*0x00010000+
- UINT32('0')*0x01000000;
+const sal_uInt32 PPTInventor =sal_uInt32('P')*0x00000001+
+ sal_uInt32('P')*0x00000100+
+ sal_uInt32('T')*0x00010000+
+ sal_uInt32('0')*0x01000000;
// Object-Ids fuer StarDraw UserData
#define PPT_OBJECTINFO_ID (1)
@@ -188,9 +188,9 @@ struct MSFILTER_DLLPUBLIC PptDocumentAtom
Size aSlidesPageSize; // Seitengroesse der Slides in 576DPI
Size aNotesPageSize; // Seitengroesse der Notes in 576DPI
// RatioAtom erstmal weggelassen
- UINT32 nNotesMasterPersist; // 0=nicht vorhanden
- UINT32 nHandoutMasterPersist; // 0=nicht vorhanden
- UINT16 n1stPageNumber; // Seitennummer des ersten Slides
+ sal_uInt32 nNotesMasterPersist; // 0=nicht vorhanden
+ sal_uInt32 nHandoutMasterPersist; // 0=nicht vorhanden
+ sal_uInt16 n1stPageNumber; // Seitennummer des ersten Slides
PptPageFormat eSlidesPageFormat; // Seitenformat der Slides
sal_Bool bEmbeddedTrueType : 1; // TrueType direkt im File?
sal_Bool bTitlePlaceholdersOmitted : 1;
@@ -208,9 +208,9 @@ public:
struct PptSlideLayoutAtom
{
- INT32 eLayout; // 0..18
- BYTE aPlaceholderId[ 8 ];
- ULONG aPlacementId[ 8 ];
+ sal_Int32 eLayout; // 0..18
+ sal_uInt8 aPlaceholderId[ 8 ];
+ sal_uLong aPlacementId[ 8 ];
public:
@@ -224,9 +224,9 @@ public:
struct PptSlideAtom
{
PptSlideLayoutAtom aLayout;
- UINT32 nMasterId;
- UINT32 nNotesId;
- UINT16 nFlags;
+ sal_uInt32 nMasterId;
+ sal_uInt32 nNotesId;
+ sal_uInt16 nFlags;
public:
@@ -238,11 +238,11 @@ public:
struct PptSlidePersistAtom
{
- UINT32 nPsrReference;
- UINT32 nFlags;
- UINT32 nNumberTexts;
- UINT32 nSlideId;
- UINT32 nReserved; // we will use nReserved temporarly to set the offset to SSSlideInfoAtom ( if possible )
+ sal_uInt32 nPsrReference;
+ sal_uInt32 nFlags;
+ sal_uInt32 nNumberTexts;
+ sal_uInt32 nSlideId;
+ sal_uInt32 nReserved; // we will use nReserved temporarly to set the offset to SSSlideInfoAtom ( if possible )
public:
@@ -254,8 +254,8 @@ public:
struct PptNotesAtom
{
- UINT32 nSlideId;
- UINT16 nFlags;
+ sal_uInt32 nSlideId;
+ sal_uInt16 nFlags;
public:
@@ -267,12 +267,12 @@ public:
struct PptColorSchemeAtom
{
- BYTE aData[32];
+ sal_uInt8 aData[32];
public:
PptColorSchemeAtom () { Clear(); }
void Clear();
- Color GetColor( USHORT nNum ) const;
+ Color GetColor( sal_uInt16 nNum ) const;
friend SvStream& operator>>(SvStream& rIn, PptColorSchemeAtom& rAtom);
};
@@ -297,13 +297,13 @@ class PptFontCollection;
struct PptUserEditAtom
{
DffRecordHeader aHd;
- INT32 nLastSlideID; // ID of last visible slide
- UINT32 nVersion; // This is major/minor/build which did the edit
- UINT32 nOffsetLastEdit; // File offset of prev PptUserEditAtom
- UINT32 nOffsetPersistDirectory; // Offset to PersistPtrs for this file version.
- UINT32 nDocumentRef;
- UINT32 nMaxPersistWritten; // Gesamtanzahl der Persisteintraege bis hierher.
- INT16 eLastViewType; // enum view type
+ sal_Int32 nLastSlideID; // ID of last visible slide
+ sal_uInt32 nVersion; // This is major/minor/build which did the edit
+ sal_uInt32 nOffsetLastEdit; // File offset of prev PptUserEditAtom
+ sal_uInt32 nOffsetPersistDirectory; // Offset to PersistPtrs for this file version.
+ sal_uInt32 nDocumentRef;
+ sal_uInt32 nMaxPersistWritten; // Gesamtanzahl der Persisteintraege bis hierher.
+ sal_Int16 eLastViewType; // enum view type
public:
@@ -314,9 +314,9 @@ public:
struct PptOEPlaceholderAtom
{
- UINT32 nPlacementId;
- BYTE nPlaceholderId;
- BYTE nPlaceholderSize; // 0=Full size, 1=Half size, 2=Quarter of Slide
+ sal_uInt32 nPlacementId;
+ sal_uInt8 nPlaceholderId;
+ sal_uInt8 nPlaceholderSize; // 0=Full size, 1=Half size, 2=Quarter of Slide
public:
@@ -358,7 +358,7 @@ struct PptSlidePersistEntry
public:
PptSlidePersistEntry();
~PptSlidePersistEntry();
- UINT32 GetSlideId() const { return aPersistAtom.nSlideId; }
+ sal_uInt32 GetSlideId() const { return aPersistAtom.nSlideId; }
};
SV_DECL_PTRARR_DEL(_PptSlidePersistList,PptSlidePersistEntry*,16,16)
@@ -370,7 +370,7 @@ class MSFILTER_DLLPUBLIC PptSlidePersistList: public _PptSlidePersistList
public:
- USHORT FindPage( UINT32 nId ) const;
+ sal_uInt16 FindPage( sal_uInt32 nId ) const;
};
class SfxObjectShell;
@@ -393,12 +393,12 @@ struct PPTOleEntry
struct PptExOleObjAtom
{
- UINT32 nAspect;
- UINT32 nDummy1;
- UINT32 nId;
- UINT32 nDummy2;
- UINT32 nPersistPtr;
- UINT32 nDummy4;
+ sal_uInt32 nAspect;
+ sal_uInt32 nDummy1;
+ sal_uInt32 nId;
+ sal_uInt32 nDummy2;
+ sal_uInt32 nPersistPtr;
+ sal_uInt32 nDummy4;
public:
@@ -454,11 +454,11 @@ public:
SdrEscherImport( PowerPointImportParam&, const String& rBaseURL );
virtual ~SdrEscherImport();
- virtual FASTBOOL GetColorFromPalette( USHORT nNum, Color& rColor ) const;
- virtual BOOL SeekToShape( SvStream& rSt, void* pClientData, UINT32 nId ) const;
- PptFontEntityAtom* GetFontEnityAtom( UINT32 nNum ) const;
- CharSet GetCharSet( UINT32 nNum ) const;
- BOOL IsFontAvailable( UINT32 nNum ) const;
+ virtual FASTBOOL GetColorFromPalette( sal_uInt16 nNum, Color& rColor ) const;
+ virtual sal_Bool SeekToShape( SvStream& rSt, void* pClientData, sal_uInt32 nId ) const;
+ PptFontEntityAtom* GetFontEnityAtom( sal_uInt32 nNum ) const;
+ CharSet GetCharSet( sal_uInt32 nNum ) const;
+ sal_Bool IsFontAvailable( sal_uInt32 nNum ) const;
void RecolorGraphic( SvStream& rSt, sal_uInt32 nRecLen, Graphic& rGraph );
using SvxMSDffManager::ReadObjText;
virtual SdrObject* ReadObjText( PPTTextObj* pTextObj, SdrObject* pObj, SdPage* pPage ) const;
@@ -479,8 +479,8 @@ public:
class SvxFieldItem;
struct MSFILTER_DLLPUBLIC PPTFieldEntry
{
- UINT16 nPos;
- UINT16 nTextRangeEnd;
+ sal_uInt16 nPos;
+ sal_uInt16 nTextRangeEnd;
SvxFieldItem* pField1;
SvxFieldItem* pField2;
String* pString;
@@ -488,7 +488,7 @@ struct MSFILTER_DLLPUBLIC PPTFieldEntry
PPTFieldEntry() : nPos( 0 ), nTextRangeEnd( 0 ), pField1( NULL ), pField2( NULL ), pString( NULL ) {};
~PPTFieldEntry();
- void SetDateTime( UINT32 nType );
+ void SetDateTime( sal_uInt32 nType );
// converting PPT date time format:
static void GetDateTime( const sal_uInt32 nVal, SvxDateFormat& eDateFormat, SvxTimeFormat& eTimeFormat );
@@ -500,8 +500,8 @@ struct MSFILTER_DLLPUBLIC HeaderFooterEntry
String pPlaceholder[ 4 ];
sal_uInt32 nAtom;
- sal_uInt32 GetMaskForInstance( UINT32 nInstance );
- sal_uInt32 IsToDisplay( UINT32 nInstance );
+ sal_uInt32 GetMaskForInstance( sal_uInt32 nInstance );
+ sal_uInt32 IsToDisplay( sal_uInt32 nInstance );
sal_uInt32 NeedToImportInstance( const sal_uInt32 nInstance, const PptSlidePersistEntry& rSlidePersist );
HeaderFooterEntry( const PptSlidePersistEntry* pMaster = NULL );
@@ -537,12 +537,12 @@ protected:
friend struct PPTStyleSheet;
friend class PPTNumberFormatCreator;
- BOOL bOk;
+ sal_Bool bOk;
PptUserEditAtom aUserEditAtom;
PptColorSchemeAtom aPageColors;
List aHyperList;
- UINT32* pPersistPtr;
- ULONG nPersistPtrAnz;
+ sal_uInt32* pPersistPtr;
+ sal_uLong nPersistPtrAnz;
const PPTStyleSheet* pPPTStyleSheet; // this is the current stylesheet;
const PPTStyleSheet* pDefaultSheet; // this is a sheet we are using if no masterpage can be found, but that should
@@ -550,9 +550,9 @@ protected:
PptSlidePersistList* pMasterPages;
PptSlidePersistList* pSlidePages;
PptSlidePersistList* pNotePages;
- USHORT nAktPageNum;
- ULONG nDocStreamPos;
- USHORT nPageColorsNum;
+ sal_uInt16 nAktPageNum;
+ sal_uLong nDocStreamPos;
+ sal_uInt16 nPageColorsNum;
PptPageKind ePageColorsKind;
PptPageKind eAktPageKind;
@@ -574,35 +574,35 @@ protected:
const int _nCalledByGroup,
sal_Int64 nAspect ) const;
// <--
- SvMemoryStream* ImportExOleObjStg( UINT32 nPersistPtr, UINT32& nOleId ) const;
+ SvMemoryStream* ImportExOleObjStg( sal_uInt32 nPersistPtr, sal_uInt32& nOleId ) const;
SdrPage* MakeBlancPage(sal_Bool bMaster) const;
sal_Bool ReadFontCollection();
- sal_Bool ForceFontCollection() const { return pFonts!=NULL?TRUE:((SdrPowerPointImport*)this)->ReadFontCollection(); }
+ sal_Bool ForceFontCollection() const { return pFonts!=NULL?sal_True:((SdrPowerPointImport*)this)->ReadFontCollection(); }
PptSlidePersistList* GetPageList(PptPageKind ePageKind) const;
- UINT32 GetAktPageId();
- UINT32 GetMasterPageId(USHORT nPageNum, PptPageKind ePageKind) const;
- UINT32 GetNotesPageId(USHORT nPageNum ) const;
+ sal_uInt32 GetAktPageId();
+ sal_uInt32 GetMasterPageId(sal_uInt16 nPageNum, PptPageKind ePageKind) const;
+ sal_uInt32 GetNotesPageId(sal_uInt16 nPageNum ) const;
SdrOutliner* GetDrawOutliner( SdrTextObj* pSdrText ) const;
void SeekOle( SfxObjectShell* pShell, sal_uInt32 nFilterOptions );
public:
SdrPowerPointImport( PowerPointImportParam&, const String& rBaseURL );
virtual ~SdrPowerPointImport();
- USHORT GetPageCount( PptPageKind eKind = PPT_SLIDEPAGE ) const;
- void SetPageNum( USHORT nPageNum, PptPageKind = PPT_SLIDEPAGE );
- USHORT GetPageNum() const { return nAktPageNum; }
+ sal_uInt16 GetPageCount( PptPageKind eKind = PPT_SLIDEPAGE ) const;
+ void SetPageNum( sal_uInt16 nPageNum, PptPageKind = PPT_SLIDEPAGE );
+ sal_uInt16 GetPageNum() const { return nAktPageNum; }
PptPageKind GetPageKind() const { return eAktPageKind; }
Size GetPageSize() const;
SdrObject* ImportPageBackgroundObject( const SdrPage& rPage, sal_uInt32& nBgFileOffset, sal_Bool bForce );
- sal_Bool IsNoteOrHandout( USHORT nPageNum, PptPageKind ePageKind ) const;
- sal_Bool HasMasterPage( USHORT nPageNum, PptPageKind ePageKind = PPT_SLIDEPAGE ) const;
- USHORT GetMasterPageIndex( USHORT nPageNum, PptPageKind ePageKind = PPT_SLIDEPAGE ) const;
+ sal_Bool IsNoteOrHandout( sal_uInt16 nPageNum, PptPageKind ePageKind ) const;
+ sal_Bool HasMasterPage( sal_uInt16 nPageNum, PptPageKind ePageKind = PPT_SLIDEPAGE ) const;
+ sal_uInt16 GetMasterPageIndex( sal_uInt16 nPageNum, PptPageKind ePageKind = PPT_SLIDEPAGE ) const;
void ImportPage( SdrPage* pPage, const PptSlidePersistEntry* pMasterPersist = NULL );
- virtual FASTBOOL GetColorFromPalette(USHORT nNum, Color& rColor) const;
- virtual BOOL SeekToShape( SvStream& rSt, void* pClientData, UINT32 nId ) const;
- sal_Unicode PPTSubstitute( UINT16 nFont, sal_Unicode nChar,
- UINT32& nMappedFontId, Font& rFont, char nDefault ) const;
+ virtual FASTBOOL GetColorFromPalette(sal_uInt16 nNum, Color& rColor) const;
+ virtual sal_Bool SeekToShape( SvStream& rSt, void* pClientData, sal_uInt32 nId ) const;
+ sal_Unicode PPTSubstitute( sal_uInt16 nFont, sal_Unicode nChar,
+ sal_uInt32& nMappedFontId, Font& rFont, char nDefault ) const;
const PptDocumentAtom& GetDocumentAtom() const { return aDocAtom; }
virtual const PptSlideLayoutAtom* GetSlideLayoutAtom() const;
SdrObject* CreateTable( SdrObject* pGroupObject, sal_uInt32* pTableArry, SvxMSDffSolverContainer* );
@@ -689,10 +689,10 @@ struct PPTExtParaSheet
struct PPTBuGraEntry
{
- UINT32 nInstance;
+ sal_uInt32 nInstance;
Graphic aBuGra;
- PPTBuGraEntry( Graphic& rGraphic, UINT32 nInstance );
+ PPTBuGraEntry( Graphic& rGraphic, sal_uInt32 nInstance );
};
class PPTExtParaProv
@@ -700,13 +700,13 @@ class PPTExtParaProv
List aBuGraList;
public :
- BOOL bStyles;
- BOOL bGraphics;
+ sal_Bool bStyles;
+ sal_Bool bGraphics;
DffRecordManager aExtendedPresRules;
PPTExtParaSheet aExtParaSheet[ PPT_STYLESHEETENTRYS ];
- BOOL GetGraphic( UINT32 nInstance, Graphic& rGraphic ) const;
+ sal_Bool GetGraphic( sal_uInt32 nInstance, Graphic& rGraphic ) const;
PPTExtParaProv( SdrPowerPointImport& rManager, SvStream& rSt,
const DffRecordHeader* pMainMasterHd );
@@ -775,18 +775,18 @@ struct PPTParaSheet
class PPTParagraphObj;
class PPTNumberFormatCreator
{
- UINT32 nIsBullet;
- UINT32 nBulletChar;
- UINT32 nBulletFont;
- UINT32 nBulletHeight;
- UINT32 nBulletColor;
- UINT32 nTextOfs;
- UINT32 nBulletOfs;
-
- void ImplGetNumberFormat( SdrPowerPointImport& rMan, SvxNumberFormat& rNumberFormat, UINT32 nLevel );
- BOOL ImplGetExtNumberFormat( SdrPowerPointImport& rMan, SvxNumberFormat& rNumberFormat, UINT32 nLevel,
- UINT32 nInstance, UINT32 nInstanceInSheet, boost::optional< sal_Int16 >& rStartNumbering,
- UINT32 nFontHeight, PPTParagraphObj* pPara );
+ sal_uInt32 nIsBullet;
+ sal_uInt32 nBulletChar;
+ sal_uInt32 nBulletFont;
+ sal_uInt32 nBulletHeight;
+ sal_uInt32 nBulletColor;
+ sal_uInt32 nTextOfs;
+ sal_uInt32 nBulletOfs;
+
+ void ImplGetNumberFormat( SdrPowerPointImport& rMan, SvxNumberFormat& rNumberFormat, sal_uInt32 nLevel );
+ sal_Bool ImplGetExtNumberFormat( SdrPowerPointImport& rMan, SvxNumberFormat& rNumberFormat, sal_uInt32 nLevel,
+ sal_uInt32 nInstance, sal_uInt32 nInstanceInSheet, boost::optional< sal_Int16 >& rStartNumbering,
+ sal_uInt32 nFontHeight, PPTParagraphObj* pPara );
protected :
@@ -797,11 +797,11 @@ class PPTNumberFormatCreator
PPTExtParaProv* pExtParaProv;
- void GetNumberFormat( SdrPowerPointImport& rMan, SvxNumberFormat& rNumberFormat, UINT32 nLevel,
- const PPTParaLevel& rParaLevel, const PPTCharLevel& rCharLevel, UINT32 nInstance );
+ void GetNumberFormat( SdrPowerPointImport& rMan, SvxNumberFormat& rNumberFormat, sal_uInt32 nLevel,
+ const PPTParaLevel& rParaLevel, const PPTCharLevel& rCharLevel, sal_uInt32 nInstance );
- BOOL GetNumberFormat( SdrPowerPointImport& rMan, SvxNumberFormat& rNumberFormat,
- PPTParagraphObj* pPara, UINT32 nInstanceInSheet, boost::optional< sal_Int16 >& rStartNumbering );
+ sal_Bool GetNumberFormat( SdrPowerPointImport& rMan, SvxNumberFormat& rNumberFormat,
+ PPTParagraphObj* pPara, sal_uInt32 nInstanceInSheet, boost::optional< sal_Int16 >& rStartNumbering );
};
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -883,7 +883,7 @@ struct PPTCharPropSet
ImplPPTCharPropSet* pCharSet;
- void SetFont( UINT16 nFont );
+ void SetFont( sal_uInt16 nFont );
void SetColor( sal_uInt32 nColor );
PPTCharPropSet( sal_uInt32 nParagraph );
@@ -908,14 +908,14 @@ struct PPTTabEntry
struct PPTRuler
{
- UINT32 nRefCount;
+ sal_uInt32 nRefCount;
- INT32 nFlags;
- UINT16 nDefaultTab;
- UINT16 nTextOfs[ 5 ];
- UINT16 nBulletOfs[ 5 ];
+ sal_Int32 nFlags;
+ sal_uInt16 nDefaultTab;
+ sal_uInt16 nTextOfs[ 5 ];
+ sal_uInt16 nBulletOfs[ 5 ];
PPTTabEntry* pTab;
- UINT16 nTabCount;
+ sal_uInt16 nTabCount;
PPTRuler();
~PPTRuler();
@@ -927,15 +927,15 @@ struct PPTTextRulerInterpreter
PPTTextRulerInterpreter();
PPTTextRulerInterpreter( PPTTextRulerInterpreter& rRuler );
- PPTTextRulerInterpreter( UINT32 nFileOfs, SdrPowerPointImport&, DffRecordHeader& rHd, SvStream& rIn );
+ PPTTextRulerInterpreter( sal_uInt32 nFileOfs, SdrPowerPointImport&, DffRecordHeader& rHd, SvStream& rIn );
~PPTTextRulerInterpreter();
sal_uInt16 GetTabOffsetByIndex( sal_uInt16 nIndex ) const { return mpImplRuler->pTab[ nIndex ].nOffset; };
sal_uInt16 GetTabStyleByIndex( sal_uInt16 nIndex ) const { return mpImplRuler->pTab[ nIndex ].nStyle; };
- UINT16 GetTabCount() const { return mpImplRuler->nTabCount; };
- BOOL GetDefaultTab( UINT32 nLevel, UINT16& nValue ) const;
- BOOL GetTextOfs( UINT32 nLevel, UINT16& nValue ) const;
- BOOL GetBulletOfs( UINT32 nLevel, UINT16& nValue ) const;
+ sal_uInt16 GetTabCount() const { return mpImplRuler->nTabCount; };
+ sal_Bool GetDefaultTab( sal_uInt32 nLevel, sal_uInt16& nValue ) const;
+ sal_Bool GetTextOfs( sal_uInt32 nLevel, sal_uInt16& nValue ) const;
+ sal_Bool GetBulletOfs( sal_uInt32 nLevel, sal_uInt16& nValue ) const;
PPTTextRulerInterpreter& operator=( PPTTextRulerInterpreter& rRuler );
};
@@ -1008,24 +1008,24 @@ class MSFILTER_DLLPUBLIC PPTPortionObj : public PPTCharPropSet
friend class PPTParagraphObj;
const PPTStyleSheet& mrStyleSheet;
- UINT32 mnInstance;
- UINT32 mnDepth;
+ sal_uInt32 mnInstance;
+ sal_uInt32 mnDepth;
public :
- BOOL GetAttrib( UINT32 nAttr, UINT32& nVal, UINT32 nInstanceInSheet );
+ sal_Bool GetAttrib( sal_uInt32 nAttr, sal_uInt32& nVal, sal_uInt32 nInstanceInSheet );
SvxFieldItem* GetTextField();
- PPTPortionObj( const PPTStyleSheet&, UINT32 nInstance, UINT32 nDepth );
- PPTPortionObj( PPTCharPropSet&, const PPTStyleSheet&, UINT32 nInstance, UINT32 nDepth );
+ PPTPortionObj( const PPTStyleSheet&, sal_uInt32 nInstance, sal_uInt32 nDepth );
+ PPTPortionObj( PPTCharPropSet&, const PPTStyleSheet&, sal_uInt32 nInstance, sal_uInt32 nDepth );
PPTPortionObj( PPTPortionObj& );
~PPTPortionObj();
// the following function should be removed during next full update
- void ApplyTo( SfxItemSet& rSet, SdrPowerPointImport& rManager, UINT32 nInstanceInSheet );
- void ApplyTo( SfxItemSet& rSet, SdrPowerPointImport& rManager, UINT32 nInstanceInSheet, const PPTTextObj* pTextObj );
- UINT32 Count() const { return ( mpFieldItem ) ? 1 : maString.Len(); };
- BOOL HasTabulator();
+ void ApplyTo( SfxItemSet& rSet, SdrPowerPointImport& rManager, sal_uInt32 nInstanceInSheet );
+ void ApplyTo( SfxItemSet& rSet, SdrPowerPointImport& rManager, sal_uInt32 nInstanceInSheet, const PPTTextObj* pTextObj );
+ sal_uInt32 Count() const { return ( mpFieldItem ) ? 1 : maString.Len(); };
+ sal_Bool HasTabulator();
};
class MSFILTER_DLLPUBLIC PPTParagraphObj : public PPTParaPropSet, public PPTNumberFormatCreator, public PPTTextRulerInterpreter
@@ -1034,7 +1034,7 @@ class MSFILTER_DLLPUBLIC PPTParagraphObj : public PPTParaPropSet, public PPTNumb
friend class PPTNumberFormatCreator;
const PPTStyleSheet& mrStyleSheet;
- UINT32 mnInstance;
+ sal_uInt32 mnInstance;
protected :
@@ -1042,25 +1042,25 @@ class MSFILTER_DLLPUBLIC PPTParagraphObj : public PPTParaPropSet, public PPTNumb
public :
- BOOL mbTab; // if true, this paragraph has tabulators in text
+ sal_Bool mbTab; // if true, this paragraph has tabulators in text
- UINT32 mnCurrentObject;
- UINT32 mnPortionCount;
+ sal_uInt32 mnCurrentObject;
+ sal_uInt32 mnPortionCount;
PPTPortionObj** mpPortionList;
void UpdateBulletRelSize( sal_uInt32& nBulletRelSize ) const;
- BOOL GetAttrib( UINT32 nAttr, UINT32& nVal, UINT32 nInstanceInSheet );
+ sal_Bool GetAttrib( sal_uInt32 nAttr, sal_uInt32& nVal, sal_uInt32 nInstanceInSheet );
- PPTParagraphObj( const PPTStyleSheet&, UINT32 nInstance, UINT16 nDepth );
- PPTParagraphObj( PPTStyleTextPropReader&, const PPTStyleSheet&, UINT32 nInstance, PPTTextRulerInterpreter& rRuler );
+ PPTParagraphObj( const PPTStyleSheet&, sal_uInt32 nInstance, sal_uInt16 nDepth );
+ PPTParagraphObj( PPTStyleTextPropReader&, const PPTStyleSheet&, sal_uInt32 nInstance, PPTTextRulerInterpreter& rRuler );
~PPTParagraphObj();
- UINT32 GetTextSize();
+ sal_uInt32 GetTextSize();
PPTPortionObj* First();
PPTPortionObj* Next();
void AppendPortion( PPTPortionObj& rPortion );
- void ApplyTo( SfxItemSet& rSet, boost::optional< sal_Int16 >& rStartNumbering, SdrPowerPointImport& rManager, UINT32 nInstanceInSheet, const PPTParagraphObj* pPrev );
+ void ApplyTo( SfxItemSet& rSet, boost::optional< sal_Int16 >& rStartNumbering, SdrPowerPointImport& rManager, sal_uInt32 nInstanceInSheet, const PPTParagraphObj* pPrev );
};
#define PPT_TEXTOBJ_FLAGS_PARA_ALIGNMENT_USED_LEFT 1
@@ -1071,16 +1071,16 @@ class MSFILTER_DLLPUBLIC PPTParagraphObj : public PPTParaPropSet, public PPTNumb
struct ImplPPTTextObj
{
- UINT32 mnRefCount;
- UINT32 mnShapeId;
- UINT32 mnShapeMaster;
+ sal_uInt32 mnRefCount;
+ sal_uInt32 mnShapeId;
+ sal_uInt32 mnShapeMaster;
PptOEPlaceholderAtom* mpPlaceHolderAtom;
- UINT16 mnInstance;
- UINT16 mnDestinationInstance;
+ sal_uInt16 mnInstance;
+ sal_uInt16 mnDestinationInstance;
MSO_SPT meShapeType;
- UINT32 mnCurrentObject;
- UINT32 mnParagraphCount;
+ sal_uInt32 mnCurrentObject;
+ sal_uInt32 mnParagraphCount;
PPTParagraphObj** mpParagraphList;
PptSlidePersistEntry& mrPersistEntry;
@@ -1100,15 +1100,15 @@ class PPTTextObj
PPTTextObj( PPTTextObj& rTextObj );
~PPTTextObj();
- UINT32 GetCurrentIndex() const { return mpImplTextObj->mnCurrentObject; };
- UINT32 Count() const { return mpImplTextObj->mnParagraphCount; };
+ sal_uInt32 GetCurrentIndex() const { return mpImplTextObj->mnCurrentObject; };
+ sal_uInt32 Count() const { return mpImplTextObj->mnParagraphCount; };
PPTParagraphObj* First();
PPTParagraphObj* Next();
MSO_SPT GetShapeType() const { return mpImplTextObj->meShapeType; };
- UINT32 GetInstance() const { return mpImplTextObj->mnInstance; };
- void SetInstance( UINT16 nInstance ) { mpImplTextObj->mnInstance = nInstance; };
- UINT32 GetDestinationInstance() const { return mpImplTextObj->mnDestinationInstance; };
- void SetDestinationInstance( UINT16 nInstance ) { mpImplTextObj->mnDestinationInstance = nInstance; };
+ sal_uInt32 GetInstance() const { return mpImplTextObj->mnInstance; };
+ void SetInstance( sal_uInt16 nInstance ) { mpImplTextObj->mnInstance = nInstance; };
+ sal_uInt32 GetDestinationInstance() const { return mpImplTextObj->mnDestinationInstance; };
+ void SetDestinationInstance( sal_uInt16 nInstance ) { mpImplTextObj->mnDestinationInstance = nInstance; };
PptOEPlaceholderAtom* GetOEPlaceHolderAtom() const { return mpImplTextObj->mpPlaceHolderAtom; };
sal_uInt32 GetTextFlags() const { return mpImplTextObj->mnTextFlags; };
void SetVertical( sal_Bool bVertical )
@@ -1139,7 +1139,7 @@ class PPTConvertOCXControls : public SvxMSConvertOCXControls
com::sun::star::form::XFormComponent > &rFComp,
const com::sun::star::awt::Size& rSize,
com::sun::star::uno::Reference< com::sun::star::drawing::XShape > *pShape,
- BOOL bFloatingCtrl );
+ sal_Bool bFloatingCtrl );
};
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -1243,7 +1243,7 @@ class PPTConvertOCXControls : public SvxMSConvertOCXControls
#define PPT_PST_ExtendedParagraphMasterAtom 4013
#define PPT_PST_ExtendedPresRuleContainer 4014 // consist of 4012, 4015,
#define PPT_PST_ExtendedParagraphHeaderAtom 4015 // the instance of this atom indices the current presobj
- // the first UINT32 in this atom indices the current slideId
+ // the first sal_uInt32 in this atom indices the current slideId
#define PPT_PST_NewlyAddedAtom4016 4016
#define PPT_PST_FontEntityAtom 4023
diff --git a/filter/inc/filter/msfilter/svxmsbas.hxx b/filter/inc/filter/msfilter/svxmsbas.hxx
index 716c6788989c..41e4212c271b 100644
--- a/filter/inc/filter/msfilter/svxmsbas.hxx
+++ b/filter/inc/filter/msfilter/svxmsbas.hxx
@@ -54,7 +54,7 @@ class MSFILTER_DLLPUBLIC SvxImportMSVBasic
{
public:
SvxImportMSVBasic( SfxObjectShell &rDocS, SotStorage &rRoot,
- BOOL bImportCode = TRUE, BOOL bCopyStorage = TRUE )
+ sal_Bool bImportCode = sal_True, sal_Bool bCopyStorage = sal_True )
: xRoot(&rRoot), rDocSh(rDocS),
bImport(bImportCode), bCopy(bCopyStorage)
{}
@@ -63,35 +63,35 @@ public:
// bit 0 = 1 -> any code is imported to the SO-Basic
// bit 1 = 1 -> the VBA - storage is copy to the ObjectShell storage
int Import( const String& rStorageName, const String &rSubStorageName,
- BOOL bAsComment=TRUE, BOOL bStripped=TRUE );
+ sal_Bool bAsComment=sal_True, sal_Bool bStripped=sal_True );
int Import( const String& rStorageName, const String &rSubStorageName,
const std::vector< String >& codeNames,
- BOOL bAsComment=TRUE, BOOL bStripped=TRUE );
+ sal_Bool bAsComment=sal_True, sal_Bool bStripped=sal_True );
// only for the export - copy or delete the saved VBA-macro-storage
// form the ObjectShell
// - returns a warning code if a modified basic exist, in all other
// cases return ERRCODE_NONE.
- ULONG SaveOrDelMSVBAStorage( BOOL bSaveInto, const String& rStorageName );
+ sal_uLong SaveOrDelMSVBAStorage( sal_Bool bSaveInto, const String& rStorageName );
// check if the MS-VBA-Storage exist in the RootStorage of the DocShell.
// If it exist, then return the WarningId for loosing the information.
- static ULONG GetSaveWarningOfMSVBAStorage( SfxObjectShell &rDocS );
+ static sal_uLong GetSaveWarningOfMSVBAStorage( SfxObjectShell &rDocS );
static String GetMSBasicStorageName();
private:
SotStorageRef xRoot;
SfxObjectShell &rDocSh;
- BOOL bImport;
- BOOL bCopy;
+ sal_Bool bImport;
+ sal_Bool bCopy;
- MSFILTER_DLLPRIVATE BOOL ImportCode_Impl( const String& rStorageName,
+ MSFILTER_DLLPRIVATE sal_Bool ImportCode_Impl( const String& rStorageName,
const String &rSubStorageName,
const std::vector< String >& codeNames,
- BOOL bAsComment, BOOL bStripped);
+ sal_Bool bAsComment, sal_Bool bStripped);
MSFILTER_DLLPRIVATE bool ImportForms_Impl(const String& rStorageName,
const String &rSubStorageName);
- MSFILTER_DLLPRIVATE BOOL CopyStorage_Impl( const String& rStorageName,
+ MSFILTER_DLLPRIVATE sal_Bool CopyStorage_Impl( const String& rStorageName,
const String &rSubStorageName);
};
diff --git a/filter/source/config/cache/cacheitem.hxx b/filter/source/config/cache/cacheitem.hxx
index 793a5f370cf9..61b26b24b2d4 100644
--- a/filter/source/config/cache/cacheitem.hxx
+++ b/filter/source/config/cache/cacheitem.hxx
@@ -114,8 +114,8 @@ class CacheItem : public ::comphelper::SequenceAsHashMap
@param lProps
contains all properties, which must exist at this item.
- @return TRUE if all given properties exists
- at this item; FALSE otherwhise.
+ @return sal_True if all given properties exists
+ at this item; sal_False otherwhise.
*/
sal_Bool haveProps(const CacheItem& lProps) const;
@@ -131,8 +131,8 @@ class CacheItem : public ::comphelper::SequenceAsHashMap
@param lProps
contains all properties, which should not exists at this item.
- @return FALSE if at least on property exists at this item(!);
- TRUE otherwhise.
+ @return sal_False if at least on property exists at this item(!);
+ sal_True otherwhise.
*/
sal_Bool dontHaveProps(const CacheItem& lProps) const;
@@ -148,8 +148,8 @@ class CacheItem : public ::comphelper::SequenceAsHashMap
@param lProps
contains all properties, which should be checked.
- @return TRUE if all given properties dont exists
- at this item; FALSE otherwhise.
+ @return sal_True if all given properties dont exists
+ at this item; sal_False otherwhise.
*/
sal_Bool excludeProps(const CacheItem& lProps) const;
diff --git a/filter/source/config/cache/filtercache.hxx b/filter/source/config/cache/filtercache.hxx
index 0c0e34b2783b..e2cc09ea3b43 100644
--- a/filter/source/config/cache/filtercache.hxx
+++ b/filter/source/config/cache/filtercache.hxx
@@ -382,7 +382,7 @@ class FilterCache : public BaseLock
cache items seems to be available after calling of "loadAll()"
on this cache and first search does not had any valid results.
- @return TRUE if the required fill state exists for this cache; FALSE
+ @return sal_True if the required fill state exists for this cache; FALSE
otherwise.
*/
virtual sal_Bool isFillState(EFillState eRequired) const
@@ -1031,7 +1031,7 @@ class FilterCache : public BaseLock
@param sModule
the long name of the module (e.g. "com.sun.star.text.TextDocument").
- @return TRUE if the requested module is installed; FALSE otherwise.
+ @return sal_True if the requested module is installed; sal_False otherwise.
*/
sal_Bool impl_isModuleInstalled(const ::rtl::OUString& sModule);
diff --git a/filter/source/config/cache/typedetection.cxx b/filter/source/config/cache/typedetection.cxx
index 418c95f0f819..69e44516d63d 100644
--- a/filter/source/config/cache/typedetection.cxx
+++ b/filter/source/config/cache/typedetection.cxx
@@ -174,7 +174,7 @@ TypeDetection::~TypeDetection()
// by calling its registered deep detection service.
// But break this loop if a type match to the given descriptor
// by an URL pattern(!) or if deep detection isnt allowed from
- // outside (bAllowDeep=FALSE) or break the whole detection by
+ // outside (bAllowDeep=sal_False) or break the whole detection by
// throwing an exception if creation of the might needed input
// stream failed by e.g. an IO exception ...
OUStringList lUsedDetectors;
diff --git a/filter/source/flash/impswfdialog.cxx b/filter/source/flash/impswfdialog.cxx
index 0efde8182448..171111ac7054 100644
--- a/filter/source/flash/impswfdialog.cxx
+++ b/filter/source/flash/impswfdialog.cxx
@@ -63,7 +63,7 @@ ImpSWFDialog::ImpSWFDialog( Window* pParent, ResMgr& rResMgr, Sequence< Property
maBtnHelp( this, ResId( BTN_HELP, rResMgr ) ),
maConfigItem( String( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Filter/Flash/Export/" ) ), &rFilterData )
{
- const ULONG nCompressMode = maConfigItem.ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "CompressMode" ) ), 75 );
+ const sal_uLong nCompressMode = maConfigItem.ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "CompressMode" ) ), 75 );
maNumFldQuality.SetValue( nCompressMode );
maCheckExportAll.Check();
diff --git a/filter/source/flash/swfexporter.cxx b/filter/source/flash/swfexporter.cxx
index 7157a9c85c06..47173692a308 100644
--- a/filter/source/flash/swfexporter.cxx
+++ b/filter/source/flash/swfexporter.cxx
@@ -702,10 +702,10 @@ bool FlashExporter::getMetaFile( Reference< XComponent >&xComponent, GDIMetaFile
BitmapEx rBitmapEx( aGraphic.GetBitmap(), Color(255,255,255) );
Rectangle clipRect;
- for( ULONG i = 0, nCount = rMtf.GetActionCount(); i < nCount; i++ )
+ for( sal_uLong i = 0, nCount = rMtf.GetActionCount(); i < nCount; i++ )
{
const MetaAction* pAction = rMtf.GetAction( i );
- const USHORT nType = pAction->GetType();
+ const sal_uInt16 nType = pAction->GetType();
switch( nType )
{
diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx
index cce0314436f8..e406bdd22df4 100644
--- a/filter/source/flash/swfwriter1.cxx
+++ b/filter/source/flash/swfwriter1.cxx
@@ -142,7 +142,7 @@ void Writer::Impl_addPolygon( BitStream& rBits, const Polygon& rPoly, sal_Bool b
Impl_addShapeRecordChange( rBits, _Int16(aLastPoint.X()),_Int16(aLastPoint.Y()), bFilled );
- USHORT i = 0, nSize = rPoly.GetSize();
+ sal_uInt16 i = 0, nSize = rPoly.GetSize();
double d = 16.0f;
@@ -539,7 +539,7 @@ void Writer::Impl_writeText( const Point& rPos, const String& rText, const sal_I
{
// todo: optimize me as this will generate a huge amount of duplicate polygons
PolyPolygon aPolyPoygon;
- mpVDev->GetTextOutline( aPolyPoygon, rText, 0, 0, (USHORT)nLen, TRUE, nWidth, pDXArray );
+ mpVDev->GetTextOutline( aPolyPoygon, rText, 0, 0, (sal_uInt16)nLen, sal_True, nWidth, pDXArray );
aPolyPoygon.Translate( rPos );
Impl_writePolyPolygon( aPolyPoygon, sal_True, aTextColor, aTextColor );
}
@@ -565,7 +565,7 @@ void Writer::Impl_writeText( const Point& rPos, const String& rText, const sal_I
if( nLen > 1 )
{
- aNormSize.Width() = pDX[ nLen - 2 ] + mpVDev->GetTextWidth( rText.GetChar( (USHORT) nLen - 1 ) );
+ aNormSize.Width() = pDX[ nLen - 2 ] + mpVDev->GetTextWidth( rText.GetChar( (sal_uInt16) nLen - 1 ) );
if( nWidth && aNormSize.Width() && ( nWidth != aNormSize.Width() ) )
{
@@ -619,7 +619,7 @@ void Writer::Impl_writeText( const Point& rPos, const String& rText, const sal_I
Rectangle aTmpRectangle(aTmpPoint, aTextSize );
Polygon aPoly( aTmpRectangle );
- aPoly.Rotate( aTmpPoint, (USHORT) nOrientation );
+ aPoly.Rotate( aTmpPoint, (sal_uInt16) nOrientation );
Rectangle aTextBoundRect( aPoly.GetBoundRect() );
@@ -831,7 +831,7 @@ void getBitmapData( const BitmapEx& aBmpEx, sal_uInt8*& tgadata, sal_uInt8*& tga
// -----------------------------------------------------------------------------
sal_uInt16 Writer::defineBitmap( const BitmapEx &bmpSource, sal_Int32 nJPEGQualityLevel )
{
- ULONG bmpChecksum = bmpSource.GetChecksum();
+ sal_uLong bmpChecksum = bmpSource.GetChecksum();
ChecksumCache::iterator it = mBitmapCache.find(bmpChecksum);
@@ -1259,7 +1259,7 @@ bool Writer::Impl_writeStroke( SvtGraphicStroke& rStroke )
Color aColor( mpVDev->GetLineColor() );
if( 0.0 != rStroke.getTransparency() )
- aColor.SetTransparency( sal::static_int_cast<UINT8>( MinMax( (long int)( rStroke.getTransparency() * 0xff ), 0, 0xff ) ) );
+ aColor.SetTransparency( sal::static_int_cast<sal_uInt8>( MinMax( (long int)( rStroke.getTransparency() * 0xff ), 0, 0xff ) ) );
sal_uInt16 nShapeId = defineShape( aPolyPolygon, sal::static_int_cast<sal_uInt16>( mapRelative( (sal_Int32)( rStroke.getStrokeWidth() ) ) ), aColor );
maShapeIds.push_back( nShapeId );
@@ -1289,7 +1289,7 @@ bool Writer::Impl_writeFilling( SvtGraphicFill& rFilling )
Color aColor( rFilling.getFillColor() );
if( 0.0 != rFilling.getTransparency() )
- aColor.SetTransparency( sal::static_int_cast<UINT8>( MinMax( (long int)( rFilling.getTransparency() * 0xff ) , 0, 0xff ) ) );
+ aColor.SetTransparency( sal::static_int_cast<sal_uInt8>( MinMax( (long int)( rFilling.getTransparency() * 0xff ) , 0, 0xff ) ) );
FillStyle aFillStyle( aColor );
@@ -1440,10 +1440,10 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf )
{
Rectangle clipRect;
int bMap = 0;
- for( ULONG i = 0, nCount = rMtf.GetActionCount(); i < nCount; i++ )
+ for( sal_uLong i = 0, nCount = rMtf.GetActionCount(); i < nCount; i++ )
{
const MetaAction* pAction = rMtf.GetAction( i );
- const USHORT nType = pAction->GetType();
+ const sal_uInt16 nType = pAction->GetType();
switch( nType )
{
@@ -1661,7 +1661,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf )
const GDIMetaFile aGDIMetaFile( pA->GetSubstitute() );
sal_Bool bFound = sal_False;
- for( ULONG j = 0, nC = aGDIMetaFile.GetActionCount(); ( j < nC ) && !bFound; j++ )
+ for( sal_uLong j = 0, nC = aGDIMetaFile.GetActionCount(); ( j < nC ) && !bFound; j++ )
{
const MetaAction* pSubstAct = aGDIMetaFile.GetAction( j );
@@ -1680,7 +1680,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf )
case( META_COMMENT_ACTION ):
{
const MetaCommentAction* pA = (const MetaCommentAction*) pAction;
- const BYTE* pData = pA->GetData();
+ const sal_uInt8* pData = pA->GetData();
String aSkipComment;
if( pA->GetComment().CompareIgnoreCaseToAscii( "XGRAD_SEQ_BEGIN" ) == COMPARE_EQUAL )
diff --git a/filter/source/flash/swfwriter2.cxx b/filter/source/flash/swfwriter2.cxx
index a2638b13e629..d2bfd512b43f 100644
--- a/filter/source/flash/swfwriter2.cxx
+++ b/filter/source/flash/swfwriter2.cxx
@@ -481,7 +481,7 @@ sal_uInt16 FlashFont::getGlyph( sal_uInt16 nChar, VirtualDevice* pVDev )
{
Polygon& rPoly = aPolyPoly[ i ];
- const USHORT nSize = rPoly.GetSize();
+ const sal_uInt16 nSize = rPoly.GetSize();
if( nSize )
{
// convert polygon to flash EM_SQUARE (1024x1024)
diff --git a/filter/source/graphicfilter/egif/egif.cxx b/filter/source/graphicfilter/egif/egif.cxx
index 56715487148b..877ab0df7763 100644
--- a/filter/source/graphicfilter/egif/egif.cxx
+++ b/filter/source/graphicfilter/egif/egif.cxx
@@ -46,17 +46,17 @@ class GIFWriter
Bitmap aAccBmp;
BitmapReadAccess* pAcc;
SvStream* pGIF;
- ULONG nMinPercent;
- ULONG nMaxPercent;
- ULONG nLastPercent;
+ sal_uLong nMinPercent;
+ sal_uLong nMaxPercent;
+ sal_uLong nLastPercent;
long nActX;
long nActY;
sal_Int32 nInterlaced;
- BOOL bStatus;
- BOOL bTransparent;
+ sal_Bool bStatus;
+ sal_Bool bTransparent;
- void MayCallback( ULONG nPercent );
- void WriteSignature( BOOL bGIF89a );
+ void MayCallback( sal_uLong nPercent );
+ void WriteSignature( sal_Bool bGIF89a );
void WriteGlobalHeader( const Size& rSize );
void WriteLoopExtension( const Animation& rAnimation );
void WriteLogSizeExtension( const Size& rSize100 );
@@ -66,11 +66,11 @@ class GIFWriter
void WriteAccess();
void WriteTerminator();
- BOOL CreateAccess( const BitmapEx& rBmpEx );
+ sal_Bool CreateAccess( const BitmapEx& rBmpEx );
void DestroyAccess();
void WriteAnimation( const Animation& rAnimation );
- void WriteBitmapEx( const BitmapEx& rBmpEx, const Point& rPoint, BOOL bExtended,
+ void WriteBitmapEx( const BitmapEx& rBmpEx, const Point& rPoint, sal_Bool bExtended,
long nTimer = 0, Disposal eDisposal = DISPOSE_NOT );
com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator > xStatusIndicator;
@@ -80,13 +80,13 @@ public:
GIFWriter() {}
~GIFWriter() {}
- BOOL WriteGIF( const Graphic& rGraphic, SvStream& rGIF,
+ sal_Bool WriteGIF( const Graphic& rGraphic, SvStream& rGIF,
FilterConfigItem* pConfigItem );
};
// ------------------------------------------------------------------------
-BOOL GIFWriter::WriteGIF( const Graphic& rGraphic, SvStream& rGIF,
+sal_Bool GIFWriter::WriteGIF( const Graphic& rGraphic, SvStream& rGIF,
FilterConfigItem* pFilterConfigItem )
{
if ( pFilterConfigItem )
@@ -101,13 +101,13 @@ BOOL GIFWriter::WriteGIF( const Graphic& rGraphic, SvStream& rGIF,
Size aSize100;
const MapMode aMap( rGraphic.GetPrefMapMode() );
- BOOL bLogSize = ( aMap.GetMapUnit() != MAP_PIXEL );
+ sal_Bool bLogSize = ( aMap.GetMapUnit() != MAP_PIXEL );
if( bLogSize )
aSize100 = Application::GetDefaultDevice()->LogicToLogic( rGraphic.GetPrefSize(), aMap, MAP_100TH_MM );
pGIF = &rGIF;
- bStatus = TRUE;
+ bStatus = sal_True;
nLastPercent = 0;
nInterlaced = 0;
pAcc = NULL;
@@ -121,7 +121,7 @@ BOOL GIFWriter::WriteGIF( const Graphic& rGraphic, SvStream& rGIF,
{
const Animation& rAnimation = rGraphic.GetAnimation();
- WriteSignature( TRUE );
+ WriteSignature( sal_True );
if ( bStatus )
{
@@ -138,7 +138,7 @@ BOOL GIFWriter::WriteGIF( const Graphic& rGraphic, SvStream& rGIF,
}
else
{
- const BOOL bGrafTrans = rGraphic.IsTransparent();
+ const sal_Bool bGrafTrans = rGraphic.IsTransparent();
BitmapEx aBmpEx;
@@ -178,7 +178,7 @@ BOOL GIFWriter::WriteGIF( const Graphic& rGraphic, SvStream& rGIF,
// ------------------------------------------------------------------------
void GIFWriter::WriteBitmapEx( const BitmapEx& rBmpEx, const Point& rPoint,
- BOOL bExtended, long nTimer, Disposal eDisposal )
+ sal_Bool bExtended, long nTimer, Disposal eDisposal )
{
if( CreateAccess( rBmpEx ) )
{
@@ -209,30 +209,30 @@ void GIFWriter::WriteBitmapEx( const BitmapEx& rBmpEx, const Point& rPoint,
void GIFWriter::WriteAnimation( const Animation& rAnimation )
{
- const USHORT nCount = rAnimation.Count();
+ const sal_uInt16 nCount = rAnimation.Count();
if( nCount )
{
const double fStep = 100. / nCount;
nMinPercent = 0L;
- nMaxPercent = (ULONG) fStep;
+ nMaxPercent = (sal_uLong) fStep;
- for( USHORT i = 0; i < nCount; i++ )
+ for( sal_uInt16 i = 0; i < nCount; i++ )
{
const AnimationBitmap& rAnimBmp = rAnimation.Get( i );
- WriteBitmapEx( rAnimBmp.aBmpEx, rAnimBmp.aPosPix, TRUE,
+ WriteBitmapEx( rAnimBmp.aBmpEx, rAnimBmp.aPosPix, sal_True,
rAnimBmp.nWait, rAnimBmp.eDisposal );
nMinPercent = nMaxPercent;
- nMaxPercent = (ULONG) ( nMaxPercent + fStep );
+ nMaxPercent = (sal_uLong) ( nMaxPercent + fStep );
}
}
}
// ------------------------------------------------------------------------
-void GIFWriter::MayCallback( ULONG nPercent )
+void GIFWriter::MayCallback( sal_uLong nPercent )
{
if ( xStatusIndicator.is() )
{
@@ -247,14 +247,14 @@ void GIFWriter::MayCallback( ULONG nPercent )
// ------------------------------------------------------------------------
-BOOL GIFWriter::CreateAccess( const BitmapEx& rBmpEx )
+sal_Bool GIFWriter::CreateAccess( const BitmapEx& rBmpEx )
{
if( bStatus )
{
Bitmap aMask( rBmpEx.GetMask() );
aAccBmp = rBmpEx.GetBitmap();
- bTransparent = FALSE;
+ bTransparent = sal_False;
if( !!aMask )
{
@@ -262,7 +262,7 @@ BOOL GIFWriter::CreateAccess( const BitmapEx& rBmpEx )
{
aMask.Convert( BMP_CONVERSION_1BIT_THRESHOLD );
aAccBmp.Replace( aMask, BMP_COL_TRANS );
- bTransparent = TRUE;
+ bTransparent = sal_True;
}
else
aAccBmp.Convert( BMP_CONVERSION_8BIT_COLORS );
@@ -273,7 +273,7 @@ BOOL GIFWriter::CreateAccess( const BitmapEx& rBmpEx )
pAcc = aAccBmp.AcquireReadAccess();
if( !pAcc )
- bStatus = FALSE;
+ bStatus = sal_False;
}
return bStatus;
@@ -289,14 +289,14 @@ void GIFWriter::DestroyAccess()
// ------------------------------------------------------------------------
-void GIFWriter::WriteSignature( BOOL bGIF89a )
+void GIFWriter::WriteSignature( sal_Bool bGIF89a )
{
if( bStatus )
{
pGIF->Write( bGIF89a ? "GIF89a" : "GIF87a" , 6 );
if( pGIF->GetError() )
- bStatus = FALSE;
+ bStatus = sal_False;
}
}
@@ -307,26 +307,26 @@ void GIFWriter::WriteGlobalHeader( const Size& rSize )
if( bStatus )
{
// 256 Farben
- const UINT16 nWidth = (UINT16) rSize.Width();
- const UINT16 nHeight = (UINT16) rSize.Height();
- const BYTE cFlags = 128 | ( 7 << 4 );
+ const sal_uInt16 nWidth = (sal_uInt16) rSize.Width();
+ const sal_uInt16 nHeight = (sal_uInt16) rSize.Height();
+ const sal_uInt8 cFlags = 128 | ( 7 << 4 );
// Werte rausschreiben
*pGIF << nWidth;
*pGIF << nHeight;
*pGIF << cFlags;
- *pGIF << (BYTE) 0x00;
- *pGIF << (BYTE) 0x00;
+ *pGIF << (sal_uInt8) 0x00;
+ *pGIF << (sal_uInt8) 0x00;
// Dummy-Palette mit zwei Eintraegen (Schwarz/Weiss) schreiben;
// dieses nur wegen Photoshop-Bug, da die keine Bilder ohne
// globale Farbpalette lesen koennen
- *pGIF << (UINT16) 0;
- *pGIF << (UINT16) 255;
- *pGIF << (UINT16) 65535;
+ *pGIF << (sal_uInt16) 0;
+ *pGIF << (sal_uInt16) 255;
+ *pGIF << (sal_uInt16) 65535;
if( pGIF->GetError() )
- bStatus = FALSE;
+ bStatus = sal_False;
}
}
@@ -336,7 +336,7 @@ void GIFWriter::WriteLoopExtension( const Animation& rAnimation )
{
DBG_ASSERT( rAnimation.Count() > 0, "Animation has no bitmaps!" );
- USHORT nLoopCount = (USHORT) rAnimation.GetLoopCount();
+ sal_uInt16 nLoopCount = (sal_uInt16) rAnimation.GetLoopCount();
// falls nur ein Durchlauf stattfinden soll,
// wird keine LoopExtension geschrieben;
@@ -348,18 +348,18 @@ void GIFWriter::WriteLoopExtension( const Animation& rAnimation )
if( nLoopCount )
nLoopCount--;
- const BYTE cLoByte = (const BYTE) nLoopCount;
- const BYTE cHiByte = (const BYTE) ( nLoopCount >> 8 );
+ const sal_uInt8 cLoByte = (const sal_uInt8) nLoopCount;
+ const sal_uInt8 cHiByte = (const sal_uInt8) ( nLoopCount >> 8 );
- *pGIF << (BYTE) 0x21;
- *pGIF << (BYTE) 0xff;
- *pGIF << (BYTE) 0x0b;
+ *pGIF << (sal_uInt8) 0x21;
+ *pGIF << (sal_uInt8) 0xff;
+ *pGIF << (sal_uInt8) 0x0b;
pGIF->Write( "NETSCAPE2.0", 11 );
- *pGIF << (BYTE) 0x03;
- *pGIF << (BYTE) 0x01;
+ *pGIF << (sal_uInt8) 0x03;
+ *pGIF << (sal_uInt8) 0x01;
*pGIF << cLoByte;
*pGIF << cHiByte;
- *pGIF << (BYTE) 0x00;
+ *pGIF << (sal_uInt8) 0x00;
}
}
@@ -370,15 +370,15 @@ void GIFWriter::WriteLogSizeExtension( const Size& rSize100 )
// PrefSize in 100th-mm als ApplicationExtension schreiben
if( rSize100.Width() && rSize100.Height() )
{
- *pGIF << (BYTE) 0x21;
- *pGIF << (BYTE) 0xff;
- *pGIF << (BYTE) 0x0b;
+ *pGIF << (sal_uInt8) 0x21;
+ *pGIF << (sal_uInt8) 0xff;
+ *pGIF << (sal_uInt8) 0x0b;
pGIF->Write( "STARDIV 5.0", 11 );
- *pGIF << (BYTE) 0x09;
- *pGIF << (BYTE) 0x01;
- *pGIF << (UINT32) rSize100.Width();
- *pGIF << (UINT32) rSize100.Height();
- *pGIF << (BYTE) 0x00;
+ *pGIF << (sal_uInt8) 0x09;
+ *pGIF << (sal_uInt8) 0x01;
+ *pGIF << (sal_uInt32) rSize100.Width();
+ *pGIF << (sal_uInt32) rSize100.Height();
+ *pGIF << (sal_uInt8) 0x00;
}
}
@@ -388,8 +388,8 @@ void GIFWriter::WriteImageExtension( long nTimer, Disposal eDisposal )
{
if( bStatus )
{
- const UINT16 nDelay = (UINT16) nTimer;
- BYTE cFlags = 0;
+ const sal_uInt16 nDelay = (sal_uInt16) nTimer;
+ sal_uInt8 cFlags = 0;
// Transparent-Flag setzen
if( bTransparent )
@@ -401,16 +401,16 @@ void GIFWriter::WriteImageExtension( long nTimer, Disposal eDisposal )
else if( eDisposal == DISPOSE_PREVIOUS )
cFlags |= ( 3 << 2 );
- *pGIF << (BYTE) 0x21;
- *pGIF << (BYTE) 0xf9;
- *pGIF << (BYTE) 0x04;
+ *pGIF << (sal_uInt8) 0x21;
+ *pGIF << (sal_uInt8) 0xf9;
+ *pGIF << (sal_uInt8) 0x04;
*pGIF << cFlags;
*pGIF << nDelay;
- *pGIF << (BYTE) pAcc->GetBestPaletteIndex( BMP_COL_TRANS );
- *pGIF << (BYTE) 0x00;
+ *pGIF << (sal_uInt8) pAcc->GetBestPaletteIndex( BMP_COL_TRANS );
+ *pGIF << (sal_uInt8) 0x00;
if( pGIF->GetError() )
- bStatus = FALSE;
+ bStatus = sal_False;
}
}
@@ -420,11 +420,11 @@ void GIFWriter::WriteLocalHeader()
{
if( bStatus )
{
- const UINT16 nPosX = (UINT16) nActX;
- const UINT16 nPosY = (UINT16) nActY;
- const UINT16 nWidth = (UINT16) pAcc->Width();
- const UINT16 nHeight = (UINT16) pAcc->Height();
- BYTE cFlags = (BYTE) ( pAcc->GetBitCount() - 1 );
+ const sal_uInt16 nPosX = (sal_uInt16) nActX;
+ const sal_uInt16 nPosY = (sal_uInt16) nActY;
+ const sal_uInt16 nWidth = (sal_uInt16) pAcc->Width();
+ const sal_uInt16 nHeight = (sal_uInt16) pAcc->Height();
+ sal_uInt8 cFlags = (sal_uInt8) ( pAcc->GetBitCount() - 1 );
// Interlaced-Flag setzen
if( nInterlaced )
@@ -434,7 +434,7 @@ void GIFWriter::WriteLocalHeader()
cFlags |= 0x80;
// alles rausschreiben
- *pGIF << (BYTE) 0x2c;
+ *pGIF << (sal_uInt8) 0x2c;
*pGIF << nPosX;
*pGIF << nPosY;
*pGIF << nWidth;
@@ -442,7 +442,7 @@ void GIFWriter::WriteLocalHeader()
*pGIF << cFlags;
if( pGIF->GetError() )
- bStatus = FALSE;
+ bStatus = sal_False;
}
}
@@ -452,10 +452,10 @@ void GIFWriter::WritePalette()
{
if( bStatus && pAcc->HasPalette() )
{
- const USHORT nCount = pAcc->GetPaletteEntryCount();
- const USHORT nMaxCount = ( 1 << pAcc->GetBitCount() );
+ const sal_uInt16 nCount = pAcc->GetPaletteEntryCount();
+ const sal_uInt16 nMaxCount = ( 1 << pAcc->GetBitCount() );
- for ( USHORT i = 0; i < nCount; i++ )
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
{
const BitmapColor& rColor = pAcc->GetPaletteColor( i );
@@ -469,7 +469,7 @@ void GIFWriter::WritePalette()
pGIF->SeekRel( ( nMaxCount - nCount ) * 3 );
if( pGIF->GetError() )
- bStatus = FALSE;
+ bStatus = sal_False;
}
}
@@ -480,15 +480,15 @@ void GIFWriter::WriteAccess()
GIFLZWCompressor aCompressor;
const long nWidth = pAcc->Width();
const long nHeight = pAcc->Height();
- BYTE* pBuffer = NULL;
- const ULONG nFormat = pAcc->GetScanlineFormat();
+ sal_uInt8* pBuffer = NULL;
+ const sal_uLong nFormat = pAcc->GetScanlineFormat();
long nY;
long nT;
long i;
- BOOL bNative = ( BMP_FORMAT_8BIT_PAL == nFormat );
+ sal_Bool bNative = ( BMP_FORMAT_8BIT_PAL == nFormat );
if( !bNative )
- pBuffer = new BYTE[ nWidth ];
+ pBuffer = new sal_uInt8[ nWidth ];
if( bStatus && ( 8 == pAcc->GetBitCount() ) && pAcc->HasPalette() )
{
@@ -526,13 +526,13 @@ void GIFWriter::WriteAccess()
else
{
for( long nX = 0L; nX < nWidth; nX++ )
- pBuffer[ nX ] = (BYTE) pAcc->GetPixel( nY, nX );
+ pBuffer[ nX ] = (sal_uInt8) pAcc->GetPixel( nY, nX );
aCompressor.Compress( pBuffer, nWidth );
}
if ( pGIF->GetError() )
- bStatus = FALSE;
+ bStatus = sal_False;
MayCallback( nMinPercent + ( nMaxPercent - nMinPercent ) * i / nHeight );
@@ -543,7 +543,7 @@ void GIFWriter::WriteAccess()
aCompressor.EndCompression();
if ( pGIF->GetError() )
- bStatus = FALSE;
+ bStatus = sal_False;
}
delete[] pBuffer;
@@ -555,17 +555,17 @@ void GIFWriter::WriteTerminator()
{
if( bStatus )
{
- *pGIF << (BYTE) 0x3b;
+ *pGIF << (sal_uInt8) 0x3b;
if( pGIF->GetError() )
- bStatus = FALSE;
+ bStatus = sal_False;
}
}
// ------------------------------------------------------------------------
-extern "C" BOOL __LOADONCALLAPI GraphicExport( SvStream& rStream, Graphic& rGraphic,
- FilterConfigItem* pConfigItem, BOOL )
+extern "C" sal_Bool __LOADONCALLAPI GraphicExport( SvStream& rStream, Graphic& rGraphic,
+ FilterConfigItem* pConfigItem, sal_Bool )
{
return GIFWriter().WriteGIF( rGraphic, rStream, pConfigItem );
}
diff --git a/filter/source/graphicfilter/egif/giflzwc.cxx b/filter/source/graphicfilter/egif/giflzwc.cxx
index 5438aa46017b..e57f81ebf073 100644
--- a/filter/source/graphicfilter/egif/giflzwc.cxx
+++ b/filter/source/graphicfilter/egif/giflzwc.cxx
@@ -43,17 +43,17 @@ private:
inline void FlushBitsBufsFullBytes();
SvStream& rStream;
- BYTE* pBlockBuf;
- BYTE nBlockBufSize;
- ULONG nBitsBuf;
- USHORT nBitsBufSize;
+ sal_uInt8* pBlockBuf;
+ sal_uInt8 nBlockBufSize;
+ sal_uLong nBitsBuf;
+ sal_uInt16 nBitsBufSize;
public:
- GIFImageDataOutputStream( SvStream & rGIF, BYTE nLZWDataSize );
+ GIFImageDataOutputStream( SvStream & rGIF, sal_uInt8 nLZWDataSize );
~GIFImageDataOutputStream();
- inline void WriteBits( USHORT nCode, USHORT nCodeLen );
+ inline void WriteBits( sal_uInt16 nCode, sal_uInt16 nCodeLen );
};
// ------------------------------------------------------------------------
@@ -65,7 +65,7 @@ inline void GIFImageDataOutputStream::FlushBitsBufsFullBytes()
if( nBlockBufSize==255 )
FlushBlockBuf();
- pBlockBuf[nBlockBufSize++] = (BYTE) nBitsBuf;
+ pBlockBuf[nBlockBufSize++] = (sal_uInt8) nBitsBuf;
nBitsBuf >>= 8;
nBitsBufSize -= 8;
}
@@ -73,21 +73,21 @@ inline void GIFImageDataOutputStream::FlushBitsBufsFullBytes()
// ------------------------------------------------------------------------
-inline void GIFImageDataOutputStream::WriteBits( USHORT nCode, USHORT nCodeLen )
+inline void GIFImageDataOutputStream::WriteBits( sal_uInt16 nCode, sal_uInt16 nCodeLen )
{
if( nBitsBufSize+nCodeLen>32 )
FlushBitsBufsFullBytes();
- nBitsBuf |= (ULONG) nCode << nBitsBufSize;
+ nBitsBuf |= (sal_uLong) nCode << nBitsBufSize;
nBitsBufSize = nBitsBufSize + nCodeLen;
}
// ------------------------------------------------------------------------
-GIFImageDataOutputStream::GIFImageDataOutputStream( SvStream & rGIF, BYTE nLZWDataSize ) :
+GIFImageDataOutputStream::GIFImageDataOutputStream( SvStream & rGIF, sal_uInt8 nLZWDataSize ) :
rStream(rGIF)
{
- pBlockBuf = new BYTE[ 255 ];
+ pBlockBuf = new sal_uInt8[ 255 ];
nBlockBufSize = 0;
nBitsBufSize = 0;
nBitsBuf = 0;
@@ -102,7 +102,7 @@ GIFImageDataOutputStream::~GIFImageDataOutputStream()
WriteBits(0,7);
FlushBitsBufsFullBytes();
FlushBlockBuf();
- rStream << (BYTE)0;
+ rStream << (sal_uInt8)0;
delete[] pBlockBuf;
}
@@ -112,7 +112,7 @@ void GIFImageDataOutputStream::FlushBlockBuf()
{
if( nBlockBufSize )
{
- rStream << (BYTE) nBlockBufSize;
+ rStream << (sal_uInt8) nBlockBufSize;
rStream.Write( pBlockBuf,nBlockBufSize );
nBlockBufSize = 0;
}
@@ -127,8 +127,8 @@ struct GIFLZWCTreeNode
GIFLZWCTreeNode* pBrother; // naechster Knoten, der den selben Vater hat
GIFLZWCTreeNode* pFirstChild; // erster Sohn
- USHORT nCode; // Der Code fuer den String von Pixelwerten, der sich ergibt, wenn
- USHORT nValue; // Der Pixelwert
+ sal_uInt16 nCode; // Der Code fuer den String von Pixelwerten, der sich ergibt, wenn
+ sal_uInt16 nValue; // Der Pixelwert
};
// --------------------
@@ -149,11 +149,11 @@ GIFLZWCompressor::~GIFLZWCompressor()
// ------------------------------------------------------------------------
-void GIFLZWCompressor::StartCompression( SvStream& rGIF, USHORT nPixelSize )
+void GIFLZWCompressor::StartCompression( SvStream& rGIF, sal_uInt16 nPixelSize )
{
if( !pIDOS )
{
- USHORT i;
+ sal_uInt16 i;
nDataSize = nPixelSize;
@@ -165,13 +165,13 @@ void GIFLZWCompressor::StartCompression( SvStream& rGIF, USHORT nPixelSize )
nTableSize=nEOICode+1;
nCodeSize=nDataSize+1;
- pIDOS=new GIFImageDataOutputStream(rGIF,(BYTE)nDataSize);
+ pIDOS=new GIFImageDataOutputStream(rGIF,(sal_uInt8)nDataSize);
pTable=new GIFLZWCTreeNode[4096];
for (i=0; i<4096; i++)
{
pTable[i].pBrother = pTable[i].pFirstChild = NULL;
- pTable[i].nValue = (BYTE) ( pTable[i].nCode = i );
+ pTable[i].nValue = (sal_uInt8) ( pTable[i].nCode = i );
}
pPrefix = NULL;
@@ -181,13 +181,13 @@ void GIFLZWCompressor::StartCompression( SvStream& rGIF, USHORT nPixelSize )
// ------------------------------------------------------------------------
-void GIFLZWCompressor::Compress( HPBYTE pSrc, ULONG nSize )
+void GIFLZWCompressor::Compress( HPBYTE pSrc, sal_uLong nSize )
{
if( pIDOS )
{
GIFLZWCTreeNode* p;
- USHORT i;
- BYTE nV;
+ sal_uInt16 i;
+ sal_uInt8 nV;
if( !pPrefix && nSize )
{
@@ -223,7 +223,7 @@ void GIFLZWCompressor::Compress( HPBYTE pSrc, ULONG nSize )
}
else
{
- if(nTableSize==(USHORT)(1<<nCodeSize))
+ if(nTableSize==(sal_uInt16)(1<<nCodeSize))
nCodeSize++;
p=pTable+(nTableSize++);
diff --git a/filter/source/graphicfilter/egif/giflzwc.hxx b/filter/source/graphicfilter/egif/giflzwc.hxx
index 75048b0f8ff5..1520603cfe69 100644
--- a/filter/source/graphicfilter/egif/giflzwc.hxx
+++ b/filter/source/graphicfilter/egif/giflzwc.hxx
@@ -46,19 +46,19 @@ private:
GIFImageDataOutputStream* pIDOS;
GIFLZWCTreeNode* pTable;
GIFLZWCTreeNode* pPrefix;
- USHORT nDataSize;
- USHORT nClearCode;
- USHORT nEOICode;
- USHORT nTableSize;
- USHORT nCodeSize;
+ sal_uInt16 nDataSize;
+ sal_uInt16 nClearCode;
+ sal_uInt16 nEOICode;
+ sal_uInt16 nTableSize;
+ sal_uInt16 nCodeSize;
public:
GIFLZWCompressor();
~GIFLZWCompressor();
- void StartCompression( SvStream& rGIF, USHORT nPixelSize );
- void Compress( HPBYTE pSrc, ULONG nSize );
+ void StartCompression( SvStream& rGIF, sal_uInt16 nPixelSize );
+ void Compress( HPBYTE pSrc, sal_uLong nSize );
void EndCompression();
};
diff --git a/filter/source/graphicfilter/eos2met/eos2met.cxx b/filter/source/graphicfilter/eos2met/eos2met.cxx
index 4fce357a91e8..e2afa820e167 100644
--- a/filter/source/graphicfilter/eos2met/eos2met.cxx
+++ b/filter/source/graphicfilter/eos2met/eos2met.cxx
@@ -112,7 +112,7 @@
struct METChrSet
{
struct METChrSet * pSucc;
- BYTE nSet;
+ sal_uInt8 nSet;
String aName;
FontWeight eWeight;
};
@@ -132,14 +132,14 @@ class METWriter
{
private:
- BOOL bStatus;
- ULONG nLastPercent; // Mit welcher Zahl pCallback zuletzt aufgerufen wurde.
+ sal_Bool bStatus;
+ sal_uLong nLastPercent; // Mit welcher Zahl pCallback zuletzt aufgerufen wurde.
SvStream* pMET;
Rectangle aPictureRect;
MapMode aPictureMapMode;
MapMode aTargetMapMode;
- ULONG nActualFieldStartPos; // Anfangs-Position des aktuellen 'Field'
- ULONG nNumberOfDataFields; // Anzahl der angefangenen 'Graphcis Data Fields'
+ sal_uLong nActualFieldStartPos; // Anfangs-Position des aktuellen 'Field'
+ sal_uLong nNumberOfDataFields; // Anzahl der angefangenen 'Graphcis Data Fields'
Color aGDILineColor;
Color aGDIFillColor;
RasterOp eGDIRasterOp;
@@ -154,57 +154,57 @@ private:
long nMETStrokeLineWidth;
Size aMETChrCellSize;
short nMETChrAngle;
- BYTE nMETChrSet;
+ sal_uInt8 nMETChrSet;
METChrSet* pChrSetList; // Liste der Character-Sets
- BYTE nNextChrSetId; // die erste unbenutzte ChrSet-Id
- ULONG nActBitmapId; // Field-Id der naechsten Bitmap
- ULONG nNumberOfActions; // Anzahl der Actions im GDIMetafile
- ULONG nNumberOfBitmaps; // Anzahl der Bitmaps
- ULONG nWrittenActions; // Anzahl der bereits verarbeiteten Actions beim Schreiben der Orders
- ULONG nWrittenBitmaps; // Anzahl der bereits geschriebenen Bitmaps
- ULONG nActBitmapPercent; // Wieviel Prozent die naechste Bitmap schon geschrieben ist.
+ sal_uInt8 nNextChrSetId; // die erste unbenutzte ChrSet-Id
+ sal_uLong nActBitmapId; // Field-Id der naechsten Bitmap
+ sal_uLong nNumberOfActions; // Anzahl der Actions im GDIMetafile
+ sal_uLong nNumberOfBitmaps; // Anzahl der Bitmaps
+ sal_uLong nWrittenActions; // Anzahl der bereits verarbeiteten Actions beim Schreiben der Orders
+ sal_uLong nWrittenBitmaps; // Anzahl der bereits geschriebenen Bitmaps
+ sal_uLong nActBitmapPercent; // Wieviel Prozent die naechste Bitmap schon geschrieben ist.
com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator > xStatusIndicator;
void MayCallback();
// Berechnet anhand der obigen 5 Parameter eine Prozentzahl
- // und macht dann ggf. einen Callback. Setzt bStatus auf FALSE wenn User abbrechen
+ // und macht dann ggf. einen Callback. Setzt bStatus auf sal_False wenn User abbrechen
// moechte.
void CountActionsAndBitmaps(const GDIMetaFile * pMTF);
// Zaehlt die Bitmaps und Actions (nNumberOfActions und nNumberOfBitmaps muessen
// zu Anfang auf 0 gesetzt werden, weil diese Methode rekursiv ist)
- void WriteBigEndianShort(USHORT nWord);
- void WriteBigEndianLong(ULONG nLong);
+ void WriteBigEndianShort(sal_uInt16 nWord);
+ void WriteBigEndianLong(sal_uLong nLong);
void WritePoint(Point aPt);
void WriteClipRect( const Rectangle& rRect );
- void WriteFieldIntroducer(USHORT nFieldSize, USHORT nFieldType,
- BYTE nFlags, USHORT nSegSeqNum);
+ void WriteFieldIntroducer(sal_uInt16 nFieldSize, sal_uInt16 nFieldType,
+ sal_uInt8 nFlags, sal_uInt16 nSegSeqNum);
void UpdateFieldSize();
- void WriteFieldId(ULONG nId);
+ void WriteFieldId(sal_uLong nId);
void CreateChrSets(const GDIMetaFile * pMTF);
void CreateChrSet(const Font & rFont);
void WriteChrSets();
- BYTE FindChrSet(const Font & rFont);
+ sal_uInt8 FindChrSet(const Font & rFont);
- void WriteColorAttributeTable(ULONG nFieldId=4, BitmapPalette* pPalette=NULL,
- BYTE nBasePartFlags=0x40, BYTE nBasePartLCTID=0);
+ void WriteColorAttributeTable(sal_uLong nFieldId=4, BitmapPalette* pPalette=NULL,
+ sal_uInt8 nBasePartFlags=0x40, sal_uInt8 nBasePartLCTID=0);
void WriteImageObject(const Bitmap & rBitmap);
void WriteImageObjects(const GDIMetaFile * pMTF);
void WriteDataDescriptor(const GDIMetaFile * pMTF);
- void WillWriteOrder(ULONG nNextOrderMaximumLength);
+ void WillWriteOrder(sal_uLong nNextOrderMaximumLength);
void METSetAndPushLineInfo( const LineInfo& rLineInfo );
void METPopLineInfo( const LineInfo& rLineInfo );
void METBitBlt(Point aPt, Size aSize, const Bitmap & rBitmap);
- void METBeginArea(BOOL bBoundaryLine);
+ void METBeginArea(sal_Bool bBoundaryLine);
void METEndArea();
void METBeginPath(sal_uInt32 nPathId);
void METEndPath();
@@ -216,7 +216,7 @@ private:
void METLine(const Polygon & rPolygon);
void METLine(const PolyPolygon & rPolyPolygon);
void METLineAtCurPos(Point aPt);
- void METBox(BOOL bFill, BOOL bBoundary,
+ void METBox(sal_Bool bFill, sal_Bool bBoundary,
Rectangle aRect, sal_uInt32 nHAxis, sal_uInt32 nVAxis);
void METFullArc(Point aCenter, double fMultiplier);
void METPartialArcAtCurPos(Point aCenter, double fMultiplier,
@@ -228,7 +228,7 @@ private:
void METSetMix(RasterOp eROP);
void METSetChrCellSize(Size aSize);
void METSetChrAngle(short nAngle);
- void METSetChrSet(BYTE nSet);
+ void METSetChrSet(sal_uInt8 nSet);
void WriteOrders(const GDIMetaFile * pMTF);
@@ -244,7 +244,7 @@ public:
METWriter() {}
- BOOL WriteMET( const GDIMetaFile & rMTF, SvStream & rTargetStream,
+ sal_Bool WriteMET( const GDIMetaFile & rMTF, SvStream & rTargetStream,
FilterConfigItem* pConfigItem );
};
@@ -255,7 +255,7 @@ void METWriter::MayCallback()
{
if ( xStatusIndicator.is() )
{
- ULONG nPercent;
+ sal_uLong nPercent;
nPercent=((nWrittenBitmaps<<14)+(nActBitmapPercent<<14)/100+nWrittenActions)
*100/((nNumberOfBitmaps<<14)+nNumberOfActions);
@@ -280,15 +280,15 @@ void METWriter::WriteClipRect( const Rectangle& rRect )
METEndPath();
}
WillWriteOrder(8);
- *pMET << (BYTE)0xb4 << (BYTE)6
- << (BYTE)0x00 << (BYTE)0 << nPathId;
+ *pMET << (sal_uInt8)0xb4 << (sal_uInt8)6
+ << (sal_uInt8)0x00 << (sal_uInt8)0 << nPathId;
}
void METWriter::CountActionsAndBitmaps(const GDIMetaFile * pMTF)
{
const MetaAction* pMA;
- for( ULONG nAction = 0, nActionCount=pMTF->GetActionCount(); nAction < nActionCount; nAction++ )
+ for( sal_uLong nAction = 0, nActionCount=pMTF->GetActionCount(); nAction < nActionCount; nAction++ )
{
pMA = pMTF->GetAction(nAction);
@@ -297,8 +297,8 @@ void METWriter::CountActionsAndBitmaps(const GDIMetaFile * pMTF)
case META_EPS_ACTION :
{
const GDIMetaFile aGDIMetaFile( ((const MetaEPSAction*)pMA)->GetSubstitute() );
- INT32 nCount = aGDIMetaFile.GetActionCount();
- INT32 i;
+ sal_Int32 nCount = aGDIMetaFile.GetActionCount();
+ sal_Int32 i;
for ( i = 0; i < nCount; i++ )
if ( ((const MetaAction*)aGDIMetaFile.GetAction( i ))->GetType() == META_BMPSCALE_ACTION )
break;
@@ -319,16 +319,16 @@ void METWriter::CountActionsAndBitmaps(const GDIMetaFile * pMTF)
}
-void METWriter::WriteBigEndianShort(USHORT nWord)
+void METWriter::WriteBigEndianShort(sal_uInt16 nWord)
{
- *pMET << ((BYTE)(nWord>>8)) << ((BYTE)(nWord&0x00ff));
+ *pMET << ((sal_uInt8)(nWord>>8)) << ((sal_uInt8)(nWord&0x00ff));
}
-void METWriter::WriteBigEndianLong(ULONG nLong)
+void METWriter::WriteBigEndianLong(sal_uLong nLong)
{
- WriteBigEndianShort((USHORT)(nLong>>16));
- WriteBigEndianShort((USHORT)(nLong&0x0000ffff));
+ WriteBigEndianShort((sal_uInt16)(nLong>>16));
+ WriteBigEndianShort((sal_uInt16)(nLong&0x0000ffff));
}
@@ -341,33 +341,33 @@ void METWriter::WritePoint(Point aPt)
}
-void METWriter::WriteFieldIntroducer(USHORT nFieldSize, USHORT nFieldType,
- BYTE nFlags, USHORT nSegSeqNum)
+void METWriter::WriteFieldIntroducer(sal_uInt16 nFieldSize, sal_uInt16 nFieldType,
+ sal_uInt8 nFlags, sal_uInt16 nSegSeqNum)
{
nActualFieldStartPos=pMET->Tell();
WriteBigEndianShort(nFieldSize);
- *pMET << (BYTE)0xd3 << nFieldType << nFlags << nSegSeqNum;
+ *pMET << (sal_uInt8)0xd3 << nFieldType << nFlags << nSegSeqNum;
}
void METWriter::UpdateFieldSize()
{
- ULONG nPos;
+ sal_uLong nPos;
nPos=pMET->Tell();
pMET->Seek(nActualFieldStartPos);
- WriteBigEndianShort((USHORT)(nPos-nActualFieldStartPos));
+ WriteBigEndianShort((sal_uInt16)(nPos-nActualFieldStartPos));
pMET->Seek(nPos);
}
-void METWriter::WriteFieldId(ULONG nId)
+void METWriter::WriteFieldId(sal_uLong nId)
{
- BYTE nbyte;
+ sal_uInt8 nbyte;
short i;
for (i=1; i<=8; i++) {
- nbyte= '0' + (BYTE)((nId >> (32-i*4)) & 0x0f);
+ nbyte= '0' + (sal_uInt8)((nId >> (32-i*4)) & 0x0f);
*pMET << nbyte;
}
}
@@ -375,10 +375,10 @@ void METWriter::WriteFieldId(ULONG nId)
void METWriter::CreateChrSets(const GDIMetaFile * pMTF)
{
- ULONG nAction, nActionCount;
+ sal_uLong nAction, nActionCount;
const MetaAction * pMA;
- if (bStatus==FALSE)
+ if (bStatus==sal_False)
return;
nActionCount=pMTF->GetActionCount();
@@ -415,7 +415,7 @@ void METWriter::CreateChrSet(const Font & rFont)
}
-BYTE METWriter::FindChrSet(const Font & rFont)
+sal_uInt8 METWriter::FindChrSet(const Font & rFont)
{
METChrSet* pCS;
@@ -431,10 +431,10 @@ BYTE METWriter::FindChrSet(const Font & rFont)
void METWriter::WriteChrSets()
{
- USHORT i;
+ sal_uInt16 i;
char c = 0;
METChrSet * pCS;
- BYTE nbyte;
+ sal_uInt8 nbyte;
for (pCS=pChrSetList; pCS!=NULL; pCS=pCS->pSucc)
{
@@ -443,13 +443,13 @@ void METWriter::WriteChrSets()
WriteBigEndianShort(0x0050);
- *pMET << (BYTE)0x0c << (BYTE)0x02 << (BYTE)0x84 << (BYTE)0x00;
- *pMET << (BYTE)0xa4 << (BYTE)0x00 << (BYTE)0x00 << (BYTE)0x01;
- *pMET << (BYTE)0x01 << (BYTE)0x00 << (BYTE)0x00 << (BYTE)0x00;
+ *pMET << (sal_uInt8)0x0c << (sal_uInt8)0x02 << (sal_uInt8)0x84 << (sal_uInt8)0x00;
+ *pMET << (sal_uInt8)0xa4 << (sal_uInt8)0x00 << (sal_uInt8)0x00 << (sal_uInt8)0x01;
+ *pMET << (sal_uInt8)0x01 << (sal_uInt8)0x00 << (sal_uInt8)0x00 << (sal_uInt8)0x00;
- *pMET << (BYTE)0x04 << (BYTE)0x24 << (BYTE)0x05 << (BYTE)pCS->nSet;
+ *pMET << (sal_uInt8)0x04 << (sal_uInt8)0x24 << (sal_uInt8)0x05 << (sal_uInt8)pCS->nSet;
- *pMET << (BYTE)0x14 << (BYTE)0x1f;
+ *pMET << (sal_uInt8)0x14 << (sal_uInt8)0x1f;
switch (pCS->eWeight)
{
case WEIGHT_THIN: nbyte=1; break;
@@ -464,16 +464,16 @@ void METWriter::WriteChrSets()
default: nbyte=5;
}
*pMET << nbyte;
- *pMET << (BYTE)0x05;
- *pMET << (BYTE)0x00 << (BYTE)0x00 << (BYTE)0x00 << (BYTE)0x00;
- *pMET << (BYTE)0x00 << (BYTE)0x00 << (BYTE)0x00 << (BYTE)0x00;
- *pMET << (BYTE)0x00 << (BYTE)0x00 << (BYTE)0x00 << (BYTE)0x00;
- *pMET << (BYTE)0x00 << (BYTE)0x00 << (BYTE)0x00 << (BYTE)0x0c;
+ *pMET << (sal_uInt8)0x05;
+ *pMET << (sal_uInt8)0x00 << (sal_uInt8)0x00 << (sal_uInt8)0x00 << (sal_uInt8)0x00;
+ *pMET << (sal_uInt8)0x00 << (sal_uInt8)0x00 << (sal_uInt8)0x00 << (sal_uInt8)0x00;
+ *pMET << (sal_uInt8)0x00 << (sal_uInt8)0x00 << (sal_uInt8)0x00 << (sal_uInt8)0x00;
+ *pMET << (sal_uInt8)0x00 << (sal_uInt8)0x00 << (sal_uInt8)0x00 << (sal_uInt8)0x0c;
- *pMET << (BYTE)0x06 << (BYTE)0x20 << (BYTE)0x03 << (BYTE)0xd4;
- *pMET << (BYTE)0x03 << (BYTE)0x52;
+ *pMET << (sal_uInt8)0x06 << (sal_uInt8)0x20 << (sal_uInt8)0x03 << (sal_uInt8)0xd4;
+ *pMET << (sal_uInt8)0x03 << (sal_uInt8)0x52;
- *pMET << (BYTE)0x24 << (BYTE)0x02 << (BYTE)0x08 << (BYTE)0x00;
+ *pMET << (sal_uInt8)0x24 << (sal_uInt8)0x02 << (sal_uInt8)0x08 << (sal_uInt8)0x00;
ByteString n(pCS->aName, gsl_getSystemTextEncoding());
for (i=0; i<32; i++)
{
@@ -485,11 +485,11 @@ void METWriter::WriteChrSets()
}
-void METWriter::WriteColorAttributeTable(ULONG nFieldId, BitmapPalette* pPalette, BYTE nBasePartFlags, BYTE nBasePartLCTID)
+void METWriter::WriteColorAttributeTable(sal_uLong nFieldId, BitmapPalette* pPalette, sal_uInt8 nBasePartFlags, sal_uInt8 nBasePartLCTID)
{
- USHORT nIndex,nNumI,i;
+ sal_uInt16 nIndex,nNumI,i;
- if (bStatus==FALSE) return;
+ if (bStatus==sal_False) return;
//--- Das Feld 'Begin Color Attribute Table':
WriteFieldIntroducer(16,BegColAtrMagic,0,0);
@@ -497,7 +497,7 @@ void METWriter::WriteColorAttributeTable(ULONG nFieldId, BitmapPalette* pPalette
//--- Das Feld 'Color Attribute Table':
WriteFieldIntroducer(0,BlkColAtrMagic,0,0);
- *pMET << nBasePartFlags << (BYTE)0x00 << nBasePartLCTID; // 'Base Part'
+ *pMET << nBasePartFlags << (sal_uInt8)0x00 << nBasePartLCTID; // 'Base Part'
if (pPalette!=NULL)
{
nIndex=0;
@@ -505,18 +505,18 @@ void METWriter::WriteColorAttributeTable(ULONG nFieldId, BitmapPalette* pPalette
{
nNumI=pPalette->GetEntryCount()-nIndex;
if (nNumI>81) nNumI=81;
- *pMET << (BYTE)(11+nNumI*3); // Laenge des Parameters
- *pMET << (BYTE)1 << (BYTE)0 << (BYTE)1; // typ: element list, Reserved, Format: RGB
- *pMET << (BYTE)0; WriteBigEndianShort(nIndex); // Start-Index (3 Bytes)
- *pMET << (BYTE)8 << (BYTE)8 << (BYTE)8; // Bits je Komponente R,G,B
- *pMET << (BYTE)3; // Anzahl Bytes je Eintrag
+ *pMET << (sal_uInt8)(11+nNumI*3); // Laenge des Parameters
+ *pMET << (sal_uInt8)1 << (sal_uInt8)0 << (sal_uInt8)1; // typ: element list, Reserved, Format: RGB
+ *pMET << (sal_uInt8)0; WriteBigEndianShort(nIndex); // Start-Index (3 Bytes)
+ *pMET << (sal_uInt8)8 << (sal_uInt8)8 << (sal_uInt8)8; // Bits je Komponente R,G,B
+ *pMET << (sal_uInt8)3; // Anzahl Bytes je Eintrag
for (i=0; i<nNumI; i++)
{
const BitmapColor& rCol = (*pPalette)[ nIndex ];
- *pMET << (BYTE) rCol.GetRed();
- *pMET << (BYTE) rCol.GetGreen();
- *pMET << (BYTE) rCol.GetBlue();
+ *pMET << (sal_uInt8) rCol.GetRed();
+ *pMET << (sal_uInt8) rCol.GetGreen();
+ *pMET << (sal_uInt8) rCol.GetBlue();
nIndex++;
}
}
@@ -524,8 +524,8 @@ void METWriter::WriteColorAttributeTable(ULONG nFieldId, BitmapPalette* pPalette
else
{
// 'Trible Generating'
- *pMET << (BYTE)0x0a << (BYTE)0x02 << (BYTE)0x00 << (BYTE)0x01 << (BYTE)0x00;
- *pMET << (BYTE)0x00 << (BYTE)0x00 << (BYTE)0x08 << (BYTE)0x08 << (BYTE)0x08;
+ *pMET << (sal_uInt8)0x0a << (sal_uInt8)0x02 << (sal_uInt8)0x00 << (sal_uInt8)0x01 << (sal_uInt8)0x00;
+ *pMET << (sal_uInt8)0x00 << (sal_uInt8)0x00 << (sal_uInt8)0x08 << (sal_uInt8)0x08 << (sal_uInt8)0x08;
}
UpdateFieldSize();
@@ -534,7 +534,7 @@ void METWriter::WriteColorAttributeTable(ULONG nFieldId, BitmapPalette* pPalette
WriteFieldId(nFieldId);
if (pMET->GetError())
- bStatus=FALSE;
+ bStatus=sal_False;
}
@@ -542,12 +542,12 @@ void METWriter::WriteImageObject(const Bitmap & rBitmap)
{
SvMemoryStream aTemp(0x00010000,0x00010000);
sal_uInt32 nWidth,nHeight,nResX,nResY;
- ULONG nBytesPerLine,i,j,nNumColors,ny,nLines;
- ULONG nActColMapId;
- USHORT nBitsPerPixel;
- BYTE nbyte, * pBuf;
+ sal_uLong nBytesPerLine,i,j,nNumColors,ny,nLines;
+ sal_uLong nActColMapId;
+ sal_uInt16 nBitsPerPixel;
+ sal_uInt8 nbyte, * pBuf;
- if (bStatus==FALSE)
+ if (bStatus==sal_False)
return;
nActColMapId=((nActBitmapId>>24)&0x000000ff) | ((nActBitmapId>> 8)&0x0000ff00) |
@@ -576,13 +576,13 @@ void METWriter::WriteImageObject(const Bitmap & rBitmap)
// ggf. Farbpalette einlesen und in die MET-Datei schreiben:
if (nBitsPerPixel<=8)
{
- BitmapPalette aPal( (USHORT) nNumColors );
- BYTE nr,ng,nb;
+ BitmapPalette aPal( (sal_uInt16) nNumColors );
+ sal_uInt8 nr,ng,nb;
for (i=0; i<nNumColors; i++)
{
aTemp >> nb >> ng >> nr; aTemp.SeekRel(1);
- aPal[ (USHORT) i ] = BitmapColor( nr, ng, nb );
+ aPal[ (sal_uInt16) i ] = BitmapColor( nr, ng, nb );
}
//--- Das Feld 'Begin Resource Group':
@@ -603,9 +603,9 @@ void METWriter::WriteImageObject(const Bitmap & rBitmap)
//--- Das Feld 'Map Color Attribute Table':
WriteFieldIntroducer(26,MapColAtrMagic,0,0);
WriteBigEndianShort(0x0012);
- *pMET << (BYTE)0x0c << (BYTE)0x02 << (BYTE)0x84 << (BYTE)0x00;
+ *pMET << (sal_uInt8)0x0c << (sal_uInt8)0x02 << (sal_uInt8)0x84 << (sal_uInt8)0x00;
WriteFieldId(nActColMapId);
- *pMET << (BYTE)0x04 << (BYTE)0x24 << (BYTE)0x07 << (BYTE)0x01;
+ *pMET << (sal_uInt8)0x04 << (sal_uInt8)0x24 << (sal_uInt8)0x07 << (sal_uInt8)0x01;
//--- Das Feld 'End Object Environment Group':
WriteFieldIntroducer(16,EndObjEnvMagic,0,0);
@@ -614,45 +614,45 @@ void METWriter::WriteImageObject(const Bitmap & rBitmap)
//--- Das Feld 'Image Data Descriptor':
WriteFieldIntroducer(17,DscImgObjMagic,0,0);
- *pMET << (BYTE)0x01; // Unit of measure: tens of centimeters
- WriteBigEndianShort((USHORT)nResX);
- WriteBigEndianShort((USHORT)nResY);
- WriteBigEndianShort((USHORT)nWidth);
- WriteBigEndianShort((USHORT)nHeight);
+ *pMET << (sal_uInt8)0x01; // Unit of measure: tens of centimeters
+ WriteBigEndianShort((sal_uInt16)nResX);
+ WriteBigEndianShort((sal_uInt16)nResY);
+ WriteBigEndianShort((sal_uInt16)nWidth);
+ WriteBigEndianShort((sal_uInt16)nHeight);
//--- Das erste Feld 'Image Picture Data':
WriteFieldIntroducer(0,DatImgObjMagic,0,0);
// Begin Segment:
- *pMET << (BYTE)0x70 << (BYTE)0x00;
+ *pMET << (sal_uInt8)0x70 << (sal_uInt8)0x00;
// Begin Image Content:
- *pMET << (BYTE)0x91 << (BYTE)0x01 << (BYTE)0xff;
+ *pMET << (sal_uInt8)0x91 << (sal_uInt8)0x01 << (sal_uInt8)0xff;
// Image Size:
- *pMET << (BYTE)0x94 << (BYTE)0x09 << (BYTE)0x02;
- *pMET << (USHORT) 0 << (USHORT) 0;
- WriteBigEndianShort((USHORT)nHeight);
- WriteBigEndianShort((USHORT)nWidth);
+ *pMET << (sal_uInt8)0x94 << (sal_uInt8)0x09 << (sal_uInt8)0x02;
+ *pMET << (sal_uInt16) 0 << (sal_uInt16) 0;
+ WriteBigEndianShort((sal_uInt16)nHeight);
+ WriteBigEndianShort((sal_uInt16)nWidth);
// Image Encoding:
- *pMET << (BYTE)0x95 << (BYTE)0x02 << (BYTE)0x03 << (BYTE)0x03;
+ *pMET << (sal_uInt8)0x95 << (sal_uInt8)0x02 << (sal_uInt8)0x03 << (sal_uInt8)0x03;
// Image IDE-Size:
- *pMET << (BYTE)0x96 << (BYTE)0x01 << (BYTE)nBitsPerPixel;
+ *pMET << (sal_uInt8)0x96 << (sal_uInt8)0x01 << (sal_uInt8)nBitsPerPixel;
if (nBitsPerPixel<=8) {
// Image LUT-ID
- *pMET << (BYTE)0x97 << (BYTE)0x01 << (BYTE)0x01;
+ *pMET << (sal_uInt8)0x97 << (sal_uInt8)0x01 << (sal_uInt8)0x01;
}
else {
// IDE Structure
- *pMET << (BYTE)0x9b << (BYTE)0x08 << (BYTE)0x00 << (BYTE)0x01;
- *pMET << (BYTE)0x00 << (BYTE)0x00 << (BYTE)0x00 << (BYTE)0x08;
- *pMET << (BYTE)0x08 << (BYTE)0x08;
+ *pMET << (sal_uInt8)0x9b << (sal_uInt8)0x08 << (sal_uInt8)0x00 << (sal_uInt8)0x01;
+ *pMET << (sal_uInt8)0x00 << (sal_uInt8)0x00 << (sal_uInt8)0x00 << (sal_uInt8)0x08;
+ *pMET << (sal_uInt8)0x08 << (sal_uInt8)0x08;
}
- pBuf=new BYTE[nBytesPerLine];
+ pBuf=new sal_uInt8[nBytesPerLine];
ny=0;
while (ny<nHeight) {
@@ -667,7 +667,7 @@ void METWriter::WriteImageObject(const Bitmap & rBitmap)
if (nLines*nBytesPerLine>30000) nLines=30000/nBytesPerLine;
if (nLines<1) nLines=1;
WriteBigEndianShort(0xfe92);
- WriteBigEndianShort((USHORT)(nLines*nBytesPerLine));
+ WriteBigEndianShort((sal_uInt16)(nLines*nBytesPerLine));
for (i=0; i<nLines; i++) {
aTemp.Read(pBuf,nBytesPerLine);
if (nBitsPerPixel==24) {
@@ -678,18 +678,18 @@ void METWriter::WriteImageObject(const Bitmap & rBitmap)
pMET->Write(pBuf,nBytesPerLine);
ny++;
}
- if (aTemp.GetError() || pMET->GetError()) bStatus=FALSE;
+ if (aTemp.GetError() || pMET->GetError()) bStatus=sal_False;
nActBitmapPercent=(ny+1)*100/nHeight;
MayCallback();
- if (bStatus==FALSE) { delete[] pBuf; return; }
+ if (bStatus==sal_False) { delete[] pBuf; return; }
}
delete[] pBuf;
// End Image Content:
- *pMET << (BYTE)0x93 << (BYTE)0x00;
+ *pMET << (sal_uInt8)0x93 << (sal_uInt8)0x00;
// End Segment:
- *pMET << (BYTE)0x71 << (BYTE)0x00;
+ *pMET << (sal_uInt8)0x71 << (sal_uInt8)0x00;
// Abschliessen des letzten Feldes 'Image Picture Data':
UpdateFieldSize();
@@ -705,7 +705,7 @@ void METWriter::WriteImageObject(const Bitmap & rBitmap)
nWrittenBitmaps++;
nActBitmapPercent=0;
- if (pMET->GetError()) bStatus=FALSE;
+ if (pMET->GetError()) bStatus=sal_False;
}
@@ -713,10 +713,10 @@ void METWriter::WriteImageObjects(const GDIMetaFile * pMTF)
{
const MetaAction* pMA;
- if (bStatus==FALSE)
+ if (bStatus==sal_False)
return;
- for ( ULONG nAction = 0, nActionCount = pMTF->GetActionCount(); nAction < nActionCount; nAction++)
+ for ( sal_uLong nAction = 0, nActionCount = pMTF->GetActionCount(); nAction < nActionCount; nAction++)
{
pMA = pMTF->GetAction(nAction);
@@ -769,8 +769,8 @@ void METWriter::WriteImageObjects(const GDIMetaFile * pMTF)
const MetaEPSAction* pA = (const MetaEPSAction*)pMA;
const GDIMetaFile aGDIMetaFile( pA->GetSubstitute() );
- INT32 nCount = aGDIMetaFile.GetActionCount();
- for ( INT32 i = 0; i < nCount; i++ )
+ sal_Int32 nCount = aGDIMetaFile.GetActionCount();
+ for ( sal_Int32 i = 0; i < nCount; i++ )
{
const MetaAction* pMetaAct = aGDIMetaFile.GetAction( i );
if ( pMetaAct->GetType() == META_BMPSCALE_ACTION )
@@ -785,17 +785,17 @@ void METWriter::WriteImageObjects(const GDIMetaFile * pMTF)
break;
}
- if (bStatus==FALSE)
+ if (bStatus==sal_False)
break;
}
if (pMET->GetError())
- bStatus=FALSE;
+ bStatus=sal_False;
}
void METWriter::WriteDataDescriptor(const GDIMetaFile *)
{
- if (bStatus==FALSE)
+ if (bStatus==sal_False)
return;
WriteFieldIntroducer(0,DscGrfObjMagic,0,0);
@@ -816,9 +816,9 @@ void METWriter::WriteDataDescriptor(const GDIMetaFile *)
// 8 Coordinate types in data
// 0x04Intel16
// 0x05Intel32
- *pMET << (BYTE)0xf7 << (BYTE)0x07 << (BYTE)0xb0 << (BYTE)0x00
- << (BYTE)0x00 << (BYTE)0x23 << (BYTE)0x01 << (BYTE)0x01
- << (BYTE)0x05;
+ *pMET << (sal_uInt8)0xf7 << (sal_uInt8)0x07 << (sal_uInt8)0xb0 << (sal_uInt8)0x00
+ << (sal_uInt8)0x00 << (sal_uInt8)0x23 << (sal_uInt8)0x01 << (sal_uInt8)0x01
+ << (sal_uInt8)0x05;
// 0 0xF6 Set Picture Descriptor
// 1 Length of following data
@@ -848,8 +848,8 @@ void METWriter::WriteDataDescriptor(const GDIMetaFile *)
// GPS Y bottom, Y top
// GPS Z near, Z far
Size aUnitsPerDecimeter=OutputDevice::LogicToLogic(Size(10,10),MapMode(MAP_CM),aPictureMapMode);
- *pMET << (BYTE)0xf6 << (BYTE)0x28 << (BYTE)0x40 << (BYTE)0x00
- << (BYTE)0x05 << (BYTE)0x01
+ *pMET << (sal_uInt8)0xf6 << (sal_uInt8)0x28 << (sal_uInt8)0x40 << (sal_uInt8)0x00
+ << (sal_uInt8)0x05 << (sal_uInt8)0x01
<< (sal_uInt32)(aUnitsPerDecimeter.Width())
<< (sal_uInt32)(aUnitsPerDecimeter.Height())
<< (sal_uInt32)0
@@ -870,9 +870,9 @@ void METWriter::WriteDataDescriptor(const GDIMetaFile *)
// 8 Geometrics
// 0x04 Intel16
// 0x05 Intel32
- *pMET << (BYTE)0x21 << (BYTE)0x07 << (BYTE)0x08 << (BYTE)0xe0
- << (BYTE)0x00 << (BYTE)0x8f << (BYTE)0x00 << (BYTE)0x05
- << (BYTE)0x05;
+ *pMET << (sal_uInt8)0x21 << (sal_uInt8)0x07 << (sal_uInt8)0x08 << (sal_uInt8)0xe0
+ << (sal_uInt8)0x00 << (sal_uInt8)0x8f << (sal_uInt8)0x00 << (sal_uInt8)0x05
+ << (sal_uInt8)0x05;
// 0 0x21 Set Current Defaults
// 1 Length of following data
@@ -880,8 +880,8 @@ void METWriter::WriteDataDescriptor(const GDIMetaFile *)
// 3-4 Mask 0xCC0C
// 5 Names 0x8F
// 6-n M11, M12, M21, M22, M41, M42 Matrix elements
- *pMET << (BYTE)0x21 << (BYTE)0x1c << (BYTE)0x07 << (BYTE)0xcc
- << (BYTE)0x0c << (BYTE)0x8f
+ *pMET << (sal_uInt8)0x21 << (sal_uInt8)0x1c << (sal_uInt8)0x07 << (sal_uInt8)0xcc
+ << (sal_uInt8)0x0c << (sal_uInt8)0x8f
<< (sal_uInt32)0x00010000 << (sal_uInt32)0x00000000 << (sal_uInt32)0x00000000
<< (sal_uInt32)0x00010000 << (sal_uInt32)0x00000000 << (sal_uInt32)0x00000000;
@@ -952,11 +952,11 @@ void METWriter::WriteDataDescriptor(const GDIMetaFile *)
// (1 byte) - Character mix
// (1 byte) - Character background mix (G=2 or 4 depending on the Geometrics
// parameter of Set Default Parameter Format)
- *pMET << (BYTE)0x21 << (BYTE)0x10 << (BYTE)0x02 << (BYTE)0x40
- << (BYTE)0x00 << (BYTE)0x8f
- << (BYTE)0xaa << (BYTE)0x02 << (BYTE)0x00 << (BYTE)0x00
- << (BYTE)0x44 << (BYTE)0x04 << (BYTE)0x00 << (BYTE)0x00
- << (BYTE)0xa8 << (BYTE)0xaa << (BYTE)0x40 << (BYTE)0x44;
+ *pMET << (sal_uInt8)0x21 << (sal_uInt8)0x10 << (sal_uInt8)0x02 << (sal_uInt8)0x40
+ << (sal_uInt8)0x00 << (sal_uInt8)0x8f
+ << (sal_uInt8)0xaa << (sal_uInt8)0x02 << (sal_uInt8)0x00 << (sal_uInt8)0x00
+ << (sal_uInt8)0x44 << (sal_uInt8)0x04 << (sal_uInt8)0x00 << (sal_uInt8)0x00
+ << (sal_uInt8)0xa8 << (sal_uInt8)0xaa << (sal_uInt8)0x40 << (sal_uInt8)0x44;
// 0 0x21 Set Current Defaults
// 1 Length of following data
@@ -986,10 +986,10 @@ void METWriter::WriteDataDescriptor(const GDIMetaFile *)
// (1 byte) - Marker mix
// (1 byte) - Marker background mix (G=2 or 4 depending on the Geometrics
// parameter of Set Default Parameter Format)
- *pMET << (BYTE)0x21 << (BYTE)0x0c << (BYTE)0x03 << (BYTE)0x40
- << (BYTE)0x00 << (BYTE)0x8f
- << (BYTE)0x66 << (BYTE)0x02 << (BYTE)0x00 << (BYTE)0x00
- << (BYTE)0x66 << (BYTE)0x02 << (BYTE)0x00 << (BYTE)0x00;
+ *pMET << (sal_uInt8)0x21 << (sal_uInt8)0x0c << (sal_uInt8)0x03 << (sal_uInt8)0x40
+ << (sal_uInt8)0x00 << (sal_uInt8)0x8f
+ << (sal_uInt8)0x66 << (sal_uInt8)0x02 << (sal_uInt8)0x00 << (sal_uInt8)0x00
+ << (sal_uInt8)0x66 << (sal_uInt8)0x02 << (sal_uInt8)0x00 << (sal_uInt8)0x00;
// 0 0x21 Set Current Defaults
// 1 Length of following data
@@ -1098,18 +1098,18 @@ void METWriter::WriteDataDescriptor(const GDIMetaFile *)
// 4-7 Bit-map handle
// 8 Lcid
if (nNumberOfBitmaps>0) {
- *pMET << (BYTE)0xe7 << (BYTE)0x07 << (BYTE)0x80 << (BYTE)0x00;
+ *pMET << (sal_uInt8)0xe7 << (sal_uInt8)0x07 << (sal_uInt8)0x80 << (sal_uInt8)0x00;
WriteBigEndianLong(nActBitmapId);
- *pMET << (BYTE)0xfe;
+ *pMET << (sal_uInt8)0xfe;
}
UpdateFieldSize();
- if (pMET->GetError()) bStatus=FALSE;
+ if (pMET->GetError()) bStatus=sal_False;
}
-void METWriter::WillWriteOrder(ULONG nNextOrderMaximumLength)
+void METWriter::WillWriteOrder(sal_uLong nNextOrderMaximumLength)
{
// Die Parameter eines 'Graphics Data Fields' duerfen (laut OS2-Doku)
// hoechstens 32759 Bytes umfassen. Gemeint ist die Laenge des Feldes minus
@@ -1130,9 +1130,9 @@ void METWriter::WillWriteOrder(ULONG nNextOrderMaximumLength)
void METWriter::METBitBlt(Point aPt, Size aSize, const Bitmap & rBitmap)
{
WillWriteOrder(46);
- *pMET << (BYTE)0xd6 << (BYTE)44 << (USHORT)0 << (USHORT) 0x00cc;
+ *pMET << (sal_uInt8)0xd6 << (sal_uInt8)44 << (sal_uInt16)0 << (sal_uInt16) 0x00cc;
WriteBigEndianLong(nActBitmapId++);
- *pMET << (BYTE)0x02 << (BYTE)0x00 << (BYTE)0x00 << (BYTE)0x00;
+ *pMET << (sal_uInt8)0x02 << (sal_uInt8)0x00 << (sal_uInt8)0x00 << (sal_uInt8)0x00;
WritePoint(Point(aPt.X(),aPt.Y()+aSize.Height()));
WritePoint(Point(aPt.X()+aSize.Width(),aPt.Y()));
*pMET << (sal_uInt32)0 << (sal_uInt32)0
@@ -1142,18 +1142,18 @@ void METWriter::METBitBlt(Point aPt, Size aSize, const Bitmap & rBitmap)
void METWriter::METSetAndPushLineInfo( const LineInfo& rLineInfo )
{
- INT32 nWidth = OutputDevice::LogicToLogic( Size( rLineInfo.GetWidth(),0 ), aPictureMapMode, aTargetMapMode ).Width();
+ sal_Int32 nWidth = OutputDevice::LogicToLogic( Size( rLineInfo.GetWidth(),0 ), aPictureMapMode, aTargetMapMode ).Width();
WillWriteOrder( 8 ); // set stroke linewidth
- *pMET << (BYTE)0x15
- << (BYTE)6
- << (BYTE)0 // Flags
- << (BYTE)0
+ *pMET << (sal_uInt8)0x15
+ << (sal_uInt8)6
+ << (sal_uInt8)0 // Flags
+ << (sal_uInt8)0
<< nWidth;
if ( rLineInfo.GetStyle() != LINE_SOLID )
{
- BYTE nStyle = 0; // LineDefault;
+ sal_uInt8 nStyle = 0; // LineDefault;
switch ( rLineInfo.GetStyle() )
{
@@ -1179,83 +1179,83 @@ void METWriter::METSetAndPushLineInfo( const LineInfo& rLineInfo )
break; // not handled -Wall
}
WillWriteOrder( 2 );
- *pMET << (BYTE)0x18 << nStyle; // set LineType
+ *pMET << (sal_uInt8)0x18 << nStyle; // set LineType
}
}
void METWriter::METPopLineInfo( const LineInfo& rLineInfo )
{
WillWriteOrder( 8 ); // set stroke linewidth
- *pMET << (BYTE)0x15
- << (BYTE)6
- << (BYTE)0 // Flags
- << (BYTE)0
- << (UINT32)1;
+ *pMET << (sal_uInt8)0x15
+ << (sal_uInt8)6
+ << (sal_uInt8)0 // Flags
+ << (sal_uInt8)0
+ << (sal_uInt32)1;
if ( rLineInfo.GetStyle() != LINE_SOLID )
{
WillWriteOrder( 2 );
- *pMET << (BYTE)0x18 << (BYTE)0; // set LineType
+ *pMET << (sal_uInt8)0x18 << (sal_uInt8)0; // set LineType
}
}
-void METWriter::METBeginArea(BOOL bBoundaryLine)
+void METWriter::METBeginArea(sal_Bool bBoundaryLine)
{
WillWriteOrder(2);
- *pMET << (BYTE)0x68;
- if (bBoundaryLine) *pMET << (BYTE)0xc0;
- else *pMET << (BYTE)0x80;
+ *pMET << (sal_uInt8)0x68;
+ if (bBoundaryLine) *pMET << (sal_uInt8)0xc0;
+ else *pMET << (sal_uInt8)0x80;
}
void METWriter::METEndArea()
{
WillWriteOrder(2);
- *pMET << (BYTE)0x60 << (BYTE)0;
+ *pMET << (sal_uInt8)0x60 << (sal_uInt8)0;
}
void METWriter::METBeginPath(sal_uInt32 nPathId)
{
WillWriteOrder(8);
- *pMET << (BYTE)0xd0 << (BYTE)6 << (USHORT) 0 << nPathId;
+ *pMET << (sal_uInt8)0xd0 << (sal_uInt8)6 << (sal_uInt16) 0 << nPathId;
}
void METWriter::METEndPath()
{
WillWriteOrder(2);
- *pMET << (BYTE)0x7f << (BYTE)0;
+ *pMET << (sal_uInt8)0x7f << (sal_uInt8)0;
}
void METWriter::METFillPath(sal_uInt32 nPathId)
{
WillWriteOrder(8);
- *pMET << (BYTE)0xd7 << (BYTE)6
- << (BYTE)0x00 << (BYTE)0 << nPathId;
+ *pMET << (sal_uInt8)0xd7 << (sal_uInt8)6
+ << (sal_uInt8)0x00 << (sal_uInt8)0 << nPathId;
}
void METWriter::METOutlinePath(sal_uInt32 nPathId)
{
WillWriteOrder(8);
- *pMET << (BYTE)0xd4 << (BYTE)6
- << (BYTE)0 << (BYTE)0 << nPathId;
+ *pMET << (sal_uInt8)0xd4 << (sal_uInt8)6
+ << (sal_uInt8)0 << (sal_uInt8)0 << nPathId;
}
void METWriter::METCloseFigure()
{
WillWriteOrder(2);
- *pMET << (BYTE)0x7d << (BYTE)0;
+ *pMET << (sal_uInt8)0x7d << (sal_uInt8)0;
}
void METWriter::METMove(Point aPt)
{
WillWriteOrder(10);
- *pMET << (BYTE)0x21 << (BYTE)8;
+ *pMET << (sal_uInt8)0x21 << (sal_uInt8)8;
WritePoint(aPt);
}
@@ -1263,30 +1263,30 @@ void METWriter::METMove(Point aPt)
void METWriter::METLine(Point aPt1, Point aPt2)
{
WillWriteOrder(18);
- *pMET << (BYTE)0xc1 << (BYTE)16;
+ *pMET << (sal_uInt8)0xc1 << (sal_uInt8)16;
WritePoint(aPt1); WritePoint(aPt2);
}
void METWriter::METLine(const Polygon & rPolygon)
{
- USHORT nNumPoints,i,j,nOrderPoints;
- BOOL bFirstOrder;
+ sal_uInt16 nNumPoints,i,j,nOrderPoints;
+ sal_Bool bFirstOrder;
- bFirstOrder=TRUE;
+ bFirstOrder=sal_True;
i=0; nNumPoints=rPolygon.GetSize();
while (i<nNumPoints) {
nOrderPoints=nNumPoints-i;
if (nOrderPoints>30) nOrderPoints=30;
WillWriteOrder(nOrderPoints*8+2);
- if (bFirstOrder==TRUE) {
- *pMET << (BYTE)0xc1; // Line at given pos
- bFirstOrder=FALSE;
+ if (bFirstOrder==sal_True) {
+ *pMET << (sal_uInt8)0xc1; // Line at given pos
+ bFirstOrder=sal_False;
}
else {
- *pMET << (BYTE)0x81; // Line at current pos
+ *pMET << (sal_uInt8)0x81; // Line at current pos
}
- *pMET << (BYTE)(nOrderPoints*8);
+ *pMET << (sal_uInt8)(nOrderPoints*8);
for (j=0; j<nOrderPoints; j++) WritePoint(rPolygon.GetPoint(i++));
}
}
@@ -1294,7 +1294,7 @@ void METWriter::METLine(const Polygon & rPolygon)
void METWriter::METLine(const PolyPolygon & rPolyPolygon)
{
- USHORT i,nCount;
+ sal_uInt16 i,nCount;
nCount=rPolyPolygon.Count();
for (i=0; i<nCount; i++) {
METLine(rPolyPolygon.GetObject(i));
@@ -1306,20 +1306,20 @@ void METWriter::METLine(const PolyPolygon & rPolyPolygon)
void METWriter::METLineAtCurPos(Point aPt)
{
WillWriteOrder(10);
- *pMET << (BYTE)0x81 << (BYTE)8;
+ *pMET << (sal_uInt8)0x81 << (sal_uInt8)8;
WritePoint(aPt);
}
-void METWriter::METBox(BOOL bFill, BOOL bBoundary,
+void METWriter::METBox(sal_Bool bFill, sal_Bool bBoundary,
Rectangle aRect, sal_uInt32 nHAxis, sal_uInt32 nVAxis)
{
- BYTE nFlags=0;
+ sal_uInt8 nFlags=0;
if (bFill) nFlags|=0x40;
if (bBoundary) nFlags|=0x20;
WillWriteOrder(28);
- *pMET << (BYTE)0xc0 << (BYTE)26 << nFlags << (BYTE)0;
+ *pMET << (sal_uInt8)0xc0 << (sal_uInt8)26 << nFlags << (sal_uInt8)0;
WritePoint(aRect.BottomLeft());
WritePoint(aRect.TopRight());
*pMET << nHAxis << nVAxis;
@@ -1329,7 +1329,7 @@ void METWriter::METBox(BOOL bFill, BOOL bBoundary,
void METWriter::METFullArc(Point aCenter, double fMultiplier)
{
WillWriteOrder(14);
- *pMET << (BYTE)0xc7 << (BYTE)12;
+ *pMET << (sal_uInt8)0xc7 << (sal_uInt8)12;
WritePoint(aCenter);
*pMET << (long)(fMultiplier*65536.0+0.5);
}
@@ -1345,7 +1345,7 @@ void METWriter::METPartialArcAtCurPos(Point aCenter, double fMultiplier,
while (fSweepAngle>360.0) fSweepAngle-=360.0;
while (fSweepAngle<.00) fSweepAngle+=360.0;
WillWriteOrder(22);
- *pMET << (BYTE)0xa3 << (BYTE)20;
+ *pMET << (sal_uInt8)0xa3 << (sal_uInt8)20;
WritePoint(aCenter);
*pMET << (long)(fMultiplier*65536.0+0.5);
*pMET << (long)(fStartAngle*65536.0+0.5);
@@ -1355,22 +1355,22 @@ void METWriter::METPartialArcAtCurPos(Point aCenter, double fMultiplier,
void METWriter::METChrStr( Point aPt, String aUniStr )
{
- USHORT nLen,i;
+ sal_uInt16 nLen,i;
ByteString aStr( aUniStr, gsl_getSystemTextEncoding() );
nLen = aStr.Len();
WillWriteOrder( 11 + nLen );
- *pMET << (BYTE)0xc3 << (BYTE)( 9 + nLen );
+ *pMET << (sal_uInt8)0xc3 << (sal_uInt8)( 9 + nLen );
WritePoint(aPt);
for ( i = 0; i < nLen; i++ )
*pMET << aStr.GetChar( i );
- *pMET << (BYTE)0;
+ *pMET << (sal_uInt8)0;
}
void METWriter::METSetArcParams(long nP, long nQ, long nR, long nS)
{
WillWriteOrder(18);
- *pMET << (BYTE)0x22 << (BYTE)16 << nP << nQ << nR << nS;
+ *pMET << (sal_uInt8)0x22 << (sal_uInt8)16 << nP << nQ << nR << nS;
}
@@ -1380,10 +1380,10 @@ void METWriter::METSetColor(Color aColor)
aMETColor=aColor;
WillWriteOrder(6);
- *pMET << (BYTE)0xa6 << (BYTE)4 << (BYTE)0
- << (BYTE)(aColor.GetBlue())
- << (BYTE)(aColor.GetGreen())
- << (BYTE)(aColor.GetRed());
+ *pMET << (sal_uInt8)0xa6 << (sal_uInt8)4 << (sal_uInt8)0
+ << (sal_uInt8)(aColor.GetBlue())
+ << (sal_uInt8)(aColor.GetGreen())
+ << (sal_uInt8)(aColor.GetRed());
}
@@ -1393,15 +1393,15 @@ void METWriter::METSetBackgroundColor(Color aColor)
aMETBackgroundColor=aColor;
WillWriteOrder(6);
- *pMET << (BYTE)0xa7 << (BYTE)4 << (BYTE)0
- << (BYTE)(aColor.GetBlue())
- << (BYTE)(aColor.GetGreen())
- << (BYTE)(aColor.GetRed());
+ *pMET << (sal_uInt8)0xa7 << (sal_uInt8)4 << (sal_uInt8)0
+ << (sal_uInt8)(aColor.GetBlue())
+ << (sal_uInt8)(aColor.GetGreen())
+ << (sal_uInt8)(aColor.GetRed());
}
void METWriter::METSetMix(RasterOp eROP)
{
- BYTE nMix;
+ sal_uInt8 nMix;
if (eMETMix==eROP)
return;
@@ -1416,7 +1416,7 @@ void METWriter::METSetMix(RasterOp eROP)
}
WillWriteOrder(2);
- *pMET << (BYTE)0x0c << nMix;
+ *pMET << (sal_uInt8)0x0c << nMix;
}
@@ -1428,7 +1428,7 @@ void METWriter::METSetChrCellSize(Size aSize)
aMETChrCellSize=aSize;
WillWriteOrder(10);
if (aSize.Width()==0) aSize.Width()=aSize.Height();
- *pMET << (BYTE)0x33 << (BYTE)8 << (long)aSize.Width() << (long)aSize.Height();
+ *pMET << (sal_uInt8)0x33 << (sal_uInt8)8 << (long)aSize.Width() << (long)aSize.Height();
}
@@ -1453,27 +1453,27 @@ void METWriter::METSetChrAngle(short nAngle)
}
WillWriteOrder(10);
- *pMET << (BYTE)0x34 << (BYTE)8 << nax << nay;
+ *pMET << (sal_uInt8)0x34 << (sal_uInt8)8 << nax << nay;
}
-void METWriter::METSetChrSet(BYTE nSet)
+void METWriter::METSetChrSet(sal_uInt8 nSet)
{
if (nMETChrSet==nSet)
return;
nMETChrSet=nSet;
WillWriteOrder(2);
- *pMET << (BYTE)0x38 << nSet;
+ *pMET << (sal_uInt8)0x38 << nSet;
}
void METWriter::WriteOrders( const GDIMetaFile* pMTF )
{
- if(bStatus==FALSE)
+ if(bStatus==sal_False)
return;
- for( ULONG nA = 0, nACount = pMTF->GetActionCount(); nA < nACount; nA++ )
+ for( sal_uLong nA = 0, nACount = pMTF->GetActionCount(); nA < nACount; nA++ )
{
const MetaAction* pMA = pMTF->GetAction( nA );
@@ -1495,7 +1495,7 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF )
METSetArcParams(1,1,0,0);
METSetMix(eGDIRasterOp);
METSetColor(aGDILineColor);
- METBeginArea(FALSE);
+ METBeginArea(sal_False);
METFullArc(pA->GetPoint(),0.5);
METEndArea();
}
@@ -1533,14 +1533,14 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF )
METSetMix( eGDIRasterOp );
METSetColor( aGDIFillColor );
METSetBackgroundColor( aGDIFillColor );
- METBox( TRUE, FALSE, pA->GetRect(), 0, 0 );
+ METBox( sal_True, sal_False, pA->GetRect(), 0, 0 );
}
if( aGDILineColor != Color( COL_TRANSPARENT ) )
{
METSetMix( eGDIRasterOp );
METSetColor( aGDILineColor );
- METBox( FALSE, TRUE, pA->GetRect(), 0, 0 );
+ METBox( sal_False, sal_True, pA->GetRect(), 0, 0 );
}
}
break;
@@ -1554,14 +1554,14 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF )
METSetMix( eGDIRasterOp );
METSetColor( aGDIFillColor );
METSetBackgroundColor( aGDIFillColor );
- METBox( TRUE, FALSE, pA->GetRect(), pA->GetHorzRound(), pA->GetVertRound() );
+ METBox( sal_True, sal_False, pA->GetRect(), pA->GetHorzRound(), pA->GetVertRound() );
}
if( aGDILineColor != Color( COL_TRANSPARENT ) )
{
METSetMix( eGDIRasterOp );
METSetColor( aGDILineColor );
- METBox( FALSE, TRUE, pA->GetRect(), pA->GetHorzRound(), pA->GetVertRound() );
+ METBox( sal_False, sal_True, pA->GetRect(), pA->GetHorzRound(), pA->GetVertRound() );
}
}
break;
@@ -1581,7 +1581,7 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF )
METSetMix( eGDIRasterOp );
METSetColor( aGDIFillColor );
METSetBackgroundColor( aGDIFillColor );
- METBeginArea(FALSE);
+ METBeginArea(sal_False);
METFullArc(aCenter,0.5);
METEndArea();
}
@@ -1859,7 +1859,7 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF )
case META_TEXTARRAY_ACTION:
{
const MetaTextArrayAction* pA = (const MetaTextArrayAction*) pMA;
- USHORT i;
+ sal_uInt16 i;
String aStr;
Polygon aPolyDummy(1);
short nOrientation;
@@ -1911,7 +1911,7 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF )
{
const MetaStretchTextAction* pA = (const MetaStretchTextAction*) pMA;
VirtualDevice aVDev;
- USHORT i;
+ sal_uInt16 i;
sal_Int32* pDXAry;
sal_Int32 nNormSize;
String aStr;
@@ -2031,8 +2031,8 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF )
const MetaEPSAction* pA = (const MetaEPSAction*)pMA;
const GDIMetaFile aGDIMetaFile( pA->GetSubstitute() );
- INT32 nCount = aGDIMetaFile.GetActionCount();
- for ( INT32 i = 0; i < nCount; i++ )
+ sal_Int32 nCount = aGDIMetaFile.GetActionCount();
+ for ( sal_Int32 i = 0; i < nCount; i++ )
{
const MetaAction* pMetaAct = aGDIMetaFile.GetAction( i );
if ( pMetaAct->GetType() == META_BMPSCALE_ACTION )
@@ -2335,16 +2335,16 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF )
MayCallback();
if( pMET->GetError() )
- bStatus=FALSE;
+ bStatus=sal_False;
- if( bStatus == FALSE )
+ if( bStatus == sal_False )
break;
}
}
void METWriter::WriteObjectEnvironmentGroup(const GDIMetaFile * pMTF)
{
- ULONG i, nId;
+ sal_uLong i, nId;
//--- Das Feld 'Begin Object Environment Group':
WriteFieldIntroducer(16,BegObjEnvMagic,0,0);
@@ -2353,18 +2353,18 @@ void METWriter::WriteObjectEnvironmentGroup(const GDIMetaFile * pMTF)
//--- Das Feld 'Map Color Attribute Table':
WriteFieldIntroducer(22,MapColAtrMagic,0,0);
WriteBigEndianShort(0x000e);
- *pMET << (BYTE)0x0c << (BYTE)0x02 << (BYTE)0x84 << (BYTE)0x00;
+ *pMET << (sal_uInt8)0x0c << (sal_uInt8)0x02 << (sal_uInt8)0x84 << (sal_uInt8)0x00;
WriteFieldId(4);
//--- Das erste Feld 'Map Coded Font':
WriteFieldIntroducer(32,MapCodFntMagic,0,0);
WriteBigEndianShort(0x0018);
- *pMET << (BYTE)0x0c << (BYTE)0x02 << (BYTE)0x84 << (BYTE)0x00;
- *pMET << (BYTE)0xff << (BYTE)0x00 << (BYTE)0x00 << (BYTE)0x00;
- *pMET << (BYTE)0x00 << (BYTE)0x00 << (BYTE)0x00 << (BYTE)0x00;
- *pMET << (BYTE)0x04 << (BYTE)0x24 << (BYTE)0x05 << (BYTE)0x00;
- *pMET << (BYTE)0x06 << (BYTE)0x20;
- *pMET << (BYTE)0x03 << (BYTE)0x97 << (BYTE)0x01 << (BYTE)0xb5;
+ *pMET << (sal_uInt8)0x0c << (sal_uInt8)0x02 << (sal_uInt8)0x84 << (sal_uInt8)0x00;
+ *pMET << (sal_uInt8)0xff << (sal_uInt8)0x00 << (sal_uInt8)0x00 << (sal_uInt8)0x00;
+ *pMET << (sal_uInt8)0x00 << (sal_uInt8)0x00 << (sal_uInt8)0x00 << (sal_uInt8)0x00;
+ *pMET << (sal_uInt8)0x04 << (sal_uInt8)0x24 << (sal_uInt8)0x05 << (sal_uInt8)0x00;
+ *pMET << (sal_uInt8)0x06 << (sal_uInt8)0x20;
+ *pMET << (sal_uInt8)0x03 << (sal_uInt8)0x97 << (sal_uInt8)0x01 << (sal_uInt8)0xb5;
//--- Die weiteren Felder 'Map Coded Font':
CreateChrSets(pMTF);
@@ -2376,9 +2376,9 @@ void METWriter::WriteObjectEnvironmentGroup(const GDIMetaFile * pMTF)
{
WriteFieldIntroducer(29,MapDatResMagic,0,0);
WriteBigEndianShort(0x0015);
- *pMET << (BYTE)0x0c << (BYTE)0x02 << (BYTE)0x84 << (BYTE)0x00;
+ *pMET << (sal_uInt8)0x0c << (sal_uInt8)0x02 << (sal_uInt8)0x84 << (sal_uInt8)0x00;
WriteFieldId(nId);
- *pMET << (BYTE)0x07 << (BYTE)0x22 << (BYTE)0x10;
+ *pMET << (sal_uInt8)0x07 << (sal_uInt8)0x22 << (sal_uInt8)0x10;
*pMET << (sal_uInt32)nId;
nId++;
}
@@ -2391,9 +2391,9 @@ void METWriter::WriteObjectEnvironmentGroup(const GDIMetaFile * pMTF)
void METWriter::WriteGraphicsObject(const GDIMetaFile * pMTF)
{
- ULONG nSegmentSize,nPos,nDataFieldsStartPos;
+ sal_uLong nSegmentSize,nPos,nDataFieldsStartPos;
- if( bStatus==FALSE )
+ if( bStatus==sal_False )
return;
//--- Das Feld 'Begin Graphics Object':
@@ -2417,11 +2417,11 @@ void METWriter::WriteGraphicsObject(const GDIMetaFile * pMTF)
nNumberOfDataFields++;
// Nun schreiben wir zunaechst den Kopf des Segments:
- *pMET << (BYTE)0x70 << (BYTE)0x0e << (sal_uInt32)0;
- *pMET << (BYTE)0x70 << (BYTE)0x10; // Flags
- *pMET << (USHORT)0; // Lo-Wort der Laenge der Segementdaten (Big Endian)
+ *pMET << (sal_uInt8)0x70 << (sal_uInt8)0x0e << (sal_uInt32)0;
+ *pMET << (sal_uInt8)0x70 << (sal_uInt8)0x10; // Flags
+ *pMET << (sal_uInt16)0; // Lo-Wort der Laenge der Segementdaten (Big Endian)
*pMET << (sal_uInt32)0; // Reserved
- *pMET << (USHORT)0; // Hi-Wort der Laenge der Segementdaten (Big Endian) (Ohh Ohh OS2)
+ *pMET << (sal_uInt16)0; // Hi-Wort der Laenge der Segementdaten (Big Endian) (Ohh Ohh OS2)
// Anmerkung: die richtige Daten-Laenge schreiben wir weiter unten nochmal
// Jetzt werden alle Orders rausgeschrieben:
@@ -2437,9 +2437,9 @@ void METWriter::WriteGraphicsObject(const GDIMetaFile * pMTF)
nSegmentSize=nPos-nDataFieldsStartPos;
nSegmentSize-=nNumberOfDataFields*8; // Structured Field Introducers zaehlen nicht mit
pMET->Seek(nDataFieldsStartPos+16); // Zum Lo-Wort der Segmentgroesse seeken
- WriteBigEndianShort((USHORT)(nSegmentSize&0x0000ffff)); // Und schreiben
+ WriteBigEndianShort((sal_uInt16)(nSegmentSize&0x0000ffff)); // Und schreiben
pMET->Seek(nDataFieldsStartPos+22); // Zum Hi-Wort der Segmentgroesse seeken
- WriteBigEndianShort((USHORT)(nSegmentSize>>16)); // Und schreiben
+ WriteBigEndianShort((sal_uInt16)(nSegmentSize>>16)); // Und schreiben
pMET->Seek(nPos); // Zurueck zur Tagesordnung
//--- Das Feld 'End Graphic Objects':
@@ -2447,13 +2447,13 @@ void METWriter::WriteGraphicsObject(const GDIMetaFile * pMTF)
WriteFieldId(7);
if( pMET->GetError() )
- bStatus=FALSE;
+ bStatus=sal_False;
}
void METWriter::WriteResourceGroup(const GDIMetaFile * pMTF)
{
- if( bStatus==FALSE )
+ if( bStatus==sal_False )
return;
//--- Das Feld 'Begin Resource Group':
@@ -2472,22 +2472,22 @@ void METWriter::WriteResourceGroup(const GDIMetaFile * pMTF)
WriteFieldId(2);
if( pMET->GetError() )
- bStatus=FALSE;
+ bStatus=sal_False;
}
void METWriter::WriteDocument(const GDIMetaFile * pMTF)
{
- if( bStatus==FALSE )
+ if( bStatus==sal_False )
return;
//--- Das Feld 'Begin Document':
WriteFieldIntroducer(0,BegDocumnMagic,0,0);
WriteFieldId(1);
- *pMET << (BYTE)0x00 << (BYTE)0x00;
- *pMET << (BYTE)0x05 << (BYTE)0x18 << (BYTE)0x03 << (BYTE)0x0c << (BYTE)0x00;
- *pMET << (BYTE)0x06 << (BYTE)0x01 << (BYTE)0x03 << (BYTE)0xd4 << (BYTE)0x03 << (BYTE)0x52;
- *pMET << (BYTE)0x03 << (BYTE)0x65 << (BYTE)0x00;
+ *pMET << (sal_uInt8)0x00 << (sal_uInt8)0x00;
+ *pMET << (sal_uInt8)0x05 << (sal_uInt8)0x18 << (sal_uInt8)0x03 << (sal_uInt8)0x0c << (sal_uInt8)0x00;
+ *pMET << (sal_uInt8)0x06 << (sal_uInt8)0x01 << (sal_uInt8)0x03 << (sal_uInt8)0xd4 << (sal_uInt8)0x03 << (sal_uInt8)0x52;
+ *pMET << (sal_uInt8)0x03 << (sal_uInt8)0x65 << (sal_uInt8)0x00;
UpdateFieldSize();
//--- Der Inhalt:
@@ -2498,10 +2498,10 @@ void METWriter::WriteDocument(const GDIMetaFile * pMTF)
WriteFieldId(1);
if( pMET->GetError() )
- bStatus=FALSE;
+ bStatus=sal_False;
}
-BOOL METWriter::WriteMET( const GDIMetaFile& rMTF, SvStream& rTargetStream, FilterConfigItem* pFilterConfigItem )
+sal_Bool METWriter::WriteMET( const GDIMetaFile& rMTF, SvStream& rTargetStream, FilterConfigItem* pFilterConfigItem )
{
if ( pFilterConfigItem )
{
@@ -2516,7 +2516,7 @@ BOOL METWriter::WriteMET( const GDIMetaFile& rMTF, SvStream& rTargetStream, Filt
METChrSet* pCS;
METGDIStackMember* pGS;
- bStatus=TRUE;
+ bStatus=sal_True;
nLastPercent=0;
pMET=&rTargetStream;
@@ -2573,7 +2573,7 @@ BOOL METWriter::WriteMET( const GDIMetaFile& rMTF, SvStream& rTargetStream, Filt
//================== GraphicExport - die exportierte Funktion ================
-extern "C" BOOL __LOADONCALLAPI GraphicExport( SvStream & rStream, Graphic & rGraphic, FilterConfigItem* pFilterConfigItem, BOOL )
+extern "C" sal_Bool __LOADONCALLAPI GraphicExport( SvStream & rStream, Graphic & rGraphic, FilterConfigItem* pFilterConfigItem, sal_Bool )
{ METWriter aMETWriter;
if ( rGraphic.GetType() == GRAPHIC_GDIMETAFILE )
diff --git a/filter/source/graphicfilter/epbm/epbm.cxx b/filter/source/graphicfilter/epbm/epbm.cxx
index b4f5b9b680ce..02ee1d00927f 100644
--- a/filter/source/graphicfilter/epbm/epbm.cxx
+++ b/filter/source/graphicfilter/epbm/epbm.cxx
@@ -43,14 +43,14 @@ class PBMWriter {
private:
SvStream* mpOStm; // Die auszugebende PBM-Datei
- USHORT mpOStmOldModus;
+ sal_uInt16 mpOStmOldModus;
- BOOL mbStatus;
+ sal_Bool mbStatus;
sal_Int32 mnMode; // 0 -> raw, 1-> ascii
BitmapReadAccess* mpAcc;
- ULONG mnWidth, mnHeight; // Bildausmass in Pixeln
+ sal_uLong mnWidth, mnHeight; // Bildausmass in Pixeln
- BOOL ImplWriteHeader();
+ sal_Bool ImplWriteHeader();
void ImplWriteBody();
void ImplWriteNumber( sal_Int32 );
@@ -60,13 +60,13 @@ public:
PBMWriter();
~PBMWriter();
- BOOL WritePBM( const Graphic& rGraphic, SvStream& rPBM, FilterConfigItem* pFilterConfigItem );
+ sal_Bool WritePBM( const Graphic& rGraphic, SvStream& rPBM, FilterConfigItem* pFilterConfigItem );
};
//=================== Methoden von PBMWriter ==============================
PBMWriter::PBMWriter() :
- mbStatus ( TRUE ),
+ mbStatus ( sal_True ),
mpAcc ( NULL )
{
}
@@ -79,7 +79,7 @@ PBMWriter::~PBMWriter()
// ------------------------------------------------------------------------
-BOOL PBMWriter::WritePBM( const Graphic& rGraphic, SvStream& rPBM, FilterConfigItem* pFilterConfigItem )
+sal_Bool PBMWriter::WritePBM( const Graphic& rGraphic, SvStream& rPBM, FilterConfigItem* pFilterConfigItem )
{
mpOStm = &rPBM;
@@ -112,7 +112,7 @@ BOOL PBMWriter::WritePBM( const Graphic& rGraphic, SvStream& rPBM, FilterConfigI
aBmp.ReleaseAccess( mpAcc );
}
else
- mbStatus = FALSE;
+ mbStatus = sal_False;
mpOStm->SetNumberFormatInt( mpOStmOldModus );
@@ -124,7 +124,7 @@ BOOL PBMWriter::WritePBM( const Graphic& rGraphic, SvStream& rPBM, FilterConfigI
// ------------------------------------------------------------------------
-BOOL PBMWriter::ImplWriteHeader()
+sal_Bool PBMWriter::ImplWriteHeader()
{
mnWidth = mpAcc->Width();
mnHeight = mpAcc->Height();
@@ -136,11 +136,11 @@ BOOL PBMWriter::ImplWriteHeader()
*mpOStm << "P1\x0a";
ImplWriteNumber( mnWidth );
- *mpOStm << (BYTE)32;
+ *mpOStm << (sal_uInt8)32;
ImplWriteNumber( mnHeight );
- *mpOStm << (BYTE)10;
+ *mpOStm << (sal_uInt8)10;
}
- else mbStatus = FALSE;
+ else mbStatus = sal_False;
return mbStatus;
}
@@ -150,10 +150,10 @@ void PBMWriter::ImplWriteBody()
{
if ( mnMode == 0 )
{
- BYTE nBYTE = 0;
- for ( ULONG y = 0; y < mnHeight; y++ )
+ sal_uInt8 nBYTE = 0;
+ for ( sal_uLong y = 0; y < mnHeight; y++ )
{
- ULONG x;
+ sal_uLong x;
for ( x = 0; x < mnWidth; x++ )
{
nBYTE <<= 1;
@@ -163,25 +163,25 @@ void PBMWriter::ImplWriteBody()
*mpOStm << nBYTE;
}
if ( ( x & 7 ) != 0 )
- *mpOStm << (BYTE)( nBYTE << ( ( x ^ 7 ) + 1 ) );
+ *mpOStm << (sal_uInt8)( nBYTE << ( ( x ^ 7 ) + 1 ) );
}
}
else
{
int nxCount;
- for ( ULONG y = 0; y < mnHeight; y++ )
+ for ( sal_uLong y = 0; y < mnHeight; y++ )
{
nxCount = 70;
- for ( ULONG x = 0; x < mnWidth; x++ )
+ for ( sal_uLong x = 0; x < mnWidth; x++ )
{
if (!( --nxCount ) )
{
nxCount = 69;
- *mpOStm << (BYTE)10;
+ *mpOStm << (sal_uInt8)10;
}
- *mpOStm << (BYTE)( ( mpAcc->GetPixel( y, x ) ^ 1 ) + '0' ) ;
+ *mpOStm << (sal_uInt8)( ( mpAcc->GetPixel( y, x ) ^ 1 ) + '0' ) ;
}
- *mpOStm << (BYTE)10;
+ *mpOStm << (sal_uInt8)10;
}
}
}
@@ -204,7 +204,7 @@ void PBMWriter::ImplWriteNumber( sal_Int32 nNumber )
// - exported function -
// ---------------------
-extern "C" BOOL __LOADONCALLAPI GraphicExport( SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pFilterConfigItem, BOOL )
+extern "C" sal_Bool __LOADONCALLAPI GraphicExport( SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pFilterConfigItem, sal_Bool )
{
PBMWriter aPBMWriter;
diff --git a/filter/source/graphicfilter/epgm/epgm.cxx b/filter/source/graphicfilter/epgm/epgm.cxx
index 1f5da40dee43..412d2139d60f 100644
--- a/filter/source/graphicfilter/epgm/epgm.cxx
+++ b/filter/source/graphicfilter/epgm/epgm.cxx
@@ -43,14 +43,14 @@ class PGMWriter {
private:
SvStream* mpOStm; // Die auszugebende PGM-Datei
- USHORT mpOStmOldModus;
+ sal_uInt16 mpOStmOldModus;
- BOOL mbStatus;
- UINT32 mnMode;
+ sal_Bool mbStatus;
+ sal_uInt32 mnMode;
BitmapReadAccess* mpAcc;
- ULONG mnWidth, mnHeight; // Bildausmass in Pixeln
+ sal_uLong mnWidth, mnHeight; // Bildausmass in Pixeln
- BOOL ImplWriteHeader();
+ sal_Bool ImplWriteHeader();
void ImplWriteBody();
void ImplWriteNumber( sal_Int32 );
@@ -60,13 +60,13 @@ public:
PGMWriter();
~PGMWriter();
- BOOL WritePGM( const Graphic& rGraphic, SvStream& rPGM, FilterConfigItem* pFilterConfigItem );
+ sal_Bool WritePGM( const Graphic& rGraphic, SvStream& rPGM, FilterConfigItem* pFilterConfigItem );
};
//=================== Methoden von PGMWriter ==============================
PGMWriter::PGMWriter() :
- mbStatus ( TRUE ),
+ mbStatus ( sal_True ),
mpAcc ( NULL )
{
}
@@ -79,7 +79,7 @@ PGMWriter::~PGMWriter()
// ------------------------------------------------------------------------
-BOOL PGMWriter::WritePGM( const Graphic& rGraphic, SvStream& rPGM, FilterConfigItem* pFilterConfigItem )
+sal_Bool PGMWriter::WritePGM( const Graphic& rGraphic, SvStream& rPGM, FilterConfigItem* pFilterConfigItem )
{
mpOStm = &rPGM;
@@ -113,7 +113,7 @@ BOOL PGMWriter::WritePGM( const Graphic& rGraphic, SvStream& rPGM, FilterConfigI
aBmp.ReleaseAccess( mpAcc );
}
else
- mbStatus = FALSE;
+ mbStatus = sal_False;
mpOStm->SetNumberFormatInt( mpOStmOldModus );
@@ -125,7 +125,7 @@ BOOL PGMWriter::WritePGM( const Graphic& rGraphic, SvStream& rPGM, FilterConfigI
// ------------------------------------------------------------------------
-BOOL PGMWriter::ImplWriteHeader()
+sal_Bool PGMWriter::ImplWriteHeader()
{
mnWidth = mpAcc->Width();
mnHeight = mpAcc->Height();
@@ -137,14 +137,14 @@ BOOL PGMWriter::ImplWriteHeader()
*mpOStm << "P2\x0a";
ImplWriteNumber( mnWidth );
- *mpOStm << (BYTE)32;
+ *mpOStm << (sal_uInt8)32;
ImplWriteNumber( mnHeight );
- *mpOStm << (BYTE)32;
+ *mpOStm << (sal_uInt8)32;
ImplWriteNumber( 255 ); // max. gray value
- *mpOStm << (BYTE)10;
+ *mpOStm << (sal_uInt8)10;
}
else
- mbStatus = FALSE;
+ mbStatus = sal_False;
return mbStatus;
}
@@ -155,37 +155,37 @@ void PGMWriter::ImplWriteBody()
{
if ( mnMode == 0 )
{
- for ( ULONG y = 0; y < mnHeight; y++ )
+ for ( sal_uLong y = 0; y < mnHeight; y++ )
{
- for ( ULONG x = 0; x < mnWidth; x++ )
+ for ( sal_uLong x = 0; x < mnWidth; x++ )
{
- *mpOStm << (BYTE)( mpAcc->GetPixel( y, x ) );
+ *mpOStm << (sal_uInt8)( mpAcc->GetPixel( y, x ) );
}
}
}
else
{
- for ( ULONG y = 0; y < mnHeight; y++ )
+ for ( sal_uLong y = 0; y < mnHeight; y++ )
{
int nCount = 70;
- for ( ULONG x = 0; x < mnWidth; x++ )
+ for ( sal_uLong x = 0; x < mnWidth; x++ )
{
- BYTE nDat, nNumb;
+ sal_uInt8 nDat, nNumb;
if ( nCount < 0 )
{
nCount = 69;
- *mpOStm << (BYTE)10;
+ *mpOStm << (sal_uInt8)10;
}
- nDat = (BYTE)mpAcc->GetPixel( y, x );
+ nDat = (sal_uInt8)mpAcc->GetPixel( y, x );
nNumb = nDat / 100;
if ( nNumb )
{
- *mpOStm << (BYTE)( nNumb + '0' );
+ *mpOStm << (sal_uInt8)( nNumb + '0' );
nDat -= ( nNumb * 100 );
nNumb = nDat / 10;
- *mpOStm << (BYTE)( nNumb + '0' );
+ *mpOStm << (sal_uInt8)( nNumb + '0' );
nDat -= ( nNumb * 10 );
- *mpOStm << (BYTE)( nDat + '0' );
+ *mpOStm << (sal_uInt8)( nDat + '0' );
nCount -= 4;
}
else
@@ -193,20 +193,20 @@ void PGMWriter::ImplWriteBody()
nNumb = nDat / 10;
if ( nNumb )
{
- *mpOStm << (BYTE)( nNumb + '0' );
+ *mpOStm << (sal_uInt8)( nNumb + '0' );
nDat -= ( nNumb * 10 );
- *mpOStm << (BYTE)( nDat + '0' );
+ *mpOStm << (sal_uInt8)( nDat + '0' );
nCount -= 3;
}
else
{
- *mpOStm << (BYTE)( nDat + '0' );
+ *mpOStm << (sal_uInt8)( nDat + '0' );
nCount -= 2;
}
}
- *mpOStm << (BYTE)' ';
+ *mpOStm << (sal_uInt8)' ';
}
- *mpOStm << (BYTE)10;
+ *mpOStm << (sal_uInt8)10;
}
}
}
@@ -229,7 +229,7 @@ void PGMWriter::ImplWriteNumber( sal_Int32 nNumber )
// - exported function -
// ---------------------
-extern "C" BOOL __LOADONCALLAPI GraphicExport( SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pFilterConfigItem, BOOL )
+extern "C" sal_Bool __LOADONCALLAPI GraphicExport( SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pFilterConfigItem, sal_Bool )
{
PGMWriter aPGMWriter;
diff --git a/filter/source/graphicfilter/epict/epict.cxx b/filter/source/graphicfilter/epict/epict.cxx
index 53bdfbdad6ff..dac202b6ee1c 100644
--- a/filter/source/graphicfilter/epict/epict.cxx
+++ b/filter/source/graphicfilter/epict/epict.cxx
@@ -78,8 +78,8 @@ class PictWriter {
private:
- BOOL bStatus;
- ULONG nLastPercent; // Mit welcher Zahl pCallback zuletzt aufgerufen wurde.
+ sal_Bool bStatus;
+ sal_uLong nLastPercent; // Mit welcher Zahl pCallback zuletzt aufgerufen wurde.
com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator > xStatusIndicator;
SvStream * pPict;
@@ -95,29 +95,29 @@ private:
PictWriterAttrStackMember * pAttrStack;
// Aktuelle Attribute im Ziel-Metafile, und ob sie gueltig sind
- BOOL bDstBkPatVisible; BOOL bDstBkPatValid;
- BYTE nDstTxFace; BOOL bDstTxFaceValid;
- RasterOp eDstTxMode; BOOL bDstTxModeValid;
- USHORT nDstPnSize; BOOL bDstPnSizeValid;
- RasterOp eDstPnMode; BOOL bDstPnModeValid;
- PictPattern aDstPnPat; BOOL bDstPnPatValid;
- BOOL bDstFillPatVisible; BOOL bDstFillPatValid;
- USHORT nDstTxSize; BOOL bDstTxSizeValid;
- Color aDstFgCol; BOOL bDstFgColValid;
- Color aDstBkCol; BOOL bDstBkColValid;
- Point aDstPenPosition; BOOL bDstPenPositionValid;
- Point aDstTextPosition; BOOL bDstTextPositionValid;
- String aDstFontName; USHORT nDstFontNameId; BOOL bDstFontNameValid;
-
- ULONG nNumberOfActions; // Anzahl der Actions im GDIMetafile
- ULONG nNumberOfBitmaps; // Anzahl der Bitmaps
- ULONG nWrittenActions; // Anzahl der bereits verarbeiteten Actions beim Schreiben der Opcodes
- ULONG nWrittenBitmaps; // Anzahl der bereits geschriebenen Bitmaps
- ULONG nActBitmapPercent; // Wieviel Prozent die naechste Bitmap schon geschrieben ist.
+ sal_Bool bDstBkPatVisible; sal_Bool bDstBkPatValid;
+ sal_uInt8 nDstTxFace; sal_Bool bDstTxFaceValid;
+ RasterOp eDstTxMode; sal_Bool bDstTxModeValid;
+ sal_uInt16 nDstPnSize; sal_Bool bDstPnSizeValid;
+ RasterOp eDstPnMode; sal_Bool bDstPnModeValid;
+ PictPattern aDstPnPat; sal_Bool bDstPnPatValid;
+ sal_Bool bDstFillPatVisible; sal_Bool bDstFillPatValid;
+ sal_uInt16 nDstTxSize; sal_Bool bDstTxSizeValid;
+ Color aDstFgCol; sal_Bool bDstFgColValid;
+ Color aDstBkCol; sal_Bool bDstBkColValid;
+ Point aDstPenPosition; sal_Bool bDstPenPositionValid;
+ Point aDstTextPosition; sal_Bool bDstTextPositionValid;
+ String aDstFontName; sal_uInt16 nDstFontNameId; sal_Bool bDstFontNameValid;
+
+ sal_uLong nNumberOfActions; // Anzahl der Actions im GDIMetafile
+ sal_uLong nNumberOfBitmaps; // Anzahl der Bitmaps
+ sal_uLong nWrittenActions; // Anzahl der bereits verarbeiteten Actions beim Schreiben der Opcodes
+ sal_uLong nWrittenBitmaps; // Anzahl der bereits geschriebenen Bitmaps
+ sal_uLong nActBitmapPercent; // Wieviel Prozent die naechste Bitmap schon geschrieben ist.
void MayCallback();
// Berechnet anhand der obigen 5 Parameter eine Prozentzahl
- // und macht dann ggf. einen Callback. Setzt bStatus auf FALSE wenn User abbrechen
+ // und macht dann ggf. einen Callback. Setzt bStatus auf sal_False wenn User abbrechen
// moechte.
void CountActionsAndBitmaps(const GDIMetaFile & rMTF);
@@ -136,22 +136,22 @@ private:
void WritePolygon(const Polygon & rPoly);
void WriteArcAngles(const Rectangle & rRect, const Point & rStartPt, const Point & rEndPt);
- void ConvertLinePattern(PictPattern & rPat, BOOL bVisible);
- void ConvertFillPattern(PictPattern & rPat, BOOL bVisible);
+ void ConvertLinePattern(PictPattern & rPat, sal_Bool bVisible);
+ void ConvertFillPattern(PictPattern & rPat, sal_Bool bVisible);
void WriteOpcode_TxFace(const Font & rFont);
void WriteOpcode_TxMode(RasterOp eMode);
- void WriteOpcode_PnSize(USHORT nSize);
+ void WriteOpcode_PnSize(sal_uInt16 nSize);
void WriteOpcode_PnMode(RasterOp eMode);
- void WriteOpcode_PnLinePat(BOOL bVisible);
- void WriteOpcode_PnFillPat(BOOL bVisible);
+ void WriteOpcode_PnLinePat(sal_Bool bVisible);
+ void WriteOpcode_PnFillPat(sal_Bool bVisible);
void WriteOpcode_OvSize(const Size & rSize);
- void WriteOpcode_TxSize(USHORT nSize);
+ void WriteOpcode_TxSize(sal_uInt16 nSize);
void WriteOpcode_RGBFgCol(const Color & rColor);
void WriteOpcode_RGBBkCol(const Color & rColor);
void WriteOpcode_Line(const Point & rLocPt, const Point & rNewPt);
void WriteOpcode_LineFrom(const Point & rNewPt);
- void WriteOpcode_Text(const Point & rPoint, const String& rString, BOOL bDelta);
+ void WriteOpcode_Text(const Point & rPoint, const String& rString, sal_Bool bDelta);
void WriteOpcode_FontName(const Font & rFont);
void WriteOpcode_ClipRect( const Rectangle& rRect );
void WriteOpcode_Rect(PictDrawingMethod eMethod, const Rectangle & rRect);
@@ -182,7 +182,7 @@ private:
public:
- BOOL WritePict( const GDIMetaFile & rMTF, SvStream & rTargetStream, FilterConfigItem* pFilterConfigItem );
+ sal_Bool WritePict( const GDIMetaFile & rMTF, SvStream & rTargetStream, FilterConfigItem* pFilterConfigItem );
};
@@ -193,7 +193,7 @@ void PictWriter::MayCallback()
{
if ( xStatusIndicator.is() )
{
- ULONG nPercent;
+ sal_uLong nPercent;
nPercent=((nWrittenBitmaps<<14)+(nActBitmapPercent<<14)/100+nWrittenActions)
*100
/((nNumberOfBitmaps<<14)+nNumberOfActions);
@@ -209,7 +209,7 @@ void PictWriter::MayCallback()
void PictWriter::CountActionsAndBitmaps(const GDIMetaFile & rMTF)
{
- ULONG nAction, nActionCount;
+ sal_uLong nAction, nActionCount;
const MetaAction* pMA;
nActionCount = rMTF.GetActionCount();
@@ -237,7 +237,7 @@ void PictWriter::CountActionsAndBitmaps(const GDIMetaFile & rMTF)
Polygon PictWriter::PolyPolygonToPolygon(const PolyPolygon & rPolyPoly)
{
- USHORT nCount,nSize1,nSize2,np,i1,i2,i3,nBestIdx1,nBestIdx2;
+ sal_uInt16 nCount,nSize1,nSize2,np,i1,i2,i3,nBestIdx1,nBestIdx2;
long nDistSqr,nBestDistSqr, nCountdownTests;
Point aP1,aPRel;
Polygon aPoly1, aPoly2, aPoly3;
@@ -316,9 +316,9 @@ void PictWriter::WriteSize(const Size & rSize)
void PictWriter::WriteRGBColor(const Color & rColor)
{
- const UINT16 nR = ( (UINT16) rColor.GetRed() << 8 ) | (UINT16) rColor.GetRed();
- const UINT16 nG = ( (UINT16) rColor.GetGreen() << 8 ) | (UINT16) rColor.GetGreen();
- const UINT16 nB = ( (UINT16) rColor.GetBlue() << 8 ) | (UINT16) rColor.GetBlue();
+ const sal_uInt16 nR = ( (sal_uInt16) rColor.GetRed() << 8 ) | (sal_uInt16) rColor.GetRed();
+ const sal_uInt16 nG = ( (sal_uInt16) rColor.GetGreen() << 8 ) | (sal_uInt16) rColor.GetGreen();
+ const sal_uInt16 nB = ( (sal_uInt16) rColor.GetBlue() << 8 ) | (sal_uInt16) rColor.GetBlue();
*pPict << nR << nG << nB;
}
@@ -326,13 +326,13 @@ void PictWriter::WriteRGBColor(const Color & rColor)
void PictWriter::WriteString( const String & rString )
{
- USHORT i,nLen;
+ sal_uInt16 i,nLen;
ByteString aByteString( rString, gsl_getSystemTextEncoding() );
nLen = aByteString.Len();
if ( nLen > 255 )
nLen = 255;
- *pPict << ( (BYTE)nLen );
+ *pPict << ( (sal_uInt8)nLen );
for ( i = 0; i < nLen; i++ )
*pPict << aByteString.GetChar( i );
}
@@ -357,7 +357,7 @@ void PictWriter::WriteRectangle(const Rectangle & rRect)
void PictWriter::WritePolygon(const Polygon & rPoly)
{
- USHORT nDataSize,i,nSize;
+ sal_uInt16 nDataSize,i,nSize;
short nMinX = 0, nMinY = 0, nMaxX = 0, nMaxY = 0;
short nx,ny;
Polygon aPoly(rPoly);
@@ -440,7 +440,7 @@ void PictWriter::WriteArcAngles(const Rectangle & rRect, const Point & rStartPt,
}
-void PictWriter::ConvertLinePattern(PictPattern & rPat, BOOL bVisible)
+void PictWriter::ConvertLinePattern(PictPattern & rPat, sal_Bool bVisible)
{
if( bVisible )
{
@@ -454,7 +454,7 @@ void PictWriter::ConvertLinePattern(PictPattern & rPat, BOOL bVisible)
}
}
-void PictWriter::ConvertFillPattern(PictPattern & rPat, BOOL bVisible)
+void PictWriter::ConvertFillPattern(PictPattern & rPat, sal_Bool bVisible)
{
if( bVisible )
{
@@ -471,7 +471,7 @@ void PictWriter::ConvertFillPattern(PictPattern & rPat, BOOL bVisible)
void PictWriter::WriteOpcode_TxFace(const Font & rFont)
{
- BYTE nFace;
+ sal_uInt8 nFace;
FontWeight eWeight;
nFace=0;
@@ -482,127 +482,127 @@ void PictWriter::WriteOpcode_TxFace(const Font & rFont)
eWeight==WEIGHT_BLACK) nFace|=0x01;
if (rFont.GetItalic()!=ITALIC_NONE) nFace|=0x02;
if (rFont.GetUnderline()!=UNDERLINE_NONE) nFace|=0x04;
- if (rFont.IsOutline()==TRUE) nFace|=0x08;
- if (rFont.IsShadow()==TRUE) nFace|=0x10;
+ if (rFont.IsOutline()==sal_True) nFace|=0x08;
+ if (rFont.IsShadow()==sal_True) nFace|=0x10;
- if (bDstTxFaceValid==FALSE || nDstTxFace!=nFace) {
- *pPict << (USHORT)0x0004 << nFace << (BYTE)0;
+ if (bDstTxFaceValid==sal_False || nDstTxFace!=nFace) {
+ *pPict << (sal_uInt16)0x0004 << nFace << (sal_uInt8)0;
nDstTxFace=nFace;
- bDstTxFaceValid=TRUE;
+ bDstTxFaceValid=sal_True;
}
}
void PictWriter::WriteOpcode_TxMode(RasterOp eMode)
{
- USHORT nVal;
+ sal_uInt16 nVal;
- if (bDstTxModeValid==FALSE || eDstTxMode!=eMode) {
+ if (bDstTxModeValid==sal_False || eDstTxMode!=eMode) {
switch (eMode) {
case ROP_INVERT: nVal=0x000c; break;
case ROP_XOR: nVal=0x000a; break;
default: nVal=0x0008;
}
- *pPict << (USHORT)0x0005 << nVal;
+ *pPict << (sal_uInt16)0x0005 << nVal;
eDstTxMode=eMode;
- bDstTxModeValid=TRUE;
+ bDstTxModeValid=sal_True;
}
}
-void PictWriter::WriteOpcode_PnSize(USHORT nSize)
+void PictWriter::WriteOpcode_PnSize(sal_uInt16 nSize)
{
if (nSize==0) nSize=1;
- if (bDstPnSizeValid==FALSE || nDstPnSize!=nSize) {
- *pPict << (USHORT)0x0007 << nSize << nSize;
+ if (bDstPnSizeValid==sal_False || nDstPnSize!=nSize) {
+ *pPict << (sal_uInt16)0x0007 << nSize << nSize;
nDstPnSize=nSize;
- bDstPnSizeValid=TRUE;
+ bDstPnSizeValid=sal_True;
}
}
void PictWriter::WriteOpcode_PnMode(RasterOp eMode)
{
- USHORT nVal;
+ sal_uInt16 nVal;
- if (bDstPnModeValid==FALSE || eDstPnMode!=eMode) {
+ if (bDstPnModeValid==sal_False || eDstPnMode!=eMode) {
switch (eMode)
{
case ROP_INVERT: nVal=0x000c; break;
case ROP_XOR: nVal=0x000a; break;
default: nVal=0x0008;
}
- *pPict << (USHORT)0x0008 << nVal;
+ *pPict << (sal_uInt16)0x0008 << nVal;
eDstPnMode=eMode;
- bDstPnModeValid=TRUE;
+ bDstPnModeValid=sal_True;
}
}
-void PictWriter::WriteOpcode_PnLinePat(BOOL bVisible)
+void PictWriter::WriteOpcode_PnLinePat(sal_Bool bVisible)
{
PictPattern aPat;
ConvertLinePattern(aPat,bVisible);
- if (bDstPnPatValid==FALSE || aDstPnPat.nHi!=aPat.nHi || aDstPnPat.nLo!=aPat.nLo) {
- *pPict << (USHORT)0x0009 << aPat.nHi << aPat.nLo;
+ if (bDstPnPatValid==sal_False || aDstPnPat.nHi!=aPat.nHi || aDstPnPat.nLo!=aPat.nLo) {
+ *pPict << (sal_uInt16)0x0009 << aPat.nHi << aPat.nLo;
aDstPnPat=aPat;
- bDstPnPatValid=TRUE;
+ bDstPnPatValid=sal_True;
}
}
-void PictWriter::WriteOpcode_PnFillPat(BOOL bVisible)
+void PictWriter::WriteOpcode_PnFillPat(sal_Bool bVisible)
{
PictPattern aPat;
ConvertFillPattern(aPat,bVisible);
- if (bDstPnPatValid==FALSE || aDstPnPat.nHi!=aPat.nHi || aDstPnPat.nLo!=aPat.nLo) {
- *pPict << (USHORT)0x0009 << aPat.nHi << aPat.nLo;
+ if (bDstPnPatValid==sal_False || aDstPnPat.nHi!=aPat.nHi || aDstPnPat.nLo!=aPat.nLo) {
+ *pPict << (sal_uInt16)0x0009 << aPat.nHi << aPat.nLo;
aDstPnPat=aPat;
- bDstPnPatValid=TRUE;
+ bDstPnPatValid=sal_True;
}
}
void PictWriter::WriteOpcode_OvSize(const Size & rSize)
{
- *pPict << (USHORT)0x000b;
+ *pPict << (sal_uInt16)0x000b;
WriteSize(rSize);
}
-void PictWriter::WriteOpcode_TxSize(USHORT nSize)
+void PictWriter::WriteOpcode_TxSize(sal_uInt16 nSize)
{
- if (bDstTxSizeValid==FALSE || nDstTxSize!=nSize) {
+ if (bDstTxSizeValid==sal_False || nDstTxSize!=nSize) {
- nDstTxSize = (USHORT) OutputDevice::LogicToLogic( Size( 0, nSize ),
+ nDstTxSize = (sal_uInt16) OutputDevice::LogicToLogic( Size( 0, nSize ),
aSrcMapMode, aTargetMapMode ).Height();
- *pPict << (USHORT)0x000d << nDstTxSize;
- bDstTxSizeValid=TRUE;
+ *pPict << (sal_uInt16)0x000d << nDstTxSize;
+ bDstTxSizeValid=sal_True;
}
}
void PictWriter::WriteOpcode_RGBFgCol(const Color & rColor)
{
- if (bDstFgColValid==FALSE || aDstFgCol!=rColor) {
- *pPict << (USHORT)0x001a;
+ if (bDstFgColValid==sal_False || aDstFgCol!=rColor) {
+ *pPict << (sal_uInt16)0x001a;
WriteRGBColor(rColor);
aDstFgCol=rColor;
- bDstFgColValid=TRUE;
+ bDstFgColValid=sal_True;
}
}
void PictWriter::WriteOpcode_RGBBkCol(const Color & rColor)
{
- if (bDstBkColValid==FALSE || aDstBkCol!=rColor) {
- *pPict << (USHORT)0x001b;
+ if (bDstBkColValid==sal_False || aDstBkCol!=rColor) {
+ *pPict << (sal_uInt16)0x001b;
WriteRGBColor(rColor);
aDstBkCol=rColor;
- bDstBkColValid=TRUE;
+ bDstBkColValid=sal_True;
}
}
@@ -621,18 +621,18 @@ void PictWriter::WriteOpcode_Line(const Point & rLocPt, const Point & rNewPt)
dv=aNewPt.Y()-aLocPt.Y();
if (dh<=127 && dh>=-128 && dv<=127 && dv>=-128)
{ // ShortLine
- *pPict << (USHORT)0x0022;
+ *pPict << (sal_uInt16)0x0022;
WritePoint(rLocPt);
*pPict << (char)dh << (char)dv;
}
else
{
- *pPict << (USHORT)0x0020;
+ *pPict << (sal_uInt16)0x0020;
WritePoint(rLocPt);
WritePoint(rNewPt);
}
aDstPenPosition=rNewPt;
- bDstPenPositionValid=TRUE;
+ bDstPenPositionValid=sal_True;
}
@@ -648,61 +648,61 @@ void PictWriter::WriteOpcode_LineFrom(const Point & rNewPt)
if (dh<=127 && dh>=-128 && dv<=127 && dv>=-128)
{ // ShortLine
- *pPict << (USHORT)0x0023;
+ *pPict << (sal_uInt16)0x0023;
*pPict << (char)dh << (char)dv;
}
else
{
- *pPict << (USHORT)0x0021;
+ *pPict << (sal_uInt16)0x0021;
WritePoint(rNewPt);
}
aDstPenPosition=rNewPt;
- bDstPenPositionValid=TRUE;
+ bDstPenPositionValid=sal_True;
}
-void PictWriter::WriteOpcode_Text(const Point & rPoint, const String& rString, BOOL bDelta)
+void PictWriter::WriteOpcode_Text(const Point & rPoint, const String& rString, sal_Bool bDelta)
{
Point aPoint = OutputDevice::LogicToLogic( rPoint,
aSrcMapMode,
aTargetMapMode );
long dh,dv;
- ULONG nPos;
+ sal_uLong nPos;
nPos = pPict->Tell();
dh = aPoint.X()-aDstTextPosition.X();
dv = aPoint.Y()-aDstTextPosition.Y();
- if (bDstTextPositionValid==FALSE || dh<0 || dh>255 || dv<0 || dv>0 || bDelta==FALSE)
+ if (bDstTextPositionValid==sal_False || dh<0 || dh>255 || dv<0 || dv>0 || bDelta==sal_False)
{
- *pPict << (USHORT)0x0028;
+ *pPict << (sal_uInt16)0x0028;
WritePoint(rPoint);
}
else if (dv==0)
{
- *pPict << (USHORT)0x0029 << (BYTE)dh;
+ *pPict << (sal_uInt16)0x0029 << (sal_uInt8)dh;
}
else if (dh==0)
{
- *pPict << (USHORT)0x002a << (BYTE)dv;
+ *pPict << (sal_uInt16)0x002a << (sal_uInt8)dv;
}
else
{
- *pPict << (USHORT)0x002b << (BYTE)dh << (BYTE)dv;
+ *pPict << (sal_uInt16)0x002b << (sal_uInt8)dh << (sal_uInt8)dv;
}
WriteString( rString );
if (((pPict->Tell()-nPos)&1)!=0)
- *pPict << (BYTE)0;
+ *pPict << (sal_uInt8)0;
aDstTextPosition = aPoint;
- bDstTextPositionValid=TRUE;
+ bDstTextPositionValid=sal_True;
}
void PictWriter::WriteOpcode_FontName(const Font & rFont)
{
- USHORT nDataLen,nFontId;
+ sal_uInt16 nDataLen,nFontId;
switch (rFont.GetFamily()) {
case FAMILY_MODERN: nFontId=22; break;
@@ -711,22 +711,22 @@ void PictWriter::WriteOpcode_FontName(const Font & rFont)
default: nFontId=1;
}
- if (bDstFontNameValid==FALSE || nDstFontNameId!=nFontId || aDstFontName!=rFont.GetName())
+ if (bDstFontNameValid==sal_False || nDstFontNameId!=nFontId || aDstFontName!=rFont.GetName())
{
ByteString aByteString( rFont.GetName(), gsl_getSystemTextEncoding() );
sal_uInt16 nFontNameLen = aByteString.Len();
if ( nFontNameLen )
{
nDataLen = 3 + nFontNameLen;
- *pPict << (USHORT)0x002c << nDataLen << nFontId;
+ *pPict << (sal_uInt16)0x002c << nDataLen << nFontId;
WriteString( rFont.GetName() );
if ( ( nFontNameLen & 1 ) == 0 )
- *pPict << (BYTE)0;
+ *pPict << (sal_uInt8)0;
}
- *pPict << (USHORT)0x0003 << nFontId;
+ *pPict << (sal_uInt16)0x0003 << nFontId;
aDstFontName=rFont.GetName();
nDstFontNameId=nFontId;
- bDstFontNameValid=TRUE;
+ bDstFontNameValid=sal_True;
}
}
@@ -744,7 +744,7 @@ void PictWriter::WriteOpcode_ClipRect( const Rectangle& rRect )
void PictWriter::WriteOpcode_Rect(PictDrawingMethod eMethod, const Rectangle & rRect)
{
- USHORT oc;
+ sal_uInt16 oc;
switch (eMethod) {
case PDM_FRAME: oc=0x0030; break;
case PDM_PAINT: oc=0x0031; break;
@@ -760,7 +760,7 @@ void PictWriter::WriteOpcode_Rect(PictDrawingMethod eMethod, const Rectangle & r
void PictWriter::WriteOpcode_SameRect(PictDrawingMethod eMethod)
{
- USHORT oc;
+ sal_uInt16 oc;
switch (eMethod) {
case PDM_FRAME: oc=0x0038; break;
case PDM_PAINT: oc=0x0039; break;
@@ -775,7 +775,7 @@ void PictWriter::WriteOpcode_SameRect(PictDrawingMethod eMethod)
void PictWriter::WriteOpcode_RRect(PictDrawingMethod eMethod, const Rectangle & rRect)
{
- USHORT oc;
+ sal_uInt16 oc;
switch (eMethod) {
case PDM_FRAME: oc=0x0040; break;
case PDM_PAINT: oc=0x0041; break;
@@ -791,7 +791,7 @@ void PictWriter::WriteOpcode_RRect(PictDrawingMethod eMethod, const Rectangle &
void PictWriter::WriteOpcode_SameRRect(PictDrawingMethod eMethod)
{
- USHORT oc;
+ sal_uInt16 oc;
switch (eMethod) {
case PDM_FRAME: oc=0x0048; break;
case PDM_PAINT: oc=0x0049; break;
@@ -806,7 +806,7 @@ void PictWriter::WriteOpcode_SameRRect(PictDrawingMethod eMethod)
void PictWriter::WriteOpcode_Oval(PictDrawingMethod eMethod, const Rectangle & rRect)
{
- USHORT oc;
+ sal_uInt16 oc;
switch (eMethod) {
case PDM_FRAME: oc=0x0050; break;
case PDM_PAINT: oc=0x0051; break;
@@ -822,7 +822,7 @@ void PictWriter::WriteOpcode_Oval(PictDrawingMethod eMethod, const Rectangle & r
void PictWriter::WriteOpcode_SameOval(PictDrawingMethod eMethod)
{
- USHORT oc;
+ sal_uInt16 oc;
switch (eMethod) {
case PDM_FRAME: oc=0x0058; break;
case PDM_PAINT: oc=0x0059; break;
@@ -838,7 +838,7 @@ void PictWriter::WriteOpcode_SameOval(PictDrawingMethod eMethod)
void PictWriter::WriteOpcode_Arc(PictDrawingMethod eMethod, const Rectangle & rRect,
const Point & rStartPt, const Point & rEndPt)
{
- USHORT oc;
+ sal_uInt16 oc;
switch (eMethod) {
case PDM_FRAME: oc=0x0060; break;
case PDM_PAINT: oc=0x0061; break;
@@ -856,7 +856,7 @@ void PictWriter::WriteOpcode_Arc(PictDrawingMethod eMethod, const Rectangle & rR
void PictWriter::WriteOpcode_SameArc(PictDrawingMethod eMethod, const Rectangle & rRect,
const Point & rStartPt, const Point & rEndPt)
{
- USHORT oc;
+ sal_uInt16 oc;
switch (eMethod) {
case PDM_FRAME: oc=0x0068; break;
case PDM_PAINT: oc=0x0069; break;
@@ -872,7 +872,7 @@ void PictWriter::WriteOpcode_SameArc(PictDrawingMethod eMethod, const Rectangle
void PictWriter::WriteOpcode_Poly(PictDrawingMethod eMethod, const Polygon & rPoly)
{
- USHORT oc;
+ sal_uInt16 oc;
if (rPoly.GetSize()<3) return;
switch (eMethod) {
@@ -893,12 +893,12 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize,
BitmapReadAccess* pAcc = NULL;
Bitmap aBitmap( rBitmap );
- ULONG nWidth, nHeight, nDstRowBytes, nx, nc, ny, nCount, nColTabSize, i;
- ULONG nDstRowPos, nSrcRowBytes, nEqu3, nPos, nDstMapPos;
- USHORT nBitsPerPixel, nPackType;
- BYTE *pComp[4], *pPix, *pTemp;
- BYTE nEquData = 0;
- BYTE nFlagCounterByte, nRed, nGreen, nBlue;
+ sal_uLong nWidth, nHeight, nDstRowBytes, nx, nc, ny, nCount, nColTabSize, i;
+ sal_uLong nDstRowPos, nSrcRowBytes, nEqu3, nPos, nDstMapPos;
+ sal_uInt16 nBitsPerPixel, nPackType;
+ sal_uInt8 *pComp[4], *pPix, *pTemp;
+ sal_uInt8 nEquData = 0;
+ sal_uInt8 nFlagCounterByte, nRed, nGreen, nBlue;
SetAttrForPaint();
@@ -906,7 +906,7 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize,
nActBitmapPercent=30;
MayCallback();
- if ( bStatus == FALSE )
+ if ( bStatus == sal_False )
return;
if ( ( pAcc = aBitmap.AcquireReadAccess() ) == NULL )
return;
@@ -929,7 +929,7 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize,
nDstRowBytes = nWidth * 4;
// Opcode und BaseAddr (?) schreiben:
- *pPict << (USHORT)0x009a << (sal_uInt32)0x000000ff;
+ *pPict << (sal_uInt16)0x009a << (sal_uInt32)0x000000ff;
// Normalerweise wollen wir den Packing-Type 4 (Run length encoding
// for 32-Bit Pixels) erzeugen. Wenn aber RowBytes<8 gilt, sind die Daten
@@ -943,36 +943,36 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize,
nPackType = 4;
// PixMap-Struktur schreiben:
- *pPict << (USHORT)(nDstRowBytes|0x8000) // Bytes pro Zeile und dass es eine 'PixMap' ist
- << (USHORT)0x0000 // Y1-Position der Bitmap in der Quelle
- << (USHORT)0x0000 // X1-Position der Bitmap in der Quelle
- << (USHORT)nHeight // Y2-Position der Bitmap in der Quelle
- << (USHORT)nWidth // X2-Position der Bitmap in der Quelle
- << (USHORT)0x0000 // Version
- << (USHORT)nPackType // Packing type
+ *pPict << (sal_uInt16)(nDstRowBytes|0x8000) // Bytes pro Zeile und dass es eine 'PixMap' ist
+ << (sal_uInt16)0x0000 // Y1-Position der Bitmap in der Quelle
+ << (sal_uInt16)0x0000 // X1-Position der Bitmap in der Quelle
+ << (sal_uInt16)nHeight // Y2-Position der Bitmap in der Quelle
+ << (sal_uInt16)nWidth // X2-Position der Bitmap in der Quelle
+ << (sal_uInt16)0x0000 // Version
+ << (sal_uInt16)nPackType // Packing type
<< (sal_uInt32) 0x00000000 // Packing size (?)
<< (sal_uInt32) 0x00480000 // H-Res
<< (sal_uInt32) 0x00480000 // V-Res
- << (USHORT)0x0010 // Pixel type (?)
- << (USHORT)0x0020 // Pixel size: 32 bit
- << (USHORT)0x0004 // CmpCount: 4 Komponenten
- << (USHORT)0x0008 // CmpSize: 8 Bits
+ << (sal_uInt16)0x0010 // Pixel type (?)
+ << (sal_uInt16)0x0020 // Pixel size: 32 bit
+ << (sal_uInt16)0x0004 // CmpCount: 4 Komponenten
+ << (sal_uInt16)0x0008 // CmpSize: 8 Bits
<< (sal_uInt32) 0x00000000 // PlaneBytes (?)
<< (sal_uInt32) 0x00000000 // (?)
<< (sal_uInt32) 0x00000000; // (?)
// Source-Rectangle schreiben:
- *pPict << (USHORT)0x0000 // Y1-Position auf der Bitmap
- << (USHORT)0x0000 // X1-Position auf der Bitmap
- << (USHORT)nHeight // Y2-Position auf der Bitmap
- << (USHORT)nWidth; // X2-Position auf der Bitmap
+ *pPict << (sal_uInt16)0x0000 // Y1-Position auf der Bitmap
+ << (sal_uInt16)0x0000 // X1-Position auf der Bitmap
+ << (sal_uInt16)nHeight // Y2-Position auf der Bitmap
+ << (sal_uInt16)nWidth; // X2-Position auf der Bitmap
// Destination-Rectangle schreiben:
WritePoint( rPoint );
WritePoint( Point( rPoint.X() + rSize.Width(), rPoint.Y() + rSize.Height() ) );
// Transfer mode schreiben:
- *pPict << (USHORT)0x0000; // (?)
+ *pPict << (sal_uInt16)0x0000; // (?)
// Position der Map-Daten in Ziel merken:
nDstMapPos=pPict->Tell();
@@ -981,10 +981,10 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize,
{ // nicht packen
for ( ny = 0; ny < nHeight; ny++ )
{
- *pPict << (BYTE)0;
- *pPict << (BYTE)pAcc->GetPixel( ny, 0 ).GetRed();
- *pPict << (BYTE)pAcc->GetPixel( ny, 0 ).GetGreen();
- *pPict << (BYTE)pAcc->GetPixel( ny, 0 ).GetBlue();
+ *pPict << (sal_uInt8)0;
+ *pPict << (sal_uInt8)pAcc->GetPixel( ny, 0 ).GetRed();
+ *pPict << (sal_uInt8)pAcc->GetPixel( ny, 0 ).GetGreen();
+ *pPict << (sal_uInt8)pAcc->GetPixel( ny, 0 ).GetBlue();
// Prozente zaehlen, Callback, Fehler pruefen:
nActBitmapPercent = ( ny * 70 / nHeight ) + 30; // (30% machten schon das Schreiben der Win-BMP-Datei aus)
MayCallback();
@@ -994,7 +994,7 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize,
{
// Speicher fuer Zeilen-Zwischen-Datenstruktur allozieren:
for ( nc = 0; nc < 4; nc++ )
- pComp[ nc ] = new BYTE[ nWidth ];
+ pComp[ nc ] = new sal_uInt8[ nWidth ];
// Schleife ueber Zeilen:
for ( ny = 0; ny < nHeight; ny++ )
@@ -1003,9 +1003,9 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize,
for ( nx = 0; nx < nWidth; nx++ )
{
- pComp[ 1 ][ nx ] = (BYTE)pAcc->GetPixel( ny, nx ) .GetRed();
- pComp[ 2 ][ nx ] = (BYTE)pAcc->GetPixel( ny, nx ) .GetGreen();
- pComp[ 3 ][ nx ] = (BYTE)pAcc->GetPixel( ny, nx ) .GetBlue();
+ pComp[ 1 ][ nx ] = (sal_uInt8)pAcc->GetPixel( ny, nx ) .GetRed();
+ pComp[ 2 ][ nx ] = (sal_uInt8)pAcc->GetPixel( ny, nx ) .GetGreen();
+ pComp[ 3 ][ nx ] = (sal_uInt8)pAcc->GetPixel( ny, nx ) .GetBlue();
pComp[ 0 ][ nx ] = 0;
}
@@ -1014,9 +1014,9 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize,
// ByteCount (das ist die Groesse der gepackten Zeile) zunaechst 0 (wird spaeter berichtigt):
if ( nDstRowBytes > 250 )
- *pPict << (USHORT)0;
+ *pPict << (sal_uInt16)0;
else
- *pPict << (BYTE)0;
+ *pPict << (sal_uInt8)0;
// Schleife ueber Componenten:
for ( nc = 0; nc < 4; nc++ )
@@ -1048,7 +1048,7 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize,
nCount = nEqu3 - nx;
if ( nCount > 128 )
nCount=128;
- nFlagCounterByte = (BYTE)(nCount-1);
+ nFlagCounterByte = (sal_uInt8)(nCount-1);
*pPict << nFlagCounterByte;
do
{
@@ -1071,7 +1071,7 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize,
nCount++;
}
// nCount gleiche Bytes komprimiert schreiben:
- nFlagCounterByte = (BYTE)( 1 - (long)nCount );
+ nFlagCounterByte = (sal_uInt8)( 1 - (long)nCount );
*pPict << nFlagCounterByte << nEquData;
nx += nCount;
}
@@ -1081,9 +1081,9 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize,
nPos = pPict->Tell();
pPict->Seek( nDstRowPos );
if ( nDstRowBytes > 250 )
- *pPict << ( (USHORT)( nPos - nDstRowPos - 2 ) );
+ *pPict << ( (sal_uInt16)( nPos - nDstRowPos - 2 ) );
else
- *pPict << ( (BYTE)( nPos - nDstRowPos - 1 ) );
+ *pPict << ( (sal_uInt8)( nPos - nDstRowPos - 1 ) );
pPict->Seek( nPos );
// Prozente zaehlen, Callback, Fehler pruefen:
@@ -1116,7 +1116,7 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize,
nSrcRowBytes = ( nDstRowBytes + 3 ) & 0xfffffffc;
// Opcode schreiben:
- *pPict << (USHORT)0x0098;
+ *pPict << (sal_uInt16)0x0098;
// Normalerweise wollen wir den Packing-Type 0 (default Packing) erzeugen.
// Wenn aber RowBytes<8 gilt, sind die Daten grundsaetzlich ungepackt,
@@ -1129,48 +1129,48 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize,
nPackType = 0;
// PixMap-Struktur schreiben:
- *pPict << (USHORT)(nDstRowBytes|0x8000) // Bytes pro Zeile und dass es eine 'PixMap' ist
- << (USHORT)0x0000 // Y1-Position der Bitmap in der Quelle
- << (USHORT)0x0000 // X1-Position der Bitmap in der Quelle
- << (USHORT)nHeight // Y2-Position der Bitmap in der Quelle
- << (USHORT)nWidth // X2-Position der Bitmap in der Quelle
- << (USHORT)0x0000 // Version
- << (USHORT)nPackType // Packing type
+ *pPict << (sal_uInt16)(nDstRowBytes|0x8000) // Bytes pro Zeile und dass es eine 'PixMap' ist
+ << (sal_uInt16)0x0000 // Y1-Position der Bitmap in der Quelle
+ << (sal_uInt16)0x0000 // X1-Position der Bitmap in der Quelle
+ << (sal_uInt16)nHeight // Y2-Position der Bitmap in der Quelle
+ << (sal_uInt16)nWidth // X2-Position der Bitmap in der Quelle
+ << (sal_uInt16)0x0000 // Version
+ << (sal_uInt16)nPackType // Packing type
<< (sal_uInt32) 0x00000000 // Packing size (?)
<< (sal_uInt32) 0x00480000 // H-Res
<< (sal_uInt32) 0x00480000 // V-Res
- << (USHORT)0x0000 // Pixel type (?)
- << (USHORT)nBitsPerPixel // Pixel size
- << (USHORT)0x0001 // CmpCount: 1 Komponente
- << (USHORT)nBitsPerPixel // CmpSize
+ << (sal_uInt16)0x0000 // Pixel type (?)
+ << (sal_uInt16)nBitsPerPixel // Pixel size
+ << (sal_uInt16)0x0001 // CmpCount: 1 Komponente
+ << (sal_uInt16)nBitsPerPixel // CmpSize
<< (sal_uInt32) 0x00000000 // PlaneBytes (?)
<< (sal_uInt32) 0x00000000 // (?)
<< (sal_uInt32) 0x00000000; // (?)
// Palette lesen und schreiben:
nColTabSize = pAcc->GetPaletteEntryCount();
- *pPict << (sal_uInt32)0 << (USHORT)0x8000 << (USHORT)( nColTabSize - 1 );
+ *pPict << (sal_uInt32)0 << (sal_uInt16)0x8000 << (sal_uInt16)( nColTabSize - 1 );
for ( i = 0; i < nColTabSize; i++ )
{
- nRed = (BYTE)pAcc->GetPaletteColor( (USHORT)i ).GetRed();
- nGreen = (BYTE)pAcc->GetPaletteColor( (USHORT)i ).GetGreen();
- nBlue = (BYTE)pAcc->GetPaletteColor( (USHORT)i ).GetBlue();
- *pPict << (UINT16)0 << nRed << nRed << nGreen << nGreen << nBlue << nBlue;
+ nRed = (sal_uInt8)pAcc->GetPaletteColor( (sal_uInt16)i ).GetRed();
+ nGreen = (sal_uInt8)pAcc->GetPaletteColor( (sal_uInt16)i ).GetGreen();
+ nBlue = (sal_uInt8)pAcc->GetPaletteColor( (sal_uInt16)i ).GetBlue();
+ *pPict << (sal_uInt16)0 << nRed << nRed << nGreen << nGreen << nBlue << nBlue;
}
// Source-Rectangle schreiben:
- *pPict << (USHORT)0 << (USHORT)0 << (USHORT)nHeight << (USHORT)nWidth;
+ *pPict << (sal_uInt16)0 << (sal_uInt16)0 << (sal_uInt16)nHeight << (sal_uInt16)nWidth;
// Destination-Rectangle schreiben:
WritePoint( rPoint );
WritePoint( Point( rPoint.X() + rSize.Width(), rPoint.Y() + rSize.Height() ) );
// Transfer mode schreiben:
- *pPict << (USHORT)0; // (?)
+ *pPict << (sal_uInt16)0; // (?)
// Speicher fuer eine Zeile allozieren:
- pPix = new BYTE[ nSrcRowBytes ];
+ pPix = new sal_uInt8[ nSrcRowBytes ];
// Position der Map-Daten in Ziel merken:
nDstMapPos=pPict->Tell();
@@ -1185,19 +1185,19 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize,
{
case 1 :
for ( pTemp = pPix, i = 0; i < nSrcRowBytes; i++ )
- *pTemp++ = (BYTE)0;
+ *pTemp++ = (sal_uInt8)0;
for ( i = 0; i < nWidth; i++ )
- pPix[ ( i >> 3 ) ] |= (BYTE)( pAcc->GetPixel( ny, i ) & 1 ) << ( ( i & 7 ) ^ 7 );
+ pPix[ ( i >> 3 ) ] |= (sal_uInt8)( pAcc->GetPixel( ny, i ) & 1 ) << ( ( i & 7 ) ^ 7 );
break;
case 4 :
for ( pTemp = pPix, i = 0; i < nSrcRowBytes; i++ )
- *pTemp++ = (BYTE)0;
+ *pTemp++ = (sal_uInt8)0;
for ( i = 0; i < nWidth; i++ )
- pPix[ ( i >> 1 ) ] |= (BYTE)( pAcc->GetPixel( ny, i ) & 15 ) << ( ( i & 1 ) << 2 ) ;
+ pPix[ ( i >> 1 ) ] |= (sal_uInt8)( pAcc->GetPixel( ny, i ) & 15 ) << ( ( i & 1 ) << 2 ) ;
break;
case 8 :
for ( i = 0; i < nWidth; i++ )
- pPix[ i ] = (BYTE)pAcc->GetPixel( ny, i );
+ pPix[ i ] = (sal_uInt8)pAcc->GetPixel( ny, i );
break;
}
@@ -1213,9 +1213,9 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize,
// ByteCount (das ist die Groesse der gepackten Zeile) zunaechst 0 (wird spaeter berichtigt):
if ( nDstRowBytes > 250 )
- *pPict << (USHORT)0;
+ *pPict << (sal_uInt16)0;
else
- *pPict << (BYTE)0;
+ *pPict << (sal_uInt8)0;
// Schleife ueber Bytes der Zeile:
nx=0;
@@ -1244,7 +1244,7 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize,
nCount = nEqu3 - nx;
if ( nCount > 128 )
nCount = 128;
- nFlagCounterByte = (BYTE)( nCount - 1 );
+ nFlagCounterByte = (sal_uInt8)( nCount - 1 );
*pPict << nFlagCounterByte;
do
{
@@ -1266,7 +1266,7 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize,
nCount++;
}
// nCount gleiche Bytes komprimiert schreiben:
- nFlagCounterByte = (BYTE)( 1 - (long)nCount );
+ nFlagCounterByte = (sal_uInt8)( 1 - (long)nCount );
*pPict << nFlagCounterByte << nEquData;
nx += nCount;
}
@@ -1276,9 +1276,9 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize,
nPos = pPict->Tell();
pPict->Seek( nDstRowPos );
if ( nDstRowBytes > 250 )
- *pPict << ( (USHORT)( nPos - nDstRowPos - 2 ) );
+ *pPict << ( (sal_uInt16)( nPos - nDstRowPos - 2 ) );
else
- *pPict << ( (BYTE)( nPos - nDstRowPos - 1 ) );
+ *pPict << ( (sal_uInt8)( nPos - nDstRowPos - 1 ) );
pPict->Seek( nPos );
}
@@ -1286,7 +1286,7 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize,
nActBitmapPercent =( ny * 70 / nHeight ) + 30; // (30% machten schon das Schreiben der Win-BMP-Datei aus)
MayCallback();
if ( pPict->GetError() )
- bStatus = FALSE;
+ bStatus = sal_False;
}
// Aufraeumen:
delete[] pPix;
@@ -1294,7 +1294,7 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize,
// Map-Daten muessen gerade Anzahl von Bytes sein:
if ( ( ( pPict->Tell() - nDstMapPos ) & 1 ) != 0 )
- *pPict << (BYTE)0;
+ *pPict << (sal_uInt8)0;
// Bitmaps zaehlen:
nWrittenBitmaps++;
@@ -1305,7 +1305,7 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize,
void PictWriter::WriteOpcode_EndOfFile()
{
- *pPict << (USHORT)0x00ff;
+ *pPict << (sal_uInt16)0x00ff;
}
@@ -1331,9 +1331,9 @@ void PictWriter::SetAttrForText()
{
WriteOpcode_RGBFgCol(aSrcFont.GetColor());
WriteOpcode_RGBBkCol(aSrcFont.GetFillColor());
- WriteOpcode_PnLinePat(TRUE);
+ WriteOpcode_PnLinePat(sal_True);
WriteOpcode_FontName(aSrcFont);
- WriteOpcode_TxSize((USHORT)(aSrcFont.GetSize().Height()));
+ WriteOpcode_TxSize((sal_uInt16)(aSrcFont.GetSize().Height()));
WriteOpcode_TxMode(eSrcRasterOp);
WriteOpcode_TxFace(aSrcFont);
}
@@ -1341,16 +1341,16 @@ void PictWriter::SetAttrForText()
void PictWriter::WriteTextArray(Point & rPoint, const String& rString, const sal_Int32 * pDXAry)
{
- USHORT i,nLen;
+ sal_uInt16 i,nLen;
sal_Unicode c;
- BOOL bDelta;
+ sal_Bool bDelta;
Point aPt;
if ( pDXAry == NULL )
- WriteOpcode_Text( rPoint, rString, FALSE );
+ WriteOpcode_Text( rPoint, rString, sal_False );
else
{
- bDelta = FALSE;
+ bDelta = sal_False;
nLen = rString.Len();
for ( i = 0; i < nLen; i++ )
{
@@ -1362,7 +1362,7 @@ void PictWriter::WriteTextArray(Point & rPoint, const String& rString, const sal
aPt.X() += pDXAry[ i - 1 ];
WriteOpcode_Text( aPt, String( c ), bDelta );
- bDelta = TRUE;
+ bDelta = sal_True;
}
}
}
@@ -1430,7 +1430,7 @@ void PictWriter::HandleLineInfoPolyPolygons(const LineInfo& rInfo, const basegfx
void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF )
{
- ULONG nA, nACount;
+ sal_uLong nA, nACount;
const MetaAction* pMA;
if( !bStatus)
@@ -1450,7 +1450,7 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF )
WriteOpcode_PnMode(eSrcRasterOp);
WriteOpcode_PnSize(1);
WriteOpcode_RGBFgCol(pA->GetColor());
- WriteOpcode_PnLinePat(TRUE);
+ WriteOpcode_PnLinePat(sal_True);
WriteOpcode_Line(pA->GetPoint(),pA->GetPoint());
}
break;
@@ -1648,7 +1648,7 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF )
else
aSimplePoly = rPoly;
- const USHORT nSize = aSimplePoly.GetSize();
+ const sal_uInt16 nSize = aSimplePoly.GetSize();
Point aLast;
if ( nSize )
@@ -1656,7 +1656,7 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF )
SetAttrForFrame();
aLast = aSimplePoly[0];
- for ( USHORT i = 1; i < nSize; i++ )
+ for ( sal_uInt16 i = 1; i < nSize; i++ )
{
WriteOpcode_Line( aLast, aSimplePoly[i] );
aLast = aSimplePoly[i];
@@ -1722,7 +1722,7 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF )
if (aLineColor!=Color( COL_TRANSPARENT ))
{
- USHORT nCount,i;
+ sal_uInt16 nCount,i;
SetAttrForFrame();
nCount = aSimplePolyPoly.Count();
for ( i = 0; i < nCount; i++ )
@@ -1748,7 +1748,7 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF )
SetAttrForText();
String aStr( pA->GetText(),pA->GetIndex(),pA->GetLen() );
- WriteOpcode_Text( aPt, aStr, FALSE );
+ WriteOpcode_Text( aPt, aStr, sal_False );
}
break;
@@ -1780,7 +1780,7 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF )
VirtualDevice aVirDev;
sal_Int32* pDXAry = new sal_Int32[ aStr.Len() ];
sal_Int32 nNormSize( aVirDev.GetTextArray( aStr,pDXAry ) );
- USHORT i;
+ sal_uInt16 i;
if (aSrcFont.GetAlign()!=ALIGN_BASELINE)
{
@@ -1862,8 +1862,8 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF )
const MetaEPSAction* pA = (const MetaEPSAction*)pMA;
const GDIMetaFile aGDIMetaFile( pA->GetSubstitute() );
- INT32 nCount = aGDIMetaFile.GetActionCount();
- for ( INT32 i = 0; i < nCount; i++ )
+ sal_Int32 nCount = aGDIMetaFile.GetActionCount();
+ for ( sal_Int32 i = 0; i < nCount; i++ )
{
const MetaAction* pMetaAct = aGDIMetaFile.GetAction( i );
if ( pMetaAct->GetType() == META_BMPSCALE_ACTION )
@@ -2117,7 +2117,7 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF )
if (aLineColor!=Color( COL_TRANSPARENT ))
{
SetAttrForFrame();
- for( USHORT i = 0, nCount = rPolyPoly.Count(); i < nCount; i++ )
+ for( sal_uInt16 i = 0, nCount = rPolyPoly.Count(); i < nCount; i++ )
WriteOpcode_Poly( PDM_FRAME, rPolyPoly.GetObject( i ) );
}
}
@@ -2156,9 +2156,9 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF )
MayCallback();
if (pPict->GetError())
- bStatus=FALSE;
+ bStatus=sal_False;
- if (bStatus==FALSE)
+ if (bStatus==sal_False)
break;
}
}
@@ -2166,7 +2166,7 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF )
void PictWriter::WriteHeader(const GDIMetaFile & rMTF)
{
- USHORT i;
+ sal_uInt16 i;
Size aSize( rMTF.GetPrefSize() );
Point aPoint;
Rectangle aRect( aPoint, aSize );
@@ -2175,7 +2175,7 @@ void PictWriter::WriteHeader(const GDIMetaFile & rMTF)
for (i=0;i<128;i++) *pPict << (sal_uInt32)0;
// Lo-16-Bits der Groesse der Datei ohne die 512 Bytes Muell:
- *pPict << (USHORT)0; // wird spaeter durch UpdateHeader() berichtigt
+ *pPict << (sal_uInt16)0; // wird spaeter durch UpdateHeader() berichtigt
// Das Bounding-Rectangle (y1,x1,y2,x2 !):
WriteRectangle( aRect );
@@ -2184,9 +2184,9 @@ void PictWriter::WriteHeader(const GDIMetaFile & rMTF)
*pPict << (sal_uInt32)0x001102ff;
// Extended-Version-2-Header:
- *pPict << (USHORT)0x0c00 // Opcode
- << (USHORT)0xfffe // Version (?)
- << (USHORT)0x0000 // Reserved
+ *pPict << (sal_uInt16)0x0c00 // Opcode
+ << (sal_uInt16)0xfffe // Version (?)
+ << (sal_uInt16)0x0000 // Reserved
<< (sal_uInt32) 0x00480000 // hRes
<< (sal_uInt32) 0x00480000;
WriteRectangle( aRect );
@@ -2201,23 +2201,23 @@ void PictWriter::WriteHeader(const GDIMetaFile & rMTF)
void PictWriter::UpdateHeader()
{
- ULONG nPos;
+ sal_uLong nPos;
// Lo-16-Bits der Groesse der Datei ohne die 512 Bytes Muell berichtigen:
nPos=pPict->Tell();
pPict->Seek(512);
- *pPict << (USHORT)((nPos-512)&0x0000ffff);
+ *pPict << (sal_uInt16)((nPos-512)&0x0000ffff);
pPict->Seek(nPos);
}
-BOOL PictWriter::WritePict(const GDIMetaFile & rMTF, SvStream & rTargetStream, FilterConfigItem* pFilterConfigItem )
+sal_Bool PictWriter::WritePict(const GDIMetaFile & rMTF, SvStream & rTargetStream, FilterConfigItem* pFilterConfigItem )
{
PictWriterAttrStackMember* pAt;
MapMode aMap72( MAP_INCH );
Fraction aDPIFrac( 1, 72 );
- bStatus=TRUE;
+ bStatus=sal_True;
nLastPercent=0;
if ( pFilterConfigItem )
@@ -2245,19 +2245,19 @@ BOOL PictWriter::WritePict(const GDIMetaFile & rMTF, SvStream & rTargetStream, F
pAttrStack=NULL;
- bDstBkPatValid=FALSE;
- bDstTxFaceValid=FALSE;
- bDstTxModeValid=FALSE;
- bDstPnSizeValid=FALSE;
- bDstPnModeValid=FALSE;
- bDstPnPatValid=FALSE;
- bDstFillPatValid=FALSE;
- bDstTxSizeValid=FALSE;
- bDstFgColValid=FALSE;
- bDstBkColValid=FALSE;
- bDstPenPositionValid=FALSE;
- bDstTextPositionValid=FALSE;
- bDstFontNameValid=FALSE;
+ bDstBkPatValid=sal_False;
+ bDstTxFaceValid=sal_False;
+ bDstTxModeValid=sal_False;
+ bDstPnSizeValid=sal_False;
+ bDstPnModeValid=sal_False;
+ bDstPnPatValid=sal_False;
+ bDstFillPatValid=sal_False;
+ bDstTxSizeValid=sal_False;
+ bDstFgColValid=sal_False;
+ bDstBkColValid=sal_False;
+ bDstPenPositionValid=sal_False;
+ bDstTextPositionValid=sal_False;
+ bDstFontNameValid=sal_False;
nNumberOfActions=0;
nNumberOfBitmaps=0;
@@ -2286,7 +2286,7 @@ BOOL PictWriter::WritePict(const GDIMetaFile & rMTF, SvStream & rTargetStream, F
//================== GraphicExport - die exportierte Funktion ================
-extern "C" BOOL __LOADONCALLAPI GraphicExport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem* pFilterConfigItem, BOOL)
+extern "C" sal_Bool __LOADONCALLAPI GraphicExport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem* pFilterConfigItem, sal_Bool)
{
PictWriter aPictWriter;
diff --git a/filter/source/graphicfilter/eppm/eppm.cxx b/filter/source/graphicfilter/eppm/eppm.cxx
index 856b2abf352b..650d60374571 100644
--- a/filter/source/graphicfilter/eppm/eppm.cxx
+++ b/filter/source/graphicfilter/eppm/eppm.cxx
@@ -43,14 +43,14 @@ class PPMWriter {
private:
SvStream* mpOStm; // Die auszugebende PPM-Datei
- USHORT mpOStmOldModus;
+ sal_uInt16 mpOStmOldModus;
- BOOL mbStatus;
+ sal_Bool mbStatus;
sal_Int32 mnMode;
BitmapReadAccess* mpAcc;
- ULONG mnWidth, mnHeight; // Bildausmass in Pixeln
+ sal_uLong mnWidth, mnHeight; // Bildausmass in Pixeln
- BOOL ImplWriteHeader();
+ sal_Bool ImplWriteHeader();
void ImplWriteBody();
void ImplWriteNumber( sal_Int32 );
@@ -60,13 +60,13 @@ public:
PPMWriter();
~PPMWriter();
- BOOL WritePPM( const Graphic& rGraphic, SvStream& rPPM, FilterConfigItem* pFilterConfigItem );
+ sal_Bool WritePPM( const Graphic& rGraphic, SvStream& rPPM, FilterConfigItem* pFilterConfigItem );
};
//=================== Methoden von PPMWriter ==============================
PPMWriter::PPMWriter() :
- mbStatus ( TRUE ),
+ mbStatus ( sal_True ),
mpAcc ( NULL )
{
}
@@ -79,7 +79,7 @@ PPMWriter::~PPMWriter()
// ------------------------------------------------------------------------
-BOOL PPMWriter::WritePPM( const Graphic& rGraphic, SvStream& rPPM, FilterConfigItem* pFilterConfigItem )
+sal_Bool PPMWriter::WritePPM( const Graphic& rGraphic, SvStream& rPPM, FilterConfigItem* pFilterConfigItem )
{
mpOStm = &rPPM;
@@ -113,7 +113,7 @@ BOOL PPMWriter::WritePPM( const Graphic& rGraphic, SvStream& rPPM, FilterConfigI
aBmp.ReleaseAccess( mpAcc );
}
else
- mbStatus = FALSE;
+ mbStatus = sal_False;
mpOStm->SetNumberFormatInt( mpOStmOldModus );
@@ -125,7 +125,7 @@ BOOL PPMWriter::WritePPM( const Graphic& rGraphic, SvStream& rPPM, FilterConfigI
// ------------------------------------------------------------------------
-BOOL PPMWriter::ImplWriteHeader()
+sal_Bool PPMWriter::ImplWriteHeader()
{
mnWidth = mpAcc->Width();
mnHeight = mpAcc->Height();
@@ -137,14 +137,14 @@ BOOL PPMWriter::ImplWriteHeader()
*mpOStm << "P3\x0a";
ImplWriteNumber( mnWidth );
- *mpOStm << (BYTE)32;
+ *mpOStm << (sal_uInt8)32;
ImplWriteNumber( mnHeight );
- *mpOStm << (BYTE)32;
+ *mpOStm << (sal_uInt8)32;
ImplWriteNumber( 255 ); // max. col.
- *mpOStm << (BYTE)10;
+ *mpOStm << (sal_uInt8)10;
}
else
- mbStatus = FALSE;
+ mbStatus = sal_False;
return mbStatus;
}
@@ -155,9 +155,9 @@ void PPMWriter::ImplWriteBody()
{
if ( mnMode == 0 )
{
- for ( ULONG y = 0; y < mnHeight; y++ )
+ for ( sal_uLong y = 0; y < mnHeight; y++ )
{
- for ( ULONG x = 0; x < mnWidth; x++ )
+ for ( sal_uLong x = 0; x < mnWidth; x++ )
{
const BitmapColor& rColor = mpAcc->GetPixel( y, x );
*mpOStm << rColor.GetRed();
@@ -168,16 +168,16 @@ void PPMWriter::ImplWriteBody()
}
else
{
- for ( ULONG y = 0; y < mnHeight; y++ )
+ for ( sal_uLong y = 0; y < mnHeight; y++ )
{
int nCount = 70;
- for ( ULONG x = 0; x < mnWidth; x++ )
+ for ( sal_uLong x = 0; x < mnWidth; x++ )
{
- BYTE i, nDat[3], nNumb;
+ sal_uInt8 i, nDat[3], nNumb;
if ( nCount < 0 )
{
nCount = 69;
- *mpOStm << (BYTE)10;
+ *mpOStm << (sal_uInt8)10;
}
nDat[0] = mpAcc->GetPixel( y, x ).GetRed();
nDat[1] = mpAcc->GetPixel( y, x ).GetGreen();
@@ -187,12 +187,12 @@ void PPMWriter::ImplWriteBody()
nNumb = nDat[ i ] / 100;
if ( nNumb )
{
- *mpOStm << (BYTE)( nNumb + '0' );
+ *mpOStm << (sal_uInt8)( nNumb + '0' );
nDat[ i ] -= ( nNumb * 100 );
nNumb = nDat[ i ] / 10;
- *mpOStm << (BYTE)( nNumb + '0' );
+ *mpOStm << (sal_uInt8)( nNumb + '0' );
nDat[ i ] -= ( nNumb * 10 );
- *mpOStm << (BYTE)( nDat[ i ] + '0' );
+ *mpOStm << (sal_uInt8)( nDat[ i ] + '0' );
nCount -= 4;
}
else
@@ -200,21 +200,21 @@ void PPMWriter::ImplWriteBody()
nNumb = nDat[ i ] / 10;
if ( nNumb )
{
- *mpOStm << (BYTE)( nNumb + '0' );
+ *mpOStm << (sal_uInt8)( nNumb + '0' );
nDat[ i ] -= ( nNumb * 10 );
- *mpOStm << (BYTE)( nDat[ i ] + '0' );
+ *mpOStm << (sal_uInt8)( nDat[ i ] + '0' );
nCount -= 3;
}
else
{
- *mpOStm << (BYTE)( nDat[ i ] + '0' );
+ *mpOStm << (sal_uInt8)( nDat[ i ] + '0' );
nCount -= 2;
}
}
- *mpOStm << (BYTE)' ';
+ *mpOStm << (sal_uInt8)' ';
}
}
- *mpOStm << (BYTE)10;
+ *mpOStm << (sal_uInt8)10;
}
}
}
@@ -237,7 +237,7 @@ void PPMWriter::ImplWriteNumber( sal_Int32 nNumber )
// - exported function -
// ---------------------
-extern "C" BOOL __LOADONCALLAPI GraphicExport( SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pFilterConfigItem, BOOL )
+extern "C" sal_Bool __LOADONCALLAPI GraphicExport( SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pFilterConfigItem, sal_Bool )
{
PPMWriter aPPMWriter;
return aPPMWriter.WritePPM( rGraphic, rStream, pFilterConfigItem );
diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx
index 7c3a26844bc6..e9a00bc4df0c 100644
--- a/filter/source/graphicfilter/eps/eps.cxx
+++ b/filter/source/graphicfilter/eps/eps.cxx
@@ -69,7 +69,7 @@
struct ChrSet
{
struct ChrSet * pSucc;
- BYTE nSet;
+ sal_uInt8 nSet;
String aName;
FontWeight eWeight;
};
@@ -78,12 +78,12 @@ struct StackMember
{
struct StackMember * pSucc;
Color aGlobalCol;
- BOOL bLineCol;
+ sal_Bool bLineCol;
Color aLineCol;
- BOOL bFillCol;
+ sal_Bool bFillCol;
Color aFillCol;
Color aTextCol;
- BOOL bTextFillCol;
+ sal_Bool bTextFillCol;
Color aTextFillCol;
Color aBackgroundCol;
Font aFont;
@@ -101,17 +101,17 @@ struct PSLZWCTreeNode
PSLZWCTreeNode* pBrother; // naechster Knoten, der den selben Vater hat
PSLZWCTreeNode* pFirstChild; // erster Sohn
- USHORT nCode; // Der Code fuer den String von Pixelwerten, der sich ergibt, wenn
- USHORT nValue; // Der Pixelwert
+ sal_uInt16 nCode; // Der Code fuer den String von Pixelwerten, der sich ergibt, wenn
+ sal_uInt16 nValue; // Der Pixelwert
};
class PSWriter
{
private:
- BOOL mbStatus;
- ULONG mnLevelWarning; // number of embedded eps files which was not exported
- ULONG mnLastPercent; // Mit welcher Zahl pCallback zuletzt aufgerufen wurde.
- UINT32 mnLatestPush; // offset auf streamposition, an der zuletzt gepusht wurde
+ sal_Bool mbStatus;
+ sal_uLong mnLevelWarning; // number of embedded eps files which was not exported
+ sal_uLong mnLastPercent; // Mit welcher Zahl pCallback zuletzt aufgerufen wurde.
+ sal_uInt32 mnLatestPush; // offset auf streamposition, an der zuletzt gepusht wurde
long mnLevel; // dialog options
sal_Bool mbGrayScale;
@@ -130,17 +130,17 @@ private:
double nBoundingY2;
//
StackMember* pGDIStack;
- ULONG mnCursorPos; // aktuelle Cursorposition im Output
+ sal_uLong mnCursorPos; // aktuelle Cursorposition im Output
Color aColor; // aktuelle Farbe die fuer den Output benutzt wird
- BOOL bLineColor;
+ sal_Bool bLineColor;
Color aLineColor; // aktuelle GDIMetafile Farbeinstellungen
- BOOL bFillColor; //
+ sal_Bool bFillColor; //
Color aFillColor; //
Color aTextColor; //
- BOOL bTextFillColor; //
+ sal_Bool bTextFillColor; //
Color aTextFillColor; //
Color aBackgroundColor; //
- BOOL bRegionChanged;
+ sal_Bool bRegionChanged;
TextAlign eTextAlign; //
double fLineWidth;
@@ -151,19 +151,19 @@ private:
Font maFont;
Font maLastFont;
- BYTE nChrSet;
+ sal_uInt8 nChrSet;
ChrSet* pChrSetList; // Liste der Character-Sets
- BYTE nNextChrSetId; // die erste unbenutzte ChrSet-Id
+ sal_uInt8 nNextChrSetId; // die erste unbenutzte ChrSet-Id
PSLZWCTreeNode* pTable; // LZW compression data
PSLZWCTreeNode* pPrefix; // the compression is as same as the TIFF compression
- USHORT nDataSize;
- USHORT nClearCode;
- USHORT nEOICode;
- USHORT nTableSize;
- USHORT nCodeSize;
- ULONG nOffset;
- ULONG dwShift;
+ sal_uInt16 nDataSize;
+ sal_uInt16 nClearCode;
+ sal_uInt16 nEOICode;
+ sal_uInt16 nTableSize;
+ sal_uInt16 nCodeSize;
+ sal_uLong nOffset;
+ sal_uLong dwShift;
com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator > xStatusIndicator;
@@ -173,28 +173,28 @@ private:
// this method makes LF's, space inserting and word wrapping as used in all nMode
// parameters
- inline void ImplExecMode( ULONG nMode );
+ inline void ImplExecMode( sal_uLong nMode );
// writes char[] + LF to stream
- inline void ImplWriteLine( const char*, ULONG nMode = PS_RET );
+ inline void ImplWriteLine( const char*, sal_uLong nMode = PS_RET );
// writes ( nNumb / 10^nCount ) in ASCII format to stream
- void ImplWriteF( sal_Int32 nNumb, ULONG nCount = 3, ULONG nMode = PS_SPACE );
+ void ImplWriteF( sal_Int32 nNumb, sal_uLong nCount = 3, sal_uLong nMode = PS_SPACE );
// writes a double in ASCII format to stream
- void ImplWriteDouble( double, ULONG nMode = PS_SPACE );
+ void ImplWriteDouble( double, sal_uLong nMode = PS_SPACE );
// writes a long in ASCII format to stream
- void ImplWriteLong( sal_Int32 nNumb, ULONG nMode = PS_SPACE );
+ void ImplWriteLong( sal_Int32 nNumb, sal_uLong nMode = PS_SPACE );
// writes a byte in ASCII format to stream
- void ImplWriteByte( BYTE nNumb, ULONG nMode = PS_SPACE );
+ void ImplWriteByte( sal_uInt8 nNumb, sal_uLong nMode = PS_SPACE );
// writes a byte in ASCII (hex) format to stream
- void ImplWriteHexByte( BYTE nNumb, ULONG nMode = PS_WRAP );
+ void ImplWriteHexByte( sal_uInt8 nNumb, sal_uLong nMode = PS_WRAP );
// writes nNumb as number from 0.000 till 1.000 in ASCII format to stream
- void ImplWriteB1( BYTE nNumb, ULONG nMode = PS_SPACE );
+ void ImplWriteB1( sal_uInt8 nNumb, sal_uLong nMode = PS_SPACE );
inline void ImplWritePoint( const Point&, sal_uInt32 nMode = PS_SPACE );
void ImplMoveTo( const Point&, sal_uInt32 nMode = PS_SPACE );
@@ -217,33 +217,33 @@ private:
void ImplSetClipRegion( Region& rRegion );
void ImplBmp( Bitmap*, Bitmap*, const Point &, double nWidth, double nHeight );
- void ImplText( const String& rUniString, const Point& rPos, const INT32* pDXArry, sal_Int32 nWidth, VirtualDevice& rVDev );
+ void ImplText( const String& rUniString, const Point& rPos, const sal_Int32* pDXArry, sal_Int32 nWidth, VirtualDevice& rVDev );
void ImplSetAttrForText( const Point & rPoint );
void ImplWriteCharacter( sal_Char );
- void ImplWriteString( const ByteString&, VirtualDevice& rVDev, const INT32* pDXArry = NULL, BOOL bStretch = FALSE );
+ void ImplWriteString( const ByteString&, VirtualDevice& rVDev, const sal_Int32* pDXArry = NULL, sal_Bool bStretch = sal_False );
void ImplDefineFont( const char*, const char* );
- void ImplClosePathDraw( ULONG nMode = PS_RET );
+ void ImplClosePathDraw( sal_uLong nMode = PS_RET );
void ImplPathDraw();
- inline void ImplWriteLineColor( ULONG nMode = PS_RET );
- inline void ImplWriteFillColor( ULONG nMode = PS_RET );
- inline void ImplWriteTextColor( ULONG nMode = PS_RET );
- inline void ImplWriteTextFillColor( ULONG nMode = PS_RET );
- void ImplWriteColor( ULONG nMode );
+ inline void ImplWriteLineColor( sal_uLong nMode = PS_RET );
+ inline void ImplWriteFillColor( sal_uLong nMode = PS_RET );
+ inline void ImplWriteTextColor( sal_uLong nMode = PS_RET );
+ inline void ImplWriteTextFillColor( sal_uLong nMode = PS_RET );
+ void ImplWriteColor( sal_uLong nMode );
double ImplGetScaling( const MapMode& );
void ImplGetMapMode( const MapMode& );
- BOOL ImplGetBoundingBox( double* nNumb, BYTE* pSource, ULONG nSize );
- BYTE* ImplSearchEntry( BYTE* pSource, BYTE* pDest, ULONG nComp, ULONG nSize );
+ sal_Bool ImplGetBoundingBox( double* nNumb, sal_uInt8* pSource, sal_uLong nSize );
+ sal_uInt8* ImplSearchEntry( sal_uInt8* pSource, sal_uInt8* pDest, sal_uLong nComp, sal_uLong nSize );
// LZW methods
void StartCompression();
- void Compress( BYTE nSrc );
+ void Compress( sal_uInt8 nSrc );
void EndCompression();
- inline void WriteBits( USHORT nCode, USHORT nCodeLen );
+ inline void WriteBits( sal_uInt16 nCode, sal_uInt16 nCodeLen );
public:
- BOOL WritePS( const Graphic& rGraphic, SvStream& rTargetStream, FilterConfigItem* );
+ sal_Bool WritePS( const Graphic& rGraphic, SvStream& rTargetStream, FilterConfigItem* );
PSWriter();
~PSWriter();
};
@@ -265,11 +265,11 @@ PSWriter::~PSWriter()
//---------------------------------------------------------------------------------
-BOOL PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, FilterConfigItem* pFilterConfigItem )
+sal_Bool PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, FilterConfigItem* pFilterConfigItem )
{
- UINT32 nStreamPosition = 0, nPSPosition = 0; // -Wall warning, unset, check
+ sal_uInt32 nStreamPosition = 0, nPSPosition = 0; // -Wall warning, unset, check
- mbStatus = TRUE;
+ mbStatus = sal_True;
mnPreview = 0;
mnLevelWarning = 0;
mnLastPercent = 0;
@@ -290,8 +290,8 @@ BOOL PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, Filter
// default values for the dialog options
mnLevel = 2;
- mbGrayScale = FALSE;
- mbCompression = TRUE;
+ mbGrayScale = sal_False;
+ mbCompression = sal_True;
mnTextMode = 0; // default0 : export glyph outlines
// try to get the dialog selection
@@ -325,18 +325,18 @@ BOOL PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, Filter
// compression is not available for Level 1
if ( mnLevel == 1 )
{
- mbGrayScale = TRUE;
- mbCompression = FALSE;
+ mbGrayScale = sal_True;
+ mbCompression = sal_False;
}
if ( mnPreview & EPS_PREVIEW_TIFF )
{
- rTargetStream << (UINT32)0xC6D3D0C5;
+ rTargetStream << (sal_uInt32)0xC6D3D0C5;
nStreamPosition = rTargetStream.Tell();
- rTargetStream << (UINT32)0 << (UINT32)0 << (UINT32)0 << (UINT32)0
- << nStreamPosition + 26 << (UINT32)0 << (UINT16)0xffff;
+ rTargetStream << (sal_uInt32)0 << (sal_uInt32)0 << (sal_uInt32)0 << (sal_uInt32)0
+ << nStreamPosition + 26 << (sal_uInt32)0 << (sal_uInt16)0xffff;
- UINT32 nErrCode;
+ sal_uInt32 nErrCode;
if ( mbGrayScale )
{
BitmapEx aTempBitmapEx( rGraphic.GetBitmapEx() );
@@ -376,11 +376,11 @@ BOOL PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, Filter
pGDIStack = NULL;
aColor = Color( COL_TRANSPARENT );
- bLineColor = TRUE;
+ bLineColor = sal_True;
aLineColor = Color( COL_BLACK );
- bFillColor = TRUE;
+ bFillColor = sal_True;
aFillColor = Color( COL_WHITE );
- bTextFillColor = TRUE;
+ bTextFillColor = sal_True;
aTextFillColor = Color( COL_BLACK );
fLineWidth = 1;
fMiterLimit = 15; // use same limit as most graphic systems and basegfx
@@ -388,7 +388,7 @@ BOOL PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, Filter
eJoinType = SvtGraphicStroke::joinMiter;
aBackgroundColor = Color( COL_WHITE );
eTextAlign = ALIGN_BASELINE;
- bRegionChanged = FALSE;
+ bRegionChanged = sal_False;
nChrSet = 0x00;
pChrSetList = NULL;
@@ -402,7 +402,7 @@ BOOL PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, Filter
ImplWriteEpilog();
if ( mnPreview & EPS_PREVIEW_TIFF )
{
- UINT32 nPosition = rTargetStream.Tell();
+ sal_uInt32 nPosition = rTargetStream.Tell();
rTargetStream.Seek( nStreamPosition );
rTargetStream << nPSPosition;
rTargetStream << nPosition - nPSPosition;
@@ -422,7 +422,7 @@ BOOL PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, Filter
}
}
else
- mbStatus = FALSE;
+ mbStatus = sal_False;
if ( mbStatus && mnLevelWarning && pFilterConfigItem )
{
@@ -480,13 +480,13 @@ void PSWriter::ImplWriteProlog( const Graphic* pPreview )
ImplWriteLong( aSizeBitmap.Width() );
ImplWriteLong( aSizeBitmap.Height() );
*mpPS << "1 ";
- INT32 nLines = aSizeBitmap.Width() / 312;
+ sal_Int32 nLines = aSizeBitmap.Width() / 312;
if ( ( nLines * 312 ) != aSizeBitmap.Width() )
nLines++;
nLines *= aSizeBitmap.Height();
ImplWriteLong( nLines );
char nVal;
- INT32 nX, nY, nCount2, nCount = 4;
+ sal_Int32 nX, nY, nCount2, nCount = 4;
const BitmapColor aBlack( pAcc->GetBestMatchingColor( Color( COL_BLACK ) ) );
for ( nY = 0; nY < aSizeBitmap.Height(); nY++ )
{
@@ -600,7 +600,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
{
PolyPolygon aFillPath;
- for( ULONG nCurAction = 0, nCount = rMtf.GetActionCount(); nCurAction < nCount; nCurAction++ )
+ for( sal_uLong nCurAction = 0, nCount = rMtf.GetActionCount(); nCurAction < nCount; nCurAction++ )
{
MetaAction* pMA = rMtf.GetAction( nCurAction );
@@ -976,11 +976,11 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
{
if ( ( (const MetaLineColorAction*) pMA)->IsSetting() )
{
- bLineColor = TRUE;
+ bLineColor = sal_True;
aLineColor = ( (const MetaLineColorAction*) pMA )->GetColor();
}
else
- bLineColor = FALSE;
+ bLineColor = sal_False;
}
break;
@@ -988,11 +988,11 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
{
if ( ( (const MetaFillColorAction*) pMA )->IsSetting() )
{
- bFillColor = TRUE;
+ bFillColor = sal_True;
aFillColor = ( (const MetaFillColorAction*) pMA )->GetColor();
}
else
- bFillColor = FALSE;
+ bFillColor = sal_False;
}
break;
@@ -1006,11 +1006,11 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
{
if ( ( (const MetaTextFillColorAction*) pMA )->IsSetting() )
{
- bTextFillColor = TRUE;
+ bTextFillColor = sal_True;
aTextFillColor = ( (const MetaTextFillColorAction*) pMA )->GetColor();
}
else
- bTextFillColor = FALSE;
+ bTextFillColor = sal_False;
}
break;
@@ -1055,7 +1055,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
pGS->bTextFillCol = bTextFillColor;
pGS->aTextFillCol = aTextFillColor;
pGS->aBackgroundCol = aBackgroundColor;
- bRegionChanged = FALSE;
+ bRegionChanged = sal_False;
pGS->aFont = maFont;
mnLatestPush = mpPS->Tell();
ImplWriteLine( "gs" );
@@ -1106,10 +1106,10 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
GfxLink aGfxLink = ( (const MetaEPSAction*) pMA )->GetLink();
const GDIMetaFile aSubstitute( ( ( const MetaEPSAction*) pMA )->GetSubstitute() );
- BOOL bLevelConflict = FALSE;
- BYTE* pSource = (BYTE*) aGfxLink.GetData();
- ULONG nSize = aGfxLink.GetDataSize();
- ULONG nParseThis = POSTSCRIPT_BOUNDINGSEARCH;
+ sal_Bool bLevelConflict = sal_False;
+ sal_uInt8* pSource = (sal_uInt8*) aGfxLink.GetData();
+ sal_uLong nSize = aGfxLink.GetDataSize();
+ sal_uLong nParseThis = POSTSCRIPT_BOUNDINGSEARCH;
if ( nSize < 64 ) // assuming eps is larger than 64 bytes
pSource = NULL;
if ( nParseThis > nSize )
@@ -1117,10 +1117,10 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
if ( pSource && ( mnLevel == 1 ) )
{
- BYTE* pFound = ImplSearchEntry( pSource, (BYTE*)"%%LanguageLevel:", nParseThis - 10, 16 );
+ sal_uInt8* pFound = ImplSearchEntry( pSource, (sal_uInt8*)"%%LanguageLevel:", nParseThis - 10, 16 );
if ( pFound )
{
- BYTE k, i = 10;
+ sal_uInt8 k, i = 10;
pFound += 16;
while ( --i )
{
@@ -1129,7 +1129,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
{
if ( k != '1' )
{
- bLevelConflict = TRUE;
+ bLevelConflict = sal_True;
mnLevelWarning++;
}
break;
@@ -1232,7 +1232,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
}
else
{
- const BYTE* pData = pA->GetData();
+ const sal_uInt8* pData = pA->GetData();
if ( pData )
{
SvMemoryStream aMemStm( (void*)pData, pA->GetDataSize(), STREAM_READ );
@@ -1481,7 +1481,7 @@ void PSWriter::ImplRect( const Rectangle & rRect )
*mpPS << "neg 0 rl ";
ImplClosePathDraw();
}
- *mpPS << (BYTE)10;
+ *mpPS << (sal_uInt8)10;
mnCursorPos = 0;
}
@@ -1509,8 +1509,8 @@ void PSWriter::ImplRectFill( const Rectangle & rRect )
void PSWriter::ImplAddPath( const Polygon & rPolygon )
{
- USHORT i = 1;
- USHORT nPointCount = rPolygon.GetSize();
+ sal_uInt16 i = 1;
+ sal_uInt16 nPointCount = rPolygon.GetSize();
if ( nPointCount > 1 )
{
ImplMoveTo( rPolygon.GetPoint( 0 ) );
@@ -1685,8 +1685,8 @@ void PSWriter::ImplBmp( Bitmap* pBitmap, Bitmap* pMaskBitmap, const Point & rPoi
if ( !pBitmap )
return;
- INT32 nHeightOrg = pBitmap->GetSizePixel().Height();
- INT32 nHeightLeft = nHeightOrg;
+ sal_Int32 nHeightOrg = pBitmap->GetSizePixel().Height();
+ sal_Int32 nHeightLeft = nHeightOrg;
long nWidth = pBitmap->GetSizePixel().Width();
Point aSourcePos( rPoint );
@@ -1696,15 +1696,15 @@ void PSWriter::ImplBmp( Bitmap* pBitmap, Bitmap* pMaskBitmap, const Point & rPoi
long nHeight = nHeightLeft;
double nYHeight = nYHeightOrg;
- BOOL bDoTrans = FALSE;
+ sal_Bool bDoTrans = sal_False;
Rectangle aRect;
Region aRegion;
if ( pMaskBitmap )
{
- bDoTrans = TRUE;
- while (TRUE)
+ bDoTrans = sal_True;
+ while (sal_True)
{
if ( mnLevel == 1 )
{
@@ -1783,10 +1783,10 @@ void PSWriter::ImplBmp( Bitmap* pBitmap, Bitmap* pMaskBitmap, const Point & rPoi
{
for ( long x = 0; x < nWidth; x++ )
{
- ImplWriteHexByte( (BYTE)pAcc->GetPixel( y, x ) );
+ ImplWriteHexByte( (sal_uInt8)pAcc->GetPixel( y, x ) );
}
}
- *mpPS << (BYTE)10;
+ *mpPS << (sal_uInt8)10;
}
else // Level 2
{
@@ -1821,7 +1821,7 @@ void PSWriter::ImplBmp( Bitmap* pBitmap, Bitmap* pMaskBitmap, const Point & rPoi
{
for ( long x = 0; x < nWidth; x++ )
{
- Compress( (BYTE)pAcc->GetPixel( y, x ) );
+ Compress( (sal_uInt8)pAcc->GetPixel( y, x ) );
}
}
EndCompression();
@@ -1832,7 +1832,7 @@ void PSWriter::ImplBmp( Bitmap* pBitmap, Bitmap* pMaskBitmap, const Point & rPoi
{
for ( long x = 0; x < nWidth; x++ )
{
- ImplWriteHexByte( (BYTE)pAcc->GetPixel( y, x ) );
+ ImplWriteHexByte( (sal_uInt8)pAcc->GetPixel( y, x ) );
}
}
}
@@ -1846,7 +1846,7 @@ void PSWriter::ImplBmp( Bitmap* pBitmap, Bitmap* pMaskBitmap, const Point & rPoi
ImplWriteLine( "[/Indexed /DeviceRGB " );
ImplWriteLong( pAcc->GetPaletteEntryCount() - 1, PS_RET );
ImplWriteByte( '<', PS_NONE );
- for ( USHORT i = 0; i < pAcc->GetPaletteEntryCount(); i++ )
+ for ( sal_uInt16 i = 0; i < pAcc->GetPaletteEntryCount(); i++ )
{
BitmapColor aBitmapColor = pAcc->GetPaletteColor( i );
ImplWriteHexByte( aBitmapColor.GetRed(), PS_NONE );
@@ -1884,7 +1884,7 @@ void PSWriter::ImplBmp( Bitmap* pBitmap, Bitmap* pMaskBitmap, const Point & rPoi
{
for ( long x = 0; x < nWidth; x++ )
{
- Compress( (BYTE)pAcc->GetPixel( y, x ) );
+ Compress( (sal_uInt8)pAcc->GetPixel( y, x ) );
}
}
EndCompression();
@@ -1895,7 +1895,7 @@ void PSWriter::ImplBmp( Bitmap* pBitmap, Bitmap* pMaskBitmap, const Point & rPoi
{
for ( long x = 0; x < nWidth; x++ )
{
- ImplWriteHexByte( (BYTE)pAcc->GetPixel( y, x ) );
+ ImplWriteHexByte( (sal_uInt8)pAcc->GetPixel( y, x ) );
}
}
}
@@ -1980,19 +1980,19 @@ void PSWriter::ImplWriteCharacter( sal_Char nChar )
case '(' :
case ')' :
case '\\' :
- ImplWriteByte( (BYTE)'\\', PS_NONE );
+ ImplWriteByte( (sal_uInt8)'\\', PS_NONE );
}
- ImplWriteByte( (BYTE)nChar, PS_NONE );
+ ImplWriteByte( (sal_uInt8)nChar, PS_NONE );
}
//---------------------------------------------------------------------------------
-void PSWriter::ImplWriteString( const ByteString& rString, VirtualDevice& rVDev, const INT32* pDXArry, BOOL bStretch )
+void PSWriter::ImplWriteString( const ByteString& rString, VirtualDevice& rVDev, const sal_Int32* pDXArry, sal_Bool bStretch )
{
- USHORT nLen = rString.Len();
+ sal_uInt16 nLen = rString.Len();
if ( nLen )
{
- USHORT i;
+ sal_uInt16 i;
if ( pDXArry )
{
double nx = 0;
@@ -2020,7 +2020,7 @@ void PSWriter::ImplWriteString( const ByteString& rString, VirtualDevice& rVDev,
// ------------------------------------------------------------------------
-void PSWriter::ImplText( const String& rUniString, const Point& rPos, const INT32* pDXArry, sal_Int32 nWidth, VirtualDevice& rVDev )
+void PSWriter::ImplText( const String& rUniString, const Point& rPos, const sal_Int32* pDXArry, sal_Int32 nWidth, VirtualDevice& rVDev )
{
sal_uInt16 nLen = rUniString.Len();
if ( !nLen )
@@ -2049,7 +2049,7 @@ void PSWriter::ImplText( const String& rUniString, const Point& rPos, const INT3
sal_Bool bOldLineColor = bLineColor;
bLineColor = sal_False;
std::vector<PolyPolygon> aPolyPolyVec;
- if ( aVirDev.GetTextOutlines( aPolyPolyVec, rUniString, 0, 0, STRING_LEN, TRUE, nWidth, pDXArry ) )
+ if ( aVirDev.GetTextOutlines( aPolyPolyVec, rUniString, 0, 0, STRING_LEN, sal_True, nWidth, pDXArry ) )
{
// always adjust text position to match baseline alignment
ImplWriteLine( "pum" );
@@ -2127,7 +2127,7 @@ void PSWriter::ImplSetAttrForText( const Point& rPoint )
void PSWriter::ImplDefineFont( const char* pOriginalName, const char* pItalic )
{
- *mpPS << (BYTE)'/'; //convert the font pOriginalName using ISOLatin1Encoding
+ *mpPS << (sal_uInt8)'/'; //convert the font pOriginalName using ISOLatin1Encoding
*mpPS << pOriginalName;
switch ( maFont.GetWeight() )
{
@@ -2151,7 +2151,7 @@ void PSWriter::ImplDefineFont( const char* pOriginalName, const char* pItalic )
//---------------------------------------------------------------------------------
//---------------------------------------------------------------------------------
-void PSWriter::ImplClosePathDraw( ULONG nMode )
+void PSWriter::ImplClosePathDraw( sal_uLong nMode )
{
*mpPS << "pc";
mnCursorPos += 2;
@@ -2167,7 +2167,7 @@ void PSWriter::ImplPathDraw()
//---------------------------------------------------------------------------------
-inline void PSWriter::ImplWriteLineColor( ULONG nMode )
+inline void PSWriter::ImplWriteLineColor( sal_uLong nMode )
{
if ( aColor != aLineColor )
{
@@ -2175,7 +2175,7 @@ inline void PSWriter::ImplWriteLineColor( ULONG nMode )
ImplWriteColor( nMode );
}
}
-inline void PSWriter::ImplWriteFillColor( ULONG nMode )
+inline void PSWriter::ImplWriteFillColor( sal_uLong nMode )
{
if ( aColor != aFillColor )
{
@@ -2183,7 +2183,7 @@ inline void PSWriter::ImplWriteFillColor( ULONG nMode )
ImplWriteColor( nMode );
}
}
-inline void PSWriter::ImplWriteTextColor( ULONG nMode )
+inline void PSWriter::ImplWriteTextColor( sal_uLong nMode )
{
if ( aColor != aTextColor )
{
@@ -2191,7 +2191,7 @@ inline void PSWriter::ImplWriteTextColor( ULONG nMode )
ImplWriteColor( nMode );
}
}
-inline void PSWriter::ImplWriteTextFillColor( ULONG nMode )
+inline void PSWriter::ImplWriteTextFillColor( sal_uLong nMode )
{
if ( aColor != aTextFillColor )
{
@@ -2202,20 +2202,20 @@ inline void PSWriter::ImplWriteTextFillColor( ULONG nMode )
//---------------------------------------------------------------------------------
-void PSWriter::ImplWriteColor( ULONG nMode )
+void PSWriter::ImplWriteColor( sal_uLong nMode )
{
if ( mbGrayScale )
{
// writes the Color (grayscale) as a Number from 0.000 up to 1.000
- ImplWriteF( 1000 * ( (BYTE)aColor.GetRed() * 77 + (BYTE)aColor.GetGreen() * 151 +
- (BYTE)aColor.GetBlue() * 28 + 1 ) / 65536, 3, nMode );
+ ImplWriteF( 1000 * ( (sal_uInt8)aColor.GetRed() * 77 + (sal_uInt8)aColor.GetGreen() * 151 +
+ (sal_uInt8)aColor.GetBlue() * 28 + 1 ) / 65536, 3, nMode );
}
else
{
- ImplWriteB1 ( (BYTE)aColor.GetRed() );
- ImplWriteB1 ( (BYTE)aColor.GetGreen() );
- ImplWriteB1 ( (BYTE)aColor.GetBlue() );
+ ImplWriteB1 ( (sal_uInt8)aColor.GetRed() );
+ ImplWriteB1 ( (sal_uInt8)aColor.GetGreen() );
+ ImplWriteB1 ( (sal_uInt8)aColor.GetBlue() );
}
*mpPS << "c"; // ( c is defined as setrgbcolor or setgray )
ImplExecMode( nMode );
@@ -2283,37 +2283,37 @@ void PSWriter::ImplGetMapMode( const MapMode& rMapMode )
//---------------------------------------------------------------------------------
-inline void PSWriter::ImplExecMode( ULONG nMode )
+inline void PSWriter::ImplExecMode( sal_uLong nMode )
{
if ( nMode & PS_WRAP )
{
if ( mnCursorPos >= PS_LINESIZE )
{
mnCursorPos = 0;
- *mpPS << (BYTE)0xa;
+ *mpPS << (sal_uInt8)0xa;
return;
}
}
if ( nMode & PS_SPACE )
{
- *mpPS << (BYTE)32;
+ *mpPS << (sal_uInt8)32;
mnCursorPos++;
}
if ( nMode & PS_RET )
{
- *mpPS << (BYTE)0xa;
+ *mpPS << (sal_uInt8)0xa;
mnCursorPos = 0;
}
}
//---------------------------------------------------------------------------------
-inline void PSWriter::ImplWriteLine( const char* pString, ULONG nMode )
+inline void PSWriter::ImplWriteLine( const char* pString, sal_uLong nMode )
{
- ULONG i = 0;
+ sal_uLong i = 0;
while ( pString[ i ] )
{
- *mpPS << (BYTE)pString[ i++ ];
+ *mpPS << (sal_uInt8)pString[ i++ ];
}
mnCursorPos += i;
ImplExecMode( nMode );
@@ -2397,19 +2397,19 @@ void PSWriter::ImplWriteLineInfo( const LineInfo& rLineInfo )
//---------------------------------------------------------------------------------
-void PSWriter::ImplWriteLong( sal_Int32 nNumber, ULONG nMode )
+void PSWriter::ImplWriteLong( sal_Int32 nNumber, sal_uLong nMode )
{
const ByteString aNumber( ByteString::CreateFromInt32( nNumber ) );
- ULONG nLen = aNumber.Len();
+ sal_uLong nLen = aNumber.Len();
mnCursorPos += nLen;
- for ( USHORT n = 0; n < nLen; n++ )
+ for ( sal_uInt16 n = 0; n < nLen; n++ )
*mpPS << aNumber.GetChar( n );
ImplExecMode( nMode );
}
//---------------------------------------------------------------------------------
-void PSWriter::ImplWriteDouble( double fNumber, ULONG nMode )
+void PSWriter::ImplWriteDouble( double fNumber, sal_uLong nMode )
{
sal_Int32 nLength;
@@ -2428,7 +2428,7 @@ void PSWriter::ImplWriteDouble( double fNumber, ULONG nMode )
int zCount = 0;
if ( nATemp )
{
- *mpPS << (BYTE)'.';
+ *mpPS << (sal_uInt8)'.';
mnCursorPos++;
const ByteString aNumber2( ByteString::CreateFromInt32( nATemp ) );
@@ -2438,7 +2438,7 @@ void PSWriter::ImplWriteDouble( double fNumber, ULONG nMode )
mnCursorPos += 6 - nLen;
for ( n = 0; n < ( 5 - nLen ); n++ )
{
- *mpPS << (BYTE)'0';
+ *mpPS << (sal_uInt8)'0';
}
}
mnCursorPos += nLen;
@@ -2459,37 +2459,37 @@ void PSWriter::ImplWriteDouble( double fNumber, ULONG nMode )
// writes the number to stream: nNumber / ( 10^nCount )
-void PSWriter::ImplWriteF( sal_Int32 nNumber, ULONG nCount, ULONG nMode )
+void PSWriter::ImplWriteF( sal_Int32 nNumber, sal_uLong nCount, sal_uLong nMode )
{
if ( nNumber < 0 )
{
- *mpPS << (BYTE)'-';
+ *mpPS << (sal_uInt8)'-';
nNumber = -nNumber;
mnCursorPos++;
}
const ByteString aScaleFactor( ByteString::CreateFromInt32( nNumber ) );
- ULONG nLen = aScaleFactor.Len();
+ sal_uLong nLen = aScaleFactor.Len();
long nStSize = ( nCount + 1 ) - nLen;
if ( nStSize >= 1 )
{
- *mpPS << (BYTE)'0';
+ *mpPS << (sal_uInt8)'0';
mnCursorPos++;
}
if ( nStSize >= 2 )
{
- *mpPS << (BYTE)'.';
+ *mpPS << (sal_uInt8)'.';
for ( long i = 1; i < nStSize; i++ )
{
- *mpPS << (BYTE)'0';
+ *mpPS << (sal_uInt8)'0';
mnCursorPos++;
}
}
mnCursorPos += nLen;
- for( USHORT n = 0UL; n < nLen; n++ )
+ for( sal_uInt16 n = 0UL; n < nLen; n++ )
{
if ( n == nLen - nCount )
{
- *mpPS << (BYTE)'.';
+ *mpPS << (sal_uInt8)'.';
mnCursorPos++;
}
*mpPS << aScaleFactor.GetChar( n );
@@ -2499,7 +2499,7 @@ void PSWriter::ImplWriteF( sal_Int32 nNumber, ULONG nCount, ULONG nMode )
//---------------------------------------------------------------------------------
-void PSWriter::ImplWriteByte( BYTE nNumb, ULONG nMode )
+void PSWriter::ImplWriteByte( sal_uInt8 nNumb, sal_uLong nMode )
{
*mpPS << ( nNumb );
mnCursorPos++;
@@ -2508,26 +2508,26 @@ void PSWriter::ImplWriteByte( BYTE nNumb, ULONG nMode )
//---------------------------------------------------------------------------------
-void PSWriter::ImplWriteHexByte( BYTE nNumb, ULONG nMode )
+void PSWriter::ImplWriteHexByte( sal_uInt8 nNumb, sal_uLong nMode )
{
if ( ( nNumb >> 4 ) > 9 )
- *mpPS << (BYTE)( ( nNumb >> 4 ) + 'A' - 10 );
+ *mpPS << (sal_uInt8)( ( nNumb >> 4 ) + 'A' - 10 );
else
- *mpPS << (BYTE)( ( nNumb >> 4 ) + '0' );
+ *mpPS << (sal_uInt8)( ( nNumb >> 4 ) + '0' );
if ( ( nNumb & 0xf ) > 9 )
- *mpPS << (BYTE)( ( nNumb & 0xf ) + 'A' - 10 );
+ *mpPS << (sal_uInt8)( ( nNumb & 0xf ) + 'A' - 10 );
else
- *mpPS << (BYTE)( ( nNumb & 0xf ) + '0' );
+ *mpPS << (sal_uInt8)( ( nNumb & 0xf ) + '0' );
mnCursorPos += 2;
ImplExecMode( nMode );
}
//---------------------------------------------------------------------------------
-// writes the BYTE nNumb as a Number from 0.000 up to 1.000
+// writes the sal_uInt8 nNumb as a Number from 0.000 up to 1.000
-void PSWriter::ImplWriteB1( BYTE nNumb, ULONG nMode )
+void PSWriter::ImplWriteB1( sal_uInt8 nNumb, sal_uLong nMode )
{
ImplWriteF( 1000 * ( nNumb + 1 ) / 256 , 3, nMode );
}
@@ -2535,25 +2535,25 @@ void PSWriter::ImplWriteB1( BYTE nNumb, ULONG nMode )
// ------------------------------------------------------------------------
-inline void PSWriter::WriteBits( USHORT nCode, USHORT nCodeLen )
+inline void PSWriter::WriteBits( sal_uInt16 nCode, sal_uInt16 nCodeLen )
{
dwShift |= ( nCode << ( nOffset - nCodeLen ) );
nOffset -= nCodeLen;
while ( nOffset < 24 )
{
- ImplWriteHexByte( (BYTE)( dwShift >> 24 ) );
+ ImplWriteHexByte( (sal_uInt8)( dwShift >> 24 ) );
dwShift <<= 8;
nOffset += 8;
}
if ( nCode == 257 && nOffset != 32 )
- ImplWriteHexByte( (BYTE)( dwShift >> 24 ) );
+ ImplWriteHexByte( (sal_uInt8)( dwShift >> 24 ) );
}
// ------------------------------------------------------------------------
void PSWriter::StartCompression()
{
- USHORT i;
+ sal_uInt16 i;
nDataSize = 8;
nClearCode = 1 << nDataSize;
@@ -2569,7 +2569,7 @@ void PSWriter::StartCompression()
for ( i = 0; i < 4096; i++ )
{
pTable[ i ].pBrother = pTable[ i ].pFirstChild = NULL;
- pTable[ i ].nValue = (BYTE)( pTable[ i ].nCode = i );
+ pTable[ i ].nValue = (sal_uInt8)( pTable[ i ].nCode = i );
}
pPrefix = NULL;
WriteBits( nClearCode, nCodeSize );
@@ -2577,11 +2577,11 @@ void PSWriter::StartCompression()
// ------------------------------------------------------------------------
-void PSWriter::Compress( BYTE nCompThis )
+void PSWriter::Compress( sal_uInt8 nCompThis )
{
PSLZWCTreeNode* p;
- USHORT i;
- BYTE nV;
+ sal_uInt16 i;
+ sal_uInt8 nV;
if( !pPrefix )
{
@@ -2614,7 +2614,7 @@ void PSWriter::Compress( BYTE nCompThis )
}
else
{
- if( nTableSize == (USHORT)( ( 1 << nCodeSize ) - 1 ) )
+ if( nTableSize == (sal_uInt16)( ( 1 << nCodeSize ) - 1 ) )
nCodeSize++;
p = pTable + ( nTableSize++ );
@@ -2642,11 +2642,11 @@ void PSWriter::EndCompression()
// ------------------------------------------------------------------------
-BYTE* PSWriter::ImplSearchEntry( BYTE* pSource, BYTE* pDest, ULONG nComp, ULONG nSize )
+sal_uInt8* PSWriter::ImplSearchEntry( sal_uInt8* pSource, sal_uInt8* pDest, sal_uLong nComp, sal_uLong nSize )
{
while ( nComp-- >= nSize )
{
- ULONG i;
+ sal_uLong i;
for ( i = 0; i < nSize; i++ )
{
if ( ( pSource[i]&~0x20 ) != ( pDest[i]&~0x20 ) )
@@ -2661,20 +2661,20 @@ BYTE* PSWriter::ImplSearchEntry( BYTE* pSource, BYTE* pDest, ULONG nComp, ULONG
// ------------------------------------------------------------------------
-BOOL PSWriter::ImplGetBoundingBox( double* nNumb, BYTE* pSource, ULONG nSize )
+sal_Bool PSWriter::ImplGetBoundingBox( double* nNumb, sal_uInt8* pSource, sal_uLong nSize )
{
- BOOL bRetValue = FALSE;
- ULONG nBytesRead;
+ sal_Bool bRetValue = sal_False;
+ sal_uLong nBytesRead;
if ( nSize < 256 ) // we assume that the file is greater than 256 bytes
- return FALSE;
+ return sal_False;
if ( nSize < POSTSCRIPT_BOUNDINGSEARCH )
nBytesRead = nSize;
else
nBytesRead = POSTSCRIPT_BOUNDINGSEARCH;
- BYTE* pDest = ImplSearchEntry( pSource, (BYTE*)"%%BoundingBox:", nBytesRead, 14 );
+ sal_uInt8* pDest = ImplSearchEntry( pSource, (sal_uInt8*)"%%BoundingBox:", nBytesRead, 14 );
if ( pDest )
{
int nSecurityCount = 100; // only 100 bytes following the bounding box will be checked
@@ -2683,25 +2683,25 @@ BOOL PSWriter::ImplGetBoundingBox( double* nNumb, BYTE* pSource, ULONG nSize )
for ( int i = 0; ( i < 4 ) && nSecurityCount; i++ )
{
int nDivision = 1;
- BOOL bDivision = FALSE;
- BOOL bNegative = FALSE;
- BOOL bValid = TRUE;
+ sal_Bool bDivision = sal_False;
+ sal_Bool bNegative = sal_False;
+ sal_Bool bValid = sal_True;
while ( ( --nSecurityCount ) && ( ( *pDest == ' ' ) || ( *pDest == 0x9 ) ) )
pDest++;
- BYTE nByte = *pDest;
+ sal_uInt8 nByte = *pDest;
while ( nSecurityCount && ( nByte != ' ' ) && ( nByte != 0x9 ) && ( nByte != 0xd ) && ( nByte != 0xa ) )
{
switch ( nByte )
{
case '.' :
if ( bDivision )
- bValid = FALSE;
+ bValid = sal_False;
else
- bDivision = TRUE;
+ bDivision = sal_True;
break;
case '-' :
- bNegative = TRUE;
+ bNegative = sal_True;
break;
default :
if ( ( nByte < '0' ) || ( nByte > '9' ) )
@@ -2724,14 +2724,14 @@ BOOL PSWriter::ImplGetBoundingBox( double* nNumb, BYTE* pSource, ULONG nSize )
nNumb[i] /= nDivision;
}
if ( nSecurityCount)
- bRetValue = TRUE;
+ bRetValue = sal_True;
}
return bRetValue;
}
//================== GraphicExport - die exportierte Funktion ================
-extern "C" BOOL __LOADONCALLAPI GraphicExport( SvStream & rStream, Graphic & rGraphic, FilterConfigItem* pFilterConfigItem, BOOL)
+extern "C" sal_Bool __LOADONCALLAPI GraphicExport( SvStream & rStream, Graphic & rGraphic, FilterConfigItem* pFilterConfigItem, sal_Bool)
{
PSWriter aPSWriter;
return aPSWriter.WritePS( rGraphic, rStream, pFilterConfigItem );
diff --git a/filter/source/graphicfilter/eras/eras.cxx b/filter/source/graphicfilter/eras/eras.cxx
index cb9005fdf0eb..2d44bbaa677b 100644
--- a/filter/source/graphicfilter/eras/eras.cxx
+++ b/filter/source/graphicfilter/eras/eras.cxx
@@ -40,36 +40,36 @@ class RASWriter {
private:
SvStream* mpOStm;
- USHORT mpOStmOldModus;
+ sal_uInt16 mpOStmOldModus;
- BOOL mbStatus;
+ sal_Bool mbStatus;
BitmapReadAccess* mpAcc;
- ULONG mnWidth, mnHeight;
- USHORT mnColors, mnDepth;
+ sal_uLong mnWidth, mnHeight;
+ sal_uInt16 mnColors, mnDepth;
- ULONG mnRepCount;
- BYTE mnRepVal;
+ sal_uLong mnRepCount;
+ sal_uInt8 mnRepVal;
com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator > xStatusIndicator;
- void ImplCallback( ULONG nCurrentYPos );
- BOOL ImplWriteHeader();
+ void ImplCallback( sal_uLong nCurrentYPos );
+ sal_Bool ImplWriteHeader();
void ImplWritePalette();
void ImplWriteBody();
- void ImplPutByte( BYTE ); // RLE decoding
+ void ImplPutByte( sal_uInt8 ); // RLE decoding
public:
RASWriter();
~RASWriter();
- BOOL WriteRAS( const Graphic& rGraphic, SvStream& rRAS, FilterConfigItem* pFilterConfigItem );
+ sal_Bool WriteRAS( const Graphic& rGraphic, SvStream& rRAS, FilterConfigItem* pFilterConfigItem );
};
//=================== Methoden von RASWriter ==============================
RASWriter::RASWriter() :
- mbStatus ( TRUE ),
+ mbStatus ( sal_True ),
mpAcc ( NULL ),
mnRepCount ( 0xffffffff )
{
@@ -83,15 +83,15 @@ RASWriter::~RASWriter()
// ------------------------------------------------------------------------
-void RASWriter::ImplCallback( ULONG nYPos )
+void RASWriter::ImplCallback( sal_uLong nYPos )
{
if ( xStatusIndicator.is() )
- xStatusIndicator->setValue( (USHORT)( ( 100 * nYPos ) / mnHeight ) );
+ xStatusIndicator->setValue( (sal_uInt16)( ( 100 * nYPos ) / mnHeight ) );
}
// ------------------------------------------------------------------------
-BOOL RASWriter::WriteRAS( const Graphic& rGraphic, SvStream& rRAS, FilterConfigItem* pFilterConfigItem)
+sal_Bool RASWriter::WriteRAS( const Graphic& rGraphic, SvStream& rRAS, FilterConfigItem* pFilterConfigItem)
{
Bitmap aBmp;
@@ -133,7 +133,7 @@ BOOL RASWriter::WriteRAS( const Graphic& rGraphic, SvStream& rRAS, FilterConfigI
aBmp.ReleaseAccess( mpAcc );
}
else
- mbStatus = FALSE;
+ mbStatus = sal_False;
mpOStm->SetNumberFormatInt( mpOStmOldModus );
@@ -145,7 +145,7 @@ BOOL RASWriter::WriteRAS( const Graphic& rGraphic, SvStream& rRAS, FilterConfigI
// ------------------------------------------------------------------------
-BOOL RASWriter::ImplWriteHeader()
+sal_Bool RASWriter::ImplWriteHeader()
{
mnWidth = mpAcc->Width();
mnHeight = mpAcc->Height();
@@ -153,24 +153,24 @@ BOOL RASWriter::ImplWriteHeader()
{
mnColors = mpAcc->GetPaletteEntryCount();
if (mnColors == 0)
- mbStatus = FALSE;
+ mbStatus = sal_False;
}
if ( mbStatus && mnWidth && mnHeight && mnDepth )
{
- *mpOStm << (UINT32)0x59a66a95 << (UINT32)mnWidth << (UINT32)mnHeight
- << (UINT32)mnDepth
- << (UINT32)(( ( ( ( mnWidth * mnDepth ) + 15 ) >> 4 ) << 1 ) * mnHeight)
- << (UINT32)2;
+ *mpOStm << (sal_uInt32)0x59a66a95 << (sal_uInt32)mnWidth << (sal_uInt32)mnHeight
+ << (sal_uInt32)mnDepth
+ << (sal_uInt32)(( ( ( ( mnWidth * mnDepth ) + 15 ) >> 4 ) << 1 ) * mnHeight)
+ << (sal_uInt32)2;
if ( mnDepth > 8 )
- *mpOStm << (UINT32)0 << (UINT32)0;
+ *mpOStm << (sal_uInt32)0 << (sal_uInt32)0;
else
{
- *mpOStm << (UINT32)1 << (UINT32)( mnColors * 3 );
+ *mpOStm << (sal_uInt32)1 << (sal_uInt32)( mnColors * 3 );
}
}
- else mbStatus = FALSE;
+ else mbStatus = sal_False;
return mbStatus;
}
@@ -179,7 +179,7 @@ BOOL RASWriter::ImplWriteHeader()
void RASWriter::ImplWritePalette()
{
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i < mnColors; *mpOStm << mpAcc->GetPaletteColor( i++ ).GetRed() ) ;
for ( i = 0; i < mnColors; *mpOStm << mpAcc->GetPaletteColor( i++ ).GetGreen() ) ;
@@ -190,7 +190,7 @@ void RASWriter::ImplWritePalette()
void RASWriter::ImplWriteBody()
{
- ULONG x, y;
+ sal_uLong x, y;
if ( mnDepth == 24 )
{
@@ -221,7 +221,7 @@ void RASWriter::ImplWriteBody()
}
else if ( mnDepth == 1 )
{
- BYTE nDat = 0;
+ sal_uInt8 nDat = 0;
for ( y = 0; y < mnHeight; y++ )
{
@@ -233,7 +233,7 @@ void RASWriter::ImplWriteBody()
ImplPutByte( nDat );
}
if ( x & 7 )
- ImplPutByte( sal::static_int_cast< BYTE >(nDat << ( ( ( x & 7 ) ^ 7 ) + 1)) );// write remaining bits
+ ImplPutByte( sal::static_int_cast< sal_uInt8 >(nDat << ( ( ( x & 7 ) ^ 7 ) + 1)) );// write remaining bits
if (!( ( x - 1 ) & 0x8 ) )
ImplPutByte( 0 ); // WORD ALIGNMENT ???
}
@@ -243,7 +243,7 @@ void RASWriter::ImplWriteBody()
// ------------------------------------------------------------------------
-void RASWriter::ImplPutByte( BYTE nPutThis )
+void RASWriter::ImplPutByte( sal_uInt8 nPutThis )
{
if ( mnRepCount == 0xffffffff )
{
@@ -258,15 +258,15 @@ void RASWriter::ImplPutByte( BYTE nPutThis )
{
if ( mnRepCount == 0 )
{
- *mpOStm << (BYTE)mnRepVal;
+ *mpOStm << (sal_uInt8)mnRepVal;
if ( mnRepVal == 0x80 )
- *mpOStm << (BYTE)0;
+ *mpOStm << (sal_uInt8)0;
}
else
{
- *mpOStm << (BYTE)0x80;
- *mpOStm << (BYTE)mnRepCount;
- *mpOStm << (BYTE)mnRepVal;
+ *mpOStm << (sal_uInt8)0x80;
+ *mpOStm << (sal_uInt8)mnRepCount;
+ *mpOStm << (sal_uInt8)mnRepVal;
}
mnRepVal = nPutThis;
mnRepCount = 0;
@@ -280,7 +280,7 @@ void RASWriter::ImplPutByte( BYTE nPutThis )
// - exported function -
// ---------------------
-extern "C" BOOL __LOADONCALLAPI GraphicExport( SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pFilterConfigItem, BOOL )
+extern "C" sal_Bool __LOADONCALLAPI GraphicExport( SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pFilterConfigItem, sal_Bool )
{
RASWriter aRASWriter;
diff --git a/filter/source/graphicfilter/etiff/etiff.cxx b/filter/source/graphicfilter/etiff/etiff.cxx
index af3142806a12..d2db0e466bb9 100644
--- a/filter/source/graphicfilter/etiff/etiff.cxx
+++ b/filter/source/graphicfilter/etiff/etiff.cxx
@@ -62,8 +62,8 @@ struct TIFFLZWCTreeNode
TIFFLZWCTreeNode* pBrother; // naechster Knoten, der den selben Vater hat
TIFFLZWCTreeNode* pFirstChild; // erster Sohn
- USHORT nCode; // Der Code fuer den String von Pixelwerten, der sich ergibt, wenn
- USHORT nValue; // Der Pixelwert
+ sal_uInt16 nCode; // Der Code fuer den String von Pixelwerten, der sich ergibt, wenn
+ sal_uInt16 nValue; // Der Pixelwert
};
class TIFFWriter
@@ -71,63 +71,63 @@ class TIFFWriter
private:
SvStream* mpOStm;
- UINT32 mnStreamOfs;
+ sal_uInt32 mnStreamOfs;
- BOOL mbStatus;
+ sal_Bool mbStatus;
BitmapReadAccess* mpAcc;
- UINT32 mnWidth, mnHeight, mnColors;
- UINT32 mnCurAllPictHeight;
- UINT32 mnSumOfAllPictHeight;
- UINT32 mnBitsPerPixel;
- UINT32 mnLastPercent;
+ sal_uInt32 mnWidth, mnHeight, mnColors;
+ sal_uInt32 mnCurAllPictHeight;
+ sal_uInt32 mnSumOfAllPictHeight;
+ sal_uInt32 mnBitsPerPixel;
+ sal_uInt32 mnLastPercent;
- UINT32 mnLatestIfdPos;
- UINT16 mnTagCount; // number of tags already written
- UINT32 mnCurrentTagCountPos; // offset to the position where the current
+ sal_uInt32 mnLatestIfdPos;
+ sal_uInt16 mnTagCount; // number of tags already written
+ sal_uInt32 mnCurrentTagCountPos; // offset to the position where the current
// tag count is to insert
- UINT32 mnXResPos; // if != 0 this DWORDs stores the
- UINT32 mnYResPos; // actual streamposition of the
- UINT32 mnPalPos; // Tag Entry
- UINT32 mnBitmapPos;
- UINT32 mnStripByteCountPos;
+ sal_uInt32 mnXResPos; // if != 0 this DWORDs stores the
+ sal_uInt32 mnYResPos; // actual streamposition of the
+ sal_uInt32 mnPalPos; // Tag Entry
+ sal_uInt32 mnBitmapPos;
+ sal_uInt32 mnStripByteCountPos;
TIFFLZWCTreeNode* pTable;
TIFFLZWCTreeNode* pPrefix;
- USHORT nDataSize;
- USHORT nClearCode;
- USHORT nEOICode;
- USHORT nTableSize;
- USHORT nCodeSize;
- ULONG nOffset;
- ULONG dwShift;
+ sal_uInt16 nDataSize;
+ sal_uInt16 nClearCode;
+ sal_uInt16 nEOICode;
+ sal_uInt16 nTableSize;
+ sal_uInt16 nCodeSize;
+ sal_uLong nOffset;
+ sal_uLong dwShift;
com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator > xStatusIndicator;
- void ImplCallback( UINT32 nPercent );
- BOOL ImplWriteHeader( BOOL bMultiPage );
+ void ImplCallback( sal_uInt32 nPercent );
+ sal_Bool ImplWriteHeader( sal_Bool bMultiPage );
void ImplWritePalette();
- BOOL ImplWriteBody();
- void ImplWriteTag( UINT16 TagID, UINT16 DataType, UINT32 NumberOfItems, UINT32 Value);
- void ImplWriteResolution( ULONG nStreamPos, sal_uInt32 nResolutionUnit );
+ sal_Bool ImplWriteBody();
+ void ImplWriteTag( sal_uInt16 TagID, sal_uInt16 DataType, sal_uInt32 NumberOfItems, sal_uInt32 Value);
+ void ImplWriteResolution( sal_uLong nStreamPos, sal_uInt32 nResolutionUnit );
void StartCompression();
- void Compress( BYTE nSrc );
+ void Compress( sal_uInt8 nSrc );
void EndCompression();
- inline void WriteBits( USHORT nCode, USHORT nCodeLen );
+ inline void WriteBits( sal_uInt16 nCode, sal_uInt16 nCodeLen );
public:
TIFFWriter();
~TIFFWriter();
- BOOL WriteTIFF( const Graphic& rGraphic, SvStream& rTIFF, FilterConfigItem* pFilterConfigItem );
+ sal_Bool WriteTIFF( const Graphic& rGraphic, SvStream& rTIFF, FilterConfigItem* pFilterConfigItem );
};
// ------------------------------------------------------------------------
TIFFWriter::TIFFWriter() :
- mbStatus ( TRUE ),
+ mbStatus ( sal_True ),
mpAcc ( NULL ),
mnCurAllPictHeight ( 0 ),
mnSumOfAllPictHeight( 0 ),
@@ -147,9 +147,9 @@ TIFFWriter::~TIFFWriter()
// ------------------------------------------------------------------------
-BOOL TIFFWriter::WriteTIFF( const Graphic& rGraphic, SvStream& rTIFF, FilterConfigItem* pFilterConfigItem)
+sal_Bool TIFFWriter::WriteTIFF( const Graphic& rGraphic, SvStream& rTIFF, FilterConfigItem* pFilterConfigItem)
{
- ULONG* pDummy = new ULONG; delete pDummy; // damit unter OS/2
+ sal_uLong* pDummy = new sal_uLong; delete pDummy; // damit unter OS/2
// das richtige (Tools-)new
// verwendet wird, da es sonst
// in dieser DLL nur Vector-news
@@ -168,15 +168,15 @@ BOOL TIFFWriter::WriteTIFF( const Graphic& rGraphic, SvStream& rTIFF, FilterConf
// #i69169# copy stream
mpOStm = &rTIFF;
- const UINT16 nOldFormat = mpOStm->GetNumberFormatInt();
+ const sal_uInt16 nOldFormat = mpOStm->GetNumberFormatInt();
mnStreamOfs = mpOStm->Tell();
// we will use the BIG Endian Mode
// TIFF header
mpOStm->SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN );
- *mpOStm << (UINT32)0x4d4d002a; // TIFF identifier
+ *mpOStm << (sal_uInt32)0x4d4d002a; // TIFF identifier
mnLatestIfdPos = mpOStm->Tell();
- *mpOStm << (UINT32)0;
+ *mpOStm << (sal_uInt32)0;
Animation aAnimation;
Bitmap aBmp;
@@ -191,7 +191,7 @@ BOOL TIFFWriter::WriteTIFF( const Graphic& rGraphic, SvStream& rTIFF, FilterConf
aAnimation.Insert( aAnimationBitmap );
}
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i < aAnimation.Count(); i++ )
mnSumOfAllPictHeight += aAnimation.Get( i ).aBmpEx.GetSizePixel().Height();
@@ -224,7 +224,7 @@ BOOL TIFFWriter::WriteTIFF( const Graphic& rGraphic, SvStream& rTIFF, FilterConf
ImplWritePalette();
ImplWriteBody();
}
- UINT32 nCurPos = mpOStm->Tell();
+ sal_uInt32 nCurPos = mpOStm->Tell();
mpOStm->Seek( mnCurrentTagCountPos );
*mpOStm << mnTagCount;
mpOStm->Seek( nCurPos );
@@ -232,7 +232,7 @@ BOOL TIFFWriter::WriteTIFF( const Graphic& rGraphic, SvStream& rTIFF, FilterConf
aBmp.ReleaseAccess( mpAcc );
}
else
- mbStatus = FALSE;
+ mbStatus = sal_False;
}
}
mpOStm->SetNumberFormatInt( nOldFormat );
@@ -245,7 +245,7 @@ BOOL TIFFWriter::WriteTIFF( const Graphic& rGraphic, SvStream& rTIFF, FilterConf
// ------------------------------------------------------------------------
-void TIFFWriter::ImplCallback( UINT32 nPercent )
+void TIFFWriter::ImplCallback( sal_uInt32 nPercent )
{
if ( xStatusIndicator.is() )
{
@@ -261,7 +261,7 @@ void TIFFWriter::ImplCallback( UINT32 nPercent )
// ------------------------------------------------------------------------
-BOOL TIFFWriter::ImplWriteHeader( BOOL bMultiPage )
+sal_Bool TIFFWriter::ImplWriteHeader( sal_Bool bMultiPage )
{
mnTagCount = 0;
mnWidth = mpAcc->Width();
@@ -269,16 +269,16 @@ BOOL TIFFWriter::ImplWriteHeader( BOOL bMultiPage )
if ( mnWidth && mnHeight && mnBitsPerPixel && mbStatus )
{
- UINT32 nCurrentPos = mpOStm->Tell();
+ sal_uInt32 nCurrentPos = mpOStm->Tell();
mpOStm->Seek( mnLatestIfdPos );
- *mpOStm << (UINT32)( nCurrentPos - mnStreamOfs ); // offset to the IFD
+ *mpOStm << (sal_uInt32)( nCurrentPos - mnStreamOfs ); // offset to the IFD
mpOStm->Seek( nCurrentPos );
// (OFS8) TIFF image file directory (IFD)
mnCurrentTagCountPos = mpOStm->Tell();
- *mpOStm << (UINT16)0; // the number of tagentrys is to insert later
+ *mpOStm << (sal_uInt16)0; // the number of tagentrys is to insert later
- UINT32 nSubFileFlags = 0;
+ sal_uInt32 nSubFileFlags = 0;
if ( bMultiPage )
nSubFileFlags |= 2;
ImplWriteTag( NewSubfileType, 4, 1, nSubFileFlags );
@@ -286,7 +286,7 @@ BOOL TIFFWriter::ImplWriteHeader( BOOL bMultiPage )
ImplWriteTag( ImageLength, 4, 1, mnHeight);
ImplWriteTag( BitsPerSample, 3, 1, ( mnBitsPerPixel == 24 ) ? 8 : mnBitsPerPixel );
ImplWriteTag( Compression, 3, 1, 5 );
- BYTE nTemp;
+ sal_uInt8 nTemp;
switch ( mnBitsPerPixel )
{
case 1 :
@@ -326,10 +326,10 @@ BOOL TIFFWriter::ImplWriteHeader( BOOL bMultiPage )
// and last we write zero to close the num dir entries list
mnLatestIfdPos = mpOStm->Tell();
- *mpOStm << (UINT32)0; // there are no more IFD
+ *mpOStm << (sal_uInt32)0; // there are no more IFD
}
else
- mbStatus = FALSE;
+ mbStatus = sal_False;
return mbStatus;
}
@@ -338,8 +338,8 @@ BOOL TIFFWriter::ImplWriteHeader( BOOL bMultiPage )
void TIFFWriter::ImplWritePalette()
{
- USHORT i;
- ULONG nCurrentPos = mpOStm->Tell();
+ sal_uInt16 i;
+ sal_uLong nCurrentPos = mpOStm->Tell();
mpOStm->Seek( mnPalPos + 8 ); // the palette tag entry needs the offset
*mpOStm << static_cast<sal_uInt32>(nCurrentPos - mnStreamOfs); // to the palette colors
mpOStm->Seek( nCurrentPos );
@@ -347,29 +347,29 @@ void TIFFWriter::ImplWritePalette()
for ( i = 0; i < mnColors; i++ )
{
const BitmapColor& rColor = mpAcc->GetPaletteColor( i );
- *mpOStm << (UINT16)( rColor.GetRed() << 8 );
+ *mpOStm << (sal_uInt16)( rColor.GetRed() << 8 );
}
for ( i = 0; i < mnColors; i++ )
{
const BitmapColor& rColor = mpAcc->GetPaletteColor( i );
- *mpOStm << (UINT16)( rColor.GetGreen() << 8 );
+ *mpOStm << (sal_uInt16)( rColor.GetGreen() << 8 );
}
for ( i = 0; i < mnColors; i++ )
{
const BitmapColor& rColor = mpAcc->GetPaletteColor( i );
- *mpOStm << (UINT16)( rColor.GetBlue() << 8 );
+ *mpOStm << (sal_uInt16)( rColor.GetBlue() << 8 );
}
}
// ------------------------------------------------------------------------
-BOOL TIFFWriter::ImplWriteBody()
+sal_Bool TIFFWriter::ImplWriteBody()
{
- BYTE nTemp = 0;
- BYTE nShift;
- ULONG j, x, y;
+ sal_uInt8 nTemp = 0;
+ sal_uInt8 nShift;
+ sal_uLong j, x, y;
- ULONG nGfxBegin = mpOStm->Tell();
+ sal_uLong nGfxBegin = mpOStm->Tell();
mpOStm->Seek( mnBitmapPos + 8 ); // the strip offset tag entry needs the offset
*mpOStm << static_cast<sal_uInt32>(nGfxBegin - mnStreamOfs); // to the bitmap data
mpOStm->Seek( nGfxBegin );
@@ -415,9 +415,9 @@ BOOL TIFFWriter::ImplWriteBody()
for ( x = 0; x < mnWidth; x++, nShift++ )
{
if (!( nShift & 1 ))
- nTemp = ( (BYTE)mpAcc->GetPixel( y, x ) << 4 );
+ nTemp = ( (sal_uInt8)mpAcc->GetPixel( y, x ) << 4 );
else
- Compress( (BYTE)( nTemp | ( mpAcc->GetPixel( y, x ) & 0xf ) ) );
+ Compress( (sal_uInt8)( nTemp | ( mpAcc->GetPixel( y, x ) & 0xf ) ) );
}
if ( nShift & 1 )
Compress( nTemp );
@@ -437,13 +437,13 @@ BOOL TIFFWriter::ImplWriteBody()
j |= ( ( ~mpAcc->GetPixel( y, x ) ) & 1 );
if ( j & 0x100 )
{
- Compress( (BYTE)j );
+ Compress( (sal_uInt8)j );
j = 1;
}
}
if ( j != 1 )
{
- Compress( (BYTE)(j << ( ( ( x & 7) ^ 7 ) + 1 ) ) );
+ Compress( (sal_uInt8)(j << ( ( ( x & 7) ^ 7 ) + 1 ) ) );
j = 1;
}
}
@@ -452,7 +452,7 @@ BOOL TIFFWriter::ImplWriteBody()
default:
{
- mbStatus = FALSE;
+ mbStatus = sal_False;
}
break;
}
@@ -461,7 +461,7 @@ BOOL TIFFWriter::ImplWriteBody()
if ( mnStripByteCountPos && mbStatus )
{
- ULONG nGfxEnd = mpOStm->Tell();
+ sal_uLong nGfxEnd = mpOStm->Tell();
mpOStm->Seek( mnStripByteCountPos + 8 );
*mpOStm << static_cast<sal_uInt32>( nGfxEnd - nGfxBegin ); // mnStripByteCountPos needs the size of the compression data
mpOStm->Seek( nGfxEnd );
@@ -471,19 +471,19 @@ BOOL TIFFWriter::ImplWriteBody()
// ------------------------------------------------------------------------
-void TIFFWriter::ImplWriteResolution( ULONG nStreamPos, sal_uInt32 nResolutionUnit )
+void TIFFWriter::ImplWriteResolution( sal_uLong nStreamPos, sal_uInt32 nResolutionUnit )
{
- ULONG nCurrentPos = mpOStm->Tell();
+ sal_uLong nCurrentPos = mpOStm->Tell();
mpOStm->Seek( nStreamPos + 8 );
- *mpOStm << (UINT32)nCurrentPos - mnStreamOfs;
+ *mpOStm << (sal_uInt32)nCurrentPos - mnStreamOfs;
mpOStm->Seek( nCurrentPos );
- *mpOStm << (UINT32)1;
+ *mpOStm << (sal_uInt32)1;
*mpOStm << nResolutionUnit;
}
// ------------------------------------------------------------------------
-void TIFFWriter::ImplWriteTag( UINT16 nTagID, UINT16 nDataType, UINT32 nNumberOfItems, UINT32 nValue)
+void TIFFWriter::ImplWriteTag( sal_uInt16 nTagID, sal_uInt16 nDataType, sal_uInt32 nNumberOfItems, sal_uInt32 nValue)
{
mnTagCount++;
@@ -497,19 +497,19 @@ void TIFFWriter::ImplWriteTag( UINT16 nTagID, UINT16 nDataType, UINT32 nNumberOf
// ------------------------------------------------------------------------
-inline void TIFFWriter::WriteBits( USHORT nCode, USHORT nCodeLen )
+inline void TIFFWriter::WriteBits( sal_uInt16 nCode, sal_uInt16 nCodeLen )
{
dwShift |= ( nCode << ( nOffset - nCodeLen ) );
nOffset -= nCodeLen;
while ( nOffset < 24 )
{
- *mpOStm << (BYTE)( dwShift >> 24 );
+ *mpOStm << (sal_uInt8)( dwShift >> 24 );
dwShift <<= 8;
nOffset += 8;
}
if ( nCode == 257 && nOffset != 32 )
{
- *mpOStm << (BYTE)( dwShift >> 24 );
+ *mpOStm << (sal_uInt8)( dwShift >> 24 );
}
}
@@ -517,7 +517,7 @@ inline void TIFFWriter::WriteBits( USHORT nCode, USHORT nCodeLen )
void TIFFWriter::StartCompression()
{
- USHORT i;
+ sal_uInt16 i;
nDataSize = 8;
nClearCode = 1 << nDataSize;
@@ -533,7 +533,7 @@ void TIFFWriter::StartCompression()
for ( i = 0; i < 4096; i++)
{
pTable[ i ].pBrother = pTable[ i ].pFirstChild = NULL;
- pTable[ i ].nValue = (BYTE)( pTable[ i ].nCode = i );
+ pTable[ i ].nValue = (sal_uInt8)( pTable[ i ].nCode = i );
}
pPrefix = NULL;
@@ -542,11 +542,11 @@ void TIFFWriter::StartCompression()
// ------------------------------------------------------------------------
-void TIFFWriter::Compress( BYTE nCompThis )
+void TIFFWriter::Compress( sal_uInt8 nCompThis )
{
TIFFLZWCTreeNode* p;
- USHORT i;
- BYTE nV;
+ sal_uInt16 i;
+ sal_uInt8 nV;
if( !pPrefix )
{
@@ -579,7 +579,7 @@ void TIFFWriter::Compress( BYTE nCompThis )
}
else
{
- if( nTableSize == (USHORT)( ( 1 << nCodeSize ) - 1 ) )
+ if( nTableSize == (sal_uInt16)( ( 1 << nCodeSize ) - 1 ) )
nCodeSize++;
p = pTable + ( nTableSize++ );
@@ -611,7 +611,7 @@ void TIFFWriter::EndCompression()
// - exported function -
// ---------------------
-extern "C" BOOL __LOADONCALLAPI GraphicExport( SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pFilterConfigItem, BOOL )
+extern "C" sal_Bool __LOADONCALLAPI GraphicExport( SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pFilterConfigItem, sal_Bool )
{
return TIFFWriter().WriteTIFF( rGraphic, rStream, pFilterConfigItem );
}
diff --git a/filter/source/graphicfilter/expm/expm.cxx b/filter/source/graphicfilter/expm/expm.cxx
index 083fb0f2f7b3..984745362b72 100644
--- a/filter/source/graphicfilter/expm/expm.cxx
+++ b/filter/source/graphicfilter/expm/expm.cxx
@@ -39,36 +39,36 @@ class XPMWriter {
private:
SvStream* mpOStm; // Die auszugebende XPM-Datei
- USHORT mpOStmOldModus;
+ sal_uInt16 mpOStmOldModus;
- BOOL mbStatus;
- BOOL mbTrans;
+ sal_Bool mbStatus;
+ sal_Bool mbTrans;
BitmapReadAccess* mpAcc;
- ULONG mnWidth, mnHeight; // Bildausmass in Pixeln
- USHORT mnColors;
+ sal_uLong mnWidth, mnHeight; // Bildausmass in Pixeln
+ sal_uInt16 mnColors;
com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator > xStatusIndicator;
- void ImplCallback( USHORT nPercent );
- BOOL ImplWriteHeader();
+ void ImplCallback( sal_uInt16 nPercent );
+ sal_Bool ImplWriteHeader();
void ImplWritePalette();
- void ImplWriteColor( USHORT );
+ void ImplWriteColor( sal_uInt16 );
void ImplWriteBody();
void ImplWriteNumber( sal_Int32 );
- void ImplWritePixel( ULONG );
+ void ImplWritePixel( sal_uLong );
public:
XPMWriter();
~XPMWriter();
- BOOL WriteXPM( const Graphic& rGraphic, SvStream& rXPM, FilterConfigItem* pFilterConfigItem );
+ sal_Bool WriteXPM( const Graphic& rGraphic, SvStream& rXPM, FilterConfigItem* pFilterConfigItem );
};
//=================== Methoden von XPMWriter ==============================
XPMWriter::XPMWriter() :
- mbStatus ( TRUE ),
- mbTrans ( FALSE ),
+ mbStatus ( sal_True ),
+ mbTrans ( sal_False ),
mpAcc ( NULL )
{
}
@@ -81,7 +81,7 @@ XPMWriter::~XPMWriter()
// ------------------------------------------------------------------------
-void XPMWriter::ImplCallback( USHORT nPercent )
+void XPMWriter::ImplCallback( sal_uInt16 nPercent )
{
if ( xStatusIndicator.is() )
{
@@ -92,7 +92,7 @@ void XPMWriter::ImplCallback( USHORT nPercent )
// ------------------------------------------------------------------------
-BOOL XPMWriter::WriteXPM( const Graphic& rGraphic, SvStream& rXPM, FilterConfigItem* pFilterConfigItem)
+sal_Bool XPMWriter::WriteXPM( const Graphic& rGraphic, SvStream& rXPM, FilterConfigItem* pFilterConfigItem)
{
Bitmap aBmp;
@@ -113,7 +113,7 @@ BOOL XPMWriter::WriteXPM( const Graphic& rGraphic, SvStream& rXPM, FilterConfigI
if ( rGraphic.IsTransparent() ) // event. transparente Farbe erzeugen
{
- mbTrans = TRUE;
+ mbTrans = sal_True;
if ( aBmp.GetBitCount() >= 8 ) // wenn noetig Bild auf 8 bit konvertieren
aBmp.Convert( BMP_CONVERSION_8BIT_TRANS );
else
@@ -141,7 +141,7 @@ BOOL XPMWriter::WriteXPM( const Graphic& rGraphic, SvStream& rXPM, FilterConfigI
aBmp.ReleaseAccess( mpAcc );
}
else
- mbStatus = FALSE;
+ mbStatus = sal_False;
mpOStm->SetNumberFormatInt( mpOStmOldModus );
@@ -153,7 +153,7 @@ BOOL XPMWriter::WriteXPM( const Graphic& rGraphic, SvStream& rXPM, FilterConfigI
// ------------------------------------------------------------------------
-BOOL XPMWriter::ImplWriteHeader()
+sal_Bool XPMWriter::ImplWriteHeader()
{
mnWidth = mpAcc->Width();
mnHeight = mpAcc->Height();
@@ -161,15 +161,15 @@ BOOL XPMWriter::ImplWriteHeader()
{
*mpOStm << "/* XPM */\x0astatic char * image[] = \x0a{\x0a\x22";
ImplWriteNumber( mnWidth );
- *mpOStm << (BYTE)32;
+ *mpOStm << (sal_uInt8)32;
ImplWriteNumber( mnHeight );
- *mpOStm << (BYTE)32;
+ *mpOStm << (sal_uInt8)32;
ImplWriteNumber( mnColors );
- *mpOStm << (BYTE)32;
+ *mpOStm << (sal_uInt8)32;
ImplWriteNumber( ( mnColors > 26 ) ? 2 : 1 );
*mpOStm << "\x22,\x0a";
}
- else mbStatus = FALSE;
+ else mbStatus = sal_False;
return mbStatus;
}
@@ -177,15 +177,15 @@ BOOL XPMWriter::ImplWriteHeader()
void XPMWriter::ImplWritePalette()
{
- USHORT nTransIndex = 0xffff;
+ sal_uInt16 nTransIndex = 0xffff;
if ( mbTrans )
nTransIndex = mpAcc->GetBestMatchingColor( BMP_COL_TRANS );
- for ( USHORT i = 0; i < mnColors; i++ )
+ for ( sal_uInt16 i = 0; i < mnColors; i++ )
{
*mpOStm << "\x22";
ImplWritePixel( i );
- *mpOStm << (BYTE)32;
+ *mpOStm << (sal_uInt8)32;
if ( nTransIndex != i )
{
ImplWriteColor( i );
@@ -200,13 +200,13 @@ void XPMWriter::ImplWritePalette()
void XPMWriter::ImplWriteBody()
{
- for ( ULONG y = 0; y < mnHeight; y++ )
+ for ( sal_uLong y = 0; y < mnHeight; y++ )
{
- ImplCallback( (USHORT)( ( 100 * y ) / mnHeight ) ); // processing output in percent
- *mpOStm << (BYTE)0x22;
- for ( ULONG x = 0; x < mnWidth; x++ )
+ ImplCallback( (sal_uInt16)( ( 100 * y ) / mnHeight ) ); // processing output in percent
+ *mpOStm << (sal_uInt8)0x22;
+ for ( sal_uLong x = 0; x < mnWidth; x++ )
{
- ImplWritePixel( (BYTE)(mpAcc->GetPixel( y, x ) ) );
+ ImplWritePixel( (sal_uInt8)(mpAcc->GetPixel( y, x ) ) );
}
*mpOStm << "\x22,\x0a";
}
@@ -226,31 +226,31 @@ void XPMWriter::ImplWriteNumber( sal_Int32 nNumber )
// ------------------------------------------------------------------------
-void XPMWriter::ImplWritePixel( ULONG nCol )
+void XPMWriter::ImplWritePixel( sal_uLong nCol )
{
if ( mnColors > 26 )
{
- BYTE nDiff = (BYTE) ( nCol / 26 );
- *mpOStm << (BYTE)( nDiff + 'A' );
- *mpOStm << (BYTE)( nCol - ( nDiff*26 ) + 'A' );
+ sal_uInt8 nDiff = (sal_uInt8) ( nCol / 26 );
+ *mpOStm << (sal_uInt8)( nDiff + 'A' );
+ *mpOStm << (sal_uInt8)( nCol - ( nDiff*26 ) + 'A' );
}
else
- *mpOStm << (BYTE)( nCol + 'A' );
+ *mpOStm << (sal_uInt8)( nCol + 'A' );
}
// ------------------------------------------------------------------------
// ein Farbwert wird im Hexadezimalzahlformat in den Stream geschrieben
-void XPMWriter::ImplWriteColor( USHORT nNumber )
+void XPMWriter::ImplWriteColor( sal_uInt16 nNumber )
{
- ULONG nTmp;
- BYTE j;
+ sal_uLong nTmp;
+ sal_uInt8 j;
*mpOStm << "c #"; // # zeigt einen folgenden Hexwert an
const BitmapColor& rColor = mpAcc->GetPaletteColor( nNumber );
nTmp = ( rColor.GetRed() << 16 ) | ( rColor.GetGreen() << 8 ) | rColor.GetBlue();
for ( signed char i = 20; i >= 0 ; i-=4 )
{
- if ( ( j = (BYTE)( nTmp >> i ) & 0xf ) > 9 )
+ if ( ( j = (sal_uInt8)( nTmp >> i ) & 0xf ) > 9 )
j += 'A' - 10;
else
j += '0';
@@ -264,7 +264,7 @@ void XPMWriter::ImplWriteColor( USHORT nNumber )
// - exported function -
// ---------------------
-extern "C" BOOL __LOADONCALLAPI GraphicExport( SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pFilterConfigItem, BOOL )
+extern "C" sal_Bool __LOADONCALLAPI GraphicExport( SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pFilterConfigItem, sal_Bool )
{
XPMWriter aXPMWriter;
diff --git a/filter/source/graphicfilter/icgm/actimpr.cxx b/filter/source/graphicfilter/icgm/actimpr.cxx
index ccc9eb8c93d9..d303a63f7d43 100644
--- a/filter/source/graphicfilter/icgm/actimpr.cxx
+++ b/filter/source/graphicfilter/icgm/actimpr.cxx
@@ -744,7 +744,7 @@ void CGMImpressOutAct::DrawPolyLine( Polygon& rPoly )
void CGMImpressOutAct::DrawPolybezier( Polygon& rPolygon )
{
- USHORT nPoints = rPolygon.GetSize();
+ sal_uInt16 nPoints = rPolygon.GetSize();
if ( ( nPoints > 1 ) && ImplCreateShape( rtl::OUString::createFromAscii("com.sun.star.drawing.OpenBezierShape") ) )
{
drawing::PolyPolygonBezierCoords aRetval;
@@ -763,7 +763,7 @@ void CGMImpressOutAct::DrawPolybezier( Polygon& rPolygon )
awt::Point* pInnerSequence = pOuterSequence->getArray();
drawing::PolygonFlags* pInnerFlags = pOuterFlags->getArray();
- for( USHORT i = 0; i < nPoints; i++ )
+ for( sal_uInt16 i = 0; i < nPoints; i++ )
{
*pInnerSequence++ = awt::Point( rPolygon[ i ].X(), rPolygon[ i ].Y() );
*pInnerFlags++ = (drawing::PolygonFlags)rPolygon.GetFlags( i );
diff --git a/filter/source/graphicfilter/icgm/class4.cxx b/filter/source/graphicfilter/icgm/class4.cxx
index ee8aaef531d5..dc1fa50c2368 100644
--- a/filter/source/graphicfilter/icgm/class4.cxx
+++ b/filter/source/graphicfilter/icgm/class4.cxx
@@ -151,7 +151,7 @@ void CGM::ImplDoClass4()
case 0x02 : ComOut( CGM_LEVEL1 | CGM_EXTENDED_PRIMITIVES_SET, "Disjoint PolyLine" )
{
- USHORT nPoints = sal::static_int_cast< USHORT >(
+ sal_uInt16 nPoints = sal::static_int_cast< sal_uInt16 >(
mnElementSize / ImplGetPointSize());
if ( ! ( nPoints & 1 ) )
{
@@ -270,10 +270,10 @@ void CGM::ImplDoClass4()
if ( mbFigure )
mpOutAct->CloseRegion();
- USHORT nPoints = sal::static_int_cast< USHORT >(
+ sal_uInt16 nPoints = sal::static_int_cast< sal_uInt16 >(
mnElementSize / ImplGetPointSize());
Polygon aPolygon( nPoints );
- for ( USHORT i = 0; i < nPoints; i++)
+ for ( sal_uInt16 i = 0; i < nPoints; i++)
{
FloatPoint aFloatPoint;
ImplGetPoint( aFloatPoint, sal_True );
@@ -288,7 +288,7 @@ void CGM::ImplDoClass4()
if ( mbFigure )
mpOutAct->CloseRegion();
- USHORT nPoints = 0;
+ sal_uInt16 nPoints = 0;
Point* pPoints = new Point[ 0x4000 ];
PolyPolygon aPolyPolygon;
@@ -302,7 +302,7 @@ void CGM::ImplDoClass4()
if ( ( nEdgeFlag & 2 ) || ( mnParaSize == mnElementSize ) )
{
Polygon aPolygon( nPoints );
- for ( USHORT i = 0; i < nPoints; i++ )
+ for ( sal_uInt16 i = 0; i < nPoints; i++ )
{
aPolygon.SetPoint( pPoints[ i ], i );
}
@@ -726,11 +726,11 @@ void CGM::ImplDoClass4()
{
sal_uInt32 nOrder = ImplGetI( pElement->nIntegerPrecision );
- USHORT nNumberOfPoints = sal::static_int_cast< USHORT >(( mnElementSize - pElement->nIntegerPrecision ) / ImplGetPointSize());
+ sal_uInt16 nNumberOfPoints = sal::static_int_cast< sal_uInt16 >(( mnElementSize - pElement->nIntegerPrecision ) / ImplGetPointSize());
Polygon aPolygon( nNumberOfPoints );
- for ( USHORT i = 0; i < nNumberOfPoints; i++)
+ for ( sal_uInt16 i = 0; i < nNumberOfPoints; i++)
{
FloatPoint aFloatPoint;
ImplGetPoint( aFloatPoint, sal_True );
@@ -738,7 +738,7 @@ void CGM::ImplDoClass4()
}
if ( nOrder & 4 )
{
- for ( USHORT i = 0; i < nNumberOfPoints; i++ )
+ for ( sal_uInt16 i = 0; i < nNumberOfPoints; i++ )
{
if ( ( i % 3 ) == 0 )
aPolygon.SetFlags( i, POLY_NORMAL );
@@ -748,7 +748,7 @@ void CGM::ImplDoClass4()
}
else
{
- for ( USHORT i = 0; i < nNumberOfPoints; i++ )
+ for ( sal_uInt16 i = 0; i < nNumberOfPoints; i++ )
{
switch ( i & 3 )
{
diff --git a/filter/source/graphicfilter/icgm/outact.cxx b/filter/source/graphicfilter/icgm/outact.cxx
index 6e7e9959a4c7..8a746d4193ac 100644
--- a/filter/source/graphicfilter/icgm/outact.cxx
+++ b/filter/source/graphicfilter/icgm/outact.cxx
@@ -42,7 +42,7 @@ CGMOutAct::CGMOutAct( CGM& rCGM )
mnGroupActCount = mnGroupLevel = 0;
mpGroupLevel = new sal_uInt32[ CGM_OUTACT_MAX_GROUP_LEVEL ];
mpPoints = (Point*)new sal_Int8[ 0x2000 * sizeof( Point ) ];
- mpFlags = new BYTE[ 0x2000 ];
+ mpFlags = new sal_uInt8[ 0x2000 ];
mnIndex = 0;
mpGradient = NULL;
@@ -110,12 +110,12 @@ void CGMOutAct::EndFigure()
void CGMOutAct::RegPolyLine( Polygon& rPolygon, sal_Bool bReverse )
{
- USHORT nPoints = rPolygon.GetSize();
+ sal_uInt16 nPoints = rPolygon.GetSize();
if ( nPoints )
{
if ( bReverse )
{
- for ( USHORT i = 0; i < nPoints; i++ )
+ for ( sal_uInt16 i = 0; i < nPoints; i++ )
{
mpPoints[ mnIndex + i ] = rPolygon.GetPoint( nPoints - i - 1 );
mpFlags[ mnIndex + i ] = (sal_Int8)rPolygon.GetFlags( nPoints - i - 1 );
@@ -123,7 +123,7 @@ void CGMOutAct::RegPolyLine( Polygon& rPolygon, sal_Bool bReverse )
}
else
{
- for ( USHORT i = 0; i < nPoints; i++ )
+ for ( sal_uInt16 i = 0; i < nPoints; i++ )
{
mpPoints[ mnIndex + i ] = rPolygon.GetPoint( i );
mpFlags[ mnIndex + i ] = (sal_Int8)rPolygon.GetFlags( i );
diff --git a/filter/source/graphicfilter/icgm/outact.hxx b/filter/source/graphicfilter/icgm/outact.hxx
index 10c47dd14906..909f3e1ea170 100644
--- a/filter/source/graphicfilter/icgm/outact.hxx
+++ b/filter/source/graphicfilter/icgm/outact.hxx
@@ -60,8 +60,8 @@ class CGMOutAct
sal_uInt32 mnGroupLevel;
sal_uInt32* mpGroupLevel;
- USHORT mnIndex; // figure
- BYTE* mpFlags;
+ sal_uInt16 mnIndex; // figure
+ sal_uInt8* mpFlags;
Point* mpPoints;
PolyPolygon maPolyPolygon;
::com::sun::star::awt::Gradient* mpGradient;
diff --git a/filter/source/graphicfilter/idxf/dxf2mtf.cxx b/filter/source/graphicfilter/idxf/dxf2mtf.cxx
index 11e82f97b328..81db6a646ad4 100644
--- a/filter/source/graphicfilter/idxf/dxf2mtf.cxx
+++ b/filter/source/graphicfilter/idxf/dxf2mtf.cxx
@@ -37,10 +37,10 @@
#include <math.h>
-ULONG DXF2GDIMetaFile::CountEntities(const DXFEntities & rEntities)
+sal_uLong DXF2GDIMetaFile::CountEntities(const DXFEntities & rEntities)
{
const DXFBasicEntity * pBE;
- ULONG nRes;
+ sal_uLong nRes;
nRes=0;
for (pBE=rEntities.pFirst; pBE!=NULL; pBE=pBE->pSucc) nRes++;
@@ -48,21 +48,21 @@ ULONG DXF2GDIMetaFile::CountEntities(const DXFEntities & rEntities)
}
-void DXF2GDIMetaFile::MayCallback(ULONG /*nMainEntitiesProcessed*/)
+void DXF2GDIMetaFile::MayCallback(sal_uLong /*nMainEntitiesProcessed*/)
{
- // ULONG nPercent;
+ // sal_uLong nPercent;
/*
if (pCallback!=NULL && nMainEntitiesCount!=0) {
nPercent=nMinPercent+(nMaxPercent-nMinPercent)*nMainEntitiesProcessed/nMainEntitiesCount;
if (nPercent>=nLastPercent+4) {
- if (((*pCallback)(pCallerData,(USHORT)nPercent))==TRUE) bStatus=FALSE;
+ if (((*pCallback)(pCallerData,(sal_uInt16)nPercent))==sal_True) bStatus=sal_False;
nLastPercent=nPercent;
}
}
*/
}
-Color DXF2GDIMetaFile::ConvertColor(BYTE nColor)
+Color DXF2GDIMetaFile::ConvertColor(sal_uInt8 nColor)
{
return Color(
pDXF->aPalette.GetRed( nColor ),
@@ -178,14 +178,14 @@ DXFLineInfo DXF2GDIMetaFile::GetEntityDXFLineInfo(const DXFBasicEntity & rE)
}
-BOOL DXF2GDIMetaFile::SetLineAttribute(const DXFBasicEntity & rE, ULONG /*nWidth*/)
+sal_Bool DXF2GDIMetaFile::SetLineAttribute(const DXFBasicEntity & rE, sal_uLong /*nWidth*/)
{
long nColor;
Color aColor;
nColor=GetEntityColor(rE);
- if (nColor<0) return FALSE;
- aColor=ConvertColor((BYTE)nColor);
+ if (nColor<0) return sal_False;
+ aColor=ConvertColor((sal_uInt8)nColor);
if (aActLineColor!=aColor) {
pVirDev->SetLineColor( aActLineColor = aColor );
@@ -194,18 +194,18 @@ BOOL DXF2GDIMetaFile::SetLineAttribute(const DXFBasicEntity & rE, ULONG /*nWidth
if (aActFillColor!=Color( COL_TRANSPARENT )) {
pVirDev->SetFillColor(aActFillColor = Color( COL_TRANSPARENT ));
}
- return TRUE;
+ return sal_True;
}
-BOOL DXF2GDIMetaFile::SetAreaAttribute(const DXFBasicEntity & rE)
+sal_Bool DXF2GDIMetaFile::SetAreaAttribute(const DXFBasicEntity & rE)
{
long nColor;
Color aColor;
nColor=GetEntityColor(rE);
- if (nColor<0) return FALSE;
- aColor=ConvertColor((BYTE)nColor);
+ if (nColor<0) return sal_False;
+ aColor=ConvertColor((sal_uInt8)nColor);
if (aActLineColor!=aColor) {
pVirDev->SetLineColor( aActLineColor = aColor );
@@ -214,11 +214,11 @@ BOOL DXF2GDIMetaFile::SetAreaAttribute(const DXFBasicEntity & rE)
if ( aActFillColor == Color( COL_TRANSPARENT ) || aActFillColor != aColor) {
pVirDev->SetFillColor( aActFillColor = aColor );
}
- return TRUE;
+ return sal_True;
}
-BOOL DXF2GDIMetaFile::SetFontAttribute(const DXFBasicEntity & rE, short nAngle, USHORT nHeight, double /*fWidthScale*/)
+sal_Bool DXF2GDIMetaFile::SetFontAttribute(const DXFBasicEntity & rE, short nAngle, sal_uInt16 nHeight, double /*fWidthScale*/)
{
long nColor;
Color aColor;
@@ -229,11 +229,11 @@ BOOL DXF2GDIMetaFile::SetFontAttribute(const DXFBasicEntity & rE, short nAngle,
while (nAngle<0) nAngle+=3600;
nColor=GetEntityColor(rE);
- if (nColor<0) return FALSE;
- aColor=ConvertColor((BYTE)nColor);
+ if (nColor<0) return sal_False;
+ aColor=ConvertColor((sal_uInt8)nColor);
aFont.SetColor(aColor);
- aFont.SetTransparent(TRUE);
+ aFont.SetTransparent(sal_True);
aFont.SetFamily(FAMILY_SWISS);
aFont.SetSize(Size(0,nHeight));
aFont.SetAlign(ALIGN_BASELINE);
@@ -243,7 +243,7 @@ BOOL DXF2GDIMetaFile::SetFontAttribute(const DXFBasicEntity & rE, short nAngle,
pVirDev->SetFont(aActFont);
}
- return TRUE;
+ return sal_True;
}
@@ -304,12 +304,12 @@ void DXF2GDIMetaFile::DrawPointEntity(const DXFPointEntity & rE, const DXFTransf
void DXF2GDIMetaFile::DrawCircleEntity(const DXFCircleEntity & rE, const DXFTransform & rTransform)
{
double frx,fry,fAng;
- USHORT nPoints,i;
+ sal_uInt16 nPoints,i;
DXFVector aC;
- if (SetLineAttribute(rE)==FALSE) return;
+ if (SetLineAttribute(rE)==sal_False) return;
rTransform.Transform(rE.aP0,aC);
- if (rE.fThickness==0 && rTransform.TransCircleToEllipse(rE.fRadius,frx,fry)==TRUE) {
+ if (rE.fThickness==0 && rTransform.TransCircleToEllipse(rE.fRadius,frx,fry)==sal_True) {
pVirDev->DrawEllipse(
Rectangle((long)(aC.fx-frx+0.5),(long)(aC.fy-fry+0.5),
(long)(aC.fx+frx+0.5),(long)(aC.fy+fry+0.5)));
@@ -345,24 +345,24 @@ void DXF2GDIMetaFile::DrawCircleEntity(const DXFCircleEntity & rE, const DXFTran
void DXF2GDIMetaFile::DrawArcEntity(const DXFArcEntity & rE, const DXFTransform & rTransform)
{
double frx,fry,fA1,fdA,fAng;
- USHORT nPoints,i;
+ sal_uInt16 nPoints,i;
DXFVector aC;
Point aPS,aPE;
- if (SetLineAttribute(rE)==FALSE) return;
+ if (SetLineAttribute(rE)==sal_False) return;
fA1=rE.fStart;
fdA=rE.fEnd-fA1;
while (fdA>=360.0) fdA-=360.0;
while (fdA<=0) fdA+=360.0;
rTransform.Transform(rE.aP0,aC);
- if (rE.fThickness==0 && fdA>5.0 && rTransform.TransCircleToEllipse(rE.fRadius,frx,fry)==TRUE) {
+ if (rE.fThickness==0 && fdA>5.0 && rTransform.TransCircleToEllipse(rE.fRadius,frx,fry)==sal_True) {
DXFVector aVS(cos(fA1/180.0*3.14159265359),sin(fA1/180.0*3.14159265359),0.0);
aVS*=rE.fRadius;
aVS+=rE.aP0;
DXFVector aVE(cos((fA1+fdA)/180.0*3.14159265359),sin((fA1+fdA)/180.0*3.14159265359),0.0);
aVE*=rE.fRadius;
aVE+=rE.aP0;
- if (rTransform.Mirror()==TRUE) {
+ if (rTransform.Mirror()==sal_True) {
rTransform.Transform(aVS,aPS);
rTransform.Transform(aVE,aPE);
}
@@ -377,7 +377,7 @@ void DXF2GDIMetaFile::DrawArcEntity(const DXFArcEntity & rE, const DXFTransform
);
}
else {
- nPoints=(USHORT)(fdA/360.0*(double)OptPointsPerCircle+0.5);
+ nPoints=(sal_uInt16)(fdA/360.0*(double)OptPointsPerCircle+0.5);
if (nPoints<2) nPoints=2;
Polygon aPoly(nPoints);
for (i=0; i<nPoints; i++) {
@@ -414,7 +414,7 @@ void DXF2GDIMetaFile::DrawTraceEntity(const DXFTraceEntity & rE, const DXFTransf
rTransform.Transform(rE.aP2,aPoly[3]);
pVirDev->DrawPolygon(aPoly);
if (rE.fThickness!=0) {
- USHORT i;
+ sal_uInt16 i;
Polygon aPoly2(4);
DXFVector aVAdd(0,0,rE.fThickness);
rTransform.Transform(rE.aP0+aVAdd,aPoly2[0]);
@@ -431,7 +431,7 @@ void DXF2GDIMetaFile::DrawTraceEntity(const DXFTraceEntity & rE, const DXFTransf
void DXF2GDIMetaFile::DrawSolidEntity(const DXFSolidEntity & rE, const DXFTransform & rTransform)
{
if (SetAreaAttribute(rE)) {
- USHORT nN;
+ sal_uInt16 nN;
if (rE.aP2==rE.aP3) nN=3; else nN=4;
Polygon aPoly(nN);
rTransform.Transform(rE.aP0,aPoly[0]);
@@ -448,7 +448,7 @@ void DXF2GDIMetaFile::DrawSolidEntity(const DXFSolidEntity & rE, const DXFTransf
if (nN>3) rTransform.Transform(rE.aP2+aVAdd,aPoly2[3]);
pVirDev->DrawPolygon(aPoly2);
if (SetLineAttribute(rE)) {
- USHORT i;
+ sal_uInt16 i;
for (i=0; i<nN; i++) pVirDev->DrawLine(aPoly[i],aPoly2[i]);
}
}
@@ -461,12 +461,12 @@ void DXF2GDIMetaFile::DrawTextEntity(const DXFTextEntity & rE, const DXFTransfor
DXFVector aV;
Point aPt;
double fA;
- USHORT nHeight;
+ sal_uInt16 nHeight;
short nAng;
ByteString aStr( rE.sText );
DXFTransform aT( DXFTransform(rE.fXScale,rE.fHeight,1.0,rE.fRotAngle,rE.aP0), rTransform );
aT.TransDir(DXFVector(0,1,0),aV);
- nHeight=(USHORT)(aV.Abs()+0.5);
+ nHeight=(sal_uInt16)(aV.Abs()+0.5);
fA=aT.CalcRotAngle();
nAng=(short)(fA*10.0+0.5);
aT.TransDir(DXFVector(1,0,0),aV);
@@ -505,7 +505,7 @@ void DXF2GDIMetaFile::DrawInsertEntity(const DXFInsertEntity & rE, const DXFTran
aParentLayerDXFLineInfo=LTypeToDXFLineInfo(pLayer->sLineType);
}
}
- DrawEntities(*pB,aT,FALSE);
+ DrawEntities(*pB,aT,sal_False);
aBlockDXFLineInfo=aSavedBlockDXFLineInfo;
aParentLayerDXFLineInfo=aSavedParentLayerDXFLineInfo;
nBlockColor=nSavedBlockColor;
@@ -520,12 +520,12 @@ void DXF2GDIMetaFile::DrawAttribEntity(const DXFAttribEntity & rE, const DXFTran
DXFVector aV;
Point aPt;
double fA;
- USHORT nHeight;
+ sal_uInt16 nHeight;
short nAng;
ByteString aStr( rE.sText );
DXFTransform aT( DXFTransform( rE.fXScale, rE.fHeight, 1.0, rE.fRotAngle, rE.aP0 ), rTransform );
aT.TransDir(DXFVector(0,1,0),aV);
- nHeight=(USHORT)(aV.Abs()+0.5);
+ nHeight=(sal_uInt16)(aV.Abs()+0.5);
fA=aT.CalcRotAngle();
nAng=(short)(fA*10.0+0.5);
aT.TransDir(DXFVector(1,0,0),aV);
@@ -541,7 +541,7 @@ void DXF2GDIMetaFile::DrawAttribEntity(const DXFAttribEntity & rE, const DXFTran
void DXF2GDIMetaFile::DrawPolyLineEntity(const DXFPolyLineEntity & rE, const DXFTransform & rTransform)
{
- USHORT i,nPolySize;
+ sal_uInt16 i,nPolySize;
double fW;
const DXFBasicEntity * pBE;
@@ -653,7 +653,7 @@ void DXF2GDIMetaFile::DrawHatchEntity(const DXFHatchEntity & rE, const DXFTransf
{
/*
double frx,fry,fA1,fdA,fAng;
- USHORT nPoints,i;
+ sal_uInt16 nPoints,i;
DXFVector aC;
Point aPS,aPE;
fA1=((DXFEdgeTypeCircularArc*)pEdge)->fStartAngle;
@@ -663,7 +663,7 @@ void DXF2GDIMetaFile::DrawHatchEntity(const DXFHatchEntity & rE, const DXFTransf
while ( fdA <= 0 )
fdA += 360.0;
rTransform.Transform(((DXFEdgeTypeCircularArc*)pEdge)->aCenter, aC);
- if ( fdA > 5.0 && rTransform.TransCircleToEllipse(((DXFEdgeTypeCircularArc*)pEdge)->fRadius,frx,fry ) == TRUE )
+ if ( fdA > 5.0 && rTransform.TransCircleToEllipse(((DXFEdgeTypeCircularArc*)pEdge)->fRadius,frx,fry ) == sal_True )
{
DXFVector aVS(cos(fA1/180.0*3.14159265359),sin(fA1/180.0*3.14159265359),0.0);
aVS*=((DXFEdgeTypeCircularArc*)pEdge)->fRadius;
@@ -671,7 +671,7 @@ void DXF2GDIMetaFile::DrawHatchEntity(const DXFHatchEntity & rE, const DXFTransf
DXFVector aVE(cos((fA1+fdA)/180.0*3.14159265359),sin((fA1+fdA)/180.0*3.14159265359),0.0);
aVE*=((DXFEdgeTypeCircularArc*)pEdge)->fRadius;
aVE+=((DXFEdgeTypeCircularArc*)pEdge)->aCenter;
- if ( rTransform.Mirror() == TRUE )
+ if ( rTransform.Mirror() == sal_True )
{
rTransform.Transform(aVS,aPS);
rTransform.Transform(aVE,aPE);
@@ -712,7 +712,7 @@ void DXF2GDIMetaFile::DrawHatchEntity(const DXFHatchEntity & rE, const DXFTransf
void DXF2GDIMetaFile::Draw3DFaceEntity(const DXF3DFaceEntity & rE, const DXFTransform & rTransform)
{
- USHORT nN,i;
+ sal_uInt16 nN,i;
if (SetLineAttribute(rE)) {
if (rE.aP2==rE.aP3) nN=3; else nN=4;
Polygon aPoly(nN);
@@ -756,7 +756,7 @@ void DXF2GDIMetaFile::DrawDimensionEntity(const DXFDimensionEntity & rE, const D
aParentLayerDXFLineInfo=LTypeToDXFLineInfo(pLayer->sLineType);
}
}
- DrawEntities(*pB,aT,FALSE);
+ DrawEntities(*pB,aT,sal_False);
aBlockDXFLineInfo=aSavedBlockDXFLineInfo;
aParentLayerDXFLineInfo=aSavedParentLayerDXFLineInfo;
nBlockColor=nSavedBlockColor;
@@ -767,15 +767,15 @@ void DXF2GDIMetaFile::DrawDimensionEntity(const DXFDimensionEntity & rE, const D
void DXF2GDIMetaFile::DrawEntities(const DXFEntities & rEntities,
const DXFTransform & rTransform,
- BOOL bTopEntities)
+ sal_Bool bTopEntities)
{
- ULONG nCount=0;
+ sal_uLong nCount=0;
DXFTransform aET;
const DXFTransform * pT;
const DXFBasicEntity * pE=rEntities.pFirst;
- while (pE!=NULL && bStatus==TRUE) {
+ while (pE!=NULL && bStatus==sal_True) {
if (pE->nSpace==0) {
if (pE->aExtrusion.fz==1.0) {
pT=&rTransform;
@@ -848,7 +848,7 @@ DXF2GDIMetaFile::~DXF2GDIMetaFile()
}
-BOOL DXF2GDIMetaFile::Convert(const DXFRepresentation & rDXF, GDIMetaFile & rMTF, USHORT nminpercent, USHORT nmaxpercent)
+sal_Bool DXF2GDIMetaFile::Convert(const DXFRepresentation & rDXF, GDIMetaFile & rMTF, sal_uInt16 nminpercent, sal_uInt16 nmaxpercent)
{
double fWidth,fHeight,fScale;
DXFTransform aTransform;
@@ -858,12 +858,12 @@ BOOL DXF2GDIMetaFile::Convert(const DXFRepresentation & rDXF, GDIMetaFile & rMTF
pVirDev = new VirtualDevice;
pDXF = &rDXF;
- bStatus = TRUE;
+ bStatus = sal_True;
OptPointsPerCircle=50;
- nMinPercent=(ULONG)nminpercent;
- nMaxPercent=(ULONG)nmaxpercent;
+ nMinPercent=(sal_uLong)nminpercent;
+ nMaxPercent=(sal_uLong)nmaxpercent;
nLastPercent=nMinPercent;
nMainEntitiesCount=CountEntities(pDXF->aEntities);
@@ -892,7 +892,7 @@ BOOL DXF2GDIMetaFile::Convert(const DXFRepresentation & rDXF, GDIMetaFile & rMTF
aParentLayerDXFLineInfo.fDistance = 0;
}
- pVirDev->EnableOutput(FALSE);
+ pVirDev->EnableOutput(sal_False);
rMTF.Record(pVirDev);
aActLineColor = pVirDev->GetLineColor();
@@ -906,13 +906,13 @@ BOOL DXF2GDIMetaFile::Convert(const DXFRepresentation & rDXF, GDIMetaFile & rMTF
}
if (pVPort==NULL) {
- if (pDXF->aBoundingBox.bEmpty==TRUE)
- bStatus=FALSE;
+ if (pDXF->aBoundingBox.bEmpty==sal_True)
+ bStatus=sal_False;
else {
fWidth=pDXF->aBoundingBox.fMaxX-pDXF->aBoundingBox.fMinX;
fHeight=pDXF->aBoundingBox.fMaxY-pDXF->aBoundingBox.fMinY;
if (fWidth<=0 || fHeight<=0) {
- bStatus=FALSE;
+ bStatus=sal_False;
fScale = 0; // -Wall added this...
}
else {
@@ -955,12 +955,12 @@ BOOL DXF2GDIMetaFile::Convert(const DXFRepresentation & rDXF, GDIMetaFile & rMTF
aPrefSize.Height()=(long)(fHeight*fScale+1.5);
}
- if (bStatus==TRUE)
- DrawEntities(pDXF->aEntities,aTransform,TRUE);
+ if (bStatus==sal_True)
+ DrawEntities(pDXF->aEntities,aTransform,sal_True);
rMTF.Stop();
- if ( bStatus==TRUE )
+ if ( bStatus==sal_True )
{
rMTF.SetPrefSize( aPrefSize );
diff --git a/filter/source/graphicfilter/idxf/dxf2mtf.hxx b/filter/source/graphicfilter/idxf/dxf2mtf.hxx
index cb03c47429fc..d8da2f636cca 100644
--- a/filter/source/graphicfilter/idxf/dxf2mtf.hxx
+++ b/filter/source/graphicfilter/idxf/dxf2mtf.hxx
@@ -45,14 +45,14 @@ private:
VirtualDevice * pVirDev;
const DXFRepresentation * pDXF;
- BOOL bStatus;
+ sal_Bool bStatus;
- USHORT OptPointsPerCircle;
+ sal_uInt16 OptPointsPerCircle;
- ULONG nMinPercent;
- ULONG nMaxPercent;
- ULONG nLastPercent;
- ULONG nMainEntitiesCount;
+ sal_uLong nMinPercent;
+ sal_uLong nMaxPercent;
+ sal_uLong nLastPercent;
+ sal_uLong nMainEntitiesCount;
long nBlockColor;
DXFLineInfo aBlockDXFLineInfo;
@@ -62,11 +62,11 @@ private:
Color aActFillColor;
Font aActFont;
- ULONG CountEntities(const DXFEntities & rEntities);
+ sal_uLong CountEntities(const DXFEntities & rEntities);
- void MayCallback(ULONG nMainEntitiesProcessed);
+ void MayCallback(sal_uLong nMainEntitiesProcessed);
- Color ConvertColor(BYTE nColor);
+ Color ConvertColor(sal_uInt8 nColor);
long GetEntityColor(const DXFBasicEntity & rE);
@@ -74,12 +74,12 @@ private:
DXFLineInfo GetEntityDXFLineInfo(const DXFBasicEntity & rE);
- BOOL SetLineAttribute(const DXFBasicEntity & rE, ULONG nWidth=0);
+ sal_Bool SetLineAttribute(const DXFBasicEntity & rE, sal_uLong nWidth=0);
- BOOL SetAreaAttribute(const DXFBasicEntity & rE);
+ sal_Bool SetAreaAttribute(const DXFBasicEntity & rE);
- BOOL SetFontAttribute(const DXFBasicEntity & rE, short nAngle,
- USHORT nHeight, double fWidthScale);
+ sal_Bool SetFontAttribute(const DXFBasicEntity & rE, short nAngle,
+ sal_uInt16 nHeight, double fWidthScale);
void DrawLineEntity(const DXFLineEntity & rE, const DXFTransform & rTransform);
@@ -111,14 +111,14 @@ private:
void DrawEntities(const DXFEntities & rEntities,
const DXFTransform & rTransform,
- BOOL bTopEntities);
+ sal_Bool bTopEntities);
public:
DXF2GDIMetaFile();
~DXF2GDIMetaFile();
- BOOL Convert( const DXFRepresentation & rDXF, GDIMetaFile & rMTF, USHORT nMinPercent, USHORT nMaxPercent);
+ sal_Bool Convert( const DXFRepresentation & rDXF, GDIMetaFile & rMTF, sal_uInt16 nMinPercent, sal_uInt16 nMaxPercent);
};
diff --git a/filter/source/graphicfilter/idxf/dxfgrprd.cxx b/filter/source/graphicfilter/idxf/dxfgrprd.cxx
index f09b17e80635..07b86bc7e322 100644
--- a/filter/source/graphicfilter/idxf/dxfgrprd.cxx
+++ b/filter/source/graphicfilter/idxf/dxfgrprd.cxx
@@ -39,11 +39,11 @@
// a 0-sign occurs; this functions converts 0-signs to blanks and reads
// a complete line until a cr/lf is found
-BOOL DXFReadLine( SvStream& rIStm, ByteString& rStr )
+sal_Bool DXFReadLine( SvStream& rIStm, ByteString& rStr )
{
char buf[256 + 1];
- BOOL bEnd = FALSE;
- ULONG nOldFilePos = rIStm.Tell();
+ sal_Bool bEnd = sal_False;
+ sal_uLong nOldFilePos = rIStm.Tell();
char c = 0;
rStr.Erase();
@@ -52,16 +52,16 @@ BOOL DXFReadLine( SvStream& rIStm, ByteString& rStr )
// !!! weil wir blockweise
// !!! lesen
{
- USHORT nLen = (USHORT)rIStm.Read( buf, sizeof(buf)-1 );
+ sal_uInt16 nLen = (sal_uInt16)rIStm.Read( buf, sizeof(buf)-1 );
if( !nLen )
{
if( rStr.Len() == 0 )
- return FALSE;
+ return sal_False;
else
break;
}
- for( USHORT n = 0; n < nLen ; n++ )
+ for( sal_uInt16 n = 0; n < nLen ; n++ )
{
c = buf[n];
if( c != '\n' && c != '\r' )
@@ -72,14 +72,14 @@ BOOL DXFReadLine( SvStream& rIStm, ByteString& rStr )
}
else
{
- bEnd = TRUE;
+ bEnd = sal_True;
break;
}
}
}
if( !bEnd && !rIStm.GetError() && rStr.Len() )
- bEnd = TRUE;
+ bEnd = sal_True;
nOldFilePos += rStr.Len();
if( rIStm.Tell() > nOldFilePos )
@@ -99,19 +99,19 @@ BOOL DXFReadLine( SvStream& rIStm, ByteString& rStr )
// ------------------
-DXFGroupReader::DXFGroupReader(SvStream & rIStream, USHORT nminpercent, USHORT nmaxpercent ) :
+DXFGroupReader::DXFGroupReader(SvStream & rIStream, sal_uInt16 nminpercent, sal_uInt16 nmaxpercent ) :
rIS(rIStream)
{
- USHORT i;
+ sal_uInt16 i;
nIBuffPos=0;
nIBuffSize=0;
- bStatus=TRUE;
+ bStatus=sal_True;
nLastG=0;
nGCount=0;
- nMinPercent=(ULONG)nminpercent;
- nMaxPercent=(ULONG)nmaxpercent;
+ nMinPercent=(sal_uLong)nminpercent;
+ nMaxPercent=(sal_uLong)nmaxpercent;
nLastPercent=nMinPercent;
rIS.Seek(STREAM_SEEK_TO_END);
@@ -133,7 +133,7 @@ DXFGroupReader::DXFGroupReader(SvStream & rIStream, USHORT nminpercent, USHORT n
}
-USHORT DXFGroupReader::Read()
+sal_uInt16 DXFGroupReader::Read()
{
sal_uInt16 nG = 0;
if ( bStatus )
@@ -184,7 +184,7 @@ USHORT DXFGroupReader::Read()
}
-long DXFGroupReader::GetI(USHORT nG)
+long DXFGroupReader::GetI(sal_uInt16 nG)
{
sal_Int32 nRetValue = 0;
if ( ( nG >= 60 ) && ( nG <= 79 ) )
@@ -198,7 +198,7 @@ long DXFGroupReader::GetI(USHORT nG)
return nRetValue;
}
-double DXFGroupReader::GetF(USHORT nG)
+double DXFGroupReader::GetF(sal_uInt16 nG)
{
nG-=10;
if (nG<50) return F10_59[nG];
@@ -217,7 +217,7 @@ double DXFGroupReader::GetF(USHORT nG)
}
}
-const char * DXFGroupReader::GetS(USHORT nG)
+const char * DXFGroupReader::GetS(sal_uInt16 nG)
{
if (nG<10) return S0_9[nG];
else if ( nG == 100 )
@@ -232,7 +232,7 @@ const char * DXFGroupReader::GetS(USHORT nG)
}
}
-void DXFGroupReader::SetF(USHORT nG, double fF)
+void DXFGroupReader::SetF(sal_uInt16 nG, double fF)
{
nG-=10;
if (nG<50) F10_59[nG]=fF;
@@ -251,7 +251,7 @@ void DXFGroupReader::SetF(USHORT nG, double fF)
}
-void DXFGroupReader::SetS(USHORT nG, const char * sS)
+void DXFGroupReader::SetS(sal_uInt16 nG, const char * sS)
{
char* pPtr = NULL;
if ( nG < 10 )
@@ -274,7 +274,7 @@ void DXFGroupReader::SetS(USHORT nG, const char * sS)
void DXFGroupReader::ReadLine(char * ptgt)
{
ByteString aStr;
- ULONG nLen;
+ sal_uLong nLen;
DXFReadLine( rIS, aStr );
@@ -287,13 +287,13 @@ void DXFGroupReader::ReadLine(char * ptgt)
/*
if ( pCallback )
{
- const ULONG nPercent= nMinPercent + (nMaxPercent-nMinPercent)*rIS.Tell() / nFileSize;
+ const sal_uLong nPercent= nMinPercent + (nMaxPercent-nMinPercent)*rIS.Tell() / nFileSize;
if ( nPercent >= nLastPercent + 4 )
{
nLastPercent=nPercent;
- if (((*pCallback)(pCallerData,(USHORT)nPercent))==TRUE)
- bStatus=FALSE;
+ if (((*pCallback)(pCallerData,(sal_uInt16)nPercent))==sal_True)
+ bStatus=sal_False;
}
}
*/
@@ -312,7 +312,7 @@ long DXFGroupReader::ReadI()
while(*p==0x20) p++;
if ((*p<'0' || *p>'9') && *p!='-') {
- bStatus=FALSE;
+ bStatus=sal_False;
return 0;
}
@@ -330,7 +330,7 @@ long DXFGroupReader::ReadI()
while (*p==0x20) p++;
if (*p!=0) {
- bStatus=FALSE;
+ bStatus=sal_False;
return 0;
}
@@ -346,7 +346,7 @@ double DXFGroupReader::ReadF()
p=sl;
while(*p==0x20) p++;
if ((*p<'0' || *p>'9') && *p!='.' && *p!='-') {
- bStatus=FALSE;
+ bStatus=sal_False;
return 0.0;
}
return atof(p);
diff --git a/filter/source/graphicfilter/idxf/dxfgrprd.hxx b/filter/source/graphicfilter/idxf/dxfgrprd.hxx
index 0b9a40ff6bf8..e1f0e156f1a9 100644
--- a/filter/source/graphicfilter/idxf/dxfgrprd.hxx
+++ b/filter/source/graphicfilter/idxf/dxfgrprd.hxx
@@ -41,18 +41,18 @@ public:
// Anmerkkung:
// sizeof(DXFGroupReader) ist gross, also nur dynamisch anlegen!
- DXFGroupReader( SvStream & rIStream, USHORT nMinPercent, USHORT nMaxPercent );
+ DXFGroupReader( SvStream & rIStream, sal_uInt16 nMinPercent, sal_uInt16 nMaxPercent );
- BOOL GetStatus();
+ sal_Bool GetStatus();
void SetError();
- USHORT Read();
+ sal_uInt16 Read();
// Liesst die naechste Gruppe ein und liefert den Gruppencode zurueck.
- // Im Falle eines Fehlers liefert GetStatus() FALSE, Gruppencode wird 0
+ // Im Falle eines Fehlers liefert GetStatus() sal_False, Gruppencode wird 0
// gesetzt, und es wird SetS(0,"EOF") ausgefuehrt.
- USHORT GetG();
+ sal_uInt16 GetG();
// Liefert den letzten Gruppencode (also was Read() zuletzt lieferte)
long GetI();
@@ -74,15 +74,15 @@ public:
// aktuelle Gruppencode angegeben werden. (DXFGroupReader speichert die Parameter
// zu allen Gruppencodes. Dadurch ist es moeglich, dass zunaechst mit Read() einige
// verschiedene Gruppen eingelesen werden, bevor sie ausgewertet werden.)
- long GetI(USHORT nG);
- double GetF(USHORT nG);
- const char * GetS(USHORT nG);
+ long GetI(sal_uInt16 nG);
+ double GetF(sal_uInt16 nG);
+ const char * GetS(sal_uInt16 nG);
// Mit folgenden Methoden koennen die aktuell gespeicherten Werte zu den
// Gruppencodes veraendert werden. (z.B. um Defaultwerte zu setzen, bevor
// 'blind' eine Menge von Gruppen eingelesen wird.)
- void SetF(USHORT nG, double fF);
- void SetS(USHORT nG, const char * sS); // (wird kopiert)
+ void SetF(sal_uInt16 nG, double fF);
+ void SetS(sal_uInt16 nG, const char * sS); // (wird kopiert)
private:
@@ -93,15 +93,15 @@ private:
SvStream & rIS;
char sIBuff[1024];
- USHORT nIBuffSize,nIBuffPos;
- BOOL bStatus;
- USHORT nLastG;
- ULONG nGCount;
+ sal_uInt16 nIBuffSize,nIBuffPos;
+ sal_Bool bStatus;
+ sal_uInt16 nLastG;
+ sal_uLong nGCount;
- ULONG nMinPercent;
- ULONG nMaxPercent;
- ULONG nLastPercent;
- ULONG nFileSize;
+ sal_uLong nMinPercent;
+ sal_uLong nMaxPercent;
+ sal_uLong nLastPercent;
+ sal_uLong nFileSize;
char S0_9 [10][DXF_MAX_STRING_LEN+1]; // Strings Gruppencodes 0..9
double F10_59 [50]; // Floats Gruppencodes 10..59
@@ -119,7 +119,7 @@ private:
};
-inline BOOL DXFGroupReader::GetStatus()
+inline sal_Bool DXFGroupReader::GetStatus()
{
return bStatus;
}
@@ -127,10 +127,10 @@ inline BOOL DXFGroupReader::GetStatus()
inline void DXFGroupReader::SetError()
{
- bStatus=FALSE;
+ bStatus=sal_False;
}
-inline USHORT DXFGroupReader::GetG()
+inline sal_uInt16 DXFGroupReader::GetG()
{
return nLastG;
}
diff --git a/filter/source/graphicfilter/idxf/dxfreprd.cxx b/filter/source/graphicfilter/idxf/dxfreprd.cxx
index 9d6494b87f9d..a1b73c6530ce 100644
--- a/filter/source/graphicfilter/idxf/dxfreprd.cxx
+++ b/filter/source/graphicfilter/idxf/dxfreprd.cxx
@@ -37,14 +37,14 @@
void DXFBoundingBox::Union(const DXFVector & rVector)
{
- if (bEmpty==TRUE) {
+ if (bEmpty==sal_True) {
fMinX=rVector.fx;
fMinY=rVector.fy;
fMinZ=rVector.fz;
fMaxX=rVector.fx;
fMaxY=rVector.fy;
fMaxZ=rVector.fz;
- bEmpty=FALSE;
+ bEmpty=sal_False;
}
else {
if (fMinX>rVector.fx) fMinX=rVector.fx;
@@ -63,11 +63,11 @@ void DXFBoundingBox::Union(const DXFVector & rVector)
DXFPalette::DXFPalette()
{
short i,j,nHue,nNSat,nVal,nC[3],nmax,nmed,nmin;
- BYTE nV;
+ sal_uInt8 nV;
- pRed =new BYTE[256];
- pGreen=new BYTE[256];
- pBlue =new BYTE[256];
+ pRed =new sal_uInt8[256];
+ pGreen=new sal_uInt8[256];
+ pBlue =new sal_uInt8[256];
// Farben 0 - 9 (normale Farben)
SetColor(0, 0x00, 0x00, 0x00); // eigentlich nie benutzt
@@ -105,15 +105,15 @@ DXFPalette::DXFPalette()
for (j=0; j<3; j++) nC[j]=(nC[j]>>1)+128;
}
for (j=0; j<3; j++) nC[j]=nC[j]*nVal/5;
- SetColor((BYTE)(i++),(BYTE)nC[0],(BYTE)nC[1],(BYTE)nC[2]);
+ SetColor((sal_uInt8)(i++),(sal_uInt8)nC[0],(sal_uInt8)nC[1],(sal_uInt8)nC[2]);
}
}
}
// Farben 250 - 255 (Grautoenne)
for (i=0; i<6; i++) {
- nV=(BYTE)(i*38+65);
- SetColor((BYTE)(250+i),nV,nV,nV);
+ nV=(sal_uInt8)(i*38+65);
+ SetColor((sal_uInt8)(250+i),nV,nV,nV);
}
}
@@ -126,7 +126,7 @@ DXFPalette::~DXFPalette()
}
-void DXFPalette::SetColor(BYTE nIndex, BYTE nRed, BYTE nGreen, BYTE nBlue)
+void DXFPalette::SetColor(sal_uInt8 nIndex, sal_uInt8 nRed, sal_uInt8 nGreen, sal_uInt8 nBlue)
{
pRed[nIndex]=nRed;
pGreen[nIndex]=nGreen;
@@ -149,10 +149,10 @@ DXFRepresentation::~DXFRepresentation()
}
-BOOL DXFRepresentation::Read( SvStream & rIStream, USHORT nMinPercent, USHORT nMaxPercent)
+sal_Bool DXFRepresentation::Read( SvStream & rIStream, sal_uInt16 nMinPercent, sal_uInt16 nMaxPercent)
{
DXFGroupReader * pDGR;
- BOOL bRes;
+ sal_Bool bRes;
aTables.Clear();
aBlocks.Clear();
@@ -180,7 +180,7 @@ BOOL DXFRepresentation::Read( SvStream & rIStream, USHORT nMinPercent, USHORT nM
delete pDGR;
- if (bRes==TRUE && aBoundingBox.bEmpty==TRUE)
+ if (bRes==sal_True && aBoundingBox.bEmpty==sal_True)
CalcBoundingBox(aEntities,aBoundingBox);
return bRes;
@@ -312,7 +312,7 @@ void DXFRepresentation::CalcBoundingBox(const DXFEntities & rEntities,
pB=aBlocks.Search(pE->sName);
if (pB==NULL) break;
CalcBoundingBox(*pB,aBox);
- if (aBox.bEmpty==TRUE) break;
+ if (aBox.bEmpty==sal_True) break;
aP.fx=(aBox.fMinX-pB->aBasePoint.fx)*pE->fXScale+pE->aP0.fx;
aP.fy=(aBox.fMinY-pB->aBasePoint.fy)*pE->fYScale+pE->aP0.fy;
aP.fz=(aBox.fMinZ-pB->aBasePoint.fz)*pE->fZScale+pE->aP0.fz;
@@ -354,7 +354,7 @@ void DXFRepresentation::CalcBoundingBox(const DXFEntities & rEntities,
pB=aBlocks.Search(pE->sPseudoBlock);
if (pB==NULL) break;
CalcBoundingBox(*pB,aBox);
- if (aBox.bEmpty==TRUE) break;
+ if (aBox.bEmpty==sal_True) break;
aP.fx=aBox.fMinX-pB->aBasePoint.fx;
aP.fy=aBox.fMinY-pB->aBasePoint.fy;
aP.fz=aBox.fMinZ-pB->aBasePoint.fz;
diff --git a/filter/source/graphicfilter/idxf/dxfreprd.hxx b/filter/source/graphicfilter/idxf/dxfreprd.hxx
index c95d65cfbe46..9ae6dd959359 100644
--- a/filter/source/graphicfilter/idxf/dxfreprd.hxx
+++ b/filter/source/graphicfilter/idxf/dxfreprd.hxx
@@ -40,7 +40,7 @@
class DXFBoundingBox {
public:
- BOOL bEmpty;
+ sal_Bool bEmpty;
double fMinX;
double fMinY;
double fMinZ;
@@ -48,7 +48,7 @@ public:
double fMaxY;
double fMaxZ;
- DXFBoundingBox() { bEmpty=TRUE; }
+ DXFBoundingBox() { bEmpty=sal_True; }
void Union(const DXFVector & rVector);
};
@@ -62,15 +62,15 @@ public:
DXFPalette();
~DXFPalette();
- BYTE GetRed(BYTE nIndex) const;
- BYTE GetGreen(BYTE nIndex) const;
- BYTE GetBlue(BYTE nIndex) const;
+ sal_uInt8 GetRed(sal_uInt8 nIndex) const;
+ sal_uInt8 GetGreen(sal_uInt8 nIndex) const;
+ sal_uInt8 GetBlue(sal_uInt8 nIndex) const;
private:
- BYTE * pRed;
- BYTE * pGreen;
- BYTE * pBlue;
- void SetColor(BYTE nIndex, BYTE nRed, BYTE nGreen, BYTE nBlue);
+ sal_uInt8 * pRed;
+ sal_uInt8 * pGreen;
+ sal_uInt8 * pBlue;
+ void SetColor(sal_uInt8 nIndex, sal_uInt8 nRed, sal_uInt8 nGreen, sal_uInt8 nBlue);
};
@@ -111,7 +111,7 @@ public:
double getGlobalLineTypeScale() const;
void setGlobalLineTypeScale(double fGlobalLineTypeScale);
- BOOL Read( SvStream & rIStream, USHORT nMinPercent, USHORT nMaxPercent);
+ sal_Bool Read( SvStream & rIStream, sal_uInt16 nMinPercent, sal_uInt16 nMaxPercent);
// Liesst die komplette DXF-Datei ein.
private:
@@ -125,9 +125,9 @@ private:
//-------------------inlines--------------------------------------------------
//----------------------------------------------------------------------------
-inline BYTE DXFPalette::GetRed(BYTE nIndex) const { return pRed[nIndex]; }
-inline BYTE DXFPalette::GetGreen(BYTE nIndex) const { return pGreen[nIndex]; }
-inline BYTE DXFPalette::GetBlue(BYTE nIndex) const { return pBlue[nIndex]; }
+inline sal_uInt8 DXFPalette::GetRed(sal_uInt8 nIndex) const { return pRed[nIndex]; }
+inline sal_uInt8 DXFPalette::GetGreen(sal_uInt8 nIndex) const { return pGreen[nIndex]; }
+inline sal_uInt8 DXFPalette::GetBlue(sal_uInt8 nIndex) const { return pBlue[nIndex]; }
inline rtl_TextEncoding DXFRepresentation::getTextEncoding() const { return mEnc; }
inline void DXFRepresentation::setTextEncoding(rtl_TextEncoding aEnc) { mEnc = aEnc; }
inline double DXFRepresentation::getGlobalLineTypeScale() const { return mfGlobalLineTypeScale; }
diff --git a/filter/source/graphicfilter/idxf/dxfvec.cxx b/filter/source/graphicfilter/idxf/dxfvec.cxx
index d71100cdc6b1..3ef2b4262ae2 100644
--- a/filter/source/graphicfilter/idxf/dxfvec.cxx
+++ b/filter/source/graphicfilter/idxf/dxfvec.cxx
@@ -174,7 +174,7 @@ void DXFTransform::TransDir(const DXFVector & rSrc, DXFVector & rTgt) const
}
-BOOL DXFTransform::TransCircleToEllipse(double fRadius, double & rEx, double & rEy) const
+sal_Bool DXFTransform::TransCircleToEllipse(double fRadius, double & rEx, double & rEy) const
{
double fMXAbs=aMX.Abs();
double fMYAbs=aMY.Abs();
@@ -185,22 +185,22 @@ BOOL DXFTransform::TransCircleToEllipse(double fRadius, double & rEx, double & r
{
rEx=fabs(aMX.fx*fRadius);
rEy=fabs(aMY.fy*fRadius);
- return TRUE;
+ return sal_True;
}
else if (fabs(aMX.fx)<=fNearNull && fabs(aMX.fz)<=fNearNull &&
fabs(aMY.fy)<=fNearNull && fabs(aMY.fz)<=fNearNull)
{
rEx=fabs(aMY.fx*fRadius);
rEy=fabs(aMX.fy*fRadius);
- return TRUE;
+ return sal_True;
}
else if (fabs(fMXAbs-fMYAbs)<=fNearNull &&
fabs(aMX.fz)<=fNearNull && fabs(aMY.fz)<=fNearNull)
{
rEx=rEy=fabs(((fMXAbs+fMYAbs)/2)*fRadius);
- return TRUE;
+ return sal_True;
}
- else return FALSE;
+ else return sal_False;
}
LineInfo DXFTransform::Transform(const DXFLineInfo& aDXFLineInfo) const
@@ -215,9 +215,9 @@ LineInfo DXFTransform::Transform(const DXFLineInfo& aDXFLineInfo) const
aLineInfo.SetStyle( aDXFLineInfo.eStyle );
aLineInfo.SetWidth( (sal_Int32) (aDXFLineInfo.fWidth * scale + 0.5) );
- aLineInfo.SetDashCount( static_cast< USHORT >( aDXFLineInfo.nDashCount ) );
+ aLineInfo.SetDashCount( static_cast< sal_uInt16 >( aDXFLineInfo.nDashCount ) );
aLineInfo.SetDashLen( (sal_Int32) (aDXFLineInfo.fDashLen * scale + 0.5) );
- aLineInfo.SetDotCount( static_cast< USHORT >( aDXFLineInfo.nDotCount ) );
+ aLineInfo.SetDotCount( static_cast< sal_uInt16 >( aDXFLineInfo.nDotCount ) );
aLineInfo.SetDotLen( (sal_Int32) (aDXFLineInfo.fDotLen * scale + 0.5) );
aLineInfo.SetDistance( (sal_Int32) (aDXFLineInfo.fDistance * scale + 0.5) );
@@ -230,7 +230,7 @@ LineInfo DXFTransform::Transform(const DXFLineInfo& aDXFLineInfo) const
return aLineInfo;
}
-ULONG DXFTransform::TransLineWidth(double fW) const
+sal_uLong DXFTransform::TransLineWidth(double fW) const
{
double fex,fey;
@@ -238,7 +238,7 @@ ULONG DXFTransform::TransLineWidth(double fW) const
fey=sqrt(aMY.fx*aMY.fx + aMY.fy*aMY.fy);
// ###
// printf("fex=%f fey=%f\n", fex, fey);
- return (ULONG)(fabs(fW)*(fex+fey)/2.0+0.5);
+ return (sal_uLong)(fabs(fW)*(fex+fey)/2.0+0.5);
}
@@ -247,8 +247,8 @@ double DXFTransform::CalcRotAngle() const
return atan2(aMX.fy,aMX.fx)/3.14159265359*180.0;
}
-BOOL DXFTransform::Mirror() const
+sal_Bool DXFTransform::Mirror() const
{
- if (aMZ.SProd(aMX*aMY)<0) return TRUE; else return FALSE;
+ if (aMZ.SProd(aMX*aMY)<0) return sal_True; else return sal_False;
}
diff --git a/filter/source/graphicfilter/idxf/dxfvec.hxx b/filter/source/graphicfilter/idxf/dxfvec.hxx
index 2f7734e5277f..c16cc395de37 100644
--- a/filter/source/graphicfilter/idxf/dxfvec.hxx
+++ b/filter/source/graphicfilter/idxf/dxfvec.hxx
@@ -99,8 +99,8 @@ public:
DXFVector Unit() const;
// Aequivalenz oder nicht:
- BOOL operator == (const DXFVector & rV) const;
- BOOL operator != (const DXFVector & rV) const;
+ sal_Bool operator == (const DXFVector & rV) const;
+ sal_Bool operator != (const DXFVector & rV) const;
};
//------------------------------------------------------------------------------
@@ -148,20 +148,20 @@ public:
void TransDir(const DXFVector & rSrc, DXFVector & rTgt) const;
// Transformation eines relativen Vektors (also kein Verschiebung)
- BOOL TransCircleToEllipse(double fRadius, double & rEx, double & rEy) const;
+ sal_Bool TransCircleToEllipse(double fRadius, double & rEx, double & rEy) const;
// Versucht, einen Kreis (in der XY-Ebene) zu transformieren, so dass eine
// ausgerichtete Ellipse entsteht. Wenn das nicht geht, weil Ellipse
- // in belibieger Lage entstehen wuerde, wird FALSE geliefert.
+ // in belibieger Lage entstehen wuerde, wird sal_False geliefert.
// (Der Mittelpunkt wird hiermit nicht transformiert, nehme Transform(..))
- ULONG TransLineWidth(double fW) const;
+ sal_uLong TransLineWidth(double fW) const;
// Transformiert die Liniendicke (so gut es geht)
double CalcRotAngle() const;
// Ermittelt den Rotationswinkel um die Z-Achse (in Grad)
- BOOL Mirror() const;
- // Liefert TRUE, wenn die Matrix ein Linkssystem bildet
+ sal_Bool Mirror() const;
+ // Liefert sal_True, wenn die Matrix ein Linkssystem bildet
LineInfo Transform(const DXFLineInfo& aDXFLineInfo) const;
// Transform to LineInfo
@@ -245,17 +245,17 @@ inline DXFVector DXFVector::operator * (double fs) const
}
-inline BOOL DXFVector::operator == (const DXFVector & rV) const
+inline sal_Bool DXFVector::operator == (const DXFVector & rV) const
{
- if (fx==rV.fx && fy==rV.fy && fz==rV.fz) return TRUE;
- else return FALSE;
+ if (fx==rV.fx && fy==rV.fy && fz==rV.fz) return sal_True;
+ else return sal_False;
}
-inline BOOL DXFVector::operator != (const DXFVector & rV) const
+inline sal_Bool DXFVector::operator != (const DXFVector & rV) const
{
- if (fx!=rV.fx || fy!=rV.fy || fz!=rV.fz) return TRUE;
- else return FALSE;
+ if (fx!=rV.fx || fy!=rV.fy || fz!=rV.fz) return sal_True;
+ else return sal_False;
}
#endif
diff --git a/filter/source/graphicfilter/idxf/idxf.cxx b/filter/source/graphicfilter/idxf/idxf.cxx
index da8f830d32d5..1ab612521224 100644
--- a/filter/source/graphicfilter/idxf/idxf.cxx
+++ b/filter/source/graphicfilter/idxf/idxf.cxx
@@ -37,17 +37,17 @@
//================== GraphicImport - die exportierte Funktion ================
-extern "C" BOOL __LOADONCALLAPI GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem*, BOOL )
+extern "C" sal_Bool __LOADONCALLAPI GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem*, sal_Bool )
{
DXFRepresentation aDXF;
DXF2GDIMetaFile aConverter;
GDIMetaFile aMTF;
- if ( aDXF.Read( rStream, 0, 60 ) == FALSE )
- return FALSE;
- if ( aConverter.Convert( aDXF, aMTF, 60, 100 ) == FALSE )
- return FALSE;
+ if ( aDXF.Read( rStream, 0, 60 ) == sal_False )
+ return sal_False;
+ if ( aConverter.Convert( aDXF, aMTF, 60, 100 ) == sal_False )
+ return sal_False;
rGraphic=Graphic(aMTF);
- return TRUE;
+ return sal_True;
}
diff --git a/filter/source/graphicfilter/ieps/ieps.cxx b/filter/source/graphicfilter/ieps/ieps.cxx
index caadcd4f3cdd..307f3a64a491 100644
--- a/filter/source/graphicfilter/ieps/ieps.cxx
+++ b/filter/source/graphicfilter/ieps/ieps.cxx
@@ -66,11 +66,11 @@
|*
*************************************************************************/
-static BYTE* ImplSearchEntry( BYTE* pSource, BYTE* pDest, ULONG nComp, ULONG nSize )
+static sal_uInt8* ImplSearchEntry( sal_uInt8* pSource, sal_uInt8* pDest, sal_uLong nComp, sal_uLong nSize )
{
while ( nComp-- >= nSize )
{
- ULONG i;
+ sal_uLong i;
for ( i = 0; i < nSize; i++ )
{
if ( ( pSource[i]&~0x20 ) != ( pDest[i]&~0x20 ) )
@@ -85,24 +85,24 @@ static BYTE* ImplSearchEntry( BYTE* pSource, BYTE* pDest, ULONG nComp, ULONG nSi
//--------------------------------------------------------------------------
// SecurityCount is the buffersize of the buffer in which we will parse for a number
-static long ImplGetNumber( BYTE **pBuf, int& nSecurityCount )
+static long ImplGetNumber( sal_uInt8 **pBuf, int& nSecurityCount )
{
- BOOL bValid = TRUE;
- BOOL bNegative = FALSE;
+ sal_Bool bValid = sal_True;
+ sal_Bool bNegative = sal_False;
long nRetValue = 0;
while ( ( --nSecurityCount ) && ( ( **pBuf == ' ' ) || ( **pBuf == 0x9 ) ) )
(*pBuf)++;
- BYTE nByte = **pBuf;
+ sal_uInt8 nByte = **pBuf;
while ( nSecurityCount && ( nByte != ' ' ) && ( nByte != 0x9 ) && ( nByte != 0xd ) && ( nByte != 0xa ) )
{
switch ( nByte )
{
case '.' :
// we'll only use the integer format
- bValid = FALSE;
+ bValid = sal_False;
break;
case '-' :
- bNegative = TRUE;
+ bNegative = sal_True;
break;
default :
if ( ( nByte < '0' ) || ( nByte > '9' ) )
@@ -124,12 +124,12 @@ static long ImplGetNumber( BYTE **pBuf, int& nSecurityCount )
//--------------------------------------------------------------------------
-static int ImplGetLen( BYTE* pBuf, int nMax )
+static int ImplGetLen( sal_uInt8* pBuf, int nMax )
{
int nLen = 0;
while( nLen != nMax )
{
- BYTE nDat = *pBuf++;
+ sal_uInt8 nDat = *pBuf++;
if ( nDat == 0x0a || nDat == 0x25 )
break;
nLen++;
@@ -151,7 +151,7 @@ static void MakeAsMeta(Graphic &rGraphic)
aSize = Application::GetDefaultDevice()->LogicToLogic( aSize,
aBmp.GetPrefMapMode(), MAP_100TH_MM );
- aVDev.EnableOutput( FALSE );
+ aVDev.EnableOutput( sal_False );
aMtf.Record( &aVDev );
aVDev.DrawBitmap( Point(), aSize, rGraphic.GetBitmap() );
aMtf.Stop();
@@ -410,7 +410,7 @@ void CreateMtfReplacementAction( GDIMetaFile& rMtf, SvStream& rStrm, sal_uInt32
aReplacement.Write( pBuf, nSizeTIFF );
delete[] pBuf;
}
- rMtf.AddAction( (MetaAction*)( new MetaCommentAction( aComment, 0, (const BYTE*)aReplacement.GetData(), aReplacement.Tell() ) ) );
+ rMtf.AddAction( (MetaAction*)( new MetaCommentAction( aComment, 0, (const sal_uInt8*)aReplacement.GetData(), aReplacement.Tell() ) ) );
}
else
rMtf.AddAction( (MetaAction*)( new MetaCommentAction( aComment, 0, NULL, 0 ) ) );
@@ -424,7 +424,7 @@ void MakePreview(sal_uInt8* pBuf, sal_uInt32 nBytesRead,
VirtualDevice aVDev;
Font aFont;
- aVDev.EnableOutput( FALSE );
+ aVDev.EnableOutput( sal_False );
aMtf.Record( &aVDev );
aVDev.SetLineColor( Color( COL_RED ) );
aVDev.SetFillColor();
@@ -440,14 +440,14 @@ void MakePreview(sal_uInt8* pBuf, sal_uInt32 nBytesRead,
String aString;
int nLen;
- BYTE* pDest = ImplSearchEntry( pBuf, (BYTE*)"%%Title:", nBytesRead - 32, 8 );
+ sal_uInt8* pDest = ImplSearchEntry( pBuf, (sal_uInt8*)"%%Title:", nBytesRead - 32, 8 );
if ( pDest )
{
pDest += 8;
if ( *pDest == ' ' )
pDest++;
nLen = ImplGetLen( pDest, 32 );
- BYTE aOldValue(pDest[ nLen ]); pDest[ nLen ] = 0;
+ sal_uInt8 aOldValue(pDest[ nLen ]); pDest[ nLen ] = 0;
if ( strcmp( (const char*)pDest, "none" ) != 0 )
{
aString.AppendAscii( " Title:" );
@@ -456,27 +456,27 @@ void MakePreview(sal_uInt8* pBuf, sal_uInt32 nBytesRead,
}
pDest[ nLen ] = aOldValue;
}
- pDest = ImplSearchEntry( pBuf, (BYTE*)"%%Creator:", nBytesRead - 32, 10 );
+ pDest = ImplSearchEntry( pBuf, (sal_uInt8*)"%%Creator:", nBytesRead - 32, 10 );
if ( pDest )
{
pDest += 10;
if ( *pDest == ' ' )
pDest++;
nLen = ImplGetLen( pDest, 32 );
- BYTE aOldValue(pDest[ nLen ]); pDest[ nLen ] = 0;
+ sal_uInt8 aOldValue(pDest[ nLen ]); pDest[ nLen ] = 0;
aString.AppendAscii( " Creator:" );
aString.AppendAscii( (char*)pDest );
aString.AppendAscii( "\n" );
pDest[ nLen ] = aOldValue;
}
- pDest = ImplSearchEntry( pBuf, (BYTE*)"%%CreationDate:", nBytesRead - 32, 15 );
+ pDest = ImplSearchEntry( pBuf, (sal_uInt8*)"%%CreationDate:", nBytesRead - 32, 15 );
if ( pDest )
{
pDest += 15;
if ( *pDest == ' ' )
pDest++;
nLen = ImplGetLen( pDest, 32 );
- BYTE aOldValue(pDest[ nLen ]); pDest[ nLen ] = 0;
+ sal_uInt8 aOldValue(pDest[ nLen ]); pDest[ nLen ] = 0;
if ( strcmp( (const char*)pDest, "none" ) != 0 )
{
aString.AppendAscii( " CreationDate:" );
@@ -485,13 +485,13 @@ void MakePreview(sal_uInt8* pBuf, sal_uInt32 nBytesRead,
}
pDest[ nLen ] = aOldValue;
}
- pDest = ImplSearchEntry( pBuf, (BYTE*)"%%LanguageLevel:", nBytesRead - 4, 16 );
+ pDest = ImplSearchEntry( pBuf, (sal_uInt8*)"%%LanguageLevel:", nBytesRead - 4, 16 );
if ( pDest )
{
pDest += 16;
int nCount = 4;
long nNumber = ImplGetNumber( &pDest, nCount );
- if ( nCount && ( (UINT32)nNumber < 10 ) )
+ if ( nCount && ( (sal_uInt32)nNumber < 10 ) )
{
aString.AppendAscii( " LanguageLevel:" );
aString.Append( UniString::CreateFromInt32( nNumber ) );
@@ -510,13 +510,13 @@ void MakePreview(sal_uInt8* pBuf, sal_uInt32 nBytesRead,
//================== GraphicImport - die exportierte Funktion ================
#ifdef WNT
-extern "C" BOOL _cdecl GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem*, BOOL)
+extern "C" sal_Bool _cdecl GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem*, sal_Bool)
#else
-extern "C" BOOL GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem*, BOOL)
+extern "C" sal_Bool GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem*, sal_Bool)
#endif
{
if ( rStream.GetError() )
- return FALSE;
+ return sal_False;
Graphic aGraphic;
sal_Bool bRetValue = sal_False;
@@ -543,7 +543,7 @@ extern "C" BOOL GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConf
{
rStream.Seek( nOrigPos + nPosWMF );
if ( GraphicConverter::Import( rStream, aGraphic, CVT_WMF ) == ERRCODE_NONE )
- bHasPreview = bRetValue = TRUE;
+ bHasPreview = bRetValue = sal_True;
}
}
else
@@ -559,7 +559,7 @@ extern "C" BOOL GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConf
{
MakeAsMeta(aGraphic);
rStream.Seek( nOrigPos + nPosTIFF );
- bHasPreview = bRetValue = TRUE;
+ bHasPreview = bRetValue = sal_True;
}
}
}
@@ -572,8 +572,8 @@ extern "C" BOOL GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConf
sal_uInt8* pHeader = new sal_uInt8[ 22 ];
rStream.Seek( nPSStreamPos );
rStream.Read( pHeader, 22 ); // check PostScript header
- if ( ImplSearchEntry( pHeader, (BYTE*)"%!PS-Adobe", 10, 10 ) &&
- ImplSearchEntry( &pHeader[ 15 ], (BYTE*)"EPS", 3, 3 ) )
+ if ( ImplSearchEntry( pHeader, (sal_uInt8*)"%!PS-Adobe", 10, 10 ) &&
+ ImplSearchEntry( &pHeader[ 15 ], (sal_uInt8*)"EPS", 3, 3 ) )
{
rStream.Seek( nPSStreamPos );
sal_uInt8* pBuf = new sal_uInt8[ nPSSize ];
@@ -586,7 +586,7 @@ extern "C" BOOL GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConf
int nSecurityCount = 32;
if ( !bHasPreview ) // if there is no tiff/wmf preview, we will parse for an preview in the eps prolog
{
- BYTE* pDest = ImplSearchEntry( pBuf, (BYTE*)"%%BeginPreview:", nBytesRead - 32, 15 );
+ sal_uInt8* pDest = ImplSearchEntry( pBuf, (sal_uInt8*)"%%BeginPreview:", nBytesRead - 32, 15 );
if ( pDest )
{
pDest += 15;
@@ -594,7 +594,7 @@ extern "C" BOOL GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConf
long nHeight = ImplGetNumber( &pDest, nSecurityCount );
long nBitDepth = ImplGetNumber( &pDest, nSecurityCount );
long nScanLines = ImplGetNumber( &pDest, nSecurityCount );
- pDest = ImplSearchEntry( pDest, (BYTE*)"%", 16, 1 ); // go to the first Scanline
+ pDest = ImplSearchEntry( pDest, (sal_uInt8*)"%", 16, 1 ); // go to the first Scanline
if ( nSecurityCount && pDest && nWidth && nHeight && ( ( nBitDepth == 1 ) || ( nBitDepth == 8 ) ) && nScanLines )
{
rStream.Seek( nBufStartPos + ( pDest - pBuf ) );
@@ -604,8 +604,8 @@ extern "C" BOOL GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConf
if ( pAcc )
{
int nBitsLeft;
- BOOL bIsValid = TRUE;
- BYTE nDat = 0;
+ sal_Bool bIsValid = sal_True;
+ sal_uInt8 nDat = 0;
char nByte;
for ( long y = 0; bIsValid && ( y < nHeight ); y++ )
{
@@ -621,7 +621,7 @@ extern "C" BOOL GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConf
{
case 0x0a :
if ( --nScanLines < 0 )
- bIsValid = FALSE;
+ bIsValid = sal_False;
case 0x09 :
case 0x0d :
case 0x20 :
@@ -636,7 +636,7 @@ extern "C" BOOL GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConf
nByte &=~0x20; // case none sensitive for hexadezimal values
nByte -= ( 'A' - 10 );
if ( nByte > 15 )
- bIsValid = FALSE;
+ bIsValid = sal_False;
}
else
nByte -= '0';
@@ -645,14 +645,14 @@ extern "C" BOOL GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConf
nDat |= ( nByte ^ 0xf ); // in epsi a zero bit represents white color
}
else
- bIsValid = FALSE;
+ bIsValid = sal_False;
}
break;
}
}
}
if ( nBitDepth == 1 )
- pAcc->SetPixel( y, x, sal::static_int_cast< BYTE >(( nDat >> nBitsLeft ) & 1) );
+ pAcc->SetPixel( y, x, sal::static_int_cast< sal_uInt8 >(( nDat >> nBitsLeft ) & 1) );
else
{
pAcc->SetPixel( y, x, ( nDat ) ? 1 : 0 ); // nBitDepth == 8
@@ -665,7 +665,7 @@ extern "C" BOOL GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConf
VirtualDevice aVDev;
GDIMetaFile aMtf;
Size aSize;
- aVDev.EnableOutput( FALSE );
+ aVDev.EnableOutput( sal_False );
aMtf.Record( &aVDev );
aSize = aBitmap.GetPrefSize();
if( !aSize.Width() || !aSize.Height() )
@@ -678,7 +678,7 @@ extern "C" BOOL GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConf
aMtf.SetPrefMapMode( MAP_100TH_MM );
aMtf.SetPrefSize( aSize );
aGraphic = aMtf;
- bHasPreview = bRetValue = TRUE;
+ bHasPreview = bRetValue = sal_True;
}
aBitmap.ReleaseAccess( pAcc );
}
@@ -686,7 +686,7 @@ extern "C" BOOL GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConf
}
}
- BYTE* pDest = ImplSearchEntry( pBuf, (BYTE*)"%%BoundingBox:", nBytesRead, 14 );
+ sal_uInt8* pDest = ImplSearchEntry( pBuf, (sal_uInt8*)"%%BoundingBox:", nBytesRead, 14 );
if ( pDest )
{
nSecurityCount = 100;
@@ -700,7 +700,7 @@ extern "C" BOOL GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConf
if ( nSecurityCount)
{
bGraphicLinkCreated = sal_True;
- GfxLink aGfxLink( pBuf, nPSSize, GFX_LINK_TYPE_EPS_BUFFER, TRUE ) ;
+ GfxLink aGfxLink( pBuf, nPSSize, GFX_LINK_TYPE_EPS_BUFFER, sal_True ) ;
GDIMetaFile aMtf;
long nWidth = nNumb[2] - nNumb[0] + 1;
diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx
index e0ffce9c6081..248bd97f1b83 100644
--- a/filter/source/graphicfilter/ios2met/ios2met.cxx
+++ b/filter/source/graphicfilter/ios2met/ios2met.cxx
@@ -219,19 +219,19 @@ enum PenStyle { PEN_NULL, PEN_SOLID, PEN_DOT, PEN_DASH, PEN_DASHDOT };
struct OSPalette {
OSPalette * pSucc;
sal_uInt32 * p0RGB; // Darf auch NULL sein!
- USHORT nSize;
+ sal_uInt16 nSize;
};
struct OSArea {
OSArea * pSucc;
- BYTE nFlags;
+ sal_uInt8 nFlags;
PolyPolygon aPPoly;
- BOOL bClosed;
+ sal_Bool bClosed;
Color aCol;
Color aBgCol;
RasterOp eMix;
RasterOp eBgMix;
- BOOL bFill;
+ sal_Bool bFill;
OSArea(){} ~OSArea(){}
};
@@ -240,8 +240,8 @@ struct OSPath
OSPath* pSucc;
sal_uInt32 nID;
PolyPolygon aPPoly;
- BOOL bClosed;
- BOOL bStroke;
+ sal_Bool bClosed;
+ sal_Bool bStroke;
OSPath(){}
~OSPath(){}
@@ -249,28 +249,28 @@ struct OSPath
struct OSFont {
OSFont * pSucc;
- ULONG nID;
+ sal_uLong nID;
Font aFont;
OSFont(){} ~OSFont(){}
};
struct OSBitmap {
OSBitmap * pSucc;
- ULONG nID;
+ sal_uLong nID;
Bitmap aBitmap;
// Waehrend des Lesens der Bitmap benoetigt:
SvStream * pBMP; // Zeiger auf temporaere Windows-BMP-Datei oder NULL
sal_uInt32 nWidth, nHeight;
- USHORT nBitsPerPixel;
- ULONG nMapPos;
+ sal_uInt16 nBitsPerPixel;
+ sal_uLong nMapPos;
OSBitmap(){} ~OSBitmap(){}
};
struct OSAttr {
OSAttr * pSucc;
- USHORT nPushOrder;
- BYTE nIvAttrA, nIvAttrP; // Spezialvariablen fuer den Order "GOrdPIvAtr"
+ sal_uInt16 nPushOrder;
+ sal_uInt8 nIvAttrA, nIvAttrP; // Spezialvariablen fuer den Order "GOrdPIvAtr"
Color aLinCol;
Color aLinBgCol;
@@ -296,29 +296,29 @@ struct OSAttr {
short nChrAng;
// long nChrBreakExtra;
Size aChrCellSize;
-// BYTE nChrDir;
+// sal_uInt8 nChrDir;
// long nChrExtra;
-// BYTE nChrPrec;
- ULONG nChrSet;
+// sal_uInt8 nChrPrec;
+ sal_uLong nChrSet;
// Size aChrShear;
Point aCurPos;
// long nFracLinWidth;
-// BYTE nLinEnd;
-// BYTE nLinJoin;
+// sal_uInt8 nLinEnd;
+// sal_uInt8 nLinJoin;
PenStyle eLinStyle;
- USHORT nLinWidth;
+ sal_uInt16 nLinWidth;
Size aMrkCellSize;
- BYTE nMrkPrec;
- BYTE nMrkSet;
- BYTE nMrkSymbol;
+ sal_uInt8 nMrkPrec;
+ sal_uInt8 nMrkSet;
+ sal_uInt8 nMrkSymbol;
// //... aModTransform;
// Point aPatRef;
-// BYTE nPatSet;
- BOOL bFill;
-// ULONG nPickId;
+// sal_uInt8 nPatSet;
+ sal_Bool bFill;
+// sal_uLong nPickId;
// //... aSegBound;
- USHORT nStrLinWidth;
-// BYTE nTxtAlignHor,nTxtAlignVer;
+ sal_uInt16 nStrLinWidth;
+// sal_uInt8 nTxtAlignHor,nTxtAlignVer;
// //... aViewTransform;
// //... aViewWindow;
OSAttr(){} ~OSAttr(){}
@@ -334,12 +334,12 @@ private:
VirtualDevice * pVirDev; // Hier werden die Drawing-Methoden aufgerufen.
// Dabei findet ein Recording in das GDIMetaFile
// statt.
- ULONG nOrigPos; // Anfaengliche Position in pOS2MET
- UINT16 nOrigNumberFormat; // Anfaengliches Nummern-Format von pOS2MET
+ sal_uLong nOrigPos; // Anfaengliche Position in pOS2MET
+ sal_uInt16 nOrigNumberFormat; // Anfaengliches Nummern-Format von pOS2MET
Rectangle aBoundingRect; // Boundingrectangle wie in Datei angegeben
Rectangle aCalcBndRect; // selbst ermitteltes Boundingrectangle
MapMode aGlobMapMode; // Aufloesung des Bildes
- BOOL bCoord32;
+ sal_Bool bCoord32;
OSPalette * pPaletteStack;
@@ -360,53 +360,53 @@ private:
SvStream * pOrdFile;
- BOOL Callback(USHORT nPercent);
+ sal_Bool Callback(sal_uInt16 nPercent);
void AddPointsToPath(const Polygon & rPoly);
void AddPointsToArea(const Polygon & rPoly);
void CloseFigure();
- void PushAttr(USHORT nPushOrder);
+ void PushAttr(sal_uInt16 nPushOrder);
void PopAttr();
- void ChangeBrush( const Color& rPatColor, const Color& rBGColor, BOOL bFill );
- void SetPen( const Color& rColor, USHORT nStrLinWidth = 0, PenStyle ePenStyle = PEN_SOLID );
+ void ChangeBrush( const Color& rPatColor, const Color& rBGColor, sal_Bool bFill );
+ void SetPen( const Color& rColor, sal_uInt16 nStrLinWidth = 0, PenStyle ePenStyle = PEN_SOLID );
void SetRasterOp(RasterOp eROP);
- void SetPalette0RGB(USHORT nIndex, ULONG nCol);
+ void SetPalette0RGB(sal_uInt16 nIndex, sal_uLong nCol);
sal_uInt32 GetPalette0RGB(sal_uInt32 nIndex);
// Holt Farbe aus der Palette, oder, wenn nicht vorhanden,
// interpretiert nIndex als direkten RGB-Wert.
Color GetPaletteColor(sal_uInt32 nIndex);
- BOOL IsLineInfo();
+ sal_Bool IsLineInfo();
void DrawPolyLine( const Polygon& rPolygon );
void DrawPolygon( const Polygon& rPolygon );
void DrawPolyPolygon( const PolyPolygon& rPolygon );
- USHORT ReadBigEndianWord();
- ULONG ReadBigEndian3BytesLong();
- ULONG ReadLittleEndian3BytesLong();
- long ReadCoord(BOOL b32);
- Point ReadPoint( const BOOL bAdjustBoundRect = TRUE );
- RasterOp OS2MixToRasterOp(BYTE nMix);
- void ReadLine(BOOL bGivenPos, USHORT nOrderLen);
- void ReadRelLine(BOOL bGivenPos, USHORT nOrderLen);
- void ReadBox(BOOL bGivenPos);
+ sal_uInt16 ReadBigEndianWord();
+ sal_uLong ReadBigEndian3BytesLong();
+ sal_uLong ReadLittleEndian3BytesLong();
+ long ReadCoord(sal_Bool b32);
+ Point ReadPoint( const sal_Bool bAdjustBoundRect = sal_True );
+ RasterOp OS2MixToRasterOp(sal_uInt8 nMix);
+ void ReadLine(sal_Bool bGivenPos, sal_uInt16 nOrderLen);
+ void ReadRelLine(sal_Bool bGivenPos, sal_uInt16 nOrderLen);
+ void ReadBox(sal_Bool bGivenPos);
void ReadBitBlt();
- void ReadChrStr(BOOL bGivenPos, BOOL bMove, BOOL bExtra, USHORT nOrderLen);
- void ReadArc(BOOL bGivenPos);
- void ReadFullArc(BOOL bGivenPos, USHORT nOrderSize);
- void ReadPartialArc(BOOL bGivenPos, USHORT nOrderSize);
+ void ReadChrStr(sal_Bool bGivenPos, sal_Bool bMove, sal_Bool bExtra, sal_uInt16 nOrderLen);
+ void ReadArc(sal_Bool bGivenPos);
+ void ReadFullArc(sal_Bool bGivenPos, sal_uInt16 nOrderSize);
+ void ReadPartialArc(sal_Bool bGivenPos, sal_uInt16 nOrderSize);
void ReadPolygons();
- void ReadBezier(BOOL bGivenPos, USHORT nOrderLen);
- void ReadFillet(BOOL bGivenPos, USHORT nOrderLen);
- void ReadFilletSharp(BOOL bGivenPos, USHORT nOrderLen);
- void ReadMarker(BOOL bGivenPos, USHORT nOrderLen);
- void ReadOrder(USHORT nOrderID, USHORT nOrderLen);
- void ReadDsc(USHORT nDscID, USHORT nDscLen);
- void ReadImageData(USHORT nDataID, USHORT nDataLen);
- void ReadFont(USHORT nFieldSize);
- void ReadField(USHORT nFieldType, USHORT nFieldSize);
+ void ReadBezier(sal_Bool bGivenPos, sal_uInt16 nOrderLen);
+ void ReadFillet(sal_Bool bGivenPos, sal_uInt16 nOrderLen);
+ void ReadFilletSharp(sal_Bool bGivenPos, sal_uInt16 nOrderLen);
+ void ReadMarker(sal_Bool bGivenPos, sal_uInt16 nOrderLen);
+ void ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen);
+ void ReadDsc(sal_uInt16 nDscID, sal_uInt16 nDscLen);
+ void ReadImageData(sal_uInt16 nDataID, sal_uInt16 nDataLen);
+ void ReadFont(sal_uInt16 nFieldSize);
+ void ReadField(sal_uInt16 nFieldType, sal_uInt16 nFieldSize);
public:
@@ -420,17 +420,17 @@ public:
//=================== Methoden von OS2METReader ==============================
-BOOL OS2METReader::Callback(USHORT /*nPercent*/)
+sal_Bool OS2METReader::Callback(sal_uInt16 /*nPercent*/)
{
/*
if (pCallback!=NULL) {
- if (((*pCallback)(pCallerData,nPercent))==TRUE) {
+ if (((*pCallback)(pCallerData,nPercent))==sal_True) {
pOS2MET->SetError(SVSTREAM_FILEFORMAT_ERROR);
- return TRUE;
+ return sal_True;
}
}
*/
- return FALSE;
+ return sal_False;
}
OS2METReader::OS2METReader()
@@ -441,7 +441,7 @@ OS2METReader::~OS2METReader()
{
}
-BOOL OS2METReader::IsLineInfo()
+sal_Bool OS2METReader::IsLineInfo()
{
return ( ! ( aLineInfo.IsDefault() || ( aLineInfo.GetStyle() == LINE_NONE ) || ( pVirDev->GetLineColor() == COL_TRANSPARENT ) ) );
}
@@ -476,7 +476,7 @@ void OS2METReader::DrawPolyPolygon( const PolyPolygon& rPolyPolygon )
pVirDev->SetLineColor( COL_TRANSPARENT );
pVirDev->DrawPolyPolygon( rPolyPolygon );
pVirDev->Pop();
- for ( USHORT i = 0; i < rPolyPolygon.Count(); i++ )
+ for ( sal_uInt16 i = 0; i < rPolyPolygon.Count(); i++ )
pVirDev->DrawPolyLine( rPolyPolygon.GetObject( i ), aLineInfo );
}
else
@@ -485,11 +485,11 @@ void OS2METReader::DrawPolyPolygon( const PolyPolygon& rPolyPolygon )
void OS2METReader::AddPointsToArea(const Polygon & rPoly)
{
- USHORT nOldSize, nNewSize,i;
+ sal_uInt16 nOldSize, nNewSize,i;
if (pAreaStack==NULL || rPoly.GetSize()==0) return;
PolyPolygon * pPP=&(pAreaStack->aPPoly);
- if (pPP->Count()==0 || pAreaStack->bClosed==TRUE) pPP->Insert(rPoly);
+ if (pPP->Count()==0 || pAreaStack->bClosed==sal_True) pPP->Insert(rPoly);
else {
Polygon aLastPoly(pPP->GetObject(pPP->Count()-1));
nOldSize=aLastPoly.GetSize();
@@ -501,16 +501,16 @@ void OS2METReader::AddPointsToArea(const Polygon & rPoly)
}
pPP->Replace(aLastPoly,pPP->Count()-1);
}
- pAreaStack->bClosed=FALSE;
+ pAreaStack->bClosed=sal_False;
}
void OS2METReader::AddPointsToPath(const Polygon & rPoly)
{
- USHORT nOldSize, nNewSize,i;
+ sal_uInt16 nOldSize, nNewSize,i;
if (pPathStack==NULL || rPoly.GetSize()==0) return;
PolyPolygon * pPP=&(pPathStack->aPPoly);
- if (pPP->Count()==0 /*|| pPathStack->bClosed==TRUE*/) pPP->Insert(rPoly);
+ if (pPP->Count()==0 /*|| pPathStack->bClosed==sal_True*/) pPP->Insert(rPoly);
else {
Polygon aLastPoly(pPP->GetObject(pPP->Count()-1));
nOldSize=aLastPoly.GetSize();
@@ -525,16 +525,16 @@ void OS2METReader::AddPointsToPath(const Polygon & rPoly)
pPP->Replace(aLastPoly,pPP->Count()-1);
}
}
- pPathStack->bClosed=FALSE;
+ pPathStack->bClosed=sal_False;
}
void OS2METReader::CloseFigure()
{
- if (pAreaStack!=NULL) pAreaStack->bClosed=TRUE;
- else if (pPathStack!=NULL) pPathStack->bClosed=TRUE;
+ if (pAreaStack!=NULL) pAreaStack->bClosed=sal_True;
+ else if (pPathStack!=NULL) pPathStack->bClosed=sal_True;
}
-void OS2METReader::PushAttr(USHORT nPushOrder)
+void OS2METReader::PushAttr(sal_uInt16 nPushOrder)
{
OSAttr * p;
p=new OSAttr;
@@ -651,7 +651,7 @@ void OS2METReader::PopAttr()
delete p;
}
-void OS2METReader::ChangeBrush(const Color& rPatColor, const Color& /*rBGColor*/, BOOL bFill )
+void OS2METReader::ChangeBrush(const Color& rPatColor, const Color& /*rBGColor*/, sal_Bool bFill )
{
Color aColor;
@@ -664,7 +664,7 @@ void OS2METReader::ChangeBrush(const Color& rPatColor, const Color& /*rBGColor*/
pVirDev->SetFillColor( aColor );
}
-void OS2METReader::SetPen( const Color& rColor, USHORT nLineWidth, PenStyle ePenStyle )
+void OS2METReader::SetPen( const Color& rColor, sal_uInt16 nLineWidth, PenStyle ePenStyle )
{
LineStyle eLineStyle( LINE_SOLID );
@@ -672,8 +672,8 @@ void OS2METReader::SetPen( const Color& rColor, USHORT nLineWidth, PenStyle ePen
pVirDev->SetLineColor( rColor );
aLineInfo.SetWidth( nLineWidth );
- USHORT nDotCount = 0;
- USHORT nDashCount = 0;
+ sal_uInt16 nDotCount = 0;
+ sal_uInt16 nDashCount = 0;
switch ( ePenStyle )
{
case PEN_NULL :
@@ -705,7 +705,7 @@ void OS2METReader::SetRasterOp(RasterOp eROP)
}
-void OS2METReader::SetPalette0RGB(USHORT nIndex, ULONG nCol)
+void OS2METReader::SetPalette0RGB(sal_uInt16 nIndex, sal_uLong nCol)
{
if (pPaletteStack==NULL) {
pPaletteStack=new OSPalette;
@@ -715,7 +715,7 @@ void OS2METReader::SetPalette0RGB(USHORT nIndex, ULONG nCol)
}
if (pPaletteStack->p0RGB==NULL || nIndex>=pPaletteStack->nSize) {
sal_uInt32 * pOld0RGB=pPaletteStack->p0RGB;
- USHORT i,nOldSize=pPaletteStack->nSize;
+ sal_uInt16 i,nOldSize=pPaletteStack->nSize;
if (pOld0RGB==NULL) nOldSize=0;
pPaletteStack->nSize=2*(nIndex+1);
if (pPaletteStack->nSize<256) pPaletteStack->nSize=256;
@@ -740,37 +740,37 @@ sal_uInt32 OS2METReader::GetPalette0RGB(sal_uInt32 nIndex)
Color OS2METReader::GetPaletteColor(sal_uInt32 nIndex)
{
nIndex=GetPalette0RGB(nIndex);
- return Color(sal::static_int_cast< UINT8 >((nIndex>>16)&0xff),
- sal::static_int_cast< UINT8 >((nIndex>>8)&0xff),
- sal::static_int_cast< UINT8 >(nIndex&0xff));
+ return Color(sal::static_int_cast< sal_uInt8 >((nIndex>>16)&0xff),
+ sal::static_int_cast< sal_uInt8 >((nIndex>>8)&0xff),
+ sal::static_int_cast< sal_uInt8 >(nIndex&0xff));
}
-USHORT OS2METReader::ReadBigEndianWord()
+sal_uInt16 OS2METReader::ReadBigEndianWord()
{
- BYTE nLo,nHi;
+ sal_uInt8 nLo,nHi;
*pOS2MET >> nHi >> nLo;
- return (((USHORT)nHi)<<8)|(((USHORT)nLo)&0x00ff);
+ return (((sal_uInt16)nHi)<<8)|(((sal_uInt16)nLo)&0x00ff);
}
-ULONG OS2METReader::ReadBigEndian3BytesLong()
+sal_uLong OS2METReader::ReadBigEndian3BytesLong()
{
- USHORT nLo;
- BYTE nHi;
+ sal_uInt16 nLo;
+ sal_uInt8 nHi;
*pOS2MET >> nHi;
nLo=ReadBigEndianWord();
- return ((((ULONG)nHi)<<16)&0x00ff0000)|((ULONG)nLo);
+ return ((((sal_uLong)nHi)<<16)&0x00ff0000)|((sal_uLong)nLo);
}
-ULONG OS2METReader::ReadLittleEndian3BytesLong()
+sal_uLong OS2METReader::ReadLittleEndian3BytesLong()
{
- BYTE nHi,nMed,nLo;
+ sal_uInt8 nHi,nMed,nLo;
*pOS2MET >> nLo >> nMed >> nHi;
- return ((((ULONG)nHi)&0xff)<<16)|((((ULONG)nMed)&0xff)<<8)|(((ULONG)nLo)&0xff);
+ return ((((sal_uLong)nHi)&0xff)<<16)|((((sal_uLong)nMed)&0xff)<<8)|(((sal_uLong)nLo)&0xff);
}
-long OS2METReader::ReadCoord(BOOL b32)
+long OS2METReader::ReadCoord(sal_Bool b32)
{
long l;
short s;
@@ -780,7 +780,7 @@ long OS2METReader::ReadCoord(BOOL b32)
return l;
}
-Point OS2METReader::ReadPoint( const BOOL bAdjustBoundRect )
+Point OS2METReader::ReadPoint( const sal_Bool bAdjustBoundRect )
{
long x,y;
@@ -795,7 +795,7 @@ Point OS2METReader::ReadPoint( const BOOL bAdjustBoundRect )
return Point(x,y);
}
-RasterOp OS2METReader::OS2MixToRasterOp(BYTE nMix)
+RasterOp OS2METReader::OS2MixToRasterOp(sal_uInt8 nMix)
{
switch (nMix) {
case 0x0c: return ROP_INVERT;
@@ -805,9 +805,9 @@ RasterOp OS2METReader::OS2MixToRasterOp(BYTE nMix)
}
}
-void OS2METReader::ReadLine(BOOL bGivenPos, USHORT nOrderLen)
+void OS2METReader::ReadLine(sal_Bool bGivenPos, sal_uInt16 nOrderLen)
{
- USHORT i,nPolySize;
+ sal_uInt16 i,nPolySize;
if (bCoord32) nPolySize=nOrderLen/8; else nPolySize=nOrderLen/4;
if (!bGivenPos) nPolySize++;
@@ -828,9 +828,9 @@ void OS2METReader::ReadLine(BOOL bGivenPos, USHORT nOrderLen)
}
}
-void OS2METReader::ReadRelLine(BOOL bGivenPos, USHORT nOrderLen)
+void OS2METReader::ReadRelLine(sal_Bool bGivenPos, sal_uInt16 nOrderLen)
{
- USHORT i,nPolySize;
+ sal_uInt16 i,nPolySize;
Point aP0;
@@ -844,11 +844,11 @@ void OS2METReader::ReadRelLine(BOOL bGivenPos, USHORT nOrderLen)
Polygon aPolygon(nPolySize);
for (i=0; i<nPolySize; i++) {
#if defined SOLARIS && defined PPC
- UINT8 nunsignedbyte;
- *pOS2MET >> nunsignedbyte; aP0.X()+=(INT8)nunsignedbyte;
- *pOS2MET >> nunsignedbyte; aP0.Y()+=(INT8)nunsignedbyte;
+ sal_uInt8 nunsignedbyte;
+ *pOS2MET >> nunsignedbyte; aP0.X()+=(sal_Int8)nunsignedbyte;
+ *pOS2MET >> nunsignedbyte; aP0.Y()+=(sal_Int8)nunsignedbyte;
#else
- INT8 nsignedbyte;
+ sal_Int8 nsignedbyte;
*pOS2MET >> nsignedbyte; aP0.X()+=(long)nsignedbyte;
*pOS2MET >> nsignedbyte; aP0.Y()-=(long)nsignedbyte;
#endif
@@ -866,9 +866,9 @@ void OS2METReader::ReadRelLine(BOOL bGivenPos, USHORT nOrderLen)
}
}
-void OS2METReader::ReadBox(BOOL bGivenPos)
+void OS2METReader::ReadBox(sal_Bool bGivenPos)
{
- BYTE nFlags;
+ sal_uInt8 nFlags;
Point P0;
long nHRound,nVRound;
@@ -904,7 +904,7 @@ void OS2METReader::ReadBox(BOOL bGivenPos)
}
else
{
- ChangeBrush( Color( COL_TRANSPARENT ), Color( COL_TRANSPARENT ), FALSE );
+ ChangeBrush( Color( COL_TRANSPARENT ), Color( COL_TRANSPARENT ), sal_False );
SetRasterOp(aAttr.eLinMix);
}
@@ -949,10 +949,10 @@ void OS2METReader::ReadBitBlt()
}
}
-void OS2METReader::ReadChrStr(BOOL bGivenPos, BOOL bMove, BOOL bExtra, USHORT nOrderLen)
+void OS2METReader::ReadChrStr(sal_Bool bGivenPos, sal_Bool bMove, sal_Bool bExtra, sal_uInt16 nOrderLen)
{
Point aP0;
- USHORT i, nLen;
+ sal_uInt16 i, nLen;
char * pChr;
OSFont * pF;
Font aFont;
@@ -974,8 +974,8 @@ void OS2METReader::ReadChrStr(BOOL bGivenPos, BOOL bMove, BOOL bExtra, USHORT nO
if (bExtra)
{
pOS2MET->SeekRel(2);
- ReadPoint( FALSE );
- ReadPoint( FALSE );
+ ReadPoint( sal_False );
+ ReadPoint( sal_False );
*pOS2MET >> nLen;
}
else
@@ -1022,7 +1022,7 @@ void OS2METReader::ReadChrStr(BOOL bGivenPos, BOOL bMove, BOOL bExtra, USHORT nO
delete[] pChr;
}
-void OS2METReader::ReadArc(BOOL bGivenPos)
+void OS2METReader::ReadArc(sal_Bool bGivenPos)
{
Point aP1, aP2, aP3;
double x1,y1,x2,y2,x3,y3,p,q,cx,cy,ncx,ncy,r,rx,ry,w1,w3;
@@ -1067,12 +1067,12 @@ void OS2METReader::ReadArc(BOOL bGivenPos)
}
}
-void OS2METReader::ReadFullArc(BOOL bGivenPos, USHORT nOrderSize)
+void OS2METReader::ReadFullArc(sal_Bool bGivenPos, sal_uInt16 nOrderSize)
{
Point aCenter;
long nP,nQ,nR,nS;
Rectangle aRect;
- sal_uInt32 nMul; USHORT nMulS;
+ sal_uInt32 nMul; sal_uInt16 nMulS;
if (bGivenPos) {
aCenter=ReadPoint();
@@ -1086,7 +1086,7 @@ void OS2METReader::ReadFullArc(BOOL bGivenPos, USHORT nOrderSize)
if (nR<0) nR=-nR;
if (nS<0) nS=-nS;
if (nOrderSize>=4) *pOS2MET >> nMul;
- else { *pOS2MET >> nMulS; nMul=((ULONG)nMulS)<<8; }
+ else { *pOS2MET >> nMulS; nMul=((sal_uLong)nMulS)<<8; }
if (nMul!=0x00010000) {
nP=(nP*nMul)>>16;
nQ=(nQ*nMul)>>16;
@@ -1109,18 +1109,18 @@ void OS2METReader::ReadFullArc(BOOL bGivenPos, USHORT nOrderSize)
else
{
SetPen( aAttr.aLinCol, aAttr.nStrLinWidth, aAttr.eLinStyle );
- ChangeBrush(Color( COL_TRANSPARENT ),Color( COL_TRANSPARENT ),FALSE);
+ ChangeBrush(Color( COL_TRANSPARENT ),Color( COL_TRANSPARENT ),sal_False);
SetRasterOp(aAttr.eLinMix);
}
pVirDev->DrawEllipse(aRect);
}
-void OS2METReader::ReadPartialArc(BOOL bGivenPos, USHORT nOrderSize)
+void OS2METReader::ReadPartialArc(sal_Bool bGivenPos, sal_uInt16 nOrderSize)
{
Point aP0, aCenter,aPStart,aPEnd;
long nP,nQ,nR,nS,nStart, nSweep;
Rectangle aRect;
- sal_uInt32 nMul; USHORT nMulS;
+ sal_uInt32 nMul; sal_uInt16 nMulS;
double fStart, fEnd;
if (bGivenPos) {
@@ -1136,7 +1136,7 @@ void OS2METReader::ReadPartialArc(BOOL bGivenPos, USHORT nOrderSize)
if (nR<0) nR=-nR;
if (nS<0) nS=-nS;
if (nOrderSize>=12) *pOS2MET >> nMul;
- else { *pOS2MET >> nMulS; nMul=((ULONG)nMulS)<<8; }
+ else { *pOS2MET >> nMulS; nMul=((sal_uLong)nMulS)<<8; }
if (nMul!=0x00010000) {
nP=(nP*nMul)>>16;
nQ=(nQ*nMul)>>16;
@@ -1170,7 +1170,7 @@ void OS2METReader::ReadPolygons()
PolyPolygon aPolyPoly;
Polygon aPoly;
Point aPoint;
- BYTE nFlags;
+ sal_uInt8 nFlags;
*pOS2MET >> nFlags >> nNumPolys;
for (i=0; i<nNumPolys; i++) {
@@ -1195,9 +1195,9 @@ void OS2METReader::ReadPolygons()
DrawPolyPolygon( aPolyPoly );
}
-void OS2METReader::ReadBezier(BOOL bGivenPos, USHORT nOrderLen)
+void OS2METReader::ReadBezier(sal_Bool bGivenPos, sal_uInt16 nOrderLen)
{
- USHORT i, nNumPoints = nOrderLen / ( bCoord32 ? 8 : 4 );
+ sal_uInt16 i, nNumPoints = nOrderLen / ( bCoord32 ? 8 : 4 );
if( !bGivenPos )
nNumPoints++;
@@ -1218,18 +1218,18 @@ void OS2METReader::ReadBezier(BOOL bGivenPos, USHORT nOrderLen)
if( !( nNumPoints % 4 ) )
{
// create bezier polygon
- const USHORT nSegPoints = 25;
- const USHORT nSegments = aPolygon.GetSize() >> 2;
+ const sal_uInt16 nSegPoints = 25;
+ const sal_uInt16 nSegments = aPolygon.GetSize() >> 2;
Polygon aBezPoly( nSegments * nSegPoints );
- USHORT nSeg, nBezPos, nStartPos;
+ sal_uInt16 nSeg, nBezPos, nStartPos;
for( nSeg = 0, nBezPos = 0, nStartPos = 0; nSeg < nSegments; nSeg++, nStartPos += 4 )
{
const Polygon aSegPoly( aPolygon[ nStartPos ], aPolygon[ nStartPos + 1 ],
aPolygon[ nStartPos + 3 ], aPolygon[ nStartPos + 2 ],
nSegPoints );
- for( USHORT nSegPos = 0; nSegPos < nSegPoints; )
+ for( sal_uInt16 nSegPos = 0; nSegPos < nSegPoints; )
aBezPoly[ nBezPos++ ] = aSegPoly[ nSegPos++ ];
}
@@ -1255,9 +1255,9 @@ void OS2METReader::ReadBezier(BOOL bGivenPos, USHORT nOrderLen)
}
}
-void OS2METReader::ReadFillet(BOOL bGivenPos, USHORT nOrderLen)
+void OS2METReader::ReadFillet(sal_Bool bGivenPos, sal_uInt16 nOrderLen)
{
- USHORT i,nNumPoints;
+ sal_uInt16 i,nNumPoints;
if (bCoord32) nNumPoints=nOrderLen/8; else nNumPoints=nOrderLen/4;
if (!bGivenPos) nNumPoints++;
@@ -1277,9 +1277,9 @@ void OS2METReader::ReadFillet(BOOL bGivenPos, USHORT nOrderLen)
}
}
-void OS2METReader::ReadFilletSharp(BOOL bGivenPos, USHORT nOrderLen)
+void OS2METReader::ReadFilletSharp(sal_Bool bGivenPos, sal_uInt16 nOrderLen)
{
- USHORT i,nNumPoints;
+ sal_uInt16 i,nNumPoints;
if (bGivenPos) {
aAttr.aCurPos=ReadPoint();
@@ -1301,20 +1301,20 @@ void OS2METReader::ReadFilletSharp(BOOL bGivenPos, USHORT nOrderLen)
}
}
-void OS2METReader::ReadMarker(BOOL bGivenPos, USHORT nOrderLen)
+void OS2METReader::ReadMarker(sal_Bool bGivenPos, sal_uInt16 nOrderLen)
{
- USHORT i,nNumPoints;
+ sal_uInt16 i,nNumPoints;
long x,y;
SetPen( aAttr.aMrkCol );
SetRasterOp(aAttr.eMrkMix);
if (aAttr.nMrkSymbol>=5 && aAttr.nMrkSymbol<=9)
{
- ChangeBrush(aAttr.aMrkCol,aAttr.aMrkCol,TRUE);
+ ChangeBrush(aAttr.aMrkCol,aAttr.aMrkCol,sal_True);
}
else
{
- ChangeBrush(Color(COL_TRANSPARENT),Color(COL_TRANSPARENT),FALSE);
+ ChangeBrush(Color(COL_TRANSPARENT),Color(COL_TRANSPARENT),sal_False);
}
if (bCoord32) nNumPoints=nOrderLen/8; else nNumPoints=nOrderLen/4;
if (!bGivenPos) nNumPoints++;
@@ -1401,46 +1401,46 @@ void OS2METReader::ReadMarker(BOOL bGivenPos, USHORT nOrderLen)
}
}
-void OS2METReader::ReadOrder(USHORT nOrderID, USHORT nOrderLen)
+void OS2METReader::ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen)
{
switch (nOrderID) {
- case GOrdGivArc: ReadArc(TRUE); break;
- case GOrdCurArc: ReadArc(FALSE); break;
+ case GOrdGivArc: ReadArc(sal_True); break;
+ case GOrdCurArc: ReadArc(sal_False); break;
- case GOrdGivBzr: ReadBezier(TRUE,nOrderLen); break;
- case GOrdCurBzr: ReadBezier(FALSE,nOrderLen); break;
+ case GOrdGivBzr: ReadBezier(sal_True,nOrderLen); break;
+ case GOrdCurBzr: ReadBezier(sal_False,nOrderLen); break;
- case GOrdGivBox: ReadBox(TRUE); break;
- case GOrdCurBox: ReadBox(FALSE); break;
+ case GOrdGivBox: ReadBox(sal_True); break;
+ case GOrdCurBox: ReadBox(sal_False); break;
- case GOrdGivFil: ReadFillet(TRUE,nOrderLen); break;
- case GOrdCurFil: ReadFillet(FALSE,nOrderLen); break;
+ case GOrdGivFil: ReadFillet(sal_True,nOrderLen); break;
+ case GOrdCurFil: ReadFillet(sal_False,nOrderLen); break;
- case GOrdGivCrc: ReadFullArc(TRUE,nOrderLen); break;
- case GOrdCurCrc: ReadFullArc(FALSE,nOrderLen); break;
+ case GOrdGivCrc: ReadFullArc(sal_True,nOrderLen); break;
+ case GOrdCurCrc: ReadFullArc(sal_False,nOrderLen); break;
- case GOrdGivLin: ReadLine(TRUE, nOrderLen); break;
- case GOrdCurLin: ReadLine(FALSE, nOrderLen); break;
+ case GOrdGivLin: ReadLine(sal_True, nOrderLen); break;
+ case GOrdCurLin: ReadLine(sal_False, nOrderLen); break;
- case GOrdGivMrk: ReadMarker(TRUE, nOrderLen); break;
- case GOrdCurMrk: ReadMarker(FALSE, nOrderLen); break;
+ case GOrdGivMrk: ReadMarker(sal_True, nOrderLen); break;
+ case GOrdCurMrk: ReadMarker(sal_False, nOrderLen); break;
- case GOrdGivArP: ReadPartialArc(TRUE,nOrderLen); break;
- case GOrdCurArP: ReadPartialArc(FALSE,nOrderLen); break;
+ case GOrdGivArP: ReadPartialArc(sal_True,nOrderLen); break;
+ case GOrdCurArP: ReadPartialArc(sal_False,nOrderLen); break;
- case GOrdGivRLn: ReadRelLine(TRUE,nOrderLen); break;
- case GOrdCurRLn: ReadRelLine(FALSE,nOrderLen); break;
+ case GOrdGivRLn: ReadRelLine(sal_True,nOrderLen); break;
+ case GOrdCurRLn: ReadRelLine(sal_False,nOrderLen); break;
- case GOrdGivSFl: ReadFilletSharp(TRUE,nOrderLen); break;
- case GOrdCurSFl: ReadFilletSharp(FALSE,nOrderLen); break;
+ case GOrdGivSFl: ReadFilletSharp(sal_True,nOrderLen); break;
+ case GOrdCurSFl: ReadFilletSharp(sal_False,nOrderLen); break;
- case GOrdGivStM: ReadChrStr(TRUE , TRUE , FALSE, nOrderLen); break;
- case GOrdCurStM: ReadChrStr(FALSE, TRUE , FALSE, nOrderLen); break;
- case GOrdGivStr: ReadChrStr(TRUE , FALSE, FALSE, nOrderLen); break;
- case GOrdCurStr: ReadChrStr(FALSE, FALSE, FALSE, nOrderLen); break;
- case GOrdGivStx: ReadChrStr(TRUE , FALSE, TRUE , nOrderLen); break;
- case GOrdCurStx: ReadChrStr(FALSE, FALSE, TRUE , nOrderLen); break;
+ case GOrdGivStM: ReadChrStr(sal_True , sal_True , sal_False, nOrderLen); break;
+ case GOrdCurStM: ReadChrStr(sal_False, sal_True , sal_False, nOrderLen); break;
+ case GOrdGivStr: ReadChrStr(sal_True , sal_False, sal_False, nOrderLen); break;
+ case GOrdCurStr: ReadChrStr(sal_False, sal_False, sal_False, nOrderLen); break;
+ case GOrdGivStx: ReadChrStr(sal_True , sal_False, sal_True , nOrderLen); break;
+ case GOrdCurStx: ReadChrStr(sal_False, sal_False, sal_True , nOrderLen); break;
case GOrdGivImg: OOODEBUG("GOrdGivImg",0);
break;
@@ -1453,7 +1453,7 @@ void OS2METReader::ReadOrder(USHORT nOrderID, USHORT nOrderLen)
case GOrdBegAra: {
OSArea * p=new OSArea;
- p->bClosed=FALSE;
+ p->bClosed=sal_False;
p->pSucc=pAreaStack; pAreaStack=p;
*pOS2MET >> (p->nFlags);
p->aCol=aAttr.aPatCol;
@@ -1471,7 +1471,7 @@ void OS2METReader::ReadOrder(USHORT nOrderID, USHORT nOrderLen)
pAreaStack = p->pSucc;
if ( pPathStack )
{
- for ( USHORT i=0; i<p->aPPoly.Count(); i++ )
+ for ( sal_uInt16 i=0; i<p->aPPoly.Count(); i++ )
{
AddPointsToPath( p->aPPoly.GetObject( i ) );
CloseFigure();
@@ -1503,8 +1503,8 @@ void OS2METReader::ReadOrder(USHORT nOrderID, USHORT nOrderLen)
p->pSucc=pPathStack; pPathStack=p;
pOS2MET->SeekRel(2);
*pOS2MET >> p->nID;
- p->bClosed=FALSE;
- p->bStroke=FALSE;
+ p->bClosed=sal_False;
+ p->bStroke=sal_False;
break;
}
case GOrdEndPth: {
@@ -1528,7 +1528,7 @@ void OS2METReader::ReadOrder(USHORT nOrderID, USHORT nOrderLen)
case GOrdFilPth:
{
sal_uInt32 nID;
- UINT16 nDummy;
+ sal_uInt16 nDummy;
OSPath* p = pPathList;
*pOS2MET >> nDummy
@@ -1544,11 +1544,11 @@ void OS2METReader::ReadOrder(USHORT nOrderID, USHORT nOrderLen)
if( p->bStroke )
{
SetPen( aAttr.aPatCol, aAttr.nStrLinWidth, PEN_SOLID );
- ChangeBrush(Color(COL_TRANSPARENT),Color(COL_TRANSPARENT),FALSE);
+ ChangeBrush(Color(COL_TRANSPARENT),Color(COL_TRANSPARENT),sal_False);
SetRasterOp( aAttr.ePatMix );
if ( IsLineInfo() )
{
- for ( USHORT i = 0; i < p->aPPoly.Count(); i++ )
+ for ( sal_uInt16 i = 0; i < p->aPPoly.Count(); i++ )
pVirDev->DrawPolyLine( p->aPPoly.GetObject( i ), aLineInfo );
}
else
@@ -1574,14 +1574,14 @@ void OS2METReader::ReadOrder(USHORT nOrderID, USHORT nOrderLen)
p = p->pSucc;
if( p )
- p->bStroke = TRUE;
+ p->bStroke = sal_True;
}
break;
case GOrdOutPth:
{
sal_uInt32 nID;
- USHORT i,nC;
+ sal_uInt16 i,nC;
OSPath* p=pPathList;
pOS2MET->SeekRel(2);
*pOS2MET >> nID;
@@ -1592,11 +1592,11 @@ void OS2METReader::ReadOrder(USHORT nOrderID, USHORT nOrderLen)
{
SetPen( aAttr.aLinCol, aAttr.nStrLinWidth, aAttr.eLinStyle );
SetRasterOp(aAttr.eLinMix);
- ChangeBrush(Color(COL_TRANSPARENT),Color(COL_TRANSPARENT),FALSE);
+ ChangeBrush(Color(COL_TRANSPARENT),Color(COL_TRANSPARENT),sal_False);
nC=p->aPPoly.Count();
for (i=0; i<nC; i++)
{
- if (i+1<nC || p->bClosed==TRUE)
+ if (i+1<nC || p->bClosed==sal_True)
DrawPolygon( p->aPPoly.GetObject( i ) );
else
DrawPolyLine( p->aPPoly.GetObject( i ) );
@@ -1648,8 +1648,8 @@ void OS2METReader::ReadOrder(USHORT nOrderID, USHORT nOrderLen)
case GOrdPIvAtr: PushAttr(nOrderID);
case GOrdSIvAtr: {
- BYTE nA, nP, nFlags, nMix;
- ULONG nVal;
+ sal_uInt8 nA, nP, nFlags, nMix;
+ sal_uLong nVal;
Color aCol;
RasterOp eROP;
*pOS2MET >> nA >> nP >> nFlags;
@@ -1737,8 +1737,8 @@ void OS2METReader::ReadOrder(USHORT nOrderID, USHORT nOrderLen)
}
case GOrdPIxCol: PushAttr(nOrderID);
case GOrdSIxCol: {
- BYTE nFlags;
- ULONG nVal;
+ sal_uInt8 nFlags;
+ sal_uLong nVal;
Color aCol;
*pOS2MET >> nFlags;
if ((nFlags&0x80)!=0) {
@@ -1765,11 +1765,11 @@ void OS2METReader::ReadOrder(USHORT nOrderID, USHORT nOrderLen)
case GOrdPXtCol: PushAttr(nOrderID);
case GOrdSColor:
case GOrdSXtCol: {
- BYTE nbyte;
- USHORT nVal;
+ sal_uInt8 nbyte;
+ sal_uInt16 nVal;
Color aCol;
if (nOrderID==GOrdPColor || nOrderID==GOrdSColor) {
- *pOS2MET >> nbyte; nVal=((USHORT)nbyte)|0xff00;
+ *pOS2MET >> nbyte; nVal=((sal_uInt16)nbyte)|0xff00;
}
else *pOS2MET >> nVal;
if (nVal==0x0000 || nVal==0xff00) {
@@ -1783,7 +1783,7 @@ void OS2METReader::ReadOrder(USHORT nOrderID, USHORT nOrderLen)
if (nVal==0x0007) aCol=Color(COL_WHITE);
else if (nVal==0x0008) aCol=Color(COL_BLACK);
else if (nVal==0xff08) aCol=GetPaletteColor(1);
- else aCol=GetPaletteColor(((ULONG)nVal) & 0x000000ff);
+ else aCol=GetPaletteColor(((sal_uLong)nVal) & 0x000000ff);
aAttr.aLinCol = aAttr.aChrCol = aAttr.aMrkCol = aAttr.aPatCol =
aAttr.aImgCol = aCol;
}
@@ -1792,7 +1792,7 @@ void OS2METReader::ReadOrder(USHORT nOrderID, USHORT nOrderLen)
case GOrdPBgCol: PushAttr(nOrderID);
case GOrdSBgCol: {
- USHORT nVal;
+ sal_uInt16 nVal;
Color aCol;
*pOS2MET >> nVal;
if (nVal==0x0000 || nVal==0xff00) {
@@ -1806,7 +1806,7 @@ void OS2METReader::ReadOrder(USHORT nOrderID, USHORT nOrderLen)
if (nVal==0x0007) aCol=Color(COL_WHITE);
else if (nVal==0x0008) aCol=Color(COL_BLACK);
else if (nVal==0xff08) aCol=GetPaletteColor(0);
- else aCol=GetPaletteColor(((ULONG)nVal) & 0x000000ff);
+ else aCol=GetPaletteColor(((sal_uLong)nVal) & 0x000000ff);
aAttr.aLinBgCol = aAttr.aChrBgCol = aAttr.aMrkBgCol =
aAttr.aPatBgCol = aAttr.aImgBgCol = aCol;
}
@@ -1814,8 +1814,8 @@ void OS2METReader::ReadOrder(USHORT nOrderID, USHORT nOrderLen)
}
case GOrdPBxCol: PushAttr(nOrderID);
case GOrdSBxCol: {
- BYTE nFlags;
- ULONG nVal;
+ sal_uInt8 nFlags;
+ sal_uLong nVal;
Color aCol;
*pOS2MET >> nFlags;
if ((nFlags&0x80)!=0) {
@@ -1840,7 +1840,7 @@ void OS2METReader::ReadOrder(USHORT nOrderID, USHORT nOrderLen)
case GOrdPMixMd: PushAttr(nOrderID);
case GOrdSMixMd: {
- BYTE nMix;
+ sal_uInt8 nMix;
*pOS2MET >> nMix;
if (nMix==0) {
aAttr.eLinMix=aDefAttr.eLinMix;
@@ -1857,7 +1857,7 @@ void OS2METReader::ReadOrder(USHORT nOrderID, USHORT nOrderLen)
}
case GOrdPBgMix: PushAttr(nOrderID);
case GOrdSBgMix: {
- BYTE nMix;
+ sal_uInt8 nMix;
*pOS2MET >> nMix;
if (nMix==0) {
aAttr.eLinBgMix=aDefAttr.eLinBgMix;
@@ -1878,7 +1878,7 @@ void OS2METReader::ReadOrder(USHORT nOrderID, USHORT nOrderLen)
case GOrdPPtSym: PushAttr(nOrderID);
case GOrdSPtSym: {
- BYTE nPatt;
+ sal_uInt8 nPatt;
*pOS2MET >> nPatt;
aAttr.bFill = ( nPatt != 0x0f );
break;
@@ -1898,7 +1898,7 @@ void OS2METReader::ReadOrder(USHORT nOrderID, USHORT nOrderLen)
case GOrdPLnTyp: PushAttr(nOrderID);
case GOrdSLnTyp: {
- BYTE nType;
+ sal_uInt8 nType;
*pOS2MET >> nType;
switch (nType) {
case 0: aAttr.eLinStyle=aDefAttr.eLinStyle; break;
@@ -1912,10 +1912,10 @@ void OS2METReader::ReadOrder(USHORT nOrderID, USHORT nOrderLen)
}
case GOrdPLnWdt: PushAttr(nOrderID);
case GOrdSLnWdt: {
- BYTE nbyte;
+ sal_uInt8 nbyte;
*pOS2MET >> nbyte;
if (nbyte==0) aAttr.nLinWidth=aDefAttr.nLinWidth;
- else aAttr.nLinWidth=(USHORT)nbyte-1;
+ else aAttr.nLinWidth=(sal_uInt16)nbyte-1;
break;
}
case GOrdPFrLWd: PushAttr(nOrderID);
@@ -1925,7 +1925,7 @@ void OS2METReader::ReadOrder(USHORT nOrderID, USHORT nOrderLen)
case GOrdPStLWd: PushAttr(nOrderID);
case GOrdSStLWd :
{
- BYTE nFlags;
+ sal_uInt8 nFlags;
long nWd;
*pOS2MET >> nFlags;
@@ -1937,7 +1937,7 @@ void OS2METReader::ReadOrder(USHORT nOrderID, USHORT nOrderLen)
nWd = ReadCoord( bCoord32 );
if ( nWd < 0 )
nWd = -nWd;
- aAttr.nStrLinWidth = (USHORT)nWd;
+ aAttr.nStrLinWidth = (sal_uInt16)nWd;
}
break;
}
@@ -1951,8 +1951,8 @@ void OS2METReader::ReadOrder(USHORT nOrderID, USHORT nOrderLen)
case GOrdPChSet: PushAttr(nOrderID);
case GOrdSChSet: {
- BYTE nbyte; *pOS2MET >> nbyte;
- aAttr.nChrSet=((ULONG)nbyte)&0xff;
+ sal_uInt8 nbyte; *pOS2MET >> nbyte;
+ aAttr.nChrSet=((sal_uLong)nbyte)&0xff;
break;
}
case GOrdPChAng: PushAttr(nOrderID);
@@ -1973,8 +1973,8 @@ void OS2METReader::ReadOrder(USHORT nOrderID, USHORT nOrderLen)
case GOrdPChCel: PushAttr(nOrderID);
case GOrdSChCel: {
- BYTE nbyte;
- USHORT nLen=nOrderLen;
+ sal_uInt8 nbyte;
+ sal_uInt16 nLen=nOrderLen;
aAttr.aChrCellSize.Width()=ReadCoord(bCoord32);
aAttr.aChrCellSize.Height()=ReadCoord(bCoord32);
if (bCoord32) nLen-=8; else nLen-=4;
@@ -2002,7 +2002,7 @@ void OS2METReader::ReadOrder(USHORT nOrderID, USHORT nOrderLen)
case GOrdPMkPrc: PushAttr(nOrderID);
case GOrdSMkPrc: {
- BYTE nbyte;
+ sal_uInt8 nbyte;
*pOS2MET >> nbyte;
if (nbyte==0) aAttr.nMrkPrec=aDefAttr.nMrkPrec;
else aAttr.nMrkPrec=nbyte;
@@ -2011,7 +2011,7 @@ void OS2METReader::ReadOrder(USHORT nOrderID, USHORT nOrderLen)
case GOrdPMkSet: PushAttr(nOrderID);
case GOrdSMkSet: {
- BYTE nbyte;
+ sal_uInt8 nbyte;
*pOS2MET >> nbyte;
if (nbyte==0) aAttr.nMrkSet=aDefAttr.nMrkSet;
else aAttr.nMrkSet=nbyte;
@@ -2020,7 +2020,7 @@ void OS2METReader::ReadOrder(USHORT nOrderID, USHORT nOrderLen)
case GOrdPMkSym: PushAttr(nOrderID);
case GOrdSMkSym: {
- BYTE nbyte;
+ sal_uInt8 nbyte;
*pOS2MET >> nbyte;
if (nbyte==0) aAttr.nMrkSymbol=aDefAttr.nMrkSymbol;
else aAttr.nMrkSymbol=nbyte;
@@ -2029,8 +2029,8 @@ void OS2METReader::ReadOrder(USHORT nOrderID, USHORT nOrderLen)
case GOrdPMkCel: PushAttr(nOrderID);
case GOrdSMkCel: {
- BYTE nbyte;
- USHORT nLen=nOrderLen;
+ sal_uInt8 nbyte;
+ sal_uInt16 nLen=nOrderLen;
aAttr.aMrkCellSize.Width()=ReadCoord(bCoord32);
aAttr.aMrkCellSize.Height()=ReadCoord(bCoord32);
if (bCoord32) nLen-=8; else nLen-=4;
@@ -2073,15 +2073,15 @@ void OS2METReader::ReadOrder(USHORT nOrderID, USHORT nOrderLen)
}
}
-void OS2METReader::ReadDsc(USHORT nDscID, USHORT /*nDscLen*/)
+void OS2METReader::ReadDsc(sal_uInt16 nDscID, sal_uInt16 /*nDscLen*/)
{
switch (nDscID) {
case 0x00f7: { // 'Specify GVM Subset'
- BYTE nbyte;
+ sal_uInt8 nbyte;
pOS2MET->SeekRel(6);
*pOS2MET >> nbyte;
- if (nbyte==0x05) bCoord32=TRUE;
- else if (nbyte==0x04) bCoord32=FALSE;
+ if (nbyte==0x05) bCoord32=sal_True;
+ else if (nbyte==0x04) bCoord32=sal_False;
else {
pOS2MET->SetError(SVSTREAM_FILEFORMAT_ERROR);
ErrorCode=1;
@@ -2091,20 +2091,20 @@ void OS2METReader::ReadDsc(USHORT nDscID, USHORT /*nDscLen*/)
case 0x00f6:
{
// 'Set Picture Descriptor'
- BOOL b32;
- BYTE nbyte,nUnitType;
+ sal_Bool b32;
+ sal_uInt8 nbyte,nUnitType;
long x1,y1,x2,y2,nt,xr,yr;
pOS2MET->SeekRel(2);
*pOS2MET >> nbyte;
if (nbyte==0x05)
- b32=TRUE;
+ b32=sal_True;
else if(nbyte==0x04)
- b32=FALSE;
+ b32=sal_False;
else
{
- b32 = FALSE; // -Wall added the case.
+ b32 = sal_False; // -Wall added the case.
pOS2MET->SetError(SVSTREAM_FILEFORMAT_ERROR);
ErrorCode=2;
}
@@ -2157,7 +2157,7 @@ void OS2METReader::ReadDsc(USHORT nDscID, USHORT /*nDscLen*/)
}
}
-void OS2METReader::ReadImageData(USHORT nDataID, USHORT nDataLen)
+void OS2METReader::ReadImageData(sal_uInt16 nDataID, sal_uInt16 nDataLen)
{
OSBitmap * p=pBitmapList; if (p==NULL) return; // Nanu ?
@@ -2179,7 +2179,7 @@ void OS2METReader::ReadImageData(USHORT nDataID, USHORT nDataLen)
break;
case 0x0096: { // Image IDE-Size
- BYTE nbyte;
+ sal_uInt8 nbyte;
*pOS2MET >> nbyte; p->nBitsPerPixel=nbyte;
break;
}
@@ -2203,22 +2203,22 @@ void OS2METReader::ReadImageData(USHORT nDataID, USHORT nDataLen)
}
// Schreibe (Windows-)BITMAPINFOHEADER:
*(p->pBMP) << ((sal_uInt32)40) << p->nWidth << p->nHeight;
- *(p->pBMP) << ((USHORT)1) << p->nBitsPerPixel;
+ *(p->pBMP) << ((sal_uInt16)1) << p->nBitsPerPixel;
*(p->pBMP) << ((sal_uInt32)0) << ((sal_uInt32)0) << ((sal_uInt32)0) << ((sal_uInt32)0);
*(p->pBMP) << ((sal_uInt32)0) << ((sal_uInt32)0);
// Schreibe Farbtabelle:
if (p->nBitsPerPixel<=8) {
- USHORT i, nColTabSize=1<<(p->nBitsPerPixel);
+ sal_uInt16 i, nColTabSize=1<<(p->nBitsPerPixel);
for (i=0; i<nColTabSize; i++) *(p->pBMP) << GetPalette0RGB(i);
}
}
// OK, nun werden die Map-Daten ruebergeschoben. Leider haben OS2 und
// BMP eine unterschiedliche Reihenfolge von RGB bei 24-Bit.
- BYTE * pBuf=new BYTE[nDataLen];
+ sal_uInt8 * pBuf=new sal_uInt8[nDataLen];
pOS2MET->Read(pBuf,nDataLen);
if (p->nBitsPerPixel==24) {
- ULONG i, j, nAlign, nBytesPerLine;
- BYTE nTemp;
+ sal_uLong i, j, nAlign, nBytesPerLine;
+ sal_uInt8 nTemp;
nBytesPerLine=(p->nWidth*3+3)&0xfffffffc;
nAlign=p->nMapPos-(p->nMapPos % nBytesPerLine);
i=0;
@@ -2246,22 +2246,22 @@ void OS2METReader::ReadImageData(USHORT nDataID, USHORT nDataLen)
}
}
-void OS2METReader::ReadFont(USHORT nFieldSize)
+void OS2METReader::ReadFont(sal_uInt16 nFieldSize)
{
- ULONG nPos, nMaxPos;
- USHORT nLen;
- BYTE nByte, nTripType, nTripType2;
+ sal_uLong nPos, nMaxPos;
+ sal_uInt16 nLen;
+ sal_uInt8 nByte, nTripType, nTripType2;
OSFont * pF=new OSFont;
pF->pSucc=pFontList; pFontList=pF;
pF->nID=0;
- pF->aFont.SetTransparent(TRUE);
+ pF->aFont.SetTransparent(sal_True);
pF->aFont.SetAlign(ALIGN_BASELINE);
nPos=pOS2MET->Tell();
- nMaxPos=nPos+(ULONG)nFieldSize;
+ nMaxPos=nPos+(sal_uLong)nFieldSize;
pOS2MET->SeekRel(2); nPos+=2;
while (nPos<nMaxPos && pOS2MET->GetError()==0) {
- *pOS2MET >> nByte; nLen =((USHORT)nByte) & 0x00ff;
+ *pOS2MET >> nByte; nLen =((sal_uInt16)nByte) & 0x00ff;
*pOS2MET >> nTripType;
switch (nTripType) {
case 0x02:
@@ -2287,7 +2287,7 @@ void OS2METReader::ReadFont(USHORT nFieldSize)
switch (nTripType2) {
case 0x05: //Icid
*pOS2MET >> nByte;
- pF->nID=((ULONG)nByte)&0xff;
+ pF->nID=((sal_uLong)nByte)&0xff;
break;
}
break;
@@ -2295,7 +2295,7 @@ void OS2METReader::ReadFont(USHORT nFieldSize)
break;
case 0x1f: { // Font Attributes
FontWeight eWeight;
- BYTE nbyte;
+ sal_uInt8 nbyte;
*pOS2MET >> nbyte;
switch (nbyte) {
case 1: eWeight=WEIGHT_THIN; break;
@@ -2317,7 +2317,7 @@ void OS2METReader::ReadFont(USHORT nFieldSize)
}
}
-void OS2METReader::ReadField(USHORT nFieldType, USHORT nFieldSize)
+void OS2METReader::ReadField(sal_uInt16 nFieldType, sal_uInt16 nFieldSize)
{
switch (nFieldType) {
case BegDocumnMagic:
@@ -2333,21 +2333,21 @@ void OS2METReader::ReadField(USHORT nFieldType, USHORT nFieldSize)
case EndColAtrMagic:
break;
case BlkColAtrMagic: {
- ULONG nPos, nMaxPos;
- BYTE nbyte;
- ULONG nCol;
- USHORT nStartIndex, nEndIndex, i, nElemLen, nBytesPerCol;
+ sal_uLong nPos, nMaxPos;
+ sal_uInt8 nbyte;
+ sal_uLong nCol;
+ sal_uInt16 nStartIndex, nEndIndex, i, nElemLen, nBytesPerCol;
nPos=pOS2MET->Tell();
- nMaxPos=nPos+(ULONG)nFieldSize;
+ nMaxPos=nPos+(sal_uLong)nFieldSize;
pOS2MET->SeekRel(3); nPos+=3;
while (nPos<nMaxPos && pOS2MET->GetError()==0) {
- *pOS2MET >> nbyte; nElemLen=((USHORT)nbyte) & 0x00ff;
+ *pOS2MET >> nbyte; nElemLen=((sal_uInt16)nbyte) & 0x00ff;
if (nElemLen>11) {
pOS2MET->SeekRel(4);
nStartIndex=ReadBigEndianWord();
pOS2MET->SeekRel(3);
- *pOS2MET >> nbyte; nBytesPerCol=((USHORT)nbyte) & 0x00ff;
+ *pOS2MET >> nbyte; nBytesPerCol=((sal_uInt16)nbyte) & 0x00ff;
nEndIndex=nStartIndex+(nElemLen-11)/nBytesPerCol;
for (i=nStartIndex; i<nEndIndex; i++) {
if (nBytesPerCol > 3) pOS2MET->SeekRel(nBytesPerCol-3);
@@ -2359,7 +2359,7 @@ void OS2METReader::ReadField(USHORT nFieldType, USHORT nFieldSize)
pOS2MET->SetError(SVSTREAM_FILEFORMAT_ERROR);
ErrorCode=4;
}
- nPos+=(ULONG)nElemLen;
+ nPos+=(sal_uLong)nElemLen;
pOS2MET->Seek(nPos);
}
break;
@@ -2373,12 +2373,12 @@ void OS2METReader::ReadField(USHORT nFieldType, USHORT nFieldSize)
pB->pBMP=NULL; pB->nWidth=0; pB->nHeight=0; pB->nBitsPerPixel=0;
pB->nMapPos=0;
// ID der Bitmap ermitteln:
- BYTE i,nbyte,nbyte2;
+ sal_uInt8 i,nbyte,nbyte2;
pB->nID=0;
for (i=0; i<4; i++) {
*pOS2MET >> nbyte >> nbyte2;
nbyte=((nbyte-0x30)<<4)|(nbyte2-0x30);
- pB->nID=(pB->nID>>8)|(((ULONG)nbyte)<<24);
+ pB->nID=(pB->nID>>8)|(((sal_uLong)nbyte)<<24);
}
// neue Palette auf den Paletten-Stack bringen: (wird spaeter gefuellt)
OSPalette * pP=new OSPalette;
@@ -2396,7 +2396,7 @@ void OS2METReader::ReadField(USHORT nFieldType, USHORT nFieldSize)
}
pBitmapList->pBMP->Seek(0);
- pBitmapList->aBitmap.Read( *( pBitmapList->pBMP ), FALSE );
+ pBitmapList->aBitmap.Read( *( pBitmapList->pBMP ), sal_False );
if (pBitmapList->pBMP->GetError()!=0) {
pOS2MET->SetError(SVSTREAM_FILEFORMAT_ERROR);
@@ -2415,26 +2415,26 @@ void OS2METReader::ReadField(USHORT nFieldType, USHORT nFieldSize)
case DscImgObjMagic:
break;
case DatImgObjMagic: {
- USHORT nDataID, nDataLen;
- BYTE nbyte;
- ULONG nPos, nMaxPos;
+ sal_uInt16 nDataID, nDataLen;
+ sal_uInt8 nbyte;
+ sal_uLong nPos, nMaxPos;
nPos=pOS2MET->Tell();
- nMaxPos=nPos+(ULONG)nFieldSize;
+ nMaxPos=nPos+(sal_uLong)nFieldSize;
while (nPos<nMaxPos && pOS2MET->GetError()==0) {
- *pOS2MET >> nbyte; nDataID=((USHORT)nbyte)&0x00ff;
+ *pOS2MET >> nbyte; nDataID=((sal_uInt16)nbyte)&0x00ff;
if (nDataID==0x00fe) {
*pOS2MET >> nbyte;
- nDataID=(nDataID<<8)|(((USHORT)nbyte)&0x00ff);
+ nDataID=(nDataID<<8)|(((sal_uInt16)nbyte)&0x00ff);
nDataLen=ReadBigEndianWord();
nPos+=4;
}
else {
- *pOS2MET >> nbyte; nDataLen=((USHORT)nbyte)&0x00ff;
+ *pOS2MET >> nbyte; nDataLen=((sal_uInt16)nbyte)&0x00ff;
nPos+=2;
}
ReadImageData(nDataID, nDataLen);
- nPos+=(ULONG)nDataLen;
+ nPos+=(sal_uLong)nDataLen;
pOS2MET->Seek(nPos);
}
break;
@@ -2448,9 +2448,9 @@ void OS2METReader::ReadField(USHORT nFieldType, USHORT nFieldSize)
break;
case EndGrfObjMagic: {
SvStream * pSave;
- ULONG nPos, nMaxPos;
- USHORT nOrderID, nOrderLen;
- BYTE nbyte;
+ sal_uLong nPos, nMaxPos;
+ sal_uInt16 nOrderID, nOrderLen;
+ sal_uInt8 nbyte;
if (pOrdFile==NULL) break;
@@ -2473,10 +2473,10 @@ void OS2METReader::ReadField(USHORT nFieldType, USHORT nFieldSize)
// Schleife ueber Order:
while (pOS2MET->Tell()<nMaxPos && pOS2MET->GetError()==0) {
- *pOS2MET >> nbyte; nOrderID=((USHORT)nbyte) & 0x00ff;
+ *pOS2MET >> nbyte; nOrderID=((sal_uInt16)nbyte) & 0x00ff;
if (nOrderID==0x00fe) {
*pOS2MET >> nbyte;
- nOrderID=(nOrderID << 8) | (((USHORT)nbyte) & 0x00ff);
+ nOrderID=(nOrderID << 8) | (((sal_uInt16)nbyte) & 0x00ff);
}
if (nOrderID>0x00ff || nOrderID==GOrdPolygn) {
// ooo: Laut OS2-Doku sollte die Orderlaenge nun als Big-Endian-Word
@@ -2484,13 +2484,13 @@ void OS2METReader::ReadField(USHORT nFieldType, USHORT nFieldSize)
// Tatsaechlich gibt es aber Dateien, die die Laenge als
// Little-Endian-Word angeben (zu mindestens fuer nOrderID==GOrdPolygn).
// Also werfen wir eine Muenze oder was ?
- *pOS2MET >> nbyte; nOrderLen=(USHORT)nbyte&0x00ff;
- *pOS2MET >> nbyte; if (nbyte!=0) nOrderLen=nOrderLen<<8|(((USHORT)nbyte)&0x00ff);
+ *pOS2MET >> nbyte; nOrderLen=(sal_uInt16)nbyte&0x00ff;
+ *pOS2MET >> nbyte; if (nbyte!=0) nOrderLen=nOrderLen<<8|(((sal_uInt16)nbyte)&0x00ff);
}
else if (nOrderID==GOrdSTxAlg || nOrderID==GOrdPTxAlg) nOrderLen=2;
else if ((nOrderID&0xff88)==0x0008) nOrderLen=1;
else if (nOrderID==0x0000 || nOrderID==0x00ff) nOrderLen=0;
- else { *pOS2MET >> nbyte; nOrderLen=((USHORT)nbyte) & 0x00ff; }
+ else { *pOS2MET >> nbyte; nOrderLen=((sal_uInt16)nbyte) & 0x00ff; }
nPos=pOS2MET->Tell();
ReadOrder(nOrderID, nOrderLen);
if (nPos+nOrderLen < pOS2MET->Tell()) {
@@ -2512,14 +2512,14 @@ void OS2METReader::ReadField(USHORT nFieldType, USHORT nFieldSize)
break;
}
case DscGrfObjMagic: {
- ULONG nPos, nMaxPos;
- USHORT nDscID, nDscLen;
- BYTE nbyte;
+ sal_uLong nPos, nMaxPos;
+ sal_uInt16 nDscID, nDscLen;
+ sal_uInt8 nbyte;
- nMaxPos=pOS2MET->Tell()+(ULONG)nFieldSize;
+ nMaxPos=pOS2MET->Tell()+(sal_uLong)nFieldSize;
while (pOS2MET->Tell()<nMaxPos && pOS2MET->GetError()==0) {
- *pOS2MET >> nbyte; nDscID =((USHORT)nbyte) & 0x00ff;
- *pOS2MET >> nbyte; nDscLen=((USHORT)nbyte) & 0x00ff;
+ *pOS2MET >> nbyte; nDscID =((sal_uInt16)nbyte) & 0x00ff;
+ *pOS2MET >> nbyte; nDscLen=((sal_uInt16)nbyte) & 0x00ff;
nPos=pOS2MET->Tell();
ReadDsc(nDscID, nDscLen);
pOS2MET->Seek(nPos+nDscLen);
@@ -2531,7 +2531,7 @@ void OS2METReader::ReadField(USHORT nFieldType, USHORT nFieldSize)
pOrdFile = new SvMemoryStream;
pOrdFile->SetNumberFormatInt(NUMBERFORMAT_INT_LITTLEENDIAN);
}
- BYTE * pBuf; pBuf = new BYTE[nFieldSize];
+ sal_uInt8 * pBuf; pBuf = new sal_uInt8[nFieldSize];
pOS2MET->Read(pBuf,nFieldSize);
pOrdFile->Write(pBuf,nFieldSize);
delete[] pBuf;
@@ -2548,10 +2548,10 @@ void OS2METReader::ReadField(USHORT nFieldType, USHORT nFieldSize)
void OS2METReader::ReadOS2MET( SvStream & rStreamOS2MET, GDIMetaFile & rGDIMetaFile )
{
- USHORT nFieldSize;
- USHORT nFieldType;
- ULONG nPos, nStartPos, nEndPos, nPercent, nLastPercent;
- BYTE nMagicByte;
+ sal_uInt16 nFieldSize;
+ sal_uInt16 nFieldType;
+ sal_uLong nPos, nStartPos, nEndPos, nPercent, nLastPercent;
+ sal_uInt8 nMagicByte;
ErrorCode=0;
@@ -2559,7 +2559,7 @@ void OS2METReader::ReadOS2MET( SvStream & rStreamOS2MET, GDIMetaFile & rGDIMetaF
nOrigPos = pOS2MET->Tell();
nOrigNumberFormat = pOS2MET->GetNumberFormatInt();
- bCoord32 = TRUE;
+ bCoord32 = sal_True;
pPaletteStack=NULL;
pAreaStack=NULL;
pPathStack=NULL;
@@ -2602,7 +2602,7 @@ void OS2METReader::ReadOS2MET( SvStream & rStreamOS2MET, GDIMetaFile & rGDIMetaF
aDefAttr.nMrkPrec =0x01;
aDefAttr.nMrkSet =0xff;
aDefAttr.nMrkSymbol =0x01;
- aDefAttr.bFill =TRUE;
+ aDefAttr.bFill =sal_True;
aDefAttr.nStrLinWidth=0;
aAttr=aDefAttr;
@@ -2610,7 +2610,7 @@ void OS2METReader::ReadOS2MET( SvStream & rStreamOS2MET, GDIMetaFile & rGDIMetaF
pOrdFile=NULL;
pVirDev = new VirtualDevice();
- pVirDev->EnableOutput(FALSE);
+ pVirDev->EnableOutput(sal_False);
rGDIMetaFile.Record(pVirDev);
pOS2MET->SetNumberFormatInt(NUMBERFORMAT_INT_LITTLEENDIAN);
@@ -2630,7 +2630,7 @@ void OS2METReader::ReadOS2MET( SvStream & rStreamOS2MET, GDIMetaFile & rGDIMetaF
nPercent=(nPos-nStartPos)*100/(nEndPos-nStartPos);
if (nLastPercent+4<=nPercent) {
- if (Callback((USHORT)nPercent)==TRUE) break;
+ if (Callback((sal_uInt16)nPercent)==sal_True) break;
nLastPercent=nPercent;
}
@@ -2658,7 +2658,7 @@ void OS2METReader::ReadOS2MET( SvStream & rStreamOS2MET, GDIMetaFile & rGDIMetaF
ReadField(nFieldType, nFieldSize);
- nPos+=(ULONG)nFieldSize;
+ nPos+=(sal_uLong)nFieldSize;
if (pOS2MET->Tell()>nPos) {
pOS2MET->SetError(SVSTREAM_FILEFORMAT_ERROR);
ErrorCode=9;
@@ -2738,18 +2738,18 @@ void OS2METReader::ReadOS2MET( SvStream & rStreamOS2MET, GDIMetaFile & rGDIMetaF
//================== GraphicImport - die exportierte Funktion ================
-extern "C" BOOL __LOADONCALLAPI GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem*, BOOL )
+extern "C" sal_Bool __LOADONCALLAPI GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem*, sal_Bool )
{
OS2METReader aOS2METReader;
GDIMetaFile aMTF;
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
aOS2METReader.ReadOS2MET( rStream, aMTF );
if ( !rStream.GetError() )
{
rGraphic=Graphic( aMTF );
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
diff --git a/filter/source/graphicfilter/ipbm/ipbm.cxx b/filter/source/graphicfilter/ipbm/ipbm.cxx
index 80c825c80791..264d6b193f54 100644
--- a/filter/source/graphicfilter/ipbm/ipbm.cxx
+++ b/filter/source/graphicfilter/ipbm/ipbm.cxx
@@ -40,31 +40,31 @@ private:
SvStream* mpPBM; // Die einzulesende PBM-Datei
- BOOL mbStatus;
- BOOL mbRemark; // FALSE wenn sich stream in einem Kommentar befindet
- BOOL mbRaw; // RAW/ASCII MODE
- ULONG mnMode; // 0->PBM, 1->PGM, 2->PPM
+ sal_Bool mbStatus;
+ sal_Bool mbRemark; // sal_False wenn sich stream in einem Kommentar befindet
+ sal_Bool mbRaw; // RAW/ASCII MODE
+ sal_uLong mnMode; // 0->PBM, 1->PGM, 2->PPM
Bitmap maBmp;
BitmapWriteAccess* mpAcc;
- ULONG mnWidth, mnHeight; // Bildausmass in Pixeln
- ULONG mnCol;
- ULONG mnMaxVal; // maximaler wert in den
- BOOL ImplCallback( USHORT nPercent );
- BOOL ImplReadBody();
- BOOL ImplReadHeader();
+ sal_uLong mnWidth, mnHeight; // Bildausmass in Pixeln
+ sal_uLong mnCol;
+ sal_uLong mnMaxVal; // maximaler wert in den
+ sal_Bool ImplCallback( sal_uInt16 nPercent );
+ sal_Bool ImplReadBody();
+ sal_Bool ImplReadHeader();
public:
PBMReader();
~PBMReader();
- BOOL ReadPBM( SvStream & rPBM, Graphic & rGraphic );
+ sal_Bool ReadPBM( SvStream & rPBM, Graphic & rGraphic );
};
//=================== Methoden von PBMReader ==============================
PBMReader::PBMReader() :
- mbStatus ( TRUE ),
- mbRemark ( FALSE ),
- mbRaw ( TRUE ),
+ mbStatus ( sal_True ),
+ mbRemark ( sal_False ),
+ mbRaw ( sal_True ),
mpAcc ( NULL )
{
}
@@ -73,46 +73,46 @@ PBMReader::~PBMReader()
{
}
-BOOL PBMReader::ImplCallback( USHORT /*nPercent*/ )
+sal_Bool PBMReader::ImplCallback( sal_uInt16 /*nPercent*/ )
{
/*
if ( pCallback != NULL )
{
- if ( ( (*pCallback)( pCallerData, nPercent ) ) == TRUE )
+ if ( ( (*pCallback)( pCallerData, nPercent ) ) == sal_True )
{
mpPBM->SetError( SVSTREAM_FILEFORMAT_ERROR );
- return TRUE;
+ return sal_True;
}
}
*/
- return FALSE;
+ return sal_False;
}
-BOOL PBMReader::ReadPBM( SvStream & rPBM, Graphic & rGraphic )
+sal_Bool PBMReader::ReadPBM( SvStream & rPBM, Graphic & rGraphic )
{
- USHORT i;
+ sal_uInt16 i;
if ( rPBM.GetError() )
- return FALSE;
+ return sal_False;
mpPBM = &rPBM;
mpPBM->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
// Kopf einlesen:
- if ( ( mbStatus = ImplReadHeader() ) == FALSE )
- return FALSE;
+ if ( ( mbStatus = ImplReadHeader() ) == sal_False )
+ return sal_False;
if ( ( mnMaxVal == 0 ) || ( mnWidth == 0 ) || ( mnHeight == 0 ) )
- return FALSE;
+ return sal_False;
// 0->PBM, 1->PGM, 2->PPM
switch ( mnMode )
{
case 0 :
maBmp = Bitmap( Size( mnWidth, mnHeight ), 1 );
- if ( ( mpAcc = maBmp.AcquireWriteAccess() ) == FALSE )
- return FALSE;
+ if ( ( mpAcc = maBmp.AcquireWriteAccess() ) == sal_False )
+ return sal_False;
mpAcc->SetPaletteEntryCount( 2 );
mpAcc->SetPaletteColor( 0, BitmapColor( 0xff, 0xff, 0xff ) );
mpAcc->SetPaletteColor( 1, BitmapColor( 0x00, 0x00, 0x00 ) );
@@ -126,23 +126,23 @@ BOOL PBMReader::ReadPBM( SvStream & rPBM, Graphic & rGraphic )
else
maBmp = Bitmap( Size( mnWidth, mnHeight ), 8);
- if ( ( mpAcc = maBmp.AcquireWriteAccess() ) == FALSE )
- return FALSE;
- mnCol = (USHORT)mnMaxVal + 1;
+ if ( ( mpAcc = maBmp.AcquireWriteAccess() ) == sal_False )
+ return sal_False;
+ mnCol = (sal_uInt16)mnMaxVal + 1;
if ( mnCol > 256 )
mnCol = 256;
mpAcc->SetPaletteEntryCount( 256 );
for ( i = 0; i < mnCol; i++ )
{
- ULONG nCount = 255 * i / mnCol;
- mpAcc->SetPaletteColor( i, BitmapColor( (BYTE)nCount, (BYTE)nCount, (BYTE)nCount ) );
+ sal_uLong nCount = 255 * i / mnCol;
+ mpAcc->SetPaletteColor( i, BitmapColor( (sal_uInt8)nCount, (sal_uInt8)nCount, (sal_uInt8)nCount ) );
}
break;
case 2 :
maBmp = Bitmap( Size( mnWidth, mnHeight ), 24 );
- if ( ( mpAcc = maBmp.AcquireWriteAccess() ) == FALSE )
- return FALSE;
+ if ( ( mpAcc = maBmp.AcquireWriteAccess() ) == sal_False )
+ return sal_False;
break;
}
@@ -159,56 +159,56 @@ BOOL PBMReader::ReadPBM( SvStream & rPBM, Graphic & rGraphic )
return mbStatus;
}
-BOOL PBMReader::ImplReadHeader()
+sal_Bool PBMReader::ImplReadHeader()
{
- BYTE nID[ 2 ];
- BYTE nDat;
- BYTE nMax, nCount = 0;
- BOOL bFinished = FALSE;
+ sal_uInt8 nID[ 2 ];
+ sal_uInt8 nDat;
+ sal_uInt8 nMax, nCount = 0;
+ sal_Bool bFinished = sal_False;
*mpPBM >> nID[ 0 ] >> nID[ 1 ];
if ( nID[ 0 ] != 'P' )
- return FALSE;
+ return sal_False;
mnMaxVal = mnWidth = mnHeight = 0;
switch ( nID[ 1 ] )
{
case '1' :
- mbRaw = FALSE;
+ mbRaw = sal_False;
case '4' :
mnMode = 0;
nMax = 2; // number of parameters in Header
mnMaxVal = 1;
break;
case '2' :
- mbRaw = FALSE;
+ mbRaw = sal_False;
case '5' :
mnMode = 1;
nMax = 3;
break;
case '3' :
- mbRaw = FALSE;
+ mbRaw = sal_False;
case '6' :
mnMode = 2;
nMax = 3;
break;
default:
- return FALSE;
+ return sal_False;
}
- while ( bFinished == FALSE )
+ while ( bFinished == sal_False )
{
if ( mpPBM->GetError() )
- return FALSE;
+ return sal_False;
*mpPBM >> nDat;
if ( nDat == '#' )
{
- mbRemark = TRUE;
+ mbRemark = sal_True;
continue;
}
else if ( ( nDat == 0x0d ) || ( nDat == 0x0a ) )
{
- mbRemark = FALSE;
+ mbRemark = sal_False;
nDat = 0x20;
}
if ( mbRemark )
@@ -221,11 +221,11 @@ BOOL PBMReader::ImplReadHeader()
else if ( ( nCount == 1 ) && mnHeight )
{
if ( ++nCount == nMax )
- bFinished = TRUE;
+ bFinished = sal_True;
}
else if ( ( nCount == 2 ) && mnMaxVal )
{
- bFinished = TRUE;
+ bFinished = sal_True;
}
continue;
}
@@ -249,18 +249,18 @@ BOOL PBMReader::ImplReadHeader()
}
}
else
- return FALSE;
+ return sal_False;
}
return mbStatus;
}
-BOOL PBMReader::ImplReadBody()
+sal_Bool PBMReader::ImplReadBody()
{
- BOOL bPara, bFinished = FALSE;
- BYTE nDat = 0, nCount;
- ULONG nGrey, nRGB[3];
- ULONG nWidth = 0;
- ULONG nHeight = 0;
+ sal_Bool bPara, bFinished = sal_False;
+ sal_uInt8 nDat = 0, nCount;
+ sal_uLong nGrey, nRGB[3];
+ sal_uLong nWidth = 0;
+ sal_uLong nHeight = 0;
signed char nShift = 0;
if ( mbRaw )
@@ -273,7 +273,7 @@ BOOL PBMReader::ImplReadBody()
while ( nHeight != mnHeight )
{
if ( mpPBM->IsEof() || mpPBM->GetError() )
- return FALSE;
+ return sal_False;
if ( --nShift < 0 )
{
@@ -286,7 +286,7 @@ BOOL PBMReader::ImplReadBody()
nShift = 0;
nWidth = 0;
nHeight++;
- ImplCallback( (USHORT)( ( 100 * nHeight ) / mnHeight ) ); // processing output in percent
+ ImplCallback( (sal_uInt16)( ( 100 * nHeight ) / mnHeight ) ); // processing output in percent
}
}
break;
@@ -296,7 +296,7 @@ BOOL PBMReader::ImplReadBody()
while ( nHeight != mnHeight )
{
if ( mpPBM->IsEof() || mpPBM->GetError() )
- return FALSE;
+ return sal_False;
*mpPBM >> nDat;
mpAcc->SetPixel( nHeight, nWidth++, nDat);
@@ -305,7 +305,7 @@ BOOL PBMReader::ImplReadBody()
{
nWidth = 0;
nHeight++;
- ImplCallback( (USHORT)( ( 100 * nHeight ) / mnHeight ) ); // processing output in percent
+ ImplCallback( (sal_uInt16)( ( 100 * nHeight ) / mnHeight ) ); // processing output in percent
}
}
break;
@@ -315,20 +315,20 @@ BOOL PBMReader::ImplReadBody()
while ( nHeight != mnHeight )
{
if ( mpPBM->IsEof() || mpPBM->GetError() )
- return FALSE;
+ return sal_False;
- BYTE nR, nG, nB;
- ULONG nRed, nGreen, nBlue;
+ sal_uInt8 nR, nG, nB;
+ sal_uLong nRed, nGreen, nBlue;
*mpPBM >> nR >> nG >> nB;
nRed = 255 * nR / mnMaxVal;
nGreen = 255 * nG / mnMaxVal;
nBlue = 255 * nB / mnMaxVal;
- mpAcc->SetPixel( nHeight, nWidth++, BitmapColor( (BYTE)nRed, (BYTE)nGreen, (BYTE)nBlue ) );
+ mpAcc->SetPixel( nHeight, nWidth++, BitmapColor( (sal_uInt8)nRed, (sal_uInt8)nGreen, (sal_uInt8)nBlue ) );
if ( nWidth == mnWidth )
{
nWidth = 0;
nHeight++;
- ImplCallback( (USHORT) ( ( 100 * nHeight ) / mnHeight ) ); // processing output in percent
+ ImplCallback( (sal_uInt16) ( ( 100 * nHeight ) / mnHeight ) ); // processing output in percent
}
}
break;
@@ -338,21 +338,21 @@ BOOL PBMReader::ImplReadBody()
{
// PBM
case 0 :
- while ( bFinished == FALSE )
+ while ( bFinished == sal_False )
{
if ( mpPBM->IsEof() || mpPBM->GetError() )
- return FALSE;
+ return sal_False;
*mpPBM >> nDat;
if ( nDat == '#' )
{
- mbRemark = TRUE;
+ mbRemark = sal_True;
continue;
}
else if ( ( nDat == 0x0d ) || ( nDat == 0x0a ) )
{
- mbRemark = FALSE;
+ mbRemark = sal_False;
continue;
}
if ( mbRemark || nDat == 0x20 || nDat == 0x09 )
@@ -360,68 +360,68 @@ BOOL PBMReader::ImplReadBody()
if ( nDat == '0' || nDat == '1' )
{
- mpAcc->SetPixel( nHeight, nWidth, (BYTE)nDat-'0' );
+ mpAcc->SetPixel( nHeight, nWidth, (sal_uInt8)nDat-'0' );
nWidth++;
if ( nWidth == mnWidth )
{
nWidth = 0;
if ( ++nHeight == mnHeight )
- bFinished = TRUE;
- ImplCallback( (USHORT) ( ( 100 * nHeight ) / mnHeight ) ); // processing output in percent
+ bFinished = sal_True;
+ ImplCallback( (sal_uInt16) ( ( 100 * nHeight ) / mnHeight ) ); // processing output in percent
}
}
else
- return FALSE;
+ return sal_False;
}
break;
// PGM
case 1 :
- bPara = FALSE;
+ bPara = sal_False;
nCount = 0;
nGrey = 0;
- while ( bFinished == FALSE )
+ while ( bFinished == sal_False )
{
if ( nCount )
{
nCount--;
if ( nGrey <= mnMaxVal )
nGrey = 255 * nGrey / mnMaxVal;
- mpAcc->SetPixel( nHeight, nWidth++, (BYTE)nGrey );
+ mpAcc->SetPixel( nHeight, nWidth++, (sal_uInt8)nGrey );
nGrey = 0;
if ( nWidth == mnWidth )
{
nWidth = 0;
if ( ++nHeight == mnHeight )
- bFinished = TRUE;
- ImplCallback( (USHORT) ( ( 100 * nHeight ) / mnHeight ) ); // processing output in percent
+ bFinished = sal_True;
+ ImplCallback( (sal_uInt16) ( ( 100 * nHeight ) / mnHeight ) ); // processing output in percent
}
continue;
}
if ( mpPBM->IsEof() || mpPBM->GetError() )
- return FALSE;
+ return sal_False;
*mpPBM >> nDat;
if ( nDat == '#' )
{
- mbRemark = TRUE;
+ mbRemark = sal_True;
if ( bPara )
{
- bPara = FALSE;
+ bPara = sal_False;
nCount++;
}
continue;
}
else if ( ( nDat == 0x0d ) || ( nDat == 0x0a ) )
{
- mbRemark = FALSE;
+ mbRemark = sal_False;
if ( bPara )
{
- bPara = FALSE;
+ bPara = sal_False;
nCount++;
}
continue;
@@ -431,20 +431,20 @@ BOOL PBMReader::ImplReadBody()
{
if ( bPara )
{
- bPara = FALSE;
+ bPara = sal_False;
nCount++;
}
continue;
}
if ( nDat >= '0' && nDat <= '9' )
{
- bPara = TRUE;
+ bPara = sal_True;
nGrey *= 10;
nGrey += nDat-'0';
continue;
}
else
- return FALSE;
+ return sal_False;
}
break;
@@ -453,51 +453,51 @@ BOOL PBMReader::ImplReadBody()
// PPM
case 2 :
- bPara = FALSE;
+ bPara = sal_False;
nCount = 0;
nRGB[ 0 ] = nRGB[ 1 ] = nRGB[ 2 ] = 0;
- while ( bFinished == FALSE )
+ while ( bFinished == sal_False )
{
if ( nCount == 3 )
{
nCount = 0;
- mpAcc->SetPixel( nHeight, nWidth++, BitmapColor( static_cast< BYTE >( ( nRGB[ 0 ] * 255 ) / mnMaxVal ),
- static_cast< BYTE >( ( nRGB[ 1 ] * 255 ) / mnMaxVal ),
- static_cast< BYTE >( ( nRGB[ 2 ] * 255 ) / mnMaxVal ) ) );
+ mpAcc->SetPixel( nHeight, nWidth++, BitmapColor( static_cast< sal_uInt8 >( ( nRGB[ 0 ] * 255 ) / mnMaxVal ),
+ static_cast< sal_uInt8 >( ( nRGB[ 1 ] * 255 ) / mnMaxVal ),
+ static_cast< sal_uInt8 >( ( nRGB[ 2 ] * 255 ) / mnMaxVal ) ) );
nCount = 0;
nRGB[ 0 ] = nRGB[ 1 ] = nRGB[ 2 ] = 0;
if ( nWidth == mnWidth )
{
nWidth = 0;
if ( ++nHeight == mnHeight )
- bFinished = TRUE;
- ImplCallback( (USHORT) ( ( 100 * nHeight ) / mnHeight ) ); // processing output in percent
+ bFinished = sal_True;
+ ImplCallback( (sal_uInt16) ( ( 100 * nHeight ) / mnHeight ) ); // processing output in percent
}
continue;
}
if ( mpPBM->IsEof() || mpPBM->GetError() )
- return FALSE;
+ return sal_False;
*mpPBM >> nDat;
if ( nDat == '#' )
{
- mbRemark = TRUE;
+ mbRemark = sal_True;
if ( bPara )
{
- bPara = FALSE;
+ bPara = sal_False;
nCount++;
}
continue;
}
else if ( ( nDat == 0x0d ) || ( nDat == 0x0a ) )
{
- mbRemark = FALSE;
+ mbRemark = sal_False;
if ( bPara )
{
- bPara = FALSE;
+ bPara = sal_False;
nCount++;
}
continue;
@@ -507,20 +507,20 @@ BOOL PBMReader::ImplReadBody()
{
if ( bPara )
{
- bPara = FALSE;
+ bPara = sal_False;
nCount++;
}
continue;
}
if ( nDat >= '0' && nDat <= '9' )
{
- bPara = TRUE;
+ bPara = sal_True;
nRGB[ nCount ] *= 10;
nRGB[ nCount ] += nDat-'0';
continue;
}
else
- return FALSE;
+ return sal_False;
}
break;
}
@@ -529,7 +529,7 @@ BOOL PBMReader::ImplReadBody()
//================== GraphicImport - die exportierte Funktion ================
-extern "C" BOOL __LOADONCALLAPI GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem*, BOOL )
+extern "C" sal_Bool __LOADONCALLAPI GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem*, sal_Bool )
{
PBMReader aPBMReader;
diff --git a/filter/source/graphicfilter/ipcd/ipcd.cxx b/filter/source/graphicfilter/ipcd/ipcd.cxx
index 0b0b56acc5e5..2726841aaf96 100644
--- a/filter/source/graphicfilter/ipcd/ipcd.cxx
+++ b/filter/source/graphicfilter/ipcd/ipcd.cxx
@@ -53,14 +53,14 @@ class PCDReader {
private:
- BOOL bStatus;
+ sal_Bool bStatus;
- ULONG nLastPercent;
+ sal_uLong nLastPercent;
SvStream* pPCD;
BitmapWriteAccess* mpAcc;
- BYTE nOrientation; // Ausrichtung des Bildes in der PCD-Datei:
+ sal_uInt8 nOrientation; // Ausrichtung des Bildes in der PCD-Datei:
// 0 - Turmspitze zeigt nach oben
// 1 - Turmspitze zeigt nach rechts
// 2 - Turmspitze zeigt nach unten
@@ -68,15 +68,15 @@ private:
PCDResolution eResolution; // Welche Aufloesung wir haben wollen
- ULONG nWidth; // Breite des PCD-Bildes
- ULONG nHeight; // Hoehe des PCD-Bildes
- ULONG nImagePos; // Position des Bildes in der PCD-Datei
+ sal_uLong nWidth; // Breite des PCD-Bildes
+ sal_uLong nHeight; // Hoehe des PCD-Bildes
+ sal_uLong nImagePos; // Position des Bildes in der PCD-Datei
// Temporare BLue-Green-Red-Bitmap
- ULONG nBMPWidth;
- ULONG nBMPHeight;
+ sal_uLong nBMPWidth;
+ sal_uLong nBMPHeight;
- void MayCallback(ULONG nPercent);
+ void MayCallback(sal_uLong nPercent);
void CheckPCDImagePacFile();
// Prueft, ob es eine Photo-CD-Datei mit 'Image Pac' ist.
@@ -84,29 +84,29 @@ private:
void ReadOrientation();
// Liest die Ausrichtung und setzt nOrientation
- void ReadImage(ULONG nMinPercent, ULONG nMaxPercent);
+ void ReadImage(sal_uLong nMinPercent, sal_uLong nMaxPercent);
public:
PCDReader() {}
~PCDReader() {}
- BOOL ReadPCD( SvStream & rPCD, Graphic & rGraphic, FilterConfigItem* pConfigItem );
+ sal_Bool ReadPCD( SvStream & rPCD, Graphic & rGraphic, FilterConfigItem* pConfigItem );
};
//=================== Methoden von PCDReader ==============================
-BOOL PCDReader::ReadPCD( SvStream & rPCD, Graphic & rGraphic, FilterConfigItem* pConfigItem )
+sal_Bool PCDReader::ReadPCD( SvStream & rPCD, Graphic & rGraphic, FilterConfigItem* pConfigItem )
{
Bitmap aBmp;
- bStatus = TRUE;
+ bStatus = sal_True;
nLastPercent = 0;
pPCD = &rPCD;
MayCallback( 0 );
- // Ist es eine PCD-Datei mit Bild ? ( setzt bStatus == FALSE, wenn nicht ):
+ // Ist es eine PCD-Datei mit Bild ? ( setzt bStatus == sal_False, wenn nicht ):
CheckPCDImagePacFile();
// Orientierung des Bildes einlesen:
@@ -144,7 +144,7 @@ BOOL PCDReader::ReadPCD( SvStream & rPCD, Graphic & rGraphic, FilterConfigItem*
break;
default:
- bStatus = FALSE;
+ bStatus = sal_False;
}
if ( bStatus )
{
@@ -159,8 +159,8 @@ BOOL PCDReader::ReadPCD( SvStream & rPCD, Graphic & rGraphic, FilterConfigItem*
nBMPHeight = nWidth;
}
aBmp = Bitmap( Size( nBMPWidth, nBMPHeight ), 24 );
- if ( ( mpAcc = aBmp.AcquireWriteAccess() ) == FALSE )
- return FALSE;
+ if ( ( mpAcc = aBmp.AcquireWriteAccess() ) == sal_False )
+ return sal_False;
ReadImage( 5 ,65 );
@@ -172,16 +172,16 @@ BOOL PCDReader::ReadPCD( SvStream & rPCD, Graphic & rGraphic, FilterConfigItem*
// -------------------------------------------------------------------------------------------
-void PCDReader::MayCallback(ULONG /*nPercent*/)
+void PCDReader::MayCallback(sal_uLong /*nPercent*/)
{
/*
if ( nPercent >= nLastPercent + 3 )
{
nLastPercent=nPercent;
- if ( pCallback != NULL && nPercent <= 100 && bStatus == TRUE )
+ if ( pCallback != NULL && nPercent <= 100 && bStatus == sal_True )
{
- if ( ( (*pCallback)( pCallerData, (USHORT)nPercent ) ) == TRUE )
- bStatus = FALSE;
+ if ( ( (*pCallback)( pCallerData, (sal_uInt16)nPercent ) ) == sal_True )
+ bStatus = sal_False;
}
}
*/
@@ -197,14 +197,14 @@ void PCDReader::CheckPCDImagePacFile()
pPCD->Read( Buf, 7 );
Buf[ 7 ] = 0;
if ( ByteString( Buf ).CompareTo( "PCD_IPI" ) != COMPARE_EQUAL )
- bStatus = FALSE;
+ bStatus = sal_False;
}
// -------------------------------------------------------------------------------------------
void PCDReader::ReadOrientation()
{
- if ( bStatus == FALSE )
+ if ( bStatus == sal_False )
return;
pPCD->Seek( 194635 );
*pPCD >> nOrientation;
@@ -213,31 +213,31 @@ void PCDReader::ReadOrientation()
// -------------------------------------------------------------------------------------------
-void PCDReader::ReadImage(ULONG nMinPercent, ULONG nMaxPercent)
+void PCDReader::ReadImage(sal_uLong nMinPercent, sal_uLong nMaxPercent)
{
- ULONG nx,ny,nW2,nH2,nYPair,ndy,nXPair;
+ sal_uLong nx,ny,nW2,nH2,nYPair,ndy,nXPair;
long nL,nCb,nCr,nRed,nGreen,nBlue;
- BYTE * pt;
- BYTE * pL0; // Luminanz fuer jeden Pixel der 1. Zeile des aktuellen Zeilen-Paars
- BYTE * pL1; // Luminanz fuer jeden Pixel der 2. Zeile des aktuellen Zeilen-Paars
- BYTE * pCb; // Blau-Chrominanz fuer je 2x2 Pixel des aktuellen Zeilen-Paars
- BYTE * pCr; // Rot-Chrominanz fuer je 2x2 Pixel des aktuellen Zeilen-Paars
- BYTE * pL0N, * pL1N, * pCbN, * pCrN; // wie oben, nur fuer das naechste Zeilen-Paar
-
- if ( bStatus == FALSE )
+ sal_uInt8 * pt;
+ sal_uInt8 * pL0; // Luminanz fuer jeden Pixel der 1. Zeile des aktuellen Zeilen-Paars
+ sal_uInt8 * pL1; // Luminanz fuer jeden Pixel der 2. Zeile des aktuellen Zeilen-Paars
+ sal_uInt8 * pCb; // Blau-Chrominanz fuer je 2x2 Pixel des aktuellen Zeilen-Paars
+ sal_uInt8 * pCr; // Rot-Chrominanz fuer je 2x2 Pixel des aktuellen Zeilen-Paars
+ sal_uInt8 * pL0N, * pL1N, * pCbN, * pCrN; // wie oben, nur fuer das naechste Zeilen-Paar
+
+ if ( bStatus == sal_False )
return;
nW2=nWidth>>1;
nH2=nHeight>>1;
- pL0 =(BYTE*)rtl_allocateMemory( nWidth );
- pL1 =(BYTE*)rtl_allocateMemory( nWidth );
- pCb =(BYTE*)rtl_allocateMemory( nW2+1 );
- pCr =(BYTE*)rtl_allocateMemory( nW2+1 );
- pL0N=(BYTE*)rtl_allocateMemory( nWidth );
- pL1N=(BYTE*)rtl_allocateMemory( nWidth );
- pCbN=(BYTE*)rtl_allocateMemory( nW2+1 );
- pCrN=(BYTE*)rtl_allocateMemory( nW2+1 );
+ pL0 =(sal_uInt8*)rtl_allocateMemory( nWidth );
+ pL1 =(sal_uInt8*)rtl_allocateMemory( nWidth );
+ pCb =(sal_uInt8*)rtl_allocateMemory( nW2+1 );
+ pCr =(sal_uInt8*)rtl_allocateMemory( nW2+1 );
+ pL0N=(sal_uInt8*)rtl_allocateMemory( nWidth );
+ pL1N=(sal_uInt8*)rtl_allocateMemory( nWidth );
+ pCbN=(sal_uInt8*)rtl_allocateMemory( nW2+1 );
+ pCrN=(sal_uInt8*)rtl_allocateMemory( nW2+1 );
if ( pL0 == NULL || pL1 == NULL || pCb == NULL || pCr == NULL ||
pL0N == NULL || pL1N == NULL || pCbN == NULL || pCrN == NULL)
@@ -250,7 +250,7 @@ void PCDReader::ReadImage(ULONG nMinPercent, ULONG nMaxPercent)
rtl_freeMemory((void*)pL1N);
rtl_freeMemory((void*)pCbN);
rtl_freeMemory((void*)pCrN);
- bStatus = FALSE;
+ bStatus = sal_False;
return;
}
@@ -354,24 +354,24 @@ void PCDReader::ReadImage(ULONG nMinPercent, ULONG nMaxPercent)
if ( nOrientation < 2 )
{
if ( nOrientation == 0 )
- mpAcc->SetPixel( ny, nx, BitmapColor( (BYTE)nRed, (BYTE)nGreen, (BYTE)nBlue ) );
+ mpAcc->SetPixel( ny, nx, BitmapColor( (sal_uInt8)nRed, (sal_uInt8)nGreen, (sal_uInt8)nBlue ) );
else
- mpAcc->SetPixel( nWidth - 1 - nx, ny, BitmapColor( (BYTE)nRed, (BYTE)nGreen, (BYTE)nBlue ) );
+ mpAcc->SetPixel( nWidth - 1 - nx, ny, BitmapColor( (sal_uInt8)nRed, (sal_uInt8)nGreen, (sal_uInt8)nBlue ) );
}
else
{
if ( nOrientation == 2 )
- mpAcc->SetPixel( nHeight - 1 - ny, ( nWidth - 1 - nx ), BitmapColor( (BYTE)nRed, (BYTE)nGreen, (BYTE)nBlue ) );
+ mpAcc->SetPixel( nHeight - 1 - ny, ( nWidth - 1 - nx ), BitmapColor( (sal_uInt8)nRed, (sal_uInt8)nGreen, (sal_uInt8)nBlue ) );
else
- mpAcc->SetPixel( nx, ( nHeight - 1 - ny ), BitmapColor( (BYTE)nRed, (BYTE)nGreen, (BYTE)nBlue ) );
+ mpAcc->SetPixel( nx, ( nHeight - 1 - ny ), BitmapColor( (sal_uInt8)nRed, (sal_uInt8)nGreen, (sal_uInt8)nBlue ) );
}
}
}
if ( pPCD->GetError() )
- bStatus = FALSE;
+ bStatus = sal_False;
MayCallback( nMinPercent + ( nMaxPercent - nMinPercent ) * nYPair / nH2 );
- if ( bStatus == FALSE )
+ if ( bStatus == sal_False )
break;
}
rtl_freeMemory((void*)pL0 );
@@ -386,7 +386,7 @@ void PCDReader::ReadImage(ULONG nMinPercent, ULONG nMaxPercent)
//================== GraphicImport - die exportierte Funktion ================
-extern "C" BOOL __LOADONCALLAPI GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem* pConfigItem, BOOL )
+extern "C" sal_Bool __LOADONCALLAPI GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem* pConfigItem, sal_Bool )
{
PCDReader aPCDReader;
return aPCDReader.ReadPCD( rStream, rGraphic, pConfigItem );
diff --git a/filter/source/graphicfilter/ipcx/ipcx.cxx b/filter/source/graphicfilter/ipcx/ipcx.cxx
index ca77be58a02e..3faadd6ceb08 100644
--- a/filter/source/graphicfilter/ipcx/ipcx.cxx
+++ b/filter/source/graphicfilter/ipcx/ipcx.cxx
@@ -42,29 +42,29 @@ private:
Bitmap aBmp;
BitmapWriteAccess* pAcc;
- BYTE nVersion; // PCX-Version
- BYTE nEncoding; // Art der Komprimierung
- ULONG nBitsPerPlanePix; // Bits Pro Ebene pro Pixel
- ULONG nPlanes; // Anzahl Ebenen
- ULONG nBytesPerPlaneLin; // Bytes in einer Ebenen pro Zeile
- USHORT nPaletteInfo;
+ sal_uInt8 nVersion; // PCX-Version
+ sal_uInt8 nEncoding; // Art der Komprimierung
+ sal_uLong nBitsPerPlanePix; // Bits Pro Ebene pro Pixel
+ sal_uLong nPlanes; // Anzahl Ebenen
+ sal_uLong nBytesPerPlaneLin; // Bytes in einer Ebenen pro Zeile
+ sal_uInt16 nPaletteInfo;
- ULONG nWidth, nHeight; // Bildausmass in Pixeln
- USHORT nResX, nResY; // Aufloesung in Pixel pro Inch oder 0,0
- USHORT nDestBitsPerPixel; // Bits pro Pixel der Zielbitmap 1,4,8 oder 24
- BYTE* pPalette; //
- BOOL nStatus; // status nun nicht mehr am stream abfragen ( SJ )
+ sal_uLong nWidth, nHeight; // Bildausmass in Pixeln
+ sal_uInt16 nResX, nResY; // Aufloesung in Pixel pro Inch oder 0,0
+ sal_uInt16 nDestBitsPerPixel; // Bits pro Pixel der Zielbitmap 1,4,8 oder 24
+ sal_uInt8* pPalette; //
+ sal_Bool nStatus; // status nun nicht mehr am stream abfragen ( SJ )
- BOOL Callback( USHORT nPercent );
+ sal_Bool Callback( sal_uInt16 nPercent );
void ImplReadBody();
- void ImplReadPalette( ULONG nCol );
+ void ImplReadPalette( sal_uLong nCol );
void ImplReadHeader();
public:
PCXReader();
~PCXReader();
- BOOL ReadPCX( SvStream & rPCX, Graphic & rGraphic );
+ sal_Bool ReadPCX( SvStream & rPCX, Graphic & rGraphic );
// Liesst aus dem Stream eine PCX-Datei und fuellt das GDIMetaFile
};
@@ -73,7 +73,7 @@ public:
PCXReader::PCXReader() :
pAcc ( NULL )
{
- pPalette = new BYTE[ 768 ];
+ pPalette = new sal_uInt8[ 768 ];
}
PCXReader::~PCXReader()
@@ -81,25 +81,25 @@ PCXReader::~PCXReader()
delete[] pPalette;
}
-BOOL PCXReader::Callback( USHORT /*nPercent*/ )
+sal_Bool PCXReader::Callback( sal_uInt16 /*nPercent*/ )
{
/*
if (pCallback!=NULL) {
- if (((*pCallback)(pCallerData,nPercent))==TRUE) {
- nStatus = FALSE;
- return TRUE;
+ if (((*pCallback)(pCallerData,nPercent))==sal_True) {
+ nStatus = sal_False;
+ return sal_True;
}
}
*/
- return FALSE;
+ return sal_False;
}
-BOOL PCXReader::ReadPCX( SvStream & rPCX, Graphic & rGraphic )
+sal_Bool PCXReader::ReadPCX( SvStream & rPCX, Graphic & rGraphic )
{
if ( rPCX.GetError() )
- return FALSE;
+ return sal_False;
- ULONG* pDummy = new ULONG; delete pDummy; // damit unter OS/2
+ sal_uLong* pDummy = new sal_uLong; delete pDummy; // damit unter OS/2
// das richtige (Tools-)new
// verwendet wird, da es sonst
// in dieser DLL nur Vector-news
@@ -110,7 +110,7 @@ BOOL PCXReader::ReadPCX( SvStream & rPCX, Graphic & rGraphic )
// Kopf einlesen:
- nStatus = TRUE;
+ nStatus = sal_True;
ImplReadHeader();
@@ -118,15 +118,15 @@ BOOL PCXReader::ReadPCX( SvStream & rPCX, Graphic & rGraphic )
if ( nStatus )
{
aBmp = Bitmap( Size( nWidth, nHeight ), nDestBitsPerPixel );
- if ( ( pAcc = aBmp.AcquireWriteAccess() ) == FALSE )
- return FALSE;
+ if ( ( pAcc = aBmp.AcquireWriteAccess() ) == sal_False )
+ return sal_False;
if ( nDestBitsPerPixel <= 8 )
{
- USHORT nColors = 1 << nDestBitsPerPixel;
- BYTE* pPal = pPalette;
+ sal_uInt16 nColors = 1 << nDestBitsPerPixel;
+ sal_uInt8* pPal = pPalette;
pAcc->SetPaletteEntryCount( nColors );
- for ( USHORT i = 0; i < nColors; i++, pPal += 3 )
+ for ( sal_uInt16 i = 0; i < nColors; i++, pPal += 3 )
{
pAcc->SetPaletteColor( i, BitmapColor ( pPal[ 0 ], pPal[ 1 ], pPal[ 2 ] ) );
}
@@ -138,11 +138,11 @@ BOOL PCXReader::ReadPCX( SvStream & rPCX, Graphic & rGraphic )
// in Palette schreiben:
if ( nDestBitsPerPixel == 8 && nStatus )
{
- BYTE* pPal = pPalette;
+ sal_uInt8* pPal = pPalette;
pPCX->SeekRel(1);
ImplReadPalette(256);
pAcc->SetPaletteEntryCount( 256 );
- for ( USHORT i = 0; i < 256; i++, pPal += 3 )
+ for ( sal_uInt16 i = 0; i < 256; i++, pPal += 3 )
{
pAcc->SetPaletteColor( i, BitmapColor ( pPal[ 0 ], pPal[ 1 ], pPal[ 2 ] ) );
}
@@ -158,31 +158,31 @@ BOOL PCXReader::ReadPCX( SvStream & rPCX, Graphic & rGraphic )
{
aBmp.ReleaseAccess( pAcc ), pAcc = NULL;
rGraphic = aBmp;
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
void PCXReader::ImplReadHeader()
{
- BYTE nbyte;
- USHORT nushort;
- USHORT nMinX,nMinY,nMaxX,nMaxY;
+ sal_uInt8 nbyte;
+ sal_uInt16 nushort;
+ sal_uInt16 nMinX,nMinY,nMaxX,nMaxY;
*pPCX >> nbyte >> nVersion >> nEncoding;
if ( nbyte!=0x0a || (nVersion != 0 && nVersion != 2 && nVersion != 3 && nVersion != 5) || nEncoding > 1 )
{
- nStatus = FALSE;
+ nStatus = sal_False;
return;
}
- *pPCX >> nbyte; nBitsPerPlanePix = (ULONG)nbyte;
+ *pPCX >> nbyte; nBitsPerPlanePix = (sal_uLong)nbyte;
*pPCX >> nMinX >> nMinY >> nMaxX >> nMaxY;
if ((nMinX > nMaxX) || (nMinY > nMaxY))
{
- nStatus = FALSE;
+ nStatus = sal_False;
return;
}
@@ -197,19 +197,19 @@ void PCXReader::ImplReadHeader()
ImplReadPalette( 16 );
pPCX->SeekRel( 1 );
- *pPCX >> nbyte; nPlanes = (ULONG)nbyte;
- *pPCX >> nushort; nBytesPerPlaneLin = (ULONG)nushort;
+ *pPCX >> nbyte; nPlanes = (sal_uLong)nbyte;
+ *pPCX >> nushort; nBytesPerPlaneLin = (sal_uLong)nushort;
*pPCX >> nPaletteInfo;
pPCX->SeekRel( 58 );
- nDestBitsPerPixel = (USHORT)( nBitsPerPlanePix * nPlanes );
+ nDestBitsPerPixel = (sal_uInt16)( nBitsPerPlanePix * nPlanes );
if (nDestBitsPerPixel == 2 || nDestBitsPerPixel == 3) nDestBitsPerPixel = 4;
if ( ( nDestBitsPerPixel != 1 && nDestBitsPerPixel != 4 && nDestBitsPerPixel != 8 && nDestBitsPerPixel != 24 )
|| nPlanes > 4 || nBytesPerPlaneLin < ( ( nWidth * nBitsPerPlanePix+7 ) >> 3 ) )
{
- nStatus = FALSE;
+ nStatus = sal_False;
return;
}
@@ -224,30 +224,30 @@ void PCXReader::ImplReadHeader()
void PCXReader::ImplReadBody()
{
- BYTE *pPlane[ 4 ], * pDest, * pSource1, * pSource2, * pSource3, *pSource4;
- ULONG i, nx, ny, np, nCount, nUsedLineSize, nLineSize, nPercent;
- ULONG nLastPercent = 0;
- BYTE nDat = 0, nCol = 0;
+ sal_uInt8 *pPlane[ 4 ], * pDest, * pSource1, * pSource2, * pSource3, *pSource4;
+ sal_uLong i, nx, ny, np, nCount, nUsedLineSize, nLineSize, nPercent;
+ sal_uLong nLastPercent = 0;
+ sal_uInt8 nDat = 0, nCol = 0;
- nUsedLineSize = (ULONG)( ( ( nWidth * (ULONG)nDestBitsPerPixel ) + 7 ) >> 3 );
+ nUsedLineSize = (sal_uLong)( ( ( nWidth * (sal_uLong)nDestBitsPerPixel ) + 7 ) >> 3 );
nLineSize = ( nUsedLineSize + 3 ) & 0xfffc;
for( np = 0; np < nPlanes; np++ )
- pPlane[ np ] = new BYTE[ nBytesPerPlaneLin ];
+ pPlane[ np ] = new sal_uInt8[ nBytesPerPlaneLin ];
nCount = 0;
for ( ny = 0; ny < nHeight; ny++ )
{
if (pPCX->GetError() || pPCX->IsEof())
{
- nStatus = FALSE;
+ nStatus = sal_False;
break;
}
nPercent = ny * 60 / nHeight + 10;
if ( ny == 0 || nLastPercent + 4 <= nPercent )
{
nLastPercent = nPercent;
- if ( Callback( (USHORT)nPercent ) == TRUE )
+ if ( Callback( (sal_uInt16)nPercent ) == sal_True )
break;
}
for ( np = 0; np < nPlanes; np++)
@@ -269,7 +269,7 @@ void PCXReader::ImplReadBody()
*pPCX >> nDat;
if ( ( nDat & 0xc0 ) == 0xc0 )
{
- nCount =( (ULONG)nDat ) & 0x003f;
+ nCount =( (sal_uLong)nDat ) & 0x003f;
*pPCX >> nDat;
if ( nCount < nx )
{
@@ -310,13 +310,13 @@ void PCXReader::ImplReadBody()
case 0x101 :
for ( i = 0; i < nWidth; i++ )
{
- ULONG nShift = ( i & 7 ) ^ 7;
+ sal_uLong nShift = ( i & 7 ) ^ 7;
if ( nShift == 0 )
pAcc->SetPixel( ny, i, ( *pSource1++ & 1 ) );
else
pAcc->SetPixel(
ny, i,
- sal::static_int_cast< BYTE >(
+ sal::static_int_cast< sal_uInt8 >(
( *pSource1 >> nShift ) & 1) );
}
break;
@@ -353,7 +353,7 @@ void PCXReader::ImplReadBody()
case 0x301 :
for ( i = 0; i < nWidth; i++ )
{
- ULONG nShift = ( i & 7 ) ^ 7;
+ sal_uLong nShift = ( i & 7 ) ^ 7;
if ( nShift == 0 )
{
nCol = ( *pSource1++ & 1) + ( ( *pSource2++ << 1 ) & 2 ) + ( ( *pSource3++ << 2 ) & 4 );
@@ -361,7 +361,7 @@ void PCXReader::ImplReadBody()
}
else
{
- nCol = sal::static_int_cast< BYTE >(
+ nCol = sal::static_int_cast< sal_uInt8 >(
( ( *pSource1 >> nShift ) & 1) + ( ( ( *pSource2 >> nShift ) << 1 ) & 2 ) +
( ( ( *pSource3 >> nShift ) << 2 ) & 4 ));
pAcc->SetPixel( ny, i, nCol );
@@ -372,7 +372,7 @@ void PCXReader::ImplReadBody()
case 0x401 :
for ( i = 0; i < nWidth; i++ )
{
- ULONG nShift = ( i & 7 ) ^ 7;
+ sal_uLong nShift = ( i & 7 ) ^ 7;
if ( nShift == 0 )
{
nCol = ( *pSource1++ & 1) + ( ( *pSource2++ << 1 ) & 2 ) + ( ( *pSource3++ << 2 ) & 4 ) +
@@ -381,7 +381,7 @@ void PCXReader::ImplReadBody()
}
else
{
- nCol = sal::static_int_cast< BYTE >(
+ nCol = sal::static_int_cast< sal_uInt8 >(
( ( *pSource1 >> nShift ) & 1) + ( ( ( *pSource2 >> nShift ) << 1 ) & 2 ) +
( ( ( *pSource3 >> nShift ) << 2 ) & 4 ) + ( ( ( *pSource4 >> nShift ) << 3 ) & 8 ));
pAcc->SetPixel( ny, i, nCol );
@@ -397,7 +397,7 @@ void PCXReader::ImplReadBody()
}
break;
default :
- nStatus = FALSE;
+ nStatus = sal_False;
break;
}
}
@@ -405,11 +405,11 @@ void PCXReader::ImplReadBody()
delete[] pPlane[ np ];
}
-void PCXReader::ImplReadPalette( ULONG nCol )
+void PCXReader::ImplReadPalette( sal_uLong nCol )
{
- BYTE r, g, b;
- BYTE* pPtr = pPalette;
- for ( ULONG i = 0; i < nCol; i++ )
+ sal_uInt8 r, g, b;
+ sal_uInt8* pPtr = pPalette;
+ for ( sal_uLong i = 0; i < nCol; i++ )
{
*pPCX >> r >> g >> b;
*pPtr++ = r;
@@ -420,11 +420,11 @@ void PCXReader::ImplReadPalette( ULONG nCol )
//================== GraphicImport - die exportierte Funktion ================
-extern "C" BOOL __LOADONCALLAPI GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem*, BOOL )
+extern "C" sal_Bool __LOADONCALLAPI GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem*, sal_Bool )
{
PCXReader aPCXReader;
- BOOL nRetValue = aPCXReader.ReadPCX( rStream, rGraphic );
- if ( nRetValue == FALSE )
+ sal_Bool nRetValue = aPCXReader.ReadPCX( rStream, rGraphic );
+ if ( nRetValue == sal_False )
rStream.SetError( SVSTREAM_FILEFORMAT_ERROR );
return nRetValue;
}
diff --git a/filter/source/graphicfilter/ipict/ipict.cxx b/filter/source/graphicfilter/ipict/ipict.cxx
index 2a1992e246a3..b4cb2f826a6b 100644
--- a/filter/source/graphicfilter/ipict/ipict.cxx
+++ b/filter/source/graphicfilter/ipict/ipict.cxx
@@ -50,7 +50,7 @@ namespace PictReaderInternal {
}
//! reads black/white pattern from SvStream
- ULONG read(SvStream &stream);
+ sal_uLong read(SvStream &stream);
//! sets the color
void setColor(Color &col) { isColor = true; color = col; }
/** returns a color which can be "used" to replace the pattern,
@@ -62,9 +62,9 @@ namespace PictReaderInternal {
if (isColor) return color;
// we create a gray pattern from nBitCount
double alpha = nBitCount / 64.0;
- return Color(BYTE(alpha*fgColor.GetRed()+(1.0-alpha)*bkColor.GetRed()),
- BYTE(alpha*fgColor.GetGreen()+(1.0-alpha)*bkColor.GetGreen()),
- BYTE(alpha*fgColor.GetBlue()+(1.0-alpha)*bkColor.GetBlue()));
+ return Color(sal_uInt8(alpha*fgColor.GetRed()+(1.0-alpha)*bkColor.GetRed()),
+ sal_uInt8(alpha*fgColor.GetGreen()+(1.0-alpha)*bkColor.GetGreen()),
+ sal_uInt8(alpha*fgColor.GetBlue()+(1.0-alpha)*bkColor.GetBlue()));
}
//! returns true if this is the default pattern
@@ -89,10 +89,10 @@ namespace PictReaderInternal {
bool isRead;
};
- ULONG Pattern::read(SvStream &stream) {
+ sal_uLong Pattern::read(SvStream &stream) {
short nx,ny;
unsigned char nbyte[8];
- ULONG nHiBytes, nLoBytes;
+ sal_uLong nHiBytes, nLoBytes;
isColor = false;
// Anzahl der Bits im Pattern zaehlen, die auf 1 gesetzt sind:
@@ -105,14 +105,14 @@ namespace PictReaderInternal {
}
// Pattern in 2 Langworten unterbringen:
- nHiBytes=(((((((ULONG)nbyte[0])<<8)|
- (ULONG)nbyte[1])<<8)|
- (ULONG)nbyte[2])<<8)|
- (ULONG)nbyte[3];
- nLoBytes=(((((((ULONG)nbyte[4])<<8)|
- (ULONG)nbyte[5])<<8)|
- (ULONG)nbyte[6])<<8)|
- (ULONG)nbyte[7];
+ nHiBytes=(((((((sal_uLong)nbyte[0])<<8)|
+ (sal_uLong)nbyte[1])<<8)|
+ (sal_uLong)nbyte[2])<<8)|
+ (sal_uLong)nbyte[3];
+ nLoBytes=(((((((sal_uLong)nbyte[4])<<8)|
+ (sal_uLong)nbyte[5])<<8)|
+ (sal_uLong)nbyte[6])<<8)|
+ (sal_uLong)nbyte[7];
// Einen PenStyle machen:
if (nBitCount<=0) penStyle=PEN_NULL;
@@ -155,9 +155,9 @@ private:
VirtualDevice * pVirDev; // Hier werden die Drawing-Methoden aufgerufen.
// Dabei findet ein Recording in das GDIMetaFile
// statt.
- ULONG nOrigPos; // Anfaengliche Position in pPict
- UINT16 nOrigNumberFormat; // Anfaengliches Nummern-Format von pPict
- BOOL IsVersion2; // Ob es ein Version 2 Pictfile ist.
+ sal_uLong nOrigPos; // Anfaengliche Position in pPict
+ sal_uInt16 nOrigNumberFormat; // Anfaengliches Nummern-Format von pPict
+ sal_Bool IsVersion2; // Ob es ein Version 2 Pictfile ist.
Rectangle aBoundingRect; // Min/Max-Rechteck fuer die ganze Zeichnung
Point aPenPosition;
@@ -177,7 +177,7 @@ private:
Fraction aHRes;
Fraction aVRes;
- BOOL Callback(USHORT nPercent);
+ sal_Bool Callback(sal_uInt16 nPercent);
Point ReadPoint();
@@ -195,32 +195,32 @@ private:
void ReadRectangle(Rectangle & rRect);
- ULONG ReadPolygon(Polygon & rPoly);
+ sal_uLong ReadPolygon(Polygon & rPoly);
- ULONG ReadPixPattern(Pattern &pattern);
+ sal_uLong ReadPixPattern(Pattern &pattern);
Rectangle aLastRect;
- ULONG ReadAndDrawRect(PictDrawingMethod eMethod);
- ULONG ReadAndDrawSameRect(PictDrawingMethod eMethod);
+ sal_uLong ReadAndDrawRect(PictDrawingMethod eMethod);
+ sal_uLong ReadAndDrawSameRect(PictDrawingMethod eMethod);
Rectangle aLastRoundRect;
- ULONG ReadAndDrawRoundRect(PictDrawingMethod eMethod);
- ULONG ReadAndDrawSameRoundRect(PictDrawingMethod eMethod);
+ sal_uLong ReadAndDrawRoundRect(PictDrawingMethod eMethod);
+ sal_uLong ReadAndDrawSameRoundRect(PictDrawingMethod eMethod);
Rectangle aLastOval;
- ULONG ReadAndDrawOval(PictDrawingMethod eMethod);
- ULONG ReadAndDrawSameOval(PictDrawingMethod eMethod);
+ sal_uLong ReadAndDrawOval(PictDrawingMethod eMethod);
+ sal_uLong ReadAndDrawSameOval(PictDrawingMethod eMethod);
Polygon aLastPolygon;
- ULONG ReadAndDrawPolygon(PictDrawingMethod eMethod);
- ULONG ReadAndDrawSamePolygon(PictDrawingMethod eMethod);
+ sal_uLong ReadAndDrawPolygon(PictDrawingMethod eMethod);
+ sal_uLong ReadAndDrawSamePolygon(PictDrawingMethod eMethod);
Rectangle aLastArcRect;
- ULONG ReadAndDrawArc(PictDrawingMethod eMethod);
- ULONG ReadAndDrawSameArc(PictDrawingMethod eMethod);
+ sal_uLong ReadAndDrawArc(PictDrawingMethod eMethod);
+ sal_uLong ReadAndDrawSameArc(PictDrawingMethod eMethod);
- ULONG ReadAndDrawRgn(PictDrawingMethod eMethod);
- ULONG ReadAndDrawSameRgn(PictDrawingMethod eMethod);
+ sal_uLong ReadAndDrawRgn(PictDrawingMethod eMethod);
+ sal_uLong ReadAndDrawSameRgn(PictDrawingMethod eMethod);
// returns true, if we do not need to print the shape/text/frame
bool IsInvisible(PictDrawingMethod eMethod) const {
@@ -230,16 +230,16 @@ private:
}
void DrawingMethod(PictDrawingMethod eMethod);
- ULONG ReadAndDrawText();
+ sal_uLong ReadAndDrawText();
- ULONG ReadPixMapEtc(Bitmap & rBitmap, BOOL bBaseAddr, BOOL bColorTable,
+ sal_uLong ReadPixMapEtc(Bitmap & rBitmap, sal_Bool bBaseAddr, sal_Bool bColorTable,
Rectangle * pSrcRect, Rectangle * pDestRect,
- BOOL bMode, BOOL bMaskRgn);
+ sal_Bool bMode, sal_Bool bMaskRgn);
void ReadHeader();
// Liesst den Kopf der Pict-Datei, setzt IsVersion2 und aBoundingRect
- ULONG ReadData(USHORT nOpcode);
+ sal_uLong ReadData(sal_uInt16 nOpcode);
// Liesst die Daten eines Opcodes ein und fuehrt die Operation aus.
// Auf jeden Fall wird die Anzahl der Datenbytes zu dem Opcode
// zurueckgeliefert.
@@ -248,7 +248,7 @@ private:
void SetFillColor( const Color& rColor );
// OSNOLA: returns the text encoding which must be used for system id
- static rtl_TextEncoding GetTextEncoding (USHORT fId = 0xFFFF);
+ static rtl_TextEncoding GetTextEncoding (sal_uInt16 fId = 0xFFFF);
public:
PictReader() { aActFont.SetCharSet(GetTextEncoding()); }
@@ -311,7 +311,7 @@ public:
}
//=================== Methoden von PictReader ==============================
-rtl_TextEncoding PictReader::GetTextEncoding (USHORT fId) {
+rtl_TextEncoding PictReader::GetTextEncoding (sal_uInt16 fId) {
static bool first = true;
static rtl_TextEncoding enc = RTL_TEXTENCODING_APPLE_ROMAN;
if (first) {
@@ -358,17 +358,17 @@ void PictReader::SetFillColor( const Color& rColor )
pVirDev->SetFillColor( rColor );
}
-BOOL PictReader::Callback(USHORT /*nPercent*/)
+sal_Bool PictReader::Callback(sal_uInt16 /*nPercent*/)
{
/*
if (pCallback!=NULL) {
- if (((*pCallback)(pCallerData,nPercent))==TRUE) {
+ if (((*pCallback)(pCallerData,nPercent))==sal_True) {
pPict->SetError(SVSTREAM_FILEFORMAT_ERROR);
- return TRUE;
+ return sal_True;
}
}
*/
- return FALSE;
+ return sal_False;
}
Point PictReader::ReadPoint()
@@ -450,10 +450,10 @@ Color PictReader::ReadColor()
Color PictReader::ReadRGBColor()
{
- USHORT nR, nG, nB;
+ sal_uInt16 nR, nG, nB;
*pPict >> nR >> nG >> nB;
- return Color( (BYTE) ( nR >> 8 ), (BYTE) ( nG >> 8 ), (BYTE) ( nB >> 8 ) );
+ return Color( (sal_uInt8) ( nR >> 8 ), (sal_uInt8) ( nG >> 8 ), (sal_uInt8) ( nB >> 8 ) );
}
@@ -467,44 +467,44 @@ void PictReader::ReadRectangle(Rectangle & rRect)
}
-ULONG PictReader::ReadPolygon(Polygon & rPoly)
+sal_uLong PictReader::ReadPolygon(Polygon & rPoly)
{
- USHORT nSize,i;
- ULONG nDataSize;
+ sal_uInt16 nSize,i;
+ sal_uLong nDataSize;
*pPict >> nSize;
pPict->SeekRel(8);
- nDataSize=(ULONG)nSize;
+ nDataSize=(sal_uLong)nSize;
nSize=(nSize-10)/4;
rPoly.SetSize(nSize);
for (i=0; i<nSize; i++) rPoly.SetPoint(ReadPoint(),i);
return nDataSize;
}
-ULONG PictReader::ReadPixPattern(PictReader::Pattern &pattern)
+sal_uLong PictReader::ReadPixPattern(PictReader::Pattern &pattern)
{
// Keine Ahnung, ob dies richtig ist, weil kein Bild gefunden, das
// PixPatterns enthaelt. Auch hier nur der Versuch, die Groesse der Daten zu
// ermitteln, und einfache StarView-Styles daraus zu machen. Gluecklicherweise
// enthaelt ein PixPattern immer auch ein normales Pattern.
- ULONG nDataSize;
- USHORT nPatType;
+ sal_uLong nDataSize;
+ sal_uInt16 nPatType;
Bitmap aBMP;
*pPict >> nPatType;
if (nPatType==1) {
pattern.read(*pPict);
- nDataSize=ReadPixMapEtc(aBMP,FALSE,TRUE,NULL,NULL,FALSE,FALSE);
+ nDataSize=ReadPixMapEtc(aBMP,sal_False,sal_True,NULL,NULL,sal_False,sal_False);
// CHANGEME: use average pixmap colors to update the pattern, ...
if (nDataSize!=0xffffffff) nDataSize+=10;
}
else if (nPatType==2) {
pattern.read(*pPict);
// RGBColor
- USHORT nR, nG, nB;
+ sal_uInt16 nR, nG, nB;
*pPict >> nR >> nG >> nB;
- Color col((BYTE) ( nR >> 8 ), (BYTE) ( nG >> 8 ), (BYTE) ( nB >> 8 ) );
+ Color col((sal_uInt8) ( nR >> 8 ), (sal_uInt8) ( nG >> 8 ), (sal_uInt8) ( nB >> 8 ) );
pattern.setColor(col);
nDataSize=16;
}
@@ -513,14 +513,14 @@ ULONG PictReader::ReadPixPattern(PictReader::Pattern &pattern)
return nDataSize;
}
-ULONG PictReader::ReadAndDrawRect(PictDrawingMethod eMethod)
+sal_uLong PictReader::ReadAndDrawRect(PictDrawingMethod eMethod)
{
ReadRectangle(aLastRect);
ReadAndDrawSameRect(eMethod);
return 8;
}
-ULONG PictReader::ReadAndDrawSameRect(PictDrawingMethod eMethod)
+sal_uLong PictReader::ReadAndDrawSameRect(PictDrawingMethod eMethod)
{
if (IsInvisible(eMethod)) return 0;
DrawingMethod(eMethod);
@@ -528,14 +528,14 @@ ULONG PictReader::ReadAndDrawSameRect(PictDrawingMethod eMethod)
return 0;
}
-ULONG PictReader::ReadAndDrawRoundRect(PictDrawingMethod eMethod)
+sal_uLong PictReader::ReadAndDrawRoundRect(PictDrawingMethod eMethod)
{
ReadRectangle(aLastRoundRect);
ReadAndDrawSameRoundRect(eMethod);
return 8;
}
-ULONG PictReader::ReadAndDrawSameRoundRect(PictDrawingMethod eMethod)
+sal_uLong PictReader::ReadAndDrawSameRoundRect(PictDrawingMethod eMethod)
{
if (IsInvisible(eMethod)) return 0;
DrawingMethod(eMethod);
@@ -543,14 +543,14 @@ ULONG PictReader::ReadAndDrawSameRoundRect(PictDrawingMethod eMethod)
return 0;
}
-ULONG PictReader::ReadAndDrawOval(PictDrawingMethod eMethod)
+sal_uLong PictReader::ReadAndDrawOval(PictDrawingMethod eMethod)
{
ReadRectangle(aLastOval);
ReadAndDrawSameOval(eMethod);
return 8;
}
-ULONG PictReader::ReadAndDrawSameOval(PictDrawingMethod eMethod)
+sal_uLong PictReader::ReadAndDrawSameOval(PictDrawingMethod eMethod)
{
if (IsInvisible(eMethod)) return 0;
DrawingMethod(eMethod);
@@ -558,15 +558,15 @@ ULONG PictReader::ReadAndDrawSameOval(PictDrawingMethod eMethod)
return 0;
}
-ULONG PictReader::ReadAndDrawPolygon(PictDrawingMethod eMethod)
+sal_uLong PictReader::ReadAndDrawPolygon(PictDrawingMethod eMethod)
{
- ULONG nDataSize;
+ sal_uLong nDataSize;
nDataSize=ReadPolygon(aLastPolygon);
ReadAndDrawSamePolygon(eMethod);
return nDataSize;
}
-ULONG PictReader::ReadAndDrawSamePolygon(PictDrawingMethod eMethod)
+sal_uLong PictReader::ReadAndDrawSamePolygon(PictDrawingMethod eMethod)
{
if (IsInvisible(eMethod)) return 0;
DrawingMethod(eMethod);
@@ -575,14 +575,14 @@ ULONG PictReader::ReadAndDrawSamePolygon(PictDrawingMethod eMethod)
}
-ULONG PictReader::ReadAndDrawArc(PictDrawingMethod eMethod)
+sal_uLong PictReader::ReadAndDrawArc(PictDrawingMethod eMethod)
{
ReadRectangle(aLastArcRect);
ReadAndDrawSameArc(eMethod);
return 12;
}
-ULONG PictReader::ReadAndDrawSameArc(PictDrawingMethod eMethod)
+sal_uLong PictReader::ReadAndDrawSameArc(PictDrawingMethod eMethod)
{
short nstartAngle, narcAngle;
double fAng1, fAng2;
@@ -601,9 +601,9 @@ ULONG PictReader::ReadAndDrawSameArc(PictDrawingMethod eMethod)
return 4;
}
-ULONG PictReader::ReadAndDrawRgn(PictDrawingMethod eMethod)
+sal_uLong PictReader::ReadAndDrawRgn(PictDrawingMethod eMethod)
{
- USHORT nSize;
+ sal_uInt16 nSize;
*pPict >> nSize;
// read the DATA
@@ -621,10 +621,10 @@ ULONG PictReader::ReadAndDrawRgn(PictDrawingMethod eMethod)
// - takes M and inverts all values in [a_0,b_0-1], in [a_1,b_1-1] ...
// - sets M = new y_i line mask
ReadAndDrawSameRgn(eMethod);
- return (ULONG)nSize;
+ return (sal_uLong)nSize;
}
-ULONG PictReader::ReadAndDrawSameRgn(PictDrawingMethod eMethod)
+sal_uLong PictReader::ReadAndDrawSameRgn(PictDrawingMethod eMethod)
{
if (IsInvisible(eMethod)) return 0;
DrawingMethod(eMethod);
@@ -676,7 +676,7 @@ void PictReader::DrawingMethod(PictDrawingMethod eMethod)
case PDM_TEXT:
aActFont.SetColor(aActForeColor);
aActFont.SetFillColor(aActBackColor);
- aActFont.SetTransparent(TRUE);
+ aActFont.SetTransparent(sal_True);
pVirDev->SetFont(aActFont);
pVirDev->SetRasterOp(ROP_OVERPAINT);
break;
@@ -686,13 +686,13 @@ void PictReader::DrawingMethod(PictDrawingMethod eMethod)
eActMethod=eMethod;
}
-ULONG PictReader::ReadAndDrawText()
+sal_uLong PictReader::ReadAndDrawText()
{
char nByteLen;
sal_uInt32 nLen, nDataLen;
sal_Char sText[256];
- *pPict >> nByteLen; nLen=((ULONG)nByteLen)&0x000000ff;
+ *pPict >> nByteLen; nLen=((sal_uLong)nByteLen)&0x000000ff;
nDataLen = nLen + 1;
pPict->Read( &sText, nLen );
@@ -708,18 +708,18 @@ ULONG PictReader::ReadAndDrawText()
return nDataLen;
}
-ULONG PictReader::ReadPixMapEtc( Bitmap &rBitmap, BOOL bBaseAddr, BOOL bColorTable, Rectangle* pSrcRect,
- Rectangle* pDestRect, BOOL bMode, BOOL bMaskRgn )
+sal_uLong PictReader::ReadPixMapEtc( Bitmap &rBitmap, sal_Bool bBaseAddr, sal_Bool bColorTable, Rectangle* pSrcRect,
+ Rectangle* pDestRect, sal_Bool bMode, sal_Bool bMaskRgn )
{
Bitmap aBitmap;
BitmapWriteAccess* pAcc = NULL;
BitmapReadAccess* pReadAcc = NULL;
- USHORT ny, nx, nColTabSize;
- USHORT nRowBytes, nBndX, nBndY, nWidth, nHeight, nVersion, nPackType, nPixelType,
+ sal_uInt16 ny, nx, nColTabSize;
+ sal_uInt16 nRowBytes, nBndX, nBndY, nWidth, nHeight, nVersion, nPackType, nPixelType,
nPixelSize, nCmpCount, nCmpSize;
sal_uInt32 nPackSize, nPlaneBytes, nHRes, nVRes;
- BYTE nDat, nRed, nGreen, nBlue, nDummy;
- ULONG i, nDataSize = 0;
+ sal_uInt8 nDat, nRed, nGreen, nBlue, nDummy;
+ sal_uLong i, nDataSize = 0;
// In nDataSize wird mitgerechnet, wie gross die gesammten Daten sind.
nDataSize = 0;
@@ -769,7 +769,7 @@ ULONG PictReader::ReadPixMapEtc( Bitmap &rBitmap, BOOL bBaseAddr, BOOL bColorTab
{
pPict->SeekRel(2);
*pPict >> nRed >> nDummy >> nGreen >> nDummy >> nBlue >> nDummy;
- pAcc->SetPaletteColor( (USHORT) i, BitmapColor( nRed, nGreen, nBlue ) );
+ pAcc->SetPaletteColor( (sal_uInt16) i, BitmapColor( nRed, nGreen, nBlue ) );
}
nDataSize += 8 + nColTabSize * 8;
}
@@ -794,9 +794,9 @@ ULONG PictReader::ReadPixMapEtc( Bitmap &rBitmap, BOOL bBaseAddr, BOOL bColorTab
// ggf. Quell-Rechteck einlesen:
if ( pSrcRect != 0)
{
- USHORT nTop, nLeft, nBottom, nRight;
+ sal_uInt16 nTop, nLeft, nBottom, nRight;
*pPict >> nTop >> nLeft >> nBottom >> nRight;
- *pSrcRect = Rectangle( (ULONG)nLeft, (ULONG)nTop, (ULONG)nRight, (ULONG)nBottom );
+ *pSrcRect = Rectangle( (sal_uLong)nLeft, (sal_uLong)nTop, (sal_uLong)nRight, (sal_uLong)nBottom );
nDataSize += 8;
}
@@ -820,19 +820,19 @@ ULONG PictReader::ReadPixMapEtc( Bitmap &rBitmap, BOOL bBaseAddr, BOOL bColorTab
// ggf. Region einlesen (bzw. ueberspringen):
if ( bMaskRgn )
{
- USHORT nSize;
+ sal_uInt16 nSize;
*pPict >> nSize;
pPict->SeekRel( nSize - 2 );
- nDataSize += (ULONG)nSize;
+ nDataSize += (sal_uLong)nSize;
}
-// aSMem << (nHRes/1665L) << (nVRes/1665L) << ((ULONG)0) << ((ULONG)0);
+// aSMem << (nHRes/1665L) << (nVRes/1665L) << ((sal_uLong)0) << ((sal_uLong)0);
// Lese und Schreibe Bitmap-Bits:
if ( nPixelSize == 1 || nPixelSize == 2 || nPixelSize == 4 || nPixelSize == 8 )
{
- BYTE nByteCountAsByte, nFlagCounterByte;
- USHORT nByteCount, nCount, nSrcBPL, nDestBPL;
+ sal_uInt8 nByteCountAsByte, nFlagCounterByte;
+ sal_uInt16 nByteCount, nCount, nSrcBPL, nDestBPL;
if ( nPixelSize == 1 ) nSrcBPL = ( nWidth + 7 ) >> 3;
else if ( nPixelSize == 2 ) nSrcBPL = ( nWidth + 3 ) >> 2;
@@ -860,13 +860,13 @@ ULONG PictReader::ReadPixMapEtc( Bitmap &rBitmap, BOOL bBaseAddr, BOOL bColorTab
if ( nRowBytes > 250 )
{
*pPict >> nByteCount;
- nDataSize += 2 + (ULONG)nByteCount;
+ nDataSize += 2 + (sal_uLong)nByteCount;
}
else
{
*pPict >> nByteCountAsByte;
- nByteCount = ( (USHORT)nByteCountAsByte ) & 0x00ff;
- nDataSize += 1 + (ULONG)nByteCount;
+ nByteCount = ( (sal_uInt16)nByteCountAsByte ) & 0x00ff;
+ nDataSize += 1 + (sal_uLong)nByteCount;
}
while ( nByteCount )
@@ -874,7 +874,7 @@ ULONG PictReader::ReadPixMapEtc( Bitmap &rBitmap, BOOL bBaseAddr, BOOL bColorTab
*pPict >> nFlagCounterByte;
if ( ( nFlagCounterByte & 0x80 ) == 0 )
{
- nCount = ( (USHORT)nFlagCounterByte ) + 1;
+ nCount = ( (sal_uInt16)nFlagCounterByte ) + 1;
for ( i = 0; i < nCount; i++ )
{
*pPict >> nDat;
@@ -885,7 +885,7 @@ ULONG PictReader::ReadPixMapEtc( Bitmap &rBitmap, BOOL bBaseAddr, BOOL bColorTab
}
else
{
- nCount = ( 1 - ( ( (USHORT)nFlagCounterByte ) | 0xff00 ) );
+ nCount = ( 1 - ( ( (sal_uInt16)nFlagCounterByte ) | 0xff00 ) );
*pPict >> nDat;
for ( i = 0; i < nCount; i++ )
{
@@ -900,9 +900,9 @@ ULONG PictReader::ReadPixMapEtc( Bitmap &rBitmap, BOOL bBaseAddr, BOOL bColorTab
}
else if ( nPixelSize == 16 )
{
- BYTE nByteCountAsByte, nFlagCounterByte;
- USHORT nByteCount, nCount, nDestBPL,nD;
- ULONG nSrcBitsPos;
+ sal_uInt8 nByteCountAsByte, nFlagCounterByte;
+ sal_uInt16 nByteCount, nCount, nDestBPL,nD;
+ sal_uLong nSrcBitsPos;
if ( nRowBytes < 2 * nWidth )
BITMAPERROR;
@@ -917,12 +917,12 @@ ULONG PictReader::ReadPixMapEtc( Bitmap &rBitmap, BOOL bBaseAddr, BOOL bColorTab
for ( i = 0; i < nWidth; i++ )
{
*pPict >> nD;
- nRed = (BYTE)( nD >> 7 );
- nGreen = (BYTE)( nD >> 2 );
- nBlue = (BYTE)( nD << 3 );
+ nRed = (sal_uInt8)( nD >> 7 );
+ nGreen = (sal_uInt8)( nD >> 2 );
+ nBlue = (sal_uInt8)( nD << 3 );
pAcc->SetPixel( ny, nx++, BitmapColor( nRed, nGreen, nBlue ) );
}
- nDataSize += ( (ULONG)nWidth ) * 2;
+ nDataSize += ( (sal_uLong)nWidth ) * 2;
}
else
{
@@ -935,7 +935,7 @@ ULONG PictReader::ReadPixMapEtc( Bitmap &rBitmap, BOOL bBaseAddr, BOOL bColorTab
else
{
*pPict >> nByteCountAsByte;
- nByteCount = ( (USHORT)nByteCountAsByte ) & 0x00ff;
+ nByteCount = ( (sal_uInt16)nByteCountAsByte ) & 0x00ff;
nByteCount++;
}
while ( nx != nWidth )
@@ -943,43 +943,43 @@ ULONG PictReader::ReadPixMapEtc( Bitmap &rBitmap, BOOL bBaseAddr, BOOL bColorTab
*pPict >> nFlagCounterByte;
if ( (nFlagCounterByte & 0x80) == 0)
{
- nCount=((USHORT)nFlagCounterByte)+1;
+ nCount=((sal_uInt16)nFlagCounterByte)+1;
if ( nCount + nx > nWidth) // SJ: the RLE decoding seems not to be correct here,
nCount = nWidth - nx; // I don't want to change this until I have a bugdoc for
for (i=0; i<nCount; i++) // this case. Have a look at 32bit, there I changed the
{ // encoding, so that it is used a straight forward array
*pPict >> nD;
- nRed = (BYTE)( nD >> 7 );
- nGreen = (BYTE)( nD >> 2 );
- nBlue = (BYTE)( nD << 3 );
+ nRed = (sal_uInt8)( nD >> 7 );
+ nGreen = (sal_uInt8)( nD >> 2 );
+ nBlue = (sal_uInt8)( nD << 3 );
pAcc->SetPixel( ny, nx++, BitmapColor( nRed, nGreen, nBlue ) );
}
}
else
{
- nCount=(1-(((USHORT)nFlagCounterByte)|0xff00));
+ nCount=(1-(((sal_uInt16)nFlagCounterByte)|0xff00));
if ( nCount + nx > nWidth )
nCount = nWidth - nx;
*pPict >> nD;
- nRed = (BYTE)( nD >> 7 );
- nGreen = (BYTE)( nD >> 2 );
- nBlue = (BYTE)( nD << 3 );
+ nRed = (sal_uInt8)( nD >> 7 );
+ nGreen = (sal_uInt8)( nD >> 2 );
+ nBlue = (sal_uInt8)( nD << 3 );
for (i=0; i<nCount; i++)
{
pAcc->SetPixel( ny, nx++, BitmapColor( nRed, nGreen, nBlue ) );
}
}
}
- nDataSize+=(ULONG)nByteCount;
- pPict->Seek(nSrcBitsPos+(ULONG)nByteCount);
+ nDataSize+=(sal_uLong)nByteCount;
+ pPict->Seek(nSrcBitsPos+(sal_uLong)nByteCount);
}
}
}
else if (nPixelSize==32)
{
- BYTE nByteCountAsByte, nFlagCounterByte;
- USHORT nByteCount, nCount;
- ULONG nSrcBitsPos;
+ sal_uInt8 nByteCountAsByte, nFlagCounterByte;
+ sal_uInt16 nByteCount, nCount;
+ sal_uLong nSrcBitsPos;
BitmapColor aBitmapColor;
if ( ( pReadAcc = aBitmap.AcquireReadAccess() ) == NULL )
BITMAPERROR;
@@ -997,7 +997,7 @@ ULONG PictReader::ReadPixMapEtc( Bitmap &rBitmap, BOOL bBaseAddr, BOOL bColorTab
*pPict >> nDummy >> nRed >> nGreen >> nBlue;
pAcc->SetPixel( ny, nx, BitmapColor( nRed, nGreen, nBlue) );
}
- nDataSize += ( (ULONG)nWidth ) * 4;
+ nDataSize += ( (sal_uLong)nWidth ) * 4;
}
}
}
@@ -1010,7 +1010,7 @@ ULONG PictReader::ReadPixMapEtc( Bitmap &rBitmap, BOOL bBaseAddr, BOOL bColorTab
*pPict >> nRed >> nGreen >> nBlue;
pAcc->SetPixel( ny, nx, BitmapColor( nRed, nGreen, nBlue ) );
}
- nDataSize += ( (ULONG)nWidth ) * 3;
+ nDataSize += ( (sal_uLong)nWidth ) * 3;
}
}
else
@@ -1029,7 +1029,7 @@ ULONG PictReader::ReadPixMapEtc( Bitmap &rBitmap, BOOL bBaseAddr, BOOL bColorTab
else
{
*pPict >> nByteCountAsByte;
- nByteCount = (BYTE)nByteCountAsByte;
+ nByteCount = (sal_uInt8)nByteCountAsByte;
nByteCount++;
}
i = 0;
@@ -1038,7 +1038,7 @@ ULONG PictReader::ReadPixMapEtc( Bitmap &rBitmap, BOOL bBaseAddr, BOOL bColorTab
*pPict >> nFlagCounterByte;
if ( ( nFlagCounterByte & 0x80 ) == 0)
{
- nCount = ( (USHORT)nFlagCounterByte ) + 1;
+ nCount = ( (sal_uInt16)nFlagCounterByte ) + 1;
if ( ( i + nCount ) > (sal_uInt32)( nWidth * nCmpCount ) )
nCount = (sal_uInt16)( nWidth * nCmpCount - i );
while( nCount-- )
@@ -1049,7 +1049,7 @@ ULONG PictReader::ReadPixMapEtc( Bitmap &rBitmap, BOOL bBaseAddr, BOOL bColorTab
}
else
{
- nCount = ( 1 - ( ( (USHORT)nFlagCounterByte ) | 0xff00 ) );
+ nCount = ( 1 - ( ( (sal_uInt16)nFlagCounterByte ) | 0xff00 ) );
if ( ( i + nCount ) > (sal_uInt32)( nWidth * nCmpCount ) )
nCount = (sal_uInt16)( nWidth * nCmpCount - i );
*pPict >> nDat;
@@ -1062,8 +1062,8 @@ ULONG PictReader::ReadPixMapEtc( Bitmap &rBitmap, BOOL bBaseAddr, BOOL bColorTab
pTmp += nWidth;
for ( nx = 0; nx < nWidth; pTmp++ )
pAcc->SetPixel( ny, nx++, BitmapColor( *pTmp, pTmp[ nWidth ], pTmp[ 2 * nWidth ] ) );
- nDataSize += (ULONG)nByteCount;
- pPict->Seek( nSrcBitsPos + (ULONG)nByteCount );
+ nDataSize += (sal_uLong)nByteCount;
+ pPict->Seek( nSrcBitsPos + (sal_uLong)nByteCount );
}
delete[] pScanline;
}
@@ -1085,7 +1085,7 @@ void PictReader::ReadHeader()
sal_Char sBuf[ 2 ];
// previous code considers pPict->Tell() as the normal starting position,
// can we have nStartPos != 0 ?
- ULONG nStartPos = pPict->Tell();
+ sal_uLong nStartPos = pPict->Tell();
// Standard:
// a picture file begins by 512 bytes (reserved to the application) followed by the picture data
// while clipboard, pictures stored in a document often contain only the picture data.
@@ -1151,7 +1151,7 @@ void PictReader::ReadHeader()
if ( sBuf[ 0 ] == 0x11 && sBuf[ 1 ] == 0x01 ) {
// pict v1 must be rare and we do only few tests
if (st < 2) { confidence[st] = --actualConfid; continue; }
- IsVersion2 = FALSE; return;
+ IsVersion2 = sal_False; return;
}
if (sBuf[0] != 0x00) continue; // unrecovable error
int numZero = 0;
@@ -1169,11 +1169,11 @@ void PictReader::ReadHeader()
if (sBuf[1] == 0x01 ) {
// pict v1 must be rare and we do only few tests
if (st < 2) { confidence[st] = --actualConfid; continue; }
- IsVersion2 = FALSE; return;
+ IsVersion2 = sal_False; return;
}
if (sBuf[1] != 0x02 ) continue; // not a version 2 file
- IsVersion2=TRUE;
+ IsVersion2=sal_True;
short nExtVer, nReserved;
// 3 Bytes ignored : end of version arg 0x02FF (ie: 0xFF), HeaderOp : 0x0C00
pPict->SeekRel( 3 );
@@ -1208,11 +1208,11 @@ void PictReader::ReadHeader()
pPict->SetError(SVSTREAM_FILEFORMAT_ERROR);
}
-ULONG PictReader::ReadData(USHORT nOpcode)
+sal_uLong PictReader::ReadData(sal_uInt16 nOpcode)
{
- USHORT nUSHORT;
+ sal_uInt16 nUSHORT;
Point aPoint;
- ULONG nDataSize=0;
+ sal_uLong nDataSize=0;
PictDrawingMethod shapeDMethod = PDM_UNDEFINED;
switch (nOpcode & 7) {
case 0: shapeDMethod = PDM_FRAME; break;
@@ -1272,10 +1272,10 @@ ULONG PictReader::ReadData(USHORT nOpcode)
else aActFont.SetItalic(ITALIC_NONE);
if ( (nFace & 0x04)!=0 ) aActFont.SetUnderline(UNDERLINE_SINGLE);
else aActFont.SetUnderline(UNDERLINE_NONE);
- if ( (nFace & 0x08)!=0 ) aActFont.SetOutline(TRUE);
- else aActFont.SetOutline(FALSE);
- if ( (nFace & 0x10)!=0 ) aActFont.SetShadow(TRUE);
- else aActFont.SetShadow(FALSE);
+ if ( (nFace & 0x08)!=0 ) aActFont.SetOutline(sal_True);
+ else aActFont.SetOutline(sal_False);
+ if ( (nFace & 0x10)!=0 ) aActFont.SetShadow(sal_True);
+ else aActFont.SetShadow(sal_False);
eActMethod=PDM_UNDEFINED;
nDataSize=1;
break;
@@ -1500,7 +1500,7 @@ ULONG PictReader::ReadData(USHORT nOpcode)
else if (nUSHORT <= 1023) aActFont.SetFamily(FAMILY_SWISS);
else aActFont.SetFamily(FAMILY_ROMAN);
aActFont.SetCharSet(GetTextEncoding(nUSHORT));
- *pPict >> nByteLen; nLen=((USHORT)nByteLen)&0x00ff;
+ *pPict >> nByteLen; nLen=((sal_uInt16)nByteLen)&0x00ff;
pPict->Read( &sFName, nLen );
sFName[ nLen ] = 0;
String aString( (const sal_Char*)&sFName, gsl_getSystemTextEncoding() );
@@ -1693,7 +1693,7 @@ ULONG PictReader::ReadData(USHORT nOpcode)
case 0x0090: { // BitsRect
Bitmap aBmp;
Rectangle aSrcRect, aDestRect;
- nDataSize=ReadPixMapEtc(aBmp, FALSE, TRUE, &aSrcRect, &aDestRect, TRUE, FALSE);
+ nDataSize=ReadPixMapEtc(aBmp, sal_False, sal_True, &aSrcRect, &aDestRect, sal_True, sal_False);
DrawingMethod(PDM_PAINT);
pVirDev->DrawBitmap(aDestRect.TopLeft(),aDestRect.GetSize(),aBmp);
break;
@@ -1701,7 +1701,7 @@ ULONG PictReader::ReadData(USHORT nOpcode)
case 0x0091: { // BitsRgn
Bitmap aBmp;
Rectangle aSrcRect, aDestRect;
- nDataSize=ReadPixMapEtc(aBmp, FALSE, TRUE, &aSrcRect, &aDestRect, TRUE, TRUE);
+ nDataSize=ReadPixMapEtc(aBmp, sal_False, sal_True, &aSrcRect, &aDestRect, sal_True, sal_True);
DrawingMethod(PDM_PAINT);
pVirDev->DrawBitmap(aDestRect.TopLeft(),aDestRect.GetSize(),aBmp);
break;
@@ -1718,7 +1718,7 @@ ULONG PictReader::ReadData(USHORT nOpcode)
case 0x0098: { // PackBitsRect
Bitmap aBmp;
Rectangle aSrcRect, aDestRect;
- nDataSize=ReadPixMapEtc(aBmp, FALSE, TRUE, &aSrcRect, &aDestRect, TRUE, FALSE);
+ nDataSize=ReadPixMapEtc(aBmp, sal_False, sal_True, &aSrcRect, &aDestRect, sal_True, sal_False);
DrawingMethod(PDM_PAINT);
pVirDev->DrawBitmap(aDestRect.TopLeft(),aDestRect.GetSize(),aBmp);
break;
@@ -1726,7 +1726,7 @@ ULONG PictReader::ReadData(USHORT nOpcode)
case 0x0099: { // PackBitsRgn
Bitmap aBmp;
Rectangle aSrcRect, aDestRect;
- nDataSize=ReadPixMapEtc(aBmp, FALSE, TRUE, &aSrcRect, &aDestRect, TRUE, TRUE);
+ nDataSize=ReadPixMapEtc(aBmp, sal_False, sal_True, &aSrcRect, &aDestRect, sal_True, sal_True);
DrawingMethod(PDM_PAINT);
pVirDev->DrawBitmap(aDestRect.TopLeft(),aDestRect.GetSize(),aBmp);
break;
@@ -1734,7 +1734,7 @@ ULONG PictReader::ReadData(USHORT nOpcode)
case 0x009a: { // DirectBitsRect
Bitmap aBmp;
Rectangle aSrcRect, aDestRect;
- nDataSize=ReadPixMapEtc(aBmp, TRUE, FALSE, &aSrcRect, &aDestRect, TRUE, FALSE);
+ nDataSize=ReadPixMapEtc(aBmp, sal_True, sal_False, &aSrcRect, &aDestRect, sal_True, sal_False);
DrawingMethod(PDM_PAINT);
pVirDev->DrawBitmap(aDestRect.TopLeft(),aDestRect.GetSize(),aBmp);
break;
@@ -1742,7 +1742,7 @@ ULONG PictReader::ReadData(USHORT nOpcode)
case 0x009b: { // DirectBitsRgn
Bitmap aBmp;
Rectangle aSrcRect, aDestRect;
- nDataSize=ReadPixMapEtc(aBmp, TRUE, FALSE, &aSrcRect, &aDestRect, TRUE, TRUE);
+ nDataSize=ReadPixMapEtc(aBmp, sal_True, sal_False, &aSrcRect, &aDestRect, sal_True, sal_True);
DrawingMethod(PDM_PAINT);
pVirDev->DrawBitmap(aDestRect.TopLeft(),aDestRect.GetSize(),aBmp);
break;
@@ -1788,9 +1788,9 @@ ULONG PictReader::ReadData(USHORT nOpcode)
void PictReader::ReadPict( SvStream & rStreamPict, GDIMetaFile & rGDIMetaFile )
{
- USHORT nOpcode;
- BYTE nOneByteOpcode;
- ULONG nSize, nPos, nStartPos, nEndPos, nPercent, nLastPercent;
+ sal_uInt16 nOpcode;
+ sal_uInt8 nOneByteOpcode;
+ sal_uLong nSize, nPos, nStartPos, nEndPos, nPercent, nLastPercent;
pPict = &rStreamPict;
nOrigPos = pPict->Tell();
@@ -1811,7 +1811,7 @@ void PictReader::ReadPict( SvStream & rStreamPict, GDIMetaFile & rGDIMetaFile )
aHRes = aVRes = Fraction( 1, 1 );
pVirDev = new VirtualDevice();
- pVirDev->EnableOutput(FALSE);
+ pVirDev->EnableOutput(sal_False);
rGDIMetaFile.Record(pVirDev);
pPict->SetNumberFormatInt(NUMBERFORMAT_INT_BIGENDIAN);
@@ -1831,7 +1831,7 @@ void PictReader::ReadPict( SvStream & rStreamPict, GDIMetaFile & rGDIMetaFile )
nPercent=(nPos-nStartPos)*100/(nEndPos-nStartPos);
if (nLastPercent+4<=nPercent) {
- if (Callback((USHORT)nPercent)==TRUE) break;
+ if (Callback((sal_uInt16)nPercent)==sal_True) break;
nLastPercent=nPercent;
}
@@ -1840,7 +1840,7 @@ void PictReader::ReadPict( SvStream & rStreamPict, GDIMetaFile & rGDIMetaFile )
else
{
*pPict >> nOneByteOpcode;
- nOpcode=(USHORT)nOneByteOpcode;
+ nOpcode=(sal_uInt16)nOneByteOpcode;
}
if (pPict->GetError())
@@ -1883,18 +1883,18 @@ void PictReader::ReadPict( SvStream & rStreamPict, GDIMetaFile & rGDIMetaFile )
//================== GraphicImport - die exportierte Funktion ================
-extern "C" BOOL __LOADONCALLAPI GraphicImport( SvStream& rIStm, Graphic & rGraphic, FilterConfigItem*, BOOL )
+extern "C" sal_Bool __LOADONCALLAPI GraphicImport( SvStream& rIStm, Graphic & rGraphic, FilterConfigItem*, sal_Bool )
{
GDIMetaFile aMTF;
PictReader aPictReader;
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
aPictReader.ReadPict( rIStm, aMTF );
if ( !rIStm.GetError() )
{
rGraphic = Graphic( aMTF );
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
diff --git a/filter/source/graphicfilter/ipsd/ipsd.cxx b/filter/source/graphicfilter/ipsd/ipsd.cxx
index 5a52c17956ed..8e7fea60e387 100644
--- a/filter/source/graphicfilter/ipsd/ipsd.cxx
+++ b/filter/source/graphicfilter/ipsd/ipsd.cxx
@@ -45,15 +45,15 @@
typedef struct
{
- UINT32 nSignature;
- UINT16 nVersion;
- UINT32 nPad1;
- UINT16 nPad2;
- UINT16 nChannels;
- UINT32 nRows;
- UINT32 nColumns;
- UINT16 nDepth;
- UINT16 nMode;
+ sal_uInt32 nSignature;
+ sal_uInt16 nVersion;
+ sal_uInt32 nPad1;
+ sal_uInt16 nPad2;
+ sal_uInt16 nChannels;
+ sal_uInt32 nRows;
+ sal_uInt32 nColumns;
+ sal_uInt16 nDepth;
+ sal_uInt16 nMode;
} PSDFileHeader;
@@ -75,17 +75,17 @@ private:
BitmapReadAccess* mpReadAcc;
BitmapWriteAccess* mpWriteAcc;
BitmapWriteAccess* mpMaskWriteAcc;
- USHORT mnDestBitDepth;
- BOOL mbCompression; // RLE decoding
- BYTE* mpPalette;
+ sal_uInt16 mnDestBitDepth;
+ sal_Bool mbCompression; // RLE decoding
+ sal_uInt8* mpPalette;
- BOOL ImplReadBody();
- BOOL ImplReadHeader();
+ sal_Bool ImplReadBody();
+ sal_Bool ImplReadHeader();
public:
PSDReader();
~PSDReader();
- BOOL ReadPSD( SvStream & rPSD, Graphic & rGraphic );
+ sal_Bool ReadPSD( SvStream & rPSD, Graphic & rGraphic );
};
//=================== Methoden von PSDReader ==============================
@@ -94,8 +94,8 @@ PSDReader::PSDReader() :
mpFileHeader ( NULL ),
mnXResFixed ( 0 ),
mnYResFixed ( 0 ),
- mbStatus ( TRUE ),
- mbTransparent ( FALSE ),
+ mbStatus ( sal_True ),
+ mbTransparent ( sal_False ),
mpReadAcc ( NULL ),
mpWriteAcc ( NULL ),
mpMaskWriteAcc ( NULL ),
@@ -111,35 +111,35 @@ PSDReader::~PSDReader()
// ------------------------------------------------------------------------
-BOOL PSDReader::ReadPSD( SvStream & rPSD, Graphic & rGraphic )
+sal_Bool PSDReader::ReadPSD( SvStream & rPSD, Graphic & rGraphic )
{
if ( rPSD.GetError() )
- return FALSE;
+ return sal_False;
mpPSD = &rPSD;
mpPSD->SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN );
// Kopf einlesen:
- if ( ImplReadHeader() == FALSE )
- return FALSE;
+ if ( ImplReadHeader() == sal_False )
+ return sal_False;
Size aBitmapSize( mpFileHeader->nColumns, mpFileHeader->nRows );
maBmp = Bitmap( aBitmapSize, mnDestBitDepth );
if ( ( mpWriteAcc = maBmp.AcquireWriteAccess() ) == NULL )
- mbStatus = FALSE;
+ mbStatus = sal_False;
if ( ( mpReadAcc = maBmp.AcquireReadAccess() ) == NULL )
- mbStatus = FALSE;
+ mbStatus = sal_False;
if ( mbTransparent && mbStatus )
{
maMaskBmp = Bitmap( aBitmapSize, 1 );
if ( ( mpMaskWriteAcc = maMaskBmp.AcquireWriteAccess() ) == NULL )
- mbStatus = FALSE;
+ mbStatus = sal_False;
}
if ( mpPalette && mbStatus )
{
mpWriteAcc->SetPaletteEntryCount( 256 );
- for ( USHORT i = 0; i < 256; i++ )
+ for ( sal_uInt16 i = 0; i < 256; i++ )
{
mpWriteAcc->SetPaletteColor( i, Color( mpPalette[ i ], mpPalette[ i + 256 ], mpPalette[ i + 512 ] ) );
}
@@ -164,7 +164,7 @@ BOOL PSDReader::ReadPSD( SvStream & rPSD, Graphic & rGraphic )
}
}
else
- mbStatus = FALSE;
+ mbStatus = sal_False;
if ( mpWriteAcc )
maBmp.ReleaseAccess( mpWriteAcc );
if ( mpReadAcc )
@@ -176,32 +176,32 @@ BOOL PSDReader::ReadPSD( SvStream & rPSD, Graphic & rGraphic )
// ------------------------------------------------------------------------
-BOOL PSDReader::ImplReadHeader()
+sal_Bool PSDReader::ImplReadHeader()
{
- UINT16 nCompression;
- UINT32 nColorLength, nResourceLength, nLayerMaskLength;
+ sal_uInt16 nCompression;
+ sal_uInt32 nColorLength, nResourceLength, nLayerMaskLength;
mpFileHeader = new PSDFileHeader;
if ( !mpFileHeader )
- return FALSE;
+ return sal_False;
*mpPSD >> mpFileHeader->nSignature >> mpFileHeader->nVersion >> mpFileHeader->nPad1 >>
mpFileHeader->nPad2 >> mpFileHeader->nChannels >> mpFileHeader->nRows >>
mpFileHeader->nColumns >> mpFileHeader->nDepth >> mpFileHeader->nMode;
if ( ( mpFileHeader->nSignature != 0x38425053 ) || ( mpFileHeader->nVersion != 1 ) )
- return FALSE;
+ return sal_False;
if ( mpFileHeader->nRows == 0 || mpFileHeader->nColumns == 0 )
- return FALSE;
+ return sal_False;
if ( ( mpFileHeader->nRows > 30000 ) || ( mpFileHeader->nColumns > 30000 ) )
- return FALSE;
+ return sal_False;
- UINT16 nDepth = mpFileHeader->nDepth;
+ sal_uInt16 nDepth = mpFileHeader->nDepth;
if (!( ( nDepth == 1 ) || ( nDepth == 8 ) || ( nDepth == 16 ) ) )
- return FALSE;
+ return sal_False;
mnDestBitDepth = ( nDepth == 16 ) ? 8 : nDepth;
@@ -211,27 +211,27 @@ BOOL PSDReader::ImplReadHeader()
switch ( mpFileHeader->nChannels )
{
case 5 :
- mbTransparent = TRUE;
+ mbTransparent = sal_True;
case 4 :
mnDestBitDepth = 24;
break;
default :
- return FALSE;
+ return sal_False;
}
}
else switch ( mpFileHeader->nChannels )
{
case 2 :
- mbTransparent = TRUE;
+ mbTransparent = sal_True;
case 1 :
break;
case 4 :
- mbTransparent = TRUE;
+ mbTransparent = sal_True;
case 3 :
mnDestBitDepth = 24;
break;
default:
- return FALSE;
+ return sal_False;
}
switch ( mpFileHeader->nMode )
@@ -239,17 +239,17 @@ BOOL PSDReader::ImplReadHeader()
case PSD_BITMAP :
{
if ( nColorLength || ( nDepth != 1 ) )
- return FALSE;
+ return sal_False;
}
break;
case PSD_INDEXED :
{
if ( nColorLength != 768 ) // we need the color map
- return FALSE;
- mpPalette = new BYTE[ 768 ];
+ return sal_False;
+ mpPalette = new sal_uInt8[ 768 ];
if ( mpPalette == NULL )
- return FALSE;
+ return sal_False;
mpPSD->Read( mpPalette, 768 );
}
break;
@@ -260,13 +260,13 @@ BOOL PSDReader::ImplReadHeader()
case PSD_GRAYSCALE :
{
if ( nColorLength )
- return FALSE;
- mpPalette = new BYTE[ 768 ];
+ return sal_False;
+ mpPalette = new sal_uInt8[ 768 ];
if ( mpPalette == NULL )
- return FALSE;
- for ( USHORT i = 0; i < 256; i++ )
+ return sal_False;
+ for ( sal_uInt16 i = 0; i < 256; i++ )
{
- mpPalette[ i ] = mpPalette[ i + 256 ] = mpPalette[ i + 512 ] = (BYTE)i;
+ mpPalette[ i ] = mpPalette[ i + 256 ] = mpPalette[ i + 512 ] = (sal_uInt8)i;
}
}
break;
@@ -277,12 +277,12 @@ BOOL PSDReader::ImplReadHeader()
case PSD_LAB :
{
if ( nColorLength ) // color table is not supported by the other graphic modes
- return FALSE;
+ return sal_False;
}
break;
default:
- return FALSE;
+ return sal_False;
}
*mpPSD >> nResourceLength;
sal_uInt32 nLayerPos = mpPSD->Tell() + nResourceLength;
@@ -327,27 +327,27 @@ BOOL PSDReader::ImplReadHeader()
*mpPSD >> nCompression;
if ( nCompression == 0 )
{
- mbCompression = FALSE;
+ mbCompression = sal_False;
}
else if ( nCompression == 1 )
{
mpPSD->SeekRel( ( mpFileHeader->nRows * mpFileHeader->nChannels ) << 1 );
- mbCompression = TRUE;
+ mbCompression = sal_True;
}
else
- return FALSE;
+ return sal_False;
- return TRUE;
+ return sal_True;
}
// ------------------------------------------------------------------------
-BOOL PSDReader::ImplReadBody()
+sal_Bool PSDReader::ImplReadBody()
{
- ULONG nX, nY;
+ sal_uLong nX, nY;
char nRunCount = 0;
signed char nBitCount = -1;
- BYTE nDat = 0, nDummy, nRed, nGreen, nBlue;
+ sal_uInt8 nDat = 0, nDummy, nRed, nGreen, nBlue;
BitmapColor aBitmapColor;
nX = nY = 0;
@@ -370,9 +370,9 @@ BOOL PSDReader::ImplReadBody()
nDat ^= 0xff;
nBitCount = 7;
}
- for ( USHORT i = 0; i < ( -nRunCount + 1 ); i++ )
+ for ( sal_uInt16 i = 0; i < ( -nRunCount + 1 ); i++ )
{
- mpWriteAcc->SetPixel( nY, nX, (BYTE)nDat >> nBitCount-- );
+ mpWriteAcc->SetPixel( nY, nX, (sal_uInt8)nDat >> nBitCount-- );
if ( ++nX == mpFileHeader->nColumns )
{
nX = 0;
@@ -385,7 +385,7 @@ BOOL PSDReader::ImplReadBody()
}
else // a raw packet
{
- for ( USHORT i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
+ for ( sal_uInt16 i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
{
if ( nBitCount == -1 ) // bits left in nDat ?
{
@@ -393,7 +393,7 @@ BOOL PSDReader::ImplReadBody()
nDat ^= 0xff;
nBitCount = 7;
}
- mpWriteAcc->SetPixel( nY, nX, (BYTE)nDat >> nBitCount-- );
+ mpWriteAcc->SetPixel( nY, nX, (sal_uInt8)nDat >> nBitCount-- );
if ( ++nX == mpFileHeader->nColumns )
{
nX = 0;
@@ -420,9 +420,9 @@ BOOL PSDReader::ImplReadBody()
*mpPSD >> nDat;
if ( mpFileHeader->nDepth == 16 ) // 16 bit depth is to be skipped
*mpPSD >> nDummy;
- for ( USHORT i = 0; i < ( -nRunCount + 1 ); i++ )
+ for ( sal_uInt16 i = 0; i < ( -nRunCount + 1 ); i++ )
{
- mpWriteAcc->SetPixel( nY, nX, (BYTE)nDat );
+ mpWriteAcc->SetPixel( nY, nX, (sal_uInt8)nDat );
if ( ++nX == mpFileHeader->nColumns )
{
nX = 0;
@@ -434,12 +434,12 @@ BOOL PSDReader::ImplReadBody()
}
else // a raw packet
{
- for ( USHORT i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
+ for ( sal_uInt16 i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
{
*mpPSD >> nDat;
if ( mpFileHeader->nDepth == 16 ) // 16 bit depth is to be skipped
*mpPSD >> nDummy;
- mpWriteAcc->SetPixel( nY, nX, (BYTE)nDat );
+ mpWriteAcc->SetPixel( nY, nX, (sal_uInt8)nDat );
if ( ++nX == mpFileHeader->nColumns )
{
nX = 0;
@@ -469,9 +469,9 @@ BOOL PSDReader::ImplReadBody()
*mpPSD >> nRed;
if ( mpFileHeader->nDepth == 16 ) // 16 bit depth is to be skipped
*mpPSD >> nDummy;
- for ( USHORT i = 0; i < ( -nRunCount + 1 ); i++ )
+ for ( sal_uInt16 i = 0; i < ( -nRunCount + 1 ); i++ )
{
- mpWriteAcc->SetPixel( nY, nX, BitmapColor( nRed, (BYTE)0, (BYTE)0 ) );
+ mpWriteAcc->SetPixel( nY, nX, BitmapColor( nRed, (sal_uInt8)0, (sal_uInt8)0 ) );
if ( ++nX == mpFileHeader->nColumns )
{
nX = 0;
@@ -483,12 +483,12 @@ BOOL PSDReader::ImplReadBody()
}
else // a raw packet
{
- for ( USHORT i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
+ for ( sal_uInt16 i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
{
*mpPSD >> nRed;
if ( mpFileHeader->nDepth == 16 ) // 16 bit depth is to be skipped
*mpPSD >> nDummy;
- mpWriteAcc->SetPixel( nY, nX, BitmapColor( nRed, (BYTE)0, (BYTE)0 ) );
+ mpWriteAcc->SetPixel( nY, nX, BitmapColor( nRed, (sal_uInt8)0, (sal_uInt8)0 ) );
if ( ++nX == mpFileHeader->nColumns )
{
nX = 0;
@@ -509,7 +509,7 @@ BOOL PSDReader::ImplReadBody()
*mpPSD >> nGreen;
if ( mpFileHeader->nDepth == 16 ) // 16 bit depth is to be skipped
*mpPSD >> nDummy;
- for ( USHORT i = 0; i < ( -nRunCount + 1 ); i++ )
+ for ( sal_uInt16 i = 0; i < ( -nRunCount + 1 ); i++ )
{
aBitmapColor = mpReadAcc->GetPixel( nY, nX );
mpWriteAcc->SetPixel( nY, nX, BitmapColor( aBitmapColor.GetRed(), nGreen, aBitmapColor.GetBlue() ) );
@@ -524,7 +524,7 @@ BOOL PSDReader::ImplReadBody()
}
else // a raw packet
{
- for ( USHORT i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
+ for ( sal_uInt16 i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
{
*mpPSD >> nGreen;
if ( mpFileHeader->nDepth == 16 ) // 16 bit depth is to be skipped
@@ -551,7 +551,7 @@ BOOL PSDReader::ImplReadBody()
*mpPSD >> nBlue;
if ( mpFileHeader->nDepth == 16 ) // 16 bit depth is to be skipped
*mpPSD >> nDummy;
- for ( USHORT i = 0; i < ( -nRunCount + 1 ); i++ )
+ for ( sal_uInt16 i = 0; i < ( -nRunCount + 1 ); i++ )
{
aBitmapColor = mpReadAcc->GetPixel( nY, nX );
mpWriteAcc->SetPixel( nY, nX, BitmapColor( aBitmapColor.GetRed(), aBitmapColor.GetGreen(), nBlue ) );
@@ -566,7 +566,7 @@ BOOL PSDReader::ImplReadBody()
}
else // a raw packet
{
- for ( USHORT i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
+ for ( sal_uInt16 i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
{
*mpPSD >> nBlue;
if ( mpFileHeader->nDepth == 16 ) // 16 bit depth is to be skipped
@@ -585,8 +585,8 @@ BOOL PSDReader::ImplReadBody()
}
if ( mpFileHeader->nMode == PSD_CMYK )
{
- UINT32 nBlack, nBlackMax = 0;
- BYTE* pBlack = new BYTE[ mpFileHeader->nRows * mpFileHeader->nColumns ];
+ sal_uInt32 nBlack, nBlackMax = 0;
+ sal_uInt8* pBlack = new sal_uInt8[ mpFileHeader->nRows * mpFileHeader->nColumns ];
nY = 0;
while ( nY < mpFileHeader->nRows )
{
@@ -600,15 +600,15 @@ BOOL PSDReader::ImplReadBody()
if ( mpFileHeader->nDepth == 16 ) // 16 bit depth is to be skipped
*mpPSD >> nDummy;
- for ( USHORT i = 0; i < ( -nRunCount + 1 ); i++ )
+ for ( sal_uInt16 i = 0; i < ( -nRunCount + 1 ); i++ )
{
- nBlack = (BYTE)mpReadAcc->GetPixel( nY, nX ).GetRed() + nDat;
+ nBlack = (sal_uInt8)mpReadAcc->GetPixel( nY, nX ).GetRed() + nDat;
if ( nBlack > nBlackMax )
nBlackMax = nBlack;
- nBlack = (BYTE)mpReadAcc->GetPixel( nY, nX ).GetGreen() + nDat;
+ nBlack = (sal_uInt8)mpReadAcc->GetPixel( nY, nX ).GetGreen() + nDat;
if ( nBlack > nBlackMax )
nBlackMax = nBlack;
- nBlack = (BYTE)mpReadAcc->GetPixel( nY, nX ).GetBlue() + nDat;
+ nBlack = (sal_uInt8)mpReadAcc->GetPixel( nY, nX ).GetBlue() + nDat;
if ( nBlack > nBlackMax )
nBlackMax = nBlack;
pBlack[ nX + nY * mpFileHeader->nColumns ] = nDat ^ 0xff;
@@ -623,19 +623,19 @@ BOOL PSDReader::ImplReadBody()
}
else // a raw packet
{
- for ( USHORT i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
+ for ( sal_uInt16 i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
{
*mpPSD >> nDat;
if ( mpFileHeader->nDepth == 16 ) // 16 bit depth is to be skipped
*mpPSD >> nDummy;
- nBlack = (BYTE)mpReadAcc->GetPixel( nY, nX ).GetRed() + nDat;
+ nBlack = (sal_uInt8)mpReadAcc->GetPixel( nY, nX ).GetRed() + nDat;
if ( nBlack > nBlackMax )
nBlackMax = nBlack;
- nBlack = (BYTE)mpReadAcc->GetPixel( nY, nX ).GetGreen() + nDat;
+ nBlack = (sal_uInt8)mpReadAcc->GetPixel( nY, nX ).GetGreen() + nDat;
if ( nBlack > nBlackMax )
nBlackMax = nBlack;
- nBlack = (BYTE)mpReadAcc->GetPixel( nY, nX ).GetBlue() + nDat;
+ nBlack = (sal_uInt8)mpReadAcc->GetPixel( nY, nX ).GetBlue() + nDat;
if ( nBlack > nBlackMax )
nBlackMax = nBlack;
pBlack[ nX + nY * mpFileHeader->nColumns ] = nDat ^ 0xff;
@@ -654,12 +654,12 @@ BOOL PSDReader::ImplReadBody()
{
for ( nX = 0; nX < mpFileHeader->nColumns; nX++ )
{
- INT32 nDAT = pBlack[ nX + nY * mpFileHeader->nColumns ] * ( nBlackMax - 256 ) / 0x1ff;
+ sal_Int32 nDAT = pBlack[ nX + nY * mpFileHeader->nColumns ] * ( nBlackMax - 256 ) / 0x1ff;
aBitmapColor = mpReadAcc->GetPixel( nY, nX );
- BYTE cR = (BYTE) MinMax( aBitmapColor.GetRed() - nDAT, 0L, 255L );
- BYTE cG = (BYTE) MinMax( aBitmapColor.GetGreen() - nDAT, 0L, 255L );
- BYTE cB = (BYTE) MinMax( aBitmapColor.GetBlue() - nDAT, 0L, 255L );
+ sal_uInt8 cR = (sal_uInt8) MinMax( aBitmapColor.GetRed() - nDAT, 0L, 255L );
+ sal_uInt8 cG = (sal_uInt8) MinMax( aBitmapColor.GetGreen() - nDAT, 0L, 255L );
+ sal_uInt8 cB = (sal_uInt8) MinMax( aBitmapColor.GetBlue() - nDAT, 0L, 255L );
mpWriteAcc->SetPixel( nY, nX, BitmapColor( cR, cG, cB ) );
}
}
@@ -688,9 +688,9 @@ BOOL PSDReader::ImplReadBody()
nDat = 1;
if ( mpFileHeader->nDepth == 16 ) // 16 bit depth is to be skipped
*mpPSD >> nDummy;
- for ( USHORT i = 0; i < ( -nRunCount + 1 ); i++ )
+ for ( sal_uInt16 i = 0; i < ( -nRunCount + 1 ); i++ )
{
- mpMaskWriteAcc->SetPixel( nY, nX, (BYTE)nDat );
+ mpMaskWriteAcc->SetPixel( nY, nX, (sal_uInt8)nDat );
if ( ++nX == mpFileHeader->nColumns )
{
nX = 0;
@@ -702,7 +702,7 @@ BOOL PSDReader::ImplReadBody()
}
else // a raw packet
{
- for ( USHORT i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
+ for ( sal_uInt16 i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
{
*mpPSD >> nDat;
if ( nDat )
@@ -711,7 +711,7 @@ BOOL PSDReader::ImplReadBody()
nDat = 1;
if ( mpFileHeader->nDepth == 16 ) // 16 bit depth is to be skipped
*mpPSD >> nDummy;
- mpMaskWriteAcc->SetPixel( nY, nX, (BYTE)nDat );
+ mpMaskWriteAcc->SetPixel( nY, nX, (sal_uInt8)nDat );
if ( ++nX == mpFileHeader->nColumns )
{
nX = 0;
@@ -723,12 +723,12 @@ BOOL PSDReader::ImplReadBody()
}
}
}
- return TRUE;
+ return sal_True;
}
//================== GraphicImport - die exportierte Funktion ================
-extern "C" BOOL __LOADONCALLAPI GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem*, BOOL )
+extern "C" sal_Bool __LOADONCALLAPI GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem*, sal_Bool )
{
PSDReader aPSDReader;
diff --git a/filter/source/graphicfilter/iras/iras.cxx b/filter/source/graphicfilter/iras/iras.cxx
index c20a85354471..c39c6f2db708 100644
--- a/filter/source/graphicfilter/iras/iras.cxx
+++ b/filter/source/graphicfilter/iras/iras.cxx
@@ -51,34 +51,34 @@ private:
SvStream* mpRAS; // Die einzulesende RAS-Datei
- BOOL mbStatus;
+ sal_Bool mbStatus;
Bitmap maBmp;
BitmapWriteAccess* mpAcc;
sal_uInt32 mnWidth, mnHeight; // Bildausmass in Pixeln
- USHORT mnDstBitsPerPix;
- USHORT mnDstColors;
+ sal_uInt16 mnDstBitsPerPix;
+ sal_uInt16 mnDstColors;
sal_uInt32 mnDepth, mnImageDatSize, mnType;
sal_uInt32 mnColorMapType, mnColorMapSize;
- BYTE mnRepCount, mnRepVal; // RLE Decoding
- BOOL mbPalette;
+ sal_uInt8 mnRepCount, mnRepVal; // RLE Decoding
+ sal_Bool mbPalette;
- BOOL ImplReadBody();
- BOOL ImplReadHeader();
- BYTE ImplGetByte();
+ sal_Bool ImplReadBody();
+ sal_Bool ImplReadHeader();
+ sal_uInt8 ImplGetByte();
public:
RASReader();
~RASReader();
- BOOL ReadRAS( SvStream & rRAS, Graphic & rGraphic );
+ sal_Bool ReadRAS( SvStream & rRAS, Graphic & rGraphic );
};
//=================== Methoden von RASReader ==============================
RASReader::RASReader() :
- mbStatus ( TRUE ),
+ mbStatus ( sal_True ),
mpAcc ( NULL ),
mnRepCount ( 0 ),
- mbPalette ( FALSE )
+ mbPalette ( sal_False )
{
}
@@ -88,47 +88,47 @@ RASReader::~RASReader()
//----------------------------------------------------------------------------
-BOOL RASReader::ReadRAS( SvStream & rRAS, Graphic & rGraphic )
+sal_Bool RASReader::ReadRAS( SvStream & rRAS, Graphic & rGraphic )
{
- UINT32 nMagicNumber;
+ sal_uInt32 nMagicNumber;
if ( rRAS.GetError() )
- return FALSE;
+ return sal_False;
mpRAS = &rRAS;
mpRAS->SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN );
*mpRAS >> nMagicNumber;
if ( nMagicNumber != SUNRASTER_MAGICNUMBER )
- return FALSE;
+ return sal_False;
// Kopf einlesen:
- if ( ( mbStatus = ImplReadHeader() ) == FALSE )
- return FALSE;
+ if ( ( mbStatus = ImplReadHeader() ) == sal_False )
+ return sal_False;
maBmp = Bitmap( Size( mnWidth, mnHeight ), mnDstBitsPerPix );
- if ( ( mpAcc = maBmp.AcquireWriteAccess() ) == FALSE )
- return FALSE;
+ if ( ( mpAcc = maBmp.AcquireWriteAccess() ) == sal_False )
+ return sal_False;
if ( mnDstBitsPerPix <= 8 ) // paletten bildchen
{
if ( mnColorMapType == RAS_COLOR_RAW_MAP ) // RAW Colormap wird geskipped
{
- ULONG nCurPos = mpRAS->Tell();
+ sal_uLong nCurPos = mpRAS->Tell();
mpRAS->Seek( nCurPos + mnColorMapSize );
}
else if ( mnColorMapType == RAS_COLOR_RGB_MAP ) // RGB koennen wir auslesen
{
- mnDstColors = (USHORT)( mnColorMapSize / 3 );
+ mnDstColors = (sal_uInt16)( mnColorMapSize / 3 );
if ( ( 1 << mnDstBitsPerPix ) < mnDstColors )
- return FALSE;
+ return sal_False;
if ( ( mnDstColors >= 2 ) && ( ( mnColorMapSize % 3 ) == 0 ) )
{
mpAcc->SetPaletteEntryCount( mnDstColors );
- USHORT i;
- BYTE nRed[256], nGreen[256], nBlue[256];
+ sal_uInt16 i;
+ sal_uInt8 nRed[256], nGreen[256], nBlue[256];
for ( i = 0; i < mnDstColors; i++ ) *mpRAS >> nRed[ i ];
for ( i = 0; i < mnDstColors; i++ ) *mpRAS >> nGreen[ i ];
for ( i = 0; i < mnDstColors; i++ ) *mpRAS >> nBlue[ i ];
@@ -136,23 +136,23 @@ BOOL RASReader::ReadRAS( SvStream & rRAS, Graphic & rGraphic )
{
mpAcc->SetPaletteColor( i, BitmapColor( nRed[ i ], nGreen[ i ], nBlue[ i ] ) );
}
- mbPalette = TRUE;
+ mbPalette = sal_True;
}
else
- return FALSE;
+ return sal_False;
}
else if ( mnColorMapType != RAS_COLOR_NO_MAP ) // alles andere ist kein standard
- return FALSE;
+ return sal_False;
if ( !mbPalette )
{
mnDstColors = 1 << mnDstBitsPerPix;
mpAcc->SetPaletteEntryCount( mnDstColors );
- for ( USHORT i = 0; i < mnDstColors; i++ )
+ for ( sal_uInt16 i = 0; i < mnDstColors; i++ )
{
- ULONG nCount = 255 - ( 255 * i / ( mnDstColors - 1 ) );
- mpAcc->SetPaletteColor( i, BitmapColor( (BYTE)nCount, (BYTE)nCount, (BYTE)nCount ) );
+ sal_uLong nCount = 255 - ( 255 * i / ( mnDstColors - 1 ) );
+ mpAcc->SetPaletteColor( i, BitmapColor( (sal_uInt8)nCount, (sal_uInt8)nCount, (sal_uInt8)nCount ) );
}
}
}
@@ -160,7 +160,7 @@ BOOL RASReader::ReadRAS( SvStream & rRAS, Graphic & rGraphic )
{
if ( mnColorMapType != RAS_COLOR_NO_MAP ) // when graphic has more then 256 colors and a color map we skip
{ // the colormap
- ULONG nCurPos = mpRAS->Tell();
+ sal_uLong nCurPos = mpRAS->Tell();
mpRAS->Seek( nCurPos + mnColorMapSize );
}
}
@@ -180,27 +180,27 @@ BOOL RASReader::ReadRAS( SvStream & rRAS, Graphic & rGraphic )
//----------------------------------------------------------------------------
-BOOL RASReader::ImplReadHeader()
+sal_Bool RASReader::ImplReadHeader()
{
*mpRAS >> mnWidth >> mnHeight >> mnDepth >> mnImageDatSize >>
mnType >> mnColorMapType >> mnColorMapSize;
if ( mnWidth == 0 || mnHeight == 0 )
- mbStatus = FALSE;
+ mbStatus = sal_False;
switch ( mnDepth )
{
case 24 :
case 8 :
case 1 :
- mnDstBitsPerPix = (USHORT)mnDepth;
+ mnDstBitsPerPix = (sal_uInt16)mnDepth;
break;
case 32 :
mnDstBitsPerPix = 24;
break;
default :
- mbStatus = FALSE;
+ mbStatus = sal_False;
}
switch ( mnType )
@@ -212,18 +212,18 @@ BOOL RASReader::ImplReadHeader()
break;
default:
- mbStatus = FALSE;
+ mbStatus = sal_False;
}
return mbStatus;
}
//----------------------------------------------------------------------------
-BOOL RASReader::ImplReadBody()
+sal_Bool RASReader::ImplReadBody()
{
- ULONG x, y;
- BYTE nDat = 0;
- BYTE nRed, nGreen, nBlue;
+ sal_uLong x, y;
+ sal_uInt8 nDat = 0;
+ sal_uInt8 nRed, nGreen, nBlue;
switch ( mnDstBitsPerPix )
{
case 1 :
@@ -235,7 +235,7 @@ BOOL RASReader::ImplReadBody()
nDat = ImplGetByte();
mpAcc->SetPixel (
y, x,
- sal::static_int_cast< BYTE >(
+ sal::static_int_cast< sal_uInt8 >(
nDat >> ( ( x & 7 ) ^ 7 )) );
}
if (!( ( x - 1 ) & 0x8 ) ) ImplGetByte(); // WORD ALIGNMENT ???
@@ -307,7 +307,7 @@ BOOL RASReader::ImplReadBody()
break;
default:
- mbStatus = FALSE;
+ mbStatus = sal_False;
break;
}
return mbStatus;
@@ -315,9 +315,9 @@ BOOL RASReader::ImplReadBody()
//----------------------------------------------------------------------------
-BYTE RASReader::ImplGetByte()
+sal_uInt8 RASReader::ImplGetByte()
{
- BYTE nRetVal;
+ sal_uInt8 nRetVal;
if ( mnType != RAS_TYPE_BYTE_ENCODED )
{
*mpRAS >> nRetVal;
@@ -347,7 +347,7 @@ BYTE RASReader::ImplGetByte()
//================== GraphicImport - die exportierte Funktion ================
-extern "C" BOOL __LOADONCALLAPI GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem*, BOOL )
+extern "C" sal_Bool __LOADONCALLAPI GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem*, sal_Bool )
{
RASReader aRASReader;
diff --git a/filter/source/graphicfilter/itga/itga.cxx b/filter/source/graphicfilter/itga/itga.cxx
index 3f9cd0abfe30..20ad2950e2e9 100644
--- a/filter/source/graphicfilter/itga/itga.cxx
+++ b/filter/source/graphicfilter/itga/itga.cxx
@@ -36,53 +36,53 @@
struct TGAFileHeader
{
- BYTE nImageIDLength;
- BYTE nColorMapType;
- BYTE nImageType;
- UINT16 nColorMapFirstEntryIndex;
- UINT16 nColorMapLength;
- BYTE nColorMapEntrySize;
- UINT16 nColorMapXOrigin;
- UINT16 nColorMapYOrigin;
- UINT16 nImageWidth;
- UINT16 nImageHeight;
- BYTE nPixelDepth;
- BYTE nImageDescriptor;
+ sal_uInt8 nImageIDLength;
+ sal_uInt8 nColorMapType;
+ sal_uInt8 nImageType;
+ sal_uInt16 nColorMapFirstEntryIndex;
+ sal_uInt16 nColorMapLength;
+ sal_uInt8 nColorMapEntrySize;
+ sal_uInt16 nColorMapXOrigin;
+ sal_uInt16 nColorMapYOrigin;
+ sal_uInt16 nImageWidth;
+ sal_uInt16 nImageHeight;
+ sal_uInt8 nPixelDepth;
+ sal_uInt8 nImageDescriptor;
};
#define SizeOfTGAFileFooter 26
struct TGAFileFooter
{
- UINT32 nExtensionFileOffset;
- UINT32 nDeveloperDirectoryOffset;
- UINT32 nSignature[4];
- BYTE nPadByte;
- BYTE nStringTerminator;
+ sal_uInt32 nExtensionFileOffset;
+ sal_uInt32 nDeveloperDirectoryOffset;
+ sal_uInt32 nSignature[4];
+ sal_uInt8 nPadByte;
+ sal_uInt8 nStringTerminator;
};
#define SizeOfTGAExtension 495
struct TGAExtension
{
- UINT16 nExtensionSize;
+ sal_uInt16 nExtensionSize;
char sAuthorName[41];
char sAuthorComment[324];
char sDateTimeStamp[12];
char sJobNameID[41];
- UINT16 nJobTime[3];
+ sal_uInt16 nJobTime[3];
char sSoftwareID[41];
- UINT16 nSoftwareVersionNumber;
- BYTE nSoftwareVersionLetter;
- UINT32 nKeyColor;
- UINT16 nPixelAspectRatioNumerator;
- UINT16 nPixelAspectRatioDeNumerator;
- UINT16 nGammaValueNumerator;
- UINT16 nGammaValueDeNumerator;
- UINT32 nColorCorrectionOffset;
- UINT32 nPostageStampOffset;
- UINT32 nScanLineOffset;
- BYTE nAttributesType;
+ sal_uInt16 nSoftwareVersionNumber;
+ sal_uInt8 nSoftwareVersionLetter;
+ sal_uInt32 nKeyColor;
+ sal_uInt16 nPixelAspectRatioNumerator;
+ sal_uInt16 nPixelAspectRatioDeNumerator;
+ sal_uInt16 nGammaValueNumerator;
+ sal_uInt16 nGammaValueDeNumerator;
+ sal_uInt32 nColorCorrectionOffset;
+ sal_uInt32 nPostageStampOffset;
+ sal_uInt32 nScanLineOffset;
+ sal_uInt8 nAttributesType;
};
class TGAReader {
@@ -95,23 +95,23 @@ private:
TGAFileHeader* mpFileHeader;
TGAFileFooter* mpFileFooter;
TGAExtension* mpExtension;
- UINT32* mpColorMap;
+ sal_uInt32* mpColorMap;
- BOOL mbStatus;
+ sal_Bool mbStatus;
- ULONG mnTGAVersion; // Enhanced TGA is defined as Version 2.0
- UINT16 mnDestBitDepth;
- BOOL mbIndexing; // TRUE if source contains indexing color values
- BOOL mbEncoding; // TRUE if source is compressed
+ sal_uLong mnTGAVersion; // Enhanced TGA is defined as Version 2.0
+ sal_uInt16 mnDestBitDepth;
+ sal_Bool mbIndexing; // sal_True if source contains indexing color values
+ sal_Bool mbEncoding; // sal_True if source is compressed
- BOOL ImplReadHeader();
- BOOL ImplReadPalette();
- BOOL ImplReadBody();
+ sal_Bool ImplReadHeader();
+ sal_Bool ImplReadPalette();
+ sal_Bool ImplReadBody();
public:
TGAReader();
~TGAReader();
- BOOL ReadTGA( SvStream & rTGA, Graphic & rGraphic );
+ sal_Bool ReadTGA( SvStream & rTGA, Graphic & rGraphic );
};
//=================== Methoden von TGAReader ==============================
@@ -122,10 +122,10 @@ TGAReader::TGAReader() :
mpFileFooter ( NULL ),
mpExtension ( NULL ),
mpColorMap ( NULL ),
- mbStatus ( TRUE ),
+ mbStatus ( sal_True ),
mnTGAVersion ( 1 ),
- mbIndexing ( FALSE ),
- mbEncoding ( FALSE )
+ mbIndexing ( sal_False ),
+ mbEncoding ( sal_False )
{
}
@@ -139,10 +139,10 @@ TGAReader::~TGAReader()
// -------------------------------------------------------------------------------------------
-BOOL TGAReader::ReadTGA( SvStream & rTGA, Graphic & rGraphic )
+sal_Bool TGAReader::ReadTGA( SvStream & rTGA, Graphic & rGraphic )
{
if ( rTGA.GetError() )
- return FALSE;
+ return sal_False;
mpTGA = &rTGA;
mpTGA->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
@@ -166,7 +166,7 @@ BOOL TGAReader::ReadTGA( SvStream & rTGA, Graphic & rGraphic )
mbStatus = ImplReadBody();
}
else
- mbStatus = FALSE;
+ mbStatus = sal_False;
if ( mpAcc )
aBitmap.ReleaseAccess ( mpAcc), mpAcc = NULL;
@@ -180,11 +180,11 @@ BOOL TGAReader::ReadTGA( SvStream & rTGA, Graphic & rGraphic )
// -------------------------------------------------------------------------------------------
-BOOL TGAReader::ImplReadHeader()
+sal_Bool TGAReader::ImplReadHeader()
{
mpFileHeader = new TGAFileHeader;
if ( mpFileHeader == NULL )
- return FALSE;
+ return sal_False;
*mpTGA >> mpFileHeader->nImageIDLength >> mpFileHeader->nColorMapType >> mpFileHeader->nImageType >>
mpFileHeader->nColorMapFirstEntryIndex >> mpFileHeader->nColorMapLength >> mpFileHeader->nColorMapEntrySize >>
@@ -192,24 +192,24 @@ BOOL TGAReader::ImplReadHeader()
mpFileHeader->nImageHeight >> mpFileHeader->nPixelDepth >> mpFileHeader->nImageDescriptor;
if ( mpFileHeader->nColorMapType > 1 )
- return FALSE;
+ return sal_False;
if ( mpFileHeader->nColorMapType == 1 )
- mbIndexing = TRUE;
+ mbIndexing = sal_True;
// first we want to get the version
mpFileFooter = new TGAFileFooter; // read the TGA-File-Footer to determine whether
if ( mpFileFooter ) // we got an old TGA format or the new one
{
- ULONG nCurStreamPos = mpTGA->Tell();
+ sal_uLong nCurStreamPos = mpTGA->Tell();
mpTGA->Seek( STREAM_SEEK_TO_END );
- ULONG nTemp = mpTGA->Tell();
+ sal_uLong nTemp = mpTGA->Tell();
mpTGA->Seek( nTemp - SizeOfTGAFileFooter );
*mpTGA >> mpFileFooter->nExtensionFileOffset >> mpFileFooter->nDeveloperDirectoryOffset >>
mpFileFooter->nSignature[0] >> mpFileFooter->nSignature[1] >> mpFileFooter->nSignature[2] >>
mpFileFooter->nSignature[3] >> mpFileFooter->nPadByte >> mpFileFooter->nStringTerminator;
- // check for TRUE, VISI, ON-X, FILE in the signatures
+ // check for sal_True, VISI, ON-X, FILE in the signatures
if ( mpFileFooter->nSignature[ 0 ] == (('T'<<24)|('R'<<16)|('U'<<8)|'E') &&
mpFileFooter->nSignature[ 1 ] == (('V'<<24)|('I'<<16)|('S'<<8)|'I') &&
mpFileFooter->nSignature[ 2 ] == (('O'<<24)|('N'<<16)|('-'<<8)|'X') &&
@@ -249,10 +249,10 @@ BOOL TGAReader::ImplReadHeader()
mnDestBitDepth = mpFileHeader->nPixelDepth;
if ( mnDestBitDepth == 8 ) // this is a patch for grayscale pictures not including a palette
- mbIndexing = TRUE;
+ mbIndexing = sal_True;
if ( mnDestBitDepth > 32 ) // maybe the pixeldepth is invalid
- return FALSE;
+ return sal_False;
else if ( mnDestBitDepth > 8 )
mnDestBitDepth = 24;
else if ( mnDestBitDepth > 4 )
@@ -261,14 +261,14 @@ BOOL TGAReader::ImplReadHeader()
mnDestBitDepth = 4;
if ( !mbIndexing && ( mnDestBitDepth < 15 ) )
- return FALSE;
+ return sal_False;
switch ( mpFileHeader->nImageType )
{
case 9 : // encoding for colortype 9, 10, 11
case 10 :
case 11 :
- mbEncoding = TRUE;
+ mbEncoding = sal_True;
break;
};
@@ -280,11 +280,11 @@ BOOL TGAReader::ImplReadHeader()
// -------------------------------------------------------------------------------------------
-BOOL TGAReader::ImplReadBody()
+sal_Bool TGAReader::ImplReadBody()
{
- USHORT nXCount, nYCount, nRGB16;
- BYTE nRed, nGreen, nBlue, nRunCount, nDummy, nDepth;
+ sal_uInt16 nXCount, nYCount, nRGB16;
+ sal_uInt8 nRed, nGreen, nBlue, nRunCount, nDummy, nDepth;
// this four variables match the image direction
long nY, nYAdd, nX, nXAdd, nXStart;
@@ -323,11 +323,11 @@ BOOL TGAReader::ImplReadBody()
{
*mpTGA >> nRGB16;
if ( nRGB16 >= mpFileHeader->nColorMapLength )
- return FALSE;
- nRed = (BYTE)( mpColorMap[ nRGB16 ] >> 16 );
- nGreen = (BYTE)( mpColorMap[ nRGB16 ] >> 8 );
- nBlue = (BYTE)( mpColorMap[ nRGB16 ] );
- for ( USHORT i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
+ return sal_False;
+ nRed = (sal_uInt8)( mpColorMap[ nRGB16 ] >> 16 );
+ nGreen = (sal_uInt8)( mpColorMap[ nRGB16 ] >> 8 );
+ nBlue = (sal_uInt8)( mpColorMap[ nRGB16 ] );
+ for ( sal_uInt16 i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
{
mpAcc->SetPixel( nY, nX, BitmapColor( nRed, nGreen, nBlue ) );
nX += nXAdd;
@@ -346,14 +346,14 @@ BOOL TGAReader::ImplReadBody()
}
else // a raw packet
{
- for ( USHORT i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
+ for ( sal_uInt16 i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
{
*mpTGA >> nRGB16;
if ( nRGB16 >= mpFileHeader->nColorMapLength )
- return FALSE;
- nRed = (BYTE)( mpColorMap[ nRGB16 ] >> 16 );
- nGreen = (BYTE)( mpColorMap[ nRGB16 ] >> 8 );
- nBlue = (BYTE)( mpColorMap[ nRGB16 ] );
+ return sal_False;
+ nRed = (sal_uInt8)( mpColorMap[ nRGB16 ] >> 16 );
+ nGreen = (sal_uInt8)( mpColorMap[ nRGB16 ] >> 8 );
+ nBlue = (sal_uInt8)( mpColorMap[ nRGB16 ] );
mpAcc->SetPixel( nY, nX, BitmapColor( nRed, nGreen, nBlue ) );
nX += nXAdd;
nXCount++;
@@ -381,10 +381,10 @@ BOOL TGAReader::ImplReadBody()
{
*mpTGA >> nDummy;
if ( nDummy >= mpFileHeader->nColorMapLength )
- return FALSE;
- for ( USHORT i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
+ return sal_False;
+ for ( sal_uInt16 i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
{
- mpAcc->SetPixel( nY, nX, (BYTE)nDummy );
+ mpAcc->SetPixel( nY, nX, (sal_uInt8)nDummy );
nX += nXAdd;
nXCount++;
if ( nXCount == mpFileHeader->nImageWidth )
@@ -401,13 +401,13 @@ BOOL TGAReader::ImplReadBody()
}
else // a raw packet
{
- for ( USHORT i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
+ for ( sal_uInt16 i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
{
*mpTGA >> nDummy;
if ( nDummy >= mpFileHeader->nColorMapLength )
- return FALSE;
- mpAcc->SetPixel( nY, nX, (BYTE)nDummy );
+ return sal_False;
+ mpAcc->SetPixel( nY, nX, (sal_uInt8)nDummy );
nX += nXAdd;
nXCount++;
if ( nXCount == mpFileHeader->nImageWidth )
@@ -425,7 +425,7 @@ BOOL TGAReader::ImplReadBody()
}
break;
default:
- return FALSE;
+ return sal_False;
}
}
else
@@ -441,7 +441,7 @@ BOOL TGAReader::ImplReadBody()
if ( nRunCount & 0x80 ) // a run length packet
{
*mpTGA >> nBlue >> nGreen >> nRed >> nDummy;
- for ( USHORT i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
+ for ( sal_uInt16 i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
{
mpAcc->SetPixel( nY, nX, BitmapColor( nRed, nGreen, nBlue ) );
nX += nXAdd;
@@ -460,7 +460,7 @@ BOOL TGAReader::ImplReadBody()
}
else // a raw packet
{
- for ( USHORT i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
+ for ( sal_uInt16 i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
{
*mpTGA >> nBlue >> nGreen >> nRed >> nDummy;
mpAcc->SetPixel( nY, nX, BitmapColor( nRed, nGreen, nBlue ) );
@@ -490,7 +490,7 @@ BOOL TGAReader::ImplReadBody()
if ( nRunCount & 0x80 ) // a run length packet
{
*mpTGA >> nBlue >> nGreen >> nRed;
- for ( USHORT i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
+ for ( sal_uInt16 i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
{
mpAcc->SetPixel( nY, nX, BitmapColor( nRed, nGreen, nBlue ) );
nX += nXAdd;
@@ -509,7 +509,7 @@ BOOL TGAReader::ImplReadBody()
}
else // a raw packet
{
- for ( USHORT i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
+ for ( sal_uInt16 i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
{
*mpTGA >> nBlue >> nGreen >> nRed;
mpAcc->SetPixel( nY, nX, BitmapColor( nRed, nGreen, nBlue ) );
@@ -538,10 +538,10 @@ BOOL TGAReader::ImplReadBody()
if ( nRunCount & 0x80 ) // a run length packet
{
*mpTGA >> nRGB16;
- nRed = (BYTE)( nRGB16 >> 7 ) & 0xf8;
- nGreen = (BYTE)( nRGB16 >> 2 ) & 0xf8;
- nBlue = (BYTE)( nRGB16 << 3 ) & 0xf8;
- for ( USHORT i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
+ nRed = (sal_uInt8)( nRGB16 >> 7 ) & 0xf8;
+ nGreen = (sal_uInt8)( nRGB16 >> 2 ) & 0xf8;
+ nBlue = (sal_uInt8)( nRGB16 << 3 ) & 0xf8;
+ for ( sal_uInt16 i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
{
mpAcc->SetPixel( nY, nX, BitmapColor( nRed, nGreen, nBlue ) );
nX += nXAdd;
@@ -560,12 +560,12 @@ BOOL TGAReader::ImplReadBody()
}
else // a raw packet
{
- for ( USHORT i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
+ for ( sal_uInt16 i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
{
*mpTGA >> nRGB16;
- nRed = (BYTE)( nRGB16 >> 7 ) & 0xf8;
- nGreen = (BYTE)( nRGB16 >> 2 ) & 0xf8;
- nBlue = (BYTE)( nRGB16 << 3 ) & 0xf8;
+ nRed = (sal_uInt8)( nRGB16 >> 7 ) & 0xf8;
+ nGreen = (sal_uInt8)( nRGB16 >> 2 ) & 0xf8;
+ nBlue = (sal_uInt8)( nRGB16 << 3 ) & 0xf8;
mpAcc->SetPixel( nY, nX, BitmapColor( nRed, nGreen, nBlue ) );
nX += nXAdd;
nXCount++;
@@ -585,7 +585,7 @@ BOOL TGAReader::ImplReadBody()
break;
default:
- return FALSE;
+ return sal_False;
}
}
}
@@ -606,10 +606,10 @@ BOOL TGAReader::ImplReadBody()
{
*mpTGA >> nRGB16;
if ( nRGB16 >= mpFileHeader->nColorMapLength )
- return FALSE;
- nRed = (BYTE)( mpColorMap[ nRGB16 ] >> 16 );
- nGreen = (BYTE)( mpColorMap[ nRGB16 ] >> 8 );
- nBlue = (BYTE)( mpColorMap[ nRGB16 ] );
+ return sal_False;
+ nRed = (sal_uInt8)( mpColorMap[ nRGB16 ] >> 16 );
+ nGreen = (sal_uInt8)( mpColorMap[ nRGB16 ] >> 8 );
+ nBlue = (sal_uInt8)( mpColorMap[ nRGB16 ] );
mpAcc->SetPixel( nY, nX, BitmapColor( nRed, nGreen, nBlue ) );
}
break;
@@ -620,12 +620,12 @@ BOOL TGAReader::ImplReadBody()
{
*mpTGA >> nDummy;
if ( nDummy >= mpFileHeader->nColorMapLength )
- return FALSE;
- mpAcc->SetPixel( nY, nX, (BYTE)nDummy );
+ return sal_False;
+ mpAcc->SetPixel( nY, nX, (sal_uInt8)nDummy );
}
break;
default:
- return FALSE;
+ return sal_False;
}
}
else
@@ -657,14 +657,14 @@ BOOL TGAReader::ImplReadBody()
for (;nXCount < mpFileHeader->nImageWidth; nXCount++, nX += nXAdd )
{
*mpTGA >> nRGB16;
- nRed = (BYTE)( nRGB16 >> 7 ) & 0xf8;
- nGreen = (BYTE)( nRGB16 >> 2 ) & 0xf8;
- nBlue = (BYTE)( nRGB16 << 3 ) & 0xf8;
+ nRed = (sal_uInt8)( nRGB16 >> 7 ) & 0xf8;
+ nGreen = (sal_uInt8)( nRGB16 >> 2 ) & 0xf8;
+ nBlue = (sal_uInt8)( nRGB16 << 3 ) & 0xf8;
mpAcc->SetPixel( nY, nX, BitmapColor( nRed, nGreen, nBlue ) );
}
break;
default:
- return FALSE;
+ return sal_False;
}
}
}
@@ -674,29 +674,29 @@ BOOL TGAReader::ImplReadBody()
// -------------------------------------------------------------------------------------------
-BOOL TGAReader::ImplReadPalette()
+sal_Bool TGAReader::ImplReadPalette()
{
if ( mbIndexing ) // read the colormap
{
- USHORT nColors = mpFileHeader->nColorMapLength;
+ sal_uInt16 nColors = mpFileHeader->nColorMapLength;
if ( !nColors ) // colors == 0 ? -> we will build a grayscale palette
{
if ( mpFileHeader->nPixelDepth != 8 )
- return FALSE;
+ return sal_False;
nColors = 256;
mpFileHeader->nColorMapLength = 256;
mpFileHeader->nColorMapEntrySize = 0x3f; // patch for the following switch routine
}
- mpColorMap = new UINT32[ nColors ]; // we will always index dwords
- if ( mpColorMap == FALSE )
- return FALSE; // out of memory %&!$&/!"�$
+ mpColorMap = new sal_uInt32[ nColors ]; // we will always index dwords
+ if ( mpColorMap == sal_False )
+ return sal_False; // out of memory %&!$&/!"�$
switch( mpFileHeader->nColorMapEntrySize )
{
case 0x3f :
{
- for ( ULONG i = 0; i < nColors; i++ )
+ for ( sal_uLong i = 0; i < nColors; i++ )
{
mpColorMap[ i ] = ( i << 16 ) + ( i << 8 ) + i;
}
@@ -709,7 +709,7 @@ BOOL TGAReader::ImplReadPalette()
case 24 :
{
- for ( ULONG i = 0; i < nColors; i++ )
+ for ( sal_uLong i = 0; i < nColors; i++ )
{
mpTGA->Read( &mpColorMap[ i ], 3 );
}
@@ -719,9 +719,9 @@ BOOL TGAReader::ImplReadPalette()
case 15 :
case 16 :
{
- for ( ULONG i = 0; i < nColors; i++ )
+ for ( sal_uLong i = 0; i < nColors; i++ )
{
- UINT16 nTemp;
+ sal_uInt16 nTemp;
*mpTGA >> nTemp;
mpColorMap[ i ] = ( ( nTemp & 0x7c00 ) << 9 ) + ( ( nTemp & 0x01e0 ) << 6 ) +
( ( nTemp & 0x1f ) << 3 );
@@ -730,19 +730,19 @@ BOOL TGAReader::ImplReadPalette()
break;
default :
- return FALSE;
+ return sal_False;
}
if ( mnDestBitDepth <= 8 )
{
- USHORT nDestColors = ( 1 << mnDestBitDepth );
+ sal_uInt16 nDestColors = ( 1 << mnDestBitDepth );
if ( nColors > nDestColors )
- return FALSE;
+ return sal_False;
mpAcc->SetPaletteEntryCount( nColors );
- for ( USHORT i = 0; i < nColors; i++ )
+ for ( sal_uInt16 i = 0; i < nColors; i++ )
{
- mpAcc->SetPaletteColor( i, Color( (BYTE)( mpColorMap[ i ] >> 16 ),
- (BYTE)( mpColorMap[ i ] >> 8 ), (BYTE)(mpColorMap[ i ] ) ) );
+ mpAcc->SetPaletteColor( i, Color( (sal_uInt8)( mpColorMap[ i ] >> 16 ),
+ (sal_uInt8)( mpColorMap[ i ] >> 8 ), (sal_uInt8)(mpColorMap[ i ] ) ) );
}
}
}
@@ -752,7 +752,7 @@ BOOL TGAReader::ImplReadPalette()
//================== GraphicImport - die exportierte Funktion ================
-extern "C" BOOL __LOADONCALLAPI GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem*, BOOL )
+extern "C" sal_Bool __LOADONCALLAPI GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem*, sal_Bool )
{
TGAReader aTGAReader;
diff --git a/filter/source/graphicfilter/itiff/ccidecom.cxx b/filter/source/graphicfilter/itiff/ccidecom.cxx
index 5e9e75cbf815..b975608ad9c2 100644
--- a/filter/source/graphicfilter/itiff/ccidecom.cxx
+++ b/filter/source/graphicfilter/itiff/ccidecom.cxx
@@ -578,9 +578,9 @@ const CCIHuffmanTableEntry CCIUncompTableSave[CCIUncompTableSize]={
//=========================================================================
-CCIDecompressor::CCIDecompressor( ULONG nOpts, UINT32 nImageWidth ) :
- bTableBad ( FALSE ),
- bStatus ( FALSE ),
+CCIDecompressor::CCIDecompressor( sal_uLong nOpts, sal_uInt32 nImageWidth ) :
+ bTableBad ( sal_False ),
+ bStatus ( sal_False ),
pByteSwap ( NULL ),
nWidth ( nImageWidth ),
nOptions ( nOpts ),
@@ -588,10 +588,10 @@ CCIDecompressor::CCIDecompressor( ULONG nOpts, UINT32 nImageWidth ) :
{
if ( nOpts & CCI_OPTION_INVERSEBITORDER )
{
- pByteSwap = new BYTE[ 256 ];
+ pByteSwap = new sal_uInt8[ 256 ];
for ( int i = 0; i < 256; i++ )
{
- pByteSwap[ i ] = sal::static_int_cast< BYTE >(
+ pByteSwap[ i ] = sal::static_int_cast< sal_uInt8 >(
( i << 7 ) | ( ( i & 2 ) << 5 ) | ( ( i & 4 ) << 3 ) | ( ( i & 8 ) << 1 ) |
( ( i & 16 ) >> 1 ) | ( ( i & 32 ) >> 3 ) | ( ( i & 64 ) >> 5 ) | ( ( i & 128 ) >> 7 ));
}
@@ -624,26 +624,26 @@ void CCIDecompressor::StartDecompression( SvStream & rIStream )
{
pIStream = &rIStream;
nInputBitsBufSize = 0;
- bFirstEOL = TRUE;
- bStatus = TRUE;
+ bFirstEOL = sal_True;
+ bStatus = sal_True;
nEOLCount = 0;
- if ( bTableBad == TRUE )
+ if ( bTableBad == sal_True )
return;
}
-BOOL CCIDecompressor::DecompressScanline( BYTE * pTarget, ULONG nTargetBits )
+sal_Bool CCIDecompressor::DecompressScanline( sal_uInt8 * pTarget, sal_uLong nTargetBits )
{
- USHORT i;
- BYTE * pSrc,* pDst;
- BOOL b2D;
+ sal_uInt16 i;
+ sal_uInt8 * pSrc,* pDst;
+ sal_Bool b2D;
if ( nEOLCount >= 5 ) // RTC( Return To Controller )
- return TRUE;
+ return sal_True;
- if ( bStatus == FALSE )
- return FALSE;
+ if ( bStatus == sal_False )
+ return sal_False;
// Wenn EOL-Codes vorhanden sind, steht der EOL-Code auch vor der ersten Zeile.
// (und ich dachte EOL heisst 'End Of Line'...)
@@ -652,21 +652,21 @@ BOOL CCIDecompressor::DecompressScanline( BYTE * pTarget, ULONG nTargetBits )
{
if ( bFirstEOL )
{
- UINT32 nCurPos = pIStream->Tell();
- UINT16 nOldInputBitsBufSize = nInputBitsBufSize;
- UINT32 nOldInputBitsBuf = nInputBitsBuf;
- if ( ReadEOL( 32 ) == FALSE )
+ sal_uInt32 nCurPos = pIStream->Tell();
+ sal_uInt16 nOldInputBitsBufSize = nInputBitsBufSize;
+ sal_uInt32 nOldInputBitsBuf = nInputBitsBuf;
+ if ( ReadEOL( 32 ) == sal_False )
{
nInputBitsBufSize = nOldInputBitsBufSize;
nInputBitsBuf = nOldInputBitsBuf;
pIStream->Seek( nCurPos );
nOptions &=~ CCI_OPTION_EOL; // CCITT Group 3 - Compression Type 2
}
- bFirstEOL = FALSE;
+ bFirstEOL = sal_False;
}
else
{
- if ( ReadEOL( nTargetBits ) == FALSE )
+ if ( ReadEOL( nTargetBits ) == sal_False )
{
return bStatus;
}
@@ -674,7 +674,7 @@ BOOL CCIDecompressor::DecompressScanline( BYTE * pTarget, ULONG nTargetBits )
}
if ( nEOLCount >= 5 ) // RTC( Return To Controller )
- return TRUE;
+ return sal_True;
// ggf. eine weisse vorherige Zeile herstellen fuer 2D:
if ( nOptions & CCI_OPTION_2D )
@@ -684,7 +684,7 @@ BOOL CCIDecompressor::DecompressScanline( BYTE * pTarget, ULONG nTargetBits )
if ( pLastLine == NULL )
delete[] pLastLine;
nLastLineSize = ( nTargetBits + 7 ) >> 3;
- pLastLine = new BYTE[ nLastLineSize ];
+ pLastLine = new sal_uInt8[ nLastLineSize ];
pDst = pLastLine;
for ( i = 0; i < nLastLineSize; i++ ) *( pDst++ ) = 0x00;
}
@@ -699,19 +699,19 @@ BOOL CCIDecompressor::DecompressScanline( BYTE * pTarget, ULONG nTargetBits )
if ( nOptions & CCI_OPTION_EOL )
b2D = Read2DTag();
else
- b2D = TRUE;
+ b2D = sal_True;
}
else
- b2D = FALSE;
+ b2D = sal_False;
// Zeile einlesen:
if ( b2D )
- Read2DScanlineData( pTarget, (USHORT)nTargetBits );
+ Read2DScanlineData( pTarget, (sal_uInt16)nTargetBits );
else
- Read1DScanlineData( pTarget, (USHORT)nTargetBits );
+ Read1DScanlineData( pTarget, (sal_uInt16)nTargetBits );
// Wenn wir im 2D-Modus sind, muessen wir uns die Zeile merken:
- if ( nOptions & CCI_OPTION_2D && bStatus == TRUE )
+ if ( nOptions & CCI_OPTION_2D && bStatus == sal_True )
{
pSrc = pTarget;
pDst = pLastLine;
@@ -719,7 +719,7 @@ BOOL CCIDecompressor::DecompressScanline( BYTE * pTarget, ULONG nTargetBits )
}
if ( pIStream->GetError() )
- bStatus = FALSE;
+ bStatus = sal_False;
return bStatus;
}
@@ -728,12 +728,12 @@ BOOL CCIDecompressor::DecompressScanline( BYTE * pTarget, ULONG nTargetBits )
void CCIDecompressor::MakeLookUp(const CCIHuffmanTableEntry * pHufTab,
const CCIHuffmanTableEntry * pHufTabSave,
CCILookUpTableEntry * pLookUp,
- USHORT nHuffmanTableSize,
- USHORT nMaxCodeBits)
+ sal_uInt16 nHuffmanTableSize,
+ sal_uInt16 nMaxCodeBits)
{
- USHORT i,j,nMinCode,nMaxCode,nLookUpSize,nMask;
+ sal_uInt16 i,j,nMinCode,nMaxCode,nLookUpSize,nMask;
- if (bTableBad==TRUE) return;
+ if (bTableBad==sal_True) return;
nLookUpSize=1<<nMaxCodeBits;
@@ -747,14 +747,14 @@ void CCIDecompressor::MakeLookUp(const CCIHuffmanTableEntry * pHufTab,
pHufTab[i].nCodeBits==0 ||
pHufTab[i].nCodeBits>nMaxCodeBits )
{
- bTableBad=TRUE;
+ bTableBad=sal_True;
return;
}
nMinCode = nMask & (pHufTab[i].nCode << (nMaxCodeBits-pHufTab[i].nCodeBits));
nMaxCode = nMinCode | (nMask >> pHufTab[i].nCodeBits);
for (j=nMinCode; j<=nMaxCode; j++) {
if (pLookUp[j].nCodeBits!=0) {
- bTableBad=TRUE;
+ bTableBad=sal_True;
return;
}
pLookUp[j].nValue=pHufTab[i].nValue;
@@ -764,10 +764,10 @@ void CCIDecompressor::MakeLookUp(const CCIHuffmanTableEntry * pHufTab,
}
-BOOL CCIDecompressor::ReadEOL( UINT32 /*nMaxFillBits*/ )
+sal_Bool CCIDecompressor::ReadEOL( sal_uInt32 /*nMaxFillBits*/ )
{
- USHORT nCode;
- BYTE nByte;
+ sal_uInt16 nCode;
+ sal_uInt8 nByte;
// if (nOptions&CCI_OPTION_BYTEALIGNEOL) nMaxFillBits=7; else nMaxFillBits=0;
// Buuuh: Entweder wird die Option in itiff.cxx nicht richtig gesetzt (-> Fehler in Doku)
@@ -777,7 +777,7 @@ BOOL CCIDecompressor::ReadEOL( UINT32 /*nMaxFillBits*/ )
// bis zu 32-Bloedsinn-Bits vor dem EOL-Code:
// und ich habe eine Datei gefunden in der bis zu ??? Bloedsinn Bits stehen, zudem ist dort die Bit Reihenfolge verdreht (SJ);
- UINT32 nMaxPos = pIStream->Tell();
+ sal_uInt32 nMaxPos = pIStream->Tell();
nMaxPos += nWidth >> 3;
for ( ;; )
@@ -786,16 +786,16 @@ BOOL CCIDecompressor::ReadEOL( UINT32 /*nMaxFillBits*/ )
{
*pIStream >> nByte;
if ( pIStream->IsEof() )
- return FALSE;
+ return sal_False;
if ( pIStream->Tell() > nMaxPos )
- return FALSE;
+ return sal_False;
if ( nOptions & CCI_OPTION_INVERSEBITORDER )
nByte = pByteSwap[ nByte ];
- nInputBitsBuf=(nInputBitsBuf<<8) | (ULONG)nByte;
+ nInputBitsBuf=(nInputBitsBuf<<8) | (sal_uLong)nByte;
nInputBitsBufSize += 8;
}
- nCode = (USHORT)( ( nInputBitsBuf >> ( nInputBitsBufSize - 12 ) ) & 0x0fff );
+ nCode = (sal_uInt16)( ( nInputBitsBuf >> ( nInputBitsBufSize - 12 ) ) & 0x0fff );
if ( nCode == 0x0001 )
{
nEOLCount++;
@@ -805,38 +805,38 @@ BOOL CCIDecompressor::ReadEOL( UINT32 /*nMaxFillBits*/ )
else
nInputBitsBufSize--;
}
- return TRUE;
+ return sal_True;
}
-BOOL CCIDecompressor::Read2DTag()
+sal_Bool CCIDecompressor::Read2DTag()
{
- BYTE nByte;
+ sal_uInt8 nByte;
- // Ein Bit einlesen und TRUE liefern, wenn es 0 ist, sonst FALSE
+ // Ein Bit einlesen und sal_True liefern, wenn es 0 ist, sonst sal_False
if (nInputBitsBufSize==0) {
*pIStream >> nByte;
if ( nOptions & CCI_OPTION_INVERSEBITORDER )
nByte = pByteSwap[ nByte ];
- nInputBitsBuf=(ULONG)nByte;
+ nInputBitsBuf=(sal_uLong)nByte;
nInputBitsBufSize=8;
}
nInputBitsBufSize--;
- if ( ((nInputBitsBuf>>nInputBitsBufSize)&0x0001) ) return FALSE;
- else return TRUE;
+ if ( ((nInputBitsBuf>>nInputBitsBufSize)&0x0001) ) return sal_False;
+ else return sal_True;
}
-BYTE CCIDecompressor::ReadBlackOrWhite()
+sal_uInt8 CCIDecompressor::ReadBlackOrWhite()
{
- BYTE nByte;
+ sal_uInt8 nByte;
// Ein Bit einlesen und 0x00 liefern, wenn es 0 ist, sonst 0xff
if (nInputBitsBufSize==0) {
*pIStream >> nByte;
if ( nOptions & CCI_OPTION_INVERSEBITORDER )
nByte = pByteSwap[ nByte ];
- nInputBitsBuf=(ULONG)nByte;
+ nInputBitsBuf=(sal_uLong)nByte;
nInputBitsBufSize=8;
}
nInputBitsBufSize--;
@@ -845,32 +845,32 @@ BYTE CCIDecompressor::ReadBlackOrWhite()
}
-USHORT CCIDecompressor::ReadCodeAndDecode(const CCILookUpTableEntry * pLookUp,
- USHORT nMaxCodeBits)
+sal_uInt16 CCIDecompressor::ReadCodeAndDecode(const CCILookUpTableEntry * pLookUp,
+ sal_uInt16 nMaxCodeBits)
{
- USHORT nCode,nCodeBits;
- BYTE nByte;
+ sal_uInt16 nCode,nCodeBits;
+ sal_uInt8 nByte;
// Einen Huffman-Code einlesen und dekodieren:
while (nInputBitsBufSize<nMaxCodeBits) {
*pIStream >> nByte;
if ( nOptions & CCI_OPTION_INVERSEBITORDER )
nByte = pByteSwap[ nByte ];
- nInputBitsBuf=(nInputBitsBuf<<8) | (ULONG)nByte;
+ nInputBitsBuf=(nInputBitsBuf<<8) | (sal_uLong)nByte;
nInputBitsBufSize+=8;
}
- nCode=(USHORT)((nInputBitsBuf>>(nInputBitsBufSize-nMaxCodeBits))
+ nCode=(sal_uInt16)((nInputBitsBuf>>(nInputBitsBufSize-nMaxCodeBits))
&(0xffff>>(16-nMaxCodeBits)));
nCodeBits=pLookUp[nCode].nCodeBits;
- if (nCodeBits==0) bStatus=FALSE;
+ if (nCodeBits==0) bStatus=sal_False;
nInputBitsBufSize = nInputBitsBufSize - nCodeBits;
return pLookUp[nCode].nValue;
}
-void CCIDecompressor::FillBits(BYTE * pTarget, USHORT nTargetBits,
- USHORT nBitPos, USHORT nNumBits,
- BYTE nBlackOrWhite)
+void CCIDecompressor::FillBits(sal_uInt8 * pTarget, sal_uInt16 nTargetBits,
+ sal_uInt16 nBitPos, sal_uInt16 nNumBits,
+ sal_uInt8 nBlackOrWhite)
{
if ( nBitPos >= nTargetBits )
return;
@@ -893,11 +893,11 @@ void CCIDecompressor::FillBits(BYTE * pTarget, USHORT nTargetBits,
}
-USHORT CCIDecompressor::CountBits(const BYTE * pData, USHORT nDataSizeBits,
- USHORT nBitPos, BYTE nBlackOrWhite)
+sal_uInt16 CCIDecompressor::CountBits(const sal_uInt8 * pData, sal_uInt16 nDataSizeBits,
+ sal_uInt16 nBitPos, sal_uInt8 nBlackOrWhite)
{
- USHORT nPos,nLo;
- BYTE nData;
+ sal_uInt16 nPos,nLo;
+ sal_uInt8 nData;
// Hier wird die Anzahl der zusammenhaengenden Bits gezaehlt, die
// ab Position nBitPos in pTarget alle die Farbe nBlackOrWhite
@@ -922,12 +922,12 @@ USHORT CCIDecompressor::CountBits(const BYTE * pData, USHORT nDataSizeBits,
}
-void CCIDecompressor::Read1DScanlineData(BYTE * pTarget, USHORT nTargetBits)
+void CCIDecompressor::Read1DScanlineData(sal_uInt8 * pTarget, sal_uInt16 nTargetBits)
{
- USHORT nCode,nCodeBits,nDataBits,nTgtFreeByteBits;
- BYTE nByte;
- BYTE nBlackOrWhite; // ist 0xff fuer Black oder 0x00 fuer White
- BOOL bTerminatingCode;
+ sal_uInt16 nCode,nCodeBits,nDataBits,nTgtFreeByteBits;
+ sal_uInt8 nByte;
+ sal_uInt8 nBlackOrWhite; // ist 0xff fuer Black oder 0x00 fuer White
+ sal_Bool bTerminatingCode;
// Der erste Code ist immer eine "White-Code":
nBlackOrWhite=0x00;
@@ -944,10 +944,10 @@ void CCIDecompressor::Read1DScanlineData(BYTE * pTarget, USHORT nTargetBits)
*pIStream >> nByte;
if ( nOptions & CCI_OPTION_INVERSEBITORDER )
nByte = pByteSwap[ nByte ];
- nInputBitsBuf=(nInputBitsBuf<<8) | (ULONG)nByte;
+ nInputBitsBuf=(nInputBitsBuf<<8) | (sal_uLong)nByte;
nInputBitsBufSize+=8;
}
- nCode=(USHORT)((nInputBitsBuf>>(nInputBitsBufSize-13))&0x1fff);
+ nCode=(sal_uInt16)((nInputBitsBuf>>(nInputBitsBufSize-13))&0x1fff);
// Anzahl der DatenBits und Anzahl der CodeBits ermitteln:
if (nBlackOrWhite) {
@@ -976,7 +976,7 @@ void CCIDecompressor::Read1DScanlineData(BYTE * pTarget, USHORT nTargetBits)
}
// Ist es ein 'Terminating-Code' ?
- if (nDataBits<64) bTerminatingCode=TRUE; else bTerminatingCode=FALSE;
+ if (nDataBits<64) bTerminatingCode=sal_True; else bTerminatingCode=sal_False;
// Die gelesenen Bits aus dem Eingabe-Buffer entfernen:
nInputBitsBufSize = nInputBitsBufSize - nCodeBits;
@@ -1009,25 +1009,25 @@ void CCIDecompressor::Read1DScanlineData(BYTE * pTarget, USHORT nTargetBits)
}
// ggf. Umschaltung Black <-> White:
- if (bTerminatingCode==TRUE) nBlackOrWhite=~nBlackOrWhite;
+ if (bTerminatingCode==sal_True) nBlackOrWhite=~nBlackOrWhite;
- } while (nTargetBits>0 || bTerminatingCode==FALSE);
+ } while (nTargetBits>0 || bTerminatingCode==sal_False);
}
-void CCIDecompressor::Read2DScanlineData(BYTE * pTarget, USHORT nTargetBits)
+void CCIDecompressor::Read2DScanlineData(sal_uInt8 * pTarget, sal_uInt16 nTargetBits)
{
- USHORT n2DMode,nBitPos,nUncomp,nRun,nRun2,nt;
- BYTE nBlackOrWhite;
+ sal_uInt16 n2DMode,nBitPos,nUncomp,nRun,nRun2,nt;
+ sal_uInt8 nBlackOrWhite;
nBlackOrWhite=0x00;
nBitPos=0;
- while (nBitPos<nTargetBits && bStatus==TRUE) {
+ while (nBitPos<nTargetBits && bStatus==sal_True) {
n2DMode=ReadCodeAndDecode(p2DModeLookUp,10);
- if (bStatus==FALSE) return;
+ if (bStatus==sal_False) return;
if (n2DMode==CCI2DMODE_UNCOMP) {
for (;;) {
diff --git a/filter/source/graphicfilter/itiff/ccidecom.hxx b/filter/source/graphicfilter/itiff/ccidecom.hxx
index 2543be82d052..7b6ba5b43a4a 100644
--- a/filter/source/graphicfilter/itiff/ccidecom.hxx
+++ b/filter/source/graphicfilter/itiff/ccidecom.hxx
@@ -40,16 +40,16 @@
// Eintrag in eine Huffman-Tabelle:
struct CCIHuffmanTableEntry {
- USHORT nValue; // Der Daten-Wert.
- USHORT nCode; // Der Code durch den der Daten-Wert repraesentiert wird.
- USHORT nCodeBits; // Laenge des Codes in Bits.
+ sal_uInt16 nValue; // Der Daten-Wert.
+ sal_uInt16 nCode; // Der Code durch den der Daten-Wert repraesentiert wird.
+ sal_uInt16 nCodeBits; // Laenge des Codes in Bits.
};
// Eintrag in eine Hash-Tabelle zur schnellen Dekodierung
struct CCILookUpTableEntry {
- USHORT nValue;
- USHORT nCodeBits;
+ sal_uInt16 nValue;
+ sal_uInt16 nCodeBits;
};
@@ -57,67 +57,67 @@ class CCIDecompressor {
public:
- CCIDecompressor( ULONG nOptions, UINT32 nImageWidth );
+ CCIDecompressor( sal_uLong nOptions, sal_uInt32 nImageWidth );
~CCIDecompressor();
void StartDecompression( SvStream & rIStream );
- BOOL DecompressScanline(BYTE * pTarget, ULONG nTargetBits );
+ sal_Bool DecompressScanline(sal_uInt8 * pTarget, sal_uLong nTargetBits );
private:
void MakeLookUp(const CCIHuffmanTableEntry * pHufTab,
const CCIHuffmanTableEntry * pHufTabSave,
CCILookUpTableEntry * pLookUp,
- USHORT nHuffmanTableSize,
- USHORT nMaxCodeBits);
+ sal_uInt16 nHuffmanTableSize,
+ sal_uInt16 nMaxCodeBits);
- BOOL ReadEOL( UINT32 nMaxFillBits );
+ sal_Bool ReadEOL( sal_uInt32 nMaxFillBits );
- BOOL Read2DTag();
+ sal_Bool Read2DTag();
- BYTE ReadBlackOrWhite();
+ sal_uInt8 ReadBlackOrWhite();
- USHORT ReadCodeAndDecode(const CCILookUpTableEntry * pLookUp,
- USHORT nMaxCodeBits);
+ sal_uInt16 ReadCodeAndDecode(const CCILookUpTableEntry * pLookUp,
+ sal_uInt16 nMaxCodeBits);
- void FillBits(BYTE * pTarget, USHORT nTargetBits,
- USHORT nBitPos, USHORT nNumBits,
- BYTE nBlackOrWhite);
+ void FillBits(sal_uInt8 * pTarget, sal_uInt16 nTargetBits,
+ sal_uInt16 nBitPos, sal_uInt16 nNumBits,
+ sal_uInt8 nBlackOrWhite);
- USHORT CountBits(const BYTE * pData, USHORT nDataSizeBits,
- USHORT nBitPos, BYTE nBlackOrWhite);
+ sal_uInt16 CountBits(const sal_uInt8 * pData, sal_uInt16 nDataSizeBits,
+ sal_uInt16 nBitPos, sal_uInt8 nBlackOrWhite);
- void Read1DScanlineData(BYTE * pTarget, USHORT nTargetBits);
+ void Read1DScanlineData(sal_uInt8 * pTarget, sal_uInt16 nTargetBits);
- void Read2DScanlineData(BYTE * pTarget, USHORT nTargetBits);
+ void Read2DScanlineData(sal_uInt8 * pTarget, sal_uInt16 nTargetBits);
- BOOL bTableBad;
+ sal_Bool bTableBad;
- BOOL bStatus;
+ sal_Bool bStatus;
- BYTE* pByteSwap;
+ sal_uInt8* pByteSwap;
SvStream * pIStream;
- UINT32 nEOLCount;
+ sal_uInt32 nEOLCount;
- UINT32 nWidth;
+ sal_uInt32 nWidth;
- ULONG nOptions;
+ sal_uLong nOptions;
- BOOL bFirstEOL;
+ sal_Bool bFirstEOL;
CCILookUpTableEntry * pWhiteLookUp;
CCILookUpTableEntry * pBlackLookUp;
CCILookUpTableEntry * p2DModeLookUp;
CCILookUpTableEntry * pUncompLookUp;
- ULONG nInputBitsBuf;
- USHORT nInputBitsBufSize;
+ sal_uLong nInputBitsBuf;
+ sal_uInt16 nInputBitsBufSize;
- BYTE * pLastLine;
- ULONG nLastLineSize;
+ sal_uInt8 * pLastLine;
+ sal_uLong nLastLineSize;
};
diff --git a/filter/source/graphicfilter/itiff/itiff.cxx b/filter/source/graphicfilter/itiff/itiff.cxx
index 6f356b042d28..63575c3d6d3c 100644
--- a/filter/source/graphicfilter/itiff/itiff.cxx
+++ b/filter/source/graphicfilter/itiff/itiff.cxx
@@ -56,79 +56,79 @@ class TIFFReader
private:
- BOOL bStatus; // Ob bisher kein Fehler auftrat
+ sal_Bool bStatus; // Ob bisher kein Fehler auftrat
Animation aAnimation;
- ULONG nLastPercent;
+ sal_uLong nLastPercent;
SvStream* pTIFF; // Die einzulesende TIFF-Datei
Bitmap aBitmap;
BitmapWriteAccess* pAcc;
- USHORT nDstBitsPerPixel;
+ sal_uInt16 nDstBitsPerPixel;
- ULONG nOrigPos; // Anfaengliche Position in pTIFF
- UINT16 nOrigNumberFormat; // Anfaengliches Nummern-Format von pTIFF
+ sal_uLong nOrigPos; // Anfaengliche Position in pTIFF
+ sal_uInt16 nOrigNumberFormat; // Anfaengliches Nummern-Format von pTIFF
- UINT16 nDataType;
+ sal_uInt16 nDataType;
// Daten, die aus dem TIFF-Tags entnommen werden:
- BOOL bByteSwap; // TRUE wenn bits 0..7 -> 7..0 invertiert werden sollen ( FILLORDER = 2 );
- BYTE nByte1; // 'I', wenn Format LittleEndian
-
- ULONG nNewSubFile; //
- ULONG nSubFile; //
- ULONG nImageWidth; // Bildbreite in Pixel
- ULONG nImageLength; // Bildhoehe in Pixel
- ULONG nBitsPerSample; // Bits pro Pixel pro Ebene
- ULONG nCompression; // Art der Kompriemierung
- ULONG nPhotometricInterpretation; //
- ULONG nThresholding; //
- ULONG nCellWidth; //
- ULONG nCellLength; //
- ULONG nFillOrder; //
- ULONG* pStripOffsets; // Feld von Offsets zu den Bitmap-Daten-"Strips"
- ULONG nNumStripOffsets; // Groesse obigen Feldes
- ULONG nOrientation; //
- ULONG nSamplesPerPixel; // Anzahl der Ebenen
- ULONG nRowsPerStrip; // Wenn nicht komprimiert: Zahl der Zeilen pro Strip
- ULONG* pStripByteCounts; // Wenn komprimiert (bestimmte Art): Groesse der Strips
- ULONG nNumStripByteCounts; // Anzahl der Eintraege in obiges Feld
- ULONG nMinSampleValue; //
- ULONG nMaxSampleValue; //
+ sal_Bool bByteSwap; // sal_True wenn bits 0..7 -> 7..0 invertiert werden sollen ( FILLORDER = 2 );
+ sal_uInt8 nByte1; // 'I', wenn Format LittleEndian
+
+ sal_uLong nNewSubFile; //
+ sal_uLong nSubFile; //
+ sal_uLong nImageWidth; // Bildbreite in Pixel
+ sal_uLong nImageLength; // Bildhoehe in Pixel
+ sal_uLong nBitsPerSample; // Bits pro Pixel pro Ebene
+ sal_uLong nCompression; // Art der Kompriemierung
+ sal_uLong nPhotometricInterpretation; //
+ sal_uLong nThresholding; //
+ sal_uLong nCellWidth; //
+ sal_uLong nCellLength; //
+ sal_uLong nFillOrder; //
+ sal_uLong* pStripOffsets; // Feld von Offsets zu den Bitmap-Daten-"Strips"
+ sal_uLong nNumStripOffsets; // Groesse obigen Feldes
+ sal_uLong nOrientation; //
+ sal_uLong nSamplesPerPixel; // Anzahl der Ebenen
+ sal_uLong nRowsPerStrip; // Wenn nicht komprimiert: Zahl der Zeilen pro Strip
+ sal_uLong* pStripByteCounts; // Wenn komprimiert (bestimmte Art): Groesse der Strips
+ sal_uLong nNumStripByteCounts; // Anzahl der Eintraege in obiges Feld
+ sal_uLong nMinSampleValue; //
+ sal_uLong nMaxSampleValue; //
double fXResolution; // X-Aufloesung oder 0.0
double fYResolution; // Y-Aufloesung oder 0.0
- ULONG nPlanarConfiguration; //
- ULONG nGroup3Options; //
- ULONG nGroup4Options; //
- ULONG nResolutionUnit; // Einheit von fX/YResolution: 1=unbekannt, 2(default)=Zoll, 3=cm
- ULONG nPredictor; //
- ULONG* pColorMap; // Farb-Palette
- ULONG nNumColors; // Anzahl Farben in der Farbpalette
+ sal_uLong nPlanarConfiguration; //
+ sal_uLong nGroup3Options; //
+ sal_uLong nGroup4Options; //
+ sal_uLong nResolutionUnit; // Einheit von fX/YResolution: 1=unbekannt, 2(default)=Zoll, 3=cm
+ sal_uLong nPredictor; //
+ sal_uLong* pColorMap; // Farb-Palette
+ sal_uLong nNumColors; // Anzahl Farben in der Farbpalette
- ULONG nPlanes; // Anzahl der Ebenen in der Tiff-Datei
- ULONG nStripsPerPlane; // Anzahl der Strips pro Ebene
- ULONG nBytesPerRow; // Bytes pro Zeile pro Ebene in der Tiff-Datei ( unkomprimiert )
- BYTE* pMap[ 4 ]; // Temporaere Scanline
+ sal_uLong nPlanes; // Anzahl der Ebenen in der Tiff-Datei
+ sal_uLong nStripsPerPlane; // Anzahl der Strips pro Ebene
+ sal_uLong nBytesPerRow; // Bytes pro Zeile pro Ebene in der Tiff-Datei ( unkomprimiert )
+ sal_uInt8* pMap[ 4 ]; // Temporaere Scanline
- void MayCallback( ULONG nPercent );
+ void MayCallback( sal_uLong nPercent );
- ULONG DataTypeSize();
- ULONG ReadIntData();
+ sal_uLong DataTypeSize();
+ sal_uLong ReadIntData();
double ReadDoubleData();
void ReadHeader();
- void ReadTagData( USHORT nTagType, sal_uInt32 nDataLen );
+ void ReadTagData( sal_uInt16 nTagType, sal_uInt32 nDataLen );
- BOOL ReadMap( ULONG nMinPercent, ULONG nMaxPercent );
+ sal_Bool ReadMap( sal_uLong nMinPercent, sal_uLong nMaxPercent );
// Liesst/dekomprimert die Bitmap-Daten, und fuellt pMap
- ULONG GetBits( const BYTE * pSrc, ULONG nBitsPos, ULONG nBitsCount );
+ sal_uLong GetBits( const sal_uInt8 * pSrc, sal_uLong nBitsPos, sal_uLong nBitsCount );
// Holt nBitsCount Bits aus pSrc[..] an der Bit-Position nBitsPos
void MakePalCol( void );
// Erzeugt die Bitmap aus der temporaeren Bitmap pMap
// und loescht dabei pMap teilweise
- BOOL ConvertScanline( ULONG nY );
+ sal_Bool ConvertScanline( sal_uLong nY );
// Konvertiert eine Scanline in das Windows-BMP-Format
public:
@@ -136,21 +136,21 @@ public:
TIFFReader() {}
~TIFFReader() {}
- BOOL ReadTIFF( SvStream & rTIFF, Graphic & rGraphic );
+ sal_Bool ReadTIFF( SvStream & rTIFF, Graphic & rGraphic );
};
//=================== Methoden von TIFFReader ==============================
-void TIFFReader::MayCallback( ULONG /*nPercent*/ )
+void TIFFReader::MayCallback( sal_uLong /*nPercent*/ )
{
/*
if ( nPercent >= nLastPercent + 3 )
{
nLastPercent=nPercent;
- if ( pCallback != NULL && nPercent <= 100 && bStatus == TRUE )
+ if ( pCallback != NULL && nPercent <= 100 && bStatus == sal_True )
{
- if (((*pCallback)(pCallerData,(USHORT)nPercent)) == TRUE )
- bStatus = FALSE;
+ if (((*pCallback)(pCallerData,(sal_uInt16)nPercent)) == sal_True )
+ bStatus = sal_False;
}
}
*/
@@ -158,9 +158,9 @@ void TIFFReader::MayCallback( ULONG /*nPercent*/ )
// ---------------------------------------------------------------------------------
-ULONG TIFFReader::DataTypeSize()
+sal_uLong TIFFReader::DataTypeSize()
{
- ULONG nSize;
+ sal_uLong nSize;
switch ( nDataType )
{
case 1 : // BYTE
@@ -192,15 +192,15 @@ ULONG TIFFReader::DataTypeSize()
// ---------------------------------------------------------------------------------
-ULONG TIFFReader::ReadIntData()
+sal_uLong TIFFReader::ReadIntData()
{
double nDOUBLE;
float nFLOAT;
- UINT32 nUINT32a, nUINT32b;
- INT32 nINT32;
- UINT16 nUINT16;
- INT16 nINT16;
- BYTE nBYTE;
+ sal_uInt32 nUINT32a, nUINT32b;
+ sal_Int32 nINT32;
+ sal_uInt16 nUINT16;
+ sal_Int16 nINT16;
+ sal_uInt8 nBYTE;
char nCHAR;
switch( nDataType )
@@ -210,11 +210,11 @@ ULONG TIFFReader::ReadIntData()
case 2 :
case 7 :
*pTIFF >> nBYTE;
- nUINT32a = (ULONG)nBYTE;
+ nUINT32a = (sal_uLong)nBYTE;
break;
case 3 :
*pTIFF >> nUINT16;
- nUINT32a = (ULONG)nUINT16;
+ nUINT32a = (sal_uLong)nUINT16;
break;
case 9 :
case 4 :
@@ -227,11 +227,11 @@ ULONG TIFFReader::ReadIntData()
break;
case 6 :
*pTIFF >> nCHAR;
- nUINT32a = (INT32)nCHAR;
+ nUINT32a = (sal_Int32)nCHAR;
break;
case 8 :
*pTIFF >> nINT16;
- nUINT32a = (INT32)nINT16;
+ nUINT32a = (sal_Int32)nINT16;
break;
case 10 :
*pTIFF >> nUINT32a >> nINT32;
@@ -240,11 +240,11 @@ ULONG TIFFReader::ReadIntData()
break;
case 11 :
*pTIFF >> nFLOAT;
- nUINT32a = (INT32)nFLOAT;
+ nUINT32a = (sal_Int32)nFLOAT;
break;
case 12 :
*pTIFF >> nDOUBLE;
- nUINT32a = (INT32)nDOUBLE;
+ nUINT32a = (sal_Int32)nDOUBLE;
break;
default:
*pTIFF >> nUINT32a;
@@ -275,9 +275,9 @@ double TIFFReader::ReadDoubleData()
// ---------------------------------------------------------------------------------
-void TIFFReader::ReadTagData( USHORT nTagType, sal_uInt32 nDataLen)
+void TIFFReader::ReadTagData( sal_uInt16 nTagType, sal_uInt32 nDataLen)
{
- if ( bStatus == FALSE )
+ if ( bStatus == sal_False )
return;
switch ( nTagType )
@@ -336,7 +336,7 @@ void TIFFReader::ReadTagData( USHORT nTagType, sal_uInt32 nDataLen)
break;
case 0x0111: { // Strip Offset(s)
- ULONG nOldNumSO, i, * pOldSO;
+ sal_uLong nOldNumSO, i, * pOldSO;
pOldSO = pStripOffsets;
if ( pOldSO == NULL )
nNumStripOffsets = 0;
@@ -347,7 +347,7 @@ void TIFFReader::ReadTagData( USHORT nTagType, sal_uInt32 nDataLen)
nNumStripOffsets = nDataLen;
try
{
- pStripOffsets = new ULONG[ nNumStripOffsets ];
+ pStripOffsets = new sal_uLong[ nNumStripOffsets ];
}
catch (std::bad_alloc)
{
@@ -382,7 +382,7 @@ void TIFFReader::ReadTagData( USHORT nTagType, sal_uInt32 nDataLen)
break;
case 0x0117: { // Strip Byte Counts
- ULONG nOldNumSBC, i, * pOldSBC;
+ sal_uLong nOldNumSBC, i, * pOldSBC;
pOldSBC = pStripByteCounts;
if ( pOldSBC == NULL )
nNumStripByteCounts = 0; // Sicherheitshalber
@@ -393,7 +393,7 @@ void TIFFReader::ReadTagData( USHORT nTagType, sal_uInt32 nDataLen)
nNumStripByteCounts = nDataLen;
try
{
- pStripByteCounts = new ULONG[ nNumStripByteCounts ];
+ pStripByteCounts = new sal_uLong[ nNumStripByteCounts ];
}
catch (std::bad_alloc)
{
@@ -455,48 +455,48 @@ void TIFFReader::ReadTagData( USHORT nTagType, sal_uInt32 nDataLen)
break;
case 0x0140: { // Color Map
- USHORT nVal;
- ULONG i;
+ sal_uInt16 nVal;
+ sal_uLong i;
nNumColors= ( 1 << nBitsPerSample );
if ( nDataType == 3 && nNumColors <= 256)
{
- pColorMap = new ULONG[ 256 ];
+ pColorMap = new sal_uLong[ 256 ];
for ( i = 0; i < nNumColors; i++ )
pColorMap[ i ] = 0;
for ( i = 0; i < nNumColors; i++ )
{
*pTIFF >> nVal;
- pColorMap[ i ] |= ( ( (ULONG)nVal ) << 8 ) & 0x00ff0000;
+ pColorMap[ i ] |= ( ( (sal_uLong)nVal ) << 8 ) & 0x00ff0000;
}
for ( i = 0; i < nNumColors; i++ )
{
*pTIFF >> nVal;
- pColorMap[ i ] |= ( (ULONG)nVal ) & 0x0000ff00;
+ pColorMap[ i ] |= ( (sal_uLong)nVal ) & 0x0000ff00;
}
for ( i = 0; i < nNumColors; i++ )
{
*pTIFF >> nVal;
- pColorMap[ i ] |= ( ( (ULONG)nVal ) >> 8 ) & 0x000000ff;
+ pColorMap[ i ] |= ( ( (sal_uLong)nVal ) >> 8 ) & 0x000000ff;
}
}
else
- bStatus = FALSE;
+ bStatus = sal_False;
OOODEBUG("ColorMap (Anzahl Farben:)", nNumColors);
break;
}
}
if ( pTIFF->GetError() )
- bStatus = FALSE;
+ bStatus = sal_False;
}
// ---------------------------------------------------------------------------------
-BOOL TIFFReader::ReadMap( ULONG nMinPercent, ULONG nMaxPercent )
+sal_Bool TIFFReader::ReadMap( sal_uLong nMinPercent, sal_uLong nMaxPercent )
{
if ( nCompression == 1 || nCompression == 32771 )
{
- ULONG ny, np, nStrip, nStripBytesPerRow;
+ sal_uLong ny, np, nStrip, nStripBytesPerRow;
if ( nCompression == 1 )
nStripBytesPerRow = nBytesPerRow;
@@ -508,20 +508,20 @@ BOOL TIFFReader::ReadMap( ULONG nMinPercent, ULONG nMaxPercent )
{
nStrip = ny / nRowsPerStrip + np * nStripsPerPlane;
if ( nStrip >= nNumStripOffsets )
- return FALSE;
+ return sal_False;
pTIFF->Seek( pStripOffsets[ nStrip ] + ( ny % nRowsPerStrip ) * nStripBytesPerRow );
pTIFF->Read( pMap[ np ], nBytesPerRow );
if ( pTIFF->GetError() )
- return FALSE;
+ return sal_False;
MayCallback( nMinPercent + ( nMaxPercent - nMinPercent ) * ( np * nImageLength + ny) / ( nImageLength * nPlanes ) );
}
if ( !ConvertScanline( ny ) )
- return FALSE;
+ return sal_False;
}
}
else if ( nCompression == 2 || nCompression == 3 || nCompression == 4 )
{
- ULONG ny, np, nStrip, nOptions;
+ sal_uLong ny, np, nStrip, nOptions;
if ( nCompression == 2 )
{
nOptions = CCI_OPTION_BYTEALIGNROW;
@@ -534,22 +534,22 @@ BOOL TIFFReader::ReadMap( ULONG nMinPercent, ULONG nMaxPercent )
if ( nGroup3Options & 0x00000004 )
nOptions |= CCI_OPTION_BYTEALIGNEOL;
if ( nGroup3Options & 0xfffffffa )
- return FALSE;
+ return sal_False;
}
else
{ // nCompression==4
nOptions = CCI_OPTION_2D;
if ( nGroup4Options & 0xffffffff )
- return FALSE;
+ return sal_False;
}
if ( nFillOrder == 2 )
{
nOptions |= CCI_OPTION_INVERSEBITORDER;
- bByteSwap = FALSE;
+ bByteSwap = sal_False;
}
nStrip = 0;
if ( nStrip >= nNumStripOffsets )
- return FALSE;
+ return sal_False;
pTIFF->Seek(pStripOffsets[nStrip]);
CCIDecompressor aCCIDecom( nOptions, nImageWidth );
@@ -564,27 +564,27 @@ BOOL TIFFReader::ReadMap( ULONG nMinPercent, ULONG nMaxPercent )
{
nStrip=ny/nRowsPerStrip+np*nStripsPerPlane;
if ( nStrip >= nNumStripOffsets )
- return FALSE;
+ return sal_False;
pTIFF->Seek( pStripOffsets[ nStrip ] );
aCCIDecom.StartDecompression( *pTIFF );
}
- if ( aCCIDecom.DecompressScanline( pMap[ np ], nImageWidth * nBitsPerSample * nSamplesPerPixel / nPlanes ) == FALSE )
- return FALSE;
+ if ( aCCIDecom.DecompressScanline( pMap[ np ], nImageWidth * nBitsPerSample * nSamplesPerPixel / nPlanes ) == sal_False )
+ return sal_False;
if ( pTIFF->GetError() )
- return FALSE;
+ return sal_False;
MayCallback(nMinPercent+(nMaxPercent-nMinPercent)*(np*nImageLength+ny)/(nImageLength*nPlanes));
}
if ( !ConvertScanline( ny ) )
- return FALSE;
+ return sal_False;
}
}
else if ( nCompression == 5 )
{
LZWDecompressor aLZWDecom;
- ULONG ny, np, nStrip;
+ sal_uLong ny, np, nStrip;
nStrip=0;
if ( nStrip >= nNumStripOffsets )
- return FALSE;
+ return sal_False;
pTIFF->Seek(pStripOffsets[nStrip]);
aLZWDecom.StartDecompression(*pTIFF);
for ( ny = 0; ny < nImageLength; ny++ )
@@ -595,25 +595,25 @@ BOOL TIFFReader::ReadMap( ULONG nMinPercent, ULONG nMaxPercent )
{
nStrip = ny / nRowsPerStrip + np * nStripsPerPlane;
if ( nStrip >= nNumStripOffsets )
- return FALSE;
+ return sal_False;
pTIFF->Seek(pStripOffsets[nStrip]);
aLZWDecom.StartDecompression(*pTIFF);
}
if ( ( aLZWDecom.Decompress( pMap[ np ], nBytesPerRow ) != nBytesPerRow ) || pTIFF->GetError() )
- return FALSE;
+ return sal_False;
MayCallback(nMinPercent+(nMaxPercent-nMinPercent)*(np*nImageLength+ny)/(nImageLength*nPlanes));
}
if ( !ConvertScanline( ny ) )
- return FALSE;
+ return sal_False;
}
}
else if ( nCompression == 32773 )
{
- ULONG nStrip,nRecCount,nRowBytesLeft,ny,np,i;
- BYTE * pdst, nRecHeader, nRecData;
+ sal_uLong nStrip,nRecCount,nRowBytesLeft,ny,np,i;
+ sal_uInt8 * pdst, nRecHeader, nRecData;
nStrip = 0;
if ( nStrip >= nNumStripOffsets )
- return FALSE;
+ return sal_False;
pTIFF->Seek(pStripOffsets[nStrip]);
for ( ny = 0; ny < nImageLength; ny++ )
{
@@ -623,7 +623,7 @@ BOOL TIFFReader::ReadMap( ULONG nMinPercent, ULONG nMaxPercent )
{
nStrip=ny/nRowsPerStrip+np*nStripsPerPlane;
if ( nStrip >= nNumStripOffsets )
- return FALSE;
+ return sal_False;
pTIFF->Seek(pStripOffsets[nStrip]);
}
nRowBytesLeft = nBytesPerRow;
@@ -633,21 +633,21 @@ BOOL TIFFReader::ReadMap( ULONG nMinPercent, ULONG nMaxPercent )
*pTIFF >> nRecHeader;
if ((nRecHeader&0x80)==0)
{
- nRecCount=0x00000001+((ULONG)nRecHeader);
+ nRecCount=0x00000001+((sal_uLong)nRecHeader);
if ( nRecCount > nRowBytesLeft )
- return FALSE;
+ return sal_False;
pTIFF->Read(pdst,nRecCount);
pdst+=nRecCount;
nRowBytesLeft-=nRecCount;
}
else if ( nRecHeader != 0x80 )
{
- nRecCount = 0x000000101 - ( (ULONG)nRecHeader );
+ nRecCount = 0x000000101 - ( (sal_uLong)nRecHeader );
if ( nRecCount > nRowBytesLeft )
{
nRecCount = nRowBytesLeft;
-// bStatus = FALSE;
+// bStatus = sal_False;
// return;
}
@@ -658,27 +658,27 @@ BOOL TIFFReader::ReadMap( ULONG nMinPercent, ULONG nMaxPercent )
}
} while ( nRowBytesLeft != 0 );
if ( pTIFF->GetError() )
- return FALSE;
+ return sal_False;
MayCallback(nMinPercent+(nMaxPercent-nMinPercent)*(np*nImageLength+ny)/(nImageLength*nPlanes));
}
if ( !ConvertScanline( ny ) )
- return FALSE;
+ return sal_False;
}
}
else
- return FALSE;
- return TRUE;
+ return sal_False;
+ return sal_True;
}
-ULONG TIFFReader::GetBits( const BYTE * pSrc, ULONG nBitsPos, ULONG nBitsCount )
+sal_uLong TIFFReader::GetBits( const sal_uInt8 * pSrc, sal_uLong nBitsPos, sal_uLong nBitsCount )
{
- ULONG nRes;
+ sal_uLong nRes;
if ( bByteSwap )
{
pSrc += ( nBitsPos >> 3 );
nBitsPos &= 7;
- BYTE nDat = *pSrc;
- nRes = (ULONG)( BYTESWAP( nDat ) & ( 0xff >> nBitsPos ) );
+ sal_uInt8 nDat = *pSrc;
+ nRes = (sal_uLong)( BYTESWAP( nDat ) & ( 0xff >> nBitsPos ) );
if ( nBitsCount <= 8 - nBitsPos )
{
@@ -691,13 +691,13 @@ ULONG TIFFReader::GetBits( const BYTE * pSrc, ULONG nBitsPos, ULONG nBitsCount )
while ( nBitsCount >= 8 )
{
nDat = *(pSrc++);
- nRes = ( nRes << 8 ) | ((ULONG)BYTESWAP( nDat ) );
+ nRes = ( nRes << 8 ) | ((sal_uLong)BYTESWAP( nDat ) );
nBitsCount -= 8;
}
if ( nBitsCount > 0 )
{
nDat = *pSrc;
- nRes = ( nRes << nBitsCount ) | (((ULONG)BYTESWAP(nDat))>>(8-nBitsCount));
+ nRes = ( nRes << nBitsCount ) | (((sal_uLong)BYTESWAP(nDat))>>(8-nBitsCount));
}
}
}
@@ -705,7 +705,7 @@ ULONG TIFFReader::GetBits( const BYTE * pSrc, ULONG nBitsPos, ULONG nBitsCount )
{
pSrc += ( nBitsPos >> 3 );
nBitsPos &= 7;
- nRes = (ULONG)((*pSrc)&(0xff>>nBitsPos));
+ nRes = (sal_uLong)((*pSrc)&(0xff>>nBitsPos));
if ( nBitsCount <= 8 - nBitsPos )
{
nRes >>= ( 8 - nBitsPos - nBitsCount );
@@ -716,11 +716,11 @@ ULONG TIFFReader::GetBits( const BYTE * pSrc, ULONG nBitsPos, ULONG nBitsCount )
nBitsCount -= 8 - nBitsPos;
while ( nBitsCount >= 8 )
{
- nRes = ( nRes << 8 ) | ((ULONG)*(pSrc++));
+ nRes = ( nRes << 8 ) | ((sal_uLong)*(pSrc++));
nBitsCount -= 8;
}
if ( nBitsCount > 0 )
- nRes = ( nRes << nBitsCount ) | (((ULONG)*pSrc)>>(8-nBitsCount));
+ nRes = ( nRes << nBitsCount ) | (((sal_uLong)*pSrc)>>(8-nBitsCount));
}
}
return nRes;
@@ -728,24 +728,24 @@ ULONG TIFFReader::GetBits( const BYTE * pSrc, ULONG nBitsPos, ULONG nBitsCount )
// ---------------------------------------------------------------------------------
-BOOL TIFFReader::ConvertScanline( ULONG nY )
+sal_Bool TIFFReader::ConvertScanline( sal_uLong nY )
{
- UINT32 nRed, nGreen, nBlue, ns, nx, nVal, nByteCount;
- BYTE nByteVal;
+ sal_uInt32 nRed, nGreen, nBlue, ns, nx, nVal, nByteCount;
+ sal_uInt8 nByteVal;
if ( nDstBitsPerPixel == 24 )
{
if ( nBitsPerSample == 8 && nSamplesPerPixel >= 3 &&
nPlanes == 1 && nPhotometricInterpretation == 2 )
{
- BYTE* pt = pMap[ 0 ];
+ sal_uInt8* pt = pMap[ 0 ];
// sind die Werte als Differenz abgelegt?
if ( 2 == nPredictor )
{
- BYTE nLRed = 0;
- BYTE nLGreen = 0;
- BYTE nLBlue = 0;
+ sal_uInt8 nLRed = 0;
+ sal_uInt8 nLGreen = 0;
+ sal_uInt8 nLBlue = 0;
for ( nx = 0; nx < nImageWidth; nx++, pt += nSamplesPerPixel )
{
nLRed = nLRed + pt[ 0 ];
@@ -766,7 +766,7 @@ BOOL TIFFReader::ConvertScanline( ULONG nY )
{
if ( nMaxSampleValue > nMinSampleValue )
{
- ULONG nMinMax = nMinSampleValue * 255 / ( nMaxSampleValue - nMinSampleValue );
+ sal_uLong nMinMax = nMinSampleValue * 255 / ( nMaxSampleValue - nMinSampleValue );
for ( nx = 0; nx < nImageWidth; nx++ )
{
if ( nPlanes < 3 )
@@ -781,7 +781,7 @@ BOOL TIFFReader::ConvertScanline( ULONG nY )
nGreen = GetBits( pMap[ 1 ], nx * nBitsPerSample, nBitsPerSample );
nBlue = GetBits( pMap[ 2 ], nx * nBitsPerSample, nBitsPerSample );
}
- pAcc->SetPixel( nY, nx, Color( (BYTE)( nRed - nMinMax ), (BYTE)( nGreen - nMinMax ), (BYTE)(nBlue - nMinMax) ) );
+ pAcc->SetPixel( nY, nx, Color( (sal_uInt8)( nRed - nMinMax ), (sal_uInt8)( nGreen - nMinMax ), (sal_uInt8)(nBlue - nMinMax) ) );
}
}
}
@@ -789,7 +789,7 @@ BOOL TIFFReader::ConvertScanline( ULONG nY )
{
if ( nMaxSampleValue > nMinSampleValue )
{
- ULONG nMinMax = nMinSampleValue * 255 / ( nMaxSampleValue - nMinSampleValue );
+ sal_uLong nMinMax = nMinSampleValue * 255 / ( nMaxSampleValue - nMinSampleValue );
for ( nx = 0; nx < nImageWidth; nx++ )
{
if ( nPlanes < 3 )
@@ -804,10 +804,10 @@ BOOL TIFFReader::ConvertScanline( ULONG nY )
nGreen = GetBits( pMap[ 1 ], nx * nBitsPerSample, nBitsPerSample );
nBlue = GetBits( pMap[ 2 ], nx * nBitsPerSample, nBitsPerSample );
}
- nRed = 255 - (BYTE)( nRed - nMinMax );
- nGreen = 255 - (BYTE)( nGreen - nMinMax );
- nBlue = 255 - (BYTE)( nBlue - nMinMax );
- pAcc->SetPixel( nY, nx, Color( (BYTE) nRed, (BYTE) nGreen, (BYTE) nBlue ) );
+ nRed = 255 - (sal_uInt8)( nRed - nMinMax );
+ nGreen = 255 - (sal_uInt8)( nGreen - nMinMax );
+ nBlue = 255 - (sal_uInt8)( nBlue - nMinMax );
+ pAcc->SetPixel( nY, nx, Color( (sal_uInt8) nRed, (sal_uInt8) nGreen, (sal_uInt8) nBlue ) );
}
}
}
@@ -815,8 +815,8 @@ BOOL TIFFReader::ConvertScanline( ULONG nY )
{
if ( nMaxSampleValue > nMinSampleValue )
{
- BYTE nSamp[ 4 ];
- BYTE nSampLast[ 4 ] = { 0, 0, 0, 0 };
+ sal_uInt8 nSamp[ 4 ];
+ sal_uInt8 nSampLast[ 4 ] = { 0, 0, 0, 0 };
long nBlack;
for( nx = 0; nx < nImageWidth; nx++ )
@@ -827,9 +827,9 @@ BOOL TIFFReader::ConvertScanline( ULONG nY )
for( ns = 0; ns < 4; ns++ )
{
if( nPlanes < 3 )
- nSampLast[ ns ] = nSampLast[ ns ] + (BYTE) GetBits( pMap[ 0 ], ( nx * nSamplesPerPixel + ns ) * nBitsPerSample, nBitsPerSample );
+ nSampLast[ ns ] = nSampLast[ ns ] + (sal_uInt8) GetBits( pMap[ 0 ], ( nx * nSamplesPerPixel + ns ) * nBitsPerSample, nBitsPerSample );
else
- nSampLast[ ns ] = nSampLast[ ns ] + (BYTE) GetBits( pMap[ ns ], nx * nBitsPerSample, nBitsPerSample );
+ nSampLast[ ns ] = nSampLast[ ns ] + (sal_uInt8) GetBits( pMap[ ns ], nx * nBitsPerSample, nBitsPerSample );
nSamp[ ns ] = nSampLast[ ns ];
}
}
@@ -838,19 +838,19 @@ BOOL TIFFReader::ConvertScanline( ULONG nY )
for( ns = 0; ns < 4; ns++ )
{
if( nPlanes < 3 )
- nSamp[ ns ] = (BYTE) GetBits( pMap[ 0 ], ( nx * nSamplesPerPixel + ns ) * nBitsPerSample, nBitsPerSample );
+ nSamp[ ns ] = (sal_uInt8) GetBits( pMap[ 0 ], ( nx * nSamplesPerPixel + ns ) * nBitsPerSample, nBitsPerSample );
else
- nSamp[ ns ]= (BYTE) GetBits( pMap[ ns ], nx * nBitsPerSample, nBitsPerSample );
+ nSamp[ ns ]= (sal_uInt8) GetBits( pMap[ ns ], nx * nBitsPerSample, nBitsPerSample );
}
}
nBlack = nSamp[ 3 ];
- nRed = (BYTE) Max( 0L, 255L - ( ( (long) nSamp[ 0 ] + nBlack - ( ( (long) nMinSampleValue ) << 1 ) ) *
+ nRed = (sal_uInt8) Max( 0L, 255L - ( ( (long) nSamp[ 0 ] + nBlack - ( ( (long) nMinSampleValue ) << 1 ) ) *
255L/(long)(nMaxSampleValue-nMinSampleValue) ) );
- nGreen = (BYTE) Max( 0L, 255L - ( ( (long) nSamp[ 1 ] + nBlack - ( ( (long) nMinSampleValue ) << 1 ) ) *
+ nGreen = (sal_uInt8) Max( 0L, 255L - ( ( (long) nSamp[ 1 ] + nBlack - ( ( (long) nMinSampleValue ) << 1 ) ) *
255L/(long)(nMaxSampleValue-nMinSampleValue) ) );
- nBlue = (BYTE) Max( 0L, 255L - ( ( (long) nSamp[ 2 ] + nBlack - ( ( (long) nMinSampleValue ) << 1 ) ) *
+ nBlue = (sal_uInt8) Max( 0L, 255L - ( ( (long) nSamp[ 2 ] + nBlack - ( ( (long) nMinSampleValue ) << 1 ) ) *
255L/(long)(nMaxSampleValue-nMinSampleValue) ) );
- pAcc->SetPixel( nY, nx, Color ( (BYTE)nRed, (BYTE)nGreen, (BYTE)nBlue ) );
+ pAcc->SetPixel( nY, nx, Color ( (sal_uInt8)nRed, (sal_uInt8)nGreen, (sal_uInt8)nBlue ) );
}
}
}
@@ -859,20 +859,20 @@ BOOL TIFFReader::ConvertScanline( ULONG nY )
{
if ( nMaxSampleValue > nMinSampleValue )
{
- ULONG nMinMax = ( ( 1 << nDstBitsPerPixel ) - 1 ) / ( nMaxSampleValue - nMinSampleValue );
- BYTE* pt = pMap[ 0 ];
- BYTE nShift;
+ sal_uLong nMinMax = ( ( 1 << nDstBitsPerPixel ) - 1 ) / ( nMaxSampleValue - nMinSampleValue );
+ sal_uInt8* pt = pMap[ 0 ];
+ sal_uInt8 nShift;
switch ( nDstBitsPerPixel )
{
case 8 :
{
- BYTE nLast;
+ sal_uInt8 nLast;
if ( bByteSwap )
{
if ( nPredictor == 2 )
{
- nLast = BYTESWAP( (BYTE)*pt++ );
+ nLast = BYTESWAP( (sal_uInt8)*pt++ );
for ( nx = 0; nx < nImageWidth; nx++ )
{
pAcc->SetPixel( nY, nx, nLast );
@@ -884,7 +884,7 @@ BOOL TIFFReader::ConvertScanline( ULONG nY )
for ( nx = 0; nx < nImageWidth; nx++ )
{
nLast = *pt++;
- pAcc->SetPixel( nY, nx, (BYTE)( ( (BYTESWAP((ULONG)nLast ) - nMinSampleValue ) * nMinMax ) ) );
+ pAcc->SetPixel( nY, nx, (sal_uInt8)( ( (BYTESWAP((sal_uLong)nLast ) - nMinSampleValue ) * nMinMax ) ) );
}
}
}
@@ -903,7 +903,7 @@ BOOL TIFFReader::ConvertScanline( ULONG nY )
{
for ( nx = 0; nx < nImageWidth; nx++ )
{
- pAcc->SetPixel( nY, nx, (BYTE)( ( (ULONG)*pt++ - nMinSampleValue ) * nMinMax ) );
+ pAcc->SetPixel( nY, nx, (sal_uInt8)( ( (sal_uLong)*pt++ - nMinSampleValue ) * nMinMax ) );
}
}
@@ -921,7 +921,7 @@ BOOL TIFFReader::ConvertScanline( ULONG nY )
for ( nx = 0; nx < nImageWidth; nx++ )
{
nVal = ( GetBits( pt, nx * nBitsPerSample, nBitsPerSample ) - nMinSampleValue ) * nMinMax;
- pAcc->SetPixel( nY, nx, (BYTE)nVal );
+ pAcc->SetPixel( nY, nx, (sal_uInt8)nVal );
}
}
break;
@@ -1000,7 +1000,7 @@ BOOL TIFFReader::ConvertScanline( ULONG nY )
break;
default :
- return FALSE;
+ return sal_False;
}
}
}
@@ -1009,19 +1009,19 @@ BOOL TIFFReader::ConvertScanline( ULONG nY )
{
if ( nMaxSampleValue > nMinSampleValue )
{
- ULONG nMinMax = ( ( 1 << 8 /*nDstBitsPerPixel*/ ) - 1 ) / ( nMaxSampleValue - nMinSampleValue );
- BYTE* pt = pMap[ 0 ];
+ sal_uLong nMinMax = ( ( 1 << 8 /*nDstBitsPerPixel*/ ) - 1 ) / ( nMaxSampleValue - nMinSampleValue );
+ sal_uInt8* pt = pMap[ 0 ];
if ( nByte1 == 'I' )
pt++;
for ( nx = 0; nx < nImageWidth; nx++, pt += 2 )
{
- pAcc->SetPixel( nY, nx, (BYTE)( ( (ULONG)*pt - nMinSampleValue ) * nMinMax ) );
+ pAcc->SetPixel( nY, nx, (sal_uInt8)( ( (sal_uLong)*pt - nMinSampleValue ) * nMinMax ) );
}
}
}
else
- return FALSE;
- return TRUE;
+ return sal_False;
+ return sal_True;
}
// ---------------------------------------------------------------------------------
@@ -1030,15 +1030,15 @@ void TIFFReader::MakePalCol( void )
{
if ( nDstBitsPerPixel <= 8 )
{
- ULONG i, nVal, n0RGB;
+ sal_uLong i, nVal, n0RGB;
if ( pColorMap == NULL )
- pColorMap = new ULONG[ 256 ];
+ pColorMap = new sal_uLong[ 256 ];
if ( nPhotometricInterpretation <= 1 )
{
nNumColors = 1 << nBitsPerSample;
if ( nNumColors > 256 )
nNumColors = 256;
- pAcc->SetPaletteEntryCount( (USHORT)nNumColors );
+ pAcc->SetPaletteEntryCount( (sal_uInt16)nNumColors );
for ( i = 0; i < nNumColors; i++ )
{
nVal = ( i * 255 / ( nNumColors - 1 ) ) & 0xff;
@@ -1051,23 +1051,23 @@ void TIFFReader::MakePalCol( void )
}
for ( i = 0; i < nNumColors; i++ )
{
- pAcc->SetPaletteColor( (USHORT)i, BitmapColor( (BYTE)( pColorMap[ i ] >> 16 ),
- (BYTE)( pColorMap[ i ] >> 8 ), (BYTE)pColorMap[ i ] ) );
+ pAcc->SetPaletteColor( (sal_uInt16)i, BitmapColor( (sal_uInt8)( pColorMap[ i ] >> 16 ),
+ (sal_uInt8)( pColorMap[ i ] >> 8 ), (sal_uInt8)pColorMap[ i ] ) );
}
}
if ( fXResolution > 1.0 && fYResolution > 1.0 && ( nResolutionUnit == 2 || nResolutionUnit == 3 ) )
{
- ULONG nRX,nRY;
+ sal_uLong nRX,nRY;
if (nResolutionUnit==2)
{
- nRX=(ULONG)(fXResolution+0.5);
- nRY=(ULONG)(fYResolution+0.5);
+ nRX=(sal_uLong)(fXResolution+0.5);
+ nRY=(sal_uLong)(fYResolution+0.5);
}
else
{
- nRX=(ULONG)(fXResolution*2.54+0.5);
- nRY=(ULONG)(fYResolution*2.54+0.5);
+ nRX=(sal_uLong)(fXResolution*2.54+0.5);
+ nRY=(sal_uLong)(fYResolution*2.54+0.5);
}
MapMode aMapMode(MAP_INCH,Point(0,0),Fraction(1,nRX),Fraction(1,nRY));
aBitmap.SetPrefMapMode(aMapMode);
@@ -1079,8 +1079,8 @@ void TIFFReader::MakePalCol( void )
void TIFFReader::ReadHeader()
{
- BYTE nbyte1, nbyte2;
- USHORT nushort;
+ sal_uInt8 nbyte1, nbyte2;
+ sal_uInt16 nushort;
*pTIFF >> nbyte1;
if ( nbyte1 == 'I' )
@@ -1090,19 +1090,19 @@ void TIFFReader::ReadHeader()
*pTIFF >> nbyte2 >> nushort;
if ( nbyte1 != nbyte2 || ( nbyte1 != 'I' && nbyte1 != 'M' ) || nushort != 0x002a )
- bStatus = FALSE;
+ bStatus = sal_False;
}
// ---------------------------------------------------------------------------------
-BOOL TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & rGraphic )
+sal_Bool TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & rGraphic )
{
- USHORT i, nNumTags, nTagType;
- ULONG nMaxPos;
- ULONG nPos;
+ sal_uInt16 i, nNumTags, nTagType;
+ sal_uLong nMaxPos;
+ sal_uLong nPos;
sal_uInt32 nFirstIfd, nDataLen;
- bStatus = TRUE;
+ bStatus = sal_True;
nLastPercent = 0;
pTIFF = &rTIFF;
@@ -1118,7 +1118,7 @@ BOOL TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & rGraphic )
*pTIFF >> nFirstIfd;
if( !nFirstIfd || pTIFF->GetError() )
- bStatus = FALSE;
+ bStatus = sal_False;
if ( bStatus )
{
@@ -1156,11 +1156,11 @@ BOOL TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & rGraphic )
}
while( nOffset );
- for ( UINT32 nNextIfd = nFirstIfd; nNextIfd && bStatus; )
+ for ( sal_uInt32 nNextIfd = nFirstIfd; nNextIfd && bStatus; )
{
pTIFF->Seek( nOrigPos + nNextIfd );
{
- bByteSwap = FALSE;
+ bByteSwap = sal_False;
nNewSubFile = 0;
nSubFile = 0;
@@ -1212,9 +1212,9 @@ BOOL TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & rGraphic )
nPos += 12; pTIFF->Seek( nPos );
if ( pTIFF->GetError() )
- bStatus = FALSE;
+ bStatus = sal_False;
- if ( bStatus == FALSE )
+ if ( bStatus == sal_False )
break;
}
*pTIFF >> nNextIfd;
@@ -1222,7 +1222,7 @@ BOOL TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & rGraphic )
nNextIfd = 0;
}
if ( !nBitsPerSample || ( nBitsPerSample > 32 ) )
- bStatus = FALSE;
+ bStatus = sal_False;
if ( bStatus )
{
if ( nMaxSampleValue == 0 )
@@ -1251,21 +1251,21 @@ BOOL TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & rGraphic )
nPlanes = nSamplesPerPixel;
if ( ( nFillOrder == 2 ) && ( nCompression != 5 ) ) // im LZW Mode werden die bits schon invertiert
- bByteSwap = TRUE;
+ bByteSwap = sal_True;
nStripsPerPlane = ( nImageLength - 1 ) / nRowsPerStrip + 1;
nBytesPerRow = ( nImageWidth * nSamplesPerPixel / nPlanes * nBitsPerSample + 7 ) >> 3;
- for ( ULONG j = 0; j < 4; j++ )
+ for ( sal_uLong j = 0; j < 4; j++ )
{
try
{
- pMap[ j ] = new BYTE[ nBytesPerRow ];
+ pMap[ j ] = new sal_uInt8[ nBytesPerRow ];
}
catch (std::bad_alloc)
{
pMap[ j ] = NULL;
- bStatus = FALSE;
+ bStatus = sal_False;
break;
}
}
@@ -1277,7 +1277,7 @@ BOOL TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & rGraphic )
nMaxPos = Max( pTIFF->Tell(), nMaxPos );
}
else
- bStatus = FALSE;
+ bStatus = sal_False;
if( pAcc )
{
@@ -1313,22 +1313,22 @@ BOOL TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & rGraphic )
else
rGraphic = aAnimation; //aBitmap;
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
//================== GraphicImport - die exportierte Funktion ================
-extern "C" BOOL __LOADONCALLAPI GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem*, BOOL )
+extern "C" sal_Bool __LOADONCALLAPI GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem*, sal_Bool )
{
TIFFReader aTIFFReader;
- if ( aTIFFReader.ReadTIFF( rStream, rGraphic ) == FALSE )
- return FALSE;
+ if ( aTIFFReader.ReadTIFF( rStream, rGraphic ) == sal_False )
+ return sal_False;
- return TRUE;
+ return sal_True;
}
diff --git a/filter/source/graphicfilter/itiff/lzwdecom.cxx b/filter/source/graphicfilter/itiff/lzwdecom.cxx
index 9460ed6ecf45..ffec575e18b0 100644
--- a/filter/source/graphicfilter/itiff/lzwdecom.cxx
+++ b/filter/source/graphicfilter/itiff/lzwdecom.cxx
@@ -32,18 +32,18 @@
LZWDecompressor::LZWDecompressor()
{
- USHORT i;
+ sal_uInt16 i;
pTable=new LZWTableEntry[4096];
- pOutBuf=new BYTE[4096];
+ pOutBuf=new sal_uInt8[4096];
for (i=0; i<4096; i++)
{
pTable[i].nPrevCode=0;
pTable[i].nDataCount=1;
- pTable[i].nData=(BYTE)i;
+ pTable[i].nData=(sal_uInt8)i;
}
pIStream=NULL;
- bFirst = TRUE;
+ bFirst = sal_True;
nOldCode = 0;
}
@@ -61,7 +61,7 @@ void LZWDecompressor::StartDecompression(SvStream & rIStream)
nTableSize=258;
- bEOIFound=FALSE;
+ bEOIFound=sal_False;
nOutBufDataLen=0;
@@ -72,7 +72,7 @@ void LZWDecompressor::StartDecompression(SvStream & rIStream)
if ( bFirst )
{
bInvert = nInputBitsBuf == 1;
- bFirst = FALSE;
+ bFirst = sal_False;
}
if ( bInvert )
@@ -80,9 +80,9 @@ void LZWDecompressor::StartDecompression(SvStream & rIStream)
}
-ULONG LZWDecompressor::Decompress(BYTE * pTarget, ULONG nMaxCount)
+sal_uLong LZWDecompressor::Decompress(sal_uInt8 * pTarget, sal_uLong nMaxCount)
{
- ULONG nCount;
+ sal_uLong nCount;
if (pIStream==NULL) return 0;
@@ -91,8 +91,8 @@ ULONG LZWDecompressor::Decompress(BYTE * pTarget, ULONG nMaxCount)
if (pIStream->GetError()) break;
- if (((ULONG)nOutBufDataLen)>=nMaxCount) {
- nOutBufDataLen = nOutBufDataLen - (USHORT)nMaxCount;
+ if (((sal_uLong)nOutBufDataLen)>=nMaxCount) {
+ nOutBufDataLen = nOutBufDataLen - (sal_uInt16)nMaxCount;
nCount+=nMaxCount;
while (nMaxCount>0) {
*(pTarget++)=*(pOutBufData++);
@@ -101,14 +101,14 @@ ULONG LZWDecompressor::Decompress(BYTE * pTarget, ULONG nMaxCount)
break;
}
- nMaxCount-=(ULONG)nOutBufDataLen;
+ nMaxCount-=(sal_uLong)nOutBufDataLen;
nCount+=nOutBufDataLen;
while (nOutBufDataLen>0) {
*(pTarget++)=*(pOutBufData++);
nOutBufDataLen--;
}
- if (bEOIFound==TRUE) break;
+ if (bEOIFound==sal_True) break;
DecompressSome();
@@ -118,9 +118,9 @@ ULONG LZWDecompressor::Decompress(BYTE * pTarget, ULONG nMaxCount)
}
-USHORT LZWDecompressor::GetNextCode()
+sal_uInt16 LZWDecompressor::GetNextCode()
{
- USHORT nBits,nCode;
+ sal_uInt16 nBits,nCode;
if (nTableSize<511) nBits=9;
else if (nTableSize<1023) nBits=10;
@@ -151,7 +151,7 @@ USHORT LZWDecompressor::GetNextCode()
}
-void LZWDecompressor::AddToTable(USHORT nPrevCode, USHORT nCodeFirstData)
+void LZWDecompressor::AddToTable(sal_uInt16 nPrevCode, sal_uInt16 nCodeFirstData)
{
while (pTable[nCodeFirstData].nDataCount>1)
nCodeFirstData=pTable[nCodeFirstData].nPrevCode;
@@ -166,17 +166,17 @@ void LZWDecompressor::AddToTable(USHORT nPrevCode, USHORT nCodeFirstData)
void LZWDecompressor::DecompressSome()
{
- USHORT i,nCode;
+ sal_uInt16 i,nCode;
nCode=GetNextCode();
if (nCode==256) {
nTableSize=258;
nCode=GetNextCode();
- if (nCode==257) { bEOIFound=TRUE; return; }
+ if (nCode==257) { bEOIFound=sal_True; return; }
}
else if (nCode<nTableSize) AddToTable(nOldCode,nCode);
else if (nCode==nTableSize) AddToTable(nOldCode,nOldCode);
- else { bEOIFound=TRUE; return; }
+ else { bEOIFound=sal_True; return; }
nOldCode=nCode;
diff --git a/filter/source/graphicfilter/itiff/lzwdecom.hxx b/filter/source/graphicfilter/itiff/lzwdecom.hxx
index 164812878865..fb822bab23e1 100644
--- a/filter/source/graphicfilter/itiff/lzwdecom.hxx
+++ b/filter/source/graphicfilter/itiff/lzwdecom.hxx
@@ -31,9 +31,9 @@
#include <tools/stream.hxx>
struct LZWTableEntry {
- USHORT nPrevCode;
- USHORT nDataCount;
- BYTE nData;
+ sal_uInt16 nPrevCode;
+ sal_uInt16 nDataCount;
+ sal_uInt8 nData;
};
class LZWDecompressor {
@@ -45,32 +45,32 @@ public:
void StartDecompression(SvStream & rIStream);
- ULONG Decompress(BYTE * pTarget, ULONG nMaxCount);
+ sal_uLong Decompress(sal_uInt8 * pTarget, sal_uLong nMaxCount);
// Liefert die Anzahl der geschriebenen Bytes, wenn < nMaxCount,
// sind keine weiteren Daten zu entpacken, oder es ist ein
// Fehler aufgetreten.
private:
- USHORT GetNextCode();
- void AddToTable(USHORT nPrevCode, USHORT nCodeFirstData);
+ sal_uInt16 GetNextCode();
+ void AddToTable(sal_uInt16 nPrevCode, sal_uInt16 nCodeFirstData);
void DecompressSome();
SvStream * pIStream;
LZWTableEntry * pTable;
- USHORT nTableSize;
+ sal_uInt16 nTableSize;
- BOOL bEOIFound, bInvert, bFirst;
+ sal_Bool bEOIFound, bInvert, bFirst;
- USHORT nOldCode;
+ sal_uInt16 nOldCode;
- BYTE * pOutBuf;
- BYTE * pOutBufData;
- USHORT nOutBufDataLen;
+ sal_uInt8 * pOutBuf;
+ sal_uInt8 * pOutBufData;
+ sal_uInt16 nOutBufDataLen;
- BYTE nInputBitsBuf;
- USHORT nInputBitsBufSize;
+ sal_uInt8 nInputBitsBuf;
+ sal_uInt16 nInputBitsBufSize;
};
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index 82b0480a3d0c..d8e3b3762f00 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -215,7 +215,7 @@ void EscherPropertyContainer::AddOpt( sal_uInt16 nPropID, sal_Bool bBlib, sal_uI
if ( bBlib ) // bBlib is only valid when fComplex = 0
nPropID |= 0x4000;
if ( pProp )
- nPropID |= 0x8000; // fComplex = TRUE;
+ nPropID |= 0x8000; // fComplex = sal_True;
sal_uInt32 i;
for( i = 0; i < nSortCount; i++ )
@@ -298,8 +298,8 @@ EscherProperties EscherPropertyContainer::GetOpts() const
extern "C" int __LOADONCALLAPI EscherPropSortFunc( const void* p1, const void* p2 )
{
- INT16 nID1 = ((EscherPropSortStruct*)p1)->nPropId &~0xc000;
- INT16 nID2 = ((EscherPropSortStruct*)p2)->nPropId &~0xc000;
+ sal_Int16 nID1 = ((EscherPropSortStruct*)p1)->nPropId &~0xc000;
+ sal_Int16 nID2 = ((EscherPropSortStruct*)p2)->nPropId &~0xc000;
if( nID1 < nID2 )
return -1;
@@ -1183,7 +1183,7 @@ sal_Bool EscherPropertyContainer::ImplCreateEmbeddedBmp( const ByteString& rUniq
{
// grab BLIP from stream and insert directly as complex property
// ownership of stream memory goes to complex property
- aMemStrm.ObjectOwnsMemory( FALSE );
+ aMemStrm.ObjectOwnsMemory( sal_False );
sal_uInt8* pBuf = (sal_uInt8*) aMemStrm.GetData();
sal_uInt32 nSize = aMemStrm.Seek( STREAM_SEEK_TO_END );
AddOpt( ESCHER_Prop_fillBlip, sal_True, nSize, pBuf, nSize );
@@ -1388,7 +1388,7 @@ sal_Bool EscherPropertyContainer::CreateGraphicProperties(
INetURLObject aTmp( aGraphicUrl );
GraphicDescriptor aDescriptor(aTmp);
aDescriptor.Detect();
- const USHORT nFormat = aDescriptor.GetFileFormat();
+ const sal_uInt16 nFormat = aDescriptor.GetFileFormat();
// can MSO handle it?
if ( bMirrored || nAngle ||
@@ -1479,7 +1479,7 @@ sal_Bool EscherPropertyContainer::CreateGraphicProperties(
{
// grab BLIP from stream and insert directly as complex property
// ownership of stream memory goes to complex property
- aMemStrm.ObjectOwnsMemory( FALSE );
+ aMemStrm.ObjectOwnsMemory( sal_False );
sal_uInt8* pBuf = (sal_uInt8*) aMemStrm.GetData();
sal_uInt32 nSize = aMemStrm.Seek( STREAM_SEEK_TO_END );
AddOpt( ESCHER_Prop_fillBlip, sal_True, nSize, pBuf, nSize );
@@ -1795,8 +1795,8 @@ sal_Bool EscherPropertyContainer::CreatePolygonProperties(
AddOpt( ESCHER_Prop_geoBottom, rGeoRect.Height );
AddOpt( ESCHER_Prop_shapePath, ESCHER_ShapeComplex );
- AddOpt( ESCHER_Prop_pVertices, TRUE, nVerticesBufSize - 6, (sal_uInt8*)pVerticesBuf, nVerticesBufSize );
- AddOpt( ESCHER_Prop_pSegmentInfo, TRUE, nSegmentBufSize, (sal_uInt8*)pSegmentBuf, nSegmentBufSize );
+ AddOpt( ESCHER_Prop_pVertices, sal_True, nVerticesBufSize - 6, (sal_uInt8*)pVerticesBuf, nVerticesBufSize );
+ AddOpt( ESCHER_Prop_pSegmentInfo, sal_True, nSegmentBufSize, (sal_uInt8*)pSegmentBuf, nSegmentBufSize );
}
}
return bRetValue;
@@ -2163,7 +2163,7 @@ void EscherPropertyContainer::LookForPolarHandles( const MSO_SPT eShapeType, sal
sal_Bool EscherPropertyContainer::GetAdjustmentValue( const com::sun::star::drawing::EnhancedCustomShapeAdjustmentValue & rkProp, sal_Int32 nIndex, sal_Int32 nAdjustmentsWhichNeedsToBeConverted, sal_Int32& nValue )
{
if ( rkProp.State != beans::PropertyState_DIRECT_VALUE )
- return FALSE;
+ return sal_False;
sal_Bool bUseFixedFloat = ( nAdjustmentsWhichNeedsToBeConverted & ( 1 << nIndex ) ) != 0;
if ( rkProp.Value.getValueTypeClass() == uno::TypeClass_DOUBLE )
@@ -2181,7 +2181,7 @@ sal_Bool EscherPropertyContainer::GetAdjustmentValue( const com::sun::star::draw
nValue <<= 16;
}
- return TRUE;
+ return sal_True;
}
void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeType, const uno::Reference< drawing::XShape > & rXShape )
@@ -3351,32 +3351,32 @@ EscherPersistTable::~EscherPersistTable()
// ---------------------------------------------------------------------------------------------
-BOOL EscherPersistTable::PtIsID( UINT32 nID )
+sal_Bool EscherPersistTable::PtIsID( sal_uInt32 nID )
{
for ( void* pPtr = maPersistTable.First(); pPtr; pPtr = maPersistTable.Next() )
{
if ( ((EscherPersistEntry*)pPtr)->mnID == nID )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// ---------------------------------------------------------------------------------------------
-void EscherPersistTable::PtInsert( UINT32 nID, UINT32 nOfs )
+void EscherPersistTable::PtInsert( sal_uInt32 nID, sal_uInt32 nOfs )
{
maPersistTable.Insert( new EscherPersistEntry( nID, nOfs ) );
}
// ---------------------------------------------------------------------------------------------
-UINT32 EscherPersistTable::PtDelete( UINT32 nID )
+sal_uInt32 EscherPersistTable::PtDelete( sal_uInt32 nID )
{
for ( void* pPtr = maPersistTable.First(); pPtr; pPtr = maPersistTable.Next() )
{
if ( ((EscherPersistEntry*)pPtr)->mnID == nID )
{
-// UINT32 nRetValue = ((EscherPersistEntry*)pPtr)->mnOffset;
+// sal_uInt32 nRetValue = ((EscherPersistEntry*)pPtr)->mnOffset;
delete (EscherPersistEntry*) maPersistTable.Remove();
}
}
@@ -3385,7 +3385,7 @@ UINT32 EscherPersistTable::PtDelete( UINT32 nID )
// ---------------------------------------------------------------------------------------------
-UINT32 EscherPersistTable::PtGetOffsetByID( UINT32 nID )
+sal_uInt32 EscherPersistTable::PtGetOffsetByID( sal_uInt32 nID )
{
for ( void* pPtr = maPersistTable.First(); pPtr; pPtr = maPersistTable.Next() )
{
@@ -3397,13 +3397,13 @@ UINT32 EscherPersistTable::PtGetOffsetByID( UINT32 nID )
// ---------------------------------------------------------------------------------------------
-UINT32 EscherPersistTable::PtReplace( UINT32 nID, UINT32 nOfs )
+sal_uInt32 EscherPersistTable::PtReplace( sal_uInt32 nID, sal_uInt32 nOfs )
{
for ( void* pPtr = maPersistTable.First(); pPtr; pPtr = maPersistTable.Next() )
{
if ( ((EscherPersistEntry*)pPtr)->mnID == nID )
{
- UINT32 nRetValue = ((EscherPersistEntry*)pPtr)->mnOffset;
+ sal_uInt32 nRetValue = ((EscherPersistEntry*)pPtr)->mnOffset;
((EscherPersistEntry*)pPtr)->mnOffset = nOfs;
return nRetValue;
}
@@ -3413,13 +3413,13 @@ UINT32 EscherPersistTable::PtReplace( UINT32 nID, UINT32 nOfs )
// ---------------------------------------------------------------------------------------------
-UINT32 EscherPersistTable::PtReplaceOrInsert( UINT32 nID, UINT32 nOfs )
+sal_uInt32 EscherPersistTable::PtReplaceOrInsert( sal_uInt32 nID, sal_uInt32 nOfs )
{
for ( void* pPtr = maPersistTable.First(); pPtr; pPtr = maPersistTable.Next() )
{
if ( ((EscherPersistEntry*)pPtr)->mnID == nID )
{
- UINT32 nRetValue = ((EscherPersistEntry*)pPtr)->mnOffset;
+ sal_uInt32 nRetValue = ((EscherPersistEntry*)pPtr)->mnOffset;
((EscherPersistEntry*)pPtr)->mnOffset = nOfs;
return nRetValue;
}
@@ -3498,7 +3498,7 @@ EscherBlibEntry::EscherBlibEntry( sal_uInt32 nPictureOffset, const GraphicObject
mnSizeExtra ( 0 ),
maPrefSize ( rObject.GetPrefSize() ),
maPrefMapMode ( rObject.GetPrefMapMode() ),
- mbIsEmpty ( TRUE )
+ mbIsEmpty ( sal_True )
{
mbIsNativeGraphicPossible = ( pGraphicAttr == NULL );
meBlibType = UNKNOWN;
@@ -3535,12 +3535,12 @@ EscherBlibEntry::EscherBlibEntry( sal_uInt32 nPictureOffset, const GraphicObject
<< pGraphicAttr->GetChannelG()
<< pGraphicAttr->GetChannelB()
<< pGraphicAttr->GetGamma()
- << (BOOL)( pGraphicAttr->IsInvert() == TRUE )
+ << (sal_Bool)( pGraphicAttr->IsInvert() == sal_True )
<< pGraphicAttr->GetTransparency();
mnIdentifier[ 1 ] = rtl_crc32( 0, aSt.GetData(), aSt.Tell() );
}
else
- mbIsNativeGraphicPossible = TRUE;
+ mbIsNativeGraphicPossible = sal_True;
}
sal_uInt32 i, nTmp, n1, n2;
n1 = n2 = 0;
@@ -3555,7 +3555,7 @@ EscherBlibEntry::EscherBlibEntry( sal_uInt32 nPictureOffset, const GraphicObject
}
mnIdentifier[ 2 ] = n1;
mnIdentifier[ 3 ] = n2;
- mbIsEmpty = FALSE;
+ mbIsEmpty = sal_False;
}
};
@@ -3595,14 +3595,14 @@ EscherBlibEntry::~EscherBlibEntry()
// ---------------------------------------------------------------------------------------------
-BOOL EscherBlibEntry::operator==( const EscherBlibEntry& rEscherBlibEntry ) const
+sal_Bool EscherBlibEntry::operator==( const EscherBlibEntry& rEscherBlibEntry ) const
{
for ( int i = 0; i < 3; i++ )
{
if ( mnIdentifier[ i ] != rEscherBlibEntry.mnIdentifier[ i ] )
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
// ---------------------------------------------------------------------------------------------
@@ -3619,7 +3619,7 @@ EscherGraphicProvider::EscherGraphicProvider( sal_uInt32 nFlags ) :
EscherGraphicProvider::~EscherGraphicProvider()
{
- for ( UINT32 i = 0; i < mnBlibEntrys; delete mpBlibEntrys[ i++ ] ) ;
+ for ( sal_uInt32 i = 0; i < mnBlibEntrys; delete mpBlibEntrys[ i++ ] ) ;
delete[] mpBlibEntrys;
}
@@ -3632,13 +3632,13 @@ void EscherGraphicProvider::SetNewBlipStreamOffset( sal_Int32 nOffset )
}
}
-UINT32 EscherGraphicProvider::ImplInsertBlib( EscherBlibEntry* p_EscherBlibEntry )
+sal_uInt32 EscherGraphicProvider::ImplInsertBlib( EscherBlibEntry* p_EscherBlibEntry )
{
if ( mnBlibBufSize == mnBlibEntrys )
{
mnBlibBufSize += 64;
EscherBlibEntry** pTemp = new EscherBlibEntry*[ mnBlibBufSize ];
- for ( UINT32 i = 0; i < mnBlibEntrys; i++ )
+ for ( sal_uInt32 i = 0; i < mnBlibEntrys; i++ )
{
pTemp[ i ] = mpBlibEntrys[ i ];
}
@@ -3693,15 +3693,15 @@ void EscherGraphicProvider::WriteBlibStoreContainer( SvStream& rSt, SvStream* pM
// BLIP
pMergePicStreamBSE->Seek( pBlibEntry->mnPictureOffset );
- UINT16 n16;
+ sal_uInt16 n16;
// record version and instance
*pMergePicStreamBSE >> n16;
rSt << n16;
// record type
*pMergePicStreamBSE >> n16;
- rSt << UINT16( ESCHER_BlipFirst + nBlibType );
+ rSt << sal_uInt16( ESCHER_BlipFirst + nBlibType );
DBG_ASSERT( n16 == ESCHER_BlipFirst + nBlibType , "EscherGraphicProvider::WriteBlibStoreContainer: BLIP record types differ" );
- UINT32 n32;
+ sal_uInt32 n32;
// record size
*pMergePicStreamBSE >> n32;
nBlipSize -= 8;
@@ -3710,7 +3710,7 @@ void EscherGraphicProvider::WriteBlibStoreContainer( SvStream& rSt, SvStream* pM
// record
while ( nBlipSize )
{
- UINT32 nBytes = ( nBlipSize > nBuf ? nBuf : nBlipSize );
+ sal_uInt32 nBytes = ( nBlipSize > nBuf ? nBuf : nBlipSize );
pMergePicStreamBSE->Read( pBuf, nBytes );
rSt.Write( pBuf, nBytes );
nBlipSize -= nBytes;
@@ -3748,7 +3748,7 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, const ByteSt
EscherBlibEntry* p_EscherBlibEntry = new EscherBlibEntry( rPicOutStrm.Tell(), aGraphicObject, rId, pGraphicAttr );
if ( !p_EscherBlibEntry->IsEmpty() )
{
- for ( UINT32 i = 0; i < mnBlibEntrys; i++ )
+ for ( sal_uInt32 i = 0; i < mnBlibEntrys; i++ )
{
if ( *( mpBlibEntrys[ i ] ) == *p_EscherBlibEntry )
{
@@ -3758,7 +3758,7 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, const ByteSt
}
}
- sal_Bool bUseNativeGraphic( FALSE );
+ sal_Bool bUseNativeGraphic( sal_False );
Graphic aGraphic( aGraphicObject.GetTransformedGraphic( pGraphicAttr ) );
GfxLink aGraphicLink;
@@ -3804,7 +3804,7 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, const ByteSt
default: break;
}
if ( p_EscherBlibEntry->meBlibType != UNKNOWN )
- bUseNativeGraphic = TRUE;
+ bUseNativeGraphic = sal_True;
}
}
if ( !bUseNativeGraphic )
@@ -3866,8 +3866,8 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, const ByteSt
if ( mnFlags & _E_GRAPH_PROV_USE_INSTANCES )
{
- rPicOutStrm << (UINT32)( 0x7f90000 | (UINT16)( mnBlibEntrys << 4 ) )
- << (UINT32)0;
+ rPicOutStrm << (sal_uInt32)( 0x7f90000 | (sal_uInt16)( mnBlibEntrys << 4 ) )
+ << (sal_uInt32)0;
nAtomSize = rPicOutStrm.Tell();
if ( eBlibType == PNG )
rPicOutStrm << (sal_uInt16)0x0606;
@@ -3919,9 +3919,9 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, const ByteSt
around, and the original size and scaling factor in word
will be a very strange figure
*/
- UINT32 nPrefWidth = p_EscherBlibEntry->maPrefSize.Width();
- UINT32 nPrefHeight = p_EscherBlibEntry->maPrefSize.Height();
- UINT32 nWidth, nHeight;
+ sal_uInt32 nPrefWidth = p_EscherBlibEntry->maPrefSize.Width();
+ sal_uInt32 nPrefHeight = p_EscherBlibEntry->maPrefSize.Height();
+ sal_uInt32 nWidth, nHeight;
if ( pVisArea )
{
nWidth = pVisArea->Width * 360;
@@ -4158,7 +4158,7 @@ sal_uInt32 EscherConnectorListEntry::GetConnectorRule( sal_Bool bFirst )
if ( pList )
{
Polygon aPoly;
- USHORT nNum, nAnz = pList->GetCount();
+ sal_uInt16 nNum, nAnz = pList->GetCount();
if ( nAnz )
{
for ( nNum = 0; nNum < nAnz; nNum++ )
@@ -4174,7 +4174,7 @@ sal_uInt32 EscherConnectorListEntry::GetConnectorRule( sal_Bool bFirst )
}
else if ( nGluePointType == com::sun::star::drawing::EnhancedCustomShapeGluePointType::SEGMENTS )
{
- SdrObject* pPoly = pCustoShape->DoConvertToPolyObj( TRUE );
+ SdrObject* pPoly = pCustoShape->DoConvertToPolyObj( sal_True );
if ( pPoly && pPoly->ISA( SdrPathObj ) )
{
sal_Int16 a, b, nIndex = 0;
@@ -4453,8 +4453,8 @@ EscherEx::EscherEx( const EscherExGlobalRef& rxGlobal, SvStream& rOutStrm ) :
mnGroupLevel ( 0 ),
mnHellLayerId ( USHRT_MAX ),
- mbEscherSpgr ( FALSE ),
- mbEscherDg ( FALSE )
+ mbEscherSpgr ( sal_False ),
+ mbEscherDg ( sal_False )
{
mnStrmStartOfs = mpOutStrm->Tell();
mpImplEscherExSdr.reset( new ImplEscherExSdr( *this ) );
@@ -4503,15 +4503,15 @@ void EscherEx::Flush( SvStream* pPicStreamMergeBSE /* = NULL */ )
// ---------------------------------------------------------------------------------------------
-void EscherEx::InsertAtCurrentPos( UINT32 nBytes, bool bExpandEndOfAtom )
+void EscherEx::InsertAtCurrentPos( sal_uInt32 nBytes, bool bExpandEndOfAtom )
{
- UINT32 nSize, nType, nSource, nBufSize, nToCopy, nCurPos = mpOutStrm->Tell();
- BYTE* pBuf;
+ sal_uInt32 nSize, nType, nSource, nBufSize, nToCopy, nCurPos = mpOutStrm->Tell();
+ sal_uInt8* pBuf;
// Persist table anpassen
for ( void* pPtr = maPersistTable.First(); pPtr; pPtr = maPersistTable.Next() )
{
- UINT32 nOfs = ((EscherPersistEntry*)pPtr)->mnOffset;
+ sal_uInt32 nOfs = ((EscherPersistEntry*)pPtr)->mnOffset;
if ( nOfs >= nCurPos )
((EscherPersistEntry*)pPtr)->mnOffset += nBytes;
}
@@ -4529,7 +4529,7 @@ void EscherEx::InsertAtCurrentPos( UINT32 nBytes, bool bExpandEndOfAtom )
if ( (nCurPos < nEndOfRecord) || ((nCurPos == nEndOfRecord) && (bContainer || bExpandEndOfAtom)) )
{
mpOutStrm->SeekRel( -4 );
- *mpOutStrm << (UINT32)( nSize + nBytes );
+ *mpOutStrm << (sal_uInt32)( nSize + nBytes );
if ( !bContainer )
mpOutStrm->SeekRel( nSize );
}
@@ -4547,7 +4547,7 @@ void EscherEx::InsertAtCurrentPos( UINT32 nBytes, bool bExpandEndOfAtom )
mpOutStrm->Seek( STREAM_SEEK_TO_END );
nSource = mpOutStrm->Tell();
nToCopy = nSource - nCurPos; // Stream um nBytes vergroessern
- pBuf = new BYTE[ 0x40000 ]; // 256KB Buffer
+ pBuf = new sal_uInt8[ 0x40000 ]; // 256KB Buffer
while ( nToCopy )
{
nBufSize = ( nToCopy >= 0x40000 ) ? 0x40000 : nToCopy;
@@ -4564,9 +4564,9 @@ void EscherEx::InsertAtCurrentPos( UINT32 nBytes, bool bExpandEndOfAtom )
// ---------------------------------------------------------------------------------------------
-BOOL EscherEx::SeekBehindRecHeader( UINT16 nRecType )
+sal_Bool EscherEx::SeekBehindRecHeader( sal_uInt16 nRecType )
{
- UINT32 nOldPos, nStreamEnd, nType, nSize;
+ sal_uInt32 nOldPos, nStreamEnd, nType, nSize;
nOldPos = mpOutStrm->Tell();
nStreamEnd = mpOutStrm->Seek( STREAM_SEEK_TO_END );
@@ -4575,60 +4575,60 @@ BOOL EscherEx::SeekBehindRecHeader( UINT16 nRecType )
{
*mpOutStrm >> nType >> nSize;
if ( ( nType >> 16 ) == nRecType )
- return TRUE;
+ return sal_True;
if ( ( nType & 0xf ) != 0xf )
mpOutStrm->SeekRel( nSize );
}
mpOutStrm->Seek( nOldPos );
- return FALSE;
+ return sal_False;
}
// ---------------------------------------------------------------------------------------------
-void EscherEx::InsertPersistOffset( UINT32 nKey, UINT32 nOffset )
+void EscherEx::InsertPersistOffset( sal_uInt32 nKey, sal_uInt32 nOffset )
{
PtInsert( ESCHER_Persist_PrivateEntry | nKey, nOffset );
}
-void EscherEx::ReplacePersistOffset( UINT32 nKey, UINT32 nOffset )
+void EscherEx::ReplacePersistOffset( sal_uInt32 nKey, sal_uInt32 nOffset )
{
PtReplace( ESCHER_Persist_PrivateEntry | nKey, nOffset );
}
-UINT32 EscherEx::GetPersistOffset( UINT32 nKey )
+sal_uInt32 EscherEx::GetPersistOffset( sal_uInt32 nKey )
{
return PtGetOffsetByID( ESCHER_Persist_PrivateEntry | nKey );
}
// ---------------------------------------------------------------------------------------------
-BOOL EscherEx::DoSeek( UINT32 nKey )
+sal_Bool EscherEx::DoSeek( sal_uInt32 nKey )
{
- UINT32 nPos = PtGetOffsetByID( nKey );
+ sal_uInt32 nPos = PtGetOffsetByID( nKey );
if ( nPos )
mpOutStrm->Seek( nPos );
else
{
if (! PtIsID( nKey ) )
- return FALSE;
+ return sal_False;
mpOutStrm->Seek( 0 );
}
- return TRUE;
+ return sal_True;
}
// ---------------------------------------------------------------------------------------------
-BOOL EscherEx::SeekToPersistOffset( UINT32 nKey )
+sal_Bool EscherEx::SeekToPersistOffset( sal_uInt32 nKey )
{
return DoSeek( ESCHER_Persist_PrivateEntry | nKey );
}
// ---------------------------------------------------------------------------------------------
-BOOL EscherEx::InsertAtPersistOffset( UINT32 nKey, UINT32 nValue )
+sal_Bool EscherEx::InsertAtPersistOffset( sal_uInt32 nKey, sal_uInt32 nValue )
{
- UINT32 nOldPos = mpOutStrm->Tell();
- BOOL bRetValue = SeekToPersistOffset( nKey );
+ sal_uInt32 nOldPos = mpOutStrm->Tell();
+ sal_Bool bRetValue = SeekToPersistOffset( nKey );
if ( bRetValue )
{
*mpOutStrm << nValue;
@@ -4639,9 +4639,9 @@ BOOL EscherEx::InsertAtPersistOffset( UINT32 nKey, UINT32 nValue )
// ---------------------------------------------------------------------------------------------
-void EscherEx::OpenContainer( UINT16 nEscherContainer, int nRecInstance )
+void EscherEx::OpenContainer( sal_uInt16 nEscherContainer, int nRecInstance )
{
- *mpOutStrm << (UINT16)( ( nRecInstance << 4 ) | 0xf ) << nEscherContainer << (UINT32)0;
+ *mpOutStrm << (sal_uInt16)( ( nRecInstance << 4 ) | 0xf ) << nEscherContainer << (sal_uInt32)0;
mOffsets.push_back( mpOutStrm->Tell() - 4 );
mRecTypes.push_back( nEscherContainer );
switch( nEscherContainer )
@@ -4665,12 +4665,12 @@ void EscherEx::OpenContainer( UINT16 nEscherContainer, int nRecInstance )
{
if ( !mbEscherDg )
{
- mbEscherDg = TRUE;
+ mbEscherDg = sal_True;
mnCurrentDg = mxGlobal->GenerateDrawingId();
AddAtom( 8, ESCHER_Dg, 0, mnCurrentDg );
PtReplaceOrInsert( ESCHER_Persist_Dg | mnCurrentDg, mpOutStrm->Tell() );
- *mpOutStrm << (UINT32)0 // The number of shapes in this drawing
- << (UINT32)0; // The last MSOSPID given to an SP in this DG
+ *mpOutStrm << (sal_uInt32)0 // The number of shapes in this drawing
+ << (sal_uInt32)0; // The last MSOSPID given to an SP in this DG
}
}
}
@@ -4680,7 +4680,7 @@ void EscherEx::OpenContainer( UINT16 nEscherContainer, int nRecInstance )
{
if ( mbEscherDg )
{
- mbEscherSpgr = TRUE;
+ mbEscherSpgr = sal_True;
}
}
break;
@@ -4710,7 +4710,7 @@ void EscherEx::CloseContainer()
{
if ( mbEscherDg )
{
- mbEscherDg = FALSE;
+ mbEscherDg = sal_False;
if ( DoSeek( ESCHER_Persist_Dg | mnCurrentDg ) )
*mpOutStrm << mxGlobal->GetDrawingShapeCount( mnCurrentDg ) << mxGlobal->GetLastShapeId( mnCurrentDg );
}
@@ -4721,7 +4721,7 @@ void EscherEx::CloseContainer()
{
if ( mbEscherSpgr )
{
- mbEscherSpgr = FALSE;
+ mbEscherSpgr = sal_False;
}
}
@@ -4740,25 +4740,25 @@ void EscherEx::CloseContainer()
void EscherEx::BeginAtom()
{
mnCountOfs = mpOutStrm->Tell();
- *mpOutStrm << (UINT32)0 << (UINT32)0; // record header wird spaeter geschrieben
+ *mpOutStrm << (sal_uInt32)0 << (sal_uInt32)0; // record header wird spaeter geschrieben
}
// ---------------------------------------------------------------------------------------------
-void EscherEx::EndAtom( UINT16 nRecType, int nRecVersion, int nRecInstance )
+void EscherEx::EndAtom( sal_uInt16 nRecType, int nRecVersion, int nRecInstance )
{
- UINT32 nOldPos = mpOutStrm->Tell();
+ sal_uInt32 nOldPos = mpOutStrm->Tell();
mpOutStrm->Seek( mnCountOfs );
sal_uInt32 nSize = nOldPos - mnCountOfs;
- *mpOutStrm << (UINT16)( ( nRecInstance << 4 ) | ( nRecVersion & 0xf ) ) << nRecType << (UINT32)( nSize - 8 );
+ *mpOutStrm << (sal_uInt16)( ( nRecInstance << 4 ) | ( nRecVersion & 0xf ) ) << nRecType << (sal_uInt32)( nSize - 8 );
mpOutStrm->Seek( nOldPos );
}
// ---------------------------------------------------------------------------------------------
-void EscherEx::AddAtom( UINT32 nAtomSize, UINT16 nRecType, int nRecVersion, int nRecInstance )
+void EscherEx::AddAtom( sal_uInt32 nAtomSize, sal_uInt16 nRecType, int nRecVersion, int nRecInstance )
{
- *mpOutStrm << (UINT16)( ( nRecInstance << 4 ) | ( nRecVersion & 0xf ) ) << nRecType << nAtomSize;
+ *mpOutStrm << (sal_uInt16)( ( nRecInstance << 4 ) | ( nRecVersion & 0xf ) ) << nRecType << nAtomSize;
}
// ---------------------------------------------------------------------------------------------
@@ -4792,7 +4792,7 @@ EscherExHostAppData* EscherEx::EnterAdditionalTextGroup()
// ---------------------------------------------------------------------------------------------
-UINT32 EscherEx::EnterGroup( const String& rShapeName, const Rectangle* pBoundRect )
+sal_uInt32 EscherEx::EnterGroup( const String& rShapeName, const Rectangle* pBoundRect )
{
Rectangle aRect;
if( pBoundRect )
@@ -4803,10 +4803,10 @@ UINT32 EscherEx::EnterGroup( const String& rShapeName, const Rectangle* pBoundRe
AddAtom( 16, ESCHER_Spgr, 1 );
PtReplaceOrInsert( ESCHER_Persist_Grouping_Snap | mnGroupLevel,
mpOutStrm->Tell() );
- *mpOutStrm << (INT32)aRect.Left() // Bounding box fuer die Gruppierten shapes an die sie attached werden
- << (INT32)aRect.Top()
- << (INT32)aRect.Right()
- << (INT32)aRect.Bottom();
+ *mpOutStrm << (sal_Int32)aRect.Left() // Bounding box fuer die Gruppierten shapes an die sie attached werden
+ << (sal_Int32)aRect.Top()
+ << (sal_Int32)aRect.Right()
+ << (sal_Int32)aRect.Bottom();
sal_uInt32 nShapeId = GenerateShapeId();
if ( !mnGroupLevel )
@@ -4840,25 +4840,25 @@ UINT32 EscherEx::EnterGroup( const String& rShapeName, const Rectangle* pBoundRe
return nShapeId;
}
-UINT32 EscherEx::EnterGroup( const Rectangle* pBoundRect )
+sal_uInt32 EscherEx::EnterGroup( const Rectangle* pBoundRect )
{
return EnterGroup( String::EmptyString(), pBoundRect );
}
// ---------------------------------------------------------------------------------------------
-BOOL EscherEx::SetGroupSnapRect( UINT32 nGroupLevel, const Rectangle& rRect )
+sal_Bool EscherEx::SetGroupSnapRect( sal_uInt32 nGroupLevel, const Rectangle& rRect )
{
- BOOL bRetValue = FALSE;
+ sal_Bool bRetValue = sal_False;
if ( nGroupLevel )
{
- UINT32 nCurrentPos = mpOutStrm->Tell();
+ sal_uInt32 nCurrentPos = mpOutStrm->Tell();
if ( DoSeek( ESCHER_Persist_Grouping_Snap | ( nGroupLevel - 1 ) ) )
{
- *mpOutStrm << (INT32)rRect.Left() // Bounding box fuer die Gruppierten shapes an die sie attached werden
- << (INT32)rRect.Top()
- << (INT32)rRect.Right()
- << (INT32)rRect.Bottom();
+ *mpOutStrm << (sal_Int32)rRect.Left() // Bounding box fuer die Gruppierten shapes an die sie attached werden
+ << (sal_Int32)rRect.Top()
+ << (sal_Int32)rRect.Right()
+ << (sal_Int32)rRect.Bottom();
mpOutStrm->Seek( nCurrentPos );
}
}
@@ -4867,15 +4867,15 @@ BOOL EscherEx::SetGroupSnapRect( UINT32 nGroupLevel, const Rectangle& rRect )
// ---------------------------------------------------------------------------------------------
-BOOL EscherEx::SetGroupLogicRect( UINT32 nGroupLevel, const Rectangle& rRect )
+sal_Bool EscherEx::SetGroupLogicRect( sal_uInt32 nGroupLevel, const Rectangle& rRect )
{
- BOOL bRetValue = FALSE;
+ sal_Bool bRetValue = sal_False;
if ( nGroupLevel )
{
- UINT32 nCurrentPos = mpOutStrm->Tell();
+ sal_uInt32 nCurrentPos = mpOutStrm->Tell();
if ( DoSeek( ESCHER_Persist_Grouping_Logic | ( nGroupLevel - 1 ) ) )
{
- *mpOutStrm << (INT16)rRect.Top() << (INT16)rRect.Left() << (INT16)rRect.Right() << (INT16)rRect.Bottom();
+ *mpOutStrm << (sal_Int16)rRect.Top() << (sal_Int16)rRect.Left() << (sal_Int16)rRect.Right() << (sal_Int16)rRect.Bottom();
mpOutStrm->Seek( nCurrentPos );
}
}
@@ -4894,7 +4894,7 @@ void EscherEx::LeaveGroup()
// ---------------------------------------------------------------------------------------------
-void EscherEx::AddShape( UINT32 nShpInstance, UINT32 nFlags, UINT32 nShapeID )
+void EscherEx::AddShape( sal_uInt32 nShpInstance, sal_uInt32 nFlags, sal_uInt32 nShapeID )
{
AddAtom( 8, ESCHER_Sp, 2, nShpInstance );
@@ -4918,13 +4918,13 @@ void EscherEx::Commit( EscherPropertyContainer& rProps, const Rectangle& )
// ---------------------------------------------------------------------------------------------
-UINT32 EscherEx::GetColor( const UINT32 nSOColor, BOOL bSwap )
+sal_uInt32 EscherEx::GetColor( const sal_uInt32 nSOColor, sal_Bool bSwap )
{
if ( bSwap )
{
- UINT32 nColor = nSOColor & 0xff00; // GRUEN
- nColor |= (BYTE)( nSOColor ) << 16; // ROT
- nColor |= (BYTE)( nSOColor >> 16 ); // BLAU
+ sal_uInt32 nColor = nSOColor & 0xff00; // GRUEN
+ nColor |= (sal_uInt8)( nSOColor ) << 16; // ROT
+ nColor |= (sal_uInt8)( nSOColor >> 16 ); // BLAU
return nColor;
}
else
@@ -4933,14 +4933,14 @@ UINT32 EscherEx::GetColor( const UINT32 nSOColor, BOOL bSwap )
// ---------------------------------------------------------------------------------------------
-UINT32 EscherEx::GetColor( const Color& rSOColor, BOOL bSwap )
+sal_uInt32 EscherEx::GetColor( const Color& rSOColor, sal_Bool bSwap )
{
- UINT32 nColor = ( rSOColor.GetRed() << 16 );
+ sal_uInt32 nColor = ( rSOColor.GetRed() << 16 );
nColor |= ( rSOColor.GetGreen() << 8 );
nColor |= rSOColor.GetBlue();
if ( !bSwap )
- nColor = GetColor( nColor, TRUE );
+ nColor = GetColor( nColor, sal_True );
return nColor;
}
diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx
index 950a32cd0645..ec06fcefaf6f 100644
--- a/filter/source/msfilter/eschesdo.cxx
+++ b/filter/source/msfilter/eschesdo.cxx
@@ -81,8 +81,8 @@ ImplEESdrWriter::ImplEESdrWriter( EscherEx& rEx )
mnPagesWritten ( 0 ),
mnShapeMasterTitle ( 0 ),
mnShapeMasterBody ( 0 ),
- mbStatusIndicator ( FALSE ),
- mbStatus ( FALSE )
+ mbStatusIndicator ( sal_False ),
+ mbStatus ( sal_False )
{
}
@@ -112,7 +112,7 @@ Size ImplEESdrWriter::ImplMapSize( const Size& rSize )
void ImplEESdrWriter::ImplFlipBoundingBox( ImplEESdrObject& rObj, EscherPropertyContainer& rPropOpt )
{
- INT32 nAngle = rObj.GetAngle();
+ sal_Int32 nAngle = rObj.GetAngle();
Rectangle aRect( rObj.GetRect() );
if ( nAngle < 0 )
@@ -148,7 +148,7 @@ void ImplEESdrWriter::ImplFlipBoundingBox( ImplEESdrObject& rObj, EscherProperty
nShapeType = nType; \
nShapeID = mpEscherEx->GenerateShapeId(); \
rObj.SetShapeId( nShapeID ); \
- mpEscherEx->AddShape( (UINT32)nType, (UINT32)nFlags, nShapeID ); \
+ mpEscherEx->AddShape( (sal_uInt32)nType, (sal_uInt32)nFlags, nShapeID ); \
rSolverContainer.AddShape( rObj.GetShapeRef(), nShapeID ); \
}
@@ -171,15 +171,15 @@ void ImplEESdrWriter::MapRect(ImplEESdrObject& /* rObj */ )
{
}
-UINT32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
+sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
EscherSolverContainer& rSolverContainer,
ImplEESdrPageType ePageType )
{
- UINT32 nShapeID = 0;
- UINT16 nShapeType = 0;
- BOOL bDontWriteText = FALSE; // if a metafile is written as shape replacement, then the text is already part of the metafile
- BOOL bAdditionalText = FALSE;
- UINT32 nGrpShapeID = 0;
+ sal_uInt32 nShapeID = 0;
+ sal_uInt16 nShapeType = 0;
+ sal_Bool bDontWriteText = sal_False; // if a metafile is written as shape replacement, then the text is already part of the metafile
+ sal_Bool bAdditionalText = sal_False;
+ sal_uInt32 nGrpShapeID = 0;
do {
mpHostAppData = mpEscherEx->StartShape( rObj.GetShapeRef(), (mpEscherEx->GetGroupLevel() > 1) ? &rObj.GetRect() : 0 );
@@ -203,7 +203,7 @@ UINT32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
nShapeID = mpEscherEx->EnterGroup( aShapeName, &rObj.GetRect() );
nShapeType = ESCHER_ShpInst_Min;
- for( UINT32 n = 0, nCnt = xXIndexAccess->getCount();
+ for( sal_uInt32 n = 0, nCnt = xXIndexAccess->getCount();
n < nCnt; ++n )
{
ImplEESdrObject aObj( *this, *(Reference< XShape >*)
@@ -275,7 +275,7 @@ UINT32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
else
{
ADD_SHAPE(
- sal::static_int_cast< UINT16 >(eShapeType),
+ sal::static_int_cast< sal_uInt16 >(eShapeType),
nMirrorFlags | 0xa00 );
aPropOpt.CreateCustomShapeProperties( eShapeType, rObj.GetShapeRef() );
aPropOpt.CreateFillProperties( rObj.mXPropSet, sal_True );
@@ -296,7 +296,7 @@ UINT32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
{
nRadius = ImplMapSize( Size( nRadius, 0 )).Width();
ADD_SHAPE( ESCHER_ShpInst_RoundRectangle, 0xa00 ); // Flags: Connector | HasSpt
- INT32 nLenght = rObj.GetRect().GetWidth();
+ sal_Int32 nLenght = rObj.GetRect().GetWidth();
if ( nLenght > rObj.GetRect().GetHeight() )
nLenght = rObj.GetRect().GetHeight();
nLenght >>= 1;
@@ -354,22 +354,22 @@ UINT32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
}
else
{
- INT32 nStartAngle, nEndAngle;
+ sal_Int32 nStartAngle, nEndAngle;
if ( !rObj.ImplGetPropertyValue( ::rtl::OUString::createFromAscii("CircleStartAngle") ) )
break;
- nStartAngle = *( (INT32*)rObj.GetUsrAny().getValue() );
+ nStartAngle = *( (sal_Int32*)rObj.GetUsrAny().getValue() );
if( !rObj.ImplGetPropertyValue( ::rtl::OUString::createFromAscii("CircleEndAngle") ) )
break;
- nEndAngle = *( (INT32*)rObj.GetUsrAny().getValue() );
+ nEndAngle = *( (sal_Int32*)rObj.GetUsrAny().getValue() );
Point aStart, aEnd, aCenter;
- aStart.X() = (INT32)( ( cos( (double)( nStartAngle *
+ aStart.X() = (sal_Int32)( ( cos( (double)( nStartAngle *
F_PI18000 ) ) * 100.0 ) );
- aStart.Y() = - (INT32)( ( sin( (double)( nStartAngle *
+ aStart.Y() = - (sal_Int32)( ( sin( (double)( nStartAngle *
F_PI18000 ) ) * 100.0 ) );
- aEnd.X() = (INT32)( ( cos( (double)( nEndAngle *
+ aEnd.X() = (sal_Int32)( ( cos( (double)( nEndAngle *
F_PI18000 ) ) * 100.0 ) );
- aEnd.Y() = - (INT32)( ( sin( (double)( nEndAngle *
+ aEnd.Y() = - (sal_Int32)( ( sin( (double)( nEndAngle *
F_PI18000 ) ) * 100.0 ) );
const Rectangle& rRect = aRect100thmm;
aCenter.X() = rRect.Left() + ( rRect.GetWidth() / 2 );
@@ -437,8 +437,8 @@ UINT32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
{
mpEscherEx->EnterGroup( &maRect );
mpEscherEx->OpenContainer( ESCHER_SpContainer );
- ImplWriteAny( ANY_FLAGS_LINE, FALSE );
- UINT32 nFlags = 0xa00; // Flags: Connector | HasSpt
+ ImplWriteAny( ANY_FLAGS_LINE, sal_False );
+ sal_uInt32 nFlags = 0xa00; // Flags: Connector | HasSpt
if ( maRect.Top() > maRect.Bottom() )
nFlags |= 0x80; // Flags: VertMirror
if ( maRect.Left() > maRect.Right() )
@@ -522,7 +522,7 @@ UINT32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
//i27942: Poly/Lines/Bezier do not support text.
mpEscherEx->OpenContainer( ESCHER_SpContainer );
- UINT32 nFlags = 0xa00; // Flags: Connector | HasSpt
+ sal_uInt32 nFlags = 0xa00; // Flags: Connector | HasSpt
if( aNewRect.Height < 0 )
nFlags |= 0x80; // Flags: VertMirror
if( aNewRect.Width < 0 )
@@ -538,7 +538,7 @@ UINT32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
if( rObj.ImplHasText() )
{
nGrpShapeID = ImplEnterAdditionalTextGroup( rObj.GetShapeRef(), &rObj.GetRect() );
- bAdditionalText = TRUE;
+ bAdditionalText = sal_True;
}
mpEscherEx->OpenContainer( ESCHER_SpContainer );
ADD_SHAPE( ESCHER_ShpInst_NotPrimitive, 0xa00 ); // Flags: Connector | HasSpt
@@ -577,7 +577,7 @@ UINT32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
if ( rObj.ImplHasText() )
{
nGrpShapeID = ImplEnterAdditionalTextGroup( rObj.GetShapeRef(), &rObj.GetRect() );
- bAdditionalText = TRUE;
+ bAdditionalText = sal_True;
}
mpEscherEx->OpenContainer( ESCHER_SpContainer );
ADD_SHAPE( ESCHER_ShpInst_NotPrimitive, 0xa00 ); // Flags: Connector | HasSpt
@@ -595,7 +595,7 @@ UINT32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
if( rObj.IsEmptyPresObj() && ( ePageType == NORMAL ) )
{
ADD_SHAPE( ESCHER_ShpInst_Rectangle, 0x220 ); // Flags: HaveAnchor | HaveMaster
- UINT32 nTxtBxId = mpEscherEx->QueryTextID( rObj.GetShapeRef(),
+ sal_uInt32 nTxtBxId = mpEscherEx->QueryTextID( rObj.GetShapeRef(),
rObj.GetShapeId() );
aPropOpt.AddOpt( ESCHER_Prop_lTxid, nTxtBxId );
aPropOpt.AddOpt( ESCHER_Prop_fNoFillHitTest, 0x10001 );
@@ -633,7 +633,7 @@ UINT32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
}
else if ( rObj.GetType().EqualsAscii( "drawing.Text" ))
{
- SHAPE_TEXT( TRUE );
+ SHAPE_TEXT( sal_True );
}
else if ( rObj.GetType().EqualsAscii( "drawing.Page" ))
{
@@ -655,7 +655,7 @@ UINT32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
if( rObj.IsEmptyPresObj() && ( ePageType == NORMAL ) )
{
ADD_SHAPE( ESCHER_ShpInst_Rectangle, 0x220 ); // Flags: HaveAnchor | HaveMaster
- UINT32 nTxtBxId = mpEscherEx->QueryTextID( rObj.GetShapeRef(),
+ sal_uInt32 nTxtBxId = mpEscherEx->QueryTextID( rObj.GetShapeRef(),
rObj.GetShapeId() );
aPropOpt.AddOpt( ESCHER_Prop_lTxid, nTxtBxId );
aPropOpt.AddOpt( ESCHER_Prop_fNoFillHitTest, 0x10001 );
@@ -665,7 +665,7 @@ UINT32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
else
{
//2do: could be made an option in HostAppData whether OLE object should be written or not
- BOOL bAppOLE = TRUE;
+ sal_Bool bAppOLE = sal_True;
ADD_SHAPE( ESCHER_ShpInst_PictureFrame,
0xa00 | (bAppOLE ? SHAPEFLAG_OLESHAPE : 0) );
if ( aPropOpt.CreateOLEGraphicProperties( rObj.GetShapeRef() ) )
@@ -715,7 +715,7 @@ UINT32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
if( USHRT_MAX != mpEscherEx->GetHellLayerId() &&
rObj.ImplGetPropertyValue( ::rtl::OUString::createFromAscii("LayerID") ) &&
- (*((UINT16*)rObj.GetUsrAny().getValue()) ) == mpEscherEx->GetHellLayerId() )
+ (*((sal_uInt16*)rObj.GetUsrAny().getValue()) ) == mpEscherEx->GetHellLayerId() )
{
aPropOpt.AddOpt( ESCHER_Prop_fPrint, 0x200020 );
}
@@ -761,8 +761,8 @@ UINT32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
void ImplEESdrWriter::ImplWriteAdditionalText( ImplEESdrObject& rObj,
const Point& rTextRefPoint )
{
- UINT32 nShapeID = 0;
- UINT16 nShapeType = 0;
+ sal_uInt32 nShapeID = 0;
+ sal_uInt16 nShapeType = 0;
do
{
mpHostAppData = mpEscherEx->StartShape( rObj.GetShapeRef(), (mpEscherEx->GetGroupLevel() > 1) ? &rObj.GetRect() : 0 );
@@ -776,7 +776,7 @@ void ImplEESdrWriter::ImplWriteAdditionalText( ImplEESdrObject& rObj,
mpPicStrm = mpEscherEx->QueryPictureStream();
EscherPropertyContainer aPropOpt( mpEscherEx->GetGraphicProvider(), mpPicStrm, aRect100thmm );
rObj.SetAngle( rObj.ImplGetInt32PropertyValue( ::rtl::OUString::createFromAscii("RotateAngle")));
- INT32 nAngle = rObj.GetAngle();
+ sal_Int32 nAngle = rObj.GetAngle();
if( rObj.GetType().EqualsAscii( "drawing.Line" ))
{
//2do: this does not work right
@@ -839,7 +839,7 @@ void ImplEESdrWriter::ImplWriteAdditionalText( ImplEESdrObject& rObj,
// ClientTextbox
mpEscherEx->OpenContainer( ESCHER_ClientTextbox );
mpEscherEx->AddAtom( 4, EPP_TextHeaderAtom );
- *mpStrm << (UINT32)EPP_TEXTTYPE_Other; // Text in a Shape
+ *mpStrm << (sal_uInt32)EPP_TEXTTYPE_Other; // Text in a Shape
ImplWriteTextStyleAtom();
mpEscherEx->CloseContainer(); // ESCHER_ClientTextBox
#else // !EES_WRITE_EPP
@@ -859,11 +859,11 @@ void ImplEESdrWriter::ImplWriteAdditionalText( ImplEESdrObject& rObj,
// -------------------------------------------------------------------
-UINT32 ImplEESdrWriter::ImplEnterAdditionalTextGroup( const Reference< XShape >& rShape,
+sal_uInt32 ImplEESdrWriter::ImplEnterAdditionalTextGroup( const Reference< XShape >& rShape,
const Rectangle* pBoundRect )
{
mpHostAppData = mpEscherEx->EnterAdditionalTextGroup();
- UINT32 nGrpId = mpEscherEx->EnterGroup( pBoundRect );
+ sal_uInt32 nGrpId = mpEscherEx->EnterGroup( pBoundRect );
mpHostAppData = mpEscherEx->StartShape( rShape, pBoundRect );
return nGrpId;
}
@@ -871,14 +871,14 @@ UINT32 ImplEESdrWriter::ImplEnterAdditionalTextGroup( const Reference< XShape >&
// -------------------------------------------------------------------
-BOOL ImplEESdrWriter::ImplInitPageValues()
+sal_Bool ImplEESdrWriter::ImplInitPageValues()
{
mnIndices = 0;
mnOutlinerCount = 0; // die gliederungsobjekte muessen dem layout entsprechen,
mnEffectCount = 0;
- mbIsTitlePossible = TRUE; // bei mehr als einem title geht powerpoint in die knie
+ mbIsTitlePossible = sal_True; // bei mehr als einem title geht powerpoint in die knie
- return TRUE;
+ return sal_True;
}
@@ -886,18 +886,18 @@ BOOL ImplEESdrWriter::ImplInitPageValues()
void ImplEESdrWriter::ImplWritePage(
EscherSolverContainer& rSolverContainer,
- ImplEESdrPageType ePageType, BOOL /* bBackGround */ )
+ ImplEESdrPageType ePageType, sal_Bool /* bBackGround */ )
{
ImplInitPageValues();
- UINT32 nLastPer = 0, nShapes = mXShapes->getCount();
- for( UINT32 n = 0; n < nShapes; ++n )
+ sal_uInt32 nLastPer = 0, nShapes = mXShapes->getCount();
+ for( sal_uInt32 n = 0; n < nShapes; ++n )
{
- UINT32 nPer = ( 5 * n ) / nShapes;
+ sal_uInt32 nPer = ( 5 * n ) / nShapes;
if( nPer != nLastPer )
{
nLastPer = nPer;
- UINT32 nValue = mnPagesWritten * 5 + nPer;
+ sal_uInt32 nValue = mnPagesWritten * 5 + nPer;
if( nValue > mnStatMaxValue )
nValue = mnStatMaxValue;
if( mbStatusIndicator )
@@ -1027,7 +1027,7 @@ void ImplEscherExSdr::ImplWriteCurrentPage()
// -------------------------------------------------------------------
-UINT32 ImplEscherExSdr::ImplWriteTheShape( ImplEESdrObject& rObj )
+sal_uInt32 ImplEscherExSdr::ImplWriteTheShape( ImplEESdrObject& rObj )
{
DBG_ASSERT( mpSolverContainer, "ImplEscherExSdr::ImplWriteShape: no SolverContainer" );
return ImplWriteShape( rObj, *mpSolverContainer, NORMAL );
@@ -1052,7 +1052,7 @@ void EscherEx::AddUnoShapes( const Reference< XShapes >& rxShapes )
// -------------------------------------------------------------------
-UINT32 EscherEx::AddSdrObject( const SdrObject& rObj )
+sal_uInt32 EscherEx::AddSdrObject( const SdrObject& rObj )
{
ImplEESdrObject aObj( *mpImplEscherExSdr, rObj );
if( aObj.IsValid() )
@@ -1077,23 +1077,23 @@ EscherExHostAppData* EscherEx::StartShape( const Reference< XShape >& /* rShape
// -------------------------------------------------------------------
-void EscherEx::EndShape( UINT16 /* nShapeType */, UINT32 /* nShapeID */ )
+void EscherEx::EndShape( sal_uInt16 /* nShapeType */, sal_uInt32 /* nShapeID */ )
{
}
// -------------------------------------------------------------------
-UINT32 EscherEx::QueryTextID( const Reference< XShape >&, UINT32 )
+sal_uInt32 EscherEx::QueryTextID( const Reference< XShape >&, sal_uInt32 )
{
return 0;
}
// -------------------------------------------------------------------
// add an dummy rectangle shape into the escher stream
-UINT32 EscherEx::AddDummyShape()
+sal_uInt32 EscherEx::AddDummyShape()
{
OpenContainer( ESCHER_SpContainer );
- UINT32 nShapeID = GenerateShapeId();
+ sal_uInt32 nShapeID = GenerateShapeId();
AddShape( ESCHER_ShpInst_Rectangle, 0xa00, nShapeID );
//?? aSolverContainer.AddShape( mXShape, nShapeID );
CloseContainer();
@@ -1125,9 +1125,9 @@ ImplEESdrObject::ImplEESdrObject( ImplEscherExSdr& rEx,
mnShapeId( 0 ),
mnTextSize( 0 ),
mnAngle( 0 ),
- mbValid( FALSE ),
- mbPresObj( FALSE ),
- mbEmptyPresObj( FALSE )
+ mbValid( sal_False ),
+ mbPresObj( sal_False ),
+ mbEmptyPresObj( sal_False )
{
SdrPage* pPage = rObj.GetPage();
DBG_ASSERT( pPage, "ImplEESdrObject::ImplEESdrObject: no SdrPage" );
@@ -1146,9 +1146,9 @@ ImplEESdrObject::ImplEESdrObject( ImplEESdrWriter& rEx,
mnShapeId( 0 ),
mnTextSize( 0 ),
mnAngle( 0 ),
- mbValid( FALSE ),
- mbPresObj( FALSE ),
- mbEmptyPresObj( FALSE )
+ mbValid( sal_False ),
+ mbPresObj( sal_False ),
+ mbEmptyPresObj( sal_False )
{
Init( rEx );
}
@@ -1181,46 +1181,46 @@ void ImplEESdrObject::Init( ImplEESdrWriter& rEx )
if( mbPresObj && ImplGetPropertyValue( sEmptyPresStr ) )
mbEmptyPresObj = ::cppu::any2bool( mAny );
- mbValid = TRUE;
+ mbValid = sal_True;
}
}
-//BOOL ImplEESdrObject::ImplGetPropertyValue( const OUString& rString )
-BOOL ImplEESdrObject::ImplGetPropertyValue( const sal_Unicode* rString )
+//sal_Bool ImplEESdrObject::ImplGetPropertyValue( const OUString& rString )
+sal_Bool ImplEESdrObject::ImplGetPropertyValue( const sal_Unicode* rString )
{
- BOOL bRetValue = FALSE;
+ sal_Bool bRetValue = sal_False;
if( mbValid )
{
try
{
mAny = mXPropSet->getPropertyValue( rString );
if( mAny.hasValue() )
- bRetValue = TRUE;
+ bRetValue = sal_True;
}
catch( ::com::sun::star::uno::Exception& )
{
- bRetValue = FALSE;
+ bRetValue = sal_False;
}
}
return bRetValue;
}
#ifdef USED
-BOOL ImplEESdrObject::ImplGetPropertyValue( const Reference< XPropertySet >& rXPropSet,
+sal_Bool ImplEESdrObject::ImplGetPropertyValue( const Reference< XPropertySet >& rXPropSet,
const OUString& rString )
{
- BOOL bRetValue = FALSE;
+ sal_Bool bRetValue = sal_False;
if( mbValid )
{
try
{
mAny = rXPropSet->getPropertyValue( rString );
if( 0 != mAny.get() )
- bRetValue = TRUE;
+ bRetValue = sal_True;
}
catch( ::com::sun::star::uno::Exception& )
{
- bRetValue = FALSE;
+ bRetValue = sal_False;
}
}
return bRetValue;
@@ -1238,7 +1238,7 @@ const SdrObject* ImplEESdrObject::GetSdrObject() const
}
// laedt und konvertiert text aus shape, ergebnis ist mnTextSize gespeichert
-UINT32 ImplEESdrObject::ImplGetText()
+sal_uInt32 ImplEESdrObject::ImplGetText()
{
Reference< XText > xXText( mXShape, UNO_QUERY );
mnTextSize = 0;
@@ -1247,7 +1247,7 @@ UINT32 ImplEESdrObject::ImplGetText()
return mnTextSize;
}
-BOOL ImplEESdrObject::ImplHasText() const
+sal_Bool ImplEESdrObject::ImplHasText() const
{
Reference< XText > xXText( mXShape, UNO_QUERY );
return xXText.is() && xXText->getString().getLength();
diff --git a/filter/source/msfilter/eschesdo.hxx b/filter/source/msfilter/eschesdo.hxx
index 754eb6f3a2c0..d203982b4736 100644
--- a/filter/source/msfilter/eschesdo.hxx
+++ b/filter/source/msfilter/eschesdo.hxx
@@ -45,12 +45,12 @@ class ImplEESdrObject
::com::sun::star::uno::Any mAny;
Rectangle maRect;
String mType;
- UINT32 mnShapeId;
- UINT32 mnTextSize;
- INT32 mnAngle;
- BOOL mbValid : 1;
- BOOL mbPresObj : 1;
- BOOL mbEmptyPresObj : 1;
+ sal_uInt32 mnShapeId;
+ sal_uInt32 mnTextSize;
+ sal_Int32 mnAngle;
+ sal_Bool mbValid : 1;
+ sal_Bool mbPresObj : 1;
+ sal_Bool mbEmptyPresObj : 1;
void Init( ImplEESdrWriter& rEx );
public:
@@ -60,10 +60,10 @@ public:
ImplEESdrObject( ImplEESdrWriter& rEx, const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& rShape );
~ImplEESdrObject();
- BOOL ImplGetPropertyValue( const sal_Unicode* pString );
+ sal_Bool ImplGetPropertyValue( const sal_Unicode* pString );
- INT32 ImplGetInt32PropertyValue( const sal_Unicode* pStr, UINT32 nDef = 0 )
- { return ImplGetPropertyValue( pStr ) ? *(INT32*)mAny.getValue() : nDef; }
+ sal_Int32 ImplGetInt32PropertyValue( const sal_Unicode* pStr, sal_uInt32 nDef = 0 )
+ { return ImplGetPropertyValue( pStr ) ? *(sal_Int32*)mAny.getValue() : nDef; }
const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& GetShapeRef() const { return mXShape; }
const ::com::sun::star::uno::Any& GetUsrAny() const { return mAny; }
@@ -75,21 +75,21 @@ public:
void SetRect( const Rectangle& rRect )
{ maRect = rRect; }
- INT32 GetAngle() const { return mnAngle; }
- void SetAngle( INT32 nVal ) { mnAngle = nVal; }
+ sal_Int32 GetAngle() const { return mnAngle; }
+ void SetAngle( sal_Int32 nVal ) { mnAngle = nVal; }
- UINT32 GetTextSize() const { return mnTextSize; }
+ sal_uInt32 GetTextSize() const { return mnTextSize; }
- BOOL IsValid() const { return mbValid; }
- BOOL IsPresObj() const { return mbPresObj; }
- BOOL IsEmptyPresObj() const { return mbEmptyPresObj; }
- UINT32 GetShapeId() const { return mnShapeId; }
- void SetShapeId( UINT32 nVal ) { mnShapeId = nVal; }
+ sal_Bool IsValid() const { return mbValid; }
+ sal_Bool IsPresObj() const { return mbPresObj; }
+ sal_Bool IsEmptyPresObj() const { return mbEmptyPresObj; }
+ sal_uInt32 GetShapeId() const { return mnShapeId; }
+ void SetShapeId( sal_uInt32 nVal ) { mnShapeId = nVal; }
const SdrObject* GetSdrObject() const;
- UINT32 ImplGetText();
- BOOL ImplHasText() const;
+ sal_uInt32 ImplGetText();
+ sal_Bool ImplHasText() const;
};
@@ -127,43 +127,43 @@ protected:
EscherExHostAppData* mpHostAppData;
- UINT32 mnPagesWritten;
+ sal_uInt32 mnPagesWritten;
- UINT32 mnShapeMasterTitle;
- UINT32 mnShapeMasterBody;
+ sal_uInt32 mnShapeMasterTitle;
+ sal_uInt32 mnShapeMasterBody;
// per page values
- UINT32 mnIndices;
- UINT32 mnOutlinerCount;
- UINT32 mnPrevTextStyle;
- UINT32 mnStatMaxValue;
+ sal_uInt32 mnIndices;
+ sal_uInt32 mnOutlinerCount;
+ sal_uInt32 mnPrevTextStyle;
+ sal_uInt32 mnStatMaxValue;
- UINT16 mnEffectCount;
+ sal_uInt16 mnEffectCount;
- BOOL mbIsTitlePossible;
- BOOL mbStatusIndicator;
- BOOL mbStatus;
+ sal_Bool mbIsTitlePossible;
+ sal_Bool mbStatusIndicator;
+ sal_Bool mbStatus;
ImplEESdrWriter( EscherEx& rEx );
- BOOL ImplInitPageValues();
+ sal_Bool ImplInitPageValues();
void ImplWritePage(
EscherSolverContainer& rSolver,
ImplEESdrPageType ePageType,
- BOOL bBackGround = FALSE );
+ sal_Bool bBackGround = sal_False );
- UINT32 ImplWriteShape( ImplEESdrObject& rObj,
+ sal_uInt32 ImplWriteShape( ImplEESdrObject& rObj,
EscherSolverContainer& rSolver,
ImplEESdrPageType ePageType ); // returns ShapeID
void ImplFlipBoundingBox( ImplEESdrObject& rObj, EscherPropertyContainer& rPropOpt );
- BOOL ImplGetText( ImplEESdrObject& rObj );
+ sal_Bool ImplGetText( ImplEESdrObject& rObj );
void ImplWriteAdditionalText(
ImplEESdrObject& rObj,
const Point& rTextRefPoint );
- UINT32 ImplEnterAdditionalTextGroup(
+ sal_uInt32 ImplEnterAdditionalTextGroup(
const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& rShape,
const Rectangle* pBoundRect = NULL );
@@ -195,7 +195,7 @@ public:
bool ImplInitUnoShapes( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& rxShapes );
void ImplWriteCurrentPage();
- UINT32 ImplWriteTheShape( ImplEESdrObject& rObj );
+ sal_uInt32 ImplWriteTheShape( ImplEESdrObject& rObj );
void ImplExitPage();
void ImplFlushSolverContainer();
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 29874b933d85..8bf056e9dddd 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -158,10 +158,10 @@ static sal_uInt32 nMSOleObjCntr = 0;
/*************************************************************************/
-BOOL Impl_OlePres::Read( SvStream & rStm )
+sal_Bool Impl_OlePres::Read( SvStream & rStm )
{
- ULONG nBeginPos = rStm.Tell();
- INT32 n;
+ sal_uLong nBeginPos = rStm.Tell();
+ sal_Int32 n;
rStm >> n;
if( n != -1 )
{
@@ -182,7 +182,7 @@ BOOL Impl_OlePres::Read( SvStream & rStm )
aMMSrc = pBmp->GetPrefMapMode();
MapMode aMMDst( MAP_100TH_MM );
aSize = OutputDevice::LogicToLogic( aSize, aMMSrc, aMMDst );
- return TRUE;
+ return sal_True;
}
else
{
@@ -199,7 +199,7 @@ BOOL Impl_OlePres::Read( SvStream & rStm )
MapMode aMMSrc = pMtf->GetPrefMapMode();
MapMode aMMDst( MAP_100TH_MM );
aSize = OutputDevice::LogicToLogic( aSize, aMMSrc, aMMDst );
- return TRUE;
+ return sal_True;
}
else
{
@@ -222,25 +222,25 @@ BOOL Impl_OlePres::Read( SvStream & rStm )
nJobLen -= 4;
if( nJobLen )
{
- pJob = new BYTE[ nJobLen ];
+ pJob = new sal_uInt8[ nJobLen ];
rStm.Read( pJob, nJobLen );
}
}
else
{
rStm.SetError( SVSTREAM_GENERALERROR );
- return FALSE;
+ return sal_False;
}
- UINT32 nAsp;
+ sal_uInt32 nAsp;
rStm >> nAsp;
- USHORT nSvAsp = USHORT( nAsp );
+ sal_uInt16 nSvAsp = sal_uInt16( nAsp );
SetAspect( nSvAsp );
rStm.SeekRel( 4 ); //L-Index ueberlesen
rStm >> nAdvFlags;
rStm.SeekRel( 4 ); //Compression
- UINT32 nWidth = 0;
- UINT32 nHeight = 0;
- UINT32 nSize = 0;
+ sal_uInt32 nWidth = 0;
+ sal_uInt32 nHeight = 0;
+ sal_uInt32 nSize = 0;
rStm >> nWidth >> nHeight >> nSize;
aSize.Width() = nWidth;
aSize.Height() = nHeight;
@@ -257,29 +257,29 @@ BOOL Impl_OlePres::Read( SvStream & rStm )
}
else
{
- BYTE * p = new BYTE[ nSize ];
+ sal_uInt8 * p = new sal_uInt8[ nSize ];
rStm.Read( p, nSize );
delete [] p;
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
/************************************************************************/
void Impl_OlePres::Write( SvStream & rStm )
{
WriteClipboardFormat( rStm, FORMAT_GDIMETAFILE );
- rStm << (INT32)(nJobLen +4); // immer leeres TargetDevice
+ rStm << (sal_Int32)(nJobLen +4); // immer leeres TargetDevice
if( nJobLen )
rStm.Write( pJob, nJobLen );
- rStm << (UINT32)nAspect;
- rStm << (INT32)-1; //L-Index immer -1
- rStm << (INT32)nAdvFlags;
- rStm << (INT32)0; //Compression
- rStm << (INT32)aSize.Width();
- rStm << (INT32)aSize.Height();
- ULONG nPos = rStm.Tell();
- rStm << (INT32)0;
+ rStm << (sal_uInt32)nAspect;
+ rStm << (sal_Int32)-1; //L-Index immer -1
+ rStm << (sal_Int32)nAdvFlags;
+ rStm << (sal_Int32)0; //Compression
+ rStm << (sal_Int32)aSize.Width();
+ rStm << (sal_Int32)aSize.Height();
+ sal_uLong nPos = rStm.Tell();
+ rStm << (sal_Int32)0;
if( GetFormat() == FORMAT_GDIMETAFILE && pMtf )
{
@@ -309,9 +309,9 @@ void Impl_OlePres::Write( SvStream & rStm )
{
DBG_ERROR( "unknown format" );
}
- ULONG nEndPos = rStm.Tell();
+ sal_uLong nEndPos = rStm.Tell();
rStm.Seek( nPos );
- rStm << (UINT32)(nEndPos - nPos - 4);
+ rStm << (sal_uInt32)(nEndPos - nPos - 4);
rStm.Seek( nEndPos );
}
@@ -335,7 +335,7 @@ Impl_OlePres * CreateCache_Impl( SotStorage * pStor )
return NULL;
- for( USHORT i = 1; i < 10; i++ )
+ for( sal_uInt16 i = 1; i < 10; i++ )
{
SotStorageStreamRef xStm = xOleObjStor->OpenSotStream( aStreamName,
STREAM_READ | STREAM_NOCREATE );
@@ -365,10 +365,10 @@ Impl_OlePres * CreateCache_Impl( SotStorage * pStor )
SvStream& operator>>( SvStream& rIn, DffRecordHeader& rRec )
{
rRec.nFilePos = rIn.Tell();
- UINT16 nTmp(0);
+ sal_uInt16 nTmp(0);
rIn >> nTmp;
rRec.nImpVerInst = nTmp;
- rRec.nRecVer = sal::static_int_cast< BYTE >(nTmp & 0x000F);
+ rRec.nRecVer = sal::static_int_cast< sal_uInt8 >(nTmp & 0x000F);
rRec.nRecInstance = nTmp >> 4;
rIn >> rRec.nRecType;
rIn >> rRec.nRecLen;
@@ -389,12 +389,12 @@ SvStream& operator>>( SvStream& rIn, DffPropSet& rRec )
DffRecordHeader aHd;
rIn >> aHd;
- UINT32 nPropCount = aHd.nRecInstance;
+ sal_uInt32 nPropCount = aHd.nRecInstance;
// FilePos der ComplexData merken
- UINT32 nComplexDataFilePos = rIn.Tell() + ( nPropCount * 6 );
+ sal_uInt32 nComplexDataFilePos = rIn.Tell() + ( nPropCount * 6 );
- for( UINT32 nPropNum = 0; nPropNum < nPropCount; nPropNum++ )
+ for( sal_uInt32 nPropNum = 0; nPropNum < nPropCount; nPropNum++ )
{
sal_uInt16 nTmp;
sal_uInt32 nRecType, nContent, nContentEx = 0xffff0000;
@@ -577,17 +577,17 @@ void DffPropSet::Merge( DffPropSet& rMaster ) const
{
for ( void* pDummy = rMaster.First(); pDummy; pDummy = rMaster.Next() )
{
- UINT32 nRecType = rMaster.GetCurKey();
+ sal_uInt32 nRecType = rMaster.GetCurKey();
if ( ( nRecType & 0x3f ) == 0x3f ) // this is something called FLAGS
{
- UINT32 nCurrentFlags = mpContents[ nRecType ];
- UINT32 nMergeFlags = rMaster.mpContents[ nRecType ];
+ sal_uInt32 nCurrentFlags = mpContents[ nRecType ];
+ sal_uInt32 nMergeFlags = rMaster.mpContents[ nRecType ];
nMergeFlags &= ( nMergeFlags >> 16 ) | 0xffff0000; // clearing low word
nMergeFlags &= ( ( nCurrentFlags & 0xffff0000 ) // remove allready hard set
| ( nCurrentFlags >> 16 ) ) ^ 0xffffffff; // attributes from mergeflags
nCurrentFlags &= ( ( nMergeFlags & 0xffff0000 ) // apply zero master bits
| ( nMergeFlags >> 16 ) ) ^ 0xffffffff;
- nCurrentFlags |= (UINT16)nMergeFlags; // apply filled master bits
+ nCurrentFlags |= (sal_uInt16)nMergeFlags; // apply filled master bits
( (DffPropSet*) this )->mpContents[ nRecType ] = nCurrentFlags;
@@ -602,7 +602,7 @@ void DffPropSet::Merge( DffPropSet& rMaster ) const
{
( (DffPropSet*) this )->mpContents[ nRecType ] = rMaster.mpContents[ nRecType ];
DffPropFlags nFlags( rMaster.mpFlags[ nRecType ] );
- nFlags.bSoftAttr = TRUE;
+ nFlags.bSoftAttr = sal_True;
( (DffPropSet*) this )->mpFlags[ nRecType ] = nFlags;
( (DffPropSet*) this )->Insert( nRecType, pDummy );
}
@@ -610,9 +610,9 @@ void DffPropSet::Merge( DffPropSet& rMaster ) const
}
}
-BOOL DffPropSet::IsHardAttribute( UINT32 nId ) const
+sal_Bool DffPropSet::IsHardAttribute( sal_uInt32 nId ) const
{
- BOOL bRetValue = TRUE;
+ sal_Bool bRetValue = sal_True;
nId &= 0x3ff;
if ( ( nId & 0x3f ) >= 48 ) // is this a flag id
{
@@ -627,22 +627,22 @@ BOOL DffPropSet::IsHardAttribute( UINT32 nId ) const
return bRetValue;
};
-UINT32 DffPropSet::GetPropertyValue( UINT32 nId, UINT32 nDefault ) const
+sal_uInt32 DffPropSet::GetPropertyValue( sal_uInt32 nId, sal_uInt32 nDefault ) const
{
nId &= 0x3ff;
return ( mpFlags[ nId ].bSet ) ? mpContents[ nId ] : nDefault;
};
-bool DffPropSet::GetPropertyBool( UINT32 nId, bool bDefault ) const
+bool DffPropSet::GetPropertyBool( sal_uInt32 nId, bool bDefault ) const
{
- UINT32 nBaseId = nId | 31; // base ID to get the UINT32 property value
- UINT32 nMask = 1 << (nBaseId - nId); // bit mask of the boolean property
+ sal_uInt32 nBaseId = nId | 31; // base ID to get the sal_uInt32 property value
+ sal_uInt32 nMask = 1 << (nBaseId - nId); // bit mask of the boolean property
- UINT32 nPropValue = GetPropertyValue( nBaseId, bDefault ? nMask : 0 );
+ sal_uInt32 nPropValue = GetPropertyValue( nBaseId, bDefault ? nMask : 0 );
return (nPropValue & nMask) != 0;
}
-::rtl::OUString DffPropSet::GetPropertyString( UINT32 nId, SvStream& rStrm ) const
+::rtl::OUString DffPropSet::GetPropertyString( sal_uInt32 nId, SvStream& rStrm ) const
{
sal_Size nOldPos = rStrm.Tell();
::rtl::OUStringBuffer aBuffer;
@@ -665,17 +665,17 @@ bool DffPropSet::GetPropertyBool( UINT32 nId, bool bDefault ) const
return aBuffer.makeStringAndClear();
}
-void DffPropSet::SetPropertyValue( UINT32 nId, UINT32 nValue ) const
+void DffPropSet::SetPropertyValue( sal_uInt32 nId, sal_uInt32 nValue ) const
{
if ( !mpFlags[ nId ].bSet )
{
( (DffPropSet*) this )->Insert( nId, (void*)nValue );
- ( (DffPropSet*) this )->mpFlags[ nId ].bSet = TRUE;
+ ( (DffPropSet*) this )->mpFlags[ nId ].bSet = sal_True;
}
( (DffPropSet*) this )->mpContents[ nId ] = nValue;
};
-BOOL DffPropSet::SeekToContent( UINT32 nRecType, SvStream& rStrm ) const
+sal_Bool DffPropSet::SeekToContent( sal_uInt32 nRecType, SvStream& rStrm ) const
{
nRecType &= 0x3ff;
if ( mpFlags[ nRecType ].bSet )
@@ -688,12 +688,12 @@ BOOL DffPropSet::SeekToContent( UINT32 nRecType, SvStream& rStrm ) const
if ( nOffset && ( ( nOffset & 0xffff0000 ) != 0xffff0000 ) )
{
rStrm.Seek( nOffset );
- return TRUE;
+ return sal_True;
}
}
}
}
- return FALSE;
+ return sal_False;
}
DffPropertyReader::DffPropertyReader( const SvxMSDffManager& rMan ) :
@@ -703,10 +703,10 @@ DffPropertyReader::DffPropertyReader( const SvxMSDffManager& rMan ) :
InitializePropSet();
}
-void DffPropertyReader::SetDefaultPropSet( SvStream& rStCtrl, UINT32 nOffsDgg ) const
+void DffPropertyReader::SetDefaultPropSet( SvStream& rStCtrl, sal_uInt32 nOffsDgg ) const
{
delete pDefaultPropSet;
- UINT32 nMerk = rStCtrl.Tell();
+ sal_uInt32 nMerk = rStCtrl.Tell();
rStCtrl.Seek( nOffsDgg );
DffRecordHeader aRecHd;
rStCtrl >> aRecHd;
@@ -722,12 +722,12 @@ void DffPropertyReader::SetDefaultPropSet( SvStream& rStCtrl, UINT32 nOffsDgg )
}
#ifdef DBG_CUSTOMSHAPE
-void DffPropertyReader::ReadPropSet( SvStream& rIn, void* pClientData, UINT32 nShapeId ) const
+void DffPropertyReader::ReadPropSet( SvStream& rIn, void* pClientData, sal_uInt32 nShapeId ) const
#else
void DffPropertyReader::ReadPropSet( SvStream& rIn, void* pClientData ) const
#endif
{
- ULONG nFilePos = rIn.Tell();
+ sal_uLong nFilePos = rIn.Tell();
rIn >> (DffPropertyReader&)*this;
if ( IsProperty( DFF_Prop_hspMaster ) )
@@ -788,7 +788,7 @@ void DffPropertyReader::ReadPropSet( SvStream& rIn, void* pClientData ) const
{
if ( SeekToContent( i, rIn ) )
{
- INT32 nLen = (INT32)GetPropertyValue( i );
+ sal_Int32 nLen = (sal_Int32)GetPropertyValue( i );
if ( nLen )
{
pOut->WriteLine( "" );
@@ -797,7 +797,7 @@ void DffPropertyReader::ReadPropSet( SvStream& rIn, void* pClientData ) const
aDesc.Append( ByteString( " Size:" ) );
aDesc.Append( ByteString::CreateFromInt32( nLen ) );
pOut->WriteLine( aDesc );
- INT16 nNumElem, nNumElemMem, nNumSize;
+ sal_Int16 nNumElem, nNumElemMem, nNumSize;
rIn >> nNumElem >> nNumElemMem >> nNumSize;
aDesc = ByteString( "Entries: " );
aDesc.Append( ByteString::CreateFromInt32( nNumElem ) );
@@ -812,23 +812,23 @@ void DffPropertyReader::ReadPropSet( SvStream& rIn, void* pClientData ) const
while ( nLen > 0 )
{
ByteString aString;
- for ( UINT32 j = 0; nLen && ( j < ( nNumSize >> 1 ) ); j++ )
+ for ( sal_uInt32 j = 0; nLen && ( j < ( nNumSize >> 1 ) ); j++ )
{
- for ( UINT32 k = 0; k < 2; k++ )
+ for ( sal_uInt32 k = 0; k < 2; k++ )
{
if ( nLen )
{
- BYTE nVal;
+ sal_uInt8 nVal;
rIn >> nVal;
if ( ( nVal >> 4 ) > 9 )
- *pOut << (BYTE)( ( nVal >> 4 ) + 'A' - 10 );
+ *pOut << (sal_uInt8)( ( nVal >> 4 ) + 'A' - 10 );
else
- *pOut << (BYTE)( ( nVal >> 4 ) + '0' );
+ *pOut << (sal_uInt8)( ( nVal >> 4 ) + '0' );
if ( ( nVal & 0xf ) > 9 )
- *pOut << (BYTE)( ( nVal & 0xf ) + 'A' - 10 );
+ *pOut << (sal_uInt8)( ( nVal & 0xf ) + 'A' - 10 );
else
- *pOut << (BYTE)( ( nVal & 0xf ) + '0' );
+ *pOut << (sal_uInt8)( ( nVal & 0xf ) + '0' );
nLen--;
}
@@ -860,12 +860,12 @@ void DffPropertyReader::ReadPropSet( SvStream& rIn, void* pClientData ) const
}
-INT32 DffPropertyReader::Fix16ToAngle( INT32 nContent ) const
+sal_Int32 DffPropertyReader::Fix16ToAngle( sal_Int32 nContent ) const
{
- INT32 nAngle = 0;
+ sal_Int32 nAngle = 0;
if ( nContent )
{
- nAngle = ( (INT16)( nContent >> 16) * 100L ) + ( ( ( nContent & 0x0000ffff) * 100L ) >> 16 );
+ nAngle = ( (sal_Int16)( nContent >> 16) * 100L ) + ( ( ( nContent & 0x0000ffff) * 100L ) >> 16 );
nAngle = NormAngle360( -nAngle );
}
return nAngle;
@@ -1393,7 +1393,7 @@ static basegfx::B2DPolygon GetLineArrow( const sal_Int32 nLineWidth, const MSO_L
void DffPropertyReader::ApplyLineAttributes( SfxItemSet& rSet, const MSO_SPT eShapeType ) const // #i28269#
{
- UINT32 nLineFlags(GetPropertyValue( DFF_Prop_fNoLineDrawDash ));
+ sal_uInt32 nLineFlags(GetPropertyValue( DFF_Prop_fNoLineDrawDash ));
if(!IsHardAttribute( DFF_Prop_fLine ) && !IsCustomShapeStrokedByDefault( eShapeType ))
{
@@ -1403,7 +1403,7 @@ void DffPropertyReader::ApplyLineAttributes( SfxItemSet& rSet, const MSO_SPT eSh
if ( nLineFlags & 8 )
{
// Linienattribute
- sal_Int32 nLineWidth = (INT32)GetPropertyValue( DFF_Prop_lineWidth, 9525 );
+ sal_Int32 nLineWidth = (sal_Int32)GetPropertyValue( DFF_Prop_lineWidth, 9525 );
MSO_LineDashing eLineDashing = (MSO_LineDashing)GetPropertyValue( DFF_Prop_lineDashing, mso_lineSolid );
if ( eLineDashing == mso_lineSolid )
@@ -1538,7 +1538,7 @@ void DffPropertyReader::ApplyLineAttributes( SfxItemSet& rSet, const MSO_SPT eSh
{
MSO_LineCap eLineCap = (MSO_LineCap)GetPropertyValue( DFF_Prop_lineEndCapStyle );
const SfxPoolItem* pPoolItem = NULL;
- if ( rSet.GetItemState( XATTR_LINEDASH, FALSE, &pPoolItem ) == SFX_ITEM_SET )
+ if ( rSet.GetItemState( XATTR_LINEDASH, sal_False, &pPoolItem ) == SFX_ITEM_SET )
{
XDashStyle eNewStyle = XDASH_RECT;
if ( eLineCap == mso_lineEndCapRound )
@@ -1751,7 +1751,7 @@ void ApplyRectangularGradientAsBitmap( const SvxMSDffManager& rManager, SvStream
if ( nFix16Angle )
{
- sal_Bool bRotateWithShape = sal_True; // TRUE seems to be default
+ sal_Bool bRotateWithShape = sal_True; // sal_True seems to be default
sal_uInt32 nPos = rIn.Tell();
if ( const_cast< SvxMSDffManager& >( rManager ).maShapeRecords.SeekToContent( rIn, DFF_msofbtUDefProp, SEEK_FROM_CURRENT_AND_RESTART ) )
{
@@ -1766,7 +1766,7 @@ void ApplyRectangularGradientAsBitmap( const SvxMSDffManager& rManager, SvStream
{
aBitmap.Rotate( nFix16Angle / 10, rShadeColors[ 0 ].aColor );
- ULONG nMirrorFlags = BMP_MIRROR_NONE;
+ sal_uLong nMirrorFlags = BMP_MIRROR_NONE;
if ( rObjData.nSpFlags & SP_FFLIPV )
nMirrorFlags |= BMP_MIRROR_VERT;
if ( rObjData.nSpFlags & SP_FFLIPH )
@@ -1785,7 +1785,7 @@ void ApplyRectangularGradientAsBitmap( const SvxMSDffManager& rManager, SvStream
void DffPropertyReader::ApplyFillAttributes( SvStream& rIn, SfxItemSet& rSet, const DffObjData& rObjData ) const
{
- UINT32 nFillFlags(GetPropertyValue( DFF_Prop_fNoFillHitTest ));
+ sal_uInt32 nFillFlags(GetPropertyValue( DFF_Prop_fNoFillHitTest ));
std::vector< ShadeColor > aShadeColors;
GetShadeColors( rManager, *this, rIn, aShadeColors );
@@ -1864,8 +1864,8 @@ void DffPropertyReader::ApplyFillAttributes( SvStream& rIn, SfxItemSet& rSet, co
eGrad = XGRAD_AXIAL; // Besser gehts leider nicht
}
- USHORT nFocusX = (USHORT)nFocus;
- USHORT nFocusY = (USHORT)nFocus;
+ sal_uInt16 nFocusX = (sal_uInt16)nFocus;
+ sal_uInt16 nFocusY = (sal_uInt16)nFocus;
switch( eMSO_FillType )
{
@@ -1906,7 +1906,7 @@ void DffPropertyReader::ApplyFillAttributes( SvStream& rIn, SfxItemSet& rSet, co
{
Graphic aGraf;
// first try to get BLIP from cache
- BOOL bOK = rManager.GetBLIP( GetPropertyValue( DFF_Prop_fillBlip ), aGraf, NULL );
+ sal_Bool bOK = rManager.GetBLIP( GetPropertyValue( DFF_Prop_fillBlip ), aGraf, NULL );
// then try directly from stream (i.e. Excel chart hatches/bitmaps)
if ( !bOK )
bOK = SeekToContent( DFF_Prop_fillBlip, rIn ) && rManager.GetBLIPDirect( rIn, aGraf, NULL );
@@ -2436,7 +2436,7 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
{
const rtl::OUString sExtrusionSkew( RTL_CONSTASCII_USTRINGPARAM ( "Skew" ) );
double fSkewAmount = (sal_Int32)GetPropertyValue( DFF_Prop_c3DSkewAmount, 50 );
- double fSkewAngle = (double)((sal_Int32)GetPropertyValue( DFF_Prop_c3DSkewAngle, sal::static_int_cast< UINT32 >(-135 * 65536) )) / 65536.0;
+ double fSkewAngle = (double)((sal_Int32)GetPropertyValue( DFF_Prop_c3DSkewAngle, sal::static_int_cast< sal_uInt32 >(-135 * 65536) )) / 65536.0;
EnhancedCustomShapeParameterPair aSkewPair;
aSkewPair.First.Value <<= fSkewAmount;
@@ -3180,8 +3180,8 @@ void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, const
for ( void* pDummy = ((DffPropertyReader*)this)->First(); pDummy; pDummy = ((DffPropertyReader*)this)->Next() )
{
- UINT32 nRecType = GetCurKey();
- UINT32 nContent = mpContents[ nRecType ];
+ sal_uInt32 nRecType = GetCurKey();
+ sal_uInt32 nContent = mpContents[ nRecType ];
switch ( nRecType )
{
case DFF_Prop_gtextSize :
@@ -3233,7 +3233,7 @@ void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, const
break;
case DFF_Prop_shadowOffsetX :
{
- INT32 nVal = (INT32)nContent;
+ sal_Int32 nVal = (sal_Int32)nContent;
rManager.ScaleEmu( nVal );
if ( nVal )
rSet.Put( SdrShadowXDistItem( nVal ) );
@@ -3241,7 +3241,7 @@ void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, const
break;
case DFF_Prop_shadowOffsetY :
{
- INT32 nVal = (INT32)nContent;
+ sal_Int32 nVal = (sal_Int32)nContent;
rManager.ScaleEmu( nVal );
if ( nVal )
rSet.Put( SdrShadowYDistItem( nVal ) );
@@ -3267,10 +3267,10 @@ void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, const
// #160376# sj: activating shadow only if fill and or linestyle is used
// this is required because of the latest drawing layer core changes.
// Issue i104085 is related to this.
- UINT32 nLineFlags(GetPropertyValue( DFF_Prop_fNoLineDrawDash ));
+ sal_uInt32 nLineFlags(GetPropertyValue( DFF_Prop_fNoLineDrawDash ));
if(!IsHardAttribute( DFF_Prop_fLine ) && !IsCustomShapeStrokedByDefault( rObjData.eShapeType ))
nLineFlags &= ~0x08;
- UINT32 nFillFlags(GetPropertyValue( DFF_Prop_fNoFillHitTest ));
+ sal_uInt32 nFillFlags(GetPropertyValue( DFF_Prop_fNoFillHitTest ));
if(!IsHardAttribute( DFF_Prop_fFilled ) && !IsCustomShapeFilledByDefault( rObjData.eShapeType ))
nFillFlags &= ~0x10;
if ( nFillFlags & 0x10 )
@@ -3346,11 +3346,11 @@ DffRecordManager::~DffRecordManager()
};
-void DffRecordManager::Consume( SvStream& rIn, BOOL bAppend, UINT32 nStOfs )
+void DffRecordManager::Consume( SvStream& rIn, sal_Bool bAppend, sal_uInt32 nStOfs )
{
if ( !bAppend )
Clear();
- UINT32 nOldPos = rIn.Tell();
+ sal_uInt32 nOldPos = rIn.Tell();
if ( !nStOfs )
{
DffRecordHeader aHd;
@@ -3405,7 +3405,7 @@ DffRecordHeader* DffRecordManager::First()
DffRecordHeader* DffRecordManager::Next()
{
DffRecordHeader* pRet = NULL;
- UINT32 nC = pCList->nCurrent + 1;
+ sal_uInt32 nC = pCList->nCurrent + 1;
if ( nC < pCList->nCount )
{
pCList->nCurrent++;
@@ -3423,7 +3423,7 @@ DffRecordHeader* DffRecordManager::Next()
DffRecordHeader* DffRecordManager::Prev()
{
DffRecordHeader* pRet = NULL;
- UINT32 nCur = pCList->nCurrent;
+ sal_uInt32 nCur = pCList->nCurrent;
if ( !nCur && pCList->pPrev )
{
pCList = pCList->pPrev;
@@ -3442,7 +3442,7 @@ DffRecordHeader* DffRecordManager::Last()
DffRecordHeader* pRet = NULL;
while ( pCList->pNext )
pCList = pCList->pNext;
- UINT32 nCnt = pCList->nCount;
+ sal_uInt32 nCnt = pCList->nCount;
if ( nCnt-- )
{
pCList->nCurrent = nCnt;
@@ -3451,21 +3451,21 @@ DffRecordHeader* DffRecordManager::Last()
return pRet;
}
-BOOL DffRecordManager::SeekToContent( SvStream& rIn, UINT16 nRecId, DffSeekToContentMode eMode )
+sal_Bool DffRecordManager::SeekToContent( SvStream& rIn, sal_uInt16 nRecId, DffSeekToContentMode eMode )
{
DffRecordHeader* pHd = GetRecordHeader( nRecId, eMode );
if ( pHd )
{
pHd->SeekToContent( rIn );
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
-DffRecordHeader* DffRecordManager::GetRecordHeader( UINT16 nRecId, DffSeekToContentMode eMode )
+DffRecordHeader* DffRecordManager::GetRecordHeader( sal_uInt16 nRecId, DffSeekToContentMode eMode )
{
- UINT32 nOldCurrent = pCList->nCurrent;
+ sal_uInt32 nOldCurrent = pCList->nCurrent;
DffRecordList* pOldList = pCList;
DffRecordHeader* pHd;
@@ -3560,8 +3560,8 @@ void SvxMSDffManager::Scale( Polygon& rPoly ) const
{
if ( !bNeedMap )
return;
- USHORT nPointAnz = rPoly.GetSize();
- for ( USHORT nPointNum = 0; nPointNum < nPointAnz; nPointNum++ )
+ sal_uInt16 nPointAnz = rPoly.GetSize();
+ for ( sal_uInt16 nPointNum = 0; nPointNum < nPointAnz; nPointNum++ )
Scale( rPoly[ nPointNum ] );
}
@@ -3569,8 +3569,8 @@ void SvxMSDffManager::Scale( PolyPolygon& rPoly ) const
{
if ( !bNeedMap )
return;
- USHORT nPolyAnz = rPoly.Count();
- for ( USHORT nPolyNum = 0; nPolyNum < nPolyAnz; nPolyNum++ )
+ sal_uInt16 nPolyAnz = rPoly.Count();
+ for ( sal_uInt16 nPolyNum = 0; nPolyNum < nPolyAnz; nPolyNum++ )
Scale( rPoly[ nPolyNum ] );
}
@@ -3579,7 +3579,7 @@ void SvxMSDffManager::ScaleEmu( sal_Int32& rVal ) const
rVal = BigMulDiv( rVal, nEmuMul, nEmuDiv );
}
-UINT32 SvxMSDffManager::ScalePt( UINT32 nVal ) const
+sal_uInt32 SvxMSDffManager::ScalePt( sal_uInt32 nVal ) const
{
MapUnit eMap = pSdrModel->GetScaleUnit();
Fraction aFact( GetMapFactor( MAP_POINT, eMap ).X() );
@@ -3589,7 +3589,7 @@ UINT32 SvxMSDffManager::ScalePt( UINT32 nVal ) const
return BigMulDiv( nVal, aFact.GetNumerator(), aFact.GetDenominator() );
}
-INT32 SvxMSDffManager::ScalePoint( INT32 nVal ) const
+sal_Int32 SvxMSDffManager::ScalePoint( sal_Int32 nVal ) const
{
return BigMulDiv( nVal, nPntMul, nPntDiv );
};
@@ -3632,17 +3632,17 @@ void SvxMSDffManager::SetModel(SdrModel* pModel, long nApplicationScale)
{
pModel = 0;
nMapMul = nMapDiv = nMapXOfs = nMapYOfs = nEmuMul = nEmuDiv = nPntMul = nPntDiv = 0;
- bNeedMap = FALSE;
+ bNeedMap = sal_False;
}
}
-BOOL SvxMSDffManager::SeekToShape( SvStream& rSt, void* /* pClientData */, UINT32 nId ) const
+sal_Bool SvxMSDffManager::SeekToShape( SvStream& rSt, void* /* pClientData */, sal_uInt32 nId ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if ( mpFidcls )
{
- UINT32 nMerk = rSt.Tell();
- UINT32 nShapeId, nSec = ( nId >> 10 ) - 1;
+ sal_uInt32 nMerk = rSt.Tell();
+ sal_uInt32 nShapeId, nSec = ( nId >> 10 ) - 1;
if ( nSec < mnIdClusters )
{
sal_IntPtr nOfs = (sal_IntPtr)maDgOffsetTable.Get( mpFidcls[ nSec ].dgid );
@@ -3651,7 +3651,7 @@ BOOL SvxMSDffManager::SeekToShape( SvStream& rSt, void* /* pClientData */, UINT3
rSt.Seek( nOfs );
DffRecordHeader aEscherF002Hd;
rSt >> aEscherF002Hd;
- ULONG nEscherF002End = aEscherF002Hd.GetRecEndFilePos();
+ sal_uLong nEscherF002End = aEscherF002Hd.GetRecEndFilePos();
DffRecordHeader aEscherObjListHd;
while ( rSt.Tell() < nEscherF002End )
{
@@ -3667,7 +3667,7 @@ BOOL SvxMSDffManager::SeekToShape( SvStream& rSt, void* /* pClientData */, UINT3
if ( nId == nShapeId )
{
aEscherObjListHd.SeekToBegOfRecord( rSt );
- bRet = TRUE;
+ bRet = sal_True;
break;
}
}
@@ -3682,10 +3682,10 @@ BOOL SvxMSDffManager::SeekToShape( SvStream& rSt, void* /* pClientData */, UINT3
return bRet;
}
-FASTBOOL SvxMSDffManager::SeekToRec( SvStream& rSt, USHORT nRecId, ULONG nMaxFilePos, DffRecordHeader* pRecHd, ULONG nSkipCount ) const
+FASTBOOL SvxMSDffManager::SeekToRec( SvStream& rSt, sal_uInt16 nRecId, sal_uLong nMaxFilePos, DffRecordHeader* pRecHd, sal_uLong nSkipCount ) const
{
- FASTBOOL bRet = FALSE;
- ULONG nFPosMerk = rSt.Tell(); // FilePos merken fuer ggf. spaetere Restauration
+ FASTBOOL bRet = sal_False;
+ sal_uLong nFPosMerk = rSt.Tell(); // FilePos merken fuer ggf. spaetere Restauration
DffRecordHeader aHd;
do
{
@@ -3696,7 +3696,7 @@ FASTBOOL SvxMSDffManager::SeekToRec( SvStream& rSt, USHORT nRecId, ULONG nMaxFil
nSkipCount--;
else
{
- bRet = TRUE;
+ bRet = sal_True;
if ( pRecHd != NULL )
*pRecHd = aHd;
else
@@ -3712,10 +3712,10 @@ FASTBOOL SvxMSDffManager::SeekToRec( SvStream& rSt, USHORT nRecId, ULONG nMaxFil
return bRet;
}
-FASTBOOL SvxMSDffManager::SeekToRec2( USHORT nRecId1, USHORT nRecId2, ULONG nMaxFilePos, DffRecordHeader* pRecHd, ULONG nSkipCount ) const
+FASTBOOL SvxMSDffManager::SeekToRec2( sal_uInt16 nRecId1, sal_uInt16 nRecId2, sal_uLong nMaxFilePos, DffRecordHeader* pRecHd, sal_uLong nSkipCount ) const
{
- FASTBOOL bRet = FALSE;
- ULONG nFPosMerk = rStCtrl.Tell(); // FilePos merken fuer ggf. spaetere Restauration
+ FASTBOOL bRet = sal_False;
+ sal_uLong nFPosMerk = rStCtrl.Tell(); // FilePos merken fuer ggf. spaetere Restauration
DffRecordHeader aHd;
do
{
@@ -3726,7 +3726,7 @@ FASTBOOL SvxMSDffManager::SeekToRec2( USHORT nRecId1, USHORT nRecId2, ULONG nMax
nSkipCount--;
else
{
- bRet = TRUE;
+ bRet = sal_True;
if ( pRecHd )
*pRecHd = aHd;
else
@@ -3743,12 +3743,12 @@ FASTBOOL SvxMSDffManager::SeekToRec2( USHORT nRecId1, USHORT nRecId2, ULONG nMax
}
-FASTBOOL SvxMSDffManager::GetColorFromPalette( USHORT /* nNum */, Color& rColor ) const
+FASTBOOL SvxMSDffManager::GetColorFromPalette( sal_uInt16 /* nNum */, Color& rColor ) const
{
// diese Methode ist in der zum Excel-Import
// abgeleiteten Klasse zu ueberschreiben...
rColor.SetColor( COL_WHITE );
- return TRUE;
+ return sal_True;
}
// sj: the documentation is not complete, especially in ppt the normal rgb for text
@@ -3815,12 +3815,12 @@ Color SvxMSDffManager::MSO_CLR_ToColor( sal_uInt32 nColorCode, sal_uInt16 nConte
{
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
-// UINT16 nParameter = (BYTE)( nColorCode >> 16); // SJ: nice compiler optimization bug on windows, though downcasting
- UINT16 nParameter = sal_uInt16(( nColorCode >> 16 ) & 0x00ff); // the HiByte of nParameter is not zero, an exclusive AND is helping :o
- UINT16 nFunctionBits = (UINT16)( ( nColorCode & 0x00000f00 ) >> 8 );
- UINT16 nAdditionalFlags = (UINT16)( ( nColorCode & 0x0000f000) >> 8 );
- UINT16 nColorIndex = sal_uInt16(nColorCode & 0x00ff);
- UINT32 nPropColor = 0;
+// sal_uInt16 nParameter = (sal_uInt8)( nColorCode >> 16); // SJ: nice compiler optimization bug on windows, though downcasting
+ sal_uInt16 nParameter = sal_uInt16(( nColorCode >> 16 ) & 0x00ff); // the HiByte of nParameter is not zero, an exclusive AND is helping :o
+ sal_uInt16 nFunctionBits = (sal_uInt16)( ( nColorCode & 0x00000f00 ) >> 8 );
+ sal_uInt16 nAdditionalFlags = (sal_uInt16)( ( nColorCode & 0x0000f000) >> 8 );
+ sal_uInt16 nColorIndex = sal_uInt16(nColorCode & 0x00ff);
+ sal_uInt32 nPropColor = 0;
sal_uInt16 nCProp = 0;
@@ -3915,66 +3915,66 @@ Color SvxMSDffManager::MSO_CLR_ToColor( sal_uInt32 nColorCode, sal_uInt16 nConte
if( nAdditionalFlags & 0x80 ) // make color gray
{
- UINT8 nZwi = aColor.GetLuminance();
+ sal_uInt8 nZwi = aColor.GetLuminance();
aColor = Color( nZwi, nZwi, nZwi );
}
switch( nFunctionBits )
{
case 0x01 : // darken color by parameter
{
- aColor.SetRed( sal::static_int_cast< UINT8 >( ( nParameter * aColor.GetRed() ) >> 8 ) );
- aColor.SetGreen( sal::static_int_cast< UINT8 >( ( nParameter * aColor.GetGreen() ) >> 8 ) );
- aColor.SetBlue( sal::static_int_cast< UINT8 >( ( nParameter * aColor.GetBlue() ) >> 8 ) );
+ aColor.SetRed( sal::static_int_cast< sal_uInt8 >( ( nParameter * aColor.GetRed() ) >> 8 ) );
+ aColor.SetGreen( sal::static_int_cast< sal_uInt8 >( ( nParameter * aColor.GetGreen() ) >> 8 ) );
+ aColor.SetBlue( sal::static_int_cast< sal_uInt8 >( ( nParameter * aColor.GetBlue() ) >> 8 ) );
}
break;
case 0x02 : // lighten color by parameter
{
- UINT16 nInvParameter = ( 0x00ff - nParameter ) * 0xff;
- aColor.SetRed( sal::static_int_cast< UINT8 >( ( nInvParameter + ( nParameter * aColor.GetRed() ) ) >> 8 ) );
- aColor.SetGreen( sal::static_int_cast< UINT8 >( ( nInvParameter + ( nParameter * aColor.GetGreen() ) ) >> 8 ) );
- aColor.SetBlue( sal::static_int_cast< UINT8 >( ( nInvParameter + ( nParameter * aColor.GetBlue() ) ) >> 8 ) );
+ sal_uInt16 nInvParameter = ( 0x00ff - nParameter ) * 0xff;
+ aColor.SetRed( sal::static_int_cast< sal_uInt8 >( ( nInvParameter + ( nParameter * aColor.GetRed() ) ) >> 8 ) );
+ aColor.SetGreen( sal::static_int_cast< sal_uInt8 >( ( nInvParameter + ( nParameter * aColor.GetGreen() ) ) >> 8 ) );
+ aColor.SetBlue( sal::static_int_cast< sal_uInt8 >( ( nInvParameter + ( nParameter * aColor.GetBlue() ) ) >> 8 ) );
}
break;
case 0x03 : // add grey level RGB(p,p,p)
{
- INT16 nR = (INT16)aColor.GetRed() + (INT16)nParameter;
- INT16 nG = (INT16)aColor.GetGreen() + (INT16)nParameter;
- INT16 nB = (INT16)aColor.GetBlue() + (INT16)nParameter;
+ sal_Int16 nR = (sal_Int16)aColor.GetRed() + (sal_Int16)nParameter;
+ sal_Int16 nG = (sal_Int16)aColor.GetGreen() + (sal_Int16)nParameter;
+ sal_Int16 nB = (sal_Int16)aColor.GetBlue() + (sal_Int16)nParameter;
if ( nR > 0x00ff )
nR = 0x00ff;
if ( nG > 0x00ff )
nG = 0x00ff;
if ( nB > 0x00ff )
nB = 0x00ff;
- aColor = Color( (UINT8)nR, (UINT8)nG, (UINT8)nB );
+ aColor = Color( (sal_uInt8)nR, (sal_uInt8)nG, (sal_uInt8)nB );
}
break;
case 0x04 : // substract grey level RGB(p,p,p)
{
- INT16 nR = (INT16)aColor.GetRed() - (INT16)nParameter;
- INT16 nG = (INT16)aColor.GetGreen() - (INT16)nParameter;
- INT16 nB = (INT16)aColor.GetBlue() - (INT16)nParameter;
+ sal_Int16 nR = (sal_Int16)aColor.GetRed() - (sal_Int16)nParameter;
+ sal_Int16 nG = (sal_Int16)aColor.GetGreen() - (sal_Int16)nParameter;
+ sal_Int16 nB = (sal_Int16)aColor.GetBlue() - (sal_Int16)nParameter;
if ( nR < 0 )
nR = 0;
if ( nG < 0 )
nG = 0;
if ( nB < 0 )
nB = 0;
- aColor = Color( (UINT8)nR, (UINT8)nG, (UINT8)nB );
+ aColor = Color( (sal_uInt8)nR, (sal_uInt8)nG, (sal_uInt8)nB );
}
break;
case 0x05 : // substract from grey level RGB(p,p,p)
{
- INT16 nR = (INT16)nParameter - (INT16)aColor.GetRed();
- INT16 nG = (INT16)nParameter - (INT16)aColor.GetGreen();
- INT16 nB = (INT16)nParameter - (INT16)aColor.GetBlue();
+ sal_Int16 nR = (sal_Int16)nParameter - (sal_Int16)aColor.GetRed();
+ sal_Int16 nG = (sal_Int16)nParameter - (sal_Int16)aColor.GetGreen();
+ sal_Int16 nB = (sal_Int16)nParameter - (sal_Int16)aColor.GetBlue();
if ( nR < 0 )
nR = 0;
if ( nG < 0 )
nG = 0;
if ( nB < 0 )
nB = 0;
- aColor = Color( (UINT8)nR, (UINT8)nG, (UINT8)nB );
+ aColor = Color( (sal_uInt8)nR, (sal_uInt8)nG, (sal_uInt8)nB );
}
break;
case 0x06 : // per component: black if < p, white if >= p
@@ -3997,21 +3997,21 @@ Color SvxMSDffManager::MSO_CLR_ToColor( sal_uInt32 nColorCode, sal_uInt16 nConte
GetColorFromPalette( nUpper, aColor );
}
else // hart attributiert, eventuell mit Hinweis auf SYSTEMRGB
- aColor = Color( (BYTE)nColorCode, (BYTE)( nColorCode >> 8 ), (BYTE)( nColorCode >> 16 ) );
+ aColor = Color( (sal_uInt8)nColorCode, (sal_uInt8)( nColorCode >> 8 ), (sal_uInt8)( nColorCode >> 16 ) );
return aColor;
}
FASTBOOL SvxMSDffManager::ReadDffString(SvStream& rSt, String& rTxt) const
{
- FASTBOOL bRet=FALSE;
+ FASTBOOL bRet=sal_False;
DffRecordHeader aStrHd;
if( !ReadCommonRecordHeader(aStrHd, rSt) )
rSt.Seek( aStrHd.nFilePos );
else if ( aStrHd.nRecType == DFF_PST_TextBytesAtom || aStrHd.nRecType == DFF_PST_TextCharsAtom )
{
FASTBOOL bUniCode=aStrHd.nRecType==DFF_PST_TextCharsAtom;
- bRet=TRUE;
- ULONG nBytes = aStrHd.nRecLen;
+ bRet=sal_True;
+ sal_uLong nBytes = aStrHd.nRecLen;
MSDFFReadZString( rSt, rTxt, nBytes, bUniCode );
if( !bUniCode )
{
@@ -4040,8 +4040,8 @@ void SvxMSDffManager::ReadObjText( const String& rText, SdrObject* pObj ) const
SdrOutliner& rOutliner = pText->ImpGetDrawOutliner();
rOutliner.Init( OUTLINERMODE_TEXTOBJECT );
- BOOL bOldUpdateMode = rOutliner.GetUpdateMode();
- rOutliner.SetUpdateMode( FALSE );
+ sal_Bool bOldUpdateMode = rOutliner.GetUpdateMode();
+ rOutliner.SetUpdateMode( sal_False );
rOutliner.SetVertical( pText->IsVerticalWriting() );
sal_uInt16 nParaIndex = 0;
@@ -4080,7 +4080,7 @@ void SvxMSDffManager::ReadObjText( const String& rText, SdrObject* pObj ) const
SfxItemSet aParagraphAttribs( rOutliner.GetEmptyItemSet() );
if ( !aSelection.nStartPos )
- aParagraphAttribs.Put( SfxBoolItem( EE_PARA_BULLETSTATE, FALSE ) );
+ aParagraphAttribs.Put( SfxBoolItem( EE_PARA_BULLETSTATE, sal_False ) );
aSelection.nStartPos = 0;
rOutliner.QuickSetAttribs( aParagraphAttribs, aSelection );
nParaIndex++;
@@ -4094,7 +4094,7 @@ void SvxMSDffManager::ReadObjText( const String& rText, SdrObject* pObj ) const
FASTBOOL SvxMSDffManager::ReadObjText(SvStream& rSt, SdrObject* pObj) const
{
- FASTBOOL bRet=FALSE;
+ FASTBOOL bRet=sal_False;
SdrTextObj* pText = PTR_CAST(SdrTextObj, pObj);
if( pText )
{
@@ -4103,27 +4103,27 @@ FASTBOOL SvxMSDffManager::ReadObjText(SvStream& rSt, SdrObject* pObj) const
rSt.Seek( aTextHd.nFilePos );
else if ( aTextHd.nRecType==DFF_msofbtClientTextbox )
{
- bRet=TRUE;
- ULONG nRecEnd=aTextHd.GetRecEndFilePos();
+ bRet=sal_True;
+ sal_uLong nRecEnd=aTextHd.GetRecEndFilePos();
DffRecordHeader aHd;
String aText;
-// UINT32 nInvent=pText->GetObjInventor();
-// UINT16 nIdent=pText->GetObjIdentifier();
+// sal_uInt32 nInvent=pText->GetObjInventor();
+// sal_uInt16 nIdent=pText->GetObjIdentifier();
SdrOutliner& rOutliner=pText->ImpGetDrawOutliner();
// sal_Int16 nMinDepth = rOutliner.GetMinDepth();
- USHORT nOutlMode = rOutliner.GetMode();
+ sal_uInt16 nOutlMode = rOutliner.GetMode();
{ // Wohl 'nen kleiner Bug der EditEngine, das die
// Absastzattribute bei Clear() nicht entfernt werden.
- FASTBOOL bClearParaAttribs = TRUE;
+ FASTBOOL bClearParaAttribs = sal_True;
rOutliner.SetStyleSheet( 0, NULL );
SfxItemSet aSet(rOutliner.GetEmptyItemSet());
aSet.Put(SvxColorItem( COL_BLACK ));
rOutliner.SetParaAttribs(0,aSet);
pText->SetMergedItemSet(aSet);
- bClearParaAttribs = FALSE;
+ bClearParaAttribs = sal_False;
if( bClearParaAttribs )
{
// Wohl 'nen kleiner Bug der EditEngine, dass die
@@ -4133,7 +4133,7 @@ FASTBOOL SvxMSDffManager::ReadObjText(SvStream& rSt, SdrObject* pObj) const
}
rOutliner.Init( OUTLINERMODE_TEXTOBJECT );
-// ULONG nFilePosMerker=rSt.Tell();
+// sal_uLong nFilePosMerker=rSt.Tell();
////////////////////////////////////
// TextString und MetaChars lesen //
////////////////////////////////////
@@ -4156,12 +4156,12 @@ FASTBOOL SvxMSDffManager::ReadObjText(SvStream& rSt, SdrObject* pObj) const
break;
case DFF_PST_TextRulerAtom :
{
- UINT16 nLen = (UINT16)aHd.nRecLen;
+ sal_uInt16 nLen = (sal_uInt16)aHd.nRecLen;
if(nLen)
{
- UINT16 nVal1, nVal2, nVal3;
- UINT16 nDefaultTab = 2540; // PPT def: 1 Inch //rOutliner.GetDefTab();
- UINT16 nMostrightTab = 0;
+ sal_uInt16 nVal1, nVal2, nVal3;
+ sal_uInt16 nDefaultTab = 2540; // PPT def: 1 Inch //rOutliner.GetDefTab();
+ sal_uInt16 nMostrightTab = 0;
SfxItemSet aSet(rOutliner.GetEmptyItemSet());
SvxTabStopItem aTabItem(0, 0, SVX_TAB_ADJUST_DEFAULT, EE_PARA_TABS);
@@ -4174,7 +4174,7 @@ FASTBOOL SvxMSDffManager::ReadObjText(SvStream& rSt, SdrObject* pObj) const
{
rSt >> nVal3;
nLen -= 2;
- nDefaultTab = (UINT16)(((UINT32)nVal3 * 1000) / 240);
+ nDefaultTab = (sal_uInt16)(((sal_uInt32)nVal3 * 1000) / 240);
}
// Weitere, frei gesetzte TABs
@@ -4190,7 +4190,7 @@ FASTBOOL SvxMSDffManager::ReadObjText(SvStream& rSt, SdrObject* pObj) const
rSt >> nVal3;
nLen -= 4;
- UINT16 nNewTabPos = (UINT16)(((UINT32)nVal2 * 1000) / 240);
+ sal_uInt16 nNewTabPos = (sal_uInt16)(((sal_uInt32)nVal2 * 1000) / 240);
if(nNewTabPos > nMostrightTab)
nMostrightTab = nNewTabPos;
@@ -4200,8 +4200,8 @@ FASTBOOL SvxMSDffManager::ReadObjText(SvStream& rSt, SdrObject* pObj) const
}
// evtl. noch default-TABs ergaenzen (immer)
- UINT16 nObjWidth = sal_uInt16(pObj->GetSnapRect().GetWidth() + 1);
- UINT16 nDefaultTabPos = nDefaultTab;
+ sal_uInt16 nObjWidth = sal_uInt16(pObj->GetSnapRect().GetWidth() + 1);
+ sal_uInt16 nDefaultTabPos = nDefaultTab;
while(nDefaultTabPos <= nObjWidth && nDefaultTabPos <= nMostrightTab)
nDefaultTabPos =
@@ -4242,12 +4242,12 @@ FASTBOOL SvxMSDffManager::ReadObjText(SvStream& rSt, SdrObject* pObj) const
// SHIFT-Ret ersetzen im Outliner
if(aText.GetTokenCount(0x0B) > 1)
{
- UINT32 nParaCount = rOutliner.GetParagraphCount();
- for(UINT16 a=0;a<nParaCount;a++)
+ sal_uInt32 nParaCount = rOutliner.GetParagraphCount();
+ for(sal_uInt16 a=0;a<nParaCount;a++)
{
Paragraph* pActPara = rOutliner.GetParagraph(a);
String aParaText = rOutliner.GetText(pActPara);
- for(UINT16 b=0;b<aParaText.Len();b++)
+ for(sal_uInt16 b=0;b<aParaText.Len();b++)
{
if( aParaText.GetChar( b ) == 0x0B)
{
@@ -4271,7 +4271,7 @@ FASTBOOL SvxMSDffManager::ReadObjText(SvStream& rSt, SdrObject* pObj) const
//static
void SvxMSDffManager::MSDFFReadZString( SvStream& rIn, String& rStr,
- ULONG nRecLen, FASTBOOL bUniCode )
+ sal_uLong nRecLen, FASTBOOL bUniCode )
{
sal_uInt16 nLen = (sal_uInt16)nRecLen;
if( nLen )
@@ -4312,18 +4312,18 @@ SdrObject* SvxMSDffManager::ImportFontWork( SvStream& rStCt, SfxItemSet& rSet, R
SdrObject* pRet = NULL;
String aObjectText;
String aFontName;
- BOOL bTextRotate = FALSE;
+ sal_Bool bTextRotate = sal_False;
((SvxMSDffManager*)this)->mnFix16Angle = 0; // we don't want to use this property in future
if ( SeekToContent( DFF_Prop_gtextUNICODE, rStCt ) )
- MSDFFReadZString( rStCt, aObjectText, GetPropertyValue( DFF_Prop_gtextUNICODE ), TRUE );
+ MSDFFReadZString( rStCt, aObjectText, GetPropertyValue( DFF_Prop_gtextUNICODE ), sal_True );
if ( SeekToContent( DFF_Prop_gtextFont, rStCt ) )
- MSDFFReadZString( rStCt, aFontName, GetPropertyValue( DFF_Prop_gtextFont ), TRUE );
+ MSDFFReadZString( rStCt, aFontName, GetPropertyValue( DFF_Prop_gtextFont ), sal_True );
if ( GetPropertyValue( DFF_Prop_gtextFStrikethrough, 0 ) & 0x2000 )
{
// Text ist senkrecht formatiert, Box Kippen
- INT32 nHalfWidth = ( rBoundRect.GetWidth() + 1) >> 1;
- INT32 nHalfHeight = ( rBoundRect.GetHeight() + 1) >> 1;
+ sal_Int32 nHalfWidth = ( rBoundRect.GetWidth() + 1) >> 1;
+ sal_Int32 nHalfHeight = ( rBoundRect.GetHeight() + 1) >> 1;
Point aTopLeft( rBoundRect.Left() + nHalfWidth - nHalfHeight,
rBoundRect.Top() + nHalfHeight - nHalfWidth);
Size aNewSize( rBoundRect.GetHeight(), rBoundRect.GetWidth() );
@@ -4332,13 +4332,13 @@ SdrObject* SvxMSDffManager::ImportFontWork( SvStream& rStCt, SfxItemSet& rSet, R
String aSrcText( aObjectText );
aObjectText.Erase();
- for( UINT16 a = 0; a < aSrcText.Len(); a++ )
+ for( sal_uInt16 a = 0; a < aSrcText.Len(); a++ )
{
aObjectText += aSrcText.GetChar( a );
aObjectText += '\n';
}
rSet.Put( SdrTextHorzAdjustItem( SDRTEXTHORZADJUST_CENTER ) );
- bTextRotate = TRUE;
+ bTextRotate = sal_True;
}
if ( aObjectText.Len() )
{ // FontWork-Objekt Mit dem Text in aObjectText erzeugen
@@ -4349,14 +4349,14 @@ SdrObject* SvxMSDffManager::ImportFontWork( SvStream& rStCt, SfxItemSet& rSet, R
((SdrRectObj*)pNewObj)->SetText( aObjectText );
SdrFitToSizeType eFTS = SDRTEXTFIT_PROPORTIONAL;
rSet.Put( SdrTextFitToSizeTypeItem( eFTS ) );
- rSet.Put( SdrTextAutoGrowHeightItem( FALSE ) );
- rSet.Put( SdrTextAutoGrowWidthItem( FALSE ) );
+ rSet.Put( SdrTextAutoGrowHeightItem( sal_False ) );
+ rSet.Put( SdrTextAutoGrowWidthItem( sal_False ) );
rSet.Put( SvxFontItem( FAMILY_DONTKNOW, aFontName, String(),
PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW, EE_CHAR_FONTINFO ));
pNewObj->SetMergedItemSet(rSet);
- pRet = pNewObj->ConvertToPolyObj( FALSE, FALSE );
+ pRet = pNewObj->ConvertToPolyObj( sal_False, sal_False );
if( !pRet )
pRet = pNewObj;
else
@@ -4463,7 +4463,7 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, cons
{
Graphic aGraf; // be sure this graphic is deleted before swapping out
if( SeekToContent( DFF_Prop_pibName, rSt ) )
- MSDFFReadZString( rSt, aFilename, GetPropertyValue( DFF_Prop_pibName ), TRUE );
+ MSDFFReadZString( rSt, aFilename, GetPropertyValue( DFF_Prop_pibName ), sal_True );
// UND, ODER folgendes:
if( !( eFlags & mso_blipflagDoNotSave ) ) // Grafik embedded
@@ -4480,10 +4480,10 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, cons
rSt >> aHd;
if( DFF_msofbtBSE == aHd.nRecType )
{
- const ULONG nSkipBLIPLen = 20;
- const ULONG nSkipShapePos = 4;
- const ULONG nSkipBLIP = 4;
- const ULONG nSkip =
+ const sal_uLong nSkipBLIPLen = 20;
+ const sal_uLong nSkipShapePos = 4;
+ const sal_uLong nSkipBLIP = 4;
+ const sal_uLong nSkip =
nSkipBLIPLen + 4 + nSkipShapePos + 4 + nSkipBLIP;
if (nSkip <= aHd.nRecLen)
@@ -4503,7 +4503,7 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, cons
if ( IsProperty( DFF_Prop_pictureTransparent ) )
{
- UINT32 nTransColor = GetPropertyValue( DFF_Prop_pictureTransparent, 0 );
+ sal_uInt32 nTransColor = GetPropertyValue( DFF_Prop_pictureTransparent, 0 );
if ( aGraf.GetType() == GRAPHIC_BITMAP )
{
@@ -4594,7 +4594,7 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, cons
{
BitmapEx aBitmapEx( aGraf.GetBitmapEx() );
if ( nBrightness || nContrast || ( nGamma != 0x10000 ) )
- aBitmapEx.Adjust( nBrightness, (sal_Int16)nContrast, 0, 0, 0, (double)nGamma / 0x10000, FALSE );
+ aBitmapEx.Adjust( nBrightness, (sal_Int16)nContrast, 0, 0, 0, (double)nGamma / 0x10000, sal_False );
if ( eDrawMode == GRAPHICDRAWMODE_GREYS )
aBitmapEx.Convert( BMP_CONVERSION_8BIT_GREYS );
else if ( eDrawMode == GRAPHICDRAWMODE_MONO )
@@ -4608,7 +4608,7 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, cons
{
GDIMetaFile aGdiMetaFile( aGraf.GetGDIMetaFile() );
if ( nBrightness || nContrast || ( nGamma != 0x10000 ) )
- aGdiMetaFile.Adjust( nBrightness, (sal_Int16)nContrast, 0, 0, 0, (double)nGamma / 0x10000, FALSE );
+ aGdiMetaFile.Adjust( nBrightness, (sal_Int16)nContrast, 0, 0, 0, (double)nGamma / 0x10000, sal_False );
if ( eDrawMode == GRAPHICDRAWMODE_GREYS )
aGdiMetaFile.Convert( MTF_CONVERSION_8BIT_GREYS );
else if ( eDrawMode == GRAPHICDRAWMODE_MONO )
@@ -4736,8 +4736,8 @@ SdrObject* SvxMSDffManager::ImportGroup( const DffRecordHeader& rHd, SvStream& r
rSt >> aRecHd;
if ( aRecHd.nRecType == DFF_msofbtSpContainer )
{
- INT32 nGroupRotateAngle = 0;
- INT32 nSpFlags = 0;
+ sal_Int32 nGroupRotateAngle = 0;
+ sal_Int32 nSpFlags = 0;
mnFix16Angle = 0;
aRecHd.SeekToBegOfRecord( rSt );
pRet = ImportObj( rSt, pClientData, rClientRect, rGlobalChildRect, nCalledByGroup + 1, pShapeId );
@@ -4835,7 +4835,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
rHd.SeekToBegOfRecord( rSt );
DffObjData aObjData( rHd, rClientRect, nCalledByGroup );
- maShapeRecords.Consume( rSt, FALSE );
+ maShapeRecords.Consume( rSt, sal_False );
aObjData.bShapeType = maShapeRecords.SeekToContent( rSt, DFF_msofbtSp, SEEK_FROM_BEGINNING );
if ( aObjData.bShapeType )
{
@@ -4863,7 +4863,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
{
maShapeRecords.Current()->SeekToBegOfRecord( rSt );
#ifdef DBG_AUTOSHAPE
- ReadPropSet( rSt, pClientData, (UINT32)aObjData.eShapeType );
+ ReadPropSet( rSt, pClientData, (sal_uInt32)aObjData.eShapeType );
#else
ReadPropSet( rSt, pClientData );
#endif
@@ -4877,7 +4877,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
aObjData.bChildAnchor = maShapeRecords.SeekToContent( rSt, DFF_msofbtChildAnchor, SEEK_FROM_CURRENT_AND_RESTART );
if ( aObjData.bChildAnchor )
{
- INT32 l, o, r, u;
+ sal_Int32 l, o, r, u;
rSt >> l >> o >> r >> u;
Scale( l );
Scale( o );
@@ -4918,8 +4918,8 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
long nAngle = mnFix16Angle;
if ( ( nAngle > 4500 && nAngle <= 13500 ) || ( nAngle > 22500 && nAngle <= 31500 ) )
{
- INT32 nHalfWidth = ( aObjData.aBoundRect.GetWidth() + 1 ) >> 1;
- INT32 nHalfHeight = ( aObjData.aBoundRect.GetHeight() + 1 ) >> 1;
+ sal_Int32 nHalfWidth = ( aObjData.aBoundRect.GetWidth() + 1 ) >> 1;
+ sal_Int32 nHalfHeight = ( aObjData.aBoundRect.GetHeight() + 1 ) >> 1;
Point aTopLeft( aObjData.aBoundRect.Left() + nHalfWidth - nHalfHeight,
aObjData.aBoundRect.Top() + nHalfHeight - nHalfWidth );
Size aNewSize( aObjData.aBoundRect.GetHeight(), aObjData.aBoundRect.GetWidth() );
@@ -4994,7 +4994,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
SvxFontItem aLatin(EE_CHAR_FONTINFO), aAsian(EE_CHAR_FONTINFO_CJK), aComplex(EE_CHAR_FONTINFO_CTL);
GetDefaultFonts( aLatin, aAsian, aComplex );
- MSDFFReadZString( rSt, aFontName, GetPropertyValue( DFF_Prop_gtextFont ), TRUE );
+ MSDFFReadZString( rSt, aFontName, GetPropertyValue( DFF_Prop_gtextFont ), sal_True );
aSet.Put( SvxFontItem( aLatin.GetFamily(), aFontName, aLatin.GetStyleName(),
PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW, EE_CHAR_FONTINFO ));
aSet.Put( SvxFontItem( aLatin.GetFamily(), aFontName, aLatin.GetStyleName(),
@@ -5017,7 +5017,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
if ( SeekToContent( DFF_Prop_gtextUNICODE, rSt ) )
{
- MSDFFReadZString( rSt, aObjectText, GetPropertyValue( DFF_Prop_gtextUNICODE ), TRUE );
+ MSDFFReadZString( rSt, aObjectText, GetPropertyValue( DFF_Prop_gtextUNICODE ), sal_True );
ReadObjText( aObjectText, pRet );
}
@@ -5062,11 +5062,11 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
if ( pParaObj )
{
SdrOutliner& rOutliner = ((SdrObjCustomShape*)pRet)->ImpGetDrawOutliner();
- BOOL bOldUpdateMode = rOutliner.GetUpdateMode();
+ sal_Bool bOldUpdateMode = rOutliner.GetUpdateMode();
SdrModel* pModel = pRet->GetModel();
if ( pModel )
rOutliner.SetStyleSheetPool( (SfxStyleSheetPool*)pModel->GetStyleSheetPool() );
- rOutliner.SetUpdateMode( FALSE );
+ rOutliner.SetUpdateMode( sal_False );
rOutliner.SetText( *pParaObj );
VirtualDevice aVirDev( 1 );
aVirDev.SetMapMode( MAP_100TH_MM );
@@ -5076,12 +5076,12 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
sal_Bool bCreateNewParaObject = sal_False;
for ( i = 0; i < nParagraphs; i++ )
{
- BOOL bIsRTL = aVirDev.GetTextIsRTL( rOutliner.GetText( rOutliner.GetParagraph( i ) ), 0, STRING_LEN );
+ sal_Bool bIsRTL = aVirDev.GetTextIsRTL( rOutliner.GetText( rOutliner.GetParagraph( i ) ), 0, STRING_LEN );
if ( bIsRTL )
{
- SfxItemSet aSet2( rOutliner.GetParaAttribs( (USHORT)i ) );
+ SfxItemSet aSet2( rOutliner.GetParaAttribs( (sal_uInt16)i ) );
aSet2.Put( SvxFrameDirectionItem( FRMDIR_HORI_RIGHT_TOP, EE_PARA_WRITINGDIR ) );
- rOutliner.SetParaAttribs( (USHORT)i, aSet2 );
+ rOutliner.SetParaAttribs( (sal_uInt16)i, aSet2 );
bCreateNewParaObject = sal_True;
}
}
@@ -5181,7 +5181,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
if ( nStartAngle != nEndAngle )
{
XPolygon aXPoly( aPolyBoundRect.Center(), aPolyBoundRect.GetWidth() / 2, aPolyBoundRect.GetHeight() / 2,
- (USHORT)nStartAngle / 10, (USHORT)nEndAngle / 10, TRUE );
+ (sal_uInt16)nStartAngle / 10, (sal_uInt16)nEndAngle / 10, sal_True );
Rectangle aPolyPieRect( aXPoly.GetBoundRect() );
double fYScale, fXScale;
@@ -5276,7 +5276,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
EnhancedCustomShape2d aCustomShape2d( pRet );
aTextRect = aCustomShape2d.GetTextRect();
- bIsCustomShape = TRUE;
+ bIsCustomShape = sal_True;
if( bIsConnector )
{
@@ -5312,8 +5312,8 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
// Konnektoren
MSO_ConnectorStyle eConnectorStyle = (MSO_ConnectorStyle)GetPropertyValue( DFF_Prop_cxstyle, mso_cxstyleStraight );
- ((SdrEdgeObj*)pRet)->ConnectToNode(TRUE, NULL);
- ((SdrEdgeObj*)pRet)->ConnectToNode(FALSE, NULL);
+ ((SdrEdgeObj*)pRet)->ConnectToNode(sal_True, NULL);
+ ((SdrEdgeObj*)pRet)->ConnectToNode(sal_False, NULL);
Point aPoint1( aObjData.aBoundRect.TopLeft() );
Point aPoint2( aObjData.aBoundRect.BottomRight() );
@@ -5333,13 +5333,13 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
// Linie innerhalb des Bereiches zurechtdrehen/spiegeln
if ( nSpFlags & SP_FFLIPH )
{
- INT32 n = aPoint1.X();
+ sal_Int32 n = aPoint1.X();
aPoint1.X() = aPoint2.X();
aPoint2.X() = n;
}
if ( nSpFlags & SP_FFLIPV )
{
- INT32 n = aPoint1.Y();
+ sal_Int32 n = aPoint1.Y();
aPoint1.Y() = aPoint2.Y();
aPoint2.Y() = n;
}
@@ -5458,7 +5458,7 @@ Rectangle SvxMSDffManager::GetGlobalChildAnchor( const DffRecordHeader& rHd, SvS
}
else
{
- INT16 ls, ts, rs, bs;
+ sal_Int16 ls, ts, rs, bs;
rSt >> ts >> ls >> rs >> bs; // etwas seltsame Koordinatenreihenfolge ...
l = ls, t = ts, r = rs, b = bs;
}
@@ -5592,9 +5592,9 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
SEEK_FROM_CURRENT_AND_RESTART )
&& maShapeRecords.Current()->nRecLen )
{
- UINT32 nBytesLeft = maShapeRecords.Current()->nRecLen;
- UINT32 nUDData;
- UINT16 nPID;
+ sal_uInt32 nBytesLeft = maShapeRecords.Current()->nRecLen;
+ sal_uInt32 nUDData;
+ sal_uInt16 nPID;
while( 5 < nBytesLeft )
{
rSt >> nPID;
@@ -5611,7 +5611,7 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
}
if ( rSt.GetError() != 0 )
break;
- pImpRec->bHasUDefProp = TRUE;
+ pImpRec->bHasUDefProp = sal_True;
nBytesLeft -= 6;
}
}
@@ -5619,7 +5619,7 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
// Textrahmen, auch Title oder Outline
SdrObject* pOrgObj = pObj;
SdrRectObj* pTextObj = 0;
- UINT32 nTextId = GetPropertyValue( DFF_Prop_lTxid, 0 );
+ sal_uInt32 nTextId = GetPropertyValue( DFF_Prop_lTxid, 0 );
if( nTextId )
{
SfxItemSet aSet( pSdrModel->GetItemPool() );
@@ -5652,17 +5652,17 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
}
// Distance of Textbox to it's surrounding Customshape
- INT32 nTextLeft = GetPropertyValue( DFF_Prop_dxTextLeft, 91440L);
- INT32 nTextRight = GetPropertyValue( DFF_Prop_dxTextRight, 91440L );
- INT32 nTextTop = GetPropertyValue( DFF_Prop_dyTextTop, 45720L );
- INT32 nTextBottom = GetPropertyValue( DFF_Prop_dyTextBottom, 45720L );
+ sal_Int32 nTextLeft = GetPropertyValue( DFF_Prop_dxTextLeft, 91440L);
+ sal_Int32 nTextRight = GetPropertyValue( DFF_Prop_dxTextRight, 91440L );
+ sal_Int32 nTextTop = GetPropertyValue( DFF_Prop_dyTextTop, 45720L );
+ sal_Int32 nTextBottom = GetPropertyValue( DFF_Prop_dyTextBottom, 45720L );
ScaleEmu( nTextLeft );
ScaleEmu( nTextRight );
ScaleEmu( nTextTop );
ScaleEmu( nTextBottom );
- INT32 nTextRotationAngle=0;
+ sal_Int32 nTextRotationAngle=0;
bool bVerticalText = false;
if ( IsProperty( DFF_Prop_txflTextFlow ) )
{
@@ -5701,10 +5701,10 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
rTextRect.Right() = rTextRect.Left() + rTextRect.GetHeight();
rTextRect.Bottom() = rTextRect.Top() + nWidth;
- INT32 nOldTextLeft = nTextLeft;
- INT32 nOldTextRight = nTextRight;
- INT32 nOldTextTop = nTextTop;
- INT32 nOldTextBottom = nTextBottom;
+ sal_Int32 nOldTextLeft = nTextLeft;
+ sal_Int32 nOldTextRight = nTextRight;
+ sal_Int32 nOldTextTop = nTextTop;
+ sal_Int32 nOldTextBottom = nTextBottom;
nTextLeft = nOldTextBottom;
nTextRight = nOldTextTop;
@@ -5718,10 +5718,10 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
rTextRect.Right() = rTextRect.Left() + rTextRect.GetHeight();
rTextRect.Bottom() = rTextRect.Top() + nWidth;
- INT32 nOldTextLeft = nTextLeft;
- INT32 nOldTextRight = nTextRight;
- INT32 nOldTextTop = nTextTop;
- INT32 nOldTextBottom = nTextBottom;
+ sal_Int32 nOldTextLeft = nTextLeft;
+ sal_Int32 nOldTextRight = nTextRight;
+ sal_Int32 nOldTextTop = nTextTop;
+ sal_Int32 nOldTextBottom = nTextBottom;
nTextLeft = nOldTextTop;
nTextRight = nOldTextBottom;
@@ -5748,9 +5748,9 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
if( bTextFrame )
{
SvxMSDffShapeInfo aTmpRec( 0, pImpRec->nShapeId );
- aTmpRec.bSortByShapeId = TRUE;
+ aTmpRec.bSortByShapeId = sal_True;
- USHORT nFound;
+ sal_uInt16 nFound;
if( pShapeInfos->Seek_Entry( &aTmpRec, &nFound ) )
{
SvxMSDffShapeInfo& rInfo = *pShapeInfos->GetObject(nFound);
@@ -5765,7 +5765,7 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
bool bFitText = false;
if (GetPropertyValue(DFF_Prop_FitTextToShape) & 2)
{
- aSet.Put( SdrTextAutoGrowHeightItem( TRUE ) );
+ aSet.Put( SdrTextAutoGrowHeightItem( sal_True ) );
aSet.Put( SdrTextMinFrameHeightItem(
aNewRect.Bottom() - aNewRect.Top() ) );
aSet.Put( SdrTextMinFrameWidthItem(
@@ -5774,15 +5774,15 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
}
else
{
- aSet.Put( SdrTextAutoGrowHeightItem( FALSE ) );
- aSet.Put( SdrTextAutoGrowWidthItem( FALSE ) );
+ aSet.Put( SdrTextAutoGrowHeightItem( sal_False ) );
+ aSet.Put( SdrTextAutoGrowWidthItem( sal_False ) );
}
switch ( (MSO_WrapMode)
GetPropertyValue( DFF_Prop_WrapText, mso_wrapSquare ) )
{
case mso_wrapNone :
- aSet.Put( SdrTextAutoGrowWidthItem( TRUE ) );
+ aSet.Put( SdrTextAutoGrowWidthItem( sal_True ) );
if (bFitText)
{
//can't do autowidth in flys #i107184#
@@ -5790,7 +5790,7 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
}
break;
case mso_wrapByPoints :
- aSet.Put( SdrTextContourFrameItem( TRUE ) );
+ aSet.Put( SdrTextContourFrameItem( sal_True ) );
break;
default: break;
}
@@ -5812,46 +5812,46 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
(MSO_Anchor)GetPropertyValue( DFF_Prop_anchorText );
SdrTextVertAdjust eTVA = SDRTEXTVERTADJUST_CENTER;
- BOOL bTVASet(FALSE);
+ sal_Bool bTVASet(sal_False);
SdrTextHorzAdjust eTHA = SDRTEXTHORZADJUST_CENTER;
- BOOL bTHASet(FALSE);
+ sal_Bool bTHASet(sal_False);
switch( eTextAnchor )
{
case mso_anchorTop:
{
eTVA = SDRTEXTVERTADJUST_TOP;
- bTVASet = TRUE;
+ bTVASet = sal_True;
}
break;
case mso_anchorTopCentered:
{
eTVA = SDRTEXTVERTADJUST_TOP;
- bTVASet = TRUE;
- bTHASet = TRUE;
+ bTVASet = sal_True;
+ bTHASet = sal_True;
}
break;
case mso_anchorMiddle:
- bTVASet = TRUE;
+ bTVASet = sal_True;
break;
case mso_anchorMiddleCentered:
{
- bTVASet = TRUE;
- bTHASet = TRUE;
+ bTVASet = sal_True;
+ bTHASet = sal_True;
}
break;
case mso_anchorBottom:
{
eTVA = SDRTEXTVERTADJUST_BOTTOM;
- bTVASet = TRUE;
+ bTVASet = sal_True;
}
break;
case mso_anchorBottomCentered:
{
eTVA = SDRTEXTVERTADJUST_BOTTOM;
- bTVASet = TRUE;
- bTHASet = TRUE;
+ bTVASet = sal_True;
+ bTHASet = sal_True;
}
break;
/*
@@ -5928,7 +5928,7 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
const SfxPoolItem* pPoolItem=NULL;
SfxItemState eState = aSet.GetItemState( XATTR_FILLCOLOR,
- FALSE, &pPoolItem );
+ sal_False, &pPoolItem );
if( SFX_ITEM_DEFAULT == eState )
aSet.Put( XFillColorItem( String(),
Color( mnDefaultColor ) ) );
@@ -5937,11 +5937,11 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
//Means that fBehindDocument is set
if (GetPropertyValue(DFF_Prop_fPrint) & 0x20)
- pImpRec->bDrawHell = TRUE;
+ pImpRec->bDrawHell = sal_True;
else
- pImpRec->bDrawHell = FALSE;
+ pImpRec->bDrawHell = sal_False;
if (GetPropertyValue(DFF_Prop_fPrint) & 0x02)
- pImpRec->bHidden = TRUE;
+ pImpRec->bHidden = sal_True;
pTextImpRec->bDrawHell = pImpRec->bDrawHell;
pTextImpRec->bHidden = pImpRec->bHidden;
pImpRec->nNextShapeId = GetPropertyValue( DFF_Prop_hspNext, 0 );
@@ -5949,8 +5949,8 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
if ( nTextId )
{
- pTextImpRec->aTextId.nTxBxS = (UINT16)( nTextId >> 16 );
- pTextImpRec->aTextId.nSequence = (UINT16)nTextId;
+ pTextImpRec->aTextId.nTxBxS = (sal_uInt16)( nTextId >> 16 );
+ pTextImpRec->aTextId.nSequence = (sal_uInt16)nTextId;
}
pTextImpRec->nDxWrapDistLeft = GetPropertyValue(
@@ -6001,7 +6001,7 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
pImpRec->bVFlip = (rObjData.nSpFlags & SP_FFLIPV) ? true : false;
pImpRec->bHFlip = (rObjData.nSpFlags & SP_FFLIPH) ? true : false;
- UINT32 nLineFlags = GetPropertyValue( DFF_Prop_fNoLineDrawDash );
+ sal_uInt32 nLineFlags = GetPropertyValue( DFF_Prop_fNoLineDrawDash );
pImpRec->eLineStyle = (nLineFlags & 8)
? (MSO_LineStyle)GetPropertyValue(
DFF_Prop_lineStyle,
@@ -6034,7 +6034,7 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
&& (rObjData.nCalledByGroup < 2) )
)
StoreShapeOrder( pImpRec->nShapeId,
- ( ( (ULONG)pImpRec->aTextId.nTxBxS ) << 16 )
+ ( ( (sal_uLong)pImpRec->aTextId.nTxBxS ) << 16 )
+ pImpRec->aTextId.nSequence, pObj );
}
else
@@ -6044,14 +6044,14 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
return pObj;
};
-void SvxMSDffManager::StoreShapeOrder(ULONG nId,
- ULONG nTxBx,
+void SvxMSDffManager::StoreShapeOrder(sal_uLong nId,
+ sal_uLong nTxBx,
SdrObject* pObject,
SwFlyFrmFmt* pFly,
short nHdFtSection) const
{
- USHORT nShpCnt = pShapeOrders->Count();
- for (USHORT nShapeNum=0; nShapeNum < nShpCnt; nShapeNum++)
+ sal_uInt16 nShpCnt = pShapeOrders->Count();
+ for (sal_uInt16 nShapeNum=0; nShapeNum < nShpCnt; nShapeNum++)
{
SvxMSDffShapeOrder& rOrder
= *(SvxMSDffShapeOrder*)(pShapeOrders->GetObject( nShapeNum ));
@@ -6068,12 +6068,12 @@ void SvxMSDffManager::StoreShapeOrder(ULONG nId,
void SvxMSDffManager::ExchangeInShapeOrder( SdrObject* pOldObject,
- ULONG nTxBx,
+ sal_uLong nTxBx,
SwFlyFrmFmt* pFly,
SdrObject* pObject) const
{
- USHORT nShpCnt = pShapeOrders->Count();
- for (USHORT nShapeNum=0; nShapeNum < nShpCnt; nShapeNum++)
+ sal_uInt16 nShpCnt = pShapeOrders->Count();
+ for (sal_uInt16 nShapeNum=0; nShapeNum < nShpCnt; nShapeNum++)
{
SvxMSDffShapeOrder& rOrder
= *(SvxMSDffShapeOrder*)(pShapeOrders->GetObject( nShapeNum ));
@@ -6090,8 +6090,8 @@ void SvxMSDffManager::ExchangeInShapeOrder( SdrObject* pOldObject,
void SvxMSDffManager::RemoveFromShapeOrder( SdrObject* pObject ) const
{
- USHORT nShpCnt = pShapeOrders->Count();
- for (USHORT nShapeNum=0; nShapeNum < nShpCnt; nShapeNum++)
+ sal_uInt16 nShpCnt = pShapeOrders->Count();
+ for (sal_uInt16 nShapeNum=0; nShapeNum < nShpCnt; nShapeNum++)
{
SvxMSDffShapeOrder& rOrder
= *(SvxMSDffShapeOrder*)(pShapeOrders->GetObject( nShapeNum ));
@@ -6114,10 +6114,10 @@ void SvxMSDffManager::RemoveFromShapeOrder( SdrObject* pObject ) const
/*struct SvxMSDffBLIPInfo -> in's Header-File
{
- USHORT nBLIPType; // Art des BLIP: z.B. 6 fuer PNG
- ULONG nFilePos; // Offset des BLIP im Daten-Stream
- ULONG nBLIPSize; // Anzahl Bytes, die der BLIP im Stream einnimmt
- SvxMSDffBLIPInfo(USHORT nBType, ULONG nFPos, ULONG nBSize):
+ sal_uInt16 nBLIPType; // Art des BLIP: z.B. 6 fuer PNG
+ sal_uLong nFilePos; // Offset des BLIP im Daten-Stream
+ sal_uLong nBLIPSize; // Anzahl Bytes, die der BLIP im Stream einnimmt
+ SvxMSDffBLIPInfo(sal_uInt16 nBType, sal_uLong nFPos, sal_uLong nBSize):
nBLIPType( nBType ), nFilePos( nFPos ), nBLIPSize( nBSize ){}
};
*/
@@ -6145,7 +6145,7 @@ SvxMSDffManager::SvxMSDffManager(SvStream& rStCtrl_,
SdrModel* pSdrModel_,// s. unten: SetModel()
long nApplicationScale,
ColorData mnDefaultColor_,
- ULONG nDefaultFontHeight_,
+ sal_uLong nDefaultFontHeight_,
SvStream* pStData2_,
MSFilterTracer* pTracer )
:DffPropertyReader( *this ),
@@ -6177,8 +6177,8 @@ SvxMSDffManager::SvxMSDffManager(SvStream& rStCtrl_,
SetModel( pSdrModel_, nApplicationScale );
// FilePos des/der Stream(s) merken
- ULONG nOldPosCtrl = rStCtrl.Tell();
- ULONG nOldPosData = pStData ? pStData->Tell() : nOldPosCtrl;
+ sal_uLong nOldPosCtrl = rStCtrl.Tell();
+ sal_uLong nOldPosData = pStData ? pStData->Tell() : nOldPosCtrl;
// Falls kein Datenstream angegeben, gehen wir davon aus,
// dass die BLIPs im Steuerstream stehen.
@@ -6252,7 +6252,7 @@ void SvxMSDffManager::InitSvxMSDffManager( long nOffsDgg_, SvStream* pStData_, s
nSvxMSDffOLEConvFlags = nOleConvFlags;
// FilePos des/der Stream(s) merken
- ULONG nOldPosCtrl = rStCtrl.Tell();
+ sal_uLong nOldPosCtrl = rStCtrl.Tell();
SetDefaultPropSet( rStCtrl, nOffsDgg );
@@ -6271,7 +6271,7 @@ void SvxMSDffManager::InitSvxMSDffManager( long nOffsDgg_, SvStream* pStData_, s
void SvxMSDffManager::SetDgContainer( SvStream& rSt )
{
- UINT32 nFilePos = rSt.Tell();
+ sal_uInt32 nFilePos = rSt.Tell();
DffRecordHeader aDgContHd;
rSt >> aDgContHd;
// insert this container only if there is also a DgAtom
@@ -6279,7 +6279,7 @@ void SvxMSDffManager::SetDgContainer( SvStream& rSt )
{
DffRecordHeader aRecHd;
rSt >> aRecHd;
- UINT32 nDrawingId = aRecHd.nRecInstance;
+ sal_uInt32 nDrawingId = aRecHd.nRecInstance;
maDgOffsetTable.Insert( nDrawingId, (void*)nFilePos );
rSt.Seek( nFilePos );
}
@@ -6289,7 +6289,7 @@ void SvxMSDffManager::GetFidclData( long nOffsDggL )
{
if ( nOffsDggL )
{
- UINT32 nDummy, nMerk = rStCtrl.Tell();
+ sal_uInt32 nDummy, nMerk = rStCtrl.Tell();
rStCtrl.Seek( nOffsDggL );
DffRecordHeader aRecHd;
@@ -6309,7 +6309,7 @@ void SvxMSDffManager::GetFidclData( long nOffsDggL )
if ( aDggAtomHd.nRecLen == ( mnIdClusters * sizeof( FIDCL ) + 16 ) )
{
mpFidcls = new FIDCL[ mnIdClusters ];
- for ( UINT32 i = 0; i < mnIdClusters; i++ )
+ for ( sal_uInt32 i = 0; i < mnIdClusters; i++ )
{
rStCtrl >> mpFidcls[ i ].dgid
>> mpFidcls[ i ].cspidCur;
@@ -6324,22 +6324,22 @@ void SvxMSDffManager::GetFidclData( long nOffsDggL )
void SvxMSDffManager::CheckTxBxStoryChain()
{
SvxMSDffShapeInfos* pOld = pShapeInfos;
- USHORT nCnt = pOld->Count();
+ sal_uInt16 nCnt = pOld->Count();
pShapeInfos = new SvxMSDffShapeInfos( (nCnt < 255)
? nCnt
: 255 );
// altes Info-Array ueberarbeiten
// (ist sortiert nach nTxBxComp)
- ULONG nChain = ULONG_MAX;
- USHORT nObjMark = 0;
- BOOL bSetReplaceFALSE = FALSE;
- USHORT nObj;
+ sal_uLong nChain = ULONG_MAX;
+ sal_uInt16 nObjMark = 0;
+ sal_Bool bSetReplaceFALSE = sal_False;
+ sal_uInt16 nObj;
for( nObj = 0; nObj < nCnt; ++nObj )
{
SvxMSDffShapeInfo* pObj = pOld->GetObject( nObj );
if( pObj->nTxBxComp )
{
- pObj->bLastBoxInChain = FALSE;
+ pObj->bLastBoxInChain = sal_False;
// Gruppenwechsel ?
// --> OD 2008-07-28 #156763#
// the text id also contains an internal drawing container id
@@ -6351,7 +6351,7 @@ void SvxMSDffManager::CheckTxBxStoryChain()
{
// voriger war letzter seiner Gruppe
if( nObj )
- pOld->GetObject( nObj-1 )->bLastBoxInChain = TRUE;
+ pOld->GetObject( nObj-1 )->bLastBoxInChain = sal_True;
// Merker und Hilfs-Flag zuruecksetzen
nObjMark = nObj;
// --> OD 2008-07-28 #156763#
@@ -6365,20 +6365,20 @@ void SvxMSDffManager::CheckTxBxStoryChain()
{
// Objekt, das NICHT durch Rahmen ersetzt werden darf ?
// Hilfs-Flag setzen
- bSetReplaceFALSE = TRUE;
+ bSetReplaceFALSE = sal_True;
// ggfs Flag in Anfang der Gruppe austragen
- for( USHORT nObj2 = nObjMark; nObj2 < nObj; ++nObj2 )
- pOld->GetObject( nObj2 )->bReplaceByFly = FALSE;
+ for( sal_uInt16 nObj2 = nObjMark; nObj2 < nObj; ++nObj2 )
+ pOld->GetObject( nObj2 )->bReplaceByFly = sal_False;
}
if( bSetReplaceFALSE )
{
- pObj->bReplaceByFly = FALSE;
+ pObj->bReplaceByFly = sal_False;
}
}
// alle Shape-Info-Objekte in pShapeInfos umkopieren
// (aber nach nShapeId sortieren)
- pObj->bSortByShapeId = TRUE;
+ pObj->bSortByShapeId = sal_True;
// --> OD 2008-07-28 #156763#
pObj->nTxBxComp = pObj->nTxBxComp & 0xFFFF0000;
// <--
@@ -6386,9 +6386,9 @@ void SvxMSDffManager::CheckTxBxStoryChain()
}
// voriger war letzter seiner Gruppe
if( nObj )
- pOld->GetObject( nObj-1 )->bLastBoxInChain = TRUE;
+ pOld->GetObject( nObj-1 )->bLastBoxInChain = sal_True;
// urspruengliches Array freigeben, ohne Objekte zu zerstoeren
- pOld->Remove((USHORT)0, nCnt);
+ pOld->Remove((sal_uInt16)0, nCnt);
delete pOld;
}
@@ -6410,14 +6410,14 @@ void SvxMSDffManager::GetCtrlData( long nOffsDgg_ )
// Kontroll Stream positionieren
rStCtrl.Seek( nOffsDggL );
- BYTE nVer;
- USHORT nInst;
- USHORT nFbt;
- UINT32 nLength;
+ sal_uInt8 nVer;
+ sal_uInt16 nInst;
+ sal_uInt16 nFbt;
+ sal_uInt32 nLength;
if( !this->ReadCommonRecordHeader( rStCtrl, nVer, nInst, nFbt, nLength ) ) return;
- BOOL bOk;
- ULONG nPos = nOffsDggL + DFF_COMMON_RECORD_HEADER_SIZE;
+ sal_Bool bOk;
+ sal_uLong nPos = nOffsDggL + DFF_COMMON_RECORD_HEADER_SIZE;
// Fall A: erst Drawing Group Container, dann n Mal Drawing Container
if( DFF_msofbtDggContainer == nFbt )
@@ -6425,7 +6425,7 @@ void SvxMSDffManager::GetCtrlData( long nOffsDgg_ )
GetDrawingGroupContainerData( rStCtrl, nLength );
rStCtrl.Seek( STREAM_SEEK_TO_END );
- UINT32 nMaxStrPos = rStCtrl.Tell();
+ sal_uInt32 nMaxStrPos = rStCtrl.Tell();
nPos += nLength;
// --> OD 2008-07-28 #156763#
@@ -6463,14 +6463,14 @@ void SvxMSDffManager::GetCtrlData( long nOffsDgg_ )
// ab hier: Drawing Group Container d.h. Dokument - weit gueltige Daten
// ======================= ========
//
-void SvxMSDffManager::GetDrawingGroupContainerData( SvStream& rSt, ULONG nLenDgg )
+void SvxMSDffManager::GetDrawingGroupContainerData( SvStream& rSt, sal_uLong nLenDgg )
{
- BYTE nVer;
- USHORT nInst;
- USHORT nFbt;
- UINT32 nLength;
+ sal_uInt8 nVer;
+ sal_uInt16 nInst;
+ sal_uInt16 nFbt;
+ sal_uInt32 nLength;
- ULONG nLenBStoreCont = 0, nLenFBSE = 0, nRead = 0;
+ sal_uLong nLenBStoreCont = 0, nLenFBSE = 0, nRead = 0;
// Nach einem BStore Container suchen
do
@@ -6491,8 +6491,8 @@ void SvxMSDffManager::GetDrawingGroupContainerData( SvStream& rSt, ULONG nLenDgg
// relevanten Daten aller enthaltenen FBSEs in unserem Pointer Array ablegen.
// Dabei zaehlen wir die gefundenen FBSEs im Member nBLIPCount mit.
- const ULONG nSkipBLIPLen = 20; // bis zu nBLIPLen zu ueberspringende Bytes
- const ULONG nSkipBLIPPos = 4; // dahinter bis zu nBLIPPos zu skippen
+ const sal_uLong nSkipBLIPLen = 20; // bis zu nBLIPLen zu ueberspringende Bytes
+ const sal_uLong nSkipBLIPPos = 4; // dahinter bis zu nBLIPPos zu skippen
sal_uInt32 nBLIPLen = 0, nBLIPPos = 0;
@@ -6505,7 +6505,7 @@ void SvxMSDffManager::GetDrawingGroupContainerData( SvStream& rSt, ULONG nLenDgg
{
nLenFBSE = nLength;
// ist FBSE gross genug fuer unsere Daten
- BOOL bOk = ( nSkipBLIPLen + 4 + nSkipBLIPPos + 4 <= nLenFBSE );
+ sal_Bool bOk = ( nSkipBLIPLen + 4 + nSkipBLIPPos + 4 <= nLenFBSE );
if( bOk )
{
@@ -6549,12 +6549,12 @@ void SvxMSDffManager::GetDrawingGroupContainerData( SvStream& rSt, ULONG nLenDgg
// ab hier: Drawing Container d.h. Seiten (Blatt, Dia) - weit gueltige Daten
// ================= ======
//
-void SvxMSDffManager::GetDrawingContainerData( SvStream& rSt, ULONG nLenDg,
+void SvxMSDffManager::GetDrawingContainerData( SvStream& rSt, sal_uLong nLenDg,
const unsigned long nDrawingContainerId )
{
- BYTE nVer;USHORT nInst;USHORT nFbt;UINT32 nLength;
+ sal_uInt8 nVer;sal_uInt16 nInst;sal_uInt16 nFbt;sal_uInt32 nLength;
- ULONG nReadDg = 0;
+ sal_uLong nReadDg = 0;
// Wir stehen in einem Drawing Container (je einer pro Seite)
// und muessen nun
@@ -6566,7 +6566,7 @@ void SvxMSDffManager::GetDrawingContainerData( SvStream& rSt, ULONG nLenDg,
// Patriarch gefunden (der oberste Shape Group Container) ?
if( DFF_msofbtSpgrContainer == nFbt )
{
- if(!this->GetShapeGroupContainerData( rSt, nLength, TRUE, nDrawingContainerId )) return;
+ if(!this->GetShapeGroupContainerData( rSt, nLength, sal_True, nDrawingContainerId )) return;
}
else
// blanker Shape Container ? (ausserhalb vom Shape Group Container)
@@ -6581,37 +6581,37 @@ void SvxMSDffManager::GetDrawingContainerData( SvStream& rSt, ULONG nLenDg,
while( nReadDg < nLenDg );
}
-BOOL SvxMSDffManager::GetShapeGroupContainerData( SvStream& rSt,
- ULONG nLenShapeGroupCont,
- BOOL bPatriarch,
+sal_Bool SvxMSDffManager::GetShapeGroupContainerData( SvStream& rSt,
+ sal_uLong nLenShapeGroupCont,
+ sal_Bool bPatriarch,
const unsigned long nDrawingContainerId )
{
- BYTE nVer;USHORT nInst;USHORT nFbt;UINT32 nLength;
+ sal_uInt8 nVer;sal_uInt16 nInst;sal_uInt16 nFbt;sal_uInt32 nLength;
long nStartShapeGroupCont = rSt.Tell();
// Wir stehen in einem Shape Group Container (ggfs. mehrere pro Seite)
// und muessen nun
// alle enthaltenen Shape Container abklappern
- BOOL bFirst = !bPatriarch;
- ULONG nReadSpGrCont = 0;
+ sal_Bool bFirst = !bPatriarch;
+ sal_uLong nReadSpGrCont = 0;
do
{
if( !this->ReadCommonRecordHeader( rSt, nVer, nInst, nFbt, nLength ) )
- return FALSE;
+ return sal_False;
nReadSpGrCont += DFF_COMMON_RECORD_HEADER_SIZE;
// Shape Container ?
if( DFF_msofbtSpContainer == nFbt )
{
- ULONG nGroupOffs = bFirst ? nStartShapeGroupCont - DFF_COMMON_RECORD_HEADER_SIZE : ULONG_MAX;
+ sal_uLong nGroupOffs = bFirst ? nStartShapeGroupCont - DFF_COMMON_RECORD_HEADER_SIZE : ULONG_MAX;
if ( !this->GetShapeContainerData( rSt, nLength, nGroupOffs, nDrawingContainerId ) )
- return FALSE;
- bFirst = FALSE;
+ return sal_False;
+ bFirst = sal_False;
}
else
// eingeschachtelter Shape Group Container ?
if( DFF_msofbtSpgrContainer == nFbt )
{
- if ( !this->GetShapeGroupContainerData( rSt, nLength, FALSE, nDrawingContainerId ) )
- return FALSE;
+ if ( !this->GetShapeGroupContainerData( rSt, nLength, sal_False, nDrawingContainerId ) )
+ return sal_False;
}
else
rSt.SeekRel( nLength );
@@ -6620,44 +6620,44 @@ BOOL SvxMSDffManager::GetShapeGroupContainerData( SvStream& rSt,
while( nReadSpGrCont < nLenShapeGroupCont );
// den Stream wieder korrekt positionieren
rSt.Seek( nStartShapeGroupCont + nLenShapeGroupCont );
- return TRUE;
+ return sal_True;
}
-BOOL SvxMSDffManager::GetShapeContainerData( SvStream& rSt,
- ULONG nLenShapeCont,
- ULONG nPosGroup,
+sal_Bool SvxMSDffManager::GetShapeContainerData( SvStream& rSt,
+ sal_uLong nLenShapeCont,
+ sal_uLong nPosGroup,
const unsigned long nDrawingContainerId )
{
- BYTE nVer;USHORT nInst;USHORT nFbt;UINT32 nLength;
+ sal_uInt8 nVer;sal_uInt16 nInst;sal_uInt16 nFbt;sal_uInt32 nLength;
long nStartShapeCont = rSt.Tell();
// Wir stehen in einem Shape Container (ggfs. mehrere pro Sh. Group)
// und muessen nun
// die Shape Id und File-Pos (fuer spaetere, erneute Zugriffe)
// und den ersten BStore Verweis (falls vorhanden) entnehmen
- ULONG nLenShapePropTbl = 0;
- ULONG nReadSpCont = 0;
+ sal_uLong nLenShapePropTbl = 0;
+ sal_uLong nReadSpCont = 0;
// File Offset des Shape-Containers bzw. der Gruppe(!) vermerken
//
- ULONG nStartOffs = (ULONG_MAX > nPosGroup) ?
+ sal_uLong nStartOffs = (ULONG_MAX > nPosGroup) ?
nPosGroup : nStartShapeCont - DFF_COMMON_RECORD_HEADER_SIZE;
SvxMSDffShapeInfo aInfo( nStartOffs );
// duerfte das Shape durch einen Rahmen ersetzt werden ?
// (vorausgesetzt, es zeigt sich, dass es eine TextBox ist,
// und der Text nicht gedreht ist)
- BOOL bCanBeReplaced = (ULONG_MAX > nPosGroup) ? FALSE : TRUE;
+ sal_Bool bCanBeReplaced = (ULONG_MAX > nPosGroup) ? sal_False : sal_True;
// wir wissen noch nicht, ob es eine TextBox ist
MSO_SPT eShapeType = mso_sptNil;
MSO_WrapMode eWrapMode = mso_wrapSquare;
-// BOOL bIsTextBox = FALSE;
+// sal_Bool bIsTextBox = sal_False;
// Shape analysieren
//
do
{
- if(!this->ReadCommonRecordHeader( rSt, nVer, nInst, nFbt, nLength)) return FALSE;
+ if(!this->ReadCommonRecordHeader( rSt, nVer, nInst, nFbt, nLength)) return sal_False;
nReadSpCont += DFF_COMMON_RECORD_HEADER_SIZE;
// FSP ?
if( ( DFF_msofbtSp == nFbt ) && ( 4 <= nLength ) )
@@ -6672,13 +6672,13 @@ BOOL SvxMSDffManager::GetShapeContainerData( SvStream& rSt,
{
// Wir haben die Property Table gefunden:
// nach der Blip Property suchen!
- ULONG nPropRead = 0;
- USHORT nPropId;
+ sal_uLong nPropRead = 0;
+ sal_uInt16 nPropId;
sal_uInt32 nPropVal;
nLenShapePropTbl = nLength;
-// UINT32 nPropCount = nInst;
+// sal_uInt32 nPropCount = nInst;
long nStartShapePropTbl = rSt.Tell();
-// UINT32 nComplexDataFilePos = nStartShapePropTbl + (nPropCount * 6);
+// sal_uInt32 nComplexDataFilePos = nStartShapePropTbl + (nPropCount * 6);
do
{
rSt >> nPropId
@@ -6717,22 +6717,22 @@ BOOL SvxMSDffManager::GetShapeContainerData( SvStream& rSt,
SVXMSDFF_SETTINGS_IMPORT_EXCEL))
{
if( 0 != nPropVal )
- bCanBeReplaced = FALSE;
+ bCanBeReplaced = sal_False;
}
break;
case DFF_Prop_Rotation :
if( 0 != nPropVal )
- bCanBeReplaced = FALSE;
+ bCanBeReplaced = sal_False;
break;
case DFF_Prop_gtextFStrikethrough :
if( ( 0x20002000 & nPropVal ) == 0x20002000 )
- bCanBeReplaced = FALSE;
+ bCanBeReplaced = sal_False;
break;
case DFF_Prop_fc3DLightFace :
if( ( 0x00080008 & nPropVal ) == 0x00080008 )
- bCanBeReplaced = FALSE;
+ bCanBeReplaced = sal_False;
break;
case DFF_Prop_WrapText :
@@ -6782,7 +6782,7 @@ BOOL SvxMSDffManager::GetShapeContainerData( SvStream& rSt,
&& ( (0x00080008 & nPropVal) == 0x00080008) ) // also DFF_Prop_f3D
)
{
- bCanBeReplaced = FALSE; // Mist: gedrehter Text oder 3D-Objekt!
+ bCanBeReplaced = sal_False; // Mist: gedrehter Text oder 3D-Objekt!
}
else
if( DFF_Prop_WrapText == nPropId )
@@ -6798,7 +6798,7 @@ BOOL SvxMSDffManager::GetShapeContainerData( SvStream& rSt,
if( 0x8000 & nPropId )
{
// komplexe Prop gefunden: Laenge lesen und ueberspringen
- if(!SkipBytes( rSt, nPropVal )) return FALSE;
+ if(!SkipBytes( rSt, nPropVal )) return sal_False;
nPropRead += nPropVal;
}
*/
@@ -6844,7 +6844,7 @@ BOOL SvxMSDffManager::GetShapeContainerData( SvStream& rSt,
)
) ) )
{
- aInfo.bReplaceByFly = TRUE;
+ aInfo.bReplaceByFly = sal_True;
}
pShapeInfos->Insert( new SvxMSDffShapeInfo( aInfo ) );
pShapeOrders->Insert( new SvxMSDffShapeOrder( aInfo.nShapeId ),
@@ -6853,7 +6853,7 @@ BOOL SvxMSDffManager::GetShapeContainerData( SvStream& rSt,
// und den Stream wieder korrekt positionieren
rSt.Seek( nStartShapeCont + nLenShapeCont );
- return TRUE;
+ return sal_True;
}
@@ -6863,13 +6863,13 @@ BOOL SvxMSDffManager::GetShapeContainerData( SvStream& rSt,
Zugriff auf ein Shape zur Laufzeit (ueber die Shape-Id)
----------------------------------
******************************************************************************/
-BOOL SvxMSDffManager::GetShape(ULONG nId, SdrObject*& rpShape,
+sal_Bool SvxMSDffManager::GetShape(sal_uLong nId, SdrObject*& rpShape,
SvxMSDffImportData& rData)
{
SvxMSDffShapeInfo aTmpRec(0, nId);
- aTmpRec.bSortByShapeId = TRUE;
+ aTmpRec.bSortByShapeId = sal_True;
- USHORT nFound;
+ sal_uInt16 nFound;
if( pShapeInfos->Seek_Entry(&aTmpRec, &nFound) )
{
SvxMSDffShapeInfo& rInfo = *pShapeInfos->GetObject( nFound );
@@ -6878,8 +6878,8 @@ BOOL SvxMSDffManager::GetShape(ULONG nId, SdrObject*& rpShape,
if( rStCtrl.GetError() )
rStCtrl.ResetError();
// FilePos des/der Stream(s) merken
- ULONG nOldPosCtrl = rStCtrl.Tell();
- ULONG nOldPosData = pStData ? pStData->Tell() : nOldPosCtrl;
+ sal_uLong nOldPosCtrl = rStCtrl.Tell();
+ sal_uLong nOldPosData = pStData ? pStData->Tell() : nOldPosCtrl;
// das Shape im Steuer Stream anspringen
rStCtrl.Seek( rInfo.nFilePos );
@@ -6895,7 +6895,7 @@ BOOL SvxMSDffManager::GetShape(ULONG nId, SdrObject*& rpShape,
pStData->Seek( nOldPosData );
return ( 0 != rpShape );
}
- return FALSE;
+ return sal_False;
}
@@ -6903,9 +6903,9 @@ BOOL SvxMSDffManager::GetShape(ULONG nId, SdrObject*& rpShape,
/* Zugriff auf ein BLIP zur Laufzeit (bei bereits bekannter Blip-Nr)
---------------------------------
******************************************************************************/
-BOOL SvxMSDffManager::GetBLIP( ULONG nIdx_, Graphic& rData, Rectangle* pVisArea ) const
+sal_Bool SvxMSDffManager::GetBLIP( sal_uLong nIdx_, Graphic& rData, Rectangle* pVisArea ) const
{
- BOOL bOk = FALSE; // Ergebnisvariable initialisieren
+ sal_Bool bOk = sal_False; // Ergebnisvariable initialisieren
if ( pStData )
{
// check if a graphic for this blipId is already imported
@@ -6930,8 +6930,8 @@ BOOL SvxMSDffManager::GetBLIP( ULONG nIdx_, Graphic& rData, Rectangle* pVisArea
}
if ( !bOk )
{
- USHORT nIdx = USHORT( nIdx_ );
- if( !nIdx || (pBLIPInfos->Count() < nIdx) ) return FALSE;
+ sal_uInt16 nIdx = sal_uInt16( nIdx_ );
+ if( !nIdx || (pBLIPInfos->Count() < nIdx) ) return sal_False;
// eventuell alte(s) Errorflag(s) loeschen
if( rStCtrl.GetError() )
@@ -6941,8 +6941,8 @@ BOOL SvxMSDffManager::GetBLIP( ULONG nIdx_, Graphic& rData, Rectangle* pVisArea
pStData->ResetError();
// FilePos des/der Stream(s) merken
- ULONG nOldPosCtrl = rStCtrl.Tell();
- ULONG nOldPosData = pStData ? pStData->Tell() : nOldPosCtrl;
+ sal_uLong nOldPosCtrl = rStCtrl.Tell();
+ sal_uLong nOldPosData = pStData ? pStData->Tell() : nOldPosCtrl;
// passende Info-Struct aus unserem Pointer Array nehmen
SvxMSDffBLIPInfo& rInfo = *(*pBLIPInfos)[ nIdx-1 ];
@@ -6960,7 +6960,7 @@ BOOL SvxMSDffManager::GetBLIP( ULONG nIdx_, Graphic& rData, Rectangle* pVisArea
// Datenstream, in dem die Grafik liegen koennte!
if( pStData2->GetError() )
pStData2->ResetError();
- ULONG nOldPosData2 = pStData2->Tell();
+ sal_uLong nOldPosData2 = pStData2->Tell();
// das BLIP Atom im zweiten Daten Stream anspringen
pStData2->Seek( rInfo.nFilePos );
// ggfs. Fehlerstatus zuruecksetzen
@@ -6993,23 +6993,23 @@ BOOL SvxMSDffManager::GetBLIP( ULONG nIdx_, Graphic& rData, Rectangle* pVisArea
/* Zugriff auf ein BLIP zur Laufzeit (mit korrekt positioniertem Stream)
---------------------------------
******************************************************************************/
-BOOL SvxMSDffManager::GetBLIPDirect( SvStream& rBLIPStream, Graphic& rData, Rectangle* pVisArea ) const
+sal_Bool SvxMSDffManager::GetBLIPDirect( SvStream& rBLIPStream, Graphic& rData, Rectangle* pVisArea ) const
{
- ULONG nOldPos = rBLIPStream.Tell();
+ sal_uLong nOldPos = rBLIPStream.Tell();
int nRes = GRFILTER_OPENERROR; // Fehlervariable initialisieren
// nachschauen, ob es sich auch wirklich um ein BLIP handelt
- UINT32 nLength;
- USHORT nInst, nFbt( 0 );
- BYTE nVer;
+ sal_uInt32 nLength;
+ sal_uInt16 nInst, nFbt( 0 );
+ sal_uInt8 nVer;
if( ReadCommonRecordHeader( rBLIPStream, nVer, nInst, nFbt, nLength) && ( 0xF018 <= nFbt ) && ( 0xF117 >= nFbt ) )
{
Size aMtfSize100;
- BOOL bMtfBLIP = FALSE;
- BOOL bZCodecCompression = FALSE;
+ sal_Bool bMtfBLIP = sal_False;
+ sal_Bool bZCodecCompression = sal_False;
// Nun exakt auf den Beginn der eingebetteten Grafik positionieren
- ULONG nSkip = ( nInst & 0x0001 ) ? 32 : 16;
+ sal_uLong nSkip = ( nInst & 0x0001 ) ? 32 : 16;
switch( nInst & 0xFFFE )
{
@@ -7030,7 +7030,7 @@ BOOL SvxMSDffManager::GetBLIPDirect( SvStream& rBLIPStream, Graphic& rData, Rect
// skip rest of header
nSkip = 6;
- bMtfBLIP = bZCodecCompression = TRUE;
+ bMtfBLIP = bZCodecCompression = sal_True;
}
break;
case 0x46A : // One byte tag then JPEG (= JFIF) data
@@ -7114,7 +7114,7 @@ BOOL SvxMSDffManager::GetBLIPDirect( SvStream& rBLIPStream, Graphic& rData, Rect
if( ( nInst & 0xFFFE ) == 0x7A8 )
{ // DIBs direkt holen
Bitmap aNew;
- if( aNew.Read( *pGrStream, FALSE ) )
+ if( aNew.Read( *pGrStream, sal_False ) )
{
rData = Graphic( aNew );
nRes = GRFILTER_OK;
@@ -7162,7 +7162,7 @@ BOOL SvxMSDffManager::GetBLIPDirect( SvStream& rBLIPStream, Graphic& rData, Rect
}
/* static */
-BOOL SvxMSDffManager::ReadCommonRecordHeader(DffRecordHeader& rRec, SvStream& rIn)
+sal_Bool SvxMSDffManager::ReadCommonRecordHeader(DffRecordHeader& rRec, SvStream& rIn)
{
rRec.nFilePos = rIn.Tell();
return SvxMSDffManager::ReadCommonRecordHeader( rIn,rRec.nRecVer,
@@ -7173,15 +7173,15 @@ BOOL SvxMSDffManager::ReadCommonRecordHeader(DffRecordHeader& rRec, SvStream& rI
/* auch static */
-BOOL SvxMSDffManager::ReadCommonRecordHeader( SvStream& rSt,
- BYTE& rVer,
- USHORT& rInst,
- USHORT& rFbt,
- UINT32& rLength )
+sal_Bool SvxMSDffManager::ReadCommonRecordHeader( SvStream& rSt,
+ sal_uInt8& rVer,
+ sal_uInt16& rInst,
+ sal_uInt16& rFbt,
+ sal_uInt32& rLength )
{
sal_uInt16 nTmp;
rSt >> nTmp >> rFbt >> rLength;
- rVer = sal::static_int_cast< BYTE >(nTmp & 15);
+ rVer = sal::static_int_cast< sal_uInt8 >(nTmp & 15);
rInst = nTmp >> 4;
return rSt.GetError() == 0;
}
@@ -7189,8 +7189,8 @@ BOOL SvxMSDffManager::ReadCommonRecordHeader( SvStream& rSt,
-BOOL SvxMSDffManager::ProcessClientAnchor(SvStream& rStData, ULONG nDatLen,
- char*& rpBuff, UINT32& rBuffLen ) const
+sal_Bool SvxMSDffManager::ProcessClientAnchor(SvStream& rStData, sal_uLong nDatLen,
+ char*& rpBuff, sal_uInt32& rBuffLen ) const
{
if( nDatLen )
{
@@ -7198,11 +7198,11 @@ BOOL SvxMSDffManager::ProcessClientAnchor(SvStream& rStData, ULONG nDatLen,
rBuffLen = nDatLen;
rStData.Read( rpBuff, nDatLen );
}
- return TRUE;
+ return sal_True;
}
-BOOL SvxMSDffManager::ProcessClientData(SvStream& rStData, ULONG nDatLen,
- char*& rpBuff, UINT32& rBuffLen ) const
+sal_Bool SvxMSDffManager::ProcessClientData(SvStream& rStData, sal_uLong nDatLen,
+ char*& rpBuff, sal_uInt32& rBuffLen ) const
{
if( nDatLen )
{
@@ -7210,7 +7210,7 @@ BOOL SvxMSDffManager::ProcessClientData(SvStream& rStData, ULONG nDatLen,
rBuffLen = nDatLen;
rStData.Read( rpBuff, nDatLen );
}
- return TRUE;
+ return sal_True;
}
@@ -7219,19 +7219,19 @@ void SvxMSDffManager::ProcessClientAnchor2( SvStream& /* rSt */, DffRecordHeader
return; // wird von SJ im Draw ueberladen
}
-ULONG SvxMSDffManager::Calc_nBLIPPos( ULONG nOrgVal, ULONG /* nStreamPos */ ) const
+sal_uLong SvxMSDffManager::Calc_nBLIPPos( sal_uLong nOrgVal, sal_uLong /* nStreamPos */ ) const
{
return nOrgVal;
}
-BOOL SvxMSDffManager::GetOLEStorageName( long /* nOLEId */, String&, SvStorageRef&, uno::Reference < embed::XStorage >& ) const
+sal_Bool SvxMSDffManager::GetOLEStorageName( long /* nOLEId */, String&, SvStorageRef&, uno::Reference < embed::XStorage >& ) const
{
- return FALSE;
+ return sal_False;
}
-BOOL SvxMSDffManager::ShapeHasText( ULONG /* nShapeId */, ULONG /* nFilePos */ ) const
+sal_Bool SvxMSDffManager::ShapeHasText( sal_uLong /* nShapeId */, sal_uLong /* nFilePos */ ) const
{
- return TRUE;
+ return sal_True;
}
// --> OD 2004-12-14 #i32596# - add new parameter <_nCalledByGroup>
@@ -7265,7 +7265,7 @@ const GDIMetaFile* SvxMSDffManager::lcl_GetMetaFileFromGrf_Impl( const Graphic&
const Size aSz(lcl_GetPrefSize(rGrf, MAP_100TH_MM));
VirtualDevice aVirtDev;
- aVirtDev.EnableOutput( FALSE );
+ aVirtDev.EnableOutput( sal_False );
MapMode aMM(MAP_100TH_MM);
aVirtDev.SetMapMode( aMM );
@@ -7282,15 +7282,15 @@ const GDIMetaFile* SvxMSDffManager::lcl_GetMetaFileFromGrf_Impl( const Graphic&
return pMtf;
}
-BOOL SvxMSDffManager::MakeContentStream( SotStorage * pStor, const GDIMetaFile & rMtf )
+sal_Bool SvxMSDffManager::MakeContentStream( SotStorage * pStor, const GDIMetaFile & rMtf )
{
String aPersistStream( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( SVEXT_PERSIST_STREAM ) ) );
SotStorageStreamRef xStm = pStor->OpenSotStream( aPersistStream );
xStm->SetVersion( pStor->GetVersion() );
xStm->SetBufferSize( 8192 );
- USHORT nAspect = ASPECT_CONTENT;
- ULONG nAdviseModes = 2;
+ sal_uInt16 nAspect = ASPECT_CONTENT;
+ sal_uLong nAdviseModes = 2;
Impl_OlePres aEle( FORMAT_GDIMETAFILE );
// Die Groesse in 1/100 mm umrechnen
@@ -7311,7 +7311,7 @@ BOOL SvxMSDffManager::MakeContentStream( SotStorage * pStor, const GDIMetaFile &
}
struct ClsIDs {
- UINT32 nId;
+ sal_uInt32 nId;
const sal_Char* pSvrName;
const sal_Char* pDspName;
};
@@ -7424,24 +7424,24 @@ static ClsIDs aClsIDs[] = {
{ 0, "", "" } };
-BOOL SvxMSDffManager::ConvertToOle2( SvStream& rStm, UINT32 nReadLen,
+sal_Bool SvxMSDffManager::ConvertToOle2( SvStream& rStm, sal_uInt32 nReadLen,
const GDIMetaFile * pMtf, const SotStorageRef& rDest )
{
- BOOL bMtfRead = FALSE;
+ sal_Bool bMtfRead = sal_False;
SotStorageStreamRef xOle10Stm = rDest->OpenSotStream( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "\1Ole10Native" ) ),
STREAM_WRITE| STREAM_SHARE_DENYALL );
if( xOle10Stm->GetError() )
- return FALSE;
+ return sal_False;
- UINT32 nType;
- UINT32 nRecType;
- UINT32 nStrLen;
+ sal_uInt32 nType;
+ sal_uInt32 nRecType;
+ sal_uInt32 nStrLen;
String aSvrName;
- UINT32 nDummy0;
- UINT32 nDummy1;
- UINT32 nDataLen;
- BYTE * pData;
- UINT32 nBytesRead = 0;
+ sal_uInt32 nDummy0;
+ sal_uInt32 nDummy1;
+ sal_uInt32 nDataLen;
+ sal_uInt8 * pData;
+ sal_uInt32 nBytesRead = 0;
do
{
rStm >> nType;
@@ -7453,7 +7453,7 @@ BOOL SvxMSDffManager::ConvertToOle2( SvStream& rStm, UINT32 nReadLen,
{
sal_Char * pBuf = new sal_Char[ nStrLen ];
rStm.Read( pBuf, nStrLen );
- aSvrName.Assign( String( pBuf, (USHORT) nStrLen-1, gsl_getSystemTextEncoding() ) );
+ aSvrName.Assign( String( pBuf, (sal_uInt16) nStrLen-1, gsl_getSystemTextEncoding() ) );
delete[] pBuf;
}
else
@@ -7463,15 +7463,15 @@ BOOL SvxMSDffManager::ConvertToOle2( SvStream& rStm, UINT32 nReadLen,
rStm >> nDummy1;
rStm >> nDataLen;
- nBytesRead += 6 * sizeof( UINT32 ) + nStrLen + nDataLen;
+ nBytesRead += 6 * sizeof( sal_uInt32 ) + nStrLen + nDataLen;
if( !rStm.IsEof() && nReadLen > nBytesRead && nDataLen )
{
if( xOle10Stm.Is() )
{
- pData = new BYTE[ nDataLen ];
+ pData = new sal_uInt8[ nDataLen ];
if( !pData )
- return FALSE;
+ return sal_False;
rStm.Read( pData, nDataLen );
@@ -7492,13 +7492,13 @@ BOOL SvxMSDffManager::ConvertToOle2( SvStream& rStm, UINT32 nReadLen,
if( pIds->nId )
{
// gefunden!
- ULONG nCbFmt = SotExchange::RegisterFormatName( aSvrName );
+ sal_uLong nCbFmt = SotExchange::RegisterFormatName( aSvrName );
rDest->SetClass( SvGlobalName( pIds->nId, 0, 0, 0xc0,0,0,0,0,0,0,0x46 ), nCbFmt,
String( pIds->pDspName, RTL_TEXTENCODING_ASCII_US ) );
}
else
{
- ULONG nCbFmt = SotExchange::RegisterFormatName( aSvrName );
+ sal_uLong nCbFmt = SotExchange::RegisterFormatName( aSvrName );
rDest->SetClass( SvGlobalName(), nCbFmt, aSvrName );
}
@@ -7506,8 +7506,8 @@ BOOL SvxMSDffManager::ConvertToOle2( SvStream& rStm, UINT32 nReadLen,
}
else if( nRecType == 5 && !pMtf )
{
- ULONG nPos = rStm.Tell();
- UINT16 sz[4];
+ sal_uLong nPos = rStm.Tell();
+ sal_uInt16 sz[4];
rStm.Read( sz, 8 );
//rStm.SeekRel( 8 );
Graphic aGraphic;
@@ -7515,7 +7515,7 @@ BOOL SvxMSDffManager::ConvertToOle2( SvStream& rStm, UINT32 nReadLen,
{
const GDIMetaFile& rMtf = aGraphic.GetGDIMetaFile();
MakeContentStream( rDest, rMtf );
- bMtfRead = TRUE;
+ bMtfRead = sal_True;
}
// set behind the data
rStm.Seek( nPos + nDataLen );
@@ -7528,10 +7528,10 @@ BOOL SvxMSDffManager::ConvertToOle2( SvStream& rStm, UINT32 nReadLen,
if( !bMtfRead && pMtf )
{
MakeContentStream( rDest, *pMtf );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
const char* GetInternalServerName_Impl( const SvGlobalName& aGlobName )
@@ -7598,7 +7598,7 @@ const char* GetInternalServerName_Impl( const SvGlobalName& aGlobName )
return ::rtl::OUString();
}
-com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > SvxMSDffManager::CheckForConvertToSOObj( UINT32 nConvertFlags,
+com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > SvxMSDffManager::CheckForConvertToSOObj( sal_uInt32 nConvertFlags,
SotStorage& rSrcStg, const uno::Reference < embed::XStorage >& rDestStorage,
const Graphic& rGrf,
const Rectangle& rVisArea )
@@ -7613,12 +7613,12 @@ com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > SvxMS
{
static struct _ObjImpType
{
- UINT32 nFlag;
+ sal_uInt32 nFlag;
const char* pFactoryNm;
// GlobalNameId
- UINT32 n1;
- USHORT n2, n3;
- BYTE b8, b9, b10, b11, b12, b13, b14, b15;
+ sal_uInt32 n1;
+ sal_uInt16 n2, n3;
+ sal_uInt8 b8, b9, b10, b11, b12, b13, b14, b15;
} aArr[] = {
{ OLE_MATHTYPE_2_STARMATH, "smath",
0x0002ce02L, 0x0000, 0x0000,
@@ -7681,7 +7681,7 @@ com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > SvxMS
else
{
SfxFilterMatcher aMatch( sStarName );
- SotStorageRef xStorage = new SotStorage( FALSE, *pStream );
+ SotStorageRef xStorage = new SotStorage( sal_False, *pStream );
rSrcStg.CopyTo( xStorage );
xStorage->Commit();
xStorage.Clear();
@@ -7758,12 +7758,12 @@ com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > SvxMS
// don't modify the object
//TODO/LATER: remove those hacks, that needs to be done differently!
- //xIPObj->EnableSetModified( FALSE );
+ //xIPObj->EnableSetModified( sal_False );
awt::Size aSize;
aSize.Width = aSz.Width();
aSize.Height = aSz.Height();
xObj->setVisualAreaSize( nViewAspect, aSize );
- //xIPObj->EnableSetModified( TRUE );
+ //xIPObj->EnableSetModified( sal_True );
}
else if ( sStarName.EqualsAscii( "smath" ) )
{ // SJ: force the object to recalc its visarea
@@ -7786,7 +7786,7 @@ SdrOle2Obj* SvxMSDffManager::CreateSdrOLEFromStorage(
const Rectangle& rVisArea,
SvStream* pDataStrm,
ErrCode& rError,
- UINT32 nConvertFlags,
+ sal_uInt32 nConvertFlags,
sal_Int64 nReccomendedAspect )
{
sal_Int64 nAspect = nReccomendedAspect;
@@ -7797,7 +7797,7 @@ SdrOle2Obj* SvxMSDffManager::CreateSdrOLEFromStorage(
// Ist der 01Ole-Stream ueberhaupt vorhanden ?
// ( ist er z.B. bei FontWork nicht )
// Wenn nicht -> Einbindung als Grafik
- BOOL bValidStorage = FALSE;
+ sal_Bool bValidStorage = sal_False;
String aDstStgName( String::CreateFromAscii(
RTL_CONSTASCII_STRINGPARAM(MSO_OLE_Obj)));
@@ -7809,7 +7809,7 @@ SdrOle2Obj* SvxMSDffManager::CreateSdrOLEFromStorage(
if( xObjStg.Is() )
{
{
- BYTE aTestA[10]; // exist the \1CompObj-Stream ?
+ sal_uInt8 aTestA[10]; // exist the \1CompObj-Stream ?
SvStorageStreamRef xSrcTst = xObjStg->OpenSotStream(
String(RTL_CONSTASCII_STRINGPARAM("\1CompObj"),
RTL_TEXTENCODING_MS_1252 ));
@@ -7840,7 +7840,7 @@ SdrOle2Obj* SvxMSDffManager::CreateSdrOLEFromStorage(
STREAM_STD_READ | STREAM_NOCREATE );
if ( xObjInfoSrc.Is() && !xObjInfoSrc->GetError() )
{
- BYTE nByte = 0;
+ sal_uInt8 nByte = 0;
*xObjInfoSrc >> nByte;
if ( ( nByte >> 4 ) & embed::Aspects::MSOLE_ICON )
nAspect = embed::Aspects::MSOLE_ICON;
@@ -7881,21 +7881,21 @@ SdrOle2Obj* SvxMSDffManager::CreateSdrOLEFromStorage(
if( xObjStor->GetError() )
{
rError = xObjStor->GetError();
- bValidStorage = FALSE;
+ bValidStorage = sal_False;
}
else if( !xObjStor.Is() )
- bValidStorage = FALSE;
+ bValidStorage = sal_False;
}
}
else if( pDataStrm )
{
- UINT32 nLen, nDummy;
+ sal_uInt32 nLen, nDummy;
*pDataStrm >> nLen >> nDummy;
if( SVSTREAM_OK != pDataStrm->GetError() ||
// Id in BugDoc - exist there other Ids?
// The ConvertToOle2 - does not check for consistent
0x30008 != nDummy )
- bValidStorage = FALSE;
+ bValidStorage = sal_False;
else
{
// or is it an OLE-1 Stream in the DataStream?
@@ -7934,9 +7934,9 @@ SdrOle2Obj* SvxMSDffManager::CreateSdrOLEFromStorage(
aAwtSz.Width = rVisArea.GetWidth();
aAwtSz.Height = rVisArea.GetHeight();
}
- //xInplaceObj->EnableSetModified( FALSE );
+ //xInplaceObj->EnableSetModified( sal_False );
xObj->setVisualAreaSize( nAspect, aAwtSz );
- //xInplaceObj->EnableSetModified( TRUE );*/
+ //xInplaceObj->EnableSetModified( sal_True );*/
}
catch( uno::Exception& )
{
@@ -7961,7 +7961,7 @@ SdrObject* SvxMSDffManager::GetAutoForm( MSO_SPT eTyp ) const
{
SdrObject* pRet = NULL;
- if(120 >= UINT16(eTyp))
+ if(120 >= sal_uInt16(eTyp))
{
pRet = new SdrRectObj();
}
@@ -8036,15 +8036,15 @@ SvxMSDffImportRec::SvxMSDffImportRec()
eShapeType( mso_sptNil )
{
eLineStyle = mso_lineSimple; // GPF-Bug #66227#
- bDrawHell = FALSE;
- bHidden = FALSE;
-// bInGroup = FALSE;
- bReplaceByFly = FALSE;
- bLastBoxInChain = TRUE;
- bHasUDefProp = FALSE; // was the DFF_msofbtUDefProp record set?
- bVFlip = FALSE;
- bHFlip = FALSE;
- bAutoWidth = FALSE;
+ bDrawHell = sal_False;
+ bHidden = sal_False;
+// bInGroup = sal_False;
+ bReplaceByFly = sal_False;
+ bLastBoxInChain = sal_True;
+ bHasUDefProp = sal_False; // was the DFF_msofbtUDefProp record set?
+ bVFlip = sal_False;
+ bHFlip = sal_False;
+ bAutoWidth = sal_False;
}
SvxMSDffImportRec::SvxMSDffImportRec(const SvxMSDffImportRec& rCopy)
diff --git a/filter/source/msfilter/msocximex.cxx b/filter/source/msfilter/msocximex.cxx
index 82663cdf2523..e7b5eebb8b7f 100644
--- a/filter/source/msfilter/msocximex.cxx
+++ b/filter/source/msfilter/msocximex.cxx
@@ -1684,7 +1684,7 @@ sal_Bool OCX_OptionButton::Import(com::sun::star::uno::Reference<
if (pValue && !bSetInDialog)
{
- INT16 nTmp = pValue[0]-0x30;
+ sal_Int16 nTmp = pValue[0]-0x30;
aTmp <<= nTmp;
rPropSet->setPropertyValue( WW8_ASCII2STR("DefaultState"), aTmp);
}
@@ -2322,7 +2322,7 @@ sal_Bool OCX_ToggleButton::Import(com::sun::star::uno::Reference<
if (pValue)
{
- INT16 nTmp=pValue[0]-0x30;
+ sal_Int16 nTmp=pValue[0]-0x30;
aTmp <<= nTmp == 1;
rPropSet->setPropertyValue( WW8_ASCII2STR("DefaultState"), aTmp);
}
@@ -3615,7 +3615,7 @@ void OCX_ContainerControl::ProcessControl(OCX_Control* pControl,SvStorageStream*
// #117490# DR: container records provide size of substream, use it here...
// remember initial position to set correct stream position
- ULONG nStrmPos = oStream->Tell();
+ sal_uLong nStrmPos = oStream->Tell();
// import control, may return with invalid stream position
pControl->FullRead(oStream);
// set stream to position behind substream of this control
@@ -3668,7 +3668,7 @@ OCX_MultiPage::OCX_MultiPage( SotStorageRef& parent,
nVertPos(1), nHorzPos(7), nMousePointer(0), nBorderColor(0x80000012),
nKeepScrollBarsVisible(3), nCycle(0), nBorderStyle(0), nSpecialEffect(0),
nPicture(0), nPictureAlignment(2), nPictureSizeMode(0),
- bPictureTiling(FALSE), nAccelerator(0), nIcon(0), pCaption(0),
+ bPictureTiling(sal_False), nAccelerator(0), nIcon(0), pCaption(0),
nScrollWidth(0), nScrollHeight(0), nIconLen(0), pIcon(0), nPictureLen(0),
pPicture(0)
{
@@ -3676,7 +3676,7 @@ OCX_MultiPage::OCX_MultiPage( SotStorageRef& parent,
mnForeColor = 0x80000012L,
mnBackColor = 0x8000000FL;
bSetInDialog = true;// UserForm control only
- aFontData.SetHasAlign(TRUE);
+ aFontData.SetHasAlign(sal_True);
containerType = MULTIPAGE;
mnCurrentPageStep = 0;
}
@@ -3778,7 +3778,7 @@ OCX_Page::OCX_Page( SotStorageRef& parent,
nHorzPos(7), nMousePointer(0), nBorderColor(0x80000012),
nKeepScrollBarsVisible(3), nCycle(0), nBorderStyle(0), nSpecialEffect(0),
nPicture(0), nPictureAlignment(2), nPictureSizeMode(0),
- bPictureTiling(FALSE), nAccelerator(0), nIcon(0), pCaption(0),
+ bPictureTiling(sal_False), nAccelerator(0), nIcon(0), pCaption(0),
nScrollWidth(0), nScrollHeight(0), nIconLen(0), pIcon(0), nPictureLen(0),
pPicture(0)
{
@@ -3786,7 +3786,7 @@ OCX_Page::OCX_Page( SotStorageRef& parent,
mnForeColor = 0x80000012,
mnBackColor = 0x8000000F,
bSetInDialog = true;// UserForm control only
- aFontData.SetHasAlign(TRUE);
+ aFontData.SetHasAlign(sal_True);
}
@@ -3846,7 +3846,7 @@ OCX_Frame::OCX_Frame( SotStorageRef& parent,
nHorzPos(7), nMousePointer(0), nBorderColor(0x80000012),
nKeepScrollBarsVisible(3), nCycle(0), nBorderStyle(0), nSpecialEffect(0),
nPicture(0), nPictureAlignment(2), nPictureSizeMode(0),
- bPictureTiling(FALSE), nAccelerator(0), nIcon(0), pCaption(0),
+ bPictureTiling(sal_False), nAccelerator(0), nIcon(0), pCaption(0),
nScrollWidth(0), nScrollHeight(0), nScrollLeft(0), nScrollTop(0), nIconLen(0), pIcon(0), nPictureLen(0),
pPicture(0)
{
@@ -3854,7 +3854,7 @@ OCX_Frame::OCX_Frame( SotStorageRef& parent,
mnForeColor = 0x80000012;
mnBackColor = 0x8000000F;
bSetInDialog = true;// UserForm control only
- aFontData.SetHasAlign(TRUE);
+ aFontData.SetHasAlign(sal_True);
}
@@ -4042,7 +4042,7 @@ OCX_UserForm::OCX_UserForm( SotStorageRef& parent,
nHorzPos(7), nMousePointer(0), nBorderColor(0x80000012), nChildrenB(0),
nKeepScrollBarsVisible(3), nCycle(0), nBorderStyle(0), nSpecialEffect(0),
nPicture(0), nPictureAlignment(2), nPictureSizeMode(0),
- bPictureTiling(FALSE), nAccelerator(0), nIcon(0), pCaption(0),
+ bPictureTiling(sal_False), nAccelerator(0), nIcon(0), pCaption(0),
nScrollWidth(0), nScrollHeight(0), nScrollLeft(0), nScrollTop(0), nIconLen(0), pIcon(0), nPictureLen(0),
pPicture(0)
{
@@ -4053,7 +4053,7 @@ OCX_UserForm::OCX_UserForm( SotStorageRef& parent,
{
xProps->getPropertyValue(C2S("DefaultContext")) >>= mxCtx;
}
- aFontData.SetHasAlign(TRUE);
+ aFontData.SetHasAlign(sal_True);
}
sal_Bool OCX_UserForm::Read(SvStorageStream *pS)
{
@@ -4547,7 +4547,7 @@ OCX_Control * SvxMSConvertOCXControls::OCX_Factory(
sal_Bool SvxMSConvertOCXControls::ReadOCXStream( SvStorageRef& rSrc1,
- uno::Reference < drawing::XShape > *pShapeRef,BOOL bFloatingCtrl)
+ uno::Reference < drawing::XShape > *pShapeRef,sal_Bool bFloatingCtrl)
{
SvStorageStreamRef xCrash = rSrc1->OpenSotStream( WW8_ASCII2STR("contents") );
@@ -4599,7 +4599,7 @@ sal_Bool SvxMSConvertOCXControls::ReadOCXStream( SvStorageRef& rSrc1,
sal_Bool SvxMSConvertOCXControls::ReadOCXExcelKludgeStream(
SvStorageStreamRef& rSrc1, uno::Reference < drawing::XShape > *
- pShapeRef,BOOL bFloatingCtrl)
+ pShapeRef,sal_Bool bFloatingCtrl)
{
sal_Bool bRet=sal_False;
/*Get Class Id of this object, see if it is one of the types
@@ -4763,7 +4763,7 @@ sal_Bool OCX_CheckBox::Import(com::sun::star::uno::Reference<
if (pValue && !bSetInDialog)
{
- INT16 nTmp=pValue[0]-0x30;
+ sal_Int16 nTmp=pValue[0]-0x30;
aTmp <<= nTmp;
rPropSet->setPropertyValue( WW8_ASCII2STR("DefaultState"), aTmp);
}
@@ -5013,7 +5013,7 @@ sal_Bool OCX_FontData::Read(SvStorageStream *pS)
lclReadCharArray( *pS, pFontName, nFontNameLen, pS->Tell() - nStart);
ReadAlign(pS, pS->Tell() - nStart, 4);
- return(TRUE);
+ return(sal_True);
}
void OCX_FontData::Import(uno::Reference< beans::XPropertySet > &rPropSet)
@@ -5181,7 +5181,7 @@ sal_Bool OCX_Image::Read(SotStorageStream *pS)
// only import image control for UserForms
return sal_False;
}
- ULONG nStart = pS->Tell();
+ sal_uLong nStart = pS->Tell();
*pS >> nIdentifier;
DBG_ASSERT(nStandardId==nIdentifier,
"A control that has a different identifier");
@@ -5697,7 +5697,7 @@ void OCX_SpinButton::GetBoolProperty(
sal_Bool OCX_SpinButton::WriteData( SvStream& rStrm ) const
{
sal_Bool bRet = sal_True;
- ULONG nStartPos = rStrm.Tell();
+ sal_uLong nStartPos = rStrm.Tell();
rStrm << sal_Int32( 0 ) << mnBlockFlags;
diff --git a/filter/source/msfilter/msoleexp.cxx b/filter/source/msfilter/msoleexp.cxx
index ebafd06688b0..bf00ddc966f1 100644
--- a/filter/source/msfilter/msoleexp.cxx
+++ b/filter/source/msfilter/msoleexp.cxx
@@ -146,13 +146,13 @@ void SvxMSExportOLEObjects::ExportOLEObject( svt::EmbeddedObjectRef& rObj, SvSto
const SfxFilter* pExpFilter = NULL;
{
static struct _ObjExpType {
- UINT32 nFlag;
+ sal_uInt32 nFlag;
const char* pFilterNm;
// GlobalNameId
struct _GlobalNameIds {
- UINT32 n1;
- USHORT n2, n3;
- BYTE b8, b9, b10, b11, b12, b13, b14, b15;
+ sal_uInt32 n1;
+ sal_uInt16 n2, n3;
+ sal_uInt8 b8, b9, b10, b11, b12, b13, b14, b15;
}
aGlNmIds[4];
} aArr[] = {
@@ -220,7 +220,7 @@ void SvxMSExportOLEObjects::ExportOLEObject( svt::EmbeddedObjectRef& rObj, SvSto
aSeq[1].Value <<= ::rtl::OUString( pExpFilter->GetName() );
uno::Reference < frame::XStorable > xStor( rObj->getComponent(), uno::UNO_QUERY );
xStor->storeToURL( ::rtl::OUString::createFromAscii( "private:stream" ), aSeq );
- SotStorageRef xOLEStor = new SotStorage( pStream, TRUE );
+ SotStorageRef xOLEStor = new SotStorage( pStream, sal_True );
xOLEStor->CopyTo( &rDestStg );
rDestStg.Commit();
}
diff --git a/filter/source/msfilter/msvbahelper.cxx b/filter/source/msfilter/msvbahelper.cxx
index 3bbcf7b4727d..02fa3d60e248 100644
--- a/filter/source/msfilter/msvbahelper.cxx
+++ b/filter/source/msfilter/msvbahelper.cxx
@@ -185,7 +185,7 @@ bool hasMacro( SfxObjectShell* pShell, const String& sLibrary, String& sMod, con
StarBASIC* pBasic = pBasicMgr->GetLib( sLibrary );
if ( !pBasic )
{
- USHORT nId = pBasicMgr->GetLibId( sLibrary );
+ sal_uInt16 nId = pBasicMgr->GetLibId( sLibrary );
pBasicMgr->LoadLib( nId );
pBasic = pBasicMgr->GetLib( sLibrary );
}
diff --git a/filter/source/msfilter/msvbasic.cxx b/filter/source/msfilter/msvbasic.cxx
index 65d39953ec20..1e148d2f1bcb 100644
--- a/filter/source/msfilter/msvbasic.cxx
+++ b/filter/source/msfilter/msvbasic.cxx
@@ -75,7 +75,7 @@ VBA_Impl::VBA_Impl(SvStorage &rIn, bool bCmmntd)
VBA_Impl::~VBA_Impl()
{
delete [] pOffsets;
- for (ULONG i=0;i<aVBAStrings.GetSize();++i)
+ for (sal_uLong i=0;i<aVBAStrings.GetSize();++i)
delete aVBAStrings.Get(i);
}
@@ -528,7 +528,7 @@ const StringArray &VBA_Impl::Decompress(sal_uInt16 nIndex, int *pOverflow)
sTempStringa = String( RTL_CONSTASCII_USTRINGPARAM( "\x0D\x0A" ) );
String sTempStringb(sTempStringa);
sTempStringb+=sComment;
- for(ULONG i=0;i<aVBAStrings.GetSize();i++)
+ for(sal_uLong i=0;i<aVBAStrings.GetSize();i++)
{
aVBAStrings.Get(i)->SearchAndReplaceAll(
sTempStringa,sTempStringb);
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 05f99aa36813..40a0a6b19e18 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -235,9 +235,9 @@ SvStream& operator>>( SvStream& rIn, PptSlidePersistAtom& rAtom )
SV_IMPL_PTRARR(_PptSlidePersistList,PptSlidePersistEntry*);
-USHORT PptSlidePersistList::FindPage(UINT32 nId) const
+sal_uInt16 PptSlidePersistList::FindPage(sal_uInt32 nId) const
{
- for ( USHORT i=0; i < Count(); i++ )
+ for ( sal_uInt16 i=0; i < Count(); i++ )
{
if (operator[](i)->GetSlideId()==nId) return i;
}
@@ -325,9 +325,9 @@ SvStream& operator>>(SvStream& rIn, PptDocumentAtom& rAtom)
// 39 bShowComments 1
DffRecordHeader aHd;
- INT32 nSlideX,nSlideY, nNoticeX, nNoticeY, nDummy;
- UINT16 nSlidePageFormat;
- INT8 nEmbeddedTrueType, nTitlePlaceHoldersOmitted, nRightToLeft, nShowComments;
+ sal_Int32 nSlideX,nSlideY, nNoticeX, nNoticeY, nDummy;
+ sal_uInt16 nSlidePageFormat;
+ sal_Int8 nEmbeddedTrueType, nTitlePlaceHoldersOmitted, nRightToLeft, nShowComments;
rIn >> aHd
>> nSlideX >> nSlideY
@@ -359,7 +359,7 @@ SvStream& operator>>(SvStream& rIn, PptDocumentAtom& rAtom)
void PptSlideLayoutAtom::Clear()
{
eLayout = 0;
- for ( USHORT i = 0; i < 8; i++ )
+ for ( sal_uInt16 i = 0; i < 8; i++ )
{
aPlaceholderId[ i ] = 0;
aPlacementId[ i ] = 0;
@@ -418,7 +418,7 @@ void PptColorSchemeAtom::Clear()
memset(&aData[0], 0, 32);
}
-Color PptColorSchemeAtom::GetColor( USHORT nNum ) const
+Color PptColorSchemeAtom::GetColor( sal_uInt16 nNum ) const
{
Color aRetval;
if ( nNum < 8 )
@@ -581,9 +581,9 @@ PptSlidePersistEntry::PptSlidePersistEntry() :
pBObj ( NULL ),
bBObjIsTemporary ( sal_True ),
ePageKind ( PPT_MASTERPAGE ),
- bNotesMaster ( FALSE ),
- bHandoutMaster ( FALSE ),
- bStarDrawFiller ( FALSE )
+ bNotesMaster ( sal_False ),
+ bHandoutMaster ( sal_False ),
+ bStarDrawFiller ( sal_False )
{
HeaderFooterOfs[ 0 ] = HeaderFooterOfs[ 1 ] = HeaderFooterOfs[ 2 ] = HeaderFooterOfs[ 3 ] = 0;
}
@@ -606,12 +606,12 @@ SdrEscherImport::SdrEscherImport( PowerPointImportParam& rParam, const String& r
nStreamLen ( 0 ),
nTextStylesIndex ( 0xffff ),
eCharSetSystem ( gsl_getSystemTextEncoding() ),
- bWingdingsChecked ( FALSE ),
- bWingdingsAvailable ( FALSE ),
- bMonotypeSortsChecked ( FALSE ),
- bMonotypeSortsAvailable ( FALSE ),
- bTimesNewRomanChecked ( FALSE ),
- bTimesNewRomanAvailable ( FALSE ),
+ bWingdingsChecked ( sal_False ),
+ bWingdingsAvailable ( sal_False ),
+ bMonotypeSortsChecked ( sal_False ),
+ bMonotypeSortsAvailable ( sal_False ),
+ bTimesNewRomanChecked ( sal_False ),
+ bTimesNewRomanAvailable ( sal_False ),
rImportParam ( rParam )
{
}
@@ -631,7 +631,7 @@ const PptSlideLayoutAtom* SdrEscherImport::GetSlideLayoutAtom() const
sal_Bool SdrEscherImport::ReadString( String& rStr ) const
{
- sal_Bool bRet = FALSE;
+ sal_Bool bRet = sal_False;
DffRecordHeader aStrHd;
rStCtrl >> aStrHd;
if (aStrHd.nRecType == PPT_PST_TextBytesAtom
@@ -641,8 +641,8 @@ sal_Bool SdrEscherImport::ReadString( String& rStr ) const
sal_Bool bUniCode =
(aStrHd.nRecType == PPT_PST_TextCharsAtom
|| aStrHd.nRecType == PPT_PST_CString);
- bRet=TRUE;
- ULONG nBytes = aStrHd.nRecLen;
+ bRet=sal_True;
+ sal_uLong nBytes = aStrHd.nRecLen;
MSDFFReadZString( rStCtrl, rStr, nBytes, bUniCode );
aStrHd.SeekToEndOfRecord( rStCtrl );
}
@@ -651,37 +651,37 @@ sal_Bool SdrEscherImport::ReadString( String& rStr ) const
return bRet;
}
-FASTBOOL SdrEscherImport::GetColorFromPalette(USHORT /*nNum*/, Color& /*rColor*/) const
+FASTBOOL SdrEscherImport::GetColorFromPalette(sal_uInt16 /*nNum*/, Color& /*rColor*/) const
{
- return FALSE;
+ return sal_False;
}
-BOOL SdrEscherImport::SeekToShape( SvStream& /*rSt*/, void* /*pClientData*/, UINT32 /*nId*/) const
+sal_Bool SdrEscherImport::SeekToShape( SvStream& /*rSt*/, void* /*pClientData*/, sal_uInt32 /*nId*/) const
{
- return FALSE;
+ return sal_False;
}
-PptFontEntityAtom* SdrEscherImport::GetFontEnityAtom( UINT32 nNum ) const
+PptFontEntityAtom* SdrEscherImport::GetFontEnityAtom( sal_uInt32 nNum ) const
{
PptFontEntityAtom* pRetValue = NULL;
if ( pFonts && ( nNum < pFonts->Count() ) )
- pRetValue = (*pFonts)[ (USHORT)nNum ];
+ pRetValue = (*pFonts)[ (sal_uInt16)nNum ];
return pRetValue;
}
-CharSet SdrEscherImport::GetCharSet( UINT32 nNum ) const
+CharSet SdrEscherImport::GetCharSet( sal_uInt32 nNum ) const
{
CharSet eRetValue( eCharSetSystem );
if ( pFonts && ( nNum < pFonts->Count() ) )
- eRetValue = (*pFonts)[ (USHORT)nNum ]->eCharSet;
+ eRetValue = (*pFonts)[ (sal_uInt16)nNum ]->eCharSet;
return eRetValue;
}
-BOOL SdrEscherImport::IsFontAvailable( UINT32 nNum ) const
+sal_Bool SdrEscherImport::IsFontAvailable( sal_uInt32 nNum ) const
{
- BOOL bRetValue = FALSE;
+ sal_Bool bRetValue = sal_False;
if ( pFonts && ( nNum < pFonts->Count() ) )
- bRetValue = (*pFonts)[ (USHORT)nNum ]->bAvailable;
+ bRetValue = (*pFonts)[ (sal_uInt16)nNum ]->bAvailable;
return bRetValue;
}
@@ -699,7 +699,7 @@ void SdrEscherImport::ProcessClientAnchor2( SvStream& rSt, DffRecordHeader& rHd,
}
else
{
- INT16 ls, ts, rs, bs;
+ sal_Int16 ls, ts, rs, bs;
rSt >> ts >> ls >> rs >> bs; // etwas seltsame Koordinatenreihenfolge ...
l = ls, t = ts, r = rs, b = bs;
}
@@ -708,7 +708,7 @@ void SdrEscherImport::ProcessClientAnchor2( SvStream& rSt, DffRecordHeader& rHd,
Scale( r );
Scale( b );
rObj.aChildAnchor = Rectangle( l, t, r, b );
- rObj.bChildAnchor = TRUE;
+ rObj.bChildAnchor = sal_True;
return;
};
@@ -797,13 +797,13 @@ void SdrEscherImport::RecolorGraphic( SvStream& rSt, sal_uInt32 nRecLen, Graphic
sal_uInt32 nSearch = OriginalGlobalColors[ j ];
sal_uInt32 nReplace = NewGlobalColors[ j ];
- pSearchColors[ j ].SetRed( (BYTE)nSearch );
- pSearchColors[ j ].SetGreen( (BYTE)( nSearch >> 8 ) );
- pSearchColors[ j ].SetBlue( (BYTE)( nSearch >> 16 ) );
+ pSearchColors[ j ].SetRed( (sal_uInt8)nSearch );
+ pSearchColors[ j ].SetGreen( (sal_uInt8)( nSearch >> 8 ) );
+ pSearchColors[ j ].SetBlue( (sal_uInt8)( nSearch >> 16 ) );
- pReplaceColors[ j ].SetRed( (BYTE)nReplace );
- pReplaceColors[ j ].SetGreen( (BYTE)( nReplace >> 8 ) );
- pReplaceColors[ j ].SetBlue( (BYTE)( nReplace >> 16 ) );
+ pReplaceColors[ j ].SetRed( (sal_uInt8)nReplace );
+ pReplaceColors[ j ].SetGreen( (sal_uInt8)( nReplace >> 8 ) );
+ pReplaceColors[ j ].SetBlue( (sal_uInt8)( nReplace >> 16 ) );
}
GDIMetaFile aGdiMetaFile( rGraphic.GetGDIMetaFile() );
aGdiMetaFile.ReplaceColors( pSearchColors, pReplaceColors,
@@ -827,7 +827,7 @@ void SdrEscherImport::RecolorGraphic( SvStream& rSt, sal_uInt32 nRecLen, Graphic
SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, void* pData, Rectangle& rTextRect, SdrObject* pOriginalObj )
{
if ( pOriginalObj && pOriginalObj->ISA( SdrObjCustomShape ) )
- pOriginalObj->SetMergedItem( SdrTextFixedCellHeightItem( TRUE ) );
+ pOriginalObj->SetMergedItem( SdrTextFixedCellHeightItem( sal_True ) );
// we are initializing our return value with the object that was imported by our escher import
SdrObject* pRet = pOriginalObj;
@@ -838,7 +838,7 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
if ( ! ( rObjData.nSpFlags & SP_FGROUP ) ) // sj: #114758# ...
{
PptOEPlaceholderAtom aPlaceholderAtom;
- INT16 nHeaderFooterInstance = -1;
+ sal_Int16 nHeaderFooterInstance = -1;
if ( maShapeRecords.SeekToContent( rSt, DFF_msofbtClientData, SEEK_FROM_CURRENT_AND_RESTART ) )
{
@@ -881,9 +881,9 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
aClientDataHd.SeekToEndOfRecord( rSt );
}
}
- if ( ( aPlaceholderAtom.nPlaceholderId == PPT_PLACEHOLDER_NOTESSLIDEIMAGE ) && ( rPersistEntry.bNotesMaster == FALSE ) )
+ if ( ( aPlaceholderAtom.nPlaceholderId == PPT_PLACEHOLDER_NOTESSLIDEIMAGE ) && ( rPersistEntry.bNotesMaster == sal_False ) )
{
- USHORT nPageNum = pSdrModel->GetPageCount();
+ sal_uInt16 nPageNum = pSdrModel->GetPageCount();
if ( nPageNum > 0 )
nPageNum--;
@@ -900,7 +900,7 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
sal_Bool bVerticalText = sal_False;
// and if the text object is not empty, it must be applied to pRet, the object we
// initially got from our escher import
- INT32 nTextRotationAngle = 0;
+ sal_Int32 nTextRotationAngle = 0;
if ( IsProperty( DFF_Prop_txflTextFlow ) )
{
MSO_TextFlow eTextFlow = (MSO_TextFlow)( GetPropertyValue( DFF_Prop_txflTextFlow ) & 0xFFFF );
@@ -937,10 +937,10 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
aTextObj.SetVertical( bVerticalText );
if ( pRet )
{
- BOOL bDeleteSource = aTextObj.GetOEPlaceHolderAtom() != 0;
- if ( bDeleteSource && ( pRet->ISA( SdrGrafObj ) == FALSE ) // we are not allowed to get
- && ( pRet->ISA( SdrObjGroup ) == FALSE ) // grouped placeholder objects
- && ( pRet->ISA( SdrOle2Obj ) == FALSE ) )
+ sal_Bool bDeleteSource = aTextObj.GetOEPlaceHolderAtom() != 0;
+ if ( bDeleteSource && ( pRet->ISA( SdrGrafObj ) == sal_False ) // we are not allowed to get
+ && ( pRet->ISA( SdrObjGroup ) == sal_False ) // grouped placeholder objects
+ && ( pRet->ISA( SdrOle2Obj ) == sal_False ) )
SdrObject::Free( pRet );
}
sal_uInt32 nTextFlags = aTextObj.GetTextFlags();
@@ -1089,7 +1089,7 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
{
if ( !rPersistEntry.pPresentationObjects )
{
- rPersistEntry.pPresentationObjects = new UINT32[ PPT_STYLESHEETENTRYS ];
+ rPersistEntry.pPresentationObjects = new sal_uInt32[ PPT_STYLESHEETENTRYS ];
memset( rPersistEntry.pPresentationObjects, 0, PPT_STYLESHEETENTRYS * 4 );
}
if ( !rPersistEntry.pPresentationObjects[ nDestinationInstance ] )
@@ -1206,7 +1206,7 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
pTObj->SetMergedItem( SdrTextRightDistItem( nTextRight ) );
pTObj->SetMergedItem( SdrTextUpperDistItem( nTextTop ) );
pTObj->SetMergedItem( SdrTextLowerDistItem( nTextBottom ) );
- pTObj->SetMergedItem( SdrTextFixedCellHeightItem( TRUE ) );
+ pTObj->SetMergedItem( SdrTextFixedCellHeightItem( sal_True ) );
if ( !pTObj->ISA( SdrObjCustomShape ) )
pTObj->SetSnapRect( rTextRect );
@@ -1371,7 +1371,7 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
// spMaster property, so we are patching the table
if ( rPersistEntry.nDrawingDgId != 0xffffffff )
{
- UINT32 nSec = ( rObjData.nShapeId >> 10 ) - 1;
+ sal_uInt32 nSec = ( rObjData.nShapeId >> 10 ) - 1;
if ( mpFidcls && ( nSec < mnIdClusters ) )
mpFidcls[ nSec ].dgid = rPersistEntry.nDrawingDgId; // insert the correct drawing id;
}
@@ -1395,21 +1395,21 @@ void SdrEscherImport::CheckWingdings() const
{
OutputDevice* pDev = (OutputDevice*)Application::GetDefaultDevice();
((SdrEscherImport*)this)->bWingdingsAvailable = pDev->IsFontAvailable( String( RTL_CONSTASCII_USTRINGPARAM( "WINGDINGS" ) ) );
- ((SdrEscherImport*)this)->bWingdingsChecked = TRUE;
+ ((SdrEscherImport*)this)->bWingdingsChecked = sal_True;
}
void SdrEscherImport::CheckMonotypeSorts() const
{
OutputDevice* pDev = (OutputDevice*)Application::GetDefaultDevice();
((SdrEscherImport*)this)->bMonotypeSortsAvailable = pDev->IsFontAvailable( String( RTL_CONSTASCII_USTRINGPARAM( "MONOTYPE SORTS" ) ) );
- ((SdrEscherImport*)this)->bMonotypeSortsChecked = TRUE;
+ ((SdrEscherImport*)this)->bMonotypeSortsChecked = sal_True;
}
void SdrEscherImport::CheckTimesNewRoman() const
{
OutputDevice* pDev = (OutputDevice*)Application::GetDefaultDevice();
((SdrEscherImport*)this)->bTimesNewRomanAvailable = pDev->IsFontAvailable( String( RTL_CONSTASCII_USTRINGPARAM( "TIMES NEW ROMAN" ) ) );
- ((SdrEscherImport*)this)->bTimesNewRomanChecked = TRUE;
+ ((SdrEscherImport*)this)->bTimesNewRomanChecked = sal_True;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -1449,7 +1449,7 @@ SdrPowerPointImport::SdrPowerPointImport( PowerPointImportParam& rParam, const S
rStCtrl.Seek( 0 );
DffRecordManager aPptRecManager; // contains all first level container and atoms
- aPptRecManager.Consume( rStCtrl, FALSE, nStreamLen );
+ aPptRecManager.Consume( rStCtrl, sal_False, nStreamLen );
for ( pHd = aPptRecManager.Last(); pHd; pHd = aPptRecManager.Prev() )
{
if ( pHd->nRecType == PPT_PST_UserEditAtom )
@@ -1460,23 +1460,23 @@ SdrPowerPointImport::SdrPowerPointImport( PowerPointImportParam& rParam, const S
}
}
if ( !pHd )
- bOk = FALSE;
+ bOk = sal_False;
}
}
if ( rStCtrl.GetError() != 0 )
- bOk = FALSE;
+ bOk = sal_False;
if ( bOk )
{
nPersistPtrAnz = aUserEditAtom.nMaxPersistWritten + 1;
if ( ( nPersistPtrAnz >> 2 ) > nStreamLen ) // sj: at least nPersistPtrAnz is not allowed to be greater than filesize
- bOk = FALSE; // (it should not be greater than the PPT_PST_PersistPtrIncrementalBlock, but
+ bOk = sal_False; // (it should not be greater than the PPT_PST_PersistPtrIncrementalBlock, but
// we are reading this block later, so we do not have access yet)
- if ( bOk && ( nPersistPtrAnz < ( SAL_MAX_UINT32 / sizeof( UINT32 ) ) ) )
- pPersistPtr = new (std::nothrow) UINT32[ nPersistPtrAnz ];
+ if ( bOk && ( nPersistPtrAnz < ( SAL_MAX_UINT32 / sizeof( sal_uInt32 ) ) ) )
+ pPersistPtr = new (std::nothrow) sal_uInt32[ nPersistPtrAnz ];
if ( !pPersistPtr )
- bOk = FALSE;
+ bOk = sal_False;
if ( bOk )
{
memset( pPersistPtr, 0x00, nPersistPtrAnz * 4 );
@@ -1494,7 +1494,7 @@ SdrPowerPointImport::SdrPowerPointImport( PowerPointImportParam& rParam, const S
rStCtrl >> aPersistHd;
if ( aPersistHd.nRecType == PPT_PST_PersistPtrIncrementalBlock )
{
- ULONG nPibLen = aPersistHd.GetRecEndFilePos();
+ sal_uLong nPibLen = aPersistHd.GetRecEndFilePos();
while ( bOk && ( rStCtrl.GetError() == 0 ) && ( rStCtrl.Tell() < nPibLen ) )
{
sal_uInt32 nOfs, nAnz;
@@ -1511,7 +1511,7 @@ SdrPowerPointImport::SdrPowerPointImport( PowerPointImportParam& rParam, const S
pPersistPtr[ nOfs ] = nPt;
if ( pPersistPtr[ nOfs ] > nStreamLen )
{
- bOk = FALSE;
+ bOk = sal_False;
DBG_ERROR("SdrPowerPointImport::Ctor(): Ungueltiger Eintrag im Persist-Directory!");
}
}
@@ -1521,7 +1521,7 @@ SdrPowerPointImport::SdrPowerPointImport( PowerPointImportParam& rParam, const S
if ( bOk && nAnz > 0 )
{
DBG_ERROR("SdrPowerPointImport::Ctor(): Nicht alle Persist-Directory Entraege gelesen!");
- bOk = FALSE;
+ bOk = sal_False;
}
}
}
@@ -1536,14 +1536,14 @@ SdrPowerPointImport::SdrPowerPointImport( PowerPointImportParam& rParam, const S
}
}
if ( rStCtrl.GetError() != 0 )
- bOk = FALSE;
+ bOk = sal_False;
if ( bOk )
{ // Document PersistEntry checken
nDocStreamPos = aUserEditAtom.nDocumentRef;
if ( nDocStreamPos > nPersistPtrAnz )
{
DBG_ERROR("SdrPowerPointImport::Ctor(): aUserEditAtom.nDocumentRef ungueltig!");
- bOk = FALSE;
+ bOk = sal_False;
}
}
if ( bOk )
@@ -1552,7 +1552,7 @@ SdrPowerPointImport::SdrPowerPointImport( PowerPointImportParam& rParam, const S
if ( nDocStreamPos >= nStreamLen )
{
DBG_ERROR("SdrPowerPointImport::Ctor(): nDocStreamPos >= nStreamLen!");
- bOk = FALSE;
+ bOk = sal_False;
}
}
if ( bOk )
@@ -1571,7 +1571,7 @@ SdrPowerPointImport::SdrPowerPointImport( PowerPointImportParam& rParam, const S
rStCtrl >> aDocAtom;
}
else
- bOk = FALSE;
+ bOk = sal_False;
if ( bOk )
{
@@ -1623,7 +1623,7 @@ SdrPowerPointImport::SdrPowerPointImport( PowerPointImportParam& rParam, const S
pE->bStarDrawFiller = sal_True; // this is a dummy master page
pMasterPages->C40_INSERT( PptSlidePersistEntry, pE, 0 );
- USHORT nPageListNum = 0;
+ sal_uInt16 nPageListNum = 0;
DffRecordHeader* pSlideListWithTextHd = aDocRecManager.GetRecordHeader( PPT_PST_SlideListWithText );
PptSlidePersistEntry* pPreviousPersist = NULL;
while ( pSlideListWithTextHd && ( nPageListNum < 3 ) )
@@ -1677,13 +1677,13 @@ SdrPowerPointImport::SdrPowerPointImport( PowerPointImportParam& rParam, const S
for ( nPageListNum = 0; nPageListNum < 3; nPageListNum++ )
{
PptSlidePersistList* pPageList = GetPageList( PptPageKind( nPageListNum ) );
- for ( USHORT nPageNum = 0; nPageNum < pPageList->Count(); nPageNum++ )
+ for ( sal_uInt16 nPageNum = 0; nPageNum < pPageList->Count(); nPageNum++ )
{
PptSlidePersistEntry* pE2 = (*pPageList)[ nPageNum ];
- ULONG nPersist = pE2->aPersistAtom.nPsrReference;
+ sal_uLong nPersist = pE2->aPersistAtom.nPsrReference;
if ( ( nPersist > 0 ) && ( nPersist < nPersistPtrAnz ) )
{
- ULONG nFPos = pPersistPtr[ nPersist ];
+ sal_uLong nFPos = pPersistPtr[ nPersist ];
if ( nFPos < nStreamLen )
{
rStCtrl.Seek( nFPos );
@@ -1752,7 +1752,7 @@ SdrPowerPointImport::SdrPowerPointImport( PowerPointImportParam& rParam, const S
else if ( pHeadersFootersHd->nRecInstance == 4 ) // notes master
ImportHeaderFooterContainer( *pHeadersFootersHd, aNotesMaster );
}
- for ( USHORT i = 0; i < pMasterPages->Count(); i++ )
+ for ( sal_uInt16 i = 0; i < pMasterPages->Count(); i++ )
{
if ( (*pMasterPages)[ i ]->bNotesMaster )
(*pMasterPages)[ i ]->pHeaderFooterEntry = new HeaderFooterEntry( aNotesMaster );
@@ -1763,7 +1763,7 @@ SdrPowerPointImport::SdrPowerPointImport( PowerPointImportParam& rParam, const S
}
}
if ( ( rStCtrl.GetError() != 0 ) || ( pDefaultSheet == NULL ) )
- bOk = FALSE;
+ bOk = sal_False;
pPPTStyleSheet = pDefaultSheet;
rStCtrl.Seek( 0 );
}
@@ -1784,9 +1784,9 @@ sal_Bool PPTConvertOCXControls::InsertControl(
const com::sun::star::awt::Size& rSize,
com::sun::star::uno::Reference<
com::sun::star::drawing::XShape > *pShape,
- BOOL /*bFloatingCtrl*/)
+ sal_Bool /*bFloatingCtrl*/)
{
- sal_Bool bRetValue = FALSE;
+ sal_Bool bRetValue = sal_False;
try
{
::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > xShape;
@@ -1822,7 +1822,7 @@ sal_Bool PPTConvertOCXControls::InsertControl(
xControlShape->setControl( xControlModel );
if (pShape)
*pShape = xShape;
- bRetValue = TRUE;
+ bRetValue = sal_True;
}
}
}
@@ -1830,7 +1830,7 @@ sal_Bool PPTConvertOCXControls::InsertControl(
}
catch( ... )
{
- bRetValue = FALSE;
+ bRetValue = sal_False;
}
return bRetValue;
};
@@ -1898,7 +1898,7 @@ SdrObject* SdrPowerPointImport::ImportOLE( long nOLEId,
{
SdrObject* pRet = NULL;
- UINT32 nOldPos = rStCtrl.Tell();
+ sal_uInt32 nOldPos = rStCtrl.Tell();
Graphic aGraphic( rGraf );
@@ -1932,7 +1932,7 @@ SdrObject* SdrPowerPointImport::ImportOLE( long nOLEId,
rStCtrl >> aHd;
sal_uInt32 nLen = aHd.nRecLen - 4;
- if ( (INT32)nLen > 0 )
+ if ( (sal_Int32)nLen > 0 )
{
sal_Bool bSuccess = sal_False;
@@ -1951,7 +1951,7 @@ SdrObject* SdrPowerPointImport::ImportOLE( long nOLEId,
if ( bSuccess )
{
SvStream* pDest = ::utl::UcbStreamHelper::CreateStream( aTmpFile.GetURL(), STREAM_READ );
- Storage* pObjStor = pDest ? new Storage( *pDest, TRUE ) : NULL;
+ Storage* pObjStor = pDest ? new Storage( *pDest, sal_True ) : NULL;
if ( pObjStor )
{
SotStorageRef xObjStor( new SotStorage( pObjStor ) );
@@ -1966,8 +1966,8 @@ SdrObject* SdrPowerPointImport::ImportOLE( long nOLEId,
SotStorageStreamRef xSrcTst = xObjStor->OpenSotStream( String( RTL_CONSTASCII_USTRINGPARAM( "\1Ole" ) ) );
if ( xSrcTst.Is() )
{
- BYTE aTestA[ 10 ];
- BOOL bGetItAsOle = ( sizeof( aTestA ) == xSrcTst->Read( aTestA, sizeof( aTestA ) ) );
+ sal_uInt8 aTestA[ 10 ];
+ sal_Bool bGetItAsOle = ( sizeof( aTestA ) == xSrcTst->Read( aTestA, sizeof( aTestA ) ) );
if ( !bGetItAsOle )
{ // maybe there is a contentsstream in here
xSrcTst = xObjStor->OpenSotStream( String( RTL_CONSTASCII_USTRINGPARAM( "Contents" ) ), STREAM_READWRITE | STREAM_NOCREATE );
@@ -1989,14 +1989,14 @@ SdrObject* SdrPowerPointImport::ImportOLE( long nOLEId,
// TODO/LATER: need MediaType for Graphic
aObj.SetGraphic( rGraf, ::rtl::OUString() );
- pRet = new SdrOle2Obj( aObj, aNm, rBoundRect, FALSE );
+ pRet = new SdrOle2Obj( aObj, aNm, rBoundRect, sal_False );
}
}
if ( !pRet && ( pOe->nType == PPT_PST_ExControl ) )
{
PPTConvertOCXControls aPPTConvertOCXControls( pOe->pShell, eAktPageKind );
::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > xShape;
- if ( aPPTConvertOCXControls.ReadOCXStream( xObjStor, &xShape, FALSE ) )
+ if ( aPPTConvertOCXControls.ReadOCXStream( xObjStor, &xShape, sal_False ) )
pRet = GetSdrObjectFromXShape( xShape );
}
if ( !pRet )
@@ -2024,7 +2024,7 @@ SdrObject* SdrPowerPointImport::ImportOLE( long nOLEId,
{
//TODO/LATER: keep on hacking?!
// modifiziert wollen wir nicht werden
- //xInplaceObj->EnableSetModified( FALSE );
+ //xInplaceObj->EnableSetModified( sal_False );
if ( rVisArea.IsEmpty() )
{
MapUnit aMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( pOe->nAspect ) );
@@ -2041,7 +2041,7 @@ SdrObject* SdrPowerPointImport::ImportOLE( long nOLEId,
awt::Size aSize( rVisArea.GetSize().Width(), rVisArea.GetSize().Height() );
xObj->setVisualAreaSize( pOe->nAspect, aSize );
}
- //xInplaceObj->EnableSetModified( TRUE );
+ //xInplaceObj->EnableSetModified( sal_True );
}
svt::EmbeddedObjectRef aObj( xObj, pOe->nAspect );
@@ -2049,7 +2049,7 @@ SdrObject* SdrPowerPointImport::ImportOLE( long nOLEId,
// TODO/LATER: need MediaType for Graphic
aObj.SetGraphic( aGraphic, ::rtl::OUString() );
- pRet = new SdrOle2Obj( aObj, aNm, rBoundRect, FALSE );
+ pRet = new SdrOle2Obj( aObj, aNm, rBoundRect, sal_False );
}
}
}
@@ -2065,20 +2065,20 @@ SdrObject* SdrPowerPointImport::ImportOLE( long nOLEId,
return pRet;
}
-SvMemoryStream* SdrPowerPointImport::ImportExOleObjStg( UINT32 nPersistPtr, UINT32& nOleId ) const
+SvMemoryStream* SdrPowerPointImport::ImportExOleObjStg( sal_uInt32 nPersistPtr, sal_uInt32& nOleId ) const
{
SvMemoryStream* pRet = NULL;
if ( nPersistPtr && ( nPersistPtr < nPersistPtrAnz ) )
{
- UINT32 nOldPos, nOfs = pPersistPtr[ nPersistPtr ];
+ sal_uInt32 nOldPos, nOfs = pPersistPtr[ nPersistPtr ];
nOldPos = rStCtrl.Tell();
rStCtrl.Seek( nOfs );
DffRecordHeader aHd;
rStCtrl >> aHd;
if ( aHd.nRecType == DFF_PST_ExOleObjStg )
{
- UINT32 nLen = aHd.nRecLen - 4;
- if ( (INT32)nLen > 0 )
+ sal_uInt32 nLen = aHd.nRecLen - 4;
+ if ( (sal_Int32)nLen > 0 )
{
rStCtrl >> nOleId;
pRet = new SvMemoryStream;
@@ -2100,7 +2100,7 @@ void SdrPowerPointImport::SeekOle( SfxObjectShell* pShell, sal_uInt32 nFilterOpt
{
DffRecordHeader* pHd;
- UINT32 nOldPos = rStCtrl.Tell();
+ sal_uInt32 nOldPos = rStCtrl.Tell();
if ( nFilterOptions & 1 )
{
pHd = aDocRecManager.GetRecordHeader( PPT_PST_List, SEEK_FROM_BEGINNING );
@@ -2112,17 +2112,17 @@ void SdrPowerPointImport::SeekOle( SfxObjectShell* pShell, sal_uInt32 nFilterOpt
{
if ( SeekToRec( rStCtrl, PPT_PST_VBAInfoAtom, pHd->GetRecEndFilePos(), pHd ) )
{
- UINT32 nPersistPtr, nIDoNotKnow1, nIDoNotKnow2;
+ sal_uInt32 nPersistPtr, nIDoNotKnow1, nIDoNotKnow2;
rStCtrl >> nPersistPtr
>> nIDoNotKnow1
>> nIDoNotKnow2;
- UINT32 nOleId;
+ sal_uInt32 nOleId;
SvMemoryStream* pBas = ImportExOleObjStg( nPersistPtr, nOleId );
if ( pBas )
{
- SotStorageRef xSource( new SotStorage( pBas, TRUE ) );
- SotStorageRef xDest( new SotStorage( new SvMemoryStream(), TRUE ) );
+ SotStorageRef xSource( new SotStorage( pBas, sal_True ) );
+ SotStorageRef xDest( new SotStorage( new SvMemoryStream(), sal_True ) );
if ( xSource.Is() && xDest.Is() )
{
// is this a visual basic storage ?
@@ -2135,18 +2135,18 @@ void SdrPowerPointImport::SeekOle( SfxObjectShell* pShell, sal_uInt32 nFilterOpt
{
SvStorageInfoList aList;
xSource->FillInfoList( &aList );
- UINT32 i;
+ sal_uInt32 i;
- BOOL bCopied = TRUE;
+ sal_Bool bCopied = sal_True;
for ( i = 0; i < aList.Count(); i++ ) // copy all entrys
{
const SvStorageInfo& rInfo = aList[ i ];
if ( !xSource->CopyTo( rInfo.GetName(), xMacros, rInfo.GetName() ) )
- bCopied = FALSE;
+ bCopied = sal_False;
}
if ( i && bCopied )
{
- SvxImportMSVBasic aMSVBas( *pShell, *xDest, TRUE, FALSE );
+ SvxImportMSVBasic aMSVBas( *pShell, *xDest, sal_True, sal_False );
//int nSuccess = aMSVBas.Import( String( RTL_CONSTASCII_USTRINGPARAM( "MACROS" ) ),
// String( RTL_CONSTASCII_USTRINGPARAM( "VBA" ) ), TRUE, FALSE );
@@ -2170,10 +2170,10 @@ void SdrPowerPointImport::SeekOle( SfxObjectShell* pShell, sal_uInt32 nFilterOpt
*xOriginal << nIDoNotKnow1
<< nIDoNotKnow2;
- UINT32 nSource, nToCopy, nBufSize;
+ sal_uInt32 nSource, nToCopy, nBufSize;
nSource = rStCtrl.Tell();
nToCopy = pHd->nRecLen;
- BYTE* pBuf = new BYTE[ 0x40000 ]; // 256KB Buffer
+ sal_uInt8* pBuf = new sal_uInt8[ 0x40000 ]; // 256KB Buffer
if ( pBuf )
{
while ( nToCopy )
@@ -2229,7 +2229,7 @@ void SdrPowerPointImport::SeekOle( SfxObjectShell* pShell, sal_uInt32 nFilterOpt
if ( aAt.nPersistPtr && ( aAt.nPersistPtr < nPersistPtrAnz ) )
{
- UINT32 nId;
+ sal_uInt32 nId;
rStCtrl.Seek( pPersistPtr[ aAt.nPersistPtr ] );
DffRecordHeader aHd;
rStCtrl >> aHd;
@@ -2251,11 +2251,11 @@ void SdrPowerPointImport::SeekOle( SfxObjectShell* pShell, sal_uInt32 nFilterOpt
sal_Bool SdrPowerPointImport::ReadFontCollection()
{
- sal_Bool bRet = FALSE;
+ sal_Bool bRet = sal_False;
DffRecordHeader* pEnvHd = aDocRecManager.GetRecordHeader( PPT_PST_Environment );
if ( pEnvHd )
{
- ULONG nFPosMerk = rStCtrl.Tell(); // FilePos merken fuer spaetere Restauration
+ sal_uLong nFPosMerk = rStCtrl.Tell(); // FilePos merken fuer spaetere Restauration
pEnvHd->SeekToContent( rStCtrl );
DffRecordHeader aListHd;
if ( SeekToRec( rStCtrl, PPT_PST_FontCollection, pEnvHd->GetRecEndFilePos(), &aListHd ) )
@@ -2264,7 +2264,7 @@ sal_Bool SdrPowerPointImport::ReadFontCollection()
VirtualDevice* pVDev = NULL;
while ( SeekToRec( rStCtrl, PPT_PST_FontEntityAtom, aListHd.GetRecEndFilePos() ) )
{
- bRet = TRUE;
+ bRet = sal_True;
if ( !pFonts )
pFonts = new PptFontCollection;
PptFontEntityAtom* pFont = new PptFontEntityAtom;
@@ -2307,7 +2307,7 @@ sal_Bool SdrPowerPointImport::ReadFontCollection()
if ( pPrinter )
{
Font aOldFont( pPrinter->GetFont() );
- aFont.SetKerning( TRUE );
+ aFont.SetKerning( sal_True );
pPrinter->SetFont( aFont );
aMetric = pPrinter->GetFontMetric();
pPrinter->SetFont( aOldFont );
@@ -2398,13 +2398,13 @@ SdrObject* SdrPowerPointImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj*
SdrTextObj* pText = pSdrText;
if ( pTextObj->Count() )
{
- UINT32 nDestinationInstance = pTextObj->GetDestinationInstance() ;
+ sal_uInt32 nDestinationInstance = pTextObj->GetDestinationInstance() ;
SdrOutliner& rOutliner = pText->ImpGetDrawOutliner();
if ( ( pText->GetObjInventor() == SdrInventor ) && ( pText->GetObjIdentifier() == OBJ_TITLETEXT ) ) // Outliner-Style fuer Titel-Textobjekt?!? (->von DL)
rOutliner.Init( OUTLINERMODE_TITLEOBJECT ); // Outliner reset
- BOOL bOldUpdateMode = rOutliner.GetUpdateMode();
- rOutliner.SetUpdateMode( FALSE );
+ sal_Bool bOldUpdateMode = rOutliner.GetUpdateMode();
+ rOutliner.SetUpdateMode( sal_False );
if ( pSheet )
{
if ( rOutliner.GetStyleSheet( 0 ) != pSheet )
@@ -2415,12 +2415,12 @@ SdrObject* SdrPowerPointImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj*
const PPTParagraphObj* pPreviousParagraph = NULL;
for ( PPTParagraphObj* pPara = pTextObj->First(); pPara; pPara = pTextObj->Next() )
{
- UINT32 nTextSize = pPara->GetTextSize();
+ sal_uInt32 nTextSize = pPara->GetTextSize();
if ( ! ( nTextSize & 0xffff0000 ) )
{
PPTPortionObj* pPortion;
sal_Unicode* pParaText = new sal_Unicode[ nTextSize ];
- UINT32 nCurrentIndex = 0;
+ sal_uInt32 nCurrentIndex = 0;
for ( pPortion = pPara->First(); pPortion; pPortion = pPara->Next() )
{
if ( pPortion->mpFieldItem )
@@ -2451,12 +2451,12 @@ SdrObject* SdrPowerPointImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj*
nCurrentIndex += nCharacters;
}
}
- sal_uInt16 nParaIndex = (UINT16)pTextObj->GetCurrentIndex();
+ sal_uInt16 nParaIndex = (sal_uInt16)pTextObj->GetCurrentIndex();
SfxStyleSheet* pS = ( ppStyleSheetAry ) ? ppStyleSheetAry[ pPara->pParaSet->mnDepth ] : pSheet;
ESelection aSelection( nParaIndex, 0, nParaIndex, 0 );
rOutliner.Insert( String(), nParaIndex, pPara->pParaSet->mnDepth );
- rOutliner.QuickInsertText( String( pParaText, (UINT16)nCurrentIndex ), aSelection );
+ rOutliner.QuickInsertText( String( pParaText, (sal_uInt16)nCurrentIndex ), aSelection );
rOutliner.SetParaAttribs( nParaIndex, rOutliner.GetEmptyItemSet() );
if ( pS )
rOutliner.SetStyleSheet( nParaIndex, pS );
@@ -2483,7 +2483,7 @@ SdrObject* SdrPowerPointImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj*
nLen = pPtr - pF;
if ( nLen )
aSelection.nEndPos =
- sal::static_int_cast< USHORT >(
+ sal::static_int_cast< sal_uInt16 >(
aSelection.nEndPos + nLen );
pF = pPtr + 1;
rOutliner.QuickInsertLineBreak( ESelection( nParaIndex, aSelection.nEndPos, nParaIndex, aSelection.nEndPos + 1 ) );
@@ -2492,7 +2492,7 @@ SdrObject* SdrPowerPointImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj*
}
nLen = pPtr - pF;
if ( nLen )
- aSelection.nEndPos = sal::static_int_cast< USHORT >(
+ aSelection.nEndPos = sal::static_int_cast< sal_uInt16 >(
aSelection.nEndPos + nLen );
}
pPortion->ApplyTo( aPortionAttribs, (SdrPowerPointImport&)*this, nDestinationInstance, pTextObj );
@@ -2503,10 +2503,10 @@ SdrObject* SdrPowerPointImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj*
SfxItemSet aParagraphAttribs( rOutliner.GetEmptyItemSet() );
pPara->ApplyTo( aParagraphAttribs, oStartNumbering, (SdrPowerPointImport&)*this, nDestinationInstance, pPreviousParagraph );
- UINT32 nIsBullet2 = 0; //, nInstance = nDestinationInstance != 0xffffffff ? nDestinationInstance : pTextObj->GetInstance();
+ sal_uInt32 nIsBullet2 = 0; //, nInstance = nDestinationInstance != 0xffffffff ? nDestinationInstance : pTextObj->GetInstance();
pPara->GetAttrib( PPT_ParaAttr_BulletOn, nIsBullet2, nDestinationInstance );
if ( !nIsBullet2 )
- aParagraphAttribs.Put( SfxBoolItem( EE_PARA_BULLETSTATE, FALSE ) );
+ aParagraphAttribs.Put( SfxBoolItem( EE_PARA_BULLETSTATE, sal_False ) );
if ( oStartNumbering )
{
@@ -2525,7 +2525,7 @@ SdrObject* SdrPowerPointImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj*
pPreviousParagraph = pPara;
if ( !aSelection.nStartPos ) // in PPT empty paragraphs never gets a bullet
{
- aParagraphAttribs.Put( SfxBoolItem( EE_PARA_BULLETSTATE, FALSE ) );
+ aParagraphAttribs.Put( SfxBoolItem( EE_PARA_BULLETSTATE, sal_False ) );
// rOutliner.SetDepth( rOutliner.GetParagraph( nParaIndex ), -1 );
}
aSelection.nStartPos = 0;
@@ -2544,7 +2544,7 @@ SdrObject* SdrPowerPointImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj*
sal_Bool SdrPowerPointImport::SeekToDocument( DffRecordHeader* pRecHd ) const
{
sal_Bool bRet;
- ULONG nFPosMerk = rStCtrl.Tell(); // FilePos merken fuer ggf. spaetere Restauration
+ sal_uLong nFPosMerk = rStCtrl.Tell(); // FilePos merken fuer ggf. spaetere Restauration
rStCtrl.Seek( nDocStreamPos );
DffRecordHeader aDocHd;
rStCtrl >> aDocHd;
@@ -2612,38 +2612,38 @@ sal_Bool SdrPowerPointImport::SeekToContentOfProgTag( sal_Int32 nVersion, SvStre
return bRetValue;
}
-UINT32 SdrPowerPointImport::GetAktPageId()
+sal_uInt32 SdrPowerPointImport::GetAktPageId()
{
PptSlidePersistList* pList = GetPageList( eAktPageKind );
if ( pList && nAktPageNum < pList->Count() )
- return (*pList)[ (USHORT)nAktPageNum ]->aPersistAtom.nSlideId;
+ return (*pList)[ (sal_uInt16)nAktPageNum ]->aPersistAtom.nSlideId;
return 0;
}
sal_Bool SdrPowerPointImport::SeekToAktPage( DffRecordHeader* pRecHd ) const
{
- sal_Bool bRet = FALSE;
+ sal_Bool bRet = sal_False;
PptSlidePersistList* pList = GetPageList( eAktPageKind );
if ( pList && ( nAktPageNum < pList->Count() ) )
{
- ULONG nPersist = (*pList)[ (USHORT)nAktPageNum ]->aPersistAtom.nPsrReference;
+ sal_uLong nPersist = (*pList)[ (sal_uInt16)nAktPageNum ]->aPersistAtom.nPsrReference;
if ( nPersist > 0 && nPersist < nPersistPtrAnz )
{
- ULONG nFPos = 0;
+ sal_uLong nFPos = 0;
nFPos = pPersistPtr[ nPersist ];
if ( nFPos < nStreamLen )
{
rStCtrl.Seek( nFPos );
if ( pRecHd )
rStCtrl >> *pRecHd;
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
return bRet;
}
-USHORT SdrPowerPointImport::GetPageCount( PptPageKind ePageKind ) const
+sal_uInt16 SdrPowerPointImport::GetPageCount( PptPageKind ePageKind ) const
{
PptSlidePersistList* pList = GetPageList( ePageKind );
if ( pList )
@@ -2719,11 +2719,11 @@ Size SdrPowerPointImport::GetPageSize() const
return aRet;
}
-FASTBOOL SdrPowerPointImport::GetColorFromPalette( USHORT nNum, Color& rColor ) const
+FASTBOOL SdrPowerPointImport::GetColorFromPalette( sal_uInt16 nNum, Color& rColor ) const
{
if ( nPageColorsNum != nAktPageNum || ePageColorsKind != eAktPageKind )
{
- UINT16 nSlideFlags = 0;
+ sal_uInt16 nSlideFlags = 0;
PptSlidePersistList* pPageList = GetPageList( eAktPageKind );
if ( pPageList && ( nAktPageNum < pPageList->Count() ) )
{
@@ -2770,12 +2770,12 @@ FASTBOOL SdrPowerPointImport::GetColorFromPalette( USHORT nNum, Color& rColor )
((SdrPowerPointImport*)this)->ePageColorsKind = eAktPageKind;
}
rColor = aPageColors.GetColor( nNum );
- return TRUE;
+ return sal_True;
}
-BOOL SdrPowerPointImport::SeekToShape( SvStream& rSt, void* pClientData, UINT32 nId ) const
+sal_Bool SdrPowerPointImport::SeekToShape( SvStream& rSt, void* pClientData, sal_uInt32 nId ) const
{
- BOOL bRet = SvxMSDffManager::SeekToShape( rSt, pClientData, nId );
+ sal_Bool bRet = SvxMSDffManager::SeekToShape( rSt, pClientData, nId );
if ( !bRet )
{
ProcessData& rData = *( (ProcessData*)pClientData );
@@ -2784,24 +2784,24 @@ BOOL SdrPowerPointImport::SeekToShape( SvStream& rSt, void* pClientData, UINT32
{
if ( HasMasterPage( nAktPageNum, eAktPageKind ) )
{
- USHORT nMasterNum = GetMasterPageIndex( nAktPageNum, eAktPageKind );
+ sal_uInt16 nMasterNum = GetMasterPageIndex( nAktPageNum, eAktPageKind );
PptSlidePersistList* pPageList = GetPageList( PPT_MASTERPAGE );
if ( pPageList && ( nMasterNum < pPageList->Count() ) )
{
PptSlidePersistEntry* pPersist = (*pPageList)[ nMasterNum ]; // get the masterpage's persistentry
if ( pPersist && pPersist->pPresentationObjects )
{
- UINT32 nCurrent(0L);
+ sal_uInt32 nCurrent(0L);
DffRecordList* pCList = maShapeRecords.pCList; // we got a backup of the current position
if ( pCList )
nCurrent = pCList->nCurrent;
if ( ((SdrEscherImport*)this )->maShapeRecords.SeekToContent( rSt, DFF_msofbtClientData, SEEK_FROM_CURRENT_AND_RESTART ) )
{
- UINT32 nStreamPos = rSt.Tell();
+ sal_uInt32 nStreamPos = rSt.Tell();
PPTTextObj aTextObj( rSt, (SdrPowerPointImport&)*this, rPersistEntry, NULL );
if ( aTextObj.Count() || aTextObj.GetOEPlaceHolderAtom() )
{
- UINT32 nShapePos = 0;
+ sal_uInt32 nShapePos = 0;
switch ( aTextObj.GetInstance() )
{
case TSS_TYPE_TITLE :
@@ -2823,7 +2823,7 @@ BOOL SdrPowerPointImport::SeekToShape( SvStream& rSt, void* pClientData, UINT32
if ( nShapePos )
{
rSt.Seek( nShapePos );
- bRet = TRUE;
+ bRet = sal_True;
}
}
if ( !bRet )
@@ -2887,7 +2887,7 @@ void ImportComment10( SvxMSDffManager& rMan, SvStream& rStCtrl, SdrPage* pPage,
case PPT_PST_CString :
{
String aString;
- SvxMSDffManager::MSDFFReadZString( rStCtrl, aString, aCommentHd.nRecLen, TRUE );
+ SvxMSDffManager::MSDFFReadZString( rStCtrl, aString, aCommentHd.nRecLen, sal_True );
switch ( aCommentHd.nRecInstance )
{
case 0 : sAuthor = aString; break;
@@ -2941,7 +2941,7 @@ void ImportComment10( SvxMSDffManager& rMan, SvStream& rStCtrl, SdrPage* pPage,
// be sure not to import masterpages with this method
void SdrPowerPointImport::ImportPage( SdrPage* pRet, const PptSlidePersistEntry* pMasterPersist )
{
- UINT32 nMerk = rStCtrl.Tell();
+ sal_uInt32 nMerk = rStCtrl.Tell();
PptSlidePersistList* pList = GetPageList( eAktPageKind );
if ( ( !pList ) || ( pList->Count() <= nAktPageNum ) )
return;
@@ -3037,7 +3037,7 @@ void SdrPowerPointImport::ImportPage( SdrPage* pRet, const PptSlidePersistEntry*
rStCtrl >> aShapeHd;
if ( aShapeHd.nRecType == DFF_msofbtSp )
{
- UINT32 nSpFlags;
+ sal_uInt32 nSpFlags;
rStCtrl >> nSpFlags >> nSpFlags;
if ( nSpFlags & SP_FBACKGROUND )
{
@@ -3114,7 +3114,7 @@ void SdrPowerPointImport::ImportPage( SdrPage* pRet, const PptSlidePersistEntry*
const SfxPoolItem* pPoolItem = NULL;
const SfxItemSet& rObjectItemSet = rSlidePersist.pBObj->GetMergedItemSet();
- //SfxItemState eState = rObjectItemSet.GetItemState( XATTR_FILLCOLOR, FALSE, &pPoolItem );
+ //SfxItemState eState = rObjectItemSet.GetItemState( XATTR_FILLCOLOR, sal_False, &pPoolItem );
if ( pPoolItem )
{
SfxItemSet aNewSet(*rObjectItemSet.GetPool());
@@ -3166,7 +3166,7 @@ const PptSlideLayoutAtom* SdrPowerPointImport::GetSlideLayoutAtom() const
return NULL;
}
-sal_Bool SdrPowerPointImport::IsNoteOrHandout( USHORT nPageNum, PptPageKind /*ePageKind*/) const
+sal_Bool SdrPowerPointImport::IsNoteOrHandout( sal_uInt16 nPageNum, PptPageKind /*ePageKind*/) const
{
sal_Bool bNote = eAktPageKind == PPT_NOTEPAGE;
if ( eAktPageKind == PPT_MASTERPAGE )
@@ -3174,7 +3174,7 @@ sal_Bool SdrPowerPointImport::IsNoteOrHandout( USHORT nPageNum, PptPageKind /*eP
return bNote;
}
-UINT32 SdrPowerPointImport::GetMasterPageId( USHORT nPageNum, PptPageKind ePageKind ) const
+sal_uInt32 SdrPowerPointImport::GetMasterPageId( sal_uInt16 nPageNum, PptPageKind ePageKind ) const
{
PptSlidePersistList* pPageList = GetPageList( ePageKind );
if ( pPageList && nPageNum < pPageList->Count() )
@@ -3182,7 +3182,7 @@ UINT32 SdrPowerPointImport::GetMasterPageId( USHORT nPageNum, PptPageKind ePageK
return 0;
}
-UINT32 SdrPowerPointImport::GetNotesPageId( USHORT nPageNum ) const
+sal_uInt32 SdrPowerPointImport::GetNotesPageId( sal_uInt16 nPageNum ) const
{
PptSlidePersistList* pPageList=GetPageList( PPT_SLIDEPAGE );
if ( pPageList && nPageNum < pPageList->Count() )
@@ -3190,21 +3190,21 @@ UINT32 SdrPowerPointImport::GetNotesPageId( USHORT nPageNum ) const
return 0;
}
-sal_Bool SdrPowerPointImport::HasMasterPage( USHORT nPageNum, PptPageKind ePageKind ) const
+sal_Bool SdrPowerPointImport::HasMasterPage( sal_uInt16 nPageNum, PptPageKind ePageKind ) const
{
if ( ePageKind == PPT_NOTEPAGE )
return aDocAtom.nNotesMasterPersist != 0;
if ( ePageKind == PPT_MASTERPAGE )
- return FALSE;
+ return sal_False;
return GetMasterPageId( nPageNum, ePageKind ) != 0;
}
-USHORT SdrPowerPointImport::GetMasterPageIndex( USHORT nPageNum, PptPageKind ePageKind ) const
+sal_uInt16 SdrPowerPointImport::GetMasterPageIndex( sal_uInt16 nPageNum, PptPageKind ePageKind ) const
{
- USHORT nIdx = 0;
+ sal_uInt16 nIdx = 0;
if ( ePageKind == PPT_NOTEPAGE )
return 2;
- UINT32 nId = GetMasterPageId( nPageNum, ePageKind );
+ sal_uInt32 nId = GetMasterPageId( nPageNum, ePageKind );
if ( nId && pMasterPages )
{
nIdx = pMasterPages->FindPage( nId );
@@ -3219,30 +3219,30 @@ SdrObject* SdrPowerPointImport::ImportPageBackgroundObject( const SdrPage& rPage
SdrObject* pRet = NULL;
sal_Bool bCreateObj = bForce;
SfxItemSet* pSet = NULL;
- ULONG nFPosMerk = rStCtrl.Tell(); // FilePos merken fuer spaetere Restauration
+ sal_uLong nFPosMerk = rStCtrl.Tell(); // FilePos merken fuer spaetere Restauration
DffRecordHeader aPageHd;
if ( SeekToAktPage( &aPageHd ) )
{ // und nun die Hintergrundattribute der Page suchen
- ULONG nPageRecEnd = aPageHd.GetRecEndFilePos();
+ sal_uLong nPageRecEnd = aPageHd.GetRecEndFilePos();
DffRecordHeader aPPDrawHd;
if ( SeekToRec( rStCtrl, PPT_PST_PPDrawing, nPageRecEnd, &aPPDrawHd ) )
{
- ULONG nPPDrawEnd = aPPDrawHd.GetRecEndFilePos();
+ sal_uLong nPPDrawEnd = aPPDrawHd.GetRecEndFilePos();
DffRecordHeader aEscherF002Hd;
if ( SeekToRec( rStCtrl, DFF_msofbtDgContainer, nPPDrawEnd, &aEscherF002Hd ) )
{
- ULONG nEscherF002End = aEscherF002Hd.GetRecEndFilePos();
+ sal_uLong nEscherF002End = aEscherF002Hd.GetRecEndFilePos();
DffRecordHeader aEscherObjectHd;
if ( SeekToRec( rStCtrl, DFF_msofbtSpContainer, nEscherF002End, &aEscherObjectHd ) )
{
nBgFileOffset = aEscherObjectHd.GetRecBegFilePos();
- //ULONG nEscherObjectEnd = aEscherObjectHd.GetRecEndFilePos();
+ //sal_uLong nEscherObjectEnd = aEscherObjectHd.GetRecEndFilePos();
//DffRecordHeader aEscherPropertiesHd;
if ( SeekToRec( rStCtrl, DFF_msofbtOPT,nEscherF002End ) )
{
rStCtrl >> (DffPropertyReader&)*this;
mnFix16Angle = Fix16ToAngle( GetPropertyValue( DFF_Prop_Rotation, 0 ) );
- UINT32 nColor = GetPropertyValue( DFF_Prop_fillColor, 0xffffff );
+ sal_uInt32 nColor = GetPropertyValue( DFF_Prop_fillColor, 0xffffff );
pSet = new SfxItemSet( pSdrModel->GetItemPool() );
DffObjData aObjData( aEscherObjectHd, Rectangle( 0, 0, 28000, 21000 ), 0 );
ApplyAttributes( rStCtrl, *pSet, aObjData );
@@ -3268,9 +3268,9 @@ SdrObject* SdrPowerPointImport::ImportPageBackgroundObject( const SdrPage& rPage
pRet->SetMergedItemSet(*pSet);
- pRet->SetMarkProtect( TRUE );
- pRet->SetMoveProtect( TRUE );
- pRet->SetResizeProtect( TRUE );
+ pRet->SetMarkProtect( sal_True );
+ pRet->SetMoveProtect( sal_True );
+ pRet->SetResizeProtect( sal_True );
}
delete pSet;
return pRet;
@@ -3300,9 +3300,9 @@ HeaderFooterEntry::~HeaderFooterEntry()
{
}
-UINT32 HeaderFooterEntry::GetMaskForInstance( UINT32 nInstance )
+sal_uInt32 HeaderFooterEntry::GetMaskForInstance( sal_uInt32 nInstance )
{
- UINT32 nRet = 0;
+ sal_uInt32 nRet = 0;
switch ( nInstance )
{
case 0 : nRet = 0x07ffff; break;
@@ -3313,9 +3313,9 @@ UINT32 HeaderFooterEntry::GetMaskForInstance( UINT32 nInstance )
return nRet;
}
-UINT32 HeaderFooterEntry::IsToDisplay( UINT32 nInstance )
+sal_uInt32 HeaderFooterEntry::IsToDisplay( sal_uInt32 nInstance )
{
- UINT32 nMask = 0;
+ sal_uInt32 nMask = 0;
switch ( nInstance )
{
case 0 : nMask = 0x010000; break;
@@ -3362,7 +3362,7 @@ void SdrEscherImport::ImportHeaderFooterContainer( DffRecordHeader& rHd, HeaderF
case PPT_PST_CString :
{
if ( aHd.nRecInstance < 4 )
- MSDFFReadZString( rStCtrl, rE.pPlaceholder[ aHd.nRecInstance ], aHd.nRecLen, TRUE );
+ MSDFFReadZString( rStCtrl, rE.pPlaceholder[ aHd.nRecInstance ], aHd.nRecLen, sal_True );
}
break;
}
@@ -3370,9 +3370,9 @@ void SdrEscherImport::ImportHeaderFooterContainer( DffRecordHeader& rHd, HeaderF
}
}
-//static sal_Unicode PPTExportMapper( sal_Unicode nUni, BOOL& bNeedsStarBats )
+//static sal_Unicode PPTExportMapper( sal_Unicode nUni, sal_Bool& bNeedsStarBats )
//{
-// bNeedsStarBats = FALSE;
+// bNeedsStarBats = sal_False;
//
// sal_Unicode cLo, cReplace;
// cLo = cReplace = 0;
@@ -3434,7 +3434,7 @@ void SdrEscherImport::ImportHeaderFooterContainer( DffRecordHeader& rHd, HeaderF
// }
// if ( cReplace )
// {
-// bNeedsStarBats = TRUE;
+// bNeedsStarBats = sal_True;
// return cReplace;
// }
// else
@@ -3442,15 +3442,15 @@ void SdrEscherImport::ImportHeaderFooterContainer( DffRecordHeader& rHd, HeaderF
//}
// no longer needed
-sal_Unicode SdrPowerPointImport::PPTSubstitute( UINT16 /*nFont*/, sal_Unicode /*nChar*/,
- UINT32& /*nMappedFontId*/, Font& /*rFont*/, char /*nDefault*/) const
+sal_Unicode SdrPowerPointImport::PPTSubstitute( sal_uInt16 /*nFont*/, sal_Unicode /*nChar*/,
+ sal_uInt32& /*nMappedFontId*/, Font& /*rFont*/, char /*nDefault*/) const
{
return 0;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
-PPTBuGraEntry::PPTBuGraEntry( Graphic& rGraphic, UINT32 nInst ) :
+PPTBuGraEntry::PPTBuGraEntry( Graphic& rGraphic, sal_uInt32 nInst ) :
nInstance ( nInst ),
aBuGra ( rGraphic ) {}
@@ -3467,7 +3467,7 @@ PPTExtParaLevel::PPTExtParaLevel()
SvStream& operator>>( SvStream& rIn, PPTExtParaLevel& rLevel )
{
- rLevel.mbSet = TRUE;
+ rLevel.mbSet = sal_True;
rIn >> rLevel.mnExtParagraphMask;
if ( rLevel.mnExtParagraphMask & 0x00800000 )
rIn >> rLevel.mnBuBlip;
@@ -3483,15 +3483,15 @@ SvStream& operator>>( SvStream& rIn, PPTExtParaLevel& rLevel )
return rIn;
}
-BOOL PPTExtParaProv::GetGraphic( UINT32 nInstance, Graphic& rGraph ) const
+sal_Bool PPTExtParaProv::GetGraphic( sal_uInt32 nInstance, Graphic& rGraph ) const
{
- BOOL bRetValue = FALSE;
+ sal_Bool bRetValue = sal_False;
PPTBuGraEntry* pPtr = NULL;
if ( nInstance < aBuGraList.Count() )
{
pPtr = (PPTBuGraEntry*)aBuGraList.GetObject( nInstance );
if ( pPtr->nInstance == nInstance )
- bRetValue = TRUE;
+ bRetValue = sal_True;
}
if ( !bRetValue )
{
@@ -3501,7 +3501,7 @@ BOOL PPTExtParaProv::GetGraphic( UINT32 nInstance, Graphic& rGraph ) const
pPtr = (PPTBuGraEntry*)aBuGraList.GetObject( i );
if ( pPtr->nInstance == nInstance )
{
- bRetValue = TRUE;
+ bRetValue = sal_True;
break;
}
}
@@ -3512,10 +3512,10 @@ BOOL PPTExtParaProv::GetGraphic( UINT32 nInstance, Graphic& rGraph ) const
}
PPTExtParaProv::PPTExtParaProv( SdrPowerPointImport& rMan, SvStream& rSt, const DffRecordHeader* pHd ) :
- bStyles ( FALSE ),
- bGraphics ( FALSE )
+ bStyles ( sal_False ),
+ bGraphics ( sal_False )
{
- UINT32 nOldPos = rSt.Tell();
+ sal_uInt32 nOldPos = rSt.Tell();
// here we have to get the graphical bullets...
@@ -3537,7 +3537,7 @@ PPTExtParaProv::PPTExtParaProv( SdrPowerPointImport& rMan, SvStream& rSt, const
{
while ( ( rSt.GetError() == 0 ) && ( rSt.Tell() < aHd.GetRecEndFilePos() ) )
{
- UINT16 nType;
+ sal_uInt16 nType;
DffRecordHeader aBuGraAtomHd;
rSt >> aBuGraAtomHd;
if ( aBuGraAtomHd.nRecType == PPT_PST_ExtendedBuGraAtom )
@@ -3546,10 +3546,10 @@ PPTExtParaProv::PPTExtParaProv( SdrPowerPointImport& rMan, SvStream& rSt, const
Graphic aGraphic;
if ( rMan.GetBLIPDirect( rSt, aGraphic, NULL ) )
{
- UINT32 nInstance = aBuGraAtomHd.nRecInstance;
+ sal_uInt32 nInstance = aBuGraAtomHd.nRecInstance;
PPTBuGraEntry* pBuGra = new PPTBuGraEntry( aGraphic, nInstance );
- UINT32 n = 0;
- UINT32 nBuGraCount = aBuGraList.Count();
+ sal_uInt32 n = 0;
+ sal_uInt32 nBuGraCount = aBuGraList.Count();
if ( nBuGraCount )
{
if ( ( (PPTBuGraEntry*)aBuGraList.GetObject( nBuGraCount - 1 ) )->nInstance < nInstance )
@@ -3563,7 +3563,7 @@ PPTExtParaProv::PPTExtParaProv( SdrPowerPointImport& rMan, SvStream& rSt, const
}
}
}
- aBuGraList.Insert( pBuGra, (UINT32)n );
+ aBuGraList.Insert( pBuGra, (sal_uInt32)n );
}
#ifdef DBG_UTIL
else DBG_ERROR( "PPTExParaProv::PPTExParaProv - bullet graphic is not valid (SJ)" );
@@ -3575,12 +3575,12 @@ PPTExtParaProv::PPTExtParaProv( SdrPowerPointImport& rMan, SvStream& rSt, const
aBuGraAtomHd.SeekToEndOfRecord( rSt );
}
if ( aBuGraList.Count() )
- bGraphics = TRUE;
+ bGraphics = sal_True;
}
break;
case PPT_PST_ExtendedPresRuleContainer :
- aExtendedPresRules.Consume( rSt, FALSE, aHd.GetRecEndFilePos() );
+ aExtendedPresRules.Consume( rSt, sal_False, aHd.GetRecEndFilePos() );
break;
#ifdef DBG_UTIL
default :
@@ -3614,14 +3614,14 @@ PPTExtParaProv::PPTExtParaProv( SdrPowerPointImport& rMan, SvStream& rSt, const
{
if ( aHd.nRecInstance < PPT_STYLESHEETENTRYS )
{
- UINT16 nDepth, i = 0;
+ sal_uInt16 nDepth, i = 0;
rSt >> nDepth;
if ( i <= 5 )
{
while ( ( rSt.GetError() == 0 ) && ( rSt.Tell() < aHd.GetRecEndFilePos() ) && ( i < nDepth ) )
{
- bStyles = TRUE;
+ bStyles = sal_True;
rSt >> aExtParaSheet[ aHd.nRecInstance ].aExtParaLevel[ i++ ];
}
#ifdef DBG_UTIL
@@ -3673,16 +3673,16 @@ PPTNumberFormatCreator::~PPTNumberFormatCreator()
delete pExtParaProv;
}
-BOOL PPTNumberFormatCreator::ImplGetExtNumberFormat( SdrPowerPointImport& rManager,
- SvxNumberFormat& rNumberFormat, UINT32 nLevel, UINT32 nInstance, UINT32 nDestinationInstance,
- boost::optional< sal_Int16 >& rStartNumbering, UINT32 nFontHeight, PPTParagraphObj* pPara )
+sal_Bool PPTNumberFormatCreator::ImplGetExtNumberFormat( SdrPowerPointImport& rManager,
+ SvxNumberFormat& rNumberFormat, sal_uInt32 nLevel, sal_uInt32 nInstance, sal_uInt32 nDestinationInstance,
+ boost::optional< sal_Int16 >& rStartNumbering, sal_uInt32 nFontHeight, PPTParagraphObj* pPara )
{
- BOOL bHardAttribute = ( nDestinationInstance == 0xffffffff );
+ sal_Bool bHardAttribute = ( nDestinationInstance == 0xffffffff );
- UINT32 nBuFlags = 0;
- UINT16 nHasAnm = 0;
- UINT32 nAnmScheme = 0x10003;
- UINT16 nBuBlip = 0xffff;
+ sal_uInt32 nBuFlags = 0;
+ sal_uInt16 nHasAnm = 0;
+ sal_uInt32 nAnmScheme = 0x10003;
+ sal_uInt16 nBuBlip = 0xffff;
const PPTExtParaProv* pParaProv = pExtParaProv;
if ( !pExtParaProv )
@@ -3699,7 +3699,7 @@ BOOL PPTNumberFormatCreator::ImplGetExtNumberFormat( SdrPowerPointImport& rManag
nAnmScheme = pPara->pParaSet->mnAnmScheme;
if ( nBuFlags & 0x02000000 )
nHasAnm = pPara->pParaSet->mnHasAnm;
- bHardAttribute = TRUE;
+ bHardAttribute = sal_True;
}
}
@@ -3712,7 +3712,7 @@ BOOL PPTNumberFormatCreator::ImplGetExtNumberFormat( SdrPowerPointImport& rManag
const PPTExtParaLevel& rLev = pParaProv->aExtParaSheet[ nInstance ].aExtParaLevel[ nLevel ];
if ( rLev.mbSet )
{
- UINT32 nMaBuFlags = rLev.mnExtParagraphMask;
+ sal_uInt32 nMaBuFlags = rLev.mnExtParagraphMask;
if ( (!( nBuFlags & 0x00800000)) && ( nMaBuFlags & 0x00800000 ) )
{
@@ -3737,7 +3737,7 @@ BOOL PPTNumberFormatCreator::ImplGetExtNumberFormat( SdrPowerPointImport& rManag
rNumberFormat.SetGraphicBrush( &aBrush );
sal_uInt32 nHeight = (sal_uInt32)( (double)nFontHeight * 0.2540 * nBulletHeight + 0.5 );
Size aPrefSize( aGraphic.GetPrefSize() );
- UINT32 nWidth = ( nHeight * aPrefSize.Width() ) / aPrefSize.Height();
+ sal_uInt32 nWidth = ( nHeight * aPrefSize.Width() ) / aPrefSize.Height();
rNumberFormat.SetGraphicSize( Size( nWidth, nHeight ) );
rNumberFormat.SetNumberingType ( SVX_NUM_BITMAP );
}
@@ -3853,7 +3853,7 @@ BOOL PPTNumberFormatCreator::ImplGetExtNumberFormat( SdrPowerPointImport& rManag
return bHardAttribute;
}
-void PPTNumberFormatCreator::GetNumberFormat( SdrPowerPointImport& rManager, SvxNumberFormat& rNumberFormat, UINT32 nLevel, const PPTParaLevel& rParaLevel, const PPTCharLevel& rCharLevel, UINT32 nInstance )
+void PPTNumberFormatCreator::GetNumberFormat( SdrPowerPointImport& rManager, SvxNumberFormat& rNumberFormat, sal_uInt32 nLevel, const PPTParaLevel& rParaLevel, const PPTCharLevel& rCharLevel, sal_uInt32 nInstance )
{
nIsBullet = ( rParaLevel.mnBuFlags & ( 1 << PPT_ParaAttr_BulletOn ) ) != 0 ? 1 : 0;
nBulletChar = rParaLevel.mnBulletChar;
@@ -3900,10 +3900,10 @@ void PPTNumberFormatCreator::GetNumberFormat( SdrPowerPointImport& rManager, Svx
}
}
-BOOL PPTNumberFormatCreator::GetNumberFormat( SdrPowerPointImport& rManager, SvxNumberFormat& rNumberFormat, PPTParagraphObj* pParaObj,
- UINT32 nDestinationInstance, boost::optional< sal_Int16 >& rStartNumbering )
+sal_Bool PPTNumberFormatCreator::GetNumberFormat( SdrPowerPointImport& rManager, SvxNumberFormat& rNumberFormat, PPTParagraphObj* pParaObj,
+ sal_uInt32 nDestinationInstance, boost::optional< sal_Int16 >& rStartNumbering )
{
- UINT32 nHardCount = 0;
+ sal_uInt32 nHardCount = 0;
nHardCount += pParaObj->GetAttrib( PPT_ParaAttr_BulletOn, nIsBullet, nDestinationInstance );
nHardCount += pParaObj->GetAttrib( PPT_ParaAttr_BulletChar, nBulletChar, nDestinationInstance );
nHardCount += pParaObj->GetAttrib( PPT_ParaAttr_BulletFont, nBulletFont, nDestinationInstance );
@@ -3915,7 +3915,7 @@ BOOL PPTNumberFormatCreator::GetNumberFormat( SdrPowerPointImport& rManager, Svx
if ( nIsBullet )
rNumberFormat.SetNumberingType( SVX_NUM_CHAR_SPECIAL );
- UINT32 nFontHeight = 24;
+ sal_uInt32 nFontHeight = 24;
PPTPortionObj* pPtr = pParaObj->First();
if ( pPtr )
pPtr->GetAttrib( PPT_CharAttr_FontHeight, nFontHeight, nDestinationInstance );
@@ -3959,10 +3959,10 @@ BOOL PPTNumberFormatCreator::GetNumberFormat( SdrPowerPointImport& rManager, Svx
break;
}
}
- return ( nHardCount ) ? TRUE : FALSE;
+ return ( nHardCount ) ? sal_True : sal_False;
}
-void PPTNumberFormatCreator::ImplGetNumberFormat( SdrPowerPointImport& rManager, SvxNumberFormat& rNumberFormat, UINT32 /*nLevel*/)
+void PPTNumberFormatCreator::ImplGetNumberFormat( SdrPowerPointImport& rManager, SvxNumberFormat& rNumberFormat, sal_uInt32 /*nLevel*/)
{
Font aFont;
PptFontEntityAtom* pAtom = rManager.GetFontEnityAtom( nBulletFont );
@@ -3985,20 +3985,20 @@ void PPTNumberFormatCreator::ImplGetNumberFormat( SdrPowerPointImport& rManager,
}
rNumberFormat.SetBulletFont( &aFont );
rNumberFormat.SetBulletChar( nBuChar );
- rNumberFormat.SetBulletRelSize( (UINT16)nBulletHeight );
+ rNumberFormat.SetBulletRelSize( (sal_uInt16)nBulletHeight );
rNumberFormat.SetBulletColor( aCol );
- UINT16 nAbsLSpace = (UINT16)( ( (UINT32)nTextOfs * 2540 ) / 576 );
- UINT16 nFirstLineOffset = nAbsLSpace - (UINT16)( ( (UINT32)nBulletOfs * 2540 ) / 576 );
+ sal_uInt16 nAbsLSpace = (sal_uInt16)( ( (sal_uInt32)nTextOfs * 2540 ) / 576 );
+ sal_uInt16 nFirstLineOffset = nAbsLSpace - (sal_uInt16)( ( (sal_uInt32)nBulletOfs * 2540 ) / 576 );
rNumberFormat.SetAbsLSpace( nAbsLSpace );
rNumberFormat.SetFirstLineOffset( -nFirstLineOffset );
}
////////////////////////////////////////////////////////////////////////////////////////////////////
-PPTCharSheet::PPTCharSheet( UINT32 nInstance )
+PPTCharSheet::PPTCharSheet( sal_uInt32 nInstance )
{
- UINT32 nColor = PPT_COLSCHEME_TEXT_UND_ZEILEN;
- UINT16 nFontHeight(0);
+ sal_uInt32 nColor = PPT_COLSCHEME_TEXT_UND_ZEILEN;
+ sal_uInt16 nFontHeight(0);
switch ( nInstance )
{
case TSS_TYPE_PAGETITLE :
@@ -4022,14 +4022,14 @@ PPTCharSheet::PPTCharSheet( UINT32 nInstance )
nFontHeight = 24;
break;
}
- for ( UINT32 nDepth = 0; nDepth < 5; nDepth++ )
+ for ( sal_uInt32 nDepth = 0; nDepth < 5; nDepth++ )
{
maCharLevel[ nDepth ].mnFlags = 0;
maCharLevel[ nDepth ].mnFont = 0;
maCharLevel[ nDepth ].mnAsianOrComplexFont = 0xffff;
maCharLevel[ nDepth ].mnFontHeight = nFontHeight;
maCharLevel[ nDepth ].mnFontColor = nColor;
- maCharLevel[ nDepth ].mnFontColorInStyleSheet = Color( (BYTE)nColor, (BYTE)( nColor >> 8 ), (BYTE)( nColor >> 16 ) );
+ maCharLevel[ nDepth ].mnFontColorInStyleSheet = Color( (sal_uInt8)nColor, (sal_uInt8)( nColor >> 8 ), (sal_uInt8)( nColor >> 16 ) );
maCharLevel[ nDepth ].mnEscapement = 0;
}
}
@@ -4086,7 +4086,7 @@ void PPTCharSheet::Read( SvStream& rIn, sal_Bool /*bMasterStyle*/, sal_uInt32 nL
}
}
-PPTParaSheet::PPTParaSheet( UINT32 nInstance )
+PPTParaSheet::PPTParaSheet( sal_uInt32 nInstance )
{
sal_uInt16 nBuFlags = 0;
sal_uInt32 nBulletColor = 0x8000000;
@@ -4117,7 +4117,7 @@ PPTParaSheet::PPTParaSheet( UINT32 nInstance )
break;
*/
}
- for ( UINT32 i = 0; i < 5; i++ )
+ for ( sal_uInt32 i = 0; i < 5; i++ )
{
maParaLevel[ i ].mnBuFlags = nBuFlags;
maParaLevel[ i ].mnBulletChar = 0x2022;
@@ -4277,8 +4277,8 @@ PPTStyleSheet::PPTStyleSheet( const DffRecordHeader& rSlideHd, SvStream& rIn, Sd
PPTNumberFormatCreator ( new PPTExtParaProv( rManager, rIn, &rSlideHd ) ),
maTxSI ( rTextSpecInfo )
{
- UINT32 i;
- UINT32 nOldFilePos = rIn.Tell();
+ sal_uInt32 i;
+ sal_uInt32 nOldFilePos = rIn.Tell();
// default stylesheets
mpCharSheet[ TSS_TYPE_PAGETITLE ] = new PPTCharSheet( TSS_TYPE_PAGETITLE );
@@ -4540,7 +4540,7 @@ PPTStyleSheet::PPTStyleSheet( const DffRecordHeader& rSlideHd, SvStream& rIn, Sd
// will will create the default numbulletitem for each instance
for ( i = 0; i < PPT_STYLESHEETENTRYS; i++ )
{
- UINT16 nLevels, nDepth = 0;
+ sal_uInt16 nLevels, nDepth = 0;
SvxNumRuleType eNumRuleType;
switch ( i )
@@ -4570,8 +4570,8 @@ PPTStyleSheet::PPTStyleSheet( const DffRecordHeader& rSlideHd, SvStream& rIn, Sd
}
SvxNumRule aRule( NUM_BULLET_REL_SIZE | NUM_BULLET_COLOR |
NUM_CHAR_TEXT_DISTANCE | NUM_SYMBOL_ALIGNMENT,
- nLevels, FALSE, eNumRuleType );
- for ( UINT16 nCount = 0; nDepth < nLevels; nCount++ )
+ nLevels, sal_False, eNumRuleType );
+ for ( sal_uInt16 nCount = 0; nDepth < nLevels; nCount++ )
{
const PPTParaLevel& rParaLevel = mpParaSheet[ i ]->maParaLevel[ nCount ];
const PPTCharLevel& rCharLevel = mpCharSheet[ i ]->maCharLevel[ nCount ];
@@ -4593,7 +4593,7 @@ PPTStyleSheet::PPTStyleSheet( const DffRecordHeader& rSlideHd, SvStream& rIn, Sd
PPTStyleSheet::~PPTStyleSheet()
{
- for ( UINT32 i = 0; i < PPT_STYLESHEETENTRYS; i++ )
+ for ( sal_uInt32 i = 0; i < PPT_STYLESHEETENTRYS; i++ )
{
delete mpCharSheet[ i ];
delete mpParaSheet[ i ];
@@ -4706,10 +4706,10 @@ void PPTCharPropSet::ImplMakeUnique()
}
}
-void PPTCharPropSet::SetFont( UINT16 nFont )
+void PPTCharPropSet::SetFont( sal_uInt16 nFont )
{
- UINT32 nMask = 1 << PPT_CharAttr_Font;
- UINT32 bDoNotMake = pCharSet->mnAttrSet & nMask;
+ sal_uInt32 nMask = 1 << PPT_CharAttr_Font;
+ sal_uInt32 bDoNotMake = pCharSet->mnAttrSet & nMask;
if ( bDoNotMake )
bDoNotMake = nFont == pCharSet->mnFont;
@@ -4756,12 +4756,12 @@ PPTTextRulerInterpreter::PPTTextRulerInterpreter( PPTTextRulerInterpreter& rRule
mpImplRuler->nRefCount++;
}
-PPTTextRulerInterpreter::PPTTextRulerInterpreter( UINT32 nFileOfs, SdrPowerPointImport& rMan, DffRecordHeader& rHeader, SvStream& rIn ) :
+PPTTextRulerInterpreter::PPTTextRulerInterpreter( sal_uInt32 nFileOfs, SdrPowerPointImport& rMan, DffRecordHeader& rHeader, SvStream& rIn ) :
mpImplRuler ( new PPTRuler() )
{
if ( nFileOfs != 0xffffffff )
{
- UINT32 nOldPos = rIn.Tell();
+ sal_uInt32 nOldPos = rIn.Tell();
DffRecordHeader rHd;
if ( nFileOfs )
{
@@ -4786,7 +4786,7 @@ PPTTextRulerInterpreter::PPTTextRulerInterpreter( UINT32 nFileOfs, SdrPowerPoint
rIn >> nTCount;
if ( nTCount )
{
- mpImplRuler->nTabCount = (UINT16)nTCount;
+ mpImplRuler->nTabCount = (sal_uInt16)nTCount;
mpImplRuler->pTab = new PPTTabEntry[ mpImplRuler->nTabCount ];
for ( i = 0; i < nTCount; i++ )
{
@@ -4807,28 +4807,28 @@ PPTTextRulerInterpreter::PPTTextRulerInterpreter( UINT32 nFileOfs, SdrPowerPoint
}
}
-BOOL PPTTextRulerInterpreter::GetDefaultTab( UINT32 /*nLevel*/, UINT16& nValue ) const
+sal_Bool PPTTextRulerInterpreter::GetDefaultTab( sal_uInt32 /*nLevel*/, sal_uInt16& nValue ) const
{
if ( ! ( mpImplRuler->nFlags & 1 ) )
- return FALSE;
+ return sal_False;
nValue = mpImplRuler->nDefaultTab;
- return TRUE;
+ return sal_True;
}
-BOOL PPTTextRulerInterpreter::GetTextOfs( UINT32 nLevel, UINT16& nValue ) const
+sal_Bool PPTTextRulerInterpreter::GetTextOfs( sal_uInt32 nLevel, sal_uInt16& nValue ) const
{
if ( ! ( ( nLevel < 5 ) && ( mpImplRuler->nFlags & ( 8 << nLevel ) ) ) )
- return FALSE;
+ return sal_False;
nValue = mpImplRuler->nTextOfs[ nLevel ];
- return TRUE;
+ return sal_True;
}
-BOOL PPTTextRulerInterpreter::GetBulletOfs( UINT32 nLevel, UINT16& nValue ) const
+sal_Bool PPTTextRulerInterpreter::GetBulletOfs( sal_uInt32 nLevel, sal_uInt16& nValue ) const
{
if ( ! ( ( nLevel < 5 ) && ( mpImplRuler->nFlags & ( 256 << nLevel ) ) ) )
- return FALSE;
+ return sal_False;
nValue = mpImplRuler->nBulletOfs[ nLevel ];
- return TRUE;
+ return sal_True;
}
PPTTextRulerInterpreter& PPTTextRulerInterpreter::operator=( PPTTextRulerInterpreter& rRuler )
@@ -5533,12 +5533,12 @@ PPTStyleTextPropReader::~PPTStyleTextPropReader()
struct FieldEntry
{
- UINT32 nFieldType;
- UINT32 nFieldStartPos;
- UINT32 nFieldEndPos;
+ sal_uInt32 nFieldType;
+ sal_uInt32 nFieldStartPos;
+ sal_uInt32 nFieldEndPos;
String aFieldUrl;
- FieldEntry( UINT32 nType, UINT32 nStart, UINT32 nEnd )
+ FieldEntry( sal_uInt32 nType, sal_uInt32 nStart, sal_uInt32 nEnd )
{
nFieldType = nType;
nFieldStartPos = nStart;
@@ -5554,7 +5554,7 @@ struct FieldEntry
};
-PPTPortionObj::PPTPortionObj( const PPTStyleSheet& rStyleSheet, UINT32 nInstance, UINT32 nDepth ) :
+PPTPortionObj::PPTPortionObj( const PPTStyleSheet& rStyleSheet, sal_uInt32 nInstance, sal_uInt32 nDepth ) :
PPTCharPropSet ( 0 ),
mrStyleSheet ( rStyleSheet ),
mnInstance ( nInstance ),
@@ -5562,7 +5562,7 @@ PPTPortionObj::PPTPortionObj( const PPTStyleSheet& rStyleSheet, UINT32 nInstance
{
}
-PPTPortionObj::PPTPortionObj( PPTCharPropSet& rCharPropSet, const PPTStyleSheet& rStyleSheet, UINT32 nInstance, UINT32 nDepth ) :
+PPTPortionObj::PPTPortionObj( PPTCharPropSet& rCharPropSet, const PPTStyleSheet& rStyleSheet, sal_uInt32 nInstance, sal_uInt32 nDepth ) :
PPTCharPropSet ( rCharPropSet ),
mrStyleSheet ( rStyleSheet ),
mnInstance ( nInstance ),
@@ -5582,16 +5582,16 @@ PPTPortionObj::~PPTPortionObj()
{
}
-BOOL PPTPortionObj::HasTabulator()
+sal_Bool PPTPortionObj::HasTabulator()
{
- BOOL bRetValue = FALSE;
+ sal_Bool bRetValue = sal_False;
sal_Int32 nCount;
const sal_Unicode* pPtr = maString.GetBuffer();
for ( nCount = 0; nCount < maString.Len(); nCount++ )
{
if ( pPtr[ nCount ] == 0x9 )
{
- bRetValue = TRUE;
+ bRetValue = sal_True;
break;
}
@@ -5599,12 +5599,12 @@ BOOL PPTPortionObj::HasTabulator()
return bRetValue;
}
-BOOL PPTPortionObj::GetAttrib( UINT32 nAttr, UINT32& nRetValue, UINT32 nDestinationInstance )
+sal_Bool PPTPortionObj::GetAttrib( sal_uInt32 nAttr, sal_uInt32& nRetValue, sal_uInt32 nDestinationInstance )
{
- UINT32 nMask = 1 << nAttr;
+ sal_uInt32 nMask = 1 << nAttr;
nRetValue = 0;
- UINT32 bIsHardAttribute = ( ( pCharSet->mnAttrSet & nMask ) != 0 ) ? 1 : 0;
+ sal_uInt32 bIsHardAttribute = ( ( pCharSet->mnAttrSet & nMask ) != 0 ) ? 1 : 0;
if ( bIsHardAttribute )
{
@@ -5658,7 +5658,7 @@ BOOL PPTPortionObj::GetAttrib( UINT32 nAttr, UINT32& nRetValue, UINT32 nDestinat
nRetValue = ( rCharLevel.mnFlags & nMask ) ? 1 : 0;
if ( pCharLevel )
{
- UINT32 nTmp = ( pCharLevel->mnFlags & nMask ) ? 1 : 0;
+ sal_uInt32 nTmp = ( pCharLevel->mnFlags & nMask ) ? 1 : 0;
if ( nRetValue != nTmp )
bIsHardAttribute = 1;
}
@@ -5703,17 +5703,17 @@ BOOL PPTPortionObj::GetAttrib( UINT32 nAttr, UINT32& nRetValue, UINT32 nDestinat
DBG_ERROR( "SJ:PPTPortionObj::GetAttrib ( attribute does not exist )" );
}
}
- return (BOOL)bIsHardAttribute;
+ return (sal_Bool)bIsHardAttribute;
}
-void PPTPortionObj::ApplyTo( SfxItemSet& rSet, SdrPowerPointImport& rManager, UINT32 nDestinationInstance )
+void PPTPortionObj::ApplyTo( SfxItemSet& rSet, SdrPowerPointImport& rManager, sal_uInt32 nDestinationInstance )
{
ApplyTo( rSet, rManager, nDestinationInstance, NULL );
}
-void PPTPortionObj::ApplyTo( SfxItemSet& rSet, SdrPowerPointImport& rManager, UINT32 nDestinationInstance, const PPTTextObj* pTextObj )
+void PPTPortionObj::ApplyTo( SfxItemSet& rSet, SdrPowerPointImport& rManager, sal_uInt32 nDestinationInstance, const PPTTextObj* pTextObj )
{
- UINT32 nVal;
+ sal_uInt32 nVal;
if ( GetAttrib( PPT_CharAttr_Bold, nVal, nDestinationInstance ) )
{
rSet.Put( SvxWeightItem( nVal != 0 ? WEIGHT_BOLD : WEIGHT_NORMAL, EE_CHAR_WEIGHT ) );
@@ -5802,7 +5802,7 @@ void PPTPortionObj::ApplyTo( SfxItemSet& rSet, SdrPowerPointImport& rManager, U
if ( aSize.Height() > 64 )
aSize.Height() = 64;
- ULONG nRt = 0, nGn = 0, nBl = 0;
+ sal_uLong nRt = 0, nGn = 0, nBl = 0;
BitmapReadAccess* pAcc = aBmp.AcquireReadAccess();
if( pAcc )
{
@@ -5815,7 +5815,7 @@ void PPTPortionObj::ApplyTo( SfxItemSet& rSet, SdrPowerPointImport& rManager, U
{
for( long nX = 0L; nX < nWidth; nX++ )
{
- const BitmapColor& rCol = pAcc->GetPaletteColor( (BYTE) pAcc->GetPixel( nY, nX ) );
+ const BitmapColor& rCol = pAcc->GetPaletteColor( (sal_uInt8) pAcc->GetPixel( nY, nX ) );
nRt+=rCol.GetRed(); nGn+=rCol.GetGreen(); nBl+=rCol.GetBlue();
}
}
@@ -5850,7 +5850,7 @@ void PPTPortionObj::ApplyTo( SfxItemSet& rSet, SdrPowerPointImport& rManager, U
if ( pItemSet )
{
const SfxPoolItem* pFillStyleItem = NULL;
- pItemSet->GetItemState( XATTR_FILLSTYLE, FALSE, &pFillStyleItem );
+ pItemSet->GetItemState( XATTR_FILLSTYLE, sal_False, &pFillStyleItem );
if ( pFillStyleItem )
{
XFillStyle eFillStyle = ((XFillStyleItem*)pFillStyleItem)->GetValue();
@@ -5859,7 +5859,7 @@ void PPTPortionObj::ApplyTo( SfxItemSet& rSet, SdrPowerPointImport& rManager, U
case XFILL_SOLID :
{
const SfxPoolItem* pFillColorItem = NULL;
- pItemSet->GetItemState( XATTR_FILLCOLOR, FALSE, &pFillColorItem );
+ pItemSet->GetItemState( XATTR_FILLCOLOR, sal_False, &pFillColorItem );
if ( pFillColorItem )
aDefColor = ((XColorItem*)pFillColorItem)->GetColorValue();
}
@@ -5867,7 +5867,7 @@ void PPTPortionObj::ApplyTo( SfxItemSet& rSet, SdrPowerPointImport& rManager, U
case XFILL_GRADIENT :
{
const SfxPoolItem* pGradientItem = NULL;
- pItemSet->GetItemState( XATTR_FILLGRADIENT, FALSE, &pGradientItem );
+ pItemSet->GetItemState( XATTR_FILLGRADIENT, sal_False, &pGradientItem );
if ( pGradientItem )
aDefColor = ((XFillGradientItem*)pGradientItem)->GetGradientValue().GetStartColor();
}
@@ -5936,11 +5936,11 @@ SvxFieldItem* PPTPortionObj::GetTextField()
// -----------------------------------------------------------------------
-PPTParagraphObj::PPTParagraphObj( const PPTStyleSheet& rStyleSheet, UINT32 nInstance, UINT16 nDepth ) :
+PPTParagraphObj::PPTParagraphObj( const PPTStyleSheet& rStyleSheet, sal_uInt32 nInstance, sal_uInt16 nDepth ) :
PPTNumberFormatCreator ( NULL ),
mrStyleSheet ( rStyleSheet ),
mnInstance ( nInstance ),
- mbTab ( TRUE ), // style sheets always have to get the right tabulator setting
+ mbTab ( sal_True ), // style sheets always have to get the right tabulator setting
mnPortionCount ( 0 ),
mpPortionList ( NULL )
{
@@ -5950,13 +5950,13 @@ PPTParagraphObj::PPTParagraphObj( const PPTStyleSheet& rStyleSheet, UINT32 nInst
}
PPTParagraphObj::PPTParagraphObj( PPTStyleTextPropReader& rPropReader, const PPTStyleSheet& rStyleSheet,
- UINT32 nInstance, PPTTextRulerInterpreter& rRuler ) :
+ sal_uInt32 nInstance, PPTTextRulerInterpreter& rRuler ) :
PPTParaPropSet ( *( (PPTParaPropSet*)rPropReader.aParaPropList.GetCurObject() ) ),
PPTNumberFormatCreator ( NULL ),
PPTTextRulerInterpreter ( rRuler ),
mrStyleSheet ( rStyleSheet ),
mnInstance ( nInstance ),
- mbTab ( FALSE ),
+ mbTab ( sal_False ),
mnCurrentObject ( 0 ),
mnPortionCount ( 0 ),
mpPortionList ( NULL )
@@ -5971,7 +5971,7 @@ PPTParagraphObj::PPTParagraphObj( PPTStyleTextPropReader& rPropReader, const PPT
pCharPropSet = (PPTCharPropSet*)rPropReader.aCharPropList.Seek( nCurPos );
mpPortionList = new PPTPortionObj*[ mnPortionCount ];
- for ( UINT32 i = 0; i < mnPortionCount; i++ )
+ for ( sal_uInt32 i = 0; i < mnPortionCount; i++ )
{
if ( pCharPropSet )
{
@@ -5997,7 +5997,7 @@ PPTParagraphObj::~PPTParagraphObj()
void PPTParagraphObj::AppendPortion( PPTPortionObj& rPPTPortion )
{
- UINT32 i;
+ sal_uInt32 i;
PPTPortionObj** mpOldPortionList = mpPortionList;
mpPortionList = new PPTPortionObj*[ ++mnPortionCount ];
for ( i = 0; i < mnPortionCount - 1; i++ )
@@ -6026,18 +6026,18 @@ void PPTParagraphObj::UpdateBulletRelSize( sal_uInt32& nBulletRelSize ) const
}
}
-BOOL PPTParagraphObj::GetAttrib( UINT32 nAttr, UINT32& nRetValue, UINT32 nDestinationInstance )
+sal_Bool PPTParagraphObj::GetAttrib( sal_uInt32 nAttr, sal_uInt32& nRetValue, sal_uInt32 nDestinationInstance )
{
- UINT32 nMask = 1 << nAttr;
+ sal_uInt32 nMask = 1 << nAttr;
nRetValue = 0;
if ( nAttr > 21 )
{
DBG_ERROR( "SJ:PPTParagraphObj::GetAttrib - attribute does not exist" );
- return FALSE;
+ return sal_False;
}
- UINT32 bIsHardAttribute = ( ( pParaSet->mnAttrSet & nMask ) != 0 ) ? 1 : 0;
+ sal_uInt32 bIsHardAttribute = ( ( pParaSet->mnAttrSet & nMask ) != 0 ) ? 1 : 0;
if ( bIsHardAttribute )
{
@@ -6275,14 +6275,14 @@ BOOL PPTParagraphObj::GetAttrib( UINT32 nAttr, UINT32& nRetValue, UINT32 nDestin
break;
}
}
- return (BOOL)bIsHardAttribute;
+ return (sal_Bool)bIsHardAttribute;
}
void PPTParagraphObj::ApplyTo( SfxItemSet& rSet, boost::optional< sal_Int16 >& rStartNumbering, SdrPowerPointImport& rManager, sal_uInt32 nDestinationInstance, const PPTParagraphObj* /*pPrev*/)
{
- INT16 nVal2;
- UINT32 nVal, nUpperDist, nLowerDist;
- UINT32 nInstance = nDestinationInstance != 0xffffffff ? nDestinationInstance : mnInstance;
+ sal_Int16 nVal2;
+ sal_uInt32 nVal, nUpperDist, nLowerDist;
+ sal_uInt32 nInstance = nDestinationInstance != 0xffffffff ? nDestinationInstance : mnInstance;
if ( ( nDestinationInstance != 0xffffffff ) || ( pParaSet->mnDepth <= 1 ) )
{
@@ -6331,15 +6331,15 @@ void PPTParagraphObj::ApplyTo( SfxItemSet& rSet, boost::optional< sal_Int16 >&
}
}
- UINT32 nIsBullet2, _nTextOfs, _nBulletOfs, nHardAttribute = 0;
+ sal_uInt32 nIsBullet2, _nTextOfs, _nBulletOfs, nHardAttribute = 0;
GetAttrib( PPT_ParaAttr_BulletOn, nIsBullet2, nDestinationInstance );
nHardAttribute += GetAttrib( PPT_ParaAttr_TextOfs, _nTextOfs, nDestinationInstance );
nHardAttribute += GetAttrib( PPT_ParaAttr_BulletOfs, _nBulletOfs, nDestinationInstance );
if ( !nIsBullet2 )
{
SvxLRSpaceItem aLRSpaceItem( EE_PARA_LRSPACE );
- UINT16 nAbsLSpace = (UINT16)( ( (UINT32)_nTextOfs * 2540 ) / 576 );
- UINT16 nFirstLineOffset = nAbsLSpace - (UINT16)( ( (UINT32)_nBulletOfs * 2540 ) / 576 );
+ sal_uInt16 nAbsLSpace = (sal_uInt16)( ( (sal_uInt32)_nTextOfs * 2540 ) / 576 );
+ sal_uInt16 nFirstLineOffset = nAbsLSpace - (sal_uInt16)( ( (sal_uInt32)_nBulletOfs * 2540 ) / 576 );
aLRSpaceItem.SetLeft( nAbsLSpace );
aLRSpaceItem.SetTxtFirstLineOfstValue( -nFirstLineOffset );
rSet.Put( aLRSpaceItem );
@@ -6370,27 +6370,27 @@ void PPTParagraphObj::ApplyTo( SfxItemSet& rSet, boost::optional< sal_Int16 >&
// LineSpacing
PPTPortionObj* pPortion = First();
- BOOL bIsHardAttribute = GetAttrib( PPT_ParaAttr_LineFeed, nVal, nDestinationInstance );
- nVal2 = (INT16)nVal;
+ sal_Bool bIsHardAttribute = GetAttrib( PPT_ParaAttr_LineFeed, nVal, nDestinationInstance );
+ nVal2 = (sal_Int16)nVal;
sal_uInt32 nFont = sal_uInt32();
if ( pPortion && pPortion->GetAttrib( PPT_CharAttr_Font, nFont, nDestinationInstance ) )
- bIsHardAttribute = TRUE;
+ bIsHardAttribute = sal_True;
if ( bIsHardAttribute )
{
if ( pPortion && ( nVal2 > 200 ) )
{
- UINT32 nFontHeight;
+ sal_uInt32 nFontHeight;
pPortion->GetAttrib( PPT_CharAttr_FontHeight, nFontHeight, nDestinationInstance );
nVal2 = -(sal_Int16)( ( nFontHeight * nVal * 8 ) / 100 );
}
- rSet.Put( SdrTextFixedCellHeightItem( TRUE ), SDRATTR_TEXT_USEFIXEDCELLHEIGHT );
+ rSet.Put( SdrTextFixedCellHeightItem( sal_True ), SDRATTR_TEXT_USEFIXEDCELLHEIGHT );
SvxLineSpacingItem aItem( 200, EE_PARA_SBL );
if ( nVal2 <= 0 )
- aItem.SetLineHeight( (UINT16)( rManager.ScalePoint( -nVal2 ) / 8 ) );
+ aItem.SetLineHeight( (sal_uInt16)( rManager.ScalePoint( -nVal2 ) / 8 ) );
else
{
- sal_uInt8 nPropLineSpace = (BYTE)nVal2;
+ sal_uInt8 nPropLineSpace = (sal_uInt8)nVal2;
aItem.SetPropLineSpace( nPropLineSpace );
aItem.GetLineSpaceRule() = SVX_LINE_SPACE_AUTO;
}
@@ -6398,47 +6398,47 @@ void PPTParagraphObj::ApplyTo( SfxItemSet& rSet, boost::optional< sal_Int16 >&
}
// Paragraph Spacing
- UINT32 nFontHeight = 0;
- bIsHardAttribute = ( (UINT32)GetAttrib( PPT_ParaAttr_UpperDist, nUpperDist, nDestinationInstance ) +
- (UINT32)GetAttrib( PPT_ParaAttr_LowerDist, nLowerDist, nDestinationInstance ) ) != 0;
+ sal_uInt32 nFontHeight = 0;
+ bIsHardAttribute = ( (sal_uInt32)GetAttrib( PPT_ParaAttr_UpperDist, nUpperDist, nDestinationInstance ) +
+ (sal_uInt32)GetAttrib( PPT_ParaAttr_LowerDist, nLowerDist, nDestinationInstance ) ) != 0;
if ( ( nUpperDist > 0 ) || ( nLowerDist > 0 ) )
{
if ( mnPortionCount )
{
mpPortionList[ mnPortionCount - 1 ]->GetAttrib( PPT_CharAttr_FontHeight, nFontHeight, nDestinationInstance );
- if ( ((INT16)nUpperDist) > 0 )
+ if ( ((sal_Int16)nUpperDist) > 0 )
nUpperDist = - (sal_Int16)( ( nFontHeight * nUpperDist * 100 ) / 1000 );
- if ( ((INT16)nLowerDist) > 0 )
+ if ( ((sal_Int16)nLowerDist) > 0 )
nLowerDist = - (sal_Int16)( ( nFontHeight * nLowerDist * 100 ) / 1000 );
}
- bIsHardAttribute = TRUE;
+ bIsHardAttribute = sal_True;
}
if ( bIsHardAttribute )
{
SvxULSpaceItem aULSpaceItem( EE_PARA_ULSPACE );
- nVal2 = (INT16)nUpperDist;
+ nVal2 = (sal_Int16)nUpperDist;
if ( nVal2 <= 0 )
- aULSpaceItem.SetUpper( (UINT16)(((UINT32) - nVal2 * 2540 ) / ( 72 * 8 ) ) );
+ aULSpaceItem.SetUpper( (sal_uInt16)(((sal_uInt32) - nVal2 * 2540 ) / ( 72 * 8 ) ) );
else
{
aULSpaceItem.SetUpperValue( 0 );
- aULSpaceItem.SetPropUpper( (UINT16)nUpperDist == 100 ? 101 : (UINT16)nUpperDist );
+ aULSpaceItem.SetPropUpper( (sal_uInt16)nUpperDist == 100 ? 101 : (sal_uInt16)nUpperDist );
}
- nVal2 = (INT16)nLowerDist;
+ nVal2 = (sal_Int16)nLowerDist;
if ( nVal2 <= 0 )
- aULSpaceItem.SetLower( (UINT16)(((UINT32) - nVal2 * 2540 ) / ( 72 * 8 ) ) );
+ aULSpaceItem.SetLower( (sal_uInt16)(((sal_uInt32) - nVal2 * 2540 ) / ( 72 * 8 ) ) );
else
{
aULSpaceItem.SetLowerValue( 0 );
- aULSpaceItem.SetPropLower( (UINT16)nLowerDist == 100 ? 101 : (UINT16)nLowerDist );
+ aULSpaceItem.SetPropLower( (sal_uInt16)nLowerDist == 100 ? 101 : (sal_uInt16)nLowerDist );
}
rSet.Put( aULSpaceItem );
}
if ( mbTab ) // makes it sense to apply tabsettings
{
- UINT32 i, nDefaultTab, nTab, nTextOfs2 = 0;
- UINT32 nLatestManTab = 0;
+ sal_uInt32 i, nDefaultTab, nTab, nTextOfs2 = 0;
+ sal_uInt32 nLatestManTab = 0;
GetAttrib( PPT_ParaAttr_TextOfs, nTextOfs2, nDestinationInstance );
GetAttrib( PPT_ParaAttr_BulletOfs, nTab, nDestinationInstance );
GetAttrib( PPT_ParaAttr_BulletOn, i, nDestinationInstance );
@@ -6458,7 +6458,7 @@ void PPTParagraphObj::ApplyTo( SfxItemSet& rSet, boost::optional< sal_Int16 >&
default : eTabAdjust = SVX_TAB_ADJUST_LEFT;
}
if ( nTab > nTextOfs2 )
- aTabItem.Insert( SvxTabStop( (UINT16)( ( ( nTab - nTextOfs2 ) * 2540 ) / 576 ), eTabAdjust ) );
+ aTabItem.Insert( SvxTabStop( (sal_uInt16)( ( ( nTab - nTextOfs2 ) * 2540 ) / 576 ), eTabAdjust ) );
}
nLatestManTab = nTab;
}
@@ -6471,7 +6471,7 @@ void PPTParagraphObj::ApplyTo( SfxItemSet& rSet, boost::optional< sal_Int16 >&
nTab = nDefaultTab * ( 1 + nTab );
for ( i = 0; ( i < 20 ) && ( nTab < 0x1b00 ); i++ )
{
- aTabItem.Insert( SvxTabStop( (UINT16)( ( ( nTab - nTextOfs2 ) * 2540 ) / 576 ) ) );
+ aTabItem.Insert( SvxTabStop( (sal_uInt16)( ( ( nTab - nTextOfs2 ) * 2540 ) / 576 ) ) );
nTab += nDefaultTab;
}
}
@@ -6479,10 +6479,10 @@ void PPTParagraphObj::ApplyTo( SfxItemSet& rSet, boost::optional< sal_Int16 >&
}
}
-UINT32 PPTParagraphObj::GetTextSize()
+sal_uInt32 PPTParagraphObj::GetTextSize()
{
- UINT32 nCount, nRetValue = 0;
- for ( UINT32 i = 0; i < mnPortionCount; i++ )
+ sal_uInt32 nCount, nRetValue = 0;
+ for ( sal_uInt32 i = 0; i < mnPortionCount; i++ )
{
PPTPortionObj* pPortionObj = mpPortionList[ i ];
nCount = pPortionObj->Count();
@@ -6503,7 +6503,7 @@ PPTPortionObj* PPTParagraphObj::First()
PPTPortionObj* PPTParagraphObj::Next()
{
- UINT32 i = mnCurrentObject + 1;
+ sal_uInt32 i = mnCurrentObject + 1;
if ( i >= mnPortionCount )
return NULL;
mnCurrentObject++;
@@ -6565,7 +6565,7 @@ void PPTFieldEntry::GetDateTime( const sal_uInt32 nVal, SvxDateFormat& eDateForm
}
}
-void PPTFieldEntry::SetDateTime( UINT32 nVal )
+void PPTFieldEntry::SetDateTime( sal_uInt32 nVal )
{
SvxDateFormat eDateFormat;
SvxTimeFormat eTimeFormat;
@@ -6601,7 +6601,7 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
DffRecordHeader aExtParaHd;
aExtParaHd.nRecType = 0; // set empty
- UINT32 bStatus = TRUE;
+ sal_uInt32 bStatus = sal_True;
DffRecordHeader aShapeContainerHd;
rIn >> aShapeContainerHd;
@@ -6620,7 +6620,7 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
////////////////
if ( rSdrPowerPointImport.maShapeRecords.SeekToContent( rIn, DFF_msofbtClientData, SEEK_FROM_CURRENT_AND_RESTART ) )
{
- UINT32 nOldPos = rIn.Tell();
+ sal_uInt32 nOldPos = rIn.Tell();
DffRecordHeader& aClientDataContainerHd = *rSdrPowerPointImport.maShapeRecords.Current();
DffRecordHeader aPlaceHolderAtomHd;
if ( rSdrPowerPointImport.SeekToRec( rIn, PPT_PST_OEPlaceholderAtom, aClientDataContainerHd.GetRecEndFilePos(), &aPlaceHolderAtomHd ) )
@@ -6642,7 +6642,7 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
if ( rSdrPowerPointImport.maShapeRecords.SeekToContent( rIn, DFF_msofbtClientTextbox, SEEK_FROM_CURRENT_AND_RESTART ) )
{
DffRecordHeader aClientTextBoxHd( *rSdrPowerPointImport.maShapeRecords.Current() );
- UINT32 nTextRulerAtomOfs = 0; // case of zero -> this atom may be found in aClientDataContainerHd;
+ sal_uInt32 nTextRulerAtomOfs = 0; // case of zero -> this atom may be found in aClientDataContainerHd;
// case of -1 -> ther is no atom of this kind
// else -> this is the fileofs where we can get it
@@ -6655,7 +6655,7 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
DffRecordHeader aTextHd;
if ( rSdrPowerPointImport.SeekToRec( rIn, PPT_PST_OutlineTextRefAtom, aClientTextBoxHd.GetRecEndFilePos(), &aTextHd ) )
{
- UINT32 nRefNum;
+ sal_uInt32 nRefNum;
rIn >> nRefNum;
if ( rSdrPowerPointImport.SeekToRec( rIn, PPT_PST_TextRulerAtom, aClientTextBoxHd.GetRecEndFilePos() ) )
@@ -6663,7 +6663,7 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
else
nTextRulerAtomOfs = 0xffffffff;
- UINT32 nInstance = 0;
+ sal_uInt32 nInstance = 0;
switch( rSdrPowerPointImport.eAktPageKind )
{
case PPT_NOTEPAGE :
@@ -6673,18 +6673,18 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
case PPT_SLIDEPAGE :
break;
default :
- bStatus = FALSE;
+ bStatus = sal_False;
}
if ( bStatus )
{
sal_uInt32 nSlideId = rSdrPowerPointImport.GetAktPageId();
if ( !nSlideId )
- bStatus = FALSE;
+ bStatus = sal_False;
else
{
if ( !aExtParaHd.nRecType )
{
- UINT32 nOldPos = rIn.Tell();
+ sal_uInt32 nOldPos = rIn.Tell();
// try to locate the referenced ExtendedParaHd
DffRecordHeader* pHd = pExtParaProv->
aExtendedPresRules.GetRecordHeader( PPT_PST_ExtendedParagraphHeaderAtom,
@@ -6692,7 +6692,7 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
DffRecordHeader aPresRuleHd;
DffRecordHeader* pFirst = pHd;
- UINT32 nTmpSlideId, nTmpRef;
+ sal_uInt32 nTmpSlideId, nTmpRef;
while ( pHd )
{
pHd->SeekToContent( rIn );
@@ -6743,7 +6743,7 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
aClientTextBoxHd.SeekToEndOfRecord( rIn );
}
if ( rIn.Tell() > pE->nSlidePersistEndOffset )
- bStatus = FALSE;
+ bStatus = sal_False;
else
{ // patching the RecordHeader
aClientTextBoxHd.nFilePos -= DFF_COMMON_RECORD_HEADER_SIZE;
@@ -6773,14 +6773,14 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
if ( rSdrPowerPointImport.SeekToRec( rIn, PPT_PST_TextHeaderAtom, aClientTextBoxHd.GetRecEndFilePos(), &aTextHd ) )
{
// TextHeaderAtom is always the first Atom
- UINT16 nInstance;
+ sal_uInt16 nInstance;
rIn >> nInstance; // this number tells us the TxMasterStyleAtom Instance
if ( nInstance > 8 )
nInstance = 4;
aTextHd.SeekToEndOfRecord( rIn );
mpImplTextObj->mnInstance = nInstance;
- UINT32 nFilePos = rIn.Tell();
+ sal_uInt32 nFilePos = rIn.Tell();
if ( rSdrPowerPointImport.SeekToRec2( PPT_PST_TextBytesAtom,
PPT_PST_TextCharsAtom,
aClientTextBoxHd.GetRecEndFilePos() )
@@ -6864,7 +6864,7 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
while ( rIn.Tell() < aClientTextBoxHd.GetRecEndFilePos() )
{
rIn >> aTextHd;
- UINT16 nVal = 0;
+ sal_uInt16 nVal = 0;
PPTFieldEntry* pEntry = NULL;
switch ( aTextHd.nRecType )
{
@@ -6946,7 +6946,7 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
sal_Unicode n;
xub_StrLen nLen;
String aStr;
- bool inquote = FALSE;
+ bool inquote = sal_False;
for (nLen = 0, n = 0; nLen < 64; nLen++)
{
rIn >> n;
@@ -7034,13 +7034,13 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
{
if ( !pFieldList )
pFieldList = new List;
- UINT32 n;
+ sal_uInt32 n;
for ( n = 0; n < pFieldList->Count(); n++ )
{ // sorting fields ( hi >> lo )
if ( ( (PPTFieldEntry*)pFieldList->GetObject( n ) )->nPos < pEntry->nPos )
break;
}
- pFieldList->Insert( pEntry, (UINT32)n );
+ pFieldList->Insert( pEntry, (sal_uInt32)n );
}
}
if ( pFieldList )
@@ -7057,8 +7057,8 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
{
PPTCharPropSet* pSet = (PPTCharPropSet*)aCharPropList.GetObject( n );
String aString( pSet->maString );
- UINT32 nCount = aString.Len();
- UINT32 nPos = pSet->mnOriginalTextPos + nCount;
+ sal_uInt32 nCount = aString.Len();
+ sal_uInt32 nPos = pSet->mnOriginalTextPos + nCount;
while ( pFE && nCount-- )
{
nPos--;
@@ -7071,12 +7071,12 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
{
if ( aString.GetChar( (sal_uInt16)nCount ) == 0x2a )
{
- UINT32 nBehind = aString.Len() - ( nCount + 1 );
+ sal_uInt32 nBehind = aString.Len() - ( nCount + 1 );
pSet->maString = String();
if ( nBehind )
{
PPTCharPropSet* pNewCPS = new PPTCharPropSet( *pSet );
- pNewCPS->maString = String( aString, (UINT16)nCount + 1, (UINT16)nBehind );
+ pNewCPS->maString = String( aString, (sal_uInt16)nCount + 1, (sal_uInt16)nBehind );
aCharPropList.Insert( pNewCPS, n + 1 );
}
if ( pFE->pField2 )
@@ -7092,7 +7092,7 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
if ( nCount )
{
PPTCharPropSet* pNewCPS = new PPTCharPropSet( *pSet );
- pNewCPS->maString = String( aString, (UINT16)0, (UINT16)nCount );
+ pNewCPS->maString = String( aString, (sal_uInt16)0, (sal_uInt16)nCount );
aCharPropList.Insert( pNewCPS, n++ );
}
if ( pFE->pField1 )
@@ -7113,7 +7113,7 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
if ( nCount )
{
pBefCPS = new PPTCharPropSet( *pSet );
- pSet->maString = String( pSet->maString, (UINT16)nCount, (UINT16)( pSet->maString.Len() - nCount ) );
+ pSet->maString = String( pSet->maString, (sal_uInt16)nCount, (sal_uInt16)( pSet->maString.Len() - nCount ) );
}
sal_uInt32 nIdx = n;
sal_Int32 nHyperLenLeft = nHyperLen;
@@ -7161,9 +7161,9 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
else
{
PPTCharPropSet* pNewCPS = new PPTCharPropSet( *pCurrent );
- pNewCPS->maString = String( pCurrent->maString, (UINT16)nHyperLenLeft, (UINT16)( nNextStringLen - nHyperLenLeft ) );
+ pNewCPS->maString = String( pCurrent->maString, (sal_uInt16)nHyperLenLeft, (sal_uInt16)( nNextStringLen - nHyperLenLeft ) );
aCharPropList.Insert( pNewCPS, nIdx + 1 );
- String aRepresentation( pCurrent->maString, 0, (UINT16)nHyperLenLeft );
+ String aRepresentation( pCurrent->maString, 0, (sal_uInt16)nHyperLenLeft );
pCurrent->mpFieldItem = new SvxFieldItem( SvxURLField( pField->GetURL(), aRepresentation, SVXURLFORMAT_REPR ), EE_FEATURE_FIELD );
nHyperLenLeft = 0;
}
@@ -7176,7 +7176,7 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
if ( pBefCPS )
{
- pBefCPS->maString = String( aString, (UINT16)0, (UINT16)nCount );
+ pBefCPS->maString = String( aString, (sal_uInt16)0, (sal_uInt16)nCount );
aCharPropList.Insert( pBefCPS, n++ );
}
@@ -7194,7 +7194,7 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
}
mpImplTextObj->mpParagraphList = new PPTParagraphObj*[ nParagraphs ];
aStyleTextPropReader.aCharPropList.First();
- UINT32 nCount = 0;
+ sal_uInt32 nCount = 0;
for ( void* pPtr = aStyleTextPropReader.aParaPropList.First();
pPtr;
pPtr = aStyleTextPropReader.aParaPropList.Next() )
@@ -7243,7 +7243,7 @@ PPTParagraphObj* PPTTextObj::First()
PPTParagraphObj* PPTTextObj::Next()
{
- UINT32 i = mpImplTextObj->mnCurrentObject + 1;
+ sal_uInt32 i = mpImplTextObj->mnCurrentObject + 1;
if ( i >= mpImplTextObj->mnParagraphCount )
return NULL;
mpImplTextObj->mnCurrentObject++;
@@ -7554,8 +7554,8 @@ void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell >& xCell )
com::sun::star::awt::Gradient aGradient;
aGradient.Style = (awt::GradientStyle) aXGradient.GetGradientStyle();
- aGradient.StartColor = (INT32)aXGradient.GetStartColor().GetColor();
- aGradient.EndColor = (INT32)aXGradient.GetEndColor().GetColor();
+ aGradient.StartColor = (sal_Int32)aXGradient.GetStartColor().GetColor();
+ aGradient.EndColor = (sal_Int32)aXGradient.GetEndColor().GetColor();
aGradient.Angle = (short)aXGradient.GetAngle();
aGradient.Border = aXGradient.GetBorder();
aGradient.XOffset = aXGradient.GetXOffset();
@@ -7684,7 +7684,7 @@ SdrObject* SdrPowerPointImport::CreateTable( SdrObject* pGroup, sal_uInt32* pTab
std::set< sal_Int32 > aRows;
std::set< sal_Int32 > aColumns;
- SdrObjListIter aGroupIter( *pSubList, IM_DEEPNOGROUPS, FALSE );
+ SdrObjListIter aGroupIter( *pSubList, IM_DEEPNOGROUPS, sal_False );
while( aGroupIter.IsMore() )
{
const SdrObject* pObj( aGroupIter.Next() );
diff --git a/filter/source/msfilter/svxmsbas.cxx b/filter/source/msfilter/svxmsbas.cxx
index 498349320025..f9ffb412f18b 100644
--- a/filter/source/msfilter/svxmsbas.cxx
+++ b/filter/source/msfilter/svxmsbas.cxx
@@ -67,7 +67,7 @@ static ::rtl::OUString sVBAOption( RTL_CONSTASCII_USTRINGPARAM( "Option VBASuppo
int SvxImportMSVBasic::Import( const String& rStorageName,
const String &rSubStorageName,
- BOOL bAsComment, BOOL bStripped )
+ sal_Bool bAsComment, sal_Bool bStripped )
{
std::vector< String > codeNames;
return Import( rStorageName, rSubStorageName, codeNames, bAsComment, bStripped );
@@ -76,7 +76,7 @@ int SvxImportMSVBasic::Import( const String& rStorageName,
int SvxImportMSVBasic::Import( const String& rStorageName,
const String &rSubStorageName,
const std::vector< String >& codeNames,
- BOOL bAsComment, BOOL bStripped )
+ sal_Bool bAsComment, sal_Bool bStripped )
{
int nRet = 0;
if( bImport && ImportCode_Impl( rStorageName, rSubStorageName, codeNames,
@@ -103,7 +103,7 @@ bool SvxImportMSVBasic::ImportForms_Impl(const String& rStorageName,
std::vector<String> aUserForms;
SvStorageInfoList aContents;
xVBAStg->FillInfoList(&aContents);
- for (USHORT nI = 0; nI < aContents.Count(); ++nI)
+ for (sal_uInt16 nI = 0; nI < aContents.Count(); ++nI)
{
SvStorageInfo& rInfo = aContents.GetObject(nI);
if (!rInfo.IsStream() && rInfo.GetName() != rSubStorageName)
@@ -195,10 +195,10 @@ bool SvxImportMSVBasic::ImportForms_Impl(const String& rStorageName,
}
-BOOL SvxImportMSVBasic::CopyStorage_Impl( const String& rStorageName,
+sal_Bool SvxImportMSVBasic::CopyStorage_Impl( const String& rStorageName,
const String& rSubStorageName)
{
- BOOL bValidStg = FALSE;
+ sal_Bool bValidStg = sal_False;
{
SvStorageRef xVBAStg( xRoot->OpenSotStorage( rStorageName,
STREAM_READWRITE | STREAM_NOCREATE |
@@ -211,7 +211,7 @@ BOOL SvxImportMSVBasic::CopyStorage_Impl( const String& rStorageName,
if( xVBASubStg.Is() && !xVBASubStg->GetError() )
{
// then we will copy these storages into the (temporary) storage of the document
- bValidStg = TRUE;
+ bValidStg = sal_True;
}
}
}
@@ -231,18 +231,18 @@ BOOL SvxImportMSVBasic::CopyStorage_Impl( const String& rStorageName,
if ( nError != ERRCODE_NONE )
xRoot->SetError( nError );
else
- bValidStg = TRUE;
+ bValidStg = sal_True;
}
return bValidStg;
}
-BOOL SvxImportMSVBasic::ImportCode_Impl( const String& rStorageName,
+sal_Bool SvxImportMSVBasic::ImportCode_Impl( const String& rStorageName,
const String &rSubStorageName,
const std::vector< String >& codeNames,
- BOOL bAsComment, BOOL bStripped )
+ sal_Bool bAsComment, sal_Bool bStripped )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
VBA_Impl aVBA( *xRoot, bAsComment );
if( aVBA.Open(rStorageName,rSubStorageName) )
{
@@ -260,7 +260,7 @@ BOOL SvxImportMSVBasic::ImportCode_Impl( const String& rStorageName,
{
}
- UINT16 nStreamCount = aVBA.GetNoStreams();
+ sal_uInt16 nStreamCount = aVBA.GetNoStreams();
Reference<XNameContainer> xLib;
String aLibName( RTL_CONSTASCII_USTRINGPARAM( "Standard" ) );
if( xLibContainer.is() && nStreamCount )
@@ -295,7 +295,7 @@ BOOL SvxImportMSVBasic::ImportCode_Impl( const String& rStorageName,
NameModuleDataHash moduleData;
NameModuleInfoHash moduleInfos;
- for( UINT16 i=0; i<nStreamCount;i++)
+ for( sal_uInt16 i=0; i<nStreamCount;i++)
{
StringArray aDecompressed = aVBA.Decompress(i);
#if 0
@@ -383,7 +383,7 @@ BOOL SvxImportMSVBasic::ImportCode_Impl( const String& rStorageName,
};
::rtl::OUString aSource(sTemp);
- for(ULONG j=0;j<aDecompressed.GetSize();j++)
+ for(sal_uLong j=0;j<aDecompressed.GetSize();j++)
{
if (bStripped)
{
diff --git a/filter/source/msfilter/svxmsbas2.cxx b/filter/source/msfilter/svxmsbas2.cxx
index 8da475ed78c8..636c72ebbdbb 100644
--- a/filter/source/msfilter/svxmsbas2.cxx
+++ b/filter/source/msfilter/svxmsbas2.cxx
@@ -35,10 +35,10 @@
using namespace com::sun::star;
-ULONG SvxImportMSVBasic::SaveOrDelMSVBAStorage( BOOL bSaveInto,
+sal_uLong SvxImportMSVBasic::SaveOrDelMSVBAStorage( sal_Bool bSaveInto,
const String& rStorageName )
{
- ULONG nRet = ERRCODE_NONE;
+ sal_uLong nRet = ERRCODE_NONE;
uno::Reference < embed::XStorage > xSrcRoot( rDocSh.GetStorage() );
String aDstStgName( GetMSBasicStorageName() );
SotStorageRef xVBAStg( SotStorage::OpenOLEStorage( xSrcRoot, aDstStgName,
@@ -69,7 +69,7 @@ ULONG SvxImportMSVBasic::SaveOrDelMSVBAStorage( BOOL bSaveInto,
// check if the MS-VBA-Storage exists in the RootStorage of the DocShell.
// If it exists, then return the WarningId for losing the information.
-ULONG SvxImportMSVBasic::GetSaveWarningOfMSVBAStorage( SfxObjectShell &rDocSh)
+sal_uLong SvxImportMSVBasic::GetSaveWarningOfMSVBAStorage( SfxObjectShell &rDocSh)
{
uno::Reference < embed::XStorage > xSrcRoot( rDocSh.GetStorage() );
SvStorageRef xVBAStg( SotStorage::OpenOLEStorage( xSrcRoot, GetMSBasicStorageName(),
diff --git a/filter/source/msfilter/viscache.hxx b/filter/source/msfilter/viscache.hxx
index 075c4c39cc38..83af84a8c1a9 100644
--- a/filter/source/msfilter/viscache.hxx
+++ b/filter/source/msfilter/viscache.hxx
@@ -37,17 +37,17 @@
*************************************************************************/
class Impl_OlePres
{
- ULONG nFormat;
- USHORT nAspect;
+ sal_uLong nFormat;
+ sal_uInt16 nAspect;
Bitmap * pBmp;
GDIMetaFile * pMtf;
- UINT32 nAdvFlags;
- INT32 nJobLen;
- BYTE* pJob;
+ sal_uInt32 nAdvFlags;
+ sal_Int32 nJobLen;
+ sal_uInt8* pJob;
Size aSize; // Groesse in 100TH_MM
public:
- Impl_OlePres( ULONG nF )
+ Impl_OlePres( sal_uLong nF )
: nFormat( nF )
, pBmp( NULL )
, pMtf( NULL )
@@ -69,13 +69,13 @@ public:
}
Bitmap *GetBitmap() const { return pBmp; }
GDIMetaFile *GetMetaFile() const { return pMtf; }
- ULONG GetFormat() const { return nFormat; }
- void SetAspect( USHORT nAsp ) { nAspect = nAsp; }
- ULONG GetAdviseFlags() const { return nAdvFlags; }
- void SetAdviseFlags( ULONG nAdv ) { nAdvFlags = nAdv; }
+ sal_uLong GetFormat() const { return nFormat; }
+ void SetAspect( sal_uInt16 nAsp ) { nAspect = nAsp; }
+ sal_uLong GetAdviseFlags() const { return nAdvFlags; }
+ void SetAdviseFlags( sal_uLong nAdv ) { nAdvFlags = nAdv; }
void SetSize( const Size & rSize ) { aSize = rSize; }
- /// return FALSE => unknown format
- BOOL Read( SvStream & rStm );
+ /// return sal_False => unknown format
+ sal_Bool Read( SvStream & rStm );
void Write( SvStream & rStm );
};
diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index 1adbbc63619c..030e64ceaa65 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -70,7 +70,7 @@ ImpPDFTabDialog::ImpPDFTabDialog( Window* pParent,
const Reference< XComponent >& rxDoc,
const Reference< lang::XMultiServiceFactory >& xFact
) :
- SfxTabDialog( pParent, PDFFilterResId( RID_PDF_EXPORT_DLG ), 0, FALSE, 0 ),
+ SfxTabDialog( pParent, PDFFilterResId( RID_PDF_EXPORT_DLG ), 0, sal_False, 0 ),
mxMSF( xFact ),
maConfigItem( String( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Filter/PDF/Export/" ) ), &rFilterData ),
maConfigI18N( String( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/I18N/CTL/" ) ) ),
@@ -180,7 +180,7 @@ ImpPDFTabDialog::ImpPDFTabDialog( Window* pParent,
{
}
-//get the CTL (Complex Text Layout) from general options, returns TRUE if we have a CTL font on our hands.
+//get the CTL (Complex Text Layout) from general options, returns sal_True if we have a CTL font on our hands.
mbUseCTLFont = maConfigI18N.ReadBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "CTLFont" ) ), sal_False );
mbUseLosslessCompression = maConfigItem.ReadBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "UseLosslessCompression" ) ), sal_False );
@@ -274,7 +274,7 @@ ImpPDFTabDialog::~ImpPDFTabDialog()
}
// -----------------------------------------------------------------------------
-void ImpPDFTabDialog::PageCreated( USHORT _nId,
+void ImpPDFTabDialog::PageCreated( sal_uInt16 _nId,
SfxTabPage& _rPage )
{
switch( _nId )
@@ -524,7 +524,7 @@ void ImpPDFTabGeneralPage::SetFilterConfigItem( const ImpPDFTabDialog* paParent
switch( paParent->mnPDFTypeSelection )
{
default:
- case 0: maCbPDFA1b.Check( FALSE ); // PDF 1.4
+ case 0: maCbPDFA1b.Check( sal_False ); // PDF 1.4
break;
case 1: maCbPDFA1b.Check(); // PDF/A-1a
break;
@@ -556,7 +556,7 @@ void ImpPDFTabGeneralPage::SetFilterConfigItem( const ImpPDFTabDialog* paParent
if ( mbIsPresentation )
{
- maCbExportNotesPages.Show( TRUE );
+ maCbExportNotesPages.Show( sal_True );
maCbExportNotesPages.Check( paParent->mbExportNotesPages );
}
else
@@ -570,8 +570,8 @@ void ImpPDFTabGeneralPage::SetFilterConfigItem( const ImpPDFTabDialog* paParent
maCbAddStream.SetPosPixel( Point( aPos.X(), aPos.Y() - nCheckBoxHeight ) );
aPos = maCbEmbedStandardFonts.GetPosPixel();
maCbEmbedStandardFonts.SetPosPixel( Point( aPos.X(), aPos.Y() - nCheckBoxHeight ) );
- maCbExportNotesPages.Show( FALSE );
- maCbExportNotesPages.Check( FALSE );
+ maCbExportNotesPages.Show( sal_False );
+ maCbExportNotesPages.Check( sal_False );
}
maCbExportEmptyPages.Check( !paParent->mbIsSkipEmptyPages );
@@ -584,13 +584,13 @@ void ImpPDFTabGeneralPage::SetFilterConfigItem( const ImpPDFTabDialog* paParent
}
if( xIfc.is() )
{
- maCbAddStream.Show( TRUE );
+ maCbAddStream.Show( sal_True );
maCbAddStream.Check( paParent->mbAddStream );
}
else
{
- maCbAddStream.Show( FALSE );
- maCbAddStream.Check( FALSE );
+ maCbAddStream.Show( sal_False );
+ maCbAddStream.Check( sal_False );
}
maCbAddStream.SetToggleHdl( LINK( this, ImpPDFTabGeneralPage, ToggleAddStreamHdl ) );
// init addstream dependencies
@@ -692,17 +692,17 @@ IMPL_LINK( ImpPDFTabGeneralPage, ToggleAddStreamHdl, void*, EMPTYARG )
if( maCbAddStream.IsChecked() )
{
maRbAll.Check();
- maRbRange.Enable( FALSE );
- maRbSelection.Enable( FALSE );
- maEdPages.Enable( FALSE );
- maEdPages.SetReadOnly( TRUE );
- maRbAll.Enable( FALSE );
+ maRbRange.Enable( sal_False );
+ maRbSelection.Enable( sal_False );
+ maEdPages.Enable( sal_False );
+ maEdPages.SetReadOnly( sal_True );
+ maRbAll.Enable( sal_False );
}
else
{
- maRbAll.Enable( TRUE );
- maRbRange.Enable( TRUE );
- maRbSelection.Enable( TRUE );
+ maRbAll.Enable( sal_True );
+ maRbRange.Enable( sal_True );
+ maRbSelection.Enable( sal_True );
}
}
return 0;
@@ -877,23 +877,23 @@ void ImpPDFTabOpnFtrPage::SetFilterConfigItem( const ImpPDFTabDialog* paParent
default:
case 0:
maRbMagnDefault.Check();
- maNumZoom.Enable( FALSE );
+ maNumZoom.Enable( sal_False );
break;
case 1:
maRbMagnFitWin.Check();
- maNumZoom.Enable( FALSE );
+ maNumZoom.Enable( sal_False );
break;
case 2:
maRbMagnFitWidth.Check();
- maNumZoom.Enable( FALSE );
+ maNumZoom.Enable( sal_False );
break;
case 3:
maRbMagnFitVisible.Check();
- maNumZoom.Enable( FALSE );
+ maNumZoom.Enable( sal_False );
break;
case 4:
maRbMagnZoom.Check();
- maNumZoom.Enable( TRUE );
+ maNumZoom.Enable( sal_True );
break;
};
@@ -1002,13 +1002,13 @@ void ImpPDFTabViewerPage::SetFilterConfigItem( const ImpPDFTabDialog* paParent
maCbTransitionEffects.Enable( mbIsPresentation );
if( paParent->mnOpenBookmarkLevels < 0 )
{
- maRbAllBookmarkLevels.Check( TRUE );
- maNumBookmarkLevels.Enable( FALSE );
+ maRbAllBookmarkLevels.Check( sal_True );
+ maNumBookmarkLevels.Enable( sal_False );
}
else
{
- maRbVisibleBookmarkLevels.Check( TRUE );
- maNumBookmarkLevels.Enable( TRUE );
+ maRbVisibleBookmarkLevels.Check( sal_True );
+ maNumBookmarkLevels.Enable( sal_True );
maNumBookmarkLevels.SetValue( paParent->mnOpenBookmarkLevels );
}
}
@@ -1474,28 +1474,28 @@ ImplErrorDialog::ImplErrorDialog( const std::set< vcl::PDFWriter::ErrorCode >& r
{
case vcl::PDFWriter::Warning_Transparency_Omitted_PDFA:
{
- USHORT nPos = maErrors.InsertEntry( String( PDFFilterResId( STR_WARN_TRANSP_PDFA_SHORT ) ),
+ sal_uInt16 nPos = maErrors.InsertEntry( String( PDFFilterResId( STR_WARN_TRANSP_PDFA_SHORT ) ),
aWarnImg );
maErrors.SetEntryData( nPos, new String( PDFFilterResId( STR_WARN_TRANSP_PDFA ) ) );
}
break;
case vcl::PDFWriter::Warning_Transparency_Omitted_PDF13:
{
- USHORT nPos = maErrors.InsertEntry( String( PDFFilterResId( STR_WARN_TRANSP_VERSION_SHORT ) ),
+ sal_uInt16 nPos = maErrors.InsertEntry( String( PDFFilterResId( STR_WARN_TRANSP_VERSION_SHORT ) ),
aWarnImg );
maErrors.SetEntryData( nPos, new String( PDFFilterResId( STR_WARN_TRANSP_VERSION ) ) );
}
break;
case vcl::PDFWriter::Warning_FormAction_Omitted_PDFA:
{
- USHORT nPos = maErrors.InsertEntry( String( PDFFilterResId( STR_WARN_FORMACTION_PDFA_SHORT ) ),
+ sal_uInt16 nPos = maErrors.InsertEntry( String( PDFFilterResId( STR_WARN_FORMACTION_PDFA_SHORT ) ),
aWarnImg );
maErrors.SetEntryData( nPos, new String( PDFFilterResId( STR_WARN_FORMACTION_PDFA ) ) );
}
break;
case vcl::PDFWriter::Warning_Transparency_Converted:
{
- USHORT nPos = maErrors.InsertEntry( String( PDFFilterResId( STR_WARN_TRANSP_CONVERTED_SHORT ) ),
+ sal_uInt16 nPos = maErrors.InsertEntry( String( PDFFilterResId( STR_WARN_TRANSP_CONVERTED_SHORT ) ),
aWarnImg );
maErrors.SetEntryData( nPos, new String( PDFFilterResId( STR_WARN_TRANSP_CONVERTED ) ) );
}
@@ -1546,7 +1546,7 @@ ImplErrorDialog::ImplErrorDialog( const std::set< vcl::PDFWriter::ErrorCode >& r
ImplErrorDialog::~ImplErrorDialog()
{
// free strings again
- for( USHORT n = 0; n < maErrors.GetEntryCount(); n++ )
+ for( sal_uInt16 n = 0; n < maErrors.GetEntryCount(); n++ )
delete (String*)maErrors.GetEntryData( n );
}
diff --git a/filter/source/pdf/impdialog.hxx b/filter/source/pdf/impdialog.hxx
index 3fd98c775e0d..fb13ac447587 100644
--- a/filter/source/pdf/impdialog.hxx
+++ b/filter/source/pdf/impdialog.hxx
@@ -165,7 +165,7 @@ public:
const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& getServiceFactory() const { return mxMSF; }
protected:
- virtual void PageCreated( USHORT _nId,
+ virtual void PageCreated( sal_uInt16 _nId,
SfxTabPage& _rPage );
virtual short Ok();
};
diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx
index a7f8fdb2b569..7f50c51d862d 100644
--- a/filter/source/pdf/pdfexport.cxx
+++ b/filter/source/pdf/pdfexport.cxx
@@ -211,7 +211,7 @@ sal_Bool PDFExport::ExportSelection( vcl::PDFWriter& rPDFWriter, Reference< com:
const Size aMtfSize( aPageSize.Width, aPageSize.Height );
pOut->Push();
- pOut->EnableOutput( FALSE );
+ pOut->EnableOutput( sal_False );
pOut->SetMapMode( aMapMode );
aMtf.SetPrefSize( aMtfSize );
@@ -901,7 +901,7 @@ sal_Bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue
if( nPageCount > 0 )
bRet = ExportSelection( *pPDFWriter, xRenderable, aSelection, aMultiSelection, aRenderOptions, nPageCount );
else
- bRet = FALSE;
+ bRet = sal_False;
if ( bRet && bSecondPassForImpressNotes )
{
diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index 081a914934c7..b1063b0d8682 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -326,7 +326,7 @@ sal_Bool SVGFilter::implExportDocument( const Reference< XDrawPages >& rxMasterP
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "xmlns", B2UCONST( "http://www.w3.org/2000/svg" ) );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "xmlns:xlink", B2UCONST( "http://www.w3.org/1999/xlink" ) );
- mpSVGDoc = new SvXMLElementExport( *mpSVGExport, XML_NAMESPACE_NONE, "svg", TRUE, TRUE );
+ mpSVGDoc = new SvXMLElementExport( *mpSVGExport, XML_NAMESPACE_NONE, "svg", sal_True, sal_True );
while( ( nCurPage <= nLastPage ) && ( -1 == nVisible ) )
{
@@ -409,7 +409,7 @@ sal_Bool SVGFilter::implGenerateMetaData( const Reference< XDrawPages >& /* rxMa
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "numberOfSlides", OUString::valueOf( rxDrawPages->getCount() ) );
{
- SvXMLElementExport aExp( *mpSVGExport, XML_NAMESPACE_NONE, "ooo:slidesInfo", TRUE, TRUE );
+ SvXMLElementExport aExp( *mpSVGExport, XML_NAMESPACE_NONE, "ooo:slidesInfo", sal_True, sal_True );
const OUString aId( B2UCONST( "meta_slide" ) );
for( sal_Int32 i = 0, nCount = rxDrawPages->getCount(); i < nCount; ++i )
@@ -442,7 +442,7 @@ sal_Bool SVGFilter::implGenerateMetaData( const Reference< XDrawPages >& /* rxMa
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "master-visibility", aMasterVisibility );
{
- SvXMLElementExport aExp2( *mpSVGExport, XML_NAMESPACE_NONE, "ooo:slideInfo", TRUE, TRUE );
+ SvXMLElementExport aExp2( *mpSVGExport, XML_NAMESPACE_NONE, "ooo:slideInfo", sal_True, sal_True );
}
}
}
@@ -462,7 +462,7 @@ sal_Bool SVGFilter::implGenerateScript( const Reference< XDrawPages >& /* rxMast
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "type", B2UCONST( "text/ecmascript" ) );
{
- SvXMLElementExport aExp( *mpSVGExport, XML_NAMESPACE_NONE, "script", TRUE, TRUE );
+ SvXMLElementExport aExp( *mpSVGExport, XML_NAMESPACE_NONE, "script", sal_True, sal_True );
Reference< XExtendedDocumentHandler > xExtDocHandler( mpSVGExport->GetDocHandler(), UNO_QUERY );
if( xExtDocHandler.is() )
@@ -509,7 +509,7 @@ sal_Bool SVGFilter::implExportPages( const Reference< XDrawPages >& rxPages,
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "id", implGetValidIDFromInterface( xShapes ) );
{
- SvXMLElementExport aExp( *mpSVGExport, XML_NAMESPACE_NONE, "g", TRUE, TRUE );
+ SvXMLElementExport aExp( *mpSVGExport, XML_NAMESPACE_NONE, "g", sal_True, sal_True );
const Point aNullPt;
{
@@ -517,7 +517,7 @@ sal_Bool SVGFilter::implExportPages( const Reference< XDrawPages >& rxPages,
if( xExtDocHandler.is() )
{
- SvXMLElementExport aExp2( *mpSVGExport, XML_NAMESPACE_NONE, "desc", TRUE, TRUE );
+ SvXMLElementExport aExp2( *mpSVGExport, XML_NAMESPACE_NONE, "desc", sal_True, sal_True );
OUString aDesc;
if( bMaster )
@@ -638,10 +638,10 @@ sal_Bool SVGFilter::implExportShape( const Reference< XShape >& rxShape )
if( xShapes.is() )
{
- SvXMLElementExport aExp( *mpSVGExport, XML_NAMESPACE_NONE, "g", TRUE, TRUE );
+ SvXMLElementExport aExp( *mpSVGExport, XML_NAMESPACE_NONE, "g", sal_True, sal_True );
{
- SvXMLElementExport aExp2( *mpSVGExport, XML_NAMESPACE_NONE, "desc", TRUE, TRUE );
+ SvXMLElementExport aExp2( *mpSVGExport, XML_NAMESPACE_NONE, "desc", sal_True, sal_True );
Reference< XExtendedDocumentHandler > xExtDocHandler( mpSVGExport->GetDocHandler(), UNO_QUERY );
xExtDocHandler->unknown( B2UCONST( "Group" ) );
@@ -662,10 +662,10 @@ sal_Bool SVGFilter::implExportShape( const Reference< XShape >& rxShape )
const Size aSize( aBoundRect.Width, aBoundRect.Height );
{
- SvXMLElementExport aExp( *mpSVGExport, XML_NAMESPACE_NONE, "g", TRUE, TRUE );
+ SvXMLElementExport aExp( *mpSVGExport, XML_NAMESPACE_NONE, "g", sal_True, sal_True );
{
- SvXMLElementExport aExp2( *mpSVGExport, XML_NAMESPACE_NONE, "desc", TRUE, TRUE );
+ SvXMLElementExport aExp2( *mpSVGExport, XML_NAMESPACE_NONE, "desc", sal_True, sal_True );
Reference< XExtendedDocumentHandler > xExtDocHandler( mpSVGExport->GetDocHandler(), UNO_QUERY );
xExtDocHandler->unknown( implGetDescriptionFromShape( rxShape ) );
@@ -676,17 +676,17 @@ sal_Bool SVGFilter::implExportShape( const Reference< XShape >& rxShape )
if( ( aShapeType.lastIndexOf( B2UCONST( "drawing.OLE2Shape" ) ) != -1 ) ||
( aShapeType.lastIndexOf( B2UCONST( "drawing.GraphicObjectShape" ) ) != -1 ) )
{
- SvXMLElementExport aExp2( *mpSVGExport, XML_NAMESPACE_NONE, "g", TRUE, TRUE );
+ SvXMLElementExport aExp2( *mpSVGExport, XML_NAMESPACE_NONE, "g", sal_True, sal_True );
mpSVGWriter->WriteMetaFile( aTopLeft, aSize, rMtf, SVGWRITER_WRITE_ALL);
}
else
{
// write geometries
- SvXMLElementExport aGeometryExp( *mpSVGExport, XML_NAMESPACE_NONE, "g", TRUE, TRUE );
+ SvXMLElementExport aGeometryExp( *mpSVGExport, XML_NAMESPACE_NONE, "g", sal_True, sal_True );
mpSVGWriter->WriteMetaFile( aTopLeft, aSize, rMtf, SVGWRITER_WRITE_FILL );
// write text separately
- SvXMLElementExport aTextExp( *mpSVGExport, XML_NAMESPACE_NONE, "g", TRUE, TRUE );
+ SvXMLElementExport aTextExp( *mpSVGExport, XML_NAMESPACE_NONE, "g", sal_True, sal_True );
mpSVGWriter->WriteMetaFile( aTopLeft, aSize, rMtf, SVGWRITER_WRITE_TEXT );
}
}
diff --git a/filter/source/svg/svgfilter.hxx b/filter/source/svg/svgfilter.hxx
index 0bbc64e2c244..bc25fcf35011 100644
--- a/filter/source/svg/svgfilter.hxx
+++ b/filter/source/svg/svgfilter.hxx
@@ -117,7 +117,7 @@ private:
protected:
virtual void _ExportMeta() {}
- virtual void _ExportStyles( BOOL /* bUsed */ ) {}
+ virtual void _ExportStyles( sal_Bool /* bUsed */ ) {}
virtual void _ExportAutoStyles() {}
virtual void _ExportContent() {}
virtual void _ExportMasterStyles() {}
diff --git a/filter/source/svg/svgfontexport.cxx b/filter/source/svg/svgfontexport.cxx
index 8fa9db03eacf..cad55e4e670c 100644
--- a/filter/source/svg/svgfontexport.cxx
+++ b/filter/source/svg/svgfontexport.cxx
@@ -71,7 +71,7 @@ void SVGFontExport::implCollectGlyphs()
{
::rtl::OUString aText;
MetaAction* pAction = rMtf.GetAction( i );
- const USHORT nType = pAction->GetType();
+ const sal_uInt16 nType = pAction->GetType();
switch( nType )
{
@@ -134,7 +134,7 @@ void SVGFontExport::implEmbedFont( const ::rtl::OUString& rFontName, const ::std
const ::rtl::OUString aEmbeddedFontStr( B2UCONST( "EmbeddedFont_" ) );
{
- SvXMLElementExport aExp( mrExport, XML_NAMESPACE_NONE, "defs", TRUE, TRUE );
+ SvXMLElementExport aExp( mrExport, XML_NAMESPACE_NONE, "defs", sal_True, sal_True );
::rtl::OUString aCurIdStr( aEmbeddedFontStr );
::rtl::OUString aUnitsPerEM( SVGActionWriter::GetValueString( nFontEM ) );
VirtualDevice aVDev;
@@ -148,7 +148,7 @@ void SVGFontExport::implEmbedFont( const ::rtl::OUString& rFontName, const ::std
mrExport.AddAttribute( XML_NAMESPACE_NONE, "horiz-adv-x", aUnitsPerEM );
{
- SvXMLElementExport aExp2( mrExport, XML_NAMESPACE_NONE, "font", TRUE, TRUE );
+ SvXMLElementExport aExp2( mrExport, XML_NAMESPACE_NONE, "font", sal_True, sal_True );
Point aPos;
Size aSize( nFontEM, nFontEM );
PolyPolygon aMissingGlyphPolyPoly( Rectangle( aPos, aSize ) );
@@ -162,19 +162,19 @@ void SVGFontExport::implEmbedFont( const ::rtl::OUString& rFontName, const ::std
mrExport.AddAttribute( XML_NAMESPACE_NONE, "descent", SVGActionWriter::GetValueString( aVDev.GetFontMetric().GetDescent() ) );
{
- SvXMLElementExport aExp3( mrExport, XML_NAMESPACE_NONE, "font-face", TRUE, TRUE );
+ SvXMLElementExport aExp3( mrExport, XML_NAMESPACE_NONE, "font-face", sal_True, sal_True );
}
mrExport.AddAttribute( XML_NAMESPACE_NONE, "horiz-adv-x", SVGActionWriter::GetValueString( aSize.Width() ) );
{
- SvXMLElementExport aExp3( mrExport, XML_NAMESPACE_NONE, "missing-glyph", TRUE, TRUE );
+ SvXMLElementExport aExp3( mrExport, XML_NAMESPACE_NONE, "missing-glyph", sal_True, sal_True );
mrExport.AddAttribute( XML_NAMESPACE_NONE, "style", B2UCONST( "fill:none;stroke:black;stroke-width:33" ) );
mrExport.AddAttribute( XML_NAMESPACE_NONE, "d", SVGActionWriter::GetPathString( aMissingGlyphPolyPoly, sal_False ) );
{
- SvXMLElementExport aExp4( mrExport, XML_NAMESPACE_NONE, "path", TRUE, TRUE );
+ SvXMLElementExport aExp4( mrExport, XML_NAMESPACE_NONE, "path", sal_True, sal_True );
}
}
@@ -213,7 +213,7 @@ void SVGFontExport::implEmbedGlyph( OutputDevice& rOut, const ::rtl::OUString& r
mrExport.AddAttribute( XML_NAMESPACE_NONE, "horiz-adv-x", SVGActionWriter::GetValueString( aBoundRect.GetWidth() ) );
{
- SvXMLElementExport aExp( mrExport, XML_NAMESPACE_NONE, "glyph", TRUE, TRUE );
+ SvXMLElementExport aExp( mrExport, XML_NAMESPACE_NONE, "glyph", sal_True, sal_True );
const ::rtl::OUString aPathString( SVGActionWriter::GetPathString( aPolyPoly, sal_False ) );
if( aPathString.getLength() )
@@ -221,7 +221,7 @@ void SVGFontExport::implEmbedGlyph( OutputDevice& rOut, const ::rtl::OUString& r
mrExport.AddAttribute( XML_NAMESPACE_NONE, "d", aPathString );
{
- SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, B2UCONST( "path" ), TRUE, TRUE );
+ SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, B2UCONST( "path" ), sal_True, sal_True );
}
}
}
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index 15f83c3be407..4ba55ca277ae 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -456,7 +456,7 @@ void SVGAttributeWriter::SetFontAttr( const Font& rFont )
delete mpElemPaint, mpElemPaint = NULL;
delete mpElemFont;
mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStyle, GetFontStyle( maCurFont = rFont ) );
- mpElemFont = new SvXMLElementExport( mrExport, XML_NAMESPACE_NONE, aXMLElemG, TRUE, TRUE );
+ mpElemFont = new SvXMLElementExport( mrExport, XML_NAMESPACE_NONE, aXMLElemG, sal_True, sal_True );
}
}
@@ -468,7 +468,7 @@ void SVGAttributeWriter::SetPaintAttr( const Color& rLineColor, const Color& rFi
{
delete mpElemPaint;
mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStyle, GetPaintStyle( maCurLineColor = rLineColor, maCurFillColor = rFillColor, pLineInfo ) );
- mpElemPaint = new SvXMLElementExport( mrExport, XML_NAMESPACE_NONE, aXMLElemG, TRUE, TRUE );
+ mpElemPaint = new SvXMLElementExport( mrExport, XML_NAMESPACE_NONE, aXMLElemG, sal_True, sal_True );
}
}
@@ -577,8 +577,8 @@ NMSP_RTL::OUString SVGActionWriter::GetPathString( const PolyPolygon& rPolyPoly
for( long i = 0, nCount = rPolyPoly.Count(); i < nCount; i++ )
{
- const Polygon& rPoly = rPolyPoly[ (USHORT) i ];
- USHORT n = 1, nSize = rPoly.GetSize();
+ const Polygon& rPoly = rPolyPoly[ (sal_uInt16) i ];
+ sal_uInt16 n = 1, nSize = rPoly.GetSize();
if( nSize > 1 )
{
@@ -655,7 +655,7 @@ void SVGActionWriter::ImplWriteLine( const Point& rPt1, const Point& rPt2, const
}
{
- SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemLine, TRUE, TRUE );
+ SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemLine, sal_True, sal_True );
}
}
@@ -682,7 +682,7 @@ void SVGActionWriter::ImplWriteRect( const Rectangle& rRect, long nRadX, long nR
mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStyle, *pStyle );
{
- SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemRect, TRUE, TRUE );
+ SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemRect, sal_True, sal_True );
}
}
@@ -703,7 +703,7 @@ void SVGActionWriter::ImplWriteEllipse( const Point& rCenter, long nRadX, long n
mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStyle, *pStyle );
{
- SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemEllipse, TRUE, TRUE );
+ SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemEllipse, sal_True, sal_True );
}
}
@@ -717,10 +717,10 @@ void SVGActionWriter::ImplWritePolyPolygon( const PolyPolygon& rPolyPoly, sal_Bo
PolyPolygon aMappedPolyPoly;
FastString aStyle;
- for( USHORT i = 0, nCount = rPolyPoly.Count(); i < nCount; i++ )
+ for( sal_uInt16 i = 0, nCount = rPolyPoly.Count(); i < nCount; i++ )
{
const Polygon& rPoly = rPolyPoly[ i ];
- const USHORT nSize = rPoly.GetSize();
+ const sal_uInt16 nSize = rPoly.GetSize();
// #i102224# congratulations, this throws away the curve flags
// and makes ANY curved polygon look bad. The Flags HAVE to be
@@ -731,7 +731,7 @@ void SVGActionWriter::ImplWritePolyPolygon( const PolyPolygon& rPolyPoly, sal_Bo
// new:
Polygon aMappedPoly(rPoly);
- for( USHORT n = 0; n < nSize; n++ )
+ for( sal_uInt16 n = 0; n < nSize; n++ )
aMappedPoly[ n ] = ImplMap( rPoly[ n ] );
aMappedPolyPoly.Insert( aMappedPoly );
@@ -754,7 +754,7 @@ void SVGActionWriter::ImplWritePolyPolygon( const PolyPolygon& rPolyPoly, sal_Bo
mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrD, GetPathString( aMappedPolyPoly, bLineOnly ) );
{
// write polyline/polygon element
- SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemPath, TRUE, TRUE );
+ SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemPath, sal_True, sal_True );
}
}
}
@@ -766,7 +766,7 @@ void SVGActionWriter::ImplWriteGradientEx( const PolyPolygon& rPolyPoly, const G
{
if( rPolyPoly.Count() )
{
- SvXMLElementExport aElemG( mrExport, XML_NAMESPACE_NONE, aXMLElemG, TRUE, TRUE );
+ SvXMLElementExport aElemG( mrExport, XML_NAMESPACE_NONE, aXMLElemG, sal_True, sal_True );
FastString aClipId;
FastString aClipStyle;
@@ -774,12 +774,12 @@ void SVGActionWriter::ImplWriteGradientEx( const PolyPolygon& rPolyPoly, const G
aClipId += NMSP_RTL::OUString::valueOf( ImplGetNextClipId() );
{
- SvXMLElementExport aElemDefs( mrExport, XML_NAMESPACE_NONE, aXMLElemDefs, TRUE, TRUE );
+ SvXMLElementExport aElemDefs( mrExport, XML_NAMESPACE_NONE, aXMLElemDefs, sal_True, sal_True );
mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrId, aClipId.GetString() );
{
- SvXMLElementExport aElemClipPath( mrExport, XML_NAMESPACE_NONE, aXMLElemClipPath, TRUE, TRUE );
+ SvXMLElementExport aElemClipPath( mrExport, XML_NAMESPACE_NONE, aXMLElemClipPath, sal_True, sal_True );
ImplWritePolyPolygon( rPolyPoly, sal_False );
}
}
@@ -793,7 +793,7 @@ void SVGActionWriter::ImplWriteGradientEx( const PolyPolygon& rPolyPoly, const G
{
GDIMetaFile aTmpMtf;
- SvXMLElementExport aElemG2( mrExport, XML_NAMESPACE_NONE, aXMLElemG, TRUE, TRUE );
+ SvXMLElementExport aElemG2( mrExport, XML_NAMESPACE_NONE, aXMLElemG, sal_True, sal_True );
mpVDev->AddGradientActions( rPolyPoly.GetBoundRect(), rGradient, aTmpMtf );
ImplWriteActions( aTmpMtf, pStyle, nWriteFlags );
@@ -831,7 +831,7 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const String& rText,
if( nLen > 1 )
{
- aNormSize.Width() = pDX[ nLen - 2 ] + mpVDev->GetTextWidth( rText.GetChar( sal::static_int_cast<USHORT>( nLen - 1 ) ) );
+ aNormSize.Width() = pDX[ nLen - 2 ] + mpVDev->GetTextWidth( rText.GetChar( sal::static_int_cast<sal_uInt16>( nLen - 1 ) ) );
if( nWidth && aNormSize.Width() && ( nWidth != aNormSize.Width() ) )
{
@@ -902,7 +902,7 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const String& rText,
aTransform += ')';
mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrTransform, aTransform );
- pTransform = new SvXMLElementExport( mrExport, XML_NAMESPACE_NONE, aXMLElemG, TRUE, TRUE );
+ pTransform = new SvXMLElementExport( mrExport, XML_NAMESPACE_NONE, aXMLElemG, sal_True, sal_True );
}
// add additional style if requested
@@ -912,7 +912,7 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const String& rText,
// write text element
{
#ifdef _SVG_USE_TSPANS
- SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemText, TRUE, TRUE );
+ SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemText, sal_True, sal_True );
FastString aTSpanX;
const NMSP_RTL::OUString aSpace( ' ' );
String aOutputText( rText );
@@ -921,25 +921,25 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const String& rText,
for( long j = 0, nX = aPt.X(); j < nLen; ++j )
{
- const sal_Unicode cCode = rText.GetChar( sal::static_int_cast<USHORT>( j ) );
+ const sal_Unicode cCode = rText.GetChar( sal::static_int_cast<sal_uInt16>( j ) );
// don't take more than one whitespace into account
if( !bIgnoreWhitespace || ( ' ' != cCode ) )
{
- aOutputText.SetChar( sal::static_int_cast<USHORT>( nCurPos++ ), cCode );
+ aOutputText.SetChar( sal::static_int_cast<sal_uInt16>( nCurPos++ ), cCode );
( aTSpanX += GetValueString( nX + ( ( j > 0 ) ? pDX[ j - 1 ] : 0 ) ) ) += aSpace;
bIgnoreWhitespace = ( ' ' == cCode );
}
}
if( nCurPos < nLen )
- aOutputText.Erase( sal::static_int_cast<USHORT>( nCurPos ) );
+ aOutputText.Erase( sal::static_int_cast<sal_uInt16>( nCurPos ) );
mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrX, aTSpanX.GetString() );
mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrY, GetValueString( aPt.Y() ) );
{
- SvXMLElementExport aElem2( mrExport, XML_NAMESPACE_NONE, aXMLElemTSpan, TRUE, TRUE );
+ SvXMLElementExport aElem2( mrExport, XML_NAMESPACE_NONE, aXMLElemTSpan, sal_True, sal_True );
mrExport.GetDocHandler()->characters( aOutputText );
}
#else
@@ -947,7 +947,7 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const String& rText,
mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrY, GetValueString( aPt.Y() ) );
{
- SvXMLElementExport aElem2( mrExport, XML_NAMESPACE_NONE, aXMLElemText, TRUE, TRUE );
+ SvXMLElementExport aElem2( mrExport, XML_NAMESPACE_NONE, aXMLElemText, sal_True, sal_True );
mrExport.GetDocHandler()->characters( rText );
}
#endif
@@ -1081,10 +1081,10 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
{
ImplAcquireContext();
- for( ULONG i = 0, nCount = rMtf.GetActionCount(); i < nCount; i++ )
+ for( sal_uLong i = 0, nCount = rMtf.GetActionCount(); i < nCount; i++ )
{
const MetaAction* pAction = rMtf.GetAction( i );
- const USHORT nType = pAction->GetType();
+ const sal_uInt16 nType = pAction->GetType();
switch( nType )
{
@@ -1337,8 +1337,8 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
const Color aOldLineColor( mpVDev->GetLineColor() ), aOldFillColor( mpVDev->GetFillColor() );
Color aNewLineColor( aOldLineColor ), aNewFillColor( aOldFillColor );
- aNewLineColor.SetTransparency( sal::static_int_cast<UINT8>( FRound( pA->GetTransparence() * 2.55 ) ) );
- aNewFillColor.SetTransparency( sal::static_int_cast<UINT8>( FRound( pA->GetTransparence() * 2.55 ) ) );
+ aNewLineColor.SetTransparency( sal::static_int_cast<sal_uInt8>( FRound( pA->GetTransparence() * 2.55 ) ) );
+ aNewFillColor.SetTransparency( sal::static_int_cast<sal_uInt8>( FRound( pA->GetTransparence() * 2.55 ) ) );
mpContext->SetPaintAttr( aNewLineColor, aNewFillColor );
ImplWritePolyPolygon( rPolyPoly, sal_False, pStyle );
@@ -1388,7 +1388,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
const GDIMetaFile aGDIMetaFile( pA->GetSubstitute() );
sal_Bool bFound = sal_False;
- for( ULONG j = 0, nC = aGDIMetaFile.GetActionCount(); ( j < nC ) && !bFound; j++ )
+ for( sal_uLong j = 0, nC = aGDIMetaFile.GetActionCount(); ( j < nC ) && !bFound; j++ )
{
const MetaAction* pSubstAct = aGDIMetaFile.GetAction( j );
diff --git a/filter/source/xsltdialog/xmlfileview.cxx b/filter/source/xsltdialog/xmlfileview.cxx
index 8bd0001dc198..c3a3429542a6 100644
--- a/filter/source/xsltdialog/xmlfileview.cxx
+++ b/filter/source/xsltdialog/xmlfileview.cxx
@@ -74,8 +74,8 @@ using namespace com::sun::star::xml::sax;
struct SwTextPortion
{
- USHORT nLine;
- USHORT nStart, nEnd;
+ sal_uInt16 nLine;
+ sal_uInt16 nStart, nEnd;
svtools::ColorConfigEntry eType;
};
@@ -113,7 +113,7 @@ void SAL_CALL XMLErrorHandler::error( const Any& aSAXParseException ) throw (SAX
String sErr( String::CreateFromInt32( e.LineNumber ) );
sErr += String( RTL_CONSTASCII_USTRINGPARAM( " : " ) );
sErr += String( e.Message );
- USHORT nEntry = mrListBox.InsertEntry( sErr );
+ sal_uInt16 nEntry = mrListBox.InsertEntry( sErr );
mrListBox.SetEntryData( nEntry, (void*)e.LineNumber );
}
}
@@ -128,7 +128,7 @@ void SAL_CALL XMLErrorHandler::fatalError( const Any& aSAXParseException ) throw
String sErr( String::CreateFromInt32( e.LineNumber ) );
sErr += String( RTL_CONSTASCII_USTRINGPARAM( " : " ) );
sErr += String( e.Message );
- USHORT nEntry = mrListBox.InsertEntry( sErr );
+ sal_uInt16 nEntry = mrListBox.InsertEntry( sErr );
mrListBox.SetEntryData( nEntry, (void*)e.LineNumber );
}
}
@@ -142,7 +142,7 @@ void SAL_CALL XMLErrorHandler::warning( const Any& /* aSAXParseException */ ) th
String sErr( String::CreateFromInt32( e.LineNumber ) );
sErr += String( RTL_CONSTASCII_USTRINGPARAM( " : " ) );
sErr += String( e.Message );
- USHORT nEntry = mrListBox.InsertEntry( sErr );
+ sal_uInt16 nEntry = mrListBox.InsertEntry( sErr );
mrListBox.SetEntryData( nEntry, (void*)e.LineNumber );
}
*/
@@ -344,14 +344,14 @@ void XMLFileWindow::CreateTextEngine()
pTextEngine = new TextEngine;
pTextView = new TextView( pTextEngine, pOutWin );
- pTextView->SetAutoIndentMode(TRUE);
+ pTextView->SetAutoIndentMode(sal_True);
pOutWin->SetTextView(pTextView);
- pTextEngine->SetUpdateMode( FALSE );
+ pTextEngine->SetUpdateMode( sal_False );
pTextEngine->InsertView( pTextView );
Font aFont;
- aFont.SetTransparent( FALSE );
+ aFont.SetTransparent( sal_False );
aFont.SetFillColor( rCol );
SetPointFont( aFont );
aFont = GetFont();
@@ -362,10 +362,10 @@ void XMLFileWindow::CreateTextEngine()
aSyntaxIdleTimer.SetTimeout( SYNTAX_HIGHLIGHT_TIMEOUT );
aSyntaxIdleTimer.SetTimeoutHdl( LINK( this, XMLFileWindow, SyntaxTimerHdl ) );
- pTextEngine->EnableUndo( FALSE );
- pTextEngine->SetUpdateMode( TRUE );
+ pTextEngine->EnableUndo( sal_False );
+ pTextEngine->SetUpdateMode( sal_True );
-// pTextView->ShowCursor( TRUE, TRUE );
+// pTextView->ShowCursor( sal_True, sal_True );
pTextView->HideCursor();
InitScrollBars();
@@ -400,14 +400,14 @@ IMPL_LINK(XMLFileWindow, ScrollHdl, ScrollBar*, pScroll)
{
long nDiff = pTextView->GetStartDocPos().Y() - pScroll->GetThumbPos();
GetTextView()->Scroll( 0, nDiff );
- pTextView->ShowCursor( FALSE, TRUE );
+ pTextView->ShowCursor( sal_False, sal_True );
pScroll->SetThumbPos( pTextView->GetStartDocPos().Y() );
}
else
{
long nDiff = pTextView->GetStartDocPos().X() - pScroll->GetThumbPos();
GetTextView()->Scroll( nDiff, 0 );
- pTextView->ShowCursor( FALSE, TRUE );
+ pTextView->ShowCursor( sal_False, sal_True );
pScroll->SetThumbPos( pTextView->GetStartDocPos().X() );
}
return 0;
@@ -432,7 +432,7 @@ void XMLFileWindow::Notify( SfxBroadcaster& /* rBC */, const SfxHint& rHint )
}
else if( rTextHint.GetId() == TEXT_HINT_FORMATPARA )
{
- DoDelayedSyntaxHighlight( (USHORT)rTextHint.GetValue() );
+ DoDelayedSyntaxHighlight( (sal_uInt16)rTextHint.GetValue() );
}
}
}
@@ -549,7 +549,7 @@ void XMLSourceFileDialog::ShowWindow( const rtl::OUString& rFileName, const filt
mpTextWindow = new XMLFileWindow( this );
maLBOutput.Hide();
maLBOutput.Clear();
- maPBValidate.Enable(TRUE);
+ maPBValidate.Enable(sal_True);
Resize();
}
@@ -589,7 +589,7 @@ void XMLSourceFileDialog::Resize()
IMPL_LINK(XMLSourceFileDialog, SelectHdl_Impl, ListBox *, pListBox )
{
- USHORT nEntry = pListBox->GetSelectEntryPos();
+ sal_uInt16 nEntry = pListBox->GetSelectEntryPos();
if( LISTBOX_ENTRY_NOTFOUND != nEntry )
{
int nLine = (int)(sal_IntPtr)pListBox->GetEntryData(nEntry);
@@ -615,7 +615,7 @@ void XMLSourceFileDialog::onValidate()
EnterWait();
maLBOutput.Show();
- maPBValidate.Enable(FALSE);
+ maPBValidate.Enable(sal_False);
Resize();
try
@@ -651,14 +651,14 @@ void XMLSourceFileDialog::onValidate()
catch(Exception& e)
{
String sErr( e.Message );
- USHORT nEntry = maLBOutput.InsertEntry( sErr );
+ sal_uInt16 nEntry = maLBOutput.InsertEntry( sErr );
maLBOutput.SetEntryData( nEntry, (void*)-1 );
}
if( 0 == maLBOutput.GetEntryCount() )
{
String sErr( RESID( STR_NO_ERRORS_FOUND ) );
- USHORT nEntry = maLBOutput.InsertEntry( sErr );
+ sal_uInt16 nEntry = maLBOutput.InsertEntry( sErr );
maLBOutput.SetEntryData( nEntry, (void*)-1 );
}
@@ -688,12 +688,12 @@ void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList)
const sal_Unicode cCR = 0x0d;
- const USHORT nStrLen = rSource.Len();
- USHORT nInsert = 0; // Number of inserted Portions
- USHORT nActPos = 0; // Position, at the '<' was found
- USHORT nOffset = 0; // Offset of nActPos for '<'
- USHORT nPortStart = USHRT_MAX; // For the TextPortion
- USHORT nPortEnd = 0; //
+ const sal_uInt16 nStrLen = rSource.Len();
+ sal_uInt16 nInsert = 0; // Number of inserted Portions
+ sal_uInt16 nActPos = 0; // Position, at the '<' was found
+ sal_uInt16 nOffset = 0; // Offset of nActPos for '<'
+ sal_uInt16 nPortStart = USHRT_MAX; // For the TextPortion
+ sal_uInt16 nPortEnd = 0; //
SwTextPortion aText;
while(nActPos < nStrLen)
{
@@ -738,7 +738,7 @@ void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList)
if(svtools::HTMLUNKNOWN == eFoundType)
{
//jetzt koennte hier ein keyword folgen
- USHORT nSrchPos = nActPos;
+ sal_uInt16 nSrchPos = nActPos;
while(++nSrchPos < nStrLen - 1)
{
sal_Unicode cNext = rSource.GetChar(nSrchPos);
@@ -781,18 +781,18 @@ void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList)
// jetzt muss noch '>' gesucht werden
if(svtools::HTMLUNKNOWN != eFoundType)
{
- BOOL bFound = FALSE;
- for(USHORT i = nPortEnd; i < nStrLen; i++)
+ sal_Bool bFound = sal_False;
+ for(sal_uInt16 i = nPortEnd; i < nStrLen; i++)
if(cCloseBracket == rSource.GetChar(i))
{
- bFound = TRUE;
+ bFound = sal_True;
nPortEnd = i;
break;
}
if(!bFound && (eFoundType == svtools::HTMLCOMMENT))
{
// Kommentar ohne Ende in dieser Zeile
- bFound = TRUE;
+ bFound = sal_True;
nPortEnd = nStrLen - 1;
}
@@ -823,16 +823,16 @@ void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList)
}
}
-void XMLFileWindow::DoDelayedSyntaxHighlight( USHORT nPara )
+void XMLFileWindow::DoDelayedSyntaxHighlight( sal_uInt16 nPara )
{
if ( !bHighlighting )
{
- aSyntaxLineTable.Insert( nPara, (void*)(USHORT)1 );
+ aSyntaxLineTable.Insert( nPara, (void*)(sal_uInt16)1 );
aSyntaxIdleTimer.Start();
}
}
-void XMLFileWindow::ImpDoHighlight( const String& rSource, USHORT nLineOff )
+void XMLFileWindow::ImpDoHighlight( const String& rSource, sal_uInt16 nLineOff )
{
SwTextPortions aPortionList;
lcl_Highlight(rSource, aPortionList);
@@ -854,13 +854,13 @@ void XMLFileWindow::ImpDoHighlight( const String& rSource, USHORT nLineOff )
// Wenn haufig gleiche Farbe, dazwischen Blank ohne Farbe,
// ggf. zusammenfassen, oder zumindest das Blank,
// damit weniger Attribute
- BOOL bOptimizeHighlight = TRUE; // war in der BasicIDE static
+ sal_Bool bOptimizeHighlight = sal_True; // war in der BasicIDE static
if ( bOptimizeHighlight )
{
// Es muessen nur die Blanks und Tabs mit attributiert werden.
// Wenn zwei gleiche Attribute hintereinander eingestellt werden,
// optimiert das die TextEngine.
- USHORT nLastEnd = 0;
+ sal_uInt16 nLastEnd = 0;
for ( size_t i = 0; i < nCount; i++ )
{
SwTextPortion& r = aPortionList[i];
@@ -886,14 +886,14 @@ void XMLFileWindow::ImpDoHighlight( const String& rSource, USHORT nLineOff )
SwTextPortion& r = aPortionList[i];
if ( r.nStart > r.nEnd ) // Nur bis Bug von MD behoeben
continue;
-// USHORT nCol = r.eType;
+// sal_uInt16 nCol = r.eType;
if(r.eType != svtools::HTMLSGML &&
r.eType != svtools::HTMLCOMMENT &&
r.eType != svtools::HTMLKEYWORD &&
r.eType != svtools::HTMLUNKNOWN)
r.eType = (svtools::ColorConfigEntry)svtools::HTMLUNKNOWN;
Color aColor((ColorData)aConfig.GetColorValue((svtools::ColorConfigEntry)r.eType).nColor);
- USHORT nLine = nLineOff+r.nLine; //
+ sal_uInt16 nLine = nLineOff+r.nLine; //
pTextEngine->SetAttrib( TextAttribFontColor( aColor ), nLine, r.nStart, r.nEnd+1 );
}
}
@@ -902,20 +902,20 @@ IMPL_LINK( XMLFileWindow, SyntaxTimerHdl, Timer *, pTimer )
{
Time aSyntaxCheckStart;
DBG_ASSERT( pTextView, "Noch keine View, aber Syntax-Highlight ?!" );
- pTextEngine->SetUpdateMode( FALSE );
+ pTextEngine->SetUpdateMode( sal_False );
- bHighlighting = TRUE;
- USHORT nLine;
- USHORT nCount = 0;
+ bHighlighting = sal_True;
+ sal_uInt16 nLine;
+ sal_uInt16 nCount = 0;
// zuerst wird der Bereich um dem Cursor bearbeitet
TextSelection aSel = pTextView->GetSelection();
- USHORT nCur = (USHORT)aSel.GetStart().GetPara();
+ sal_uInt16 nCur = (sal_uInt16)aSel.GetStart().GetPara();
if(nCur > 40)
nCur -= 40;
else
nCur = 0;
if(aSyntaxLineTable.Count())
- for(USHORT i = 0; i < 80 && nCount < 40; i++, nCur++)
+ for(sal_uInt16 i = 0; i < 80 && nCount < 40; i++, nCur++)
{
void * p = aSyntaxLineTable.Get(nCur);
if(p)
@@ -937,9 +937,9 @@ IMPL_LINK( XMLFileWindow, SyntaxTimerHdl, Timer *, pTimer )
void* p = aSyntaxLineTable.First();
while ( p && nCount < MAX_SYNTAX_HIGHLIGHT)
{
- nLine = (USHORT)aSyntaxLineTable.GetCurKey();
+ nLine = (sal_uInt16)aSyntaxLineTable.GetCurKey();
DoSyntaxHighlight( nLine );
- USHORT nC = (USHORT)aSyntaxLineTable.GetCurKey();
+ sal_uInt16 nC = (sal_uInt16)aSyntaxLineTable.GetCurKey();
p = aSyntaxLineTable.Next();
aSyntaxLineTable.Remove(nC);
nCount ++;
@@ -953,9 +953,9 @@ IMPL_LINK( XMLFileWindow, SyntaxTimerHdl, Timer *, pTimer )
// waehrend des Highlightings funktionierte das Scrolling nicht
TextView* pTmp = pTextEngine->GetActiveView();
pTextEngine->SetActiveView(0);
- pTextEngine->SetUpdateMode( TRUE );
+ pTextEngine->SetUpdateMode( sal_True );
pTextEngine->SetActiveView(pTmp);
- pTextView->ShowCursor(FALSE, FALSE);
+ pTextView->ShowCursor(sal_False, sal_False);
if(aSyntaxLineTable.Count() && !pTimer->IsActive())
pTimer->Start();
@@ -965,12 +965,12 @@ IMPL_LINK( XMLFileWindow, SyntaxTimerHdl, Timer *, pTimer )
nCurTextWidth = pTextEngine->CalcTextWidth() + 25; // kleine Toleranz
if ( nCurTextWidth != nPrevTextWidth )
SetScrollBarRanges();
- bHighlighting = FALSE;
+ bHighlighting = sal_False;
return 0;
}
-void XMLFileWindow::DoSyntaxHighlight( USHORT nPara )
+void XMLFileWindow::DoSyntaxHighlight( sal_uInt16 nPara )
{
// Durch das DelayedSyntaxHighlight kann es passieren,
// dass die Zeile nicht mehr existiert!
@@ -978,17 +978,17 @@ void XMLFileWindow::DoSyntaxHighlight( USHORT nPara )
{
pTextEngine->RemoveAttribs( nPara );
String aSource( pTextEngine->GetText( nPara ) );
- pTextEngine->SetUpdateMode( FALSE );
+ pTextEngine->SetUpdateMode( sal_False );
ImpDoHighlight( aSource, nPara );
// os: #43050# hier wird ein TextView-Problem umpopelt:
// waehrend des Highlightings funktionierte das Scrolling nicht
TextView* pTmp = pTextEngine->GetActiveView();
- pTmp->SetAutoScroll(FALSE);
+ pTmp->SetAutoScroll(sal_False);
pTextEngine->SetActiveView(0);
- pTextEngine->SetUpdateMode( TRUE );
+ pTextEngine->SetUpdateMode( sal_True );
pTextEngine->SetActiveView(pTmp);
// Bug 72887 show the cursor
- pTmp->SetAutoScroll(TRUE);
- pTmp->ShowCursor( FALSE/*pTmp->IsAutoScroll()*/ );
+ pTmp->SetAutoScroll(sal_True);
+ pTmp->ShowCursor( sal_False/*pTmp->IsAutoScroll()*/ );
}
}
diff --git a/filter/source/xsltdialog/xmlfileview.hxx b/filter/source/xsltdialog/xmlfileview.hxx
index 190c52254374..d4f79124bde3 100644
--- a/filter/source/xsltdialog/xmlfileview.hxx
+++ b/filter/source/xsltdialog/xmlfileview.hxx
@@ -89,7 +89,7 @@ private:
*pVScrollbar;
long nCurTextWidth;
- USHORT nStartLine;
+ sal_uInt16 nStartLine;
rtl_TextEncoding eSourceEncoding;
Timer aSyntaxIdleTimer;
@@ -98,7 +98,7 @@ private:
bool bHighlighting;
protected:
DECL_LINK( SyntaxTimerHdl, Timer * );
- void ImpDoHighlight( const String& rSource, USHORT nLineOff );
+ void ImpDoHighlight( const String& rSource, sal_uInt16 nLineOff );
virtual void Resize();
virtual void DataChanged( const DataChangedEvent& );
@@ -110,9 +110,9 @@ protected:
DECL_LINK(ScrollHdl, ScrollBar*);
- void DoDelayedSyntaxHighlight( USHORT nPara );
+ void DoDelayedSyntaxHighlight( sal_uInt16 nPara );
- void DoSyntaxHighlight( USHORT nPara );
+ void DoSyntaxHighlight( sal_uInt16 nPara );
public:
XMLFileWindow( Window* pParent );
@@ -120,7 +120,7 @@ public:
void SetScrollBarRanges();
void InitScrollBars();
- ULONG Read( SvStream& rInput) { return pTextEngine->Read(rInput); }
+ sal_uLong Read( SvStream& rInput) { return pTextEngine->Read(rInput); }
void ShowWindow( const rtl::OUString& rFileName );
@@ -132,7 +132,7 @@ public:
void CreateScrollbars();
- void SetStartLine(USHORT nLine) {nStartLine = nLine;}
+ void SetStartLine(sal_uInt16 nLine) {nStartLine = nLine;}
virtual void Command( const CommandEvent& rCEvt );
void HandleWheelCommand( const CommandEvent& rCEvt );
diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
index 9334c892028e..dd6498de4ab2 100644
--- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
@@ -197,7 +197,7 @@ void XMLFilterSettingsDialog::ShowWindow()
updateStates();
mpFilterListBox->Reset();
- WorkWindow::Show( TRUE );
+ WorkWindow::Show( sal_True );
}
// -----------------------------------------------------------------------
@@ -1049,12 +1049,12 @@ long XMLFilterSettingsDialog::Notify( NotifyEvent& rNEvt )
{
const KeyEvent* pKEvt = rNEvt.GetKeyEvent();
KeyCode aKeyCode = pKEvt->GetKeyCode();
- USHORT nKeyCode = aKeyCode.GetCode();
+ sal_uInt16 nKeyCode = aKeyCode.GetCode();
if( nKeyCode == KEY_ESCAPE )
{
Close();
- return TRUE;
+ return sal_True;
}
}
}
@@ -1493,7 +1493,7 @@ IMPL_LINK( XMLFilterListBox, HeaderSelect_Impl, HeaderBar*, pBar )
return 0;
HeaderBarItemBits nBits = mpHeaderBar->GetItemBits(ITEMID_TYPE);
- BOOL bUp = ( ( nBits & HIB_UPARROW ) == HIB_UPARROW );
+ sal_Bool bUp = ( ( nBits & HIB_UPARROW ) == HIB_UPARROW );
SvSortMode eMode = SortAscending;
if ( bUp )
@@ -1524,7 +1524,7 @@ IMPL_LINK( XMLFilterListBox, HeaderEndDrag_Impl, HeaderBar*, pBar )
if ( !mpHeaderBar->IsItemMode() )
{
Size aSz;
- USHORT nTabs = mpHeaderBar->GetItemCount();
+ sal_uInt16 nTabs = mpHeaderBar->GetItemCount();
long nTmpSz = 0;
long nWidth = mpHeaderBar->GetItemSize(ITEMID_NAME);
long nBarWidth = mpHeaderBar->GetSizePixel().Width();
@@ -1534,7 +1534,7 @@ IMPL_LINK( XMLFilterListBox, HeaderEndDrag_Impl, HeaderBar*, pBar )
else if ( ( nBarWidth - nWidth ) < 30 )
mpHeaderBar->SetItemSize( ITEMID_TYPE, nBarWidth - 30 );
- for ( USHORT i = 1; i <= nTabs; ++i )
+ for ( sal_uInt16 i = 1; i <= nTabs; ++i )
{
long nW = mpHeaderBar->GetItemSize(i);
aSz.Width() = nW + nTmpSz;
@@ -1558,8 +1558,8 @@ void XMLFilterListBox::addFilterEntry( const filter_info_impl* pInfo )
void XMLFilterListBox::changeEntry( const filter_info_impl* pInfo )
{
- const ULONG nCount = GetEntryCount();
- ULONG nPos;
+ const sal_uLong nCount = GetEntryCount();
+ sal_uLong nPos;
for( nPos = 0; nPos < nCount; nPos++ )
{
SvLBoxEntry* pEntry = GetEntry( nPos );
diff --git a/filter/source/xsltdialog/xmlfiltertabdialog.cxx b/filter/source/xsltdialog/xmlfiltertabdialog.cxx
index 63c369610295..1aea5c934d13 100644
--- a/filter/source/xsltdialog/xmlfiltertabdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltertabdialog.cxx
@@ -299,7 +299,7 @@ bool XMLFilterTabDialog::onOk()
if( 0 != nErrorId )
{
- maTabCtrl.SetCurPageId( (USHORT)nErrorPage );
+ maTabCtrl.SetCurPageId( (sal_uInt16)nErrorPage );
ActivatePageHdl( &maTabCtrl );
ResId aResId( nErrorId, mrResMgr );
@@ -358,7 +358,7 @@ IMPL_LINK( XMLFilterTabDialog, OkHdl, Button *, EMPTYARG )
IMPL_LINK( XMLFilterTabDialog, ActivatePageHdl, TabControl *, pTabCtrl )
{
- const USHORT nId = pTabCtrl->GetCurPageId();
+ const sal_uInt16 nId = pTabCtrl->GetCurPageId();
TabPage* pTabPage = pTabCtrl->GetTabPage( nId );
pTabPage->Show();
@@ -369,5 +369,5 @@ IMPL_LINK( XMLFilterTabDialog, ActivatePageHdl, TabControl *, pTabCtrl )
IMPL_LINK( XMLFilterTabDialog, DeactivatePageHdl, TabControl *, /* pTabCtrl */ )
{
- return TRUE;
+ return sal_True;
}