diff options
author | Daniel Rentz [dr] <daniel.rentz@oracle.com> | 2011-02-28 10:08:33 +0100 |
---|---|---|
committer | Daniel Rentz [dr] <daniel.rentz@oracle.com> | 2011-02-28 10:08:33 +0100 |
commit | a1a84343919c08e0d698d40e2bcf5c411ca47f3f (patch) | |
tree | 96f4e5c924b79e27e28b5841b8e2adf4e4a32660 | |
parent | 4f06bfae891d1b7b80e0e17be9623536f31ae9ac (diff) | |
parent | 818573bfbce420afedffd45d7bb080f25da32625 (diff) |
dr78: rebase to DEV300_m101
214 files changed, 7635 insertions, 6307 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/prj/build.lst b/filter/prj/build.lst index 5617d28856f7..c8e839dcee5f 100644 --- a/filter/prj/build.lst +++ b/filter/prj/build.lst @@ -1,4 +1,4 @@ -fl filter : l10n svtools unotools xmloff cppu tools cppuhelper sal svx javaunohelper XPDF:xpdf jvmaccess canvas SAXON:saxon LIBXSLT:libxslt basegfx NULL +fl filter : L10N:l10n svtools unotools xmloff cppu tools cppuhelper sal svx javaunohelper XPDF:xpdf jvmaccess canvas SAXON:saxon LIBXSLT:libxslt basegfx NULL fl filter usr1 - all fl_mkout NULL fl filter\prj get - all fl_prj NULL fl filter\inc nmake - all fl_inc NULL 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/constant.hxx b/filter/source/config/cache/constant.hxx index 244a78864228..36ea008f5414 100644 --- a/filter/source/config/cache/constant.hxx +++ b/filter/source/config/cache/constant.hxx @@ -133,7 +133,6 @@ extern rtl::OUString pFilterStrings[]; #define FLAGNAME_PASSWORDTOMODIFY _FILTER_CONFIG_FROM_ASCII_("PASSWORDTOMODIFY" ) #define FLAGNAME_PREFERRED _FILTER_CONFIG_FROM_ASCII_("PREFERRED" ) #define FLAGNAME_READONLY _FILTER_CONFIG_FROM_ASCII_("READONLY" ) -#define FLAGNAME_SILENTEXPORT _FILTER_CONFIG_FROM_ASCII_("SILENTEXPORT" ) #define FLAGNAME_SUPPORTSSELECTION _FILTER_CONFIG_FROM_ASCII_("SUPPORTSSELECTION") #define FLAGNAME_TEMPLATE _FILTER_CONFIG_FROM_ASCII_("TEMPLATE" ) #define FLAGNAME_TEMPLATEPATH _FILTER_CONFIG_FROM_ASCII_("TEMPLATEPATH" ) @@ -159,7 +158,6 @@ extern rtl::OUString pFilterStrings[]; #define FLAGVAL_CONSULTSERVICE 0x00040000 // 262144 #define FLAGVAL_3RDPARTYFILTER 0x00080000 // 524288 #define FLAGVAL_PACKED 0x00100000 // 1048576 -#define FLAGVAL_SILENTEXPORT 0x00200000 // 2097152 #define FLAGVAL_BROWSERPREFERRED 0x00400000 // 4194304 #define FLAGVAL_COMBINED 0x00800000 // 8388608 #define FLAGVAL_ENCRYPTION 0x01000000 // 16777216 diff --git a/filter/source/config/cache/filtercache.cxx b/filter/source/config/cache/filtercache.cxx index d4435e2182f1..bae26e2c2d91 100644 --- a/filter/source/config/cache/filtercache.cxx +++ b/filter/source/config/cache/filtercache.cxx @@ -2110,7 +2110,6 @@ css::uno::Sequence< ::rtl::OUString > FilterCache::impl_convertFlagField2FlagNam if ((nFlags & FLAGVAL_PASSWORDTOMODIFY ) == FLAGVAL_PASSWORDTOMODIFY ) lFlagNames.push_back(FLAGNAME_PASSWORDTOMODIFY ); if ((nFlags & FLAGVAL_PREFERRED ) == FLAGVAL_PREFERRED ) lFlagNames.push_back(FLAGNAME_PREFERRED ); if ((nFlags & FLAGVAL_READONLY ) == FLAGVAL_READONLY ) lFlagNames.push_back(FLAGNAME_READONLY ); - if ((nFlags & FLAGVAL_SILENTEXPORT ) == FLAGVAL_SILENTEXPORT ) lFlagNames.push_back(FLAGNAME_SILENTEXPORT ); if ((nFlags & FLAGVAL_SUPPORTSSELECTION) == FLAGVAL_SUPPORTSSELECTION) lFlagNames.push_back(FLAGNAME_SUPPORTSSELECTION); if ((nFlags & FLAGVAL_TEMPLATE ) == FLAGVAL_TEMPLATE ) lFlagNames.push_back(FLAGNAME_TEMPLATE ); if ((nFlags & FLAGVAL_TEMPLATEPATH ) == FLAGVAL_TEMPLATEPATH ) lFlagNames.push_back(FLAGNAME_TEMPLATEPATH ); @@ -2222,11 +2221,6 @@ sal_Int32 FilterCache::impl_convertFlagNames2FlagField(const css::uno::Sequence< nField |= FLAGVAL_READONLY; continue; } - if (pNames[i].equals(FLAGNAME_SILENTEXPORT)) - { - nField |= FLAGVAL_SILENTEXPORT; - continue; - } if (pNames[i].equals(FLAGNAME_SUPPORTSSELECTION)) { nField |= FLAGVAL_SUPPORTSSELECTION; 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/config/fragments/filters/StarCalc_3_0.xcu b/filter/source/config/fragments/filters/StarCalc_3_0.xcu index fc96b7d6cd99..59d1682d5e91 100644 --- a/filter/source/config/fragments/filters/StarCalc_3_0.xcu +++ b/filter/source/config/fragments/filters/StarCalc_3_0.xcu @@ -1,5 +1,5 @@ <node oor:name="StarCalc 3.0" oor:op="replace"> - <prop oor:name="Flags"><value>IMPORT EXPORT TEMPLATE OWN ALIEN 3RDPARTYFILTER</value></prop> + <prop oor:name="Flags"><value>IMPORT TEMPLATE OWN ALIEN 3RDPARTYFILTER</value></prop> <prop oor:name="UIComponent"/> <prop oor:name="FilterService"><value>com.sun.star.comp.office.BF_MigrateFilter</value></prop> <prop oor:name="UserData"><value></value></prop> diff --git a/filter/source/config/fragments/filters/StarCalc_3_0_Vorlage_Template.xcu b/filter/source/config/fragments/filters/StarCalc_3_0_Vorlage_Template.xcu index 1dce482b0fdf..d71f4625baa8 100644 --- a/filter/source/config/fragments/filters/StarCalc_3_0_Vorlage_Template.xcu +++ b/filter/source/config/fragments/filters/StarCalc_3_0_Vorlage_Template.xcu @@ -1,5 +1,5 @@ <node oor:name="StarCalc 3.0 Vorlage/Template" oor:op="replace"> - <prop oor:name="Flags"><value>IMPORT EXPORT TEMPLATE TEMPLATEPATH OWN ALIEN 3RDPARTYFILTER</value></prop> + <prop oor:name="Flags"><value>IMPORT TEMPLATE TEMPLATEPATH OWN ALIEN 3RDPARTYFILTER</value></prop> <prop oor:name="UIComponent"/> <prop oor:name="FilterService"><value>com.sun.star.comp.office.BF_MigrateFilter</value></prop> <prop oor:name="UserData"><value></value></prop> diff --git a/filter/source/config/fragments/filters/StarCalc_4_0.xcu b/filter/source/config/fragments/filters/StarCalc_4_0.xcu index c12d34b3ee8e..8ce6a5224426 100644 --- a/filter/source/config/fragments/filters/StarCalc_4_0.xcu +++ b/filter/source/config/fragments/filters/StarCalc_4_0.xcu @@ -1,5 +1,5 @@ <node oor:name="StarCalc 4.0" oor:op="replace"> - <prop oor:name="Flags"><value>IMPORT EXPORT TEMPLATE OWN ALIEN 3RDPARTYFILTER</value></prop> + <prop oor:name="Flags"><value>IMPORT TEMPLATE OWN ALIEN 3RDPARTYFILTER</value></prop> <prop oor:name="UIComponent"/> <prop oor:name="FilterService"><value>com.sun.star.comp.office.BF_MigrateFilter</value></prop> <prop oor:name="UserData"><value></value></prop> diff --git a/filter/source/config/fragments/filters/StarCalc_4_0_Vorlage_Template.xcu b/filter/source/config/fragments/filters/StarCalc_4_0_Vorlage_Template.xcu index b27b0cd4fcc1..caa58a176d00 100644 --- a/filter/source/config/fragments/filters/StarCalc_4_0_Vorlage_Template.xcu +++ b/filter/source/config/fragments/filters/StarCalc_4_0_Vorlage_Template.xcu @@ -1,5 +1,5 @@ <node oor:name="StarCalc 4.0 Vorlage/Template" oor:op="replace"> - <prop oor:name="Flags"><value>IMPORT EXPORT TEMPLATE TEMPLATEPATH OWN ALIEN 3RDPARTYFILTER</value></prop> + <prop oor:name="Flags"><value>IMPORT TEMPLATE TEMPLATEPATH OWN ALIEN 3RDPARTYFILTER</value></prop> <prop oor:name="UIComponent"/> <prop oor:name="FilterService"><value>com.sun.star.comp.office.BF_MigrateFilter</value></prop> <prop oor:name="UserData"><value></value></prop> diff --git a/filter/source/config/fragments/filters/StarCalc_5_0.xcu b/filter/source/config/fragments/filters/StarCalc_5_0.xcu index 7378d4d7a405..4f9838bb5e95 100644 --- a/filter/source/config/fragments/filters/StarCalc_5_0.xcu +++ b/filter/source/config/fragments/filters/StarCalc_5_0.xcu @@ -1,5 +1,5 @@ <node oor:name="StarCalc 5.0" oor:op="replace"> - <prop oor:name="Flags"><value>IMPORT EXPORT TEMPLATE OWN ALIEN 3RDPARTYFILTER</value></prop> + <prop oor:name="Flags"><value>IMPORT TEMPLATE OWN ALIEN 3RDPARTYFILTER</value></prop> <prop oor:name="UIComponent"/> <prop oor:name="FilterService"><value>com.sun.star.comp.office.BF_MigrateFilter</value></prop> <prop oor:name="UserData"><value></value></prop> diff --git a/filter/source/config/fragments/filters/StarCalc_5_0_Vorlage_Template.xcu b/filter/source/config/fragments/filters/StarCalc_5_0_Vorlage_Template.xcu index edefd738acfa..ad43c3b0e1c9 100644 --- a/filter/source/config/fragments/filters/StarCalc_5_0_Vorlage_Template.xcu +++ b/filter/source/config/fragments/filters/StarCalc_5_0_Vorlage_Template.xcu @@ -1,5 +1,5 @@ <node oor:name="StarCalc 5.0 Vorlage/Template" oor:op="replace"> - <prop oor:name="Flags"><value>IMPORT EXPORT TEMPLATE TEMPLATEPATH OWN ALIEN 3RDPARTYFILTER</value></prop> + <prop oor:name="Flags"><value>IMPORT TEMPLATE TEMPLATEPATH OWN ALIEN 3RDPARTYFILTER</value></prop> <prop oor:name="UIComponent"/> <prop oor:name="FilterService"><value>com.sun.star.comp.office.BF_MigrateFilter</value></prop> <prop oor:name="UserData"><value></value></prop> diff --git a/filter/source/config/fragments/filters/StarChart_3_0.xcu b/filter/source/config/fragments/filters/StarChart_3_0.xcu index ca7c4ab13867..fa756883f332 100644 --- a/filter/source/config/fragments/filters/StarChart_3_0.xcu +++ b/filter/source/config/fragments/filters/StarChart_3_0.xcu @@ -1,5 +1,5 @@ <node oor:name="StarChart 3.0" oor:op="replace"> - <prop oor:name="Flags"><value>IMPORT OWN ALIEN NOTINFILEDIALOG NOTINCHOOSER 3RDPARTYFILTER SILENTEXPORT</value></prop> + <prop oor:name="Flags"><value>IMPORT OWN ALIEN NOTINFILEDIALOG NOTINCHOOSER 3RDPARTYFILTER</value></prop> <prop oor:name="UIComponent"/> <prop oor:name="FilterService"><value>com.sun.star.comp.office.BF_MigrateFilter</value></prop> <prop oor:name="UserData"><value></value></prop> diff --git a/filter/source/config/fragments/filters/StarChart_4_0.xcu b/filter/source/config/fragments/filters/StarChart_4_0.xcu index d6b909ed2537..ed5e69c88ade 100644 --- a/filter/source/config/fragments/filters/StarChart_4_0.xcu +++ b/filter/source/config/fragments/filters/StarChart_4_0.xcu @@ -1,5 +1,5 @@ <node oor:name="StarChart 4.0" oor:op="replace"> - <prop oor:name="Flags"><value>IMPORT OWN ALIEN NOTINFILEDIALOG NOTINCHOOSER 3RDPARTYFILTER SILENTEXPORT</value></prop> + <prop oor:name="Flags"><value>IMPORT OWN ALIEN NOTINFILEDIALOG NOTINCHOOSER 3RDPARTYFILTER</value></prop> <prop oor:name="UIComponent"/> <prop oor:name="FilterService"><value>com.sun.star.comp.office.BF_MigrateFilter</value></prop> <prop oor:name="UserData"><value></value></prop> diff --git a/filter/source/config/fragments/filters/StarChart_5_0.xcu b/filter/source/config/fragments/filters/StarChart_5_0.xcu index 8f095aef9c79..43326bd6e82a 100644 --- a/filter/source/config/fragments/filters/StarChart_5_0.xcu +++ b/filter/source/config/fragments/filters/StarChart_5_0.xcu @@ -1,5 +1,5 @@ <node oor:name="StarChart 5.0" oor:op="replace"> - <prop oor:name="Flags"><value>IMPORT OWN ALIEN NOTINFILEDIALOG NOTINCHOOSER 3RDPARTYFILTER SILENTEXPORT</value></prop> + <prop oor:name="Flags"><value>IMPORT OWN ALIEN NOTINFILEDIALOG NOTINCHOOSER 3RDPARTYFILTER</value></prop> <prop oor:name="UIComponent"/> <prop oor:name="FilterService"><value>com.sun.star.comp.office.BF_MigrateFilter</value></prop> <prop oor:name="UserData"><value></value></prop> diff --git a/filter/source/config/fragments/filters/StarDraw_3_0.xcu b/filter/source/config/fragments/filters/StarDraw_3_0.xcu index e4c22be3a3ee..3f9ca691236d 100644 --- a/filter/source/config/fragments/filters/StarDraw_3_0.xcu +++ b/filter/source/config/fragments/filters/StarDraw_3_0.xcu @@ -1,5 +1,5 @@ <node oor:name="StarDraw 3.0" oor:op="replace"> - <prop oor:name="Flags"><value>IMPORT EXPORT TEMPLATE OWN ALIEN 3RDPARTYFILTER</value></prop> + <prop oor:name="Flags"><value>IMPORT TEMPLATE OWN ALIEN 3RDPARTYFILTER</value></prop> <prop oor:name="UIComponent"/> <prop oor:name="FilterService"><value>com.sun.star.comp.office.BF_MigrateFilter</value></prop> <prop oor:name="UserData"><value></value></prop> diff --git a/filter/source/config/fragments/filters/StarDraw_3_0_Vorlage.xcu b/filter/source/config/fragments/filters/StarDraw_3_0_Vorlage.xcu index ab1dd6f0ad23..ce8eda7943b0 100644 --- a/filter/source/config/fragments/filters/StarDraw_3_0_Vorlage.xcu +++ b/filter/source/config/fragments/filters/StarDraw_3_0_Vorlage.xcu @@ -1,5 +1,5 @@ <node oor:name="StarDraw 3.0 Vorlage" oor:op="replace"> - <prop oor:name="Flags"><value>IMPORT EXPORT TEMPLATE TEMPLATEPATH OWN ALIEN 3RDPARTYFILTER</value></prop> + <prop oor:name="Flags"><value>IMPORT TEMPLATE TEMPLATEPATH OWN ALIEN 3RDPARTYFILTER</value></prop> <prop oor:name="UIComponent"/> <prop oor:name="FilterService"><value>com.sun.star.comp.office.BF_MigrateFilter</value></prop> <prop oor:name="UserData"><value></value></prop> diff --git a/filter/source/config/fragments/filters/StarDraw_3_0_Vorlage__StarImpress_.xcu b/filter/source/config/fragments/filters/StarDraw_3_0_Vorlage__StarImpress_.xcu index f255fb901937..f44f7da0dac8 100644 --- a/filter/source/config/fragments/filters/StarDraw_3_0_Vorlage__StarImpress_.xcu +++ b/filter/source/config/fragments/filters/StarDraw_3_0_Vorlage__StarImpress_.xcu @@ -1,5 +1,5 @@ <node oor:name="StarDraw 3.0 Vorlage (StarImpress)" oor:op="replace"> - <prop oor:name="Flags"><value>IMPORT EXPORT TEMPLATE TEMPLATEPATH OWN ALIEN NOTINFILEDIALOG NOTINCHOOSER 3RDPARTYFILTER</value></prop> + <prop oor:name="Flags"><value>IMPORT TEMPLATE TEMPLATEPATH OWN ALIEN NOTINFILEDIALOG NOTINCHOOSER 3RDPARTYFILTER</value></prop> <prop oor:name="UIComponent"/> <prop oor:name="FilterService"><value>com.sun.star.comp.office.BF_MigrateFilter</value></prop> <prop oor:name="UserData"><value></value></prop> diff --git a/filter/source/config/fragments/filters/StarDraw_3_0__StarImpress_.xcu b/filter/source/config/fragments/filters/StarDraw_3_0__StarImpress_.xcu index b0ce586e9ee9..1dcce8b34680 100644 --- a/filter/source/config/fragments/filters/StarDraw_3_0__StarImpress_.xcu +++ b/filter/source/config/fragments/filters/StarDraw_3_0__StarImpress_.xcu @@ -1,5 +1,5 @@ <node oor:name="StarDraw 3.0 (StarImpress)" oor:op="replace"> - <prop oor:name="Flags"><value>IMPORT EXPORT TEMPLATE OWN ALIEN 3RDPARTYFILTER</value></prop> + <prop oor:name="Flags"><value>IMPORT TEMPLATE OWN ALIEN 3RDPARTYFILTER</value></prop> <prop oor:name="UIComponent"/> <prop oor:name="FilterService"><value>com.sun.star.comp.office.BF_MigrateFilter</value></prop> <prop oor:name="UserData"><value></value></prop> diff --git a/filter/source/config/fragments/filters/StarDraw_5_0.xcu b/filter/source/config/fragments/filters/StarDraw_5_0.xcu index da5376827a41..ef5075ef066e 100644 --- a/filter/source/config/fragments/filters/StarDraw_5_0.xcu +++ b/filter/source/config/fragments/filters/StarDraw_5_0.xcu @@ -1,5 +1,5 @@ <node oor:name="StarDraw 5.0" oor:op="replace"> - <prop oor:name="Flags"><value>IMPORT EXPORT TEMPLATE OWN ALIEN 3RDPARTYFILTER PREFERRED</value></prop> + <prop oor:name="Flags"><value>IMPORT TEMPLATE OWN ALIEN 3RDPARTYFILTER PREFERRED</value></prop> <prop oor:name="UIComponent"/> <prop oor:name="FilterService"><value>com.sun.star.comp.office.BF_MigrateFilter</value></prop> <prop oor:name="UserData"><value></value></prop> diff --git a/filter/source/config/fragments/filters/StarDraw_5_0_Vorlage.xcu b/filter/source/config/fragments/filters/StarDraw_5_0_Vorlage.xcu index 298ab1215761..7168ce984f8f 100644 --- a/filter/source/config/fragments/filters/StarDraw_5_0_Vorlage.xcu +++ b/filter/source/config/fragments/filters/StarDraw_5_0_Vorlage.xcu @@ -1,5 +1,5 @@ <node oor:name="StarDraw 5.0 Vorlage" oor:op="replace"> - <prop oor:name="Flags"><value>IMPORT EXPORT TEMPLATE TEMPLATEPATH OWN ALIEN 3RDPARTYFILTER PREFERRED</value></prop> + <prop oor:name="Flags"><value>IMPORT TEMPLATE TEMPLATEPATH OWN ALIEN 3RDPARTYFILTER PREFERRED</value></prop> <prop oor:name="UIComponent"/> <prop oor:name="FilterService"><value>com.sun.star.comp.office.BF_MigrateFilter</value></prop> <prop oor:name="UserData"><value></value></prop> diff --git a/filter/source/config/fragments/filters/StarDraw_5_0_Vorlage__StarImpress_.xcu b/filter/source/config/fragments/filters/StarDraw_5_0_Vorlage__StarImpress_.xcu index 8261bc648b93..2956522f2e67 100644 --- a/filter/source/config/fragments/filters/StarDraw_5_0_Vorlage__StarImpress_.xcu +++ b/filter/source/config/fragments/filters/StarDraw_5_0_Vorlage__StarImpress_.xcu @@ -1,5 +1,5 @@ <node oor:name="StarDraw 5.0 Vorlage (StarImpress)" oor:op="replace"> - <prop oor:name="Flags"><value>IMPORT EXPORT TEMPLATE TEMPLATEPATH OWN ALIEN NOTINFILEDIALOG NOTINCHOOSER 3RDPARTYFILTER</value></prop> + <prop oor:name="Flags"><value>IMPORT TEMPLATE TEMPLATEPATH OWN ALIEN NOTINFILEDIALOG NOTINCHOOSER 3RDPARTYFILTER</value></prop> <prop oor:name="UIComponent"/> <prop oor:name="FilterService"><value>com.sun.star.comp.office.BF_MigrateFilter</value></prop> <prop oor:name="UserData"><value></value></prop> diff --git a/filter/source/config/fragments/filters/StarDraw_5_0__StarImpress_.xcu b/filter/source/config/fragments/filters/StarDraw_5_0__StarImpress_.xcu index a76ebfc3f3c2..67d03c77af17 100644 --- a/filter/source/config/fragments/filters/StarDraw_5_0__StarImpress_.xcu +++ b/filter/source/config/fragments/filters/StarDraw_5_0__StarImpress_.xcu @@ -1,5 +1,5 @@ <node oor:name="StarDraw 5.0 (StarImpress)" oor:op="replace"> - <prop oor:name="Flags"><value>IMPORT EXPORT TEMPLATE OWN ALIEN 3RDPARTYFILTER</value></prop> + <prop oor:name="Flags"><value>IMPORT TEMPLATE OWN ALIEN 3RDPARTYFILTER</value></prop> <prop oor:name="UIComponent"/> <prop oor:name="FilterService"><value>com.sun.star.comp.office.BF_MigrateFilter</value></prop> <prop oor:name="UserData"><value></value></prop> diff --git a/filter/source/config/fragments/filters/StarImpress_4_0.xcu b/filter/source/config/fragments/filters/StarImpress_4_0.xcu index b8bd8c51bbb0..ef28390774b5 100644 --- a/filter/source/config/fragments/filters/StarImpress_4_0.xcu +++ b/filter/source/config/fragments/filters/StarImpress_4_0.xcu @@ -1,5 +1,5 @@ <node oor:name="StarImpress 4.0" oor:op="replace"> - <prop oor:name="Flags"><value>IMPORT EXPORT TEMPLATE OWN ALIEN 3RDPARTYFILTER PREFERRED</value></prop> + <prop oor:name="Flags"><value>IMPORT TEMPLATE OWN ALIEN 3RDPARTYFILTER PREFERRED</value></prop> <prop oor:name="UIComponent"/> <prop oor:name="FilterService"><value>com.sun.star.comp.office.BF_MigrateFilter</value></prop> <prop oor:name="UserData"><value></value></prop> diff --git a/filter/source/config/fragments/filters/StarImpress_4_0_Vorlage.xcu b/filter/source/config/fragments/filters/StarImpress_4_0_Vorlage.xcu index 68ad61d1270e..b4d73953bd00 100644 --- a/filter/source/config/fragments/filters/StarImpress_4_0_Vorlage.xcu +++ b/filter/source/config/fragments/filters/StarImpress_4_0_Vorlage.xcu @@ -1,5 +1,5 @@ <node oor:name="StarImpress 4.0 Vorlage" oor:op="replace"> - <prop oor:name="Flags"><value>IMPORT EXPORT TEMPLATE TEMPLATEPATH OWN ALIEN 3RDPARTYFILTER</value></prop> + <prop oor:name="Flags"><value>IMPORT TEMPLATE TEMPLATEPATH OWN ALIEN 3RDPARTYFILTER</value></prop> <prop oor:name="UIComponent"/> <prop oor:name="FilterService"><value>com.sun.star.comp.office.BF_MigrateFilter</value></prop> <prop oor:name="UserData"><value></value></prop> diff --git a/filter/source/config/fragments/filters/StarImpress_5_0.xcu b/filter/source/config/fragments/filters/StarImpress_5_0.xcu index 544b9187d1f2..1c1377cf3ab7 100644 --- a/filter/source/config/fragments/filters/StarImpress_5_0.xcu +++ b/filter/source/config/fragments/filters/StarImpress_5_0.xcu @@ -1,5 +1,5 @@ <node oor:name="StarImpress 5.0" oor:op="replace"> - <prop oor:name="Flags"><value>IMPORT EXPORT TEMPLATE OWN ALIEN 3RDPARTYFILTER PREFERRED</value></prop> + <prop oor:name="Flags"><value>IMPORT TEMPLATE OWN ALIEN 3RDPARTYFILTER PREFERRED</value></prop> <prop oor:name="UIComponent"/> <prop oor:name="FilterService"><value>com.sun.star.comp.office.BF_MigrateFilter</value></prop> <prop oor:name="UserData"><value></value></prop> diff --git a/filter/source/config/fragments/filters/StarImpress_5_0_Vorlage.xcu b/filter/source/config/fragments/filters/StarImpress_5_0_Vorlage.xcu index c73995cca8c6..9da35f9745e4 100644 --- a/filter/source/config/fragments/filters/StarImpress_5_0_Vorlage.xcu +++ b/filter/source/config/fragments/filters/StarImpress_5_0_Vorlage.xcu @@ -1,5 +1,5 @@ <node oor:name="StarImpress 5.0 Vorlage" oor:op="replace"> - <prop oor:name="Flags"><value>IMPORT EXPORT TEMPLATE TEMPLATEPATH OWN ALIEN 3RDPARTYFILTER</value></prop> + <prop oor:name="Flags"><value>IMPORT TEMPLATE TEMPLATEPATH OWN ALIEN 3RDPARTYFILTER</value></prop> <prop oor:name="UIComponent"/> <prop oor:name="FilterService"><value>com.sun.star.comp.office.BF_MigrateFilter</value></prop> <prop oor:name="UserData"><value></value></prop> diff --git a/filter/source/config/fragments/filters/StarMath_5_0.xcu b/filter/source/config/fragments/filters/StarMath_5_0.xcu index e583d4bf32ec..6d52188d81dd 100644 --- a/filter/source/config/fragments/filters/StarMath_5_0.xcu +++ b/filter/source/config/fragments/filters/StarMath_5_0.xcu @@ -1,5 +1,5 @@ <node oor:name="StarMath 5.0" oor:op="replace"> - <prop oor:name="Flags"><value>IMPORT EXPORT OWN ALIEN 3RDPARTYFILTER</value></prop> + <prop oor:name="Flags"><value>IMPORT OWN ALIEN 3RDPARTYFILTER</value></prop> <prop oor:name="UIComponent"/> <prop oor:name="FilterService"><value>com.sun.star.comp.office.BF_MigrateFilter</value></prop> <prop oor:name="UserData"><value>0</value></prop> diff --git a/filter/source/config/fragments/filters/StarWriter_3_0.xcu b/filter/source/config/fragments/filters/StarWriter_3_0.xcu index 6942622a7a14..30d52dde4fa8 100644 --- a/filter/source/config/fragments/filters/StarWriter_3_0.xcu +++ b/filter/source/config/fragments/filters/StarWriter_3_0.xcu @@ -1,5 +1,5 @@ <node oor:name="StarWriter 3.0" oor:op="replace"> - <prop oor:name="Flags"><value>IMPORT EXPORT TEMPLATE OWN ALIEN 3RDPARTYFILTER</value></prop> + <prop oor:name="Flags"><value>IMPORT TEMPLATE OWN ALIEN 3RDPARTYFILTER</value></prop> <prop oor:name="UIComponent"/> <prop oor:name="FilterService"><value>com.sun.star.comp.office.BF_MigrateFilter</value></prop> <prop oor:name="UserData"><value>CSW3</value></prop> diff --git a/filter/source/config/fragments/filters/StarWriter_3_0_Vorlage_Template.xcu b/filter/source/config/fragments/filters/StarWriter_3_0_Vorlage_Template.xcu index 7902ef2181b8..af6c79baaf6c 100644 --- a/filter/source/config/fragments/filters/StarWriter_3_0_Vorlage_Template.xcu +++ b/filter/source/config/fragments/filters/StarWriter_3_0_Vorlage_Template.xcu @@ -1,5 +1,5 @@ <node oor:name="StarWriter 3.0 Vorlage/Template" oor:op="replace"> - <prop oor:name="Flags"><value>IMPORT EXPORT TEMPLATE TEMPLATEPATH OWN ALIEN 3RDPARTYFILTER</value></prop> + <prop oor:name="Flags"><value>IMPORT TEMPLATE TEMPLATEPATH OWN ALIEN 3RDPARTYFILTER</value></prop> <prop oor:name="UIComponent"/> <prop oor:name="FilterService"><value>com.sun.star.comp.office.BF_MigrateFilter</value></prop> <prop oor:name="UserData"><value>CSW3V</value></prop> diff --git a/filter/source/config/fragments/filters/StarWriter_3_0__StarWriter_GlobalDocument_.xcu b/filter/source/config/fragments/filters/StarWriter_3_0__StarWriter_GlobalDocument_.xcu index 4c5b0aa89af8..aedeb92e6a51 100644 --- a/filter/source/config/fragments/filters/StarWriter_3_0__StarWriter_GlobalDocument_.xcu +++ b/filter/source/config/fragments/filters/StarWriter_3_0__StarWriter_GlobalDocument_.xcu @@ -1,5 +1,5 @@ <node oor:name="StarWriter 3.0 (StarWriter/GlobalDocument)" oor:op="replace"> - <prop oor:name="Flags"><value>EXPORT TEMPLATE ALIEN 3RDPARTYFILTER</value></prop> + <prop oor:name="Flags"><value>TEMPLATE ALIEN 3RDPARTYFILTER</value></prop> <prop oor:name="UIComponent"/> <prop oor:name="FilterService"><value>com.sun.star.comp.office.BF_MigrateFilter</value></prop> <prop oor:name="UserData"><value>CSW3</value></prop> diff --git a/filter/source/config/fragments/filters/StarWriter_3_0__StarWriter_Web_.xcu b/filter/source/config/fragments/filters/StarWriter_3_0__StarWriter_Web_.xcu index a68affbce5ea..fd33dc7a4cf0 100644 --- a/filter/source/config/fragments/filters/StarWriter_3_0__StarWriter_Web_.xcu +++ b/filter/source/config/fragments/filters/StarWriter_3_0__StarWriter_Web_.xcu @@ -1,5 +1,5 @@ <node oor:name="StarWriter 3.0 (StarWriter/Web)" oor:op="replace"> - <prop oor:name="Flags"><value>EXPORT TEMPLATE ALIEN 3RDPARTYFILTER</value></prop> + <prop oor:name="Flags"><value>TEMPLATE ALIEN 3RDPARTYFILTER</value></prop> <prop oor:name="UIComponent"/> <prop oor:name="FilterService"><value>com.sun.star.comp.office.BF_MigrateFilter</value></prop> <prop oor:name="UserData"><value>CSW3</value></prop> diff --git a/filter/source/config/fragments/filters/StarWriter_4_0.xcu b/filter/source/config/fragments/filters/StarWriter_4_0.xcu index 5c23ef96809c..a5ba428c58ad 100644 --- a/filter/source/config/fragments/filters/StarWriter_4_0.xcu +++ b/filter/source/config/fragments/filters/StarWriter_4_0.xcu @@ -1,5 +1,5 @@ <node oor:name="StarWriter 4.0" oor:op="replace"> - <prop oor:name="Flags"><value>IMPORT EXPORT TEMPLATE OWN ALIEN 3RDPARTYFILTER</value></prop> + <prop oor:name="Flags"><value>IMPORT TEMPLATE OWN ALIEN 3RDPARTYFILTER</value></prop> <prop oor:name="UIComponent"/> <prop oor:name="FilterService"><value>com.sun.star.comp.office.BF_MigrateFilter</value></prop> <prop oor:name="UserData"><value>CSW4</value></prop> diff --git a/filter/source/config/fragments/filters/StarWriter_4_0_GlobalDocument.xcu b/filter/source/config/fragments/filters/StarWriter_4_0_GlobalDocument.xcu index 3992a973d896..9c0058b832d7 100644 --- a/filter/source/config/fragments/filters/StarWriter_4_0_GlobalDocument.xcu +++ b/filter/source/config/fragments/filters/StarWriter_4_0_GlobalDocument.xcu @@ -1,5 +1,5 @@ <node oor:name="StarWriter 4.0/GlobalDocument" oor:op="replace"> - <prop oor:name="Flags"><value>IMPORT EXPORT TEMPLATE OWN ALIEN 3RDPARTYFILTER</value></prop> + <prop oor:name="Flags"><value>IMPORT TEMPLATE OWN ALIEN 3RDPARTYFILTER</value></prop> <prop oor:name="UIComponent"/> <prop oor:name="FilterService"><value>com.sun.star.comp.office.BF_MigrateFilter</value></prop> <prop oor:name="UserData"><value>CSW4</value></prop> diff --git a/filter/source/config/fragments/filters/StarWriter_4_0_Vorlage_Template.xcu b/filter/source/config/fragments/filters/StarWriter_4_0_Vorlage_Template.xcu index 16feb8df0b3d..70efeb98a308 100644 --- a/filter/source/config/fragments/filters/StarWriter_4_0_Vorlage_Template.xcu +++ b/filter/source/config/fragments/filters/StarWriter_4_0_Vorlage_Template.xcu @@ -1,5 +1,5 @@ <node oor:name="StarWriter 4.0 Vorlage/Template" oor:op="replace"> - <prop oor:name="Flags"><value>IMPORT EXPORT TEMPLATE TEMPLATEPATH OWN ALIEN 3RDPARTYFILTER</value></prop> + <prop oor:name="Flags"><value>IMPORT TEMPLATE TEMPLATEPATH OWN ALIEN 3RDPARTYFILTER</value></prop> <prop oor:name="UIComponent"/> <prop oor:name="FilterService"><value>com.sun.star.comp.office.BF_MigrateFilter</value></prop> <prop oor:name="UserData"><value>CSW4V</value></prop> diff --git a/filter/source/config/fragments/filters/StarWriter_4_0__StarWriter_GlobalDocument_.xcu b/filter/source/config/fragments/filters/StarWriter_4_0__StarWriter_GlobalDocument_.xcu index 9eff3b736f14..437a26106391 100644 --- a/filter/source/config/fragments/filters/StarWriter_4_0__StarWriter_GlobalDocument_.xcu +++ b/filter/source/config/fragments/filters/StarWriter_4_0__StarWriter_GlobalDocument_.xcu @@ -1,5 +1,5 @@ <node oor:name="StarWriter 4.0 (StarWriter/GlobalDocument)" oor:op="replace"> - <prop oor:name="Flags"><value>EXPORT TEMPLATE ALIEN 3RDPARTYFILTER</value></prop> + <prop oor:name="Flags"><value>TEMPLATE ALIEN 3RDPARTYFILTER</value></prop> <prop oor:name="UIComponent"/> <prop oor:name="FilterService"><value>com.sun.star.comp.office.BF_MigrateFilter</value></prop> <prop oor:name="UserData"><value>CSW4</value></prop> diff --git a/filter/source/config/fragments/filters/StarWriter_4_0__StarWriter_Web_.xcu b/filter/source/config/fragments/filters/StarWriter_4_0__StarWriter_Web_.xcu index 04f97b796b6c..1a44d99564d0 100644 --- a/filter/source/config/fragments/filters/StarWriter_4_0__StarWriter_Web_.xcu +++ b/filter/source/config/fragments/filters/StarWriter_4_0__StarWriter_Web_.xcu @@ -1,5 +1,5 @@ <node oor:name="StarWriter 4.0 (StarWriter/Web)" oor:op="replace"> - <prop oor:name="Flags"><value>EXPORT TEMPLATE ALIEN 3RDPARTYFILTER</value></prop> + <prop oor:name="Flags"><value>TEMPLATE ALIEN 3RDPARTYFILTER</value></prop> <prop oor:name="UIComponent"/> <prop oor:name="FilterService"><value>com.sun.star.comp.office.BF_MigrateFilter</value></prop> <prop oor:name="UserData"><value>CSW4</value></prop> diff --git a/filter/source/config/fragments/filters/StarWriter_5_0.xcu b/filter/source/config/fragments/filters/StarWriter_5_0.xcu index 4556fc72d8c8..cdd8241af507 100644 --- a/filter/source/config/fragments/filters/StarWriter_5_0.xcu +++ b/filter/source/config/fragments/filters/StarWriter_5_0.xcu @@ -1,5 +1,5 @@ <node oor:name="StarWriter 5.0" oor:op="replace"> - <prop oor:name="Flags"><value>IMPORT EXPORT TEMPLATE OWN ALIEN 3RDPARTYFILTER PREFERRED</value></prop> + <prop oor:name="Flags"><value>IMPORT TEMPLATE OWN ALIEN 3RDPARTYFILTER PREFERRED</value></prop> <prop oor:name="UIComponent"/> <prop oor:name="FilterService"><value>com.sun.star.comp.office.BF_MigrateFilter</value></prop> <prop oor:name="UserData"><value>CSW5</value></prop> diff --git a/filter/source/config/fragments/filters/StarWriter_5_0_GlobalDocument.xcu b/filter/source/config/fragments/filters/StarWriter_5_0_GlobalDocument.xcu index 3604d7c828b8..1149f621b878 100644 --- a/filter/source/config/fragments/filters/StarWriter_5_0_GlobalDocument.xcu +++ b/filter/source/config/fragments/filters/StarWriter_5_0_GlobalDocument.xcu @@ -1,5 +1,5 @@ <node oor:name="StarWriter 5.0/GlobalDocument" oor:op="replace"> - <prop oor:name="Flags"><value>IMPORT EXPORT TEMPLATE OWN ALIEN 3RDPARTYFILTER</value></prop> + <prop oor:name="Flags"><value>IMPORT TEMPLATE OWN ALIEN 3RDPARTYFILTER</value></prop> <prop oor:name="UIComponent"/> <prop oor:name="FilterService"><value>com.sun.star.comp.office.BF_MigrateFilter</value></prop> <prop oor:name="UserData"><value>CSW5</value></prop> diff --git a/filter/source/config/fragments/filters/StarWriter_5_0_Vorlage_Template.xcu b/filter/source/config/fragments/filters/StarWriter_5_0_Vorlage_Template.xcu index c33a323126cc..b249680af26b 100644 --- a/filter/source/config/fragments/filters/StarWriter_5_0_Vorlage_Template.xcu +++ b/filter/source/config/fragments/filters/StarWriter_5_0_Vorlage_Template.xcu @@ -1,5 +1,5 @@ <node oor:name="StarWriter 5.0 Vorlage/Template" oor:op="replace"> - <prop oor:name="Flags"><value>IMPORT EXPORT TEMPLATE TEMPLATEPATH OWN ALIEN 3RDPARTYFILTER</value></prop> + <prop oor:name="Flags"><value>IMPORT TEMPLATE TEMPLATEPATH OWN ALIEN 3RDPARTYFILTER</value></prop> <prop oor:name="UIComponent"/> <prop oor:name="FilterService"><value>com.sun.star.comp.office.BF_MigrateFilter</value></prop> <prop oor:name="UserData"><value>CSW5V</value></prop> diff --git a/filter/source/config/fragments/filters/StarWriter_5_0__StarWriter_GlobalDocument_.xcu b/filter/source/config/fragments/filters/StarWriter_5_0__StarWriter_GlobalDocument_.xcu index c5bef5aead6e..fb99f014220e 100644 --- a/filter/source/config/fragments/filters/StarWriter_5_0__StarWriter_GlobalDocument_.xcu +++ b/filter/source/config/fragments/filters/StarWriter_5_0__StarWriter_GlobalDocument_.xcu @@ -1,5 +1,5 @@ <node oor:name="StarWriter 5.0 (StarWriter/GlobalDocument)" oor:op="replace"> - <prop oor:name="Flags"><value>EXPORT TEMPLATE ALIEN 3RDPARTYFILTER</value></prop> + <prop oor:name="Flags"><value>TEMPLATE ALIEN 3RDPARTYFILTER</value></prop> <prop oor:name="UIComponent"/> <prop oor:name="FilterService"><value>com.sun.star.comp.office.BF_MigrateFilter</value></prop> <prop oor:name="UserData"><value>CSW5</value></prop> diff --git a/filter/source/config/fragments/filters/StarWriter_5_0__StarWriter_Web_.xcu b/filter/source/config/fragments/filters/StarWriter_5_0__StarWriter_Web_.xcu index 35cf7c56746d..076f95990b7a 100644 --- a/filter/source/config/fragments/filters/StarWriter_5_0__StarWriter_Web_.xcu +++ b/filter/source/config/fragments/filters/StarWriter_5_0__StarWriter_Web_.xcu @@ -1,5 +1,5 @@ <node oor:name="StarWriter 5.0 (StarWriter/Web)" oor:op="replace"> - <prop oor:name="Flags"><value>EXPORT TEMPLATE ALIEN 3RDPARTYFILTER</value></prop> + <prop oor:name="Flags"><value>TEMPLATE ALIEN 3RDPARTYFILTER</value></prop> <prop oor:name="UIComponent"/> <prop oor:name="FilterService"><value>com.sun.star.comp.office.BF_MigrateFilter</value></prop> <prop oor:name="UserData"><value>CSW5</value></prop> diff --git a/filter/source/config/fragments/filters/StarWriter_Web_4_0_Vorlage_Template.xcu b/filter/source/config/fragments/filters/StarWriter_Web_4_0_Vorlage_Template.xcu index 51367423c493..33a0a82f44eb 100644 --- a/filter/source/config/fragments/filters/StarWriter_Web_4_0_Vorlage_Template.xcu +++ b/filter/source/config/fragments/filters/StarWriter_Web_4_0_Vorlage_Template.xcu @@ -1,5 +1,5 @@ <node oor:name="StarWriter/Web 4.0 Vorlage/Template" oor:op="replace"> - <prop oor:name="Flags"><value>IMPORT EXPORT TEMPLATE TEMPLATEPATH OWN ALIEN 3RDPARTYFILTER</value></prop> + <prop oor:name="Flags"><value>IMPORT TEMPLATE TEMPLATEPATH OWN ALIEN 3RDPARTYFILTER</value></prop> <prop oor:name="UIComponent"/> <prop oor:name="FilterService"><value>com.sun.star.comp.office.BF_MigrateFilter</value></prop> <prop oor:name="UserData"><value>CSW4VWEB</value></prop> diff --git a/filter/source/config/fragments/filters/StarWriter_Web_5_0_Vorlage_Template.xcu b/filter/source/config/fragments/filters/StarWriter_Web_5_0_Vorlage_Template.xcu index 2f696b08defa..efdc14034980 100644 --- a/filter/source/config/fragments/filters/StarWriter_Web_5_0_Vorlage_Template.xcu +++ b/filter/source/config/fragments/filters/StarWriter_Web_5_0_Vorlage_Template.xcu @@ -1,5 +1,5 @@ <node oor:name="StarWriter/Web 5.0 Vorlage/Template" oor:op="replace"> - <prop oor:name="Flags"><value>IMPORT EXPORT TEMPLATE TEMPLATEPATH OWN ALIEN 3RDPARTYFILTER</value></prop> + <prop oor:name="Flags"><value>IMPORT TEMPLATE TEMPLATEPATH OWN ALIEN 3RDPARTYFILTER</value></prop> <prop oor:name="UIComponent"/> <prop oor:name="FilterService"><value>com.sun.star.comp.office.BF_MigrateFilter</value></prop> <prop oor:name="UserData"><value>CSW5VWEB</value></prop> 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/ipict/shape.cxx b/filter/source/graphicfilter/ipict/shape.cxx index fdf32830b728..c261b021472a 100755 --- a/filter/source/graphicfilter/ipict/shape.cxx +++ b/filter/source/graphicfilter/ipict/shape.cxx @@ -212,8 +212,8 @@ namespace PictReaderShape { double const Y[2] = { oval.Top(), oval.Bottom() }; double width = X[1] - X[0]; double height = Y[1] - Y[0]; - if (ovalW > width) ovalW = width; - if (ovalH > height) ovalH = height; + if (ovalW > width) ovalW = static_cast< int >( width ); + if (ovalH > height) ovalH = static_cast< int >( height ); B2DRectangle rect(B2DPoint(X[0],Y[0]), B2DPoint(X[1],Y[1])); B2DPolygon poly = tools::createPolygonFromRect(rect, (width != 0.0) ? ovalW/width : 0.0, (height != 0.0) ? ovalH/height : 0.0); @@ -233,7 +233,7 @@ namespace PictReaderShape { decalBR[0] -= (penSize+1)/2; decalBR[1] -= (penSize+1)/2; } // Quickdraw Drawing Reference 3-82: the pen size is only used for frame - else decalBR[0] = decalBR[1] = 0.0; + else decalBR[0] = decalBR[1] = 0; int numPt = orig.GetSize(); 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 38b97a025b16..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; @@ -338,19 +338,22 @@ BOOL TGAReader::ImplReadBody() nXCount = 0; nY += nYAdd; nYCount++; + + if( nYCount >= mpFileHeader->nImageHeight ) + return false; // invalid picture } } } 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++; @@ -360,6 +363,9 @@ BOOL TGAReader::ImplReadBody() nXCount = 0; nY += nYAdd; nYCount++; + + if( nYCount >= mpFileHeader->nImageHeight ) + return false; // invalid picture } } } @@ -375,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 ) @@ -387,18 +393,21 @@ BOOL TGAReader::ImplReadBody() nXCount = 0; nY += nYAdd; nYCount++; + + if( nYCount >= mpFileHeader->nImageHeight ) + return false; // invalid picture } } } 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 ) @@ -407,13 +416,16 @@ BOOL TGAReader::ImplReadBody() nXCount = 0; nY += nYAdd; nYCount++; + + if( nYCount >= mpFileHeader->nImageHeight ) + return false; // invalid picture } } } } break; default: - return FALSE; + return sal_False; } } else @@ -429,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; @@ -440,12 +452,15 @@ BOOL TGAReader::ImplReadBody() nXCount = 0; nY += nYAdd; nYCount++; + + if( nYCount >= mpFileHeader->nImageHeight ) + return false; // invalid picture } } } 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 ) ); @@ -457,6 +472,9 @@ BOOL TGAReader::ImplReadBody() nXCount = 0; nY += nYAdd; nYCount++; + + if( nYCount >= mpFileHeader->nImageHeight ) + return false; // invalid picture } } } @@ -472,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; @@ -483,12 +501,15 @@ BOOL TGAReader::ImplReadBody() nXCount = 0; nY += nYAdd; nYCount++; + + if( nYCount >= mpFileHeader->nImageHeight ) + return false; // invalid picture } } } 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 ) ); @@ -500,6 +521,9 @@ BOOL TGAReader::ImplReadBody() nXCount = 0; nY += nYAdd; nYCount++; + + if( nYCount >= mpFileHeader->nImageHeight ) + return false; // invalid picture } } } @@ -514,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; @@ -528,17 +552,20 @@ BOOL TGAReader::ImplReadBody() nXCount = 0; nY += nYAdd; nYCount++; + + if( nYCount >= mpFileHeader->nImageHeight ) + return false; // invalid picture } } } 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++; @@ -548,6 +575,9 @@ BOOL TGAReader::ImplReadBody() nXCount = 0; nY += nYAdd; nYCount++; + + if( nYCount >= mpFileHeader->nImageHeight ) + return false; // invalid picture } } } @@ -555,7 +585,7 @@ BOOL TGAReader::ImplReadBody() break; default: - return FALSE; + return sal_False; } } } @@ -576,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; @@ -590,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 @@ -627,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; } } } @@ -644,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; } @@ -679,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 ); } @@ -689,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 ); @@ -700,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 ] ) ) ); } } } @@ -722,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 d17af3b2681b..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) @@ -114,7 +114,6 @@ bool SvxImportMSVBasic::ImportForms_Impl(const String& rStorageName, return false; bool bRet = true; - SFX_APP()->EnterBasicCall(); try { Reference<XMultiServiceFactory> xSF(comphelper::getProcessServiceFactory()); @@ -192,15 +191,14 @@ bool SvxImportMSVBasic::ImportForms_Impl(const String& rStorageName, DBG_ERRORFILE( "SvxImportMSVBasic::ImportForms_Impl - any exception caught" ); //bRet = false; } - SFX_APP()->LeaveBasicCall(); return bRet; } -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 | @@ -213,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; } } } @@ -233,22 +231,21 @@ 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) ) { - SFX_APP()->EnterBasicCall(); Reference<XLibraryContainer> xLibContainer = rDocSh.GetBasicContainer(); DBG_ASSERT( xLibContainer.is(), "No BasicContainer!" ); @@ -263,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 ) @@ -298,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 @@ -386,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) { @@ -492,7 +489,6 @@ BOOL SvxImportMSVBasic::ImportCode_Impl( const String& rStorageName, } bRet = true; } - SFX_APP()->LeaveBasicCall(); } return bRet; } 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..3c81dbd778b9 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 ) @@ -473,6 +473,10 @@ ImpPDFTabGeneralPage::ImpPDFTabGeneralPage( Window* pParent, aNewPos.Y() -= nDelta; maCbEmbedStandardFonts.SetPosPixel( aNewPos ); } + + maEdPages.SetAccessibleName(maRbRange.GetText()); + maEdPages.SetAccessibleRelationLabeledBy(&maRbRange); + maCbExportEmptyPages.SetStyle( maCbExportEmptyPages.GetStyle() | WB_VCENTER ); } @@ -524,7 +528,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 +560,7 @@ void ImpPDFTabGeneralPage::SetFilterConfigItem( const ImpPDFTabDialog* paParent if ( mbIsPresentation ) { - maCbExportNotesPages.Show( TRUE ); + maCbExportNotesPages.Show( sal_True ); maCbExportNotesPages.Check( paParent->mbExportNotesPages ); } else @@ -570,8 +574,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 +588,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 @@ -658,7 +662,8 @@ SfxTabPage* ImpPDFTabGeneralPage::Create( Window* pParent, IMPL_LINK( ImpPDFTabGeneralPage, TogglePagesHdl, void*, EMPTYARG ) { maEdPages.Enable( maRbRange.IsChecked() ); - maEdPages.SetReadOnly( !maRbRange.IsChecked() ); + //Sym2_5805, When the control is disabled, it is also readonly. So here, it is not necessary to set it as readonly. + //maEdPages.SetReadOnly( !maRbRange.IsChecked() ); return 0; } @@ -692,17 +697,18 @@ 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 ); + //Sym2_5805, When the control is disabled, it is also readonly. So here, it is not necessary to set it as readonly. + //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; @@ -711,9 +717,13 @@ IMPL_LINK( ImpPDFTabGeneralPage, ToggleAddStreamHdl, void*, EMPTYARG ) // ----------------------------------------------------------------------------- IMPL_LINK( ImpPDFTabGeneralPage, ToggleExportPDFAHdl, void*, EMPTYARG ) { + ImpPDFTabSecurityPage* pSecPage = NULL; //set the security page status (and its controls as well) if( mpaParent && mpaParent->GetTabPage( RID_PDF_TAB_SECURITY ) ) - ( ( ImpPDFTabSecurityPage* )mpaParent->GetTabPage( RID_PDF_TAB_SECURITY ) )->ImplPDFASecurityControl( !maCbPDFA1b.IsChecked() ); + { + pSecPage = static_cast<ImpPDFTabSecurityPage*>(mpaParent->GetTabPage( RID_PDF_TAB_SECURITY )); + pSecPage->ImplPDFASecurityControl( !maCbPDFA1b.IsChecked() ); + } //PDF/A-1 needs tagged PDF, so force disable the control, will be forced in pdfexport. sal_Bool bPDFA1Sel = maCbPDFA1b.IsChecked(); @@ -748,6 +758,13 @@ IMPL_LINK( ImpPDFTabGeneralPage, ToggleExportPDFAHdl, void*, EMPTYARG ) if( mpaParent && mpaParent->GetTabPage( RID_PDF_TAB_LINKS ) ) ( ( ImpPDFTabLinksPage* )mpaParent->GetTabPage( RID_PDF_TAB_LINKS ) )->ImplPDFALinkControl( !maCbPDFA1b.IsChecked() ); + // if a password was set, inform the user that this will not be used in PDF/A case + if( maCbPDFA1b.IsChecked() && pSecPage && pSecPage->hasPassword() ) + { + WarningBox aBox( this, PDFFilterResId( RID_PDF_WARNPDFAPASSWORD ) ); + aBox.Execute(); + } + return 0; } @@ -788,6 +805,8 @@ ImpPDFTabOpnFtrPage::ImpPDFTabOpnFtrPage( Window* pParent, maRbMagnFitWidth.SetToggleHdl( LINK( this, ImpPDFTabOpnFtrPage, ToggleRbMagnHdl ) ); maRbMagnFitVisible.SetToggleHdl( LINK( this, ImpPDFTabOpnFtrPage, ToggleRbMagnHdl ) ); maRbMagnZoom.SetToggleHdl( LINK( this, ImpPDFTabOpnFtrPage, ToggleRbMagnHdl ) ); + maNumZoom.SetAccessibleName(maRbMagnZoom.GetText()); + maNumZoom.SetAccessibleRelationLabeledBy(&maRbMagnZoom); } // ----------------------------------------------------------------------------- @@ -877,23 +896,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; }; @@ -910,9 +929,8 @@ void ImpPDFTabOpnFtrPage::SetFilterConfigItem( const ImpPDFTabDialog* paParent } } -IMPL_LINK( ImpPDFTabOpnFtrPage, ToggleRbPgLyContinueFacingHdl, void*, p ) +IMPL_LINK( ImpPDFTabOpnFtrPage, ToggleRbPgLyContinueFacingHdl, void*, EMPTYARG ) { - p = p; //for compiler warning maCbPgLyFirstOnLeft.Enable( maRbPgLyContinueFacing.IsChecked() ); return 0; } @@ -951,6 +969,8 @@ ImpPDFTabViewerPage::ImpPDFTabViewerPage( Window* pParent, FreeResource(); maRbAllBookmarkLevels.SetToggleHdl( LINK( this, ImpPDFTabViewerPage, ToggleRbBookmarksHdl ) ); maRbVisibleBookmarkLevels.SetToggleHdl( LINK( this, ImpPDFTabViewerPage, ToggleRbBookmarksHdl ) ); + maNumBookmarkLevels.SetAccessibleName(maRbVisibleBookmarkLevels.GetText()); + maNumBookmarkLevels.SetAccessibleRelationLabeledBy(&maRbVisibleBookmarkLevels); } // ----------------------------------------------------------------------------- @@ -1002,13 +1022,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 ); } } @@ -1024,10 +1044,13 @@ ImpPDFTabSecurityPage::ImpPDFTabSecurityPage( Window* i_pParent, maFtUserPwd( this, PDFFilterResId( FT_USER_PWD ) ), maUserPwdSet( PDFFilterResId( STR_USER_PWD_SET ) ), maUserPwdUnset( PDFFilterResId( STR_USER_PWD_UNSET ) ), + maUserPwdPdfa( PDFFilterResId( STR_USER_PWD_PDFA ) ), + maStrSetPwd( PDFFilterResId( STR_SET_PWD ) ), maFtOwnerPwd( this, PDFFilterResId( FT_OWNER_PWD ) ), maOwnerPwdSet( PDFFilterResId( STR_OWNER_PWD_SET ) ), maOwnerPwdUnset( PDFFilterResId( STR_OWNER_PWD_UNSET ) ), + maOwnerPwdPdfa( PDFFilterResId( STR_OWNER_PWD_PDFA ) ), maFlPrintPermissions( this, PDFFilterResId( FL_PRINT_PERMISSIONS ) ), maRbPrintNone( this, PDFFilterResId( RB_PRINT_NONE ) ), @@ -1219,10 +1242,21 @@ IMPL_LINK( ImpPDFTabSecurityPage, ClickmaPbSetPwdHdl, void*, EMPTYARG ) void ImpPDFTabSecurityPage::enablePermissionControls() { - maFtUserPwd.SetText( (mbHaveUserPassword && IsEnabled()) ? maUserPwdSet : maUserPwdUnset ); + sal_Bool bIsPDFASel = sal_False; + ImpPDFTabDialog* pParent = static_cast<ImpPDFTabDialog*>(GetTabDialog()); + if( pParent && pParent->GetTabPage( RID_PDF_TAB_GENER ) ) + bIsPDFASel = ( ( ImpPDFTabGeneralPage* )pParent-> + GetTabPage( RID_PDF_TAB_GENER ) )->IsPdfaSelected(); + if( bIsPDFASel ) + maFtUserPwd.SetText( maUserPwdPdfa ); + else + maFtUserPwd.SetText( (mbHaveUserPassword && IsEnabled()) ? maUserPwdSet : maUserPwdUnset ); sal_Bool bLocalEnable = mbHaveOwnerPassword && IsEnabled(); - maFtOwnerPwd.SetText( bLocalEnable ? maOwnerPwdSet : maOwnerPwdUnset ); + if( bIsPDFASel ) + maFtOwnerPwd.SetText( maOwnerPwdPdfa ); + else + maFtOwnerPwd.SetText( bLocalEnable ? maOwnerPwdSet : maOwnerPwdUnset ); maFlPrintPermissions.Enable( bLocalEnable ); maRbPrintNone.Enable( bLocalEnable ); @@ -1474,28 +1508,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 +1580,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.hrc b/filter/source/pdf/impdialog.hrc index dccdc2cad11b..0946fe3197f8 100644 --- a/filter/source/pdf/impdialog.hrc +++ b/filter/source/pdf/impdialog.hrc @@ -33,6 +33,8 @@ #define RID_PDF_TAB_OPNFTR (RID_PDF_DIALOG_START + 3) #define RID_PDF_TAB_SECURITY (RID_PDF_DIALOG_START + 4) #define RID_PDF_TAB_LINKS (RID_PDF_DIALOG_START + 12) +#define RID_PDF_WARNPDFAPASSWORD (RID_PDF_DIALOG_START + 6) + //strings #define STR_PDF_EXPORT (RID_PDF_DIALOG_START + 5) @@ -152,12 +154,14 @@ #define STR_USER_PWD_UNSET 124 #define STR_USER_PWD_UNENC 125 #define STR_SET_PWD 126 +#define STR_USER_PWD_PDFA 127 #define FT_OWNER_PWD 128 #define STR_OWNER_PWD_SET 129 #define STR_OWNER_PWD_REST 130 #define STR_OWNER_PWD_UNSET 131 #define STR_OWNER_PWD_UNREST 132 +#define STR_OWNER_PWD_PDFA 133 #define FL_PRINT_PERMISSIONS 133 #define RB_PRINT_NONE 134 diff --git a/filter/source/pdf/impdialog.hxx b/filter/source/pdf/impdialog.hxx index 3fd98c775e0d..9daa0391f6b7 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(); }; @@ -321,11 +321,13 @@ class ImpPDFTabSecurityPage : public SfxTabPage FixedText maFtUserPwd; String maUserPwdSet; String maUserPwdUnset; + String maUserPwdPdfa; String maStrSetPwd; FixedText maFtOwnerPwd; String maOwnerPwdSet; String maOwnerPwdUnset; + String maOwnerPwdPdfa; FixedLine maFlPrintPermissions; RadioButton maRbPrintNone; @@ -370,6 +372,7 @@ public: void GetFilterConfigItem( ImpPDFTabDialog* paParent); void SetFilterConfigItem( const ImpPDFTabDialog* paParent ); void ImplPDFASecurityControl( sal_Bool bEnableSecurity ); + bool hasPassword() const { return mbHaveOwnerPassword || mbHaveUserPassword; } }; //class to implement the relative link stuff diff --git a/filter/source/pdf/impdialog.src b/filter/source/pdf/impdialog.src index 1c941d6a9972..35cfa93dd854 100644 --- a/filter/source/pdf/impdialog.src +++ b/filter/source/pdf/impdialog.src @@ -265,6 +265,12 @@ TabPage RID_PDF_TAB_GENER }; }; +WarningBox RID_PDF_WARNPDFAPASSWORD +{ + Title[en-US] = "PDF/A Export"; + Message[ en-US ] = "PDF/A does not allow encryption. The exported PDF file will not be password protected."; +}; + //---------------------------------------------------------- //tab page for PDF Export, opening features TabPage RID_PDF_TAB_OPNFTR @@ -607,6 +613,11 @@ TabPage RID_PDF_TAB_SECURITY Text [ en-US ] = "PDF document will not be encrypted"; }; + String STR_USER_PWD_PDFA + { + Text [en-US] = "PDF doument will not be encrypted due to PDF/A export."; + }; + FixedText FT_OWNER_PWD { Pos = MAP_APPFONT( 12 , 65 ); @@ -633,6 +644,11 @@ TabPage RID_PDF_TAB_SECURITY Text [ en-US ] = "PDF document will be unrestricted"; }; + String STR_OWNER_PWD_PDFA + { + Text [en-US] = "PDF doument will not be restricted due to PDF/A export."; + }; + ////////////////////////////// FixedLine FL_PRINT_PERMISSIONS { diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx index 382dd12eeb83..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 ); @@ -819,7 +819,7 @@ sal_Bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue pPDFExtOutDevData->SetIsReduceImageResolution( mbReduceImageResolution ); pPDFExtOutDevData->SetIsExportNamedDestinations( mbExportBmkToDest ); - Sequence< PropertyValue > aRenderOptions( 5 ); + Sequence< PropertyValue > aRenderOptions( 6 ); aRenderOptions[ 0 ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "RenderDevice" ) ); aRenderOptions[ 0 ].Value <<= Reference< awt::XDevice >( pXDevice ); aRenderOptions[ 1 ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportNotesPages" ) ); @@ -831,12 +831,8 @@ sal_Bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue aRenderOptions[ 3 ].Value <<= sal_False; aRenderOptions[ 4 ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "IsSkipEmptyPages" ) ); aRenderOptions[ 4 ].Value <<= mbSkipEmptyPages; - #if 0 - // #i113919# writer has to begun "PageRange" for itself changing its renderer count - // we should unify this behavior but not for OOo 3.3 aRenderOptions[ 5 ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "PageRange" ) ); aRenderOptions[ 5 ].Value <<= aPageRange; - #endif if( aPageRange.getLength() || !aSelection.hasValue() ) { @@ -905,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..3b2a3806e1b6 100644 --- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx +++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx @@ -91,6 +91,8 @@ XMLFilterSettingsDialog::XMLFilterSettingsDialog( Window* pParent, ResMgr& rResM mpFilterListBox->SetSelectHdl( LINK( this, XMLFilterSettingsDialog, SelectionChangedHdl_Impl ) ); mpFilterListBox->SetDeselectHdl( LINK( this, XMLFilterSettingsDialog, SelectionChangedHdl_Impl ) ); mpFilterListBox->SetDoubleClickHdl( LINK( this, XMLFilterSettingsDialog, DoubleClickHdl_Impl ) ); + mpFilterListBox->SetAccessibleName(String( RESID( STR_XML_FILTER_LISTBOX ))); + maCtrlFilterList.SetAccessibleName(String( RESID( STR_XML_FILTER_LISTBOX ))); mpFilterListBox->SetHelpId( HID_XML_FILTER_LIST ); maPBNew.SetClickHdl(LINK( this, XMLFilterSettingsDialog, ClickHdl_Impl ) ); @@ -197,7 +199,7 @@ void XMLFilterSettingsDialog::ShowWindow() updateStates(); mpFilterListBox->Reset(); - WorkWindow::Show( TRUE ); + WorkWindow::Show( sal_True ); } // ----------------------------------------------------------------------- @@ -1049,12 +1051,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 +1495,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 +1526,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 +1536,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 +1560,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/xmlfiltersettingsdialog.hrc b/filter/source/xsltdialog/xmlfiltersettingsdialog.hrc index 48ed1a2a4ee7..d611e2d1a824 100644 --- a/filter/source/xsltdialog/xmlfiltersettingsdialog.hrc +++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.hrc @@ -39,5 +39,5 @@ #define PB_XML_FILTER_OPEN 7 #define BTN_XML_FILTER_HELP 8 #define PB_XML_FILTER_CLOSE 9 - +#define STR_XML_FILTER_LISTBOX 10 #endif diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.src b/filter/source/xsltdialog/xmlfiltersettingsdialog.src index b80dff3bfe50..deb15d18627d 100644 --- a/filter/source/xsltdialog/xmlfiltersettingsdialog.src +++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.src @@ -126,6 +126,11 @@ WorkWindow DLG_XML_FILTER_SETTINGS_DIALOG }; +String STR_XML_FILTER_LISTBOX +{ + Text [ en-US ] = "XML Filter List"; +}; + 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; } diff --git a/oox/inc/oox/drawingml/chart/axismodel.hxx b/oox/inc/oox/drawingml/chart/axismodel.hxx index 23dc96037427..0ce24d6ff515 100644 --- a/oox/inc/oox/drawingml/chart/axismodel.hxx +++ b/oox/inc/oox/drawingml/chart/axismodel.hxx @@ -77,9 +77,9 @@ struct AxisModel OptValue< double > mofLogBase; /// Logarithmic base for logarithmic axes. OptValue< double > mofMax; /// Maximum axis value. OptValue< double > mofMin; /// Minimum axis value. + OptValue< sal_Int32 > monBaseTimeUnit; /// Base time unit shown on a date axis. sal_Int32 mnAxisId; /// Unique axis identifier. sal_Int32 mnAxisPos; /// Position of the axis (top/bottom/left/right). - sal_Int32 mnBaseTimeUnit; /// Base time unit shown on a date axis. sal_Int32 mnCrossAxisId; /// Identifier of a crossing axis. sal_Int32 mnCrossBetween; /// This value axis crosses between or inside category. sal_Int32 mnCrossMode; /// Mode this axis crosses another axis (min, max, auto). @@ -94,7 +94,7 @@ struct AxisModel sal_Int32 mnTickLabelSkip; /// Number of tick mark labels to skip. sal_Int32 mnTickMarkSkip; /// Number of tick marks to skip. sal_Int32 mnTypeId; /// Type identifier of this axis. - bool mbAuto; /// True = automatic axis settings. + bool mbAuto; /// True = automatic selection of text/date axis type. bool mbDeleted; /// True = axis has been deleted manually. bool mbNoMultiLevel; /// True = no multi-level categories supported. diff --git a/oox/inc/oox/drawingml/chart/chartspacemodel.hxx b/oox/inc/oox/drawingml/chart/chartspacemodel.hxx index 37c39e315e3e..79390c8b8022 100644 --- a/oox/inc/oox/drawingml/chart/chartspacemodel.hxx +++ b/oox/inc/oox/drawingml/chart/chartspacemodel.hxx @@ -63,6 +63,7 @@ struct ChartSpaceModel bool mbAutoTitleDel; /// True = automatic title deleted manually. bool mbPlotVisOnly; /// True = plot visible cells in a sheet only. bool mbShowLabelsOverMax;/// True = show labels over chart maximum. + bool mbPivotChart; /// True = pivot chart. explicit ChartSpaceModel(); ~ChartSpaceModel(); diff --git a/oox/inc/oox/drawingml/chart/converterbase.hxx b/oox/inc/oox/drawingml/chart/converterbase.hxx index 95affa5eb643..c174dc40505a 100644 --- a/oox/inc/oox/drawingml/chart/converterbase.hxx +++ b/oox/inc/oox/drawingml/chart/converterbase.hxx @@ -137,9 +137,10 @@ public: OOXML layout model. Returns true, if returned rectangle is valid. */ bool calcAbsRectangle( ::com::sun::star::awt::Rectangle& orRect ) const; - /** Tries to set the position from the contained OOXML layout model. - Returns true, if a manual position could be calculated. */ + /** Tries to set the position and size from the contained OOXML layout model. + Returns true, if a manual position and size could be calculated. */ bool convertFromModel( PropertySet& rPropSet ); + /** Tries to set the position from the contained OOXML layout model. Returns true, if a manual position could be calculated. */ bool convertFromModel( diff --git a/oox/inc/oox/xls/biffhelper.hxx b/oox/inc/oox/xls/biffhelper.hxx index 9fbeee937f29..7c34fc346010 100644 --- a/oox/inc/oox/xls/biffhelper.hxx +++ b/oox/inc/oox/xls/biffhelper.hxx @@ -303,6 +303,7 @@ const sal_uInt16 BIFF_ID_CHCHART = 0x1002; const sal_uInt16 BIFF_ID_CHCHART3D = 0x103A; const sal_uInt16 BIFF_ID_CHCHARTLINE = 0x101C; const sal_uInt16 BIFF_ID_CHDATAFORMAT = 0x1006; +const sal_uInt16 BIFF_ID_CHDATERANGE = 0x1062; const sal_uInt16 BIFF_ID_CHDEFAULTTEXT = 0x1024; const sal_uInt16 BIFF_ID_CHDROPBAR = 0x103D; const sal_uInt16 BIFF_ID_CHECKCOMPAT = 0x088C; @@ -327,7 +328,6 @@ const sal_uInt16 BIFF_ID_CHFRTEXTPROPS = 0x08A5; const sal_uInt16 BIFF_ID_CHFRUNITPROPS = 0x0857; const sal_uInt16 BIFF_ID_CHFRWRAPPER = 0x0851; const sal_uInt16 BIFF_ID_CHLABELRANGE = 0x1020; -const sal_uInt16 BIFF_ID_CHLABELRANGE2 = 0x1062; const sal_uInt16 BIFF_ID_CHLEGEND = 0x1015; const sal_uInt16 BIFF_ID_CHLINE = 0x1018; const sal_uInt16 BIFF_ID_CHLINEFORMAT = 0x1007; diff --git a/oox/source/drawingml/chart/axiscontext.cxx b/oox/source/drawingml/chart/axiscontext.cxx index cfcdd3ff0754..e590bf1c64cb 100644 --- a/oox/source/drawingml/chart/axiscontext.cxx +++ b/oox/source/drawingml/chart/axiscontext.cxx @@ -237,7 +237,7 @@ ContextHandlerRef DateAxisContext::onCreateContext( sal_Int32 nElement, const At mrModel.mbAuto = rAttribs.getBool( XML_val, false ); return 0; case C_TOKEN( baseTimeUnit ): - mrModel.mnBaseTimeUnit = rAttribs.getToken( XML_val, XML_days ); + mrModel.monBaseTimeUnit = rAttribs.getToken( XML_val, XML_days ); return 0; case C_TOKEN( lblOffset ): mrModel.mnLabelOffset = rAttribs.getInteger( XML_val, 100 ); diff --git a/oox/source/drawingml/chart/axisconverter.cxx b/oox/source/drawingml/chart/axisconverter.cxx index 028fc3d19eb1..18dc00b9d866 100644 --- a/oox/source/drawingml/chart/axisconverter.cxx +++ b/oox/source/drawingml/chart/axisconverter.cxx @@ -31,6 +31,8 @@ #include <com/sun/star/chart/ChartAxisLabelPosition.hpp> #include <com/sun/star/chart/ChartAxisMarkPosition.hpp> #include <com/sun/star/chart/ChartAxisPosition.hpp> +#include <com/sun/star/chart/TimeInterval.hpp> +#include <com/sun/star/chart/TimeUnit.hpp> #include <com/sun/star/chart2/AxisType.hpp> #include <com/sun/star/chart2/TickmarkStyle.hpp> #include <com/sun/star/chart2/XAxis.hpp> @@ -57,23 +59,35 @@ using ::rtl::OUString; namespace { -template< typename Type > -inline void lclSetValueOrClearAny( Any& orAny, const OptValue< Type >& roValue ) +inline void lclSetValueOrClearAny( Any& orAny, const OptValue< double >& rofValue ) { - if( roValue.has() ) orAny <<= roValue.get(); else orAny.clear(); + if( rofValue.has() ) orAny <<= rofValue.get(); else orAny.clear(); } -void lclSetScaledValueOrClearAny( Any& orAny, const OptValue< double >& rofValue, const Reference< XScaling >& rxScaling ) +bool lclIsLogarithmicScale( const AxisModel& rAxisModel ) { - if( rofValue.has() && rxScaling.is() ) - orAny <<= rxScaling->doScaling( rofValue.get() ); - else - lclSetValueOrClearAny( orAny, rofValue ); + return rAxisModel.mofLogBase.has() && (2.0 <= rAxisModel.mofLogBase.get()) && (rAxisModel.mofLogBase.get() <= 1000.0); } -bool lclIsLogarithmicScale( const AxisModel& rAxisModel ) +sal_Int32 lclGetApiTimeUnit( sal_Int32 nTimeUnit ) { - return rAxisModel.mofLogBase.has() && (2.0 <= rAxisModel.mofLogBase.get()) && (rAxisModel.mofLogBase.get() <= 1000.0); + using namespace ::com::sun::star::chart; + switch( nTimeUnit ) + { + case XML_days: return TimeUnit::DAY; + case XML_months: return TimeUnit::MONTH; + case XML_years: return TimeUnit::YEAR; + default: OSL_ENSURE( false, "lclGetApiTimeUnit - unexpected time unit" ); + } + return TimeUnit::DAY; +} + +void lclConvertTimeInterval( Any& orInterval, const OptValue< double >& rofUnit, sal_Int32 nTimeUnit ) +{ + if( rofUnit.has() && (1.0 <= rofUnit.get()) && (rofUnit.get() <= SAL_MAX_INT32) ) + orInterval <<= ::com::sun::star::chart::TimeInterval( static_cast< sal_Int32 >( rofUnit.get() ), lclGetApiTimeUnit( nTimeUnit ) ); + else + orInterval.clear(); } ::com::sun::star::chart::ChartAxisLabelPosition lclGetLabelPosition( sal_Int32 nToken ) @@ -175,8 +189,13 @@ void AxisConverter::convertFromModel( const Reference< XCoordinateSystem >& rxCo if( rTypeInfo.mbCategoryAxis ) { OSL_ENSURE( (mrModel.mnTypeId == C_TOKEN( catAx )) || (mrModel.mnTypeId == C_TOKEN( dateAx )), - "AxisConverter::convertFromModel - unexpected axis model type (must: c:catAx or c:dateEx)" ); - aScaleData.AxisType = cssc2::AxisType::CATEGORY; + "AxisConverter::convertFromModel - unexpected axis model type (must: c:catAx or c:dateAx)" ); + bool bDateAxis = mrModel.mnTypeId == C_TOKEN( dateAx ); + /* Chart2 requires axis type CATEGORY for automatic + category/date axis (even if it is a date axis + currently). */ + aScaleData.AxisType = (bDateAxis && !mrModel.mbAuto) ? cssc2::AxisType::DATE : cssc2::AxisType::CATEGORY; + aScaleData.AutoDateAxis = mrModel.mbAuto; aScaleData.Categories = rTypeGroup.createCategorySequence(); } else @@ -202,14 +221,37 @@ void AxisConverter::convertFromModel( const Reference< XCoordinateSystem >& rxCo { case cssc2::AxisType::CATEGORY: case cssc2::AxisType::SERIES: + case cssc2::AxisType::DATE: { - // do not overlap text unless all labels are visible - aAxisProp.setProperty( PROP_TextOverlap, mrModel.mnTickLabelSkip == 1 ); - // do not break text into several lines - aAxisProp.setProperty( PROP_TextBreak, false ); - // do not stagger labels in two lines - aAxisProp.setProperty( PROP_ArrangeOrder, cssc::ChartAxisArrangeOrderType_SIDE_BY_SIDE ); - //! TODO #i58731# show n-th category + /* Determine date axis type from XML type identifier, and not + via aScaleData.AxisType, as this value sticks to CATEGORY + for automatic category/date axes). */ + if( mrModel.mnTypeId == C_TOKEN( dateAx ) ) + { + // scaling algorithm + aScaleData.Scaling.set( createInstance( CREATE_OUSTRING( "com.sun.star.chart2.LinearScaling" ) ), UNO_QUERY ); + // min/max + lclSetValueOrClearAny( aScaleData.Minimum, mrModel.mofMin ); + lclSetValueOrClearAny( aScaleData.Maximum, mrModel.mofMax ); + // major/minor increment + lclConvertTimeInterval( aScaleData.TimeIncrement.MajorTimeInterval, mrModel.mofMajorUnit, mrModel.mnMajorTimeUnit ); + lclConvertTimeInterval( aScaleData.TimeIncrement.MinorTimeInterval, mrModel.mofMinorUnit, mrModel.mnMinorTimeUnit ); + // base time unit + if( mrModel.monBaseTimeUnit.has() ) + aScaleData.TimeIncrement.TimeResolution <<= lclGetApiTimeUnit( mrModel.monBaseTimeUnit.get() ); + else + aScaleData.TimeIncrement.TimeResolution.clear(); + } + else + { + // do not overlap text unless all labels are visible + aAxisProp.setProperty( PROP_TextOverlap, mrModel.mnTickLabelSkip == 1 ); + // do not break text into several lines + aAxisProp.setProperty( PROP_TextBreak, false ); + // do not stagger labels in two lines + aAxisProp.setProperty( PROP_ArrangeOrder, cssc::ChartAxisArrangeOrderType_SIDE_BY_SIDE ); + //! TODO #i58731# show n-th category + } } break; case cssc2::AxisType::REALNUMBER: @@ -226,26 +268,25 @@ void AxisConverter::convertFromModel( const Reference< XCoordinateSystem >& rxCo lclSetValueOrClearAny( aScaleData.Maximum, mrModel.mofMax ); // major increment IncrementData& rIncrementData = aScaleData.IncrementData; - lclSetScaledValueOrClearAny( rIncrementData.Distance, mrModel.mofMajorUnit, aScaleData.Scaling ); + if( mrModel.mofMajorUnit.has() && aScaleData.Scaling.is() ) + rIncrementData.Distance <<= aScaleData.Scaling->doScaling( mrModel.mofMajorUnit.get() ); + else + lclSetValueOrClearAny( rIncrementData.Distance, mrModel.mofMajorUnit ); // minor increment Sequence< SubIncrement >& rSubIncrementSeq = rIncrementData.SubIncrements; rSubIncrementSeq.realloc( 1 ); Any& rIntervalCount = rSubIncrementSeq[ 0 ].IntervalCount; + rIntervalCount.clear(); if( bLogScale ) { if( mrModel.mofMinorUnit.has() ) rIntervalCount <<= sal_Int32( 9 ); } - else + else if( mrModel.mofMajorUnit.has() && mrModel.mofMinorUnit.has() && (0.0 < mrModel.mofMinorUnit.get()) && (mrModel.mofMinorUnit.get() <= mrModel.mofMajorUnit.get()) ) { - OptValue< sal_Int32 > onCount; - if( mrModel.mofMajorUnit.has() && mrModel.mofMinorUnit.has() && (0.0 < mrModel.mofMinorUnit.get()) && (mrModel.mofMinorUnit.get() <= mrModel.mofMajorUnit.get()) ) - { - double fCount = mrModel.mofMajorUnit.get() / mrModel.mofMinorUnit.get() + 0.5; - if( (1.0 <= fCount) && (fCount < 1001.0) ) - onCount = static_cast< sal_Int32 >( fCount ); - } - lclSetValueOrClearAny( rIntervalCount, onCount ); + double fCount = mrModel.mofMajorUnit.get() / mrModel.mofMinorUnit.get() + 0.5; + if( (1.0 <= fCount) && (fCount < 1001.0) ) + rIntervalCount <<= static_cast< sal_Int32 >( fCount ); } } break; diff --git a/oox/source/drawingml/chart/axismodel.cxx b/oox/source/drawingml/chart/axismodel.cxx index 8736e8f6dcd5..c1bec6c1e1be 100644 --- a/oox/source/drawingml/chart/axismodel.cxx +++ b/oox/source/drawingml/chart/axismodel.cxx @@ -48,7 +48,6 @@ AxisDispUnitsModel::~AxisDispUnitsModel() AxisModel::AxisModel( sal_Int32 nTypeId ) : mnAxisId( -1 ), mnAxisPos( XML_TOKEN_INVALID ), - mnBaseTimeUnit( XML_days ), mnCrossAxisId( -1 ), mnCrossBetween( XML_between ), mnCrossMode( XML_autoZero ), diff --git a/oox/source/drawingml/chart/chartspaceconverter.cxx b/oox/source/drawingml/chart/chartspaceconverter.cxx index b16ac91e09c9..bfcad1b43d04 100644 --- a/oox/source/drawingml/chart/chartspaceconverter.cxx +++ b/oox/source/drawingml/chart/chartspaceconverter.cxx @@ -40,6 +40,21 @@ #include "oox/drawingml/chart/plotareaconverter.hxx" #include "oox/drawingml/chart/titleconverter.hxx" +using ::rtl::OUString; +using ::com::sun::star::awt::Point; +using ::com::sun::star::uno::Reference; +using ::com::sun::star::uno::Exception; +using ::com::sun::star::uno::UNO_QUERY; +using ::com::sun::star::uno::UNO_QUERY_THROW; +using ::com::sun::star::uno::makeAny; +using ::com::sun::star::util::XNumberFormatsSupplier; +using ::com::sun::star::drawing::XDrawPageSupplier; +using ::com::sun::star::drawing::XShapes; +using ::com::sun::star::chart2::XDiagram; +using ::com::sun::star::chart2::XTitled; +using ::com::sun::star::chart2::data::XDataReceiver; +using ::com::sun::star::beans::XPropertySet; + namespace oox { namespace drawingml { namespace chart { @@ -197,6 +212,14 @@ void ChartSpaceConverter::convertFromModel( const Reference< XShapes >& rxExtern catch( Exception& ) { } + + // pivot chart + if ( mrModel.mbPivotChart ) + { + PropertySet aProps( getChartDocument() ); + aProps.setProperty( PROP_DisableDataTableDialog , true ); + aProps.setProperty( PROP_DisableComplexChartTypes , true ); + } } // ============================================================================ diff --git a/oox/source/drawingml/chart/chartspacefragment.cxx b/oox/source/drawingml/chart/chartspacefragment.cxx index d4b4a66f361f..06da27c02d01 100644 --- a/oox/source/drawingml/chart/chartspacefragment.cxx +++ b/oox/source/drawingml/chart/chartspacefragment.cxx @@ -81,6 +81,9 @@ ContextHandlerRef ChartSpaceFragment::onCreateContext( sal_Int32 nElement, const case C_TOKEN( userShapes ): mrModel.maDrawingPath = getFragmentPathFromRelId( rAttribs.getString( R_TOKEN( id ), OUString() ) ); return 0; + case C_TOKEN( pivotSource ): + mrModel.mbPivotChart = true; + return 0; } break; diff --git a/oox/source/drawingml/chart/chartspacemodel.cxx b/oox/source/drawingml/chart/chartspacemodel.cxx index 3e2253a2ffc1..7f86448c8d08 100644 --- a/oox/source/drawingml/chart/chartspacemodel.cxx +++ b/oox/source/drawingml/chart/chartspacemodel.cxx @@ -38,7 +38,8 @@ ChartSpaceModel::ChartSpaceModel() : mnStyle( 2 ), mbAutoTitleDel( false ), mbPlotVisOnly( false ), - mbShowLabelsOverMax( false ) + mbShowLabelsOverMax( false ), + mbPivotChart( false ) { } diff --git a/oox/source/drawingml/chart/converterbase.cxx b/oox/source/drawingml/chart/converterbase.cxx index df4d40e952ac..7e601ff016af 100644 --- a/oox/source/drawingml/chart/converterbase.cxx +++ b/oox/source/drawingml/chart/converterbase.cxx @@ -33,6 +33,7 @@ #include <com/sun/star/chart/XChartDocument.hpp> #include <com/sun/star/chart/XSecondAxisTitleSupplier.hpp> #include <com/sun/star/chart2/RelativePosition.hpp> +#include <com/sun/star/chart2/RelativeSize.hpp> #include <com/sun/star/drawing/FillStyle.hpp> #include <com/sun/star/drawing/LineStyle.hpp> #include <com/sun/star/frame/XModel.hpp> @@ -78,8 +79,7 @@ struct TitleLayoutInfo { typedef Reference< XShape > (*GetShapeFunc)( const Reference< cssc::XChartDocument >& ); - ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XTitle > - mxTitle; /// The API title object. + Reference< XTitle > mxTitle; /// The API title object. ModelRef< LayoutModel > mxLayout; /// The layout model, if existing. GetShapeFunc mpGetShape; /// Helper function to receive the title shape. @@ -323,9 +323,9 @@ sal_Int32 lclCalcSize( sal_Int32 nPos, sal_Int32 nChartSize, double fSize, sal_I sal_Int32 nValue = getLimitedValue< sal_Int32, double >( nChartSize * fSize + 0.5, 0, nChartSize ); switch( nSizeMode ) { - case XML_factor: // size as factor of chart size + case XML_factor: // passed value is width/height return nValue; - case XML_edge: // absolute end position as factor of chart size + case XML_edge: // passed value is right/bottom position return nValue - nPos + 1; }; @@ -333,6 +333,23 @@ sal_Int32 lclCalcSize( sal_Int32 nPos, sal_Int32 nChartSize, double fSize, sal_I return -1; } +/** Returns a relative size value in the chart area. */ +double lclCalcRelSize( double fPos, double fSize, sal_Int32 nSizeMode ) +{ + switch( nSizeMode ) + { + case XML_factor: // passed value is width/height + break; + case XML_edge: // passed value is right/bottom position + fSize -= fPos; + break; + default: + OSL_ENSURE( false, "lclCalcRelSize - unknown size mode" ); + fSize = 0.0; + }; + return getLimitedValue< double, double >( fSize, 0.0, 1.0 - fPos ); +} + } // namespace // ---------------------------------------------------------------------------- @@ -369,12 +386,20 @@ bool LayoutConverter::convertFromModel( PropertySet& rPropSet ) (mrModel.mnXMode == XML_edge) && (mrModel.mfX >= 0.0) && (mrModel.mnYMode == XML_edge) && (mrModel.mfY >= 0.0) ) { - RelativePosition aPos; - aPos.Primary = getLimitedValue< double, double >( mrModel.mfX, 0.0, 1.0 ); - aPos.Secondary = getLimitedValue< double, double >( mrModel.mfY, 0.0, 1.0 ); - aPos.Anchor = ::com::sun::star::drawing::Alignment_TOP_LEFT; + RelativePosition aPos( + getLimitedValue< double, double >( mrModel.mfX, 0.0, 1.0 ), + getLimitedValue< double, double >( mrModel.mfY, 0.0, 1.0 ), + Alignment_TOP_LEFT ); rPropSet.setProperty( PROP_RelativePosition, aPos ); - return true; + + RelativeSize aSize( + lclCalcRelSize( aPos.Primary, mrModel.mfW, mrModel.mnWMode ), + lclCalcRelSize( aPos.Secondary, mrModel.mfH, mrModel.mnHMode ) ); + if( (aSize.Primary > 0.0) && (aSize.Secondary > 0.0) ) + { + rPropSet.setProperty( PROP_RelativeSize, aSize ); + return true; + } } return false; } diff --git a/oox/source/drawingml/chart/titleconverter.cxx b/oox/source/drawingml/chart/titleconverter.cxx index fdc4969f7c5e..8163241e5a31 100644 --- a/oox/source/drawingml/chart/titleconverter.cxx +++ b/oox/source/drawingml/chart/titleconverter.cxx @@ -27,7 +27,7 @@ #include "oox/drawingml/chart/titleconverter.hxx" -#include <com/sun/star/chart2/LegendExpansion.hpp> +#include <com/sun/star/chart/ChartLegendExpansion.hpp> #include <com/sun/star/chart2/LegendPosition.hpp> #include <com/sun/star/chart2/XDiagram.hpp> #include <com/sun/star/chart2/XFormattedString.hpp> @@ -198,6 +198,7 @@ void LegendConverter::convertFromModel( const Reference< XDiagram >& rxDiagram ) { if( rxDiagram.is() ) try { + namespace cssc = ::com::sun::star::chart; namespace cssc2 = ::com::sun::star::chart2; // create the legend @@ -211,46 +212,35 @@ void LegendConverter::convertFromModel( const Reference< XDiagram >& rxDiagram ) // predefined legend position and expansion cssc2::LegendPosition eLegendPos = cssc2::LegendPosition_CUSTOM; - cssc2::LegendExpansion eLegendExpand = cssc2::LegendExpansion_HIGH; + cssc::ChartLegendExpansion eLegendExpand = cssc::ChartLegendExpansion_CUSTOM; switch( mrModel.mnPosition ) { case XML_l: eLegendPos = cssc2::LegendPosition_LINE_START; - eLegendExpand = cssc2::LegendExpansion_HIGH; + eLegendExpand = cssc::ChartLegendExpansion_HIGH; break; case XML_r: + case XML_tr: // top-right not supported eLegendPos = cssc2::LegendPosition_LINE_END; - eLegendExpand = cssc2::LegendExpansion_HIGH; + eLegendExpand = cssc::ChartLegendExpansion_HIGH; break; case XML_t: eLegendPos = cssc2::LegendPosition_PAGE_START; - eLegendExpand = cssc2::LegendExpansion_WIDE; + eLegendExpand = cssc::ChartLegendExpansion_WIDE; break; case XML_b: eLegendPos = cssc2::LegendPosition_PAGE_END; - eLegendExpand = cssc2::LegendExpansion_WIDE; - break; - case XML_tr: - eLegendPos = cssc2::LegendPosition_LINE_END; // top-right not supported - eLegendExpand = cssc2::LegendExpansion_HIGH; + eLegendExpand = cssc::ChartLegendExpansion_WIDE; break; } - // manual positioning - LayoutModel& rLayout = mrModel.mxLayout.getOrCreate(); - LayoutConverter aLayoutConv( *this, rLayout ); - aLayoutConv.convertFromModel( aPropSet ); - Rectangle aLegendRect; - if( aLayoutConv.calcAbsRectangle( aLegendRect ) ) + // manual positioning and size + if( mrModel.mxLayout.get() ) { - // #i71697# it is not possible to set the size directly, do some magic here - double fRatio = static_cast< double >( aLegendRect.Width ) / aLegendRect.Height; - if( fRatio > 1.5 ) - eLegendExpand = cssc2::LegendExpansion_WIDE; - else if( fRatio < 0.75 ) - eLegendExpand = cssc2::LegendExpansion_HIGH; - else - eLegendExpand = cssc2::LegendExpansion_BALANCED; + LayoutConverter aLayoutConv( *this, *mrModel.mxLayout ); + // manual size needs ChartLegendExpansion_CUSTOM + if( aLayoutConv.convertFromModel( aPropSet ) ) + eLegendExpand = cssc::ChartLegendExpansion_CUSTOM; } // set position and expansion properties diff --git a/oox/source/dump/biffdumper.cxx b/oox/source/dump/biffdumper.cxx index 54e1fad7febc..7974a66ba250 100644 --- a/oox/source/dump/biffdumper.cxx +++ b/oox/source/dump/biffdumper.cxx @@ -1755,6 +1755,18 @@ void WorkbookStreamObject::implDumpRecordBody() if( eBiff >= BIFF5 ) dumpHex< sal_uInt16 >( "flags", "CHDATAFORMAT-FLAGS" ); break; + case BIFF_ID_CHDATERANGE: + dumpDec< sal_uInt16 >( "minimum-date" ); + dumpDec< sal_uInt16 >( "maximum-date" ); + dumpDec< sal_uInt16 >( "major-unit-value" ); + dumpDec< sal_uInt16 >( "major-unit", "CHDATERANGE-UNIT" ); + dumpDec< sal_uInt16 >( "minor-unit-value" ); + dumpDec< sal_uInt16 >( "minor-unit", "CHDATERANGE-UNIT" ); + dumpDec< sal_uInt16 >( "base-unit", "CHDATERANGE-UNIT" ); + dumpDec< sal_uInt16 >( "axis-crossing-date" ); + dumpHex< sal_uInt16 >( "flags", "CHDATERANGE-FLAGS" ); + break; + case BIFF_ID_CHECKCOMPAT: dumpFrHeader( true, true ); dumpBool< sal_uInt32 >( "check-compatibility" ); @@ -1884,18 +1896,6 @@ void WorkbookStreamObject::implDumpRecordBody() dumpHex< sal_uInt16 >( "flags", "CHLABELRANGE-FLAGS" ); break; - case BIFF_ID_CHLABELRANGE2: - dumpDec< sal_uInt16 >( "minimum-categ" ); - dumpDec< sal_uInt16 >( "maximum-categ" ); - dumpDec< sal_uInt16 >( "major-unit-value" ); - dumpDec< sal_uInt16 >( "major-unit" ); - dumpDec< sal_uInt16 >( "minor-unit-value" ); - dumpDec< sal_uInt16 >( "minor-unit" ); - dumpDec< sal_uInt16 >( "base-unit" ); - dumpDec< sal_uInt16 >( "axis-crossing-date" ); - dumpHex< sal_uInt16 >( "flags", "CHLABELRANGE2-FLAGS" ); - break; - case BIFF_ID_CHLEGEND: dumpRect< sal_Int32 >( "position", (eBiff <= BIFF4) ? "CONV-TWIP-TO-CM" : "" ); dumpDec< sal_uInt8 >( "docked-pos", "CHLEGEND-DOCKPOS" ); diff --git a/oox/source/dump/biffdumper.ini b/oox/source/dump/biffdumper.ini index c4bbe79a2612..02f70261ee0d 100644 --- a/oox/source/dump/biffdumper.ini +++ b/oox/source/dump/biffdumper.ini @@ -397,7 +397,7 @@ multilist=RECORD-NAMES-BIFF8 0x08A0=,,,FORCEFULLCALC,CHFRSHAPEPROPS,CHFRTEXTPROPS,,CHFRPLOTAREALAYOUT # chart records 0x1058=,,,,,,,CH3DDATAFORMAT - 0x1060=CHFONTBASE,CHPIEEXT,CHLABELRANGE2,CHDATATABLE,CHPLOTGROWTH,CHSERINDEX,CHESCHERFORMAT,CHPIEEXTSETT + 0x1060=CHFONTBASE,CHPIEEXT,CHDATERANGE,CHDATATABLE,CHPLOTGROWTH,CHSERINDEX,CHESCHERFORMAT,CHPIEEXTSETT end # simple records ------------------------------------------------------------- @@ -821,6 +821,21 @@ flagslist=CHDATAFORMAT-FLAGS 0x0001=excel4-colors end +# CHDATERANGE ---------------------------------------------------------------- + +shortlist=CHDATERANGE-UNIT,0,days,months,years + +flagslist=CHDATERANGE-FLAGS + 0x0001=auto-minimum + 0x0002=auto-maximum + 0x0004=auto-major + 0x0008=auto-minor + 0x0010=date-axis + 0x0020=auto-base + 0x0040=auto-axis-cross + 0x0080=auto-date +end + # CHFRAME -------------------------------------------------------------------- shortlist=CHFRAME-FORMAT,0,standard,,,,shadow @@ -977,19 +992,6 @@ flagslist=CHLABELRANGE-FLAGS 0x0004=reverse-order end -# CHLABELRANGE2 -------------------------------------------------------------- - -flagslist=CHLABELRANGE2-FLAGS - 0x0001=auto-minimum - 0x0002=auto-maximum - 0x0004=auto-major - 0x0008=auto-minor - 0x0010=date-axis - 0x0020=auto-base - 0x0040=auto-axis-cross - 0x0080=auto-date -end - # CHLEGEND ------------------------------------------------------------------- shortlist=CHLEGEND-DOCKPOS,0,bottom,top-right,top,right,left,,,manual diff --git a/oox/source/helper/zipstorage.cxx b/oox/source/helper/zipstorage.cxx index fc976d8d7537..c190f39d1e43 100644 --- a/oox/source/helper/zipstorage.cxx +++ b/oox/source/helper/zipstorage.cxx @@ -62,15 +62,18 @@ ZipStorage::ZipStorage( const Reference< XComponentContext >& rxContext, const R cannot be used here as it will open a storage with format type 'PackageFormat' that will not work with OOXML packages. - #161971# The MS-document storages should always be opened in Repair-Mode to - ignore the format errors and get so much info as possible. I hate this - solution, but it seems to be the only consistent way to handle the MS-documents. + #161971# The MS-document storages should always be opened in repair + mode to ignore the format errors and get so much info as possible. + I hate this solution, but it seems to be the only consistent way to + handle the MS documents. TODO: #i105410# switch to 'OFOPXMLFormat' and use its - implementation of relations handling. */ + implementation of relations handling. + */ Reference< XMultiServiceFactory > xFactory( rxContext->getServiceManager(), UNO_QUERY_THROW ); mxStorage = ::comphelper::OStorageHelper::GetStorageOfFormatFromInputStream( - ZIP_STORAGE_FORMAT_STRING, rxInStream, xFactory, sal_True ); + ZIP_STORAGE_FORMAT_STRING, rxInStream, xFactory, + sal_False ); // DEV300_m80: Was sal_True, but DOCX and others did not load } catch( Exception& ) { diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt index 6067892e9440..553af0d723f8 100644 --- a/oox/source/token/properties.txt +++ b/oox/source/token/properties.txt @@ -120,6 +120,8 @@ DefaultValue DiagonalBLTR DiagonalTLBR DialogLibraries +DisableComplexChartTypes +DisableDataTableDialog DisplayLabels DrillDownOnDoubleClick Dropdown @@ -351,6 +353,7 @@ RegularExpressions RelId RelativeHorizontalTabbarWidth RelativePosition +RelativeSize Repeat RepeatDelay Representation diff --git a/writerfilter/inc/dmapper/DomainMapper.hxx b/writerfilter/inc/dmapper/DomainMapper.hxx index 99602ceab924..d7f6c005a5c4 100644 --- a/writerfilter/inc/dmapper/DomainMapper.hxx +++ b/writerfilter/inc/dmapper/DomainMapper.hxx @@ -28,7 +28,7 @@ #define INCLUDED_DOMAINMAPPER_HXX #include <WriterFilterDllApi.hxx> -#include <resourcemodel/WW8ResourceModel.hxx> +#include <resourcemodel/LoggedResources.hxx> #include <com/sun/star/lang/XComponent.hpp> #include <com/sun/star/text/FontEmphasis.hpp> #include <com/sun/star/style/TabAlign.hpp> @@ -77,8 +77,8 @@ enum SourceDocumentType DOCUMENT_OOXML, DOCUMENT_RTF }; -class WRITERFILTER_DLLPUBLIC DomainMapper : public Properties, public Table, - public BinaryObj, public Stream +class WRITERFILTER_DLLPUBLIC DomainMapper : public LoggedProperties, public LoggedTable, + public BinaryObj, public LoggedStream { DomainMapper_Impl *m_pImpl; @@ -89,38 +89,14 @@ public: SourceDocumentType eDocumentType ); virtual ~DomainMapper(); - // Properties - virtual void attribute(Id Name, Value & val); - virtual void sprm(Sprm & sprm); - - // Table - virtual void entry(int pos, writerfilter::Reference<Properties>::Pointer_t ref); + // Stream + virtual void markLastParagraphInSection(); // BinaryObj virtual void data(const sal_uInt8* buf, size_t len, writerfilter::Reference<Properties>::Pointer_t ref); - // Stream - virtual void startSectionGroup(); - virtual void endSectionGroup(); - virtual void startParagraphGroup(); - virtual void endParagraphGroup(); - virtual void markLastParagraphInSection(); - virtual void startCharacterGroup(); - virtual void endCharacterGroup(); - virtual void startShape( ::com::sun::star::uno::Reference< com::sun::star::drawing::XShape > xShape ); - virtual void endShape( ); - - virtual void text(const sal_uInt8 * data, size_t len); - virtual void utext(const sal_uInt8 * data, size_t len); - virtual void props(writerfilter::Reference<Properties>::Pointer_t ref); - virtual void table(Id name, - writerfilter::Reference<Table>::Pointer_t ref); - virtual void substream(Id name, - ::writerfilter::Reference<Stream>::Pointer_t ref); - virtual void info(const string & info); - - void sprm( Sprm& sprm, ::boost::shared_ptr<PropertyMap> pContext, SprmType = SPRM_DEFAULT ); + void sprmWithProps( Sprm& sprm, ::boost::shared_ptr<PropertyMap> pContext, SprmType = SPRM_DEFAULT ); void PushStyleSheetProperties( ::boost::shared_ptr<PropertyMap> pStyleProperties, bool bAffectTableMngr = false ); void PopStyleSheetProperties( bool bAffectTableMngr = false ); @@ -138,6 +114,32 @@ public: boost::shared_ptr< StyleSheetTable > GetStyleSheetTable( ); private: + // Stream + virtual void lcl_startSectionGroup(); + virtual void lcl_endSectionGroup(); + virtual void lcl_startParagraphGroup(); + virtual void lcl_endParagraphGroup(); + virtual void lcl_startCharacterGroup(); + virtual void lcl_endCharacterGroup(); + virtual void lcl_startShape( ::com::sun::star::uno::Reference< com::sun::star::drawing::XShape > xShape ); + virtual void lcl_endShape( ); + + virtual void lcl_text(const sal_uInt8 * data, size_t len); + virtual void lcl_utext(const sal_uInt8 * data, size_t len); + virtual void lcl_props(writerfilter::Reference<Properties>::Pointer_t ref); + virtual void lcl_table(Id name, + writerfilter::Reference<Table>::Pointer_t ref); + virtual void lcl_substream(Id name, + ::writerfilter::Reference<Stream>::Pointer_t ref); + virtual void lcl_info(const string & info); + + // Properties + virtual void lcl_attribute(Id Name, Value & val); + virtual void lcl_sprm(Sprm & sprm); + + // Table + virtual void lcl_entry(int pos, writerfilter::Reference<Properties>::Pointer_t ref); + void handleUnderlineType(const sal_Int32 nIntValue, const ::boost::shared_ptr<PropertyMap> pContext); void handleParaJustification(const sal_Int32 nIntValue, const ::boost::shared_ptr<PropertyMap> pContext, const bool bExchangeLeftRight); bool getColorFromIndex(const sal_Int32 nIndex, sal_Int32 &nColor); diff --git a/writerfilter/inc/resourcemodel/Fraction.hxx b/writerfilter/inc/resourcemodel/Fraction.hxx new file mode 100644 index 000000000000..a038d25c98f1 --- /dev/null +++ b/writerfilter/inc/resourcemodel/Fraction.hxx @@ -0,0 +1,60 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef INCLUDED_FRACTION_HXX +#define INCLUDED_FRACTION_HXX + +#include <sal/types.h> + +namespace writerfilter { +namespace resourcemodel { + +class Fraction +{ +public: + explicit Fraction(sal_Int32 nNumerator, sal_Int32 nDenominator = 1); + explicit Fraction(const Fraction & a, const Fraction & b); + virtual ~Fraction(); + + void init(sal_Int32 nNumerator, sal_Int32 nDenominator); + void assign(const Fraction & rFraction); + + Fraction inverse() const; + + Fraction operator=(const Fraction & rFraction); + Fraction operator+(const Fraction & rFraction) const; + Fraction operator-(const Fraction & rFraction) const; + Fraction operator*(const Fraction & rFraction) const; + Fraction operator/(const Fraction & rFraction) const; + operator sal_Int32() const; + operator float() const; + +private: + sal_Int32 mnNumerator; + sal_Int32 mnDenominator; +}; +}} +#endif // INCLUDED_FRACTION_HXX diff --git a/writerfilter/inc/resourcemodel/LoggedResources.hxx b/writerfilter/inc/resourcemodel/LoggedResources.hxx new file mode 100644 index 000000000000..be30c32fd85e --- /dev/null +++ b/writerfilter/inc/resourcemodel/LoggedResources.hxx @@ -0,0 +1,128 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef INCLUDED_LOGGED_RESOURCES_HXX +#define INCLUDED_LOGGED_RESOURCES_HXX + +#include "WW8ResourceModel.hxx" +#include "TagLogger.hxx" + +namespace writerfilter +{ + +class LoggedResourcesHelper +{ +public: + explicit LoggedResourcesHelper(TagLogger::Pointer_t pLogger, const string & sPrefix); + virtual ~LoggedResourcesHelper(); + + void startElement(const string & sElement); + void endElement(const string & sElement); + void chars(const ::rtl::OUString & rChars); + void chars(const string & rChars); + void attribute(const string & rName, const string & rValue); + void attribute(const string & rName, sal_uInt32 nValue); + + void setPrefix(const string & rPrefix); + +private: + TagLogger::Pointer_t mpLogger; + string msPrefix; +}; + +class LoggedStream : public Stream +{ +public: + explicit LoggedStream(TagLogger::Pointer_t pLogger, const string & sPrefix); + virtual ~LoggedStream(); + + void startSectionGroup(); + void endSectionGroup(); + void startParagraphGroup(); + void endParagraphGroup(); + void startCharacterGroup(); + void endCharacterGroup(); + void startShape( ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > xShape ); + void endShape(); + void text(const sal_uInt8 * data, size_t len); + void utext(const sal_uInt8 * data, size_t len); + void props(writerfilter::Reference<Properties>::Pointer_t ref); + void table(Id name, writerfilter::Reference<Table>::Pointer_t ref); + void substream(Id name, writerfilter::Reference<Stream>::Pointer_t ref); + void info(const string & info); + +protected: + virtual void lcl_startSectionGroup() = 0; + virtual void lcl_endSectionGroup() = 0; + virtual void lcl_startParagraphGroup() = 0; + virtual void lcl_endParagraphGroup() = 0; + virtual void lcl_startCharacterGroup() = 0; + virtual void lcl_endCharacterGroup() = 0; + virtual void lcl_startShape( ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > xShape ) = 0; + virtual void lcl_endShape() = 0; + virtual void lcl_text(const sal_uInt8 * data, size_t len) = 0; + virtual void lcl_utext(const sal_uInt8 * data, size_t len) = 0; + virtual void lcl_props(writerfilter::Reference<Properties>::Pointer_t ref) = 0; + virtual void lcl_table(Id name, writerfilter::Reference<Table>::Pointer_t ref) = 0; + virtual void lcl_substream(Id name, writerfilter::Reference<Stream>::Pointer_t ref) = 0; + virtual void lcl_info(const string & info) = 0; + + LoggedResourcesHelper mHelper; +}; + +class LoggedProperties : public Properties +{ +public: + explicit LoggedProperties(TagLogger::Pointer_t pLogger, const string & sPrefix); + virtual ~LoggedProperties(); + + void attribute(Id name, Value & val); + void sprm(Sprm & sprm); + +protected: + virtual void lcl_attribute(Id name, Value & val) = 0; + virtual void lcl_sprm(Sprm & sprm) = 0; + + LoggedResourcesHelper mHelper; +}; + +class LoggedTable : public Table +{ +public: + explicit LoggedTable(TagLogger::Pointer_t pLogger, const string & sPrefix); + virtual ~LoggedTable(); + + void entry(int pos, writerfilter::Reference<Properties>::Pointer_t ref); + +protected: + virtual void lcl_entry(int pos, writerfilter::Reference<Properties>::Pointer_t ref) = 0; + + LoggedResourcesHelper mHelper; +}; + +} +#endif // INCLUDED_LOGGED_RESOURCES_HXX diff --git a/writerfilter/inc/resourcemodel/TagLogger.hxx b/writerfilter/inc/resourcemodel/TagLogger.hxx index 055656832761..a2c8290e0c4b 100644 --- a/writerfilter/inc/resourcemodel/TagLogger.hxx +++ b/writerfilter/inc/resourcemodel/TagLogger.hxx @@ -28,8 +28,6 @@ #ifndef INCLUDED_TAG_LOGGER_HXX #define INCLUDED_TAG_LOGGER_HXX -#ifdef DEBUG - #include <rtl/ustring.hxx> #include <com/sun/star/beans/XPropertySet.hpp> #include <WriterFilterDllApi.hxx> @@ -86,7 +84,7 @@ namespace writerfilter const string & getTag() const; string toString() const; - ostream & output(ostream & o) const; + ostream & output(ostream & o, const string & sIndent = "") const; }; class WRITERFILTER_DLLPUBLIC TagLogger @@ -139,8 +137,7 @@ namespace writerfilter IdToString::Pointer_t mpIdToString; public: - PropertySetToTagHandler(IdToString::Pointer_t pIdToString) - : mpTag(new XMLTag("propertyset")), mpIdToString(pIdToString) {} + PropertySetToTagHandler(IdToString::Pointer_t pIdToString); virtual ~PropertySetToTagHandler(); XMLTag::Pointer_t getTag() const { return mpTag; } @@ -155,5 +152,4 @@ namespace writerfilter WRITERFILTER_DLLPUBLIC XMLTag::Pointer_t unoPropertySetToTag(uno::Reference<beans::XPropertySet> rPropSet); } -#endif // DEBUG #endif // INCLUDED_TAG_LOGGER_HXX diff --git a/writerfilter/inc/resourcemodel/XPathLogger.hxx b/writerfilter/inc/resourcemodel/XPathLogger.hxx new file mode 100644 index 000000000000..22e50fc15bb9 --- /dev/null +++ b/writerfilter/inc/resourcemodel/XPathLogger.hxx @@ -0,0 +1,65 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef INCLUDED_XPATH_LOGGER_HXX +#define INCLUDED_XPATH_LOGGER_HXX + +#include <hash_map> +#include <stack> +#include <string> +#include <vector> +#include <boost/shared_ptr.hpp> +#include <WriterFilterDllApi.hxx> + +namespace writerfilter +{ +using ::std::hash_map; +using ::std::stack; +using ::std::string; +using ::std::vector; + +class WRITERFILTER_DLLPUBLIC XPathLogger +{ + typedef hash_map<string, unsigned int> TokenMap_t; + typedef boost::shared_ptr<TokenMap_t> TokenMapPointer_t; + + TokenMapPointer_t mp_tokenMap; + stack<TokenMapPointer_t> m_tokenMapStack; + vector<string> m_path; + string m_currentPath; + + void updateCurrentPath(); + +public: + explicit XPathLogger(); + virtual ~XPathLogger(); + + string getXPath() const; + void startElement(string _token); + void endElement(); +}; +} +#endif // INCLUDED_XPATH_LOGGER_HXX diff --git a/writerfilter/qa/complex/ooxml/testdocuments/Table5CellBorders.docx b/writerfilter/qa/complex/ooxml/testdocuments/Table5CellBorders.docx Binary files differnew file mode 100644 index 000000000000..6b278175601b --- /dev/null +++ b/writerfilter/qa/complex/ooxml/testdocuments/Table5CellBorders.docx diff --git a/writerfilter/qa/complex/ooxml/testdocuments/TableDifferentColumns.docx b/writerfilter/qa/complex/ooxml/testdocuments/TableDifferentColumns.docx Binary files differnew file mode 100644 index 000000000000..0503327ddecd --- /dev/null +++ b/writerfilter/qa/complex/ooxml/testdocuments/TableDifferentColumns.docx diff --git a/writerfilter/qa/complex/ooxml/testdocuments/TablePreferredWidth.docx b/writerfilter/qa/complex/ooxml/testdocuments/TablePreferredWidth.docx Binary files differnew file mode 100644 index 000000000000..719b3888a018 --- /dev/null +++ b/writerfilter/qa/complex/ooxml/testdocuments/TablePreferredWidth.docx diff --git a/writerfilter/qa/complex/ooxml/testdocuments/TableRowProperties.docx b/writerfilter/qa/complex/ooxml/testdocuments/TableRowProperties.docx Binary files differnew file mode 100644 index 000000000000..775d63c97b34 --- /dev/null +++ b/writerfilter/qa/complex/ooxml/testdocuments/TableRowProperties.docx diff --git a/writerfilter/source/dmapper/BorderHandler.cxx b/writerfilter/source/dmapper/BorderHandler.cxx index 9fa737f47de2..67f8e65bafb6 100644 --- a/writerfilter/source/dmapper/BorderHandler.cxx +++ b/writerfilter/source/dmapper/BorderHandler.cxx @@ -44,12 +44,13 @@ using namespace ::com::sun::star; -----------------------------------------------------------------------*/ BorderHandler::BorderHandler( bool bOOXML ) : - m_nCurrentBorderPosition( BORDER_TOP ), - m_nLineWidth(0), - m_nLineType(0), - m_nLineColor(0), - m_nLineDistance(0), - m_bOOXML( bOOXML ) +LoggedProperties(dmapper_logger, "BorderHandler"), +m_nCurrentBorderPosition( BORDER_TOP ), +m_nLineWidth(0), +m_nLineType(0), +m_nLineColor(0), +m_nLineDistance(0), +m_bOOXML( bOOXML ) { const int nBorderCount(BORDER_COUNT); std::fill_n(m_aFilledLines, nBorderCount, false); @@ -64,14 +65,8 @@ BorderHandler::~BorderHandler() /*-- 24.04.2007 09:06:35--------------------------------------------------- -----------------------------------------------------------------------*/ -void BorderHandler::attribute(Id rName, Value & rVal) +void BorderHandler::lcl_attribute(Id rName, Value & rVal) { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("BorderHandler.attribute"); - dmapper_logger->attribute("id", (*QNameToString::Instance())(rName)); - dmapper_logger->endElement("BorderHandler.attribute"); -#endif - sal_Int32 nIntValue = rVal.getInt(); /* WRITERFILTERSTATUS: table: BorderHandler_attributedata */ switch( rName ) @@ -123,13 +118,8 @@ void BorderHandler::attribute(Id rName, Value & rVal) /*-- 24.04.2007 09:06:35--------------------------------------------------- -----------------------------------------------------------------------*/ -void BorderHandler::sprm(Sprm & rSprm) +void BorderHandler::lcl_sprm(Sprm & rSprm) { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("BorderHandler.sprm"); - dmapper_logger->attribute("sprm", rSprm.toString()); -#endif - /* WRITERFILTERSTATUS: table: BorderHandler_sprm */ switch( rSprm.getId()) { @@ -157,11 +147,6 @@ void BorderHandler::sprm(Sprm & rSprm) break; default:; } - -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->endElement("BorderHandler.sprm"); -#endif - } /*-- 24.04.2007 09:09:01--------------------------------------------------- diff --git a/writerfilter/source/dmapper/BorderHandler.hxx b/writerfilter/source/dmapper/BorderHandler.hxx index 0fc722227191..fe6e3549feba 100644 --- a/writerfilter/source/dmapper/BorderHandler.hxx +++ b/writerfilter/source/dmapper/BorderHandler.hxx @@ -28,7 +28,7 @@ #define INCLUDED_BORDERHANDLER_HXX #include <WriterFilterDllApi.hxx> -#include <resourcemodel/WW8ResourceModel.hxx> +#include <resourcemodel/LoggedResources.hxx> #include <boost/shared_ptr.hpp> #include <com/sun/star/table/BorderLine.hpp> @@ -36,7 +36,7 @@ namespace writerfilter { namespace dmapper { class PropertyMap; -class WRITERFILTER_DLLPRIVATE BorderHandler : public Properties +class WRITERFILTER_DLLPRIVATE BorderHandler : public LoggedProperties { public: //todo: order is a guess @@ -63,14 +63,14 @@ private: bool m_aFilledLines[BORDER_COUNT]; ::com::sun::star::table::BorderLine m_aBorderLines[BORDER_COUNT]; + // Properties + virtual void lcl_attribute(Id Name, Value & val); + virtual void lcl_sprm(Sprm & sprm); + public: BorderHandler( bool bOOXML ); virtual ~BorderHandler(); - // Properties - virtual void attribute(Id Name, Value & val); - virtual void sprm(Sprm & sprm); - ::boost::shared_ptr<PropertyMap> getProperties(); ::com::sun::star::table::BorderLine getBorderLine(); sal_Int32 getLineDistance() const { return m_nLineDistance;} diff --git a/writerfilter/source/dmapper/CellColorHandler.cxx b/writerfilter/source/dmapper/CellColorHandler.cxx index 2de4554e06dc..f72d4dd0d66b 100644 --- a/writerfilter/source/dmapper/CellColorHandler.cxx +++ b/writerfilter/source/dmapper/CellColorHandler.cxx @@ -29,6 +29,7 @@ #include <doctok/resourceids.hxx> #include <ConversionHelper.hxx> #include <ooxml/resourceids.hxx> +#include "dmapperLoggers.hxx" #define OOXML_COLOR_AUTO 0x0a //todo: AutoColor needs symbol @@ -43,10 +44,11 @@ using namespace ::writerfilter; -----------------------------------------------------------------------*/ CellColorHandler::CellColorHandler() : - m_nShadowType( 0 ), - m_nColor( 0xffffffff ), - m_nFillColor( 0xffffffff ), - m_bParagraph( false ) +LoggedProperties(dmapper_logger, "CellColorHandler"), +m_nShadowType( 0 ), +m_nColor( 0xffffffff ), +m_nFillColor( 0xffffffff ), +m_bParagraph( false ) { } /*-- 24.04.2007 09:06:35--------------------------------------------------- @@ -58,7 +60,7 @@ CellColorHandler::~CellColorHandler() /*-- 24.04.2007 09:06:35--------------------------------------------------- -----------------------------------------------------------------------*/ -void CellColorHandler::attribute(Id rName, Value & rVal) +void CellColorHandler::lcl_attribute(Id rName, Value & rVal) { sal_Int32 nIntValue = rVal.getInt(); (void)nIntValue; @@ -119,7 +121,7 @@ void CellColorHandler::attribute(Id rName, Value & rVal) /*-- 24.04.2007 09:06:35--------------------------------------------------- -----------------------------------------------------------------------*/ -void CellColorHandler::sprm(Sprm & rSprm) +void CellColorHandler::lcl_sprm(Sprm & rSprm) { (void)rSprm; } diff --git a/writerfilter/source/dmapper/CellColorHandler.hxx b/writerfilter/source/dmapper/CellColorHandler.hxx index 3e6b1bb2db70..102449258550 100644 --- a/writerfilter/source/dmapper/CellColorHandler.hxx +++ b/writerfilter/source/dmapper/CellColorHandler.hxx @@ -28,7 +28,7 @@ #define INCLUDED_CELLCOLORHANDLER_HXX #include <WriterFilterDllApi.hxx> -#include <resourcemodel/WW8ResourceModel.hxx> +#include <resourcemodel/LoggedResources.hxx> #include <boost/shared_ptr.hpp> //#include <com/sun/star/table/TableBorder.hpp> #include <com/sun/star/table/BorderLine.hpp> @@ -37,23 +37,23 @@ namespace writerfilter { namespace dmapper { class TablePropertyMap; -class WRITERFILTER_DLLPRIVATE CellColorHandler : public Properties +class WRITERFILTER_DLLPRIVATE CellColorHandler : public LoggedProperties { public: sal_Int32 m_nShadowType; sal_Int32 m_nColor; sal_Int32 m_nFillColor; bool m_bParagraph; + private: + // Properties + virtual void lcl_attribute(Id Name, Value & val); + virtual void lcl_sprm(Sprm & sprm); public: CellColorHandler( ); virtual ~CellColorHandler(); - // Properties - virtual void attribute(Id Name, Value & val); - virtual void sprm(Sprm & sprm); - ::boost::shared_ptr<TablePropertyMap> getProperties(); void setParagraph() { m_bParagraph = true; } diff --git a/writerfilter/source/dmapper/CellMarginHandler.cxx b/writerfilter/source/dmapper/CellMarginHandler.cxx index bfea8a6b25f9..645755cc4c63 100644 --- a/writerfilter/source/dmapper/CellMarginHandler.cxx +++ b/writerfilter/source/dmapper/CellMarginHandler.cxx @@ -29,6 +29,7 @@ #include <doctok/resourceids.hxx> #include <ConversionHelper.hxx> #include <ooxml/resourceids.hxx> +#include "dmapperLoggers.hxx" namespace writerfilter { namespace dmapper { @@ -41,15 +42,16 @@ using namespace ::writerfilter; -----------------------------------------------------------------------*/ CellMarginHandler::CellMarginHandler() : - m_nValue( 0 ), - m_nLeftMargin( 0 ), - m_bLeftMarginValid( false ), - m_nRightMargin( 0 ), - m_bRightMarginValid( false ), - m_nTopMargin( 0 ), - m_bTopMarginValid( false ), - m_nBottomMargin( 0 ), - m_bBottomMarginValid( false ) +LoggedProperties(dmapper_logger, "CellMarginHandler"), +m_nValue( 0 ), +m_nLeftMargin( 0 ), +m_bLeftMarginValid( false ), +m_nRightMargin( 0 ), +m_bRightMarginValid( false ), +m_nTopMargin( 0 ), +m_bTopMarginValid( false ), +m_nBottomMargin( 0 ), +m_bBottomMarginValid( false ) { } /*-- 18.02.2008 12:36:51--------------------------------------------------- @@ -61,7 +63,7 @@ CellMarginHandler::~CellMarginHandler() /*-- 18.02.2008 12:36:51--------------------------------------------------- -----------------------------------------------------------------------*/ -void CellMarginHandler::attribute(Id rName, Value & rVal) +void CellMarginHandler::lcl_attribute(Id rName, Value & rVal) { sal_Int32 nIntValue = rVal.getInt(); (void)nIntValue; @@ -82,7 +84,7 @@ void CellMarginHandler::attribute(Id rName, Value & rVal) /*-- 18.02.2008 12:36:51--------------------------------------------------- -----------------------------------------------------------------------*/ -void CellMarginHandler::sprm(Sprm & rSprm) +void CellMarginHandler::lcl_sprm(Sprm & rSprm) { writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps(); if( pProperties.get()) diff --git a/writerfilter/source/dmapper/CellMarginHandler.hxx b/writerfilter/source/dmapper/CellMarginHandler.hxx index 5f01df47a347..3d2512675683 100644 --- a/writerfilter/source/dmapper/CellMarginHandler.hxx +++ b/writerfilter/source/dmapper/CellMarginHandler.hxx @@ -30,18 +30,22 @@ #ifndef INCLUDED_WRITERFILTERDLLAPI_H #include <WriterFilterDllApi.hxx> #endif -#include <resourcemodel/WW8ResourceModel.hxx> +#include <resourcemodel/LoggedResources.hxx> #include <boost/shared_ptr.hpp> namespace writerfilter { namespace dmapper { class TablePropertyMap; -class WRITERFILTER_DLLPRIVATE CellMarginHandler : public Properties +class WRITERFILTER_DLLPRIVATE CellMarginHandler : public LoggedProperties { private: sal_Int32 m_nValue; + // Properties + virtual void lcl_attribute(Id Name, Value & val); + virtual void lcl_sprm(Sprm & sprm); + public: sal_Int32 m_nLeftMargin; bool m_bLeftMarginValid; @@ -56,10 +60,6 @@ public: CellMarginHandler( ); virtual ~CellMarginHandler(); - // Properties - virtual void attribute(Id Name, Value & val); - virtual void sprm(Sprm & sprm); - ::boost::shared_ptr<TablePropertyMap> getProperties(); }; diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index 65dfb4c5fcec..fb36455fcd97 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -86,15 +86,11 @@ #include <vector> #include <iostream> -#ifdef DEBUG_DOMAINMAPPER -#include <resourcemodel/QNameToString.hxx> -#include <resourcemodel/util.hxx> -#include <resourcemodel/TagLogger.hxx> -#endif #if OSL_DEBUG_LEVEL > 0 #include <resourcemodel/QNameToString.hxx> #endif +#include <resourcemodel/TagLogger.hxx> using namespace ::com::sun::star; using namespace ::rtl; @@ -106,9 +102,7 @@ using resourcemodel::resolveAttributeProperties; namespace dmapper{ -#ifdef DEBUG_DOMAINMAPPER TagLogger::Pointer_t dmapper_logger(TagLogger::getInstance("DOMAINMAPPER")); -#endif /* ---- Fridrich's mess begins here ---- */ struct _PageSz @@ -129,6 +123,9 @@ DomainMapper::DomainMapper( const uno::Reference< uno::XComponentContext >& xCon uno::Reference< io::XInputStream > xInputStream, uno::Reference< lang::XComponent > xModel, SourceDocumentType eDocumentType) : +LoggedProperties(dmapper_logger, "DomainMapper"), +LoggedTable(dmapper_logger, "DomainMapper"), +LoggedStream(dmapper_logger, "DomainMapper"), m_pImpl( new DomainMapper_Impl( *this, xContext, xModel, eDocumentType )), mnBackgroundColor(0), mbIsHighlightSet(false) { @@ -193,14 +190,8 @@ DomainMapper::~DomainMapper() /*-- 09.06.2006 09:52:12--------------------------------------------------- -----------------------------------------------------------------------*/ -void DomainMapper::attribute(Id nName, Value & val) +void DomainMapper::lcl_attribute(Id nName, Value & val) { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("attribute"); - dmapper_logger->attribute("name", (*QNameToString::Instance())(nName)); - dmapper_logger->attribute("value", val.toString()); - dmapper_logger->endElement("attribute"); -#endif static ::rtl::OUString sLocalBookmarkName; sal_Int32 nIntValue = val.getInt(); rtl::OUString sStringValue = val.getString(); @@ -2195,20 +2186,16 @@ void DomainMapper::attribute(Id nName, Value & val) /*-- 09.06.2006 09:52:12--------------------------------------------------- -----------------------------------------------------------------------*/ -void DomainMapper::sprm(Sprm & rSprm) +void DomainMapper::lcl_sprm(Sprm & rSprm) { if( !m_pImpl->getTableManager().sprm(rSprm)) - DomainMapper::sprm( rSprm, m_pImpl->GetTopContext() ); + sprmWithProps( rSprm, m_pImpl->GetTopContext() ); } /*-- 20.06.2006 09:58:33--------------------------------------------------- -----------------------------------------------------------------------*/ -void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmType ) +void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmType ) { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("DomainMapper.sprm"); - dmapper_logger->chars(rSprm.toString()); -#endif OSL_ENSURE(rContext.get(), "PropertyMap has to be valid!"); if(!rContext.get()) return ; @@ -2885,12 +2872,6 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp { uno::Any aBold( uno::makeAny( nIntValue ? awt::FontWeight::BOLD : awt::FontWeight::NORMAL ) ); -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("charWeight"); - dmapper_logger->attribute("weight", nIntValue ? awt::FontWeight::BOLD : awt::FontWeight::NORMAL); - dmapper_logger->endElement("charWeight"); -#endif - rContext->Insert(ePropertyId, true, aBold ); if( nSprmId != NS_sprm::LN_CFBoldBi ) // sprmCFBoldBi rContext->Insert(PROP_CHAR_WEIGHT_ASIAN, true, aBold ); @@ -4246,27 +4227,14 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp #endif } } - -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->addTag(rContext->toTag()); - dmapper_logger->endElement("DomainMapper.sprm"); -#endif } /*-- 09.06.2006 09:52:13--------------------------------------------------- -----------------------------------------------------------------------*/ -void DomainMapper::entry(int /*pos*/, +void DomainMapper::lcl_entry(int /*pos*/, writerfilter::Reference<Properties>::Pointer_t ref) { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("DomainMapper.entry"); -#endif - ref->resolve(*this); - -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->endElement("DomainMapper.entry"); -#endif } /*-- 09.06.2006 09:52:13--------------------------------------------------- @@ -4278,17 +4246,14 @@ void DomainMapper::data(const sal_uInt8* /*buf*/, size_t /*len*/, /*-- 09.06.2006 09:52:13--------------------------------------------------- -----------------------------------------------------------------------*/ -void DomainMapper::startSectionGroup() +void DomainMapper::lcl_startSectionGroup() { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("section"); -#endif m_pImpl->PushProperties(CONTEXT_SECTION); } /*-- 09.06.2006 09:52:13--------------------------------------------------- -----------------------------------------------------------------------*/ -void DomainMapper::endSectionGroup() +void DomainMapper::lcl_endSectionGroup() { PropertyMapPtr pContext = m_pImpl->GetTopContextOfType(CONTEXT_SECTION); SectionPropertyMap* pSectionContext = dynamic_cast< SectionPropertyMap* >( pContext.get() ); @@ -4296,20 +4261,12 @@ void DomainMapper::endSectionGroup() if(pSectionContext) pSectionContext->CloseSectionGroup( *m_pImpl ); m_pImpl->PopProperties(CONTEXT_SECTION); - -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->endElement("section"); -#endif } /*-- 09.06.2006 09:52:13--------------------------------------------------- -----------------------------------------------------------------------*/ -void DomainMapper::startParagraphGroup() +void DomainMapper::lcl_startParagraphGroup() { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("paragraph"); -#endif - m_pImpl->getTableManager().startParagraphGroup(); m_pImpl->PushProperties(CONTEXT_PARAGRAPH); static ::rtl::OUString sDefault( ::rtl::OUString::createFromAscii("Standard") ); @@ -4326,40 +4283,27 @@ void DomainMapper::startParagraphGroup() /*-- 09.06.2006 09:52:14--------------------------------------------------- -----------------------------------------------------------------------*/ -void DomainMapper::endParagraphGroup() +void DomainMapper::lcl_endParagraphGroup() { m_pImpl->PopProperties(CONTEXT_PARAGRAPH); m_pImpl->getTableManager().endParagraphGroup(); //frame conversion has to be executed after table conversion m_pImpl->ExecuteFrameConversion(); -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->endElement("paragraph"); -#endif } void DomainMapper::markLastParagraphInSection( ) { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->element( "markLastParagraphInSection" ); -#endif m_pImpl->SetIsLastParagraphInSection( true ); } -void DomainMapper::startShape( uno::Reference< drawing::XShape > xShape ) +void DomainMapper::lcl_startShape( uno::Reference< drawing::XShape > xShape ) { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("shape"); -#endif m_pImpl->PushShapeContext( xShape ); } -void DomainMapper::endShape( ) +void DomainMapper::lcl_endShape( ) { m_pImpl->PopShapeContext( ); - -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->endElement("shape"); -#endif } /*-- 13.06.2007 16:15:55--------------------------------------------------- @@ -4401,12 +4345,8 @@ void DomainMapper::PopListProperties() -----------------------------------------------------------------------*/ -void DomainMapper::startCharacterGroup() +void DomainMapper::lcl_startCharacterGroup() { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("charactergroup"); -#endif - m_pImpl->PushProperties(CONTEXT_CHARACTER); DomainMapperTableManager& rTableManager = m_pImpl->getTableManager(); if( rTableManager.getTableStyleName().getLength() ) @@ -4418,18 +4358,14 @@ void DomainMapper::startCharacterGroup() /*-- 09.06.2006 09:52:14--------------------------------------------------- -----------------------------------------------------------------------*/ -void DomainMapper::endCharacterGroup() +void DomainMapper::lcl_endCharacterGroup() { m_pImpl->PopProperties(CONTEXT_CHARACTER); - -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->endElement("charactergroup"); -#endif } /*-- 09.06.2006 09:52:14--------------------------------------------------- -----------------------------------------------------------------------*/ -void DomainMapper::text(const sal_uInt8 * data_, size_t len) +void DomainMapper::lcl_text(const sal_uInt8 * data_, size_t len) { //TODO: Determine the right text encoding (FIB?) ::rtl::OUString sText( (const sal_Char*) data_, len, RTL_TEXTENCODING_MS_1252 ); @@ -4515,19 +4451,13 @@ void DomainMapper::text(const sal_uInt8 * data_, size_t len) /*-- 09.06.2006 09:52:15--------------------------------------------------- -----------------------------------------------------------------------*/ -void DomainMapper::utext(const sal_uInt8 * data_, size_t len) +void DomainMapper::lcl_utext(const sal_uInt8 * data_, size_t len) { OUString sText; OUStringBuffer aBuffer = OUStringBuffer(len); aBuffer.append( (const sal_Unicode *) data_, len); sText = aBuffer.makeStringAndClear(); -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("utext"); - dmapper_logger->chars(sText); - dmapper_logger->endElement("utext"); -#endif - try { m_pImpl->getTableManager().utext(data_, len); @@ -4585,12 +4515,8 @@ void DomainMapper::utext(const sal_uInt8 * data_, size_t len) /*-- 09.06.2006 09:52:15--------------------------------------------------- -----------------------------------------------------------------------*/ -void DomainMapper::props(writerfilter::Reference<Properties>::Pointer_t ref) +void DomainMapper::lcl_props(writerfilter::Reference<Properties>::Pointer_t ref) { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("props"); -#endif - string sType = ref->getType(); if( sType == "PICF" ) { @@ -4602,21 +4528,12 @@ void DomainMapper::props(writerfilter::Reference<Properties>::Pointer_t ref) } else ref->resolve(*this); - -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->endElement("props"); -#endif } /*-- 09.06.2006 09:52:15--------------------------------------------------- -----------------------------------------------------------------------*/ -void DomainMapper::table(Id name, writerfilter::Reference<Table>::Pointer_t ref) +void DomainMapper::lcl_table(Id name, writerfilter::Reference<Table>::Pointer_t ref) { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("table"); - dmapper_logger->attribute("id", (*QNameToString::Instance())(name)); -#endif - // printf ( "DomainMapper::table(0x%.4x)\n", (unsigned int)name); m_pImpl->SetAnyTableImport(true); /* WRITERFILTERSTATUS: table: attributedata */ @@ -4666,20 +4583,12 @@ void DomainMapper::table(Id name, writerfilter::Reference<Table>::Pointer_t ref) OSL_ENSURE( false, "which table is to be filled here?"); } m_pImpl->SetAnyTableImport(false); - -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->endElement("table"); -#endif } /*-- 09.06.2006 09:52:16--------------------------------------------------- -----------------------------------------------------------------------*/ -void DomainMapper::substream(Id rName, ::writerfilter::Reference<Stream>::Pointer_t ref) +void DomainMapper::lcl_substream(Id rName, ::writerfilter::Reference<Stream>::Pointer_t ref) { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("substream"); -#endif - m_pImpl->appendTableManager( ); m_pImpl->getTableManager().startLevel(); @@ -4751,15 +4660,11 @@ void DomainMapper::substream(Id rName, ::writerfilter::Reference<Stream>::Pointe m_pImpl->getTableManager().endLevel(); m_pImpl->popTableManager( ); - -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->endElement("substream"); -#endif } /*-- 09.06.2006 09:52:16--------------------------------------------------- -----------------------------------------------------------------------*/ -void DomainMapper::info(const string & /*info_*/) +void DomainMapper::lcl_info(const string & /*info_*/) { } diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx index 958a96fbff7d..c6869aca5f2b 100644 --- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx +++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx @@ -32,7 +32,7 @@ #include <com/sun/star/text/HoriOrientation.hpp> #include <dmapperLoggers.hxx> -#ifdef DEBUG_DOMAINMAPPER +#ifdef DEBUG_DMAPPER_TABLE_HANDLER #include <PropertyMapHelper.hxx> #endif @@ -45,7 +45,7 @@ using namespace ::std; #define DEF_BORDER_DIST 190 //0,19cm #define DEFAULT_CELL_MARGIN 108 //default cell margin, not documented -#ifdef DEBUG_DOMAINMAPPER +#ifdef DEBUG_DMAPPER_TABLE_HANDLER static void lcl_printProperties( PropertyMapPtr pProps ) { if( pProps.get() ) @@ -104,7 +104,7 @@ void DomainMapperTableHandler::startTable(unsigned int nRows, m_pTableSeq = TableSequencePointer_t(new TableSequence_t(nRows)); m_nRowIndex = 0; -#ifdef DEBUG_DOMAINMAPPER +#ifdef DEBUG_DMAPPER_TABLE_HANDLER dmapper_logger->startElement("tablehandler.table"); dmapper_logger->attribute("rows", nRows); @@ -118,11 +118,6 @@ void DomainMapperTableHandler::startTable(unsigned int nRows, -----------------------------------------------------------------------*/ PropertyMapPtr lcl_SearchParentStyleSheetAndMergeProperties(const StyleSheetEntryPtr pStyleSheet, StyleSheetTablePtr pStyleSheetTable) { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("lcl_SearchParentStyleSheetAndMergeProperties"); - dmapper_logger->addTag(pStyleSheet->toTag()); -#endif - PropertyMapPtr pRet; if( pStyleSheet->sBaseStyleIdentifier.getLength()) { @@ -136,10 +131,6 @@ PropertyMapPtr lcl_SearchParentStyleSheetAndMergeProperties(const StyleSheetEntr pRet->insert( pStyleSheet->pProperties, true ); -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->endElement("lcl_SearchParentStyleSheetAndMergeProperties"); -#endif - return pRet; } @@ -241,7 +232,7 @@ void lcl_computeCellBorders( PropertyMapPtr pTableBorders, PropertyMapPtr pCellP } } -#ifdef DEBUG_DOMAINMAPPER +#ifdef DEBUG_DMAPPER_TABLE_HANDLER void lcl_debug_BorderLine(table::BorderLine & rLine) { @@ -334,7 +325,7 @@ TableStyleSheetEntry * DomainMapperTableHandler::endTableGetTableStyle(TableInfo PropertyMapPtr pMergedProperties = lcl_SearchParentStyleSheetAndMergeProperties(pStyleSheet, pStyleSheetTable); -#ifdef DEBUG_DOMAINMAPPER +#ifdef DEBUG_DMAPPER_TABLE_HANDLER dmapper_logger->startElement("mergedProps"); dmapper_logger->addTag(pMergedProperties->toTag()); dmapper_logger->endElement("mergedProps"); @@ -343,7 +334,7 @@ TableStyleSheetEntry * DomainMapperTableHandler::endTableGetTableStyle(TableInfo m_aTableProperties->insert( pMergedProperties ); m_aTableProperties->insert( pTableProps ); -#ifdef DEBUG_DOMAINMAPPER +#ifdef DEBUG_DMAPPER_TABLE_HANDLER dmapper_logger->startElement("TableProperties"); dmapper_logger->addTag(m_aTableProperties->toTag()); dmapper_logger->endElement("TableProperties"); @@ -354,7 +345,7 @@ TableStyleSheetEntry * DomainMapperTableHandler::endTableGetTableStyle(TableInfo // Set the table default attributes for the cells rInfo.pTableDefaults->insert( m_aTableProperties ); -#ifdef DEBUG_DOMAINMAPPER +#ifdef DEBUG_DMAPPER_TABLE_HANDLER dmapper_logger->startElement("TableDefaults"); dmapper_logger->addTag(rInfo.pTableDefaults->toTag()); dmapper_logger->endElement("TableDefaults"); @@ -472,7 +463,7 @@ TableStyleSheetEntry * DomainMapperTableHandler::endTableGetTableStyle(TableInfo m_aTableProperties->Insert( PROP_TABLE_BORDER, false, uno::makeAny( aTableBorder ) ); -#ifdef DEBUG_DOMAINMAPPER +#ifdef DEBUG_DMAPPER_TABLE_HANDLER lcl_debug_TableBorder(aTableBorder); #endif @@ -501,7 +492,7 @@ TableStyleSheetEntry * DomainMapperTableHandler::endTableGetTableStyle(TableInfo rInfo.aTableProperties = m_aTableProperties->GetPropertyValues(); -#ifdef DEBUG_DOMAINMAPPER +#ifdef DEBUG_DMAPPER_TABLE_HANDLER dmapper_logger->startElement("debug.tableprops"); dmapper_logger->addTag(m_aTableProperties->toTag()); dmapper_logger->endElement("debug.tableprops"); @@ -514,7 +505,7 @@ TableStyleSheetEntry * DomainMapperTableHandler::endTableGetTableStyle(TableInfo CellPropertyValuesSeq_t DomainMapperTableHandler::endTableGetCellProperties(TableInfo & rInfo) { -#ifdef DEBUG_DOMAINMAPPER +#ifdef DEBUG_DMAPPER_TABLE_HANDLER dmapper_logger->startElement("getCellProperties"); #endif @@ -593,7 +584,7 @@ CellPropertyValuesSeq_t DomainMapperTableHandler::endTableGetCellProperties(Tabl pAllCellProps->insert( *aCellIterator ); aCellIterator->get( )->swap( *pAllCellProps.get( ) ); -#ifdef DEBUG_DOMAINMAPPER +#ifdef DEBUG_DMAPPER_TABLE_HANDLER dmapper_logger->startElement("cell"); dmapper_logger->attribute("cell", nCell); dmapper_logger->attribute("row", nRow); @@ -626,14 +617,14 @@ CellPropertyValuesSeq_t DomainMapperTableHandler::endTableGetCellProperties(Tabl uno::makeAny((sal_Int32) rInfo.nBottomBorderDistance ) ); pSingleCellProperties[nCell] = aCellIterator->get()->GetPropertyValues(); -#ifdef DEBUG_DOMAINMAPPER +#ifdef DEBUG_DMAPPER_TABLE_HANDLER dmapper_logger->endElement("cell"); #endif } ++nCell; ++aCellIterator; } -#ifdef DEBUG_DOMAINMAPPER +#ifdef DEBUG_DMAPPER_TABLE_HANDLER //-->debug cell properties { ::rtl::OUString sNames; @@ -660,7 +651,7 @@ CellPropertyValuesSeq_t DomainMapperTableHandler::endTableGetCellProperties(Tabl ++aRowOfCellsIterator; } -#ifdef DEBUG_DOMAINMAPPER +#ifdef DEBUG_DMAPPER_TABLE_HANDLER dmapper_logger->endElement("getCellProperties"); #endif @@ -669,7 +660,7 @@ CellPropertyValuesSeq_t DomainMapperTableHandler::endTableGetCellProperties(Tabl RowPropertyValuesSeq_t DomainMapperTableHandler::endTableGetRowProperties() { -#ifdef DEBUG_DOMAINMAPPER +#ifdef DEBUG_DMAPPER_TABLE_HANDLER dmapper_logger->startElement("getRowProperties"); #endif @@ -679,7 +670,7 @@ RowPropertyValuesSeq_t DomainMapperTableHandler::endTableGetRowProperties() sal_Int32 nRow = 0; while( aRowIter != aRowIterEnd ) { -#ifdef DEBUG_DOMAINMAPPER +#ifdef DEBUG_DMAPPER_TABLE_HANDLER dmapper_logger->startElement("rowProps.row"); #endif if( aRowIter->get() ) @@ -689,19 +680,19 @@ RowPropertyValuesSeq_t DomainMapperTableHandler::endTableGetRowProperties() aRowIter->get()->Insert( PROP_IS_SPLIT_ALLOWED, false, uno::makeAny(sal_True ) ); aRowProperties[nRow] = (*aRowIter)->GetPropertyValues(); -#ifdef DEBUG_DOMAINMAPPER +#ifdef DEBUG_DMAPPER_TABLE_HANDLER dmapper_logger->addTag((*aRowIter)->toTag()); dmapper_logger->addTag(lcl_PropertyValuesToTag(aRowProperties[nRow])); #endif } ++nRow; ++aRowIter; -#ifdef DEBUG_DOMAINMAPPER +#ifdef DEBUG_DMAPPER_TABLE_HANDLER dmapper_logger->endElement("rowProps.row"); #endif } -#ifdef DEBUG_DOMAINMAPPER +#ifdef DEBUG_DMAPPER_TABLE_HANDLER dmapper_logger->endElement("getRowProperties"); #endif @@ -710,7 +701,7 @@ RowPropertyValuesSeq_t DomainMapperTableHandler::endTableGetRowProperties() void DomainMapperTableHandler::endTable() { -#ifdef DEBUG_DOMAINMAPPER +#ifdef DEBUG_DMAPPER_TABLE_HANDLER dmapper_logger->startElement("tablehandler.endTable"); #endif @@ -722,7 +713,7 @@ void DomainMapperTableHandler::endTable() RowPropertyValuesSeq_t aRowProperties = endTableGetRowProperties(); -#ifdef DEBUG_DOMAINMAPPER +#ifdef DEBUG_DMAPPER_TABLE_HANDLER dmapper_logger->addTag(lcl_PropertyValueSeqToTag(aRowProperties)); #endif @@ -739,25 +730,25 @@ void DomainMapperTableHandler::endTable() } catch (lang::IllegalArgumentException e) { -#ifdef DEBUG_DOMAINMAPPER +#ifdef DEBUG_DMAPPER_TABLE_HANDLER dmapper_logger->chars("failed to import table!"); #endif } -#ifdef DEBUG_DOMAINMAPPER catch ( uno::Exception e ) { +#ifdef DEBUG_DMAPPER_TABLE_HANDLER dmapper_logger->startElement("exception"); dmapper_logger->chars(rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr( )); dmapper_logger->endElement("exeception"); - } #endif + } } m_aTableProperties.reset(); m_aCellProperties.clear(); m_aRowProperties.clear(); -#ifdef DEBUG_DOMAINMAPPER +#ifdef DEBUG_DMAPPER_TABLE_HANDLER dmapper_logger->endElement("tablehandler.endTable"); dmapper_logger->endElement("tablehandler.table"); #endif @@ -769,7 +760,7 @@ void DomainMapperTableHandler::startRow(unsigned int nCells, m_aRowProperties.push_back( pProps ); m_aCellProperties.push_back( PropertyMapVector1() ); -#if DEBUG_DOMAINMAPPER +#if DEBUG_DMAPPER_TABLE_HANDLER dmapper_logger->startElement("table.row"); dmapper_logger->attribute("cells", nCells); if (pProps != NULL) @@ -785,7 +776,7 @@ void DomainMapperTableHandler::endRow() (*m_pTableSeq)[m_nRowIndex] = *m_pRowSeq; ++m_nRowIndex; m_nCellIndex = 0; -#ifdef DEBUG_DOMAINMAPPER +#ifdef DEBUG_DMAPPER_TABLE_HANDLER dmapper_logger->endElement("table.row"); #endif } @@ -804,7 +795,7 @@ void DomainMapperTableHandler::startCell(const Handle_t & start, m_aCellProperties[nRow - 1].push_back( pEmptyProps ); } -#if DEBUG_DOMAINMAPPER +#if DEBUG_DMAPPER_TABLE_HANDLER dmapper_logger->startElement("table.cell"); dmapper_logger->startElement("table.cell.start"); dmapper_logger->chars(toString(start)); @@ -824,7 +815,7 @@ void DomainMapperTableHandler::startCell(const Handle_t & start, void DomainMapperTableHandler::endCell(const Handle_t & end) { -#ifdef DEBUG_DOMAINMAPPER +#ifdef DEBUG_DMAPPER_TABLE_HANDLER dmapper_logger->startElement("table.cell.end"); dmapper_logger->chars(toString(end)); dmapper_logger->endElement("table.cell.end"); diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 301774dc2b96..11d03655b5db 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -627,10 +627,9 @@ void DomainMapper_Impl::finishParagraph( PropertyMapPtr pPropertyMap ) #ifdef DEBUG_DOMAINMAPPER dmapper_logger->attribute("isTextAppend", xTextAppend.is()); - dmapper_logger->attribute("isIgnor", getTableManager().isIgnore()); #endif - if(xTextAppend.is() && ! getTableManager( ).isIgnore()) + if(xTextAppend.is() && ! getTableManager( ).isIgnore() && pParaContext != NULL) { try { @@ -649,7 +648,10 @@ void DomainMapper_Impl::finishParagraph( PropertyMapPtr pPropertyMap ) old _and_ new DropCap must not occur */ - bool bIsDropCap = pParaContext->IsFrameMode() && sal::static_int_cast<Id>(pParaContext->GetDropCap()) != NS_ooxml::LN_Value_wordprocessingml_ST_DropCap_none; + bool bIsDropCap = + pParaContext->IsFrameMode() && + sal::static_int_cast<Id>(pParaContext->GetDropCap()) != NS_ooxml::LN_Value_wordprocessingml_ST_DropCap_none; + style::DropCapFormat aDrop; ParagraphPropertiesPtr pToBeSavedProperties; bool bKeepLastParagraphProperties = false; diff --git a/writerfilter/source/dmapper/FFDataHandler.cxx b/writerfilter/source/dmapper/FFDataHandler.cxx index 9f9430401161..6decd84d2786 100644 --- a/writerfilter/source/dmapper/FFDataHandler.cxx +++ b/writerfilter/source/dmapper/FFDataHandler.cxx @@ -30,10 +30,8 @@ #include "FFDataHandler.hxx" #include <ooxml/resourceids.hxx> -#ifdef DEBUG_DOMAINMAPPER -#include <resourcemodel/QNameToString.hxx> #include "dmapperLoggers.hxx" -#endif + namespace writerfilter { namespace dmapper { @@ -41,17 +39,18 @@ namespace dmapper { * class: FFDataHandler * ************************/ -FFDataHandler::FFDataHandler() -: m_bEnabled(false), - m_bCalcOnExit(false), - m_nHelpTextType(0), - m_nStatusTextType(0), - m_nCheckboxHeight(0), - m_bCheckboxAutoHeight(false), - m_bCheckboxDefault(false), - m_bCheckboxChecked(false), - m_nTextType(0), - m_nTextMaxLength(0) +FFDataHandler::FFDataHandler() : +LoggedProperties(dmapper_logger, "FFDataHandler"), +m_bEnabled(false), +m_bCalcOnExit(false), +m_nHelpTextType(0), +m_nStatusTextType(0), +m_nCheckboxHeight(0), +m_bCheckboxAutoHeight(false), +m_bCheckboxDefault(false), +m_bCheckboxChecked(false), +m_nTextType(0), +m_nTextMaxLength(0) { } @@ -286,12 +285,8 @@ const rtl::OUString & FFDataHandler::getTextFormat() const } -void FFDataHandler::sprm(Sprm & r_Sprm) +void FFDataHandler::lcl_sprm(Sprm & r_Sprm) { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("FFDataHandler.sprm"); - dmapper_logger->chars(r_Sprm.toString()); -#endif switch(r_Sprm.getId()) { case NS_ooxml::LN_CT_FFData_name: @@ -426,9 +421,6 @@ void FFDataHandler::sprm(Sprm & r_Sprm) #endif break; } -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->endElement("FFDataHandler.sprm"); -#endif } void FFDataHandler::resolveSprm(Sprm & r_Sprm) @@ -438,14 +430,8 @@ void FFDataHandler::resolveSprm(Sprm & r_Sprm) pProperties->resolve(*this); } -void FFDataHandler::attribute(Id name, Value & val) +void FFDataHandler::lcl_attribute(Id name, Value & val) { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("FFDataHandler.attribute"); - dmapper_logger->attribute("name", (*QNameToString::Instance())(name)); - dmapper_logger->attribute("value", val.toString()); - dmapper_logger->endElement("FFDataHandler.attribute"); -#endif switch (name) { case NS_ooxml::LN_CT_FFHelpText_type: diff --git a/writerfilter/source/dmapper/FFDataHandler.hxx b/writerfilter/source/dmapper/FFDataHandler.hxx index fb7a4ccee950..b1c7ff2ea7fb 100644 --- a/writerfilter/source/dmapper/FFDataHandler.hxx +++ b/writerfilter/source/dmapper/FFDataHandler.hxx @@ -29,11 +29,11 @@ ************************************************************************/ #ifndef INCLUDED_FFDataHandler_HXX #define INCLUDED_FFDataHandler_HXX -#include <resourcemodel/WW8ResourceModel.hxx> +#include <resourcemodel/LoggedResources.hxx> #include <rtl/ustring.hxx> namespace writerfilter { namespace dmapper { -class FFDataHandler : public Properties +class FFDataHandler : public LoggedProperties { public: // typedefs @@ -127,12 +127,8 @@ public: const rtl::OUString & getTextFormat() const; // sprm - void sprm(Sprm & r_sprm); void resolveSprm(Sprm & r_sprm); - // attribute - void attribute(Id name, Value & val); - private: rtl::OUString m_sName; bool m_bEnabled; @@ -154,6 +150,12 @@ private: sal_uInt32 m_nTextMaxLength; rtl::OUString m_sTextDefault; rtl::OUString m_sTextFormat; + + // sprm + void lcl_sprm(Sprm & r_sprm); + + // attribute + void lcl_attribute(Id name, Value & val); }; diff --git a/writerfilter/source/dmapper/FontTable.cxx b/writerfilter/source/dmapper/FontTable.cxx index 4bde0ac275b5..fd6f15660557 100644 --- a/writerfilter/source/dmapper/FontTable.cxx +++ b/writerfilter/source/dmapper/FontTable.cxx @@ -33,6 +33,8 @@ #include <vector> #include <stdio.h> +#include "dmapperLoggers.hxx" + namespace writerfilter { namespace dmapper { @@ -46,8 +48,11 @@ struct FontTable_Impl /*-- 19.06.2006 12:04:32--------------------------------------------------- -----------------------------------------------------------------------*/ -FontTable::FontTable() : - m_pImpl( new FontTable_Impl ) +FontTable::FontTable() +: LoggedProperties(dmapper_logger, "FontTable") +, LoggedTable(dmapper_logger, "FontTable") +, LoggedStream(dmapper_logger, "FontTable") +, m_pImpl( new FontTable_Impl ) { } /*-- 19.06.2006 12:04:33--------------------------------------------------- @@ -60,7 +65,7 @@ FontTable::~FontTable() /*-- 19.06.2006 12:04:33--------------------------------------------------- -----------------------------------------------------------------------*/ -void FontTable::attribute(Id Name, Value & val) +void FontTable::lcl_attribute(Id Name, Value & val) { OSL_ENSURE( m_pImpl->pCurrentEntry, "current entry has to be set here"); if(!m_pImpl->pCurrentEntry) @@ -533,7 +538,7 @@ void FontTable::attribute(Id Name, Value & val) /*-- 19.06.2006 12:04:33--------------------------------------------------- -----------------------------------------------------------------------*/ -void FontTable::sprm(Sprm& rSprm) +void FontTable::lcl_sprm(Sprm& rSprm) { OSL_ENSURE( m_pImpl->pCurrentEntry, "current entry has to be set here"); if(!m_pImpl->pCurrentEntry) @@ -561,7 +566,7 @@ void FontTable::sprm(Sprm& rSprm) /*-- 19.06.2006 12:04:33--------------------------------------------------- -----------------------------------------------------------------------*/ -void FontTable::entry(int /*pos*/, writerfilter::Reference<Properties>::Pointer_t ref) +void FontTable::lcl_entry(int /*pos*/, writerfilter::Reference<Properties>::Pointer_t ref) { //create a new font entry OSL_ENSURE( !m_pImpl->pCurrentEntry, "current entry has to be NULL here"); @@ -574,81 +579,81 @@ void FontTable::entry(int /*pos*/, writerfilter::Reference<Properties>::Pointer_ /*-- 19.06.2006 12:04:34--------------------------------------------------- -----------------------------------------------------------------------*/ -void FontTable::startSectionGroup() +void FontTable::lcl_startSectionGroup() { } /*-- 19.06.2006 12:04:35--------------------------------------------------- -----------------------------------------------------------------------*/ -void FontTable::endSectionGroup() +void FontTable::lcl_endSectionGroup() { } /*-- 19.06.2006 12:04:35--------------------------------------------------- -----------------------------------------------------------------------*/ -void FontTable::startParagraphGroup() +void FontTable::lcl_startParagraphGroup() { } /*-- 19.06.2006 12:04:35--------------------------------------------------- -----------------------------------------------------------------------*/ -void FontTable::endParagraphGroup() +void FontTable::lcl_endParagraphGroup() { } /*-- 19.06.2006 12:04:35--------------------------------------------------- -----------------------------------------------------------------------*/ -void FontTable::startCharacterGroup() +void FontTable::lcl_startCharacterGroup() { } /*-- 19.06.2006 12:04:35--------------------------------------------------- -----------------------------------------------------------------------*/ -void FontTable::endCharacterGroup() +void FontTable::lcl_endCharacterGroup() { } /*-- 19.06.2006 12:04:36--------------------------------------------------- -----------------------------------------------------------------------*/ -void FontTable::text(const sal_uInt8*, size_t ) +void FontTable::lcl_text(const sal_uInt8*, size_t ) { } /*-- 19.06.2006 12:04:36--------------------------------------------------- -----------------------------------------------------------------------*/ -void FontTable::utext(const sal_uInt8* , size_t) +void FontTable::lcl_utext(const sal_uInt8* , size_t) { } /*-- 19.06.2006 12:04:37--------------------------------------------------- -----------------------------------------------------------------------*/ -void FontTable::props(writerfilter::Reference<Properties>::Pointer_t) +void FontTable::lcl_props(writerfilter::Reference<Properties>::Pointer_t) { } /*-- 19.06.2006 12:04:37--------------------------------------------------- -----------------------------------------------------------------------*/ -void FontTable::table(Id, writerfilter::Reference<Table>::Pointer_t) +void FontTable::lcl_table(Id, writerfilter::Reference<Table>::Pointer_t) { } /*-- 19.06.2006 12:04:38--------------------------------------------------- -----------------------------------------------------------------------*/ -void FontTable::substream(Id, ::writerfilter::Reference<Stream>::Pointer_t) +void FontTable::lcl_substream(Id, ::writerfilter::Reference<Stream>::Pointer_t) { } /*-- 19.06.2006 12:04:39--------------------------------------------------- -----------------------------------------------------------------------*/ -void FontTable::info(const string& ) +void FontTable::lcl_info(const string& ) { } -void FontTable::startShape( ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > ) +void FontTable::lcl_startShape( ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > ) { } -void FontTable::endShape( ) +void FontTable::lcl_endShape( ) { } diff --git a/writerfilter/source/dmapper/FontTable.hxx b/writerfilter/source/dmapper/FontTable.hxx index a2fa967d85fe..cc8e9458f7da 100644 --- a/writerfilter/source/dmapper/FontTable.hxx +++ b/writerfilter/source/dmapper/FontTable.hxx @@ -30,7 +30,7 @@ #include <boost/shared_ptr.hpp> #include <WriterFilterDllApi.hxx> -#include <resourcemodel/WW8ResourceModel.hxx> +#include <resourcemodel/LoggedResources.hxx> #include <com/sun/star/lang/XComponent.hpp> namespace writerfilter { @@ -62,46 +62,45 @@ struct FontEntry nAltFontIndex( 0 ) {} }; -class WRITERFILTER_DLLPRIVATE FontTable : public Properties, public Table - /*,public BinaryObj*/, public Stream + +class WRITERFILTER_DLLPRIVATE FontTable : public LoggedProperties, public LoggedTable + /*,public BinaryObj*/, public LoggedStream { FontTable_Impl *m_pImpl; -public: + public: FontTable(); virtual ~FontTable(); + sal_uInt32 size(); + const FontEntry::Pointer_t getFontEntry(sal_uInt32 nIndex); + + private: // Properties - virtual void attribute(Id Name, Value & val); - virtual void sprm(Sprm & sprm); + virtual void lcl_attribute(Id Name, Value & val); + virtual void lcl_sprm(Sprm & sprm); // Table - virtual void entry(int pos, writerfilter::Reference<Properties>::Pointer_t ref); - - // BinaryObj -// virtual void data(const sal_Int8* buf, size_t len, -// writerfilter::Reference<Properties>::Pointer_t ref); + virtual void lcl_entry(int pos, writerfilter::Reference<Properties>::Pointer_t ref); // Stream - virtual void startSectionGroup(); - virtual void endSectionGroup(); - virtual void startParagraphGroup(); - virtual void endParagraphGroup(); - virtual void startCharacterGroup(); - virtual void endCharacterGroup(); - virtual void text(const sal_uInt8 * data, size_t len); - virtual void utext(const sal_uInt8 * data, size_t len); - virtual void props(writerfilter::Reference<Properties>::Pointer_t ref); - virtual void table(Id name, - writerfilter::Reference<Table>::Pointer_t ref); - virtual void substream(Id name, - ::writerfilter::Reference<Stream>::Pointer_t ref); - virtual void info(const string & info); - virtual void startShape( ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > xShape ); - virtual void endShape( ); + virtual void lcl_startSectionGroup(); + virtual void lcl_endSectionGroup(); + virtual void lcl_startParagraphGroup(); + virtual void lcl_endParagraphGroup(); + virtual void lcl_startCharacterGroup(); + virtual void lcl_endCharacterGroup(); + virtual void lcl_text(const sal_uInt8 * data, size_t len); + virtual void lcl_utext(const sal_uInt8 * data, size_t len); + virtual void lcl_props(writerfilter::Reference<Properties>::Pointer_t ref); + virtual void lcl_table(Id name, + writerfilter::Reference<Table>::Pointer_t ref); + virtual void lcl_substream(Id name, + ::writerfilter::Reference<Stream>::Pointer_t ref); + virtual void lcl_info(const string & info); + virtual void lcl_startShape( ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > xShape ); + virtual void lcl_endShape( ); - const FontEntry::Pointer_t getFontEntry(sal_uInt32 nIndex); - sal_uInt32 size(); }; typedef boost::shared_ptr< FontTable > FontTablePtr; }} diff --git a/writerfilter/source/dmapper/GraphicHelpers.cxx b/writerfilter/source/dmapper/GraphicHelpers.cxx index c77f2dd55d3e..76ef4c7257ff 100644 --- a/writerfilter/source/dmapper/GraphicHelpers.cxx +++ b/writerfilter/source/dmapper/GraphicHelpers.cxx @@ -8,6 +8,8 @@ #include <com/sun/star/text/RelOrientation.hpp> #include <com/sun/star/text/WrapTextMode.hpp> +#include "dmapperLoggers.hxx" + #include <iostream> using namespace std; @@ -17,7 +19,7 @@ namespace dmapper { using namespace com::sun::star; PositionHandler::PositionHandler( ) : - Properties( ) +LoggedProperties(dmapper_logger, "PositionHandler") { m_nOrient = text::VertOrientation::NONE; m_nRelation = text::RelOrientation::FRAME; @@ -28,7 +30,7 @@ PositionHandler::~PositionHandler( ) { } -void PositionHandler::attribute( Id aName, Value& rVal ) +void PositionHandler::lcl_attribute( Id aName, Value& rVal ) { sal_Int32 nIntValue = rVal.getInt( ); switch ( aName ) @@ -85,11 +87,15 @@ void PositionHandler::attribute( Id aName, Value& rVal ) } } break; - default:; + default: +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->element("unhandled"); +#endif + break; } } -void PositionHandler::sprm( Sprm& rSprm ) +void PositionHandler::lcl_sprm( Sprm& rSprm ) { Value::Pointer_t pValue = rSprm.getValue(); sal_Int32 nIntValue = pValue->getInt(); @@ -153,12 +159,16 @@ void PositionHandler::sprm( Sprm& rSprm ) case NS_ooxml::LN_CT_PosH_posOffset: case NS_ooxml::LN_CT_PosV_posOffset: m_nPosition = ConversionHelper::convertEMUToMM100( nIntValue ); - default:; + default: +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->element("unhandled"); +#endif + break; } } WrapHandler::WrapHandler( ) : - Properties( ), +LoggedProperties(dmapper_logger, "WrapHandler"), m_nType( 0 ), m_nSide( 0 ) { @@ -168,7 +178,7 @@ WrapHandler::~WrapHandler( ) { } -void WrapHandler::attribute( Id aName, Value& rVal ) +void WrapHandler::lcl_attribute( Id aName, Value& rVal ) { switch ( aName ) { @@ -182,7 +192,7 @@ void WrapHandler::attribute( Id aName, Value& rVal ) } } -void WrapHandler::sprm( Sprm& ) +void WrapHandler::lcl_sprm( Sprm& ) { } diff --git a/writerfilter/source/dmapper/GraphicHelpers.hxx b/writerfilter/source/dmapper/GraphicHelpers.hxx index fb8f8b2455ee..7127ccf22c1f 100644 --- a/writerfilter/source/dmapper/GraphicHelpers.hxx +++ b/writerfilter/source/dmapper/GraphicHelpers.hxx @@ -4,7 +4,7 @@ #include "PropertyMap.hxx" #include <WriterFilterDllApi.hxx> -#include <resourcemodel/WW8ResourceModel.hxx> +#include <resourcemodel/LoggedResources.hxx> #include <boost/shared_ptr.hpp> @@ -12,7 +12,7 @@ namespace writerfilter { namespace dmapper { -class WRITERFILTER_DLLPRIVATE PositionHandler: public Properties +class WRITERFILTER_DLLPRIVATE PositionHandler: public LoggedProperties { public: PositionHandler( ); @@ -22,12 +22,13 @@ public: sal_Int16 m_nRelation; sal_Int32 m_nPosition; - virtual void attribute( Id aName, Value& rVal ); - virtual void sprm( Sprm& rSprm ); + private: + virtual void lcl_attribute( Id aName, Value& rVal ); + virtual void lcl_sprm( Sprm& rSprm ); }; typedef boost::shared_ptr<PositionHandler> PositionHandlerPtr; -class WRITERFILTER_DLLPRIVATE WrapHandler: public Properties +class WRITERFILTER_DLLPRIVATE WrapHandler: public LoggedProperties { public: WrapHandler( ); @@ -38,8 +39,9 @@ public: sal_Int32 getWrapMode( ); - virtual void attribute( Id aName, Value& rVal ); - virtual void sprm( Sprm& rSprm ); + private: + virtual void lcl_attribute( Id aName, Value& rVal ); + virtual void lcl_sprm( Sprm& rSprm ); }; typedef boost::shared_ptr<WrapHandler> WrapHandlerPtr; diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx index 14a54c640626..beae39a68a29 100644 --- a/writerfilter/source/dmapper/GraphicImport.cxx +++ b/writerfilter/source/dmapper/GraphicImport.cxx @@ -25,54 +25,51 @@ * ************************************************************************/ -#include "GraphicImport.hxx" -#include "GraphicHelpers.hxx" +#include <string.h> -#include <dmapper/DomainMapper.hxx> -#include <PropertyMap.hxx> -#include <doctok/resourceids.hxx> -#include <ooxml/resourceids.hxx> -#include <ConversionHelper.hxx> -#include <com/sun/star/uno/XComponentContext.hpp> -#include <com/sun/star/io/XInputStream.hpp> -#include <cppuhelper/implbase1.hxx> #include <com/sun/star/awt/Size.hpp> #include <com/sun/star/container/XNamed.hpp> #include <com/sun/star/drawing/ColorMode.hpp> - -#include <com/sun/star/graphic/XGraphicProvider.hpp> +#include <com/sun/star/drawing/PointSequenceSequence.hpp> +#include <com/sun/star/drawing/XShape.hpp> #include <com/sun/star/graphic/XGraphic.hpp> +#include <com/sun/star/graphic/XGraphicProvider.hpp> +#include <com/sun/star/io/XInputStream.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/table/BorderLine.hpp> #include <com/sun/star/text/GraphicCrop.hpp> -#include <com/sun/star/text/XTextContent.hpp> -#include <com/sun/star/text/TextContentAnchorType.hpp> #include <com/sun/star/text/HoriOrientation.hpp> #include <com/sun/star/text/RelOrientation.hpp> +#include <com/sun/star/text/TextContentAnchorType.hpp> #include <com/sun/star/text/VertOrientation.hpp> #include <com/sun/star/text/WrapTextMode.hpp> -#include <com/sun/star/drawing/XShape.hpp> -#include <rtl/ustrbuf.hxx> +#include <com/sun/star/text/XTextContent.hpp> +#include <com/sun/star/uno/XComponentContext.hpp> +#include <cppuhelper/implbase1.hxx> +#include <rtl/ustrbuf.hxx> -#include <iostream> -#include <resourcemodel/QNameToString.hxx> -#include <string.h> +#include <dmapper/DomainMapper.hxx> +#include <doctok/resourceids.hxx> +#include <ooxml/resourceids.hxx> +#include <resourcemodel/ResourceModelHelper.hxx> -#ifdef DEBUG_DOMAINMAPPER -#include <resourcemodel/TagLogger.hxx> -#endif +#include "ConversionHelper.hxx" +#include "GraphicHelpers.hxx" +#include "GraphicImport.hxx" +#include "PropertyMap.hxx" +#include "WrapPolygonHandler.hxx" +#include "dmapperLoggers.hxx" namespace writerfilter { + +using resourcemodel::resolveSprmProps; + namespace dmapper { using namespace ::std; using namespace ::com::sun::star; -#ifdef DEBUG_DOMAINMAPPER -extern TagLogger::Pointer_t dmapper_logger; -#endif - class XInputStreamHelper : public cppu::WeakImplHelper1 < io::XInputStream > { @@ -230,6 +227,8 @@ public: sal_Int32 nWrap; bool bOpaque; bool bContour; + bool bContourOutside; + WrapPolygon::Pointer_t mpWrapPolygon; bool bIgnoreWRK; sal_Int32 nLeftMargin; @@ -292,6 +291,7 @@ public: ,nWrap(0) ,bOpaque( true ) ,bContour(false) + ,bContourOutside(true) ,bIgnoreWRK(true) ,nLeftMargin(319) ,nRightMargin(319) @@ -354,9 +354,12 @@ GraphicImport::GraphicImport(uno::Reference < uno::XComponentContext > xCompo uno::Reference< lang::XMultiServiceFactory > xTextFactory, DomainMapper& rDMapper, GraphicImportType eImportType ) -: m_pImpl( new GraphicImport_Impl( eImportType, rDMapper )) - ,m_xComponentContext( xComponentContext ) - ,m_xTextFactory( xTextFactory) +: LoggedProperties(dmapper_logger, "GraphicImport") +, LoggedTable(dmapper_logger, "GraphicImport") +, LoggedStream(dmapper_logger, "GraphicImport") +, m_pImpl( new GraphicImport_Impl( eImportType, rDMapper )) +, m_xComponentContext( xComponentContext ) +, m_xTextFactory( xTextFactory) { } /*-- 01.11.2006 09:42:42--------------------------------------------------- @@ -366,15 +369,32 @@ GraphicImport::~GraphicImport() { delete m_pImpl; } + +void GraphicImport::handleWrapTextValue(sal_uInt32 nVal) +{ + switch (nVal) + { + case NS_ooxml::LN_Value_wordprocessingDrawing_ST_WrapText_bothSides: // 90920; + m_pImpl->nWrap = text::WrapTextMode_PARALLEL; + break; + case NS_ooxml::LN_Value_wordprocessingDrawing_ST_WrapText_left: // 90921; + m_pImpl->nWrap = text::WrapTextMode_LEFT; + break; + case NS_ooxml::LN_Value_wordprocessingDrawing_ST_WrapText_right: // 90922; + m_pImpl->nWrap = text::WrapTextMode_RIGHT; + break; + case NS_ooxml::LN_Value_wordprocessingDrawing_ST_WrapText_largest: // 90923; + m_pImpl->nWrap = text::WrapTextMode_DYNAMIC; + break; + default:; + } +} + /*-- 01.11.2006 09:45:01--------------------------------------------------- -----------------------------------------------------------------------*/ -void GraphicImport::attribute(Id nName, Value & val) +void GraphicImport::lcl_attribute(Id nName, Value & val) { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("attribute"); - dmapper_logger->attribute("name", (*QNameToString::Instance())(nName)); -#endif sal_Int32 nIntValue = val.getInt(); /* WRITERFILTERSTATUS: table: PICFattribute */ switch( nName ) @@ -1018,26 +1038,24 @@ void GraphicImport::attribute(Id nName, Value & val) case NS_ooxml::LN_CT_WrapTight_wrapText: // 90934; /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ m_pImpl->bContour = true; - //no break; + m_pImpl->bContourOutside = true; + + handleWrapTextValue(val.getInt()); + + break; + case NS_ooxml::LN_CT_WrapThrough_wrapText: + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ + m_pImpl->bContour = true; + m_pImpl->bContourOutside = false; + + handleWrapTextValue(val.getInt()); + + break; case NS_ooxml::LN_CT_WrapSquare_wrapText: //90928; /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ - switch ( val.getInt() ) - { - case NS_ooxml::LN_Value_wordprocessingDrawing_ST_WrapText_bothSides: // 90920; - m_pImpl->nWrap = text::WrapTextMode_PARALLEL; - break; - case NS_ooxml::LN_Value_wordprocessingDrawing_ST_WrapText_left: // 90921; - m_pImpl->nWrap = text::WrapTextMode_LEFT; - break; - case NS_ooxml::LN_Value_wordprocessingDrawing_ST_WrapText_right: // 90922; - m_pImpl->nWrap = text::WrapTextMode_RIGHT; - break; - case NS_ooxml::LN_Value_wordprocessingDrawing_ST_WrapText_largest: // 90923; - m_pImpl->nWrap = text::WrapTextMode_DYNAMIC; - break; - default:; - } - break; + + handleWrapTextValue(val.getInt()); + break; case NS_ooxml::LN_shape: /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ { @@ -1130,18 +1148,11 @@ void GraphicImport::attribute(Id nName, Value & val) //TODO: does it need to be handled? break; default: -#if OSL_DEBUG_LEVEL > 0 - ::rtl::OString sMessage( "GraphicImport::attribute() - Id: "); - sMessage += ::rtl::OString::valueOf( sal_Int32( nName ), 10 ); - sMessage += ::rtl::OString(" / 0x"); - sMessage += ::rtl::OString::valueOf( sal_Int32( nName ), 16 ); - OSL_ENSURE( false, sMessage.getStr()) +#ifdef DEBUG_DMAPPER_GRAPHIC_IMPORT + dmapper_logger->element("unhandled"); #endif ; } -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->endElement("attribute"); -#endif } uno::Reference<text::XTextContent> GraphicImport::GetGraphicObject() @@ -1357,13 +1368,8 @@ void GraphicImport::ProcessShapeOptions(Value& val) /*-- 01.11.2006 09:45:02--------------------------------------------------- -----------------------------------------------------------------------*/ -void GraphicImport::sprm(Sprm & rSprm) +void GraphicImport::lcl_sprm(Sprm & rSprm) { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("sprm"); - dmapper_logger->chars(rSprm.toString()); -#endif - sal_uInt32 nSprmId = rSprm.getId(); Value::Pointer_t pValue = rSprm.getValue(); @@ -1386,12 +1392,12 @@ void GraphicImport::sprm(Sprm & rSprm) case NS_ooxml::LN_CT_Anchor_effectExtent: // 90979; case NS_ooxml::LN_EG_WrapType_wrapSquare: // 90945; case NS_ooxml::LN_EG_WrapType_wrapTight: // 90946; + case NS_ooxml::LN_EG_WrapType_wrapThrough: case NS_ooxml::LN_CT_Anchor_docPr: // 90980; case NS_ooxml::LN_CT_Anchor_cNvGraphicFramePr: // 90981; case NS_ooxml::LN_CT_Anchor_a_graphic: // 90982; case NS_ooxml::LN_CT_WrapPath_start: // 90924; case NS_ooxml::LN_CT_WrapPath_lineTo: // 90925; - case NS_ooxml::LN_CT_WrapTight_wrapPolygon: // 90933; case NS_ooxml::LN_graphic_graphic: case NS_ooxml::LN_pic_pic: /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ @@ -1403,6 +1409,17 @@ void GraphicImport::sprm(Sprm & rSprm) } } break; + case NS_ooxml::LN_CT_WrapTight_wrapPolygon: + case NS_ooxml::LN_CT_WrapThrough_wrapPolygon: + /* WRITERFILTERSTATUS: done: 100, planned: 4, spent: 2 */ + { + WrapPolygonHandler aHandler; + + resolveSprmProps(aHandler, rSprm); + + m_pImpl->mpWrapPolygon = aHandler.getPolygon(); + } + break; case NS_ooxml::LN_CT_Anchor_positionH: // 90976; { // Use a special handler for the positionning @@ -1453,10 +1470,6 @@ void GraphicImport::sprm(Sprm & rSprm) /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ m_pImpl->nWrap = text::WrapTextMode_NONE; break; - case NS_ooxml::LN_EG_WrapType_wrapThrough: // 90947; - /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ - m_pImpl->nWrap = text::WrapTextMode_THROUGHT; - break; case 0xf010: case 0xf011: //ignore - doesn't contain useful members @@ -1481,17 +1494,11 @@ void GraphicImport::sprm(Sprm & rSprm) #endif ; } - - - -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->endElement("sprm"); -#endif } /*-- 01.11.2006 09:45:02--------------------------------------------------- -----------------------------------------------------------------------*/ -void GraphicImport::entry(int /*pos*/, writerfilter::Reference<Properties>::Pointer_t /*ref*/) +void GraphicImport::lcl_entry(int /*pos*/, writerfilter::Reference<Properties>::Pointer_t /*ref*/) { } /*-- 16.11.2006 16:14:32--------------------------------------------------- @@ -1640,7 +1647,7 @@ uno::Reference< text::XTextContent > GraphicImport::createGraphicObject( const b xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_SURROUND_CONTOUR ), uno::makeAny(m_pImpl->bContour)); xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_CONTOUR_OUTSIDE ), - uno::makeAny(true)); + uno::makeAny(m_pImpl->bContourOutside)); xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_LEFT_MARGIN ), uno::makeAny(m_pImpl->nLeftMargin)); xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_RIGHT_MARGIN ), @@ -1650,8 +1657,6 @@ uno::Reference< text::XTextContent > GraphicImport::createGraphicObject( const b xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_BOTTOM_MARGIN ), uno::makeAny(m_pImpl->nBottomMargin)); - xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_CONTOUR_POLY_POLYGON), - uno::Any()); if( m_pImpl->eColorMode == drawing::ColorMode_STANDARD && m_pImpl->nContrast == -70 && m_pImpl->nBrightness == 70 ) @@ -1679,16 +1684,31 @@ uno::Reference< text::XTextContent > GraphicImport::createGraphicObject( const b xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_HORI_MIRRORED_ON_ODD_PAGES ), uno::makeAny( m_pImpl->bHoriFlip )); } + if( m_pImpl->bVertFlip ) xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_VERT_MIRRORED ), uno::makeAny( m_pImpl->bVertFlip )); xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_BACK_COLOR ), uno::makeAny( m_pImpl->nFillColor )); + //there seems to be no way to detect the original size via _real_ API uno::Reference< beans::XPropertySet > xGraphicProperties( xGraphic, uno::UNO_QUERY_THROW ); awt::Size aGraphicSize, aGraphicSizePixel; xGraphicProperties->getPropertyValue(rPropNameSupplier.GetName( PROP_SIZE100th_M_M )) >>= aGraphicSize; xGraphicProperties->getPropertyValue(rPropNameSupplier.GetName( PROP_SIZE_PIXEL )) >>= aGraphicSizePixel; + + uno::Any aContourPolyPolygon; + if( aGraphicSize.Width && aGraphicSize.Height && + m_pImpl->mpWrapPolygon.get() != NULL) + { + awt::Size aDstSize(m_pImpl->getXSize(), m_pImpl->getYSize()); + WrapPolygon::Pointer_t pCorrected = m_pImpl->mpWrapPolygon->correctWordWrapPolygon(aGraphicSize, aDstSize); + aContourPolyPolygon <<= pCorrected->getPointSequenceSequence(); + } + + xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_CONTOUR_POLY_POLYGON), + aContourPolyPolygon); + if( aGraphicSize.Width && aGraphicSize.Height ) { //todo: i71651 graphic size is not provided by the GraphicDescriptor @@ -1697,9 +1717,11 @@ uno::Reference< text::XTextContent > GraphicImport::createGraphicObject( const b lcl_CalcCrop( m_pImpl->nLeftCrop, aGraphicSize.Width ); lcl_CalcCrop( m_pImpl->nRightCrop, aGraphicSize.Width ); + xGraphicProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_GRAPHIC_CROP ), uno::makeAny(text::GraphicCrop(m_pImpl->nTopCrop, m_pImpl->nBottomCrop, m_pImpl->nLeftCrop, m_pImpl->nRightCrop))); } + } if(m_pImpl->eGraphicImportType == IMPORT_AS_DETECTED_INLINE || m_pImpl->eGraphicImportType == IMPORT_AS_DETECTED_ANCHOR) @@ -1747,81 +1769,81 @@ void GraphicImport::data(const sal_uInt8* buf, size_t len, writerfilter::Referen /*-- 01.11.2006 09:45:03--------------------------------------------------- -----------------------------------------------------------------------*/ -void GraphicImport::startSectionGroup() +void GraphicImport::lcl_startSectionGroup() { } /*-- 01.11.2006 09:45:03--------------------------------------------------- -----------------------------------------------------------------------*/ -void GraphicImport::endSectionGroup() +void GraphicImport::lcl_endSectionGroup() { } /*-- 01.11.2006 09:45:03--------------------------------------------------- -----------------------------------------------------------------------*/ -void GraphicImport::startParagraphGroup() +void GraphicImport::lcl_startParagraphGroup() { } /*-- 01.11.2006 09:45:03--------------------------------------------------- -----------------------------------------------------------------------*/ -void GraphicImport::endParagraphGroup() +void GraphicImport::lcl_endParagraphGroup() { } /*-- 01.11.2006 09:45:03--------------------------------------------------- -----------------------------------------------------------------------*/ -void GraphicImport::startCharacterGroup() +void GraphicImport::lcl_startCharacterGroup() { } /*-- 01.11.2006 09:45:04--------------------------------------------------- -----------------------------------------------------------------------*/ -void GraphicImport::endCharacterGroup() +void GraphicImport::lcl_endCharacterGroup() { } /*-- 01.11.2006 09:45:04--------------------------------------------------- -----------------------------------------------------------------------*/ -void GraphicImport::text(const sal_uInt8 * /*_data*/, size_t /*len*/) +void GraphicImport::lcl_text(const sal_uInt8 * /*_data*/, size_t /*len*/) { } /*-- 01.11.2006 09:45:05--------------------------------------------------- -----------------------------------------------------------------------*/ -void GraphicImport::utext(const sal_uInt8 * /*_data*/, size_t /*len*/) +void GraphicImport::lcl_utext(const sal_uInt8 * /*_data*/, size_t /*len*/) { } /*-- 01.11.2006 09:45:05--------------------------------------------------- -----------------------------------------------------------------------*/ -void GraphicImport::props(writerfilter::Reference<Properties>::Pointer_t /*ref*/) +void GraphicImport::lcl_props(writerfilter::Reference<Properties>::Pointer_t /*ref*/) { } /*-- 01.11.2006 09:45:06--------------------------------------------------- -----------------------------------------------------------------------*/ -void GraphicImport::table(Id /*name*/, writerfilter::Reference<Table>::Pointer_t /*ref*/) +void GraphicImport::lcl_table(Id /*name*/, writerfilter::Reference<Table>::Pointer_t /*ref*/) { } /*-- 01.11.2006 09:45:07--------------------------------------------------- -----------------------------------------------------------------------*/ -void GraphicImport::substream(Id /*name*/, ::writerfilter::Reference<Stream>::Pointer_t /*ref*/) +void GraphicImport::lcl_substream(Id /*name*/, ::writerfilter::Reference<Stream>::Pointer_t /*ref*/) { } /*-- 01.11.2006 09:45:07--------------------------------------------------- -----------------------------------------------------------------------*/ -void GraphicImport::info(const string & /*info*/) +void GraphicImport::lcl_info(const string & /*info*/) { } -void GraphicImport::startShape( ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > /*xShape*/ ) +void GraphicImport::lcl_startShape( ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > /*xShape*/ ) { } -void GraphicImport::endShape( ) +void GraphicImport::lcl_endShape( ) { } diff --git a/writerfilter/source/dmapper/GraphicImport.hxx b/writerfilter/source/dmapper/GraphicImport.hxx index 14f512a3d4ee..87e99ce975b6 100644 --- a/writerfilter/source/dmapper/GraphicImport.hxx +++ b/writerfilter/source/dmapper/GraphicImport.hxx @@ -30,7 +30,7 @@ //#ifndef INCLUDED_WRITERFILTERDLLAPI_H //#include <WriterFilterDllApi.hxx> //#endif -#include <resourcemodel/WW8ResourceModel.hxx> +#include <resourcemodel/LoggedResources.hxx> //#include <com/sun/star/lang/XComponent.hpp> namespace com{ namespace sun { namespace star { namespace uno{ @@ -69,8 +69,8 @@ enum GraphicImportType IMPORT_AS_DETECTED_ANCHOR }; -class WRITERFILTER_DLLPRIVATE GraphicImport : public Properties, public Table - ,public BinaryObj, public Stream +class WRITERFILTER_DLLPRIVATE GraphicImport : public LoggedProperties, public LoggedTable + ,public BinaryObj, public LoggedStream { GraphicImport_Impl* m_pImpl; ::com::sun::star::uno::Reference < ::com::sun::star::uno::XComponentContext > m_xComponentContext; @@ -91,37 +91,41 @@ public: GraphicImportType eGraphicImportType); virtual ~GraphicImport(); + // BinaryObj + virtual void data(const sal_uInt8* buf, size_t len, writerfilter::Reference<Properties>::Pointer_t ref); + + ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > GetGraphicObject(); + bool IsGraphic() const; + + private: // Properties - virtual void attribute(Id Name, Value & val); - virtual void sprm(Sprm & sprm); + virtual void lcl_attribute(Id Name, Value & val); + virtual void lcl_sprm(Sprm & sprm); // Table - virtual void entry(int pos, writerfilter::Reference<Properties>::Pointer_t ref); - - // BinaryObj - virtual void data(const sal_uInt8* buf, size_t len, writerfilter::Reference<Properties>::Pointer_t ref); + virtual void lcl_entry(int pos, writerfilter::Reference<Properties>::Pointer_t ref); // Stream - virtual void startSectionGroup(); - virtual void endSectionGroup(); - virtual void startParagraphGroup(); - virtual void endParagraphGroup(); - virtual void startCharacterGroup(); - virtual void endCharacterGroup(); - virtual void text(const sal_uInt8 * data, size_t len); - virtual void utext(const sal_uInt8 * data, size_t len); - virtual void props(writerfilter::Reference<Properties>::Pointer_t ref); - virtual void table(Id name, - writerfilter::Reference<Table>::Pointer_t ref); - virtual void substream(Id name, - ::writerfilter::Reference<Stream>::Pointer_t ref); - virtual void info(const string & info); - virtual void startShape( ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > xShape ); - virtual void endShape( ); + virtual void lcl_startSectionGroup(); + virtual void lcl_endSectionGroup(); + virtual void lcl_startParagraphGroup(); + virtual void lcl_endParagraphGroup(); + virtual void lcl_startCharacterGroup(); + virtual void lcl_endCharacterGroup(); + virtual void lcl_text(const sal_uInt8 * data, size_t len); + virtual void lcl_utext(const sal_uInt8 * data, size_t len); + virtual void lcl_props(writerfilter::Reference<Properties>::Pointer_t ref); + virtual void lcl_table(Id name, + writerfilter::Reference<Table>::Pointer_t ref); + virtual void lcl_substream(Id name, + ::writerfilter::Reference<Stream>::Pointer_t ref); + virtual void lcl_info(const string & info); + virtual void lcl_startShape( ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > xShape ); + virtual void lcl_endShape( ); - ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > GetGraphicObject(); - bool IsGraphic() const; + void handleWrapTextValue(sal_uInt32 nVal); }; + typedef boost::shared_ptr< GraphicImport > GraphicImportPtr; }} diff --git a/writerfilter/source/dmapper/MeasureHandler.cxx b/writerfilter/source/dmapper/MeasureHandler.cxx index 58f3980063ee..e34a6896ea0d 100644 --- a/writerfilter/source/dmapper/MeasureHandler.cxx +++ b/writerfilter/source/dmapper/MeasureHandler.cxx @@ -30,6 +30,7 @@ #include <ConversionHelper.hxx> #include <ooxml/resourceids.hxx> #include <com/sun/star/text/SizeType.hpp> +#include "dmapperLoggers.hxx" namespace writerfilter { namespace dmapper { @@ -40,9 +41,10 @@ using namespace ::com::sun::star; -----------------------------------------------------------------------*/ MeasureHandler::MeasureHandler() : - m_nMeasureValue( 0 ), - m_nUnit( -1 ), - m_nRowHeightSizeType( text::SizeType::MIN ) +LoggedProperties(dmapper_logger, "MeasureHandler"), +m_nMeasureValue( 0 ), +m_nUnit( -1 ), +m_nRowHeightSizeType( text::SizeType::MIN ) { } /*-- 24.04.2007 09:06:35--------------------------------------------------- @@ -54,7 +56,7 @@ MeasureHandler::~MeasureHandler() /*-- 24.04.2007 09:06:35--------------------------------------------------- -----------------------------------------------------------------------*/ -void MeasureHandler::attribute(Id rName, Value & rVal) +void MeasureHandler::lcl_attribute(Id rName, Value & rVal) { sal_Int32 nIntValue = rVal.getInt(); (void)rName; @@ -99,7 +101,7 @@ void MeasureHandler::attribute(Id rName, Value & rVal) /*-- 24.04.2007 09:06:35--------------------------------------------------- -----------------------------------------------------------------------*/ -void MeasureHandler::sprm(Sprm & rSprm) +void MeasureHandler::lcl_sprm(Sprm & rSprm) { (void)rSprm; } diff --git a/writerfilter/source/dmapper/MeasureHandler.hxx b/writerfilter/source/dmapper/MeasureHandler.hxx index 574685f8ed27..25a38a4862f3 100644 --- a/writerfilter/source/dmapper/MeasureHandler.hxx +++ b/writerfilter/source/dmapper/MeasureHandler.hxx @@ -28,7 +28,7 @@ #define INCLUDED_MEASUREHANDLER_HXX #include <WriterFilterDllApi.hxx> -#include <resourcemodel/WW8ResourceModel.hxx> +#include <resourcemodel/LoggedResources.hxx> #include <boost/shared_ptr.hpp> namespace writerfilter { @@ -39,20 +39,20 @@ class PropertyMap; - Left indent of tables - Preferred width of tables */ -class WRITERFILTER_DLLPRIVATE MeasureHandler : public Properties +class WRITERFILTER_DLLPRIVATE MeasureHandler : public LoggedProperties { sal_Int32 m_nMeasureValue; sal_Int32 m_nUnit; sal_Int16 m_nRowHeightSizeType; //table row height type + // Properties + virtual void lcl_attribute(Id Name, Value & val); + virtual void lcl_sprm(Sprm & sprm); + public: MeasureHandler(); virtual ~MeasureHandler(); - // Properties - virtual void attribute(Id Name, Value & val); - virtual void sprm(Sprm & sprm); - sal_Int32 getMeasureValue() const; //at least tables can have automatic width bool isAutoWidth() const; diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx index 8cc031ea1d09..9e66e1a467c3 100644 --- a/writerfilter/source/dmapper/NumberingManager.cxx +++ b/writerfilter/source/dmapper/NumberingManager.cxx @@ -1,3 +1,29 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ #include "ConversionHelper.hxx" #include "NumberingManager.hxx" #include "StyleSheetTable.hxx" @@ -19,6 +45,8 @@ #include <stdio.h> #endif +#include "dmapperLoggers.hxx" + using namespace rtl; using namespace com::sun::star; @@ -614,10 +642,12 @@ void ListDef::CreateNumberingRules( DomainMapper& rDMapper, //------------------------------------- NumberingManager implementation -ListsManager::ListsManager( DomainMapper& rDMapper, - const uno::Reference< lang::XMultiServiceFactory > xFactory ) : - m_rDMapper( rDMapper ), - m_xFactory( xFactory ) +ListsManager::ListsManager(DomainMapper& rDMapper, + const uno::Reference< lang::XMultiServiceFactory > xFactory) : +LoggedProperties(dmapper_logger, "ListsManager"), +LoggedTable(dmapper_logger, "ListsManager"), +m_rDMapper( rDMapper ), +m_xFactory( xFactory ) { } @@ -625,7 +655,7 @@ ListsManager::~ListsManager( ) { } -void ListsManager::attribute( Id nName, Value& rVal ) +void ListsManager::lcl_attribute( Id nName, Value& rVal ) { OSL_ENSURE( m_pCurrentDefinition.get(), "current entry has to be set here"); if(!m_pCurrentDefinition.get()) @@ -764,7 +794,7 @@ void ListsManager::attribute( Id nName, Value& rVal ) } } -void ListsManager::sprm( Sprm& rSprm ) +void ListsManager::lcl_sprm( Sprm& rSprm ) { //fill the attributes of the style sheet sal_uInt32 nSprmId = rSprm.getId(); @@ -939,8 +969,8 @@ void ListsManager::sprm( Sprm& rSprm ) } } -void ListsManager::entry( int /* pos */, - writerfilter::Reference<Properties>::Pointer_t ref ) +void ListsManager::lcl_entry( int /* pos */, + writerfilter::Reference<Properties>::Pointer_t ref ) { if( m_rDMapper.IsOOXMLImport() ) { diff --git a/writerfilter/source/dmapper/NumberingManager.hxx b/writerfilter/source/dmapper/NumberingManager.hxx index a7970fca531c..3285bc85f416 100644 --- a/writerfilter/source/dmapper/NumberingManager.hxx +++ b/writerfilter/source/dmapper/NumberingManager.hxx @@ -1,3 +1,29 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ #ifndef INCLUDED_NUMBERINGMANAGER_HXX #define INCLUDED_NUMBERINGMANAGER_HXX @@ -5,7 +31,7 @@ #include <WriterFilterDllApi.hxx> #include <dmapper/DomainMapper.hxx> -#include <resourcemodel/WW8ResourceModel.hxx> +#include <resourcemodel/LoggedResources.hxx> #include <com/sun/star/container/XIndexReplace.hpp> @@ -170,8 +196,8 @@ public: /** This class provides access to the defined numbering styles. */ class ListsManager : - public Properties, - public Table + public LoggedProperties, + public LoggedTable { private: @@ -190,6 +216,13 @@ private: AbstractListDef::Pointer GetAbstractList( sal_Int32 nId ); + // Properties + virtual void lcl_attribute( Id nName, Value & rVal ); + virtual void lcl_sprm(Sprm & sprm); + + // Table + virtual void lcl_entry(int pos, writerfilter::Reference<Properties>::Pointer_t ref); + public: ListsManager( @@ -199,13 +232,6 @@ public: typedef boost::shared_ptr< ListsManager > Pointer; - // Properties - virtual void attribute( Id nName, Value & rVal ); - virtual void sprm(Sprm & sprm); - - // Table - virtual void entry(int pos, writerfilter::Reference<Properties>::Pointer_t ref); - // Config methods void SetLFOImport( bool bLFOImport ) { m_bIsLFOImport = bLFOImport; }; diff --git a/writerfilter/source/dmapper/OLEHandler.cxx b/writerfilter/source/dmapper/OLEHandler.cxx index 65f76f11cbfc..89ee01ecb9a0 100644 --- a/writerfilter/source/dmapper/OLEHandler.cxx +++ b/writerfilter/source/dmapper/OLEHandler.cxx @@ -44,6 +44,8 @@ #include <com/sun/star/text/XTextDocument.hpp> #include <com/sun/star/uno/XComponentContext.hpp> +#include "dmapperLoggers.hxx" + namespace writerfilter { namespace dmapper { @@ -52,9 +54,10 @@ using namespace ::com::sun::star; -----------------------------------------------------------------------*/ OLEHandler::OLEHandler() : - m_nDxaOrig(0), - m_nDyaOrig(0), - m_nWrapMode(0) +LoggedProperties(dmapper_logger, "OLEHandler"), +m_nDxaOrig(0), +m_nDyaOrig(0), +m_nWrapMode(0) { } /*-- 23.04.2008 10:46:14--------------------------------------------------- @@ -66,7 +69,7 @@ OLEHandler::~OLEHandler() /*-- 23.04.2008 10:46:14--------------------------------------------------- -----------------------------------------------------------------------*/ -void OLEHandler::attribute(Id rName, Value & rVal) +void OLEHandler::lcl_attribute(Id rName, Value & rVal) { rtl::OUString sStringValue = rVal.getString(); (void)rName; @@ -141,7 +144,7 @@ void OLEHandler::attribute(Id rName, Value & rVal) /*-- 23.04.2008 10:46:14--------------------------------------------------- -----------------------------------------------------------------------*/ -void OLEHandler::sprm(Sprm & rSprm) +void OLEHandler::lcl_sprm(Sprm & rSprm) { sal_uInt32 nSprmId = rSprm.getId(); switch( nSprmId ) diff --git a/writerfilter/source/dmapper/OLEHandler.hxx b/writerfilter/source/dmapper/OLEHandler.hxx index f9059fb6a35a..cddbac5475bc 100644 --- a/writerfilter/source/dmapper/OLEHandler.hxx +++ b/writerfilter/source/dmapper/OLEHandler.hxx @@ -30,7 +30,7 @@ #ifndef INCLUDED_WRITERFILTERDLLAPI_H #include <WriterFilterDllApi.hxx> #endif -#include <resourcemodel/WW8ResourceModel.hxx> +#include <resourcemodel/LoggedResources.hxx> #include <boost/shared_ptr.hpp> #include <com/sun/star/awt/Size.hpp> #include <com/sun/star/awt/Point.hpp> @@ -60,7 +60,7 @@ namespace dmapper //class PropertyMap; /** Handler for OLE objects */ -class WRITERFILTER_DLLPRIVATE OLEHandler : public Properties +class WRITERFILTER_DLLPRIVATE OLEHandler : public LoggedProperties { ::rtl::OUString m_sObjectType; ::rtl::OUString m_sProgId; @@ -81,14 +81,15 @@ class WRITERFILTER_DLLPRIVATE OLEHandler : public Properties ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > m_xReplacement; ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > m_xInputStream; + + // Properties + virtual void lcl_attribute(Id Name, Value & val); + virtual void lcl_sprm(Sprm & sprm); + public: OLEHandler(); virtual ~OLEHandler(); - // Properties - virtual void attribute(Id Name, Value & val); - virtual void sprm(Sprm & sprm); - inline ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > getShape( ) { return m_xShape; }; inline bool isOLEObject( ) { return m_xInputStream.is( ); }; diff --git a/writerfilter/source/dmapper/PageBordersHandler.cxx b/writerfilter/source/dmapper/PageBordersHandler.cxx index 725502843982..21798d684b5d 100644 --- a/writerfilter/source/dmapper/PageBordersHandler.cxx +++ b/writerfilter/source/dmapper/PageBordersHandler.cxx @@ -2,6 +2,8 @@ #include <ooxml/resourceids.hxx> +#include "dmapperLoggers.hxx" + namespace writerfilter { namespace dmapper { @@ -16,8 +18,9 @@ _PgBorder::~_PgBorder( ) } PageBordersHandler::PageBordersHandler( ) : - m_nDisplay( 0 ), - m_nOffset( 0 ) +LoggedProperties(dmapper_logger, "PageBordersHandler"), +m_nDisplay( 0 ), +m_nOffset( 0 ) { } @@ -25,7 +28,7 @@ PageBordersHandler::~PageBordersHandler( ) { } -void PageBordersHandler::attribute( Id eName, Value& rVal ) +void PageBordersHandler::lcl_attribute( Id eName, Value& rVal ) { int nIntValue = rVal.getInt( ); switch ( eName ) @@ -65,7 +68,7 @@ void PageBordersHandler::attribute( Id eName, Value& rVal ) } } -void PageBordersHandler::sprm( Sprm& rSprm ) +void PageBordersHandler::lcl_sprm( Sprm& rSprm ) { switch ( rSprm.getId( ) ) { diff --git a/writerfilter/source/dmapper/PageBordersHandler.hxx b/writerfilter/source/dmapper/PageBordersHandler.hxx index 327ccfc4f8d6..621f239b3038 100644 --- a/writerfilter/source/dmapper/PageBordersHandler.hxx +++ b/writerfilter/source/dmapper/PageBordersHandler.hxx @@ -5,7 +5,7 @@ #include "PropertyMap.hxx" #include <WriterFilterDllApi.hxx> -#include <resourcemodel/WW8ResourceModel.hxx> +#include <resourcemodel/LoggedResources.hxx> #include <boost/shared_ptr.hpp> #include <com/sun/star/table/BorderLine.hpp> @@ -27,7 +27,7 @@ public: ~_PgBorder( ); }; -class WRITERFILTER_DLLPRIVATE PageBordersHandler : public Properties +class WRITERFILTER_DLLPRIVATE PageBordersHandler : public LoggedProperties { private: @@ -36,14 +36,14 @@ private: sal_Int32 m_nOffset; vector<_PgBorder> m_aBorders; + // Properties + virtual void lcl_attribute( Id eName, Value& rVal ); + virtual void lcl_sprm( Sprm& rSprm ); + public: PageBordersHandler( ); ~PageBordersHandler( ); - // Properties - virtual void attribute( Id eName, Value& rVal ); - virtual void sprm( Sprm& rSprm ); - inline sal_Int32 GetDisplayOffset( ) { return ( m_nOffset << 5 ) + m_nDisplay; diff --git a/writerfilter/source/dmapper/PropertyIds.hxx b/writerfilter/source/dmapper/PropertyIds.hxx index 2066cf58f530..33107e7356d3 100644 --- a/writerfilter/source/dmapper/PropertyIds.hxx +++ b/writerfilter/source/dmapper/PropertyIds.hxx @@ -32,261 +32,261 @@ namespace rtl{ class OUString;} namespace writerfilter { namespace dmapper{ enum PropertyIds -{ + { PROP_ID_START = 1 - /* 1*/ ,PROP_CHAR_WEIGHT = PROP_ID_START - /* 2*/ ,PROP_CHAR_POSTURE - /* 3*/ ,PROP_CHAR_STRIKEOUT - /* 4*/ ,PROP_CHAR_CONTOURED - /* 5*/ ,PROP_CHAR_SHADOWED - /* 6*/ ,PROP_CHAR_CASE_MAP - /* 7*/ ,PROP_CHAR_COLOR - /* 8*/ ,PROP_CHAR_RELIEF - /* 9*/ ,PROP_CHAR_UNDERLINE - /*10*/ ,PROP_CHAR_WORD_MODE - /*11*/ ,PROP_CHAR_ESCAPEMENT - /*12*/ ,PROP_CHAR_ESCAPEMENT_HEIGHT - /*13*/ ,PROP_CHAR_HEIGHT - /*14*/ ,PROP_CHAR_HEIGHT_COMPLEX - /*15*/ ,PROP_CHAR_LOCALE - /*16*/ ,PROP_CHAR_LOCALE_ASIAN - /*17*/ ,PROP_CHAR_WEIGHT_COMPLEX - /*18*/ ,PROP_CHAR_POSTURE_COMPLEX - /*19*/ ,PROP_CHAR_AUTO_KERNING - /*20*/ ,PROP_CHAR_CHAR_KERNING - /*21*/ ,PROP_CHAR_SCALE_WIDTH - /*22*/ ,PROP_CHAR_LOCALE_COMPLEX - /*23*/ ,PROP_CHAR_UNDERLINE_COLOR -/*24*/ , PROP_CHAR_UNDERLINE_HAS_COLOR -/*25*/ , PROP_CHAR_FONT_NAME -/*26*/ , PROP_CHAR_FONT_STYLE -/*27*/ , PROP_CHAR_FONT_FAMILY -/*28*/ , PROP_CHAR_FONT_CHAR_SET -/*29*/ , PROP_CHAR_FONT_PITCH -/*30*/ , PROP_CHAR_FONT_NAME_ASIAN -/*31*/ , PROP_CHAR_HEIGHT_ASIAN -/*32*/ , PROP_CHAR_FONT_STYLE_ASIAN -/*33*/ , PROP_CHAR_FONT_FAMILY_ASIAN -/*34*/ , PROP_CHAR_FONT_CHAR_SET_ASIAN -/*35*/ , PROP_CHAR_FONT_PITCH_ASIAN -/*36*/ , PROP_CHAR_FONT_NAME_COMPLEX -/*37*/ , PROP_CHAR_FONT_STYLE_COMPLEX -/*38*/ , PROP_CHAR_FONT_FAMILY_COMPLEX -/*39*/ , PROP_CHAR_FONT_CHAR_SET_COMPLEX -/*40*/ , PROP_CHAR_FONT_PITCH_COMPLEX -/*41*/ , PROP_CHAR_HIDDEN -/*42*/ , PROP_CHAR_WEIGHT_ASIAN -/*43*/ , PROP_CHAR_POSTURE_ASIAN -/*44*/ , PROP_PARA_STYLE_NAME -/*45*/ , PROP_CHAR_STYLE_NAME -/*46*/ , PROP_PARA_ADJUST -/*47*/ , PROP_PARA_LAST_LINE_ADJUST -/*48*/ , PROP_PARA_RIGHT_MARGIN -/*49*/ , PROP_PARA_LEFT_MARGIN -/*50*/ , PROP_PARA_FIRST_LINE_INDENT -/*51*/ , PROP_PARA_KEEP_TOGETHER -/*52*/ , PROP_PARA_TOP_MARGIN -/*53*/ , PROP_PARA_BOTTOM_MARGIN -/*54*/ , PROP_PARA_IS_HYPHENATION -/*55*/ , PROP_PARA_LINE_NUMBER_COUNT -/*56*/ , PROP_PARA_IS_HANGING_PUNCTUATION -/*57*/ , PROP_PARA_LINE_SPACING -/*58*/ , PROP_PARA_TAB_STOPS -/*59*/ , PROP_PARA_WIDOWS -/*60*/ , PROP_PARA_ORPHANS -/*61*/ , PROP_PARA_LINE_NUMBER_START_VALUE -/*62*/ , PROP_NUMBERING_LEVEL -/*63*/ , PROP_NUMBERING_RULES -/*64*/ , PROP_NUMBERING_TYPE -/*65*/ , PROP_START_WITH -/*66*/ , PROP_ADJUST -/*67*/ , PROP_PARENT_NUMBERING -/*68*/ , PROP_LEFT_MARGIN -/*69*/ , PROP_RIGHT_MARGIN -/*70*/ , PROP_TOP_MARGIN -/*71*/ , PROP_BOTTOM_MARGIN -/*72*/ , PROP_FIRST_LINE_OFFSET -/*73*/ , PROP_LEFT_BORDER -/*74*/ , PROP_RIGHT_BORDER -/*75*/ , PROP_TOP_BORDER -/*76*/ , PROP_BOTTOM_BORDER -/*77*/ , PROP_TABLE_BORDER -/*78*/ , PROP_LEFT_BORDER_DISTANCE -/*79*/ , PROP_RIGHT_BORDER_DISTANCE -/*80*/ , PROP_TOP_BORDER_DISTANCE -/*81*/ , PROP_BOTTOM_BORDER_DISTANCE -/*82*/ , PROP_CURRENT_PRESENTATION -/*83*/ , PROP_IS_FIXED -/*84*/ , PROP_SUB_TYPE -/*85*/ , PROP_FILE_FORMAT -/*86*/ , PROP_HYPER_LINK_U_R_L -/*87*/ , PROP_NUMBER_FORMAT -/*88*/ , PROP_NAME -/*89*/ , PROP_IS_INPUT -/*90*/ , PROP_HINT -/*91*/ , PROP_FULL_NAME -/*92*/ , PROP_KEYWORDS -/*93*/ , PROP_DESCRIPTION -/*94*/ , PROP_MACRO_NAME -/*95*/ , PROP_SUBJECT -/*96*/ , PROP_USER_DATA_TYPE -/*97*/ , PROP_TITLE -/*98*/ , PROP_CONTENT -/*99*/ , PROP_DATA_COLUMN_NAME -/*100*/, PROP_INPUT_STREAM -/*101*/, PROP_GRAPHIC -/*102*/, PROP_ANCHOR_TYPE -/*103*/ ,PROP_SIZE -/*104*/ ,PROP_HORI_ORIENT -/*105*/ ,PROP_HORI_ORIENT_POSITION -/*106*/ ,PROP_HORI_ORIENT_RELATION -/*107*/ ,PROP_VERT_ORIENT -/*108*/ ,PROP_VERT_ORIENT_POSITION -/*109*/ ,PROP_VERT_ORIENT_RELATION -/*110*/ ,PROP_GRAPHIC_CROP -/*111*/ ,PROP_SIZE100th_M_M -/*112*/ ,PROP_SIZE_PIXEL -/*113*/ ,PROP_SURROUND -/*114*/ ,PROP_SURROUND_CONTOUR -/*115*/ ,PROP_ADJUST_CONTRAST -/*116*/ ,PROP_ADJUST_LUMINANCE -/*117*/ ,PROP_GRAPHIC_COLOR_MODE -/*118*/ ,PROP_GAMMA -/*119*/ ,PROP_HORI_MIRRORED_ON_EVEN_PAGES -/*120*/ ,PROP_HORI_MIRRORED_ON_ODD_PAGES -/*121*/ ,PROP_VERT_MIRRORED -/*122*/ ,PROP_CONTOUR_OUTSIDE -/*123*/ ,PROP_CONTOUR_POLY_POLYGON -/*124*/ ,PROP_PAGE_TOGGLE -/*125*/ ,PROP_BACK_COLOR -/*126*/ ,PROP_ALTERNATIVE_TEXT -/*127*/ ,PROP_HEADER_TEXT_LEFT -/*128*/ ,PROP_HEADER_TEXT -/*129*/ ,PROP_HEADER_IS_SHARED -/*130*/ ,PROP_HEADER_IS_ON -/*131*/ ,PROP_FOOTER_TEXT_LEFT -/*132*/ ,PROP_FOOTER_TEXT -/*133*/ ,PROP_FOOTER_IS_SHARED -/*134*/ ,PROP_FOOTER_IS_ON -/*135*/ ,PROP_WIDTH -/*136*/ ,PROP_HEIGHT -/*137*/ ,PROP_SEPARATOR_LINE_IS_ON -/*138*/ ,PROP_TEXT_COLUMNS -/*139*/ ,PROP_AUTOMATIC_DISTANCE -/*140*/ ,PROP_IS_LANDSCAPE -/*141*/ ,PROP_PRINTER_PAPER_TRAY_INDEX -/*142*/ ,PROP_FIRST_PAGE -/*143*/ ,PROP_DEFAULT -/*144*/ ,PROP_PAGE_DESC_NAME -/*145*/ ,PROP_PAGE_NUMBER_OFFSET -/*146*/ ,PROP_BREAK_TYPE -/*147*/ ,PROP_FOOTER_IS_DYNAMIC_HEIGHT -/*148*/ ,PROP_FOOTER_DYNAMIC_SPACING -/*149*/ ,PROP_FOOTER_HEIGHT -/*150*/ ,PROP_FOOTER_BODY_DISTANCE -/*151*/ ,PROP_HEADER_IS_DYNAMIC_HEIGHT -/*152*/ ,PROP_HEADER_DYNAMIC_SPACING -/*153*/ ,PROP_HEADER_HEIGHT -/*154*/ ,PROP_HEADER_BODY_DISTANCE -/*155*/ ,PROP_WRITING_MODE -/*156*/ ,PROP_GRID_MODE -/*157*/ ,PROP_GRID_DISPLAY -/*158*/ ,PROP_GRID_PRINT -/*159*/ ,PROP_ADD_EXTERNAL_LEADING -/*160*/ ,PROP_GRID_LINES -/*161*/ ,PROP_GRID_BASE_HEIGHT -/*162*/ ,PROP_GRID_RUBY_HEIGHT -/*163*/ ,PROP_IS_ON -/*164*/ ,PROP_RESTART_AT_EACH_PAGE -/*165*/ ,PROP_COUNT_EMPTY_LINES -/*166*/ ,PROP_COUNT_LINES_IN_FRAMES -/*167*/ ,PROP_INTERVAL -/*168*/ ,PROP_DISTANCE -/*169*/ ,PROP_NUMBER_POSITION -/*170*/ ,PROP_LEVEL -/*171*/ ,PROP_LEVEL_PARAGRAPH_STYLES -/*172*/ ,PROP_LEVEL_FORMAT -/*173*/ ,PROP_TOKEN_TYPE -/*174*/ ,PROP_TOKEN_HYPERLINK_START -/*175*/ ,PROP_TOKEN_HYPERLINK_END -/*176*/ ,PROP_TOKEN_CHAPTER_INFO -/*177*/ ,PROP_CHAPTER_FORMAT -/*178*/ ,PROP_TOKEN_TEXT -/*179*/ ,PROP_TEXT -/*180*/ ,PROP_CREATE_FROM_OUTLINE -/*181*/ ,PROP_CREATE_FROM_MARKS -/*182*/ ,PROP_STANDARD -/*183*/ ,PROP_CHAR_BACK_COLOR -/*184*/ ,PROP_CHAR_EMPHASIS -/*185*/ ,PROP_CHAR_COMBINE_IS_ON -/*186*/ ,PROP_CHAR_COMBINE_PREFIX -/*187*/ ,PROP_CHAR_COMBINE_SUFFIX -/*188*/ ,PROP_CHAR_ROTATION -/*189*/ ,PROP_CHAR_ROTATION_IS_FIT_TO_LINE -/*190*/ ,PROP_CHAR_FLASH -/*191*/ ,PROP_IS_SPLIT_ALLOWED -/*192*/ ,META_PROP_VERTICAL_BORDER -/*193*/ ,META_PROP_HORIZONTAL_BORDER -/*194*/ ,PROP_HEADER_ROW_COUNT -/*195*/ ,PROP_IS_AUTO_HEIGHT -/*196*/ ,PROP_SIZE_TYPE -/*197*/ ,PROP_TABLE_COLUMN_SEPARATORS -/*198*/ ,META_PROP_TABLE_STYLE_NAME -/*199*/ ,PROP_REDLINE_AUTHOR -/*200*/ ,PROP_REDLINE_DATE_TIME -/*201*/ ,PROP_REDLINE_COMMENT -/*202*/ ,PROP_REDLINE_TYPE -/*203*/ ,PROP_REDLINE_SUCCESSOR_DATA -/*204*/ ,PROP_REDLINE_IDENTIFIER -/*205*/ ,PROP_SIZE_PROTECTED -/*206*/ ,PROP_POSITION_PROTECTED -/*207*/ ,PROP_OPAQUE -/*208*/ ,PROP_VERTICAL_MERGE -/*209*/ ,PROP_BULLET_CHAR -/*210*/ ,PROP_BULLET_FONT_NAME -/*211*/ ,PROP_PARA_BACK_COLOR -/*212*/ ,PROP_TABS_RELATIVE_TO_INDENT -/*213*/ ,PROP_PREFIX -/*214*/ ,PROP_SUFFIX -/*215*/ ,PROP_CREATE_FROM_LEVEL_PARAGRAPH_STYLES -/*216*/ ,PROP_DROP_CAP_FORMAT -/*217*/ , PROP_REFERENCE_FIELD_PART -/*218*/ ,PROP_SOURCE_NAME -/*219*/ ,PROP_REFERENCE_FIELD_SOURCE -/*220*/ ,PROP_WIDTH_TYPE -/*221*/ ,PROP_TEXT_RANGE -/*222*/ ,PROP_SERVICE_CHAR_STYLE -/*223*/ ,PROP_SERVICE_PARA_STYLE -/*224*/ ,PROP_CHARACTER_STYLES -/*225*/ ,PROP_PARAGRAPH_STYLES -/*226*/ ,PROP_TABLE_BORDER_DISTANCES -/*227*/ ,META_PROP_CELL_MAR_TOP -/*228*/ ,META_PROP_CELL_MAR_BOTTOM -/*229*/ ,META_PROP_CELL_MAR_LEFT -/*230*/ ,META_PROP_CELL_MAR_RIGHT -/*231*/ ,PROP_START_AT -/*232*/ ,PROP_ADD_PARA_TABLE_SPACING -/*233*/ ,PROP_CHAR_PROP_HEIGHT -/*234*/ ,PROP_CHAR_PROP_HEIGHT_ASIAN -/*235*/ ,PROP_CHAR_PROP_HEIGHT_COMPLEX -/*236*/ ,PROP_FORMAT -/*237*/ ,PROP_INSERT -/*238*/ ,PROP_DELETE -/*239*/ ,PROP_STREAM_NAME -/*240*/ ,PROP_BITMAP -/*241*/ ,PROP_IS_DATE -/*242*/ ,PROP_TAB_STOP_DISTANCE -/*243*/ ,PROP_CNF_STYLE -/*244*/ ,PROP_INDENT_AT -/*245*/ ,PROP_FIRST_LINE_INDENT -/*246*/ ,PROP_NUMBERING_STYLE_NAME -/*247*/ ,PROP_OUTLINE_LEVEL -/*248*/ ,PROP_LISTTAB_STOP_POSITION -/*249*/ ,PROP_POSITION_AND_SPACE_MODE -/*250*/ ,PROP_HEADING_STYLE_NAME -/*251*/ ,PROP_PARA_SPLIT -/*252*/ ,PROP_HELP -}; + ,META_PROP_CELL_MAR_BOTTOM = PROP_ID_START + ,META_PROP_CELL_MAR_LEFT + ,META_PROP_CELL_MAR_RIGHT + ,META_PROP_CELL_MAR_TOP + ,META_PROP_HORIZONTAL_BORDER + ,META_PROP_TABLE_STYLE_NAME + ,META_PROP_VERTICAL_BORDER + ,PROP_ADD_EXTERNAL_LEADING + ,PROP_ADD_PARA_TABLE_SPACING + ,PROP_ADJUST + ,PROP_ADJUST_CONTRAST + ,PROP_ADJUST_LUMINANCE + ,PROP_ALTERNATIVE_TEXT + ,PROP_ANCHOR_TYPE + ,PROP_AUTOMATIC_DISTANCE + ,PROP_BACK_COLOR + ,PROP_BITMAP + ,PROP_BOTTOM_BORDER + ,PROP_BOTTOM_BORDER_DISTANCE + ,PROP_BOTTOM_MARGIN + ,PROP_BREAK_TYPE + ,PROP_BULLET_CHAR + ,PROP_BULLET_FONT_NAME + ,PROP_CHAPTER_FORMAT + ,PROP_CHARACTER_STYLES + ,PROP_CHAR_AUTO_KERNING + ,PROP_CHAR_BACK_COLOR + ,PROP_CHAR_CASE_MAP + ,PROP_CHAR_CHAR_KERNING + ,PROP_CHAR_COLOR + ,PROP_CHAR_COMBINE_IS_ON + ,PROP_CHAR_COMBINE_PREFIX + ,PROP_CHAR_COMBINE_SUFFIX + ,PROP_CHAR_CONTOURED + ,PROP_CHAR_EMPHASIS + ,PROP_CHAR_ESCAPEMENT + ,PROP_CHAR_ESCAPEMENT_HEIGHT + ,PROP_CHAR_FLASH + ,PROP_CHAR_FONT_CHAR_SET + ,PROP_CHAR_FONT_CHAR_SET_ASIAN + ,PROP_CHAR_FONT_CHAR_SET_COMPLEX + ,PROP_CHAR_FONT_FAMILY + ,PROP_CHAR_FONT_FAMILY_ASIAN + ,PROP_CHAR_FONT_FAMILY_COMPLEX + ,PROP_CHAR_FONT_NAME + ,PROP_CHAR_FONT_NAME_ASIAN + ,PROP_CHAR_FONT_NAME_COMPLEX + ,PROP_CHAR_FONT_PITCH + ,PROP_CHAR_FONT_PITCH_ASIAN + ,PROP_CHAR_FONT_PITCH_COMPLEX + ,PROP_CHAR_FONT_STYLE + ,PROP_CHAR_FONT_STYLE_ASIAN + ,PROP_CHAR_FONT_STYLE_COMPLEX + ,PROP_CHAR_HEIGHT + ,PROP_CHAR_HEIGHT_ASIAN + ,PROP_CHAR_HEIGHT_COMPLEX + ,PROP_CHAR_HIDDEN + ,PROP_CHAR_LOCALE + ,PROP_CHAR_LOCALE_ASIAN + ,PROP_CHAR_LOCALE_COMPLEX + ,PROP_CHAR_POSTURE + ,PROP_CHAR_POSTURE_ASIAN + ,PROP_CHAR_POSTURE_COMPLEX + ,PROP_CHAR_PROP_HEIGHT + ,PROP_CHAR_PROP_HEIGHT_ASIAN + ,PROP_CHAR_PROP_HEIGHT_COMPLEX + ,PROP_CHAR_RELIEF + ,PROP_CHAR_ROTATION + ,PROP_CHAR_ROTATION_IS_FIT_TO_LINE + ,PROP_CHAR_SCALE_WIDTH + ,PROP_CHAR_SHADOWED + ,PROP_CHAR_STRIKEOUT + ,PROP_CHAR_STYLE_NAME + ,PROP_CHAR_UNDERLINE + ,PROP_CHAR_UNDERLINE_COLOR + ,PROP_CHAR_UNDERLINE_HAS_COLOR + ,PROP_CHAR_WEIGHT + ,PROP_CHAR_WEIGHT_ASIAN + ,PROP_CHAR_WEIGHT_COMPLEX + ,PROP_CHAR_WORD_MODE + ,PROP_CNF_STYLE + ,PROP_CONTENT + ,PROP_CONTOUR_OUTSIDE + ,PROP_CONTOUR_POLY_POLYGON + ,PROP_COUNT_EMPTY_LINES + ,PROP_COUNT_LINES_IN_FRAMES + ,PROP_CREATE_FROM_LEVEL_PARAGRAPH_STYLES + ,PROP_CREATE_FROM_MARKS + ,PROP_CREATE_FROM_OUTLINE + ,PROP_CURRENT_PRESENTATION + ,PROP_DATA_COLUMN_NAME + ,PROP_DEFAULT + ,PROP_DELETE + ,PROP_DESCRIPTION + ,PROP_DISTANCE + ,PROP_DROP_CAP_FORMAT + ,PROP_FILE_FORMAT + ,PROP_FIRST_LINE_INDENT + ,PROP_FIRST_LINE_OFFSET + ,PROP_FIRST_PAGE + ,PROP_FOOTER_BODY_DISTANCE + ,PROP_FOOTER_DYNAMIC_SPACING + ,PROP_FOOTER_HEIGHT + ,PROP_FOOTER_IS_DYNAMIC_HEIGHT + ,PROP_FOOTER_IS_ON + ,PROP_FOOTER_IS_SHARED + ,PROP_FOOTER_TEXT + ,PROP_FOOTER_TEXT_LEFT + ,PROP_FORMAT + ,PROP_FULL_NAME + ,PROP_GAMMA + ,PROP_GRAPHIC + ,PROP_GRAPHIC_COLOR_MODE + ,PROP_GRAPHIC_CROP + ,PROP_GRID_BASE_HEIGHT + ,PROP_GRID_DISPLAY + ,PROP_GRID_LINES + ,PROP_GRID_MODE + ,PROP_GRID_PRINT + ,PROP_GRID_RUBY_HEIGHT + ,PROP_HEADER_BODY_DISTANCE + ,PROP_HEADER_DYNAMIC_SPACING + ,PROP_HEADER_HEIGHT + ,PROP_HEADER_IS_DYNAMIC_HEIGHT + ,PROP_HEADER_IS_ON + ,PROP_HEADER_IS_SHARED + ,PROP_HEADER_ROW_COUNT + ,PROP_HEADER_TEXT + ,PROP_HEADER_TEXT_LEFT + ,PROP_HEADING_STYLE_NAME + ,PROP_HEIGHT + ,PROP_HELP + ,PROP_HINT + ,PROP_HORI_MIRRORED_ON_EVEN_PAGES + ,PROP_HORI_MIRRORED_ON_ODD_PAGES + ,PROP_HORI_ORIENT + ,PROP_HORI_ORIENT_POSITION + ,PROP_HORI_ORIENT_RELATION + ,PROP_HYPER_LINK_U_R_L + ,PROP_INDENT_AT + ,PROP_INPUT_STREAM + ,PROP_INSERT + ,PROP_INTERVAL + ,PROP_IS_AUTO_HEIGHT + ,PROP_IS_DATE + ,PROP_IS_FIXED + ,PROP_IS_INPUT + ,PROP_IS_LANDSCAPE + ,PROP_IS_ON + ,PROP_IS_SPLIT_ALLOWED + ,PROP_KEYWORDS + ,PROP_LEFT_BORDER + ,PROP_LEFT_BORDER_DISTANCE + ,PROP_LEFT_MARGIN + ,PROP_LEVEL + ,PROP_LEVEL_FORMAT + ,PROP_LEVEL_PARAGRAPH_STYLES + ,PROP_LISTTAB_STOP_POSITION + ,PROP_MACRO_NAME + ,PROP_NAME + ,PROP_NUMBERING_LEVEL + ,PROP_NUMBERING_RULES + ,PROP_NUMBERING_STYLE_NAME + ,PROP_NUMBERING_TYPE + ,PROP_NUMBER_FORMAT + ,PROP_NUMBER_POSITION + ,PROP_OPAQUE + ,PROP_OUTLINE_LEVEL + ,PROP_PAGE_DESC_NAME + ,PROP_PAGE_NUMBER_OFFSET + ,PROP_PAGE_TOGGLE + ,PROP_PARAGRAPH_STYLES + ,PROP_PARA_ADJUST + ,PROP_PARA_BACK_COLOR + ,PROP_PARA_BOTTOM_MARGIN + ,PROP_PARA_FIRST_LINE_INDENT + ,PROP_PARA_IS_HANGING_PUNCTUATION + ,PROP_PARA_IS_HYPHENATION + ,PROP_PARA_KEEP_TOGETHER + ,PROP_PARA_LAST_LINE_ADJUST + ,PROP_PARA_LEFT_MARGIN + ,PROP_PARA_LINE_NUMBER_COUNT + ,PROP_PARA_LINE_NUMBER_START_VALUE + ,PROP_PARA_LINE_SPACING + ,PROP_PARA_ORPHANS + ,PROP_PARA_RIGHT_MARGIN + ,PROP_PARA_SPLIT + ,PROP_PARA_STYLE_NAME + ,PROP_PARA_TAB_STOPS + ,PROP_PARA_TOP_MARGIN + ,PROP_PARA_WIDOWS + ,PROP_PARENT_NUMBERING + ,PROP_POSITION_AND_SPACE_MODE + ,PROP_POSITION_PROTECTED + ,PROP_PREFIX + ,PROP_PRINTER_PAPER_TRAY_INDEX + ,PROP_REDLINE_AUTHOR + ,PROP_REDLINE_COMMENT + ,PROP_REDLINE_DATE_TIME + ,PROP_REDLINE_IDENTIFIER + ,PROP_REDLINE_SUCCESSOR_DATA + ,PROP_REDLINE_TYPE + ,PROP_REFERENCE_FIELD_PART + ,PROP_REFERENCE_FIELD_SOURCE + ,PROP_RESTART_AT_EACH_PAGE + ,PROP_RIGHT_BORDER + ,PROP_RIGHT_BORDER_DISTANCE + ,PROP_RIGHT_MARGIN + ,PROP_SEPARATOR_LINE_IS_ON + ,PROP_SERVICE_CHAR_STYLE + ,PROP_SERVICE_PARA_STYLE + ,PROP_SIZE + ,PROP_SIZE100th_M_M + ,PROP_SIZE_PIXEL + ,PROP_SIZE_PROTECTED + ,PROP_SIZE_TYPE + ,PROP_SOURCE_NAME + ,PROP_STANDARD + ,PROP_START_AT + ,PROP_START_WITH + ,PROP_STREAM_NAME + ,PROP_SUBJECT + ,PROP_SUB_TYPE + ,PROP_SUFFIX + ,PROP_SURROUND + ,PROP_SURROUND_CONTOUR + ,PROP_TABLE_BORDER + ,PROP_TABLE_BORDER_DISTANCES + ,PROP_TABLE_COLUMN_SEPARATORS + ,PROP_TABS_RELATIVE_TO_INDENT + ,PROP_TAB_STOP_DISTANCE + ,PROP_TEXT + ,PROP_TEXT_COLUMNS + ,PROP_TEXT_RANGE + ,PROP_TITLE + ,PROP_TOKEN_CHAPTER_INFO + ,PROP_TOKEN_HYPERLINK_END + ,PROP_TOKEN_HYPERLINK_START + ,PROP_TOKEN_TEXT + ,PROP_TOKEN_TYPE + ,PROP_TOP_BORDER + ,PROP_TOP_BORDER_DISTANCE + ,PROP_TOP_MARGIN + ,PROP_USER_DATA_TYPE + ,PROP_VERTICAL_MERGE + ,PROP_VERT_MIRRORED + ,PROP_VERT_ORIENT + ,PROP_VERT_ORIENT_POSITION + ,PROP_VERT_ORIENT_RELATION + ,PROP_WIDTH + ,PROP_WIDTH_TYPE + ,PROP_WRITING_MODE + }; struct PropertyNameSupplier_Impl; class PropertyNameSupplier { diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx index 11930fb01972..f8dcb0592cee 100644 --- a/writerfilter/source/dmapper/PropertyMap.cxx +++ b/writerfilter/source/dmapper/PropertyMap.cxx @@ -112,13 +112,43 @@ uno::Sequence< beans::PropertyValue > PropertyMap::GetPropertyValues() } return m_aValues; } -/*------------------------------------------------------------------------- - -----------------------------------------------------------------------*/ +void lcl_AnyToTag(XMLTag::Pointer_t pTag, const uno::Any & rAny) +{ + try { + sal_Int32 aInt = 0; + rAny >>= aInt; + pTag->addAttr("value", aInt); + + sal_uInt32 auInt = 0; + rAny >>= auInt; + pTag->addAttr("unsignedValue", auInt); + + float aFloat = 0.0f; + rAny >>= aFloat; + pTag->addAttr("floatValue", aFloat); + + ::rtl::OUString aStr; + rAny >>= aStr; + pTag->addAttr("stringValue", aStr); + } + catch (...) { + } +} + void PropertyMap::Insert( PropertyIds eId, bool bIsTextProperty, const uno::Any& rAny, bool bOverwrite ) { -// const ::rtl::OUString& rInsert = PropertyNameSupplier:: -// GetPropertyNameSupplier().GetName(eId); +#ifdef DEBUG_DMAPPER_PROPERTY_MAP + const ::rtl::OUString& rInsert = PropertyNameSupplier:: + GetPropertyNameSupplier().GetName(eId); + + XMLTag::Pointer_t pTag(new XMLTag("propertyMap.insert")); + pTag->addAttr("name", rInsert); + lcl_AnyToTag(pTag, rAny); + + dmapper_logger->addTag(pTag); +#endif + PropertyMap::iterator aElement = find(PropertyDefinition( eId, bIsTextProperty ) ); if( aElement != end()) { @@ -132,7 +162,6 @@ void PropertyMap::Insert( PropertyIds eId, bool bIsTextProperty, const uno::Any& Invalidate(); } -#ifdef DEBUG_DOMAINMAPPER XMLTag::Pointer_t PropertyMap::toTag() const { XMLTag::Pointer_t pResult(new XMLTag("PropertyMap")); @@ -153,15 +182,15 @@ XMLTag::Pointer_t PropertyMap::toTag() const default: { try { - sal_Int32 aInt; + sal_Int32 aInt = 0; aMapIter->second >>= aInt; pTag->addAttr("value", aInt); - sal_uInt32 auInt; + sal_uInt32 auInt = 0; aMapIter->second >>= auInt; pTag->addAttr("unsignedValue", auInt); - float aFloat; + float aFloat = 0.0; aMapIter->second >>= aFloat; pTag->addAttr("floatValue", aFloat); @@ -182,7 +211,6 @@ XMLTag::Pointer_t PropertyMap::toTag() const return pResult; } -#endif /*-- 13.12.2006 10:46:42--------------------------------------------------- diff --git a/writerfilter/source/dmapper/PropertyMap.hxx b/writerfilter/source/dmapper/PropertyMap.hxx index 16886530f324..b6dcad6d63b2 100644 --- a/writerfilter/source/dmapper/PropertyMap.hxx +++ b/writerfilter/source/dmapper/PropertyMap.hxx @@ -39,9 +39,7 @@ #include <map> #include <vector> -#ifdef DEBUG_DOMAINMAPPER #include <resourcemodel/TagLogger.hxx> -#endif namespace com{namespace sun{namespace star{ namespace beans{ @@ -136,10 +134,7 @@ public: virtual void insertTableProperties( const PropertyMap* ); -#ifdef DEBUG_DOMAINMAPPER virtual XMLTag::Pointer_t toTag() const; -#endif - }; typedef boost::shared_ptr<PropertyMap> PropertyMapPtr; diff --git a/writerfilter/source/dmapper/PropertyMapHelper.cxx b/writerfilter/source/dmapper/PropertyMapHelper.cxx index 4fb4c759289d..3496c5e04f44 100644 --- a/writerfilter/source/dmapper/PropertyMapHelper.cxx +++ b/writerfilter/source/dmapper/PropertyMapHelper.cxx @@ -32,7 +32,6 @@ #include <resourcemodel/TagLogger.hxx> #include "PropertyMapHelper.hxx" -#ifdef DEBUG namespace writerfilter { namespace dmapper @@ -128,4 +127,3 @@ XMLTag::Pointer_t lcl_PropertyValueSeqSeqToTag(PropertyValueSeqSeq_t rPropValSeq } } -#endif // DEBUG diff --git a/writerfilter/source/dmapper/PropertyMapHelper.hxx b/writerfilter/source/dmapper/PropertyMapHelper.hxx index 4a528f1736c0..fc9ea0a85bb4 100644 --- a/writerfilter/source/dmapper/PropertyMapHelper.hxx +++ b/writerfilter/source/dmapper/PropertyMapHelper.hxx @@ -28,7 +28,6 @@ * ************************************************************************/ -#ifdef DEBUG #include "PropertyMap.hxx" #include <com/sun/star/beans/PropertyValues.hpp> @@ -47,4 +46,3 @@ typedef uno::Sequence<PropertyValueSeq_t> PropertyValueSeqSeq_t; XMLTag::Pointer_t lcl_PropertyValueSeqSeqToTag(PropertyValueSeqSeq_t & rPropValSeqSeq); } } -#endif // DEBUG diff --git a/writerfilter/source/dmapper/SectionColumnHandler.cxx b/writerfilter/source/dmapper/SectionColumnHandler.cxx index 5ad3e51fb8b7..e00b0c7558fa 100644 --- a/writerfilter/source/dmapper/SectionColumnHandler.cxx +++ b/writerfilter/source/dmapper/SectionColumnHandler.cxx @@ -30,6 +30,8 @@ #include <ConversionHelper.hxx> #include <ooxml/resourceids.hxx> +#include "dmapperLoggers.hxx" + namespace writerfilter { namespace dmapper { @@ -40,10 +42,11 @@ using namespace ::com::sun::star; -----------------------------------------------------------------------*/ SectionColumnHandler::SectionColumnHandler() : - bEqualWidth( false ), - nSpace( 0 ), - nNum( 0 ), - bSep( false ) +LoggedProperties(dmapper_logger, "SectionColumnHandler"), +bEqualWidth( false ), +nSpace( 0 ), +nNum( 0 ), +bSep( false ) { } /*-- 02.06.2008 13:36:24--------------------------------------------------- @@ -55,7 +58,7 @@ SectionColumnHandler::~SectionColumnHandler() /*-- 02.06.2008 13:36:24--------------------------------------------------- -----------------------------------------------------------------------*/ -void SectionColumnHandler::attribute(Id rName, Value & rVal) +void SectionColumnHandler::lcl_attribute(Id rName, Value & rVal) { sal_Int32 nIntValue = rVal.getInt(); /* WRITERFILTERSTATUS: table: SectionColumnHandler_attributedata */ @@ -93,7 +96,7 @@ void SectionColumnHandler::attribute(Id rName, Value & rVal) /*-- 02.06.2008 13:36:24--------------------------------------------------- -----------------------------------------------------------------------*/ -void SectionColumnHandler::sprm(Sprm & rSprm) +void SectionColumnHandler::lcl_sprm(Sprm & rSprm) { /* WRITERFILTERSTATUS: table: SectionColumnHandler_sprm */ switch( rSprm.getId()) diff --git a/writerfilter/source/dmapper/SectionColumnHandler.hxx b/writerfilter/source/dmapper/SectionColumnHandler.hxx index 452895b50194..7742f5d4a22b 100644 --- a/writerfilter/source/dmapper/SectionColumnHandler.hxx +++ b/writerfilter/source/dmapper/SectionColumnHandler.hxx @@ -28,7 +28,7 @@ #define INCLUDED_SECTIONCOLUMNHANDLER_HXX #include <WriterFilterDllApi.hxx> -#include <resourcemodel/WW8ResourceModel.hxx> +#include <resourcemodel/LoggedResources.hxx> #include <boost/shared_ptr.hpp> @@ -44,7 +44,7 @@ struct _Column }; -class WRITERFILTER_DLLPRIVATE SectionColumnHandler : public Properties +class WRITERFILTER_DLLPRIVATE SectionColumnHandler : public LoggedProperties { bool bEqualWidth; sal_Int32 nSpace; @@ -54,14 +54,14 @@ class WRITERFILTER_DLLPRIVATE SectionColumnHandler : public Properties _Column aTempColumn; + // Properties + virtual void lcl_attribute(Id Name, Value & val); + virtual void lcl_sprm(Sprm & sprm); + public: SectionColumnHandler(); virtual ~SectionColumnHandler(); - // Properties - virtual void attribute(Id Name, Value & val); - virtual void sprm(Sprm & sprm); - bool IsEqualWidth() const { return bEqualWidth; } sal_Int32 GetSpace() const { return nSpace; } sal_Int32 GetNum() const { return nNum; } diff --git a/writerfilter/source/dmapper/SettingsTable.cxx b/writerfilter/source/dmapper/SettingsTable.cxx index e711240b65d0..6065d33ddb17 100644 --- a/writerfilter/source/dmapper/SettingsTable.cxx +++ b/writerfilter/source/dmapper/SettingsTable.cxx @@ -28,20 +28,17 @@ * ************************************************************************/ +#include <stdio.h> +#include <rtl/ustring.hxx> #include <resourcemodel/ResourceModelHelper.hxx> #include <com/sun/star/beans/XPropertySet.hpp> - #include <SettingsTable.hxx> +#include <resourcemodel/ResourceModelHelper.hxx> #include <doctok/resourceids.hxx> #include <ooxml/resourceids.hxx> -#include <stdio.h> #include <ConversionHelper.hxx> -#include <rtl/ustring.hxx> -#ifdef DEBUG_DOMAINMAPPER -#include <resourcemodel/QNameToString.hxx> #include "dmapperLoggers.hxx" -#endif namespace writerfilter { @@ -97,10 +94,13 @@ struct SettingsTable_Impl , m_nCryptAlgorithmType(NS_ooxml::LN_Value_wordprocessingml_ST_AlgType_typeAny) , m_nCryptSpinCount(0) {} + }; -SettingsTable::SettingsTable(DomainMapper& rDMapper, const uno::Reference< lang::XMultiServiceFactory > xTextFactory) : -m_pImpl( new SettingsTable_Impl(rDMapper, xTextFactory) ) +SettingsTable::SettingsTable(DomainMapper& rDMapper, const uno::Reference< lang::XMultiServiceFactory > xTextFactory) +: LoggedProperties(dmapper_logger, "SettingsTable") +, LoggedTable(dmapper_logger, "SettingsTable") +, m_pImpl( new SettingsTable_Impl(rDMapper, xTextFactory) ) { // printf("SettingsTable::SettingsTable()\n"); } @@ -110,14 +110,8 @@ SettingsTable::~SettingsTable() delete m_pImpl; } -void SettingsTable::attribute(Id nName, Value & val) +void SettingsTable::lcl_attribute(Id nName, Value & val) { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("SettingsTable.attribute"); - dmapper_logger->attribute("name", (*QNameToString::Instance())(nName)); - dmapper_logger->attribute("value", val.toString()); -#endif - (void) nName; int nIntValue = val.getInt(); (void)nIntValue; @@ -137,18 +131,10 @@ void SettingsTable::attribute(Id nName, Value & val) } } #endif -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->endElement("SettingsTable.attribute"); -#endif } -void SettingsTable::sprm(Sprm& rSprm) +void SettingsTable::lcl_sprm(Sprm& rSprm) { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("SettingsTable.sprm"); - dmapper_logger->chars(rSprm.toString()); -#endif - sal_uInt32 nSprmId = rSprm.getId(); Value::Pointer_t pValue = rSprm.getValue(); @@ -237,16 +223,14 @@ void SettingsTable::sprm(Sprm& rSprm) break; default: { - OSL_ENSURE( false, "unknown sprmid in SettingsTable::sprm()"); +#ifdef DEBUG_DMAPPER_SETTINGS_TABLE + dmapper_logger->element("unhandled"); +#endif } } - -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->endElement("SettingsTable.sprm"); -#endif } -void SettingsTable::entry(int /*pos*/, writerfilter::Reference<Properties>::Pointer_t ref) +void SettingsTable::lcl_entry(int /*pos*/, writerfilter::Reference<Properties>::Pointer_t ref) { // printf ( "SettingsTable::entry\n"); ref->resolve(*this); diff --git a/writerfilter/source/dmapper/SettingsTable.hxx b/writerfilter/source/dmapper/SettingsTable.hxx index cb3e7913c5e7..64034c83559b 100755..100644 --- a/writerfilter/source/dmapper/SettingsTable.hxx +++ b/writerfilter/source/dmapper/SettingsTable.hxx @@ -32,7 +32,7 @@ #define INCLUDED_SETTINGSTABLE_HXX #include <WriterFilterDllApi.hxx> -#include <resourcemodel/WW8ResourceModel.hxx> +#include <resourcemodel/LoggedResources.hxx> #include <com/sun/star/lang/XComponent.hpp> #include <com/sun/star/text/XTextDocument.hpp> #include <map> @@ -53,7 +53,7 @@ using namespace std; struct SettingsTable_Impl; -class WRITERFILTER_DLLPRIVATE SettingsTable : public Properties, public Table +class WRITERFILTER_DLLPRIVATE SettingsTable : public LoggedProperties, public LoggedTable { SettingsTable_Impl *m_pImpl; @@ -63,18 +63,19 @@ class WRITERFILTER_DLLPRIVATE SettingsTable : public Properties, public Table ); virtual ~SettingsTable(); - // Properties - virtual void attribute(Id Name, Value & val); - virtual void sprm(Sprm & sprm); - - // Table - virtual void entry(int pos, writerfilter::Reference<Properties>::Pointer_t ref); - //returns default TabStop in 1/100th mm int GetDefaultTabStop() const; void ApplyProperties( uno::Reference< text::XTextDocument > xDoc ); + private: + // Properties + virtual void lcl_attribute(Id Name, Value & val); + virtual void lcl_sprm(Sprm & sprm); + + // Table + virtual void lcl_entry(int pos, writerfilter::Reference<Properties>::Pointer_t ref); + }; typedef boost::shared_ptr< SettingsTable > SettingsTablePtr; }} diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx index 5088e8729577..a0d5039a155b 100644 --- a/writerfilter/source/dmapper/StyleSheetTable.cxx +++ b/writerfilter/source/dmapper/StyleSheetTable.cxx @@ -47,10 +47,7 @@ #include <stdio.h> #include <rtl/ustrbuf.hxx> -#ifdef DEBUG_DOMAINMAPPER #include <dmapperLoggers.hxx> -#include <resourcemodel/QNameToString.hxx> -#endif using namespace ::com::sun::star; namespace writerfilter { @@ -82,32 +79,11 @@ StyleSheetEntry::~StyleSheetEntry() { } -#ifdef DEBUG_DOMAINMAPPER -XMLTag::Pointer_t StyleSheetEntry::toTag() -{ - XMLTag::Pointer_t pResult(new XMLTag("StyleSheetEntry")); - - pResult->addAttr("identifierI", sStyleIdentifierI); - pResult->addAttr("identifierD", sStyleIdentifierD); - pResult->addAttr("default", bIsDefaultStyle ? "true" : "false"); - pResult->addAttr("invalidHeight", bInvalidHeight ? "true" : "false"); - pResult->addAttr("hasUPE", bHasUPE ? "true" : "false"); - pResult->addAttr("styleType", nStyleTypeCode); - pResult->addAttr("baseStyle", sBaseStyleIdentifier); - pResult->addAttr("nextStyle", sNextStyleIdentifier); - pResult->addAttr("styleName", sStyleName); - pResult->addAttr("styleName1", sStyleName1); - pResult->addAttr("convertedName", sConvertedStyleName); - pResult->addTag(pProperties->toTag()); - - return pResult; -} -#endif - TableStyleSheetEntry::TableStyleSheetEntry( StyleSheetEntry& rEntry, StyleSheetTable* pStyles ): StyleSheetEntry( ), m_pStyleSheet( pStyles ) { + bIsDefaultStyle = rEntry.bIsDefaultStyle; bInvalidHeight = rEntry.bInvalidHeight; bHasUPE = rEntry.bHasUPE; @@ -128,13 +104,6 @@ TableStyleSheetEntry::~TableStyleSheetEntry( ) void TableStyleSheetEntry::AddTblStylePr( TblStyleType nType, PropertyMapPtr pProps ) { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("AddTblStylePr"); - dmapper_logger->attribute("type", nType); - dmapper_logger->addTag(pProps->toTag()); - dmapper_logger->endElement("AddTblStylePr"); -#endif - static TblStyleType pTypesToFix[] = { TBL_STYLE_FIRSTROW, @@ -180,7 +149,7 @@ void TableStyleSheetEntry::AddTblStylePr( TblStyleType nType, PropertyMapPtr pPr m_aStyles[nType] = pProps; } -PropertyMapPtr TableStyleSheetEntry::GetProperties( sal_Int32 nMask ) +PropertyMapPtr TableStyleSheetEntry::GetProperties( sal_Int32 nMask, StyleSheetEntryDequePtr pStack ) { PropertyMapPtr pProps( new PropertyMap ); @@ -189,8 +158,20 @@ PropertyMapPtr TableStyleSheetEntry::GetProperties( sal_Int32 nMask ) if ( pEntry.get( ) ) { + if (pStack.get() == NULL) + pStack.reset(new StyleSheetEntryDeque()); + + StyleSheetEntryDeque::const_iterator aIt = find(pStack->begin(), pStack->end(), pEntry); + + if (aIt != pStack->end()) + { + pStack->push_back(pEntry); + TableStyleSheetEntry* pParent = static_cast<TableStyleSheetEntry *>( pEntry.get( ) ); - pProps->insert( pParent->GetProperties( nMask ) ); + pProps->insert( pParent->GetProperties( nMask ), pStack ); + + pStack->pop_back(); + } } // And finally get the mask ones @@ -199,24 +180,6 @@ PropertyMapPtr TableStyleSheetEntry::GetProperties( sal_Int32 nMask ) return pProps; } -#ifdef DEBUG_DOMAINMAPPER -XMLTag::Pointer_t TableStyleSheetEntry::toTag() -{ - XMLTag::Pointer_t pResult(StyleSheetEntry::toTag()); - - for (sal_Int32 nBit = 0; nBit < 13; ++nBit) - { - PropertyMapPtr pMap = GetProperties(1 << nBit); - - XMLTag::Pointer_t pTag = pMap->toTag(); - pTag->addAttr("kind", nBit); - pResult->addTag(pTag); - } - - return pResult; -} -#endif - void lcl_mergeProps( PropertyMapPtr pToFill, PropertyMapPtr pToAdd, TblStyleType nStyleId ) { static PropertyIds pPropsToCheck[] = @@ -398,8 +361,10 @@ StyleSheetTable_Impl::StyleSheetTable_Impl(DomainMapper& rDMapper, uno::Referenc /*-- 19.06.2006 12:04:32--------------------------------------------------- -----------------------------------------------------------------------*/ -StyleSheetTable::StyleSheetTable(DomainMapper& rDMapper, uno::Reference< text::XTextDocument> xTextDocument) : - m_pImpl( new StyleSheetTable_Impl(rDMapper, xTextDocument) ) +StyleSheetTable::StyleSheetTable(DomainMapper& rDMapper, uno::Reference< text::XTextDocument> xTextDocument) +: LoggedProperties(dmapper_logger, "StyleSheetTable") +, LoggedTable(dmapper_logger, "StyleSheetTable") +, m_pImpl( new StyleSheetTable_Impl(rDMapper, xTextDocument) ) { } /*-- 19.06.2006 12:04:33--------------------------------------------------- @@ -412,14 +377,8 @@ StyleSheetTable::~StyleSheetTable() /*-- 19.06.2006 12:04:33--------------------------------------------------- -----------------------------------------------------------------------*/ -void StyleSheetTable::attribute(Id Name, Value & val) +void StyleSheetTable::lcl_attribute(Id Name, Value & val) { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("StyleSheetTable.attribute"); - dmapper_logger->attribute("name", (*QNameToString::Instance())(Name)); - dmapper_logger->attribute("value", val.toString()); -#endif - OSL_ENSURE( m_pImpl->m_pCurrentEntry, "current entry has to be set here"); if(!m_pImpl->m_pCurrentEntry) return ; @@ -541,21 +500,12 @@ void StyleSheetTable::attribute(Id Name, Value & val) } break; } - -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->endElement("StyleSheetTable.attribute"); -#endif } /*-- 19.06.2006 12:04:33--------------------------------------------------- -----------------------------------------------------------------------*/ -void StyleSheetTable::sprm(Sprm & rSprm) +void StyleSheetTable::lcl_sprm(Sprm & rSprm) { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("StyleSheetTable.sprm"); - dmapper_logger->attribute("sprm", rSprm.toString()); -#endif - sal_uInt32 nSprmId = rSprm.getId(); Value::Pointer_t pValue = rSprm.getValue(); sal_Int32 nIntValue = pValue.get() ? pValue->getInt() : 0; @@ -599,7 +549,7 @@ void StyleSheetTable::sprm(Sprm & rSprm) break; case NS_ooxml::LN_CT_Style_tblPr: //contains table properties case NS_ooxml::LN_CT_Style_tblStylePr: //contains to table properties - case NS_ooxml::LN_CT_DocDefaults_rPrDefault: + case NS_ooxml::LN_CT_TblPrBase_tblInd: //table properties - at least width value and type case NS_ooxml::LN_EG_RPrBase_rFonts: //table fonts /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ @@ -629,6 +579,7 @@ void StyleSheetTable::sprm(Sprm & rSprm) break; } case NS_ooxml::LN_CT_PPrDefault_pPr: + case NS_ooxml::LN_CT_DocDefaults_pPrDefault: /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ m_pImpl->m_rDMapper.PushStyleSheetProperties( m_pImpl->m_pDefaultParaProps ); m_pImpl->m_rDMapper.sprm( rSprm ); @@ -636,6 +587,7 @@ void StyleSheetTable::sprm(Sprm & rSprm) applyDefaults( true ); break; case NS_ooxml::LN_CT_RPrDefault_rPr: + case NS_ooxml::LN_CT_DocDefaults_rPrDefault: /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ m_pImpl->m_rDMapper.PushStyleSheetProperties( m_pImpl->m_pDefaultCharProps ); m_pImpl->m_rDMapper.sprm( rSprm ); @@ -676,6 +628,7 @@ void StyleSheetTable::sprm(Sprm & rSprm) pTEntry->m_nColBandSize = nIntValue; } } + break; case NS_ooxml::LN_CT_TblPrBase_tblCellMar: //no cell margins in styles break; @@ -697,7 +650,7 @@ void StyleSheetTable::sprm(Sprm & rSprm) m_pImpl->m_rDMapper.PushStyleSheetProperties( m_pImpl->m_pCurrentEntry->pProperties ); PropertyMapPtr pProps(new PropertyMap()); - m_pImpl->m_rDMapper.sprm( rSprm, pProps ); + m_pImpl->m_rDMapper.sprmWithProps( rSprm, pProps ); m_pImpl->m_pCurrentEntry->pProperties->insert(pProps); @@ -705,21 +658,13 @@ void StyleSheetTable::sprm(Sprm & rSprm) } } break; - } - -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->endElement("StyleSheetTable.sprm"); -#endif +} } /*-- 19.06.2006 12:04:33--------------------------------------------------- -----------------------------------------------------------------------*/ -void StyleSheetTable::entry(int /*pos*/, writerfilter::Reference<Properties>::Pointer_t ref) +void StyleSheetTable::lcl_entry(int /*pos*/, writerfilter::Reference<Properties>::Pointer_t ref) { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("StyleSheetTable.entry"); -#endif - //create a new style entry // printf("StyleSheetTable::entry(...)\n"); OSL_ENSURE( !m_pImpl->m_pCurrentEntry, "current entry has to be NULL here"); @@ -739,16 +684,8 @@ void StyleSheetTable::entry(int /*pos*/, writerfilter::Reference<Properties>::Po //TODO: this entry contains the default settings - they have to be added to the settings } -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->addTag(m_pImpl->m_pCurrentEntry->toTag()); -#endif - StyleSheetEntryPtr pEmptyEntry; m_pImpl->m_pCurrentEntry = pEmptyEntry; - -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->endElement("StyleSheetTable.entry"); -#endif } /*-- 21.06.2006 15:34:49--------------------------------------------------- sorting helper @@ -808,10 +745,6 @@ uno::Sequence< ::rtl::OUString > PropValVector::getNames() -----------------------------------------------------------------------*/ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable ) { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("applyStyleSheets"); -#endif - try { uno::Reference< style::XStyleFamiliesSupplier > xStylesSupplier( m_pImpl->m_xTextDocument, uno::UNO_QUERY_THROW ); @@ -970,24 +903,13 @@ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable ) PropValVector aSortedPropVals; for( sal_Int32 nProp = 0; nProp < aPropValues.getLength(); ++nProp) { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("propvalue"); - dmapper_logger->attribute("name", aPropValues[nProp].Name); - dmapper_logger->attribute("value", aPropValues[nProp].Value); -#endif // Don't add the style name properties bool bIsParaStyleName = aPropValues[nProp].Name.equalsAscii( "ParaStyleName" ); bool bIsCharStyleName = aPropValues[nProp].Name.equalsAscii( "CharStyleName" ); if ( !bIsParaStyleName && !bIsCharStyleName ) { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->element("insert"); -#endif aSortedPropVals.Insert( aPropValues[nProp] ); } -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->endElement("propvalue"); -#endif } if(bAddFollowStyle) { @@ -1038,12 +960,6 @@ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable ) if(bInsert) { xStyles->insertByName( sConvertedStyleName, uno::makeAny( xStyle) ); -#ifdef DEBUG_DOMAINMAPPER - uno::Reference<beans::XPropertySet> xProps(xStyle, uno::UNO_QUERY); - dmapper_logger->startElement("insertStyle"); - dmapper_logger->addTag(unoPropertySetToTag(xProps)); - dmapper_logger->endElement("insertStyle"); -#endif } } ++aIt; @@ -1055,10 +971,6 @@ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable ) (void)rEx; OSL_ENSURE( false, "Styles could not be imported completely"); } - -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->endElement("applyStyleSheets"); -#endif } /*-- 22.06.2006 15:56:56--------------------------------------------------- diff --git a/writerfilter/source/dmapper/StyleSheetTable.hxx b/writerfilter/source/dmapper/StyleSheetTable.hxx index e4441bcb05fe..f6a8b44efa5d 100644 --- a/writerfilter/source/dmapper/StyleSheetTable.hxx +++ b/writerfilter/source/dmapper/StyleSheetTable.hxx @@ -34,11 +34,7 @@ #include <com/sun/star/lang/XComponent.hpp> #include <PropertyMap.hxx> #include <FontTable.hxx> -#include <resourcemodel/WW8ResourceModel.hxx> - -#ifdef DEBUG_DOMAINMAPPER -#include <resourcemodel/TagLogger.hxx> -#endif +#include <resourcemodel/LoggedResources.hxx> namespace com{ namespace sun { namespace star { namespace text{ class XTextDocument; @@ -76,20 +72,18 @@ public: PropertyMapPtr pProperties; ::rtl::OUString sConvertedStyleName; -#ifdef DEBUG_DOMAINMAPPER - virtual XMLTag::Pointer_t toTag(); -#endif - StyleSheetEntry(); virtual ~StyleSheetEntry(); }; typedef boost::shared_ptr<StyleSheetEntry> StyleSheetEntryPtr; +typedef ::std::deque<StyleSheetEntryPtr> StyleSheetEntryDeque; +typedef boost::shared_ptr<StyleSheetEntryDeque> StyleSheetEntryDequePtr; class DomainMapper; class StyleSheetTable : - public Properties, - public Table + public LoggedProperties, + public LoggedTable { StyleSheetTable_Impl *m_pImpl; @@ -98,13 +92,6 @@ public: ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextDocument> xTextDocument ); virtual ~StyleSheetTable(); - // Properties - virtual void attribute(Id Name, Value & val); - virtual void sprm(Sprm & sprm); - - // Table - virtual void entry(int pos, writerfilter::Reference<Properties>::Pointer_t ref); - void ApplyStyleSheets( FontTablePtr rFontTable ); const StyleSheetEntryPtr FindStyleSheetByISTD(const ::rtl::OUString& sIndex); const StyleSheetEntryPtr FindStyleSheetByStyleName(const ::rtl::OUString& rIndex); @@ -118,6 +105,13 @@ public: ::rtl::OUString getOrCreateCharStyle( PropertyValueVector_t& rCharProperties ); private: + // Properties + virtual void lcl_attribute(Id Name, Value & val); + virtual void lcl_sprm(Sprm & sprm); + + // Table + virtual void lcl_entry(int pos, writerfilter::Reference<Properties>::Pointer_t ref); + void resolveAttributeProperties(Value & val); void resolveSprmProps(Sprm & sprm_); void applyDefaults(bool bParaProperties); @@ -146,11 +140,10 @@ public: // Gets all the properties // + corresponding to the mask, // + from the parent styles - PropertyMapPtr GetProperties( sal_Int32 nMask ); - -#ifdef DEBUG_DOMAINMAPPER - virtual XMLTag::Pointer_t toTag(); -#endif + // + // @param mask mask describing which properties to return + // @param pStack already processed StyleSheetEntries + PropertyMapPtr GetProperties( sal_Int32 nMask, StyleSheetEntryDequePtr pStack = StyleSheetEntryDequePtr()); TableStyleSheetEntry( StyleSheetEntry& aEntry, StyleSheetTable* pStyles ); virtual ~TableStyleSheetEntry( ); diff --git a/writerfilter/source/dmapper/TDefTableHandler.cxx b/writerfilter/source/dmapper/TDefTableHandler.cxx index c65ce2cdb784..fd63fe378c76 100644 --- a/writerfilter/source/dmapper/TDefTableHandler.cxx +++ b/writerfilter/source/dmapper/TDefTableHandler.cxx @@ -33,6 +33,8 @@ #include <com/sun/star/text/TableColumnSeparator.hpp> #include <com/sun/star/text/VertOrientation.hpp> +#include "dmapperLoggers.hxx" + namespace writerfilter { namespace dmapper { @@ -42,11 +44,12 @@ using namespace ::com::sun::star; -----------------------------------------------------------------------*/ TDefTableHandler::TDefTableHandler(bool bOOXML) : - m_nLineWidth(0), - m_nLineType(0), - m_nLineColor(0), - m_nLineDistance(0), - m_bOOXML( bOOXML ) +LoggedProperties(dmapper_logger, "TDefTableHandler"), +m_nLineWidth(0), +m_nLineType(0), +m_nLineColor(0), +m_nLineDistance(0), +m_bOOXML( bOOXML ) { } /*-- 24.04.2007 09:06:35--------------------------------------------------- @@ -58,7 +61,7 @@ TDefTableHandler::~TDefTableHandler() /*-- 24.04.2007 09:06:35--------------------------------------------------- -----------------------------------------------------------------------*/ -void TDefTableHandler::attribute(Id rName, Value & rVal) +void TDefTableHandler::lcl_attribute(Id rName, Value & rVal) { sal_Int32 nIntValue = rVal.getInt(); (void)nIntValue; @@ -214,7 +217,7 @@ void TDefTableHandler::localResolve(Id rName, writerfilter::Reference<Properties /*-- 24.04.2007 09:06:35--------------------------------------------------- -----------------------------------------------------------------------*/ -void TDefTableHandler::sprm(Sprm & rSprm) +void TDefTableHandler::lcl_sprm(Sprm & rSprm) { /* WRITERFILTERSTATUS: table: TDefTable_sprm */ switch( rSprm.getId() ) diff --git a/writerfilter/source/dmapper/TDefTableHandler.hxx b/writerfilter/source/dmapper/TDefTableHandler.hxx index 993b49251a77..3bd25adeb6ea 100644 --- a/writerfilter/source/dmapper/TDefTableHandler.hxx +++ b/writerfilter/source/dmapper/TDefTableHandler.hxx @@ -28,7 +28,7 @@ #define INCLUDED_TDEFTABLEHANDLER_HXX #include <WriterFilterDllApi.hxx> -#include <resourcemodel/WW8ResourceModel.hxx> +#include <resourcemodel/LoggedResources.hxx> #include <boost/shared_ptr.hpp> #include <com/sun/star/table/BorderLine.hpp> #include <vector> @@ -41,7 +41,7 @@ namespace dmapper { class PropertyMap; class TablePropertyMap; -class WRITERFILTER_DLLPRIVATE TDefTableHandler : public Properties +class WRITERFILTER_DLLPRIVATE TDefTableHandler : public LoggedProperties { public: @@ -67,14 +67,15 @@ private: bool m_bOOXML; void localResolve(Id Name, writerfilter::Reference<Properties>::Pointer_t pProperties); + + // Properties + virtual void lcl_attribute(Id Name, Value & val); + virtual void lcl_sprm(Sprm & sprm); + public: TDefTableHandler( bool bOOXML ); virtual ~TDefTableHandler(); - // Properties - virtual void attribute(Id Name, Value & val); - virtual void sprm(Sprm & sprm); - size_t getCellCount() const; void fillCellProperties( size_t nCell, ::boost::shared_ptr< TablePropertyMap > pCellProperties) const; ::boost::shared_ptr<PropertyMap> getRowProperties() const; diff --git a/writerfilter/source/dmapper/TblStylePrHandler.cxx b/writerfilter/source/dmapper/TblStylePrHandler.cxx index 53838353c3b0..02d134786357 100644 --- a/writerfilter/source/dmapper/TblStylePrHandler.cxx +++ b/writerfilter/source/dmapper/TblStylePrHandler.cxx @@ -4,14 +4,17 @@ #include <dmapperLoggers.hxx> #include <resourcemodel/QNameToString.hxx> +#include "dmapperLoggers.hxx" + namespace writerfilter { namespace dmapper { TblStylePrHandler::TblStylePrHandler( DomainMapper & rDMapper ) : - m_rDMapper( rDMapper ), - m_pTablePropsHandler( new TablePropertiesHandler( true ) ), - m_nType( TBL_STYLE_UNKNOWN ), - m_pProperties( new PropertyMap ) +LoggedProperties(dmapper_logger, "TblStylePrHandler"), +m_rDMapper( rDMapper ), +m_pTablePropsHandler( new TablePropertiesHandler( true ) ), +m_nType( TBL_STYLE_UNKNOWN ), +m_pProperties( new PropertyMap ) { } @@ -20,7 +23,7 @@ TblStylePrHandler::~TblStylePrHandler( ) delete m_pTablePropsHandler, m_pTablePropsHandler = NULL; } -void TblStylePrHandler::attribute(Id rName, Value & rVal) +void TblStylePrHandler::lcl_attribute(Id rName, Value & rVal) { #ifdef DEBUG_DOMAINMAPPER dmapper_logger->startElement("TblStylePrHandler.attribute"); @@ -41,7 +44,7 @@ void TblStylePrHandler::attribute(Id rName, Value & rVal) } } -void TblStylePrHandler::sprm(Sprm & rSprm) +void TblStylePrHandler::lcl_sprm(Sprm & rSprm) { #ifdef DEBUG_DOMAINMAPPER dmapper_logger->startElement("TblStylePrHandler.sprm"); diff --git a/writerfilter/source/dmapper/TblStylePrHandler.hxx b/writerfilter/source/dmapper/TblStylePrHandler.hxx index dd8d2da97690..b76782b0edfe 100644 --- a/writerfilter/source/dmapper/TblStylePrHandler.hxx +++ b/writerfilter/source/dmapper/TblStylePrHandler.hxx @@ -5,7 +5,7 @@ #include <dmapper/DomainMapper.hxx> #include <WriterFilterDllApi.hxx> -#include <resourcemodel/WW8ResourceModel.hxx> +#include <resourcemodel/LoggedResources.hxx> #include <boost/shared_ptr.hpp> namespace writerfilter { @@ -32,7 +32,7 @@ enum TblStyleType TBL_STYLE_SWCELL }; -class WRITERFILTER_DLLPRIVATE TblStylePrHandler : public Properties +class WRITERFILTER_DLLPRIVATE TblStylePrHandler : public LoggedProperties { private: DomainMapper & m_rDMapper; @@ -41,14 +41,14 @@ private: TblStyleType m_nType; PropertyMapPtr m_pProperties; + // Properties + virtual void lcl_attribute(Id Name, Value & val); + virtual void lcl_sprm(Sprm & sprm); + public: TblStylePrHandler( DomainMapper & rDMapper ); virtual ~TblStylePrHandler( ); - // Properties - virtual void attribute(Id Name, Value & val); - virtual void sprm(Sprm & sprm); - inline PropertyMapPtr getProperties() { return m_pProperties; }; inline TblStyleType getType() { return m_nType; }; diff --git a/writerfilter/source/dmapper/ThemeTable.cxx b/writerfilter/source/dmapper/ThemeTable.cxx index 0f0becf06552..74f166dcf313 100644 --- a/writerfilter/source/dmapper/ThemeTable.cxx +++ b/writerfilter/source/dmapper/ThemeTable.cxx @@ -30,11 +30,7 @@ #include <doctok/resourceids.hxx> #include <ooxml/resourceids.hxx> #endif -#include <stdio.h> -#ifdef DEBUG_DOMAINMAPPER #include "dmapperLoggers.hxx" -#include <resourcemodel/QNameToString.hxx> -#endif namespace writerfilter { namespace dmapper @@ -50,8 +46,10 @@ struct ThemeTable_Impl std::map<sal_uInt32, ::rtl::OUString> m_currentFontThemeEntry; }; -ThemeTable::ThemeTable() : - m_pImpl( new ThemeTable_Impl ) +ThemeTable::ThemeTable() +: LoggedProperties(dmapper_logger, "ThemeTable") +, LoggedTable(dmapper_logger, "ThemeTable") +, m_pImpl( new ThemeTable_Impl ) { // printf("ThemeTable::ThemeTable()\n"); } @@ -61,7 +59,7 @@ ThemeTable::~ThemeTable() delete m_pImpl; } -void ThemeTable::attribute(Id Name, Value & val) +void ThemeTable::lcl_attribute(Id Name, Value & val) { #ifdef DEBUG_DOMAINMAPPER dmapper_logger->startElement("ThemeTable.attribute"); @@ -91,7 +89,7 @@ void ThemeTable::attribute(Id Name, Value & val) #endif } -void ThemeTable::sprm(Sprm& rSprm) +void ThemeTable::lcl_sprm(Sprm& rSprm) { #ifdef DEBUG_DOMAINMAPPER dmapper_logger->startElement("ThemeTable.sprm"); @@ -156,7 +154,7 @@ void ThemeTable::sprm(Sprm& rSprm) #endif } -void ThemeTable::entry(int /*pos*/, writerfilter::Reference<Properties>::Pointer_t ref) +void ThemeTable::lcl_entry(int /*pos*/, writerfilter::Reference<Properties>::Pointer_t ref) { #ifdef DEBUG_DOMAINMAPPER dmapper_logger->startElement("ThemeTable.entry"); diff --git a/writerfilter/source/dmapper/ThemeTable.hxx b/writerfilter/source/dmapper/ThemeTable.hxx index b79877703c58..1396c4cee8c9 100644 --- a/writerfilter/source/dmapper/ThemeTable.hxx +++ b/writerfilter/source/dmapper/ThemeTable.hxx @@ -29,7 +29,7 @@ #define INCLUDED_THEMETABLE_HXX #include <WriterFilterDllApi.hxx> -#include <resourcemodel/WW8ResourceModel.hxx> +#include <resourcemodel/LoggedResources.hxx> #include <com/sun/star/lang/XComponent.hpp> #include <map> @@ -39,7 +39,7 @@ namespace dmapper struct ThemeTable_Impl; -class WRITERFILTER_DLLPRIVATE ThemeTable : public Properties, public Table +class WRITERFILTER_DLLPRIVATE ThemeTable : public LoggedProperties, public LoggedTable { ThemeTable_Impl *m_pImpl; @@ -47,14 +47,15 @@ public: ThemeTable(); virtual ~ThemeTable(); + const ::rtl::OUString getFontNameForTheme(const Id id) const; + + private: // Properties - virtual void attribute(Id Name, Value & val); - virtual void sprm(Sprm & sprm); + virtual void lcl_attribute(Id Name, Value & val); + virtual void lcl_sprm(Sprm & sprm); // Table - virtual void entry(int pos, writerfilter::Reference<Properties>::Pointer_t ref); - - const ::rtl::OUString getFontNameForTheme(const Id id) const; + virtual void lcl_entry(int pos, writerfilter::Reference<Properties>::Pointer_t ref); }; typedef boost::shared_ptr< ThemeTable > ThemeTablePtr; }} diff --git a/writerfilter/source/dmapper/WrapPolygonHandler.cxx b/writerfilter/source/dmapper/WrapPolygonHandler.cxx new file mode 100644 index 000000000000..2aabc1a375a9 --- /dev/null +++ b/writerfilter/source/dmapper/WrapPolygonHandler.cxx @@ -0,0 +1,216 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include <com/sun/star/drawing/PointSequence.hpp> + +#include <ooxml/resourceids.hxx> +#include <resourcemodel/ResourceModelHelper.hxx> + +#include "ConversionHelper.hxx" +#include "WrapPolygonHandler.hxx" +#include "dmapperLoggers.hxx" + +namespace writerfilter { + +using resourcemodel::resolveSprmProps; + +namespace dmapper { + +WrapPolygon::WrapPolygon() +{ +} + +WrapPolygon::~WrapPolygon() +{ +} + +void WrapPolygon::addPoint(const awt::Point & rPoint) +{ + mPoints.push_back(rPoint); +} + +WrapPolygon::Points_t::const_iterator WrapPolygon::begin() const +{ + return mPoints.begin(); +} + +WrapPolygon::Points_t::const_iterator WrapPolygon::end() const +{ + return mPoints.end(); +} + +WrapPolygon::Points_t::iterator WrapPolygon::begin() +{ + return mPoints.begin(); +} + +WrapPolygon::Points_t::iterator WrapPolygon::end() +{ + return mPoints.end(); +} + +size_t WrapPolygon::size() const +{ + return mPoints.size(); +} + +WrapPolygon::Pointer_t WrapPolygon::move(const awt::Point & rPoint) +{ + WrapPolygon::Pointer_t pResult(new WrapPolygon); + + Points_t::iterator aIt = begin(); + Points_t::iterator aItEnd = end(); + + while (aIt != aItEnd) + { + awt::Point aPoint(aIt->X + rPoint.X, aIt->Y + rPoint.Y); + pResult->addPoint(aPoint); + aIt++; + } + + return pResult; +} + +WrapPolygon::Pointer_t WrapPolygon::scale(const Fraction & rFractionX, const Fraction & rFractionY) +{ + WrapPolygon::Pointer_t pResult(new WrapPolygon); + + Points_t::iterator aIt = begin(); + Points_t::iterator aItEnd = end(); + + while (aIt != aItEnd) + { + awt::Point aPoint(Fraction(aIt->X) * rFractionX, Fraction(aIt->Y) * rFractionY); + pResult->addPoint(aPoint); + aIt++; + } + + return pResult; +} + +WrapPolygon::Pointer_t WrapPolygon::correctWordWrapPolygon(const awt::Size & rSrcSize, const awt::Size & rDstSize) +{ + WrapPolygon::Pointer_t pResult; + + const sal_uInt32 nWrap100Percent = 21600; + + Fraction aMove(nWrap100Percent, rSrcSize.Width); + aMove = aMove * Fraction(15, 1); + awt::Point aMovePoint(aMove, 0); + pResult = move(aMovePoint); + + Fraction aScaleX(nWrap100Percent, Fraction(nWrap100Percent) + aMove); + Fraction aScaleY(nWrap100Percent, Fraction(nWrap100Percent) - aMove); + pResult = pResult->scale(aScaleX, aScaleY); + + Fraction aScaleDestX(rDstSize.Width, nWrap100Percent); + Fraction aScaleDestY(rDstSize.Height, nWrap100Percent); + pResult = pResult->scale(aScaleDestX, aScaleDestY); + + return pResult; +} + +drawing::PointSequenceSequence WrapPolygon::getPointSequenceSequence() const +{ + drawing::PointSequenceSequence aPolyPolygon(1L); + drawing::PointSequence * pPolygon = aPolyPolygon.getArray(); + pPolygon->realloc(size()); + + sal_uInt32 n = 0; + Points_t::const_iterator aIt = begin(); + Points_t::const_iterator aItEnd = end(); + + while (aIt != aItEnd) + { + (*pPolygon)[n] = *aIt; + ++n; + aIt++; + } + + return aPolyPolygon; +} + +WrapPolygonHandler::WrapPolygonHandler() +: LoggedProperties(dmapper_logger, "WrapPolygonHandler") +, mpPolygon(new WrapPolygon) +{ +} + +WrapPolygonHandler::~WrapPolygonHandler() +{ +} + +void WrapPolygonHandler::lcl_attribute(Id Name, Value & val) +{ + sal_Int32 nIntValue = val.getInt(); + + switch(Name) + { + case NS_ooxml::LN_CT_Point2D_x: + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ + mnX = nIntValue; + break; + case NS_ooxml::LN_CT_Point2D_y: + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ + mnY = nIntValue; + break; + default: +#ifdef DEBUG_WRAP_POLYGON_HANDLER + dmapper_logger->element("unhandled"); +#endif + break; + } +} + +void WrapPolygonHandler::lcl_sprm(Sprm & _sprm) +{ + switch (_sprm.getId()) + { + case NS_ooxml::LN_CT_WrapPath_lineTo: + case NS_ooxml::LN_CT_WrapPath_start: + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ + { + resolveSprmProps(*this, _sprm); + + awt::Point aPoint(mnX, mnY); + mpPolygon->addPoint(aPoint); + } + break; + default: +#ifdef DEBUG_WRAP_POLYGON_HANDLER + dmapper_logger->element("unhandled"); +#endif + break; + } +} + +WrapPolygon::Pointer_t WrapPolygonHandler::getPolygon() +{ + return mpPolygon; +} + +}} diff --git a/writerfilter/source/dmapper/WrapPolygonHandler.hxx b/writerfilter/source/dmapper/WrapPolygonHandler.hxx new file mode 100644 index 000000000000..05161096f81a --- /dev/null +++ b/writerfilter/source/dmapper/WrapPolygonHandler.hxx @@ -0,0 +1,91 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef WRAP_POLYGON_HANDLER_HXX +#define WRAP_POLYGON_HANDLER_HXX + +#include <com/sun/star/drawing/PointSequenceSequence.hpp> +#include <resourcemodel/LoggedResources.hxx> +#include <resourcemodel/Fraction.hxx> + +namespace writerfilter { +namespace dmapper { + +using namespace ::com::sun::star; +using resourcemodel::Fraction; + +class WrapPolygon +{ +public: + typedef ::std::deque<awt::Point> Points_t; + typedef ::boost::shared_ptr<WrapPolygon> Pointer_t; + +private: + Points_t mPoints; + +public: + WrapPolygon(); + virtual ~WrapPolygon(); + + void addPoint(const awt::Point & rPoint); + + Points_t::const_iterator begin() const; + Points_t::const_iterator end() const; + Points_t::iterator begin(); + Points_t::iterator end(); + + size_t size() const; + + WrapPolygon::Pointer_t move(const awt::Point & rMove); + WrapPolygon::Pointer_t scale(const Fraction & rFractionX, const Fraction & rFractionY); + WrapPolygon::Pointer_t correctWordWrapPolygon(const awt::Size & rSrcSize, const awt::Size & rDstSize); + drawing::PointSequenceSequence getPointSequenceSequence() const; +}; + +class WrapPolygonHandler : public LoggedProperties +{ +public: + WrapPolygonHandler(); + virtual ~WrapPolygonHandler(); + + WrapPolygon::Pointer_t getPolygon(); + +private: + WrapPolygon::Pointer_t mpPolygon; + + sal_uInt32 mnX; + sal_uInt32 mnY; + + // Properties + virtual void lcl_attribute(Id Name, Value & val); + virtual void lcl_sprm(Sprm & sprm); + +}; + +}} + +#endif // WRAP_POLYGON_HANDLER_HXX diff --git a/writerfilter/source/dmapper/dmapperLoggers.hxx b/writerfilter/source/dmapper/dmapperLoggers.hxx index fd9ed722de4a..8b30c491c384 100644 --- a/writerfilter/source/dmapper/dmapperLoggers.hxx +++ b/writerfilter/source/dmapper/dmapperLoggers.hxx @@ -31,7 +31,6 @@ #ifndef INCLUDED_DMAPPER_LOGGERS_HXX #define INCLUDED_DMAPPER_LOGGERS_HXX -#ifdef DEBUG #include <resourcemodel/TagLogger.hxx> namespace writerfilter { @@ -39,5 +38,5 @@ namespace writerfilter { extern TagLogger::Pointer_t dmapper_logger; } } -#endif // DEBUG + #endif // INCLUDED_DMAPPER_LOGGERS_HXX diff --git a/writerfilter/source/dmapper/makefile.mk b/writerfilter/source/dmapper/makefile.mk index 300dfb31d959..a4b000411b4e 100644 --- a/writerfilter/source/dmapper/makefile.mk +++ b/writerfilter/source/dmapper/makefile.mk @@ -48,13 +48,13 @@ SLOFILES= \ $(SLO)$/DomainMapperTableManager.obj \ $(SLO)$/DomainMapper_Impl.obj \ $(SLO)$/FFDataHandler.obj \ - $(SLO)$/FormControlHelper.obj \ $(SLO)$/FontTable.obj \ + $(SLO)$/FormControlHelper.obj \ $(SLO)$/GraphicHelpers.obj \ $(SLO)$/GraphicImport.obj \ - $(SLO)$/NumberingManager.obj \ $(SLO)$/MeasureHandler.obj \ $(SLO)$/ModelEventListener.obj \ + $(SLO)$/NumberingManager.obj \ $(SLO)$/OLEHandler.obj \ $(SLO)$/PageBordersHandler.obj \ $(SLO)$/PropertyIds.obj \ @@ -66,7 +66,9 @@ SLOFILES= \ $(SLO)$/TDefTableHandler.obj \ $(SLO)$/TablePropertiesHandler.obj \ $(SLO)$/TblStylePrHandler.obj \ - $(SLO)$/ThemeTable.obj + $(SLO)$/ThemeTable.obj \ + $(SLO)$/WrapPolygonHandler.obj \ + # --- Targets ---------------------------------- diff --git a/writerfilter/source/filter/ImportFilter.cxx b/writerfilter/source/filter/ImportFilter.cxx index 0f7221552923..199c91f3a48f 100644 --- a/writerfilter/source/filter/ImportFilter.cxx +++ b/writerfilter/source/filter/ImportFilter.cxx @@ -85,7 +85,7 @@ sal_Bool WriterFilter::filter( const uno::Sequence< beans::PropertyValue >& aDes return sal_False; } -#ifdef DEBUG_ELEMENT +#ifdef DEBUG_IMPORT OUString sURL = aMediaDesc.getUnpackedValueOrDefault( MediaDescriptor::PROP_URL(), OUString() ); ::std::string sURLc = OUStringToOString(sURL, RTL_TEXTENCODING_ASCII_US).getStr(); @@ -130,7 +130,7 @@ sal_Bool WriterFilter::filter( const uno::Sequence< beans::PropertyValue >& aDes pDocument->resolve(*pStream); } -#ifdef DEBUG_ELEMENT +#ifdef DEBUG_IMPORT writerfilter::TagLogger::dump("DOMAINMAPPER"); dmapperLogger->endDocument(); writerfilter::TagLogger::dump("DEBUG"); diff --git a/writerfilter/source/filter/WriterFilterDetection.cxx b/writerfilter/source/filter/WriterFilterDetection.cxx index a712cc14fffa..87da1861cbae 100644 --- a/writerfilter/source/filter/WriterFilterDetection.cxx +++ b/writerfilter/source/filter/WriterFilterDetection.cxx @@ -97,7 +97,7 @@ OUString WriterFilterDetection::detect( uno::Sequence< beans::PropertyValue >& r if ( pStream && SotStorage::IsStorageFile(pStream) ) { - SotStorageRef xStg = new SotStorage( pStream, FALSE ); + SotStorageRef xStg = new SotStorage( pStream, sal_False ); bool bTable2 = xStg->IsContained( rtl::OUString::createFromAscii("1Table" )); SotStorageStreamRef xRef = diff --git a/writerfilter/source/ooxml/OOXMLFactory.cxx b/writerfilter/source/ooxml/OOXMLFactory.cxx index a277d5928af6..9188bef6e8cb 100644 --- a/writerfilter/source/ooxml/OOXMLFactory.cxx +++ b/writerfilter/source/ooxml/OOXMLFactory.cxx @@ -131,8 +131,8 @@ void OOXMLFactory::attributes(OOXMLFastContextHandler * pHandler, if (pFactory.get() != NULL) { -#ifdef DEBUG_ATTRIBUTES - debug_logger->startElement("attributes"); +#ifdef DEBUG_FACTORY + debug_logger->startElement("factory.attributes"); debug_logger->attribute("define", pFactory->getDefineName(nDefine)); char sBuffer[256]; snprintf(sBuffer, sizeof(sBuffer), "%08" SAL_PRIxUINT32, nDefine); @@ -148,8 +148,8 @@ void OOXMLFactory::attributes(OOXMLFastContextHandler * pHandler, for (aIt = pMap->begin(); aIt != aEndIt; aIt++) { Id nId = (*pTokenToIdMap)[aIt->first]; -#ifdef DEBUG_ATTRIBUTES - debug_logger->startElement("attribute"); +#ifdef DEBUG_FACTORY + debug_logger->startElement("factory.attribute"); debug_logger->attribute("name", fastTokenToId(aIt->first)); debug_logger->attribute("tokenid", (*QNameToString::Instance())(nId)); snprintf(sBuffer, sizeof(sBuffer), "%08" SAL_PRIxUINT32, nId); @@ -161,7 +161,7 @@ void OOXMLFactory::attributes(OOXMLFastContextHandler * pHandler, { case RT_Boolean: { -#ifdef DEBUG_ATTRIBUTES +#ifdef DEBUG_FACTORY debug_logger->element("boolean"); #endif ::rtl::OUString aValue(Attribs->getValue(aIt->first)); @@ -173,7 +173,7 @@ void OOXMLFactory::attributes(OOXMLFastContextHandler * pHandler, break; case RT_String: { -#ifdef DEBUG_ATTRIBUTES +#ifdef DEBUG_FACTORY debug_logger->element("string"); #endif ::rtl::OUString aValue(Attribs->getValue(aIt->first)); @@ -186,7 +186,7 @@ void OOXMLFactory::attributes(OOXMLFastContextHandler * pHandler, break; case RT_Integer: { -#ifdef DEBUG_ATTRIBUTES +#ifdef DEBUG_FACTORY debug_logger->element("integer"); #endif ::rtl::OUString aValue(Attribs->getValue(aIt->first)); @@ -199,7 +199,7 @@ void OOXMLFactory::attributes(OOXMLFastContextHandler * pHandler, break; case RT_Hex: { -#ifdef DEBUG_ATTRIBUTES +#ifdef DEBUG_FACTORY debug_logger->element("hex"); #endif ::rtl::OUString aValue(Attribs->getValue(aIt->first)); @@ -212,7 +212,7 @@ void OOXMLFactory::attributes(OOXMLFastContextHandler * pHandler, break; case RT_List: { -#ifdef DEBUG_ATTRIBUTES +#ifdef DEBUG_FACTORY debug_logger->startElement("list"); #endif ListValueMapPointer pListValueMap = @@ -223,7 +223,7 @@ void OOXMLFactory::attributes(OOXMLFastContextHandler * pHandler, ::rtl::OUString aValue(Attribs->getValue(aIt->first)); sal_uInt32 nValue = (*pListValueMap)[aValue]; -#ifdef DEBUG_ATTRIBUTES +#ifdef DEBUG_FACTORY debug_logger->attribute("value", aValue); debug_logger->attribute("value-num", nValue); #endif @@ -234,25 +234,25 @@ void OOXMLFactory::attributes(OOXMLFastContextHandler * pHandler, OOXMLValue::Pointer_t pValue(new OOXMLIntegerValue(nValue)); pFactory->attributeAction(pHandler, aIt->first, pValue); } -#ifdef DEBUG_ATTRIBUTES +#ifdef DEBUG_FACTORY debug_logger->endElement("list"); #endif } break; default: -#ifdef DEBUG_ATTRIBUTES +#ifdef DEBUG_FACTORY debug_logger->element("unknown-attribute-type"); #endif break; } } -#ifdef DEBUG_ATTRIBUTES - debug_logger->endElement("attribute"); +#ifdef DEBUG_FACTORY + debug_logger->endElement("factory.attribute"); #endif } -#ifdef DEBUG_ATTRIBUTES - debug_logger->endElement("attributes"); +#ifdef DEBUG_FACTORY + debug_logger->endElement("factory.attributes"); #endif } } @@ -261,6 +261,11 @@ uno::Reference< xml::sax::XFastContextHandler> OOXMLFactory::createFastChildContext(OOXMLFastContextHandler * pHandler, Token_t Element) { +#ifdef DEBUG_FACTORY + debug_logger->startElement("factory.createFastChildContext"); + debug_logger->attribute("token", fastTokenToId(Element)); +#endif + Id nDefine = pHandler->getDefine(); OOXMLFactory_ns::Pointer_t pFactory = getFactoryForNamespace(nDefine); @@ -271,12 +276,21 @@ OOXMLFactory::createFastChildContext(OOXMLFastContextHandler * pHandler, if ((Element & 0xffff) < OOXML_FAST_TOKENS_END) ret = createFastChildContextFromFactory(pHandler, pFactory, Element); +#ifdef DEBUG_FACTORY + debug_logger->endElement("factory.createFastChildContext"); +#endif + return ret; } void OOXMLFactory::characters(OOXMLFastContextHandler * pHandler, const ::rtl::OUString & rString) { +#ifdef DEBUG_FACTORY + debug_logger->startElement("factory.characters"); + debug_logger->chars(rString); +#endif + Id nDefine = pHandler->getDefine(); OOXMLFactory_ns::Pointer_t pFactory = getFactoryForNamespace(nDefine); @@ -284,6 +298,10 @@ void OOXMLFactory::characters(OOXMLFastContextHandler * pHandler, { pFactory->charactersAction(pHandler, rString); } + +#ifdef DEBUG_FACTORY + debug_logger->endElement("factory.characters"); +#endif } void OOXMLFactory::startAction(OOXMLFastContextHandler * pHandler, Token_t /*nToken*/) @@ -294,11 +312,11 @@ void OOXMLFactory::startAction(OOXMLFastContextHandler * pHandler, Token_t /*nTo if (pFactory.get() != NULL) { #ifdef DEBUG_ELEMENT - debug_logger->startElement("factory-startAction"); + debug_logger->startElement("factory.startAction"); #endif pFactory->startAction(pHandler); #ifdef DEBUG_ELEMENT - debug_logger->endElement("factory-startAction"); + debug_logger->endElement("factory.startAction"); #endif } } @@ -311,11 +329,11 @@ void OOXMLFactory::endAction(OOXMLFastContextHandler * pHandler, Token_t /*nToke if (pFactory.get() != NULL) { #ifdef DEBUG_ELEMENT - debug_logger->startElement("factory-endAction"); + debug_logger->startElement("factory.endAction"); #endif pFactory->endAction(pHandler); #ifdef DEBUG_ELEMENT - debug_logger->endElement("factory-endAction"); + debug_logger->endElement("factory.endAction"); #endif } } @@ -336,6 +354,13 @@ void OOXMLFactory_ns::attributeAction(OOXMLFastContextHandler *, Token_t, OOXMLV { } +#ifdef DEBUG_FACTORY +string OOXMLFactory_ns::getName() const +{ + return "noname"; +} +#endif + } } diff --git a/writerfilter/source/ooxml/OOXMLFactory.hxx b/writerfilter/source/ooxml/OOXMLFactory.hxx index 0558436ab793..753fb3f658f7 100755..100644 --- a/writerfilter/source/ooxml/OOXMLFactory.hxx +++ b/writerfilter/source/ooxml/OOXMLFactory.hxx @@ -114,6 +114,9 @@ public: virtual void endAction(OOXMLFastContextHandler * pHandler); virtual void attributeAction(OOXMLFastContextHandler * pHandler, Token_t nToken, OOXMLValue::Pointer_t pValue); virtual string getDefineName(Id nId) const; +#ifdef DEBUG_FACTORY + virtual string getName() const; +#endif AttributeToResourceMapPointer getAttributeToResourceMap(Id nId); ListValueMapPointer getListValueMap(Id nId); diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx index 20ee49258c00..5e4d5604527f 100644 --- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx +++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx @@ -31,6 +31,7 @@ #include <rtl/uuid.h> #include <com/sun/star/drawing/XShapes.hpp> #include <resourcemodel/QNameToString.hxx> +#include <resourcemodel/XPathLogger.hxx> #include <resourcemodel/util.hxx> #include <ooxml/resourceids.hxx> #include <doctok/sprmids.hxx> @@ -182,52 +183,23 @@ OOXMLFastContextHandler::~OOXMLFastContextHandler() aSetContexts.erase(this); } -#ifdef DEBUG_MEMORY -void SAL_CALL OOXMLFastContextHandler::acquire() - throw () -{ - mnRefCount++; - - static char buffer[256]; - snprintf(buffer, sizeof(buffer), "%ld: %s: aquire(%ld)", mnInstanceNumber, - getType().c_str(), mnRefCount); - logger("MEMORY", buffer); - - cppu::WeakImplHelper1<com::sun::star::xml::sax::XFastContextHandler>::acquire(); -} - -void SAL_CALL OOXMLFastContextHandler::release() - throw () -{ - static char buffer[256]; - snprintf(buffer, sizeof(buffer), "%s: release(%ld)", mnInstanceNumber, - getType().c_str(), mnRefCount); - logger("MEMORY", buffer); - - cppu::WeakImplHelper1<com::sun::star::xml::sax::XFastContextHandler>::release(); - mnRefCount--; -} -#endif - // ::com::sun::star::xml::sax::XFastContextHandler: void SAL_CALL OOXMLFastContextHandler::startFastElement (Token_t Element, const uno::Reference< xml::sax::XFastAttributeList > & Attribs) throw (uno::RuntimeException, xml::sax::SAXException) { -#ifdef DEBUG_ELEMENT - debug_logger->startElement("element"); - debug_logger->attribute("token", fastTokenToId(Element)); - debug_logger->attribute("type",getType()); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->startElement("contexthandler.element"); + string sToken = fastTokenToId(Element); + mpParserState->getXPathLogger().startElement(sToken); + debug_logger->attribute("token", sToken); + debug_logger->attribute("type", getType()); + debug_logger->attribute("xpath", mpParserState->getXPathLogger().getXPath()); debug_logger->startElement("at-start"); debug_logger->addTag(toTag()); debug_logger->endElement("at-start"); #endif -#ifdef DEBUG_MEMORY - static char buffer[256]; - snprintf(buffer, sizeof(buffer), "%ld: startFastElement", mnInstanceNumber); - logger("MEMORY", buffer); -#endif attributes(Attribs); lcl_startFastElement(Element, Attribs); } @@ -237,10 +209,11 @@ void SAL_CALL OOXMLFastContextHandler::startUnknownElement const uno::Reference< xml::sax::XFastAttributeList > & /*Attribs*/) throw (uno::RuntimeException, xml::sax::SAXException) { -#ifdef DEBUG_CONTEXT_STACK - debug_logger->startElement("unknown-element"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->startElement("contexthandler.unknown-element"); debug_logger->attribute("namespace", Namespace); debug_logger->attribute("name", Name); + mpParserState->getXPathLogger().startElement("unknown"); #else (void) Namespace; (void) Name; @@ -250,19 +223,19 @@ throw (uno::RuntimeException, xml::sax::SAXException) void SAL_CALL OOXMLFastContextHandler::endFastElement(Token_t Element) throw (uno::RuntimeException, xml::sax::SAXException) { +#ifdef DEBUG_CONTEXT_HANDLER + string sToken = fastTokenToId(Element); + (void) sToken; +#endif + lcl_endFastElement(Element); -#ifdef DEBUG_ELEMENT +#ifdef DEBUG_CONTEXT_HANDLER debug_logger->startElement("at-end"); debug_logger->addTag(toTag()); debug_logger->endElement("at-end"); - debug_logger->endElement("element"); -#endif -#ifdef DEBUG_MEMORY - static char buffer[256]; - snprintf(buffer, sizeof(buffer), "%ld: %s:endFastElement", mnInstanceNumber, - getType().c_str()); - logger("MEMORY", buffer); + debug_logger->endElement("contexthandler.element"); + mpParserState->getXPathLogger().endElement(); #endif } @@ -278,14 +251,6 @@ void OOXMLFastContextHandler::lcl_endFastElement (Token_t Element) throw (uno::RuntimeException, xml::sax::SAXException) { -#ifdef DEBUG_CONTEXT_STACK - debug_logger->startElement("endAction"); - debug_logger->endElement("endAction"); - debug_logger->startElement("token"); - debug_logger->chars(fastTokenToId(Element)); - debug_logger->endElement("token"); -#endif - OOXMLFactory::getInstance()->endAction(this, Element); } @@ -293,9 +258,9 @@ void SAL_CALL OOXMLFastContextHandler::endUnknownElement (const ::rtl::OUString & , const ::rtl::OUString & ) throw (uno::RuntimeException, xml::sax::SAXException) { -#ifdef DEBUG_ELEMENT - debug_logger->startElement("unknown-element"); - debug_logger->endElement("unknown-element"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->endElement("contexthandler.unknown-element"); + mpParserState->getXPathLogger().endElement(); #endif } @@ -305,8 +270,8 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL const uno::Reference< xml::sax::XFastAttributeList > & Attribs) throw (uno::RuntimeException, xml::sax::SAXException) { -#ifdef DEBUG_CONTEXT_STACK - debug_logger->startElement("createFastChildContext"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->startElement("contexthandler.createFastChildContext"); debug_logger->attribute("token", fastTokenToId(Element)); debug_logger->attribute("type", getType()); #endif @@ -314,8 +279,8 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL uno::Reference< xml::sax::XFastContextHandler > xResult (lcl_createFastChildContext(Element, Attribs)); -#ifdef DEBUG_CONTEXT_STACK - debug_logger->endElement("createFastChildContext"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->endElement("contexthandler.createFastChildContext"); #endif return xResult; @@ -337,11 +302,11 @@ OOXMLFastContextHandler::createUnknownChildContext const uno::Reference< xml::sax::XFastAttributeList > & /*Attribs*/) throw (uno::RuntimeException, xml::sax::SAXException) { -#ifdef DEBUG_ELEMENT - debug_logger->startElement("createUnknownChildContext"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->startElement("contexthandler.createUnknownChildContext"); debug_logger->attribute("namespace", Namespace); debug_logger->attribute("name", Name); - debug_logger->endElement("createUnknownChildContext"); + debug_logger->endElement("contexthandler.createUnknownChildContext"); #else (void) Namespace; (void) Name; @@ -404,12 +369,12 @@ void OOXMLFastContextHandler::attributes void OOXMLFastContextHandler::startAction(Token_t Element) { -#ifdef DEBUG_ELEMENT - debug_logger->startElement("startAction"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->startElement("contexthandler.startAction"); #endif lcl_startAction(Element); -#ifdef DEBUG_ELEMENT - debug_logger->endElement("startAction"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->endElement("contexthandler.startAction"); #endif } @@ -420,12 +385,12 @@ void OOXMLFastContextHandler::lcl_startAction(Token_t Element) void OOXMLFastContextHandler::endAction(Token_t Element) { -#ifdef DEBUG_ELEMENT - debug_logger->startElement("endAction"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->startElement("contexthandler.endAction"); #endif lcl_endAction(Element); -#ifdef DEBUG_ELEMENT - debug_logger->endElement("endAction"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->endElement("contexthandler.endAction"); #endif } @@ -493,15 +458,15 @@ string OOXMLFastContextHandler::getResourceString() const void OOXMLFastContextHandler::setId(Id rId) { -#ifdef DEBUG_ELEMENT - debug_logger->startElement("setId"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->startElement("contexthandler.setId"); static char sBuffer[256]; snprintf(sBuffer, sizeof(sBuffer), "%" SAL_PRIuUINT32, rId); debug_logger->attribute("id", sBuffer); - debug_logger->chars((*QNameToString::Instance())(rId)); - debug_logger->endElement("setId"); + debug_logger->attribute("name", (*QNameToString::Instance())(rId)); + debug_logger->endElement("contexthandler.setId"); #endif mId = rId; @@ -531,7 +496,7 @@ void OOXMLFastContextHandler::setToken(Token_t nToken) { mnToken = nToken; -#ifdef DEBUG_CONTEXT_STACK +#ifdef DEBUG_CONTEXT_HANDLER msTokenString = fastTokenToId(mnToken); #endif } @@ -547,11 +512,6 @@ void OOXMLFastContextHandler::mark(const Id & rId, OOXMLValue::Pointer_t pVal) OOXMLPropertyImpl::Pointer_t pProperty (new OOXMLPropertyImpl(rId, pVal, OOXMLPropertyImpl::ATTRIBUTE)); -#ifdef DEBUG_PROPERTIES - debug_logger->startElement("mark"); - debug_logger->chars(xmlify(pProperty->toString())); - debug_logger->endElement("mark"); -#endif pPropSet->add(pProperty); mpStream->props(pPropSet); } @@ -571,8 +531,8 @@ OOXMLPropertySet * OOXMLFastContextHandler::getPicturePropSet void OOXMLFastContextHandler::sendTableDepth() const { -#ifdef DEBUG_ELEMENT - debug_logger->startElement("sendTableDepth"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->startElement("contexthandler.sendTableDepth"); #endif if (mnTableDepth > 0) @@ -593,15 +553,10 @@ void OOXMLFastContextHandler::sendTableDepth() const pProps->add(pProp); } -#ifdef DEBUG_PROPERTIES - debug_logger->startElement("props"); - debug_logger->chars(pProps->toString()); - debug_logger->endElement("props"); -#endif mpStream->props(writerfilter::Reference<Properties>::Pointer_t(pProps)); } -#ifdef DEBUG_ELEMENT - debug_logger->endElement("sendTableDepth"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->endElement("contexthandler.sendTableDepth"); #endif } @@ -613,6 +568,10 @@ void OOXMLFastContextHandler::setHandle() void OOXMLFastContextHandler::startCharacterGroup() { +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->element("contexthandler.startCharacterGroup"); +#endif + if (isForwardEvents()) { if (mpParserState->isInCharacterGroup()) @@ -623,10 +582,6 @@ void OOXMLFastContextHandler::startCharacterGroup() if (! mpParserState->isInCharacterGroup()) { -#ifdef DEBUG_ELEMENT - debug_logger->element("startCharacterGroup"); -#endif - mpStream->startCharacterGroup(); mpParserState->setInCharacterGroup(true); mpParserState->resolveCharacterProperties(*mpStream); @@ -636,12 +591,12 @@ void OOXMLFastContextHandler::startCharacterGroup() void OOXMLFastContextHandler::endCharacterGroup() { - if (isForwardEvents() && mpParserState->isInCharacterGroup()) - { -#ifdef DEBUG_ELEMENT - debug_logger->element("endCharacterGroup"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->element("contexthandler.endCharacterGroup"); #endif + if (isForwardEvents() && mpParserState->isInCharacterGroup()) + { mpStream->endCharacterGroup(); mpParserState->setInCharacterGroup(false); } @@ -649,6 +604,10 @@ void OOXMLFastContextHandler::endCharacterGroup() void OOXMLFastContextHandler::startParagraphGroup() { +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->element("contexthandler.startParagraphGroup"); +#endif + if (isForwardEvents()) { if (mpParserState->isInParagraphGroup()) @@ -659,10 +618,6 @@ void OOXMLFastContextHandler::startParagraphGroup() if (! mpParserState->isInParagraphGroup()) { -#ifdef DEBUG_ELEMENT - debug_logger->element("startParagraphGroup"); -#endif - mpStream->startParagraphGroup(); mpParserState->setInParagraphGroup(true); } @@ -671,6 +626,10 @@ void OOXMLFastContextHandler::startParagraphGroup() void OOXMLFastContextHandler::endParagraphGroup() { +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->element("contexthandler.endParagraphGroup"); +#endif + if (isForwardEvents()) { if (mpParserState->isInCharacterGroup()) @@ -678,9 +637,6 @@ void OOXMLFastContextHandler::endParagraphGroup() if (mpParserState->isInParagraphGroup()) { -#ifdef DEBUG_ELEMENT - debug_logger->element("endParagraphGroup"); -#endif mpStream->endParagraphGroup(); mpParserState->setInParagraphGroup(false); } @@ -689,6 +645,10 @@ void OOXMLFastContextHandler::endParagraphGroup() void OOXMLFastContextHandler::startSectionGroup() { +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->element("contexthandler.startSectionGroup"); +#endif + if (isForwardEvents()) { if (mpParserState->isInSectionGroup()) @@ -696,9 +656,6 @@ void OOXMLFastContextHandler::startSectionGroup() if (! mpParserState->isInSectionGroup()) { -#ifdef DEBUG_ELEMENT - debug_logger->element("startSectionGroup"); -#endif mpStream->info(mpParserState->getHandle()); mpStream->startSectionGroup(); mpParserState->setInSectionGroup(true); @@ -708,6 +665,10 @@ void OOXMLFastContextHandler::startSectionGroup() void OOXMLFastContextHandler::endSectionGroup() { +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->element("contexthandler.endSectionGroup"); +#endif + if (isForwardEvents()) { if (mpParserState->isInParagraphGroup()) @@ -715,9 +676,6 @@ void OOXMLFastContextHandler::endSectionGroup() if (mpParserState->isInSectionGroup()) { -#ifdef DEBUG_ELEMENT - debug_logger->element("endSectionGroup"); -#endif mpStream->endSectionGroup(); mpParserState->setInSectionGroup(false); } @@ -726,10 +684,6 @@ void OOXMLFastContextHandler::endSectionGroup() void OOXMLFastContextHandler::setLastParagraphInSection() { -#ifdef DEBUG_ELEMENT - debug_logger->element("setLastParagraphInSection"); -#endif - mpParserState->setLastParagraphInSection(true); mpStream->markLastParagraphInSection( ); } @@ -751,8 +705,8 @@ OOXMLPropertySet::Pointer_t OOXMLFastContextHandler::getPropertySet() const void OOXMLFastContextHandler::startField() { -#ifdef DEBUG_ELEMENT - debug_logger->element("startField"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->element("contexthandler.startField"); #endif startCharacterGroup(); if (isForwardEvents()) @@ -762,8 +716,8 @@ void OOXMLFastContextHandler::startField() void OOXMLFastContextHandler::fieldSeparator() { -#ifdef DEBUG_ELEMENT - debug_logger->element("fieldSeparator"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->element("contexthandler.fieldSeparator"); #endif startCharacterGroup(); if (isForwardEvents()) @@ -773,8 +727,8 @@ void OOXMLFastContextHandler::fieldSeparator() void OOXMLFastContextHandler::endField() { -#ifdef DEBUG_ELEMENT - debug_logger->element("endField"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->element("contexthandler.endField"); #endif startCharacterGroup(); if (isForwardEvents()) @@ -784,8 +738,8 @@ void OOXMLFastContextHandler::endField() void OOXMLFastContextHandler::ftnednref() { -#ifdef DEBUG_ELEMENT - debug_logger->element("ftnednref"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->element("contexthandler.ftnednref"); #endif if (isForwardEvents()) mpStream->utext(sFtnEdnRef, 1); @@ -793,8 +747,8 @@ void OOXMLFastContextHandler::ftnednref() void OOXMLFastContextHandler::ftnednsep() { -#ifdef DEBUG_ELEMENT - debug_logger->element("ftnednsep"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->element("contexthandler.ftnednsep"); #endif if (isForwardEvents()) mpStream->utext(sFtnEdnSep, 1); @@ -802,8 +756,8 @@ void OOXMLFastContextHandler::ftnednsep() void OOXMLFastContextHandler::ftnedncont() { -#ifdef DEBUG_ELEMENT - debug_logger->element("ftnedncont"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->element("contexthandler.ftnedncont"); #endif if (isForwardEvents()) mpStream->text(sFtnEdnCont, 1); @@ -811,8 +765,8 @@ void OOXMLFastContextHandler::ftnedncont() void OOXMLFastContextHandler::pgNum() { -#ifdef DEBUG_ELEMENT - debug_logger->element("pgNum"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->element("contexthandler.pgNum"); #endif if (isForwardEvents()) mpStream->utext((const sal_uInt8*)sPgNum, 1); @@ -820,8 +774,8 @@ void OOXMLFastContextHandler::pgNum() void OOXMLFastContextHandler::tab() { -#ifdef DEBUG_ELEMENT - debug_logger->element("tab"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->element("contexthandler.tab"); #endif if (isForwardEvents()) mpStream->utext((const sal_uInt8*)sTab, 1); @@ -829,8 +783,8 @@ void OOXMLFastContextHandler::tab() void OOXMLFastContextHandler::cr() { -#ifdef DEBUG_ELEMENT - debug_logger->element("cr"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->element("contexthandler.cr"); #endif if (isForwardEvents()) mpStream->utext((const sal_uInt8*)sCR, 1); @@ -838,8 +792,8 @@ void OOXMLFastContextHandler::cr() void OOXMLFastContextHandler::noBreakHyphen() { -#ifdef DEBUG_ELEMENT - debug_logger->element("noBreakHyphen"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->element("contexthandler.noBreakHyphen"); #endif if (isForwardEvents()) mpStream->utext((const sal_uInt8*)sNoBreakHyphen, 1); @@ -847,8 +801,8 @@ void OOXMLFastContextHandler::noBreakHyphen() void OOXMLFastContextHandler::softHyphen() { -#ifdef DEBUG_ELEMENT - debug_logger->element("softHyphen"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->element("contexthandler.softHyphen"); #endif if (isForwardEvents()) mpStream->utext((const sal_uInt8*)sSoftHyphen, 1); @@ -856,8 +810,8 @@ void OOXMLFastContextHandler::softHyphen() void OOXMLFastContextHandler::handleLastParagraphInSection() { -#ifdef DEBUG_ELEMENT - debug_logger->element("handleLastParagraphInSection"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->element("contexthandler.handleLastParagraphInSection"); #endif if (mpParserState->isLastParagraphInSection()) @@ -869,8 +823,8 @@ void OOXMLFastContextHandler::handleLastParagraphInSection() void OOXMLFastContextHandler::endOfParagraph() { -#ifdef DEBUG_ELEMENT - debug_logger->element("endOfParagraph"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->element("contexthandler.endOfParagraph"); #endif if (! mpParserState->isInCharacterGroup()) startCharacterGroup(); @@ -880,10 +834,10 @@ void OOXMLFastContextHandler::endOfParagraph() void OOXMLFastContextHandler::text(const ::rtl::OUString & sText) { -#ifdef DEBUG_ELEMENT - debug_logger->startElement("text"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->startElement("contexthandler.text"); debug_logger->chars(sText); - debug_logger->endElement("text"); + debug_logger->endElement("contexthandler.text"); #endif if (isForwardEvents()) mpStream->utext(reinterpret_cast < const sal_uInt8 * > @@ -893,10 +847,10 @@ void OOXMLFastContextHandler::text(const ::rtl::OUString & sText) void OOXMLFastContextHandler::propagateCharacterProperties() { -#ifdef DEBUG_ELEMENT - debug_logger->startElement("propagateCharacterProperties"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->startElement("contexthandler.propagateCharacterProperties"); debug_logger->addTag(toPropertiesTag(getPropertySet())); - debug_logger->endElement("propagateCharacterProperties"); + debug_logger->endElement("contexthandler.propagateCharacterProperties"); #endif mpParserState->setCharacterProperties(getPropertySet()); @@ -904,10 +858,10 @@ void OOXMLFastContextHandler::propagateCharacterProperties() void OOXMLFastContextHandler::propagateCharacterPropertiesAsSet(const Id & rId) { -#ifdef DEBUG_ELEMENT - debug_logger->startElement("propagateCharacterPropertiesAsSet"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->startElement("contexthandler.propagateCharacterPropertiesAsSet"); debug_logger->addTag(toPropertiesTag(getPropertySet())); - debug_logger->endElement("propagateCharacterPropertiesAsSet"); + debug_logger->endElement("contexthandler.propagateCharacterPropertiesAsSet"); #endif OOXMLValue::Pointer_t pValue(new OOXMLPropertySetValue(getPropertySet())); @@ -927,8 +881,8 @@ bool OOXMLFastContextHandler::propagatesProperties() const void OOXMLFastContextHandler::propagateCellProperties() { -#ifdef DEBUG_ELEMENT - debug_logger->element("propagateCellProperties"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->element("contexthandler.propagateCellProperties"); #endif mpParserState->setCellProperties(getPropertySet()); @@ -936,8 +890,8 @@ void OOXMLFastContextHandler::propagateCellProperties() void OOXMLFastContextHandler::propagateRowProperties() { -#ifdef DEBUG_ELEMENT - debug_logger->element("propagateRowProperties"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->element("contexthandler.propagateRowProperties"); #endif mpParserState->setRowProperties(getPropertySet()); @@ -946,10 +900,10 @@ void OOXMLFastContextHandler::propagateRowProperties() void OOXMLFastContextHandler::propagateTableProperties() { OOXMLPropertySet::Pointer_t pProps = getPropertySet(); -#ifdef DEBUG_ELEMENT - debug_logger->startElement("propagateTableProperties"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->startElement("contexthandler.propagateTableProperties"); debug_logger->addTag(toPropertiesTag(pProps)); - debug_logger->endElement("propagateTableProperties"); + debug_logger->endElement("contexthandler.propagateTableProperties"); #endif mpParserState->setTableProperties(pProps); @@ -957,47 +911,47 @@ void OOXMLFastContextHandler::propagateTableProperties() void OOXMLFastContextHandler::sendCellProperties() { -#ifdef DEBUG_ELEMENT - debug_logger->startElement("sendCellProperties"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->startElement("contexthandler.sendCellProperties"); #endif mpParserState->resolveCellProperties(*mpStream); -#ifdef DEBUG_ELEMENT - debug_logger->endElement("sendCellProperties"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->endElement("contexthandler.sendCellProperties"); #endif } void OOXMLFastContextHandler::sendRowProperties() { -#ifdef DEBUG_ELEMENT - debug_logger->startElement("sendRowProperties"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->startElement("contexthandler.sendRowProperties"); #endif mpParserState->resolveRowProperties(*mpStream); -#ifdef DEBUG_ELEMENT - debug_logger->endElement("sendRowProperties"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->endElement("contexthandler.sendRowProperties"); #endif } void OOXMLFastContextHandler::sendTableProperties() { -#ifdef DEBUG_ELEMENT - debug_logger->startElement("sendTableProperties"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->startElement("contexthandler.sendTableProperties"); #endif mpParserState->resolveTableProperties(*mpStream); -#ifdef DEBUG_ELEMENT - debug_logger->endElement("sendTableProperties"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->endElement("contexthandler.sendTableProperties"); #endif } void OOXMLFastContextHandler::clearTableProps() { -#ifdef DEBUG_ELEMENT - debug_logger->element("clearTableProps"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->element("contexthandler.clearTableProps"); #endif mpParserState->setTableProperties(OOXMLPropertySet::Pointer_t @@ -1006,8 +960,8 @@ void OOXMLFastContextHandler::clearTableProps() void OOXMLFastContextHandler::sendPropertiesWithId(const Id & rId) { -#ifdef DEBUG_ELEMENT - debug_logger->startElement("sendPropertiesWithId"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->startElement("contexthandler.sendPropertiesWithId"); debug_logger->attribute("id", fastTokenToId(rId)); #endif @@ -1020,16 +974,16 @@ void OOXMLFastContextHandler::sendPropertiesWithId(const Id & rId) pPropertySet->add(pProp); mpStream->props(pPropertySet); -#ifdef DEBUG_ELEMENT +#ifdef DEBUG_CONTEXT_HANDLER debug_logger->addTag(toPropertiesTag(pPropertySet)); - debug_logger->endElement("sendPropertiesWithId"); + debug_logger->endElement("contexthandler.sendPropertiesWithId"); #endif } void OOXMLFastContextHandler::clearProps() { -#ifdef DEBUG_ELEMENT - debug_logger->element("clearProps"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->element("contexthandler.clearProps"); #endif setPropertySet(OOXMLPropertySet::Pointer_t(new OOXMLPropertySetImpl())); @@ -1063,15 +1017,15 @@ OOXMLDocument * OOXMLFastContextHandler::getDocument() void OOXMLFastContextHandler::setForwardEvents(bool bForwardEvents) { -#ifdef DEBUG_ELEMENT - debug_logger->startElement("setForwardEvents"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->startElement("contexthandler.setForwardEvents"); if (bForwardEvents) debug_logger->chars("true"); else debug_logger->chars("false"); - debug_logger->endElement("setForwardEvents"); + debug_logger->endElement("contexthandler.setForwardEvents"); #endif mpParserState->setForwardEvents(bForwardEvents); @@ -1154,8 +1108,8 @@ void OOXMLFastContextHandler::resolvePropertySetAttrs() void OOXMLFastContextHandler::sendPropertyToParent() { -#ifdef DEBUG_ELEMENT - debug_logger->startElement("sendPropertyToParent"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->startElement("contexthandler.sendPropertyToParent"); #endif if (mpParent != NULL) @@ -1169,21 +1123,21 @@ void OOXMLFastContextHandler::sendPropertyToParent() OOXMLPropertyImpl::SPRM)); pProps->add(pProp); -#ifdef DEBUG_ELEMENT +#ifdef DEBUG_CONTEXT_HANDLER debug_logger->addTag(toPropertiesTag(pProps)); #endif } } -#ifdef DEBUG_ELEMENT - debug_logger->endElement("sendPropertyToParent"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->endElement("contexthandler.sendPropertyToParent"); #endif } void OOXMLFastContextHandler::sendPropertiesToParent() { -#ifdef DEBUG_ELEMENT - debug_logger->startElement("sendPropertiesToParent"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->startElement("contexthandler.sendPropertiesToParent"); #endif if (mpParent != NULL) { @@ -1193,12 +1147,6 @@ void OOXMLFastContextHandler::sendPropertiesToParent() { OOXMLPropertySet::Pointer_t pProps(getPropertySet()); -#ifdef DEBUG_ELEMENT - debug_logger->startElement("me"); - debug_logger->addTag(toPropertiesTag(pProps)); - debug_logger->endElement("me"); -#endif - if (pProps.get() != NULL) { OOXMLValue::Pointer_t pValue @@ -1207,24 +1155,12 @@ void OOXMLFastContextHandler::sendPropertiesToParent() OOXMLProperty::Pointer_t pProp (new OOXMLPropertyImpl(getId(), pValue, OOXMLPropertyImpl::SPRM)); -#ifdef DEBUG_ELEMENT - debug_logger->startElement("propertyForSet"); - debug_logger->chars(pProp->toString()); - debug_logger->endElement("propertyForSet"); -#endif - pParentProps->add(pProp); - -#ifdef DEBUG_ELEMENT - debug_logger->startElement("parent"); - debug_logger->addTag(toPropertiesTag(pParentProps)); - debug_logger->endElement("parent"); -#endif } } } -#ifdef DEBUG_ELEMENT - debug_logger->endElement("sendPropertiesToParent"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->endElement("contexthandler.sendPropertiesToParent"); #endif } @@ -1263,11 +1199,11 @@ void OOXMLFastContextHandlerStream::newProperty(const Id & rId, void OOXMLFastContextHandlerStream::sendProperty(Id nId) { -#ifdef DEBUG_PROPERTIES - debug_logger->startElement("sendProperty"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->startElement("contexthandler.sendProperty"); debug_logger->attribute("id", (*QNameToString::Instance())(nId)); debug_logger->chars(xmlify(getPropertySetAttrs()->toString())); - debug_logger->endElement("sendProperty"); + debug_logger->endElement("contexthandler.sendProperty"); #endif OOXMLPropertySetEntryToString aHandler(nId); @@ -1286,10 +1222,10 @@ OOXMLFastContextHandlerStream::getPropertySetAttrs() const void OOXMLFastContextHandlerStream::resolvePropertySetAttrs() { -#ifdef DEBUG_PROPERTIES - debug_logger->startElement("resolvePropertySetAttrs"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->startElement("contexthandler.resolvePropertySetAttrs"); debug_logger->chars(mpPropertySetAttrs->toString()); - debug_logger->endElement("resolvePropertySetAttrs"); + debug_logger->endElement("contexthandler.resolvePropertySetAttrs"); #endif mpStream->props(mpPropertySetAttrs); } @@ -1339,13 +1275,7 @@ void OOXMLFastContextHandlerProperties::lcl_endFastElement { if (isForwardEvents()) { -#ifdef DEBUG_PROPERTIES - debug_logger->startElement("sendproperties"); -#endif mpStream->props(mpPropertySet); -#ifdef DEBUG_PROPERTIES - debug_logger->endElement("sendproperties"); -#endif } } else @@ -1544,7 +1474,16 @@ OOXMLFastContextHandlerValue::~OOXMLFastContextHandlerValue() void OOXMLFastContextHandlerValue::setValue(OOXMLValue::Pointer_t pValue) { +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->startElement("contexthandler.setValue"); + debug_logger->attribute("value", pValue->toString()); +#endif + mpValue = pValue; + +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->endElement("contexthandler.setValue"); +#endif } OOXMLValue::Pointer_t OOXMLFastContextHandlerValue::getValue() const diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx index 0c441f62a180..59ee2cc42080 100644 --- a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx +++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx @@ -230,18 +230,13 @@ public: virtual string toString() const; #endif -#ifdef DEBUG_MEMORY - virtual void SAL_CALL acquire() throw(); - virtual void SAL_CALL release() throw(); -#endif - protected: OOXMLFastContextHandler * mpParent; Id mId; Id mnDefine; Token_t mnToken; -#ifdef DEBUG_CONTEXT_STACK +#ifdef DEBUG_CONTEXT_HANDLER string msTokenString; #endif diff --git a/writerfilter/source/ooxml/OOXMLFastHelper.hxx b/writerfilter/source/ooxml/OOXMLFastHelper.hxx index 5d4587922a54..961b4660f036 100644 --- a/writerfilter/source/ooxml/OOXMLFastHelper.hxx +++ b/writerfilter/source/ooxml/OOXMLFastHelper.hxx @@ -74,6 +74,12 @@ uno::Reference<XFastContextHandler> OOXMLFastHelper<T>::createAndSetParent (OOXMLFastContextHandler * pHandler, sal_uInt32 nToken, Id nId) { +#ifdef DEBUG_HELPER + debug_logger->startElement("helper.createAndSetParent"); + debug_logger->attribute("context", pHandler->getType()); + debug_logger->attribute("id", (*QNameToString::Instance())(nId)); +#endif + OOXMLFastContextHandler * pTmp = new T(pHandler); pTmp->setToken(nToken); @@ -88,7 +94,7 @@ OOXMLFastHelper<T>::createAndSetParent debug_logger->startElement("created"); debug_logger->addTag(pTmp->toTag()); debug_logger->endElement("created"); - debug_logger->endElement("createAndSetParent"); + debug_logger->endElement("helper.createAndSetParent"); #endif uno::Reference<XFastContextHandler> aResult(pTmp); @@ -101,27 +107,29 @@ uno::Reference<XFastContextHandler> OOXMLFastHelper<T>::createAndSetParentAndDefine (OOXMLFastContextHandler * pHandler, sal_uInt32 nToken, Id nId, Id nDefine) { - OOXMLFastContextHandler * pTmp = new T(pHandler); - - pTmp->setToken(nToken); - pTmp->setId(nId); - pTmp->setDefine(nDefine); - -#ifdef DEBUG_CREATE - debug_logger->startElement("createAndSetParentAndDefine"); +#ifdef DEBUG_HELPER + debug_logger->startElement("helper.createAndSetParentAndDefine"); debug_logger->attribute("context", pHandler->getType()); - debug_logger->attribute("token", fastTokenToId(pTmp->getToken())); debug_logger->attribute("id", (*QNameToString::Instance())(nId)); static char buffer[16]; snprintf(buffer, sizeof(buffer), "0x%08" SAL_PRIxUINT32, nId); debug_logger->attribute("idnum", buffer); +#endif + + OOXMLFastContextHandler * pTmp = new T(pHandler); + + pTmp->setToken(nToken); + pTmp->setId(nId); + pTmp->setDefine(nDefine); + +#ifdef DEBUG_HELPER debug_logger->startElement("created"); debug_logger->addTag(pTmp->toTag()); debug_logger->endElement("created"); - debug_logger->endElement("createAndSetParentAndDefine"); + debug_logger->endElement("helper.createAndSetParentAndDefine"); #endif uno::Reference<XFastContextHandler> aResult(pTmp); @@ -135,6 +143,12 @@ OOXMLFastHelper<T>::createAndSetParentRef (OOXMLFastContextHandler * pHandler, sal_uInt32 nToken, const uno::Reference < xml::sax::XFastAttributeList > & Attribs) { +#ifdef DEBUG_HELPER + debug_logger->startElement("helper.createAndSetParentRef"); + debug_logger->attribute("context", pHandler->getType()); + debug_logger->attribute("type", fastTokenToId(nToken)); +#endif + boost::shared_ptr<OOXMLFastContextHandler> pTmp(new T(pHandler)); uno::Reference<XFastContextHandler> xChild = @@ -149,15 +163,11 @@ OOXMLFastHelper<T>::createAndSetParentRef } -#ifdef DEBUG_CREATE - debug_logger->startElement("createAndSetParentRef"); - debug_logger->attribute("context", pHandler->getType()); - debug_logger->attribute("type", fastTokenToId(nToken)); - +#ifdef DEBUG_HELPER debug_logger->startElement("created"); - debug_logger->chars(pTmp->getType()); + debug_logger->addTag(pTmp->toTag()); debug_logger->endElement("created"); - debug_logger->endElement("createAndSetParentRef"); + debug_logger->endElement("helper.createAndSetParentRef"); #endif return xChild; @@ -170,7 +180,7 @@ void OOXMLFastHelper<T>::newProperty(OOXMLFastContextHandler * pHandler, { OOXMLValue::Pointer_t pVal(new T(rValue)); -#ifdef DEBUG_PROPERTIES +#ifdef DEBUG_HELPER string aStr = (*QNameToString::Instance())(nId); debug_logger->startElement("newProperty-from-string"); @@ -182,11 +192,14 @@ void OOXMLFastHelper<T>::newProperty(OOXMLFastContextHandler * pHandler, if (aStr.size() == 0) debug_logger->addTag(XMLTag::Pointer_t(new XMLTag("unknown-qname"))); +#endif + pHandler->newProperty(nId, pVal); + +#ifdef DEBUG_HELPER debug_logger->endElement("newProperty-from-string"); #endif - pHandler->newProperty(nId, pVal); } template <class T> @@ -196,17 +209,17 @@ void OOXMLFastHelper<T>::newProperty(OOXMLFastContextHandler * pHandler, { OOXMLValue::Pointer_t pVal(new T(nVal)); -#ifdef DEBUG_PROPERTIES +#ifdef DEBUG_HELPER string aStr = (*QNameToString::Instance())(nId); - debug_logger->startElement("newProperty-from-int"); + debug_logger->startElement("helper.newProperty-from-int"); debug_logger->attribute("name", aStr); debug_logger->attribute("value", pVal->toString()); if (aStr.size() == 0) debug_logger->addTag(XMLTag::Pointer_t(new XMLTag("unknown-qname"))); - debug_logger->endElement("newProperty-from-int"); + debug_logger->endElement("helper.newProperty-from-int"); #endif pHandler->newProperty(nId, pVal); @@ -221,8 +234,8 @@ void OOXMLFastHelper<T>::mark(OOXMLFastContextHandler * pHandler, string aStr = (*QNameToString::Instance())(nId); -#ifdef DEBUG_PROPERTIES - debug_logger->startElement("mark"); +#ifdef DEBUG_HELPER + debug_logger->startElement("helper.mark"); debug_logger->attribute("name", aStr); debug_logger->attribute ("value", @@ -232,22 +245,10 @@ void OOXMLFastHelper<T>::mark(OOXMLFastContextHandler * pHandler, if (aStr.size() == 0) debug_logger->addTag(XMLTag::Pointer_t(new XMLTag("unknown-qname"))); - debug_logger->endElement("mark"); + debug_logger->endElement("helper.mark"); #endif pHandler->mark(nId, pVal); } - -template <class T> -void OOXMLFastHelper<T>::attributes -(OOXMLFastContextHandler * pContext, - const uno::Reference < xml::sax::XFastAttributeList > & Attribs) - { - T aContext(pContext); - - aContext.setPropertySet(pContext->getPropertySet()); - aContext.attributes(Attribs); -} - }} #endif // INCLUDED_FAST_HELPER_HXX diff --git a/writerfilter/source/ooxml/OOXMLParserState.cxx b/writerfilter/source/ooxml/OOXMLParserState.cxx index fb347d02048e..41a3738ee7ab 100644 --- a/writerfilter/source/ooxml/OOXMLParserState.cxx +++ b/writerfilter/source/ooxml/OOXMLParserState.cxx @@ -320,6 +320,11 @@ XMLTag::Pointer_t OOXMLParserState::toTag() const return pTag; } + +XPathLogger & OOXMLParserState::getXPathLogger() +{ + return m_xPathLogger; +} #endif }} diff --git a/writerfilter/source/ooxml/OOXMLParserState.hxx b/writerfilter/source/ooxml/OOXMLParserState.hxx index 2dd118a5b96b..12a9876ce6eb 100644 --- a/writerfilter/source/ooxml/OOXMLParserState.hxx +++ b/writerfilter/source/ooxml/OOXMLParserState.hxx @@ -33,6 +33,7 @@ #ifdef DEBUG #include <resourcemodel/TagLogger.hxx> +#include <resourcemodel/XPathLogger.hxx> #endif namespace writerfilter { @@ -57,6 +58,9 @@ class OOXMLParserState stack<OOXMLPropertySet::Pointer_t> mCellProps; stack<OOXMLPropertySet::Pointer_t> mRowProps; stack<OOXMLPropertySet::Pointer_t> mTableProps; +#ifdef DEBUG + XPathLogger m_xPathLogger; +#endif public: typedef boost::shared_ptr<OOXMLParserState> Pointer_t; @@ -109,6 +113,7 @@ public: unsigned int getContextCount() const; string toString() const; XMLTag::Pointer_t toTag() const; + XPathLogger & getXPathLogger(); #endif }; diff --git a/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx b/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx index f106972b23c0..6e0bcaf763cd 100644 --- a/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx +++ b/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx @@ -34,8 +34,6 @@ #include <ooxml/OOXMLFastTokens.hxx> #include "ooxmlLoggers.hxx" -//#define DEBUG_RESOLVE - namespace writerfilter { namespace ooxml { @@ -474,15 +472,22 @@ string OOXMLPropertySetImpl::getType() const void OOXMLPropertySetImpl::add(OOXMLProperty::Pointer_t pProperty) { +#ifdef DEBUG_PROPERTY_SET + debug_logger->startElement("propertyset.add"); + debug_logger->chars(pProperty->toString()); +#endif + if (pProperty.get() != NULL && pProperty->getId() != 0x0) { mProperties.push_back(pProperty); } -#ifdef DEBUG_PROPERTIES +#ifdef DEBUG_PROPERTY_SET else { debug_logger->element("warning.property_not_added"); } + + debug_logger->endElement("propertyset.add"); #endif } diff --git a/writerfilter/source/ooxml/analyzemodel.xsl b/writerfilter/source/ooxml/analyzemodel.xsl index d887a9a178a6..3cce9795a947 100644 --- a/writerfilter/source/ooxml/analyzemodel.xsl +++ b/writerfilter/source/ooxml/analyzemodel.xsl @@ -98,6 +98,7 @@ </xsl:for-each> </xsl:when> </xsl:choose> + <xsl:copy-of select="@tag"/> </xsl:for-each> </xsl:template> </xsl:stylesheet>
\ No newline at end of file diff --git a/writerfilter/source/ooxml/effort.xsl b/writerfilter/source/ooxml/effort.xsl index 47f278a63f4f..3dfc102e0780 100644 --- a/writerfilter/source/ooxml/effort.xsl +++ b/writerfilter/source/ooxml/effort.xsl @@ -7,33 +7,40 @@ <xsl:output method="text"/> <xsl:template match="/"> - <xsl:text>Namespace,Define,Name,Done,Planned,qname-count
</xsl:text> - <xsl:for-each select="/todo/attribute|/todo/element"> - <xsl:for-each select=".//status"> - <xsl:for-each select="ancestor::attribute|ancestor::element"> - <xsl:value-of select="@namespace"/> - <xsl:text>,</xsl:text> - <xsl:value-of select="@define"/> - <xsl:text>,</xsl:text> - <xsl:value-of select="@name"/> - <xsl:text>,</xsl:text> - </xsl:for-each> - <xsl:value-of select="@done"/> - <xsl:text>,</xsl:text> - <xsl:value-of select="@planned"/> - <xsl:text>,</xsl:text> - <xsl:value-of select="@qname-count"/> - <xsl:text>
</xsl:text> - </xsl:for-each> - <xsl:if test="not(.//status)"> - <xsl:value-of select="@namespace"/> - <xsl:text>,</xsl:text> - <xsl:value-of select="@define"/> - <xsl:text>,</xsl:text> - <xsl:value-of select="@name"/> - <xsl:text>,0,0.5,1
</xsl:text> - </xsl:if> + <xsl:text>Namespace,Define,Name,Tag,Done,Planned,qname-count
</xsl:text> + <xsl:for-each select="/todo/attribute|/todo/element"> + <xsl:variable name="namespace" select="@namespace"/> + <xsl:variable name="define" select="@define"/> + <xsl:variable name="name" select="@name"/> + <xsl:variable name="tag" select="@tag"/> + + <xsl:for-each select=".//status"> + <xsl:value-of select="$namespace"/> + <xsl:text>,</xsl:text> + <xsl:value-of select="$define"/> + <xsl:text>,</xsl:text> + <xsl:value-of select="$name"/> + <xsl:text>,</xsl:text> + <xsl:value-of select="$tag"/> + <xsl:text>,</xsl:text> + <xsl:value-of select="@done"/> + <xsl:text>,</xsl:text> + <xsl:value-of select="@planned"/> + <xsl:text>,</xsl:text> + <xsl:value-of select="@qname-count"/> + <xsl:text>
</xsl:text> </xsl:for-each> + <xsl:if test="not(.//status)"> + <xsl:value-of select="$namespace"/> + <xsl:text>,</xsl:text> + <xsl:value-of select="$define"/> + <xsl:text>,</xsl:text> + <xsl:value-of select="$name"/> + <xsl:text>,</xsl:text> + <xsl:value-of select="$tag"/> + <xsl:text>,0,0.5,1
</xsl:text> + </xsl:if> + </xsl:for-each> </xsl:template> </xsl:stylesheet>
\ No newline at end of file diff --git a/writerfilter/source/ooxml/factory_ns.xsl b/writerfilter/source/ooxml/factory_ns.xsl index 44b5c824859f..0349d832128d 100644 --- a/writerfilter/source/ooxml/factory_ns.xsl +++ b/writerfilter/source/ooxml/factory_ns.xsl @@ -69,19 +69,18 @@ <xsl:template name="factoryactiondecls"> <xsl:variable name="ns" select="@name"/> - <xsl:for-each select="resource/action"> + <xsl:for-each select="resource/action[not(@name='characters')]"> <xsl:sort select="@name"/> <xsl:if test="generate-id(key('actions', @name)[ancestor::namespace/@name=$ns][1]) = generate-id(.)"> <xsl:text> void </xsl:text> <xsl:value-of select="@name"/> <xsl:text>Action(OOXMLFastContextHandler * pHandler</xsl:text> - <xsl:if test="@name='characters'"> - <xsl:text>, const ::rtl::OUString & sText</xsl:text> - </xsl:if> <xsl:text>);</xsl:text> </xsl:if> </xsl:for-each> + <xsl:text> + virtual void charactersAction(OOXMLFastContextHandler * pHandler, const ::rtl::OUString & sText);</xsl:text> </xsl:template> <!-- factorydecl --> @@ -106,6 +105,10 @@ public: virtual string getDefineName(Id nId) const;</xsl:text> <xsl:call-template name="factoryactiondecls"/> virtual void attributeAction(OOXMLFastContextHandler * pHandler, Token_t nToken, OOXMLValue::Pointer_t pValue); + +#ifdef DEBUG_FACTORY + virtual string getName() const; +#endif <xsl:text> virtual ~</xsl:text> diff --git a/writerfilter/source/ooxml/factoryimpl.xsl b/writerfilter/source/ooxml/factoryimpl.xsl index 8eecf4aba813..781883b761e5 100644 --- a/writerfilter/source/ooxml/factoryimpl.xsl +++ b/writerfilter/source/ooxml/factoryimpl.xsl @@ -78,6 +78,10 @@ uno::Reference< xml::sax::XFastContextHandler > OOXMLFactory::createFastCh uno::Reference < xml::sax::XFastContextHandler > aResult; Id nDefine = pHandler->getDefine(); +#ifdef DEBUG_FACTORY + debug_logger->startElement("factory.createFastChildContextFromFactory"); +#endif + if (pFactory.get() != NULL) { CreateElementMapPointer pMap = pFactory->getCreateElementMap(nDefine); @@ -86,12 +90,13 @@ uno::Reference< xml::sax::XFastContextHandler > OOXMLFactory::createFastCh if (pMap.get() != NULL) { Id nId = (*pTokenMap)[Element]; -#ifdef DEBUG_CREATE +#ifdef DEBUG_FACTORY + string sFactoryName(pFactory->getName()); string sDefine(pFactory->getDefineName(nDefine)); string sElement(fastTokenToId(Element)); string sQName((*QNameToString::Instance())(nId)); - debug_logger->startElement("createFastChildContextFromFactory"); + debug_logger->attribute("factory-name", sFactoryName); debug_logger->attribute("define", sDefine); debug_logger->attribute("element", sElement); debug_logger->attribute("qname", sQName); @@ -134,12 +139,13 @@ uno::Reference< xml::sax::XFastContextHandler > OOXMLFactory::createFastCh break; } -#ifdef DEBUG_CREATE - debug_logger->endElement("createFastChildContextFromFactory"); -#endif } } +#ifdef DEBUG_FACTORY + debug_logger->endElement("factory.createFastChildContextFromFactory"); +#endif + return aResult; } </xsl:text> @@ -178,8 +184,8 @@ OOXMLFactory_ns::Pointer_t OOXMLFactory::getFactoryForNamespace(Id nId) uno::Reference< xml::sax::XFastContextHandler > OOXMLFactory::createFastChildContextFromStart (OOXMLFastContextHandler * pHandler, Token_t Element) { -#ifdef DEBUG_CREATE - debug_logger->startElement("createFastChildContextFromStart"); +#ifdef DEBUG_FACTORY + debug_logger->startElement("factory.createFastChildContextFromStart"); #endif uno::Reference < xml::sax::XFastContextHandler > aResult; @@ -198,8 +204,8 @@ uno::Reference< xml::sax::XFastContextHandler > OOXMLFactory::createFastCh </xsl:for-each> <xsl:text> -#ifdef DEBUG_CREATE - debug_logger->endElement("createFastChildContextFromStart"); +#ifdef DEBUG_FACTORY + debug_logger->endElement("factory.createFastChildContextFromStart"); #endif return aResult; } diff --git a/writerfilter/source/ooxml/factoryimpl_ns.xsl b/writerfilter/source/ooxml/factoryimpl_ns.xsl index 533c3d16ae23..adc4c977e1f9 100644 --- a/writerfilter/source/ooxml/factoryimpl_ns.xsl +++ b/writerfilter/source/ooxml/factoryimpl_ns.xsl @@ -143,6 +143,47 @@ OOXMLFactory_ns::Pointer_t </xsl:text> </xsl:text> </xsl:template> +<!-- + Returns resource for attribute. +--> + +<xsl:template name="resourceforattribute"> + <xsl:variable name="mynsid" select="generate-id(ancestor::namespace)"/> + <xsl:for-each select="rng:ref"> + <xsl:variable name="name" select="@name"/> + <xsl:variable name="resource1"> + <xsl:for-each select="key('context-resource', @name)[generate-id(ancestor::namespace) = $mynsid]"> + <xsl:value-of select="@resource"/> + </xsl:for-each> + </xsl:variable> + <xsl:choose> + <xsl:when test="string-length($resource1) > 0"> + <xsl:value-of select="$resource1"/> + </xsl:when> + <xsl:otherwise> + <xsl:for-each select="ancestor::namespace/rng:grammar/rng:define[@name=$name]"> + <xsl:call-template name="resourceforattribute"/> + </xsl:for-each> + </xsl:otherwise> + </xsl:choose> + </xsl:for-each> + <xsl:for-each select=".//rng:text"> + <xsl:text>String</xsl:text> + </xsl:for-each> + <xsl:for-each select=".//rng:data[@type='base64Binary']"> + <xsl:text>String</xsl:text> + </xsl:for-each> + <xsl:for-each select=".//rng:data[@type='boolean']"> + <xsl:text>Boolean</xsl:text> + </xsl:for-each> + <xsl:for-each select=".//rng:data[@type='unsignedInt']"> + <xsl:text>Integer</xsl:text> + </xsl:for-each> + <xsl:for-each select=".//rng:data[@type='int']"> + <xsl:text>Integer</xsl:text> + </xsl:for-each> +</xsl:template> + <!-- creates code block in OOXMLFactory_<namespace>::createAttributeToResourceMap @@ -164,42 +205,30 @@ for a rng:define // </xsl:text> <xsl:value-of select="$defname"/> </xsl:if> - <xsl:variable name="mynsid" select="generate-id(ancestor::namespace)"/> <xsl:variable name="resource"> - <xsl:for-each select="rng:ref"> - <xsl:for-each select="key('context-resource', @name)[generate-id(ancestor::namespace) = $mynsid]"> - <xsl:value-of select="@resource"/> - </xsl:for-each> - </xsl:for-each> - <xsl:for-each select=".//rng:text"> - <xsl:text>String</xsl:text> - </xsl:for-each> - <xsl:for-each select=".//rng:data[@type='base64Binary']"> - <xsl:text>String</xsl:text> - </xsl:for-each> - </xsl:variable> - - <xsl:variable name="refdefine1"> - <xsl:for-each select="rng:ref"> - <xsl:variable name="refname" select="@name"/> - <xsl:for-each select="ancestor::rng:grammar/rng:define[@name=$refname]"> - <xsl:call-template name="idfordefine"/> - </xsl:for-each> - </xsl:for-each> - </xsl:variable> - <xsl:variable name="refdefine"> - <xsl:choose> - <xsl:when test="string-length($refdefine1) > 0"> - <xsl:value-of select="$refdefine1"/> - </xsl:when> - <xsl:otherwise> - <xsl:text>0</xsl:text> - </xsl:otherwise> - </xsl:choose> + <xsl:call-template name="resourceforattribute"/> </xsl:variable> <xsl:choose> <xsl:when test="string-length($resource) > 0"> + <xsl:variable name="refdefine1"> + <xsl:for-each select="rng:ref"> + <xsl:variable name="refname" select="@name"/> + <xsl:for-each select="ancestor::rng:grammar/rng:define[@name=$refname]"> + <xsl:call-template name="idfordefine"/> + </xsl:for-each> + </xsl:for-each> + </xsl:variable> + <xsl:variable name="refdefine"> + <xsl:choose> + <xsl:when test="string-length($refdefine1) > 0"> + <xsl:value-of select="$refdefine1"/> + </xsl:when> + <xsl:otherwise> + <xsl:text>0</xsl:text> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> <xsl:text> (*pMap)[</xsl:text> <xsl:call-template name="fasttoken"/> @@ -541,42 +570,103 @@ CreateElementMapPointer </xsl:text> <!-- factoryaction --> <xsl:template name="factoryaction"> - <xsl:param name="action"/> - <xsl:text> -void </xsl:text> - <xsl:call-template name="factoryclassname"/> - <xsl:text>::</xsl:text> - <xsl:value-of select="$action"/> - <xsl:text>Action(OOXMLFastContextHandler * pHandler</xsl:text> + <xsl:param name="action"/> + <xsl:variable name="switchblock1"> + <xsl:for-each select="resource[action/@name=$action]"> + <xsl:text> + </xsl:text> + <xsl:call-template name="caselabeldefine"/> + <xsl:for-each select="action[@name=$action]"> + <xsl:call-template name="factorychooseaction"/> + </xsl:for-each> + <xsl:text> break;
</xsl:text> + </xsl:for-each> + </xsl:variable> + <xsl:variable name="switchblock2"> <xsl:if test="$action='characters'"> - <xsl:text>, const ::rtl::OUString & sText</xsl:text> + <xsl:for-each select="resource[@resource='Value']"> + <xsl:if test="count(attribute) = 0"> + <xsl:variable name="name" select="@name"/> + <xsl:text> </xsl:text> + <xsl:call-template name="caselabeldefine"/> + <xsl:text>
</xsl:text> + <xsl:for-each select="ancestor::namespace/rng:grammar/rng:define[@name=$name]"> + <xsl:for-each select="rng:ref"> + <xsl:call-template name="charactersactionforvalues"/> + </xsl:for-each> + </xsl:for-each> + <xsl:text> break;
</xsl:text> + </xsl:if> + </xsl:for-each> </xsl:if> - <xsl:text>) -{ - switch (pHandler->getDefine()) - {</xsl:text> - <xsl:for-each select="resource[action/@name=$action]"> - <xsl:text> - </xsl:text> - <xsl:call-template name="caselabeldefine"/> - <xsl:for-each select="action[@name=$action]"> - <xsl:call-template name="factorychooseaction"/> - </xsl:for-each> - <xsl:text> - break;</xsl:text> + </xsl:variable> + <xsl:text>

</xsl:text> + <xsl:text>void </xsl:text> + <xsl:call-template name="factoryclassname"/> + <xsl:text>::</xsl:text> + <xsl:value-of select="$action"/> + <xsl:text>Action(OOXMLFastContextHandler*</xsl:text> + <xsl:if test="string-length($switchblock1) > 0 or string-length($switchblock2) > 0"> + <xsl:text> pHandler</xsl:text> + </xsl:if> + <xsl:if test="$action='characters'"> + <xsl:text>, const ::rtl::OUString &</xsl:text> + <xsl:if test="contains($switchblock1, 'sText') or contains($switchblock2, 'sText')"> + <xsl:text> sText</xsl:text> + </xsl:if> + </xsl:if> + <xsl:text>)
</xsl:text> + <xsl:text>{
</xsl:text> + <xsl:if test="string-length($switchblock1) > 0 or string-length($switchblock2) > 0"> + <xsl:text> sal_uInt32 nDefine = pHandler->getDefine();
</xsl:text> + </xsl:if> + <xsl:if test="string-length($switchblock1) > 0"> + <xsl:text> switch (nDefine)
</xsl:text> + <xsl:text> {
</xsl:text> + <xsl:value-of select="$switchblock1"/> + <xsl:text> default:
</xsl:text> + <xsl:text> break;
</xsl:text> + <xsl:text> }
</xsl:text> + </xsl:if> + <xsl:if test="string-length($switchblock2) > 0"> + <xsl:text> OOXMLFastContextHandlerValue * pValueHandler = dynamic_cast<OOXMLFastContextHandlerValue *>(pHandler);
</xsl:text> + <xsl:text> switch (nDefine)
</xsl:text> + <xsl:text> {
</xsl:text> + <xsl:value-of select="$switchblock2"/> + <xsl:text> default:
</xsl:text> + <xsl:text> break;
</xsl:text> + <xsl:text> }
</xsl:text> + </xsl:if> + <xsl:text>}
</xsl:text> +</xsl:template> + +<xsl:template name="charactersactionforvalues"> + <xsl:variable name="name" select="@name"/> + <xsl:for-each select="ancestor::namespace/rng:grammar/rng:define[@name=$name]"> + <xsl:text> {
</xsl:text> + <xsl:text> // </xsl:text> + <xsl:value-of select="@name"/> + <xsl:text>
</xsl:text> + <xsl:for-each select="rng:data[@type='int']"> + <xsl:text> OOXMLValue::Pointer_t pValue(new OOXMLIntegerValue(sText));
</xsl:text> + <xsl:text> pValueHandler->setValue(pValue);
</xsl:text> </xsl:for-each> - <xsl:text> - default: - break; - } -} -</xsl:text> + <xsl:for-each select="rng:list"> + <xsl:text> ListValueMapPointer pListValueMap = getListValueMap(nDefine);
</xsl:text> + <xsl:text> if (pListValueMap.get() != NULL)
</xsl:text> + <xsl:text> {
</xsl:text> + <xsl:text> OOXMLValue::Pointer_t pValue(new OOXMLIntegerValue((*pListValueMap)[sText]));
</xsl:text> + <xsl:text> pValueHandler->setValue(pValue);</xsl:text> + <xsl:text> }
</xsl:text> + </xsl:for-each> + <xsl:text> }
</xsl:text> + </xsl:for-each> </xsl:template> <!-- factoryactions --> <xsl:template name="factoryactions"> <xsl:variable name="ns" select="@name"/> - <xsl:for-each select="resource/action"> + <xsl:for-each select="resource/action[not(@name='characters')]"> <xsl:sort select="@name"/> <xsl:if test="generate-id(key('actions', @name)[ancestor::namespace/@name=$ns][1]) = generate-id(.)"> <xsl:variable name="name" select="@name"/> @@ -587,6 +677,9 @@ void </xsl:text> </xsl:for-each> </xsl:if> </xsl:for-each> + <xsl:call-template name="factoryaction"> + <xsl:with-param name="action">characters</xsl:with-param> + </xsl:call-template> </xsl:template> <xsl:template name="factorygetdefinename"> @@ -794,6 +887,22 @@ void </xsl:text> </xsl:choose> </xsl:template> +<xsl:template name="factorygetname"> + <xsl:param name="ns"/> + <xsl:text> +#ifdef DEBUG_FACTORY +string </xsl:text> +<xsl:call-template name="factoryclassname"/> +<xsl:text>::getName() const +{ + return "</xsl:text> + <xsl:value-of select="$ns"/> + <xsl:text>"; +} +#endif +</xsl:text> +</xsl:template> + <xsl:template match="/"> <xsl:variable name="ns" select="substring-before(substring-after($file, 'OOXMLFactory_'), '.cxx')"/> <xsl:text> @@ -823,6 +932,9 @@ namespace ooxml { <xsl:call-template name="factorygetdefinename"/> <xsl:call-template name="factorytokentoidmap"/> <xsl:call-template name="factoryattributeaction"/> + <xsl:call-template name="factorygetname"> + <xsl:with-param name="ns" select="$ns"/> + </xsl:call-template> </xsl:for-each> <xsl:text> /// @endcond diff --git a/writerfilter/source/ooxml/model.xml b/writerfilter/source/ooxml/model.xml index b00fd433c884..49998622e65d 100644 --- a/writerfilter/source/ooxml/model.xml +++ b/writerfilter/source/ooxml/model.xml @@ -191,11 +191,11 @@ </define> </grammar> <resource name="CT_OfficeStyleSheet" resource="Table" tokenid="ooxml:THEMETABLE"/> - <resource name="theme" resource="Stream"> + <resource name="theme" resource="Stream" tag="theme"> <element name="theme" tokenid="ooxml:THEMETABLE"/> </resource> - <resource name="themeOverride" resource="Stream"/> - <resource name="themeManager" resource="Stream"/> + <resource name="themeOverride" resource="Stream" tag="theme"/> + <resource name="themeManager" resource="Stream" tag="theme"/> </namespace> <namespace name="dml-styleDefaults" file="dml-styleDefaults"> <grammar xmlns="http://relaxng.org/ns/structure/1.0" ns="http://schemas.openxmlformats.org/drawingml/2006/main"> @@ -1114,7 +1114,7 @@ <value name="hlink" tokenid="ooxml:Value_drawingml_ST_ColorSchemeIndex_hlink">hlink</value> <value name="folHlink" tokenid="ooxml:Value_drawingml_ST_ColorSchemeIndex_folHlink">folHlink</value> </resource> - <resource name="CT_ColorScheme" resource="Properties"> + <resource name="CT_ColorScheme" resource="Properties" tag="theme"> <element name="dk1" tokenid="ooxml:CT_ColorScheme_dk1"/> <element name="lt1" tokenid="ooxml:CT_ColorScheme_lt1"/> <element name="dk2" tokenid="ooxml:CT_ColorScheme_dk2"/> @@ -1130,39 +1130,39 @@ <element name="extLst" tokenid="ooxml:CT_ColorScheme_extLst"/> <attribute name="name" tokenid="ooxml:CT_ColorScheme_name"/> </resource> - <resource name="CT_SupplementalFont" resource="Properties"> + <resource name="CT_SupplementalFont" resource="Properties" tag="theme"> <attribute name="script" tokenid="ooxml:CT_SupplementalFont_script"/> <attribute name="typeface" tokenid="ooxml:CT_SupplementalFont_typeface"/> </resource> - <resource name="CT_FontCollection" resource="Properties"> + <resource name="CT_FontCollection" resource="Properties" tag="theme"> <element name="latin" tokenid="ooxml:CT_FontCollection_latin"/> <element name="ea" tokenid="ooxml:CT_FontCollection_ea"/> <element name="cs" tokenid="ooxml:CT_FontCollection_cs"/> <element name="font" tokenid="ooxml:CT_FontCollection_font"/> <element name="extLst" tokenid="ooxml:CT_FontCollection_extLst"/> </resource> - <resource name="CT_FontScheme" resource="Properties"> + <resource name="CT_FontScheme" resource="Properties" tag="theme"> <element name="majorFont" tokenid="ooxml:CT_FontScheme_majorFont"/> <element name="minorFont" tokenid="ooxml:CT_FontScheme_minorFont"/> <element name="extLst" tokenid="ooxml:CT_FontScheme_extLst"/> <attribute name="name" tokenid="ooxml:CT_FontScheme_name"/> </resource> - <resource name="CT_FillStyleList" resource="Properties"/> - <resource name="CT_LineStyleList" resource="Properties"> + <resource name="CT_FillStyleList" resource="Properties" tag="theme"/> + <resource name="CT_LineStyleList" resource="Properties" tag="theme"> <element name="ln" tokenid="ooxml:CT_LineStyleList_ln"/> </resource> - <resource name="CT_EffectStyleList" resource="Properties"> + <resource name="CT_EffectStyleList" resource="Properties" tag="theme"> <element name="effectStyle" tokenid="ooxml:CT_EffectStyleList_effectStyle"/> </resource> - <resource name="CT_BackgroundFillStyleList" resource="Properties"/> - <resource name="CT_StyleMatrix" resource="Properties"> + <resource name="CT_BackgroundFillStyleList" resource="Properties" tag="theme"/> + <resource name="CT_StyleMatrix" resource="Properties" tag="theme"> <element name="fillStyleLst" tokenid="ooxml:CT_StyleMatrix_fillStyleLst"/> <element name="lnStyleLst" tokenid="ooxml:CT_StyleMatrix_lnStyleLst"/> <element name="effectStyleLst" tokenid="ooxml:CT_StyleMatrix_effectStyleLst"/> <element name="bgFillStyleLst" tokenid="ooxml:CT_StyleMatrix_bgFillStyleLst"/> <attribute name="name" tokenid="ooxml:CT_StyleMatrix_name"/> </resource> - <resource name="CT_BaseStyles" resource="Properties"> + <resource name="CT_BaseStyles" resource="Properties" tag="theme"> <element name="clrScheme" tokenid="ooxml:CT_BaseStyles_clrScheme"/> <element name="fontScheme" tokenid="ooxml:CT_BaseStyles_fontScheme"/> <element name="fmtScheme" tokenid="ooxml:CT_BaseStyles_fmtScheme"/> @@ -1541,7 +1541,7 @@ <resource name="ST_TextFontSize" resource="Integer" generated="yes"/> <resource name="ST_Panose" resource="Hex" generated="yes"/> <resource name="ST_TextTypeface" resource="String" generated="yes"/> - <resource name="CT_TextFont" resource="Properties"> + <resource name="CT_TextFont" resource="Properties" tag="character"> <attribute name="typeface" tokenid="ooxml:CT_TextFont_typeface"/> <attribute name="panose" tokenid="ooxml:CT_TextFont_panose"/> <attribute name="pitchFamily" tokenid="ooxml:CT_TextFont_pitchFamily"/> @@ -2738,7 +2738,7 @@ <value name="shdw19" tokenid="ooxml:Value_drawingml_ST_PresetShadowVal_shdw19">shdw19</value> <value name="shdw20" tokenid="ooxml:Value_drawingml_ST_PresetShadowVal_shdw20">shdw20</value> </resource> - <resource name="CT_SolidColorFillProperties" resource="Properties"/> + <resource name="CT_SolidColorFillProperties" resource="Properties" tag="shape"/> <resource name="ST_PathShadeType" resource="List" generated="yes"> <value name="shape" tokenid="ooxml:Value_drawingml_ST_PathShadeType_shape">shape</value> <value name="circle" tokenid="ooxml:Value_drawingml_ST_PathShadeType_circle">circle</value> @@ -2750,7 +2750,7 @@ <value name="y" tokenid="ooxml:Value_drawingml_ST_TileFlipMode_y">y</value> <value name="xy" tokenid="ooxml:Value_drawingml_ST_TileFlipMode_xy">xy</value> </resource> - <resource name="CT_GradientStop" resource="Properties"> + <resource name="CT_GradientStop" resource="Properties" tag="shape"> <attribute name="pos" tokenid="ooxml:CT_GradientStop_pos"/> </resource> <resource name="CT_TileInfoProperties" resource="Properties"> @@ -2761,10 +2761,10 @@ <attribute name="flip" tokenid="ooxml:CT_TileInfoProperties_flip"/> <attribute name="algn" tokenid="ooxml:CT_TileInfoProperties_algn"/> </resource> - <resource name="CT_StretchInfoProperties" resource="Properties"> + <resource name="CT_StretchInfoProperties" resource="Properties" tag="shape"> <element name="fillRect" tokenid="ooxml:CT_StretchInfoProperties_fillRect"/> </resource> - <resource name="EG_FillModeProperties" resource="Properties"> + <resource name="EG_FillModeProperties" resource="Properties" tag="shape"> <element name="tile" tokenid="ooxml:EG_FillModeProperties_tile"/> <element name="stretch" tokenid="ooxml:EG_FillModeProperties_stretch"/> </resource> @@ -2775,7 +2775,7 @@ <value name="hqprint" tokenid="ooxml:Value_drawingml_ST_BlipCompression_hqprint">hqprint</value> <value name="none" tokenid="ooxml:Value_drawingml_ST_BlipCompression_none">none</value> </resource> - <resource name="CT_Blip" resource="Properties"> + <resource name="CT_Blip" resource="Properties" tag="shape"> <element name="alphaBiLevel" tokenid="ooxml:CT_Blip_alphaBiLevel"/> <element name="alphaCeiling" tokenid="ooxml:CT_Blip_alphaCeiling"/> <element name="alphaFloor" tokenid="ooxml:CT_Blip_alphaFloor"/> @@ -2796,7 +2796,7 @@ <element name="extLst" tokenid="ooxml:CT_Blip_extLst"/> <attribute name="cstate" tokenid="ooxml:CT_Blip_cstate"/> </resource> - <resource name="CT_BlipFillProperties" resource="Properties"> + <resource name="CT_BlipFillProperties" resource="Properties" tag="shape"> <element name="blip" tokenid="ooxml:CT_BlipFillProperties_blip"/> <element name="srcRect" tokenid="ooxml:CT_BlipFillProperties_srcRect"/> <attribute name="dpi" tokenid="ooxml:CT_BlipFillProperties_dpi"/> @@ -2865,7 +2865,7 @@ <value name="darken" tokenid="ooxml:Value_drawingml_ST_BlendMode_darken">darken</value> <value name="lighten" tokenid="ooxml:Value_drawingml_ST_BlendMode_lighten">lighten</value> </resource> - <resource name="EG_Effect" resource="Properties"> + <resource name="EG_Effect" resource="Properties" tag="shape"> <element name="cont" tokenid="ooxml:EG_Effect_cont"/> <element name="effect" tokenid="ooxml:EG_Effect_effect"/> <element name="alphaBiLevel" tokenid="ooxml:EG_Effect_alphaBiLevel"/> @@ -2901,7 +2901,7 @@ <value name="sib" tokenid="ooxml:Value_drawingml_ST_EffectContainerType_sib">sib</value> <value name="tree" tokenid="ooxml:Value_drawingml_ST_EffectContainerType_tree">tree</value> </resource> - <resource name="CT_EffectContainer" resource="Properties"> + <resource name="CT_EffectContainer" resource="Properties" tag="shape"> <attribute name="type" tokenid="ooxml:CT_EffectContainer_type"/> <attribute name="name" tokenid="ooxml:CT_EffectContainer_name"/> </resource> @@ -3197,12 +3197,12 @@ <value name="med" tokenid="ooxml:Value_drawingml_ST_LineEndLength_med">med</value> <value name="lg" tokenid="ooxml:Value_drawingml_ST_LineEndLength_lg">lg</value> </resource> - <resource name="CT_LineEndProperties" resource="Properties"> + <resource name="CT_LineEndProperties" resource="Properties" tag="shape"> <attribute name="type" tokenid="ooxml:CT_LineEndProperties_type"/> <attribute name="w" tokenid="ooxml:CT_LineEndProperties_w"/> <attribute name="len" tokenid="ooxml:CT_LineEndProperties_len"/> </resource> - <resource name="EG_LineFillProperties" resource="Properties"> + <resource name="EG_LineFillProperties" resource="Properties" tag="shape"> <element name="noFill" tokenid="ooxml:EG_LineFillProperties_noFill"/> <element name="solidFill" tokenid="ooxml:EG_LineFillProperties_solidFill"/> <element name="gradFill" tokenid="ooxml:EG_LineFillProperties_gradFill"/> @@ -3237,7 +3237,7 @@ <value name="thinThick" tokenid="ooxml:Value_drawingml_ST_CompoundLine_thinThick">thinThick</value> <value name="tri" tokenid="ooxml:Value_drawingml_ST_CompoundLine_tri">tri</value> </resource> - <resource name="CT_LineProperties" resource="Properties"> + <resource name="CT_LineProperties" resource="Properties" tag="shape"> <element name="headEnd" tokenid="ooxml:CT_LineProperties_headEnd"/> <element name="tailEnd" tokenid="ooxml:CT_LineProperties_tailEnd"/> <element name="extLst" tokenid="ooxml:CT_LineProperties_extLst"/> @@ -3331,7 +3331,7 @@ </optional> </define> </grammar> - <resource name="CT_ShapeProperties" resource="Properties"> + <resource name="CT_ShapeProperties" resource="Properties" tag="shape"> <element name="xfrm" tokenid="ooxml:CT_ShapeProperties_xfrm"/> <element name="ln" tokenid="ooxml:CT_ShapeProperties_ln"/> <element name="scene3d" tokenid="ooxml:CT_ShapeProperties_scene3d"/> @@ -4429,41 +4429,41 @@ <attribute name="val" tokenid="ooxml:CT_Angle_val" action="setValue"/> <action name="start" action="setDefaultIntegerValue"/> </resource> - <resource name="CT_PositiveFixedAngle" resource="Value" generated="yes"> + <resource name="CT_PositiveFixedAngle" resource="Value" generated="yes" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_PositiveFixedAngle_val" action="setValue"/> </resource> <resource name="ST_Percentage" resource="Integer" generated="yes"/> - <resource name="CT_Percentage" resource="Value" generated="yes"> + <resource name="CT_Percentage" resource="Value" generated="yes" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_Percentage_val" action="setValue"/> <action name="start" action="setDefaultIntegerValue"/> </resource> - <resource name="CT_PositivePercentage" resource="Value" generated="yes"> + <resource name="CT_PositivePercentage" resource="Value" generated="yes" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_PositivePercentage_val" action="setValue"/> </resource> - <resource name="CT_FixedPercentage" resource="Value" generated="yes"> + <resource name="CT_FixedPercentage" resource="Value" generated="yes" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_FixedPercentage_val" action="setValue"/> </resource> - <resource name="CT_PositiveFixedPercentage" resource="Value" generated="yes"> + <resource name="CT_PositiveFixedPercentage" resource="Value" generated="yes" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_PositiveFixedPercentage_val" action="setValue"/> </resource> - <resource name="CT_Point2D" resource="Properties"> + <resource name="CT_Point2D" resource="Properties" tag="shape"> <attribute name="x" tokenid="ooxml:CT_Point2D_x"/> <attribute name="y" tokenid="ooxml:CT_Point2D_y"/> </resource> - <resource name="CT_PositiveSize2D" resource="Properties"> + <resource name="CT_PositiveSize2D" resource="Properties" tag="shape"> <attribute name="cx" tokenid="ooxml:CT_PositiveSize2D_cx"/> <attribute name="cy" tokenid="ooxml:CT_PositiveSize2D_cy"/> </resource> - <resource name="CT_ScRgbColor" resource="Properties"> + <resource name="CT_ScRgbColor" resource="Properties" tag="shape"> <attribute name="r" tokenid="ooxml:CT_ScRgbColor_r"/> <attribute name="g" tokenid="ooxml:CT_ScRgbColor_g"/> <attribute name="b" tokenid="ooxml:CT_ScRgbColor_b"/> </resource> <resource name="ST_HexBinary3" resource="Hex" generated="yes"/> - <resource name="CT_SRgbColor" resource="Properties"> + <resource name="CT_SRgbColor" resource="Properties" tag="shape"> <attribute name="val" tokenid="ooxml:CT_SRgbColor_val"/> </resource> - <resource name="CT_HslColor" resource="Properties"> + <resource name="CT_HslColor" resource="Properties" tag="shape"> <attribute name="hue" tokenid="ooxml:CT_HslColor_hue"/> <attribute name="sat" tokenid="ooxml:CT_HslColor_sat"/> <attribute name="lum" tokenid="ooxml:CT_HslColor_lum"/> @@ -4500,7 +4500,7 @@ <value name="menuHighlight" tokenid="ooxml:Value_drawingml_ST_SystemColorVal_menuHighlight">menuHighlight</value> <value name="menuBar" tokenid="ooxml:Value_drawingml_ST_SystemColorVal_menuBar">menuBar</value> </resource> - <resource name="CT_SystemColor" resource="Properties"> + <resource name="CT_SystemColor" resource="Properties" tag="shape"> <attribute name="val" tokenid="ooxml:CT_SystemColor_val"/> <attribute name="lastClr" tokenid="ooxml:CT_SytemColor_lastClr"/> </resource> @@ -4523,7 +4523,7 @@ <value name="dk2" tokenid="ooxml:Value_drawingml_ST_SchemeColorVal_dk2">dk2</value> <value name="lt2" tokenid="ooxml:Value_drawingml_ST_SchemeColorVal_lt2">lt2</value> </resource> - <resource name="CT_SchemeColor" resource="Properties"> + <resource name="CT_SchemeColor" resource="Properties" tag="shape"> <attribute name="val" tokenid="ooxml:CT_SchemeColor_val"/> </resource> <resource name="ST_PresetColorVal" resource="List"> @@ -4668,10 +4668,10 @@ <value tokenid="0xffff00">yellow</value> <value tokenid="0x9acd32">yellowGreen</value> </resource> - <resource name="CT_PresetColor" resource="Properties"> + <resource name="CT_PresetColor" resource="Properties" tag="shape"> <attribute name="val" tokenid="ooxml:CT_PresetColor_val"/> </resource> - <resource name="CT_Transform2D" resource="Properties"> + <resource name="CT_Transform2D" resource="Properties" tag="shape"> <element name="off" tokenid="ooxml:CT_Transform2D_off"/> <element name="ext" tokenid="ooxml:CT_Transform2D_ext"/> <attribute name="rot" tokenid="ooxml:CT_Transform2D_rot"/> @@ -4690,7 +4690,7 @@ <value name="br" tokenid="ooxml:Value_drawingml_ST_RectAlignment_br">br</value> </resource> <resource name="ST_Guid" resource="String" generated="yes"/> - <resource name="EG_ColorChoice" resource="Properties"> + <resource name="EG_ColorChoice" resource="Properties" tag="shape"> <element name="scrgbClr" tokenid="ooxml:EG_ColorChoice_scrgbClr"/> <element name="srgbClr" tokenid="ooxml:EG_ColorChoice_srgbClr"/> <element name="hslClr" tokenid="ooxml:EG_ColorChoice_hslClr"/> @@ -4698,8 +4698,8 @@ <element name="schemeClr" tokenid="ooxml:EG_ColorChoice_schemeClr"/> <element name="prstClr" tokenid="ooxml:EG_ColorChoice_prstClr"/> </resource> - <resource name="CT_Color" resource="Properties"/> - <resource name="CT_ColorMRU" resource="Properties"/> + <resource name="CT_Color" resource="Properties" tag="shape"/> + <resource name="CT_ColorMRU" resource="Properties" tag="shape"/> <resource name="ST_BlackWhiteMode" resource="List" generated="yes"> <value name="clr" tokenid="ooxml:Value_drawingml_ST_BlackWhiteMode_clr">clr</value> <value name="auto" tokenid="ooxml:Value_drawingml_ST_BlackWhiteMode_auto">auto</value> @@ -4713,7 +4713,7 @@ <value name="white" tokenid="ooxml:Value_drawingml_ST_BlackWhiteMode_white">white</value> <value name="hidden" tokenid="ooxml:Value_drawingml_ST_BlackWhiteMode_hidden">hidden</value> </resource> - <resource xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" name="AG_Blob" resource="Properties"> + <resource xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" name="AG_Blob" resource="Properties" tag="shape"> <attribute name="r:embed" tokenid="ooxml:AG_Blob_r_embed"/> <attribute name="r:link" tokenid="ooxml:AG_Blob_r_link"/> </resource> @@ -5100,7 +5100,7 @@ </optional> </define> </grammar> - <resource name="CT_GraphicalObjectFrameLocking" resource="Properties"> + <resource name="CT_GraphicalObjectFrameLocking" resource="Properties" tag="shape"> <element name="extLst" tokenid="ooxml:CT_GraphicalObjectFrameLocking_extLst"/> <attribute name="noGrp" tokenid="ooxml:CT_GraphicalObjectFrameLocking_noGrp"/> <attribute name="noDrilldown" tokenid="ooxml:CT_GraphicalObjectFrameLocking_noDrilldown"/> @@ -5109,7 +5109,7 @@ <attribute name="noMove" tokenid="ooxml:CT_GraphicalObjectFrameLocking_noMove"/> <attribute name="noResize" tokenid="ooxml:CT_GraphicalObjectFrameLocking_noResize"/> </resource> - <resource name="CT_NonVisualDrawingProps" resource="Properties"> + <resource name="CT_NonVisualDrawingProps" resource="Properties" tag="shape"> <element name="hlinkClick" tokenid="ooxml:CT_NonVisualDrawingProps_hlinkClick"/> <element name="hlinkHover" tokenid="ooxml:CT_NonVisualDrawingProps_hlinkHover"/> <element name="extLst" tokenid="ooxml:CT_NonVisualDrawingProps_extLst"/> @@ -5118,12 +5118,12 @@ <attribute name="descr" tokenid="ooxml:CT_NonVisualDrawingProps_descr"/> <attribute name="hidden" tokenid="ooxml:CT_NonVisualDrawingProps_hidden"/> </resource> - <resource name="CT_NonVisualPictureProperties" resource="Properties"> + <resource name="CT_NonVisualPictureProperties" resource="Properties" tag="shape"> <element name="picLocks" tokenid="ooxml:CT_NonVisualPictureProperties_picLocks"/> <element name="extLst" tokenid="ooxml:CT_NonVisualPictureProperties_extLst"/> <attribute name="preferRelativeResize" tokenid="ooxml:CT_NonVisualPictureProperties_preferRelativeResize"/> </resource> - <resource name="CT_NonVisualGraphicFrameProperties" resource="Properties"> + <resource name="CT_NonVisualGraphicFrameProperties" resource="Properties" tag="shape"> <element name="graphicFrameLocks" tokenid="ooxml:CT_NonVisualGraphicFrameProperties_graphicFrameLocks"/> <element name="extLst" tokenid="ooxml:CT_NonVisualGraphicFrameProperties_extLst"/> </resource> @@ -5159,14 +5159,14 @@ </element> </define> </grammar> - <resource name="CT_GraphicalObjectData" resource="Properties"> + <resource name="CT_GraphicalObjectData" resource="Properties" tag="shape"> <element name="pic" tokenid="ooxml:CT_GraphicalObjectData_pic"/> <attribute name="uri" tokenid="ooxml:CT_GraphicalObjectData_uri"/> </resource> - <resource name="CT_GraphicalObject" resource="Properties"> + <resource name="CT_GraphicalObject" resource="Properties" tag="shape"> <element name="graphicData" tokenid="ooxml:CT_GraphicalObject_graphicData"/> </resource> - <resource name="graphic" resource="Properties"> + <resource name="graphic" resource="Properties" tag="shape"> <element name="graphic" tokenid="ooxml:graphic_graphic"/> </resource> </namespace> @@ -6271,7 +6271,7 @@ </resource> <resource name="ST_GeomGuideName" resource="String" generated="yes"/> <resource name="ST_GeomGuideFormula" resource="String" generated="yes"/> - <resource name="CT_GeomGuideList" resource="Properties"> + <resource name="CT_GeomGuideList" resource="Properties" tag="shape"> <element name="gd" tokenid="ooxml:CT_GeomGuideList_gd"/> </resource> <resource name="ST_PathFillMode" resource="List" generated="yes"> @@ -6282,11 +6282,11 @@ <value name="darken" tokenid="ooxml:Value_drawingml_ST_PathFillMode_darken">darken</value> <value name="darkenLess" tokenid="ooxml:Value_drawingml_ST_PathFillMode_darkenLess">darkenLess</value> </resource> - <resource name="CT_PresetGeometry2D" resource="Properties"> + <resource name="CT_PresetGeometry2D" resource="Properties" tag="shape"> <element name="avLst" tokenid="ooxml:CT_PresetGeometry2D_avLst"/> <attribute name="prst" tokenid="ooxml:CT_PresetGeometry2D_prst"/> </resource> - <resource name="CT_CustomGeometry2D" resource="Properties"> + <resource name="CT_CustomGeometry2D" resource="Properties" tag="shape"> <element name="avLst" tokenid="ooxml:CT_CustomGeometry2D_avLst"/> <element name="gdLst" tokenid="ooxml:CT_CustomGeometry2D_gdLst"/> <element name="ahLst" tokenid="ooxml:CT_CustomGeometry2D_ahLst"/> @@ -6294,7 +6294,7 @@ <element name="rect" tokenid="ooxml:CT_CustomGeometry2D_rect"/> <element name="pathLst" tokenid="ooxml:CT_CustomGeometry2D_pathLst"/> </resource> - <resource name="EG_Geometry" resource="Properties"> + <resource name="EG_Geometry" resource="Properties" tag="shape"> <element name="custGeom" tokenid="ooxml:EG_Geometry_custGeom"/> <element name="prstGeom" tokenid="ooxml:EG_Geometry_prstGeom"/> </resource> @@ -6764,14 +6764,14 @@ </element> </define> </grammar> - <resource name="CT_EffectExtent" resource="Properties"> + <resource name="CT_EffectExtent" resource="Properties" tag="shape"> <attribute name="l" tokenid="ooxml:CT_EffectExtent_l"/> <attribute name="t" tokenid="ooxml:CT_EffectExtent_t"/> <attribute name="r" tokenid="ooxml:CT_EffectExtent_r"/> <attribute name="b" tokenid="ooxml:CT_EffectExtent_b"/> </resource> <resource name="ST_WrapDistance" resource="Integer" generated="yes"/> - <resource xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="CT_Inline" resource="Properties"> + <resource xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="CT_Inline" resource="Properties" tag="shape"> <element name="extent" tokenid="ooxml:CT_Inline_extent"/> <element name="effectExtent" tokenid="ooxml:CT_Inline_effectExtent"/> <element name="docPr" tokenid="ooxml:CT_Inline_docPr"/> @@ -6788,13 +6788,13 @@ <value name="right" tokenid="ooxml:Value_wordprocessingDrawing_ST_WrapText_right">right</value> <value name="largest" tokenid="ooxml:Value_wordprocessingDrawing_ST_WrapText_largest">largest</value> </resource> - <resource name="CT_WrapPath" resource="Properties"> + <resource name="CT_WrapPath" resource="Properties" tag="shape"> <element name="start" tokenid="ooxml:CT_WrapPath_start"/> <element name="lineTo" tokenid="ooxml:CT_WrapPath_lineTo"/> <attribute name="edited" tokenid="ooxml:CT_WrapPath_edited"/> </resource> - <resource name="CT_WrapNone" resource="Properties"/> - <resource name="CT_WrapSquare" resource="Properties"> + <resource name="CT_WrapNone" resource="Properties" tag="shape"/> + <resource name="CT_WrapSquare" resource="Properties" tag="shape"> <element name="effectExtent" tokenid="ooxml:CT_WrapSquare_effectExtent"/> <attribute name="wrapText" tokenid="ooxml:CT_WrapSquare_wrapText"/> <attribute name="distT" tokenid="ooxml:CT_WrapSquare_distT"/> @@ -6802,34 +6802,34 @@ <attribute name="distL" tokenid="ooxml:CT_WrapSquare_distL"/> <attribute name="distR" tokenid="ooxml:CT_WrapSquare_distR"/> </resource> - <resource name="CT_WrapTight" resource="Properties"> + <resource name="CT_WrapTight" resource="Properties" tag="shape"> <element name="wrapPolygon" tokenid="ooxml:CT_WrapTight_wrapPolygon"/> <attribute name="wrapText" tokenid="ooxml:CT_WrapTight_wrapText"/> <attribute name="distL" tokenid="ooxml:CT_WrapTight_distL"/> <attribute name="distR" tokenid="ooxml:CT_WrapTight_distR"/> </resource> - <resource name="CT_WrapThrough" resource="Properties"> + <resource name="CT_WrapThrough" resource="Properties" tag="shape"> <element name="wrapPolygon" tokenid="ooxml:CT_WrapThrough_wrapPolygon"/> <attribute name="wrapText" tokenid="ooxml:CT_WrapThrough_wrapText"/> <attribute name="distL" tokenid="ooxml:CT_WrapThrough_distL"/> <attribute name="distR" tokenid="ooxml:CT_WrapThrough_distR"/> </resource> - <resource name="CT_WrapTopBottom" resource="Properties"> + <resource name="CT_WrapTopBottom" resource="Properties" tag="shape"> <element name="effectExtent" tokenid="ooxml:CT_WrapTopBottom_effectExtent"/> <attribute name="distT" tokenid="ooxml:CT_WrapTopBottom_distT"/> <attribute name="distB" tokenid="ooxml:CT_WrapTopBottom_distB"/> </resource> - <resource name="EG_WrapType" resource="Properties"> + <resource name="EG_WrapType" resource="Properties" tag="shape"> <element name="wrapNone" tokenid="ooxml:EG_WrapType_wrapNone"/> <element name="wrapSquare" tokenid="ooxml:EG_WrapType_wrapSquare"/> <element name="wrapTight" tokenid="ooxml:EG_WrapType_wrapTight"/> <element name="wrapThrough" tokenid="ooxml:EG_WrapType_wrapThrough"/> <element name="wrapTopAndBottom" tokenid="ooxml:EG_WrapType_wrapTopAndBottom"/> </resource> - <resource name="CT_PositionOffset" resource="Value"/> + <resource name="CT_PositionOffset" resource="Value" tag="shape"/> <resource name="ST_PositionOffset" resource="Integer" generated="yes"/> - <resource name="CT_AlignH" resource="Value"/> - <resource name="ST_AlignH" resource="List" generated="yes"> + <resource name="CT_AlignH" resource="Value" tag="shape"/> + <resource name="ST_AlignH" resource="List" generated="yes" tag="shape"> <value name="left" tokenid="ooxml:Value_wordprocessingDrawing_ST_AlignH_left">left</value> <value name="right" tokenid="ooxml:Value_wordprocessingDrawing_ST_AlignH_right">right</value> <value name="center" tokenid="ooxml:Value_wordprocessingDrawing_ST_AlignH_center">center</value> @@ -6846,12 +6846,12 @@ <value name="insideMargin" tokenid="ooxml:Value_wordprocessingDrawing_ST_RelFromH_insideMargin">insideMargin</value> <value name="outsideMargin" tokenid="ooxml:Value_wordprocessingDrawing_ST_RelFromH_outsideMargin">outsideMargin</value> </resource> - <resource name="CT_PosH" resource="Properties"> + <resource name="CT_PosH" resource="Properties" tag="shape"> <element name="align" tokenid="ooxml:CT_PosH_align"/> <element name="posOffset" tokenid="ooxml:CT_PosH_posOffset"/> <attribute name="relativeFrom" tokenid="ooxml:CT_PosH_relativeFrom"/> </resource> - <resource name="CT_AlignV" resource="Value"/> + <resource name="CT_AlignV" resource="Value" tag="shape"/> <resource name="ST_AlignV" resource="List" generated="yes"> <value name="top" tokenid="ooxml:Value_wordprocessingDrawing_ST_AlignV_top">top</value> <value name="bottom" tokenid="ooxml:Value_wordprocessingDrawing_ST_AlignV_bottom">bottom</value> @@ -6869,12 +6869,12 @@ <value name="insideMargin" tokenid="ooxml:Value_wordprocessingDrawing_ST_RelFromV_insideMargin">insideMargin</value> <value name="outsideMargin" tokenid="ooxml:Value_wordprocessingDrawing_ST_RelFromV_outsideMargin">outsideMargin</value> </resource> - <resource name="CT_PosV" resource="Properties"> + <resource name="CT_PosV" resource="Properties" tag="shape"> <element name="align" tokenid="ooxml:CT_PosV_align"/> <element name="posOffset" tokenid="ooxml:CT_PosV_posOffset"/> <attribute name="relativeFrom" tokenid="ooxml:CT_PosV_relativeFrom"/> </resource> - <resource xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="CT_Anchor" resource="Properties"> + <resource xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="CT_Anchor" resource="Properties" tag="shape"> <element name="simplePos" tokenid="ooxml:CT_Anchor_simplePos_elem"/> <element name="positionH" tokenid="ooxml:CT_Anchor_positionH"/> <element name="positionV" tokenid="ooxml:CT_Anchor_positionV"/> @@ -6895,10 +6895,10 @@ <attribute name="hidden" tokenid="ooxml:CT_Anchor_hidden"/> <attribute name="allowOverlap" tokenid="ooxml:CT_Anchor_allowOverlap"/> </resource> - <resource name="inline" resource="Properties"> + <resource name="inline" resource="Properties" tag="shape"> <element name="inline" tokenid="ooxml:inline_inline"/> </resource> - <resource name="anchor" resource="Properties"> + <resource name="anchor" resource="Properties" tag="shape"> <element name="anchor" tokenid="ooxml:anchor_anchor"/> </resource> </namespace> @@ -8202,27 +8202,27 @@ </define> </grammar> <resource name="ST_Integer255" resource="Integer" generated="yes"/> - <resource name="CT_Integer255" resource="Value" generated="yes"> + <resource name="CT_Integer255" resource="Value" generated="yes" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_Integer255_val" action="setValue"/> <action name="start" action="setDefaultIntegerValue"/> </resource> <resource name="ST_Integer2" resource="Integer" generated="yes"/> - <resource name="CT_Integer2" resource="Value" generated="yes"> + <resource name="CT_Integer2" resource="Value" generated="yes" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_Integer2_val" action="setValue"/> <action name="start" action="setDefaultIntegerValue"/> </resource> <resource name="ST_SpacingRule" resource="Integer" generated="yes"/> - <resource name="CT_SpacingRule" resource="Value" generated="yes"> + <resource name="CT_SpacingRule" resource="Value" generated="yes" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_SpacingRule_val" action="setValue"/> <action name="start" action="setDefaultIntegerValue"/> </resource> <resource name="ST_UnSignedInteger" resource="Integer" generated="yes"/> - <resource name="CT_UnSignedInteger" resource="Value" generated="yes"> + <resource name="CT_UnSignedInteger" resource="Value" generated="yes" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_UnSignedInteger_val" action="setValue"/> <action name="start" action="setDefaultIntegerValue"/> </resource> <resource name="ST_Char" resource="String" generated="yes"/> - <resource name="CT_Char" resource="Value" generated="yes"> + <resource name="CT_Char" resource="Value" generated="yes" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_Char_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> @@ -8230,12 +8230,12 @@ <value name="on" tokenid="ooxml:Value_math_ST_OnOff_on">on</value> <value name="off" tokenid="ooxml:Value_math_ST_OnOff_off">off</value> </resource> - <resource name="CT_OnOff" resource="Value"> + <resource name="CT_OnOff" resource="Value" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_OnOff_val" action="setValue"/> <action name="start" action="setDefaultBooleanValue"/> </resource> <resource name="ST_String" resource="String" generated="yes"/> - <resource name="CT_String" resource="Value" generated="yes"> + <resource name="CT_String" resource="Value" generated="yes" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_String_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> @@ -8244,7 +8244,7 @@ <value name="center" tokenid="ooxml:Value_math_ST_XAlign_center">center</value> <value name="right" tokenid="ooxml:Value_math_ST_XAlign_right">right</value> </resource> - <resource name="CT_XAlign" resource="Value" generated="yes"> + <resource name="CT_XAlign" resource="Value" generated="yes" tag="math"> <attribute name="val" tokenid="ooxml:CT_XAlign_val" action="setValue"/> </resource> <resource name="ST_YAlign" resource="List" generated="yes"> @@ -8252,14 +8252,14 @@ <value name="center" tokenid="ooxml:Value_math_ST_YAlign_center">center</value> <value name="bot" tokenid="ooxml:Value_math_ST_YAlign_bot">bot</value> </resource> - <resource name="CT_YAlign" resource="Value" generated="yes"> + <resource name="CT_YAlign" resource="Value" generated="yes" tag="math"> <attribute name="val" tokenid="ooxml:CT_YAlign_val" action="setValue"/> </resource> <resource name="ST_Shp" resource="List" generated="yes"> <value name="centered" tokenid="ooxml:Value_math_ST_Shp_centered">centered</value> <value name="match" tokenid="ooxml:Value_math_ST_Shp_match">match</value> </resource> - <resource name="CT_Shp" resource="Value" generated="yes"> + <resource name="CT_Shp" resource="Value" generated="yes" tag="math"> <attribute name="val" tokenid="ooxml:CT_Shp_val" action="setValue"/> </resource> <resource name="ST_FType" resource="List" generated="yes"> @@ -8268,21 +8268,21 @@ <value name="lin" tokenid="ooxml:Value_math_ST_FType_lin">lin</value> <value name="noBar" tokenid="ooxml:Value_math_ST_FType_noBar">noBar</value> </resource> - <resource name="CT_FType" resource="Value" generated="yes"> + <resource name="CT_FType" resource="Value" generated="yes" tag="math"> <attribute name="val" tokenid="ooxml:CT_FType_val" action="setValue"/> </resource> <resource name="ST_LimLoc" resource="List" generated="yes"> <value name="undOvr" tokenid="ooxml:Value_math_ST_LimLoc_undOvr">undOvr</value> <value name="subSup" tokenid="ooxml:Value_math_ST_LimLoc_subSup">subSup</value> </resource> - <resource name="CT_LimLoc" resource="Value" generated="yes"> + <resource name="CT_LimLoc" resource="Value" generated="yes" tag="math"> <attribute name="val" tokenid="ooxml:CT_LimLoc_val" action="setValue"/> </resource> <resource name="ST_TopBot" resource="List" generated="yes"> <value name="top" tokenid="ooxml:Value_math_ST_TopBot_top">top</value> <value name="bot" tokenid="ooxml:Value_math_ST_TopBot_bot">bot</value> </resource> - <resource name="CT_TopBot" resource="Value" generated="yes"> + <resource name="CT_TopBot" resource="Value" generated="yes" tag="math"> <attribute name="val" tokenid="ooxml:CT_TopBot_val" action="setValue"/> </resource> <resource name="ST_Script" resource="List" generated="yes"> @@ -8293,7 +8293,7 @@ <value name="sansmserif" tokenid="ooxml:Value_math_ST_Script_sansmserif">sans-serif</value> <value name="monospace" tokenid="ooxml:Value_math_ST_Script_monospace">monospace</value> </resource> - <resource name="CT_Script" resource="Value" generated="yes"> + <resource name="CT_Script" resource="Value" generated="yes" tag="math"> <attribute name="val" tokenid="ooxml:CT_Script_val" action="setValue"/> </resource> <resource name="ST_Style" resource="List"> @@ -8302,7 +8302,7 @@ <value tokenid="ooxml:Value_ST_Style_i">i</value> <value tokenid="ooxml:Value_ST_Style_p">p</value> </resource> - <resource name="CT_Style" resource="Value"> + <resource name="CT_Style" resource="Value" tag="math"> <attribute name="val" tokenid="ooxml:CT_Style_val" action="setValue"/> </resource> <resource name="ST_Jc" resource="List" generated="yes"> @@ -8311,11 +8311,11 @@ <value name="center" tokenid="ooxml:Value_math_ST_Jc_center">center</value> <value name="centerGroup" tokenid="ooxml:Value_math_ST_Jc_centerGroup">centerGroup</value> </resource> - <resource name="CT_OMathJc" resource="Value" generated="yes"> + <resource name="CT_OMathJc" resource="Value" generated="yes" tag="math"> <attribute name="val" tokenid="ooxml:CT_OMathJc_val" action="setValue"/> </resource> <resource name="ST_TwipsMeasure" resource="Integer" generated="yes"/> - <resource name="CT_TwipsMeasure" resource="Value" generated="yes"> + <resource name="CT_TwipsMeasure" resource="Value" generated="yes" tag="math"> <attribute name="val" tokenid="ooxml:CT_TwipsMeasure_val" action="setValue"/> <action name="start" action="setDefaultIntegerValue"/> </resource> @@ -8324,7 +8324,7 @@ <value name="after" tokenid="ooxml:Value_math_ST_BreakBin_after">after</value> <value name="repeat" tokenid="ooxml:Value_math_ST_BreakBin_repeat">repeat</value> </resource> - <resource name="CT_BreakBin" resource="Value" generated="yes"> + <resource name="CT_BreakBin" resource="Value" generated="yes" tag="math"> <attribute name="val" tokenid="ooxml:CT_BreakBin_val" action="setValue"/> </resource> <resource name="ST_BreakBinSub" resource="List" generated="yes"> @@ -8332,7 +8332,7 @@ <value name="mp" tokenid="ooxml:Value_math_ST_BreakBinSub_mp">-+</value> <value name="pm" tokenid="ooxml:Value_math_ST_BreakBinSub_pm">+-</value> </resource> - <resource name="CT_BreakBinSub" resource="Value" generated="yes"> + <resource name="CT_BreakBinSub" resource="Value" generated="yes" tag="math"> <attribute name="val" tokenid="ooxml:CT_BreakBinSub_val" action="setValue"/> </resource> </namespace> @@ -8418,16 +8418,16 @@ </element> </define> </grammar> - <resource name="CT_PictureNonVisual" resource="Properties"> + <resource name="CT_PictureNonVisual" resource="Properties" tag="shape"> <element name="cNvPr" tokenid="ooxml:CT_PictureNonVisual_cNvPr"/> <element name="cNvPicPr" tokenid="ooxml:CT_PictureNonVisual_cNvPicPr"/> </resource> - <resource name="CT_Picture" resource="Shape"> + <resource name="CT_Picture" resource="Shape" tag="shape"> <element name="nvPicPr" tokenid="ooxml:CT_Picture_nvPicPr"/> <element name="blipFill" tokenid="ooxml:CT_Picture_blipFill"/> <element name="spPr" tokenid="ooxml:CT_Picture_spPr"/> </resource> - <resource name="pic" resource="Properties"> + <resource name="pic" resource="Properties" tag="shape"> <element name="pic" tokenid="ooxml:pic_pic"/> </resource> </namespace> @@ -11939,10 +11939,10 @@ </zeroOrMore> </define> </grammar> - <resource name="OLEObject" resource="Properties"> + <resource name="OLEObject" resource="Properties" tag="ole"> <element name="OLEObject" tokenid="ooxml:OLEObject_OLEObject"/> </resource> - <resource xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" name="CT_OLEObject" resource="Properties"> + <resource xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" name="CT_OLEObject" resource="Properties" tag="ole"> <element name="LinkType" tokenid="ooxml:CT_OLEObject_LinkType"/> <element name="LockedField" tokenid="ooxml:CT_OLEObject_LockedField"/> <element name="FieldCodes" tokenid="ooxml:CT_OLEObject_FieldCodes"/> @@ -12320,10 +12320,10 @@ </list> </define> </grammar> - <resource name="wrap" resource="Properties"> + <resource name="wrap" resource="Properties" tag="shape"> <element name="wrap" tokenid="ooxml:wrap_wrap"/> </resource> - <resource name="CT_Wrap" resource="Properties"> + <resource name="CT_Wrap" resource="Properties" tag="shape"> <attribute name="type" tokenid="ooxml:CT_Wrap_type"/> <attribute name="side" tokenid="ooxml:CT_Wrap_side"/> <attribute name="anchorx" tokenid="ooxml:CT_Wrap_anchorx"/> @@ -13962,6 +13962,11 @@ </choice> </list> </define> + <define name="ST_Percentage"> + <data type="int"> + <xs:documentation>Percentage</xs:documentation> + </data> + </define> <define name="CT_Zoom"> <optional> <attribute name="val"> @@ -21043,77 +21048,77 @@ </zeroOrMore> </define> </grammar> - <resource name="CT_Empty" resource="Stream"> + <resource name="CT_Empty" resource="Stream" tag="content"> <action name="end" tokenid="ooxml:EG_RunInnerContent_noBreakHyphen" action="noBreakHyphen"/> <action name="end" tokenid="ooxml:EG_RunInnerContent_softHyphen" action="softHyphen"/> <action name="end" tokenid="ooxml:EG_RunInnerContent_cr" action="cr"/> </resource> <resource name="ST_OnOff" resource="Boolean"/> - <resource name="CT_OnOff" resource="Value"> + <resource name="CT_OnOff" resource="Value" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_OnOff_val" action="setValue"/> <action name="start" action="setDefaultBooleanValue"/> </resource> <resource name="ST_LongHexNumber" resource="Hex"/> - <resource name="CT_LongHexNumber" resource="Value"> + <resource name="CT_LongHexNumber" resource="Value" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_LongHexNumber_val" action="setValue"/> <action name="start" action="setDefaultHexValue"/> </resource> <resource name="ST_ShortHexNumber" resource="Hex"/> - <resource name="CT_ShortHexNumber" resource="Value"> + <resource name="CT_ShortHexNumber" resource="Value" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_ShortHexNumber_val" action="setValue"/> <action name="start" action="setDefaultHexValue"/> </resource> <resource name="ST_UcharHexNumber" resource="Hex"/> - <resource name="CT_UcharHexNumber" resource="Value"> + <resource name="CT_UcharHexNumber" resource="Value" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_UcharHexNumber_val" action="setValue"/> <action name="start" action="setDefaultHexValue"/> </resource> <resource name="ST_DecimalNumber" resource="Integer"/> - <resource name="CT_DecimalNumber" resource="Value"> + <resource name="CT_DecimalNumber" resource="Value" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_DecimalNumber_val" action="setValue"/> <action name="start" action="setDefaultIntegerValue"/> </resource> <resource name="ST_UnsignedDecimalNumber" resource="Integer" generated="yes"/> <resource name="ST_TwipsMeasure" resource="Integer"/> - <resource name="CT_TwipsMeasure" resource="Value"> + <resource name="CT_TwipsMeasure" resource="Value" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_TwipsMeasure_val" action="setValue"/> <action name="start" action="setDefaultIntegerValue"/> </resource> <resource name="ST_SignedTwipsMeasure" resource="Integer"/> - <resource name="CT_SignedTwipsMeasure" resource="Value"> + <resource name="CT_SignedTwipsMeasure" resource="Value" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_SignedTwipsMeasure_val" action="setValue"/> <action name="start" action="setDefaultIntegerValue"/> </resource> <resource name="ST_PixelsMeasure" resource="Integer" generated="yes"/> - <resource name="CT_PixelsMeasure" resource="Value"> + <resource name="CT_PixelsMeasure" resource="Value" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_PixelsMeasure_val" action="setValue"/> <action name="start" action="setDefaultIntegerValue"/> </resource> <resource name="ST_HpsMeasure" resource="Integer"/> - <resource name="CT_HpsMeasure" resource="Value"> + <resource name="CT_HpsMeasure" resource="Value" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_HpsMeasure_val" action="setValue"/> <action name="start" action="setDefaultIntegerValue"/> </resource> <resource name="ST_SignedHpsMeasure" resource="Integer"/> - <resource name="CT_SignedHpsMeasure" resource="Value"> + <resource name="CT_SignedHpsMeasure" resource="Value" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_SignedHpsMeasure_val" action="setValue"/> <action name="start" action="setDefaultIntegerValue"/> </resource> <resource name="ST_DateTime" resource="String" generated="yes"/> <resource name="ST_MacroName" resource="String" generated="yes"/> - <resource name="CT_MacroName" resource="Value" generated="yes"> + <resource name="CT_MacroName" resource="Value" generated="yes" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_MacroName_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> <resource name="ST_EighthPointMeasure" resource="Integer"/> <resource name="ST_PointMeasure" resource="Integer"/> <resource name="ST_String" resource="String"/> - <resource name="CT_String" resource="Value"> + <resource name="CT_String" resource="Value" tag="attribute" > <attribute name="val" tokenid="ooxml:CT_String_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> <resource name="ST_TextScale" resource="Integer"/> - <resource name="CT_TextScale" resource="Value"> + <resource name="CT_TextScale" resource="Value" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_TextScale_val" action="setValue"/> <action name="start" action="setDefaultIntegerValue"/> </resource> @@ -21136,7 +21141,7 @@ <value tokenid="16">lightGray</value> <value tokenid="0">none</value> </resource> - <resource name="CT_Highlight" resource="Value"> + <resource name="CT_Highlight" resource="Value" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_Highlight_val" action="setValue"/> </resource> <resource name="ST_HexColorAuto" resource="List"> @@ -21144,7 +21149,7 @@ </resource> <resource name="ST_HexColorRGB" resource="Hex"/> <resource name="ST_HexColor" resource="Hex"/> - <resource name="CT_Color" resource="Properties"> + <resource name="CT_Color" resource="Properties" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_Color_val"/> <attribute name="themeColor" tokenid="ooxml:CT_Color_themeColor"/> <attribute name="themeTint" tokenid="ooxml:CT_Color_themeTint"/> @@ -21152,12 +21157,12 @@ </resource> <resource name="ST_LangCode" resource="Hex" generated="yes"/> <resource name="ST_Lang" resource="String"/> - <resource name="CT_Lang" resource="Value"> + <resource name="CT_Lang" resource="Value" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_Lang_val" action="setValue"/> <action name="start" action="setDefaultIntegerValue"/> </resource> <resource name="ST_Guid" resource="String"/> - <resource name="CT_Guid" resource="Value"> + <resource name="CT_Guid" resource="Value" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_Guid_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> @@ -21181,7 +21186,7 @@ <value tokenid="43">wavyDouble</value> <value tokenid="0">none</value> </resource> - <resource name="CT_Underline" resource="Properties"> + <resource name="CT_Underline" resource="Properties" tag="character"> <attribute name="val" tokenid="ooxml:CT_Underline_val" default="single"/> <attribute name="color" tokenid="ooxml:CT_Underline_color"/> <attribute name="themeColor" tokenid="ooxml:CT_Underline_themeColor"/> @@ -21197,7 +21202,7 @@ <value tokenid="5">antsRed</value> <value tokenid="6">shimmer</value> </resource> - <resource name="CT_TextEffect" resource="Value"> + <resource name="CT_TextEffect" resource="Value" tag="character"> <attribute name="val" tokenid="ooxml:CT_TextEffect_val" action="setValue"/> </resource> <resource name="ST_Border" resource="List"> @@ -21393,7 +21398,7 @@ <value tokenid="226">zigZag</value> <value tokenid="227">zigZagStitch</value> </resource> - <resource name="CT_Border" resource="Properties"> + <resource name="CT_Border" resource="Properties" tag="attribute"> <attribute name="val" tokenid="rtf:BRCTYPE"/> <attribute name="color" tokenid="ooxml:CT_Border_color"/> <attribute name="themeColor" tokenid="ooxml:CT_Border_themeColor"/> @@ -21444,7 +21449,7 @@ <value tokenid="13">pct90</value> <value tokenid="60">pct95</value> </resource> - <resource name="CT_Shd" resource="Properties"> + <resource name="CT_Shd" resource="Properties" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_Shd_val"/> <attribute name="color" tokenid="ooxml:CT_Shd_color"/> <attribute name="themeColor" tokenid="ooxml:CT_Shd_themeColor"/> @@ -21455,16 +21460,16 @@ <attribute name="themeFillTint" tokenid="ooxml:CT_Shd_themeFillTint"/> <attribute name="themeFillShade" tokenid="ooxml:CT_Shd_themeFillShade"/> </resource> - <resource name="ST_VerticalAlignRun" resource="List" generated="yes"> + <resource name="ST_VerticalAlignRun" resource="List" generated="yes" tag="character"> <value name="baseline" tokenid="ooxml:Value_wordprocessingml_ST_VerticalAlignRun_baseline">baseline</value> <value name="superscript" tokenid="ooxml:Value_wordprocessingml_ST_VerticalAlignRun_superscript">superscript</value> <value name="subscript" tokenid="ooxml:Value_wordprocessingml_ST_VerticalAlignRun_subscript">subscript</value> </resource> - <resource name="CT_VerticalAlignRun" resource="Value" generated="yes"> + <resource name="CT_VerticalAlignRun" resource="Value" generated="yes" tag="character"> <attribute name="val" tokenid="ooxml:CT_VerticalAlignRun_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> - <resource name="CT_FitText" resource="Properties"> + <resource name="CT_FitText" resource="Properties" tag="paragraph"> <attribute name="val" tokenid="ooxml:CT_FitText_val"/> <attribute name="id" tokenid="ooxml:CT_FitText_id"/> </resource> @@ -21475,10 +21480,10 @@ <value tokenid="3">circle</value> <value tokenid="4">underDot</value> </resource> - <resource name="CT_Em" resource="Value"> + <resource name="CT_Em" resource="Value" tag="character"> <attribute name="val" tokenid="ooxml:CT_Em_val" action="setValue"/> </resource> - <resource name="CT_Language" resource="Properties"> + <resource name="CT_Language" resource="Properties" tag="character"> <attribute name="val" tokenid="ooxml:CT_Language_val"/> <attribute name="eastAsia" tokenid="ooxml:CT_Language_eastAsia"/> <attribute name="bidi" tokenid="ooxml:CT_Language_bidi"/> @@ -21490,7 +21495,7 @@ <value tokenid="3">angle</value> <value tokenid="4">curly</value> </resource> - <resource name="CT_EastAsianLayout" resource="Properties"> + <resource name="CT_EastAsianLayout" resource="Properties" tag="character"> <attribute name="id" tokenid="ooxml:CT_EastAsianLayout_id"/> <attribute name="combine" tokenid="ooxml:CT_EastAsianLayout_combine"/> <attribute name="combineBrackets" tokenid="ooxml:CT_EastAsianLayout_combineBrackets"/> @@ -21540,7 +21545,7 @@ <value name="drop" tokenid="ooxml:Value_wordprocessingml_ST_DropCap_drop">drop</value> <value name="margin" tokenid="ooxml:Value_wordprocessingml_ST_DropCap_margin">margin</value> </resource> - <resource name="CT_FramePr" resource="Properties"> + <resource name="CT_FramePr" resource="Properties" tag="frame"> <kind name="paragraph"/> <attribute name="dropCap" tokenid="ooxml:CT_FramePr_dropCap"/> <attribute name="lines" tokenid="ooxml:CT_FramePr_lines"/> @@ -21575,7 +21580,7 @@ <value tokenid="4">heavy</value> <value tokenid="ooxml:Value_ST_TabTlc_middleDot">middleDot</value> </resource> - <resource name="CT_TabStop" resource="Properties"> + <resource name="CT_TabStop" resource="Properties" tag="paragraph"> <attribute name="val" tokenid="ooxml:CT_TabStop_val"/> <attribute name="leader" tokenid="ooxml:CT_TabStop_leader"/> <attribute name="pos" tokenid="ooxml:CT_TabStop_pos"/> @@ -21585,7 +21590,7 @@ <value name="exact" tokenid="ooxml:Value_wordprocessingml_ST_LineSpacingRule_exact">exact</value> <value name="atLeast" tokenid="ooxml:Value_wordprocessingml_ST_LineSpacingRule_atLeast">atLeast</value> </resource> - <resource name="CT_Spacing" resource="Properties"> + <resource name="CT_Spacing" resource="Properties" tag="paragraüh"> <attribute name="before" tokenid="ooxml:CT_Spacing_before"/> <attribute name="beforeLines" tokenid="ooxml:CT_Spacing_beforeLines"/> <attribute name="beforeAutospacing" tokenid="ooxml:CT_Spacing_beforeAutospacing"/> @@ -21595,7 +21600,7 @@ <attribute name="line" tokenid="ooxml:CT_Spacing_line"/> <attribute name="lineRule" tokenid="ooxml:CT_Spacing_lineRule"/> </resource> - <resource name="CT_Ind" resource="Properties"> + <resource name="CT_Ind" resource="Properties" tag="paragraph"> <attribute name="left" tokenid="ooxml:CT_Ind_left"/> <attribute name="leftChars" tokenid="ooxml:CT_Ind_leftChars"/> <attribute name="right" tokenid="ooxml:CT_Ind_right"/> @@ -21617,7 +21622,7 @@ <value tokenid="ooxml:Value_ST_Jc_lowKashida">lowKashida</value> <value tokenid="ooxml:Value_ST_Jc_thaiDistribute">thaiDistribute</value> </resource> - <resource name="CT_Jc" resource="Value"> + <resource name="CT_Jc" resource="Value" tag="character"> <attribute name="val" tokenid="ooxml:CT_Jc_val" action="setValue"/> </resource> <resource name="ST_View" resource="List" generated="yes"> @@ -21628,7 +21633,7 @@ <value name="normal" tokenid="ooxml:Value_wordprocessingml_ST_View_normal">normal</value> <value name="web" tokenid="ooxml:Value_wordprocessingml_ST_View_web">web</value> </resource> - <resource name="CT_View" resource="Properties"> + <resource name="CT_View" resource="Properties" tag="settings"> <attribute name="val" tokenid="ooxml:CT_View_val"/> </resource> <resource name="ST_Zoom" resource="List" generated="yes"> @@ -21637,11 +21642,11 @@ <value name="bestFit" tokenid="ooxml:Value_wordprocessingml_ST_Zoom_bestFit">bestFit</value> <value name="textFit" tokenid="ooxml:Value_wordprocessingml_ST_Zoom_textFit">textFit</value> </resource> - <resource name="CT_Zoom" resource="Properties"> + <resource name="CT_Zoom" resource="Properties" tag="settings"> <attribute name="val" tokenid="ooxml:CT_Zoom_val"/> <attribute name="percent" tokenid="ooxml:CT_Zoom_percent"/> </resource> - <resource name="CT_WritingStyle" resource="Properties"> + <resource name="CT_WritingStyle" resource="Properties" tag="settings"> <attribute name="lang" tokenid="ooxml:CT_WritingStyle_lang"/> <attribute name="vendorID" tokenid="ooxml:CT_WritingStyle_vendorID"/> <attribute name="dllVersion" tokenid="ooxml:CT_WritingStyle_dllVersion"/> @@ -21653,7 +21658,7 @@ <value name="clean" tokenid="ooxml:Value_wordprocessingml_ST_Proof_clean">clean</value> <value name="dirty" tokenid="ooxml:Value_wordprocessingml_ST_Proof_dirty">dirty</value> </resource> - <resource name="CT_Proof" resource="Properties"> + <resource name="CT_Proof" resource="Properties" tag="redline"> <attribute name="spelling" tokenid="ooxml:CT_Proof_spelling"/> <attribute name="grammar" tokenid="ooxml:CT_Proof_grammar"/> </resource> @@ -21662,7 +21667,7 @@ <value name="letter" tokenid="ooxml:Value_wordprocessingml_ST_DocType_letter">letter</value> <value name="eMail" tokenid="ooxml:Value_wordprocessingml_ST_DocType_eMail">eMail</value> </resource> - <resource name="CT_DocType" resource="Properties"> + <resource name="CT_DocType" resource="Properties" tag="document"> <attribute name="val" tokenid="ooxml:CT_DocType_val"/> </resource> <resource name="ST_DocProtect" resource="List" generated="yes"> @@ -21696,7 +21701,7 @@ <attribute name="hash" tokenid="ooxml:AG_Password_hash"/> <attribute name="salt" tokenid="ooxml:AG_Password_salt"/> </resource> - <resource name="CT_DocProtect" resource="Properties"> + <resource name="CT_DocProtect" resource="Properties" tag="document"> <attribute name="edit" tokenid="ooxml:CT_DocProtect_edit"/> <attribute name="formatting" tokenid="ooxml:CT_DocProtect_formatting"/> <attribute name="enforcement" tokenid="ooxml:CT_DocProtect_enforcement"/> @@ -21709,7 +21714,7 @@ <value name="email" tokenid="ooxml:Value_wordprocessingml_ST_MailMergeDocType_email">email</value> <value name="fax" tokenid="ooxml:Value_wordprocessingml_ST_MailMergeDocType_fax">fax</value> </resource> - <resource name="CT_MailMergeDocType" resource="Value" generated="yes"> + <resource name="CT_MailMergeDocType" resource="Value" generated="yes" tag="mailmerge"> <attribute name="val" tokenid="ooxml:CT_MailMergeDocType_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> @@ -21721,7 +21726,7 @@ <value name="odbc" tokenid="ooxml:Value_wordprocessingml_ST_MailMergeDataType_odbc">odbc</value> <value name="native" tokenid="ooxml:Value_wordprocessingml_ST_MailMergeDataType_native">native</value> </resource> - <resource name="CT_MailMergeDataType" resource="Value" generated="yes"> + <resource name="CT_MailMergeDataType" resource="Value" generated="yes" tag="mailmerge"> <attribute name="val" tokenid="ooxml:CT_MailMergeDataType_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> @@ -21731,7 +21736,7 @@ <value name="email" tokenid="ooxml:Value_wordprocessingml_ST_MailMergeDest_email">email</value> <value name="fax" tokenid="ooxml:Value_wordprocessingml_ST_MailMergeDest_fax">fax</value> </resource> - <resource name="CT_MailMergeDest" resource="Value" generated="yes"> + <resource name="CT_MailMergeDest" resource="Value" generated="yes" tag="mailmerge"> <attribute name="val" tokenid="ooxml:CT_MailMergeDest_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> @@ -21739,18 +21744,18 @@ <value name="null" tokenid="ooxml:Value_wordprocessingml_ST_MailMergeOdsoFMDFieldType_null">null</value> <value name="dbColumn" tokenid="ooxml:Value_wordprocessingml_ST_MailMergeOdsoFMDFieldType_dbColumn">dbColumn</value> </resource> - <resource name="CT_MailMergeOdsoFMDFieldType" resource="Value" generated="yes"> + <resource name="CT_MailMergeOdsoFMDFieldType" resource="Value" generated="yes" tag="mailmerge"> <attribute name="val" tokenid="ooxml:CT_MailMergeOdsoFMDFieldType_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> - <resource name="CT_TrackChangesView" resource="Properties"> + <resource name="CT_TrackChangesView" resource="Properties" tag="redline"> <attribute name="markup" tokenid="ooxml:CT_TrackChangesView_markup"/> <attribute name="comments" tokenid="ooxml:CT_TrackChangesView_comments"/> <attribute name="insDel" tokenid="ooxml:CT_TrackChangesView_insDel"/> <attribute name="formatting" tokenid="ooxml:CT_TrackChangesView_formatting"/> <attribute name="inkAnnotations" tokenid="ooxml:CT_TrackChangesView_inkAnnotations"/> </resource> - <resource name="CT_Kinsoku" resource="Properties"> + <resource name="CT_Kinsoku" resource="Properties" tag="character"> <attribute name="lang" tokenid="ooxml:CT_Kinsoku_lang"/> <attribute name="val" tokenid="ooxml:CT_Kinsoku_val"/> </resource> @@ -21762,7 +21767,7 @@ <value tokenid="5">tbRlV</value> <value tokenid="ooxml:Value_ST_TextDirection_tbLrV">tbLrV</value> </resource> - <resource name="CT_TextDirection" resource="Value"> + <resource name="CT_TextDirection" resource="Value" tag="paragraph"> <attribute name="val" tokenid="ooxml:CT_TextDirection_val" action="setValue"/> </resource> <resource name="ST_TextAlignment" resource="List" generated="yes"> @@ -21772,7 +21777,7 @@ <value name="bottom" tokenid="ooxml:Value_wordprocessingml_ST_TextAlignment_bottom">bottom</value> <value name="auto" tokenid="ooxml:Value_wordprocessingml_ST_TextAlignment_auto">auto</value> </resource> - <resource name="CT_TextAlignment" resource="Value" generated="yes"> + <resource name="CT_TextAlignment" resource="Value" generated="yes" tag="paragraph"> <attribute name="val" tokenid="ooxml:CT_TextAlignment_val" action="setValue"/> </resource> <resource name="ST_DisplacedByCustomXml" resource="List" generated="yes"> @@ -21783,80 +21788,80 @@ <value name="cont" tokenid="ooxml:Value_wordprocessingml_ST_AnnotationVMerge_cont">cont</value> <value name="rest" tokenid="ooxml:Value_wordprocessingml_ST_AnnotationVMerge_rest">rest</value> </resource> - <resource name="CT_Markup" resource="Properties"> + <resource name="CT_Markup" resource="Properties" tag="redline"> <attribute name="id" tokenid="ooxml:CT_Markup_id"/> </resource> - <resource name="CT_TrackChange" resource="Properties"> + <resource name="CT_TrackChange" resource="Properties" tag="redline"> <attribute name="author" tokenid="ooxml:CT_TrackChange_author"/> <attribute name="date" tokenid="ooxml:CT_TrackChange_date"/> </resource> - <resource name="CT_CellMergeTrackChange" resource="Properties"> + <resource name="CT_CellMergeTrackChange" resource="Properties" tag="redline"> <attribute name="vMerge" tokenid="ooxml:CT_CellMergeTrackChange_vMerge"/> <attribute name="vMergeOrig" tokenid="ooxml:CT_CellMergeTrackChange_vMergeOrig"/> </resource> - <resource name="CT_TrackChangeRange" resource="Properties"> + <resource name="CT_TrackChangeRange" resource="Properties" tag="redline"> <attribute name="displacedByCustomXml" tokenid="ooxml:CT_TrackChangeRange_displacedByCustomXml"/> </resource> - <resource name="CT_MarkupRange" resource="Properties"> + <resource name="CT_MarkupRange" resource="Properties" tag="redline"> <attribute name="displacedByCustomXml" tokenid="ooxml:CT_MarkupRange_displacedByCustomXml"/> </resource> - <resource name="CT_MarkupRangeBookmark" resource="Properties"> + <resource name="CT_MarkupRangeBookmark" resource="Properties" tag="redline"> <attribute name="id" tokenid="rtf:IBKL"/> </resource> - <resource name="CT_BookmarkRange" resource="Properties"> + <resource name="CT_BookmarkRange" resource="Properties" tag="reference"> <type name="Bookmark"/> <attribute name="colFirst" tokenid="ooxml:CT_BookmarkRange_colFirst"/> <attribute name="colLast" tokenid="ooxml:CT_BookmarkRange_colLast"/> </resource> - <resource name="CT_Bookmark" resource="Properties"> + <resource name="CT_Bookmark" resource="Properties" tag="reference"> <type name="Bookmark"/> <attribute name="name" tokenid="rtf:BOOKMARKNAME"/> </resource> - <resource name="CT_MoveBookmark" resource="Properties"> + <resource name="CT_MoveBookmark" resource="Properties" tag="reference"> <attribute name="author" tokenid="ooxml:CT_MoveBookmark_author"/> <attribute name="date" tokenid="ooxml:CT_MoveBookmark_date"/> </resource> - <resource name="CT_Comment" resource="XNote"> + <resource name="CT_Comment" resource="XNote" tag="content"> <attribute name="id" action="checkId"/> <attribute name="initials" tokenid="ooxml:CT_Comment_initials"/> </resource> - <resource name="CT_TrackChangeNumbering" resource="Properties"> + <resource name="CT_TrackChangeNumbering" resource="Properties" tag="numbering"> <attribute name="original" tokenid="ooxml:CT_TrackChangeNumbering_original"/> </resource> - <resource name="CT_TblPrExChange" resource="Properties"> + <resource name="CT_TblPrExChange" resource="Properties" tag="table"> <element name="tblPrEx" tokenid="ooxml:CT_TblPrExChange_tblPrEx"/> </resource> - <resource name="CT_TcPrChange" resource="Properties"> + <resource name="CT_TcPrChange" resource="Properties" tag="table"> <element name="tcPr" tokenid="ooxml:CT_TcPrChange_tcPr"/> </resource> - <resource name="CT_TrPrChange" resource="Properties"> + <resource name="CT_TrPrChange" resource="Properties" tag="table"> <element name="trPr" tokenid="ooxml:CT_TrPrChange_trPr"/> </resource> - <resource name="CT_TblGridChange" resource="Properties"> + <resource name="CT_TblGridChange" resource="Properties" tag="table"> <element name="tblGrid" tokenid="ooxml:CT_TblGridChange_tblGrid"/> </resource> - <resource name="CT_TblPrChange" resource="Properties"> + <resource name="CT_TblPrChange" resource="Properties" tag="table"> <element name="tblPr" tokenid="ooxml:CT_TblPrChange_tblPr"/> </resource> - <resource name="CT_SectPrChange" resource="Properties"> + <resource name="CT_SectPrChange" resource="Properties" tag="section"> <element name="sectPr" tokenid="ooxml:CT_SectPrChange_sectPr"/> </resource> - <resource name="CT_PPrChange" resource="Properties"> + <resource name="CT_PPrChange" resource="Properties" tag="paragraph"> <element name="pPr" tokenid="ooxml:CT_PPrChange_pPr"/> </resource> - <resource name="CT_RPrChange" resource="Properties"> + <resource name="CT_RPrChange" resource="Properties" tag="character"> <element name="rPr" tokenid="ooxml:CT_RPrChange_rPr"/> </resource> - <resource name="CT_ParaRPrChange" resource="Properties"> + <resource name="CT_ParaRPrChange" resource="Properties" tag="character"> <element name="rPr" tokenid="ooxml:CT_ParaRPrChange_rPr"/> </resource> - <resource name="CT_RunTrackChange" resource="Stream"> + <resource name="CT_RunTrackChange" resource="Stream" tag="redlines"> <action name="start" action="tokenproperty"/> <action name="start" action="propagateCharacterPropertiesAsSet" sendtokenid="ooxml:trackchange"/> <action name="start" action="clearProps"/> <action name="end" action="mark" sendtokenid="ooxml:endtrackchange"/> </resource> - <resource name="EG_RangeMarkupElements" resource="Properties"> + <resource name="EG_RangeMarkupElements" resource="Properties" tag="redlines"> <element name="bookmarkStart" tokenid="ooxml:EG_RangeMarkupElements_bookmarkStart"/> <element name="bookmarkEnd" tokenid="ooxml:EG_RangeMarkupElements_bookmarkEnd"/> <element name="moveFromRangeStart" tokenid="ooxml:EG_RangeMarkupElements_moveFromRangeStart"/> @@ -21874,14 +21879,14 @@ <element name="customXmlMoveToRangeStart" tokenid="ooxml:EG_RangeMarkupElements_customXmlMoveToRangeStart"/> <element name="customXmlMoveToRangeEnd" tokenid="ooxml:EG_RangeMarkupElements_customXmlMoveToRangeEnd"/> </resource> - <resource name="CT_NumPr" resource="Properties"> + <resource name="CT_NumPr" resource="Properties" tag="numbering"> <kind name="paragraph"/> <element name="ilvl" tokenid="sprm:PIlvl"/> <element name="numId" tokenid="sprm:PIlfo"/> <element name="numberingChange" tokenid="ooxml:CT_NumPr_numberingChange"/> <element name="ins" tokenid="ooxml:CT_NumPr_ins"/> </resource> - <resource name="CT_PBdr" resource="Properties"> + <resource name="CT_PBdr" resource="Properties" tag="paragraph"> <kind name="paragraph"/> <element name="top" tokenid="sprm:PBrcTop"/> <element name="left" tokenid="sprm:PBrcLeft"/> @@ -21890,7 +21895,7 @@ <element name="between" tokenid="sprm:PBrcBetween"/> <element name="bar" tokenid="sprm:PBrcBar"/> </resource> - <resource name="CT_Tabs" resource="Properties"> + <resource name="CT_Tabs" resource="Properties" tag="paragraph"> <element name="tab" tokenid="ooxml:CT_Tabs_tab"/> </resource> <resource name="ST_TextboxTightWrap" resource="List" generated="yes"> @@ -21900,11 +21905,11 @@ <value name="firstLineOnly" tokenid="ooxml:Value_wordprocessingml_ST_TextboxTightWrap_firstLineOnly">firstLineOnly</value> <value name="lastLineOnly" tokenid="ooxml:Value_wordprocessingml_ST_TextboxTightWrap_lastLineOnly">lastLineOnly</value> </resource> - <resource name="CT_TextboxTightWrap" resource="Value" generated="yes"> + <resource name="CT_TextboxTightWrap" resource="Value" generated="yes" tag="textbox"> <attribute name="val" tokenid="ooxml:CT_TextboxTightWrap_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> - <resource name="CT_PPrBase" resource="Properties"> + <resource name="CT_PPrBase" resource="Properties" tag="paragraph"> <kind name="paragraph"/> <element name="pStyle" tokenid="ooxml:CT_PPrBase_pStyle"/> <element name="keepNext" tokenid="sprm:PFKeepFollow"/> @@ -21940,12 +21945,12 @@ <element name="divId" tokenid="ooxml:CT_PPrBase_divId"/> <element name="cnfStyle" tokenid="ooxml:CT_PPrBase_cnfStyle"/> </resource> - <resource name="CT_PPr" resource="Properties"> + <resource name="CT_PPr" resource="Properties" tag="paragraph"> <element name="rPr" tokenid="ooxml:CT_PPr_rPr"/> <element name="sectPr" tokenid="ooxml:CT_PPr_sectPr"/> <element name="pPrChange" tokenid="ooxml:CT_PPr_pPrChange"/> </resource> - <resource xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" name="CT_Control" resource="Properties"> + <resource xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" name="CT_Control" resource="Properties" tag="control"> <attribute name="name" tokenid="ooxml:CT_Control_name"/> <attribute name="shapeid" tokenid="ooxml:CT_Control_shapeid"/> <attribute name="r:id" tokenid="ooxml:CT_Control_r_id"/> @@ -21959,24 +21964,24 @@ <resource xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" name="CT_Rel" resource="Properties"> <attribute name="r:id" tokenid="ooxml:CT_Rel_id"/> </resource> - <resource name="CT_PictureBase" resource="Properties"/> - <resource name="CT_Object" resource="Shape"> + <resource name="CT_PictureBase" resource="Properties" tag="shape"/> + <resource name="CT_Object" resource="Shape" tag="shape"> <element name="control" tokenid="ooxml:CT_Object_control"/> <attribute name="dxaOrig" tokenid="ooxml:CT_Object_dxaOrig"/> <attribute name="dyaOrig" tokenid="ooxml:CT_Object_dyaOrig"/> <action name="end" action="sendPropertiesWithId" sendtokenid="ooxml:object"/> <action name="end" action="clearProps"/> </resource> - <resource name="CT_Picture" resource="Shape"> + <resource name="CT_Picture" resource="Shape" tag="shape"> <element name="movie" tokenid="ooxml:CT_Picture_movie"/> <element name="control" tokenid="ooxml:CT_Picture_control"/> <action name="end" action="sendPropertiesWithId" sendtokenid="ooxml:object"/> <action name="end" action="clearProps"/> </resource> - <resource name="CT_Drawing" resource="Properties"> + <resource name="CT_Drawing" resource="Properties" tag="shape"> <action name="end" action="handlePicture"/> </resource> - <resource name="CT_SimpleField" resource="Stream"> + <resource name="CT_SimpleField" resource="Stream" tag="field"> <element name="fldData" tokenid="ooxml:CT_SimpleField_fldData"/> <attribute name="instr" tokenid="ooxml:CT_SimpleField_instr"/> <attribute name="fldLock" tokenid="ooxml:CT_SimpleField_fldLock"/> @@ -22008,15 +22013,15 @@ <value name="currentDate" tokenid="ooxml:Value_wordprocessingml_ST_FFTextType_currentDate">currentDate</value> <value name="calculated" tokenid="ooxml:Value_wordprocessingml_ST_FFTextType_calculated">calculated</value> </resource> - <resource name="CT_FFTextType" resource="Value" generated="yes"> + <resource name="CT_FFTextType" resource="Value" generated="yes" tag="field"> <attribute name="val" tokenid="ooxml:CT_FFTextType_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> - <resource name="CT_FFName" resource="Value" generated="yes"> + <resource name="CT_FFName" resource="Value" generated="yes" tag="field"> <attribute name="val" tokenid="ooxml:CT_FFName_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> - <resource name="CT_FldChar" resource="Stream"> + <resource name="CT_FldChar" resource="Stream" tag="field"> <element name="fldData" tokenid="ooxml:CT_FldChar_fldData"/> <element name="ffData" tokenid="ooxml:CT_FldChar_ffData"/> <element name="numberingChange" tokenid="ooxml:CT_FldChar_numberingChange"/> @@ -22033,7 +22038,7 @@ <cond tokenid="ooxml:CT_FldChar_fldCharType" value="ooxml:Value_ST_FldCharType_end"/> </action> </resource> - <resource xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" name="CT_Hyperlink" resource="Stream"> + <resource xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" name="CT_Hyperlink" resource="Stream" tag="link"> <attribute name="tgtFrame" tokenid="ooxml:CT_Hyperlink_tgtFrame"/> <attribute name="tooltip" tokenid="ooxml:CT_Hyperlink_tooltip"/> <attribute name="docLocation" tokenid="ooxml:CT_Hyperlink_docLocation"/> @@ -22045,7 +22050,7 @@ <action name="start" action="fieldsep"/> <action name="end" action="fieldend"/> </resource> - <resource name="CT_FFData" resource="Properties"> + <resource name="CT_FFData" resource="Properties" tag="field"> <element name="name" tokenid="ooxml:CT_FFData_name"/> <element name="enabled" tokenid="ooxml:CT_FFData_enabled"/> <element name="calcOnExit" tokenid="ooxml:CT_FFData_calcOnExit"/> @@ -22059,39 +22064,39 @@ <action name="end" action="propagateCharacterPropertiesAsSet" sendtokenid="ooxml:ffdata"/> <action name="end" action="clearProps"/> </resource> - <resource name="CT_FFHelpText" resource="Properties"> + <resource name="CT_FFHelpText" resource="Properties" tag="field"> <attribute name="type" tokenid="ooxml:CT_FFHelpText_type"/> <attribute name="val" tokenid="ooxml:CT_FFHelpText_val"/> </resource> - <resource name="CT_FFStatusText" resource="Properties"> + <resource name="CT_FFStatusText" resource="Properties" tag="field"> <attribute name="type" tokenid="ooxml:CT_FFStatusText_type"/> <attribute name="val" tokenid="ooxml:CT_FFStatusText_val"/> </resource> - <resource name="CT_FFCheckBox" resource="Properties"> + <resource name="CT_FFCheckBox" resource="Properties" tag="field"> <element name="size" tokenid="ooxml:CT_FFCheckBox_size"/> <element name="sizeAuto" tokenid="ooxml:CT_FFCheckBox_sizeAuto"/> <element name="default" tokenid="ooxml:CT_FFCheckBox_default"/> <element name="checked" tokenid="ooxml:CT_FFCheckBox_checked"/> </resource> - <resource name="CT_FFDDList" resource="Properties"> + <resource name="CT_FFDDList" resource="Properties" tag="field"> <element name="result" tokenid="ooxml:CT_FFDDList_result"/> <element name="default" tokenid="ooxml:CT_FFDDList_default"/> <element name="listEntry" tokenid="ooxml:CT_FFDDList_listEntry"/> </resource> - <resource name="CT_FFTextInput" resource="Properties"> + <resource name="CT_FFTextInput" resource="Properties" tag="field"> <element name="type" tokenid="ooxml:CT_FFTextInput_type"/> <element name="default" tokenid="ooxml:CT_FFTextInput_default"/> <element name="maxLength" tokenid="ooxml:CT_FFTextInput_maxLength"/> <element name="format" tokenid="ooxml:CT_FFTextInput_format"/> </resource> - <resource name="ST_SectionMark" resource="List"> + <resource name="ST_SectionMark" resource="List" tag="section"> <value tokenid="0">continuous</value> <value tokenid="1">nextColumn</value> <value tokenid="2">nextPage</value> <value tokenid="3">evenPage</value> <value tokenid="4">oddPage</value> </resource> - <resource name="CT_SectType" resource="Value"> + <resource name="CT_SectType" resource="Value" tag="section"> <attribute name="val" tokenid="ooxml:CT_SectType_val" action="setValue"/> </resource> <resource name="ST_NumberFormat" resource="List"> @@ -22160,13 +22165,13 @@ <value tokenid="0">portrait</value> <value tokenid="1">landscape</value> </resource> - <resource name="CT_PageSz" resource="Properties"> + <resource name="CT_PageSz" resource="Properties" tag="page"> <attribute name="w" tokenid="ooxml:CT_PageSz_w"/> <attribute name="h" tokenid="ooxml:CT_PageSz_h"/> <attribute name="orient" tokenid="ooxml:CT_PageSz_orient"/> <attribute name="code" tokenid="ooxml:CT_PageSz_code"/> </resource> - <resource name="CT_PageMar" resource="Properties"> + <resource name="CT_PageMar" resource="Properties" tag="page"> <attribute name="top" tokenid="ooxml:CT_PageMar_top"/> <attribute name="right" tokenid="ooxml:CT_PageMar_right"/> <attribute name="bottom" tokenid="ooxml:CT_PageMar_bottom"/> @@ -22188,7 +22193,7 @@ <value name="page" tokenid="ooxml:Value_wordprocessingml_ST_PageBorderOffset_page">page</value> <value name="text" tokenid="ooxml:Value_wordprocessingml_ST_PageBorderOffset_text">text</value> </resource> - <resource name="CT_PageBorders" resource="Properties"> + <resource name="CT_PageBorders" resource="Properties" tag="page"> <element name="top" tokenid="ooxml:CT_PageBorders_top"/> <element name="left" tokenid="ooxml:CT_PageBorders_left"/> <element name="bottom" tokenid="ooxml:CT_PageBorders_bottom"/> @@ -22209,23 +22214,23 @@ <value tokenid="1">newSection</value> <value tokenid="2">continuous</value> </resource> - <resource name="CT_LineNumber" resource="Properties"> + <resource name="CT_LineNumber" resource="Properties" tag="section"> <attribute name="countBy" tokenid="ooxml:CT_LineNumber_countBy"/> <attribute name="start" tokenid="ooxml:CT_LineNumber_start"/> <attribute name="distance" tokenid="ooxml:CT_LineNumber_distance"/> <attribute name="restart" tokenid="ooxml:CT_LineNumber_restart"/> </resource> - <resource name="CT_PageNumber" resource="Properties"> + <resource name="CT_PageNumber" resource="Properties" tag="page"> <attribute name="fmt" tokenid="ooxml:CT_PageNumber_fmt"/> <attribute name="start" tokenid="ooxml:CT_PageNumber_start"/> <attribute name="chapStyle" tokenid="ooxml:CT_PageNumber_chapStyle"/> <attribute name="chapSep" tokenid="ooxml:CT_PageNumber_chapSep"/> </resource> - <resource name="CT_Column" resource="Properties"> + <resource name="CT_Column" resource="Properties" tag="page"> <attribute name="space" tokenid="ooxml:CT_Column_space"/> <attribute name="w" tokenid="ooxml:CT_Column_w"/> </resource> - <resource name="CT_Columns" resource="Properties"> + <resource name="CT_Columns" resource="Properties" tag="page"> <attribute name="equalWidth" tokenid="ooxml:CT_Columns_equalWidth"/> <attribute name="space" tokenid="ooxml:CT_Columns_space"/> <attribute name="num" tokenid="ooxml:CT_Columns_num"/> @@ -22238,7 +22243,7 @@ <value tokenid="2">both</value> <value tokenid="3">bottom</value> </resource> - <resource name="CT_VerticalJc" resource="Value"> + <resource name="CT_VerticalJc" resource="Value" tag="page"> <attribute name="val" tokenid="ooxml:CT_VerticalJc_val" action="setValue"/> </resource> <resource name="ST_DocGrid" resource="List" generated="yes"> @@ -22247,7 +22252,7 @@ <value name="linesAndChars" tokenid="ooxml:Value_wordprocessingml_ST_DocGrid_linesAndChars">linesAndChars</value> <value name="snapToChars" tokenid="ooxml:Value_wordprocessingml_ST_DocGrid_snapToChars">snapToChars</value> </resource> - <resource name="CT_DocGrid" resource="Properties"> + <resource name="CT_DocGrid" resource="Properties" tag="document"> <attribute name="type" tokenid="ooxml:CT_DocGrid_type"/> <attribute name="linePitch" tokenid="ooxml:CT_DocGrid_linePitch"/> <attribute name="charSpace" tokenid="ooxml:CT_DocGrid_charSpace"/> @@ -22263,17 +22268,17 @@ <value name="continuationSeparator" tokenid="ooxml:Value_wordprocessingml_ST_FtnEdn_continuationSeparator">continuationSeparator</value> <value name="continuationNotice" tokenid="ooxml:Value_wordprocessingml_ST_FtnEdn_continuationNotice">continuationNotice</value> </resource> - <resource xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" name="CT_HdrFtrRef" resource="Properties"> + <resource xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" name="CT_HdrFtrRef" resource="Properties" tag="header"> <attribute name="type" tokenid="ooxml:CT_HdrFtrRef_type"/> <attribute name="r:id" tokenid="ooxml:CT_HdrFtrRef_id"/> <action name="end" action="handleHdrFtr"/> </resource> - <resource name="EG_HdrFtrReferences" resource="Properties"> + <resource name="EG_HdrFtrReferences" resource="Properties" tag="header"> <element name="headerReference" tokenid="ooxml:EG_HdrFtrReferences_headerReference"/> <element name="footerReference" tokenid="ooxml:EG_HdrFtrReferences_footerReference"/> </resource> - <resource name="CT_HdrFtr" resource="Stream"/> - <resource name="EG_SectPrContents" resource="Properties"> + <resource name="CT_HdrFtr" resource="Stream" tag="header"/> + <resource name="EG_SectPrContents" resource="Properties" tag="section"> <element name="bidi" tokenid="ooxml:EG_SectPrContents_bidi"/> <element name="cols" tokenid="ooxml:EG_SectPrContents_cols"/> <element name="docGrid" tokenid="ooxml:EG_SectPrContents_docGrid"/> @@ -22294,8 +22299,8 @@ <element name="type" tokenid="sprm:SBkc"/> <element name="vAlign" tokenid="ooxml:EG_SectPrContents_vAlign"/> </resource> - <resource name="CT_SectPrBase" resource="Properties"/> - <resource name="CT_SectPr" resource="Properties"> + <resource name="CT_SectPrBase" resource="Properties" tag="section"/> + <resource name="CT_SectPr" resource="Properties" tag="section"> <element name="sectPrChange" tokenid="ooxml:CT_SectPr_sectPrChange"/> <action name="start" action="setLastParagraphInSection"/> </resource> @@ -22310,7 +22315,7 @@ <value tokenid="ooxml:Value_ST_BrClear_right">right</value> <value tokenid="ooxml:Value_ST_BrClear_all">all</value> </resource> - <resource name="CT_Br" resource="Properties"> + <resource name="CT_Br" resource="Properties" tag="content"> <attribute name="type" tokenid="ooxml:CT_Br_type"/> <attribute name="clear" tokenid="ooxml:CT_Br_clear"/> <action name="end" action="handleBreak"/> @@ -22331,13 +22336,13 @@ <value tokenid="ooxml:Value_ST_PTabLeader_underscore">underscore</value> <value tokenid="ooxml:Value_ST_PTabLeader_middleDot">middleDot</value> </resource> - <resource name="CT_PTab" resource="Stream"> + <resource name="CT_PTab" resource="Stream" tag="paragraph"> <attribute name="alignment" tokenid="ooxml:CT_PTab_alignment"/> <attribute name="relativeTo" tokenid="ooxml:CT_PTab_relativeTo"/> <attribute name="leader" tokenid="ooxml:CT_PTab_leader"/> <action name="end" action="tab"/> </resource> - <resource name="CT_Sym" resource="Properties"> + <resource name="CT_Sym" resource="Properties" tag="character"> <attribute name="font" tokenid="ooxml:CT_Sym_font"/> <attribute name="char" tokenid="ooxml:CT_Sym_char"/> </resource> @@ -22356,29 +22361,29 @@ <value name="owners" tokenid="ooxml:Value_wordprocessingml_ST_EdGrp_owners">owners</value> <value name="current" tokenid="ooxml:Value_wordprocessingml_ST_EdGrp_current">current</value> </resource> - <resource name="CT_Text" resource="Stream"> + <resource name="CT_Text" resource="Stream" tag="content"> <attribute name="xml:space" tokenid="ooxml:CT_Text_space"/> <action name="characters" action="text"/> </resource> - <resource name="CT_FtnEdnRefChar" resource="Stream"> + <resource name="CT_FtnEdnRefChar" resource="Stream" tag="reference"> <action name="end" action="ftnednref"/> </resource> - <resource name="CT_FtnEdnSep" resource="Stream"> + <resource name="CT_FtnEdnSep" resource="Stream" tag="reference"> <action name="end" action="ftnednsep"/> </resource> - <resource name="CT_FtnEdnCont" resource="Stream"> + <resource name="CT_FtnEdnCont" resource="Stream" tag="reference"> <action name="end" action="ftnedncont"/> </resource> - <resource name="CT_PgNum" resource="Stream"> + <resource name="CT_PgNum" resource="Stream" tag="reference"> <action name="end" action="pgNum"/> </resource> - <resource name="CT_Cr" resource="Stream"> + <resource name="CT_Cr" resource="Stream" tag="content"> <action name="end" action="endOfParagraph"/> </resource> - <resource name="CT_Tab" resource="Stream"> + <resource name="CT_Tab" resource="Stream" tag="content"> <action name="end" action="tab"/> </resource> - <resource name="EG_RunInnerContent" resource="Stream"> + <resource name="EG_RunInnerContent" resource="Stream" tag="content"> <element name="br" tokenid="ooxml:EG_RunInnerContent_br"/> <element name="t" tokenid="ooxml:EG_RunInnerContent_t"/> <element name="delText" tokenid="ooxml:EG_RunInnerContent_delText"/> @@ -22412,7 +22417,7 @@ <element name="ptab" tokenid="ooxml:EG_RunInnerContent_ptab"/> <element name="lastRenderedPageBreak" tokenid="ooxml:EG_RunInnerContent_lastRenderedPageBreak"/> </resource> - <resource name="CT_R" resource="Stream"> + <resource name="CT_R" resource="Stream" tag="content"> <action name="start" action="startCharacterGroup"/> </resource> <resource name="ST_Hint" resource="List"> @@ -22430,7 +22435,7 @@ <value tokenid="ooxml:Value_ST_Theme_minorAscii">minorAscii</value> <value tokenid="ooxml:Value_ST_Theme_minorHAnsi">minorHAnsi</value> </resource> - <resource name="CT_Fonts" resource="Properties"> + <resource name="CT_Fonts" resource="Properties" tag="font"> <attribute name="hint" tokenid="ooxml:CT_Fonts_hint"/> <attribute name="ascii" tokenid="ooxml:CT_Fonts_ascii"/> <attribute name="hAnsi" tokenid="ooxml:CT_Fonts_hAnsi"/> @@ -22441,7 +22446,7 @@ <attribute name="eastAsiaTheme" tokenid="ooxml:CT_Fonts_eastAsiaTheme"/> <attribute name="cstheme" tokenid="ooxml:CT_Fonts_cstheme"/> </resource> - <resource name="EG_RPrBase" resource="Properties"> + <resource name="EG_RPrBase" resource="Properties" tag="paragraph"> <kind name="paragraph"/> <element name="rStyle" tokenid="ooxml:EG_RPrBase_rStyle"/> <element name="rFonts" tokenid="ooxml:EG_RPrBase_rFonts"/> @@ -22483,19 +22488,19 @@ <element name="specVanish" tokenid="0x818"/> <element name="oMath" tokenid="ooxml:EG_RPrBase_oMath"/> </resource> - <resource name="EG_RPrContent" resource="Properties"> + <resource name="EG_RPrContent" resource="Properties" tag="character"> <element name="rPrChange" tokenid="ooxml:EG_RPrContent_rPrChange"/> </resource> - <resource name="CT_RPr" resource="Properties"> + <resource name="CT_RPr" resource="Properties" tag="character"> </resource> - <resource name="CT_RPrOriginal" resource="Properties"/> - <resource name="CT_ParaRPrOriginal" resource="Properties"/> - <resource name="CT_ParaRPr" resource="Properties"> + <resource name="CT_RPrOriginal" resource="Properties" tag="character"/> + <resource name="CT_ParaRPrOriginal" resource="Properties" tag="paragraph"/> + <resource name="CT_ParaRPr" resource="Properties" tag="redline"> <element name="ins" tokenid="ooxml:CT_ParaRPr_ins"/> <element name="del" tokenid="ooxml:CT_ParaRPr_del"/> <element name="rPrChange" tokenid="ooxml:CT_ParaRPr_rPrChange"/> </resource> - <resource name="CT_ParaTrackChange" resource="Properties"> + <resource name="CT_ParaTrackChange" resource="Properties" tag="redline"> <action name="start" action="tokenproperty"/> <action name="start" action="propagateCharacterPropertiesAsSet" sendtokenid="ooxml:paratrackchange"/> <action name="start" action="clearProps"/> @@ -22508,7 +22513,7 @@ <value name="right" tokenid="ooxml:Value_wordprocessingml_ST_RubyAlign_right">right</value> <value name="rightVertical" tokenid="ooxml:Value_wordprocessingml_ST_RubyAlign_rightVertical">rightVertical</value> </resource> - <resource name="CT_RubyAlign" resource="Value" generated="yes"> + <resource name="CT_RubyAlign" resource="Value" generated="yes" tag="character"> <attribute name="val" tokenid="ooxml:CT_RubyAlign_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> @@ -22518,7 +22523,7 @@ <value name="unlocked" tokenid="ooxml:Value_wordprocessingml_ST_Lock_unlocked">unlocked</value> <value name="sdtContentLocked" tokenid="ooxml:Value_wordprocessingml_ST_Lock_sdtContentLocked">sdtContentLocked</value> </resource> - <resource name="CT_Lock" resource="Value" generated="yes"> + <resource name="CT_Lock" resource="Value" generated="yes" tag="content"> <attribute name="val" tokenid="ooxml:CT_Lock_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> @@ -22527,7 +22532,7 @@ <value name="date" tokenid="ooxml:Value_wordprocessingml_ST_SdtDateMappingType_date">date</value> <value name="dateTime" tokenid="ooxml:Value_wordprocessingml_ST_SdtDateMappingType_dateTime">dateTime</value> </resource> - <resource name="CT_SdtDateMappingType" resource="Value" generated="yes"> + <resource name="CT_SdtDateMappingType" resource="Value" generated="yes" tag="content"> <attribute name="val" tokenid="ooxml:CT_SdtDateMappingType_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> @@ -22543,32 +22548,32 @@ <value name="gregorianXlitEnglish" tokenid="ooxml:Value_wordprocessingml_ST_CalendarType_gregorianXlitEnglish">gregorianXlitEnglish</value> <value name="gregorianXlitFrench" tokenid="ooxml:Value_wordprocessingml_ST_CalendarType_gregorianXlitFrench">gregorianXlitFrench</value> </resource> - <resource name="CT_CalendarType" resource="Value" generated="yes"> + <resource name="CT_CalendarType" resource="Value" generated="yes" tag="content"> <attribute name="val" tokenid="ooxml:CT_CalendarType_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> - <resource name="CT_SdtContentRun" resource="Properties"/> - <resource name="CT_Attr" resource="Properties"> + <resource name="CT_SdtContentRun" resource="Properties" tag="content"/> + <resource name="CT_Attr" resource="Properties" tag="content"> <attribute name="uri" tokenid="ooxml:CT_Attr_uri"/> <attribute name="name" tokenid="ooxml:CT_Attr_name"/> <attribute name="val" tokenid="ooxml:CT_Attr_val"/> </resource> - <resource name="CT_CustomXmlRun" resource="Properties"> + <resource name="CT_CustomXmlRun" resource="Properties" tag="content"> <element name="customXmlPr" tokenid="ooxml:CT_CustomXmlRun_customXmlPr"/> <attribute name="uri" tokenid="ooxml:CT_CustomXmlRun_uri"/> <attribute name="element" tokenid="ooxml:CT_CustomXmlRun_element"/> </resource> - <resource name="CT_SmartTagRun" resource="Properties"> + <resource name="CT_SmartTagRun" resource="Properties" tag="content"> <element name="smartTagPr" tokenid="ooxml:CT_SmartTagRun_smartTagPr"/> <attribute name="uri" tokenid="ooxml:CT_SmartTagRun_uri"/> <attribute name="element" tokenid="ooxml:CT_SmartTagRun_element"/> </resource> - <resource name="EG_PContent" resource="Properties"> + <resource name="EG_PContent" resource="Properties" tag="content"> <element name="fldSimple" tokenid="ooxml:EG_PContent_fldSimple"/> <element name="hyperlink" tokenid="ooxml:EG_PContent_hyperlink"/> <element name="subDoc" tokenid="ooxml:EG_PContent_subDoc"/> </resource> - <resource name="CT_P" resource="Stream"> + <resource name="CT_P" resource="Stream" tag="content"> <action name="start" action="handleLastParagraphInSection"/> <action name="start" action="startParagraphGroup"/> <action name="start" action="setHandle"/> @@ -22581,27 +22586,27 @@ <value tokenid="ooxml:Value_ST_TblWidth_dxa">dxa</value> <value tokenid="ooxml:Value_ST_TblWidth_auto">auto</value> </resource> - <resource name="CT_Height" resource="Properties"> + <resource name="CT_Height" resource="Properties" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_Height_val"/> <attribute name="hRule" tokenid="ooxml:CT_Height_hRule"/> </resource> - <resource name="CT_TblWidth" resource="Properties"> + <resource name="CT_TblWidth" resource="Properties" tag="table"> <attribute name="w" tokenid="ooxml:CT_TblWidth_w"/> <attribute name="type" tokenid="ooxml:CT_TblWidth_type"/> </resource> - <resource name="CT_TblGridCol" resource="Value"> + <resource name="CT_TblGridCol" resource="Value" tag="table"> <attribute name="w" tokenid="ooxml:CT_TblGridCol_w" action="setValue"/> <action name="start" action="setDefaultIntegerValue"/> </resource> - <resource name="CT_TblGridBase" resource="Properties"> + <resource name="CT_TblGridBase" resource="Properties" tag="table"> <element name="gridCol" tokenid="ooxml:CT_TblGridBase_gridCol"/> </resource> - <resource name="CT_TblGrid" resource="Properties"> + <resource name="CT_TblGrid" resource="Properties" tag="table"> <element name="tblGridChange" tokenid="ooxml:CT_TblGrid_tblGridChange"/> <action name="end" action="propagateTableProperties"/> <action name="end" action="clearProps"/> </resource> - <resource name="CT_TcBorders" resource="Properties"> + <resource name="CT_TcBorders" resource="Properties" tag="table"> <kind name="table"/> <element name="top" tokenid="ooxml:CT_TcBorders_top"/> <element name="left" tokenid="ooxml:CT_TcBorders_left"/> @@ -22612,7 +22617,7 @@ <element name="tl2br" tokenid="ooxml:CT_TcBorders_tl2br"/> <element name="tr2bl" tokenid="ooxml:CT_TcBorders_tr2bl"/> </resource> - <resource name="CT_TcMar" resource="Properties"> + <resource name="CT_TcMar" resource="Properties" tag="table"> <kind name="table"/> <element name="top" tokenid="ooxml:CT_TcMar_top"/> <element name="left" tokenid="ooxml:CT_TcMar_left"/> @@ -22624,13 +22629,13 @@ <value tokenid="ooxml:Value_ST_Merge_restart">restart</value> <default tokenid="ooxml:Value_ST_Merge_continue"/> </resource> - <resource name="CT_VMerge" resource="Value"> + <resource name="CT_VMerge" resource="Value" tag="table"> <attribute name="val" tokenid="ooxml:CT_VMerge_val" action="setValue"/> </resource> - <resource name="CT_HMerge" resource="Value"> + <resource name="CT_HMerge" resource="Value" tag="table"> <attribute name="val" tokenid="ooxml:CT_HMerge_val" action="setValue"/> </resource> - <resource name="CT_TcPrBase" resource="Properties"> + <resource name="CT_TcPrBase" resource="Properties" tag="table"> <kind name="table"/> <element name="cnfStyle" tokenid="ooxml:CT_TcPrBase_cnfStyle"/> <element name="tcW" tokenid="ooxml:CT_TcPrBase_tcW"/> @@ -22646,12 +22651,12 @@ <element name="vAlign" tokenid="ooxml:CT_TcPrBase_vAlign"/> <element name="hideMark" tokenid="ooxml:CT_TcPrBase_hideMark"/> </resource> - <resource name="CT_TcPr" resource="Properties"> + <resource name="CT_TcPr" resource="Properties" tag="table"> <element name="tcPrChange" tokenid="ooxml:CT_TcPr_tcPrChange"/> <action name="end" action="propagateCellProperties"/> <action name="end" action="clearProps"/> </resource> - <resource name="CT_TcPrInner" resource="Properties"/> + <resource name="CT_TcPrInner" resource="Properties" tag="table"/> <resource name="CT_Tc" resource="TextTableCell"> <action name="start" action="startCell"/> <action name="end" action="endCell"/> @@ -22659,11 +22664,11 @@ <action name="end" action="endParagraphGroup"/> </resource> <resource name="ST_Cnf" resource="String" generated="yes"/> - <resource name="CT_Cnf" resource="Value" generated="yes"> + <resource name="CT_Cnf" resource="Value" generated="yes" tag="content"> <attribute name="val" tokenid="ooxml:CT_Cnf_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> - <resource name="CT_TrPrBase" resource="Properties"> + <resource name="CT_TrPrBase" resource="Properties" tag="table"> <kind name="table"/> <element name="cnfStyle" tokenid="ooxml:CT_TrPrBase_cnfStyle"/> <element name="divId" tokenid="ooxml:CT_TrPrBase_divId"/> @@ -22678,7 +22683,7 @@ <element name="jc" tokenid="ooxml:CT_TrPrBase_jc"/> <element name="hidden" tokenid="ooxml:CT_TrPrBase_hidden"/> </resource> - <resource name="CT_TrPr" resource="Properties"> + <resource name="CT_TrPr" resource="Properties" tag="table"> <kind name="table"/> <element name="ins" tokenid="ooxml:CT_TrPr_ins"/> <element name="del" tokenid="ooxml:CT_TrPr_del"/> @@ -22686,7 +22691,7 @@ <action name="end" action="propagateRowProperties"/> <action name="end" action="clearProps"/> </resource> - <resource name="CT_Row" resource="TextTableRow"> + <resource name="CT_Row" resource="TextTableRow" tag="table"> <action name="start" action="startRow"/> <action name="end" action="sendRowProperties"/> <action name="end" action="sendTableProperties"/> @@ -22700,16 +22705,16 @@ <value tokenid="ooxml:Value_ST_TblOverlap_never">never</value> <value tokenid="ooxml:Value_ST_TblOverlap_overlap">overlap</value> </resource> - <resource name="CT_TblOverlap" resource="Value"> + <resource name="CT_TblOverlap" resource="Value" tag="table"> <attribute name="val" tokenid="ooxml:CT_TblOverlap_val" action="setValue"/> </resource> - <resource name="CT_TblCellMar" resource="Properties"> + <resource name="CT_TblCellMar" resource="Properties" tag="table"> <element name="top" tokenid="ooxml:CT_TblCellMar_top"/> <element name="left" tokenid="ooxml:CT_TblCellMar_left"/> <element name="bottom" tokenid="ooxml:CT_TblCellMar_bottom"/> <element name="right" tokenid="ooxml:CT_TblCellMar_right"/> </resource> - <resource name="CT_TblBorders" resource="Properties"> + <resource name="CT_TblBorders" resource="Properties" tag="table"> <kind name="table"/> <element name="top" tokenid="ooxml:CT_TblBorders_top"/> <element name="left" tokenid="ooxml:CT_TblBorders_left"/> @@ -22718,7 +22723,7 @@ <element name="insideH" tokenid="ooxml:CT_TblBorders_insideH"/> <element name="insideV" tokenid="ooxml:CT_TblBorders_insideV"/> </resource> - <resource name="CT_TblPrBase" resource="Properties"> + <resource name="CT_TblPrBase" resource="Properties" tag="table"> <kind name="table"/> <element name="tblStyle" tokenid="ooxml:CT_TblPrBase_tblStyle"/> <element name="tblpPr" tokenid="ooxml:CT_TblPrBase_tblpPr"/> @@ -22736,30 +22741,30 @@ <element name="tblCellMar" tokenid="ooxml:CT_TblPrBase_tblCellMar"/> <element name="tblLook" tokenid="ooxml:CT_TblPrBase_tblLook"/> </resource> - <resource name="CT_TblPr" resource="Properties"> + <resource name="CT_TblPr" resource="Properties" tag="table"> <kind name="table"/> <element name="tblPrChange" tokenid="ooxml:CT_TblPr_tblPrChange"/> <action name="end" action="propagateTableProperties"/> <action name="end" action="clearProps"/> </resource> - <resource name="CT_Tbl" resource="TextTable"/> + <resource name="CT_Tbl" resource="TextTable" tag="table"/> <resource name="ST_FtnPos" resource="List"> <value tokenid="ooxml:Value_ST_FtnPos_pageBottom">pageBottom</value> <value tokenid="ooxml:Value_ST_FtnPos_beneathText">beneathText</value> <value tokenid="ooxml:Value_ST_FtnPos_sectEnd">sectEnd</value> <value tokenid="ooxml:Value_ST_FtnPos_docEnd">docEnd</value> </resource> - <resource name="CT_FtnPos" resource="Value"> + <resource name="CT_FtnPos" resource="Value" tag="reference"> <attribute name="val" tokenid="ooxml:CT_FtnPos_val" action="setValue"/> </resource> <resource name="ST_EdnPos" resource="List"> <value tokenid="ooxml:Value_ST_EdnPos_sectEnd">sectEnd</value> <value tokenid="ooxml:Value_ST_EdnPos_docEnd">docEnd</value> </resource> - <resource name="CT_EdnPos" resource="Value"> + <resource name="CT_EdnPos" resource="Value" tag="reference"> <attribute name="val" tokenid="ooxml:CT_EdnPos_val" action="setValue"/> </resource> - <resource name="CT_NumFmt" resource="Value"> + <resource name="CT_NumFmt" resource="Value" tag="numbering"> <attribute name="val" tokenid="ooxml:CT_NumFmt_val" action="setValue"/> </resource> <resource name="ST_RestartNumber" resource="List"> @@ -22767,42 +22772,42 @@ <value tokenid="ooxml:Value_ST_RestartNumber_eachSect">eachSect</value> <value tokenid="ooxml:Value_ST_RestartNumber_eachPage">eachPage</value> </resource> - <resource name="CT_NumRestart" resource="Value"> + <resource name="CT_NumRestart" resource="Value" tag="numbering"> <attribute name="val" tokenid="ooxml:CT_NumRestart_val" action="setValue"/> </resource> - <resource name="CT_FtnEdnRef" resource="Properties"> + <resource name="CT_FtnEdnRef" resource="Properties" tag="reference"> <attribute name="customMarkFollows" tokenid="ooxml:CT_FtnEdnRef_customMarkFollows"/> <attribute name="id" tokenid="ooxml:CT_FtnEdnRef_id" action="setXNoteId"/> <action name="end" action="handleXNotes"/> </resource> - <resource name="CT_FtnEdnSepRef" resource="Properties"> + <resource name="CT_FtnEdnSepRef" resource="Properties" tag="reference"> <attribute name="id" tokenid="ooxml:CT_FtnEdnSepRef_id"/> </resource> - <resource name="CT_FtnEdn" resource="XNote"> + <resource name="CT_FtnEdn" resource="XNote" tag="reference"> <attribute name="type" tokenid="ooxml:CT_FtnEdn_type"/> <attribute name="id" tokenid="ooxml:CT_FtnEdn_id" action="checkId"/> <action name="start" action="propagateCharacterProperties"/> <action name="end" action="endSectionGroup"/> </resource> - <resource name="CT_CommentRef" resource="Properties"> + <resource name="CT_CommentRef" resource="Properties" tag="reference"> <action name="end" action="handleComment"/> </resource> - <resource name="EG_FtnEdnNumProps" resource="Properties"> + <resource name="EG_FtnEdnNumProps" resource="Properties" tag="reference"> <element name="numStart" tokenid="ooxml:EG_FtnEdnNumProps_numStart"/> <element name="numRestart" tokenid="ooxml:EG_FtnEdnNumProps_numRestart"/> </resource> - <resource name="CT_FtnProps" resource="Properties"> + <resource name="CT_FtnProps" resource="Properties" tag="reference"> <element name="pos" tokenid="ooxml:CT_FtnProps_pos"/> <element name="numFmt" tokenid="ooxml:CT_FtnProps_numFmt"/> </resource> - <resource name="CT_EdnProps" resource="Properties"> + <resource name="CT_EdnProps" resource="Properties" tag="reference"> <element name="pos" tokenid="ooxml:CT_EdnProps_pos"/> <element name="numFmt" tokenid="ooxml:CT_EdnProps_numFmt"/> </resource> - <resource name="CT_FtnDocProps" resource="Properties"> + <resource name="CT_FtnDocProps" resource="Properties" tag="reference"> <element name="footnote" tokenid="ooxml:CT_FtnDocProps_footnote"/> </resource> - <resource name="CT_EdnDocProps" resource="Properties"> + <resource name="CT_EdnDocProps" resource="Properties" tag="reference"> <element name="endnote" tokenid="ooxml:CT_EdnDocProps_endnote"/> </resource> <resource name="ST_MailMergeSourceType" resource="List" generated="yes"> @@ -22816,11 +22821,11 @@ <value name="legacy" tokenid="ooxml:Value_wordprocessingml_ST_MailMergeSourceType_legacy">legacy</value> <value name="master" tokenid="ooxml:Value_wordprocessingml_ST_MailMergeSourceType_master">master</value> </resource> - <resource name="CT_MailMergeSourceType" resource="Value" generated="yes"> + <resource name="CT_MailMergeSourceType" resource="Value" generated="yes" tag="mailmerge"> <attribute name="val" tokenid="ooxml:CT_MailMergeSourceType_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> - <resource name="CT_MailMerge" resource="Properties"> + <resource name="CT_MailMerge" resource="Properties" tag="mailmerge"> <element name="mainDocumentType" tokenid="ooxml:CT_MailMerge_mainDocumentType"/> <element name="linkToQuery" tokenid="ooxml:CT_MailMerge_linkToQuery"/> <element name="dataType" tokenid="ooxml:CT_MailMerge_dataType"/> @@ -22851,11 +22856,11 @@ <value name="1800x1440" tokenid="ooxml:Value_wordprocessingml_ST_TargetScreenSz_1800x1440">1800x1440</value> <value name="1920x1200" tokenid="ooxml:Value_wordprocessingml_ST_TargetScreenSz_1920x1200">1920x1200</value> </resource> - <resource name="CT_TargetScreenSz" resource="Value" generated="yes"> + <resource name="CT_TargetScreenSz" resource="Value" generated="yes" tag="settings"> <attribute name="val" tokenid="ooxml:CT_TargetScreenSz_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> - <resource name="CT_Compat" resource="Properties"> + <resource name="CT_Compat" resource="Properties" tag="settings"> <element name="useSingleBorderforContiguousCells" tokenid="ooxml:CT_Compat_useSingleBorderforContiguousCells"/> <element name="wpJustification" tokenid="ooxml:CT_Compat_wpJustification"/> <element name="noTabHangInd" tokenid="ooxml:CT_Compat_noTabHangInd"/> @@ -22922,11 +22927,11 @@ <element name="useAnsiKerningPairs" tokenid="ooxml:CT_Compat_useAnsiKerningPairs"/> <element name="cachedColBalance" tokenid="ooxml:CT_Compat_cachedColBalance"/> </resource> - <resource name="CT_DocVar" resource="Properties"> + <resource name="CT_DocVar" resource="Properties" tag="document"> <attribute name="name" tokenid="ooxml:CT_DocVar_name"/> <attribute name="val" tokenid="ooxml:CT_DocVar_val"/> </resource> - <resource name="CT_DocRsids" resource="Properties"> + <resource name="CT_DocRsids" resource="Properties" tag="redline"> <element name="rsidRoot" tokenid="ooxml:CT_DocRsids_rsidRoot"/> <element name="rsid" tokenid="ooxml:CT_DocRsids_rsid"/> </resource> @@ -22935,21 +22940,21 @@ <value name="compressPunctuation" tokenid="ooxml:Value_wordprocessingml_ST_CharacterSpacing_compressPunctuation">compressPunctuation</value> <value name="compressPunctuationAndJapaneseKana" tokenid="ooxml:Value_wordprocessingml_ST_CharacterSpacing_compressPunctuationAndJapaneseKana">compressPunctuationAndJapaneseKana</value> </resource> - <resource name="CT_CharacterSpacing" resource="Value" generated="yes"> + <resource name="CT_CharacterSpacing" resource="Value" generated="yes" tag="character"> <attribute name="val" tokenid="ooxml:CT_CharacterSpacing_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> - <resource name="CT_SaveThroughXslt" resource="Properties"> + <resource name="CT_SaveThroughXslt" resource="Properties" tag="settings"> <attribute name="r:id" tokenid="ooxml:CT_SaveThroughXslt_r_id"/> <attribute name="solutionID" tokenid="ooxml:CT_SaveThroughXslt_solutionID"/> </resource> - <resource name="CT_RPrDefault" resource="Properties"> + <resource name="CT_RPrDefault" resource="Properties" tag="character"> <element name="rPr" tokenid="ooxml:CT_RPrDefault_rPr"/> </resource> - <resource name="CT_PPrDefault" resource="Properties"> + <resource name="CT_PPrDefault" resource="Properties" tag="paragraph"> <element name="pPr" tokenid="ooxml:CT_PPrDefault_pPr"/> </resource> - <resource name="CT_DocDefaults" resource="Properties"> + <resource name="CT_DocDefaults" resource="Properties" tag="document"> <element name="pPrDefault" tokenid="ooxml:CT_DocDefaults_pPrDefault"/> <element name="rPrDefault" tokenid="ooxml:CT_DocDefaults_rPrDefault"/> </resource> @@ -22973,10 +22978,10 @@ <attribute name="h" tokenid="ooxml:CT_ReadingModeInkLockDown_h"/> <attribute name="fontSz" tokenid="ooxml:CT_ReadingModeInkLockDown_fontSz"/> </resource> - <resource name="CT_WriteProtection" resource="Properties"> + <resource name="CT_WriteProtection" resource="Properties" tag="document"> <attribute name="recommended" tokenid="ooxml:CT_WriteProtection_recommended"/> </resource> - <resource name="CT_Settings" resource="PropertyTable" tokenid="ooxml:SETTINGS"> + <resource name="CT_Settings" resource="PropertyTable" tokenid="ooxml:SETTINGS" tag="settings"> <element name="writeProtection" tokenid="ooxml:CT_Settings_writeProtection"/> <element name="view" tokenid="ooxml:CT_Settings_view"/> <element name="zoom" tokenid="ooxml:CT_Settings_zoom"/> @@ -23080,7 +23085,7 @@ <value name="off" tokenid="ooxml:Value_wordprocessingml_ST_FrameScrollbar_off">off</value> <value name="auto" tokenid="ooxml:Value_wordprocessingml_ST_FrameScrollbar_auto">auto</value> </resource> - <resource name="CT_FrameScrollbar" resource="Value" generated="yes"> + <resource name="CT_FrameScrollbar" resource="Value" generated="yes" tag="frame"> <attribute name="val" tokenid="ooxml:CT_FrameScrollbar_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> @@ -23089,7 +23094,7 @@ <value name="cols" tokenid="ooxml:Value_wordprocessingml_ST_FrameLayout_cols">cols</value> <value name="none" tokenid="ooxml:Value_wordprocessingml_ST_FrameLayout_none">none</value> </resource> - <resource name="CT_FrameLayout" resource="Value" generated="yes"> + <resource name="CT_FrameLayout" resource="Value" generated="yes" tag="frame"> <attribute name="val" tokenid="ooxml:CT_FrameLayout_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> @@ -23098,20 +23103,20 @@ <value name="space" tokenid="ooxml:Value_wordprocessingml_ST_LevelSuffix_space">space</value> <value name="nothing" tokenid="ooxml:Value_wordprocessingml_ST_LevelSuffix_nothing">nothing</value> </resource> - <resource name="CT_LevelSuffix" resource="Value" generated="yes"> + <resource name="CT_LevelSuffix" resource="Value" generated="yes" tag="numbering"> <attribute name="val" tokenid="ooxml:CT_LevelSuffix_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> - <resource name="CT_LevelText" resource="Properties"> + <resource name="CT_LevelText" resource="Properties" tag="numbering"> <attribute name="val" tokenid="ooxml:CT_LevelText_val"/> <attribute name="null" tokenid="ooxml:CT_LevelText_null"/> </resource> - <resource name="CT_LvlLegacy" resource="Properties"> + <resource name="CT_LvlLegacy" resource="Properties" tag="numbering"> <attribute name="legacy" tokenid="ooxml:CT_LvlLegacy_legacy"/> <attribute name="legacySpace" tokenid="ooxml:CT_LvlLegacy_legacySpace"/> <attribute name="legacyIndent" tokenid="ooxml:CT_LvlLegacy_legacyIndent"/> </resource> - <resource name="CT_Lvl" resource="Properties"> + <resource name="CT_Lvl" resource="Properties" tag="numbering"> <kind name="paragraph"/> <element name="start" tokenid="rtf:ISTARTAT"/> <element name="numFmt" tokenid="rtf:NFC"/> @@ -23129,15 +23134,15 @@ <attribute name="tplc" tokenid="ooxml:CT_Lvl_tplc"/> <attribute name="tentative" tokenid="ooxml:CT_Lvl_tentative"/> </resource> - <resource name="ST_MultiLevelType" resource="List"> + <resource name="ST_MultiLevelType" resource="List" tag="numbering"> <value tokenid="ooxml:Value_ST_MultiLevelType_singleLevel">singleLevel</value> <value tokenid="ooxml:Value_ST_MultiLevelType_multilevel">multilevel</value> <value tokenid="ooxml:Value_ST_MultiLevelType_hybridMultilevel">hybridMultilevel</value> </resource> - <resource name="CT_MultiLevelType" resource="Value"> + <resource name="CT_MultiLevelType" resource="Value" tag="numbering"> <attribute name="val" tokenid="ooxml:CT_MultiLevelType_val" action="setValue"/> </resource> - <resource name="CT_AbstractNum" resource="Properties"> + <resource name="CT_AbstractNum" resource="Properties" tag="numbering"> <kind name="paragraph"/> <element name="nsid" tokenid="rtf:LSID"/> <element name="multiLevelType" tokenid="ooxml:CT_AbstractNum_multiLevelType"/> @@ -23148,19 +23153,19 @@ <element name="lvl" tokenid="ooxml:CT_AbstractNum_lvl"/> <attribute name="abstractNumId" tokenid="ooxml:CT_AbstractNum_abstractNumId"/> </resource> - <resource name="CT_NumLvl" resource="Properties"> + <resource name="CT_NumLvl" resource="Properties" tag="numbering"> <kind name="paragraph"/> <element name="startOverride" tokenid="ooxml:CT_NumLvl_startOverride"/> <element name="lvl" tokenid="ooxml:CT_NumLvl_lvl"/> <attribute name="ilvl" tokenid="ooxml:CT_NumLvl_ilvl"/> </resource> - <resource name="CT_Num" resource="Properties"> + <resource name="CT_Num" resource="Properties" tag="numbering"> <kind name="paragraph"/> <element name="abstractNumId" tokenid="ooxml:CT_Num_abstractNumId"/> <element name="lvlOverride" tokenid="ooxml:CT_Num_lvlOverride"/> <attribute name="numId" tokenid="ooxml:CT_Num_numId"/> </resource> - <resource name="CT_Numbering" resource="PropertyTable" tokenid="ooxml:NUMBERING"> + <resource name="CT_Numbering" resource="PropertyTable" tokenid="ooxml:NUMBERING" tag="numbering"> <kind name="paragraph"/> <element name="numPicBullet" tokenid="ooxml:CT_Numbering_numPicBullet"/> <element name="abstractNum" tokenid="ooxml:CT_Numbering_abstractNum"/> @@ -23182,7 +23187,7 @@ <value tokenid="12">seCell</value> <value tokenid="13">swCell</value> </resource> - <resource name="CT_Style_tblStylePr" resource="Properties"> + <resource name="CT_Style_tblStylePr" resource="Properties" tag="style"> <element name="pPr" tokenid="ooxml:CT_PPrBase"/> <element name="rPr" tokenid="ooxml:EG_RPrBase"/> <element name="tblPr" tokenid="ooxml:CT_TblPrBase"/> @@ -23196,7 +23201,7 @@ <value tokenid="3">table</value> <value tokenid="4">numbering</value> </resource> - <resource name="CT_Style" resource="Properties"> + <resource name="CT_Style" resource="Properties" tag="style"> <element name="name" tokenid="ooxml:CT_Style_name"/> <element name="aliases" tokenid="ooxml:CT_Style_aliases"/> <element name="basedOn" tokenid="ooxml:CT_Style_basedOn"/> @@ -23224,9 +23229,9 @@ <attribute name="default" tokenid="ooxml:CT_Style_default"/> <attribute name="customStyle" tokenid="ooxml:CT_Style_customStyle"/> </resource> - <resource name="CT_Styles" resource="Table" tokenid="rtf:STYLESHEET"/> + <resource name="CT_Styles" resource="Table" tokenid="rtf:STYLESHEET" tag="style"/> <resource name="ST_Panose" resource="Hex"/> - <resource name="CT_Panose" resource="Value"> + <resource name="CT_Panose" resource="Value" tag="font"> <attribute name="val" tokenid="ooxml:CT_Panose_val" action="setValue"/> <action name="start" action="setDefaultHexValue"/> </resource> @@ -23238,7 +23243,7 @@ <value tokenid="ooxml:Value_ST_FontFamily_swiss">swiss</value> <value tokenid="ooxml:Value_ST_FontFamily_auto">auto</value> </resource> - <resource name="CT_FontFamily" resource="Value"> + <resource name="CT_FontFamily" resource="Value" tag="font"> <attribute name="val" tokenid="ooxml:CT_FontFamily_val" action="setValue"/> </resource> <resource name="ST_Pitch" resource="List"> @@ -23246,10 +23251,10 @@ <value tokenid="ooxml:Value_ST_Pitch_variable">variable</value> <value tokenid="ooxml:Value_ST_Pitch_default">default</value> </resource> - <resource name="CT_Pitch" resource="Value"> + <resource name="CT_Pitch" resource="Value" tag="font"> <attribute name="val" tokenid="ooxml:CT_Pitch_val" action="setValue"/> </resource> - <resource name="CT_FontSig" resource="Properties"> + <resource name="CT_FontSig" resource="Properties" tag="font"> <attribute name="usb0" tokenid="ooxml:CT_FontSig_usb0"/> <attribute name="usb1" tokenid="ooxml:CT_FontSig_usb1"/> <attribute name="usb2" tokenid="ooxml:CT_FontSig_usb2"/> @@ -23257,11 +23262,11 @@ <attribute name="csb0" tokenid="ooxml:CT_FontSig_csb0"/> <attribute name="csb1" tokenid="ooxml:CT_FontSig_csb1"/> </resource> - <resource name="CT_FontRel" resource="Properties"> + <resource name="CT_FontRel" resource="Properties" tag="font"> <attribute name="fontKey" tokenid="ooxml:CT_FontRel_fontKey"/> <attribute name="subsetted" tokenid="ooxml:CT_FontRel_subsetted"/> </resource> - <resource name="CT_Font" resource="Properties"> + <resource name="CT_Font" resource="Properties" tag="font"> <kind name="character"/> <element name="altName" tokenid="ooxml:CT_Font_altName"/> <element name="panose1" tokenid="ooxml:CT_Font_panose1"/> @@ -23276,8 +23281,8 @@ <element name="embedBoldItalic" tokenid="ooxml:CT_Font_embedBoldItalic"/> <attribute name="name" tokenid="ooxml:CT_Font_name"/> </resource> - <resource name="CT_FontsList" resource="Table" tokenid="rtf:FONTTABLE"/> - <resource name="EG_RunLevelElts" resource="Stream"> + <resource name="CT_FontsList" resource="Table" tokenid="rtf:FONTTABLE" tag="font"/> + <resource name="EG_RunLevelElts" resource="Stream" tag="character"> <element name="proofErr" tokenid="ooxml:EG_RunLevelElts_proofErr"/> <element name="permStart" tokenid="ooxml:EG_RunLevelElts_permStart"/> <element name="permEnd" tokenid="ooxml:EG_RunLevelElts_permEnd"/> @@ -23288,7 +23293,7 @@ <element name="moveFrom" tokenid="ooxml:EG_RunLevelElts_moveFrom"/> <element name="moveTo" tokenid="ooxml:EG_RunLevelElts_moveTo"/> </resource> - <resource name="CT_Body" resource="Stream"> + <resource name="CT_Body" resource="Stream" tag="content"> <action name="start" action="startSectionGroup"/> <!-- <action name="start" action="footnoteSeparator"/> @@ -23300,7 +23305,7 @@ <action name="end" action="endParagraphGroup"/> <action name="end" action="endSectionGroup"/> </resource> - <resource xmlns:v="urn:schemas-microsoft-com:vml" name="CT_ShapeDefaults" resource="Properties"> + <resource xmlns:v="urn:schemas-microsoft-com:vml" name="CT_ShapeDefaults" resource="Properties" tag="shape"> <element name="v:fill" tokenid="ooxml:CT_ShapeDefaults_v_fill"/> <element name="v:stroke" tokenid="ooxml:CT_ShapeDefaults_v_stroke"/> <element name="v:textbox" tokenid="ooxml:CT_ShapeDefaults_v_textbox"/> @@ -23315,15 +23320,15 @@ <attribute name="strokecolor" tokenid="ooxml:CT_ShapeDefaults_strokecolor"/> <attribute name="allowincell" tokenid="ooxml:CT_ShapeDefaults_allowincell"/> </resource> - <resource name="CT_Comments" resource="Stream"> + <resource name="CT_Comments" resource="Stream" tag="content"> <action name="start" action="startSectionGroup"/> <action name="end" action="endSectionGroup"/> </resource> - <resource name="CT_Footnotes" resource="Stream"/> - <resource name="footnotes" resource="Stream"/> - <resource name="CT_Endnotes" resource="Stream"/> - <resource name="endnotes" resource="Stream"/> - <resource name="CT_SmartTagType" resource="Properties"> + <resource name="CT_Footnotes" resource="Stream" tag="reference"/> + <resource name="footnotes" resource="Stream" tag="reference"/> + <resource name="CT_Endnotes" resource="Stream" tag="reference"/> + <resource name="endnotes" resource="Stream" tag="reference"/> + <resource name="CT_SmartTagType" resource="Properties" tag="content"> <attribute name="namespaceuri" tokenid="ooxml:CT_SmartTagType_namespaceuri"/> <attribute name="name" tokenid="ooxml:CT_SmartTagType_name"/> <attribute name="url" tokenid="ooxml:CT_SmartTagType_url"/> @@ -23352,7 +23357,7 @@ <value name="p" tokenid="ooxml:Value_wordprocessingml_ST_DocPartBehavior_p">p</value> <value name="pg" tokenid="ooxml:Value_wordprocessingml_ST_DocPartBehavior_pg">pg</value> </resource> - <resource name="CT_DocPartBehavior" resource="Value" generated="yes"> + <resource name="CT_DocPartBehavior" resource="Value" generated="yes" tag="document"> <attribute name="val" tokenid="ooxml:CT_DocPartBehavior_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> @@ -23365,7 +23370,7 @@ <value name="formFld" tokenid="ooxml:Value_wordprocessingml_ST_DocPartType_formFld">formFld</value> <value name="bbPlcHdr" tokenid="ooxml:Value_wordprocessingml_ST_DocPartType_bbPlcHdr">bbPlcHdr</value> </resource> - <resource name="CT_DocPartType" resource="Value" generated="yes"> + <resource name="CT_DocPartType" resource="Value" generated="yes" tag="document"> <attribute name="val" tokenid="ooxml:CT_DocPartType_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> @@ -23409,24 +23414,24 @@ <value name="custom4" tokenid="ooxml:Value_wordprocessingml_ST_DocPartGallery_custom4">custom4</value> <value name="custom5" tokenid="ooxml:Value_wordprocessingml_ST_DocPartGallery_custom5">custom5</value> </resource> - <resource name="CT_DocPartGallery" resource="Value" generated="yes"> + <resource name="CT_DocPartGallery" resource="Value" generated="yes" tag="document"> <attribute name="val" tokenid="ooxml:CT_DocPartGallery_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> - <resource name="CT_DocPartName" resource="Properties"> + <resource name="CT_DocPartName" resource="Properties" tag="document"> <attribute name="val" tokenid="ooxml:CT_DocPartName_val"/> <attribute name="decorated" tokenid="ooxml:CT_DocPartName_decorated"/> </resource> - <resource name="settings" resource="Stream"> + <resource name="settings" resource="Stream" tag="settings"> <element name="settings" tokenid="ooxml:settings_settings"/> </resource> - <resource name="fonts" resource="Stream"> + <resource name="fonts" resource="Stream" tag="font"> <element name="fonts" tokenid="rtf:FONTTABLE"/> </resource> - <resource name="numbering" resource="Stream"> + <resource name="numbering" resource="Stream" tag="numbering"> <element name="numbering" tokenid="ooxml:NUMBERING"/> </resource> - <resource name="styles" resource="Stream"> + <resource name="styles" resource="Stream" tag="style"> <element name="styles" tokenid="rtf:STYLESHEET"/> </resource> <resource name="ST_CaptionPos" resource="List" generated="yes"> @@ -23435,7 +23440,7 @@ <value name="left" tokenid="ooxml:Value_wordprocessingml_ST_CaptionPos_left">left</value> <value name="right" tokenid="ooxml:Value_wordprocessingml_ST_CaptionPos_right">right</value> </resource> - <resource name="CT_Caption" resource="Properties"> + <resource name="CT_Caption" resource="Properties" tag="content"> <attribute name="name" tokenid="ooxml:CT_Caption_name"/> <attribute name="pos" tokenid="ooxml:CT_Caption_pos"/> <attribute name="chapNum" tokenid="ooxml:CT_Caption_chapNum"/> @@ -23444,23 +23449,23 @@ <attribute name="numFmt" tokenid="ooxml:CT_Caption_numFmt"/> <attribute name="sep" tokenid="ooxml:CT_Caption_sep"/> </resource> - <resource name="CT_AutoCaption" resource="Properties"> + <resource name="CT_AutoCaption" resource="Properties" tag="content"> <attribute name="name" tokenid="ooxml:CT_AutoCaption_name"/> <attribute name="caption" tokenid="ooxml:CT_AutoCaption_caption"/> </resource> - <resource name="CT_AutoCaptions" resource="Properties"> + <resource name="CT_AutoCaptions" resource="Properties" tag="content"> <element name="autoCaption" tokenid="ooxml:CT_AutoCaptions_autoCaption"/> </resource> - <resource name="CT_Captions" resource="Properties"> + <resource name="CT_Captions" resource="Properties" tag="content"> <element name="caption" tokenid="ooxml:CT_Captions_caption"/> <element name="autoCaptions" tokenid="ooxml:CT_Captions_autoCaptions"/> </resource> - <resource name="CT_DocumentBase" resource="Properties"> + <resource name="CT_DocumentBase" resource="Properties" tag="content"> <element name="background" tokenid="ooxml:CT_DocumentBase_background"/> </resource> - <resource name="CT_Document" resource="Stream"/> - <resource name="CT_GlossaryDocument" resource="Stream"/> - <resource name="document" resource="Stream"/> - <resource name="glossaryDocument" resource="Stream"/> + <resource name="CT_Document" resource="Stream" tag="content"/> + <resource name="CT_GlossaryDocument" resource="Stream" tag="content"/> + <resource name="document" resource="Stream" tag="content"/> + <resource name="glossaryDocument" resource="Stream" tag="content"/> </namespace> </model> diff --git a/writerfilter/source/resourcemodel/Fraction.cxx b/writerfilter/source/resourcemodel/Fraction.cxx new file mode 100644 index 000000000000..c50668a7db03 --- /dev/null +++ b/writerfilter/source/resourcemodel/Fraction.cxx @@ -0,0 +1,150 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include <resourcemodel/Fraction.hxx> + +namespace writerfilter { +namespace resourcemodel { + +sal_uInt32 gcd(sal_uInt32 a, sal_uInt32 b) +{ + if (a == 0 || b == 0) + return a | b; + + sal_uInt32 nShift = 0; + while (((a | b) & 1) == 0) + { + a >>= 1; + b >>= 1; + ++nShift; + } + + while ((a & 1) == 0) + a >>= 1; + + do + { + while ((b & 1) == 0) + b >>= 1; + + if (a < b) + { + b -= a; + } + else + { + sal_uInt32 nDiff = a - b; + a = b; + b = nDiff; + } + + b >>= 1; + } + while (b != 0); + + return a << nShift; +} + +sal_uInt32 lcm(sal_Int32 a, sal_Int32 b) +{ + return abs(a * b) / gcd(abs(a), abs(b)); +} + +Fraction::Fraction(sal_Int32 nNumerator, sal_Int32 nDenominator) +{ + init(nNumerator, nDenominator); +} + +Fraction::Fraction(const Fraction & a, const Fraction & b) +{ + init(a.mnNumerator * b.mnDenominator, a.mnDenominator * b.mnNumerator); +} + +Fraction::~Fraction() +{ +} + +void Fraction::init(sal_Int32 nNumerator, sal_Int32 nDenominator) +{ + sal_uInt32 nGCD = gcd(nNumerator, nDenominator); + + mnNumerator = nNumerator/ nGCD; + mnDenominator = nDenominator / nGCD; +} + +void Fraction::assign(const Fraction & rFraction) +{ + init(rFraction.mnNumerator, rFraction.mnDenominator); +} + +Fraction Fraction::inverse() const +{ + return Fraction(mnDenominator, mnNumerator); +} + +Fraction Fraction::operator + (const Fraction & rFraction) const +{ + sal_uInt32 nLCM = lcm(mnDenominator, rFraction.mnDenominator); + + return Fraction(mnNumerator * nLCM / mnDenominator + rFraction.mnNumerator * nLCM / rFraction.mnDenominator, nLCM); +} + +Fraction Fraction::operator - (const Fraction & rFraction) const +{ + sal_uInt32 nLCM = lcm(mnDenominator, rFraction.mnDenominator); + + return Fraction(mnNumerator * nLCM / mnDenominator - rFraction.mnNumerator * nLCM / rFraction.mnDenominator, nLCM); +} + +Fraction Fraction::operator * (const Fraction & rFraction) const +{ + return Fraction(mnNumerator * rFraction.mnNumerator, mnDenominator * rFraction.mnDenominator); +} + +Fraction Fraction::operator / (const Fraction & rFraction) const +{ + return *this * rFraction.inverse(); +} + +Fraction Fraction::operator = (const Fraction & rFraction) +{ + assign(rFraction); + + return *this; +} + +Fraction::operator sal_Int32() const +{ + return mnNumerator / mnDenominator; +} + +Fraction::operator float() const +{ + return static_cast<float>(mnNumerator) / static_cast<float>(mnDenominator); +} + +}} diff --git a/writerfilter/source/resourcemodel/LoggedResources.cxx b/writerfilter/source/resourcemodel/LoggedResources.cxx new file mode 100644 index 000000000000..f60b48b82b5b --- /dev/null +++ b/writerfilter/source/resourcemodel/LoggedResources.cxx @@ -0,0 +1,322 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include <rtl/ustrbuf.hxx> +#include <resourcemodel/LoggedResources.hxx> +#include <resourcemodel/QNameToString.hxx> + +namespace writerfilter +{ + +// class: LoggedResourcesHelper + +LoggedResourcesHelper::LoggedResourcesHelper(TagLogger::Pointer_t pLogger, const string & sPrefix) +: mpLogger(pLogger), msPrefix(sPrefix) +{ +} + +LoggedResourcesHelper::~LoggedResourcesHelper() +{ +} + +void LoggedResourcesHelper::startElement(const string & sElement) +{ + mpLogger->startElement(msPrefix + "." + sElement); +} + +void LoggedResourcesHelper::endElement(const string & sElement) +{ + mpLogger->endElement(msPrefix + "." + sElement); +} + +void LoggedResourcesHelper::chars(const ::rtl::OUString & rChars) +{ + mpLogger->chars(rChars); +} + +void LoggedResourcesHelper::chars(const string & rChars) +{ + mpLogger->chars(rChars); +} + +void LoggedResourcesHelper::attribute(const string & rName, const string & rValue) +{ + mpLogger->attribute(rName, rValue); +} + +void LoggedResourcesHelper::attribute(const string & rName, sal_uInt32 nValue) +{ + mpLogger->attribute(rName, nValue); +} + +void LoggedResourcesHelper::setPrefix(const string & rPrefix) +{ + msPrefix = rPrefix; +} + +// class: LoggedStream + +LoggedStream::LoggedStream(TagLogger::Pointer_t pLogger, const string & sPrefix) +: mHelper(pLogger, sPrefix) +{ +} + +LoggedStream::~LoggedStream() +{ +} + +void LoggedStream::startSectionGroup() +{ +#ifdef DEBUG_LOGGING + mHelper.startElement("section"); +#endif + + lcl_startSectionGroup(); +} + +void LoggedStream::endSectionGroup() +{ + lcl_endSectionGroup(); + +#ifdef DEBUG_LOGGING + mHelper.endElement("section"); +#endif +} + +void LoggedStream::startParagraphGroup() +{ +#ifdef DEBUG_LOGGING + mHelper.startElement("paragraph"); +#endif + + lcl_startParagraphGroup(); +} + +void LoggedStream::endParagraphGroup() +{ + lcl_endParagraphGroup(); + +#ifdef DEBUG_LOGGING + mHelper.endElement("paragraph"); +#endif +} + + +void LoggedStream::startCharacterGroup() +{ +#ifdef DEBUG_LOGGING + mHelper.startElement("charactergroup"); +#endif + + lcl_startCharacterGroup(); +} + +void LoggedStream::endCharacterGroup() +{ + lcl_endCharacterGroup(); + +#ifdef DEBUG_LOGGING + mHelper.endElement("charactergroup"); +#endif +} + +void LoggedStream::startShape( ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > xShape ) +{ +#ifdef DEBUG_LOGGING + mHelper.startElement("shape"); +#endif + + lcl_startShape(xShape); +} + +void LoggedStream::endShape() +{ + lcl_endShape(); + +#ifdef DEBUG_LOGGING + mHelper.endElement("shape"); +#endif +} + +void LoggedStream::text(const sal_uInt8 * data, size_t len) +{ +#ifdef DEBUG_LOGGING + mHelper.startElement("text"); + + ::rtl::OUString sText( (const sal_Char*) data, len, RTL_TEXTENCODING_MS_1252 ); + + mHelper.startElement("data"); + mHelper.chars(sText); + mHelper.endElement("data"); +#endif + + lcl_text(data, len); + +#ifdef DEBUG_LOGGING + mHelper.endElement("text"); +#endif +} + +void LoggedStream::utext(const sal_uInt8 * data, size_t len) +{ +#ifdef DEBUG_LOGGING + mHelper.startElement("utext"); + mHelper.startElement("data"); + + ::rtl::OUString sText; + ::rtl::OUStringBuffer aBuffer = ::rtl::OUStringBuffer(len); + aBuffer.append( (const sal_Unicode *) data, len); + sText = aBuffer.makeStringAndClear(); + + mHelper.chars(sText); + + mHelper.endElement("data"); +#endif + + lcl_utext(data, len); + +#ifdef DEBUG_LOGGING + mHelper.endElement("utext"); +#endif +} + +void LoggedStream::props(writerfilter::Reference<Properties>::Pointer_t ref) +{ +#ifdef DEBUG_LOGGING + mHelper.startElement("props"); +#endif + + lcl_props(ref); + +#ifdef DEBUG_LOGGING + mHelper.endElement("props"); +#endif +} + +void LoggedStream::table(Id name, writerfilter::Reference<Table>::Pointer_t ref) +{ +#ifdef DEBUG_LOGGING + mHelper.startElement("table"); + mHelper.attribute("name", (*QNameToString::Instance())(name)); +#endif + + lcl_table(name, ref); + +#ifdef DEBUG_LOGGING + mHelper.endElement("table"); +#endif +} + +void LoggedStream::substream(Id name, writerfilter::Reference<Stream>::Pointer_t ref) +{ +#ifdef DEBUG_LOGGING + mHelper.startElement("substream"); + mHelper.attribute("name", (*QNameToString::Instance())(name)); +#endif + + lcl_substream(name, ref); + +#ifdef DEBUG_LOGGING + mHelper.endElement("substream"); +#endif +} + +void LoggedStream::info(const string & _info) +{ +#ifdef DEBUG_LOGGING + mHelper.startElement("info"); + mHelper.attribute("text", _info); +#endif + + lcl_info(_info); + +#ifdef DEBUG_LOGGING + mHelper.endElement("info"); +#endif +} + +// class LoggedProperties +LoggedProperties::LoggedProperties(TagLogger::Pointer_t pLogger, const string & sPrefix) +: mHelper(pLogger, sPrefix) +{ +} + +LoggedProperties::~LoggedProperties() +{ +} + +void LoggedProperties::attribute(Id name, Value & val) +{ +#ifdef DEBUG_LOGGING + mHelper.startElement("attribute"); + mHelper.attribute("name", (*QNameToString::Instance())(name)); + mHelper.attribute("value", val.toString()); + mHelper.endElement("attribute"); +#endif + + lcl_attribute(name, val); +} + +void LoggedProperties::sprm(Sprm & _sprm) +{ +#ifdef DEBUG_LOGGING + mHelper.startElement("sprm"); + mHelper.attribute("name", (*QNameToString::Instance())(_sprm.getId())); + mHelper.chars(sprm.toString()); +#endif + + lcl_sprm(_sprm); + +#ifdef DEBUG_LOGGING + mHelper.endElement("sprm"); +#endif +} + +LoggedTable::LoggedTable(TagLogger::Pointer_t pLogger, const string & sPrefix) +: mHelper(pLogger, sPrefix) +{ +} + +LoggedTable::~LoggedTable() +{ +} + +void LoggedTable::entry(int pos, writerfilter::Reference<Properties>::Pointer_t ref) +{ +#ifdef DEBUG_LOGGING + mHelper.startElement("entry"); + mHelper.attribute("pos", pos); +#endif + + lcl_entry(pos, ref); + +#ifdef DEBUG_LOGGING + mHelper.endElement("entry"); +#endif +} + +} diff --git a/writerfilter/source/resourcemodel/TagLogger.cxx b/writerfilter/source/resourcemodel/TagLogger.cxx index f19bef7c01d1..ebb28aa0148b 100644 --- a/writerfilter/source/resourcemodel/TagLogger.cxx +++ b/writerfilter/source/resourcemodel/TagLogger.cxx @@ -25,7 +25,6 @@ * ************************************************************************/ -#ifdef DEBUG #include <fstream> #include <string.h> #include <resourcemodel/TagLogger.hxx> @@ -34,28 +33,28 @@ namespace writerfilter { - XMLTag::Pointer_t XMLTag::NIL(new XMLTag("NIL")); +XMLTag::Pointer_t XMLTag::NIL(new XMLTag("NIL")); - void XMLTag::addAttr(string sName, string sValue) - { - XMLAttribute aAttr(sName, sValue); +void XMLTag::addAttr(string sName, string sValue) +{ + XMLAttribute aAttr(sName, sValue); - mAttrs.push_back(aAttr); - } + mAttrs.push_back(aAttr); +} - void XMLTag::addAttr(string sName, const ::rtl::OUString & sValue) - { - addAttr(sName, - OUStringToOString - (sValue, RTL_TEXTENCODING_ASCII_US).getStr()); - } +void XMLTag::addAttr(string sName, const ::rtl::OUString & sValue) +{ + addAttr(sName, + OUStringToOString + (sValue, RTL_TEXTENCODING_ASCII_US).getStr()); +} - void XMLTag::addAttr(string sName, sal_uInt32 nValue) - { - static char buffer[256]; - snprintf(buffer, sizeof(buffer), "%" SAL_PRIdINT32, nValue); - addAttr(sName, buffer); - } +void XMLTag::addAttr(string sName, sal_uInt32 nValue) +{ + static char buffer[256]; + snprintf(buffer, sizeof(buffer), "%" SAL_PRIdINT32, nValue); + addAttr(sName, buffer); +} void XMLTag::addAttr(string sName, uno::Any aAny) { @@ -111,322 +110,346 @@ void XMLTag::addAttr(string sName, uno::Any aAny) aTmpStrString); } - void XMLTag::addTag(XMLTag::Pointer_t pTag) - { - if (pTag != XMLTag::Pointer_t()) - mTags.push_back(pTag); - } +void XMLTag::addTag(XMLTag::Pointer_t pTag) +{ + if (pTag != XMLTag::Pointer_t()) + mTags.push_back(pTag); +} - void XMLTag::chars(const string & rChars) - { - mChars += rChars; - } +void XMLTag::chars(const string & rChars) +{ + mChars += rChars; +} void XMLTag::chars(const ::rtl::OUString & rChars) { chars(OUStringToOString(rChars, RTL_TEXTENCODING_ASCII_US).getStr()); } - const string & XMLTag::getTag() const - { - return mTag; - } +const string & XMLTag::getTag() const +{ + return mTag; +} - string XMLTag::toString() const - { - if (mChars.length() > 0) - return mChars; +string XMLTag::toString() const +{ + if (mChars.length() > 0) + return mChars; - string sResult; + string sResult; - if (mMode == START || mMode == COMPLETE) - { - sResult += "<" + mTag; + if (mMode == START || mMode == COMPLETE) + { + sResult += "<" + mTag; - XMLAttributes_t::const_iterator aIt = mAttrs.begin(); - while (aIt != mAttrs.end()) - { - sResult += " "; - sResult += aIt->mName; - sResult += "=\""; - sResult += xmlify(aIt->mValue); - sResult += "\""; + XMLAttributes_t::const_iterator aIt = mAttrs.begin(); + while (aIt != mAttrs.end()) + { + sResult += " "; + sResult += aIt->mName; + sResult += "=\""; + sResult += xmlify(aIt->mValue); + sResult += "\""; - aIt++; - } + aIt++; + } - sResult +=">"; + sResult +=">"; - if (mTags.size() > 0) + if (mTags.size() > 0) + { + XMLTags_t::const_iterator aItTags = mTags.begin(); + while (aItTags != mTags.end()) { - XMLTags_t::const_iterator aItTags = mTags.begin(); - while (aItTags != mTags.end()) - { - if ((*aItTags).get() != NULL) - sResult += (*aItTags)->toString(); - - aItTags++; - } + if ((*aItTags).get() != NULL) + sResult += (*aItTags)->toString(); + + aItTags++; } } + } - if (mMode == END || mMode == COMPLETE) - sResult += "</" + mTag + ">"; + if (mMode == END || mMode == COMPLETE) + sResult += "</" + mTag + ">"; - return sResult; - } + return sResult; +} + +ostream & XMLTag::output(ostream & o, const string & sIndent) const +{ + bool bHasContent = mChars.size() > 0 || mTags.size() > 0; - ostream & XMLTag::output(ostream & o) const + if (mMode == START || mMode == COMPLETE) { - if (mMode == START || mMode == COMPLETE) - { - o << "<" << mTag; + o << sIndent << "<" << mTag; - XMLAttributes_t::const_iterator aItAttrs(mAttrs.begin()); - while (aItAttrs != mAttrs.end()) - { - o << " " << aItAttrs->mName << "=\"" - << xmlify(aItAttrs->mValue) - << "\""; + XMLAttributes_t::const_iterator aItAttrs(mAttrs.begin()); + while (aItAttrs != mAttrs.end()) + { + o << " " << aItAttrs->mName << "=\"" + << xmlify(aItAttrs->mValue) + << "\""; - aItAttrs++; - } + aItAttrs++; + } + if (bHasContent) + { o << ">"; + string sNewIndent = sIndent + " "; XMLTags_t::const_iterator aItTags(mTags.begin()); while (aItTags != mTags.end()) { - (*aItTags)->output(o); + if (aItTags == mTags.begin()) + o << endl; + + (*aItTags)->output(o, sNewIndent); aItTags++; } o << mChars; } - - if (mMode == END || mMode == COMPLETE) - o << "</" << mTag << ">"; - - return o; } - struct eqstr + if (mMode == END || mMode == COMPLETE) { - bool operator()(const char* s1, const char* s2) const + if (bHasContent) { - return strcmp(s1, s2) == 0; - } - }; - - typedef hash_map<const char *, TagLogger::Pointer_t, hash<const char *>, eqstr> TagLoggerHashMap_t; - static TagLoggerHashMap_t * tagLoggers = NULL; + if (mTags.size() > 0) + o << sIndent; - TagLogger::TagLogger() - : mFileName("writerfilter") - { + o << "</" << mTag << ">" << endl; + } + else + o << "/>" << endl; } - TagLogger::~TagLogger() - { - } + return o; +} - void TagLogger::setFileName(const string & rName) +struct eqstr +{ + bool operator()(const char* s1, const char* s2) const { - mFileName = rName; + return strcmp(s1, s2) == 0; } +}; - TagLogger::Pointer_t TagLogger::getInstance(const char * name) - { - if (tagLoggers == NULL) - tagLoggers = new TagLoggerHashMap_t(); +typedef hash_map<const char *, TagLogger::Pointer_t, hash<const char *>, eqstr> TagLoggerHashMap_t; +static TagLoggerHashMap_t * tagLoggers = NULL; - TagLoggerHashMap_t::iterator aIt = tagLoggers->end(); +TagLogger::TagLogger() +: mFileName("writerfilter") +{ +} - if (! tagLoggers->empty()) - aIt = tagLoggers->find(name); +TagLogger::~TagLogger() +{ +} - if (aIt == tagLoggers->end()) - { - TagLogger::Pointer_t pTagLogger(new TagLogger()); - pair<const char *, TagLogger::Pointer_t> entry(name, pTagLogger); - aIt = tagLoggers->insert(entry).first; - } +void TagLogger::setFileName(const string & rName) +{ + mFileName = rName; +} - return aIt->second; - } +TagLogger::Pointer_t TagLogger::getInstance(const char * name) +{ + if (tagLoggers == NULL) + tagLoggers = new TagLoggerHashMap_t(); - XMLTag::Pointer_t TagLogger::currentTag() const - { - bool bEmpty=mTags.empty(); - if (!bEmpty) - return mTags.top(); + TagLoggerHashMap_t::iterator aIt = tagLoggers->end(); - return XMLTag::NIL; - } + if (! tagLoggers->empty()) + aIt = tagLoggers->find(name); - void TagLogger::startDocument() + if (aIt == tagLoggers->end()) { - XMLTag::Pointer_t pTag(new XMLTag("root")); - mTags.push(pTag); - mpRoot = pTag; + TagLogger::Pointer_t pTagLogger(new TagLogger()); + pair<const char *, TagLogger::Pointer_t> entry(name, pTagLogger); + aIt = tagLoggers->insert(entry).first; } - void TagLogger::element(const string & name) - { - startElement(name); - endElement(name); - } + return aIt->second; +} - void TagLogger::startElement(const string & name) - { - XMLTag::Pointer_t pTag(new XMLTag(name)); - currentTag()->addTag(pTag); - mTags.push(pTag); - } +XMLTag::Pointer_t TagLogger::currentTag() const +{ + bool bEmpty=mTags.empty(); + if (!bEmpty) + return mTags.top(); - void TagLogger::attribute(const string & name, const string & value) - { - currentTag()->addAttr(name, value); - } + return XMLTag::NIL; +} - void TagLogger::attribute(const string & name, const ::rtl::OUString & value) - { - currentTag()->addAttr(name, value); - } +void TagLogger::startDocument() +{ + XMLTag::Pointer_t pTag(new XMLTag("root")); + mTags.push(pTag); + mpRoot = pTag; +} - void TagLogger::attribute(const string & name, sal_uInt32 value) - { - currentTag()->addAttr(name, value); - } +void TagLogger::element(const string & name) +{ + startElement(name); + endElement(name); +} -void TagLogger::attribute(const string & name, const uno::Any aAny) +void TagLogger::startElement(const string & name) { - currentTag()->addAttr(name, aAny); + XMLTag::Pointer_t pTag(new XMLTag(name)); + currentTag()->addTag(pTag); + mTags.push(pTag); } - void TagLogger::addTag(XMLTag::Pointer_t pTag) - { - currentTag()->addTag(pTag); - } +void TagLogger::attribute(const string & name, const string & value) +{ + currentTag()->addAttr(name, value); +} - void TagLogger::chars(const string & rChars) - { - currentTag()->chars(xmlify(rChars)); - } +void TagLogger::attribute(const string & name, const ::rtl::OUString & value) +{ + currentTag()->addAttr(name, value); +} - void TagLogger::chars(const ::rtl::OUString & rChars) - { - chars(OUStringToOString(rChars, RTL_TEXTENCODING_ASCII_US).getStr()); - } +void TagLogger::attribute(const string & name, sal_uInt32 value) +{ + currentTag()->addAttr(name, value); +} - void TagLogger::endElement(const string & name) - { - string nameRemoved = currentTag()->getTag(); +void TagLogger::attribute(const string & name, const uno::Any aAny) +{ + currentTag()->addAttr(name, aAny); +} - if (name == nameRemoved) - mTags.pop(); - else { - XMLTag::Pointer_t pTag(new XMLTag("end.mismatch")); - pTag->addAttr("name", name); - pTag->addAttr("top", nameRemoved); +void TagLogger::addTag(XMLTag::Pointer_t pTag) +{ + currentTag()->addTag(pTag); +} - currentTag()->addTag(pTag); - } +void TagLogger::chars(const string & rChars) +{ + currentTag()->chars(xmlify(rChars)); +} - } +void TagLogger::chars(const ::rtl::OUString & rChars) +{ + chars(OUStringToOString(rChars, RTL_TEXTENCODING_ASCII_US).getStr()); +} - void TagLogger::endDocument() - { +void TagLogger::endElement(const string & name) +{ + string nameRemoved = currentTag()->getTag(); + + if (name == nameRemoved) mTags.pop(); - } + else { + XMLTag::Pointer_t pTag(new XMLTag("end.mismatch")); + pTag->addAttr("name", name); + pTag->addAttr("top", nameRemoved); - ostream & TagLogger::output(ostream & o) const - { - return mpRoot->output(o); + currentTag()->addTag(pTag); } - void TagLogger::dump(const char * name) - { - TagLoggerHashMap_t::iterator aIt(tagLoggers->find(name)); - if (aIt != tagLoggers->end()) - { - string fileName; - char * temp = getenv("TAGLOGGERTMP"); - - if (temp != NULL) - fileName += temp; - else - fileName += "/tmp"; - - string sPrefix = aIt->second->mFileName; - size_t nLastSlash = sPrefix.find_last_of('/'); - size_t nLastBackslash = sPrefix.find_last_of('\\'); - size_t nCutPos = nLastSlash; - if (nLastBackslash < nCutPos) - nCutPos = nLastBackslash; - if (nCutPos < sPrefix.size()) - sPrefix = sPrefix.substr(nCutPos + 1); - - fileName += "/"; - fileName += sPrefix; - fileName +="."; - fileName += name; - fileName += ".xml"; - - ofstream dumpStream(fileName.c_str()); - aIt->second->output(dumpStream); - } - } +} - PropertySetToTagHandler::~PropertySetToTagHandler() - { +void TagLogger::endDocument() +{ + mTags.pop(); +} + +ostream & TagLogger::output(ostream & o) const +{ + return mpRoot->output(o); +} + +void TagLogger::dump(const char * name) +{ + TagLoggerHashMap_t::iterator aIt(tagLoggers->find(name)); + if (aIt != tagLoggers->end()) + { + string fileName; + char * temp = getenv("TAGLOGGERTMP"); + + if (temp != NULL) + fileName += temp; + else + fileName += "/tmp"; + + string sPrefix = aIt->second->mFileName; + size_t nLastSlash = sPrefix.find_last_of('/'); + size_t nLastBackslash = sPrefix.find_last_of('\\'); + size_t nCutPos = nLastSlash; + if (nLastBackslash < nCutPos) + nCutPos = nLastBackslash; + if (nCutPos < sPrefix.size()) + sPrefix = sPrefix.substr(nCutPos + 1); + + fileName += "/"; + fileName += sPrefix; + fileName +="."; + fileName += name; + fileName += ".xml"; + + ofstream dumpStream(fileName.c_str()); + aIt->second->output(dumpStream); } +} + +PropertySetToTagHandler::PropertySetToTagHandler(IdToString::Pointer_t pIdToString) + : mpTag(new XMLTag("propertyset")), mpIdToString(pIdToString) +{ +} + +PropertySetToTagHandler::~PropertySetToTagHandler() +{ +} - void PropertySetToTagHandler::resolve - (XMLTag & rTag, writerfilter::Reference<Properties>::Pointer_t pProps) +void PropertySetToTagHandler::resolve +(XMLTag & rTag, writerfilter::Reference<Properties>::Pointer_t pProps) +{ + if (pProps.get() != NULL) { - if (pProps.get() != NULL) - { - PropertySetToTagHandler aHandler(mpIdToString); - pProps->resolve(aHandler); - rTag.addTag(aHandler.getTag()); - } + PropertySetToTagHandler aHandler(mpIdToString); + pProps->resolve(aHandler); + rTag.addTag(aHandler.getTag()); } +} - void PropertySetToTagHandler::attribute(Id name, Value & val) - { - XMLTag::Pointer_t pTag(new XMLTag("attribute")); +void PropertySetToTagHandler::attribute(Id name, Value & val) +{ + XMLTag::Pointer_t pTag(new XMLTag("attribute")); - pTag->addAttr("name", (*QNameToString::Instance())(name)); - pTag->addAttr("value", val.toString()); + pTag->addAttr("name", (*QNameToString::Instance())(name)); + pTag->addAttr("value", val.toString()); - resolve(*pTag, val.getProperties()); + resolve(*pTag, val.getProperties()); - mpTag->addTag(pTag); - } + mpTag->addTag(pTag); +} - void PropertySetToTagHandler::sprm(Sprm & rSprm) - { - XMLTag::Pointer_t pTag(new XMLTag("sprm")); +void PropertySetToTagHandler::sprm(Sprm & rSprm) +{ + XMLTag::Pointer_t pTag(new XMLTag("sprm")); - string sName; + string sName; - if (mpIdToString != IdToString::Pointer_t()) - sName = mpIdToString->toString(rSprm.getId()); + if (mpIdToString != IdToString::Pointer_t()) + sName = mpIdToString->toString(rSprm.getId()); - pTag->addAttr("name", sName); + pTag->addAttr("name", sName); - static char sBuffer[256]; - snprintf(sBuffer, sizeof(sBuffer), - "0x%" SAL_PRIxUINT32 ", %" SAL_PRIuUINT32, rSprm.getId(), - rSprm.getId()); - pTag->addAttr("id", sBuffer); - pTag->addAttr("value", rSprm.getValue()->toString()); + static char sBuffer[256]; + snprintf(sBuffer, sizeof(sBuffer), + "0x%" SAL_PRIxUINT32 ", %" SAL_PRIuUINT32, rSprm.getId(), + rSprm.getId()); + pTag->addAttr("id", sBuffer); + pTag->addAttr("value", rSprm.getValue()->toString()); - resolve(*pTag, rSprm.getProps()); + resolve(*pTag, rSprm.getProps()); - mpTag->addTag(pTag); - } + mpTag->addTag(pTag); +} XMLTag::Pointer_t unoPropertySetToTag(uno::Reference<beans::XPropertySet> rPropSet) @@ -464,4 +487,3 @@ XMLTag::Pointer_t unoPropertySetToTag(uno::Reference<beans::XPropertySet> rPropS } } -#endif // DEBUG diff --git a/writerfilter/source/resourcemodel/XPathLogger.cxx b/writerfilter/source/resourcemodel/XPathLogger.cxx new file mode 100644 index 000000000000..89255c8311f8 --- /dev/null +++ b/writerfilter/source/resourcemodel/XPathLogger.cxx @@ -0,0 +1,90 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include <stdio.h> +#include <resourcemodel/XPathLogger.hxx> + +namespace writerfilter +{ +XPathLogger::XPathLogger() +: mp_tokenMap(new TokenMap_t) +{ +} + +XPathLogger::~XPathLogger() +{ +} + +string XPathLogger::getXPath() const +{ + return m_currentPath; +} + +void XPathLogger::updateCurrentPath() +{ + m_currentPath = ""; + + for (vector<string>::const_iterator aIt = m_path.begin(); + aIt != m_path.end(); + aIt++) + { + if (m_currentPath.size() > 0) + m_currentPath += "/"; + + m_currentPath += *aIt; + } +} + +void XPathLogger::startElement(string _token) +{ + TokenMap_t::const_iterator aIt = mp_tokenMap->find(_token); + + if (aIt == mp_tokenMap->end()) + (*mp_tokenMap)[_token] = 1; + else + (*mp_tokenMap)[_token]++; + + static char sBuffer[256]; + snprintf(sBuffer, sizeof(sBuffer), "[%d]", (*mp_tokenMap)[_token]); + m_path.push_back(_token + sBuffer); + + m_tokenMapStack.push(mp_tokenMap); + mp_tokenMap.reset(new TokenMap_t); + + updateCurrentPath(); +} + +void XPathLogger::endElement() +{ + mp_tokenMap = m_tokenMapStack.top(); + m_tokenMapStack.pop(); + m_path.pop_back(); + + updateCurrentPath(); +} + +} diff --git a/writerfilter/source/resourcemodel/makefile.mk b/writerfilter/source/resourcemodel/makefile.mk index 384cf8cfe38e..cf7941b3ed1c 100644 --- a/writerfilter/source/resourcemodel/makefile.mk +++ b/writerfilter/source/resourcemodel/makefile.mk @@ -49,14 +49,17 @@ NOOPTFILES= \ $(SLO)$/qnametostr.obj SLOFILES= \ + $(SLO)$/Fraction.obj \ + $(SLO)$/LoggedResources.obj \ + $(SLO)$/Protocol.obj \ + $(SLO)$/ResourceModelHelper.obj \ + $(SLO)$/TagLogger.obj \ + $(SLO)$/WW8Analyzer.obj \ + $(SLO)$/XPathLogger.obj \ $(SLO)$/qnametostr.obj \ - $(SLO)$/sprmcodetostr.obj \ $(SLO)$/resourcemodel.obj \ + $(SLO)$/sprmcodetostr.obj \ $(SLO)$/util.obj \ - $(SLO)$/TagLogger.obj \ - $(SLO)$/ResourceModelHelper.obj \ - $(SLO)$/WW8Analyzer.obj \ - $(SLO)$/Protocol.obj # linux 64 bit: compiler (gcc 4.2.3) fails with 'out of memory' .IF "$(OUTPATH)"=="unxlngx6" diff --git a/writerperfect/source/stream/WPXSvStream.cxx b/writerperfect/source/stream/WPXSvStream.cxx index 973fb5ab31d9..7f8e3aaa794f 100644 --- a/writerperfect/source/stream/WPXSvStream.cxx +++ b/writerperfect/source/stream/WPXSvStream.cxx @@ -146,7 +146,7 @@ WPXInputStream * WPXSvInputStream::getDocumentOLEStream(const char * name) return 0; } - mxChildStorage = new SotStorage( pStream, TRUE ); + mxChildStorage = new SotStorage( pStream, sal_True ); mxChildStream = mxChildStorage->OpenSotStream( rtl::OUString::createFromAscii( name ), |